@artsy/palette 38.12.0 → 38.12.1
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.
|
@@ -16,7 +16,7 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
16
16
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
17
17
|
var MESSAGE_VARIANTS = {
|
|
18
18
|
default: {
|
|
19
|
-
backgroundColor: "
|
|
19
|
+
backgroundColor: "black5",
|
|
20
20
|
color: "black100"
|
|
21
21
|
},
|
|
22
22
|
info: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Message.js","names":["_react","_interopRequireDefault","require","_styledComponents","_styledSystem","_Flex","_Text","_excluded","obj","__esModule","default","_extends","Object","assign","bind","target","i","arguments","length","source","key","prototype","hasOwnProperty","call","apply","_objectWithoutProperties","excluded","_objectWithoutPropertiesLoose","getOwnPropertySymbols","sourceSymbolKeys","indexOf","propertyIsEnumerable","sourceKeys","keys","MESSAGE_VARIANTS","backgroundColor","color","info","success","alert","warning","error","exports","Container","styled","Flex","withConfig","displayName","componentId","variant","variants","Message","_ref","children","title","rest","createElement","p","Text","defaultProps"],"sources":["../../../src/elements/Message/Message.tsx"],"sourcesContent":["import React from \"react\"\nimport styled from \"styled-components\"\nimport { variant } from \"styled-system\"\nimport { Flex, FlexProps } from \"../Flex\"\nimport { Text } from \"../Text\"\n\nexport const MESSAGE_VARIANTS = {\n default: {\n backgroundColor: \"
|
|
1
|
+
{"version":3,"file":"Message.js","names":["_react","_interopRequireDefault","require","_styledComponents","_styledSystem","_Flex","_Text","_excluded","obj","__esModule","default","_extends","Object","assign","bind","target","i","arguments","length","source","key","prototype","hasOwnProperty","call","apply","_objectWithoutProperties","excluded","_objectWithoutPropertiesLoose","getOwnPropertySymbols","sourceSymbolKeys","indexOf","propertyIsEnumerable","sourceKeys","keys","MESSAGE_VARIANTS","backgroundColor","color","info","success","alert","warning","error","exports","Container","styled","Flex","withConfig","displayName","componentId","variant","variants","Message","_ref","children","title","rest","createElement","p","Text","defaultProps"],"sources":["../../../src/elements/Message/Message.tsx"],"sourcesContent":["import React from \"react\"\nimport styled from \"styled-components\"\nimport { variant } from \"styled-system\"\nimport { Flex, FlexProps } from \"../Flex\"\nimport { Text } from \"../Text\"\n\nexport const MESSAGE_VARIANTS = {\n default: {\n backgroundColor: \"black5\",\n color: \"black100\",\n },\n info: {\n backgroundColor: \"blue10\",\n color: \"blue100\",\n },\n success: {\n backgroundColor: \"green10\",\n color: \"green150\",\n },\n alert: {\n backgroundColor: \"orange10\",\n color: \"orange150\",\n },\n warning: {\n backgroundColor: \"yellow10\",\n color: \"yellow150\",\n },\n error: {\n backgroundColor: \"red10\",\n color: \"red100\",\n },\n}\n\nexport type MessageVariant = keyof typeof MESSAGE_VARIANTS\n\nexport interface MessageProps extends FlexProps {\n children?: React.ReactNode\n title?: string\n variant?: MessageVariant\n}\n\nconst Container = styled(Flex)<MessageProps>`\n ${variant({ variants: MESSAGE_VARIANTS })}\n flex-direction: column;\n`\n\n/**\n * `Message` is used for in-line communication. These should fill the allotted\n * container or space they are placed and key for temporal messages and\n * comments within flows. Additionally, they can be used to highlight particular\n * messaging within a specific section of a page or screen.\n */\nexport const Message: React.FC<MessageProps> = ({\n children,\n title,\n variant,\n ...rest\n}) => {\n const color = variant === \"default\" ? \"black60\" : \"black100\"\n\n return (\n <Container p={2} variant={variant} {...rest}>\n <Text variant=\"sm-display\" color=\"currentColor\">\n {title}\n </Text>\n\n <Text variant=\"sm-display\" color={color}>\n {children}\n </Text>\n </Container>\n )\n}\n\nMessage.defaultProps = {\n variant: \"default\",\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,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;IACLL,OAAO,GAAAG,IAAA,CAAPH,OAAO;IACJM,IAAI,GAAA9B,wBAAA,CAAA2B,IAAA,EAAA7C,SAAA;EAEP,IAAM6B,KAAK,GAAGa,OAAO,KAAK,SAAS,GAAG,SAAS,GAAG,UAAU;EAE5D,oBACEjD,MAAA,CAAAU,OAAA,CAAA8C,aAAA,CAACb,SAAS,EAAAhC,QAAA;IAAC8C,CAAC,EAAE,CAAE;IAACR,OAAO,EAAEA;EAAQ,GAAKM,IAAI,gBACzCvD,MAAA,CAAAU,OAAA,CAAA8C,aAAA,CAAClD,KAAA,CAAAoD,IAAI;IAACT,OAAO,EAAC,YAAY;IAACb,KAAK,EAAC;EAAc,GAC5CkB,KAAK,CACD,eAEPtD,MAAA,CAAAU,OAAA,CAAA8C,aAAA,CAAClD,KAAA,CAAAoD,IAAI;IAACT,OAAO,EAAC,YAAY;IAACb,KAAK,EAAEA;EAAM,GACrCiB,QAAQ,CACJ,CACG;AAEhB,CAAC;AAAAX,OAAA,CAAAS,OAAA,GAAAA,OAAA;AAnBYA,OAA+B,CAAAJ,WAAA;AAqB5CI,OAAO,CAACQ,YAAY,GAAG;EACrBV,OAAO,EAAE;AACX,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@artsy/palette",
|
|
3
|
-
"version": "38.12.
|
|
3
|
+
"version": "38.12.1",
|
|
4
4
|
"description": "Design system library for react components",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"publishConfig": {
|
|
@@ -118,7 +118,7 @@
|
|
|
118
118
|
},
|
|
119
119
|
"dependencies": {
|
|
120
120
|
"@artsy/icons": "^3.2.2",
|
|
121
|
-
"@artsy/palette-tokens": "^6.0.
|
|
121
|
+
"@artsy/palette-tokens": "^6.0.2",
|
|
122
122
|
"@seznam/compose-react-refs": "^1.0.6",
|
|
123
123
|
"@styled-system/theme-get": "^5.1.2",
|
|
124
124
|
"lodash": "^4.17.21",
|
|
@@ -182,5 +182,5 @@
|
|
|
182
182
|
"url": "http://localhost"
|
|
183
183
|
}
|
|
184
184
|
},
|
|
185
|
-
"gitHead": "
|
|
185
|
+
"gitHead": "b6366f7ddd86f3c2169670d0114d7a086397617d"
|
|
186
186
|
}
|