@wireapp/react-ui-kit 8.12.0 → 8.13.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +27 -0
- package/package.json +2 -2
- package/src/Form/Button.js +22 -9
- package/src/Form/Button.js.map +1 -1
- package/src/Form/Select.d.ts +1 -1
- package/src/Form/Select.js.map +1 -1
- package/src/Form/SelectStyles.d.ts +2 -2
- package/src/Form/ShakeBox.d.ts +1 -1
- package/src/GlobalCssVariables.d.js +2 -0
- package/src/GlobalCssVariables.d.js.map +1 -0
- package/src/GlobalCssVariables.d.ts +7 -0
- package/src/GlobalCssVariables.js +128 -0
- package/src/GlobalCssVariables.js.map +1 -0
- package/src/GlobalStyle.js +7 -3
- package/src/GlobalStyle.js.map +1 -1
- package/src/Identity/colors-v2.js +26 -26
- package/src/Identity/colors-v2.js.map +1 -1
- package/src/Layout/Container.d.ts +5 -5
- package/src/Layout/Theme.d.ts +20 -1
- package/src/Layout/Theme.js +80 -2
- package/src/Layout/Theme.js.map +1 -1
- package/src/Layout/headerMenu/MenuSubLink.js +1 -5
- package/src/Layout/headerMenu/MenuSubLink.js.map +1 -1
- package/src/Modal/Modal.js +3 -3
- package/src/Modal/Modal.js.map +1 -1
- package/src/Text/Link.js +15 -14
- package/src/Text/Link.js.map +1 -1
- package/src/Text/Text.d.ts +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,33 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [8.13.2](https://github.com/wireapp/wire-web-packages/tree/main/packages/react-ui-kit/compare/@wireapp/react-ui-kit@8.13.1...@wireapp/react-ui-kit@8.13.2) (2022-08-17)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @wireapp/react-ui-kit
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [8.13.1](https://github.com/wireapp/wire-web-packages/tree/main/packages/react-ui-kit/compare/@wireapp/react-ui-kit@8.13.0...@wireapp/react-ui-kit@8.13.1) (2022-08-11)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @wireapp/react-ui-kit
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
# [8.13.0](https://github.com/wireapp/wire-web-packages/tree/main/packages/react-ui-kit/compare/@wireapp/react-ui-kit@8.12.0...@wireapp/react-ui-kit@8.13.0) (2022-08-11)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Features
|
|
26
|
+
|
|
27
|
+
* move the theme in ui-kit and expose css variables ([#4358](https://github.com/wireapp/wire-web-packages/tree/main/packages/react-ui-kit/issues/4358)) ([2a7ad70](https://github.com/wireapp/wire-web-packages/tree/main/packages/react-ui-kit/commit/2a7ad70b17072d24960c2e36c3409a858d4b5891))
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
6
33
|
# [8.12.0](https://github.com/wireapp/wire-web-packages/tree/main/packages/react-ui-kit/compare/@wireapp/react-ui-kit@8.11.4...@wireapp/react-ui-kit@8.12.0) (2022-08-10)
|
|
7
34
|
|
|
8
35
|
|
package/package.json
CHANGED
|
@@ -70,6 +70,6 @@
|
|
|
70
70
|
"test:update": "yarn test --updateSnapshot",
|
|
71
71
|
"test:project": "yarn dist && yarn test"
|
|
72
72
|
},
|
|
73
|
-
"version": "8.
|
|
74
|
-
"gitHead": "
|
|
73
|
+
"version": "8.13.2",
|
|
74
|
+
"gitHead": "d0b13f580eba65a5a6703f674edaca4046600be0"
|
|
75
75
|
}
|
package/src/Form/Button.js
CHANGED
|
@@ -102,17 +102,19 @@ var buttonStyle = function buttonStyle(theme, _ref) {
|
|
|
102
102
|
minWidth: '125px',
|
|
103
103
|
padding: '0 16px'
|
|
104
104
|
})), variant === ButtonVariant.PRIMARY && _objectSpread({
|
|
105
|
-
backgroundColor: backgroundColor || (disabled ?
|
|
106
|
-
color: disabled ?
|
|
105
|
+
backgroundColor: backgroundColor || (disabled ? theme.Button.primaryDisabledBg : theme.Button.primaryBg),
|
|
106
|
+
color: disabled ? theme.Button.primaryDisabledText : theme.general.contrastColor
|
|
107
107
|
}, !disabled && {
|
|
108
108
|
'&:hover, &:focus': {
|
|
109
|
-
backgroundColor:
|
|
109
|
+
backgroundColor: theme.Button.primaryHoverBg
|
|
110
110
|
},
|
|
111
111
|
'&:focus': {
|
|
112
|
-
border: "1px solid ".concat(
|
|
112
|
+
border: "1px solid ".concat(theme.Button.primaryFocusBorder)
|
|
113
113
|
},
|
|
114
114
|
'&:active': {
|
|
115
|
-
backgroundColor:
|
|
115
|
+
backgroundColor: theme.Button.primaryActiveBg,
|
|
116
|
+
border: "1px solid ".concat(theme.Button.primaryActiveBorder),
|
|
117
|
+
color: _Identity.COLOR.WHITE
|
|
116
118
|
}
|
|
117
119
|
})), variant === ButtonVariant.SECONDARY && _objectSpread({
|
|
118
120
|
backgroundColor: backgroundColor || (disabled ? _Identity.COLOR_V2.GRAY_20 : _Identity.COLOR_V2.WHITE),
|
|
@@ -131,14 +133,25 @@ var buttonStyle = function buttonStyle(theme, _ref) {
|
|
|
131
133
|
color: _Identity.COLOR_V2.BLUE
|
|
132
134
|
}
|
|
133
135
|
})), variant === ButtonVariant.TERTIARY && _objectSpread({
|
|
134
|
-
|
|
135
|
-
|
|
136
|
+
backgroundColor: backgroundColor || (disabled ? theme.Button.tertiarydisabledBg : theme.Button.tertiaryBg),
|
|
137
|
+
border: disabled ? "1px solid ".concat(theme.Button.tertiaryDisabledBorder) : "1px solid ".concat(theme.Button.tertiaryBorder),
|
|
138
|
+
borderRadius: '12px',
|
|
139
|
+
color: disabled ? theme.Input.placeholderColor : theme.general.color,
|
|
140
|
+
fontSize: '14px',
|
|
141
|
+
fontWeight: 700,
|
|
142
|
+
lineHeight: '24px',
|
|
143
|
+
padding: '4px 8px'
|
|
136
144
|
}, !disabled && {
|
|
137
145
|
'&:hover, &:focus': {
|
|
138
|
-
|
|
146
|
+
backgroundColor: theme.Button.tertiaryHoverBg,
|
|
147
|
+
border: "1px solid ".concat(theme.Button.tertiaryHoverBorder)
|
|
139
148
|
},
|
|
140
149
|
'&:focus': {
|
|
141
|
-
border: "1px solid ".concat(
|
|
150
|
+
border: "1px solid ".concat(theme.general.focusColor)
|
|
151
|
+
},
|
|
152
|
+
'&:active': {
|
|
153
|
+
backgroundColor: theme.Button.tertiaryActiveBg,
|
|
154
|
+
color: theme.IconButton.primaryActiveFillColor
|
|
142
155
|
}
|
|
143
156
|
})), variant === ButtonVariant.QUATERNARY && _objectSpread({
|
|
144
157
|
backgroundColor: backgroundColor || (disabled ? _Identity.COLOR_V2.GRAY_50 : _Identity.COLOR_V2.GREEN),
|
package/src/Form/Button.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Button.tsx"],"names":["ButtonVariant","buttonStyle","theme","variant","PRIMARY","backgroundColor","block","disabled","noCapital","bold","center","color","COLOR","WHITE","fontSize","noWrap","textTransform","truncate","props","border","cursor","display","alignItems","justifyContent","marginBottom","padding","outline","textDecoration","touchAction","transition","defaultTransition","width","TERTIARY","borderRadius","SEND","height","lineHeight","maxWidth","minWidth","COLOR_V2","GRAY_50","BLUE","GRAY_80","BLUE_LIGHT_600","BLUE_LIGHT_700","SECONDARY","GRAY_20","GRAY_40","GRAY_60","BLACK","BLUE_LIGHT_50","BLUE_LIGHT_300","QUATERNARY","GREEN","GREEN_LIGHT_600","GREEN_LIGHT_700","GRAY_70","BLUE_LIGHT_800","Button","showLoading","children","loadingColor","filterButtonProps","margin"],"mappings":";;;;;;;;;;;;;;;AAoBA;;AAEA;;AACA;;AAEA;;AACA;;AACA;;;;;;;;;IAEYA,a;;;WAAAA,a;AAAAA,EAAAA,a;AAAAA,EAAAA,a;AAAAA,EAAAA,a;AAAAA,EAAAA,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EAAEE,YAA1B;AAAwC,IAAA,KAAK,EAAE;AAACxC,MAAAA,OAAO,EAAE,MAAV;AAAkB0C,MAAAA,MAAM,EAAE;AAA1B;AAA/C,IAAH,GAA0FH,QADxG,CADoB;AAAA,CAAf;;;;AAMA,IAAME,iBAAiB,GAAG,SAApBA,iBAAoB,CAAC5C,KAAD,EAAwB;AACvD,SAAO,uBAAY,2BAAgBA,KAAhB,CAAZ,EAAmD,CAAC,iBAAD,EAAoB,WAApB,CAAnD,CAAP;AACD,CAFM","sourcesContent":["/*\n * Wire\n * Copyright (C) 2018 Wire Swiss GmbH\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see http://www.gnu.org/licenses/.\n *\n */\n\n/** @jsx jsx */\nimport {CSSObject, jsx} from '@emotion/react';\n\nimport {COLOR, COLOR_V2} from '../Identity';\nimport {defaultTransition} from '../Identity/motions';\nimport type {Theme} from '../Layout';\nimport {Loading} from '../Misc';\nimport {TextProps, filterTextProps, textStyle} from '../Text';\nimport {filterProps} from '../util';\n\nexport enum ButtonVariant {\n PRIMARY = 'primary',\n SECONDARY = 'secondary',\n TERTIARY = 'tertiary',\n QUATERNARY = 'quaternary',\n SEND = 'send',\n}\n\nexport interface ButtonProps<T = HTMLButtonElement> extends TextProps<T> {\n variant?: ButtonVariant;\n backgroundColor?: string;\n loadingColor?: string;\n noCapital?: boolean;\n showLoading?: boolean;\n}\n\nexport const buttonStyle: <T>(theme: Theme, props: ButtonProps<T>) => CSSObject = (\n theme,\n {\n variant = ButtonVariant.PRIMARY,\n backgroundColor,\n block = false,\n disabled = false,\n noCapital = false,\n bold = true,\n center = true,\n color = COLOR.WHITE,\n fontSize = '16px',\n noWrap = true,\n textTransform = 'none',\n truncate = true,\n ...props\n },\n) => ({\n ...textStyle(theme, {\n block,\n bold,\n center,\n disabled,\n fontSize,\n noWrap,\n textTransform,\n truncate,\n ...props,\n }),\n border: 0,\n cursor: disabled ? 'default' : 'pointer',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n marginBottom: '16px',\n padding: 0,\n outline: 'none',\n textDecoration: 'none',\n touchAction: 'manipulation',\n transition: defaultTransition,\n width: block ? '100%' : 'auto',\n '&:hover, &:focus': {\n textDecoration: 'none',\n },\n ...(variant !== ButtonVariant.TERTIARY && {\n borderRadius: variant === ButtonVariant.SEND ? '100%' : '16px',\n height: variant === ButtonVariant.SEND ? '40px' : '48px',\n lineHeight: variant === ButtonVariant.SEND ? '40px' : '48px',\n ...(variant !== ButtonVariant.SEND && {\n maxWidth: '100%',\n minWidth: '125px',\n padding: '0 16px',\n }),\n }),\n ...(variant === ButtonVariant.PRIMARY && {\n backgroundColor: backgroundColor || (disabled ? COLOR_V2.GRAY_50 : COLOR_V2.BLUE),\n color: disabled ? COLOR_V2.GRAY_80 : COLOR_V2.WHITE,\n ...(!disabled && {\n '&:hover, &:focus': {\n backgroundColor: COLOR_V2.BLUE_LIGHT_600,\n },\n '&:focus': {\n border: `1px solid ${COLOR_V2.BLUE_LIGHT_700}`,\n },\n '&:active': {\n backgroundColor: COLOR_V2.BLUE_LIGHT_700,\n },\n }),\n }),\n ...(variant === ButtonVariant.SECONDARY && {\n backgroundColor: backgroundColor || (disabled ? COLOR_V2.GRAY_20 : COLOR_V2.WHITE),\n border: `1px solid ${COLOR_V2.GRAY_40}`,\n color: disabled ? COLOR_V2.GRAY_60 : COLOR_V2.BLACK,\n ...(!disabled && {\n '&:hover, &:focus': {\n border: `1px solid ${COLOR_V2.BLUE}`,\n },\n '&:focus': {\n color: COLOR_V2.BLUE,\n },\n '&:active': {\n backgroundColor: COLOR_V2.BLUE_LIGHT_50,\n border: `1px solid ${COLOR_V2.BLUE}`,\n color: COLOR_V2.BLUE,\n },\n }),\n }),\n ...(variant === ButtonVariant.TERTIARY && {\n color: disabled ? COLOR_V2.GRAY_60 : COLOR_V2.BLACK,\n lineHeight: '24px',\n ...(!disabled && {\n '&:hover, &:focus': {\n color: COLOR_V2.BLUE,\n },\n '&:focus': {\n border: `1px solid ${COLOR_V2.BLUE_LIGHT_300}`,\n },\n }),\n }),\n ...(variant === ButtonVariant.QUATERNARY && {\n backgroundColor: backgroundColor || (disabled ? COLOR_V2.GRAY_50 : COLOR_V2.GREEN),\n color: disabled ? COLOR_V2.GRAY_80 : COLOR_V2.WHITE,\n lineHeight: '24px',\n ...(!disabled && {\n '&:hover, &:focus': {\n backgroundColor: COLOR_V2.GREEN_LIGHT_600,\n },\n '&:focus': {\n border: `1px solid ${COLOR_V2.GREEN_LIGHT_700}`,\n },\n '&:active': {\n backgroundColor: COLOR_V2.GREEN_LIGHT_700,\n },\n }),\n }),\n ...(variant === ButtonVariant.SEND && {\n backgroundColor: backgroundColor || (disabled ? COLOR_V2.GRAY_70 : COLOR_V2.BLUE),\n width: '40px',\n ...(!disabled && {\n '&:hover, &:focus': {\n backgroundColor: COLOR_V2.BLUE_LIGHT_600,\n },\n '&:focus': {\n border: `1px solid ${COLOR_V2.BLUE_LIGHT_800}`,\n },\n '&:active': {\n backgroundColor: COLOR_V2.BLUE_LIGHT_700,\n },\n }),\n }),\n});\n\nexport const Button = ({showLoading, children, loadingColor = COLOR.WHITE, ...props}: ButtonProps) => (\n <button css={(theme: Theme) => buttonStyle(theme, props)} {...filterButtonProps(props)}>\n {showLoading ? <Loading size={30} color={loadingColor} style={{display: 'flex', margin: 'auto'}} /> : children}\n </button>\n);\n\nexport const filterButtonProps = (props: ButtonProps) => {\n return filterProps(filterTextProps(props) as ButtonProps, ['backgroundColor', 'noCapital']);\n};\n"],"file":"Button.js"}
|
|
1
|
+
{"version":3,"sources":["Button.tsx"],"names":["ButtonVariant","buttonStyle","theme","variant","PRIMARY","backgroundColor","block","disabled","noCapital","bold","center","color","COLOR","WHITE","fontSize","noWrap","textTransform","truncate","props","border","cursor","display","alignItems","justifyContent","marginBottom","padding","outline","textDecoration","touchAction","transition","defaultTransition","width","TERTIARY","borderRadius","SEND","height","lineHeight","maxWidth","minWidth","Button","primaryDisabledBg","primaryBg","primaryDisabledText","general","contrastColor","primaryHoverBg","primaryFocusBorder","primaryActiveBg","primaryActiveBorder","SECONDARY","COLOR_V2","GRAY_20","GRAY_40","GRAY_60","BLACK","BLUE","BLUE_LIGHT_50","tertiarydisabledBg","tertiaryBg","tertiaryDisabledBorder","tertiaryBorder","Input","placeholderColor","fontWeight","tertiaryHoverBg","tertiaryHoverBorder","focusColor","tertiaryActiveBg","IconButton","primaryActiveFillColor","QUATERNARY","GRAY_50","GREEN","GRAY_80","GREEN_LIGHT_600","GREEN_LIGHT_700","GRAY_70","BLUE_LIGHT_600","BLUE_LIGHT_800","BLUE_LIGHT_700","showLoading","children","loadingColor","filterButtonProps","margin"],"mappings":";;;;;;;;;;;;;;;AAoBA;;AAEA;;AACA;;AAEA;;AACA;;AACA;;;;;;;;;IAEYA,a;;;WAAAA,a;AAAAA,EAAAA,a;AAAAA,EAAAA,a;AAAAA,EAAAA,a;AAAAA,EAAAA,a;AAAAA,EAAAA,a;GAAAA,a,6BAAAA,a;;AAgBL,IAAMC,WAAkE,GAAG,SAArEA,WAAqE,CAChFC,KADgF;AAAA,0BAG9EC,OAH8E;AAAA,MAG9EA,OAH8E,6BAGpEH,aAAa,CAACI,OAHsD;AAAA,MAI9EC,eAJ8E,QAI9EA,eAJ8E;AAAA,wBAK9EC,KAL8E;AAAA,MAK9EA,KAL8E,2BAKtE,KALsE;AAAA,2BAM9EC,QAN8E;AAAA,MAM9EA,QAN8E,8BAMnE,KANmE;AAAA,4BAO9EC,SAP8E;AAAA,MAO9EA,SAP8E,+BAOlE,KAPkE;AAAA,uBAQ9EC,IAR8E;AAAA,MAQ9EA,IAR8E,0BAQv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Y;AACVzE,MAAAA,eAAe,EAAE6C,mBAAS6B;AADhB;AAPG,GAHf,CAhI4E;AAAA,CAA3E;;;;AAiJA,IAAMxC,MAAM,GAAG,SAATA,MAAS;AAAA,MAAEyC,WAAF,SAAEA,WAAF;AAAA,MAAeC,QAAf,SAAeA,QAAf;AAAA,iCAAyBC,YAAzB;AAAA,MAAyBA,YAAzB,mCAAwCtE,gBAAMC,KAA9C;AAAA,MAAwDK,KAAxD;AAAA,SACpB;AAAQ,IAAA,GAAG,EAAE,aAAChB,KAAD;AAAA,aAAkBD,WAAW,CAACC,KAAD,EAAQgB,KAAR,CAA7B;AAAA;AAAb,KAA8DiE,iBAAiB,CAACjE,KAAD,CAA/E,GACG8D,WAAW,GAAG,gBAAC,aAAD;AAAS,IAAA,IAAI,EAAE,EAAf;AAAmB,IAAA,KAAK,EAAEE,YAA1B;AAAwC,IAAA,KAAK,EAAE;AAAC7D,MAAAA,OAAO,EAAE,MAAV;AAAkB+D,MAAAA,MAAM,EAAE;AAA1B;AAA/C,IAAH,GAA0FH,QADxG,CADoB;AAAA,CAAf;;;;AAMA,IAAME,iBAAiB,GAAG,SAApBA,iBAAoB,CAACjE,KAAD,EAAwB;AACvD,SAAO,uBAAY,2BAAgBA,KAAhB,CAAZ,EAAmD,CAAC,iBAAD,EAAoB,WAApB,CAAnD,CAAP;AACD,CAFM","sourcesContent":["/*\n * Wire\n * Copyright (C) 2018 Wire Swiss GmbH\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see http://www.gnu.org/licenses/.\n *\n */\n\n/** @jsx jsx */\nimport {CSSObject, jsx} from '@emotion/react';\n\nimport {COLOR, COLOR_V2} from '../Identity';\nimport {defaultTransition} from '../Identity/motions';\nimport type {Theme} from '../Layout';\nimport {Loading} from '../Misc';\nimport {TextProps, filterTextProps, textStyle} from '../Text';\nimport {filterProps} from '../util';\n\nexport enum ButtonVariant {\n PRIMARY = 'primary',\n SECONDARY = 'secondary',\n TERTIARY = 'tertiary',\n QUATERNARY = 'quaternary',\n SEND = 'send',\n}\n\nexport interface ButtonProps<T = HTMLButtonElement> extends TextProps<T> {\n variant?: ButtonVariant;\n backgroundColor?: string;\n loadingColor?: string;\n noCapital?: boolean;\n showLoading?: boolean;\n}\n\nexport const buttonStyle: <T>(theme: Theme, props: ButtonProps<T>) => CSSObject = (\n theme,\n {\n variant = ButtonVariant.PRIMARY,\n backgroundColor,\n block = false,\n disabled = false,\n noCapital = false,\n bold = true,\n center = true,\n color = COLOR.WHITE,\n fontSize = '16px',\n noWrap = true,\n textTransform = 'none',\n truncate = true,\n ...props\n },\n) => ({\n ...textStyle(theme, {\n block,\n bold,\n center,\n disabled,\n fontSize,\n noWrap,\n textTransform,\n truncate,\n ...props,\n }),\n border: 0,\n cursor: disabled ? 'default' : 'pointer',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n marginBottom: '16px',\n padding: 0,\n outline: 'none',\n textDecoration: 'none',\n touchAction: 'manipulation',\n transition: defaultTransition,\n width: block ? '100%' : 'auto',\n '&:hover, &:focus': {\n textDecoration: 'none',\n },\n ...(variant !== ButtonVariant.TERTIARY && {\n borderRadius: variant === ButtonVariant.SEND ? '100%' : '16px',\n height: variant === ButtonVariant.SEND ? '40px' : '48px',\n lineHeight: variant === ButtonVariant.SEND ? '40px' : '48px',\n ...(variant !== ButtonVariant.SEND && {\n maxWidth: '100%',\n minWidth: '125px',\n padding: '0 16px',\n }),\n }),\n ...(variant === ButtonVariant.PRIMARY && {\n backgroundColor: backgroundColor || (disabled ? theme.Button.primaryDisabledBg : theme.Button.primaryBg),\n color: disabled ? theme.Button.primaryDisabledText : theme.general.contrastColor,\n ...(!disabled && {\n '&:hover, &:focus': {\n backgroundColor: theme.Button.primaryHoverBg,\n },\n '&:focus': {\n border: `1px solid ${theme.Button.primaryFocusBorder}`,\n },\n '&:active': {\n backgroundColor: theme.Button.primaryActiveBg,\n border: `1px solid ${theme.Button.primaryActiveBorder}`,\n color: COLOR.WHITE,\n },\n }),\n }),\n ...(variant === ButtonVariant.SECONDARY && {\n backgroundColor: backgroundColor || (disabled ? COLOR_V2.GRAY_20 : COLOR_V2.WHITE),\n border: `1px solid ${COLOR_V2.GRAY_40}`,\n color: disabled ? COLOR_V2.GRAY_60 : COLOR_V2.BLACK,\n ...(!disabled && {\n '&:hover, &:focus': {\n border: `1px solid ${COLOR_V2.BLUE}`,\n },\n '&:focus': {\n color: COLOR_V2.BLUE,\n },\n '&:active': {\n backgroundColor: COLOR_V2.BLUE_LIGHT_50,\n border: `1px solid ${COLOR_V2.BLUE}`,\n color: COLOR_V2.BLUE,\n },\n }),\n }),\n ...(variant === ButtonVariant.TERTIARY && {\n backgroundColor: backgroundColor || (disabled ? theme.Button.tertiarydisabledBg : theme.Button.tertiaryBg),\n border: disabled ? `1px solid ${theme.Button.tertiaryDisabledBorder}` : `1px solid ${theme.Button.tertiaryBorder}`,\n borderRadius: '12px',\n color: disabled ? theme.Input.placeholderColor : theme.general.color,\n fontSize: '14px',\n fontWeight: 700,\n lineHeight: '24px',\n padding: '4px 8px',\n ...(!disabled && {\n '&:hover, &:focus': {\n backgroundColor: theme.Button.tertiaryHoverBg,\n border: `1px solid ${theme.Button.tertiaryHoverBorder}`,\n },\n '&:focus': {\n border: `1px solid ${theme.general.focusColor}`,\n },\n '&:active': {\n backgroundColor: theme.Button.tertiaryActiveBg,\n color: theme.IconButton.primaryActiveFillColor,\n },\n }),\n }),\n ...(variant === ButtonVariant.QUATERNARY && {\n backgroundColor: backgroundColor || (disabled ? COLOR_V2.GRAY_50 : COLOR_V2.GREEN),\n color: disabled ? COLOR_V2.GRAY_80 : COLOR_V2.WHITE,\n lineHeight: '24px',\n ...(!disabled && {\n '&:hover, &:focus': {\n backgroundColor: COLOR_V2.GREEN_LIGHT_600,\n },\n '&:focus': {\n border: `1px solid ${COLOR_V2.GREEN_LIGHT_700}`,\n },\n '&:active': {\n backgroundColor: COLOR_V2.GREEN_LIGHT_700,\n },\n }),\n }),\n ...(variant === ButtonVariant.SEND && {\n backgroundColor: backgroundColor || (disabled ? COLOR_V2.GRAY_70 : COLOR_V2.BLUE),\n width: '40px',\n ...(!disabled && {\n '&:hover, &:focus': {\n backgroundColor: COLOR_V2.BLUE_LIGHT_600,\n },\n '&:focus': {\n border: `1px solid ${COLOR_V2.BLUE_LIGHT_800}`,\n },\n '&:active': {\n backgroundColor: COLOR_V2.BLUE_LIGHT_700,\n },\n }),\n }),\n});\n\nexport const Button = ({showLoading, children, loadingColor = COLOR.WHITE, ...props}: ButtonProps) => (\n <button css={(theme: Theme) => buttonStyle(theme, props)} {...filterButtonProps(props)}>\n {showLoading ? <Loading size={30} color={loadingColor} style={{display: 'flex', margin: 'auto'}} /> : children}\n </button>\n);\n\nexport const filterButtonProps = (props: ButtonProps) => {\n return filterProps(filterTextProps(props) as ButtonProps, ['backgroundColor', 'noCapital']);\n};\n"],"file":"Button.js"}
|
package/src/Form/Select.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export declare type Option = {
|
|
|
10
10
|
};
|
|
11
11
|
interface SelectProps<IsMulti extends boolean> extends StateManagerProps<Option, IsMulti> {
|
|
12
12
|
id: string;
|
|
13
|
-
disabled
|
|
13
|
+
disabled?: boolean;
|
|
14
14
|
dataUieName: string;
|
|
15
15
|
options: Option[];
|
|
16
16
|
wrapperCSS?: CSSObject;
|
package/src/Form/Select.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Select.tsx"],"names":["Select","id","label","error","helperText","disabled","dataUieName","options","isMulti","wrapperCSS","markInvalid","required","props","theme","hasError","marginBottom","width","color","general","primaryColor","DropdownIndicator","Option","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;AAEE,IAAA,MAAM,EAAE,gCAAaY,KAAb,EAA6BH,WAA7B,CAFV;AAGE,IAAA,UAAU,EAAE;AACVU,MAAAA,iBAAiB,EAAjBA,mCADU;AAEVC,MAAAA,MAAM,EAAE,oCAAaf,WAAb,CAFE;AAGVgB,MAAAA,IAAI,EAAE,4BAAKhB,WAAL,CAHI;AAIViB,MAAAA,cAAc,EAAdA,gCAJU;AAKVC,MAAAA,mBAAmB,EAAnBA;AALU,KAHd;AAUE,IAAA,UAAU,EAAEnB,QAVd;AAWE,IAAA,mBAAmB,EAAE,KAXvB;AAYE,IAAA,YAAY,EAAE,KAZhB;AAaE,IAAA,WAAW,EAAE,KAbf;AAcE,IAAA,iBAAiB,EAAE,CAACG,OAdtB;AAeE,IAAA,OAAO,EAAEA,OAfX;AAgBE,IAAA,OAAO,EAAED;AAhBX,KAiBMK,KAjBN,EAjBF,EAqCG,CAACE,QAAD,IAAaV,UAAb,IACC;AAAG,IAAA,GAAG,EAAE,aAACS,KAAD;AAAA,aAAmB;AAACY,QAAAA,QAAQ,EAAE,MAAX;AAAmBC,QAAAA,UAAU,EAAE,GAA/B;AAAoCT,QAAAA,KAAK,EAAEJ,KAAK,CAACc,KAAN,CAAYC,UAAvD;AAAmEC,QAAAA,SAAS,EAAE;AAA9E,OAAnB;AAAA;AAAR,KACGzB,UADH,CAtCJ,EA2CGD,KA3CH,CADF;AA+CD,CAhEM","sourcesContent":["/*\n * Wire\n * Copyright (C) 2018 Wire Swiss GmbH\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see http://www.gnu.org/licenses/.\n *\n */\n\n/** @jsx jsx */\nimport {CSSObject, jsx} from '@emotion/react';\nimport {useTheme} from '@emotion/react';\nimport React, {ReactElement} from 'react';\nimport ReactSelect from 'react-select';\nimport {StylesConfig} from 'react-select/dist/declarations/src/styles';\nimport {StateManagerProps} from 'react-select/dist/declarations/src/useStateManager';\n\nimport {customStyles} from './SelectStyles';\nimport {CustomOption, DropdownIndicator, IndicatorsContainer, Menu, ValueContainer} from './SelectComponents';\nimport type {Theme} from '../Layout';\nimport InputLabel from './InputLabel';\n\nexport type Option = {\n value: string | number;\n label: string;\n description?: string;\n isDisabled?: boolean;\n};\n\ninterface SelectProps<IsMulti extends boolean> extends StateManagerProps<Option, IsMulti> {\n id: string;\n disabled
|
|
1
|
+
{"version":3,"sources":["Select.tsx"],"names":["Select","id","label","error","helperText","disabled","dataUieName","options","isMulti","wrapperCSS","markInvalid","required","props","theme","hasError","marginBottom","width","color","general","primaryColor","DropdownIndicator","Option","Menu","ValueContainer","IndicatorsContainer","fontSize","fontWeight","Input","labelColor","marginTop"],"mappings":";;;;;;;;;;;;;;;AAoBA;;AAEA;;AACA;;AAIA;;AACA;;AAEA;;;;;;;;AAuBO,IAAMA,MAAM,GAAG,SAATA,MAAS,OAaM;AAAA,MAZ1BC,EAY0B,QAZ1BA,EAY0B;AAAA,MAX1BC,KAW0B,QAX1BA,KAW0B;AAAA,MAV1BC,KAU0B,QAV1BA,KAU0B;AAAA,MAT1BC,UAS0B,QAT1BA,UAS0B;AAAA,2BAR1BC,QAQ0B;AAAA,MAR1BA,QAQ0B,8BARf,KAQe;AAAA,MAP1BC,WAO0B,QAP1BA,WAO0B;AAAA,MAN1BC,OAM0B,QAN1BA,OAM0B;AAAA,MAL1BC,OAK0B,QAL1BA,OAK0B;AAAA,6BAJ1BC,UAI0B;AAAA,MAJ1BA,UAI0B,gCAJb,EAIa;AAAA,8BAH1BC,WAG0B;AAAA,MAH1BA,WAG0B,iCAHZ,KAGY;AAAA,2BAF1BC,QAE0B;AAAA,MAF1BA,QAE0B,8BAFf,KA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AAmBC,QAAAA,UAAU,EAAE,GAA/B;AAAoCT,QAAAA,KAAK,EAAEJ,KAAK,CAACc,KAAN,CAAYC,UAAvD;AAAmEC,QAAAA,SAAS,EAAE;AAA9E,OAAnB;AAAA;AAAR,KACGzB,UADH,CAtCJ,EA2CGD,KA3CH,CADF;AA+CD,CAhEM","sourcesContent":["/*\n * Wire\n * Copyright (C) 2018 Wire Swiss GmbH\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see http://www.gnu.org/licenses/.\n *\n */\n\n/** @jsx jsx */\nimport {CSSObject, jsx} from '@emotion/react';\nimport {useTheme} from '@emotion/react';\nimport React, {ReactElement} from 'react';\nimport ReactSelect from 'react-select';\nimport {StylesConfig} from 'react-select/dist/declarations/src/styles';\nimport {StateManagerProps} from 'react-select/dist/declarations/src/useStateManager';\n\nimport {customStyles} from './SelectStyles';\nimport {CustomOption, DropdownIndicator, IndicatorsContainer, Menu, ValueContainer} from './SelectComponents';\nimport type {Theme} from '../Layout';\nimport InputLabel from './InputLabel';\n\nexport type Option = {\n value: string | number;\n label: string;\n description?: string;\n isDisabled?: boolean;\n};\n\ninterface SelectProps<IsMulti extends boolean> extends StateManagerProps<Option, IsMulti> {\n id: string;\n disabled?: boolean;\n dataUieName: string;\n options: Option[];\n wrapperCSS?: CSSObject;\n label?: string;\n helperText?: string;\n error?: ReactElement;\n markInvalid?: boolean;\n required?: boolean;\n isMulti?: IsMulti;\n}\n\nexport const Select = <IsMulti extends boolean = false>({\n id,\n label,\n error,\n helperText,\n disabled = false,\n dataUieName,\n options,\n isMulti,\n wrapperCSS = {},\n markInvalid = false,\n required = false,\n ...props\n}: SelectProps<IsMulti>) => {\n const theme = useTheme();\n const hasError = !!error;\n\n return (\n <div\n css={(theme: Theme) => ({\n marginBottom: markInvalid ? '2px' : '20px',\n width: '100%',\n '&:focus-within label': {\n color: theme.general.primaryColor,\n },\n ...wrapperCSS,\n })}\n data-uie-name={dataUieName}\n >\n {label && (\n <InputLabel htmlFor={id} markInvalid={markInvalid} isRequired={required}>\n {label}\n </InputLabel>\n )}\n\n <ReactSelect\n id={id}\n styles={customStyles(theme as Theme, markInvalid) as StylesConfig}\n components={{\n DropdownIndicator,\n Option: CustomOption(dataUieName),\n Menu: Menu(dataUieName),\n ValueContainer,\n IndicatorsContainer,\n }}\n isDisabled={disabled}\n hideSelectedOptions={false}\n isSearchable={false}\n isClearable={false}\n closeMenuOnSelect={!isMulti}\n isMulti={isMulti}\n options={options}\n {...props}\n />\n\n {!hasError && helperText && (\n <p css={(theme: Theme) => ({fontSize: '12px', fontWeight: 400, color: theme.Input.labelColor, marginTop: 8})}>\n {helperText}\n </p>\n )}\n\n {error}\n </div>\n );\n};\n"],"file":"Select.js"}
|
|
@@ -138,7 +138,7 @@ export declare const customStyles: (theme: Theme, markInvalid?: boolean) => {
|
|
|
138
138
|
fontKerning?: import("csstype").Property.FontKerning | import("csstype").Property.FontKerning[];
|
|
139
139
|
fontLanguageOverride?: import("csstype").Property.FontLanguageOverride | import("csstype").Property.FontLanguageOverride[];
|
|
140
140
|
fontOpticalSizing?: import("csstype").Property.FontOpticalSizing | import("csstype").Property.FontOpticalSizing[];
|
|
141
|
-
fontSize?: import("csstype").Property.FontSize<string | number> | import("csstype").Property.FontSize<string | number>[]
|
|
141
|
+
fontSize?: (string | (string & {}))[] | import("csstype").Property.FontSize<string | number> | import("csstype").Property.FontSize<string | number>[];
|
|
142
142
|
fontSizeAdjust?: import("csstype").Property.FontSizeAdjust | import("csstype").Property.FontSizeAdjust[] | ("none" | import("csstype").Globals)[];
|
|
143
143
|
fontSmooth?: string[] | import("csstype").Property.FontSmooth<string | number> | import("csstype").Property.FontSmooth<string | number>[];
|
|
144
144
|
fontStretch?: import("csstype").Property.FontStretch | import("csstype").Property.FontStretch[];
|
|
@@ -371,7 +371,7 @@ export declare const customStyles: (theme: Theme, markInvalid?: boolean) => {
|
|
|
371
371
|
all?: import("csstype").Globals | import("csstype").Globals[];
|
|
372
372
|
animation?: import("csstype").Property.Animation<string & {}> | import("csstype").Property.Animation<string & {}>[] | (import("csstype").Globals | ("normal" | "alternate" | "alternate-reverse" | "reverse") | ("none" | "both" | "backwards" | "forwards") | "infinite" | "paused" | "running" | ((string & {}) | "ease" | "ease-in" | "ease-in-out" | "ease-out" | "step-end" | "step-start" | "linear"))[];
|
|
373
373
|
background?: (string | (string & {}))[] | import("csstype").Property.Background<string | number> | import("csstype").Property.Background<string | number>[];
|
|
374
|
-
border?:
|
|
374
|
+
border?: import("csstype").Property.Border<string | number> | import("csstype").Property.Border<string | number>[] | (string | (string & {}))[];
|
|
375
375
|
borderBlock?: (string | (string & {}))[] | import("csstype").Property.BorderBlock<string | number> | import("csstype").Property.BorderBlock<string | number>[];
|
|
376
376
|
borderBlockEnd?: (string | (string & {}))[] | import("csstype").Property.BorderBlockEnd<string | number> | import("csstype").Property.BorderBlockEnd<string | number>[];
|
|
377
377
|
borderBlockStart?: (string | (string & {}))[] | import("csstype").Property.BorderBlockStart<string | number> | import("csstype").Property.BorderBlockStart<string | number>[];
|
package/src/Form/ShakeBox.d.ts
CHANGED
|
@@ -8,4 +8,4 @@ export interface ShakeBoxProps extends React.HTMLProps<HTMLDivElement> {
|
|
|
8
8
|
export interface ShakeBoxRef {
|
|
9
9
|
shake: () => void;
|
|
10
10
|
}
|
|
11
|
-
export declare const ShakeBox: React.ForwardRefExoticComponent<Pick<ShakeBoxProps, "children" | "cite" | "data" | "form" | "label" | "slot" | "span" | "style" | "summary" | "title" | "pattern" | "color" | "content" | "height" | "translate" | "width" | "
|
|
11
|
+
export declare const ShakeBox: React.ForwardRefExoticComponent<Pick<ShakeBoxProps, "children" | "cite" | "data" | "form" | "label" | "slot" | "span" | "style" | "summary" | "title" | "pattern" | "color" | "content" | "height" | "translate" | "width" | "hidden" | "className" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "list" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "async" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "dateTime" | "default" | "defer" | "disabled" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "media" | "mediaGroup" | "method" | "min" | "minLength" | "multiple" | "muted" | "name" | "nonce" | "noValidate" | "open" | "optimum" | "step" | "value" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "size" | "sizes" | "src" | "srcDoc" | "srcLang" | "srcSet" | "start" | "target" | "type" | "useMap" | "wmode" | "wrap" | "amplitude" | "speed" | "damping" | "threshold"> & React.RefAttributes<ShakeBoxRef>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[],"file":"GlobalCssVariables.d.js"}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.GlobalCssVariables = void 0;
|
|
7
|
+
|
|
8
|
+
var _Identity = require("./Identity");
|
|
9
|
+
|
|
10
|
+
/*
|
|
11
|
+
* Wire
|
|
12
|
+
* Copyright (C) 2022 Wire Swiss GmbH
|
|
13
|
+
*
|
|
14
|
+
* This program is free software: you can redistribute it and/or modify
|
|
15
|
+
* it under the terms of the GNU General Public License as published by
|
|
16
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
17
|
+
* (at your option) any later version.
|
|
18
|
+
*
|
|
19
|
+
* This program is distributed in the hope that it will be useful,
|
|
20
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
21
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
22
|
+
* GNU General Public License for more details.
|
|
23
|
+
*
|
|
24
|
+
* You should have received a copy of the GNU General Public License
|
|
25
|
+
* along with this program. If not, see http://www.gnu.org/licenses/.
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
/** @jsx jsx */
|
|
30
|
+
var light = function light() {
|
|
31
|
+
return {
|
|
32
|
+
// Checkbox
|
|
33
|
+
'--checkbox-background': _Identity.COLOR_V2.GRAY_20,
|
|
34
|
+
'--checkbox-background-disabled': _Identity.COLOR_V2.GRAY_10,
|
|
35
|
+
'--checkbox-background-disabled-selected': _Identity.COLOR_V2.GRAY_60,
|
|
36
|
+
'--checkbox-border': _Identity.COLOR_V2.GRAY_80,
|
|
37
|
+
'--checkbox-border-disabled': _Identity.COLOR_V2.GRAY_70,
|
|
38
|
+
// Icon Button
|
|
39
|
+
'--icon-button-primary-enabled-bg': _Identity.COLOR.WHITE,
|
|
40
|
+
'--icon-button-primary-hover-bg': _Identity.COLOR_V2.GRAY_20,
|
|
41
|
+
'--icon-button-primary-border': _Identity.COLOR_V2.GRAY_40,
|
|
42
|
+
'--icon-button-primary-disabled-bg': _Identity.COLOR_V2.GRAY_20,
|
|
43
|
+
'--icon-button-primary-disabled-border': _Identity.COLOR_V2.GRAY_40,
|
|
44
|
+
'--icon-button-primary-hover-border': _Identity.COLOR_V2.GRAY_50,
|
|
45
|
+
// Button
|
|
46
|
+
'--button-primary-disabled-bg': _Identity.COLOR_V2.GRAY_50,
|
|
47
|
+
'--button-primary-disabled-text': _Identity.COLOR_V2.GRAY_80,
|
|
48
|
+
'--button-tertiary-bg': _Identity.COLOR_V2.GRAY_10,
|
|
49
|
+
'--button-tertiary-border': _Identity.COLOR_V2.GRAY_40,
|
|
50
|
+
'--button-tertiary-hover-bg': _Identity.COLOR_V2.GRAY_20,
|
|
51
|
+
'--button-tertiary-hover-border': _Identity.COLOR_V2.GRAY_50,
|
|
52
|
+
'--button-tertiary-disabled-bg': _Identity.COLOR_V2.GRAY_20,
|
|
53
|
+
'--button-tertiary-disabled-border': 'transparent',
|
|
54
|
+
// Inputs
|
|
55
|
+
'--text-input-background': _Identity.COLOR.WHITE,
|
|
56
|
+
'--text-input-border': _Identity.COLOR_V2.GRAY_40,
|
|
57
|
+
'--text-input-border-hover': _Identity.COLOR_V2.GRAY_60,
|
|
58
|
+
'--text-input-placeholder': _Identity.COLOR_V2.GRAY_70,
|
|
59
|
+
'--text-input-disabled': _Identity.COLOR_V2.GRAY_20,
|
|
60
|
+
'--text-input-label': _Identity.COLOR_V2.GRAY_80,
|
|
61
|
+
// General
|
|
62
|
+
'--danger-color': _Identity.COLOR_V2.RED_LIGHT_500,
|
|
63
|
+
'--app-bg': _Identity.COLOR_V2.GRAY_10,
|
|
64
|
+
'--main-color': _Identity.COLOR.BLACK
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
var dark = function dark() {
|
|
69
|
+
return {
|
|
70
|
+
// Checkbox
|
|
71
|
+
'--checkbox-background': _Identity.COLOR_V2.GRAY_90,
|
|
72
|
+
'--checkbox-background-disabled': _Identity.COLOR_V2.GRAY_90,
|
|
73
|
+
'--checkbox-background-disabled-selected': _Identity.COLOR_V2.GRAY_80,
|
|
74
|
+
'--checkbox-border': _Identity.COLOR_V2.GRAY_60,
|
|
75
|
+
'--checkbox-border-disabled': _Identity.COLOR_V2.GRAY_60,
|
|
76
|
+
// Icon Button
|
|
77
|
+
'--icon-button-primary-enabled-bg': _Identity.COLOR_V2.GRAY_90,
|
|
78
|
+
'--icon-button-primary-hover-bg': _Identity.COLOR_V2.GRAY_80,
|
|
79
|
+
'--icon-button-primary-border': _Identity.COLOR_V2.GRAY_100,
|
|
80
|
+
'--icon-button-primary-disabled-bg': _Identity.COLOR_V2.GRAY_95,
|
|
81
|
+
'--icon-button-primary-disabled-border': _Identity.COLOR_V2.GRAY_90,
|
|
82
|
+
'--icon-button-primary-hover-border': _Identity.COLOR_V2.GRAY_70,
|
|
83
|
+
// Button
|
|
84
|
+
'--button-primary-disabled-bg': _Identity.COLOR_V2.GRAY_70,
|
|
85
|
+
'--button-primary-disabled-text': _Identity.COLOR.BLACK,
|
|
86
|
+
'--button-tertiary-bg': _Identity.COLOR_V2.GRAY_90,
|
|
87
|
+
'--button-tertiary-border': _Identity.COLOR_V2.GRAY_100,
|
|
88
|
+
'--button-tertiary-hover-bg': _Identity.COLOR_V2.GRAY_80,
|
|
89
|
+
'--button-tertiary-hover-border': _Identity.COLOR_V2.GRAY_80,
|
|
90
|
+
'--button-tertiary-disabled-bg': _Identity.COLOR_V2.GRAY_95,
|
|
91
|
+
'--button-tertiary-disabled-border': 'transparent',
|
|
92
|
+
// Inputs
|
|
93
|
+
'--text-input-background': _Identity.COLOR.BLACK,
|
|
94
|
+
'--text-input-border': _Identity.COLOR_V2.GRAY_80,
|
|
95
|
+
'--text-input-border-hover': _Identity.COLOR_V2.GRAY_40,
|
|
96
|
+
'--text-input-placeholder': _Identity.COLOR_V2.GRAY_60,
|
|
97
|
+
'--text-input-disabled': _Identity.COLOR_V2.GRAY_100,
|
|
98
|
+
'--text-input-label': _Identity.COLOR_V2.GRAY_40,
|
|
99
|
+
// General
|
|
100
|
+
'--danger-color': _Identity.COLOR_V2.RED_DARK_500,
|
|
101
|
+
'--app-bg': _Identity.COLOR_V2.GRAY_95,
|
|
102
|
+
'--main-color': _Identity.COLOR.WHITE
|
|
103
|
+
};
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
var accentColors = function accentColors() {
|
|
107
|
+
return {
|
|
108
|
+
'--accent-color': _Identity.COLOR_V2.BLUE_LIGHT_500,
|
|
109
|
+
'--accent-color-highlight': _Identity.COLOR_V2.BLUE_LIGHT_50,
|
|
110
|
+
'--accent-color-highlight-inversed': _Identity.COLOR_V2.BLUE_LIGHT_800,
|
|
111
|
+
'--accent-color-border': _Identity.COLOR_V2.BLUE_LIGHT_500,
|
|
112
|
+
'--accent-color-focus': _Identity.COLOR_V2.BLUE_LIGHT_400,
|
|
113
|
+
'--icon-primary-active-fill': _Identity.COLOR_V2.BLUE_LIGHT_500,
|
|
114
|
+
'--icon-secondary-active-border': 'transparent',
|
|
115
|
+
'--button-primary-hover': _Identity.COLOR_V2.BLUE_LIGHT_600,
|
|
116
|
+
'--button-primary-active': _Identity.COLOR_V2.BLUE_LIGHT_700,
|
|
117
|
+
'--button-primary-active-border': _Identity.COLOR_V2.BLUE_LIGHT_700,
|
|
118
|
+
'--button-primary-focus-border': _Identity.COLOR_V2.BLUE_LIGHT_700
|
|
119
|
+
};
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
var GlobalCssVariables = {
|
|
123
|
+
light: light,
|
|
124
|
+
dark: dark,
|
|
125
|
+
accentColors: accentColors
|
|
126
|
+
};
|
|
127
|
+
exports.GlobalCssVariables = GlobalCssVariables;
|
|
128
|
+
//# sourceMappingURL=GlobalCssVariables.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["GlobalCssVariables.tsx"],"names":["light","COLOR_V2","GRAY_20","GRAY_10","GRAY_60","GRAY_80","GRAY_70","COLOR","WHITE","GRAY_40","GRAY_50","RED_LIGHT_500","BLACK","dark","GRAY_90","GRAY_100","GRAY_95","RED_DARK_500","accentColors","BLUE_LIGHT_500","BLUE_LIGHT_50","BLUE_LIGHT_800","BLUE_LIGHT_400","BLUE_LIGHT_600","BLUE_LIGHT_700","GlobalCssVariables"],"mappings":";;;;;;;AAqBA;;AArBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AAIA,IAAMA,KAAsB,GAAG,SAAzBA,KAAyB;AAAA,SAAO;AACpC;AACA,6BAAyBC,mBAASC,OAFE;AAGpC,sCAAkCD,mBAASE,OAHP;AAIpC,+CAA2CF,mBAASG,OAJhB;AAKpC,yBAAqBH,mBAASI,OALM;AAMpC,kCAA8BJ,mBAASK,OANH;AAQpC;AACA,wCAAoCC,gBAAMC,KATN;AAUpC,sCAAkCP,mBAASC,OAVP;AAWpC,oCAAgCD,mBAASQ,OAXL;AAYpC,yCAAqCR,mBAASC,OAZV;AAapC,6CAAyCD,mBAASQ,OAbd;AAcpC,0CAAsCR,mBAASS,OAdX;AAgBpC;AACA,oCAAgCT,mBAASS,OAjBL;AAkBpC,sCAAkCT,mBAASI,OAlBP;AAoBpC,4BAAwBJ,mBAASE,OApBG;AAqBpC,gCAA4BF,mBAASQ,OArBD;AAsBpC,kCAA8BR,mBAASC,OAtBH;AAuBpC,sCAAkCD,mBAASS,OAvBP;AAwBpC,qCAAiCT,mBAASC,OAxBN;AAyBpC,yCAAqC,aAzBD;AA2BpC;AACA,+BAA2BK,gBAAMC,KA5BG;AA6BpC,2BAAuBP,mBAASQ,OA7BI;AA8BpC,iCAA6BR,mBAASG,OA9BF;AA+BpC,gCAA4BH,mBAASK,OA/BD;AAgCpC,6BAAyBL,mBAASC,OAhCE;AA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,gCAA4BlB,mBAASmB,aAFM;AAG3C,yCAAqCnB,mBAASoB,cAHH;AAI3C,6BAAyBpB,mBAASkB,cAJS;AAK3C,4BAAwBlB,mBAASqB,cALU;AAM3C,kCAA8BrB,mBAASkB,cANI;AAO3C,sCAAkC,aAPS;AAQ3C,8BAA0BlB,mBAASsB,cARQ;AAS3C,+BAA2BtB,mBAASuB,cATO;AAU3C,sCAAkCvB,mBAASuB,cAVA;AAW3C,qCAAiCvB,mBAASuB;AAXC,GAAP;AAAA,CAAtC;;AAcO,IAAMC,kBAAkB,GAAG;AAChCzB,EAAAA,KAAK,EAALA,KADgC;AAEhCa,EAAAA,IAAI,EAAJA,IAFgC;AAGhCK,EAAAA,YAAY,EAAZA;AAHgC,CAA3B","sourcesContent":["/*\n * Wire\n * Copyright (C) 2022 Wire Swiss GmbH\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see http://www.gnu.org/licenses/.\n *\n */\n\n/** @jsx jsx */\nimport {CSSObject} from '@emotion/react';\nimport {COLOR, COLOR_V2} from './Identity';\n\nconst light: () => CSSObject = () => ({\n // Checkbox\n '--checkbox-background': COLOR_V2.GRAY_20,\n '--checkbox-background-disabled': COLOR_V2.GRAY_10,\n '--checkbox-background-disabled-selected': COLOR_V2.GRAY_60,\n '--checkbox-border': COLOR_V2.GRAY_80,\n '--checkbox-border-disabled': COLOR_V2.GRAY_70,\n\n // Icon Button\n '--icon-button-primary-enabled-bg': COLOR.WHITE,\n '--icon-button-primary-hover-bg': COLOR_V2.GRAY_20,\n '--icon-button-primary-border': COLOR_V2.GRAY_40,\n '--icon-button-primary-disabled-bg': COLOR_V2.GRAY_20,\n '--icon-button-primary-disabled-border': COLOR_V2.GRAY_40,\n '--icon-button-primary-hover-border': COLOR_V2.GRAY_50,\n\n // Button\n '--button-primary-disabled-bg': COLOR_V2.GRAY_50,\n '--button-primary-disabled-text': COLOR_V2.GRAY_80,\n\n '--button-tertiary-bg': COLOR_V2.GRAY_10,\n '--button-tertiary-border': COLOR_V2.GRAY_40,\n '--button-tertiary-hover-bg': COLOR_V2.GRAY_20,\n '--button-tertiary-hover-border': COLOR_V2.GRAY_50,\n '--button-tertiary-disabled-bg': COLOR_V2.GRAY_20,\n '--button-tertiary-disabled-border': 'transparent',\n\n // Inputs\n '--text-input-background': COLOR.WHITE,\n '--text-input-border': COLOR_V2.GRAY_40,\n '--text-input-border-hover': COLOR_V2.GRAY_60,\n '--text-input-placeholder': COLOR_V2.GRAY_70,\n '--text-input-disabled': COLOR_V2.GRAY_20,\n '--text-input-label': COLOR_V2.GRAY_80,\n\n // General\n '--danger-color': COLOR_V2.RED_LIGHT_500,\n '--app-bg': COLOR_V2.GRAY_10,\n '--main-color': COLOR.BLACK,\n});\n\nconst dark: () => CSSObject = () => ({\n // Checkbox\n '--checkbox-background': COLOR_V2.GRAY_90,\n '--checkbox-background-disabled': COLOR_V2.GRAY_90,\n '--checkbox-background-disabled-selected': COLOR_V2.GRAY_80,\n '--checkbox-border': COLOR_V2.GRAY_60,\n '--checkbox-border-disabled': COLOR_V2.GRAY_60,\n\n // Icon Button\n '--icon-button-primary-enabled-bg': COLOR_V2.GRAY_90,\n '--icon-button-primary-hover-bg': COLOR_V2.GRAY_80,\n '--icon-button-primary-border': COLOR_V2.GRAY_100,\n '--icon-button-primary-disabled-bg': COLOR_V2.GRAY_95,\n '--icon-button-primary-disabled-border': COLOR_V2.GRAY_90,\n '--icon-button-primary-hover-border': COLOR_V2.GRAY_70,\n\n // Button\n '--button-primary-disabled-bg': COLOR_V2.GRAY_70,\n '--button-primary-disabled-text': COLOR.BLACK,\n\n '--button-tertiary-bg': COLOR_V2.GRAY_90,\n '--button-tertiary-border': COLOR_V2.GRAY_100,\n '--button-tertiary-hover-bg': COLOR_V2.GRAY_80,\n '--button-tertiary-hover-border': COLOR_V2.GRAY_80,\n '--button-tertiary-disabled-bg': COLOR_V2.GRAY_95,\n '--button-tertiary-disabled-border': 'transparent',\n\n // Inputs\n '--text-input-background': COLOR.BLACK,\n '--text-input-border': COLOR_V2.GRAY_80,\n '--text-input-border-hover': COLOR_V2.GRAY_40,\n '--text-input-placeholder': COLOR_V2.GRAY_60,\n '--text-input-disabled': COLOR_V2.GRAY_100,\n '--text-input-label': COLOR_V2.GRAY_40,\n\n // General\n '--danger-color': COLOR_V2.RED_DARK_500,\n '--app-bg': COLOR_V2.GRAY_95,\n '--main-color': COLOR.WHITE,\n});\n\nconst accentColors: () => CSSObject = () => ({\n '--accent-color': COLOR_V2.BLUE_LIGHT_500,\n '--accent-color-highlight': COLOR_V2.BLUE_LIGHT_50,\n '--accent-color-highlight-inversed': COLOR_V2.BLUE_LIGHT_800,\n '--accent-color-border': COLOR_V2.BLUE_LIGHT_500,\n '--accent-color-focus': COLOR_V2.BLUE_LIGHT_400,\n '--icon-primary-active-fill': COLOR_V2.BLUE_LIGHT_500,\n '--icon-secondary-active-border': 'transparent',\n '--button-primary-hover': COLOR_V2.BLUE_LIGHT_600,\n '--button-primary-active': COLOR_V2.BLUE_LIGHT_700,\n '--button-primary-active-border': COLOR_V2.BLUE_LIGHT_700,\n '--button-primary-focus-border': COLOR_V2.BLUE_LIGHT_700,\n});\n\nexport const GlobalCssVariables = {\n light,\n dark,\n accentColors,\n};\n"],"file":"GlobalCssVariables.js"}
|
package/src/GlobalStyle.js
CHANGED
|
@@ -13,6 +13,8 @@ var _react = require("@emotion/react");
|
|
|
13
13
|
|
|
14
14
|
var _emotionNormalize = _interopRequireDefault(require("emotion-normalize"));
|
|
15
15
|
|
|
16
|
+
var _GlobalCssVariables = require("./GlobalCssVariables");
|
|
17
|
+
|
|
16
18
|
var _TextLink = require("./Text/TextLink");
|
|
17
19
|
|
|
18
20
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
@@ -28,7 +30,7 @@ var globalStyles = function globalStyles(theme) {
|
|
|
28
30
|
'b, strong': {
|
|
29
31
|
fontWeight: 600
|
|
30
32
|
},
|
|
31
|
-
body: {
|
|
33
|
+
body: _objectSpread(_objectSpread({}, _GlobalCssVariables.GlobalCssVariables.accentColors()), {}, {
|
|
32
34
|
MozOsxFontSmoothing: 'grayscale',
|
|
33
35
|
WebkitFontSmoothing: 'antialiased',
|
|
34
36
|
background: theme.general.backgroundColor,
|
|
@@ -40,7 +42,9 @@ var globalStyles = function globalStyles(theme) {
|
|
|
40
42
|
lineHeight: 1.5,
|
|
41
43
|
minHeight: '100vh',
|
|
42
44
|
transition: 'background 0.15s'
|
|
43
|
-
},
|
|
45
|
+
}),
|
|
46
|
+
'body, body.theme-default': _objectSpread({}, _GlobalCssVariables.GlobalCssVariables.light()),
|
|
47
|
+
'body.theme-dark': _objectSpread({}, _GlobalCssVariables.GlobalCssVariables.dark()),
|
|
44
48
|
html: {
|
|
45
49
|
background: theme.general.backgroundColor,
|
|
46
50
|
transition: 'background 0.15s'
|
|
@@ -52,7 +56,7 @@ var globalStyles = function globalStyles(theme) {
|
|
|
52
56
|
};
|
|
53
57
|
|
|
54
58
|
var globalStyle = function globalStyle(theme) {
|
|
55
|
-
return /*#__PURE__*/(0, _react.css)(_emotionNormalize["default"], " ", globalStyles(theme), ";" + (process.env.NODE_ENV === "production" ? "" : ";label:globalStyle;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
59
|
+
return /*#__PURE__*/(0, _react.css)(_emotionNormalize["default"], " ", globalStyles(theme), ";" + (process.env.NODE_ENV === "production" ? "" : ";label:globalStyle;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkdsb2JhbFN0eWxlLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFrRXlDIiwiZmlsZSI6Ikdsb2JhbFN0eWxlLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qXG4gKiBXaXJlXG4gKiBDb3B5cmlnaHQgKEMpIDIwMTggV2lyZSBTd2lzcyBHbWJIXG4gKlxuICogVGhpcyBwcm9ncmFtIGlzIGZyZWUgc29mdHdhcmU6IHlvdSBjYW4gcmVkaXN0cmlidXRlIGl0IGFuZC9vciBtb2RpZnlcbiAqIGl0IHVuZGVyIHRoZSB0ZXJtcyBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgYXMgcHVibGlzaGVkIGJ5XG4gKiB0aGUgRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uLCBlaXRoZXIgdmVyc2lvbiAzIG9mIHRoZSBMaWNlbnNlLCBvclxuICogKGF0IHlvdXIgb3B0aW9uKSBhbnkgbGF0ZXIgdmVyc2lvbi5cbiAqXG4gKiBUaGlzIHByb2dyYW0gaXMgZGlzdHJpYnV0ZWQgaW4gdGhlIGhvcGUgdGhhdCBpdCB3aWxsIGJlIHVzZWZ1bCxcbiAqIGJ1dCBXSVRIT1VUIEFOWSBXQVJSQU5UWTsgd2l0aG91dCBldmVuIHRoZSBpbXBsaWVkIHdhcnJhbnR5IG9mXG4gKiBNRVJDSEFOVEFCSUxJVFkgb3IgRklUTkVTUyBGT1IgQSBQQVJUSUNVTEFSIFBVUlBPU0UuIFNlZSB0aGVcbiAqIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGZvciBtb3JlIGRldGFpbHMuXG4gKlxuICogWW91IHNob3VsZCBoYXZlIHJlY2VpdmVkIGEgY29we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fQ== */");
|
|
56
60
|
};
|
|
57
61
|
|
|
58
62
|
var GlobalStyle = (0, _react.withTheme)(function (_ref) {
|
package/src/GlobalStyle.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["GlobalStyle.tsx"],"names":["globalStyles","theme","boxSizing","a","fontWeight","body","MozOsxFontSmoothing","WebkitFontSmoothing","background","general","backgroundColor","color","display","flexDirection","fontFamily","lineHeight","minHeight","transition","html","p","marginTop","globalStyle","css","emotionNormalize","GlobalStyle"],"mappings":";;;;;;;;;;;AAoBA;;AACA;;AAGA;;;;;;AAEA,IAAMA,YAAyC,GAAG,SAA5CA,YAA4C,CAACC,KAAD;AAAA,SAAmB;AACnE,SAAK;AACHC,MAAAA,SAAS,EAAE;AADR,KAD8D;AAInEC,IAAAA,CAAC,oBACI,6BAAcF,KAAd,EAAqB,EAArB,CADJ,CAJkE;AAOnE,iBAAa;AACXG,MAAAA,UAAU,EAAE;AADD,KAPsD;AAUnEC,IAAAA,IAAI,
|
|
1
|
+
{"version":3,"sources":["GlobalStyle.tsx"],"names":["globalStyles","theme","boxSizing","a","fontWeight","body","GlobalCssVariables","accentColors","MozOsxFontSmoothing","WebkitFontSmoothing","background","general","backgroundColor","color","display","flexDirection","fontFamily","lineHeight","minHeight","transition","light","dark","html","p","marginTop","globalStyle","css","emotionNormalize","GlobalStyle"],"mappings":";;;;;;;;;;;AAoBA;;AACA;;AACA;;AAGA;;;;;;AAEA,IAAMA,YAAyC,GAAG,SAA5CA,YAA4C,CAACC,KAAD;AAAA,SAAmB;AACnE,SAAK;AACHC,MAAAA,SAAS,EAAE;AADR,KAD8D;AAInEC,IAAAA,CAAC,oBACI,6BAAcF,KAAd,EAAqB,EAArB,CADJ,CAJkE;AAOnE,iBAAa;AACXG,MAAAA,UAAU,EAAE;AADD,KAPsD;AAUnEC,IAAAA,IAAI,kCACCC,uCAAmBC,YAAnB,EADD;AAEFC,MAAAA,mBAAmB,EAAE,WAFnB;AAGFC,MAAAA,mBAAmB,EAAE,aAHnB;AAIFC,MAAAA,UAAU,EAAET,KAAK,CAACU,OAAN,CAAcC,eAJxB;AAKFC,MAAAA,KAAK,EAAEZ,KAAK,CAACU,OAAN,CAAcE,KALnB;AAMFC,MAAAA,OAAO,EAAE,MANP;AAOFC,MAAAA,aAAa,EAAE,QAPb;AAQFC,MAAAA,UAAU,EAAE,mGARV;AASFZ,MAAAA,UAAU,EAAE,GATV;AAUFa,MAAAA,UAAU,EAAE,GAVV;AAWFC,MAAAA,SAAS,EAAE,OAXT;AAYFC,MAAAA,UAAU,EAAE;AAZV,MAV+D;AAwBnE,kDACKb,uCAAmBc,KAAnB,EADL,CAxBmE;AA2BnE,yCACKd,uCAAmBe,IAAnB,EADL,CA3BmE;AA8BnEC,IAAAA,IAAI,EAAE;AACJZ,MAAAA,UAAU,EAAET,KAAK,CAACU,OAAN,CAAcC,eADtB;AAEJO,MAAAA,UAAU,EAAE;AAFR,KA9B6D;AAkCnEI,IAAAA,CAAC,EAAE;AACDC,MAAAA,SAAS,EAAE;AADV;AAlCgE,GAAnB;AAAA,CAAlD;;AAuCA,IAAMC,WAAW,GAAG,SAAdA,WAAc,CAACxB,KAAD;AAAA,0BAAkByB,UAAlB,EAChBC,4BADgB,OAEhB3B,YAAY,CAACC,KAAD,CAFI;AAAA,CAApB;;AAKO,IAAM2B,WAAW,GAAG,sBAAU,gBAA6B;AAAA,MAA3B3B,KAA2B,QAA3BA,KAA2B;AAChE,SAAO,gBAAC,aAAD;AAAQ,IAAA,MAAM,EAAEwB,WAAW,CAACxB,KAAD;AAA3B,IAAP;AACD,CAF0B,CAApB","sourcesContent":["/*\n * Wire\n * Copyright (C) 2018 Wire Swiss GmbH\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see http://www.gnu.org/licenses/.\n *\n */\n\n/** @jsx jsx */\nimport {Global, CSSObject, css, jsx, withTheme} from '@emotion/react';\nimport emotionNormalize from 'emotion-normalize';\nimport {GlobalCssVariables} from './GlobalCssVariables';\n\nimport type {Theme} from './Layout';\nimport {textLinkStyle} from './Text/TextLink';\n\nconst globalStyles: (theme: Theme) => CSSObject = (theme: Theme) => ({\n '*': {\n boxSizing: 'border-box',\n },\n a: {\n ...textLinkStyle(theme, {}),\n },\n 'b, strong': {\n fontWeight: 600,\n },\n body: {\n ...GlobalCssVariables.accentColors(),\n MozOsxFontSmoothing: 'grayscale',\n WebkitFontSmoothing: 'antialiased',\n background: theme.general.backgroundColor,\n color: theme.general.color,\n display: 'flex',\n flexDirection: 'column',\n fontFamily: '-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Helvetica, Arial, sans-serif',\n fontWeight: 300,\n lineHeight: 1.5,\n minHeight: '100vh',\n transition: 'background 0.15s',\n },\n 'body, body.theme-default': {\n ...GlobalCssVariables.light(),\n },\n 'body.theme-dark': {\n ...GlobalCssVariables.dark(),\n },\n html: {\n background: theme.general.backgroundColor,\n transition: 'background 0.15s',\n },\n p: {\n marginTop: 0,\n },\n});\n\nconst globalStyle = (theme: Theme) => css`\n ${emotionNormalize}\n ${globalStyles(theme)}\n`;\n\nexport const GlobalStyle = withTheme(({theme}: {theme: Theme}) => {\n return <Global styles={globalStyle(theme)} />;\n});\n"],"file":"GlobalStyle.js"}
|
|
@@ -34,7 +34,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
34
34
|
var BASE_LIGHT_COLOR = {
|
|
35
35
|
BLUE: '#0667c8',
|
|
36
36
|
GREEN: '#1d7833',
|
|
37
|
-
|
|
37
|
+
TURQUOISE: '#01718e',
|
|
38
38
|
PURPLE: '#8944ab',
|
|
39
39
|
RED: '#c20013',
|
|
40
40
|
AMBER: '#a25915'
|
|
@@ -43,7 +43,7 @@ exports.BASE_LIGHT_COLOR = BASE_LIGHT_COLOR;
|
|
|
43
43
|
var BASE_DARK_COLOR = {
|
|
44
44
|
BLUE: '#54a6ff',
|
|
45
45
|
GREEN: '#30db5b',
|
|
46
|
-
|
|
46
|
+
TURQUOISE: '#5de6ff',
|
|
47
47
|
PURPLE: '#da8fff',
|
|
48
48
|
RED: '#ff7770',
|
|
49
49
|
AMBER: '#ffd426'
|
|
@@ -97,29 +97,29 @@ var DARK_GREEN = {
|
|
|
97
97
|
GREEN_DARK_800: '#135824',
|
|
98
98
|
GREEN_DARK_900: '#0e421b'
|
|
99
99
|
};
|
|
100
|
-
var
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
100
|
+
var LIGHT_TURQUOISE = {
|
|
101
|
+
TURQUOISE_LIGHT_50: '#e5f1f3',
|
|
102
|
+
TURQUOISE_LIGHT_100: '#cce2e7',
|
|
103
|
+
TURQUOISE_LIGHT_200: '#99c6d0',
|
|
104
|
+
TURQUOISE_LIGHT_300: '#67a9b8',
|
|
105
|
+
TURQUOISE_LIGHT_400: '#348da1',
|
|
106
|
+
TURQUOISE_LIGHT_500: BASE_LIGHT_COLOR.TURQUOISE,
|
|
107
|
+
TURQUOISE_LIGHT_600: '#015a6e',
|
|
108
|
+
TURQUOISE_LIGHT_700: '#014352',
|
|
109
|
+
TURQUOISE_LIGHT_800: '#002d37',
|
|
110
|
+
TURQUOISE_LIGHT_900: '#1c454d'
|
|
111
111
|
};
|
|
112
|
-
var
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
112
|
+
var DARK_TURQUOISE = {
|
|
113
|
+
TURQUOISE_DARK_50: '#effdff',
|
|
114
|
+
TURQUOISE_DARK_100: '#dffaff',
|
|
115
|
+
TURQUOISE_DARK_200: '#bef5ff',
|
|
116
|
+
TURQUOISE_DARK_300: '#9ef0ff',
|
|
117
|
+
TURQUOISE_DARK_400: '#7debff',
|
|
118
|
+
TURQUOISE_DARK_500: BASE_DARK_COLOR.TURQUOISE,
|
|
119
|
+
TURQUOISE_DARK_600: '#4Ab8cc',
|
|
120
|
+
TURQUOISE_DARK_700: '#388a99',
|
|
121
|
+
TURQUOISE_DARK_800: '#255c66',
|
|
122
|
+
TURQUOISE_DARK_900: '#1c454d'
|
|
123
123
|
};
|
|
124
124
|
var LIGHT_PURPLE = {
|
|
125
125
|
PURPLE_LIGHT_50: '#f4edf7',
|
|
@@ -194,9 +194,9 @@ var DARK_AMBER = {
|
|
|
194
194
|
AMBER_DARK_900: '#4d400b'
|
|
195
195
|
};
|
|
196
196
|
|
|
197
|
-
var DARK = _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, DARK_BLUE), DARK_GREEN),
|
|
197
|
+
var DARK = _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, DARK_BLUE), DARK_GREEN), DARK_TURQUOISE), DARK_PURPLE), DARK_RED), DARK_AMBER);
|
|
198
198
|
|
|
199
|
-
var LIGHT = _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, LIGHT_BLUE), LIGHT_GREEN),
|
|
199
|
+
var LIGHT = _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, LIGHT_BLUE), LIGHT_GREEN), LIGHT_TURQUOISE), LIGHT_PURPLE), LIGHT_RED), LIGHT_AMBER);
|
|
200
200
|
|
|
201
201
|
var GRAYS = {
|
|
202
202
|
GRAY_10: '#fafafa',
|