@contentful/f36-badge 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE.md ADDED
@@ -0,0 +1,7 @@
1
+ Copyright (c) 2018-present Contentful GmbH
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
+
5
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6
+
7
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,6 @@
1
+ # @contentful/f36-badge
2
+
3
+ This package contains:
4
+
5
+ - [Badge](./src/Badge)
6
+ - [EntityStatusBadge](./src/EntityStatusBadge)
package/dist/main.js ADDED
@@ -0,0 +1,138 @@
1
+ var $2TfL1$emotion = require("emotion");
2
+ var $2TfL1$react = require("react");
3
+ var $2TfL1$contentfulf36core = require("@contentful/f36-core");
4
+ var $2TfL1$contentfulf36tokens = require("@contentful/f36-tokens");
5
+
6
+ function $parcel$export(e, n, v, s) {
7
+ Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
8
+ }
9
+ function $parcel$interopDefault(a) {
10
+ return a && a.__esModule ? a.default : a;
11
+ }
12
+
13
+ $parcel$export(module.exports, "Badge", () => $0b9eb5cb77360f1e$export$37acb3580601e69a);
14
+ $parcel$export(module.exports, "EntityStatusBadge", () => $db994f281dc286ac$export$ab4ed1b313ef6d98);
15
+
16
+
17
+
18
+
19
+
20
+ const $2a438b1691bd83eb$var$variantToStyles = ({ variant: variant })=>{
21
+ switch(variant){
22
+ case 'positive':
23
+ return {
24
+ color: ($parcel$interopDefault($2TfL1$contentfulf36tokens)).green600,
25
+ backgroundColor: ($parcel$interopDefault($2TfL1$contentfulf36tokens)).green200
26
+ };
27
+ case 'primary':
28
+ return {
29
+ color: ($parcel$interopDefault($2TfL1$contentfulf36tokens)).blue600,
30
+ backgroundColor: ($parcel$interopDefault($2TfL1$contentfulf36tokens)).blue200
31
+ };
32
+ case 'negative':
33
+ return {
34
+ color: ($parcel$interopDefault($2TfL1$contentfulf36tokens)).red600,
35
+ backgroundColor: ($parcel$interopDefault($2TfL1$contentfulf36tokens)).red200
36
+ };
37
+ case 'warning':
38
+ return {
39
+ color: ($parcel$interopDefault($2TfL1$contentfulf36tokens)).orange600,
40
+ backgroundColor: ($parcel$interopDefault($2TfL1$contentfulf36tokens)).orange200
41
+ };
42
+ case 'secondary':
43
+ return {
44
+ color: ($parcel$interopDefault($2TfL1$contentfulf36tokens)).gray700,
45
+ backgroundColor: ($parcel$interopDefault($2TfL1$contentfulf36tokens)).gray200
46
+ };
47
+ case 'primary-filled':
48
+ return {
49
+ color: ($parcel$interopDefault($2TfL1$contentfulf36tokens)).colorWhite,
50
+ backgroundColor: ($parcel$interopDefault($2TfL1$contentfulf36tokens)).blue600
51
+ };
52
+ case 'featured':
53
+ return {
54
+ color: ($parcel$interopDefault($2TfL1$contentfulf36tokens)).purple600,
55
+ backgroundColor: ($parcel$interopDefault($2TfL1$contentfulf36tokens)).purple200
56
+ };
57
+ default:
58
+ return {
59
+ };
60
+ }
61
+ };
62
+ const $2a438b1691bd83eb$var$sizeToStyles = ({ size: size })=>{
63
+ switch(size){
64
+ case 'small':
65
+ return {
66
+ padding: `3px ${($parcel$interopDefault($2TfL1$contentfulf36tokens)).spacing2Xs}`,
67
+ fontSize: '0.625rem',
68
+ lineHeight: '0.625rem',
69
+ maxHeight: '16px'
70
+ };
71
+ default:
72
+ return {
73
+ padding: `0 ${($parcel$interopDefault($2TfL1$contentfulf36tokens)).spacingXs}`,
74
+ fontSize: `calc(1rem * (12 / ${($parcel$interopDefault($2TfL1$contentfulf36tokens)).fontBaseDefault}))`,
75
+ lineHeight: '20px',
76
+ maxHeight: '20px'
77
+ };
78
+ }
79
+ };
80
+ const $2a438b1691bd83eb$export$c9d43b5c20560398 = ({ variant: variant , size: size })=>{
81
+ return(/*#__PURE__*/ $2TfL1$emotion.css({
82
+ fontFamily: ($parcel$interopDefault($2TfL1$contentfulf36tokens)).fontStackPrimary,
83
+ fontWeight: ($parcel$interopDefault($2TfL1$contentfulf36tokens)).fontWeightDemiBold,
84
+ textTransform: 'uppercase',
85
+ letterSpacing: '0.06rem',
86
+ borderRadius: `${($parcel$interopDefault($2TfL1$contentfulf36tokens)).borderRadiusSmall}`,
87
+ ...$2a438b1691bd83eb$var$variantToStyles({
88
+ variant: variant
89
+ }),
90
+ ...$2a438b1691bd83eb$var$sizeToStyles({
91
+ size: size
92
+ })
93
+ }));
94
+ };
95
+
96
+
97
+ const $0b9eb5cb77360f1e$export$37acb3580601e69a = /*#__PURE__*/ ($parcel$interopDefault($2TfL1$react)).forwardRef((props, ref)=>{
98
+ const { children: children , variant: variant = 'primary' , size: size = 'default' , testId: testId = 'cf-ui-badge' , className: className , ...otherProps } = props;
99
+ return(/*#__PURE__*/ ($parcel$interopDefault($2TfL1$react)).createElement($2TfL1$contentfulf36core.Box, {
100
+ as: "div",
101
+ testId: testId,
102
+ display: "inline-block",
103
+ className: $2TfL1$emotion.cx($2a438b1691bd83eb$export$c9d43b5c20560398({
104
+ variant: variant,
105
+ size: size
106
+ }), className),
107
+ ...otherProps,
108
+ ref: ref
109
+ }, children));
110
+ });
111
+ $0b9eb5cb77360f1e$export$37acb3580601e69a.displayName = 'Badge';
112
+
113
+
114
+
115
+
116
+ const $db994f281dc286ac$var$statusMap = {
117
+ published: 'positive',
118
+ draft: 'warning',
119
+ archived: 'negative',
120
+ changed: 'primary',
121
+ deleted: 'negative',
122
+ new: 'primary-filled'
123
+ };
124
+ function $db994f281dc286ac$var$EntityStatusBadge(props, ref) {
125
+ const { entityStatus: entityStatus , ...otherProps } = props;
126
+ const variant = $db994f281dc286ac$var$statusMap[entityStatus];
127
+ return(/*#__PURE__*/ ($parcel$interopDefault($2TfL1$react)).createElement($0b9eb5cb77360f1e$export$37acb3580601e69a, {
128
+ ...otherProps,
129
+ variant: variant,
130
+ ref: ref
131
+ }, entityStatus));
132
+ }
133
+ const $db994f281dc286ac$export$ab4ed1b313ef6d98 = /*#__PURE__*/ ($parcel$interopDefault($2TfL1$react)).forwardRef($db994f281dc286ac$var$EntityStatusBadge);
134
+
135
+
136
+
137
+
138
+ //# sourceMappingURL=main.js.map
@@ -0,0 +1 @@
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;AEKA,KAAA,CAAM2B,qCAAe,IAAI,CAAzB,UAA2Bb,OAAAA,EAAW,CAAd,GAAuD,CAAzC;IACpC,MAAA,CAAQA,OAAR;QACE,IAAA,CAAK,CAAL;YACE,MAAA,CAAO,CAAP;gBACEc,KAAK,EAAEH,oDAAM,CAACI,QADT;gBAELC,eAAe,EAAEL,oDAAM,CAACM,QAAxBD;YAFK,CAAP;QAIF,IAAA,CAAK,CAAL;YACE,MAAA,CAAO,CAAP;gBACEF,KAAK,EAAEH,oDAAM,CAACO,OADT;gBAELF,eAAe,EAAEL,oDAAM,CAACQ,OAAxBH;YAFK,CAAP;QAIF,IAAA,CAAK,CAAL;YACE,MAAA,CAAO,CAAP;gBACEF,KAAK,EAAEH,oDAAM,CAACS,MADT;gBAELJ,eAAe,EAAEL,oDAAM,CAACU,MAAxBL;YAFK,CAAP;QAIF,IAAA,CAAK,CAAL;YACE,MAAA,CAAO,CAAP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M,CAAN,eAAQgD,YAAF,MAAmB7C,UAAH,CAAhB,CAAA,GAAkCJ,KAAxC;IACA,KAAA,CAAML,OAAO,GAAG8C,+BAAS,CAACQ,YAAD;IACzB,MAAA,oEACG,yCAAD;WAAW7C,UAAJ;QAAgB,OAAA,EAAST,OAAD;QAAU,GAAA,EAAKM,GAAD;OAC1CgD,YAAD;AAGL,CAAA;AAED,KAAA,CAAME,yCAAkB,iBAAGjE,sCAAK,CAACY,UAAU,CAGzCf,uCAHyB;;","sources":["packages/components/badge/src/index.ts","packages/components/badge/src/Badge/Badge.tsx","packages/components/badge/src/Badge/Badge.styles.ts","packages/components/badge/src/EntityStatusBadge/EntityStatusBadge.tsx"],"sourcesContent":["export { Badge } from './Badge/Badge';\nexport type { BadgeProps } from './Badge/Badge';\nexport { EntityStatusBadge } from './EntityStatusBadge/EntityStatusBadge';\nexport type { EntityStatusBadgeProps } from './EntityStatusBadge/EntityStatusBadge';\nexport type { BadgeVariant } from './types';\n","import React from 'react';\nimport { cx } from 'emotion';\nimport { Box } from '@contentful/f36-core';\nimport type {\n CommonProps,\n PropsWithHTMLElement,\n ExpandProps,\n} from '@contentful/f36-core';\n\nimport type { BadgeSize, BadgeVariant } from '../types';\nimport { getBadgeStyles } from './Badge.styles';\n\nexport interface BadgeInternalProps extends CommonProps {\n /**\n * Sets the size of the component\n * @default default\n */\n size?: BadgeSize;\n /**\n * Determines the variation of the component\n * @default primary\n */\n variant?: BadgeVariant;\n\n children: React.ReactNode;\n}\n\nexport type BadgeProps = PropsWithHTMLElement<BadgeInternalProps, 'div'>;\n\nexport const Badge = React.forwardRef<HTMLDivElement, ExpandProps<BadgeProps>>(\n (props, ref) => {\n const {\n children,\n variant = 'primary',\n size = 'default',\n testId = 'cf-ui-badge',\n className,\n ...otherProps\n } = props;\n\n return (\n <Box\n as=\"div\"\n testId={testId}\n display=\"inline-block\"\n className={cx(getBadgeStyles({ variant, size }), className)}\n {...otherProps}\n ref={ref}\n >\n {children}\n </Box>\n );\n },\n);\n\nBadge.displayName = 'Badge';\n","import tokens from '@contentful/f36-tokens';\nimport { css } from 'emotion';\nimport type { BadgeVariant, BadgeSize } from '../types';\nimport type { CSSObject } from '@emotion/serialize';\n\nconst variantToStyles = ({ variant }: { variant: BadgeVariant }): CSSObject => {\n switch (variant) {\n case 'positive':\n return {\n color: tokens.green600,\n backgroundColor: tokens.green200,\n };\n case 'primary':\n return {\n color: tokens.blue600,\n backgroundColor: tokens.blue200,\n };\n case 'negative':\n return {\n color: tokens.red600,\n backgroundColor: tokens.red200,\n };\n case 'warning':\n return {\n color: tokens.orange600,\n backgroundColor: tokens.orange200,\n };\n case 'secondary':\n return {\n color: tokens.gray700,\n backgroundColor: tokens.gray200,\n };\n case 'primary-filled':\n return {\n color: tokens.colorWhite,\n backgroundColor: tokens.blue600,\n };\n case 'featured':\n return {\n color: tokens.purple600,\n backgroundColor: tokens.purple200,\n };\n default:\n return {};\n }\n};\n\nconst sizeToStyles = ({ size }: { size: BadgeSize }): CSSObject => {\n switch (size) {\n case 'small':\n return {\n padding: `3px ${tokens.spacing2Xs}`,\n fontSize: '0.625rem',\n lineHeight: '0.625rem',\n maxHeight: '16px',\n };\n default:\n return {\n padding: `0 ${tokens.spacingXs}`,\n fontSize: `calc(1rem * (12 / ${tokens.fontBaseDefault}))`,\n lineHeight: '20px',\n maxHeight: '20px',\n };\n }\n};\n\nexport const getBadgeStyles = ({\n variant,\n size,\n}: {\n variant: BadgeVariant;\n size: BadgeSize;\n}) => {\n return css({\n fontFamily: tokens.fontStackPrimary,\n fontWeight: tokens.fontWeightDemiBold,\n\n textTransform: 'uppercase',\n letterSpacing:\n '0.06rem' /*move to tokens or update wide letter spacing token*/,\n borderRadius: `${tokens.borderRadiusSmall}`,\n ...variantToStyles({ variant }),\n ...sizeToStyles({ size }),\n });\n};\n","import React from 'react';\nimport type { EntityStatus, ExpandProps } from '@contentful/f36-core';\n\nimport { Badge } from '../Badge/Badge';\nimport type { BadgeProps } from '../Badge/Badge';\nimport type { BadgeVariant, BadgeSize } from '../types';\n\nconst statusMap: { [key in EntityStatus]: BadgeVariant } = {\n published: 'positive',\n draft: 'warning',\n archived: 'negative',\n changed: 'primary',\n deleted: 'negative',\n new: 'primary-filled',\n};\n\nexport interface EntityStatusBadgeProps\n extends Omit<BadgeProps, 'variant' | 'children'> {\n size?: BadgeSize;\n entityStatus: EntityStatus;\n}\n\nfunction EntityStatusBadge(\n props: EntityStatusBadgeProps,\n ref: React.Ref<HTMLDivElement>,\n) {\n const { entityStatus, ...otherProps } = props;\n const variant = statusMap[entityStatus];\n return (\n <Badge {...otherProps} variant={variant} ref={ref}>\n {entityStatus}\n </Badge>\n );\n}\n\nconst _EntityStatusBadge = React.forwardRef<\n HTMLDivElement,\n ExpandProps<EntityStatusBadgeProps>\n>(EntityStatusBadge);\nexport { _EntityStatusBadge as EntityStatusBadge };\n"],"names":["Badge","BadgeProps","EntityStatusBadge","EntityStatusBadgeProps","BadgeVariant","React","Box","CommonProps","PropsWithHTMLElement","ExpandProps","BadgeSize","getBadgeStyles","BadgeInternalProps","size","variant","children","ReactNode","forwardRef","HTMLDivElement","props","ref","testId","className","otherProps","displayName","tokens","CSSObject","variantToStyles","color","green600","backgroundColor","green200","blue600","blue200","red600","red200","orange600","orange200","gray700","gray200","colorWhite","purple600","purple200","sizeToStyles","padding","spacing2Xs","fontSize","lineHeight","maxHeight","spacingXs","fontBaseDefault","fontFamily","fontStackPrimary","fontWeight","fontWeightDemiBold","textTransform","letterSpacing","borderRadius","borderRadiusSmall","EntityStatus","statusMap","published","draft","archived","changed","deleted","new","Omit","entityStatus","Ref","_EntityStatusBadge"],"version":3,"file":"main.js.map"}
package/dist/module.js ADDED
@@ -0,0 +1,130 @@
1
+ import {cx as $6t5Db$cx, css as $6t5Db$css} from "emotion";
2
+ import $6t5Db$react from "react";
3
+ import {Box as $6t5Db$Box} from "@contentful/f36-core";
4
+ import $6t5Db$contentfulf36tokens from "@contentful/f36-tokens";
5
+
6
+
7
+
8
+
9
+
10
+
11
+ const $8a1e33ed71d0ddeb$var$variantToStyles = ({ variant: variant })=>{
12
+ switch(variant){
13
+ case 'positive':
14
+ return {
15
+ color: $6t5Db$contentfulf36tokens.green600,
16
+ backgroundColor: $6t5Db$contentfulf36tokens.green200
17
+ };
18
+ case 'primary':
19
+ return {
20
+ color: $6t5Db$contentfulf36tokens.blue600,
21
+ backgroundColor: $6t5Db$contentfulf36tokens.blue200
22
+ };
23
+ case 'negative':
24
+ return {
25
+ color: $6t5Db$contentfulf36tokens.red600,
26
+ backgroundColor: $6t5Db$contentfulf36tokens.red200
27
+ };
28
+ case 'warning':
29
+ return {
30
+ color: $6t5Db$contentfulf36tokens.orange600,
31
+ backgroundColor: $6t5Db$contentfulf36tokens.orange200
32
+ };
33
+ case 'secondary':
34
+ return {
35
+ color: $6t5Db$contentfulf36tokens.gray700,
36
+ backgroundColor: $6t5Db$contentfulf36tokens.gray200
37
+ };
38
+ case 'primary-filled':
39
+ return {
40
+ color: $6t5Db$contentfulf36tokens.colorWhite,
41
+ backgroundColor: $6t5Db$contentfulf36tokens.blue600
42
+ };
43
+ case 'featured':
44
+ return {
45
+ color: $6t5Db$contentfulf36tokens.purple600,
46
+ backgroundColor: $6t5Db$contentfulf36tokens.purple200
47
+ };
48
+ default:
49
+ return {
50
+ };
51
+ }
52
+ };
53
+ const $8a1e33ed71d0ddeb$var$sizeToStyles = ({ size: size })=>{
54
+ switch(size){
55
+ case 'small':
56
+ return {
57
+ padding: `3px ${$6t5Db$contentfulf36tokens.spacing2Xs}`,
58
+ fontSize: '0.625rem',
59
+ lineHeight: '0.625rem',
60
+ maxHeight: '16px'
61
+ };
62
+ default:
63
+ return {
64
+ padding: `0 ${$6t5Db$contentfulf36tokens.spacingXs}`,
65
+ fontSize: `calc(1rem * (12 / ${$6t5Db$contentfulf36tokens.fontBaseDefault}))`,
66
+ lineHeight: '20px',
67
+ maxHeight: '20px'
68
+ };
69
+ }
70
+ };
71
+ const $8a1e33ed71d0ddeb$export$c9d43b5c20560398 = ({ variant: variant , size: size })=>{
72
+ return(/*#__PURE__*/ $6t5Db$css({
73
+ fontFamily: $6t5Db$contentfulf36tokens.fontStackPrimary,
74
+ fontWeight: $6t5Db$contentfulf36tokens.fontWeightDemiBold,
75
+ textTransform: 'uppercase',
76
+ letterSpacing: '0.06rem',
77
+ borderRadius: `${$6t5Db$contentfulf36tokens.borderRadiusSmall}`,
78
+ ...$8a1e33ed71d0ddeb$var$variantToStyles({
79
+ variant: variant
80
+ }),
81
+ ...$8a1e33ed71d0ddeb$var$sizeToStyles({
82
+ size: size
83
+ })
84
+ }));
85
+ };
86
+
87
+
88
+ const $23fe874050de62bc$export$37acb3580601e69a = /*#__PURE__*/ $6t5Db$react.forwardRef((props, ref)=>{
89
+ const { children: children , variant: variant = 'primary' , size: size = 'default' , testId: testId = 'cf-ui-badge' , className: className , ...otherProps } = props;
90
+ return(/*#__PURE__*/ $6t5Db$react.createElement($6t5Db$Box, {
91
+ as: "div",
92
+ testId: testId,
93
+ display: "inline-block",
94
+ className: $6t5Db$cx($8a1e33ed71d0ddeb$export$c9d43b5c20560398({
95
+ variant: variant,
96
+ size: size
97
+ }), className),
98
+ ...otherProps,
99
+ ref: ref
100
+ }, children));
101
+ });
102
+ $23fe874050de62bc$export$37acb3580601e69a.displayName = 'Badge';
103
+
104
+
105
+
106
+
107
+ const $a23f6dc8cefcf8e1$var$statusMap = {
108
+ published: 'positive',
109
+ draft: 'warning',
110
+ archived: 'negative',
111
+ changed: 'primary',
112
+ deleted: 'negative',
113
+ new: 'primary-filled'
114
+ };
115
+ function $a23f6dc8cefcf8e1$var$EntityStatusBadge(props, ref) {
116
+ const { entityStatus: entityStatus , ...otherProps } = props;
117
+ const variant = $a23f6dc8cefcf8e1$var$statusMap[entityStatus];
118
+ return(/*#__PURE__*/ $6t5Db$react.createElement($23fe874050de62bc$export$37acb3580601e69a, {
119
+ ...otherProps,
120
+ variant: variant,
121
+ ref: ref
122
+ }, entityStatus));
123
+ }
124
+ const $a23f6dc8cefcf8e1$export$ab4ed1b313ef6d98 = /*#__PURE__*/ $6t5Db$react.forwardRef($a23f6dc8cefcf8e1$var$EntityStatusBadge);
125
+
126
+
127
+
128
+
129
+ export {$23fe874050de62bc$export$37acb3580601e69a as Badge, $a23f6dc8cefcf8e1$export$ab4ed1b313ef6d98 as EntityStatusBadge};
130
+ //# sourceMappingURL=module.js.map
@@ -0,0 +1 @@
1
+ {"mappings":";;;;;;;;;;AEKA,KAAA,CAAM2B,qCAAe,IAAI,CAAzB,UAA2Bb,OAAAA,EAAW,CAAd,GAAuD,CAAzC;IACpC,MAAA,CAAQA,OAAR;QACE,IAAA,CAAK,CAAL;YACE,MAAA,CAAO,CAAP;gBACEc,KAAK,EAAEH,0BAAM,CAACI,QADT;gBAELC,eAAe,EAAEL,0BAAM,CAACM,QAAxBD;YAFK,CAAP;QAIF,IAAA,CAAK,CAAL;YACE,MAAA,CAAO,CAAP;gBACEF,KAAK,EAAEH,0BAAM,CAACO,OADT;gBAELF,eAAe,EAAEL,0BAAM,CAACQ,OAAxBH;YAFK,CAAP;QAIF,IAAA,CAAK,CAAL;YACE,MAAA,CAAO,CAAP;gBACEF,KAAK,EAAEH,0BAAM,CAACS,MADT;gBAELJ,eAAe,EAAEL,0BAAM,CAACU,MAAxBL;YAFK,CAAP;QAIF,IAAA,CAAK,CAAL;YACE,MAAA,CAAO,CAAP;gBACEF,KAAK,EAAEH,0BAAM,CAACW,SADT;gBAELN,eAAe,EAAEL,0BAAM,CAACY,SAAxBP;YAFK,CAAP;QAIF,IAAA,CAAK,CAAL;YACE,MAAA,CAAO,CAAP;gBACEF,KAAK,EAAEH,0BAAM,CAACa,OADT;gBAELR,eAAe,EAAEL,0BAAM,CAACc,OAAxBT;YAFK,CAAP;QAIF,IAAA,CAAK,CAAL;YACE,MAAA,CAAO,CAAP;gBACEF,KAAK,EAAEH,0BAAM,CAACe,UADT;gBAELV,eAAe,EAAEL,0BAAM,CAACO,OAAxBF;YA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ge/src/Badge/Badge.styles.ts","packages/components/badge/src/EntityStatusBadge/EntityStatusBadge.tsx"],"sourcesContent":["export { Badge } from './Badge/Badge';\nexport type { BadgeProps } from './Badge/Badge';\nexport { EntityStatusBadge } from './EntityStatusBadge/EntityStatusBadge';\nexport type { EntityStatusBadgeProps } from './EntityStatusBadge/EntityStatusBadge';\nexport type { BadgeVariant } from './types';\n","import React from 'react';\nimport { cx } from 'emotion';\nimport { Box } from '@contentful/f36-core';\nimport type {\n CommonProps,\n PropsWithHTMLElement,\n ExpandProps,\n} from '@contentful/f36-core';\n\nimport type { BadgeSize, BadgeVariant } from '../types';\nimport { getBadgeStyles } from './Badge.styles';\n\nexport interface BadgeInternalProps extends CommonProps {\n /**\n * Sets the size of the component\n * @default default\n */\n size?: BadgeSize;\n /**\n * Determines the variation of the component\n * @default primary\n */\n variant?: BadgeVariant;\n\n children: React.ReactNode;\n}\n\nexport type BadgeProps = PropsWithHTMLElement<BadgeInternalProps, 'div'>;\n\nexport const Badge = React.forwardRef<HTMLDivElement, ExpandProps<BadgeProps>>(\n (props, ref) => {\n const {\n children,\n variant = 'primary',\n size = 'default',\n testId = 'cf-ui-badge',\n className,\n ...otherProps\n } = props;\n\n return (\n <Box\n as=\"div\"\n testId={testId}\n display=\"inline-block\"\n className={cx(getBadgeStyles({ variant, size }), className)}\n {...otherProps}\n ref={ref}\n >\n {children}\n </Box>\n );\n },\n);\n\nBadge.displayName = 'Badge';\n","import tokens from '@contentful/f36-tokens';\nimport { css } from 'emotion';\nimport type { BadgeVariant, BadgeSize } from '../types';\nimport type { CSSObject } from '@emotion/serialize';\n\nconst variantToStyles = ({ variant }: { variant: BadgeVariant }): CSSObject => {\n switch (variant) {\n case 'positive':\n return {\n color: tokens.green600,\n backgroundColor: tokens.green200,\n };\n case 'primary':\n return {\n color: tokens.blue600,\n backgroundColor: tokens.blue200,\n };\n case 'negative':\n return {\n color: tokens.red600,\n backgroundColor: tokens.red200,\n };\n case 'warning':\n return {\n color: tokens.orange600,\n backgroundColor: tokens.orange200,\n };\n case 'secondary':\n return {\n color: tokens.gray700,\n backgroundColor: tokens.gray200,\n };\n case 'primary-filled':\n return {\n color: tokens.colorWhite,\n backgroundColor: tokens.blue600,\n };\n case 'featured':\n return {\n color: tokens.purple600,\n backgroundColor: tokens.purple200,\n };\n default:\n return {};\n }\n};\n\nconst sizeToStyles = ({ size }: { size: BadgeSize }): CSSObject => {\n switch (size) {\n case 'small':\n return {\n padding: `3px ${tokens.spacing2Xs}`,\n fontSize: '0.625rem',\n lineHeight: '0.625rem',\n maxHeight: '16px',\n };\n default:\n return {\n padding: `0 ${tokens.spacingXs}`,\n fontSize: `calc(1rem * (12 / ${tokens.fontBaseDefault}))`,\n lineHeight: '20px',\n maxHeight: '20px',\n };\n }\n};\n\nexport const getBadgeStyles = ({\n variant,\n size,\n}: {\n variant: BadgeVariant;\n size: BadgeSize;\n}) => {\n return css({\n fontFamily: tokens.fontStackPrimary,\n fontWeight: tokens.fontWeightDemiBold,\n\n textTransform: 'uppercase',\n letterSpacing:\n '0.06rem' /*move to tokens or update wide letter spacing token*/,\n borderRadius: `${tokens.borderRadiusSmall}`,\n ...variantToStyles({ variant }),\n ...sizeToStyles({ size }),\n });\n};\n","import React from 'react';\nimport type { EntityStatus, ExpandProps } from '@contentful/f36-core';\n\nimport { Badge } from '../Badge/Badge';\nimport type { BadgeProps } from '../Badge/Badge';\nimport type { BadgeVariant, BadgeSize } from '../types';\n\nconst statusMap: { [key in EntityStatus]: BadgeVariant } = {\n published: 'positive',\n draft: 'warning',\n archived: 'negative',\n changed: 'primary',\n deleted: 'negative',\n new: 'primary-filled',\n};\n\nexport interface EntityStatusBadgeProps\n extends Omit<BadgeProps, 'variant' | 'children'> {\n size?: BadgeSize;\n entityStatus: EntityStatus;\n}\n\nfunction EntityStatusBadge(\n props: EntityStatusBadgeProps,\n ref: React.Ref<HTMLDivElement>,\n) {\n const { entityStatus, ...otherProps } = props;\n const variant = statusMap[entityStatus];\n return (\n <Badge {...otherProps} variant={variant} ref={ref}>\n {entityStatus}\n </Badge>\n );\n}\n\nconst _EntityStatusBadge = React.forwardRef<\n HTMLDivElement,\n ExpandProps<EntityStatusBadgeProps>\n>(EntityStatusBadge);\nexport { _EntityStatusBadge as EntityStatusBadge };\n"],"names":["Badge","BadgeProps","EntityStatusBadge","EntityStatusBadgeProps","BadgeVariant","React","Box","CommonProps","PropsWithHTMLElement","ExpandProps","BadgeSize","getBadgeStyles","BadgeInternalProps","size","variant","children","ReactNode","forwardRef","HTMLDivElement","props","ref","testId","className","otherProps","displayName","tokens","CSSObject","variantToStyles","color","green600","backgroundColor","green200","blue600","blue200","red600","red200","orange600","orange200","gray700","gray200","colorWhite","purple600","purple200","sizeToStyles","padding","spacing2Xs","fontSize","lineHeight","maxHeight","spacingXs","fontBaseDefault","fontFamily","fontStackPrimary","fontWeight","fontWeightDemiBold","textTransform","letterSpacing","borderRadius","borderRadiusSmall","EntityStatus","statusMap","published","draft","archived","changed","deleted","new","Omit","entityStatus","Ref","_EntityStatusBadge"],"version":3,"file":"module.js.map"}
@@ -0,0 +1,547 @@
1
+ import React from "react";
2
+ import { CommonProps, PropsWithHTMLElement, EntityStatus } from "@contentful/f36-core";
3
+ type BadgeSize = 'default' | 'small';
4
+ export type BadgeVariant = 'negative' | 'positive' | 'primary' | 'secondary' | 'warning' | 'primary-filled' | 'featured';
5
+ interface BadgeInternalProps extends CommonProps {
6
+ /**
7
+ * Sets the size of the component
8
+ * @default default
9
+ */
10
+ size?: BadgeSize;
11
+ /**
12
+ * Determines the variation of the component
13
+ * @default primary
14
+ */
15
+ variant?: BadgeVariant;
16
+ children: React.ReactNode;
17
+ }
18
+ export type BadgeProps = PropsWithHTMLElement<BadgeInternalProps, 'div'>;
19
+ export const Badge: React.ForwardRefExoticComponent<{
20
+ color?: string;
21
+ translate?: "no" | "yes";
22
+ hidden?: boolean;
23
+ slot?: string;
24
+ title?: string;
25
+ key?: React.Key;
26
+ defaultChecked?: boolean;
27
+ defaultValue?: string | number | readonly string[];
28
+ suppressContentEditableWarning?: boolean;
29
+ suppressHydrationWarning?: boolean;
30
+ accessKey?: string;
31
+ contentEditable?: "inherit" | (boolean | "false" | "true");
32
+ contextMenu?: string;
33
+ dir?: string;
34
+ draggable?: boolean | "false" | "true";
35
+ id?: string;
36
+ lang?: string;
37
+ placeholder?: string;
38
+ spellCheck?: boolean | "false" | "true";
39
+ tabIndex?: number;
40
+ radioGroup?: string;
41
+ role?: string;
42
+ about?: string;
43
+ datatype?: string;
44
+ inlist?: any;
45
+ prefix?: string;
46
+ property?: string;
47
+ resource?: string;
48
+ typeof?: string;
49
+ vocab?: string;
50
+ autoCapitalize?: string;
51
+ autoCorrect?: string;
52
+ autoSave?: string;
53
+ itemProp?: string;
54
+ itemScope?: boolean;
55
+ itemType?: string;
56
+ itemID?: string;
57
+ itemRef?: string;
58
+ results?: number;
59
+ security?: string;
60
+ unselectable?: "on" | "off";
61
+ inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search";
62
+ is?: string;
63
+ 'aria-activedescendant'?: string;
64
+ 'aria-atomic'?: boolean | "false" | "true";
65
+ 'aria-autocomplete'?: "none" | "both" | "inline" | "list";
66
+ 'aria-busy'?: boolean | "false" | "true";
67
+ 'aria-checked'?: boolean | "mixed" | "false" | "true";
68
+ 'aria-colcount'?: number;
69
+ 'aria-colindex'?: number;
70
+ 'aria-colspan'?: number;
71
+ 'aria-controls'?: string;
72
+ 'aria-current'?: boolean | "page" | "false" | "true" | "time" | "step" | "location" | "date";
73
+ 'aria-describedby'?: string;
74
+ 'aria-details'?: string;
75
+ 'aria-disabled'?: boolean | "false" | "true";
76
+ 'aria-dropeffect'?: "none" | "copy" | "move" | "link" | "execute" | "popup";
77
+ 'aria-errormessage'?: string;
78
+ 'aria-expanded'?: boolean | "false" | "true";
79
+ 'aria-flowto'?: string;
80
+ 'aria-grabbed'?: boolean | "false" | "true";
81
+ 'aria-haspopup'?: boolean | "grid" | "listbox" | "menu" | "false" | "true" | "dialog" | "tree";
82
+ 'aria-hidden'?: boolean | "false" | "true";
83
+ 'aria-invalid'?: boolean | "false" | "true" | "grammar" | "spelling";
84
+ 'aria-keyshortcuts'?: string;
85
+ 'aria-label'?: string;
86
+ 'aria-labelledby'?: string;
87
+ 'aria-level'?: number;
88
+ 'aria-live'?: "off" | "assertive" | "polite";
89
+ 'aria-modal'?: boolean | "false" | "true";
90
+ 'aria-multiline'?: boolean | "false" | "true";
91
+ 'aria-multiselectable'?: boolean | "false" | "true";
92
+ 'aria-orientation'?: "horizontal" | "vertical";
93
+ 'aria-owns'?: string;
94
+ 'aria-placeholder'?: string;
95
+ 'aria-posinset'?: number;
96
+ 'aria-pressed'?: boolean | "mixed" | "false" | "true";
97
+ 'aria-readonly'?: boolean | "false" | "true";
98
+ 'aria-relevant'?: "all" | "text" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals";
99
+ 'aria-required'?: boolean | "false" | "true";
100
+ 'aria-roledescription'?: string;
101
+ 'aria-rowcount'?: number;
102
+ 'aria-rowindex'?: number;
103
+ 'aria-rowspan'?: number;
104
+ 'aria-selected'?: boolean | "false" | "true";
105
+ 'aria-setsize'?: number;
106
+ 'aria-sort'?: "none" | "ascending" | "descending" | "other";
107
+ 'aria-valuemax'?: number;
108
+ 'aria-valuemin'?: number;
109
+ 'aria-valuenow'?: number;
110
+ 'aria-valuetext'?: string;
111
+ dangerouslySetInnerHTML?: {
112
+ __html: string;
113
+ };
114
+ onCopy?: React.ClipboardEventHandler<HTMLDivElement>;
115
+ onCopyCapture?: React.ClipboardEventHandler<HTMLDivElement>;
116
+ onCut?: React.ClipboardEventHandler<HTMLDivElement>;
117
+ onCutCapture?: React.ClipboardEventHandler<HTMLDivElement>;
118
+ onPaste?: React.ClipboardEventHandler<HTMLDivElement>;
119
+ onPasteCapture?: React.ClipboardEventHandler<HTMLDivElement>;
120
+ onCompositionEnd?: React.CompositionEventHandler<HTMLDivElement>;
121
+ onCompositionEndCapture?: React.CompositionEventHandler<HTMLDivElement>;
122
+ onCompositionStart?: React.CompositionEventHandler<HTMLDivElement>;
123
+ onCompositionStartCapture?: React.CompositionEventHandler<HTMLDivElement>;
124
+ onCompositionUpdate?: React.CompositionEventHandler<HTMLDivElement>;
125
+ onCompositionUpdateCapture?: React.CompositionEventHandler<HTMLDivElement>;
126
+ onFocus?: React.FocusEventHandler<HTMLDivElement>;
127
+ onFocusCapture?: React.FocusEventHandler<HTMLDivElement>;
128
+ onBlur?: React.FocusEventHandler<HTMLDivElement>;
129
+ onBlurCapture?: React.FocusEventHandler<HTMLDivElement>;
130
+ onChange?: React.FormEventHandler<HTMLDivElement>;
131
+ onChangeCapture?: React.FormEventHandler<HTMLDivElement>;
132
+ onBeforeInput?: React.FormEventHandler<HTMLDivElement>;
133
+ onBeforeInputCapture?: React.FormEventHandler<HTMLDivElement>;
134
+ onInput?: React.FormEventHandler<HTMLDivElement>;
135
+ onInputCapture?: React.FormEventHandler<HTMLDivElement>;
136
+ onReset?: React.FormEventHandler<HTMLDivElement>;
137
+ onResetCapture?: React.FormEventHandler<HTMLDivElement>;
138
+ onSubmit?: React.FormEventHandler<HTMLDivElement>;
139
+ onSubmitCapture?: React.FormEventHandler<HTMLDivElement>;
140
+ onInvalid?: React.FormEventHandler<HTMLDivElement>;
141
+ onInvalidCapture?: React.FormEventHandler<HTMLDivElement>;
142
+ onLoad?: React.ReactEventHandler<HTMLDivElement>;
143
+ onLoadCapture?: React.ReactEventHandler<HTMLDivElement>;
144
+ onError?: React.ReactEventHandler<HTMLDivElement>;
145
+ onErrorCapture?: React.ReactEventHandler<HTMLDivElement>;
146
+ onKeyDown?: React.KeyboardEventHandler<HTMLDivElement>;
147
+ onKeyDownCapture?: React.KeyboardEventHandler<HTMLDivElement>;
148
+ onKeyPress?: React.KeyboardEventHandler<HTMLDivElement>;
149
+ onKeyPressCapture?: React.KeyboardEventHandler<HTMLDivElement>;
150
+ onKeyUp?: React.KeyboardEventHandler<HTMLDivElement>;
151
+ onKeyUpCapture?: React.KeyboardEventHandler<HTMLDivElement>;
152
+ onAbort?: React.ReactEventHandler<HTMLDivElement>;
153
+ onAbortCapture?: React.ReactEventHandler<HTMLDivElement>;
154
+ onCanPlay?: React.ReactEventHandler<HTMLDivElement>;
155
+ onCanPlayCapture?: React.ReactEventHandler<HTMLDivElement>;
156
+ onCanPlayThrough?: React.ReactEventHandler<HTMLDivElement>;
157
+ onCanPlayThroughCapture?: React.ReactEventHandler<HTMLDivElement>;
158
+ onDurationChange?: React.ReactEventHandler<HTMLDivElement>;
159
+ onDurationChangeCapture?: React.ReactEventHandler<HTMLDivElement>;
160
+ onEmptied?: React.ReactEventHandler<HTMLDivElement>;
161
+ onEmptiedCapture?: React.ReactEventHandler<HTMLDivElement>;
162
+ onEncrypted?: React.ReactEventHandler<HTMLDivElement>;
163
+ onEncryptedCapture?: React.ReactEventHandler<HTMLDivElement>;
164
+ onEnded?: React.ReactEventHandler<HTMLDivElement>;
165
+ onEndedCapture?: React.ReactEventHandler<HTMLDivElement>;
166
+ onLoadedData?: React.ReactEventHandler<HTMLDivElement>;
167
+ onLoadedDataCapture?: React.ReactEventHandler<HTMLDivElement>;
168
+ onLoadedMetadata?: React.ReactEventHandler<HTMLDivElement>;
169
+ onLoadedMetadataCapture?: React.ReactEventHandler<HTMLDivElement>;
170
+ onLoadStart?: React.ReactEventHandler<HTMLDivElement>;
171
+ onLoadStartCapture?: React.ReactEventHandler<HTMLDivElement>;
172
+ onPause?: React.ReactEventHandler<HTMLDivElement>;
173
+ onPauseCapture?: React.ReactEventHandler<HTMLDivElement>;
174
+ onPlay?: React.ReactEventHandler<HTMLDivElement>;
175
+ onPlayCapture?: React.ReactEventHandler<HTMLDivElement>;
176
+ onPlaying?: React.ReactEventHandler<HTMLDivElement>;
177
+ onPlayingCapture?: React.ReactEventHandler<HTMLDivElement>;
178
+ onProgress?: React.ReactEventHandler<HTMLDivElement>;
179
+ onProgressCapture?: React.ReactEventHandler<HTMLDivElement>;
180
+ onRateChange?: React.ReactEventHandler<HTMLDivElement>;
181
+ onRateChangeCapture?: React.ReactEventHandler<HTMLDivElement>;
182
+ onSeeked?: React.ReactEventHandler<HTMLDivElement>;
183
+ onSeekedCapture?: React.ReactEventHandler<HTMLDivElement>;
184
+ onSeeking?: React.ReactEventHandler<HTMLDivElement>;
185
+ onSeekingCapture?: React.ReactEventHandler<HTMLDivElement>;
186
+ onStalled?: React.ReactEventHandler<HTMLDivElement>;
187
+ onStalledCapture?: React.ReactEventHandler<HTMLDivElement>;
188
+ onSuspend?: React.ReactEventHandler<HTMLDivElement>;
189
+ onSuspendCapture?: React.ReactEventHandler<HTMLDivElement>;
190
+ onTimeUpdate?: React.ReactEventHandler<HTMLDivElement>;
191
+ onTimeUpdateCapture?: React.ReactEventHandler<HTMLDivElement>;
192
+ onVolumeChange?: React.ReactEventHandler<HTMLDivElement>;
193
+ onVolumeChangeCapture?: React.ReactEventHandler<HTMLDivElement>;
194
+ onWaiting?: React.ReactEventHandler<HTMLDivElement>;
195
+ onWaitingCapture?: React.ReactEventHandler<HTMLDivElement>;
196
+ onAuxClick?: React.MouseEventHandler<HTMLDivElement>;
197
+ onAuxClickCapture?: React.MouseEventHandler<HTMLDivElement>;
198
+ onClick?: React.MouseEventHandler<HTMLDivElement>;
199
+ onClickCapture?: React.MouseEventHandler<HTMLDivElement>;
200
+ onContextMenu?: React.MouseEventHandler<HTMLDivElement>;
201
+ onContextMenuCapture?: React.MouseEventHandler<HTMLDivElement>;
202
+ onDoubleClick?: React.MouseEventHandler<HTMLDivElement>;
203
+ onDoubleClickCapture?: React.MouseEventHandler<HTMLDivElement>;
204
+ onDrag?: React.DragEventHandler<HTMLDivElement>;
205
+ onDragCapture?: React.DragEventHandler<HTMLDivElement>;
206
+ onDragEnd?: React.DragEventHandler<HTMLDivElement>;
207
+ onDragEndCapture?: React.DragEventHandler<HTMLDivElement>;
208
+ onDragEnter?: React.DragEventHandler<HTMLDivElement>;
209
+ onDragEnterCapture?: React.DragEventHandler<HTMLDivElement>;
210
+ onDragExit?: React.DragEventHandler<HTMLDivElement>;
211
+ onDragExitCapture?: React.DragEventHandler<HTMLDivElement>;
212
+ onDragLeave?: React.DragEventHandler<HTMLDivElement>;
213
+ onDragLeaveCapture?: React.DragEventHandler<HTMLDivElement>;
214
+ onDragOver?: React.DragEventHandler<HTMLDivElement>;
215
+ onDragOverCapture?: React.DragEventHandler<HTMLDivElement>;
216
+ onDragStart?: React.DragEventHandler<HTMLDivElement>;
217
+ onDragStartCapture?: React.DragEventHandler<HTMLDivElement>;
218
+ onDrop?: React.DragEventHandler<HTMLDivElement>;
219
+ onDropCapture?: React.DragEventHandler<HTMLDivElement>;
220
+ onMouseDown?: React.MouseEventHandler<HTMLDivElement>;
221
+ onMouseDownCapture?: React.MouseEventHandler<HTMLDivElement>;
222
+ onMouseEnter?: React.MouseEventHandler<HTMLDivElement>;
223
+ onMouseLeave?: React.MouseEventHandler<HTMLDivElement>;
224
+ onMouseMove?: React.MouseEventHandler<HTMLDivElement>;
225
+ onMouseMoveCapture?: React.MouseEventHandler<HTMLDivElement>;
226
+ onMouseOut?: React.MouseEventHandler<HTMLDivElement>;
227
+ onMouseOutCapture?: React.MouseEventHandler<HTMLDivElement>;
228
+ onMouseOver?: React.MouseEventHandler<HTMLDivElement>;
229
+ onMouseOverCapture?: React.MouseEventHandler<HTMLDivElement>;
230
+ onMouseUp?: React.MouseEventHandler<HTMLDivElement>;
231
+ onMouseUpCapture?: React.MouseEventHandler<HTMLDivElement>;
232
+ onSelect?: React.ReactEventHandler<HTMLDivElement>;
233
+ onSelectCapture?: React.ReactEventHandler<HTMLDivElement>;
234
+ onTouchCancel?: React.TouchEventHandler<HTMLDivElement>;
235
+ onTouchCancelCapture?: React.TouchEventHandler<HTMLDivElement>;
236
+ onTouchEnd?: React.TouchEventHandler<HTMLDivElement>;
237
+ onTouchEndCapture?: React.TouchEventHandler<HTMLDivElement>;
238
+ onTouchMove?: React.TouchEventHandler<HTMLDivElement>;
239
+ onTouchMoveCapture?: React.TouchEventHandler<HTMLDivElement>;
240
+ onTouchStart?: React.TouchEventHandler<HTMLDivElement>;
241
+ onTouchStartCapture?: React.TouchEventHandler<HTMLDivElement>;
242
+ onPointerDown?: React.PointerEventHandler<HTMLDivElement>;
243
+ onPointerDownCapture?: React.PointerEventHandler<HTMLDivElement>;
244
+ onPointerMove?: React.PointerEventHandler<HTMLDivElement>;
245
+ onPointerMoveCapture?: React.PointerEventHandler<HTMLDivElement>;
246
+ onPointerUp?: React.PointerEventHandler<HTMLDivElement>;
247
+ onPointerUpCapture?: React.PointerEventHandler<HTMLDivElement>;
248
+ onPointerCancel?: React.PointerEventHandler<HTMLDivElement>;
249
+ onPointerCancelCapture?: React.PointerEventHandler<HTMLDivElement>;
250
+ onPointerEnter?: React.PointerEventHandler<HTMLDivElement>;
251
+ onPointerEnterCapture?: React.PointerEventHandler<HTMLDivElement>;
252
+ onPointerLeave?: React.PointerEventHandler<HTMLDivElement>;
253
+ onPointerLeaveCapture?: React.PointerEventHandler<HTMLDivElement>;
254
+ onPointerOver?: React.PointerEventHandler<HTMLDivElement>;
255
+ onPointerOverCapture?: React.PointerEventHandler<HTMLDivElement>;
256
+ onPointerOut?: React.PointerEventHandler<HTMLDivElement>;
257
+ onPointerOutCapture?: React.PointerEventHandler<HTMLDivElement>;
258
+ onGotPointerCapture?: React.PointerEventHandler<HTMLDivElement>;
259
+ onGotPointerCaptureCapture?: React.PointerEventHandler<HTMLDivElement>;
260
+ onLostPointerCapture?: React.PointerEventHandler<HTMLDivElement>;
261
+ onLostPointerCaptureCapture?: React.PointerEventHandler<HTMLDivElement>;
262
+ onScroll?: React.UIEventHandler<HTMLDivElement>;
263
+ onScrollCapture?: React.UIEventHandler<HTMLDivElement>;
264
+ onWheel?: React.WheelEventHandler<HTMLDivElement>;
265
+ onWheelCapture?: React.WheelEventHandler<HTMLDivElement>;
266
+ onAnimationStart?: React.AnimationEventHandler<HTMLDivElement>;
267
+ onAnimationStartCapture?: React.AnimationEventHandler<HTMLDivElement>;
268
+ onAnimationEnd?: React.AnimationEventHandler<HTMLDivElement>;
269
+ onAnimationEndCapture?: React.AnimationEventHandler<HTMLDivElement>;
270
+ onAnimationIteration?: React.AnimationEventHandler<HTMLDivElement>;
271
+ onAnimationIterationCapture?: React.AnimationEventHandler<HTMLDivElement>;
272
+ onTransitionEnd?: React.TransitionEventHandler<HTMLDivElement>;
273
+ onTransitionEndCapture?: React.TransitionEventHandler<HTMLDivElement>;
274
+ size?: BadgeSize;
275
+ variant?: BadgeVariant;
276
+ children: React.ReactNode;
277
+ className?: string;
278
+ testId?: string;
279
+ style?: React.CSSProperties;
280
+ } & React.RefAttributes<HTMLDivElement>>;
281
+ export interface EntityStatusBadgeProps extends Omit<BadgeProps, 'variant' | 'children'> {
282
+ size?: BadgeSize;
283
+ entityStatus: EntityStatus;
284
+ }
285
+ export const EntityStatusBadge: React.ForwardRefExoticComponent<{
286
+ size?: BadgeSize;
287
+ entityStatus: EntityStatus;
288
+ color?: string;
289
+ translate?: "no" | "yes";
290
+ hidden?: boolean;
291
+ style?: React.CSSProperties;
292
+ slot?: string;
293
+ title?: string;
294
+ key?: React.Key;
295
+ defaultChecked?: boolean;
296
+ defaultValue?: string | number | readonly string[];
297
+ suppressContentEditableWarning?: boolean;
298
+ suppressHydrationWarning?: boolean;
299
+ accessKey?: string;
300
+ className?: string;
301
+ contentEditable?: "inherit" | (boolean | "false" | "true");
302
+ contextMenu?: string;
303
+ dir?: string;
304
+ draggable?: boolean | "false" | "true";
305
+ id?: string;
306
+ lang?: string;
307
+ placeholder?: string;
308
+ spellCheck?: boolean | "false" | "true";
309
+ tabIndex?: number;
310
+ radioGroup?: string;
311
+ role?: string;
312
+ about?: string;
313
+ datatype?: string;
314
+ inlist?: any;
315
+ prefix?: string;
316
+ property?: string;
317
+ resource?: string;
318
+ typeof?: string;
319
+ vocab?: string;
320
+ autoCapitalize?: string;
321
+ autoCorrect?: string;
322
+ autoSave?: string;
323
+ itemProp?: string;
324
+ itemScope?: boolean;
325
+ itemType?: string;
326
+ itemID?: string;
327
+ itemRef?: string;
328
+ results?: number;
329
+ security?: string;
330
+ unselectable?: "on" | "off";
331
+ inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search";
332
+ is?: string;
333
+ 'aria-activedescendant'?: string;
334
+ 'aria-atomic'?: boolean | "false" | "true";
335
+ 'aria-autocomplete'?: "none" | "both" | "inline" | "list";
336
+ 'aria-busy'?: boolean | "false" | "true";
337
+ 'aria-checked'?: boolean | "mixed" | "false" | "true";
338
+ 'aria-colcount'?: number;
339
+ 'aria-colindex'?: number;
340
+ 'aria-colspan'?: number;
341
+ 'aria-controls'?: string;
342
+ 'aria-current'?: boolean | "page" | "false" | "true" | "time" | "step" | "location" | "date";
343
+ 'aria-describedby'?: string;
344
+ 'aria-details'?: string;
345
+ 'aria-disabled'?: boolean | "false" | "true";
346
+ 'aria-dropeffect'?: "none" | "copy" | "move" | "link" | "execute" | "popup";
347
+ 'aria-errormessage'?: string;
348
+ 'aria-expanded'?: boolean | "false" | "true";
349
+ 'aria-flowto'?: string;
350
+ 'aria-grabbed'?: boolean | "false" | "true";
351
+ 'aria-haspopup'?: boolean | "grid" | "listbox" | "menu" | "false" | "true" | "dialog" | "tree";
352
+ 'aria-hidden'?: boolean | "false" | "true";
353
+ 'aria-invalid'?: boolean | "false" | "true" | "grammar" | "spelling";
354
+ 'aria-keyshortcuts'?: string;
355
+ 'aria-label'?: string;
356
+ 'aria-labelledby'?: string;
357
+ 'aria-level'?: number;
358
+ 'aria-live'?: "off" | "assertive" | "polite";
359
+ 'aria-modal'?: boolean | "false" | "true";
360
+ 'aria-multiline'?: boolean | "false" | "true";
361
+ 'aria-multiselectable'?: boolean | "false" | "true";
362
+ 'aria-orientation'?: "horizontal" | "vertical";
363
+ 'aria-owns'?: string;
364
+ 'aria-placeholder'?: string;
365
+ 'aria-posinset'?: number;
366
+ 'aria-pressed'?: boolean | "mixed" | "false" | "true";
367
+ 'aria-readonly'?: boolean | "false" | "true";
368
+ 'aria-relevant'?: "all" | "text" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals";
369
+ 'aria-required'?: boolean | "false" | "true";
370
+ 'aria-roledescription'?: string;
371
+ 'aria-rowcount'?: number;
372
+ 'aria-rowindex'?: number;
373
+ 'aria-rowspan'?: number;
374
+ 'aria-selected'?: boolean | "false" | "true";
375
+ 'aria-setsize'?: number;
376
+ 'aria-sort'?: "none" | "ascending" | "descending" | "other";
377
+ 'aria-valuemax'?: number;
378
+ 'aria-valuemin'?: number;
379
+ 'aria-valuenow'?: number;
380
+ 'aria-valuetext'?: string;
381
+ dangerouslySetInnerHTML?: {
382
+ __html: string;
383
+ };
384
+ onCopy?: React.ClipboardEventHandler<HTMLDivElement>;
385
+ onCopyCapture?: React.ClipboardEventHandler<HTMLDivElement>;
386
+ onCut?: React.ClipboardEventHandler<HTMLDivElement>;
387
+ onCutCapture?: React.ClipboardEventHandler<HTMLDivElement>;
388
+ onPaste?: React.ClipboardEventHandler<HTMLDivElement>;
389
+ onPasteCapture?: React.ClipboardEventHandler<HTMLDivElement>;
390
+ onCompositionEnd?: React.CompositionEventHandler<HTMLDivElement>;
391
+ onCompositionEndCapture?: React.CompositionEventHandler<HTMLDivElement>;
392
+ onCompositionStart?: React.CompositionEventHandler<HTMLDivElement>;
393
+ onCompositionStartCapture?: React.CompositionEventHandler<HTMLDivElement>;
394
+ onCompositionUpdate?: React.CompositionEventHandler<HTMLDivElement>;
395
+ onCompositionUpdateCapture?: React.CompositionEventHandler<HTMLDivElement>;
396
+ onFocus?: React.FocusEventHandler<HTMLDivElement>;
397
+ onFocusCapture?: React.FocusEventHandler<HTMLDivElement>;
398
+ onBlur?: React.FocusEventHandler<HTMLDivElement>;
399
+ onBlurCapture?: React.FocusEventHandler<HTMLDivElement>;
400
+ onChange?: React.FormEventHandler<HTMLDivElement>;
401
+ onChangeCapture?: React.FormEventHandler<HTMLDivElement>;
402
+ onBeforeInput?: React.FormEventHandler<HTMLDivElement>;
403
+ onBeforeInputCapture?: React.FormEventHandler<HTMLDivElement>;
404
+ onInput?: React.FormEventHandler<HTMLDivElement>;
405
+ onInputCapture?: React.FormEventHandler<HTMLDivElement>;
406
+ onReset?: React.FormEventHandler<HTMLDivElement>;
407
+ onResetCapture?: React.FormEventHandler<HTMLDivElement>;
408
+ onSubmit?: React.FormEventHandler<HTMLDivElement>;
409
+ onSubmitCapture?: React.FormEventHandler<HTMLDivElement>;
410
+ onInvalid?: React.FormEventHandler<HTMLDivElement>;
411
+ onInvalidCapture?: React.FormEventHandler<HTMLDivElement>;
412
+ onLoad?: React.ReactEventHandler<HTMLDivElement>;
413
+ onLoadCapture?: React.ReactEventHandler<HTMLDivElement>;
414
+ onError?: React.ReactEventHandler<HTMLDivElement>;
415
+ onErrorCapture?: React.ReactEventHandler<HTMLDivElement>;
416
+ onKeyDown?: React.KeyboardEventHandler<HTMLDivElement>;
417
+ onKeyDownCapture?: React.KeyboardEventHandler<HTMLDivElement>;
418
+ onKeyPress?: React.KeyboardEventHandler<HTMLDivElement>;
419
+ onKeyPressCapture?: React.KeyboardEventHandler<HTMLDivElement>;
420
+ onKeyUp?: React.KeyboardEventHandler<HTMLDivElement>;
421
+ onKeyUpCapture?: React.KeyboardEventHandler<HTMLDivElement>;
422
+ onAbort?: React.ReactEventHandler<HTMLDivElement>;
423
+ onAbortCapture?: React.ReactEventHandler<HTMLDivElement>;
424
+ onCanPlay?: React.ReactEventHandler<HTMLDivElement>;
425
+ onCanPlayCapture?: React.ReactEventHandler<HTMLDivElement>;
426
+ onCanPlayThrough?: React.ReactEventHandler<HTMLDivElement>;
427
+ onCanPlayThroughCapture?: React.ReactEventHandler<HTMLDivElement>;
428
+ onDurationChange?: React.ReactEventHandler<HTMLDivElement>;
429
+ onDurationChangeCapture?: React.ReactEventHandler<HTMLDivElement>;
430
+ onEmptied?: React.ReactEventHandler<HTMLDivElement>;
431
+ onEmptiedCapture?: React.ReactEventHandler<HTMLDivElement>;
432
+ onEncrypted?: React.ReactEventHandler<HTMLDivElement>;
433
+ onEncryptedCapture?: React.ReactEventHandler<HTMLDivElement>;
434
+ onEnded?: React.ReactEventHandler<HTMLDivElement>;
435
+ onEndedCapture?: React.ReactEventHandler<HTMLDivElement>;
436
+ onLoadedData?: React.ReactEventHandler<HTMLDivElement>;
437
+ onLoadedDataCapture?: React.ReactEventHandler<HTMLDivElement>;
438
+ onLoadedMetadata?: React.ReactEventHandler<HTMLDivElement>;
439
+ onLoadedMetadataCapture?: React.ReactEventHandler<HTMLDivElement>;
440
+ onLoadStart?: React.ReactEventHandler<HTMLDivElement>;
441
+ onLoadStartCapture?: React.ReactEventHandler<HTMLDivElement>;
442
+ onPause?: React.ReactEventHandler<HTMLDivElement>;
443
+ onPauseCapture?: React.ReactEventHandler<HTMLDivElement>;
444
+ onPlay?: React.ReactEventHandler<HTMLDivElement>;
445
+ onPlayCapture?: React.ReactEventHandler<HTMLDivElement>;
446
+ onPlaying?: React.ReactEventHandler<HTMLDivElement>;
447
+ onPlayingCapture?: React.ReactEventHandler<HTMLDivElement>;
448
+ onProgress?: React.ReactEventHandler<HTMLDivElement>;
449
+ onProgressCapture?: React.ReactEventHandler<HTMLDivElement>;
450
+ onRateChange?: React.ReactEventHandler<HTMLDivElement>;
451
+ onRateChangeCapture?: React.ReactEventHandler<HTMLDivElement>;
452
+ onSeeked?: React.ReactEventHandler<HTMLDivElement>;
453
+ onSeekedCapture?: React.ReactEventHandler<HTMLDivElement>;
454
+ onSeeking?: React.ReactEventHandler<HTMLDivElement>;
455
+ onSeekingCapture?: React.ReactEventHandler<HTMLDivElement>;
456
+ onStalled?: React.ReactEventHandler<HTMLDivElement>;
457
+ onStalledCapture?: React.ReactEventHandler<HTMLDivElement>;
458
+ onSuspend?: React.ReactEventHandler<HTMLDivElement>;
459
+ onSuspendCapture?: React.ReactEventHandler<HTMLDivElement>;
460
+ onTimeUpdate?: React.ReactEventHandler<HTMLDivElement>;
461
+ onTimeUpdateCapture?: React.ReactEventHandler<HTMLDivElement>;
462
+ onVolumeChange?: React.ReactEventHandler<HTMLDivElement>;
463
+ onVolumeChangeCapture?: React.ReactEventHandler<HTMLDivElement>;
464
+ onWaiting?: React.ReactEventHandler<HTMLDivElement>;
465
+ onWaitingCapture?: React.ReactEventHandler<HTMLDivElement>;
466
+ onAuxClick?: React.MouseEventHandler<HTMLDivElement>;
467
+ onAuxClickCapture?: React.MouseEventHandler<HTMLDivElement>;
468
+ onClick?: React.MouseEventHandler<HTMLDivElement>;
469
+ onClickCapture?: React.MouseEventHandler<HTMLDivElement>;
470
+ onContextMenu?: React.MouseEventHandler<HTMLDivElement>;
471
+ onContextMenuCapture?: React.MouseEventHandler<HTMLDivElement>;
472
+ onDoubleClick?: React.MouseEventHandler<HTMLDivElement>;
473
+ onDoubleClickCapture?: React.MouseEventHandler<HTMLDivElement>;
474
+ onDrag?: React.DragEventHandler<HTMLDivElement>;
475
+ onDragCapture?: React.DragEventHandler<HTMLDivElement>;
476
+ onDragEnd?: React.DragEventHandler<HTMLDivElement>;
477
+ onDragEndCapture?: React.DragEventHandler<HTMLDivElement>;
478
+ onDragEnter?: React.DragEventHandler<HTMLDivElement>;
479
+ onDragEnterCapture?: React.DragEventHandler<HTMLDivElement>;
480
+ onDragExit?: React.DragEventHandler<HTMLDivElement>;
481
+ onDragExitCapture?: React.DragEventHandler<HTMLDivElement>;
482
+ onDragLeave?: React.DragEventHandler<HTMLDivElement>;
483
+ onDragLeaveCapture?: React.DragEventHandler<HTMLDivElement>;
484
+ onDragOver?: React.DragEventHandler<HTMLDivElement>;
485
+ onDragOverCapture?: React.DragEventHandler<HTMLDivElement>;
486
+ onDragStart?: React.DragEventHandler<HTMLDivElement>;
487
+ onDragStartCapture?: React.DragEventHandler<HTMLDivElement>;
488
+ onDrop?: React.DragEventHandler<HTMLDivElement>;
489
+ onDropCapture?: React.DragEventHandler<HTMLDivElement>;
490
+ onMouseDown?: React.MouseEventHandler<HTMLDivElement>;
491
+ onMouseDownCapture?: React.MouseEventHandler<HTMLDivElement>;
492
+ onMouseEnter?: React.MouseEventHandler<HTMLDivElement>;
493
+ onMouseLeave?: React.MouseEventHandler<HTMLDivElement>;
494
+ onMouseMove?: React.MouseEventHandler<HTMLDivElement>;
495
+ onMouseMoveCapture?: React.MouseEventHandler<HTMLDivElement>;
496
+ onMouseOut?: React.MouseEventHandler<HTMLDivElement>;
497
+ onMouseOutCapture?: React.MouseEventHandler<HTMLDivElement>;
498
+ onMouseOver?: React.MouseEventHandler<HTMLDivElement>;
499
+ onMouseOverCapture?: React.MouseEventHandler<HTMLDivElement>;
500
+ onMouseUp?: React.MouseEventHandler<HTMLDivElement>;
501
+ onMouseUpCapture?: React.MouseEventHandler<HTMLDivElement>;
502
+ onSelect?: React.ReactEventHandler<HTMLDivElement>;
503
+ onSelectCapture?: React.ReactEventHandler<HTMLDivElement>;
504
+ onTouchCancel?: React.TouchEventHandler<HTMLDivElement>;
505
+ onTouchCancelCapture?: React.TouchEventHandler<HTMLDivElement>;
506
+ onTouchEnd?: React.TouchEventHandler<HTMLDivElement>;
507
+ onTouchEndCapture?: React.TouchEventHandler<HTMLDivElement>;
508
+ onTouchMove?: React.TouchEventHandler<HTMLDivElement>;
509
+ onTouchMoveCapture?: React.TouchEventHandler<HTMLDivElement>;
510
+ onTouchStart?: React.TouchEventHandler<HTMLDivElement>;
511
+ onTouchStartCapture?: React.TouchEventHandler<HTMLDivElement>;
512
+ onPointerDown?: React.PointerEventHandler<HTMLDivElement>;
513
+ onPointerDownCapture?: React.PointerEventHandler<HTMLDivElement>;
514
+ onPointerMove?: React.PointerEventHandler<HTMLDivElement>;
515
+ onPointerMoveCapture?: React.PointerEventHandler<HTMLDivElement>;
516
+ onPointerUp?: React.PointerEventHandler<HTMLDivElement>;
517
+ onPointerUpCapture?: React.PointerEventHandler<HTMLDivElement>;
518
+ onPointerCancel?: React.PointerEventHandler<HTMLDivElement>;
519
+ onPointerCancelCapture?: React.PointerEventHandler<HTMLDivElement>;
520
+ onPointerEnter?: React.PointerEventHandler<HTMLDivElement>;
521
+ onPointerEnterCapture?: React.PointerEventHandler<HTMLDivElement>;
522
+ onPointerLeave?: React.PointerEventHandler<HTMLDivElement>;
523
+ onPointerLeaveCapture?: React.PointerEventHandler<HTMLDivElement>;
524
+ onPointerOver?: React.PointerEventHandler<HTMLDivElement>;
525
+ onPointerOverCapture?: React.PointerEventHandler<HTMLDivElement>;
526
+ onPointerOut?: React.PointerEventHandler<HTMLDivElement>;
527
+ onPointerOutCapture?: React.PointerEventHandler<HTMLDivElement>;
528
+ onGotPointerCapture?: React.PointerEventHandler<HTMLDivElement>;
529
+ onGotPointerCaptureCapture?: React.PointerEventHandler<HTMLDivElement>;
530
+ onLostPointerCapture?: React.PointerEventHandler<HTMLDivElement>;
531
+ onLostPointerCaptureCapture?: React.PointerEventHandler<HTMLDivElement>;
532
+ onScroll?: React.UIEventHandler<HTMLDivElement>;
533
+ onScrollCapture?: React.UIEventHandler<HTMLDivElement>;
534
+ onWheel?: React.WheelEventHandler<HTMLDivElement>;
535
+ onWheelCapture?: React.WheelEventHandler<HTMLDivElement>;
536
+ onAnimationStart?: React.AnimationEventHandler<HTMLDivElement>;
537
+ onAnimationStartCapture?: React.AnimationEventHandler<HTMLDivElement>;
538
+ onAnimationEnd?: React.AnimationEventHandler<HTMLDivElement>;
539
+ onAnimationEndCapture?: React.AnimationEventHandler<HTMLDivElement>;
540
+ onAnimationIteration?: React.AnimationEventHandler<HTMLDivElement>;
541
+ onAnimationIterationCapture?: React.AnimationEventHandler<HTMLDivElement>;
542
+ onTransitionEnd?: React.TransitionEventHandler<HTMLDivElement>;
543
+ onTransitionEndCapture?: React.TransitionEventHandler<HTMLDivElement>;
544
+ testId?: string;
545
+ } & React.RefAttributes<HTMLDivElement>>;
546
+
547
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"mappings":";;AAAA,iBA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wCAmBR,CAAC","sources":["packages/components/badge/src/src/types.ts","packages/components/badge/src/src/Badge/Badge.styles.ts","packages/components/badge/src/src/Badge/Badge.tsx","packages/components/badge/src/src/EntityStatusBadge/EntityStatusBadge.tsx","packages/components/badge/src/src/index.ts","packages/components/badge/src/index.ts"],"sourcesContent":[null,null,null,null,null,"export { Badge } from './Badge/Badge';\nexport type { BadgeProps } from './Badge/Badge';\nexport { EntityStatusBadge } from './EntityStatusBadge/EntityStatusBadge';\nexport type { EntityStatusBadgeProps } from './EntityStatusBadge/EntityStatusBadge';\nexport type { BadgeVariant } from './types';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
package/package.json ADDED
@@ -0,0 +1,38 @@
1
+ {
2
+ "name": "@contentful/f36-badge",
3
+ "version": "4.0.0",
4
+ "description": "Forma 36: Badge React Component",
5
+ "license": "MIT",
6
+ "files": [
7
+ "dist"
8
+ ],
9
+ "main": "dist/main.js",
10
+ "module": "dist/module.js",
11
+ "types": "dist/types.d.ts",
12
+ "source": "src/index.ts",
13
+ "sideEffects": false,
14
+ "browserslist": "extends @contentful/browserslist-config",
15
+ "repository": {
16
+ "type": "git",
17
+ "url": "https://github.com/contentful/forma-36"
18
+ },
19
+ "scripts": {
20
+ "build": "parcel build"
21
+ },
22
+ "dependencies": {
23
+ "@babel/runtime": "^7.6.2",
24
+ "@contentful/f36-core": "^4.0.0",
25
+ "@contentful/f36-tokens": "^4.0.0",
26
+ "emotion": "^10.0.17"
27
+ },
28
+ "devDependencies": {
29
+ "@contentful/f36-typography": "^4.0.0"
30
+ },
31
+ "peerDependencies": {
32
+ "react": ">=16.8"
33
+ },
34
+ "publishConfig": {
35
+ "access": "public"
36
+ },
37
+ "gitHead": "01d931c77410619d05cd00dbb3b5acc5d8ae2cdf"
38
+ }