@chayns-components/core 5.0.0-beta.16 → 5.0.0-beta.160

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 (179) hide show
  1. package/README.md +3 -9
  2. package/lib/components/accordion/Accordion.d.ts +41 -2
  3. package/lib/components/accordion/Accordion.js +73 -75
  4. package/lib/components/accordion/Accordion.js.map +1 -1
  5. package/lib/components/accordion/Accordion.styles.d.ts +3 -2
  6. package/lib/components/accordion/Accordion.styles.js +67 -26
  7. package/lib/components/accordion/Accordion.styles.js.map +1 -1
  8. package/lib/components/accordion/accordion-body/AccordionBody.d.ts +13 -2
  9. package/lib/components/accordion/accordion-body/AccordionBody.js +19 -11
  10. package/lib/components/accordion/accordion-body/AccordionBody.js.map +1 -1
  11. package/lib/components/accordion/accordion-body/AccordionBody.styles.d.ts +4 -1
  12. package/lib/components/accordion/accordion-body/AccordionBody.styles.js +15 -10
  13. package/lib/components/accordion/accordion-body/AccordionBody.styles.js.map +1 -1
  14. package/lib/components/accordion/accordion-content/AccordionContent.d.ts +16 -2
  15. package/lib/components/accordion/accordion-content/AccordionContent.js +13 -11
  16. package/lib/components/accordion/accordion-content/AccordionContent.js.map +1 -1
  17. package/lib/components/accordion/accordion-content/AccordionContent.styles.d.ts +2 -1
  18. package/lib/components/accordion/accordion-content/AccordionContent.styles.js +24 -14
  19. package/lib/components/accordion/accordion-content/AccordionContent.styles.js.map +1 -1
  20. package/lib/components/accordion/accordion-group/AccordionGroup.d.ts +10 -2
  21. package/lib/components/accordion/accordion-group/AccordionGroup.js +31 -44
  22. package/lib/components/accordion/accordion-group/AccordionGroup.js.map +1 -1
  23. package/lib/components/accordion/accordion-head/AccordionHead.d.ts +5 -2
  24. package/lib/components/accordion/accordion-head/AccordionHead.js +74 -58
  25. package/lib/components/accordion/accordion-head/AccordionHead.js.map +1 -1
  26. package/lib/components/accordion/accordion-head/AccordionHead.styles.d.ts +9 -1
  27. package/lib/components/accordion/accordion-head/AccordionHead.styles.js +138 -45
  28. package/lib/components/accordion/accordion-head/AccordionHead.styles.js.map +1 -1
  29. package/lib/components/accordion/accordion-intro/AccordionIntro.d.ts +9 -0
  30. package/lib/components/accordion/accordion-intro/AccordionIntro.js +21 -0
  31. package/lib/components/accordion/accordion-intro/AccordionIntro.js.map +1 -0
  32. package/lib/components/accordion/accordion-intro/AccordionIntro.styles.d.ts +1 -0
  33. package/lib/components/accordion/accordion-intro/AccordionIntro.styles.js +13 -0
  34. package/lib/components/accordion/accordion-intro/AccordionIntro.styles.js.map +1 -0
  35. package/lib/components/accordion/utils.js +10 -12
  36. package/lib/components/accordion/utils.js.map +1 -1
  37. package/lib/components/amount-control/AmountControl.d.ts +21 -0
  38. package/lib/components/amount-control/AmountControl.js +102 -0
  39. package/lib/components/amount-control/AmountControl.js.map +1 -0
  40. package/lib/components/amount-control/AmountControl.styles.d.ts +11 -0
  41. package/lib/components/amount-control/AmountControl.styles.js +50 -0
  42. package/lib/components/amount-control/AmountControl.styles.js.map +1 -0
  43. package/lib/components/amount-control/utils/amountControl.d.ts +7 -0
  44. package/lib/components/amount-control/utils/amountControl.js +22 -0
  45. package/lib/components/amount-control/utils/amountControl.js.map +1 -0
  46. package/lib/components/badge/Badge.d.ts +9 -1
  47. package/lib/components/badge/Badge.js +12 -12
  48. package/lib/components/badge/Badge.js.map +1 -1
  49. package/lib/components/badge/Badge.styles.d.ts +4 -1
  50. package/lib/components/badge/Badge.styles.js +22 -15
  51. package/lib/components/badge/Badge.styles.js.map +1 -1
  52. package/lib/components/button/Button.d.ts +2 -2
  53. package/lib/components/button/Button.js +12 -20
  54. package/lib/components/button/Button.js.map +1 -1
  55. package/lib/components/button/Button.styles.js +46 -23
  56. package/lib/components/button/Button.styles.js.map +1 -1
  57. package/lib/components/checkbox/Checkbox.d.ts +25 -0
  58. package/lib/components/checkbox/Checkbox.js +44 -0
  59. package/lib/components/checkbox/Checkbox.js.map +1 -0
  60. package/lib/components/checkbox/Checkbox.styles.d.ts +6 -0
  61. package/lib/components/checkbox/Checkbox.styles.js +131 -0
  62. package/lib/components/checkbox/Checkbox.styles.js.map +1 -0
  63. package/lib/components/color-scheme-provider/ColorSchemeProvider.d.ts +2 -2
  64. package/lib/components/color-scheme-provider/ColorSchemeProvider.js +44 -81
  65. package/lib/components/color-scheme-provider/ColorSchemeProvider.js.map +1 -1
  66. package/lib/components/color-scheme-provider/font.d.ts +6 -0
  67. package/lib/components/color-scheme-provider/font.js +59 -0
  68. package/lib/components/color-scheme-provider/font.js.map +1 -0
  69. package/lib/components/context-menu/ContextMenu.d.ts +51 -0
  70. package/lib/components/context-menu/ContextMenu.js +157 -0
  71. package/lib/components/context-menu/ContextMenu.js.map +1 -0
  72. package/lib/components/context-menu/ContextMenu.styles.d.ts +1 -0
  73. package/lib/components/context-menu/ContextMenu.styles.js +13 -0
  74. package/lib/components/context-menu/ContextMenu.styles.js.map +1 -0
  75. package/lib/components/context-menu/constants/alignment.d.ts +8 -0
  76. package/lib/components/context-menu/constants/alignment.js +17 -0
  77. package/lib/components/context-menu/constants/alignment.js.map +1 -0
  78. package/lib/components/context-menu/context-menu-content/ContextMenuContent.d.ts +10 -0
  79. package/lib/components/context-menu/context-menu-content/ContextMenuContent.js +78 -0
  80. package/lib/components/context-menu/context-menu-content/ContextMenuContent.js.map +1 -0
  81. package/lib/components/context-menu/context-menu-content/ContextMenuContent.styles.d.ts +11 -0
  82. package/lib/components/context-menu/context-menu-content/ContextMenuContent.styles.js +117 -0
  83. package/lib/components/context-menu/context-menu-content/ContextMenuContent.styles.js.map +1 -0
  84. package/lib/components/grid-image/GridImage.d.ts +2 -2
  85. package/lib/components/grid-image/GridImage.js +15 -52
  86. package/lib/components/grid-image/GridImage.js.map +1 -1
  87. package/lib/components/grid-image/GridImage.styles.d.ts +3 -3
  88. package/lib/components/grid-image/GridImage.styles.js +82 -38
  89. package/lib/components/grid-image/GridImage.styles.js.map +1 -1
  90. package/lib/components/icon/Icon.d.ts +3 -3
  91. package/lib/components/icon/Icon.js +22 -34
  92. package/lib/components/icon/Icon.js.map +1 -1
  93. package/lib/components/icon/Icon.styles.d.ts +1 -1
  94. package/lib/components/icon/Icon.styles.js +61 -39
  95. package/lib/components/icon/Icon.styles.js.map +1 -1
  96. package/lib/components/icon/utils.js +2 -5
  97. package/lib/components/icon/utils.js.map +1 -1
  98. package/lib/components/input/Input.d.ts +37 -0
  99. package/lib/components/input/Input.js +75 -0
  100. package/lib/components/input/Input.js.map +1 -0
  101. package/lib/components/input/Input.styles.d.ts +7 -0
  102. package/lib/components/input/Input.styles.js +71 -0
  103. package/lib/components/input/Input.styles.js.map +1 -0
  104. package/lib/components/list/List.d.ts +1 -1
  105. package/lib/components/list/List.js +26 -63
  106. package/lib/components/list/List.js.map +1 -1
  107. package/lib/components/list/list-item/ListItem.d.ts +11 -2
  108. package/lib/components/list/list-item/ListItem.js +36 -52
  109. package/lib/components/list/list-item/ListItem.js.map +1 -1
  110. package/lib/components/list/list-item/ListItem.styles.js +44 -26
  111. package/lib/components/list/list-item/ListItem.styles.js.map +1 -1
  112. package/lib/components/list/list-item/list-item-body/ListItemBody.js +8 -8
  113. package/lib/components/list/list-item/list-item-body/ListItemBody.js.map +1 -1
  114. package/lib/components/list/list-item/list-item-body/ListItemBody.styles.js +3 -9
  115. package/lib/components/list/list-item/list-item-body/ListItemBody.styles.js.map +1 -1
  116. package/lib/components/list/list-item/list-item-content/ListItemContent.js +4 -7
  117. package/lib/components/list/list-item/list-item-content/ListItemContent.js.map +1 -1
  118. package/lib/components/list/list-item/list-item-content/ListItemContent.styles.js +8 -11
  119. package/lib/components/list/list-item/list-item-content/ListItemContent.styles.js.map +1 -1
  120. package/lib/components/list/list-item/list-item-head/ListItemHead.d.ts +3 -2
  121. package/lib/components/list/list-item/list-item-head/ListItemHead.js +45 -91
  122. package/lib/components/list/list-item/list-item-head/ListItemHead.js.map +1 -1
  123. package/lib/components/list/list-item/list-item-head/ListItemHead.styles.d.ts +2 -11
  124. package/lib/components/list/list-item/list-item-head/ListItemHead.styles.js +89 -79
  125. package/lib/components/list/list-item/list-item-head/ListItemHead.styles.js.map +1 -1
  126. package/lib/components/list/list-item/list-item-head/list-item-icon/ListItemIcon.d.ts +6 -0
  127. package/lib/components/list/list-item/list-item-head/list-item-icon/ListItemIcon.js +23 -0
  128. package/lib/components/list/list-item/list-item-head/list-item-icon/ListItemIcon.js.map +1 -0
  129. package/lib/components/list/list-item/list-item-head/list-item-icon/ListItemIcon.styles.d.ts +1 -0
  130. package/lib/components/list/list-item/list-item-head/list-item-icon/ListItemIcon.styles.js +32 -0
  131. package/lib/components/list/list-item/list-item-head/list-item-icon/ListItemIcon.styles.js.map +1 -0
  132. package/lib/components/list/list-item/list-item-head/list-item-image/ListItemImage.d.ts +7 -0
  133. package/lib/components/list/list-item/list-item-head/list-item-image/ListItemImage.js +44 -0
  134. package/lib/components/list/list-item/list-item-head/list-item-image/ListItemImage.js.map +1 -0
  135. package/lib/components/list/list-item/list-item-head/list-item-image/ListItemImage.styles.d.ts +10 -0
  136. package/lib/components/list/list-item/list-item-head/list-item-image/ListItemImage.styles.js +52 -0
  137. package/lib/components/list/list-item/list-item-head/list-item-image/ListItemImage.styles.js.map +1 -0
  138. package/lib/components/mention-finder/MentionFinder.d.ts +31 -0
  139. package/lib/components/mention-finder/MentionFinder.js +141 -0
  140. package/lib/components/mention-finder/MentionFinder.js.map +1 -0
  141. package/lib/components/mention-finder/MentionFinder.styles.d.ts +5 -0
  142. package/lib/components/mention-finder/MentionFinder.styles.js +94 -0
  143. package/lib/components/mention-finder/MentionFinder.styles.js.map +1 -0
  144. package/lib/components/mention-finder/constants/alignment.d.ts +4 -0
  145. package/lib/components/mention-finder/constants/alignment.js +13 -0
  146. package/lib/components/mention-finder/constants/alignment.js.map +1 -0
  147. package/lib/components/mention-finder/mention-finder-item/MentionFinderItem.d.ts +10 -0
  148. package/lib/components/mention-finder/mention-finder-item/MentionFinderItem.js +32 -0
  149. package/lib/components/mention-finder/mention-finder-item/MentionFinderItem.js.map +1 -0
  150. package/lib/components/mention-finder/mention-finder-item/MentionFinderItem.styles.d.ts +8 -0
  151. package/lib/components/mention-finder/mention-finder-item/MentionFinderItem.styles.js +100 -0
  152. package/lib/components/mention-finder/mention-finder-item/MentionFinderItem.styles.js.map +1 -0
  153. package/lib/components/sharing-bar/SharingBar.d.ts +9 -0
  154. package/lib/components/sharing-bar/SharingBar.js +111 -0
  155. package/lib/components/sharing-bar/SharingBar.js.map +1 -0
  156. package/lib/components/sharing-bar/SharingBar.styles.d.ts +3 -0
  157. package/lib/components/sharing-bar/SharingBar.styles.js +20 -0
  158. package/lib/components/sharing-bar/SharingBar.styles.js.map +1 -0
  159. package/lib/components/slider/Slider.d.ts +21 -0
  160. package/lib/components/slider/Slider.js +59 -0
  161. package/lib/components/slider/Slider.js.map +1 -0
  162. package/lib/components/slider/Slider.styles.d.ts +8 -0
  163. package/lib/components/slider/Slider.styles.js +76 -0
  164. package/lib/components/slider/Slider.styles.js.map +1 -0
  165. package/lib/components/small-wait-cursor/SmallWaitCursor.d.ts +22 -0
  166. package/lib/components/small-wait-cursor/SmallWaitCursor.js +34 -0
  167. package/lib/components/small-wait-cursor/SmallWaitCursor.js.map +1 -0
  168. package/lib/components/small-wait-cursor/SmallWaitCursor.styles.d.ts +13 -0
  169. package/lib/components/small-wait-cursor/SmallWaitCursor.styles.js +72 -0
  170. package/lib/components/small-wait-cursor/SmallWaitCursor.styles.js.map +1 -0
  171. package/lib/hooks/uuid.js +2 -21
  172. package/lib/hooks/uuid.js.map +1 -1
  173. package/lib/index.d.ts +12 -0
  174. package/lib/index.js +89 -23
  175. package/lib/index.js.map +1 -1
  176. package/lib/types/chayns.d.ts +59 -0
  177. package/lib/types/chayns.js +14 -0
  178. package/lib/types/chayns.js.map +1 -0
  179. package/package.json +22 -18
