@kaizen/components 0.0.0-canary-less-gung-ho-20240308011930 → 0.0.0-canary-brand-2-20240318014153

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.
Files changed (95) hide show
  1. package/dist/cjs/Brand/Brand.cjs +23 -22
  2. package/dist/cjs/Brand/Brand.cjs.map +1 -1
  3. package/dist/cjs/Icon/ThumbsDownIcon.cjs +2 -1
  4. package/dist/cjs/Icon/ThumbsDownIcon.cjs.map +1 -1
  5. package/dist/cjs/Icon/ThumbsDownOffIcon.cjs +17 -0
  6. package/dist/cjs/Icon/ThumbsDownOffIcon.cjs.map +1 -0
  7. package/dist/cjs/Icon/ThumbsDownOnIcon.cjs +17 -0
  8. package/dist/cjs/Icon/ThumbsDownOnIcon.cjs.map +1 -0
  9. package/dist/cjs/Icon/ThumbsUpIcon.cjs +2 -1
  10. package/dist/cjs/Icon/ThumbsUpIcon.cjs.map +1 -1
  11. package/dist/cjs/Icon/ThumbsUpOffIcon.cjs +17 -0
  12. package/dist/cjs/Icon/ThumbsUpOffIcon.cjs.map +1 -0
  13. package/dist/cjs/Icon/ThumbsUpOnIcon.cjs +17 -0
  14. package/dist/cjs/Icon/ThumbsUpOnIcon.cjs.map +1 -0
  15. package/dist/cjs/KaizenProvider/KaizenProvider.cjs +26 -17
  16. package/dist/cjs/KaizenProvider/KaizenProvider.cjs.map +1 -1
  17. package/dist/cjs/KaizenProvider/subcomponents/OptionalIntlProvider/OptionalIntlProvider.cjs +20 -0
  18. package/dist/cjs/KaizenProvider/subcomponents/OptionalIntlProvider/OptionalIntlProvider.cjs.map +1 -0
  19. package/dist/cjs/Notification/ToastNotification/context/ToastNotificationContext.cjs +59 -2
  20. package/dist/cjs/Notification/ToastNotification/context/ToastNotificationContext.cjs.map +1 -1
  21. package/dist/cjs/Tag/Tag.cjs +123 -3
  22. package/dist/cjs/Tag/Tag.cjs.map +1 -1
  23. package/dist/cjs/Tag/Tag.module.scss.cjs +38 -0
  24. package/dist/cjs/Tag/Tag.module.scss.cjs.map +1 -0
  25. package/dist/cjs/dts/Icon/ThumbsDownIcon.d.ts +1 -0
  26. package/dist/cjs/dts/Icon/ThumbsDownOffIcon.d.ts +3 -0
  27. package/dist/cjs/dts/Icon/ThumbsDownOnIcon.d.ts +3 -0
  28. package/dist/cjs/dts/Icon/ThumbsUpIcon.d.ts +1 -0
  29. package/dist/cjs/dts/Icon/ThumbsUpOffIcon.d.ts +3 -0
  30. package/dist/cjs/dts/Icon/ThumbsUpOnIcon.d.ts +3 -0
  31. package/dist/cjs/dts/Icon/index.d.ts +4 -0
  32. package/dist/cjs/dts/Tag/Tag.d.ts +4 -0
  33. package/dist/cjs/dts/index.d.ts +1 -0
  34. package/dist/cjs/dts/utils/index.d.ts +1 -0
  35. package/dist/cjs/index.cjs +11 -0
  36. package/dist/cjs/index.cjs.map +1 -1
  37. package/dist/cjs/index.css +53 -53
  38. package/dist/esm/Brand/Brand.mjs +24 -23
  39. package/dist/esm/Brand/Brand.mjs.map +1 -1
  40. package/dist/esm/Icon/ThumbsDownIcon.mjs +2 -1
  41. package/dist/esm/Icon/ThumbsDownIcon.mjs.map +1 -1
  42. package/dist/esm/Icon/ThumbsDownOffIcon.mjs +15 -0
  43. package/dist/esm/Icon/ThumbsDownOffIcon.mjs.map +1 -0
  44. package/dist/esm/Icon/ThumbsDownOnIcon.mjs +15 -0
  45. package/dist/esm/Icon/ThumbsDownOnIcon.mjs.map +1 -0
  46. package/dist/esm/Icon/ThumbsUpIcon.mjs +2 -1
  47. package/dist/esm/Icon/ThumbsUpIcon.mjs.map +1 -1
  48. package/dist/esm/Icon/ThumbsUpOffIcon.mjs +15 -0
  49. package/dist/esm/Icon/ThumbsUpOffIcon.mjs.map +1 -0
  50. package/dist/esm/Icon/ThumbsUpOnIcon.mjs +15 -0
  51. package/dist/esm/Icon/ThumbsUpOnIcon.mjs.map +1 -0
  52. package/dist/esm/KaizenProvider/KaizenProvider.mjs +27 -19
  53. package/dist/esm/KaizenProvider/KaizenProvider.mjs.map +1 -1
  54. package/dist/esm/KaizenProvider/subcomponents/OptionalIntlProvider/OptionalIntlProvider.mjs +18 -0
  55. package/dist/esm/KaizenProvider/subcomponents/OptionalIntlProvider/OptionalIntlProvider.mjs.map +1 -0
  56. package/dist/esm/Notification/ToastNotification/context/ToastNotificationContext.mjs +60 -4
  57. package/dist/esm/Notification/ToastNotification/context/ToastNotificationContext.mjs.map +1 -1
  58. package/dist/esm/Tag/Tag.mjs +123 -3
  59. package/dist/esm/Tag/Tag.mjs.map +1 -1
  60. package/dist/esm/Tag/Tag.module.scss.mjs +36 -0
  61. package/dist/esm/Tag/Tag.module.scss.mjs.map +1 -0
  62. package/dist/esm/dts/Icon/ThumbsDownIcon.d.ts +1 -0
  63. package/dist/esm/dts/Icon/ThumbsDownOffIcon.d.ts +3 -0
  64. package/dist/esm/dts/Icon/ThumbsDownOnIcon.d.ts +3 -0
  65. package/dist/esm/dts/Icon/ThumbsUpIcon.d.ts +1 -0
  66. package/dist/esm/dts/Icon/ThumbsUpOffIcon.d.ts +3 -0
  67. package/dist/esm/dts/Icon/ThumbsUpOnIcon.d.ts +3 -0
  68. package/dist/esm/dts/Icon/index.d.ts +4 -0
  69. package/dist/esm/dts/Tag/Tag.d.ts +4 -0
  70. package/dist/esm/dts/index.d.ts +1 -0
  71. package/dist/esm/dts/utils/index.d.ts +1 -0
  72. package/dist/esm/index.css +50 -50
  73. package/dist/esm/index.mjs +5 -0
  74. package/dist/esm/index.mjs.map +1 -1
  75. package/dist/index.d.ts +44 -4
  76. package/dist/styles.css +1 -1
  77. package/package.json +4 -3
  78. package/src/Brand/Brand.tsx +20 -17
  79. package/src/Icon/ThumbsDownIcon.tsx +2 -1
  80. package/src/Icon/ThumbsDownOffIcon.tsx +18 -0
  81. package/src/Icon/ThumbsDownOnIcon.tsx +18 -0
  82. package/src/Icon/ThumbsUpIcon.tsx +2 -1
  83. package/src/Icon/ThumbsUpOffIcon.tsx +18 -0
  84. package/src/Icon/ThumbsUpOnIcon.tsx +18 -0
  85. package/src/Icon/_docs/Icon.stories.tsx +31 -37
  86. package/src/Icon/_docs/icon.stories.scss +15 -8
  87. package/src/Icon/index.ts +4 -0
  88. package/src/KaizenProvider/KaizenProvider.tsx +22 -22
  89. package/src/Tag/Tag.tsx +159 -3
  90. package/src/index.ts +1 -0
  91. package/src/utils/index.ts +2 -0
  92. package/dist/cjs/Brand/Brand.module.scss.cjs +0 -7
  93. package/dist/cjs/Brand/Brand.module.scss.cjs.map +0 -1
  94. package/dist/esm/Brand/Brand.module.scss.mjs +0 -5
  95. package/dist/esm/Brand/Brand.module.scss.mjs.map +0 -1
@@ -2,30 +2,31 @@
2
2
 
3
3
  var tslib = require('tslib');
4
4
  var React = require('react');
