@chayns-components/core 5.0.0-beta.37 → 5.0.0-beta.38

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/lib/components/accordion/Accordion.js +0 -16
  2. package/lib/components/accordion/Accordion.js.map +1 -1
  3. package/lib/components/accordion/Accordion.styles.js +42 -21
  4. package/lib/components/accordion/Accordion.styles.js.map +1 -1
  5. package/lib/components/accordion/accordion-body/AccordionBody.js +0 -6
  6. package/lib/components/accordion/accordion-body/AccordionBody.js.map +1 -1
  7. package/lib/components/accordion/accordion-body/AccordionBody.styles.js +3 -9
  8. package/lib/components/accordion/accordion-body/AccordionBody.styles.js.map +1 -1
  9. package/lib/components/accordion/accordion-content/AccordionContent.js +0 -6
  10. package/lib/components/accordion/accordion-content/AccordionContent.js.map +1 -1
  11. package/lib/components/accordion/accordion-content/AccordionContent.styles.js +6 -11
  12. package/lib/components/accordion/accordion-content/AccordionContent.styles.js.map +1 -1
  13. package/lib/components/accordion/accordion-group/AccordionGroup.js +0 -8
  14. package/lib/components/accordion/accordion-group/AccordionGroup.js.map +1 -1
  15. package/lib/components/accordion/accordion-head/AccordionHead.js +1 -12
  16. package/lib/components/accordion/accordion-head/AccordionHead.js.map +1 -1
  17. package/lib/components/accordion/accordion-head/AccordionHead.styles.js +95 -32
  18. package/lib/components/accordion/accordion-head/AccordionHead.styles.js.map +1 -1
  19. package/lib/components/accordion/accordion-intro/AccordionIntro.js +0 -5
  20. package/lib/components/accordion/accordion-intro/AccordionIntro.js.map +1 -1
  21. package/lib/components/accordion/accordion-intro/AccordionIntro.styles.js +3 -9
  22. package/lib/components/accordion/accordion-intro/AccordionIntro.styles.js.map +1 -1
  23. package/lib/components/accordion/utils.js +1 -5
  24. package/lib/components/accordion/utils.js.map +1 -1
  25. package/lib/components/badge/Badge.js +0 -6
  26. package/lib/components/badge/Badge.js.map +1 -1
  27. package/lib/components/badge/Badge.styles.js +12 -11
  28. package/lib/components/badge/Badge.styles.js.map +1 -1
  29. package/lib/components/button/Button.js +0 -10
  30. package/lib/components/button/Button.js.map +1 -1
  31. package/lib/components/button/Button.styles.js +32 -17
  32. package/lib/components/button/Button.styles.js.map +1 -1
  33. package/lib/components/checkbox/Checkbox.js +0 -8
  34. package/lib/components/checkbox/Checkbox.js.map +1 -1
  35. package/lib/components/checkbox/Checkbox.styles.js +67 -29
  36. package/lib/components/checkbox/Checkbox.styles.js.map +1 -1
  37. package/lib/components/color-scheme-provider/ColorSchemeProvider.js +12 -21
  38. package/lib/components/color-scheme-provider/ColorSchemeProvider.js.map +1 -1
  39. package/lib/components/context-menu/ContextMenu.js +3 -24
  40. package/lib/components/context-menu/ContextMenu.js.map +1 -1
  41. package/lib/components/context-menu/ContextMenu.styles.js +3 -9
  42. package/lib/components/context-menu/ContextMenu.styles.js.map +1 -1
  43. package/lib/components/context-menu/constants/alignment.js +0 -1
  44. package/lib/components/context-menu/constants/alignment.js.map +1 -1
  45. package/lib/components/context-menu/context-menu-content/ContextMenuContent.js +7 -8
  46. package/lib/components/context-menu/context-menu-content/ContextMenuContent.js.map +1 -1
  47. package/lib/components/context-menu/context-menu-content/ContextMenuContent.styles.js +78 -33
  48. package/lib/components/context-menu/context-menu-content/ContextMenuContent.styles.js.map +1 -1
  49. package/lib/components/grid-image/GridImage.js +0 -6
  50. package/lib/components/grid-image/GridImage.js.map +1 -1
  51. package/lib/components/grid-image/GridImage.styles.js +52 -28
  52. package/lib/components/grid-image/GridImage.styles.js.map +1 -1
  53. package/lib/components/icon/Icon.js +0 -13
  54. package/lib/components/icon/Icon.js.map +1 -1
  55. package/lib/components/icon/Icon.styles.js +33 -25
  56. package/lib/components/icon/Icon.styles.js.map +1 -1
  57. package/lib/components/icon/utils.js +0 -3
  58. package/lib/components/icon/utils.js.map +1 -1
  59. package/lib/components/input/Input.js +2 -9
  60. package/lib/components/input/Input.js.map +1 -1
  61. package/lib/components/input/Input.styles.js +31 -20
  62. package/lib/components/input/Input.styles.js.map +1 -1
  63. package/lib/components/list/List.js +0 -8
  64. package/lib/components/list/List.js.map +1 -1
  65. package/lib/components/list/list-item/ListItem.js +0 -14
  66. package/lib/components/list/list-item/ListItem.js.map +1 -1
  67. package/lib/components/list/list-item/ListItem.styles.js +27 -17
  68. package/lib/components/list/list-item/ListItem.styles.js.map +1 -1
  69. package/lib/components/list/list-item/list-item-body/ListItemBody.js +0 -5
  70. package/lib/components/list/list-item/list-item-body/ListItemBody.js.map +1 -1
  71. package/lib/components/list/list-item/list-item-body/ListItemBody.styles.js +3 -9
  72. package/lib/components/list/list-item/list-item-body/ListItemBody.styles.js.map +1 -1
  73. package/lib/components/list/list-item/list-item-content/ListItemContent.js +0 -5
  74. package/lib/components/list/list-item/list-item-content/ListItemContent.js.map +1 -1
  75. package/lib/components/list/list-item/list-item-content/ListItemContent.styles.js +5 -10
  76. package/lib/components/list/list-item/list-item-content/ListItemContent.styles.js.map +1 -1
  77. package/lib/components/list/list-item/list-item-head/ListItemHead.js +0 -12
  78. package/lib/components/list/list-item/list-item-head/ListItemHead.js.map +1 -1
  79. package/lib/components/list/list-item/list-item-head/ListItemHead.styles.js +73 -42
  80. package/lib/components/list/list-item/list-item-head/ListItemHead.styles.js.map +1 -1
  81. package/lib/components/list/list-item/list-item-head/list-item-icon/ListItemIcon.js +0 -6
  82. package/lib/components/list/list-item/list-item-head/list-item-icon/ListItemIcon.js.map +1 -1
  83. package/lib/components/list/list-item/list-item-head/list-item-icon/ListItemIcon.styles.js +14 -11
  84. package/lib/components/list/list-item/list-item-head/list-item-icon/ListItemIcon.styles.js.map +1 -1
  85. package/lib/components/list/list-item/list-item-head/list-item-image/ListItemImage.js +0 -11
  86. package/lib/components/list/list-item/list-item-head/list-item-image/ListItemImage.js.map +1 -1
  87. package/lib/components/list/list-item/list-item-head/list-item-image/ListItemImage.styles.js +25 -16
  88. package/lib/components/list/list-item/list-item-head/list-item-image/ListItemImage.styles.js.map +1 -1
  89. package/lib/hooks/uuid.js +0 -4
  90. package/lib/hooks/uuid.js.map +1 -1
  91. package/lib/index.js +0 -14
  92. package/lib/index.js.map +1 -1
  93. package/lib/types/chayns.js +0 -1
  94. package/lib/types/chayns.js.map +1 -1
  95. package/package.json +15 -15
@@ -4,92 +4,155 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.StyledRightWrapper = exports.StyledMotionTitleWrapper = exports.StyledMotionTitleElementWrapper = exports.StyledMotionTitle = exports.StyledMotionRightInputIconWrapper = exports.StyledMotionRightInput = exports.StyledMotionRightElementWrapper = exports.StyledMotionIconWrapper = exports.StyledMotionContentWrapper = exports.StyledMotionAccordionHead = void 0;
7
-
8
7
  var _framerMotion = require("framer-motion");