@@ -1,5 +1,9 @@
1
1
  import { FC, ReactNode } from 'react';
2
- declare type BadgeProps = {
2
+ export type BadgeProps = {
3
+ /**
4
+ * The background color of the badge
5
+ */
6
+ backgroundColor?: string;
3
7
  /**
4
8
  * The content of the badge
5
9
  */
@@ -8,6 +12,10 @@ declare type BadgeProps = {
8
12
  * Additional class names for the badge element
9
13
  */
10
14
  className?: string;
15
+ /**
16
+ * The font color of the badge
17
+ */
18
+ fontColor?: string;
11
19
  };
12
20
  declare const Badge: FC<BadgeProps>;
13
21
  export default Badge;
@@ -4,24 +4,24 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
- var _react = _interopRequireDefault(require("react"));
9
-
10
7
  var _clsx = _interopRequireDefault(require("clsx"));
11
-
8
+ var _react = _interopRequireDefault(require("react"));
12
9
  var _Badge = require("./Badge.styles");
13
-
14
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
-
16
- var Badge = function Badge(_ref) {
17
- var children = _ref.children,
18
- className = _ref.className;
19
- var badgeClasses = (0, _clsx.default)('beta-chayns-badge ellipsis', className);
11
+ const Badge = _ref => {
12
+ let {
13
+ backgroundColor,
14
+ children,
15
+ className,
16
+ fontColor
17
+ } = _ref;
18
+ const badgeClasses = (0, _clsx.default)('beta-chayns-badge ellipsis', className);
20
19
  return /*#__PURE__*/_react.default.createElement(_Badge.StyledBadge, {
21
- className: badgeClasses
20
+ backgroundColor: backgroundColor,
21
+ className: badgeClasses,
22
+ fontColor: fontColor
22
23
  }, children);
23
24
  };
24
-
25
25
  Badge.displayName = 'Badge';
26
26
  var _default = Badge;
27
27
  exports.default = _default;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/badge/Badge.tsx"],"names":["Badge","children","className","badgeClasses","displayName"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;AAaA,IAAMA,KAAqB,GAAG,SAAxBA,KAAwB,OAA6B;AAAA,MAA1BC,QAA0B,QAA1BA,QAA0B;AAAA,MAAhBC,SAAgB,QAAhBA,SAAgB;AACvD,MAAMC,YAAY,GAAG,mBAAK,4BAAL,EAAmCD,SAAnC,CAArB;AAEA,sBAAO,6BAAC,kBAAD;AAAa,IAAA,SAAS,EAAEC;AAAxB,KAAuCF,QAAvC,CAAP;AACH,CAJD;;AAMAD,KAAK,CAACI,WAAN,GAAoB,OAApB;eAEeJ,K","sourcesContent":["import React, { FC, ReactNode } from 'react';\nimport clsx from 'clsx';\nimport { StyledBadge } from './Badge.styles';\n\ntype BadgeProps = {\n /**\n * The content of the badge\n */\n children: ReactNode;\n /**\n * Additional class names for the badge element\n */\n className?: string;\n};\n\nconst Badge: FC<BadgeProps> = ({ children, className }) => {\n const badgeClasses = clsx('beta-chayns-badge ellipsis', className);\n\n return <StyledBadge className={badgeClasses}>{children}</StyledBadge>;\n};\n\nBadge.displayName = 'Badge';\n\nexport default Badge;\n"],"file":"Badge.js"}
1
+ {"version":3,"file":"Badge.js","names":["_clsx","_interopRequireDefault","require","_react","_Badge","obj","__esModule","default","Badge","_ref","backgroundColor","children","className","fontColor","badgeClasses","clsx","createElement","StyledBadge","displayName","_default","exports"],"sources":["../../../src/components/badge/Badge.tsx"],"sourcesContent":["import clsx from 'clsx';\nimport React, { FC, ReactNode } from 'react';\nimport { StyledBadge } from './Badge.styles';\n\nexport type BadgeProps = {\n /**\n * The background color of the badge\n */\n backgroundColor?: string;\n /**\n * The content of the badge\n */\n children: ReactNode;\n /**\n * Additional class names for the badge element\n */\n className?: string;\n /**\n * The font color of the badge\n */\n fontColor?: string;\n};\n\nconst Badge: FC<BadgeProps> = ({ backgroundColor, children, className, fontColor }) => {\n const badgeClasses = clsx('beta-chayns-badge ellipsis', className);\n\n return (\n <StyledBadge\n backgroundColor={backgroundColor}\n className={badgeClasses}\n fontColor={fontColor}\n >\n {children}\n </StyledBadge>\n );\n};\n\nBadge.displayName = 'Badge';\n\nexport default Badge;\n"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAA6C,SAAAD,uBAAAI,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAqB7C,MAAMG,KAAqB,GAAGC,IAAA,IAAyD;EAAA,IAAxD;IAAEC,eAAe;IAAEC,QAAQ;IAAEC,SAAS;IAAEC;EAAU,CAAC,GAAAJ,IAAA;EAC9E,MAAMK,YAAY,GAAG,IAAAC,aAAI,EAAC,4BAA4B,EAAEH,SAAS,CAAC;EAElE,oBACIT,MAAA,CAAAI,OAAA,CAAAS,aAAA,CAACZ,MAAA,CAAAa,WAAW;IACRP,eAAe,EAAEA,eAAgB;IACjCE,SAAS,EAAEE,YAAa;IACxBD,SAAS,EAAEA;EAAU,GAEpBF,QACQ,CAAC;AAEtB,CAAC;AAEDH,KAAK,CAACU,WAAW,GAAG,OAAO;AAAC,IAAAC,QAAA,GAEbX,KAAK;AAAAY,OAAA,CAAAb,OAAA,GAAAY,QAAA"}
@@ -1 +1,4 @@
1
- export declare const StyledBadge: import("styled-components").StyledComponent<"div", any, {}, never>;
1
+ import type { BadgeProps } from './Badge';
2
+ export declare const StyledBadge: import("styled-components").StyledComponent<"div", any, Pick<BadgeProps, "backgroundColor" | "fontColor"> & {
3
+ theme: import("../color-scheme-provider/ColorSchemeProvider").Theme;
4
+ }, never>;
@@ -4,22 +4,29 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.StyledBadge = void 0;
7
-
8
7
  var _styledComponents = _interopRequireDefault(require("styled-components"));
9
-
10
- var _templateObject;
11
-
12
8
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
-
14
- function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
15
-
16
- var StyledBadge = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background-color: ", ";\n border-radius: 15px;\n color: ", ";\n font-size: 0.8rem;\n min-width: 1.65rem;\n padding: 2px 7px;\n text-align: center;\n"])), function (_ref) {
17
- var theme = _ref.theme;
18
- return theme['secondary-202'];
19
- }, function (_ref2) {
20
- var theme = _ref2.theme;
21
- return theme['007'];
22
- });
23
-
9
+ const StyledBadge = _styledComponents.default.div`
10
+ background-color: ${_ref => {
11
+ let {
12
+ backgroundColor,
13
+ theme
14
+ } = _ref;
15
+ return backgroundColor !== null && backgroundColor !== void 0 ? backgroundColor : theme['secondary-202'];
16
+ }};
17
+ border-radius: 15px;
18
+ color: ${_ref2 => {
19
+ let {
20
+ fontColor,
21
+ theme
22
+ } = _ref2;
23
+ return fontColor !== null && fontColor !== void 0 ? fontColor : theme['007'];
24
+ }};
25
+ display: inline-block;
26
+ font-size: 0.8rem;
27
+ min-width: 1.65rem;
28
+ padding: 2px 7px;
29
+ text-align: center;
30
+ `;
24
31
  exports.StyledBadge = StyledBadge;
25
32
  //# sourceMappingURL=Badge.styles.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/badge/Badge.styles.ts"],"names":["StyledBadge","styled","div","theme"],"mappings":";;;;;;;AAAA;;;;;;;;AAKO,IAAMA,WAAW,GAAGC,0BAAOC,GAAV,kPACA;AAAA,MAAGC,KAAH,QAAGA,KAAH;AAAA,SAAiCA,KAAK,CAAC,eAAD,CAAtC;AAAA,CADA,EAGX;AAAA,MAAGA,KAAH,SAAGA,KAAH;AAAA,SAAiCA,KAAK,CAAC,KAAD,CAAtC;AAAA,CAHW,CAAjB","sourcesContent":["import styled from 'styled-components';\nimport type { WithTheme } from '../color-scheme-provider/ColorSchemeProvider';\n\ntype StyledBadgeProps = WithTheme<unknown>;\n\nexport const StyledBadge = styled.div`\n background-color: ${({ theme }: StyledBadgeProps) => theme['secondary-202']};\n border-radius: 15px;\n color: ${({ theme }: StyledBadgeProps) => theme['007']};\n font-size: 0.8rem;\n min-width: 1.65rem;\n padding: 2px 7px;\n text-align: center;\n`;\n"],"file":"Badge.styles.js"}
1
+ {"version":3,"file":"Badge.styles.js","names":["_styledComponents","_interopRequireDefault","require","obj","__esModule","default","StyledBadge","styled","div","_ref","backgroundColor","theme","_ref2","fontColor","exports"],"sources":["../../../src/components/badge/Badge.styles.ts"],"sourcesContent":["import styled from 'styled-components';\nimport type { WithTheme } from '../color-scheme-provider/ColorSchemeProvider';\nimport type { BadgeProps } from './Badge';\n\ntype StyledBadgeProps = WithTheme<Pick<BadgeProps, 'backgroundColor' | 'fontColor'>>;\n\nexport const StyledBadge = styled.div<StyledBadgeProps>`\n background-color: ${({ backgroundColor, theme }: StyledBadgeProps) =>\n backgroundColor ?? theme['secondary-202']};\n border-radius: 15px;\n color: ${({ fontColor, theme }: StyledBadgeProps) => fontColor ?? theme['007']};\n display: inline-block;\n font-size: 0.8rem;\n min-width: 1.65rem;\n padding: 2px 7px;\n text-align: center;\n`;\n"],"mappings":";;;;;;AAAA,IAAAA,iBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAuC,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAMhC,MAAMG,WAAW,GAAGC,yBAAM,CAACC,GAAsB;AACxD,wBAAwBC,IAAA;EAAA,IAAC;IAAEC,eAAe;IAAEC;EAAwB,CAAC,GAAAF,IAAA;EAAA,OAC7DC,eAAe,aAAfA,eAAe,cAAfA,eAAe,GAAIC,KAAK,CAAC,eAAe,CAAC;AAAA,CAAC;AAClD;AACA,aAAaC,KAAA;EAAA,IAAC;IAAEC,SAAS;IAAEF;EAAwB,CAAC,GAAAC,KAAA;EAAA,OAAKC,SAAS,aAATA,SAAS,cAATA,SAAS,GAAIF,KAAK,CAAC,KAAK,CAAC;AAAA,CAAC;AACnF;AACA;AACA;AACA;AACA;AACA,CAAC;AAACG,OAAA,CAAAR,WAAA,GAAAA,WAAA"}
@@ -1,5 +1,5 @@
1
1
  import { FC, MouseEventHandler, ReactNode } from 'react';
2
- export declare type ButtonProps = {
2
+ export type ButtonProps = {
3
3
  /**
4
4
  * The label of the button
5
5
  */
@@ -9,7 +9,7 @@ export declare type ButtonProps = {
9
9
  */
10
10
  className?: string;
11
11
  /**
12
- * An icon that is displayed on the left hand side of the button text
12
+ * An icon that is displayed on the left-hand side of the button text
13
13
  */
14
14
  icon?: string;
15
15
  /**
@@ -4,35 +4,28 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  var _clsx = _interopRequireDefault(require("clsx"));
9
-
10
8
  var _react = _interopRequireDefault(require("react"));
11
-
12
9
  var _Icon = _interopRequireDefault(require("../icon/Icon"));
13
-
14
10
  var _Button = require("./Button.styles");
15
-
16
11
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
-
18
- var Button = function Button(_ref) {
19
- var children = _ref.children,
20
- className = _ref.className,
21
- icon = _ref.icon,
22
- isDisabled = _ref.isDisabled,
23
- isSecondary = _ref.isSecondary,
24
- onClick = _ref.onClick,
25
- shouldStopPropagation = _ref.shouldStopPropagation;
26
-
27
- var handleClick = function handleClick(event) {
12
+ const Button = _ref => {
13
+ let {
14
+ children,
15
+ className,
16
+ icon,
17
+ isDisabled,
18
+ isSecondary,
19
+ onClick,
20
+ shouldStopPropagation
21
+ } = _ref;
22
+ const handleClick = event => {
28
23
  if (shouldStopPropagation) {
29
24
  event.stopPropagation();
30
25
  }
31
-
32
26
  onClick(event);
33
27
  };
34
-
35
- var buttonClasses = (0, _clsx.default)('beta-chayns-button ellipsis', className);
28
+ const buttonClasses = (0, _clsx.default)('beta-chayns-button ellipsis', className);
36
29
  return /*#__PURE__*/_react.default.createElement(_Button.StyledButton, {
37
30
  className: buttonClasses,
38
31
  disabled: isDisabled,
@@ -44,7 +37,6 @@ var Button = function Button(_ref) {
44
37
  icons: [icon]
45
38
  })), children));
46
39
  };
47
-
48
40
  Button.displayName = 'Button';
49
41
  var _default = Button;
50
42
  exports.default = _default;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/button/Button.tsx"],"names":["Button","children","className","icon","isDisabled","isSecondary","onClick","shouldStopPropagation","handleClick","event","stopPropagation","buttonClasses","displayName"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;;;AAiCA,IAAMA,MAAuB,GAAG,SAA1BA,MAA0B,OAQ1B;AAAA,MAPFC,QAOE,QAPFA,QAOE;AAAA,MANFC,SAME,QANFA,SAME;AAAA,MALFC,IAKE,QALFA,IAKE;AAAA,MAJFC,UAIE,QAJFA,UAIE;AAAA,MAHFC,WAGE,QAHFA,WAGE;AAAA,MAFFC,OAEE,QAFFA,OAEE;AAAA,MADFC,qBACE,QADFA,qBACE;;AACF,MAAMC,WAAiD,GAAG,SAApDA,WAAoD,CAACC,KAAD,EAAW;AACjE,QAAIF,qBAAJ,EAA2B;AACvBE,MAAAA,KAAK,CAACC,eAAN;AACH;;AAEDJ,IAAAA,OAAO,CAACG,KAAD,CAAP;AACH,GAND;;AAQA,MAAME,aAAa,GAAG,mBAAK,6BAAL,EAAoCT,SAApC,CAAtB;AAEA,sBACI,6BAAC,oBAAD;AACI,IAAA,SAAS,EAAES,aADf;AAEI,IAAA,QAAQ,EAAEP,UAFd;AAGI,IAAA,OAAO,EAAE,OAAOD,IAAP,KAAgB,QAAhB,IAA4BA,IAAI,KAAK,EAHlD;AAII,IAAA,WAAW,EAAEE,WAJjB;AAKI,IAAA,OAAO,EAAEG;AALb,kBAOI,4DACKL,IAAI,iBACD,6BAAC,yBAAD,qBACI,6BAAC,aAAD;AAAM,IAAA,KAAK,EAAC,OAAZ;AAAoB,IAAA,KAAK,EAAE,CAACA,IAAD;AAA3B,IADJ,CAFR,EAMKF,QANL,CAPJ,CADJ;AAkBH,CArCD;;AAuCAD,MAAM,CAACY,WAAP,GAAqB,QAArB;eAEeZ,M","sourcesContent":["import clsx from 'clsx';\nimport React, { FC, MouseEventHandler, ReactNode } from 'react';\nimport Icon from '../icon/Icon';\nimport { StyledButton, StyledIconWrapper } from './Button.styles';\n\nexport type ButtonProps = {\n /**\n * The label of the button\n */\n children: ReactNode;\n /**\n * Additional class names for the button element\n */\n className?: string;\n /**\n * An icon that is displayed on the left hand side of the button text\n */\n icon?: string;\n /**\n * Disables the button so that it cannot be clicked anymore\n */\n isDisabled?: boolean;\n /**\n * Displays the button in the secondary style\n */\n isSecondary?: boolean;\n /**\n * Function to be executed when the button is clicked\n */\n onClick: MouseEventHandler<HTMLButtonElement>;\n /**\n * Stops event propagation on click\n */\n shouldStopPropagation?: boolean;\n};\n\nconst Button: FC<ButtonProps> = ({\n children,\n className,\n icon,\n isDisabled,\n isSecondary,\n onClick,\n shouldStopPropagation,\n}) => {\n const handleClick: MouseEventHandler<HTMLButtonElement> = (event) => {\n if (shouldStopPropagation) {\n event.stopPropagation();\n }\n\n onClick(event);\n };\n\n const buttonClasses = clsx('beta-chayns-button ellipsis', className);\n\n return (\n <StyledButton\n className={buttonClasses}\n disabled={isDisabled}\n hasIcon={typeof icon === 'string' && icon !== ''}\n isSecondary={isSecondary}\n onClick={handleClick}\n >\n <>\n {icon && (\n <StyledIconWrapper>\n <Icon color=\"white\" icons={[icon]} />\n </StyledIconWrapper>\n )}\n {children}\n </>\n </StyledButton>\n );\n};\n\nButton.displayName = 'Button';\n\nexport default Button;\n"],"file":"Button.js"}
1
+ {"version":3,"file":"Button.js","names":["_clsx","_interopRequireDefault","require","_react","_Icon","_Button","obj","__esModule","default","Button","_ref","children","className","icon","isDisabled","isSecondary","onClick","shouldStopPropagation","handleClick","event","stopPropagation","buttonClasses","clsx","createElement","StyledButton","disabled","hasIcon","Fragment","StyledIconWrapper","color","icons","displayName","_default","exports"],"sources":["../../../src/components/button/Button.tsx"],"sourcesContent":["import clsx from 'clsx';\nimport React, { FC, MouseEventHandler, ReactNode } from 'react';\nimport Icon from '../icon/Icon';\nimport { StyledButton, StyledIconWrapper } from './Button.styles';\n\nexport type ButtonProps = {\n /**\n * The label of the button\n */\n children: ReactNode;\n /**\n * Additional class names for the button element\n */\n className?: string;\n /**\n * An icon that is displayed on the left-hand side of the button text\n */\n icon?: string;\n /**\n * Disables the button so that it cannot be clicked anymore\n */\n isDisabled?: boolean;\n /**\n * Displays the button in the secondary style\n */\n isSecondary?: boolean;\n /**\n * Function to be executed when the button is clicked\n */\n onClick: MouseEventHandler<HTMLButtonElement>;\n /**\n * Stops event propagation on click\n */\n shouldStopPropagation?: boolean;\n};\n\nconst Button: FC<ButtonProps> = ({\n children,\n className,\n icon,\n isDisabled,\n isSecondary,\n onClick,\n shouldStopPropagation,\n}) => {\n const handleClick: MouseEventHandler<HTMLButtonElement> = (event) => {\n if (shouldStopPropagation) {\n event.stopPropagation();\n }\n\n onClick(event);\n };\n\n const buttonClasses = clsx('beta-chayns-button ellipsis', className);\n\n return (\n <StyledButton\n className={buttonClasses}\n disabled={isDisabled}\n hasIcon={typeof icon === 'string' && icon !== ''}\n isSecondary={isSecondary}\n onClick={handleClick}\n >\n <>\n {icon && (\n <StyledIconWrapper>\n <Icon color=\"white\" icons={[icon]} />\n </StyledIconWrapper>\n )}\n {children}\n </>\n </StyledButton>\n );\n};\n\nButton.displayName = 'Button';\n\nexport default Button;\n"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,KAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AAAkE,SAAAD,uBAAAK,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAiClE,MAAMG,MAAuB,GAAGC,IAAA,IAQ1B;EAAA,IAR2B;IAC7BC,QAAQ;IACRC,SAAS;IACTC,IAAI;IACJC,UAAU;IACVC,WAAW;IACXC,OAAO;IACPC;EACJ,CAAC,GAAAP,IAAA;EACG,MAAMQ,WAAiD,GAAIC,KAAK,IAAK;IACjE,IAAIF,qBAAqB,EAAE;MACvBE,KAAK,CAACC,eAAe,CAAC,CAAC;IAC3B;IAEAJ,OAAO,CAACG,KAAK,CAAC;EAClB,CAAC;EAED,MAAME,aAAa,GAAG,IAAAC,aAAI,EAAC,6BAA6B,EAAEV,SAAS,CAAC;EAEpE,oBACIT,MAAA,CAAAK,OAAA,CAAAe,aAAA,CAAClB,OAAA,CAAAmB,YAAY;IACTZ,SAAS,EAAES,aAAc;IACzBI,QAAQ,EAAEX,UAAW;IACrBY,OAAO,EAAE,OAAOb,IAAI,KAAK,QAAQ,IAAIA,IAAI,KAAK,EAAG;IACjDE,WAAW,EAAEA,WAAY;IACzBC,OAAO,EAAEE;EAAY,gBAErBf,MAAA,CAAAK,OAAA,CAAAe,aAAA,CAAApB,MAAA,CAAAK,OAAA,CAAAmB,QAAA,QACKd,IAAI,iBACDV,MAAA,CAAAK,OAAA,CAAAe,aAAA,CAAClB,OAAA,CAAAuB,iBAAiB,qBACdzB,MAAA,CAAAK,OAAA,CAAAe,aAAA,CAACnB,KAAA,CAAAI,OAAI;IAACqB,KAAK,EAAC,OAAO;IAACC,KAAK,EAAE,CAACjB,IAAI;EAAE,CAAE,CACrB,CACtB,EACAF,QACH,CACQ,CAAC;AAEvB,CAAC;AAEDF,MAAM,CAACsB,WAAW,GAAG,QAAQ;AAAC,IAAAC,QAAA,GAEfvB,MAAM;AAAAwB,OAAA,CAAAzB,OAAA,GAAAwB,QAAA"}
@@ -4,34 +4,57 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.StyledIconWrapper = exports.StyledButton = void 0;
7
-
8
7
  var _styledComponents = _interopRequireDefault(require("styled-components"));
9
-
10
- var _templateObject, _templateObject2;
11
-
12
8
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
-
14
- function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
15
-
16
- var StyledButton = _styledComponents.default.button(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background-color: ", ";\n border-radius: 3px;\n box-shadow: 1px 2px 3px rgba(0, 0, 0, 0.2);\n border: none;\n color: ", ";\n cursor: pointer;\n display: inline-block;\n line-height: 1.15;\n min-height: 30px;\n opacity: ", ";\n padding: ", ";\n position: relative;\n user-select: none;\n transition: opacity 0.3s ease;\n"])), function (_ref) {
17
- var isSecondary = _ref.isSecondary,
18
- theme = _ref.theme;
9
+ const StyledButton = _styledComponents.default.button`
10
+ background-color: ${_ref => {
11
+ let {
12
+ isSecondary,
13
+ theme
14
+ } = _ref;
19
15
  return isSecondary ? theme['202'] : theme['408'];
20
- }, function (_ref2) {
21
- var isSecondary = _ref2.isSecondary,
22
- theme = _ref2.theme;
16
+ }};
17
+ border-radius: 3px;
18
+ box-shadow: 1px 2px 3px rgba(0, 0, 0, 0.2);
19
+ border: none;
20
+ color: ${_ref2 => {
21
+ let {
22
+ isSecondary,
23
+ theme
24
+ } = _ref2;
23
25
  return isSecondary ? theme.text : 'white';
24
- }, function (_ref3) {
25
- var disabled = _ref3.disabled;
26
+ }};
27
+ cursor: pointer;
28
+ display: inline-block;
29
+ line-height: 1.15;
30
+ min-height: 30px;
31
+ opacity: ${_ref3 => {
32
+ let {
33
+ disabled
34
+ } = _ref3;
26
35
  return disabled ? 0.5 : 1;
27
- }, function (_ref4) {
28
- var hasIcon = _ref4.hasIcon;
29
- return "7px 12px 7px ".concat(hasIcon ? '42px' : '12px');
30
- });
31
-
36
+ }};
37
+ padding: ${_ref4 => {
38
+ let {
39
+ hasIcon
40
+ } = _ref4;
41
+ return `7px 12px 7px ${hasIcon ? '42px' : '12px'}`;
42
+ }};
43
+ position: relative;
44
+ user-select: none;
45
+ transition: opacity 0.3s ease;
46
+ `;
32
47
  exports.StyledButton = StyledButton;
33
-
34
- var StyledIconWrapper = _styledComponents.default.span(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n align-items: center;\n background-color: rgba(255, 255, 255, 0.2);\n bottom: 0;\n display: flex;\n justify-content: center;\n left: 0;\n position: absolute;\n top: 0;\n width: 30px;\n"])));
35
-
48
+ const StyledIconWrapper = _styledComponents.default.span`
49
+ align-items: center;
50
+ background-color: rgba(255, 255, 255, 0.2);
51
+ bottom: 0;
52
+ display: flex;
53
+ justify-content: center;
54
+ left: 0;
55
+ position: absolute;
56
+ top: 0;
57
+ width: 30px;
58
+ `;
36
59
  exports.StyledIconWrapper = StyledIconWrapper;
37
60
  //# sourceMappingURL=Button.styles.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/button/Button.styles.ts"],"names":["StyledButton","styled","button","isSecondary","theme","text","disabled","hasIcon","StyledIconWrapper","span"],"mappings":";;;;;;;AAAA;;;;;;;;AASO,IAAMA,YAAY,GAAGC,0BAAOC,MAAV,kbACD;AAAA,MAAGC,WAAH,QAAGA,WAAH;AAAA,MAAgBC,KAAhB,QAAgBA,KAAhB;AAAA,SAChBD,WAAW,GAAGC,KAAK,CAAC,KAAD,CAAR,GAAkBA,KAAK,CAAC,KAAD,CADlB;AAAA,CADC,EAMZ;AAAA,MAAGD,WAAH,SAAGA,WAAH;AAAA,MAAgBC,KAAhB,SAAgBA,KAAhB;AAAA,SAAgDD,WAAW,GAAGC,KAAK,CAACC,IAAT,GAAgB,OAA3E;AAAA,CANY,EAWV;AAAA,MAAGC,QAAH,SAAGA,QAAH;AAAA,SAAmBA,QAAQ,GAAG,GAAH,GAAS,CAApC;AAAA,CAXU,EAYV;AAAA,MAAGC,OAAH,SAAGA,OAAH;AAAA,gCAAiCA,OAAO,GAAG,MAAH,GAAY,MAApD;AAAA,CAZU,CAAlB;;;;AAkBA,IAAMC,iBAAiB,GAAGP,0BAAOQ,IAAV,4RAAvB","sourcesContent":["import styled from 'styled-components';\nimport type { ButtonProps } from './Button';\nimport type { WithTheme } from '../color-scheme-provider/ColorSchemeProvider';\n\ntype StyledButtonProps = ButtonProps &\n WithTheme<{\n hasIcon: boolean;\n }>;\n\nexport const StyledButton = styled.button<StyledButtonProps>`\n background-color: ${({ isSecondary, theme }: StyledButtonProps) =>\n isSecondary ? theme['202'] : theme['408']};\n border-radius: 3px;\n box-shadow: 1px 2px 3px rgba(0, 0, 0, 0.2);\n border: none;\n color: ${({ isSecondary, theme }: StyledButtonProps) => (isSecondary ? theme.text : 'white')};\n cursor: pointer;\n display: inline-block;\n line-height: 1.15;\n min-height: 30px;\n opacity: ${({ disabled }) => (disabled ? 0.5 : 1)};\n padding: ${({ hasIcon }) => `7px 12px 7px ${hasIcon ? '42px' : '12px'}`};\n position: relative;\n user-select: none;\n transition: opacity 0.3s ease;\n`;\n\nexport const StyledIconWrapper = styled.span`\n align-items: center;\n background-color: rgba(255, 255, 255, 0.2);\n bottom: 0;\n display: flex;\n justify-content: center;\n left: 0;\n position: absolute;\n top: 0;\n width: 30px;\n`;\n"],"file":"Button.styles.js"}
1
+ {"version":3,"file":"Button.styles.js","names":["_styledComponents","_interopRequireDefault","require","obj","__esModule","default","StyledButton","styled","button","_ref","isSecondary","theme","_ref2","text","_ref3","disabled","_ref4","hasIcon","exports","StyledIconWrapper","span"],"sources":["../../../src/components/button/Button.styles.ts"],"sourcesContent":["import styled from 'styled-components';\nimport type { ButtonProps } from './Button';\nimport type { WithTheme } from '../color-scheme-provider/ColorSchemeProvider';\n\ntype StyledButtonProps = ButtonProps &\n WithTheme<{\n hasIcon: boolean;\n }>;\n\nexport const StyledButton = styled.button<StyledButtonProps>`\n background-color: ${({ isSecondary, theme }: StyledButtonProps) =>\n isSecondary ? theme['202'] : theme['408']};\n border-radius: 3px;\n box-shadow: 1px 2px 3px rgba(0, 0, 0, 0.2);\n border: none;\n color: ${({ isSecondary, theme }: StyledButtonProps) => (isSecondary ? theme.text : 'white')};\n cursor: pointer;\n display: inline-block;\n line-height: 1.15;\n min-height: 30px;\n opacity: ${({ disabled }) => (disabled ? 0.5 : 1)};\n padding: ${({ hasIcon }) => `7px 12px 7px ${hasIcon ? '42px' : '12px'}`};\n position: relative;\n user-select: none;\n transition: opacity 0.3s ease;\n`;\n\nexport const StyledIconWrapper = styled.span`\n align-items: center;\n background-color: rgba(255, 255, 255, 0.2);\n bottom: 0;\n display: flex;\n justify-content: center;\n left: 0;\n position: absolute;\n top: 0;\n width: 30px;\n`;\n"],"mappings":";;;;;;AAAA,IAAAA,iBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAuC,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAShC,MAAMG,YAAY,GAAGC,yBAAM,CAACC,MAA0B;AAC7D,wBAAwBC,IAAA;EAAA,IAAC;IAAEC,WAAW;IAAEC;EAAyB,CAAC,GAAAF,IAAA;EAAA,OAC1DC,WAAW,GAAGC,KAAK,CAAC,KAAK,CAAC,GAAGA,KAAK,CAAC,KAAK,CAAC;AAAA,CAAC;AAClD;AACA;AACA;AACA,aAAaC,KAAA;EAAA,IAAC;IAAEF,WAAW;IAAEC;EAAyB,CAAC,GAAAC,KAAA;EAAA,OAAMF,WAAW,GAAGC,KAAK,CAACE,IAAI,GAAG,OAAO;AAAA,CAAE;AACjG;AACA;AACA;AACA;AACA,eAAeC,KAAA;EAAA,IAAC;IAAEC;EAAS,CAAC,GAAAD,KAAA;EAAA,OAAMC,QAAQ,GAAG,GAAG,GAAG,CAAC;AAAA,CAAE;AACtD,eAAeC,KAAA;EAAA,IAAC;IAAEC;EAAQ,CAAC,GAAAD,KAAA;EAAA,OAAM,gBAAeC,OAAO,GAAG,MAAM,GAAG,MAAO,EAAC;AAAA,CAAC;AAC5E;AACA;AACA;AACA,CAAC;AAACC,OAAA,CAAAZ,YAAA,GAAAA,YAAA;AAEK,MAAMa,iBAAiB,GAAGZ,yBAAM,CAACa,IAAK;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAACF,OAAA,CAAAC,iBAAA,GAAAA,iBAAA"}
@@ -0,0 +1,25 @@
1
+ import { ChangeEventHandler, FC, ReactNode } from 'react';
2
+ export type CheckboxProps = {
3
+ /**
4
+ * Text for checkbox or switch
5
+ */
6
+ children?: ReactNode;
7
+ /**
8
+ * Indicates whether the checkbox or switch is selected
9
+ */
10
+ isChecked?: boolean;
11
+ /**
12
+ * Disables the checkbox or switch so it cannot be toggled
13
+ */
14
+ isDisabled?: boolean;
15
+ /**
16
+ * Function to be executed if the checked value changes
17
+ */
18
+ onChange?: ChangeEventHandler<HTMLInputElement>;
19
+ /**
20
+ * Changes the design to use switch instead of checkbox
21
+ */
22
+ shouldShowAsSwitch?: boolean;
23
+ };
24
+ declare const Checkbox: FC<CheckboxProps>;
25
+ export default Checkbox;
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _react = _interopRequireWildcard(require("react"));
8
+ var _uuid = require("../../hooks/uuid");
9
+ var _Checkbox = require("./Checkbox.styles");
10
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
11
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
12
+ const Checkbox = _ref => {
13
+ let {
14
+ children,
15
+ isChecked,
16
+ isDisabled,
17
+ onChange,
18
+ shouldShowAsSwitch
19
+ } = _ref;
20
+ const [isActive, setIsActive] = (0, _react.useState)(isChecked !== null && isChecked !== void 0 ? isChecked : false);
21
+ const handleChange = (0, _react.useCallback)(event => {
22
+ setIsActive(event.target.checked);
23
+ if (typeof onChange === 'function') {
24
+ onChange(event);
25
+ }
26
+ }, [onChange]);
27
+ const uuid = (0, _uuid.useUuid)();
28
+ return /*#__PURE__*/_react.default.createElement(_Checkbox.StyledCheckbox, null, /*#__PURE__*/_react.default.createElement(_Checkbox.StyledCheckboxInput, {
29
+ checked: isChecked,
30
+ disabled: isDisabled,
31
+ id: uuid,
32
+ onChange: handleChange,
33
+ type: "checkbox"
34
+ }), /*#__PURE__*/_react.default.createElement(_Checkbox.StyledCheckboxLabel, {
35
+ htmlFor: uuid,
36
+ isChecked: isChecked !== null && isChecked !== void 0 ? isChecked : isActive,
37
+ isDisabled: isDisabled,
38
+ shouldShowAsSwitch: shouldShowAsSwitch
39
+ }, children));
40
+ };
41
+ Checkbox.displayName = 'Checkbox';
42
+ var _default = Checkbox;
43
+ exports.default = _default;
44
+ //# sourceMappingURL=Checkbox.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Checkbox.js","names":["_react","_interopRequireWildcard","require","_uuid","_Checkbox","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","Checkbox","_ref","children","isChecked","isDisabled","onChange","shouldShowAsSwitch","isActive","setIsActive","useState","handleChange","useCallback","event","target","checked","uuid","useUuid","createElement","StyledCheckbox","StyledCheckboxInput","disabled","id","type","StyledCheckboxLabel","htmlFor","displayName","_default","exports"],"sources":["../../../src/components/checkbox/Checkbox.tsx"],"sourcesContent":["import React, {\n ChangeEvent,\n ChangeEventHandler,\n FC,\n ReactNode,\n useCallback,\n useState,\n} from 'react';\nimport { useUuid } from '../../hooks/uuid';\nimport { StyledCheckbox, StyledCheckboxInput, StyledCheckboxLabel } from './Checkbox.styles';\n\nexport type CheckboxProps = {\n /**\n * Text for checkbox or switch\n */\n children?: ReactNode;\n /**\n * Indicates whether the checkbox or switch is selected\n */\n isChecked?: boolean;\n /**\n * Disables the checkbox or switch so it cannot be toggled\n */\n isDisabled?: boolean;\n /**\n * Function to be executed if the checked value changes\n */\n onChange?: ChangeEventHandler<HTMLInputElement>;\n /**\n * Changes the design to use switch instead of checkbox\n */\n shouldShowAsSwitch?: boolean;\n};\n\nconst Checkbox: FC<CheckboxProps> = ({\n children,\n isChecked,\n isDisabled,\n onChange,\n shouldShowAsSwitch,\n}) => {\n const [isActive, setIsActive] = useState(isChecked ?? false);\n\n const handleChange = useCallback(\n (event: ChangeEvent<HTMLInputElement>) => {\n setIsActive(event.target.checked);\n\n if (typeof onChange === 'function') {\n onChange(event);\n }\n },\n [onChange]\n );\n\n const uuid = useUuid();\n\n return (\n <StyledCheckbox>\n <StyledCheckboxInput\n checked={isChecked}\n disabled={isDisabled}\n id={uuid}\n onChange={handleChange}\n type=\"checkbox\"\n />\n <StyledCheckboxLabel\n htmlFor={uuid}\n isChecked={isChecked ?? isActive}\n isDisabled={isDisabled}\n shouldShowAsSwitch={shouldShowAsSwitch}\n >\n {children}\n </StyledCheckboxLabel>\n </StyledCheckbox>\n );\n};\n\nCheckbox.displayName = 'Checkbox';\n\nexport default Checkbox;\n"],"mappings":"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"}
@@ -0,0 +1,6 @@
1
+ import type { CheckboxProps } from './Checkbox';
2
+ export declare const StyledCheckbox: import("styled-components").StyledComponent<"div", any, {}, never>;
3
+ export declare const StyledCheckboxInput: import("styled-components").StyledComponent<"input", any, {}, never>;
4
+ export declare const StyledCheckboxLabel: import("styled-components").StyledComponent<"label", any, Omit<CheckboxProps, "children" | "onChange"> & {
5
+ theme: import("../color-scheme-provider/ColorSchemeProvider").Theme;
6
+ }, never>;
@@ -0,0 +1,131 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.StyledCheckboxLabel = exports.StyledCheckboxInput = exports.StyledCheckbox = void 0;
7
+ var _styledComponents = _interopRequireWildcard(require("styled-components"));
8
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
9
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
10
+ const StyledCheckbox = _styledComponents.default.div`
11
+ align-items: center;
12
+ display: flex;
13
+ position: relative;
14
+ `;
15
+ exports.StyledCheckbox = StyledCheckbox;
16
+ const StyledCheckboxInput = _styledComponents.default.input`
17
+ display: none;
18
+ `;
19
+ exports.StyledCheckboxInput = StyledCheckboxInput;
20
+ const StyledCheckboxLabel = _styledComponents.default.label`
21
+ color: ${_ref => {
22
+ let {
23
+ theme
24
+ } = _ref;
25
+ return theme.text;
26
+ }};
27
+ cursor: ${_ref2 => {
28
+ let {
29
+ isDisabled
30
+ } = _ref2;
31
+ return isDisabled ? 'default' : 'pointer';
32
+ }};
33
+ opacity: ${_ref3 => {
34
+ let {
35
+ isDisabled
36
+ } = _ref3;
37
+ return isDisabled ? 0.5 : 1;
38
+ }};
39
+ padding-left: ${_ref4 => {
40
+ let {
41
+ shouldShowAsSwitch
42
+ } = _ref4;
43
+ return shouldShowAsSwitch ? '48px' : '20px';
44
+ }};
45
+ transition: opacity 0.2s ease;
46
+ user-select: none;
47
+
48
+ &:after {
49
+ ${_ref5 => {
50
+ let {
51
+ isChecked,
52
+ shouldShowAsSwitch
53
+ } = _ref5;
54
+ return shouldShowAsSwitch ? (0, _styledComponents.css)`
55
+ background-color: white;
56
+ border-radius: 50%;
57
+ box-shadow: 0 1px 4px rgb(0 0 0 / 35%);
58
+ height: 16px;
59
+ left: 7px;
60
+ transform: translateY(-50%) translateX(${isChecked ? '18px' : 0});
61
+ transition: transform 0.2s ease;
62
+ width: 16px;
63
+ ` : (0, _styledComponents.css)`
64
+ border-right: 2px solid #fff;
65
+ border-bottom: 2px solid #fff;
66
+ height: 10px;
67
+ left: 1px;
68
+ opacity: ${isChecked ? 1 : 0};
69
+ transform: translateY(-50%) rotateZ(37deg);
70
+ transition: opacity 0.2s ease;
71
+ width: 5.5px;
72
+ `;
73
+ }}
74
+
75
+ content: ' ';
76
+ position: absolute;
77
+ top: 50%;
78
+ transform-origin: 100% 100%;
79
+ }
80
+
81
+ &:before {
82
+ background-color: ${_ref6 => {
83
+ let {
84
+ isChecked,
85
+ shouldShowAsSwitch,
86
+ theme
87
+ } = _ref6;
88
+ if (shouldShowAsSwitch) {
89
+ return isChecked ? theme.green : theme.red;
90
+ }
91
+ return isChecked ? theme['408'] : theme['403'];
92
+ }};
93
+ border: 1px solid rgba(${_ref7 => {
94
+ let {
95
+ theme
96
+ } = _ref7;
97
+ return theme['409-rgb'];
98
+ }}, 0.5);
99
+ border-radius: ${_ref8 => {
100
+ let {
101
+ shouldShowAsSwitch
102
+ } = _ref8;
103
+ return shouldShowAsSwitch ? '100px' : 0;
104
+ }};
105
+ content: ' ';
106
+ height: ${_ref9 => {
107
+ let {
108
+ shouldShowAsSwitch
109
+ } = _ref9;
110
+ return shouldShowAsSwitch ? '13px' : '15px';
111
+ }};
112
+ left: ${_ref10 => {
113
+ let {
114
+ shouldShowAsSwitch
115
+ } = _ref10;
116
+ return shouldShowAsSwitch ? '10px' : 0;
117
+ }};
118
+ position: absolute;
119
+ top: 50%;
120
+ transform: translateY(-50%);
121
+ transition: background-color 0.2s ease;
122
+ width: ${_ref11 => {
123
+ let {
124
+ shouldShowAsSwitch
125
+ } = _ref11;
126
+ return shouldShowAsSwitch ? '28px' : '15px';
127
+ }};
128
+ }
129
+ `;
130
+ exports.StyledCheckboxLabel = StyledCheckboxLabel;
131
+ //# sourceMappingURL=Checkbox.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Checkbox.styles.js","names":["_styledComponents","_interopRequireWildcard","require","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","StyledCheckbox","styled","div","exports","StyledCheckboxInput","input","StyledCheckboxLabel","label","_ref","theme","text","_ref2","isDisabled","_ref3","_ref4","shouldShowAsSwitch","_ref5","isChecked","css","_ref6","green","red","_ref7","_ref8","_ref9","_ref10","_ref11"],"sources":["../../../src/components/checkbox/Checkbox.styles.ts"],"sourcesContent":["import styled, { css } from 'styled-components';\nimport type { WithTheme } from '../color-scheme-provider/ColorSchemeProvider';\nimport type { CheckboxProps } from './Checkbox';\n\nexport const StyledCheckbox = styled.div`\n align-items: center;\n display: flex;\n position: relative;\n`;\n\nexport const StyledCheckboxInput = styled.input`\n display: none;\n`;\n\ntype StyledCheckboxLabelProps = WithTheme<Omit<CheckboxProps, 'children' | 'onChange'>>;\n\nexport const StyledCheckboxLabel = styled.label<StyledCheckboxLabelProps>`\n color: ${({ theme }: StyledCheckboxLabelProps) => theme.text};\n cursor: ${({ isDisabled }) => (isDisabled ? 'default' : 'pointer')};\n opacity: ${({ isDisabled }) => (isDisabled ? 0.5 : 1)};\n padding-left: ${({ shouldShowAsSwitch }) => (shouldShowAsSwitch ? '48px' : '20px')};\n transition: opacity 0.2s ease;\n user-select: none;\n\n &:after {\n ${({ isChecked, shouldShowAsSwitch }) =>\n shouldShowAsSwitch\n ? css`\n background-color: white;\n border-radius: 50%;\n box-shadow: 0 1px 4px rgb(0 0 0 / 35%);\n height: 16px;\n left: 7px;\n transform: translateY(-50%) translateX(${isChecked ? '18px' : 0});\n transition: transform 0.2s ease;\n width: 16px;\n `\n : css`\n border-right: 2px solid #fff;\n border-bottom: 2px solid #fff;\n height: 10px;\n left: 1px;\n opacity: ${isChecked ? 1 : 0};\n transform: translateY(-50%) rotateZ(37deg);\n transition: opacity 0.2s ease;\n width: 5.5px;\n `}\n\n content: ' ';\n position: absolute;\n top: 50%;\n transform-origin: 100% 100%;\n }\n\n &:before {\n background-color: ${({\n isChecked,\n shouldShowAsSwitch,\n theme,\n }: StyledCheckboxLabelProps) => {\n if (shouldShowAsSwitch) {\n return isChecked ? theme.green : theme.red;\n }\n\n return isChecked ? theme['408'] : theme['403'];\n }};\n border: 1px solid rgba(${({ theme }: StyledCheckboxLabelProps) => theme['409-rgb']}, 0.5);\n border-radius: ${({ shouldShowAsSwitch }) => (shouldShowAsSwitch ? '100px' : 0)};\n content: ' ';\n height: ${({ shouldShowAsSwitch }) => (shouldShowAsSwitch ? '13px' : '15px')};\n left: ${({ shouldShowAsSwitch }) => (shouldShowAsSwitch ? '10px' : 0)};\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n transition: background-color 0.2s ease;\n width: ${({ shouldShowAsSwitch }) => (shouldShowAsSwitch ? '28px' : '15px')};\n }\n`;\n"],"mappings":"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"}
@@ -4,7 +4,7 @@ declare enum ColorMode {
4
4
  Dark = 1,
5
5
  Light = 2
6
6
  }
7
- declare type ColorSchemeProviderProps = {
7
+ type ColorSchemeProviderProps = {
8
8
  /**
9
9
  * The content of the application or the components for which the styles should be set
10
10
  */
@@ -37,7 +37,7 @@ declare type ColorSchemeProviderProps = {
37
37
  export interface Theme {
38
38
  [key: string]: string;
39
39
  }
40
- export declare type WithTheme<T> = T & {
40
+ export type WithTheme<T> = T & {
41
41
  theme: Theme;
42
42
  };
43
43
  declare const ColorSchemeProvider: FC<ColorSchemeProviderProps>;