5
- var hostedAssets = require('@kaizen/hosted-assets');
6
- var Brand_module = require('./Brand.module.scss.cjs');
7
5
  const Brand = /*#__PURE__*/function () {
8
6
  const Brand = function (_a) {
9
- var variant = _a.variant,
10
- alt = _a.alt,
11
- _b = _a.reversed,
12
- reversed = _b === void 0 ? false : _b,
13
- classNameOverride = _a.classNameOverride,
14
- restProps = tslib.__rest(_a, ["variant", "alt", "reversed", "classNameOverride"]);
15
- var brandTheme = reversed ? "-reversed" : "-default";
16
- return React.createElement("picture", tslib.__assign({
17
- className: classNameOverride
18
- }, restProps), React.createElement("source", {
19
- srcSet: hostedAssets.assetUrl("brand/".concat(variant, "-reversed.svg")),
20
- media: "(forced-colors: active) and (prefers-color-scheme: dark)"
21
- }), React.createElement("source", {
22
- srcSet: hostedAssets.assetUrl("brand/".concat(variant, "-default.svg")),
23
- media: "(forced-colors: active) and (prefers-color-scheme: light)"
24
- }), React.createElement("img", {
25
- src: hostedAssets.assetUrl("brand/".concat(variant).concat(brandTheme, ".svg")),
26
- alt: alt,
27
- className: Brand_module.img
28
- }));
7
+ _a.variant;
8
+ _a.alt;
9
+ _a.reversed;
10
+ _a.classNameOverride;
11
+ tslib.__rest(_a, ["variant", "alt", "reversed", "classNameOverride"]);
12
+ return React.createElement("div", null, "BrandName");
13
+ // return (
14
+ // <picture className={classNameOverride} {...restProps}>
15
+ // <source
16
+ // srcSet={assetUrl(`brand/${variant}-reversed.svg`)}
17
+ // media="(forced-colors: active) and (prefers-color-scheme: dark)"
18
+ // />
19
+ // <source
20
+ // srcSet={assetUrl(`brand/${variant}-default.svg`)}
21
+ // media="(forced-colors: active) and (prefers-color-scheme: light)"
22
+ // />
23
+ // <img
24
+ // src={assetUrl(`brand/${variant}${brandTheme}.svg`)}
25
+ // alt={alt}
26
+ // className={styles.img}
27
+ // />
28
+ // </picture>
29
+ // )
29
30
  };
30
31
  Brand.displayName = "Brand";
31
32
  return Brand;
@@ -1 +1 @@
1
- {"version":3,"file":"Brand.cjs","sources":["../../../src/Brand/Brand.tsx"],"sourcesContent":["import React, { HTMLAttributes } from \"react\"\nimport { assetUrl } from \"@kaizen/hosted-assets\"\nimport { OverrideClassName } from \"~types/OverrideClassName\"\nimport styles from \"./Brand.module.scss\"\n\nexport type BrandProps = {\n variant:\n | \"logo-horizontal\"\n | \"logo-vertical\"\n | \"enso\"\n | \"collective-intelligence\"\n alt: string\n reversed?: boolean\n} & OverrideClassName<HTMLAttributes<HTMLElement>>\n\nexport const Brand = ({\n variant,\n alt,\n reversed = false,\n classNameOverride,\n ...restProps\n}: BrandProps): JSX.Element => {\n const brandTheme = reversed ? \"-reversed\" : \"-default\"\n\n return (\n <picture className={classNameOverride} {...restProps}>\n <source\n srcSet={assetUrl(`brand/${variant}-reversed.svg`)}\n media=\"(forced-colors: active) and (prefers-color-scheme: dark)\"\n />\n <source\n srcSet={assetUrl(`brand/${variant}-default.svg`)}\n media=\"(forced-colors: active) and (prefers-color-scheme: light)\"\n />\n <img\n src={assetUrl(`brand/${variant}${brandTheme}.svg`)}\n alt={alt}\n className={styles.img}\n />\n </picture>\n )\n}\n\nBrand.displayName = \"Brand\"\n"],"names":["Brand","_a","variant","alt","_b","reversed","classNameOverride","restProps","__rest","brandTheme","React","createElement","__assign","className","srcSet","assetUrl","concat","media","src","styles","img","displayName"],"mappings":";;;;;;MAeaA,KAAK;EAAA,MAALA,KAAK,GAAG,SAAAA,CAACC,EAMT,EAAA;IALX,IAAAC,OAAO,GAAAD,EAAA,CAAAC,OAAA;MACPC,GAAG,GAAAF,EAAA,CAAAE,GAAA;MACHC,gBAAgB;MAAhBC,QAAQ,mBAAG,KAAK,GAAAD,EAAA;MAChBE,iBAAiB,GAAAL,EAAA,CAAAK,iBAAA;MACdC,SAAS,GAAAC,KAAA,CAAAA,MAAA,CAAAP,EAAA,EALQ,mDAMrB,CADa;IAEZ,IAAMQ,UAAU,GAAGJ,QAAQ,GAAG,WAAW,GAAG,UAAU;IAEtD,OACEK,KAAS,CAAAC,aAAA,CAAA,SAAA,EAAAC,KAAAA,CAAAA,QAAA,CAAA;MAAAC,SAAS,EAAEP;OAAuBC,SAAS,CAAA,EAClDG,KAAA,CAAAC,aAAA,CAAA,QAAA,EAAA;MACEG,MAAM,EAAEC,YAAAA,CAAAA,QAAQ,CAAC,QAAS,CAAAC,MAAA,CAAAd,OAAO,EAAe,eAAA,CAAA,CAAC;MACjDe,KAAK,EAAC;IAA0D,CAChE,CAAA,EACFP,KAAA,CAAAC,aAAA,CAAA,QAAA,EAAA;MACEG,MAAM,EAAEC,YAAAA,CAAAA,QAAQ,CAAC,QAAS,CAAAC,MAAA,CAAAd,OAAO,EAAc,cAAA,CAAA,CAAC;MAChDe,KAAK,EAAC;IAA2D,CACjE,CAAA,EACFP,KACE,CAAAC,aAAA,CAAA,KAAA,EAAA;MAAAO,GAAG,EAAEH,YAAAA,CAAAA,QAAQ,CAAC,gBAASb,OAAO,CAAA,CAAAc,MAAA,CAAGP,UAAU,EAAA,MAAA,CAAM,CAAC;MAClDN,GAAG,EAAEA,GAAG;MACRU,SAAS,EAAEM,YAAM,CAACC;IAAG,CAAA,CACrB,CACM;EAEd,CAAC;EAEDpB,KAAK,CAACqB,WAAW,GAAG,OAAO;EAAA,OA5BdrB,KAAK;AAAA;"}
1
+ {"version":3,"file":"Brand.cjs","sources":["../../../src/Brand/Brand.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unused-vars */\nimport React, { HTMLAttributes } from \"react\"\nimport { assetUrl } from \"@kaizen/hosted-assets\"\nimport { OverrideClassName } from \"~types/OverrideClassName\"\nimport styles from \"./Brand.module.scss\"\n\nexport type BrandProps = {\n variant:\n | \"logo-horizontal\"\n | \"logo-vertical\"\n | \"enso\"\n | \"collective-intelligence\"\n alt: string\n reversed?: boolean\n} & OverrideClassName<HTMLAttributes<HTMLElement>>\n\nexport const Brand = ({\n variant,\n alt,\n reversed = false,\n classNameOverride,\n ...restProps\n}: BrandProps): JSX.Element => {\n const brandTheme = reversed ? \"-reversed\" : \"-default\"\n\n return <div>BrandName</div>\n\n // return (\n // <picture className={classNameOverride} {...restProps}>\n // <source\n // srcSet={assetUrl(`brand/${variant}-reversed.svg`)}\n // media=\"(forced-colors: active) and (prefers-color-scheme: dark)\"\n // />\n // <source\n // srcSet={assetUrl(`brand/${variant}-default.svg`)}\n // media=\"(forced-colors: active) and (prefers-color-scheme: light)\"\n // />\n // <img\n // src={assetUrl(`brand/${variant}${brandTheme}.svg`)}\n // alt={alt}\n // className={styles.img}\n // />\n // </picture>\n // )\n}\n\nBrand.displayName = \"Brand\"\n"],"names":["Brand","_a","variant","alt","classNameOverride","__rest","React","displayName"],"mappings":";;;;MAgBaA,KAAK;EAAA,MAALA,KAAK,GAAG,SAAAA,CAACC,EAMT,EAAA;IALJA,EAAA,CAAAC,OAAA;IACJD,EAAA,CAAAE,GAAA;eACa;IACCF,EAAA,CAAAG,iBAAA;IACLC,KAAA,CAAAA,MAAA,CAAAJ,EAAA,EALQ,mDAMrB,CADa;IAIZ,OAAOK,6CAAoB;;;;;;;;;;;;;;;;;;EAmB7B,CAAC;EAEDN,KAAK,CAACO,WAAW,GAAG,OAAO;EAAA,OA9BdP,KAAK;AAAA;"}
@@ -6,11 +6,12 @@ var SVG = require('./subcomponents/SVG/SVG.cjs');
6
6
 
7
7
  // This file is autogenerated by wrapSVGs.ts
8
8
  // Changes to this file will be overwritten
9
+ /** @deprecated Use `<ThumbsDownIconOn/>` or `<ThumbsDownIconOff/>` */
9
10
  var ThumbsDownIcon = function (props) {
10
11
  var uniqueId = React.useId();
11
12
  var svgContent = React.createElement(React.Fragment, null, React.createElement("defs", null, React.createElement("path", {
12
13
  id: uniqueId,
13
- d: "M5.91 3.183c-.566 0-1.05.341-1.254.832L2.597 8.821c-.061.156-.095.32-.095.497v1.364c0 .75.613 1.363 1.363 1.363h4.301L7.52 15.16l-.02.218c0 .28.115.539.3.723l.722.716 4.492-4.493c.245-.245.395-.586.395-.96V4.546c0-.75-.613-1.364-1.363-1.364zm8.862 8.18h2.726v-8.18h-2.726z"
14
+ d: "M5.91 3.183c-.566 0-1.05.341-1.254.832L2.597 8.821q-.093.233-.095.497v1.364c0 .75.613 1.363 1.363 1.363h4.301L7.52 15.16l-.02.218c0 .28.115.539.3.723l.722.716 4.492-4.493c.245-.245.395-.586.395-.96V4.546c0-.75-.613-1.364-1.363-1.364zm8.862 8.18h2.726v-8.18h-2.726z"
14
15
  })), React.createElement("use", {
15
16
  fill: "currentColor",
16
17
  href: "#".concat(uniqueId),
@@ -1 +1 @@
1
- {"version":3,"file":"ThumbsDownIcon.cjs","sources":["../../../src/Icon/ThumbsDownIcon.tsx"],"sourcesContent":["// This file is autogenerated by wrapSVGs.ts\n// Changes to this file will be overwritten\n\nimport React, { useId } from \"react\"\nimport { SVG } from \"~components/Icon/subcomponents/SVG\"\nimport type { IconProps } from \"~components/Icon/types\"\n\nexport const ThumbsDownIcon = (props: IconProps): JSX.Element => {\n const uniqueId = useId()\n const svgContent = (\n <>\n <defs>\n <path\n id={uniqueId}\n d=\"M5.91 3.183c-.566 0-1.05.341-1.254.832L2.597 8.821c-.061.156-.095.32-.095.497v1.364c0 .75.613 1.363 1.363 1.363h4.301L7.52 15.16l-.02.218c0 .28.115.539.3.723l.722.716 4.492-4.493c.245-.245.395-.586.395-.96V4.546c0-.75-.613-1.364-1.363-1.364zm8.862 8.18h2.726v-8.18h-2.726z\"\n />\n </defs>\n <use fill=\"currentColor\" href={`#${uniqueId}`} fillRule=\"evenodd\" />\n </>\n )\n return <SVG {...props}>{svgContent}</SVG>\n}\n"],"names":["ThumbsDownIcon","props","uniqueId","useId","svgContent","React","createElement","Fragment","id","d","fill","href","concat","fillRule","SVG","__assign"],"mappings":";;;;;;AAAA;AACA;AAMO,IAAMA,cAAc,GAAG,SAAAA,CAACC,KAAgB,EAAA;EAC7C,IAAMC,QAAQ,GAAGC,KAAAA,CAAAA,KAAK,EAAE;EACxB,IAAMC,UAAU,GACdC,KAAA,CAAAC,aAAA,CAAAD,KAAA,CAAAE,QAAA,EAAA,IAAA,EACEF,KAAA,CAAAC,aAAA,CAAA,MAAA,EAAA,IAAA,EACED,KACE,CAAAC,aAAA,CAAA,MAAA,EAAA;IAAAE,EAAE,EAAEN,QAAQ;IACZO,CAAC,EAAC;EAAkR,EACpR,CACG,EACPJ,KAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;IAAKI,IAAI,EAAC,cAAc;IAACC,IAAI,EAAE,GAAI,CAAAC,MAAA,CAAAV,QAAQ,CAAE;IAAEW,QAAQ,EAAC;EAAY,CAAA,CAAA,CAEvE;EACD,OAAOR,oBAACS,OAAG,EAAAC,KAAAA,CAAAA,QAAA,CAAA,CAAA,CAAA,EAAKd,KAAK,CAAG,EAAAG,UAAU,CAAO;AAC3C,CAAA;"}
1
+ {"version":3,"file":"ThumbsDownIcon.cjs","sources":["../../../src/Icon/ThumbsDownIcon.tsx"],"sourcesContent":["// This file is autogenerated by wrapSVGs.ts\n// Changes to this file will be overwritten\n\nimport React, { useId } from \"react\"\nimport { SVG } from \"~components/Icon/subcomponents/SVG\"\nimport type { IconProps } from \"~components/Icon/types\"\n\n/** @deprecated Use `<ThumbsDownIconOn/>` or `<ThumbsDownIconOff/>` */\nexport const ThumbsDownIcon = (props: IconProps): JSX.Element => {\n const uniqueId = useId()\n const svgContent = (\n <>\n <defs>\n <path\n id={uniqueId}\n d=\"M5.91 3.183c-.566 0-1.05.341-1.254.832L2.597 8.821q-.093.233-.095.497v1.364c0 .75.613 1.363 1.363 1.363h4.301L7.52 15.16l-.02.218c0 .28.115.539.3.723l.722.716 4.492-4.493c.245-.245.395-.586.395-.96V4.546c0-.75-.613-1.364-1.363-1.364zm8.862 8.18h2.726v-8.18h-2.726z\"\n />\n </defs>\n <use fill=\"currentColor\" href={`#${uniqueId}`} fillRule=\"evenodd\" />\n </>\n )\n return <SVG {...props}>{svgContent}</SVG>\n}\n"],"names":["ThumbsDownIcon","props","uniqueId","useId","svgContent","React","createElement","Fragment","id","d","fill","href","concat","fillRule","SVG","__assign"],"mappings":";;;;;;AAAA;AACA;AAMA;AACO,IAAMA,cAAc,GAAG,SAAAA,CAACC,KAAgB,EAAA;EAC7C,IAAMC,QAAQ,GAAGC,KAAAA,CAAAA,KAAK,EAAE;EACxB,IAAMC,UAAU,GACdC,KAAA,CAAAC,aAAA,CAAAD,KAAA,CAAAE,QAAA,EAAA,IAAA,EACEF,KAAA,CAAAC,aAAA,CAAA,MAAA,EAAA,IAAA,EACED,KACE,CAAAC,aAAA,CAAA,MAAA,EAAA;IAAAE,EAAE,EAAEN,QAAQ;IACZO,CAAC,EAAC;EAA0Q,EAC5Q,CACG,EACPJ,KAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;IAAKI,IAAI,EAAC,cAAc;IAACC,IAAI,EAAE,GAAI,CAAAC,MAAA,CAAAV,QAAQ,CAAE;IAAEW,QAAQ,EAAC;EAAY,CAAA,CAAA,CAEvE;EACD,OAAOR,oBAACS,OAAG,EAAAC,KAAAA,CAAAA,QAAA,CAAA,CAAA,CAAA,EAAKd,KAAK,CAAG,EAAAG,UAAU,CAAO;AAC3C,CAAA;"}
@@ -0,0 +1,17 @@
1
+ 'use strict';
2
+
3
+ var tslib = require('tslib');
4
+ var React = require('react');
5
+ var SVG = require('./subcomponents/SVG/SVG.cjs');
6
+
7
+ // This file is autogenerated by wrapSVGs.ts
8
+ // Changes to this file will be overwritten
9
+ var ThumbsDownOffIcon = function (props) {
10
+ var svgContent = React.createElement(React.Fragment, null, React.createElement("path", {
11
+ fill: "currentColor",
12
+ d: "M5.224 3.253h8.766v10L8.461 18.75l-.705-.705a1 1 0 0 1-.215-.344 1.1 1.1 0 0 1-.086-.403v-.211l.885-3.834H2.756q-.594 0-1.05-.456t-.456-1.05V10.4q0-.13.034-.28a3 3 0 0 1 .075-.281l2.388-5.635q.18-.4.6-.676a1.6 1.6 0 0 1 .877-.276m7.516 1.25H5.224a.4.4 0 0 0-.18.048.3.3 0 0 0-.14.16L2.5 10.337v1.41a.25.25 0 0 0 .072.185.25.25 0 0 0 .184.072H9.92L8.875 16.57l3.865-3.849zm1.25 8.75v-1.25h2.677v-7.5H13.99v-1.25h3.927v10z"
13
+ }));
14
+ return React.createElement(SVG.SVG, tslib.__assign({}, props), svgContent);
15
+ };
16
+ exports.ThumbsDownOffIcon = ThumbsDownOffIcon;
17
+ //# sourceMappingURL=ThumbsDownOffIcon.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ThumbsDownOffIcon.cjs","sources":["../../../src/Icon/ThumbsDownOffIcon.tsx"],"sourcesContent":["// This file is autogenerated by wrapSVGs.ts\n// Changes to this file will be overwritten\n\nimport React from \"react\"\nimport { SVG } from \"~components/Icon/subcomponents/SVG\"\nimport type { IconProps } from \"~components/Icon/types\"\n\nexport const ThumbsDownOffIcon = (props: IconProps): JSX.Element => {\n const svgContent = (\n <>\n <path\n fill=\"currentColor\"\n d=\"M5.224 3.253h8.766v10L8.461 18.75l-.705-.705a1 1 0 0 1-.215-.344 1.1 1.1 0 0 1-.086-.403v-.211l.885-3.834H2.756q-.594 0-1.05-.456t-.456-1.05V10.4q0-.13.034-.28a3 3 0 0 1 .075-.281l2.388-5.635q.18-.4.6-.676a1.6 1.6 0 0 1 .877-.276m7.516 1.25H5.224a.4.4 0 0 0-.18.048.3.3 0 0 0-.14.16L2.5 10.337v1.41a.25.25 0 0 0 .072.185.25.25 0 0 0 .184.072H9.92L8.875 16.57l3.865-3.849zm1.25 8.75v-1.25h2.677v-7.5H13.99v-1.25h3.927v10z\"\n />\n </>\n )\n return <SVG {...props}>{svgContent}</SVG>\n}\n"],"names":["ThumbsDownOffIcon","props","svgContent","React","createElement","Fragment","fill","d","SVG","__assign"],"mappings":";;;;;;AAAA;AACA;AAMO,IAAMA,iBAAiB,GAAG,SAAAA,CAACC,KAAgB,EAAA;EAChD,IAAMC,UAAU,GACdC,KAAA,CAAAC,aAAA,CAAAD,KAAA,CAAAE,QAAA,EAAA,IAAA,EACEF,KACE,CAAAC,aAAA,CAAA,MAAA,EAAA;IAAAE,IAAI,EAAC,cAAc;IACnBC,CAAC,EAAC;GAAsa,CACxa,CAEL;EACD,OAAOJ,oBAACK,OAAG,EAAAC,KAAAA,CAAAA,QAAA,CAAA,CAAA,CAAA,EAAKR,KAAK,CAAG,EAAAC,UAAU,CAAO;AAC3C,CAAA;"}
@@ -0,0 +1,17 @@
1
+ 'use strict';
2
+
3
+ var tslib = require('tslib');
4
+ var React = require('react');
5
+ var SVG = require('./subcomponents/SVG/SVG.cjs');
6
+
7
+ // This file is autogenerated by wrapSVGs.ts
8
+ // Changes to this file will be overwritten
9
+ var ThumbsDownOnIcon = function (props) {
10
+ var svgContent = React.createElement(React.Fragment, null, React.createElement("path", {
11
+ fill: "currentColor",
12
+ d: "M5.224 3.253h8.253v10L7.95 18.75l-.705-.705a1 1 0 0 1-.216-.344 1.1 1.1 0 0 1-.086-.403v-.211l.885-3.834h-5.07q-.595 0-1.051-.456t-.456-1.05V10.4a1.6 1.6 0 0 1 .109-.561l2.388-5.635q.18-.4.6-.676a1.6 1.6 0 0 1 .877-.276m9.503 10v-10h3.19v10z"
13
+ }));
14
+ return React.createElement(SVG.SVG, tslib.__assign({}, props), svgContent);
15
+ };
16
+ exports.ThumbsDownOnIcon = ThumbsDownOnIcon;
17
+ //# sourceMappingURL=ThumbsDownOnIcon.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ThumbsDownOnIcon.cjs","sources":["../../../src/Icon/ThumbsDownOnIcon.tsx"],"sourcesContent":["// This file is autogenerated by wrapSVGs.ts\n// Changes to this file will be overwritten\n\nimport React from \"react\"\nimport { SVG } from \"~components/Icon/subcomponents/SVG\"\nimport type { IconProps } from \"~components/Icon/types\"\n\nexport const ThumbsDownOnIcon = (props: IconProps): JSX.Element => {\n const svgContent = (\n <>\n <path\n fill=\"currentColor\"\n d=\"M5.224 3.253h8.253v10L7.95 18.75l-.705-.705a1 1 0 0 1-.216-.344 1.1 1.1 0 0 1-.086-.403v-.211l.885-3.834h-5.07q-.595 0-1.051-.456t-.456-1.05V10.4a1.6 1.6 0 0 1 .109-.561l2.388-5.635q.18-.4.6-.676a1.6 1.6 0 0 1 .877-.276m9.503 10v-10h3.19v10z\"\n />\n </>\n )\n return <SVG {...props}>{svgContent}</SVG>\n}\n"],"names":["ThumbsDownOnIcon","props","svgContent","React","createElement","Fragment","fill","d","SVG","__assign"],"mappings":";;;;;;AAAA;AACA;AAMO,IAAMA,gBAAgB,GAAG,SAAAA,CAACC,KAAgB,EAAA;EAC/C,IAAMC,UAAU,GACdC,KAAA,CAAAC,aAAA,CAAAD,KAAA,CAAAE,QAAA,EAAA,IAAA,EACEF,KACE,CAAAC,aAAA,CAAA,MAAA,EAAA;IAAAE,IAAI,EAAC,cAAc;IACnBC,CAAC,EAAC;GAAmP,CACrP,CAEL;EACD,OAAOJ,oBAACK,OAAG,EAAAC,KAAAA,CAAAA,QAAA,CAAA,CAAA,CAAA,EAAKR,KAAK,CAAG,EAAAC,UAAU,CAAO;AAC3C,CAAA;"}
@@ -6,11 +6,12 @@ var SVG = require('./subcomponents/SVG/SVG.cjs');
6
6
 
7
7
  // This file is autogenerated by wrapSVGs.ts
8
8
  // Changes to this file will be overwritten
9
+ /** @deprecated Use `<ThumbsUpIconOn/>` or `<ThumbsUpIconOff/>` */
9
10
  var ThumbsUpIcon = function (props) {
10
11
  var uniqueId = React.useId();
11
12
  var svgContent = React.createElement(React.Fragment, null, React.createElement("defs", null, React.createElement("path", {
12
13
  id: uniqueId,
13
- d: "M5.228 16.817v-8.18H2.502v8.18zm10.907-8.862h-4.301l.647-3.115.02-.218c0-.28-.115-.539-.3-.723l-.722-.716-4.485 4.493a1.333 1.333 0 0 0-.402.96v6.817c0 .75.613 1.364 1.363 1.364h6.135c.566 0 1.05-.341 1.254-.832l2.059-4.806c.061-.156.095-.32.095-.497V9.318c0-.75-.613-1.363-1.363-1.363"
14
+ d: "M5.228 16.817v-8.18H2.502v8.18zm10.907-8.862h-4.301l.647-3.115.02-.218c0-.28-.115-.539-.3-.723l-.722-.716-4.485 4.493a1.33 1.33 0 0 0-.402.96v6.817c0 .75.613 1.364 1.363 1.364h6.135c.566 0 1.05-.341 1.254-.832l2.059-4.806q.093-.233.095-.497V9.318c0-.75-.613-1.363-1.363-1.363"
14
15
  })), React.createElement("use", {
15
16
  fill: "currentColor",
16
17
  href: "#".concat(uniqueId),
@@ -1 +1 @@
1
- {"version":3,"file":"ThumbsUpIcon.cjs","sources":["../../../src/Icon/ThumbsUpIcon.tsx"],"sourcesContent":["// This file is autogenerated by wrapSVGs.ts\n// Changes to this file will be overwritten\n\nimport React, { useId } from \"react\"\nimport { SVG } from \"~components/Icon/subcomponents/SVG\"\nimport type { IconProps } from \"~components/Icon/types\"\n\nexport const ThumbsUpIcon = (props: IconProps): JSX.Element => {\n const uniqueId = useId()\n const svgContent = (\n <>\n <defs>\n <path\n id={uniqueId}\n d=\"M5.228 16.817v-8.18H2.502v8.18zm10.907-8.862h-4.301l.647-3.115.02-.218c0-.28-.115-.539-.3-.723l-.722-.716-4.485 4.493a1.333 1.333 0 0 0-.402.96v6.817c0 .75.613 1.364 1.363 1.364h6.135c.566 0 1.05-.341 1.254-.832l2.059-4.806c.061-.156.095-.32.095-.497V9.318c0-.75-.613-1.363-1.363-1.363\"\n />\n </defs>\n <use fill=\"currentColor\" href={`#${uniqueId}`} fillRule=\"evenodd\" />\n </>\n )\n return <SVG {...props}>{svgContent}</SVG>\n}\n"],"names":["ThumbsUpIcon","props","uniqueId","useId","svgContent","React","createElement","Fragment","id","d","fill","href","concat","fillRule","SVG","__assign"],"mappings":";;;;;;AAAA;AACA;AAMO,IAAMA,YAAY,GAAG,SAAAA,CAACC,KAAgB,EAAA;EAC3C,IAAMC,QAAQ,GAAGC,KAAAA,CAAAA,KAAK,EAAE;EACxB,IAAMC,UAAU,GACdC,KAAA,CAAAC,aAAA,CAAAD,KAAA,CAAAE,QAAA,EAAA,IAAA,EACEF,KAAA,CAAAC,aAAA,CAAA,MAAA,EAAA,IAAA,EACED,KACE,CAAAC,aAAA,CAAA,MAAA,EAAA;IAAAE,EAAE,EAAEN,QAAQ;IACZO,CAAC,EAAC;EAA+R,EACjS,CACG,EACPJ,KAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;IAAKI,IAAI,EAAC,cAAc;IAACC,IAAI,EAAE,GAAI,CAAAC,MAAA,CAAAV,QAAQ,CAAE;IAAEW,QAAQ,EAAC;EAAY,CAAA,CAAA,CAEvE;EACD,OAAOR,oBAACS,OAAG,EAAAC,KAAAA,CAAAA,QAAA,CAAA,CAAA,CAAA,EAAKd,KAAK,CAAG,EAAAG,UAAU,CAAO;AAC3C,CAAA;"}
1
+ {"version":3,"file":"ThumbsUpIcon.cjs","sources":["../../../src/Icon/ThumbsUpIcon.tsx"],"sourcesContent":["// This file is autogenerated by wrapSVGs.ts\n// Changes to this file will be overwritten\n\nimport React, { useId } from \"react\"\nimport { SVG } from \"~components/Icon/subcomponents/SVG\"\nimport type { IconProps } from \"~components/Icon/types\"\n\n/** @deprecated Use `<ThumbsUpIconOn/>` or `<ThumbsUpIconOff/>` */\nexport const ThumbsUpIcon = (props: IconProps): JSX.Element => {\n const uniqueId = useId()\n const svgContent = (\n <>\n <defs>\n <path\n id={uniqueId}\n d=\"M5.228 16.817v-8.18H2.502v8.18zm10.907-8.862h-4.301l.647-3.115.02-.218c0-.28-.115-.539-.3-.723l-.722-.716-4.485 4.493a1.33 1.33 0 0 0-.402.96v6.817c0 .75.613 1.364 1.363 1.364h6.135c.566 0 1.05-.341 1.254-.832l2.059-4.806q.093-.233.095-.497V9.318c0-.75-.613-1.363-1.363-1.363\"\n />\n </defs>\n <use fill=\"currentColor\" href={`#${uniqueId}`} fillRule=\"evenodd\" />\n </>\n )\n return <SVG {...props}>{svgContent}</SVG>\n}\n"],"names":["ThumbsUpIcon","props","uniqueId","useId","svgContent","React","createElement","Fragment","id","d","fill","href","concat","fillRule","SVG","__assign"],"mappings":";;;;;;AAAA;AACA;AAMA;AACO,IAAMA,YAAY,GAAG,SAAAA,CAACC,KAAgB,EAAA;EAC3C,IAAMC,QAAQ,GAAGC,KAAAA,CAAAA,KAAK,EAAE;EACxB,IAAMC,UAAU,GACdC,KAAA,CAAAC,aAAA,CAAAD,KAAA,CAAAE,QAAA,EAAA,IAAA,EACEF,KAAA,CAAAC,aAAA,CAAA,MAAA,EAAA,IAAA,EACED,KACE,CAAAC,aAAA,CAAA,MAAA,EAAA;IAAAE,EAAE,EAAEN,QAAQ;IACZO,CAAC,EAAC;EAAqR,EACvR,CACG,EACPJ,KAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;IAAKI,IAAI,EAAC,cAAc;IAACC,IAAI,EAAE,GAAI,CAAAC,MAAA,CAAAV,QAAQ,CAAE;IAAEW,QAAQ,EAAC;EAAY,CAAA,CAAA,CAEvE;EACD,OAAOR,oBAACS,OAAG,EAAAC,KAAAA,CAAAA,QAAA,CAAA,CAAA,CAAA,EAAKd,KAAK,CAAG,EAAAG,UAAU,CAAO;AAC3C,CAAA;"}
@@ -0,0 +1,17 @@
1
+ 'use strict';
2
+
3
+ var tslib = require('tslib');
4
+ var React = require('react');
5
+ var SVG = require('./subcomponents/SVG/SVG.cjs');
6
+
7
+ // This file is autogenerated by wrapSVGs.ts
8
+ // Changes to this file will be overwritten
9
+ var ThumbsUpOffIcon = function (props) {
10
+ var svgContent = React.createElement(React.Fragment, null, React.createElement("path", {
11
+ fill: "currentColor",
12
+ d: "M14.776 17.083H6.01v-10l5.529-5.496.705.705q.13.129.215.344.086.213.086.403v.211l-.885 3.833h5.584q.594 0 1.05.456t.456 1.05v1.347q0 .13-.034.28-.033.15-.075.28l-2.388 5.635q-.18.401-.6.677a1.6 1.6 0 0 1-.877.275m-7.516-1.25h7.516a.4.4 0 0 0 .18-.048.3.3 0 0 0 .14-.16L17.5 10V8.59a.25.25 0 0 0-.072-.184.25.25 0 0 0-.184-.073H10.08l1.045-4.567-3.865 3.85zm-1.25-8.75v1.25H3.333v7.5H6.01v1.25H2.083v-10z"
13
+ }));
14
+ return React.createElement(SVG.SVG, tslib.__assign({}, props), svgContent);
15
+ };
16
+ exports.ThumbsUpOffIcon = ThumbsUpOffIcon;
17
+ //# sourceMappingURL=ThumbsUpOffIcon.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ThumbsUpOffIcon.cjs","sources":["../../../src/Icon/ThumbsUpOffIcon.tsx"],"sourcesContent":["// This file is autogenerated by wrapSVGs.ts\n// Changes to this file will be overwritten\n\nimport React from \"react\"\nimport { SVG } from \"~components/Icon/subcomponents/SVG\"\nimport type { IconProps } from \"~components/Icon/types\"\n\nexport const ThumbsUpOffIcon = (props: IconProps): JSX.Element => {\n const svgContent = (\n <>\n <path\n fill=\"currentColor\"\n d=\"M14.776 17.083H6.01v-10l5.529-5.496.705.705q.13.129.215.344.086.213.086.403v.211l-.885 3.833h5.584q.594 0 1.05.456t.456 1.05v1.347q0 .13-.034.28-.033.15-.075.28l-2.388 5.635q-.18.401-.6.677a1.6 1.6 0 0 1-.877.275m-7.516-1.25h7.516a.4.4 0 0 0 .18-.048.3.3 0 0 0 .14-.16L17.5 10V8.59a.25.25 0 0 0-.072-.184.25.25 0 0 0-.184-.073H10.08l1.045-4.567-3.865 3.85zm-1.25-8.75v1.25H3.333v7.5H6.01v1.25H2.083v-10z\"\n />\n </>\n )\n return <SVG {...props}>{svgContent}</SVG>\n}\n"],"names":["ThumbsUpOffIcon","props","svgContent","React","createElement","Fragment","fill","d","SVG","__assign"],"mappings":";;;;;;AAAA;AACA;AAMO,IAAMA,eAAe,GAAG,SAAAA,CAACC,KAAgB,EAAA;EAC9C,IAAMC,UAAU,GACdC,KAAA,CAAAC,aAAA,CAAAD,KAAA,CAAAE,QAAA,EAAA,IAAA,EACEF,KACE,CAAAC,aAAA,CAAA,MAAA,EAAA;IAAAE,IAAI,EAAC,cAAc;IACnBC,CAAC,EAAC;GAAqZ,CACvZ,CAEL;EACD,OAAOJ,oBAACK,OAAG,EAAAC,KAAAA,CAAAA,QAAA,CAAA,CAAA,CAAA,EAAKR,KAAK,CAAG,EAAAC,UAAU,CAAO;AAC3C,CAAA;"}
@@ -0,0 +1,17 @@
1
+ 'use strict';
2
+
3
+ var tslib = require('tslib');
4
+ var React = require('react');
5
+ var SVG = require('./subcomponents/SVG/SVG.cjs');
6
+
7
+ // This file is autogenerated by wrapSVGs.ts
8
+ // Changes to this file will be overwritten
9
+ var ThumbsUpOnIcon = function (props) {
10
+ var svgContent = React.createElement(React.Fragment, null, React.createElement("path", {
11
+ fill: "currentColor",
12
+ d: "M14.776 17.083H6.522v-10l5.53-5.496.704.705q.13.129.216.344.086.213.086.403v.211l-.885 3.833h5.07q.595 0 1.051.456t.456 1.05v1.347a1.6 1.6 0 0 1-.109.56l-2.388 5.635q-.18.401-.6.677a1.6 1.6 0 0 1-.877.275m-9.504-10v10H2.083v-10z"
13
+ }));
14
+ return React.createElement(SVG.SVG, tslib.__assign({}, props), svgContent);
15
+ };
16
+ exports.ThumbsUpOnIcon = ThumbsUpOnIcon;
17
+ //# sourceMappingURL=ThumbsUpOnIcon.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ThumbsUpOnIcon.cjs","sources":["../../../src/Icon/ThumbsUpOnIcon.tsx"],"sourcesContent":["// This file is autogenerated by wrapSVGs.ts\n// Changes to this file will be overwritten\n\nimport React from \"react\"\nimport { SVG } from \"~components/Icon/subcomponents/SVG\"\nimport type { IconProps } from \"~components/Icon/types\"\n\nexport const ThumbsUpOnIcon = (props: IconProps): JSX.Element => {\n const svgContent = (\n <>\n <path\n fill=\"currentColor\"\n d=\"M14.776 17.083H6.522v-10l5.53-5.496.704.705q.13.129.216.344.086.213.086.403v.211l-.885 3.833h5.07q.595 0 1.051.456t.456 1.05v1.347a1.6 1.6 0 0 1-.109.56l-2.388 5.635q-.18.401-.6.677a1.6 1.6 0 0 1-.877.275m-9.504-10v10H2.083v-10z\"\n />\n </>\n )\n return <SVG {...props}>{svgContent}</SVG>\n}\n"],"names":["ThumbsUpOnIcon","props","svgContent","React","createElement","Fragment","fill","d","SVG","__assign"],"mappings":";;;;;;AAAA;AACA;AAMO,IAAMA,cAAc,GAAG,SAAAA,CAACC,KAAgB,EAAA;EAC7C,IAAMC,UAAU,GACdC,KAAA,CAAAC,aAAA,CAAAD,KAAA,CAAAE,QAAA,EAAA,IAAA,EACEF,KACE,CAAAC,aAAA,CAAA,MAAA,EAAA;IAAAE,IAAI,EAAC,cAAc;IACnBC,CAAC,EAAC;GAAsO,CACxO,CAEL;EACD,OAAOJ,oBAACK,OAAG,EAAAC,KAAAA,CAAAA,QAAA,CAAA,CAAA,CAAA,EAAKR,KAAK,CAAG,EAAAC,UAAU,CAAO;AAC3C,CAAA;"}
@@ -1,26 +1,35 @@
1
1
  'use strict';
2
2
 
3
3
  var React = require('react');
4
+ require('../Notification/InlineNotification/InlineNotification.cjs');
5
+ require('../Notification/GlobalNotification/GlobalNotification.cjs');
6
+ require('../Notification/ToastNotification/ToastNotification/ToastNotification.cjs');
7
+ var ToastNotificationsList = require('../Notification/ToastNotification/ToastNotificationsList/ToastNotificationsList.cjs');
8
+ var ToastNotificationContext = require('../Notification/ToastNotification/context/ToastNotificationContext.cjs');
4
9
  var FontDefinitions = require('./subcomponents/FontDefinitions/FontDefinitions.cjs');
10
+ var OptionalIntlProvider = require('./subcomponents/OptionalIntlProvider/OptionalIntlProvider.cjs');
5
11
  const KaizenProvider = /*#__PURE__*/function () {
6
12
  const KaizenProvider = function (_a) {
7
- // const [documentIsAvailable, setDocumentIsAvailable] = useState<boolean>(false)
8
- // const [notificationsList, setNotificationsList] = useState<JSX.Element>()
9
- var children = _a.children;
10
- _a.locale;
11
- // useEffect(() => {
12
- // // SSR does not have a document, which is required for ToastNotificationsList.
13
- // // Await document render before rendering the component.
14
- // if (document !== undefined) {
15
- // setNotificationsList(<ToastNotificationsList />)
16
- // setDocumentIsAvailable(true)
17
- // }
18
- // }, [documentIsAvailable])
19
- return (
20
- // <OptionalIntlProvider locale={locale}>
21
- React.createElement(React.Fragment, null, children, React.createElement(FontDefinitions.FontDefinitions, null))
22
- // </OptionalIntlProvider>
23
- );
13
+ var children = _a.children,
14
+ _b = _a.locale,
15
+ locale = _b === void 0 ? "en" : _b;
16
+ var _c = React.useState(false),
17
+ documentIsAvailable = _c[0],
18
+ setDocumentIsAvailable = _c[1];
19
+ var _d = React.useState(),
20
+ notificationsList = _d[0],
21
+ setNotificationsList = _d[1];
22
+ React.useEffect(function () {
23
+ // SSR does not have a document, which is required for ToastNotificationsList.
24
+ // Await document render before rendering the component.
25
+ if (document !== undefined) {
26
+ setNotificationsList(React.createElement(ToastNotificationsList.ToastNotificationsList, null));
27
+ setDocumentIsAvailable(true);
28
+ }
29
+ }, [documentIsAvailable]);
30
+ return React.createElement(OptionalIntlProvider.OptionalIntlProvider, {
31
+ locale: locale
32
+ }, React.createElement(React.Fragment, null, React.createElement(ToastNotificationContext.ToastNotificationProvider, null, notificationsList, children), React.createElement(FontDefinitions.FontDefinitions, null)));
24
33
  };
25
34
  KaizenProvider.displayName = "KaizenProvider";
26
35
  return KaizenProvider;
@@ -1 +1 @@
1
- {"version":3,"file":"KaizenProvider.cjs","sources":["../../../src/KaizenProvider/KaizenProvider.tsx"],"sourcesContent":["import React from \"react\"\n// import { ToastNotificationsList } from \"~components/Notification\"\n// import { ToastNotificationProvider } from \"~components/Notification/ToastNotification/context/ToastNotificationContext\"\nimport { FontDefinitions } from \"./subcomponents/FontDefinitions\"\n// import { OptionalIntlProvider } from \"./subcomponents/OptionalIntlProvider\"\n\nexport type KaizenProviderProps = {\n children: React.ReactNode\n locale?: string\n}\n\nexport const KaizenProvider = ({\n children,\n locale = \"en\",\n}: KaizenProviderProps): JSX.Element =>\n // const [documentIsAvailable, setDocumentIsAvailable] = useState<boolean>(false)\n // const [notificationsList, setNotificationsList] = useState<JSX.Element>()\n\n // useEffect(() => {\n // // SSR does not have a document, which is required for ToastNotificationsList.\n // // Await document render before rendering the component.\n // if (document !== undefined) {\n // setNotificationsList(<ToastNotificationsList />)\n // setDocumentIsAvailable(true)\n // }\n // }, [documentIsAvailable])\n\n (\n // <OptionalIntlProvider locale={locale}>\n <>\n {/* <ToastNotificationProvider> */}\n {/* {notificationsList} */}\n {children}\n {/* </ToastNotificationProvider> */}\n <FontDefinitions />\n </>\n // </OptionalIntlProvider>\n )\n\n\nKaizenProvider.displayName = \"KaizenProvider\"\n"],"names":["KaizenProvider","_a","children","locale","React","createElement","Fragment","FontDefinitions","displayName"],"mappings":";;;;MAWaA,cAAc;EAAA,MAAdA,cAAc,GAAG,SAAAA,CAACC,EAGT,EAAA;;;IAFpB,IAAAC,QAAQ,cAAA;IACRD,EAAA,CAAAE,MAAa;;;;;;;;;IAcZ;;MAEGC,KAAA,CAAAC,aAAA,CAAAD,KAAA,CAAAE,QAAA,EAAA,IAAA,EAGKJ,QAAQ,EAEXE,KAAC,CAAAC,aAAA,CAAAE,+BAAe,OAAG;;;EAPxB,CAUA;EAGHP,cAAc,CAACQ,WAAW,GAAG,gBAAgB;EAAA,OA7BhCR,cAAc;AAAA;"}
1
+ {"version":3,"file":"KaizenProvider.cjs","sources":["../../../src/KaizenProvider/KaizenProvider.tsx"],"sourcesContent":["import React, { useEffect, useState } from \"react\"\nimport { ToastNotificationsList } from \"~components/Notification\"\nimport { ToastNotificationProvider } from \"~components/Notification/ToastNotification/context/ToastNotificationContext\"\nimport { FontDefinitions } from \"./subcomponents/FontDefinitions\"\nimport { OptionalIntlProvider } from \"./subcomponents/OptionalIntlProvider\"\n\nexport type KaizenProviderProps = {\n children: React.ReactNode\n locale?: string\n}\n\nexport const KaizenProvider = ({\n children,\n locale = \"en\",\n}: KaizenProviderProps): JSX.Element => {\n const [documentIsAvailable, setDocumentIsAvailable] = useState<boolean>(false)\n const [notificationsList, setNotificationsList] = useState<JSX.Element>()\n\n useEffect(() => {\n // SSR does not have a document, which is required for ToastNotificationsList.\n // Await document render before rendering the component.\n if (document !== undefined) {\n setNotificationsList(<ToastNotificationsList />)\n setDocumentIsAvailable(true)\n }\n }, [documentIsAvailable])\n\n return (\n <OptionalIntlProvider locale={locale}>\n <>\n <ToastNotificationProvider>\n {notificationsList}\n {children}\n </ToastNotificationProvider>\n <FontDefinitions />\n </>\n </OptionalIntlProvider>\n )\n}\n\nKaizenProvider.displayName = \"KaizenProvider\"\n"],"names":["KaizenProvider","_a","children","_b","locale","_c","useState","documentIsAvailable","setDocumentIsAvailable","_d","notificationsList","setNotificationsList","useEffect","document","undefined","React","createElement","ToastNotificationsList","OptionalIntlProvider","Fragment","ToastNotificationProvider","FontDefinitions","displayName"],"mappings":";;;;;;;;;;MAWaA,cAAc;EAAA,MAAdA,cAAc,GAAG,SAAAA,CAACC,EAGT,EAAA;IAFpB,IAAAC,QAAQ,cAAA;MACRC,EAAA,GAAAF,EAAA,CAAAG,MAAa;MAAbA,MAAM,GAAAD,EAAA,KAAA,KAAA,CAAA,GAAG,IAAI,GAAAA,EAAA;IAEP,IAAAE,EAAA,GAAgDC,KAAAA,CAAAA,QAAQ,CAAU,KAAK,CAAC;MAAvEC,mBAAmB,GAAAF,EAAA,CAAA,CAAA,CAAA;MAAEG,sBAAsB,GAAAH,EAAA,CAAA,CAAA,CAA4B;IACxE,IAAAI,EAAA,GAA4CH,cAAQ,CAAe,CAAA;MAAlEI,iBAAiB,GAAAD,EAAA,CAAA,CAAA,CAAA;MAAEE,oBAAoB,GAAAF,EAAA,CAAA,CAAA,CAA2B;IAEzEG,KAAAA,CAAAA,SAAS,CAAC,YAAA;;;MAGR,IAAIC,QAAQ,KAAKC,SAAS,EAAE;QAC1BH,oBAAoB,CAACI,KAAA,CAAAC,aAAA,CAACC,sBAAAA,CAAAA,sBAAsB,EAAA,IAAA,CAAG,CAAC;QAChDT,sBAAsB,CAAC,IAAI,CAAC;MAC7B;IACH,CAAC,EAAE,CAACD,mBAAmB,CAAC,CAAC;IAEzB,OACEQ,KAAC,CAAAC,aAAA,CAAAE,oBAAoB,CAAAA,oBAAA,EAAC;MAAAd,MAAM,EAAEA;IAAM,CAAA,EAClCW,KAAA,CAAAC,aAAA,CAAAD,KAAA,CAAAI,QAAA,EAAA,IAAA,EACEJ,KAAA,CAAAC,aAAA,CAACI,wBAAAA,CAAAA,yBAAyB,EAAA,IAAA,EACvBV,iBAAiB,EACjBR,QAAQ,CACiB,EAC5Ba,KAAA,CAAAC,aAAA,CAACK,eAAAA,CAAAA,eAAe,EAAA,IAAA,CAAG,CAClB,CACkB;EAE3B,CAAC;EAEDrB,cAAc,CAACsB,WAAW,GAAG,gBAAgB;EAAA,OA7BhCtB,cAAc;AAAA;"}
@@ -0,0 +1,20 @@
1
+ 'use strict';
2
+
3
+ var React = require('react');
4
+ var i18nReactIntl = require('@cultureamp/i18n-react-intl');
5
+ var reactIntl = require('react-intl');
6
+ const OptionalIntlProvider = /*#__PURE__*/function () {
7
+ const OptionalIntlProvider = function (_a) {
8
+ var locale = _a.locale,
9
+ children = _a.children;
10
+ var parent = React.useContext(reactIntl.IntlContext);
11
+ if (parent) return children;
12
+ return React.createElement(i18nReactIntl.StaticIntlProvider, {
13
+ locale: locale
14
+ }, children);
15
+ };
16
+ OptionalIntlProvider.displayName = "OptionalIntlProvider";
17
+ return OptionalIntlProvider;
18
+ }();
19
+ exports.OptionalIntlProvider = OptionalIntlProvider;
20
+ //# sourceMappingURL=OptionalIntlProvider.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OptionalIntlProvider.cjs","sources":["../../../../../src/KaizenProvider/subcomponents/OptionalIntlProvider/OptionalIntlProvider.tsx"],"sourcesContent":["import React, { useContext } from \"react\"\nimport { StaticIntlProvider } from \"@cultureamp/i18n-react-intl\"\nimport { IntlContext } from \"react-intl\"\n\ntype Props = {\n locale: string\n children: React.ReactElement\n}\nexport const OptionalIntlProvider = ({\n locale,\n children,\n}: Props): JSX.Element => {\n const parent = useContext(IntlContext)\n\n if (parent) return children\n return <StaticIntlProvider locale={locale}>{children}</StaticIntlProvider>\n}\n\nOptionalIntlProvider.displayName = \"OptionalIntlProvider\"\n"],"names":["OptionalIntlProvider","_a","locale","children","parent","useContext","IntlContext","React","createElement","StaticIntlProvider","displayName"],"mappings":";;;;;MAQaA,oBAAoB;EAAA,MAApBA,oBAAoB,GAAG,SAAAA,CAACC,EAG7B,EAAA;QAFNC,MAAM,GAAAD,EAAA,CAAAC,MAAA;MACNC,QAAQ,GAAAF,EAAA,CAAAE,QAAA;IAER,IAAMC,MAAM,GAAGC,gBAAU,CAACC,SAAAA,CAAAA,WAAW,CAAC;IAEtC,IAAIF,MAAM,EAAE,OAAOD,QAAQ;IAC3B,OAAOI,KAAA,CAAAC,aAAA,CAACC,aAAkB,CAAAA,kBAAA,EAAC;MAAAP,MAAM,EAAEA;IAAM,CAAA,EAAGC,QAAQ,CAAsB;EAC5E,CAAC;EAEDH,oBAAoB,CAACU,WAAW,GAAG,sBAAsB;EAAA,OAV5CV,oBAAoB;AAAA;"}
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- require('tslib');
3
+ var tslib = require('tslib');
4
4
  var React = require('react');
5
- require('uuid');
5
+ var uuid = require('uuid');
6
6
  var ToastNotificationContext = React.createContext(null);
7
7
  var useToastNotificationContext = function () {
8
8
  var context = React.useContext(ToastNotificationContext);
@@ -11,5 +11,62 @@ var useToastNotificationContext = function () {
11
11
  }
12
12
  return context;
13
13
  };
14
+ const ToastNotificationProvider = /*#__PURE__*/function () {
15
+ const ToastNotificationProvider = function (_a) {
16
+ var children = _a.children;
17
+ var _b = React.useState([]),
18
+ notifications = _b[0],
19
+ setNotifications = _b[1];
20
+ var addToastNotification = function (notification) {
21
+ var uuid$1 = uuid.v4();
22
+ var notificationWithId = tslib.__assign({
23
+ id: uuid$1
24
+ }, notification);
25
+ var notificationExists = notifications.find(function (_a) {
26
+ var id = _a.id;
27
+ return id === notification.id;
28
+ });
29
+ if (!notificationExists) {
30
+ setNotifications(function (existing) {
31
+ return tslib.__spreadArray(tslib.__spreadArray([], existing, true), [notificationWithId], false);
32
+ });
33
+ }
34
+ };
35
+ var updateToastNotification = function (notification) {
36
+ var notificationIndex = notifications.findIndex(function (_a) {
37
+ var id = _a.id;
38
+ return id === notification.id;
39
+ });
40
+ var copy = notifications.slice();
41
+ copy.splice(notificationIndex, 1, notification); // Mutation to insert notification over itself
42
+ setNotifications(copy);
43
+ };
44
+ var removeToastNotification = function (notificationID) {
45
+ var notificationIndex = notifications.findIndex(function (_a) {
46
+ var id = _a.id;
47
+ return id === notificationID;
48
+ });
49
+ var copy = notifications.slice();
50
+ copy.splice(notificationIndex, 1); // Mutation
51
+ setNotifications(copy);
52
+ };
53
+ var clearToastNotifications = function () {
54
+ setNotifications([]);
55
+ };
56
+ var value = {
57
+ notifications: notifications,
58
+ addToastNotification: addToastNotification,
59
+ updateToastNotification: updateToastNotification,
60
+ removeToastNotification: removeToastNotification,
61
+ clearToastNotifications: clearToastNotifications
62
+ };
63
+ return React.createElement(ToastNotificationContext.Provider, {
64
+ value: value
65
+ }, children);
66
+ };
67
+ ToastNotificationProvider.displayName = "ToastNotificationProvider";
68
+ return ToastNotificationProvider;
69
+ }();
70
+ exports.ToastNotificationProvider = ToastNotificationProvider;
14
71
  exports.useToastNotificationContext = useToastNotificationContext;
15
72
  //# sourceMappingURL=ToastNotificationContext.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ToastNotificationContext.cjs","sources":["../../../../../src/Notification/ToastNotification/context/ToastNotificationContext.tsx"],"sourcesContent":["import React, { useContext, useState } from \"react\"\nimport { v4 as uuidv4 } from \"uuid\"\nimport { ToastNotificationObj } from \"../types\"\n\ntype ToastNotificationObjOptionalId = Omit<ToastNotificationObj, \"id\"> & {\n id?: string\n}\n\nexport type ToastNotificationContextValue = {\n notifications: ToastNotificationObj[]\n addToastNotification: (notification: ToastNotificationObjOptionalId) => void\n updateToastNotification: (notification: ToastNotificationObj) => void\n removeToastNotification: (notificationId: string) => void\n clearToastNotifications: () => void\n}\n\nconst ToastNotificationContext =\n React.createContext<ToastNotificationContextValue | null>(null)\n\nexport const useToastNotificationContext =\n (): ToastNotificationContextValue => {\n const context = useContext(ToastNotificationContext)\n\n if (!context) {\n throw new Error(\n \"useToastNotificationContext must be used within the ToastNotificationContext.Provider\"\n )\n }\n\n return context\n }\n\ntype ToastNotificationProviderProps = {\n children: React.ReactNode\n}\n\nexport const ToastNotificationProvider = ({\n children,\n}: ToastNotificationProviderProps): JSX.Element | null => {\n const [notifications, setNotifications] = useState<ToastNotificationObj[]>([])\n\n const addToastNotification: ToastNotificationContextValue[\"addToastNotification\"] =\n notification => {\n const uuid = uuidv4()\n const notificationWithId = { id: uuid, ...notification }\n\n const notificationExists = notifications.find(\n ({ id }) => id === notification.id\n )\n\n if (!notificationExists) {\n setNotifications(existing => [...existing, notificationWithId])\n }\n }\n\n const updateToastNotification = (\n notification: ToastNotificationObj\n ): void => {\n const notificationIndex = notifications.findIndex(\n ({ id }) => id === notification.id\n )\n\n const copy = notifications.slice()\n copy.splice(notificationIndex, 1, notification) // Mutation to insert notification over itself\n setNotifications(copy)\n }\n\n const removeToastNotification = (notificationID: string): void => {\n const notificationIndex = notifications.findIndex(\n ({ id }) => id === notificationID\n )\n const copy = notifications.slice()\n copy.splice(notificationIndex, 1) // Mutation\n setNotifications(copy)\n }\n\n const clearToastNotifications = (): void => {\n setNotifications([])\n }\n\n const value = {\n notifications,\n addToastNotification,\n updateToastNotification,\n removeToastNotification,\n clearToastNotifications,\n } satisfies ToastNotificationContextValue\n\n return (\n <ToastNotificationContext.Provider value={value}>\n {children}\n </ToastNotificationContext.Provider>\n )\n}\n\nToastNotificationProvider.displayName = \"ToastNotificationProvider\"\n"],"names":["ToastNotificationContext","React","createContext","useToastNotificationContext","context","useContext","Error"],"mappings":";;;;;AAgBA,IAAMA,wBAAwB,GAC5BC,KAAK,CAACC,aAAa,CAAuC,IAAI,CAAC;AAEpD,IAAAC,2BAA2B,GACtC,SAAAA,CAAA,EAAA;EACE,IAAMC,OAAO,GAAGC,gBAAU,CAACL,wBAAwB,CAAC;EAEpD,IAAI,CAACI,OAAO,EAAE;IACZ,MAAM,IAAIE,KAAK,CACb,uFAAuF,CACxF;EACF;EAED,OAAOF,OAAO;AAChB,CAAA;"}
1
+ {"version":3,"file":"ToastNotificationContext.cjs","sources":["../../../../../src/Notification/ToastNotification/context/ToastNotificationContext.tsx"],"sourcesContent":["import React, { useContext, useState } from \"react\"\nimport { v4 as uuidv4 } from \"uuid\"\nimport { ToastNotificationObj } from \"../types\"\n\ntype ToastNotificationObjOptionalId = Omit<ToastNotificationObj, \"id\"> & {\n id?: string\n}\n\nexport type ToastNotificationContextValue = {\n notifications: ToastNotificationObj[]\n addToastNotification: (notification: ToastNotificationObjOptionalId) => void\n updateToastNotification: (notification: ToastNotificationObj) => void\n removeToastNotification: (notificationId: string) => void\n clearToastNotifications: () => void\n}\n\nconst ToastNotificationContext =\n React.createContext<ToastNotificationContextValue | null>(null)\n\nexport const useToastNotificationContext =\n (): ToastNotificationContextValue => {\n const context = useContext(ToastNotificationContext)\n\n if (!context) {\n throw new Error(\n \"useToastNotificationContext must be used within the ToastNotificationContext.Provider\"\n )\n }\n\n return context\n }\n\ntype ToastNotificationProviderProps = {\n children: React.ReactNode\n}\n\nexport const ToastNotificationProvider = ({\n children,\n}: ToastNotificationProviderProps): JSX.Element | null => {\n const [notifications, setNotifications] = useState<ToastNotificationObj[]>([])\n\n const addToastNotification: ToastNotificationContextValue[\"addToastNotification\"] =\n notification => {\n const uuid = uuidv4()\n const notificationWithId = { id: uuid, ...notification }\n\n const notificationExists = notifications.find(\n ({ id }) => id === notification.id\n )\n\n if (!notificationExists) {\n setNotifications(existing => [...existing, notificationWithId])\n }\n }\n\n const updateToastNotification = (\n notification: ToastNotificationObj\n ): void => {\n const notificationIndex = notifications.findIndex(\n ({ id }) => id === notification.id\n )\n\n const copy = notifications.slice()\n copy.splice(notificationIndex, 1, notification) // Mutation to insert notification over itself\n setNotifications(copy)\n }\n\n const removeToastNotification = (notificationID: string): void => {\n const notificationIndex = notifications.findIndex(\n ({ id }) => id === notificationID\n )\n const copy = notifications.slice()\n copy.splice(notificationIndex, 1) // Mutation\n setNotifications(copy)\n }\n\n const clearToastNotifications = (): void => {\n setNotifications([])\n }\n\n const value = {\n notifications,\n addToastNotification,\n updateToastNotification,\n removeToastNotification,\n clearToastNotifications,\n } satisfies ToastNotificationContextValue\n\n return (\n <ToastNotificationContext.Provider value={value}>\n {children}\n </ToastNotificationContext.Provider>\n )\n}\n\nToastNotificationProvider.displayName = \"ToastNotificationProvider\"\n"],"names":["ToastNotificationContext","React","createContext","useToastNotificationContext","context","useContext","Error","ToastNotificationProvider","_a","children","_b","useState","notifications","setNotifications","addToastNotification","notification","uuid","uuidv4","notificationWithId","id","notificationExists","find","existing","__spreadArray","updateToastNotification","notificationIndex","findIndex","copy","slice","splice","removeToastNotification","notificationID","clearToastNotifications","value","createElement","Provider","displayName"],"mappings":";;;;;AAgBA,IAAMA,wBAAwB,GAC5BC,KAAK,CAACC,aAAa,CAAuC,IAAI,CAAC;AAEpD,IAAAC,2BAA2B,GACtC,SAAAA,CAAA,EAAA;EACE,IAAMC,OAAO,GAAGC,gBAAU,CAACL,wBAAwB,CAAC;EAEpD,IAAI,CAACI,OAAO,EAAE;IACZ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AAMQ,IAAI,GAAGf,aAAa,CAACgB,KAAK,EAAE;MAClCD,IAAI,CAACE,MAAM,CAACJ,iBAAiB,EAAE,CAAC,EAAEV,YAAY,CAAC,CAAA,CAAA;MAC/CF,gBAAgB,CAACc,IAAI,CAAC;IACxB,CAAC;IAED,IAAMG,uBAAuB,GAAG,SAAAA,CAACC,cAAsB,EAAA;MACrD,IAAMN,iBAAiB,GAAGb,aAAa,CAACc,SAAS,CAC/C,UAAClB,EAAM,EAAA;QAAJ,IAAAW,EAAE,GAAAX,EAAA,CAAAW,EAAA;QAAO,OAAAA,EAAE,KAAKY,cAAc;MAArB,CAAqB,CAClC;MACD,IAAMJ,IAAI,GAAGf,aAAa,CAACgB,KAAK,EAAE;MAClCD,IAAI,CAACE,MAAM,CAACJ,iBAAiB,EAAE,CAAC,CAAC,CAAA,CAAA;MACjCZ,gBAAgB,CAACc,IAAI,CAAC;IACxB,CAAC;IAED,IAAMK,uBAAuB,GAAG,SAAAA,CAAA,EAAA;MAC9BnB,gBAAgB,CAAC,EAAE,CAAC;IACtB,CAAC;IAED,IAAMoB,KAAK,GAAG;MACZrB,aAAa,EAAAA,aAAA;MACbE,oBAAoB,EAAAA,oBAAA;MACpBU,uBAAuB,EAAAA,uBAAA;MACvBM,uBAAuB,EAAAA,uBAAA;MACvBE,uBAAuB,EAAAA;KACgB;IAEzC,OACE/B,KAAA,CAAAiC,aAAA,CAAClC,wBAAwB,CAACmC,QAAQ,EAAA;MAACF,KAAK,EAAEA;KAAK,EAC5CxB,QAAQ,CACyB;EAExC,CAAC;EAEDF,yBAAyB,CAAC6B,WAAW,GAAG,2BAA2B;EAAA,OA3DtD7B,yBAAyB;AAAA;;"}
@@ -1,11 +1,131 @@
1
1
  'use strict';
2
2
 
3
+ var tslib = require('tslib');
3
4
  var React = require('react');
5
+ var classnames = require('classnames');
6
+ var Avatar = require('../Avatar/Avatar.cjs');
7
+ require('../Icon/subcomponents/SVG/SVG.cjs');
8
+ var CautionIcon = require('../Icon/CautionIcon.cjs');
9
+ var ClearIcon = require('../Icon/ClearIcon.cjs');
10
+ var ExclamationIcon = require('../Icon/ExclamationIcon.cjs');
11
+ var InformationIcon = require('../Icon/InformationIcon.cjs');
12
+ var LiveIcon = require('../Icon/LiveIcon.cjs');
13
+ var SuccessIcon = require('../Icon/SuccessIcon.cjs');
14
+ var Tag_module = require('./Tag.module.scss.cjs');
15
+ var isJSXElement = function (imageElementOrAvatarProps) {
16
+ return "props" in imageElementOrAvatarProps;
17
+ };
18
+ var renderAvatar = function (imageElementOrAvatarProps) {
19
+ return isJSXElement(imageElementOrAvatarProps) ? React.createElement(React.Fragment, null, imageElementOrAvatarProps) : React.createElement(Avatar.Avatar, tslib.__assign({}, imageElementOrAvatarProps, {
20
+ size: "small"
21
+ }));
22
+ };
23
+ /**
24
+ * {@link https://cultureamp.atlassian.net/wiki/spaces/DesignSystem/pages/3081928978/Tags Guidance} |
25
+ * {@link https://cultureamp.design/?path=/docs/components-tag--docs Storybook}
26
+ */
4
27
  const Tag = /*#__PURE__*/function () {
5
28
  const Tag = function (props) {
6
- var _a = props.variant,
7
- variant = _a === void 0 ? "default" : _a;
8
- return React.createElement("div", null, "Testing Tag component ", variant);
29
+ var children = props.children,
30
+ _a = props.variant,
31
+ variant = _a === void 0 ? "default" : _a,
32
+ _b = props.size,
33
+ size = _b === void 0 ? "medium" : _b,
34
+ _c = props.inline,
35
+ inline = _c === void 0 ? false : _c,
36
+ _d = props.dismissible,
37
+ dismissible = _d === void 0 ? false : _d,
38
+ onDismiss = props.onDismiss,
39
+ onMouseDown = props.onMouseDown,
40
+ onMouseLeave = props.onMouseLeave,
41
+ truncateWidth = props.truncateWidth;
42
+ var isTruncated = truncateWidth && truncateWidth > 0;
43
+ var canShowIcon = size === "medium";
44
+ return React.createElement("div", {
45
+ className: classnames(Tag_module.root, Tag_module[variant], variant === "profile" && Tag_module.default, Tag_module[size], inline && Tag_module.inline, dismissible && Tag_module.dismissible)
46
+ }, React.createElement("div", {
47
+ className: Tag_module.layoutContainer
48
+ }, React.createElement(React.Fragment, null, canShowIcon && function () {
49
+ switch (props.variant) {
50
+ case "validationPositive":
51
+ return React.createElement("span", {
52
+ className: Tag_module.validationIcon
53
+ }, React.createElement(SuccessIcon.SuccessIcon, {
54
+ role: "presentation"
55
+ }));
56
+ case "validationNegative":
57
+ return React.createElement("span", {
58
+ className: Tag_module.validationIcon
59
+ }, React.createElement(ExclamationIcon.ExclamationIcon, {
60
+ role: "presentation"
61
+ }));
62
+ case "validationCautionary":
63
+ return React.createElement("span", {
64
+ className: Tag_module.validationIcon
65
+ }, React.createElement(CautionIcon.CautionIcon, {
66
+ role: "presentation"
67
+ }));
68
+ case "validationInformative":
69
+ return React.createElement("span", {
70
+ className: Tag_module.validationIcon
71
+ }, React.createElement(InformationIcon.InformationIcon, {
72
+ role: "presentation"
73
+ }));
74
+ case "profile":
75
+ return React.createElement("span", {
76
+ className: Tag_module.profile
77
+ }, props.avatar && renderAvatar(props.avatar));
78
+ default:
79
+ return;
80
+ }
81
+ }(), React.createElement("span", {
82
+ className: classnames(Tag_module.textContent, isTruncated && Tag_module.truncate),
83
+ style: {
84
+ maxWidth: isTruncated ? truncateWidth : undefined
85
+ }
86
+ }, children), dismissible && React.createElement(React.Fragment, null, React.createElement("button", {
87
+ type: "button",
88
+ className: Tag_module.dismissButton,
89
+ onClick: onDismiss,
90
+ onMouseDown: onMouseDown,
91
+ onMouseLeave: onMouseLeave
92
+ }, React.createElement("div", {
93
+ className: Tag_module.iconWrapper
94
+ }, React.createElement(ClearIcon.ClearIcon, {
95
+ inheritSize: true,
96
+ role: "img",
97
+ "aria-label": "Dismiss"
98
+ })))), variant === "statusLive" && React.createElement("span", {
99
+ className: Tag_module.liveIcon
100
+ }, React.createElement(LiveIcon.LiveIcon, {
101
+ role: "presentation",
102
+ classNameOverride: Tag_module.liveIcon_base,
103
+ width: "16",
104
+ height: "16",
105
+ viewBox: "0 0 16 16",
106
+ fill: "none"
107
+ }), React.createElement(LiveIcon.LiveIcon, {
108
+ role: "presentation",
109
+ classNameOverride: Tag_module.liveIcon_1,
110
+ width: "16",
111
+ height: "16",
112
+ viewBox: "0 0 16 16",
113
+ fill: "none"
114
+ }), React.createElement(LiveIcon.LiveIcon, {
115
+ role: "presentation",
116
+ classNameOverride: Tag_module.liveIcon_2,
117
+ width: "16",
118
+ height: "16",
119
+ viewBox: "0 0 16 16",
120
+ fill: "none"
121
+ }), React.createElement(LiveIcon.LiveIcon, {
122
+ role: "presentation",
123
+ classNameOverride: Tag_module.liveIcon_3,
124
+ width: "16",
125
+ height: "16",
126
+ viewBox: "0 0 16 16",
127
+ fill: "none"
128
+ })))));
9
129
  };
10
130
  Tag.displayName = "Tag";
11
131
  return Tag;
@@ -1 +1 @@
1
- {"version":3,"file":"Tag.cjs","sources":["../../../src/Tag/Tag.tsx"],"sourcesContent":["import React from \"react\"\nimport { AvatarProps } from \"~components/Avatar\"\nimport { TagVariants } from \"./types\"\n\nexport type TagWithAvatarProps = Omit<DefaultTagProps, \"variant\"> & {\n variant: \"profile\"\n avatar: JSX.Element | AvatarProps\n}\n\ntype Variant = (typeof TagVariants)[number]\n\nexport interface DefaultTagProps {\n variant?: Variant\n children: React.ReactNode\n size?: \"medium\" | \"small\"\n inline?: boolean\n dismissible?: boolean\n onDismiss?: React.MouseEventHandler<HTMLSpanElement>\n onMouseDown?: React.MouseEventHandler<HTMLSpanElement>\n onMouseLeave?: React.MouseEventHandler<HTMLSpanElement>\n truncateWidth?: number\n}\n\nexport type TagProps = DefaultTagProps | TagWithAvatarProps\n\nexport const Tag = (props: TagProps): JSX.Element => {\n const { variant = \"default\" } = props\n return <div>Testing Tag component {variant}</div>\n}\n\nTag.displayName = \"Tag\"\n"],"names":["Tag","props","_a","variant","React","createElement","displayName"],"mappings":";;;MAyBaA,GAAG;EAAA,MAAHA,GAAG,GAAG,SAAAA,CAACC,KAAe,EAAA;IACzB,IAAAC,EAAA,GAAwBD,KAAK,CAAVE,OAAA;MAAnBA,OAAO,GAAGD,EAAA,KAAA,KAAA,CAAA,GAAA,SAAS,KAAA;IAC3B,OAAOE,KAAA,CAAAC,aAAA,CAAA,KAAA,EAAA,IAAA,4BAA4BF,OAAO,CAAO;EACnD,CAAC;EAEDH,GAAG,CAACM,WAAW,GAAG,KAAK;EAAA,OALVN,GAAG;AAAA;"}
1
+ {"version":3,"file":"Tag.cjs","sources":["../../../src/Tag/Tag.tsx"],"sourcesContent":["import React from \"react\"\nimport classnames from \"classnames\"\nimport { Avatar, AvatarProps } from \"~components/Avatar\"\nimport {\n CautionIcon,\n ClearIcon,\n ExclamationIcon,\n InformationIcon,\n LiveIcon,\n SuccessIcon,\n} from \"~components/Icon\"\nimport { TagVariants } from \"./types\"\nimport styles from \"./Tag.module.scss\"\n\nexport type TagWithAvatarProps = Omit<DefaultTagProps, \"variant\"> & {\n variant: \"profile\"\n avatar: JSX.Element | AvatarProps\n}\n\ntype Variant = (typeof TagVariants)[number]\n\nexport interface DefaultTagProps {\n variant?: Variant\n children: React.ReactNode\n size?: \"medium\" | \"small\"\n inline?: boolean\n dismissible?: boolean\n onDismiss?: React.MouseEventHandler<HTMLSpanElement>\n onMouseDown?: React.MouseEventHandler<HTMLSpanElement>\n onMouseLeave?: React.MouseEventHandler<HTMLSpanElement>\n truncateWidth?: number\n}\n\nexport type TagProps = DefaultTagProps | TagWithAvatarProps\n\nconst isJSXElement = (\n imageElementOrAvatarProps: JSX.Element | AvatarProps\n): imageElementOrAvatarProps is JSX.Element =>\n \"props\" in imageElementOrAvatarProps\n\nconst renderAvatar = (\n imageElementOrAvatarProps: JSX.Element | AvatarProps\n): JSX.Element =>\n isJSXElement(imageElementOrAvatarProps) ? (\n <>{imageElementOrAvatarProps}</>\n ) : (\n <Avatar {...imageElementOrAvatarProps} size=\"small\" />\n )\n\n/**\n * {@link https://cultureamp.atlassian.net/wiki/spaces/DesignSystem/pages/3081928978/Tags Guidance} |\n * {@link https://cultureamp.design/?path=/docs/components-tag--docs Storybook}\n */\nexport const Tag = (props: TagProps): JSX.Element => {\n const {\n children,\n variant = \"default\",\n size = \"medium\",\n inline = false,\n dismissible = false,\n onDismiss,\n onMouseDown,\n onMouseLeave,\n truncateWidth,\n } = props\n\n const isTruncated = truncateWidth && truncateWidth > 0\n const canShowIcon = size === \"medium\"\n return (\n <div\n className={classnames(\n styles.root,\n styles[variant],\n variant === \"profile\" && styles.default,\n styles[size],\n inline && styles.inline,\n dismissible && styles.dismissible\n )}\n >\n <div className={styles.layoutContainer}>\n <>\n {canShowIcon &&\n ((): JSX.Element | void => {\n switch (props.variant) {\n case \"validationPositive\":\n return (\n <span className={styles.validationIcon}>\n <SuccessIcon role=\"presentation\" />\n </span>\n )\n case \"validationNegative\":\n return (\n <span className={styles.validationIcon}>\n <ExclamationIcon role=\"presentation\" />\n </span>\n )\n case \"validationCautionary\":\n return (\n <span className={styles.validationIcon}>\n <CautionIcon role=\"presentation\" />\n </span>\n )\n case \"validationInformative\":\n return (\n <span className={styles.validationIcon}>\n <InformationIcon role=\"presentation\" />\n </span>\n )\n case \"profile\":\n return (\n <span className={styles.profile}>\n {props.avatar && renderAvatar(props.avatar)}\n </span>\n )\n default:\n return\n }\n })()}\n <span\n className={classnames(\n styles.textContent,\n isTruncated && styles.truncate\n )}\n style={{\n maxWidth: isTruncated ? truncateWidth : undefined,\n }}\n >\n {children}\n </span>\n {dismissible && (\n <>\n <button\n type=\"button\"\n className={styles.dismissButton}\n onClick={onDismiss}\n onMouseDown={onMouseDown}\n onMouseLeave={onMouseLeave}\n >\n <div className={styles.iconWrapper}>\n <ClearIcon inheritSize role=\"img\" aria-label=\"Dismiss\" />\n </div>\n </button>\n </>\n )}\n {variant === \"statusLive\" && (\n <span className={styles.liveIcon}>\n <LiveIcon\n role=\"presentation\"\n classNameOverride={styles.liveIcon_base}\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n />\n <LiveIcon\n role=\"presentation\"\n classNameOverride={styles.liveIcon_1}\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n />\n <LiveIcon\n role=\"presentation\"\n classNameOverride={styles.liveIcon_2}\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n />\n <LiveIcon\n role=\"presentation\"\n classNameOverride={styles.liveIcon_3}\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n />\n </span>\n )}\n </>\n </div>\n </div>\n )\n}\n\nTag.displayName = \"Tag\"\n"],"names":["isJSXElement","imageElementOrAvatarProps","renderAvatar","React","createElement","Fragment","Avatar","__assign","size","Tag","props","children","_a","variant","_b","_c","inline","_d","dismissible","onDismiss","onMouseDown","onMouseLeave","truncateWidth","isTruncated","canShowIcon","className","classnames","styles","root","default","layoutContainer","validationIcon","SuccessIcon","role","ExclamationIcon","CautionIcon","InformationIcon","profile","avatar","textContent","truncate","style","maxWidth","undefined","type","dismissButton","onClick","iconWrapper","ClearIcon","inheritSize","liveIcon","LiveIcon","classNameOverride","liveIcon_base","width","height","viewBox","fill","liveIcon_1","liveIcon_2","liveIcon_3","displayName"],"mappings":";;;;;;;;;;;;;;AAmCA,IAAMA,YAAY,GAAG,SAAAA,CACnBC,yBAAoD,EAAA;EAEpD,OAAA,OAAO,IAAIA,yBAAyB;AAApC,CAAoC;AAEtC,IAAMC,YAAY,GAAG,SAAAA,CACnBD,yBAAoD,EAAA;EAEpD,OAAAD,YAAY,CAACC,yBAAyB,CAAC,GACrCE,KAAG,CAAAC,aAAA,CAAAD,KAAA,CAAAE,QAAA,EAAA,IAAA,EAAAJ,yBAAyB,CAAI,GAEhCE,KAAA,CAAAC,aAAA,CAACE,MAAAA,CAAAA,MAAM,EAAAC,KAAA,CAAAA,QAAA,CAAA,EAAA,EAAKN,yBAAyB,EAAA;IAAEO,IAAI,EAAC;GAAO,CAAA,CACpD;AAJD,CAIC;AAEH;;;AAGG;AAHH,MAIaC,GAAG;EAAA,MAAHA,GAAG,GAA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