9
-
10
8
  var _styledComponents = _interopRequireWildcard(require("styled-components"));
11
-
12
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11;
13
-
14
9
  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); }
15
-
16
10
  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; }
17
-
18
- function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
19
-
20
- const StyledMotionAccordionHead = (0, _styledComponents.default)(_framerMotion.motion.div)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n align-items: center;\n color: ", ";\n display: flex;\n overflow: hidden;\n padding: 4px 0;\n"])), _ref => {
11
+ const StyledMotionAccordionHead = (0, _styledComponents.default)(_framerMotion.motion.div)`
12
+ align-items: center;
13
+ color: ${_ref => {
21
14
  let {
22
15
  theme
23
16
  } = _ref;
24
17
  return theme.text;
25
- });
18
+ }};
19
+ display: flex;
20
+ overflow: hidden;
21
+ padding: 4px 0;
22
+ `;
26
23
  exports.StyledMotionAccordionHead = StyledMotionAccordionHead;
27
- const StyledMotionIconWrapper = (0, _styledComponents.default)(_framerMotion.motion.div)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n align-items: center;\n cursor: ", ";\n display: flex;\n flex: 0 0 auto;\n height: 25px;\n justify-content: center;\n width: 25px;\n"])), _ref2 => {
24
+ const StyledMotionIconWrapper = (0, _styledComponents.default)(_framerMotion.motion.div)`
25
+ align-items: center;
26
+ cursor: ${_ref2 => {
28
27
  let {
29
28
  onClick
30
29
  } = _ref2;
31
30
  return typeof onClick === 'function' ? 'pointer' : 'default';
32
- });
31
+ }};
32
+ display: flex;
33
+ flex: 0 0 auto;
34
+ height: 25px;
35
+ justify-content: center;
36
+ width: 25px;
37
+ `;
33
38
  exports.StyledMotionIconWrapper = StyledMotionIconWrapper;
34
- const StyledMotionContentWrapper = (0, _styledComponents.default)(_framerMotion.motion.div)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n align-self: flex-start;\n cursor: ", ";\n display: flex;\n flex: 1 1 auto;\n height: 100%;\n overflow: hidden;\n margin-right: 10px;\n"])), _ref3 => {
39
+ const StyledMotionContentWrapper = (0, _styledComponents.default)(_framerMotion.motion.div)`
40
+ align-self: flex-start;
41
+ cursor: ${_ref3 => {
35
42
  let {
36
43
  onClick
37
44
  } = _ref3;
38
45
  return typeof onClick === 'function' ? 'pointer' : 'default';
39
- });
46
+ }};
47
+ display: flex;
48
+ flex: 1 1 auto;
49
+ height: 100%;
50
+ overflow: hidden;
51
+ margin-right: 10px;
52
+ `;
40
53
  exports.StyledMotionContentWrapper = StyledMotionContentWrapper;
41
- const StyledMotionTitleWrapper = (0, _styledComponents.default)(_framerMotion.motion.div)(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: grid;\n flex: 0 1 auto;\n grid-template-areas: 'header';\n"])));
54
+ const StyledMotionTitleWrapper = (0, _styledComponents.default)(_framerMotion.motion.div)`
55
+ display: grid;
56
+ flex: 0 1 auto;
57
+ grid-template-areas: 'header';
58
+ `;
42
59
  exports.StyledMotionTitleWrapper = StyledMotionTitleWrapper;
43
- const StyledMotionTitle = (0, _styledComponents.default)(_framerMotion.motion.div)(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n font-size: ", ";\n font-weight: ", ";\n grid-area: header;\n height: ", ";\n overflow: hidden;\n text-overflow: ellipsis;\n transform-origin: top left;\n user-select: none;\n white-space: ", ";\n\n ", "\n"])), _ref4 => {
60
+ const StyledMotionTitle = (0, _styledComponents.default)(_framerMotion.motion.div)`
61
+ font-size: ${_ref4 => {
44
62
  let {
45
63
  isOpen,
46
64
  isWrapped
47
65
  } = _ref4;
48
66
  return isOpen && !isWrapped ? '1.3rem' : undefined;
49
- }, _ref5 => {
67
+ }};
68
+ font-weight: ${_ref5 => {
50
69
  let {
51
70
  isOpen,
52
71
  isWrapped
53
72
  } = _ref5;
54
73
  return isOpen && isWrapped ? 700 : 'normal';
55
- }, _ref6 => {
74
+ }};
75
+ grid-area: header;
76
+ height: ${_ref6 => {
56
77
  let {
57
78
  isWrapped
58
79
  } = _ref6;
59
80
  return isWrapped ? '100%' : undefined;
60
- }, _ref7 => {
81
+ }};
82
+ overflow: hidden;
83
+ text-overflow: ellipsis;
84
+ transform-origin: top left;
85
+ user-select: none;
86
+ white-space: ${_ref7 => {
61
87
  let {
62
88
  isOpen,
63
89
  isWrapped
64
90
  } = _ref7;
65
91
  return isOpen && !isWrapped ? 'normal' : 'nowrap';
66
- }, _ref8 => {
92
+ }};
93
+
94
+ ${_ref8 => {
67
95
  let {
68
96
  isWrapped
69
97
  } = _ref8;
70
- return isWrapped && (0, _styledComponents.css)(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n align-items: center;\n display: flex;\n "])));
71
- });
98
+ return isWrapped && (0, _styledComponents.css)`
99
+ align-items: center;
100
+ display: flex;
101
+ `;
102
+ }}
103
+ `;
72
104
  exports.StyledMotionTitle = StyledMotionTitle;
73
- const StyledMotionTitleElementWrapper = (0, _styledComponents.default)(_framerMotion.motion.div)(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n align-items: center;\n display: flex;\n margin-left: 8px;\n"])));
105
+ const StyledMotionTitleElementWrapper = (0, _styledComponents.default)(_framerMotion.motion.div)`
106
+ align-items: center;
107
+ display: flex;
108
+ margin-left: 8px;
109
+ `;
74
110
  exports.StyledMotionTitleElementWrapper = StyledMotionTitleElementWrapper;
75
-
76
- const StyledRightWrapper = _styledComponents.default.div(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n display: grid;\n flex: 0 0 auto;\n grid-template-areas: 'right';\n margin-right: 5px;\n overflow: hidden;\n position: relative;\n"])));
77
-
111
+ const StyledRightWrapper = _styledComponents.default.div`
112
+ display: grid;
113
+ flex: 0 0 auto;
114
+ grid-template-areas: 'right';
115
+ margin-right: 5px;
116
+ overflow: hidden;
117
+ position: relative;
118
+ `;
78
119
  exports.StyledRightWrapper = StyledRightWrapper;
79
- const StyledMotionRightElementWrapper = (0, _styledComponents.default)(_framerMotion.motion.div)(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n align-items: center;\n display: flex;\n grid-area: header;\n justify-content: flex-end;\n"])));
120
+ const StyledMotionRightElementWrapper = (0, _styledComponents.default)(_framerMotion.motion.div)`
121
+ align-items: center;
122
+ display: flex;
123
+ grid-area: header;
124
+ justify-content: flex-end;
125
+ `;
80
126
  exports.StyledMotionRightElementWrapper = StyledMotionRightElementWrapper;
81
- const StyledMotionRightInput = (0, _styledComponents.default)(_framerMotion.motion.input)(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n background-color: transparent;\n border: 1px solid transparent;\n border-bottom-color: rgba(\n ", ",\n 0.45\n );\n grid-area: header;\n padding: ", ";\n"])), _ref9 => {
127
+ const StyledMotionRightInput = (0, _styledComponents.default)(_framerMotion.motion.input)`
128
+ background-color: transparent;
129
+ border: 1px solid transparent;
130
+ border-bottom-color: rgba(
131
+ ${_ref9 => {
82
132
  let {
83
133
  theme
84
134
  } = _ref9;
85
135
  return theme['headline-rgb'];
86
- }, _ref10 => {
136
+ }},
137
+ 0.45
138
+ );
139
+ grid-area: header;
140
+ padding: ${_ref10 => {
87
141
  let {
88
142
  hasIcon
89
143
  } = _ref10;
90
144
  return hasIcon ? '5px 23px 5px 1px' : '5px 1px';
91
- });
145
+ }};
146
+ `;
92
147
  exports.StyledMotionRightInput = StyledMotionRightInput;
93
- const StyledMotionRightInputIconWrapper = (0, _styledComponents.default)(_framerMotion.motion.div)(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n align-items: center;\n display: flex;\n height: 100%;\n justify-content: center;\n position: absolute;\n right: 4px;\n top: 0;\n"])));
148
+ const StyledMotionRightInputIconWrapper = (0, _styledComponents.default)(_framerMotion.motion.div)`
149
+ align-items: center;
150
+ display: flex;
151
+ height: 100%;
152
+ justify-content: center;
153
+ position: absolute;
154
+ right: 4px;
155
+ top: 0;
156
+ `;
94
157
  exports.StyledMotionRightInputIconWrapper = StyledMotionRightInputIconWrapper;
95
158
  //# sourceMappingURL=AccordionHead.styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AccordionHead.styles.js","names":["StyledMotionAccordionHead","styled","motion","div","theme","text","StyledMotionIconWrapper","onClick","StyledMotionContentWrapper","StyledMotionTitleWrapper","StyledMotionTitle","isOpen","isWrapped","undefined","css","StyledMotionTitleElementWrapper","StyledRightWrapper","StyledMotionRightElementWrapper","StyledMotionRightInput","input","hasIcon","StyledMotionRightInputIconWrapper"],"sources":["../../../../src/components/accordion/accordion-head/AccordionHead.styles.ts"],"sourcesContent":["import { motion } from 'framer-motion';\nimport styled, { css } from 'styled-components';\nimport type { WithTheme } from '../../color-scheme-provider/ColorSchemeProvider';\n\ntype StyledMotionAccordionHeadProps = WithTheme<unknown>;\n\nexport const StyledMotionAccordionHead = styled(motion.div)`\n align-items: center;\n color: ${({ theme }: StyledMotionAccordionHeadProps) => theme.text};\n display: flex;\n overflow: hidden;\n padding: 4px 0;\n`;\n\nexport const StyledMotionIconWrapper = styled(motion.div)`\n align-items: center;\n cursor: ${({ onClick }) => (typeof onClick === 'function' ? 'pointer' : 'default')};\n display: flex;\n flex: 0 0 auto;\n height: 25px;\n justify-content: center;\n width: 25px;\n`;\n\nexport const StyledMotionContentWrapper = styled(motion.div)`\n align-self: flex-start;\n cursor: ${({ onClick }) => (typeof onClick === 'function' ? 'pointer' : 'default')};\n display: flex;\n flex: 1 1 auto;\n height: 100%;\n overflow: hidden;\n margin-right: 10px;\n`;\n\nexport const StyledMotionTitleWrapper = styled(motion.div)`\n display: grid;\n flex: 0 1 auto;\n grid-template-areas: 'header';\n`;\n\ninterface StyledMotionTitleProps {\n isOpen: boolean;\n isWrapped: boolean;\n}\n\nexport const StyledMotionTitle = styled(motion.div)<StyledMotionTitleProps>`\n font-size: ${({ isOpen, isWrapped }) => (isOpen && !isWrapped ? '1.3rem' : undefined)};\n font-weight: ${({ isOpen, isWrapped }) => (isOpen && isWrapped ? 700 : 'normal')};\n grid-area: header;\n height: ${({ isWrapped }) => (isWrapped ? '100%' : undefined)};\n overflow: hidden;\n text-overflow: ellipsis;\n transform-origin: top left;\n user-select: none;\n white-space: ${({ isOpen, isWrapped }) => (isOpen && !isWrapped ? 'normal' : 'nowrap')};\n\n ${({ isWrapped }) =>\n isWrapped &&\n css`\n align-items: center;\n display: flex;\n `}\n`;\n\nexport const StyledMotionTitleElementWrapper = styled(motion.div)`\n align-items: center;\n display: flex;\n margin-left: 8px;\n`;\n\nexport const StyledRightWrapper = styled.div`\n display: grid;\n flex: 0 0 auto;\n grid-template-areas: 'right';\n margin-right: 5px;\n overflow: hidden;\n position: relative;\n`;\n\nexport const StyledMotionRightElementWrapper = styled(motion.div)`\n align-items: center;\n display: flex;\n grid-area: header;\n justify-content: flex-end;\n`;\n\ntype StyledMotionRightInputProps = WithTheme<{\n hasIcon: boolean;\n}>;\n\nexport const StyledMotionRightInput = styled(motion.input)<StyledMotionRightInputProps>`\n background-color: transparent;\n border: 1px solid transparent;\n border-bottom-color: rgba(\n ${({ theme }: StyledMotionRightInputProps) => theme['headline-rgb']},\n 0.45\n );\n grid-area: header;\n padding: ${({ hasIcon }) => (hasIcon ? '5px 23px 5px 1px' : '5px 1px')};\n`;\n\nexport const StyledMotionRightInputIconWrapper = styled(motion.div)`\n align-items: center;\n display: flex;\n height: 100%;\n justify-content: center;\n position: absolute;\n right: 4px;\n top: 0;\n`;\n"],"mappings":";;;;;;;AAAA;;AACA;;;;;;;;;;AAKO,MAAMA,yBAAyB,GAAG,IAAAC,yBAAA,EAAOC,oBAAA,CAAOC,GAAd,CAAH,oLAEzB;EAAA,IAAC;IAAEC;EAAF,CAAD;EAAA,OAA+CA,KAAK,CAACC,IAArD;AAAA,CAFyB,CAA/B;;AAQA,MAAMC,uBAAuB,GAAG,IAAAL,yBAAA,EAAOC,oBAAA,CAAOC,GAAd,CAAH,mOAEtB;EAAA,IAAC;IAAEI;EAAF,CAAD;EAAA,OAAkB,OAAOA,OAAP,KAAmB,UAAnB,GAAgC,SAAhC,GAA4C,SAA9D;AAAA,CAFsB,CAA7B;;AAUA,MAAMC,0BAA0B,GAAG,IAAAP,yBAAA,EAAOC,oBAAA,CAAOC,GAAd,CAAH,sOAEzB;EAAA,IAAC;IAAEI;EAAF,CAAD;EAAA,OAAkB,OAAOA,OAAP,KAAmB,UAAnB,GAAgC,SAAhC,GAA4C,SAA9D;AAAA,CAFyB,CAAhC;;AAUA,MAAME,wBAAwB,GAAG,IAAAR,yBAAA,EAAOC,oBAAA,CAAOC,GAAd,CAAH,sJAA9B;;AAWA,MAAMO,iBAAiB,GAAG,IAAAT,yBAAA,EAAOC,oBAAA,CAAOC,GAAd,CAAH,qTACb;EAAA,IAAC;IAAEQ,MAAF;IAAUC;EAAV,CAAD;EAAA,OAA4BD,MAAM,IAAI,CAACC,SAAX,GAAuB,QAAvB,GAAkCC,SAA9D;AAAA,CADa,EAEX;EAAA,IAAC;IAAEF,MAAF;IAAUC;EAAV,CAAD;EAAA,OAA4BD,MAAM,IAAIC,SAAV,GAAsB,GAAtB,GAA4B,QAAxD;AAAA,CAFW,EAIhB;EAAA,IAAC;IAAEA;EAAF,CAAD;EAAA,OAAoBA,SAAS,GAAG,MAAH,GAAYC,SAAzC;AAAA,CAJgB,EASX;EAAA,IAAC;IAAEF,MAAF;IAAUC;EAAV,CAAD;EAAA,OAA4BD,MAAM,IAAI,CAACC,SAAX,GAAuB,QAAvB,GAAkC,QAA9D;AAAA,CATW,EAWxB;EAAA,IAAC;IAAEA;EAAF,CAAD;EAAA,OACEA,SAAS,QACTE,qBADS,gJADX;AAAA,CAXwB,CAAvB;;AAmBA,MAAMC,+BAA+B,GAAG,IAAAd,yBAAA,EAAOC,oBAAA,CAAOC,GAAd,CAAH,8IAArC;;;AAMA,MAAMa,kBAAkB,GAAGf,yBAAA,CAAOE,GAAV,6NAAxB;;;AASA,MAAMc,+BAA+B,GAAG,IAAAhB,yBAAA,EAAOC,oBAAA,CAAOC,GAAd,CAAH,+KAArC;;AAWA,MAAMe,sBAAsB,GAAG,IAAAjB,yBAAA,EAAOC,oBAAA,CAAOiB,KAAd,CAAH,qQAIzB;EAAA,IAAC;IAAEf;EAAF,CAAD;EAAA,OAA4CA,KAAK,CAAC,cAAD,CAAjD;AAAA,CAJyB,EAQpB;EAAA,IAAC;IAAEgB;EAAF,CAAD;EAAA,OAAkBA,OAAO,GAAG,kBAAH,GAAwB,SAAjD;AAAA,CARoB,CAA5B;;AAWA,MAAMC,iCAAiC,GAAG,IAAApB,yBAAA,EAAOC,oBAAA,CAAOC,GAAd,CAAH,iOAAvC"}
1
+ {"version":3,"file":"AccordionHead.styles.js","names":["StyledMotionAccordionHead","styled","motion","div","theme","text","StyledMotionIconWrapper","onClick","StyledMotionContentWrapper","StyledMotionTitleWrapper","StyledMotionTitle","isOpen","isWrapped","undefined","css","StyledMotionTitleElementWrapper","StyledRightWrapper","StyledMotionRightElementWrapper","StyledMotionRightInput","input","hasIcon","StyledMotionRightInputIconWrapper"],"sources":["../../../../src/components/accordion/accordion-head/AccordionHead.styles.ts"],"sourcesContent":["import { motion } from 'framer-motion';\nimport styled, { css } from 'styled-components';\nimport type { WithTheme } from '../../color-scheme-provider/ColorSchemeProvider';\n\ntype StyledMotionAccordionHeadProps = WithTheme<unknown>;\n\nexport const StyledMotionAccordionHead = styled(motion.div)`\n align-items: center;\n color: ${({ theme }: StyledMotionAccordionHeadProps) => theme.text};\n display: flex;\n overflow: hidden;\n padding: 4px 0;\n`;\n\nexport const StyledMotionIconWrapper = styled(motion.div)`\n align-items: center;\n cursor: ${({ onClick }) => (typeof onClick === 'function' ? 'pointer' : 'default')};\n display: flex;\n flex: 0 0 auto;\n height: 25px;\n justify-content: center;\n width: 25px;\n`;\n\nexport const StyledMotionContentWrapper = styled(motion.div)`\n align-self: flex-start;\n cursor: ${({ onClick }) => (typeof onClick === 'function' ? 'pointer' : 'default')};\n display: flex;\n flex: 1 1 auto;\n height: 100%;\n overflow: hidden;\n margin-right: 10px;\n`;\n\nexport const StyledMotionTitleWrapper = styled(motion.div)`\n display: grid;\n flex: 0 1 auto;\n grid-template-areas: 'header';\n`;\n\ninterface StyledMotionTitleProps {\n isOpen: boolean;\n isWrapped: boolean;\n}\n\nexport const StyledMotionTitle = styled(motion.div)<StyledMotionTitleProps>`\n font-size: ${({ isOpen, isWrapped }) => (isOpen && !isWrapped ? '1.3rem' : undefined)};\n font-weight: ${({ isOpen, isWrapped }) => (isOpen && isWrapped ? 700 : 'normal')};\n grid-area: header;\n height: ${({ isWrapped }) => (isWrapped ? '100%' : undefined)};\n overflow: hidden;\n text-overflow: ellipsis;\n transform-origin: top left;\n user-select: none;\n white-space: ${({ isOpen, isWrapped }) => (isOpen && !isWrapped ? 'normal' : 'nowrap')};\n\n ${({ isWrapped }) =>\n isWrapped &&\n css`\n align-items: center;\n display: flex;\n `}\n`;\n\nexport const StyledMotionTitleElementWrapper = styled(motion.div)`\n align-items: center;\n display: flex;\n margin-left: 8px;\n`;\n\nexport const StyledRightWrapper = styled.div`\n display: grid;\n flex: 0 0 auto;\n grid-template-areas: 'right';\n margin-right: 5px;\n overflow: hidden;\n position: relative;\n`;\n\nexport const StyledMotionRightElementWrapper = styled(motion.div)`\n align-items: center;\n display: flex;\n grid-area: header;\n justify-content: flex-end;\n`;\n\ntype StyledMotionRightInputProps = WithTheme<{\n hasIcon: boolean;\n}>;\n\nexport const StyledMotionRightInput = styled(motion.input)<StyledMotionRightInputProps>`\n background-color: transparent;\n border: 1px solid transparent;\n border-bottom-color: rgba(\n ${({ theme }: StyledMotionRightInputProps) => theme['headline-rgb']},\n 0.45\n );\n grid-area: header;\n padding: ${({ hasIcon }) => (hasIcon ? '5px 23px 5px 1px' : '5px 1px')};\n`;\n\nexport const StyledMotionRightInputIconWrapper = styled(motion.div)`\n align-items: center;\n display: flex;\n height: 100%;\n justify-content: center;\n position: absolute;\n right: 4px;\n top: 0;\n`;\n"],"mappings":";;;;;;AAAA;AACA;AAAgD;AAAA;AAKzC,MAAMA,yBAAyB,GAAG,IAAAC,yBAAM,EAACC,oBAAM,CAACC,GAAG,CAAE;AAC5D;AACA,aAAa;EAAA,IAAC;IAAEC;EAAsC,CAAC;EAAA,OAAKA,KAAK,CAACC,IAAI;AAAA,CAAC;AACvE;AACA;AACA;AACA,CAAC;AAAC;AAEK,MAAMC,uBAAuB,GAAG,IAAAL,yBAAM,EAACC,oBAAM,CAACC,GAAG,CAAE;AAC1D;AACA,cAAc;EAAA,IAAC;IAAEI;EAAQ,CAAC;EAAA,OAAM,OAAOA,OAAO,KAAK,UAAU,GAAG,SAAS,GAAG,SAAS;AAAA,CAAE;AACvF;AACA;AACA;AACA;AACA;AACA,CAAC;AAAC;AAEK,MAAMC,0BAA0B,GAAG,IAAAP,yBAAM,EAACC,oBAAM,CAACC,GAAG,CAAE;AAC7D;AACA,cAAc;EAAA,IAAC;IAAEI;EAAQ,CAAC;EAAA,OAAM,OAAOA,OAAO,KAAK,UAAU,GAAG,SAAS,GAAG,SAAS;AAAA,CAAE;AACvF;AACA;AACA;AACA;AACA;AACA,CAAC;AAAC;AAEK,MAAME,wBAAwB,GAAG,IAAAR,yBAAM,EAACC,oBAAM,CAACC,GAAG,CAAE;AAC3D;AACA;AACA;AACA,CAAC;AAAC;AAOK,MAAMO,iBAAiB,GAAG,IAAAT,yBAAM,EAACC,oBAAM,CAACC,GAAG,CAA0B;AAC5E,iBAAiB;EAAA,IAAC;IAAEQ,MAAM;IAAEC;EAAU,CAAC;EAAA,OAAMD,MAAM,IAAI,CAACC,SAAS,GAAG,QAAQ,GAAGC,SAAS;AAAA,CAAE;AAC1F,mBAAmB;EAAA,IAAC;IAAEF,MAAM;IAAEC;EAAU,CAAC;EAAA,OAAMD,MAAM,IAAIC,SAAS,GAAG,GAAG,GAAG,QAAQ;AAAA,CAAE;AACrF;AACA,cAAc;EAAA,IAAC;IAAEA;EAAU,CAAC;EAAA,OAAMA,SAAS,GAAG,MAAM,GAAGC,SAAS;AAAA,CAAE;AAClE;AACA;AACA;AACA;AACA,mBAAmB;EAAA,IAAC;IAAEF,MAAM;IAAEC;EAAU,CAAC;EAAA,OAAMD,MAAM,IAAI,CAACC,SAAS,GAAG,QAAQ,GAAG,QAAQ;AAAA,CAAE;AAC3F;AACA,MAAM;EAAA,IAAC;IAAEA;EAAU,CAAC;EAAA,OACZA,SAAS,IACT,IAAAE,qBAAG,CAAC;AACZ;AACA;AACA,SAAS;AAAA,CAAC;AACV,CAAC;AAAC;AAEK,MAAMC,+BAA+B,GAAG,IAAAd,yBAAM,EAACC,oBAAM,CAACC,GAAG,CAAE;AAClE;AACA;AACA;AACA,CAAC;AAAC;AAEK,MAAMa,kBAAkB,GAAGf,yBAAM,CAACE,GAAI;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAAC;AAEK,MAAMc,+BAA+B,GAAG,IAAAhB,yBAAM,EAACC,oBAAM,CAACC,GAAG,CAAE;AAClE;AACA;AACA;AACA;AACA,CAAC;AAAC;AAMK,MAAMe,sBAAsB,GAAG,IAAAjB,yBAAM,EAACC,oBAAM,CAACiB,KAAK,CAA+B;AACxF;AACA;AACA;AACA,UAAU;EAAA,IAAC;IAAEf;EAAmC,CAAC;EAAA,OAAKA,KAAK,CAAC,cAAc,CAAC;AAAA,CAAC;AAC5E;AACA;AACA;AACA,eAAe;EAAA,IAAC;IAAEgB;EAAQ,CAAC;EAAA,OAAMA,OAAO,GAAG,kBAAkB,GAAG,SAAS;AAAA,CAAE;AAC3E,CAAC;AAAC;AAEK,MAAMC,iCAAiC,GAAG,IAAApB,yBAAM,EAACC,oBAAM,CAACC,GAAG,CAAE;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAAC"}
@@ -4,13 +4,9 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  var _react = _interopRequireDefault(require("react"));
9
-
10
8
  var _AccordionIntro = require("./AccordionIntro.styles");
11
-
12
9
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
-
14
10
  const AccordionIntro = _ref => {
15
11
  let {
16
12
  children
@@ -19,7 +15,6 @@ const AccordionIntro = _ref => {
19
15
  className: "beta-chayns-accordion-intro"
20
16
  }, children);
21
17
  };
22
-
23
18
  AccordionIntro.displayName = 'AccordionIntro';
24
19
  var _default = AccordionIntro;
25
20
  exports.default = _default;
@@ -1 +1 @@
1
- {"version":3,"file":"AccordionIntro.js","names":["AccordionIntro","children","displayName"],"sources":["../../../../src/components/accordion/accordion-intro/AccordionIntro.tsx"],"sourcesContent":["import React, { FC, ReactNode } from 'react';\nimport { StyledAccordionIntro } from './AccordionIntro.styles';\n\nexport type AccordionIntroProps = {\n /**\n * The content of the accordion content element\n */\n children: ReactNode;\n};\n\nconst AccordionIntro: FC<AccordionIntroProps> = ({ children }) => (\n <StyledAccordionIntro className=\"beta-chayns-accordion-intro\">{children}</StyledAccordionIntro>\n);\n\nAccordionIntro.displayName = 'AccordionIntro';\n\nexport default AccordionIntro;\n"],"mappings":";;;;;;;AAAA;;AACA;;;;AASA,MAAMA,cAAuC,GAAG;EAAA,IAAC;IAAEC;EAAF,CAAD;EAAA,oBAC5C,6BAAC,oCAAD;IAAsB,SAAS,EAAC;EAAhC,GAA+DA,QAA/D,CAD4C;AAAA,CAAhD;;AAIAD,cAAc,CAACE,WAAf,GAA6B,gBAA7B;eAEeF,c"}
1
+ {"version":3,"file":"AccordionIntro.js","names":["AccordionIntro","children","displayName"],"sources":["../../../../src/components/accordion/accordion-intro/AccordionIntro.tsx"],"sourcesContent":["import React, { FC, ReactNode } from 'react';\nimport { StyledAccordionIntro } from './AccordionIntro.styles';\n\nexport type AccordionIntroProps = {\n /**\n * The content of the accordion content element\n */\n children: ReactNode;\n};\n\nconst AccordionIntro: FC<AccordionIntroProps> = ({ children }) => (\n <StyledAccordionIntro className=\"beta-chayns-accordion-intro\">{children}</StyledAccordionIntro>\n);\n\nAccordionIntro.displayName = 'AccordionIntro';\n\nexport default AccordionIntro;\n"],"mappings":";;;;;;AAAA;AACA;AAA+D;AAS/D,MAAMA,cAAuC,GAAG;EAAA,IAAC;IAAEC;EAAS,CAAC;EAAA,oBACzD,6BAAC,oCAAoB;IAAC,SAAS,EAAC;EAA6B,GAAEA,QAAQ,CAAwB;AAAA,CAClG;AAEDD,cAAc,CAACE,WAAW,GAAG,gBAAgB;AAAC,eAE/BF,cAAc;AAAA"}
@@ -4,16 +4,10 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.StyledAccordionIntro = 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
- const StyledAccordionIntro = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n padding: 0 9px 6px;\n"])));
17
-
9
+ const StyledAccordionIntro = _styledComponents.default.div`
10
+ padding: 0 9px 6px;
11
+ `;
18
12
  exports.StyledAccordionIntro = StyledAccordionIntro;
19
13
  //# sourceMappingURL=AccordionIntro.styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AccordionIntro.styles.js","names":["StyledAccordionIntro","styled","div"],"sources":["../../../../src/components/accordion/accordion-intro/AccordionIntro.styles.ts"],"sourcesContent":["import styled from 'styled-components';\n\nexport const StyledAccordionIntro = styled.div`\n padding: 0 9px 6px;\n`;\n"],"mappings":";;;;;;;AAAA;;;;;;;;AAEO,MAAMA,oBAAoB,GAAGC,yBAAA,CAAOC,GAAV,gGAA1B"}
1
+ {"version":3,"file":"AccordionIntro.styles.js","names":["StyledAccordionIntro","styled","div"],"sources":["../../../../src/components/accordion/accordion-intro/AccordionIntro.styles.ts"],"sourcesContent":["import styled from 'styled-components';\n\nexport const StyledAccordionIntro = styled.div`\n padding: 0 9px 6px;\n`;\n"],"mappings":";;;;;;AAAA;AAAuC;AAEhC,MAAMA,oBAAoB,GAAGC,yBAAM,CAACC,GAAI;AAC/C;AACA,CAAC;AAAC"}
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.getAccordionHeadHeight = void 0;
7
-
8
7
  const getAccordionHeadHeight = _ref => {
9
8
  let {
10
9
  isWrapped,
@@ -16,17 +15,15 @@ const getAccordionHeadHeight = _ref => {
16
15
  element.style.opacity = '0';
17
16
  element.style.pointerEvents = 'none';
18
17
  element.style.whiteSpace = 'nowrap';
19
- element.style.width = "".concat(width, "px");
18
+ element.style.width = `${width}px`;
20
19
  element.innerText = title;
21
20
  document.body.appendChild(element);
22
21
  const closedHeight = Math.max(element.clientHeight + 8, isWrapped ? 40 : 33);
23
-
24
22
  if (isWrapped) {
25
23
  element.style.fontWeight = 'bold';
26
24
  } else {
27
25
  element.style.fontSize = '1.3rem';
28
26
  }
29
-
30
27
  element.style.whiteSpace = 'normal';
31
28
  const openHeight = Math.max(element.clientHeight + 8, isWrapped ? 40 : 33);
32
29
  document.body.removeChild(element);
@@ -35,6 +32,5 @@ const getAccordionHeadHeight = _ref => {
35
32
  open: openHeight
36
33
  };
37
34
  };
38
-
39
35
  exports.getAccordionHeadHeight = getAccordionHeadHeight;
40
36
  //# sourceMappingURL=utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","names":["getAccordionHeadHeight","isWrapped","title","width","element","document","createElement","style","fontSize","opacity","pointerEvents","whiteSpace","innerText","body","appendChild","closedHeight","Math","max","clientHeight","fontWeight","openHeight","removeChild","closed","open"],"sources":["../../../src/components/accordion/utils.ts"],"sourcesContent":["interface GetAccordionHeadHeightOptions {\n isWrapped?: boolean;\n title: string;\n width: number;\n}\n\ninterface GetAccordionHeadHeightResult {\n closed: number;\n open: number;\n}\n\nexport const getAccordionHeadHeight = ({\n isWrapped,\n title,\n width,\n}: GetAccordionHeadHeightOptions): GetAccordionHeadHeightResult => {\n const element = document.createElement('div');\n\n element.style.fontSize = '1rem';\n element.style.opacity = '0';\n element.style.pointerEvents = 'none';\n element.style.whiteSpace = 'nowrap';\n element.style.width = `${width}px`;\n\n element.innerText = title;\n\n document.body.appendChild(element);\n\n const closedHeight = Math.max(element.clientHeight + 8, isWrapped ? 40 : 33);\n\n if (isWrapped) {\n element.style.fontWeight = 'bold';\n } else {\n element.style.fontSize = '1.3rem';\n }\n\n element.style.whiteSpace = 'normal';\n\n const openHeight = Math.max(element.clientHeight + 8, isWrapped ? 40 : 33);\n\n document.body.removeChild(element);\n\n return { closed: closedHeight, open: openHeight };\n};\n"],"mappings":";;;;;;;AAWO,MAAMA,sBAAsB,GAAG,QAI6B;EAAA,IAJ5B;IACnCC,SADmC;IAEnCC,KAFmC;IAGnCC;EAHmC,CAI4B;EAC/D,MAAMC,OAAO,GAAGC,QAAQ,CAACC,aAAT,CAAuB,KAAvB,CAAhB;EAEAF,OAAO,CAACG,KAAR,CAAcC,QAAd,GAAyB,MAAzB;EACAJ,OAAO,CAACG,KAAR,CAAcE,OAAd,GAAwB,GAAxB;EACAL,OAAO,CAACG,KAAR,CAAcG,aAAd,GAA8B,MAA9B;EACAN,OAAO,CAACG,KAAR,CAAcI,UAAd,GAA2B,QAA3B;EACAP,OAAO,CAACG,KAAR,CAAcJ,KAAd,aAAyBA,KAAzB;EAEAC,OAAO,CAACQ,SAAR,GAAoBV,KAApB;EAEAG,QAAQ,CAACQ,IAAT,CAAcC,WAAd,CAA0BV,OAA1B;EAEA,MAAMW,YAAY,GAAGC,IAAI,CAACC,GAAL,CAASb,OAAO,CAACc,YAAR,GAAuB,CAAhC,EAAmCjB,SAAS,GAAG,EAAH,GAAQ,EAApD,CAArB;;EAEA,IAAIA,SAAJ,EAAe;IACXG,OAAO,CAACG,KAAR,CAAcY,UAAd,GAA2B,MAA3B;EACH,CAFD,MAEO;IACHf,OAAO,CAACG,KAAR,CAAcC,QAAd,GAAyB,QAAzB;EACH;;EAEDJ,OAAO,CAACG,KAAR,CAAcI,UAAd,GAA2B,QAA3B;EAEA,MAAMS,UAAU,GAAGJ,IAAI,CAACC,GAAL,CAASb,OAAO,CAACc,YAAR,GAAuB,CAAhC,EAAmCjB,SAAS,GAAG,EAAH,GAAQ,EAApD,CAAnB;EAEAI,QAAQ,CAACQ,IAAT,CAAcQ,WAAd,CAA0BjB,OAA1B;EAEA,OAAO;IAAEkB,MAAM,EAAEP,YAAV;IAAwBQ,IAAI,EAAEH;EAA9B,CAAP;AACH,CAhCM"}
1
+ {"version":3,"file":"utils.js","names":["getAccordionHeadHeight","isWrapped","title","width","element","document","createElement","style","fontSize","opacity","pointerEvents","whiteSpace","innerText","body","appendChild","closedHeight","Math","max","clientHeight","fontWeight","openHeight","removeChild","closed","open"],"sources":["../../../src/components/accordion/utils.ts"],"sourcesContent":["interface GetAccordionHeadHeightOptions {\n isWrapped?: boolean;\n title: string;\n width: number;\n}\n\ninterface GetAccordionHeadHeightResult {\n closed: number;\n open: number;\n}\n\nexport const getAccordionHeadHeight = ({\n isWrapped,\n title,\n width,\n}: GetAccordionHeadHeightOptions): GetAccordionHeadHeightResult => {\n const element = document.createElement('div');\n\n element.style.fontSize = '1rem';\n element.style.opacity = '0';\n element.style.pointerEvents = 'none';\n element.style.whiteSpace = 'nowrap';\n element.style.width = `${width}px`;\n\n element.innerText = title;\n\n document.body.appendChild(element);\n\n const closedHeight = Math.max(element.clientHeight + 8, isWrapped ? 40 : 33);\n\n if (isWrapped) {\n element.style.fontWeight = 'bold';\n } else {\n element.style.fontSize = '1.3rem';\n }\n\n element.style.whiteSpace = 'normal';\n\n const openHeight = Math.max(element.clientHeight + 8, isWrapped ? 40 : 33);\n\n document.body.removeChild(element);\n\n return { closed: closedHeight, open: openHeight };\n};\n"],"mappings":";;;;;;AAWO,MAAMA,sBAAsB,GAAG,QAI6B;EAAA,IAJ5B;IACnCC,SAAS;IACTC,KAAK;IACLC;EAC2B,CAAC;EAC5B,MAAMC,OAAO,GAAGC,QAAQ,CAACC,aAAa,CAAC,KAAK,CAAC;EAE7CF,OAAO,CAACG,KAAK,CAACC,QAAQ,GAAG,MAAM;EAC/BJ,OAAO,CAACG,KAAK,CAACE,OAAO,GAAG,GAAG;EAC3BL,OAAO,CAACG,KAAK,CAACG,aAAa,GAAG,MAAM;EACpCN,OAAO,CAACG,KAAK,CAACI,UAAU,GAAG,QAAQ;EACnCP,OAAO,CAACG,KAAK,CAACJ,KAAK,GAAI,GAAEA,KAAM,IAAG;EAElCC,OAAO,CAACQ,SAAS,GAAGV,KAAK;EAEzBG,QAAQ,CAACQ,IAAI,CAACC,WAAW,CAACV,OAAO,CAAC;EAElC,MAAMW,YAAY,GAAGC,IAAI,CAACC,GAAG,CAACb,OAAO,CAACc,YAAY,GAAG,CAAC,EAAEjB,SAAS,GAAG,EAAE,GAAG,EAAE,CAAC;EAE5E,IAAIA,SAAS,EAAE;IACXG,OAAO,CAACG,KAAK,CAACY,UAAU,GAAG,MAAM;EACrC,CAAC,MAAM;IACHf,OAAO,CAACG,KAAK,CAACC,QAAQ,GAAG,QAAQ;EACrC;EAEAJ,OAAO,CAACG,KAAK,CAACI,UAAU,GAAG,QAAQ;EAEnC,MAAMS,UAAU,GAAGJ,IAAI,CAACC,GAAG,CAACb,OAAO,CAACc,YAAY,GAAG,CAAC,EAAEjB,SAAS,GAAG,EAAE,GAAG,EAAE,CAAC;EAE1EI,QAAQ,CAACQ,IAAI,CAACQ,WAAW,CAACjB,OAAO,CAAC;EAElC,OAAO;IAAEkB,MAAM,EAAEP,YAAY;IAAEQ,IAAI,EAAEH;EAAW,CAAC;AACrD,CAAC;AAAC"}
@@ -4,15 +4,10 @@ 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 _Badge = require("./Badge.styles");
13
-
14
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
-
16
11
  const Badge = _ref => {
17
12
  let {
18
13
  backgroundColor,
@@ -27,7 +22,6 @@ const Badge = _ref => {
27
22
  fontColor: fontColor
28
23
  }, children);
29
24
  };
30
-
31
25
  Badge.displayName = 'Badge';
32
26
  var _default = Badge;
33
27
  exports.default = _default;
@@ -1 +1 @@
1
- {"version":3,"file":"Badge.js","names":["Badge","backgroundColor","children","className","fontColor","badgeClasses","clsx","displayName"],"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;;AACA;;AACA;;;;AAqBA,MAAMA,KAAqB,GAAG,QAAyD;EAAA,IAAxD;IAAEC,eAAF;IAAmBC,QAAnB;IAA6BC,SAA7B;IAAwCC;EAAxC,CAAwD;EACnF,MAAMC,YAAY,GAAG,IAAAC,aAAA,EAAK,4BAAL,EAAmCH,SAAnC,CAArB;EAEA,oBACI,6BAAC,kBAAD;IACI,eAAe,EAAEF,eADrB;IAEI,SAAS,EAAEI,YAFf;IAGI,SAAS,EAAED;EAHf,GAKKF,QALL,CADJ;AASH,CAZD;;AAcAF,KAAK,CAACO,WAAN,GAAoB,OAApB;eAEeP,K"}
1
+ {"version":3,"file":"Badge.js","names":["Badge","backgroundColor","children","className","fontColor","badgeClasses","clsx","displayName"],"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;AACA;AACA;AAA6C;AAqB7C,MAAMA,KAAqB,GAAG,QAAyD;EAAA,IAAxD;IAAEC,eAAe;IAAEC,QAAQ;IAAEC,SAAS;IAAEC;EAAU,CAAC;EAC9E,MAAMC,YAAY,GAAG,IAAAC,aAAI,EAAC,4BAA4B,EAAEH,SAAS,CAAC;EAElE,oBACI,6BAAC,kBAAW;IACR,eAAe,EAAEF,eAAgB;IACjC,SAAS,EAAEI,YAAa;IACxB,SAAS,EAAED;EAAU,GAEpBF,QAAQ,CACC;AAEtB,CAAC;AAEDF,KAAK,CAACO,WAAW,GAAG,OAAO;AAAC,eAEbP,KAAK;AAAA"}
@@ -4,28 +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
- const StyledBadge = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background-color: ", ";\n border-radius: 15px;\n color: ", ";\n display: inline-block;\n font-size: 0.8rem;\n min-width: 1.65rem;\n padding: 2px 7px;\n text-align: center;\n"])), _ref => {
9
+ const StyledBadge = _styledComponents.default.div`
10
+ background-color: ${_ref => {
17
11
  let {
18
12
  backgroundColor,
19
13
  theme
20
14
  } = _ref;
21
15
  return backgroundColor !== null && backgroundColor !== void 0 ? backgroundColor : theme['secondary-202'];
22
- }, _ref2 => {
16
+ }};
17
+ border-radius: 15px;
18
+ color: ${_ref2 => {
23
19
  let {
24
20
  fontColor,
25
21
  theme
26
22
  } = _ref2;
27
23
  return fontColor !== null && fontColor !== void 0 ? fontColor : theme['007'];
28
- });
29
-
24
+ }};
25
+ display: inline-block;
26
+ font-size: 0.8rem;
27
+ min-width: 1.65rem;
28
+ padding: 2px 7px;
29
+ text-align: center;
30
+ `;
30
31
  exports.StyledBadge = StyledBadge;
31
32
  //# sourceMappingURL=Badge.styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Badge.styles.js","names":["StyledBadge","styled","div","backgroundColor","theme","fontColor"],"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;;;;;;;;AAMO,MAAMA,WAAW,GAAGC,yBAAA,CAAOC,GAAV,8QACA;EAAA,IAAC;IAAEC,eAAF;IAAmBC;EAAnB,CAAD;EAAA,OAChBD,eADgB,aAChBA,eADgB,cAChBA,eADgB,GACGC,KAAK,CAAC,eAAD,CADR;AAAA,CADA,EAIX;EAAA,IAAC;IAAEC,SAAF;IAAaD;EAAb,CAAD;EAAA,OAA4CC,SAA5C,aAA4CA,SAA5C,cAA4CA,SAA5C,GAAyDD,KAAK,CAAC,KAAD,CAA9D;AAAA,CAJW,CAAjB"}
1
+ {"version":3,"file":"Badge.styles.js","names":["StyledBadge","styled","div","backgroundColor","theme","fontColor"],"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;AAAuC;AAMhC,MAAMA,WAAW,GAAGC,yBAAM,CAACC,GAAsB;AACxD,wBAAwB;EAAA,IAAC;IAAEC,eAAe;IAAEC;EAAwB,CAAC;EAAA,OAC7DD,eAAe,aAAfA,eAAe,cAAfA,eAAe,GAAIC,KAAK,CAAC,eAAe,CAAC;AAAA,CAAC;AAClD;AACA,aAAa;EAAA,IAAC;IAAEC,SAAS;IAAED;EAAwB,CAAC;EAAA,OAAKC,SAAS,aAATA,SAAS,cAATA,SAAS,GAAID,KAAK,CAAC,KAAK,CAAC;AAAA,CAAC;AACnF;AACA;AACA;AACA;AACA;AACA,CAAC;AAAC"}
@@ -4,17 +4,11 @@ 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
12
  const Button = _ref => {
19
13
  let {
20
14
  children,
@@ -25,15 +19,12 @@ const Button = _ref => {
25
19
  onClick,
26
20
  shouldStopPropagation
27
21
  } = _ref;
28
-
29
22
  const handleClick = event => {
30
23
  if (shouldStopPropagation) {
31
24
  event.stopPropagation();
32
25
  }
33
-
34
26
  onClick(event);
35
27
  };
36
-
37
28
  const buttonClasses = (0, _clsx.default)('beta-chayns-button ellipsis', className);
38
29
  return /*#__PURE__*/_react.default.createElement(_Button.StyledButton, {
39
30
  className: buttonClasses,
@@ -46,7 +37,6 @@ const Button = _ref => {
46
37
  icons: [icon]
47
38
  })), children));
48
39
  };
49
-
50
40
  Button.displayName = 'Button';
51
41
  var _default = Button;
52
42
  exports.default = _default;
@@ -1 +1 @@
1
- {"version":3,"file":"Button.js","names":["Button","children","className","icon","isDisabled","isSecondary","onClick","shouldStopPropagation","handleClick","event","stopPropagation","buttonClasses","clsx","displayName"],"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;;AACA;;AACA;;AACA;;;;AAiCA,MAAMA,MAAuB,GAAG,QAQ1B;EAAA,IAR2B;IAC7BC,QAD6B;IAE7BC,SAF6B;IAG7BC,IAH6B;IAI7BC,UAJ6B;IAK7BC,WAL6B;IAM7BC,OAN6B;IAO7BC;EAP6B,CAQ3B;;EACF,MAAMC,WAAiD,GAAIC,KAAD,IAAW;IACjE,IAAIF,qBAAJ,EAA2B;MACvBE,KAAK,CAACC,eAAN;IACH;;IAEDJ,OAAO,CAACG,KAAD,CAAP;EACH,CAND;;EAQA,MAAME,aAAa,GAAG,IAAAC,aAAA,EAAK,6BAAL,EAAoCV,SAApC,CAAtB;EAEA,oBACI,6BAAC,oBAAD;IACI,SAAS,EAAES,aADf;IAEI,QAAQ,EAAEP,UAFd;IAGI,OAAO,EAAE,OAAOD,IAAP,KAAgB,QAAhB,IAA4BA,IAAI,KAAK,EAHlD;IAII,WAAW,EAAEE,WAJjB;IAKI,OAAO,EAAEG;EALb,gBAOI,4DACKL,IAAI,iBACD,6BAAC,yBAAD,qBACI,6BAAC,aAAD;IAAM,KAAK,EAAC,OAAZ;IAAoB,KAAK,EAAE,CAACA,IAAD;EAA3B,EADJ,CAFR,EAMKF,QANL,CAPJ,CADJ;AAkBH,CArCD;;AAuCAD,MAAM,CAACa,WAAP,GAAqB,QAArB;eAEeb,M"}
1
+ {"version":3,"file":"Button.js","names":["Button","children","className","icon","isDisabled","isSecondary","onClick","shouldStopPropagation","handleClick","event","stopPropagation","buttonClasses","clsx","displayName"],"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;AACA;AACA;AACA;AAAkE;AAiClE,MAAMA,MAAuB,GAAG,QAQ1B;EAAA,IAR2B;IAC7BC,QAAQ;IACRC,SAAS;IACTC,IAAI;IACJC,UAAU;IACVC,WAAW;IACXC,OAAO;IACPC;EACJ,CAAC;EACG,MAAMC,WAAiD,GAAIC,KAAK,IAAK;IACjE,IAAIF,qBAAqB,EAAE;MACvBE,KAAK,CAACC,eAAe,EAAE;IAC3B;IAEAJ,OAAO,CAACG,KAAK,CAAC;EAClB,CAAC;EAED,MAAME,aAAa,GAAG,IAAAC,aAAI,EAAC,6BAA6B,EAAEV,SAAS,CAAC;EAEpE,oBACI,6BAAC,oBAAY;IACT,SAAS,EAAES,aAAc;IACzB,QAAQ,EAAEP,UAAW;IACrB,OAAO,EAAE,OAAOD,IAAI,KAAK,QAAQ,IAAIA,IAAI,KAAK,EAAG;IACjD,WAAW,EAAEE,WAAY;IACzB,OAAO,EAAEG;EAAY,gBAErB,4DACKL,IAAI,iBACD,6BAAC,yBAAiB,qBACd,6BAAC,aAAI;IAAC,KAAK,EAAC,OAAO;IAAC,KAAK,EAAE,CAACA,IAAI;EAAE,EAAG,CAE5C,EACAF,QAAQ,CACV,CACQ;AAEvB,CAAC;AAEDD,MAAM,CAACa,WAAW,GAAG,QAAQ;AAAC,eAEfb,MAAM;AAAA"}
@@ -4,42 +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
- const 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"])), _ref => {
9
+ const StyledButton = _styledComponents.default.button`
10
+ background-color: ${_ref => {
17
11
  let {
18
12
  isSecondary,
19
13
  theme
20
14
  } = _ref;
21
15
  return isSecondary ? theme['202'] : theme['408'];
22
- }, _ref2 => {
16
+ }};
17
+ border-radius: 3px;
18
+ box-shadow: 1px 2px 3px rgba(0, 0, 0, 0.2);
19
+ border: none;
20
+ color: ${_ref2 => {
23
21
  let {
24
22
  isSecondary,
25
23
  theme
26
24
  } = _ref2;
27
25
  return isSecondary ? theme.text : 'white';
28
- }, _ref3 => {
26
+ }};
27
+ cursor: pointer;
28
+ display: inline-block;
29
+ line-height: 1.15;
30
+ min-height: 30px;
31
+ opacity: ${_ref3 => {
29
32
  let {
30
33
  disabled
31
34
  } = _ref3;
32
35
  return disabled ? 0.5 : 1;
33
- }, _ref4 => {
36
+ }};
37
+ padding: ${_ref4 => {
34
38
  let {
35
39
  hasIcon
36
40
  } = _ref4;
37
- return "7px 12px 7px ".concat(hasIcon ? '42px' : '12px');
38
- });
39
-
41
+ return `7px 12px 7px ${hasIcon ? '42px' : '12px'}`;
42
+ }};
43
+ position: relative;
44
+ user-select: none;
45
+ transition: opacity 0.3s ease;
46
+ `;
40
47
  exports.StyledButton = StyledButton;
41
-
42
- const 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"])));
43
-
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
+ `;
44
59
  exports.StyledIconWrapper = StyledIconWrapper;
45
60
  //# sourceMappingURL=Button.styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Button.styles.js","names":["StyledButton","styled","button","isSecondary","theme","text","disabled","hasIcon","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;;;;;;;;AASO,MAAMA,YAAY,GAAGC,yBAAA,CAAOC,MAAV,kbACD;EAAA,IAAC;IAAEC,WAAF;IAAeC;EAAf,CAAD;EAAA,OAChBD,WAAW,GAAGC,KAAK,CAAC,KAAD,CAAR,GAAkBA,KAAK,CAAC,KAAD,CADlB;AAAA,CADC,EAMZ;EAAA,IAAC;IAAED,WAAF;IAAeC;EAAf,CAAD;EAAA,OAAgDD,WAAW,GAAGC,KAAK,CAACC,IAAT,GAAgB,OAA3E;AAAA,CANY,EAWV;EAAA,IAAC;IAAEC;EAAF,CAAD;EAAA,OAAmBA,QAAQ,GAAG,GAAH,GAAS,CAApC;AAAA,CAXU,EAYV;EAAA,IAAC;IAAEC;EAAF,CAAD;EAAA,8BAAiCA,OAAO,GAAG,MAAH,GAAY,MAApD;AAAA,CAZU,CAAlB;;;;AAkBA,MAAMC,iBAAiB,GAAGP,yBAAA,CAAOQ,IAAV,4RAAvB"}
1
+ {"version":3,"file":"Button.styles.js","names":["StyledButton","styled","button","isSecondary","theme","text","disabled","hasIcon","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;AAAuC;AAShC,MAAMA,YAAY,GAAGC,yBAAM,CAACC,MAA0B;AAC7D,wBAAwB;EAAA,IAAC;IAAEC,WAAW;IAAEC;EAAyB,CAAC;EAAA,OAC1DD,WAAW,GAAGC,KAAK,CAAC,KAAK,CAAC,GAAGA,KAAK,CAAC,KAAK,CAAC;AAAA,CAAC;AAClD;AACA;AACA;AACA,aAAa;EAAA,IAAC;IAAED,WAAW;IAAEC;EAAyB,CAAC;EAAA,OAAMD,WAAW,GAAGC,KAAK,CAACC,IAAI,GAAG,OAAO;AAAA,CAAE;AACjG;AACA;AACA;AACA;AACA,eAAe;EAAA,IAAC;IAAEC;EAAS,CAAC;EAAA,OAAMA,QAAQ,GAAG,GAAG,GAAG,CAAC;AAAA,CAAE;AACtD,eAAe;EAAA,IAAC;IAAEC;EAAQ,CAAC;EAAA,OAAM,gBAAeA,OAAO,GAAG,MAAM,GAAG,MAAO,EAAC;AAAA,CAAC;AAC5E;AACA;AACA;AACA,CAAC;AAAC;AAEK,MAAMC,iBAAiB,GAAGP,yBAAM,CAACQ,IAAK;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAAC"}
@@ -4,17 +4,11 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  var _react = _interopRequireWildcard(require("react"));
9
-
10
8
  var _uuid = require("../../hooks/uuid");
11
-
12
9
  var _Checkbox = require("./Checkbox.styles");
13
-
14
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); }
15
-
16
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; }
17
-
18
12
  const Checkbox = _ref => {
19
13
  let {
20
14
  children,
@@ -26,7 +20,6 @@ const Checkbox = _ref => {
26
20
  const [isActive, setIsActive] = (0, _react.useState)(isChecked !== null && isChecked !== void 0 ? isChecked : false);
27
21
  const handleChange = (0, _react.useCallback)(event => {
28
22
  setIsActive(event.target.checked);
29
-
30
23
  if (typeof onChange === 'function') {
31
24
  onChange(event);
32
25
  }
@@ -45,7 +38,6 @@ const Checkbox = _ref => {
45
38
  shouldShowAsSwitch: shouldShowAsSwitch
46
39
  }, children));
47
40
  };
48
-
49
41
  Checkbox.displayName = 'Checkbox';
50
42
  var _default = Checkbox;
51
43
  exports.default = _default;