@laerdal/life-react-components 1.7.0-dev.2 → 1.7.0-dev.3.full

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 (206) hide show
  1. package/dist/Accordion/ContentAccordion.cjs +1 -1
  2. package/dist/Accordion/ContentAccordion.cjs.map +1 -1
  3. package/dist/Accordion/ContentAccordion.js +2 -2
  4. package/dist/Accordion/ContentAccordion.js.map +1 -1
  5. package/dist/Accordion/styles.cjs +1 -1
  6. package/dist/Accordion/styles.cjs.map +1 -1
  7. package/dist/Accordion/styles.js +2 -2
  8. package/dist/Accordion/styles.js.map +1 -1
  9. package/dist/Banners/Banner.cjs +3 -3
  10. package/dist/Banners/Banner.cjs.map +1 -1
  11. package/dist/Banners/Banner.js +3 -3
  12. package/dist/Banners/Banner.js.map +1 -1
  13. package/dist/Banners/styles.cjs +1 -1
  14. package/dist/Banners/styles.cjs.map +1 -1
  15. package/dist/Banners/styles.js +1 -1
  16. package/dist/Banners/styles.js.map +1 -1
  17. package/dist/Button/BackButton.cjs +2 -2
  18. package/dist/Button/BackButton.cjs.map +1 -1
  19. package/dist/Button/BackButton.js +3 -3
  20. package/dist/Button/BackButton.js.map +1 -1
  21. package/dist/Button/Button.cjs +8 -21
  22. package/dist/Button/Button.cjs.map +1 -1
  23. package/dist/Button/Button.d.ts +1 -0
  24. package/dist/Button/Button.js +9 -22
  25. package/dist/Button/Button.js.map +1 -1
  26. package/dist/Button/Iconbutton.cjs +14 -27
  27. package/dist/Button/Iconbutton.cjs.map +1 -1
  28. package/dist/Button/Iconbutton.d.ts +2 -0
  29. package/dist/Button/Iconbutton.js +15 -28
  30. package/dist/Button/Iconbutton.js.map +1 -1
  31. package/dist/Card/Card.cjs +1 -1
  32. package/dist/Card/Card.cjs.map +1 -1
  33. package/dist/Card/Card.js +2 -2
  34. package/dist/Card/Card.js.map +1 -1
  35. package/dist/Chips/ChipStyles.cjs +2 -2
  36. package/dist/Chips/ChipStyles.cjs.map +1 -1
  37. package/dist/Chips/ChipStyles.js +3 -3
  38. package/dist/Chips/ChipStyles.js.map +1 -1
  39. package/dist/Dropdown/BasicDropdown.cjs +1 -0
  40. package/dist/Dropdown/BasicDropdown.cjs.map +1 -1
  41. package/dist/Dropdown/BasicDropdown.js +2 -1
  42. package/dist/Dropdown/BasicDropdown.js.map +1 -1
  43. package/dist/Dropdown/ChipDropdownInput.cjs +1 -1
  44. package/dist/Dropdown/ChipDropdownInput.cjs.map +1 -1
  45. package/dist/Dropdown/ChipDropdownInput.js +1 -1
  46. package/dist/Dropdown/ChipDropdownInput.js.map +1 -1
  47. package/dist/Dropdown/CommonStyling.cjs +7 -5
  48. package/dist/Dropdown/CommonStyling.cjs.map +1 -1
  49. package/dist/Dropdown/CommonStyling.js +7 -6
  50. package/dist/Dropdown/CommonStyling.js.map +1 -1
  51. package/dist/Dropdown/DropdownContent.cjs +3 -1
  52. package/dist/Dropdown/DropdownContent.cjs.map +1 -1
  53. package/dist/Dropdown/DropdownContent.js +3 -1
  54. package/dist/Dropdown/DropdownContent.js.map +1 -1
  55. package/dist/Footer/Components/FooterDropdownLinks.cjs +6 -3
  56. package/dist/Footer/Components/FooterDropdownLinks.cjs.map +1 -1
  57. package/dist/Footer/Components/FooterDropdownLinks.js +6 -4
  58. package/dist/Footer/Components/FooterDropdownLinks.js.map +1 -1
  59. package/dist/Footer/Components/FooterNewsletterAndSocialSection.cjs +5 -3
  60. package/dist/Footer/Components/FooterNewsletterAndSocialSection.cjs.map +1 -1
  61. package/dist/Footer/Components/FooterNewsletterAndSocialSection.js +5 -4
  62. package/dist/Footer/Components/FooterNewsletterAndSocialSection.js.map +1 -1
  63. package/dist/Footer/Components/FooterTop.cjs +2 -1
  64. package/dist/Footer/Components/FooterTop.cjs.map +1 -1
  65. package/dist/Footer/Components/FooterTop.js +3 -2
  66. package/dist/Footer/Components/FooterTop.js.map +1 -1
  67. package/dist/GlobalNavigationBar/Avatar.cjs +5 -7
  68. package/dist/GlobalNavigationBar/Avatar.cjs.map +1 -1
  69. package/dist/GlobalNavigationBar/Avatar.js +5 -8
  70. package/dist/GlobalNavigationBar/Avatar.js.map +1 -1
  71. package/dist/GlobalNavigationBar/Logo.cjs +9 -6
  72. package/dist/GlobalNavigationBar/Logo.cjs.map +1 -1
  73. package/dist/GlobalNavigationBar/Logo.d.ts +2 -1
  74. package/dist/GlobalNavigationBar/Logo.js +9 -7
  75. package/dist/GlobalNavigationBar/Logo.js.map +1 -1
  76. package/dist/GlobalNavigationBar/MainMenu.cjs +11 -13
  77. package/dist/GlobalNavigationBar/MainMenu.cjs.map +1 -1
  78. package/dist/GlobalNavigationBar/MainMenu.js +10 -13
  79. package/dist/GlobalNavigationBar/MainMenu.js.map +1 -1
  80. package/dist/GlobalNavigationBar/RightSideNav.cjs +3 -5
  81. package/dist/GlobalNavigationBar/RightSideNav.cjs.map +1 -1
  82. package/dist/GlobalNavigationBar/RightSideNav.js +2 -5
  83. package/dist/GlobalNavigationBar/RightSideNav.js.map +1 -1
  84. package/dist/GlobalNavigationBar/mobile/CommonStyles.cjs +1 -1
  85. package/dist/GlobalNavigationBar/mobile/CommonStyles.cjs.map +1 -1
  86. package/dist/GlobalNavigationBar/mobile/CommonStyles.js +2 -2
  87. package/dist/GlobalNavigationBar/mobile/CommonStyles.js.map +1 -1
  88. package/dist/GlobalNavigationBar/mobile/MobileMenu.cjs +1 -1
  89. package/dist/GlobalNavigationBar/mobile/MobileMenu.cjs.map +1 -1
  90. package/dist/GlobalNavigationBar/mobile/MobileMenu.js +2 -2
  91. package/dist/GlobalNavigationBar/mobile/MobileMenu.js.map +1 -1
  92. package/dist/HyperLink/styling.cjs +1 -1
  93. package/dist/HyperLink/styling.cjs.map +1 -1
  94. package/dist/HyperLink/styling.js +1 -1
  95. package/dist/HyperLink/styling.js.map +1 -1
  96. package/dist/InputFields/Checkbox.cjs +2 -2
  97. package/dist/InputFields/Checkbox.cjs.map +1 -1
  98. package/dist/InputFields/Checkbox.js +3 -3
  99. package/dist/InputFields/Checkbox.js.map +1 -1
  100. package/dist/InputFields/DatepickerField.cjs +4 -4
  101. package/dist/InputFields/DatepickerField.cjs.map +1 -1
  102. package/dist/InputFields/DatepickerField.js +5 -5
  103. package/dist/InputFields/DatepickerField.js.map +1 -1
  104. package/dist/InputFields/QuickSearch.cjs +119 -96
  105. package/dist/InputFields/QuickSearch.cjs.map +1 -1
  106. package/dist/InputFields/QuickSearch.js +119 -96
  107. package/dist/InputFields/QuickSearch.js.map +1 -1
  108. package/dist/InputFields/RadioButton.cjs +2 -2
  109. package/dist/InputFields/RadioButton.cjs.map +1 -1
  110. package/dist/InputFields/RadioButton.js +3 -3
  111. package/dist/InputFields/RadioButton.js.map +1 -1
  112. package/dist/InputFields/SearchBar.cjs +3 -3
  113. package/dist/InputFields/SearchBar.cjs.map +1 -1
  114. package/dist/InputFields/SearchBar.js +3 -3
  115. package/dist/InputFields/SearchBar.js.map +1 -1
  116. package/dist/InputFields/Textarea.cjs +1 -1
  117. package/dist/InputFields/Textarea.cjs.map +1 -1
  118. package/dist/InputFields/Textarea.js +1 -1
  119. package/dist/InputFields/Textarea.js.map +1 -1
  120. package/dist/InputFields/components/SearchBarInput.cjs +6 -8
  121. package/dist/InputFields/components/SearchBarInput.cjs.map +1 -1
  122. package/dist/InputFields/components/SearchBarInput.d.ts +0 -3
  123. package/dist/InputFields/components/SearchBarInput.js +4 -5
  124. package/dist/InputFields/components/SearchBarInput.js.map +1 -1
  125. package/dist/InputFields/components/SearchField.cjs +29 -19
  126. package/dist/InputFields/components/SearchField.cjs.map +1 -1
  127. package/dist/InputFields/components/SearchField.d.ts +8 -8
  128. package/dist/InputFields/components/SearchField.js +25 -18
  129. package/dist/InputFields/components/SearchField.js.map +1 -1
  130. package/dist/InputFields/styling.cjs +6 -8
  131. package/dist/InputFields/styling.cjs.map +1 -1
  132. package/dist/InputFields/styling.js +7 -8
  133. package/dist/InputFields/styling.js.map +1 -1
  134. package/dist/List/ListRow.cjs +5 -2
  135. package/dist/List/ListRow.cjs.map +1 -1
  136. package/dist/List/ListRow.js +5 -3
  137. package/dist/List/ListRow.js.map +1 -1
  138. package/dist/MenuItem/MenuItem.cjs +1 -0
  139. package/dist/MenuItem/MenuItem.cjs.map +1 -1
  140. package/dist/MenuItem/MenuItem.js +2 -1
  141. package/dist/MenuItem/MenuItem.js.map +1 -1
  142. package/dist/NavItem/NavItem.cjs +1 -1
  143. package/dist/NavItem/NavItem.cjs.map +1 -1
  144. package/dist/NavItem/NavItem.js +2 -2
  145. package/dist/NavItem/NavItem.js.map +1 -1
  146. package/dist/Paginator/Paginator.cjs +1 -1
  147. package/dist/Paginator/Paginator.cjs.map +1 -1
  148. package/dist/Paginator/Paginator.js +2 -2
  149. package/dist/Paginator/Paginator.js.map +1 -1
  150. package/dist/QuizButton/QuizButton.cjs +4 -8
  151. package/dist/QuizButton/QuizButton.cjs.map +1 -1
  152. package/dist/QuizButton/QuizButton.js +5 -9
  153. package/dist/QuizButton/QuizButton.js.map +1 -1
  154. package/dist/SegmentControl/SegmentControl.cjs +1 -1
  155. package/dist/SegmentControl/SegmentControl.cjs.map +1 -1
  156. package/dist/SegmentControl/SegmentControl.js +2 -2
  157. package/dist/SegmentControl/SegmentControl.js.map +1 -1
  158. package/dist/Switcher/SwitcherMenuItem.cjs +1 -1
  159. package/dist/Switcher/SwitcherMenuItem.cjs.map +1 -1
  160. package/dist/Switcher/SwitcherMenuItem.js +2 -2
  161. package/dist/Switcher/SwitcherMenuItem.js.map +1 -1
  162. package/dist/Table/TableStyles.cjs +4 -4
  163. package/dist/Table/TableStyles.cjs.map +1 -1
  164. package/dist/Table/TableStyles.js +5 -5
  165. package/dist/Table/TableStyles.js.map +1 -1
  166. package/dist/Tabs/HorizontalTabs.cjs +1 -1
  167. package/dist/Tabs/HorizontalTabs.cjs.map +1 -1
  168. package/dist/Tabs/HorizontalTabs.js +2 -2
  169. package/dist/Tabs/HorizontalTabs.js.map +1 -1
  170. package/dist/Tabs/TabLink.cjs +5 -2
  171. package/dist/Tabs/TabLink.cjs.map +1 -1
  172. package/dist/Tabs/TabLink.js +5 -3
  173. package/dist/Tabs/TabLink.js.map +1 -1
  174. package/dist/Tabs/VerticalTabs.cjs.map +1 -1
  175. package/dist/Tabs/VerticalTabs.js.map +1 -1
  176. package/dist/Toasters/Toast.cjs +2 -0
  177. package/dist/Toasters/Toast.cjs.map +1 -1
  178. package/dist/Toasters/Toast.js +2 -0
  179. package/dist/Toasters/Toast.js.map +1 -1
  180. package/dist/Toggles/ToggleSwitch.cjs +8 -6
  181. package/dist/Toggles/ToggleSwitch.cjs.map +1 -1
  182. package/dist/Toggles/ToggleSwitch.js +8 -6
  183. package/dist/Toggles/ToggleSwitch.js.map +1 -1
  184. package/dist/Toggles/TogglerStyles.cjs +2 -2
  185. package/dist/Toggles/TogglerStyles.cjs.map +1 -1
  186. package/dist/Toggles/TogglerStyles.js +3 -3
  187. package/dist/Toggles/TogglerStyles.js.map +1 -1
  188. package/dist/common/FocusVisible.cjs +24 -1
  189. package/dist/common/FocusVisible.cjs.map +1 -1
  190. package/dist/common/FocusVisible.js +24 -1
  191. package/dist/common/FocusVisible.js.map +1 -1
  192. package/dist/common/InputStyling.cjs +1 -1
  193. package/dist/common/InputStyling.cjs.map +1 -1
  194. package/dist/common/InputStyling.js +2 -2
  195. package/dist/common/InputStyling.js.map +1 -1
  196. package/dist/styles/focus-styles.cjs +22 -0
  197. package/dist/styles/focus-styles.cjs.map +1 -0
  198. package/dist/styles/focus-styles.d.ts +2 -0
  199. package/dist/styles/focus-styles.js +9 -0
  200. package/dist/styles/focus-styles.js.map +1 -0
  201. package/dist/styles/index.cjs +60 -0
  202. package/dist/styles/index.cjs.map +1 -1
  203. package/dist/styles/index.d.ts +1 -0
  204. package/dist/styles/index.js +1 -0
  205. package/dist/styles/index.js.map +1 -1
  206. package/package.json +1 -1
@@ -37,7 +37,7 @@ var TextContainer = _styledComponents.default.div(_templateObject || (_templateO
37
37
 
38
38
  var TextWrapper = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)([""])));
39
39
 
40
- var ButtonContainer = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n border-radius: 8px 0 0 8px;\n display: flex;\n background: ", ";\n\n width: ", ";\n\n transition: background 100ms ease-in-out;\n\n .quiz-button-result-icon {\n height: ", ";\n width: ", ";\n }\n\n .radio-button-icon, .checkbox-icon {\n margin: auto;\n min-width: unset;\n background: transparent;\n\n svg {\n color: ", ";\n }\n\n &:hover {\n background: transparent;\n }\n\n &:focus {\n background: transparent;\n }\n\n &:active {\n background: transparent;\n }\n }\n\n .small {\n min-width: 32px;\n min-height: 32px;\n .radio-button-icon, .checkbox-icon {\n svg {\n height: 16px;\n width: 16px;\n }\n }\n }\n\n .medium {\n min-width: 48px;\n min-height: 48px;\n .radio-button-icon, .checkbox-icon {\n svg {\n height: 24px;\n width: 24px;\n }\n }\n }\n\n .large {\n min-width: 64px;\n min-height: 64px;\n .radio-button-icon, .checkbox-icon {\n svg {\n height: 32px;\n width: 32px;\n }\n }\n }\n"])), _.COLORS.accent1_100, function (props) {
40
+ var ButtonContainer = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n border-radius: 8px 0 0 8px;\n display: flex;\n background: ", ";\n\n width: ", ";\n\n transition: background 100ms ease-in-out;\n\n .quiz-button-result-icon {\n height: ", ";\n width: ", ";\n }\n\n .radio-button-icon, .checkbox-icon {\n margin: auto;\n min-width: unset;\n background: transparent;\n\n svg {\n color: ", ";\n }\n\n &:hover {\n background: transparent;\n }\n\n &:active {\n background: transparent;\n }\n }\n\n .small {\n min-width: 32px;\n min-height: 32px;\n .radio-button-icon, .checkbox-icon {\n svg {\n height: 16px;\n width: 16px;\n }\n }\n }\n\n .medium {\n min-width: 48px;\n min-height: 48px;\n .radio-button-icon, .checkbox-icon {\n svg {\n height: 24px;\n width: 24px;\n }\n }\n }\n\n .large {\n min-width: 64px;\n min-height: 64px;\n .radio-button-icon, .checkbox-icon {\n svg {\n height: 32px;\n width: 32px;\n }\n }\n }\n"])), _.COLORS.accent1_100, function (props) {
41
41
  return props.size === _.Size.Small ? '32px' : props.size === _.Size.Large ? '64px' : '48px';
42
42
  }, function (props) {
43
43
  return props.size === _.Size.Small ? '16px' : props.size === _.Size.Large ? '32px' : '24px';
@@ -45,17 +45,13 @@ var ButtonContainer = _styledComponents.default.div(_templateObject3 || (_templa
45
45
  return props.size === _.Size.Small ? '32px' : props.size === _.Size.Large ? '64px' : '48px';
46
46
  }, _.COLORS.accent1_600);
47
47
 
48
- var OptionContainer = _styledComponents.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: row;\n cursor: pointer;\n max-width: 65ch; \n word-break: break-word;\n\n min-height: ", ";\n margin-bottom: ", ";\n\n &.selected {\n ", " {\n background: ", ";\n }\n ", " {\n background: ", ";\n }\n }\n \n &.disabled {\n cursor: not-allowed;\n \n ", " {\n pointer-events: none;\n background: ", ";\n }\n ", " {\n pointer-events: none;\n background: ", ";\n color: ", ";\n }\n\n .radio-button-icon, .checkbox-icon {\n background: transparent;\n }\n }\n\n &.correct {\n ", " { \n background: ", ";\n }\n ", " {\n background: ", ";\n svg {\n margin: auto;\n }\n }\n }\n\n &.incorrect {\n ", " { \n background: ", ";\n }\n ", " {\n background: ", ";\n svg {\n margin: auto;\n }\n }\n }\n\n &.partial {\n ", " { \n background: ", ";\n }\n ", " {\n background: ", ";\n svg {\n margin: auto;\n }\n }\n } \n\n &:hover,\n &.hover-state {\n .radio-button-icon, .checkbox-icon {\n background: transparent;\n }\n }\n\n &:focus,\n &.focus-state {\n box-shadow: 0px 4px 12px ", ", 0px 0px 8px ", ";\n border-radius: 8px;\n outline: none;\n\n .radio-button-icon, .checkbox-icon {\n background: transparent;\n }\n }\n\n &:active,\n &.active-state {\n .radio-button-icon, .checkbox-icon {\n background: transparent;\n }\n }\n\n &:hover:not(.disabled):not(.result),\n &.hover-state {\n ", " {\n background: ", ";\n }\n ", " {\n background: ", ";\n }\n \n .radio-button-icon, .checkbox-icon {\n background: transparent;\n svg {\n color: ", ";\n }\n }\n }\n\n &:focus:not(.disabled):not(.result),\n &.focus-state {\n ", " {\n background: ", ";\n }\n ", " {\n background: ", ";\n }\n\n .radio-button-icon, .checkbox-icon {\n background: transparent;\n }\n }\n\n &:active:not(.disabled):not(.result),\n &.active-state {\n ", " {\n background: ", ";\n transition: none;\n }\n ", " {\n background: ", ";\n transition: none;\n }\n\n .radio-button-icon, .checkbox-icon {\n background: transparent;\n svg {\n color: ", ";\n }\n }\n }\n"])), function (props) {
48
+ var OptionContainer = _styledComponents.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: row;\n cursor: pointer;\n max-width: 65ch; \n word-break: break-word;\n\n min-height: ", ";\n margin-bottom: ", ";\n\n &.selected {\n ", " {\n background: ", ";\n }\n ", " {\n background: ", ";\n }\n }\n \n &.disabled {\n cursor: not-allowed;\n \n ", " {\n pointer-events: none;\n background: ", ";\n }\n ", " {\n pointer-events: none;\n background: ", ";\n color: ", ";\n }\n\n .radio-button-icon, .checkbox-icon {\n background: transparent;\n }\n }\n\n &.correct {\n ", " { \n background: ", ";\n }\n ", " {\n background: ", ";\n svg {\n margin: auto;\n }\n }\n }\n\n &.incorrect {\n ", " { \n background: ", ";\n }\n ", " {\n background: ", ";\n svg {\n margin: auto;\n }\n }\n }\n\n &.partial {\n ", " { \n background: ", ";\n }\n ", " {\n background: ", ";\n svg {\n margin: auto;\n }\n }\n }\n\n &:focus,\n &.focus-state {\n ", "\n }\n\n &:hover,\n &.hover-state {\n .radio-button-icon, .checkbox-icon {\n background: transparent;\n }\n }\n\n &:active,\n &.active-state {\n .radio-button-icon, .checkbox-icon {\n background: transparent;\n }\n }\n\n &:hover:not(.disabled):not(.result),\n &.hover-state {\n ", " {\n background: ", ";\n }\n ", " {\n background: ", ";\n }\n \n .radio-button-icon, .checkbox-icon {\n background: transparent;\n svg {\n color: ", ";\n }\n }\n }\n\n &:active:not(.disabled):not(.result),\n &.active-state {\n ", " {\n background: ", ";\n transition: none;\n }\n ", " {\n background: ", ";\n transition: none;\n }\n\n .radio-button-icon, .checkbox-icon {\n background: transparent;\n svg {\n color: ", ";\n }\n }\n }\n"])), function (props) {
49
49
  return props.size === _.Size.Small ? '32px' : props.size === _.Size.Large ? '64px' : '48px';
50
50
  }, function (props) {
51
51
  return props.size === _.Size.Small ? '16px' : props.size === _.Size.Large ? '32px' : '24px';
52
- }, TextContainer, _.COLORS.accent1_100, ButtonContainer, _.COLORS.accent1_200, ButtonContainer, _.COLORS.neutral_100, TextContainer, _.COLORS.neutral_20, _.COLORS.neutral_300, TextContainer, _.COLORS.correct_20, ButtonContainer, _.COLORS.correct_400, TextContainer, _.COLORS.critical_20, ButtonContainer, _.COLORS.critical_500, TextContainer, _.COLORS.warning_20, ButtonContainer, _.COLORS.warning_400, _.COLORS.focus_25, _.COLORS.focus, ButtonContainer, _.COLORS.accent1_300, TextContainer, function (props) {
52
+ }, TextContainer, _.COLORS.accent1_100, ButtonContainer, _.COLORS.accent1_200, ButtonContainer, _.COLORS.neutral_100, TextContainer, _.COLORS.neutral_20, _.COLORS.neutral_300, TextContainer, _.COLORS.correct_20, ButtonContainer, _.COLORS.correct_400, TextContainer, _.COLORS.critical_20, ButtonContainer, _.COLORS.critical_500, TextContainer, _.COLORS.warning_20, ButtonContainer, _.COLORS.warning_400, _.focusStyles, ButtonContainer, _.COLORS.accent1_300, TextContainer, function (props) {
53
53
  return props.isSelected ? _.COLORS.accent1_200 : _.COLORS.accent1_100;
54
- }, _.COLORS.accent1_700, ButtonContainer, function (props) {
55
- return props.isSelected ? _.COLORS.accent1_200 : _.COLORS.accent1_100;
56
- }, TextContainer, function (props) {
57
- return props.isSelected ? _.COLORS.accent1_100 : _.COLORS.accent1_20;
58
- }, ButtonContainer, _.COLORS.accent1_400, TextContainer, function (props) {
54
+ }, _.COLORS.accent1_700, ButtonContainer, _.COLORS.accent1_400, TextContainer, function (props) {
59
55
  return props.isSelected ? _.COLORS.accent1_300 : _.COLORS.accent1_200;
60
56
  }, _.COLORS.accent1_800);
61
57
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/QuizButton/QuizButton.tsx"],"names":["TextContainer","styled","div","COLORS","accent1_20","props","size","Size","Small","Large","ComponentTextStyle","Regular","TextWrapper","ButtonContainer","accent1_100","accent1_600","OptionContainer","accent1_200","neutral_100","neutral_20","neutral_300","correct_20","correct_400","critical_20","critical_500","warning_20","warning_400","focus_25","focus","accent1_300","isSelected","accent1_700","accent1_400","accent1_800","renderResultContent","resultType","white","QuizButton","text","type","onClick","id","className","selected","disabled","Medium","defaultOnMouseDownHandler","concat"],"mappings":";;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,IAAMA,aAAa,GAAGC,0BAAOC,GAAV,+QAGHC,SAAOC,UAHJ,EASN,UAAAC,KAAK;AAAA,SAAEA,KAAK,CAACC,IAAN,KAAaC,OAAKC,KAAlB,GAAwB,SAAxB,GAAmCH,KAAK,CAACC,IAAN,KAAaC,OAAKE,KAAlB,GAAwB,WAAxB,GAAoC,WAAzE;AAAA,CATC,EAUf,UAAAJ,KAAK;AAAA,SAAEA,KAAK,CAACC,IAAN,KAAaC,OAAKC,KAAlB,GAA0B,mCAAkBE,+BAAmBC,OAArC,EAA6C,IAA7C,CAA1B,GAAgFN,KAAK,CAACC,IAAN,KAAaC,OAAKE,KAAlB,GAA0B,mCAAkBC,+BAAmBC,OAArC,EAA6C,IAA7C,CAA1B,GAA+E,mCAAkBD,+BAAmBC,OAArC,EAA6C,IAA7C,CAAjK;AAAA,CAVU,CAAnB;;AAaA,IAAMC,WAAW,GAAGX,0BAAOC,GAAV,qFAAjB;;AAEA,IAAMW,eAAe,GAAGZ,0BAAOC,GAAV,8oCAGLC,SAAOW,WAHF,EAKV,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U,GAAGD,mBAAmB,CAACC,UAAD,CAAtB,GACUI,IAAI,KAAG,OAAP,gBAAiB,qBAAC,aAAD;AAAa,QAAA,QAAQ,EAAEI,QAAvB;AAAiC,QAAA,QAAQ,EAAEC,QAA3C;AAAqD,QAAA,IAAI,EAAEtC,IAA3D;AAAiE,QAAA,WAAW,EAAE,CAAC,CAA/E;AACjB,QAAA,MAAM,EAAE,kBAAI,CAAE,CADG;AACD,QAAA,EAAE,EAAEmC;AADH,QAAjB,gBAC4B,qBAAC,UAAD;AAAU,QAAA,QAAQ,EAAEE,QAApB;AAA8B,QAAA,QAAQ,EAAEC,QAAxC;AAAkD,QAAA,IAAI,EAAEtC,IAAxD;AAA8D,QAAA,WAAW,EAAE,CAAC,CAA5E;AAC5B,QAAA,MAAM,EAAE,kBAAI,CAAE,CADc;AACZ,QAAA,EAAE,EAAEmC;AADQ;AAJpD,MANJ,eAgBI,qBAAC,aAAD;AAAe,qBAAa,cAA5B;AAA4C,MAAA,SAAS,EAAE,kBAAvD;AAA2E,MAAA,IAAI,EAAEnC,IAAjF;AAAA,6BACE,qBAAC,WAAD;AAAa,QAAA,IAAI,EAAEA,IAAnB;AAAA,kBACGgC;AADH;AADF,MAhBJ;AAAA,IADF;AAwBD,CAzBD;;;AAXEH,EAAAA,U,4BAAa,S,EAAY,W,EAAc,S;AACvCG,EAAAA,I;AACAE,EAAAA,O;AACAC,EAAAA,E;AACAE,EAAAA,Q;AACAC,EAAAA,Q;AAEAL,EAAAA,I,4BAAM,O,EAAU,U;AAChBG,EAAAA,S;;eA8BaL,U","sourcesContent":["import * as React from 'react';\nimport styled from 'styled-components';\nimport {Checkbox, COLORS, defaultOnMouseDownHandler, RadioButton, Size, SystemIcons} from '..';\nimport { ComponentLStyling, ComponentMStyling, ComponentSStyling, ComponentTextStyle } from '../styles/typography';\n\nconst TextContainer = styled.div<{size: Size}>`\n border-radius: 0 8px 8px 0;\n display: flex;\n background: ${COLORS.accent1_20};\n width: 100%;\n\n transition: background 100ms ease-in-out;\n align-items: center;\n\n padding: ${props=>props.size===Size.Small?'6px 8px':(props.size===Size.Large?'20px 16px':'12px 16px')};\n ${props=>props.size===Size.Small ? ComponentSStyling(ComponentTextStyle.Regular,null) : (props.size===Size.Large ? ComponentLStyling(ComponentTextStyle.Regular,null) : ComponentMStyling(ComponentTextStyle.Regular,null))}\n`;\n\nconst TextWrapper = styled.div<{size:Size}>``;\n\nconst ButtonContainer = styled.div<{size: Size}>`\n border-radius: 8px 0 0 8px;\n display: flex;\n background: ${COLORS.accent1_100};\n\n width: ${props=>props.size===Size.Small?'32px':(props.size===Size.Large?'64px':'48px')};\n\n transition: background 100ms ease-in-out;\n\n .quiz-button-result-icon {\n height: ${props=>props.size===Size.Small?'16px':(props.size===Size.Large?'32px':'24px')};\n width: ${props=>props.size===Size.Small?'32px':(props.size===Size.Large?'64px':'48px')};\n }\n\n .radio-button-icon, .checkbox-icon {\n margin: auto;\n min-width: unset;\n background: transparent;\n\n svg {\n color: ${COLORS.accent1_600};\n }\n\n &:hover {\n background: transparent;\n }\n\n &:focus {\n background: transparent;\n }\n\n &:active {\n background: transparent;\n }\n }\n\n .small {\n min-width: 32px;\n min-height: 32px;\n .radio-button-icon, .checkbox-icon {\n svg {\n height: 16px;\n width: 16px;\n }\n }\n }\n\n .medium {\n min-width: 48px;\n min-height: 48px;\n .radio-button-icon, .checkbox-icon {\n svg {\n height: 24px;\n width: 24px;\n }\n }\n }\n\n .large {\n min-width: 64px;\n min-height: 64px;\n .radio-button-icon, .checkbox-icon {\n svg {\n height: 32px;\n width: 32px;\n }\n }\n }\n`;\n\nconst OptionContainer = styled.div<{isSelected:boolean, size:Size}>`\n display: flex;\n flex-direction: row;\n cursor: pointer;\n max-width: 65ch; \n word-break: break-word;\n\n min-height: ${props=>props.size===Size.Small?'32px':(props.size===Size.Large?'64px':'48px')};\n margin-bottom: ${props=>props.size===Size.Small?'16px':(props.size===Size.Large?'32px':'24px')};\n\n &.selected {\n ${TextContainer} {\n background: ${COLORS.accent1_100};\n }\n ${ButtonContainer} {\n background: ${COLORS.accent1_200};\n }\n }\n \n &.disabled {\n cursor: not-allowed;\n \n ${ButtonContainer} {\n pointer-events: none;\n background: ${COLORS.neutral_100};\n }\n ${TextContainer} {\n pointer-events: none;\n background: ${COLORS.neutral_20};\n color: ${COLORS.neutral_300};\n }\n\n .radio-button-icon, .checkbox-icon {\n background: transparent;\n }\n }\n\n &.correct {\n ${TextContainer} { \n background: ${COLORS.correct_20};\n }\n ${ButtonContainer} {\n background: ${COLORS.correct_400};\n svg {\n margin: auto;\n }\n }\n }\n\n &.incorrect {\n ${TextContainer} { \n background: ${COLORS.critical_20};\n }\n ${ButtonContainer} {\n background: ${COLORS.critical_500};\n svg {\n margin: auto;\n }\n }\n }\n\n &.partial {\n ${TextContainer} { \n background: ${COLORS.warning_20};\n }\n ${ButtonContainer} {\n background: ${COLORS.warning_400};\n svg {\n margin: auto;\n }\n }\n } \n\n &:hover,\n &.hover-state {\n .radio-button-icon, .checkbox-icon {\n background: transparent;\n }\n }\n\n &:focus,\n &.focus-state {\n box-shadow: 0px 4px 12px ${COLORS.focus_25}, 0px 0px 8px ${COLORS.focus};\n border-radius: 8px;\n outline: none;\n\n .radio-button-icon, .checkbox-icon {\n background: transparent;\n }\n }\n\n &:active,\n &.active-state {\n .radio-button-icon, .checkbox-icon {\n background: transparent;\n }\n }\n\n &:hover:not(.disabled):not(.result),\n &.hover-state {\n ${ButtonContainer} {\n background: ${COLORS.accent1_300};\n }\n ${TextContainer} {\n background: ${props=>props.isSelected ? COLORS.accent1_200 : COLORS.accent1_100};\n }\n \n .radio-button-icon, .checkbox-icon {\n background: transparent;\n svg {\n color: ${COLORS.accent1_700};\n }\n }\n }\n\n &:focus:not(.disabled):not(.result),\n &.focus-state {\n ${ButtonContainer} {\n background: ${props=>props.isSelected ? COLORS.accent1_200 : COLORS.accent1_100};\n }\n ${TextContainer} {\n background: ${props=>props.isSelected ? COLORS.accent1_100 : COLORS.accent1_20};\n }\n\n .radio-button-icon, .checkbox-icon {\n background: transparent;\n }\n }\n\n &:active:not(.disabled):not(.result),\n &.active-state {\n ${ButtonContainer} {\n background: ${COLORS.accent1_400};\n transition: none;\n }\n ${TextContainer} {\n background: ${props=>props.isSelected ? COLORS.accent1_300 : COLORS.accent1_200};\n transition: none;\n }\n\n .radio-button-icon, .checkbox-icon {\n background: transparent;\n svg {\n color: ${COLORS.accent1_800};\n }\n }\n }\n`;\n\nconst renderResultContent = (resultType: string) => {\n switch(resultType){\n case 'correct' : return <SystemIcons.CheckComplete color={COLORS.white} className={'quiz-button-result-icon'}/>;\n\n case 'incorrect' : return <SystemIcons.Close color={COLORS.white} className={'quiz-button-result-icon'}/>;\n\n default : return <SystemIcons.Close color={COLORS.white} className={'quiz-button-result-icon'}/>;\n }\n};\n\ntype QuizButtonProps = {\n resultType?: 'correct' | 'incorrect' | 'partial';\n text: string;\n onClick?: (arg:any)=>void;\n id: string;\n selected?: boolean;\n disabled?: boolean;\n size?: Size.Small | Size.Medium | Size.Large;\n type: 'radio' | 'checkbox';\n className?: string;\n}\n\nconst QuizButton: React.FunctionComponent<QuizButtonProps> = ({text, type, onClick, resultType, id, className, selected=false, disabled=false, size=Size.Medium}) => {\n return ( \n <OptionContainer onClick={onClick} isSelected={selected} tabIndex={(disabled || resultType )?-1 : 0} onMouseDown={defaultOnMouseDownHandler} size={size}\n className={'quiz-button '.concat(selected?' selected':'')\n .concat(disabled?' disabled':'')\n .concat(resultType?' result '+resultType:'')\n .concat(className?' ' + className:'')}\n data-testid={'container'}>\n <ButtonContainer data-testid={'btnContainer'} className={'quiz-button-icon'} size={size}>\n {\n resultType ? renderResultContent(resultType) : (\n type==='radio' ? <RadioButton selected={selected} disabled={disabled} size={size} tabIndexVal={-1}\n select={()=>{}} id={id}/> : <Checkbox selected={selected} disabled={disabled} size={size} tabIndexVal={-1}\n select={()=>{}} id={id}/>\n )\n }\n </ButtonContainer>\n\n <TextContainer data-testid={'txtContainer'} className={'quiz-button-text'} size={size}>\n <TextWrapper size={size}>\n {text}\n </TextWrapper>\n </TextContainer>\n </OptionContainer>\n );\n};\n\nexport default QuizButton;\n"],"file":"QuizButton.cjs"}
1
+ {"version":3,"sources":["../../src/QuizButton/QuizButton.tsx"],"names":["TextContainer","styled","div","COLORS","accent1_20","props","size","Size","Small","Large","ComponentTextStyle","Regular","TextWrapper","ButtonContainer","accent1_100","accent1_600","OptionContainer","accent1_200","neutral_100","neutral_20","neutral_300","correct_20","correct_400","critical_20","critical_500","warning_20","warning_400","focusStyles","accent1_300","isSelected","accent1_700","accent1_400","accent1_800","renderResultContent","resultType","white","QuizButton","text","type","onClick","id","className","selected","disabled","Medium","defaultOnMouseDownHandler","concat"],"mappings":";;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,IAAMA,aAAa,GAAGC,0BAAOC,GAAV,+QAGHC,SAAOC,UAHJ,EASN,UAAAC,KAAK;AAAA,SAAEA,KAAK,CAACC,IAAN,KAAaC,OAAKC,KAAlB,GAAwB,SAAxB,GAAmCH,KAAK,CAACC,IAAN,KAAaC,OAAKE,KAAlB,GAAwB,WAAxB,GAAoC,WAAzE;AAAA,CATC,EAUf,UAAAJ,KAAK;AAAA,SAAEA,KAAK,CAACC,IAAN,KAAaC,OAAKC,KAAlB,GAA0B,mCAAkBE,+BAAmBC,OAArC,EAA6C,IAA7C,CAA1B,GAAgFN,KAAK,CAACC,IAAN,KAAaC,OAAKE,KAAlB,GAA0B,mCAAkBC,+BAAmBC,OAArC,EAA6C,IAA7C,CAA1B,GAA+E,mCAAkBD,+BAAmBC,OAArC,EAA6C,IAA7C,CAAjK;AAAA,CAVU,CAAnB;;AAaA,IAAMC,WAAW,GAAGX,0BAAOC,GAAV,qFAAjB;;AAEA,IAAMW,eAAe,GAAGZ,0BAAOC,GAAV,slCAGLC,SAAOW,WAHF,EAKV,UAAAT,KAAK;AAAA,SAAEA,KAAK,CAACC,IAAN,KAAaC,OAAKC,KAAlB,GA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ApB;AAA8B,QAAA,QAAQ,EAAEC,QAAxC;AAAkD,QAAA,IAAI,EAAErC,IAAxD;AAA8D,QAAA,WAAW,EAAE,CAAC,CAA5E;AAC5B,QAAA,MAAM,EAAE,kBAAI,CAAE,CADc;AACZ,QAAA,EAAE,EAAEkC;AADQ;AAJpD,MANJ,eAgBI,qBAAC,aAAD;AAAe,qBAAa,cAA5B;AAA4C,MAAA,SAAS,EAAE,kBAAvD;AAA2E,MAAA,IAAI,EAAElC,IAAjF;AAAA,6BACE,qBAAC,WAAD;AAAa,QAAA,IAAI,EAAEA,IAAnB;AAAA,kBACG+B;AADH;AADF,MAhBJ;AAAA,IADF;AAwBD,CAzBD;;;AAXEH,EAAAA,U,4BAAa,S,EAAY,W,EAAc,S;AACvCG,EAAAA,I;AACAE,EAAAA,O;AACAC,EAAAA,E;AACAE,EAAAA,Q;AACAC,EAAAA,Q;AAEAL,EAAAA,I,4BAAM,O,EAAU,U;AAChBG,EAAAA,S;;eA8BaL,U","sourcesContent":["import * as React from 'react';\nimport styled from 'styled-components';\nimport {Checkbox, COLORS, defaultOnMouseDownHandler, focusStyles, RadioButton, Size, SystemIcons} from '..';\nimport { ComponentLStyling, ComponentMStyling, ComponentSStyling, ComponentTextStyle } from '../styles/typography';\n\nconst TextContainer = styled.div<{size: Size}>`\n border-radius: 0 8px 8px 0;\n display: flex;\n background: ${COLORS.accent1_20};\n width: 100%;\n\n transition: background 100ms ease-in-out;\n align-items: center;\n\n padding: ${props=>props.size===Size.Small?'6px 8px':(props.size===Size.Large?'20px 16px':'12px 16px')};\n ${props=>props.size===Size.Small ? ComponentSStyling(ComponentTextStyle.Regular,null) : (props.size===Size.Large ? ComponentLStyling(ComponentTextStyle.Regular,null) : ComponentMStyling(ComponentTextStyle.Regular,null))}\n`;\n\nconst TextWrapper = styled.div<{size:Size}>``;\n\nconst ButtonContainer = styled.div<{size: Size}>`\n border-radius: 8px 0 0 8px;\n display: flex;\n background: ${COLORS.accent1_100};\n\n width: ${props=>props.size===Size.Small?'32px':(props.size===Size.Large?'64px':'48px')};\n\n transition: background 100ms ease-in-out;\n\n .quiz-button-result-icon {\n height: ${props=>props.size===Size.Small?'16px':(props.size===Size.Large?'32px':'24px')};\n width: ${props=>props.size===Size.Small?'32px':(props.size===Size.Large?'64px':'48px')};\n }\n\n .radio-button-icon, .checkbox-icon {\n margin: auto;\n min-width: unset;\n background: transparent;\n\n svg {\n color: ${COLORS.accent1_600};\n }\n\n &:hover {\n background: transparent;\n }\n\n &:active {\n background: transparent;\n }\n }\n\n .small {\n min-width: 32px;\n min-height: 32px;\n .radio-button-icon, .checkbox-icon {\n svg {\n height: 16px;\n width: 16px;\n }\n }\n }\n\n .medium {\n min-width: 48px;\n min-height: 48px;\n .radio-button-icon, .checkbox-icon {\n svg {\n height: 24px;\n width: 24px;\n }\n }\n }\n\n .large {\n min-width: 64px;\n min-height: 64px;\n .radio-button-icon, .checkbox-icon {\n svg {\n height: 32px;\n width: 32px;\n }\n }\n }\n`;\n\nconst OptionContainer = styled.div<{isSelected:boolean, size:Size}>`\n display: flex;\n flex-direction: row;\n cursor: pointer;\n max-width: 65ch; \n word-break: break-word;\n\n min-height: ${props=>props.size===Size.Small?'32px':(props.size===Size.Large?'64px':'48px')};\n margin-bottom: ${props=>props.size===Size.Small?'16px':(props.size===Size.Large?'32px':'24px')};\n\n &.selected {\n ${TextContainer} {\n background: ${COLORS.accent1_100};\n }\n ${ButtonContainer} {\n background: ${COLORS.accent1_200};\n }\n }\n \n &.disabled {\n cursor: not-allowed;\n \n ${ButtonContainer} {\n pointer-events: none;\n background: ${COLORS.neutral_100};\n }\n ${TextContainer} {\n pointer-events: none;\n background: ${COLORS.neutral_20};\n color: ${COLORS.neutral_300};\n }\n\n .radio-button-icon, .checkbox-icon {\n background: transparent;\n }\n }\n\n &.correct {\n ${TextContainer} { \n background: ${COLORS.correct_20};\n }\n ${ButtonContainer} {\n background: ${COLORS.correct_400};\n svg {\n margin: auto;\n }\n }\n }\n\n &.incorrect {\n ${TextContainer} { \n background: ${COLORS.critical_20};\n }\n ${ButtonContainer} {\n background: ${COLORS.critical_500};\n svg {\n margin: auto;\n }\n }\n }\n\n &.partial {\n ${TextContainer} { \n background: ${COLORS.warning_20};\n }\n ${ButtonContainer} {\n background: ${COLORS.warning_400};\n svg {\n margin: auto;\n }\n }\n }\n\n &:focus,\n &.focus-state {\n ${focusStyles}\n }\n\n &:hover,\n &.hover-state {\n .radio-button-icon, .checkbox-icon {\n background: transparent;\n }\n }\n\n &:active,\n &.active-state {\n .radio-button-icon, .checkbox-icon {\n background: transparent;\n }\n }\n\n &:hover:not(.disabled):not(.result),\n &.hover-state {\n ${ButtonContainer} {\n background: ${COLORS.accent1_300};\n }\n ${TextContainer} {\n background: ${props=>props.isSelected ? COLORS.accent1_200 : COLORS.accent1_100};\n }\n \n .radio-button-icon, .checkbox-icon {\n background: transparent;\n svg {\n color: ${COLORS.accent1_700};\n }\n }\n }\n\n &:active:not(.disabled):not(.result),\n &.active-state {\n ${ButtonContainer} {\n background: ${COLORS.accent1_400};\n transition: none;\n }\n ${TextContainer} {\n background: ${props=>props.isSelected ? COLORS.accent1_300 : COLORS.accent1_200};\n transition: none;\n }\n\n .radio-button-icon, .checkbox-icon {\n background: transparent;\n svg {\n color: ${COLORS.accent1_800};\n }\n }\n }\n`;\n\nconst renderResultContent = (resultType: string) => {\n switch(resultType){\n case 'correct' : return <SystemIcons.CheckComplete color={COLORS.white} className={'quiz-button-result-icon'}/>;\n\n case 'incorrect' : return <SystemIcons.Close color={COLORS.white} className={'quiz-button-result-icon'}/>;\n\n default : return <SystemIcons.Close color={COLORS.white} className={'quiz-button-result-icon'}/>;\n }\n};\n\ntype QuizButtonProps = {\n resultType?: 'correct' | 'incorrect' | 'partial';\n text: string;\n onClick?: (arg:any)=>void;\n id: string;\n selected?: boolean;\n disabled?: boolean;\n size?: Size.Small | Size.Medium | Size.Large;\n type: 'radio' | 'checkbox';\n className?: string;\n}\n\nconst QuizButton: React.FunctionComponent<QuizButtonProps> = ({text, type, onClick, resultType, id, className, selected=false, disabled=false, size=Size.Medium}) => {\n return ( \n <OptionContainer onClick={onClick} isSelected={selected} tabIndex={(disabled || resultType )?-1 : 0} onMouseDown={defaultOnMouseDownHandler} size={size}\n className={'quiz-button '.concat(selected?' selected':'')\n .concat(disabled?' disabled':'')\n .concat(resultType?' result '+resultType:'')\n .concat(className?' ' + className:'')}\n data-testid={'container'}>\n <ButtonContainer data-testid={'btnContainer'} className={'quiz-button-icon'} size={size}>\n {\n resultType ? renderResultContent(resultType) : (\n type==='radio' ? <RadioButton selected={selected} disabled={disabled} size={size} tabIndexVal={-1}\n select={()=>{}} id={id}/> : <Checkbox selected={selected} disabled={disabled} size={size} tabIndexVal={-1}\n select={()=>{}} id={id}/>\n )\n }\n </ButtonContainer>\n\n <TextContainer data-testid={'txtContainer'} className={'quiz-button-text'} size={size}>\n <TextWrapper size={size}>\n {text}\n </TextWrapper>\n </TextContainer>\n </OptionContainer>\n );\n};\n\nexport default QuizButton;\n"],"file":"QuizButton.cjs"}
@@ -5,7 +5,7 @@ var _templateObject, _templateObject2, _templateObject3, _templateObject4;
5
5
 
6
6
  import * as React from 'react';
7
7
  import styled from 'styled-components';
8
- import { Checkbox, COLORS, defaultOnMouseDownHandler, RadioButton, Size, SystemIcons } from '..';
8
+ import { Checkbox, COLORS, defaultOnMouseDownHandler, focusStyles, RadioButton, Size, SystemIcons } from '..';
9
9
  import { ComponentLStyling, ComponentMStyling, ComponentSStyling, ComponentTextStyle } from '../styles/typography';
10
10
  import { jsx as _jsx } from "react/jsx-runtime";
11
11
  import { jsxs as _jsxs } from "react/jsx-runtime";
@@ -15,24 +15,20 @@ var TextContainer = styled.div(_templateObject || (_templateObject = _taggedTemp
15
15
  return props.size === Size.Small ? ComponentSStyling(ComponentTextStyle.Regular, null) : props.size === Size.Large ? ComponentLStyling(ComponentTextStyle.Regular, null) : ComponentMStyling(ComponentTextStyle.Regular, null);
16
16
  });
17
17
  var TextWrapper = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral([""])));
18
- var ButtonContainer = styled.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n border-radius: 8px 0 0 8px;\n display: flex;\n background: ", ";\n\n width: ", ";\n\n transition: background 100ms ease-in-out;\n\n .quiz-button-result-icon {\n height: ", ";\n width: ", ";\n }\n\n .radio-button-icon, .checkbox-icon {\n margin: auto;\n min-width: unset;\n background: transparent;\n\n svg {\n color: ", ";\n }\n\n &:hover {\n background: transparent;\n }\n\n &:focus {\n background: transparent;\n }\n\n &:active {\n background: transparent;\n }\n }\n\n .small {\n min-width: 32px;\n min-height: 32px;\n .radio-button-icon, .checkbox-icon {\n svg {\n height: 16px;\n width: 16px;\n }\n }\n }\n\n .medium {\n min-width: 48px;\n min-height: 48px;\n .radio-button-icon, .checkbox-icon {\n svg {\n height: 24px;\n width: 24px;\n }\n }\n }\n\n .large {\n min-width: 64px;\n min-height: 64px;\n .radio-button-icon, .checkbox-icon {\n svg {\n height: 32px;\n width: 32px;\n }\n }\n }\n"])), COLORS.accent1_100, function (props) {
18
+ var ButtonContainer = styled.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n border-radius: 8px 0 0 8px;\n display: flex;\n background: ", ";\n\n width: ", ";\n\n transition: background 100ms ease-in-out;\n\n .quiz-button-result-icon {\n height: ", ";\n width: ", ";\n }\n\n .radio-button-icon, .checkbox-icon {\n margin: auto;\n min-width: unset;\n background: transparent;\n\n svg {\n color: ", ";\n }\n\n &:hover {\n background: transparent;\n }\n\n &:active {\n background: transparent;\n }\n }\n\n .small {\n min-width: 32px;\n min-height: 32px;\n .radio-button-icon, .checkbox-icon {\n svg {\n height: 16px;\n width: 16px;\n }\n }\n }\n\n .medium {\n min-width: 48px;\n min-height: 48px;\n .radio-button-icon, .checkbox-icon {\n svg {\n height: 24px;\n width: 24px;\n }\n }\n }\n\n .large {\n min-width: 64px;\n min-height: 64px;\n .radio-button-icon, .checkbox-icon {\n svg {\n height: 32px;\n width: 32px;\n }\n }\n }\n"])), COLORS.accent1_100, function (props) {
19
19
  return props.size === Size.Small ? '32px' : props.size === Size.Large ? '64px' : '48px';
20
20
  }, function (props) {
21
21
  return props.size === Size.Small ? '16px' : props.size === Size.Large ? '32px' : '24px';
22
22
  }, function (props) {
23
23
  return props.size === Size.Small ? '32px' : props.size === Size.Large ? '64px' : '48px';
24
24
  }, COLORS.accent1_600);
25
- var OptionContainer = styled.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n cursor: pointer;\n max-width: 65ch; \n word-break: break-word;\n\n min-height: ", ";\n margin-bottom: ", ";\n\n &.selected {\n ", " {\n background: ", ";\n }\n ", " {\n background: ", ";\n }\n }\n \n &.disabled {\n cursor: not-allowed;\n \n ", " {\n pointer-events: none;\n background: ", ";\n }\n ", " {\n pointer-events: none;\n background: ", ";\n color: ", ";\n }\n\n .radio-button-icon, .checkbox-icon {\n background: transparent;\n }\n }\n\n &.correct {\n ", " { \n background: ", ";\n }\n ", " {\n background: ", ";\n svg {\n margin: auto;\n }\n }\n }\n\n &.incorrect {\n ", " { \n background: ", ";\n }\n ", " {\n background: ", ";\n svg {\n margin: auto;\n }\n }\n }\n\n &.partial {\n ", " { \n background: ", ";\n }\n ", " {\n background: ", ";\n svg {\n margin: auto;\n }\n }\n } \n\n &:hover,\n &.hover-state {\n .radio-button-icon, .checkbox-icon {\n background: transparent;\n }\n }\n\n &:focus,\n &.focus-state {\n box-shadow: 0px 4px 12px ", ", 0px 0px 8px ", ";\n border-radius: 8px;\n outline: none;\n\n .radio-button-icon, .checkbox-icon {\n background: transparent;\n }\n }\n\n &:active,\n &.active-state {\n .radio-button-icon, .checkbox-icon {\n background: transparent;\n }\n }\n\n &:hover:not(.disabled):not(.result),\n &.hover-state {\n ", " {\n background: ", ";\n }\n ", " {\n background: ", ";\n }\n \n .radio-button-icon, .checkbox-icon {\n background: transparent;\n svg {\n color: ", ";\n }\n }\n }\n\n &:focus:not(.disabled):not(.result),\n &.focus-state {\n ", " {\n background: ", ";\n }\n ", " {\n background: ", ";\n }\n\n .radio-button-icon, .checkbox-icon {\n background: transparent;\n }\n }\n\n &:active:not(.disabled):not(.result),\n &.active-state {\n ", " {\n background: ", ";\n transition: none;\n }\n ", " {\n background: ", ";\n transition: none;\n }\n\n .radio-button-icon, .checkbox-icon {\n background: transparent;\n svg {\n color: ", ";\n }\n }\n }\n"])), function (props) {
25
+ var OptionContainer = styled.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n cursor: pointer;\n max-width: 65ch; \n word-break: break-word;\n\n min-height: ", ";\n margin-bottom: ", ";\n\n &.selected {\n ", " {\n background: ", ";\n }\n ", " {\n background: ", ";\n }\n }\n \n &.disabled {\n cursor: not-allowed;\n \n ", " {\n pointer-events: none;\n background: ", ";\n }\n ", " {\n pointer-events: none;\n background: ", ";\n color: ", ";\n }\n\n .radio-button-icon, .checkbox-icon {\n background: transparent;\n }\n }\n\n &.correct {\n ", " { \n background: ", ";\n }\n ", " {\n background: ", ";\n svg {\n margin: auto;\n }\n }\n }\n\n &.incorrect {\n ", " { \n background: ", ";\n }\n ", " {\n background: ", ";\n svg {\n margin: auto;\n }\n }\n }\n\n &.partial {\n ", " { \n background: ", ";\n }\n ", " {\n background: ", ";\n svg {\n margin: auto;\n }\n }\n }\n\n &:focus,\n &.focus-state {\n ", "\n }\n\n &:hover,\n &.hover-state {\n .radio-button-icon, .checkbox-icon {\n background: transparent;\n }\n }\n\n &:active,\n &.active-state {\n .radio-button-icon, .checkbox-icon {\n background: transparent;\n }\n }\n\n &:hover:not(.disabled):not(.result),\n &.hover-state {\n ", " {\n background: ", ";\n }\n ", " {\n background: ", ";\n }\n \n .radio-button-icon, .checkbox-icon {\n background: transparent;\n svg {\n color: ", ";\n }\n }\n }\n\n &:active:not(.disabled):not(.result),\n &.active-state {\n ", " {\n background: ", ";\n transition: none;\n }\n ", " {\n background: ", ";\n transition: none;\n }\n\n .radio-button-icon, .checkbox-icon {\n background: transparent;\n svg {\n color: ", ";\n }\n }\n }\n"])), function (props) {
26
26
  return props.size === Size.Small ? '32px' : props.size === Size.Large ? '64px' : '48px';
27
27
  }, function (props) {
28
28
  return props.size === Size.Small ? '16px' : props.size === Size.Large ? '32px' : '24px';
29
- }, TextContainer, COLORS.accent1_100, ButtonContainer, COLORS.accent1_200, ButtonContainer, COLORS.neutral_100, TextContainer, COLORS.neutral_20, COLORS.neutral_300, TextContainer, COLORS.correct_20, ButtonContainer, COLORS.correct_400, TextContainer, COLORS.critical_20, ButtonContainer, COLORS.critical_500, TextContainer, COLORS.warning_20, ButtonContainer, COLORS.warning_400, COLORS.focus_25, COLORS.focus, ButtonContainer, COLORS.accent1_300, TextContainer, function (props) {
29
+ }, TextContainer, COLORS.accent1_100, ButtonContainer, COLORS.accent1_200, ButtonContainer, COLORS.neutral_100, TextContainer, COLORS.neutral_20, COLORS.neutral_300, TextContainer, COLORS.correct_20, ButtonContainer, COLORS.correct_400, TextContainer, COLORS.critical_20, ButtonContainer, COLORS.critical_500, TextContainer, COLORS.warning_20, ButtonContainer, COLORS.warning_400, focusStyles, ButtonContainer, COLORS.accent1_300, TextContainer, function (props) {
30
30
  return props.isSelected ? COLORS.accent1_200 : COLORS.accent1_100;
31
- }, COLORS.accent1_700, ButtonContainer, function (props) {
32
- return props.isSelected ? COLORS.accent1_200 : COLORS.accent1_100;
33
- }, TextContainer, function (props) {
34
- return props.isSelected ? COLORS.accent1_100 : COLORS.accent1_20;
35
- }, ButtonContainer, COLORS.accent1_400, TextContainer, function (props) {
31
+ }, COLORS.accent1_700, ButtonContainer, COLORS.accent1_400, TextContainer, function (props) {
36
32
  return props.isSelected ? COLORS.accent1_300 : COLORS.accent1_200;
37
33
  }, COLORS.accent1_800);
38
34
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/QuizButton/QuizButton.tsx"],"names":["React","styled","Checkbox","COLORS","defaultOnMouseDownHandler","RadioButton","Size","SystemIcons","ComponentLStyling","ComponentMStyling","ComponentSStyling","ComponentTextStyle","TextContainer","div","accent1_20","props","size","Small","Large","Regular","TextWrapper","ButtonContainer","accent1_100","accent1_600","OptionContainer","accent1_200","neutral_100","neutral_20","neutral_300","correct_20","correct_400","critical_20","critical_500","warning_20","warning_400","focus_25","focus","accent1_300","isSelected","accent1_700","accent1_400","accent1_800","renderResultContent","resultType","white","QuizButton","text","type","onClick","id","className","selected","disabled","Medium","concat"],"mappings":";;;;;AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,OAAOC,MAAP,MAAmB,mBAAnB;AACA,SAAQC,QAAR,EAAkBC,MAAlB,EAA0BC,yBAA1B,EAAqDC,WAArD,EAAkEC,IAAlE,EAAwEC,WAAxE,QAA0F,IAA1F;AACA,SAASC,iBAAT,EAA4BC,iBAA5B,EAA+CC,iBAA/C,EAAkEC,kBAAlE,QAA4F,sBAA5F;;;AAEA,IAAMC,aAAa,GAAGX,MAAM,CAACY,GAAV,iQAGHV,MAAM,CAACW,UAHJ,EASN,UAAAC,KAAK;AAAA,SAAEA,KAAK,CAACC,IAAN,KAAaV,IAAI,CAACW,KAAlB,GAAwB,SAAxB,GAAmCF,KAAK,CAACC,IAAN,KAAaV,IAAI,CAACY,KAAlB,GAAwB,WAAxB,GAAoC,WAAzE;AAAA,CATC,EAUf,UAAAH,KAAK;AAAA,SAAEA,KAAK,CAACC,IAAN,KAAaV,IAAI,CAACW,KAAlB,GAA0BP,iBAAiB,CAACC,kBAAkB,CAACQ,OAApB,EAA4B,IAA5B,CAA3C,GAAgFJ,KAAK,CAACC,IAAN,KAAaV,IAAI,CAACY,KAAlB,GAA0BV,iBAAiB,CAACG,kBAAkB,CAACQ,OAApB,EAA4B,IAA5B,CAA3C,GAA+EV,iBAAiB,CAACE,kBAAkB,CAACQ,OAApB,EAA4B,IAA5B,CAAlL;AAAA,CAVU,CAAnB;AAaA,IAAMC,WAAW,GAAGnB,MAAM,CAACY,G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AAM,O,EAAU,U;AAChBG,EAAAA,S;;AA8BF,eAAeL,UAAf","sourcesContent":["import * as React from 'react';\nimport styled from 'styled-components';\nimport {Checkbox, COLORS, defaultOnMouseDownHandler, RadioButton, Size, SystemIcons} from '..';\nimport { ComponentLStyling, ComponentMStyling, ComponentSStyling, ComponentTextStyle } from '../styles/typography';\n\nconst TextContainer = styled.div<{size: Size}>`\n border-radius: 0 8px 8px 0;\n display: flex;\n background: ${COLORS.accent1_20};\n width: 100%;\n\n transition: background 100ms ease-in-out;\n align-items: center;\n\n padding: ${props=>props.size===Size.Small?'6px 8px':(props.size===Size.Large?'20px 16px':'12px 16px')};\n ${props=>props.size===Size.Small ? ComponentSStyling(ComponentTextStyle.Regular,null) : (props.size===Size.Large ? ComponentLStyling(ComponentTextStyle.Regular,null) : ComponentMStyling(ComponentTextStyle.Regular,null))}\n`;\n\nconst TextWrapper = styled.div<{size:Size}>``;\n\nconst ButtonContainer = styled.div<{size: Size}>`\n border-radius: 8px 0 0 8px;\n display: flex;\n background: ${COLORS.accent1_100};\n\n width: ${props=>props.size===Size.Small?'32px':(props.size===Size.Large?'64px':'48px')};\n\n transition: background 100ms ease-in-out;\n\n .quiz-button-result-icon {\n height: ${props=>props.size===Size.Small?'16px':(props.size===Size.Large?'32px':'24px')};\n width: ${props=>props.size===Size.Small?'32px':(props.size===Size.Large?'64px':'48px')};\n }\n\n .radio-button-icon, .checkbox-icon {\n margin: auto;\n min-width: unset;\n background: transparent;\n\n svg {\n color: ${COLORS.accent1_600};\n }\n\n &:hover {\n background: transparent;\n }\n\n &:focus {\n background: transparent;\n }\n\n &:active {\n background: transparent;\n }\n }\n\n .small {\n min-width: 32px;\n min-height: 32px;\n .radio-button-icon, .checkbox-icon {\n svg {\n height: 16px;\n width: 16px;\n }\n }\n }\n\n .medium {\n min-width: 48px;\n min-height: 48px;\n .radio-button-icon, .checkbox-icon {\n svg {\n height: 24px;\n width: 24px;\n }\n }\n }\n\n .large {\n min-width: 64px;\n min-height: 64px;\n .radio-button-icon, .checkbox-icon {\n svg {\n height: 32px;\n width: 32px;\n }\n }\n }\n`;\n\nconst OptionContainer = styled.div<{isSelected:boolean, size:Size}>`\n display: flex;\n flex-direction: row;\n cursor: pointer;\n max-width: 65ch; \n word-break: break-word;\n\n min-height: ${props=>props.size===Size.Small?'32px':(props.size===Size.Large?'64px':'48px')};\n margin-bottom: ${props=>props.size===Size.Small?'16px':(props.size===Size.Large?'32px':'24px')};\n\n &.selected {\n ${TextContainer} {\n background: ${COLORS.accent1_100};\n }\n ${ButtonContainer} {\n background: ${COLORS.accent1_200};\n }\n }\n \n &.disabled {\n cursor: not-allowed;\n \n ${ButtonContainer} {\n pointer-events: none;\n background: ${COLORS.neutral_100};\n }\n ${TextContainer} {\n pointer-events: none;\n background: ${COLORS.neutral_20};\n color: ${COLORS.neutral_300};\n }\n\n .radio-button-icon, .checkbox-icon {\n background: transparent;\n }\n }\n\n &.correct {\n ${TextContainer} { \n background: ${COLORS.correct_20};\n }\n ${ButtonContainer} {\n background: ${COLORS.correct_400};\n svg {\n margin: auto;\n }\n }\n }\n\n &.incorrect {\n ${TextContainer} { \n background: ${COLORS.critical_20};\n }\n ${ButtonContainer} {\n background: ${COLORS.critical_500};\n svg {\n margin: auto;\n }\n }\n }\n\n &.partial {\n ${TextContainer} { \n background: ${COLORS.warning_20};\n }\n ${ButtonContainer} {\n background: ${COLORS.warning_400};\n svg {\n margin: auto;\n }\n }\n } \n\n &:hover,\n &.hover-state {\n .radio-button-icon, .checkbox-icon {\n background: transparent;\n }\n }\n\n &:focus,\n &.focus-state {\n box-shadow: 0px 4px 12px ${COLORS.focus_25}, 0px 0px 8px ${COLORS.focus};\n border-radius: 8px;\n outline: none;\n\n .radio-button-icon, .checkbox-icon {\n background: transparent;\n }\n }\n\n &:active,\n &.active-state {\n .radio-button-icon, .checkbox-icon {\n background: transparent;\n }\n }\n\n &:hover:not(.disabled):not(.result),\n &.hover-state {\n ${ButtonContainer} {\n background: ${COLORS.accent1_300};\n }\n ${TextContainer} {\n background: ${props=>props.isSelected ? COLORS.accent1_200 : COLORS.accent1_100};\n }\n \n .radio-button-icon, .checkbox-icon {\n background: transparent;\n svg {\n color: ${COLORS.accent1_700};\n }\n }\n }\n\n &:focus:not(.disabled):not(.result),\n &.focus-state {\n ${ButtonContainer} {\n background: ${props=>props.isSelected ? COLORS.accent1_200 : COLORS.accent1_100};\n }\n ${TextContainer} {\n background: ${props=>props.isSelected ? COLORS.accent1_100 : COLORS.accent1_20};\n }\n\n .radio-button-icon, .checkbox-icon {\n background: transparent;\n }\n }\n\n &:active:not(.disabled):not(.result),\n &.active-state {\n ${ButtonContainer} {\n background: ${COLORS.accent1_400};\n transition: none;\n }\n ${TextContainer} {\n background: ${props=>props.isSelected ? COLORS.accent1_300 : COLORS.accent1_200};\n transition: none;\n }\n\n .radio-button-icon, .checkbox-icon {\n background: transparent;\n svg {\n color: ${COLORS.accent1_800};\n }\n }\n }\n`;\n\nconst renderResultContent = (resultType: string) => {\n switch(resultType){\n case 'correct' : return <SystemIcons.CheckComplete color={COLORS.white} className={'quiz-button-result-icon'}/>;\n\n case 'incorrect' : return <SystemIcons.Close color={COLORS.white} className={'quiz-button-result-icon'}/>;\n\n default : return <SystemIcons.Close color={COLORS.white} className={'quiz-button-result-icon'}/>;\n }\n};\n\ntype QuizButtonProps = {\n resultType?: 'correct' | 'incorrect' | 'partial';\n text: string;\n onClick?: (arg:any)=>void;\n id: string;\n selected?: boolean;\n disabled?: boolean;\n size?: Size.Small | Size.Medium | Size.Large;\n type: 'radio' | 'checkbox';\n className?: string;\n}\n\nconst QuizButton: React.FunctionComponent<QuizButtonProps> = ({text, type, onClick, resultType, id, className, selected=false, disabled=false, size=Size.Medium}) => {\n return ( \n <OptionContainer onClick={onClick} isSelected={selected} tabIndex={(disabled || resultType )?-1 : 0} onMouseDown={defaultOnMouseDownHandler} size={size}\n className={'quiz-button '.concat(selected?' selected':'')\n .concat(disabled?' disabled':'')\n .concat(resultType?' result '+resultType:'')\n .concat(className?' ' + className:'')}\n data-testid={'container'}>\n <ButtonContainer data-testid={'btnContainer'} className={'quiz-button-icon'} size={size}>\n {\n resultType ? renderResultContent(resultType) : (\n type==='radio' ? <RadioButton selected={selected} disabled={disabled} size={size} tabIndexVal={-1}\n select={()=>{}} id={id}/> : <Checkbox selected={selected} disabled={disabled} size={size} tabIndexVal={-1}\n select={()=>{}} id={id}/>\n )\n }\n </ButtonContainer>\n\n <TextContainer data-testid={'txtContainer'} className={'quiz-button-text'} size={size}>\n <TextWrapper size={size}>\n {text}\n </TextWrapper>\n </TextContainer>\n </OptionContainer>\n );\n};\n\nexport default QuizButton;\n"],"file":"QuizButton.js"}
1
+ {"version":3,"sources":["../../src/QuizButton/QuizButton.tsx"],"names":["React","styled","Checkbox","COLORS","defaultOnMouseDownHandler","focusStyles","RadioButton","Size","SystemIcons","ComponentLStyling","ComponentMStyling","ComponentSStyling","ComponentTextStyle","TextContainer","div","accent1_20","props","size","Small","Large","Regular","TextWrapper","ButtonContainer","accent1_100","accent1_600","OptionContainer","accent1_200","neutral_100","neutral_20","neutral_300","correct_20","correct_400","critical_20","critical_500","warning_20","warning_400","accent1_300","isSelected","accent1_700","accent1_400","accent1_800","renderResultContent","resultType","white","QuizButton","text","type","onClick","id","className","selected","disabled","Medium","concat"],"mappings":";;;;;AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,OAAOC,MAAP,MAAmB,mBAAnB;AACA,SAAQC,QAAR,EAAkBC,MAAlB,EAA0BC,yBAA1B,EAAqDC,WAArD,EAAkEC,WAAlE,EAA+EC,IAA/E,EAAqFC,WAArF,QAAuG,IAAvG;AACA,SAASC,iBAAT,EAA4BC,iBAA5B,EAA+CC,iBAA/C,EAAkEC,kBAAlE,QAA4F,sBAA5F;;;AAEA,IAAMC,aAAa,GAAGZ,MAAM,CAACa,GAAV,iQAGHX,MAAM,CAACY,UAHJ,EASN,UAAAC,KAAK;AAAA,SAAEA,KAAK,CAACC,IAAN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IAAnB;AAAA,kBACG4B;AADH;AADF,MAhBJ;AAAA,IADF;AAwBD,CAzBD;;;AAXEH,EAAAA,U,aAAa,S,EAAY,W,EAAc,S;AACvCG,EAAAA,I;AACAE,EAAAA,O;AACAC,EAAAA,E;AACAE,EAAAA,Q;AACAC,EAAAA,Q;AAEAL,EAAAA,I,aAAM,O,EAAU,U;AAChBG,EAAAA,S;;AA8BF,eAAeL,UAAf","sourcesContent":["import * as React from 'react';\nimport styled from 'styled-components';\nimport {Checkbox, COLORS, defaultOnMouseDownHandler, focusStyles, RadioButton, Size, SystemIcons} from '..';\nimport { ComponentLStyling, ComponentMStyling, ComponentSStyling, ComponentTextStyle } from '../styles/typography';\n\nconst TextContainer = styled.div<{size: Size}>`\n border-radius: 0 8px 8px 0;\n display: flex;\n background: ${COLORS.accent1_20};\n width: 100%;\n\n transition: background 100ms ease-in-out;\n align-items: center;\n\n padding: ${props=>props.size===Size.Small?'6px 8px':(props.size===Size.Large?'20px 16px':'12px 16px')};\n ${props=>props.size===Size.Small ? ComponentSStyling(ComponentTextStyle.Regular,null) : (props.size===Size.Large ? ComponentLStyling(ComponentTextStyle.Regular,null) : ComponentMStyling(ComponentTextStyle.Regular,null))}\n`;\n\nconst TextWrapper = styled.div<{size:Size}>``;\n\nconst ButtonContainer = styled.div<{size: Size}>`\n border-radius: 8px 0 0 8px;\n display: flex;\n background: ${COLORS.accent1_100};\n\n width: ${props=>props.size===Size.Small?'32px':(props.size===Size.Large?'64px':'48px')};\n\n transition: background 100ms ease-in-out;\n\n .quiz-button-result-icon {\n height: ${props=>props.size===Size.Small?'16px':(props.size===Size.Large?'32px':'24px')};\n width: ${props=>props.size===Size.Small?'32px':(props.size===Size.Large?'64px':'48px')};\n }\n\n .radio-button-icon, .checkbox-icon {\n margin: auto;\n min-width: unset;\n background: transparent;\n\n svg {\n color: ${COLORS.accent1_600};\n }\n\n &:hover {\n background: transparent;\n }\n\n &:active {\n background: transparent;\n }\n }\n\n .small {\n min-width: 32px;\n min-height: 32px;\n .radio-button-icon, .checkbox-icon {\n svg {\n height: 16px;\n width: 16px;\n }\n }\n }\n\n .medium {\n min-width: 48px;\n min-height: 48px;\n .radio-button-icon, .checkbox-icon {\n svg {\n height: 24px;\n width: 24px;\n }\n }\n }\n\n .large {\n min-width: 64px;\n min-height: 64px;\n .radio-button-icon, .checkbox-icon {\n svg {\n height: 32px;\n width: 32px;\n }\n }\n }\n`;\n\nconst OptionContainer = styled.div<{isSelected:boolean, size:Size}>`\n display: flex;\n flex-direction: row;\n cursor: pointer;\n max-width: 65ch; \n word-break: break-word;\n\n min-height: ${props=>props.size===Size.Small?'32px':(props.size===Size.Large?'64px':'48px')};\n margin-bottom: ${props=>props.size===Size.Small?'16px':(props.size===Size.Large?'32px':'24px')};\n\n &.selected {\n ${TextContainer} {\n background: ${COLORS.accent1_100};\n }\n ${ButtonContainer} {\n background: ${COLORS.accent1_200};\n }\n }\n \n &.disabled {\n cursor: not-allowed;\n \n ${ButtonContainer} {\n pointer-events: none;\n background: ${COLORS.neutral_100};\n }\n ${TextContainer} {\n pointer-events: none;\n background: ${COLORS.neutral_20};\n color: ${COLORS.neutral_300};\n }\n\n .radio-button-icon, .checkbox-icon {\n background: transparent;\n }\n }\n\n &.correct {\n ${TextContainer} { \n background: ${COLORS.correct_20};\n }\n ${ButtonContainer} {\n background: ${COLORS.correct_400};\n svg {\n margin: auto;\n }\n }\n }\n\n &.incorrect {\n ${TextContainer} { \n background: ${COLORS.critical_20};\n }\n ${ButtonContainer} {\n background: ${COLORS.critical_500};\n svg {\n margin: auto;\n }\n }\n }\n\n &.partial {\n ${TextContainer} { \n background: ${COLORS.warning_20};\n }\n ${ButtonContainer} {\n background: ${COLORS.warning_400};\n svg {\n margin: auto;\n }\n }\n }\n\n &:focus,\n &.focus-state {\n ${focusStyles}\n }\n\n &:hover,\n &.hover-state {\n .radio-button-icon, .checkbox-icon {\n background: transparent;\n }\n }\n\n &:active,\n &.active-state {\n .radio-button-icon, .checkbox-icon {\n background: transparent;\n }\n }\n\n &:hover:not(.disabled):not(.result),\n &.hover-state {\n ${ButtonContainer} {\n background: ${COLORS.accent1_300};\n }\n ${TextContainer} {\n background: ${props=>props.isSelected ? COLORS.accent1_200 : COLORS.accent1_100};\n }\n \n .radio-button-icon, .checkbox-icon {\n background: transparent;\n svg {\n color: ${COLORS.accent1_700};\n }\n }\n }\n\n &:active:not(.disabled):not(.result),\n &.active-state {\n ${ButtonContainer} {\n background: ${COLORS.accent1_400};\n transition: none;\n }\n ${TextContainer} {\n background: ${props=>props.isSelected ? COLORS.accent1_300 : COLORS.accent1_200};\n transition: none;\n }\n\n .radio-button-icon, .checkbox-icon {\n background: transparent;\n svg {\n color: ${COLORS.accent1_800};\n }\n }\n }\n`;\n\nconst renderResultContent = (resultType: string) => {\n switch(resultType){\n case 'correct' : return <SystemIcons.CheckComplete color={COLORS.white} className={'quiz-button-result-icon'}/>;\n\n case 'incorrect' : return <SystemIcons.Close color={COLORS.white} className={'quiz-button-result-icon'}/>;\n\n default : return <SystemIcons.Close color={COLORS.white} className={'quiz-button-result-icon'}/>;\n }\n};\n\ntype QuizButtonProps = {\n resultType?: 'correct' | 'incorrect' | 'partial';\n text: string;\n onClick?: (arg:any)=>void;\n id: string;\n selected?: boolean;\n disabled?: boolean;\n size?: Size.Small | Size.Medium | Size.Large;\n type: 'radio' | 'checkbox';\n className?: string;\n}\n\nconst QuizButton: React.FunctionComponent<QuizButtonProps> = ({text, type, onClick, resultType, id, className, selected=false, disabled=false, size=Size.Medium}) => {\n return ( \n <OptionContainer onClick={onClick} isSelected={selected} tabIndex={(disabled || resultType )?-1 : 0} onMouseDown={defaultOnMouseDownHandler} size={size}\n className={'quiz-button '.concat(selected?' selected':'')\n .concat(disabled?' disabled':'')\n .concat(resultType?' result '+resultType:'')\n .concat(className?' ' + className:'')}\n data-testid={'container'}>\n <ButtonContainer data-testid={'btnContainer'} className={'quiz-button-icon'} size={size}>\n {\n resultType ? renderResultContent(resultType) : (\n type==='radio' ? <RadioButton selected={selected} disabled={disabled} size={size} tabIndexVal={-1}\n select={()=>{}} id={id}/> : <Checkbox selected={selected} disabled={disabled} size={size} tabIndexVal={-1}\n select={()=>{}} id={id}/>\n )\n }\n </ButtonContainer>\n\n <TextContainer data-testid={'txtContainer'} className={'quiz-button-text'} size={size}>\n <TextWrapper size={size}>\n {text}\n </TextWrapper>\n </TextContainer>\n </OptionContainer>\n );\n};\n\nexport default QuizButton;\n"],"file":"QuizButton.js"}
@@ -33,7 +33,7 @@ var SegmentControlItemBackground = _styledComponents.default.div(_templateObject
33
33
 
34
34
  exports.SegmentControlItemBackground = SegmentControlItemBackground;
35
35
 
36
- var SegmentControlItemWrapper = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n flex: 1;\n cursor: pointer;\n min-height: 48px;\n\n &:focus {\n z-index: ", ";\n outline: none;\n\n ", " {\n background-color: ", ";\n color: ", ";\n box-shadow: 0px 4px 12px rgba(46, 127, 161, 0.25), 0px 0px 8px #2E7FA1;\n }\n }\n\n &:hover {\n z-index: ", ";\n\n ", " {\n background-color: ", ";\n color: ", ";\n }\n }\n\n &:active {\n z-index: ", ";\n\n ", " {\n background-color: ", ";\n color: ", ";\n box-shadow: none;\n }\n }\n\n &.disabled {\n cursor: not-allowed;\n\n ", " {\n background-color: transparent;\n color: ", ";\n }\n }\n\n &.selected {\n cursor: default;\n pointer-events: none;\n\n ", " {\n background-color: ", ";\n color: ", ";\n }\n }\n\n &.selected.disabled {\n cursor: not-allowed;\n pointer-events: unset;\n \n ", " {\n background-color: ", ";\n color: ", ";\n }\n }\n"])), _styles.Z_INDEXES.focus, SegmentControlItemContent, _styles.COLORS.primary_100, _styles.COLORS.primary_700, _styles.Z_INDEXES.hover, SegmentControlItemContent, _styles.COLORS.primary_100, _styles.COLORS.primary_700, _styles.Z_INDEXES.active, SegmentControlItemContent, _styles.COLORS.primary_200, _styles.COLORS.primary_800, SegmentControlItemContent, _styles.COLORS.neutral_300, SegmentControlItemContent, _styles.COLORS.primary_500, _styles.COLORS.white, SegmentControlItemContent, _styles.COLORS.neutral_100, _styles.COLORS.neutral_300);
36
+ var SegmentControlItemWrapper = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n flex: 1;\n cursor: pointer;\n min-height: 48px;\n\n &:focus {\n ", "\n }\n\n &:hover {\n z-index: ", ";\n\n ", " {\n background-color: ", ";\n color: ", ";\n }\n }\n\n &:active {\n z-index: ", ";\n\n ", " {\n background-color: ", ";\n color: ", ";\n }\n }\n\n &.disabled {\n cursor: not-allowed;\n\n ", " {\n background-color: transparent;\n color: ", ";\n }\n }\n\n &.selected {\n cursor: default;\n pointer-events: none;\n\n ", " {\n background-color: ", ";\n color: ", ";\n }\n }\n\n &.selected.disabled {\n cursor: not-allowed;\n pointer-events: unset;\n \n ", " {\n background-color: ", ";\n color: ", ";\n }\n }\n"])), _styles.focusStyles, _styles.Z_INDEXES.hover, SegmentControlItemContent, _styles.COLORS.primary_100, _styles.COLORS.primary_700, _styles.Z_INDEXES.active, SegmentControlItemContent, _styles.COLORS.primary_200, _styles.COLORS.primary_800, SegmentControlItemContent, _styles.COLORS.neutral_300, SegmentControlItemContent, _styles.COLORS.primary_500, _styles.COLORS.white, SegmentControlItemContent, _styles.COLORS.neutral_100, _styles.COLORS.neutral_300);
37
37
 
38
38
  exports.SegmentControlItemWrapper = SegmentControlItemWrapper;
39
39
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/SegmentControl/SegmentControl.tsx"],"names":["SegmentControlItemContent","styled","div","COLORS","neutral_600","SegmentControlItemBackground","neutral_20","SegmentControlItemWrapper","Z_INDEXES","focus","primary_100","primary_700","hover","active","primary_200","primary_800","neutral_300","primary_500","white","neutral_100","SegmentControlWrapper","ComponentTextStyle","Bold","SegmentControl","items","size","Size","Medium","onChange","selected","onKeyPress","e","item","key","document","activeElement","blur","disabled","onClick","map","a","i","undefined","defaultOnMouseDownHandler","content"],"mappings":";;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;;;;;AAGO,IAAMA,yBAAyB,GAAGC,0BAAOC,GAAV,2QAS3BC,eAAOC,WAToB,CAA/B;;;;AAYA,IAAMC,4BAA4B,GAAGJ,0BAAOC,GAAV,sNAKnBC,eAAOG,UALY,CAAlC;;;;AASA,IAAMC,yBAAyB,GAAGN,0BAAOC,GAAV,0mCAUvBM,kBAAUC,KAVa,EAahCT,yBAbgC,EAcZG,eAAOO,WAdK,EAevBP,eAAOQ,WAfgB,EAqBvBH,kBAAUI,KArBa,EAuBhCZ,yBAvBgC,EAwBZG,eAAOO,WAxBK,EAyBvBP,eAAOQ,WAzBgB,EA8BvBH,kBAAUK,MA9Ba,EAgChCb,yBAhCgC,EAiCZG,eAAOW,WAjCK,EAkCvBX,eAAOY,WAlCgB,EA0ChCf,yBA1CgC,EA4CvBG,eAAOa,WA5CgB,EAoDhChB,yBApDgC,EAqDZG,eAAOc,WArDK,EAsDvBd,eAAOe,KAtDgB,EA8DhClB,yBA9DgC,EA+DZG,eAAOgB,WA/DK,EAgEvBhB,eAAOa,WAhEgB,CAA/B;;;;AAqEA,IAAMI,qBAAqB,GAAGnB,0BAAOC,GAAV,ynBAM9BK,yBAN8B,EAO5BF,4BAP4B,EAc9BE,yBAd8B,EAe5BF,4BAf4B,EAwB5BL,yBAxB4B,EAyB1B,+BAAkBqB,2BAAmBC,IAArC,EAA2C,IAA3C,CAzB0B,EA+B5BtB,yBA/B4B,EAgC1B,+BAAkBqB,2BAAmBC,IAArC,EAA2C,IAA3C,CAhC0B,CAA3B;;;;AAoDP,IAAMC,cAA4D,GAAG,SAA/DA,cAA+D,OAKO;AAAA,MAJJC,KAII,QAJJA,KAII;AAAA,uBAHJC,IAGI;AAAA,MAHJA,IAGI,0BAHGC,YAAKC,MAGR;AAAA,MA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AU,CAACC,CAAD,EAAIS,CAAJ,CAAjB;AAAA,SALhE;AAAA,+BAME,qBAAC,4BAAD;AAAA,iCACE,qBAAC,yBAAD;AAAA,sBACGA,CAAC,CAACI;AADL;AADF;AANF,SAAgCJ,CAAC,CAACP,GAAF,IAASQ,CAAzC,CADS;AAAA,KAAV;AADH,IADF;AAkBD,CApCD;;;AANEjB,EAAAA,K;AANAS,IAAAA,G;AACAI,IAAAA,Q;AACAO,IAAAA,O;;AAKAf,EAAAA,Q;AACAD,EAAAA,Q;;eA0CaL,c","sourcesContent":["import React from 'react';\nimport {Size} from '../types';\nimport styled from 'styled-components';\nimport {COLORS, ComponentMStyling, ComponentSStyling, ComponentTextStyle, Z_INDEXES} from '../styles';\nimport {defaultOnMouseDownHandler} from '../common';\n\n\nexport const SegmentControlItemContent = styled.div`\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n border-radius: 8px;\n padding: 0 16px;\n\n background-color: transparent;\n color: ${COLORS.neutral_600};\n`\n\nexport const SegmentControlItemBackground = styled.div`\n flex: 1;\n display: flex;\n flex-direction: row;\n align-items: center;\n background-color: ${COLORS.neutral_20};\n padding: 4px 0px;\n`;\n\nexport const SegmentControlItemWrapper = styled.div`\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n flex: 1;\n cursor: pointer;\n min-height: 48px;\n\n &:focus {\n z-index: ${Z_INDEXES.focus};\n outline: none;\n\n ${SegmentControlItemContent} {\n background-color: ${COLORS.primary_100};\n color: ${COLORS.primary_700};\n box-shadow: 0px 4px 12px rgba(46, 127, 161, 0.25), 0px 0px 8px #2E7FA1;\n }\n }\n\n &:hover {\n z-index: ${Z_INDEXES.hover};\n\n ${SegmentControlItemContent} {\n background-color: ${COLORS.primary_100};\n color: ${COLORS.primary_700};\n }\n }\n\n &:active {\n z-index: ${Z_INDEXES.active};\n\n ${SegmentControlItemContent} {\n background-color: ${COLORS.primary_200};\n color: ${COLORS.primary_800};\n box-shadow: none;\n }\n }\n\n &.disabled {\n cursor: not-allowed;\n\n ${SegmentControlItemContent} {\n background-color: transparent;\n color: ${COLORS.neutral_300};\n }\n }\n\n &.selected {\n cursor: default;\n pointer-events: none;\n\n ${SegmentControlItemContent} {\n background-color: ${COLORS.primary_500};\n color: ${COLORS.white};\n }\n }\n\n &.selected.disabled {\n cursor: not-allowed;\n pointer-events: unset;\n \n ${SegmentControlItemContent} {\n background-color: ${COLORS.neutral_100};\n color: ${COLORS.neutral_300};\n }\n }\n`;\n\nexport const SegmentControlWrapper = styled.div`\n width: 100%;\n display: flex;\n flex-direction: row;\n align-items: center;\n\n ${SegmentControlItemWrapper}:first-of-type {\n ${SegmentControlItemBackground} {\n border-bottom-left-radius: 12px;\n border-top-left-radius: 12px;\n padding-left: 4px;\n }\n }\n\n ${SegmentControlItemWrapper}:last-of-type {\n ${SegmentControlItemBackground} {\n border-bottom-right-radius: 12px;\n border-top-right-radius: 12px;\n padding-right: 4px;\n }\n }\n\n\n &.small {\n ${SegmentControlItemContent} {\n ${ComponentSStyling(ComponentTextStyle.Bold, null)}\n min-height: 32px;\n }\n }\n\n &.medium {\n ${SegmentControlItemContent} {\n ${ComponentMStyling(ComponentTextStyle.Bold, null)}\n min-height: 40px;\n }\n }\n`;\n\n\nexport interface SegmentControlItem {\n key: string\n disabled?: boolean;\n content: React.ReactNode | string;\n}\n\ninterface SegmentControlProps {\n items: SegmentControlItem[];\n selected: string;\n onChange: (value: string) => void;\n size?: Size.Small | Size.Medium;\n}\n\nconst SegmentControl: React.FunctionComponent<SegmentControlProps> = ({\n items,\n size = Size.Medium,\n onChange,\n selected\n }) => {\n const onKeyPress = (e: React.KeyboardEvent<HTMLDivElement>, item: SegmentControlItem) => {\n if (e.key === 'Enter' || e.key === ' ') {\n //@ts-ignore\n document?.activeElement?.blur();\n !item.disabled && onChange(item.key);\n }\n };\n\n const onClick = (e: React.MouseEvent, item: SegmentControlItem) => {\n !item.disabled && onChange(item.key);\n }\n\n return (\n <SegmentControlWrapper className={size}>\n {items.map((a, i) =>\n <SegmentControlItemWrapper key={a.key || i}\n className={(a.disabled ? 'disabled' : '') + (a.key === selected ? ' selected' : '')}\n tabIndex={a.disabled || a.key === selected ? -1 : 0}\n onClick={a.disabled ? undefined : (e) => onClick(e, a)}\n onMouseDown={defaultOnMouseDownHandler}\n onKeyPress={a.disabled ? undefined : (e) => onKeyPress(e, a)}>\n <SegmentControlItemBackground>\n <SegmentControlItemContent>\n {a.content}\n </SegmentControlItemContent>\n </SegmentControlItemBackground>\n </SegmentControlItemWrapper>)\n }\n </SegmentControlWrapper>\n );\n};\n\nexport default SegmentControl;\n"],"file":"SegmentControl.cjs"}
1
+ {"version":3,"sources":["../../src/SegmentControl/SegmentControl.tsx"],"names":["SegmentControlItemContent","styled","div","COLORS","neutral_600","SegmentControlItemBackground","neutral_20","SegmentControlItemWrapper","focusStyles","Z_INDEXES","hover","primary_100","primary_700","active","primary_200","primary_800","neutral_300","primary_500","white","neutral_100","SegmentControlWrapper","ComponentTextStyle","Bold","SegmentControl","items","size","Size","Medium","onChange","selected","onKeyPress","e","item","key","document","activeElement","blur","disabled","onClick","map","a","i","undefined","defaultOnMouseDownHandler","content"],"mappings":";;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;;;;;AAGO,IAAMA,yBAAyB,GAAGC,0BAAOC,GAAV,2QAS3BC,eAAOC,WAToB,CAA/B;;;;AAYA,IAAMC,4BAA4B,GAAGJ,0BAAOC,GAAV,sNAKnBC,eAAOG,UALY,CAAlC;;;;AASA,IAAMC,yBAAyB,GAAGN,0BAAOC,GAAV,45BAUhCM,mBAVgC,EAcvBC,kBAAUC,KAda,EAgBhCV,yBAhBgC,EAiBZG,eAAOQ,WAjBK,EAkBvBR,eAAOS,WAlBgB,EAuBvBH,kBAAUI,MAvBa,EAyBhCb,yBAzBgC,EA0BZG,eAAOW,WA1BK,EA2BvBX,eAAOY,WA3BgB,EAkChCf,yBAlCgC,EAoCvBG,eAAOa,WApCgB,EA4ChChB,yBA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AA,0BACT,qBAAC,yBAAD;AAC2B,QAAA,SAAS,EAAE,CAACD,CAAC,CAACH,QAAF,GAAa,UAAb,GAA0B,EAA3B,KAAkCG,CAAC,CAACP,GAAF,KAAUJ,QAAV,GAAqB,WAArB,GAAmC,EAArE,CADtC;AAE2B,QAAA,QAAQ,EAAEW,CAAC,CAACH,QAAF,IAAcG,CAAC,CAACP,GAAF,KAAUJ,QAAxB,GAAmC,CAAC,CAApC,GAAwC,CAF7E;AAG2B,QAAA,OAAO,EAAEW,CAAC,CAACH,QAAF,GAAaK,SAAb,GAAyB,UAACX,CAAD;AAAA,iBAAOO,OAAO,CAACP,CAAD,EAAIS,CAAJ,CAAd;AAAA,SAH7D;AAI2B,QAAA,WAAW,EAAEG,iCAJxC;AAK2B,QAAA,UAAU,EAAEH,CAAC,CAACH,QAAF,GAAaK,SAAb,GAAyB,UAACX,CAAD;AAAA,iBAAOD,UAAU,CAACC,CAAD,EAAIS,CAAJ,CAAjB;AAAA,SALhE;AAAA,+BAME,qBAAC,4BAAD;AAAA,iCACE,qBAAC,yBAAD;AAAA,sBACGA,CAAC,CAACI;AADL;AADF;AANF,SAAgCJ,CAAC,CAACP,GAAF,IAASQ,CAAzC,CADS;AAAA,KAAV;AADH,IADF;AAkBD,CApCD;;;AANEjB,EAAAA,K;AANAS,IAAAA,G;AACAI,IAAAA,Q;AACAO,IAAAA,O;;AAKAf,EAAAA,Q;AACAD,EAAAA,Q;;eA0CaL,c","sourcesContent":["import React from 'react';\nimport {Size} from '../types';\nimport styled from 'styled-components';\nimport {COLORS, ComponentMStyling, ComponentSStyling, ComponentTextStyle, focusStyles, Z_INDEXES} from '../styles';\nimport {defaultOnMouseDownHandler} from '../common';\n\n\nexport const SegmentControlItemContent = styled.div`\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n border-radius: 8px;\n padding: 0 16px;\n\n background-color: transparent;\n color: ${COLORS.neutral_600};\n`\n\nexport const SegmentControlItemBackground = styled.div`\n flex: 1;\n display: flex;\n flex-direction: row;\n align-items: center;\n background-color: ${COLORS.neutral_20};\n padding: 4px 0px;\n`;\n\nexport const SegmentControlItemWrapper = styled.div`\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n flex: 1;\n cursor: pointer;\n min-height: 48px;\n\n &:focus {\n ${focusStyles}\n }\n\n &:hover {\n z-index: ${Z_INDEXES.hover};\n\n ${SegmentControlItemContent} {\n background-color: ${COLORS.primary_100};\n color: ${COLORS.primary_700};\n }\n }\n\n &:active {\n z-index: ${Z_INDEXES.active};\n\n ${SegmentControlItemContent} {\n background-color: ${COLORS.primary_200};\n color: ${COLORS.primary_800};\n }\n }\n\n &.disabled {\n cursor: not-allowed;\n\n ${SegmentControlItemContent} {\n background-color: transparent;\n color: ${COLORS.neutral_300};\n }\n }\n\n &.selected {\n cursor: default;\n pointer-events: none;\n\n ${SegmentControlItemContent} {\n background-color: ${COLORS.primary_500};\n color: ${COLORS.white};\n }\n }\n\n &.selected.disabled {\n cursor: not-allowed;\n pointer-events: unset;\n \n ${SegmentControlItemContent} {\n background-color: ${COLORS.neutral_100};\n color: ${COLORS.neutral_300};\n }\n }\n`;\n\nexport const SegmentControlWrapper = styled.div`\n width: 100%;\n display: flex;\n flex-direction: row;\n align-items: center;\n\n ${SegmentControlItemWrapper}:first-of-type {\n ${SegmentControlItemBackground} {\n border-bottom-left-radius: 12px;\n border-top-left-radius: 12px;\n padding-left: 4px;\n }\n }\n\n ${SegmentControlItemWrapper}:last-of-type {\n ${SegmentControlItemBackground} {\n border-bottom-right-radius: 12px;\n border-top-right-radius: 12px;\n padding-right: 4px;\n }\n }\n\n\n &.small {\n ${SegmentControlItemContent} {\n ${ComponentSStyling(ComponentTextStyle.Bold, null)}\n min-height: 32px;\n }\n }\n\n &.medium {\n ${SegmentControlItemContent} {\n ${ComponentMStyling(ComponentTextStyle.Bold, null)}\n min-height: 40px;\n }\n }\n`;\n\n\nexport interface SegmentControlItem {\n key: string\n disabled?: boolean;\n content: React.ReactNode | string;\n}\n\ninterface SegmentControlProps {\n items: SegmentControlItem[];\n selected: string;\n onChange: (value: string) => void;\n size?: Size.Small | Size.Medium;\n}\n\nconst SegmentControl: React.FunctionComponent<SegmentControlProps> = ({\n items,\n size = Size.Medium,\n onChange,\n selected\n }) => {\n const onKeyPress = (e: React.KeyboardEvent<HTMLDivElement>, item: SegmentControlItem) => {\n if (e.key === 'Enter' || e.key === ' ') {\n //@ts-ignore\n document?.activeElement?.blur();\n !item.disabled && onChange(item.key);\n }\n };\n\n const onClick = (e: React.MouseEvent, item: SegmentControlItem) => {\n !item.disabled && onChange(item.key);\n }\n\n return (\n <SegmentControlWrapper className={size}>\n {items.map((a, i) =>\n <SegmentControlItemWrapper key={a.key || i}\n className={(a.disabled ? 'disabled' : '') + (a.key === selected ? ' selected' : '')}\n tabIndex={a.disabled || a.key === selected ? -1 : 0}\n onClick={a.disabled ? undefined : (e) => onClick(e, a)}\n onMouseDown={defaultOnMouseDownHandler}\n onKeyPress={a.disabled ? undefined : (e) => onKeyPress(e, a)}>\n <SegmentControlItemBackground>\n <SegmentControlItemContent>\n {a.content}\n </SegmentControlItemContent>\n </SegmentControlItemBackground>\n </SegmentControlItemWrapper>)\n }\n </SegmentControlWrapper>\n );\n};\n\nexport default SegmentControl;\n"],"file":"SegmentControl.cjs"}
@@ -6,12 +6,12 @@ var _templateObject, _templateObject2, _templateObject3, _templateObject4;
6
6
  import React from 'react';
7
7
  import { Size } from '../types';
8
8
  import styled from 'styled-components';
9
- import { COLORS, ComponentMStyling, ComponentSStyling, ComponentTextStyle, Z_INDEXES } from '../styles';
9
+ import { COLORS, ComponentMStyling, ComponentSStyling, ComponentTextStyle, focusStyles, Z_INDEXES } from '../styles';
10
10
  import { defaultOnMouseDownHandler } from '../common';
11
11
  import { jsx as _jsx } from "react/jsx-runtime";
12
12
  export var SegmentControlItemContent = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n border-radius: 8px;\n padding: 0 16px;\n\n background-color: transparent;\n color: ", ";\n"])), COLORS.neutral_600);
13
13
  export var SegmentControlItemBackground = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n flex: 1;\n display: flex;\n flex-direction: row;\n align-items: center;\n background-color: ", ";\n padding: 4px 0px;\n"])), COLORS.neutral_20);
14
- export var SegmentControlItemWrapper = styled.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n flex: 1;\n cursor: pointer;\n min-height: 48px;\n\n &:focus {\n z-index: ", ";\n outline: none;\n\n ", " {\n background-color: ", ";\n color: ", ";\n box-shadow: 0px 4px 12px rgba(46, 127, 161, 0.25), 0px 0px 8px #2E7FA1;\n }\n }\n\n &:hover {\n z-index: ", ";\n\n ", " {\n background-color: ", ";\n color: ", ";\n }\n }\n\n &:active {\n z-index: ", ";\n\n ", " {\n background-color: ", ";\n color: ", ";\n box-shadow: none;\n }\n }\n\n &.disabled {\n cursor: not-allowed;\n\n ", " {\n background-color: transparent;\n color: ", ";\n }\n }\n\n &.selected {\n cursor: default;\n pointer-events: none;\n\n ", " {\n background-color: ", ";\n color: ", ";\n }\n }\n\n &.selected.disabled {\n cursor: not-allowed;\n pointer-events: unset;\n \n ", " {\n background-color: ", ";\n color: ", ";\n }\n }\n"])), Z_INDEXES.focus, SegmentControlItemContent, COLORS.primary_100, COLORS.primary_700, Z_INDEXES.hover, SegmentControlItemContent, COLORS.primary_100, COLORS.primary_700, Z_INDEXES.active, SegmentControlItemContent, COLORS.primary_200, COLORS.primary_800, SegmentControlItemContent, COLORS.neutral_300, SegmentControlItemContent, COLORS.primary_500, COLORS.white, SegmentControlItemContent, COLORS.neutral_100, COLORS.neutral_300);
14
+ export var SegmentControlItemWrapper = styled.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n flex: 1;\n cursor: pointer;\n min-height: 48px;\n\n &:focus {\n ", "\n }\n\n &:hover {\n z-index: ", ";\n\n ", " {\n background-color: ", ";\n color: ", ";\n }\n }\n\n &:active {\n z-index: ", ";\n\n ", " {\n background-color: ", ";\n color: ", ";\n }\n }\n\n &.disabled {\n cursor: not-allowed;\n\n ", " {\n background-color: transparent;\n color: ", ";\n }\n }\n\n &.selected {\n cursor: default;\n pointer-events: none;\n\n ", " {\n background-color: ", ";\n color: ", ";\n }\n }\n\n &.selected.disabled {\n cursor: not-allowed;\n pointer-events: unset;\n \n ", " {\n background-color: ", ";\n color: ", ";\n }\n }\n"])), focusStyles, Z_INDEXES.hover, SegmentControlItemContent, COLORS.primary_100, COLORS.primary_700, Z_INDEXES.active, SegmentControlItemContent, COLORS.primary_200, COLORS.primary_800, SegmentControlItemContent, COLORS.neutral_300, SegmentControlItemContent, COLORS.primary_500, COLORS.white, SegmentControlItemContent, COLORS.neutral_100, COLORS.neutral_300);
15
15
  export var SegmentControlWrapper = styled.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n width: 100%;\n display: flex;\n flex-direction: row;\n align-items: center;\n\n ", ":first-of-type {\n ", " {\n border-bottom-left-radius: 12px;\n border-top-left-radius: 12px;\n padding-left: 4px;\n }\n }\n\n ", ":last-of-type {\n ", " {\n border-bottom-right-radius: 12px;\n border-top-right-radius: 12px;\n padding-right: 4px;\n }\n }\n\n\n &.small {\n ", " {\n ", "\n min-height: 32px;\n }\n }\n\n &.medium {\n ", " {\n ", "\n min-height: 40px;\n }\n }\n"])), SegmentControlItemWrapper, SegmentControlItemBackground, SegmentControlItemWrapper, SegmentControlItemBackground, SegmentControlItemContent, ComponentSStyling(ComponentTextStyle.Bold, null), SegmentControlItemContent, ComponentMStyling(ComponentTextStyle.Bold, null));
16
16
 
17
17
  var SegmentControl = function SegmentControl(_ref) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/SegmentControl/SegmentControl.tsx"],"names":["React","Size","styled","COLORS","ComponentMStyling","ComponentSStyling","ComponentTextStyle","Z_INDEXES","defaultOnMouseDownHandler","SegmentControlItemContent","div","neutral_600","SegmentControlItemBackground","neutral_20","SegmentControlItemWrapper","focus","primary_100","primary_700","hover","active","primary_200","primary_800","neutral_300","primary_500","white","neutral_100","SegmentControlWrapper","Bold","SegmentControl","items","size","Medium","onChange","selected","onKeyPress","e","item","key","document","activeElement","blur","disabled","onClick","map","a","i","undefined","content"],"mappings":";;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAAQC,IAAR,QAAmB,UAAnB;AACA,OAAOC,MAAP,MAAmB,mBAAnB;AACA,SAAQC,MAAR,EAAgBC,iBAAhB,EAAmCC,iBAAnC,EAAsDC,kBAAtD,EAA0EC,SAA1E,QAA0F,WAA1F;AACA,SAAQC,yBAAR,QAAwC,WAAxC;;AAGA,OAAO,IAAMC,yBAAyB,GAAGP,MAAM,CAACQ,GAAV,6PAS3BP,MAAM,CAACQ,WAToB,CAA/B;AAYP,OAAO,IAAMC,4BAA4B,GAAGV,MAAM,CAACQ,GAAV,wMAKnBP,MAAM,CAACU,UALY,CAAlC;AASP,OAAO,IAAMC,yBAAyB,GAAGZ,MAAM,CAACQ,GAAV,4lCAUvBH,SAAS,CAACQ,KAVa,EAahCN,yBAbgC,EAcZN,MAAM,CAACa,WAdK,EAevBb,MAAM,CAACc,WAfgB,EAqBvBV,SAAS,CAACW,KArBa,EAuBhCT,yBAvBgC,EAwBZN,MAAM,CAACa,WAxBK,EAyBvBb,MAAM,CAACc,WAzBgB,EA8BvBV,SAAS,CAACY,MA9Ba,EAgChCV,yBAhCgC,EAiCZN,MAAM,CAACiB,WAjCK,EAkCvBjB,MAAM,CAACkB,WAlCgB,EA0ChCZ,yBA1CgC,EA4CvBN,MAAM,CAACmB,WA5CgB,EAoDhCb,yBApDgC,EAqDZN,MAAM,CAACoB,WArDK,EAsDvBpB,MAAM,CAACqB,KAtDgB,EA8DhCf,yBA9DgC,EA+DZN,MAAM,CAACsB,WA/DK,EA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CAACH,QAAF,GAAa,UAAb,GAA0B,EAA3B,KAAkCG,CAAC,CAACP,GAAF,KAAUJ,QAAV,GAAqB,WAArB,GAAmC,EAArE,CADtC;AAE2B,QAAA,QAAQ,EAAEW,CAAC,CAACH,QAAF,IAAcG,CAAC,CAACP,GAAF,KAAUJ,QAAxB,GAAmC,CAAC,CAApC,GAAwC,CAF7E;AAG2B,QAAA,OAAO,EAAEW,CAAC,CAACH,QAAF,GAAaK,SAAb,GAAyB,UAACX,CAAD;AAAA,iBAAOO,OAAO,CAACP,CAAD,EAAIS,CAAJ,CAAd;AAAA,SAH7D;AAI2B,QAAA,WAAW,EAAEpC,yBAJxC;AAK2B,QAAA,UAAU,EAAEoC,CAAC,CAACH,QAAF,GAAaK,SAAb,GAAyB,UAACX,CAAD;AAAA,iBAAOD,UAAU,CAACC,CAAD,EAAIS,CAAJ,CAAjB;AAAA,SALhE;AAAA,+BAME,KAAC,4BAAD;AAAA,iCACE,KAAC,yBAAD;AAAA,sBACGA,CAAC,CAACG;AADL;AADF;AANF,SAAgCH,CAAC,CAACP,GAAF,IAASQ,CAAzC,CADS;AAAA,KAAV;AADH,IADF;AAkBD,CApCD;;;AANEhB,EAAAA,K;AANAQ,IAAAA,G;AACAI,IAAAA,Q;AACAM,IAAAA,O;;AAKAd,EAAAA,Q;AACAD,EAAAA,Q;;AA0CF,eAAeJ,cAAf","sourcesContent":["import React from 'react';\nimport {Size} from '../types';\nimport styled from 'styled-components';\nimport {COLORS, ComponentMStyling, ComponentSStyling, ComponentTextStyle, Z_INDEXES} from '../styles';\nimport {defaultOnMouseDownHandler} from '../common';\n\n\nexport const SegmentControlItemContent = styled.div`\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n border-radius: 8px;\n padding: 0 16px;\n\n background-color: transparent;\n color: ${COLORS.neutral_600};\n`\n\nexport const SegmentControlItemBackground = styled.div`\n flex: 1;\n display: flex;\n flex-direction: row;\n align-items: center;\n background-color: ${COLORS.neutral_20};\n padding: 4px 0px;\n`;\n\nexport const SegmentControlItemWrapper = styled.div`\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n flex: 1;\n cursor: pointer;\n min-height: 48px;\n\n &:focus {\n z-index: ${Z_INDEXES.focus};\n outline: none;\n\n ${SegmentControlItemContent} {\n background-color: ${COLORS.primary_100};\n color: ${COLORS.primary_700};\n box-shadow: 0px 4px 12px rgba(46, 127, 161, 0.25), 0px 0px 8px #2E7FA1;\n }\n }\n\n &:hover {\n z-index: ${Z_INDEXES.hover};\n\n ${SegmentControlItemContent} {\n background-color: ${COLORS.primary_100};\n color: ${COLORS.primary_700};\n }\n }\n\n &:active {\n z-index: ${Z_INDEXES.active};\n\n ${SegmentControlItemContent} {\n background-color: ${COLORS.primary_200};\n color: ${COLORS.primary_800};\n box-shadow: none;\n }\n }\n\n &.disabled {\n cursor: not-allowed;\n\n ${SegmentControlItemContent} {\n background-color: transparent;\n color: ${COLORS.neutral_300};\n }\n }\n\n &.selected {\n cursor: default;\n pointer-events: none;\n\n ${SegmentControlItemContent} {\n background-color: ${COLORS.primary_500};\n color: ${COLORS.white};\n }\n }\n\n &.selected.disabled {\n cursor: not-allowed;\n pointer-events: unset;\n \n ${SegmentControlItemContent} {\n background-color: ${COLORS.neutral_100};\n color: ${COLORS.neutral_300};\n }\n }\n`;\n\nexport const SegmentControlWrapper = styled.div`\n width: 100%;\n display: flex;\n flex-direction: row;\n align-items: center;\n\n ${SegmentControlItemWrapper}:first-of-type {\n ${SegmentControlItemBackground} {\n border-bottom-left-radius: 12px;\n border-top-left-radius: 12px;\n padding-left: 4px;\n }\n }\n\n ${SegmentControlItemWrapper}:last-of-type {\n ${SegmentControlItemBackground} {\n border-bottom-right-radius: 12px;\n border-top-right-radius: 12px;\n padding-right: 4px;\n }\n }\n\n\n &.small {\n ${SegmentControlItemContent} {\n ${ComponentSStyling(ComponentTextStyle.Bold, null)}\n min-height: 32px;\n }\n }\n\n &.medium {\n ${SegmentControlItemContent} {\n ${ComponentMStyling(ComponentTextStyle.Bold, null)}\n min-height: 40px;\n }\n }\n`;\n\n\nexport interface SegmentControlItem {\n key: string\n disabled?: boolean;\n content: React.ReactNode | string;\n}\n\ninterface SegmentControlProps {\n items: SegmentControlItem[];\n selected: string;\n onChange: (value: string) => void;\n size?: Size.Small | Size.Medium;\n}\n\nconst SegmentControl: React.FunctionComponent<SegmentControlProps> = ({\n items,\n size = Size.Medium,\n onChange,\n selected\n }) => {\n const onKeyPress = (e: React.KeyboardEvent<HTMLDivElement>, item: SegmentControlItem) => {\n if (e.key === 'Enter' || e.key === ' ') {\n //@ts-ignore\n document?.activeElement?.blur();\n !item.disabled && onChange(item.key);\n }\n };\n\n const onClick = (e: React.MouseEvent, item: SegmentControlItem) => {\n !item.disabled && onChange(item.key);\n }\n\n return (\n <SegmentControlWrapper className={size}>\n {items.map((a, i) =>\n <SegmentControlItemWrapper key={a.key || i}\n className={(a.disabled ? 'disabled' : '') + (a.key === selected ? ' selected' : '')}\n tabIndex={a.disabled || a.key === selected ? -1 : 0}\n onClick={a.disabled ? undefined : (e) => onClick(e, a)}\n onMouseDown={defaultOnMouseDownHandler}\n onKeyPress={a.disabled ? undefined : (e) => onKeyPress(e, a)}>\n <SegmentControlItemBackground>\n <SegmentControlItemContent>\n {a.content}\n </SegmentControlItemContent>\n </SegmentControlItemBackground>\n </SegmentControlItemWrapper>)\n }\n </SegmentControlWrapper>\n );\n};\n\nexport default SegmentControl;\n"],"file":"SegmentControl.js"}
1
+ {"version":3,"sources":["../../src/SegmentControl/SegmentControl.tsx"],"names":["React","Size","styled","COLORS","ComponentMStyling","ComponentSStyling","ComponentTextStyle","focusStyles","Z_INDEXES","defaultOnMouseDownHandler","SegmentControlItemContent","div","neutral_600","SegmentControlItemBackground","neutral_20","SegmentControlItemWrapper","hover","primary_100","primary_700","active","primary_200","primary_800","neutral_300","primary_500","white","neutral_100","SegmentControlWrapper","Bold","SegmentControl","items","size","Medium","onChange","selected","onKeyPress","e","item","key","document","activeElement","blur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AAAA,iBAAOO,OAAO,CAACP,CAAD,EAAIS,CAAJ,CAAd;AAAA,SAH7D;AAI2B,QAAA,WAAW,EAAEnC,yBAJxC;AAK2B,QAAA,UAAU,EAAEmC,CAAC,CAACH,QAAF,GAAaK,SAAb,GAAyB,UAACX,CAAD;AAAA,iBAAOD,UAAU,CAACC,CAAD,EAAIS,CAAJ,CAAjB;AAAA,SALhE;AAAA,+BAME,KAAC,4BAAD;AAAA,iCACE,KAAC,yBAAD;AAAA,sBACGA,CAAC,CAACG;AADL;AADF;AANF,SAAgCH,CAAC,CAACP,GAAF,IAASQ,CAAzC,CADS;AAAA,KAAV;AADH,IADF;AAkBD,CApCD;;;AANEhB,EAAAA,K;AANAQ,IAAAA,G;AACAI,IAAAA,Q;AACAM,IAAAA,O;;AAKAd,EAAAA,Q;AACAD,EAAAA,Q;;AA0CF,eAAeJ,cAAf","sourcesContent":["import React from 'react';\nimport {Size} from '../types';\nimport styled from 'styled-components';\nimport {COLORS, ComponentMStyling, ComponentSStyling, ComponentTextStyle, focusStyles, Z_INDEXES} from '../styles';\nimport {defaultOnMouseDownHandler} from '../common';\n\n\nexport const SegmentControlItemContent = styled.div`\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n border-radius: 8px;\n padding: 0 16px;\n\n background-color: transparent;\n color: ${COLORS.neutral_600};\n`\n\nexport const SegmentControlItemBackground = styled.div`\n flex: 1;\n display: flex;\n flex-direction: row;\n align-items: center;\n background-color: ${COLORS.neutral_20};\n padding: 4px 0px;\n`;\n\nexport const SegmentControlItemWrapper = styled.div`\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n flex: 1;\n cursor: pointer;\n min-height: 48px;\n\n &:focus {\n ${focusStyles}\n }\n\n &:hover {\n z-index: ${Z_INDEXES.hover};\n\n ${SegmentControlItemContent} {\n background-color: ${COLORS.primary_100};\n color: ${COLORS.primary_700};\n }\n }\n\n &:active {\n z-index: ${Z_INDEXES.active};\n\n ${SegmentControlItemContent} {\n background-color: ${COLORS.primary_200};\n color: ${COLORS.primary_800};\n }\n }\n\n &.disabled {\n cursor: not-allowed;\n\n ${SegmentControlItemContent} {\n background-color: transparent;\n color: ${COLORS.neutral_300};\n }\n }\n\n &.selected {\n cursor: default;\n pointer-events: none;\n\n ${SegmentControlItemContent} {\n background-color: ${COLORS.primary_500};\n color: ${COLORS.white};\n }\n }\n\n &.selected.disabled {\n cursor: not-allowed;\n pointer-events: unset;\n \n ${SegmentControlItemContent} {\n background-color: ${COLORS.neutral_100};\n color: ${COLORS.neutral_300};\n }\n }\n`;\n\nexport const SegmentControlWrapper = styled.div`\n width: 100%;\n display: flex;\n flex-direction: row;\n align-items: center;\n\n ${SegmentControlItemWrapper}:first-of-type {\n ${SegmentControlItemBackground} {\n border-bottom-left-radius: 12px;\n border-top-left-radius: 12px;\n padding-left: 4px;\n }\n }\n\n ${SegmentControlItemWrapper}:last-of-type {\n ${SegmentControlItemBackground} {\n border-bottom-right-radius: 12px;\n border-top-right-radius: 12px;\n padding-right: 4px;\n }\n }\n\n\n &.small {\n ${SegmentControlItemContent} {\n ${ComponentSStyling(ComponentTextStyle.Bold, null)}\n min-height: 32px;\n }\n }\n\n &.medium {\n ${SegmentControlItemContent} {\n ${ComponentMStyling(ComponentTextStyle.Bold, null)}\n min-height: 40px;\n }\n }\n`;\n\n\nexport interface SegmentControlItem {\n key: string\n disabled?: boolean;\n content: React.ReactNode | string;\n}\n\ninterface SegmentControlProps {\n items: SegmentControlItem[];\n selected: string;\n onChange: (value: string) => void;\n size?: Size.Small | Size.Medium;\n}\n\nconst SegmentControl: React.FunctionComponent<SegmentControlProps> = ({\n items,\n size = Size.Medium,\n onChange,\n selected\n }) => {\n const onKeyPress = (e: React.KeyboardEvent<HTMLDivElement>, item: SegmentControlItem) => {\n if (e.key === 'Enter' || e.key === ' ') {\n //@ts-ignore\n document?.activeElement?.blur();\n !item.disabled && onChange(item.key);\n }\n };\n\n const onClick = (e: React.MouseEvent, item: SegmentControlItem) => {\n !item.disabled && onChange(item.key);\n }\n\n return (\n <SegmentControlWrapper className={size}>\n {items.map((a, i) =>\n <SegmentControlItemWrapper key={a.key || i}\n className={(a.disabled ? 'disabled' : '') + (a.key === selected ? ' selected' : '')}\n tabIndex={a.disabled || a.key === selected ? -1 : 0}\n onClick={a.disabled ? undefined : (e) => onClick(e, a)}\n onMouseDown={defaultOnMouseDownHandler}\n onKeyPress={a.disabled ? undefined : (e) => onKeyPress(e, a)}>\n <SegmentControlItemBackground>\n <SegmentControlItemContent>\n {a.content}\n </SegmentControlItemContent>\n </SegmentControlItemBackground>\n </SegmentControlItemWrapper>)\n }\n </SegmentControlWrapper>\n );\n};\n\nexport default SegmentControl;\n"],"file":"SegmentControl.js"}
@@ -29,7 +29,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
29
29
 
30
30
  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; }
31
31
 
32
- var StyledSwitcherItem = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n padding: 16px 25px;\n margin: 0 2px;\n\n display: flex;\n align-items: center;\n text-align: center;\n position: relative;\n\n ", "\n\n text-decoration: none;\n\n svg {\n margin-right: 16px;\n }\n\n &:after {\n content: '';\n display: block;\n position: absolute;\n left: 4px;\n top: 4px;\n bottom: 4px;\n width: 4px;\n background-color: transparent;\n border-radius: 2px;\n }\n\n &.active:not(.disabled) {\n z-index: ", ";\n font-weight: bold;\n color: ", ";\n\n &:after {\n background-color: ", ";\n }\n\n svg path {\n fill: ", ";\n }\n }\n\n &.disabled {\n color: ", ";\n background-color: ", ";\n }\n\n &:hover:not(.disabled) {\n z-index: ", ";\n color: ", ";\n background-color: ", ";\n\n svg path {\n fill: ", ";\n }\n }\n\n &:active:not(.disabled) {\n z-index: ", ";\n color: ", ";\n background-color: ", ";\n box-shadow: none;\n\n &:after {\n background-color: ", ";\n }\n\n svg path {\n fill: ", ";\n }\n }\n\n &:focus:not(.disabled) {\n z-index: ", ";\n box-shadow: 0px 0px 8px ", ", 0px 4px 12px rgba(46, 127, 161, 0.25);\n outline: none;\n }\n"])), (0, _typography.ComponentMStyling)(_styles.ComponentTextStyle.Regular, _styles.COLORS.neutral_600), _zIndexes.Z_INDEXES.active, _styles.COLORS.neutral_800, _styles.COLORS.primary_500, _styles.COLORS.neutral_800, _styles.COLORS.neutral_300, _styles.COLORS.neutral_100, _zIndexes.Z_INDEXES.hover, _styles.COLORS.primary_600, _styles.COLORS.primary_20, _styles.COLORS.primary_600, _zIndexes.Z_INDEXES.active, _styles.COLORS.primary_800, _styles.COLORS.primary_100, _styles.COLORS.primary_500, _styles.COLORS.primary_800, _zIndexes.Z_INDEXES.focus, _styles.COLORS.primary_500);
32
+ var StyledSwitcherItem = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n padding: 16px 25px;\n margin: 0 2px;\n\n display: flex;\n align-items: center;\n text-align: center;\n position: relative;\n\n ", "\n\n text-decoration: none;\n\n svg {\n margin-right: 16px;\n }\n\n &:after {\n content: '';\n display: block;\n position: absolute;\n left: 4px;\n top: 4px;\n bottom: 4px;\n width: 4px;\n background-color: transparent;\n border-radius: 2px;\n }\n\n &.active:not(.disabled) {\n z-index: ", ";\n font-weight: bold;\n color: ", ";\n\n &:after {\n background-color: ", ";\n }\n\n svg path {\n fill: ", ";\n }\n }\n\n &.disabled {\n color: ", ";\n background-color: ", ";\n }\n\n &:hover:not(.disabled) {\n z-index: ", ";\n color: ", ";\n background-color: ", ";\n\n svg path {\n fill: ", ";\n }\n }\n\n &:active:not(.disabled) {\n z-index: ", ";\n color: ", ";\n background-color: ", ";\n\n &:after {\n background-color: ", ";\n }\n\n svg path {\n fill: ", ";\n }\n }\n\n &:focus:not(.disabled) {\n ", "\n }\n"])), (0, _typography.ComponentMStyling)(_styles.ComponentTextStyle.Regular, _styles.COLORS.neutral_600), _zIndexes.Z_INDEXES.active, _styles.COLORS.neutral_800, _styles.COLORS.primary_500, _styles.COLORS.neutral_800, _styles.COLORS.neutral_300, _styles.COLORS.neutral_100, _zIndexes.Z_INDEXES.hover, _styles.COLORS.primary_600, _styles.COLORS.primary_20, _styles.COLORS.primary_600, _zIndexes.Z_INDEXES.active, _styles.COLORS.primary_800, _styles.COLORS.primary_100, _styles.COLORS.primary_500, _styles.COLORS.primary_800, _styles.focusStyles);
33
33
 
34
34
  var A = _styledComponents.default.a(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)([""])));
35
35
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/Switcher/SwitcherMenuItem.tsx"],"names":["StyledSwitcherItem","styled","div","ComponentTextStyle","Regular","COLORS","neutral_600","Z_INDEXES","active","neutral_800","primary_500","neutral_300","neutral_100","hover","primary_600","primary_20","primary_800","primary_100","focus","A","a","SwitcherMenuItem","label","url","disabled","Icon","as","testId","window","location","href"],"mappings":";;;;;;;;;;;;;AAAA;;AACA;;AACA;;AAEA;;AACA;;;;;;;;;;AAEA,IAAMA,kBAAkB,GAAGC,0BAAOC,GAAV,8wCASpB,mCAAkBC,2BAAmBC,OAArC,EAA8CC,eAAOC,WAArD,CAToB,EA8BTC,oBAAUC,MA9BD,EAgCXH,eAAOI,WAhCI,EAmCEJ,eAAOK,WAnCT,EAuCVL,eAAOI,WAvCG,EA4CXJ,eAAOM,WA5CI,EA6CAN,eAAOO,WA7CP,EAiDTL,oBAAUM,KAjDD,EAkDXR,eAAOS,WAlDI,EAmDAT,eAAOU,UAnDP,EAsDVV,eAAOS,WAtDG,EA2DTP,oBAAUC,MA3DD,EA4DXH,eAAOW,WA5DI,EA6DAX,eAAOY,WA7DP,EAiEEZ,eAAOK,WAjET,EAqEVL,eAAOW,WArEG,EA0ETT,oBAAUW,KA1ED,EA2EMb,eAAOK,WA3Eb,CAAxB;;AAgFA,IAAMS,CAAC,GAAGlB,0BAAOmB,CAAV,qFAAP;;AAEA,IAAMC,gBAAgB,GAAG,SAAnBA,gBAAmB;AAAA,MAAGC,KAAH,QAAGA,KAAH;AAAA,MAAUC,GAAV,QAAUA,GAAV;AAAA,MAAeC,QAAf,QAAeA,QAAf;AAAA,MAAyBC,IAAzB,QAAyBA,IAAzB;AAAA,qBAA+BC,EAA/B;AAAA,MAA+BA,EAA/B,wBAAoCP,CAApC;AAAA,MAAuCQ,MAAvC,QAAuCA,MAAvC;AAAA,sBACvB,sBAAC,kBAAD;AACE,IAAA,OAAO,EAAE;AAAA,aAAOC,MAAM,CAACC,QAAP,CAAgBC,IAAhB,GAAuBP,GAAG,IAAI,EAArC;AAAA,KADX;AAEE,IAAA,EAAE,EAAEG,EAFN;AAGE,IAAA,IAAI,EAAEH,GAAG,IAAI,EAHf;AAIE,IAAA,MAAM,EAAC,SAJT;AAME,IAAA,SAAS,EAAEC,QAAQ,GAAG,UAAH,GAAgB,EANrC;AAOE,mBAAaG,MAPf;AAAA,eAQGF,IAAI,iBAAI,qBAAC,IAAD;AAAM,MAAA,IAAI,EAAC,MAAX;AAAkB,MAAA,KAAK,EAAC;AAAxB,MARX,EASGH,KATH;AAAA,KAKOA,KALP,CADuB;AAAA,CAAzB;;eAceD,gB","sourcesContent":["import * as React from 'react';\nimport styled from 'styled-components';\nimport {COLORS, ComponentTextStyle} from '../styles';\nimport {SwitcherNavItem} from '../types';\nimport {ComponentMStyling} from '../styles/typography';\nimport {Z_INDEXES} from '../styles/z-indexes';\n\nconst StyledSwitcherItem = styled.div`\n padding: 16px 25px;\n margin: 0 2px;\n\n display: flex;\n align-items: center;\n text-align: center;\n position: relative;\n\n ${ComponentMStyling(ComponentTextStyle.Regular, COLORS.neutral_600)}\n\n text-decoration: none;\n\n svg {\n margin-right: 16px;\n }\n\n &:after {\n content: '';\n display: block;\n position: absolute;\n left: 4px;\n top: 4px;\n bottom: 4px;\n width: 4px;\n background-color: transparent;\n border-radius: 2px;\n }\n\n &.active:not(.disabled) {\n z-index: ${Z_INDEXES.active};\n font-weight: bold;\n color: ${COLORS.neutral_800};\n\n &:after {\n background-color: ${COLORS.primary_500};\n }\n\n svg path {\n fill: ${COLORS.neutral_800};\n }\n }\n\n &.disabled {\n color: ${COLORS.neutral_300};\n background-color: ${COLORS.neutral_100};\n }\n\n &:hover:not(.disabled) {\n z-index: ${Z_INDEXES.hover};\n color: ${COLORS.primary_600};\n background-color: ${COLORS.primary_20};\n\n svg path {\n fill: ${COLORS.primary_600};\n }\n }\n\n &:active:not(.disabled) {\n z-index: ${Z_INDEXES.active};\n color: ${COLORS.primary_800};\n background-color: ${COLORS.primary_100};\n box-shadow: none;\n\n &:after {\n background-color: ${COLORS.primary_500};\n }\n\n svg path {\n fill: ${COLORS.primary_800};\n }\n }\n\n &:focus:not(.disabled) {\n z-index: ${Z_INDEXES.focus};\n box-shadow: 0px 0px 8px ${COLORS.primary_500}, 0px 4px 12px rgba(46, 127, 161, 0.25);\n outline: none;\n }\n`;\n\nconst A = styled.a``;\n\nconst SwitcherMenuItem = ({ label, url, disabled, Icon, as = A, testId }: SwitcherNavItem) => (\n <StyledSwitcherItem\n onClick={() => (window.location.href = url || '')}\n as={as}\n href={url || ''}\n target=\"_parent\"\n key={label}\n className={disabled ? 'disabled' : ''}\n data-testid={testId}>\n {Icon && <Icon size=\"22px\" color=\"#666666\" />}\n {label}\n </StyledSwitcherItem>\n);\n\nexport default SwitcherMenuItem;\n"],"file":"SwitcherMenuItem.cjs"}
1
+ {"version":3,"sources":["../../src/Switcher/SwitcherMenuItem.tsx"],"names":["StyledSwitcherItem","styled","div","ComponentTextStyle","Regular","COLORS","neutral_600","Z_INDEXES","active","neutral_800","primary_500","neutral_300","neutral_100","hover","primary_600","primary_20","primary_800","primary_100","focusStyles","A","a","SwitcherMenuItem","label","url","disabled","Icon","as","testId","window","location","href"],"mappings":";;;;;;;;;;;;;AAAA;;AACA;;AACA;;AAEA;;AACA;;;;;;;;;;AAEA,IAAMA,kBAAkB,GAAGC,0BAAOC,GAAV,+oCASpB,mCAAkBC,2BAAmBC,OAArC,EAA8CC,eAAOC,WAArD,CAToB,EA8BTC,oBAAUC,MA9BD,EAgCXH,eAAOI,WAhCI,EAmCEJ,eAAOK,WAnCT,EAuCVL,eAAOI,WAvCG,EA4CXJ,eAAOM,WA5CI,EA6CAN,eAAOO,WA7CP,EAiDTL,oBAAUM,KAjDD,EAkDXR,eAAOS,WAlDI,EAmDAT,eAAOU,UAnDP,EAsDVV,eAAOS,WAtDG,EA2DTP,oBAAUC,MA3DD,EA4DXH,eAAOW,WA5DI,EA6DAX,eAAOY,WA7DP,EAgEEZ,eAAOK,WAhET,EAoEVL,eAAOW,WApEG,EAyElBE,mBAzEkB,CAAxB;;AA6EA,IAAMC,CAAC,GAAGlB,0BAAOmB,CAAV,qFAAP;;AAEA,IAAMC,gBAAgB,GAAG,SAAnBA,gBAAmB;AAAA,MAAGC,KAAH,QAAGA,KAAH;AAAA,MAAUC,GAAV,QAAUA,GAAV;AAAA,MAAeC,QAAf,QAAeA,QAAf;AAAA,MAAyBC,IAAzB,QAAyBA,IAAzB;AAAA,qBAA+BC,EAA/B;AAAA,MAA+BA,EAA/B,wBAAoCP,CAApC;AAAA,MAAuCQ,MAAvC,QAAuCA,MAAvC;AAAA,sBACvB,sBAAC,kBAAD;AACE,IAAA,OAAO,EAAE;AAAA,aAAOC,MAAM,CAACC,QAAP,CAAgBC,IAAhB,GAAuBP,GAAG,IAAI,EAArC;AAAA,KADX;AAEE,IAAA,EAAE,EAAEG,EAFN;AAGE,IAAA,IAAI,EAAEH,GAAG,IAAI,EAHf;AAIE,IAAA,MAAM,EAAC,SAJT;AAME,IAAA,SAAS,EAAEC,QAAQ,GAAG,UAAH,GAAgB,EANrC;AAOE,mBAAaG,MAPf;AAAA,eAQGF,IAAI,iBAAI,qBAAC,IAAD;AAAM,MAAA,IAAI,EAAC,MAAX;AAAkB,MAAA,KAAK,EAAC;AAAxB,MARX,EASGH,KATH;AAAA,KAKOA,KALP,CADuB;AAAA,CAAzB;;eAceD,gB","sourcesContent":["import * as React from 'react';\nimport styled from 'styled-components';\nimport {COLORS, ComponentTextStyle, focusStyles} from '../styles';\nimport {SwitcherNavItem} from '../types';\nimport {ComponentMStyling} from '../styles/typography';\nimport {Z_INDEXES} from '../styles/z-indexes';\n\nconst StyledSwitcherItem = styled.div`\n padding: 16px 25px;\n margin: 0 2px;\n\n display: flex;\n align-items: center;\n text-align: center;\n position: relative;\n\n ${ComponentMStyling(ComponentTextStyle.Regular, COLORS.neutral_600)}\n\n text-decoration: none;\n\n svg {\n margin-right: 16px;\n }\n\n &:after {\n content: '';\n display: block;\n position: absolute;\n left: 4px;\n top: 4px;\n bottom: 4px;\n width: 4px;\n background-color: transparent;\n border-radius: 2px;\n }\n\n &.active:not(.disabled) {\n z-index: ${Z_INDEXES.active};\n font-weight: bold;\n color: ${COLORS.neutral_800};\n\n &:after {\n background-color: ${COLORS.primary_500};\n }\n\n svg path {\n fill: ${COLORS.neutral_800};\n }\n }\n\n &.disabled {\n color: ${COLORS.neutral_300};\n background-color: ${COLORS.neutral_100};\n }\n\n &:hover:not(.disabled) {\n z-index: ${Z_INDEXES.hover};\n color: ${COLORS.primary_600};\n background-color: ${COLORS.primary_20};\n\n svg path {\n fill: ${COLORS.primary_600};\n }\n }\n\n &:active:not(.disabled) {\n z-index: ${Z_INDEXES.active};\n color: ${COLORS.primary_800};\n background-color: ${COLORS.primary_100};\n\n &:after {\n background-color: ${COLORS.primary_500};\n }\n\n svg path {\n fill: ${COLORS.primary_800};\n }\n }\n\n &:focus:not(.disabled) {\n ${focusStyles}\n }\n`;\n\nconst A = styled.a``;\n\nconst SwitcherMenuItem = ({ label, url, disabled, Icon, as = A, testId }: SwitcherNavItem) => (\n <StyledSwitcherItem\n onClick={() => (window.location.href = url || '')}\n as={as}\n href={url || ''}\n target=\"_parent\"\n key={label}\n className={disabled ? 'disabled' : ''}\n data-testid={testId}>\n {Icon && <Icon size=\"22px\" color=\"#666666\" />}\n {label}\n </StyledSwitcherItem>\n);\n\nexport default SwitcherMenuItem;\n"],"file":"SwitcherMenuItem.cjs"}
@@ -4,12 +4,12 @@ var _templateObject, _templateObject2;
4
4
 
5
5
  import * as React from 'react';
6
6
  import styled from 'styled-components';
7
- import { COLORS, ComponentTextStyle } from '../styles';
7
+ import { COLORS, ComponentTextStyle, focusStyles } from '../styles';
8
8
  import { ComponentMStyling } from '../styles/typography';
9
9
  import { Z_INDEXES } from '../styles/z-indexes';
10
10
  import { jsx as _jsx } from "react/jsx-runtime";
11
11
  import { jsxs as _jsxs } from "react/jsx-runtime";
12
- var StyledSwitcherItem = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n padding: 16px 25px;\n margin: 0 2px;\n\n display: flex;\n align-items: center;\n text-align: center;\n position: relative;\n\n ", "\n\n text-decoration: none;\n\n svg {\n margin-right: 16px;\n }\n\n &:after {\n content: '';\n display: block;\n position: absolute;\n left: 4px;\n top: 4px;\n bottom: 4px;\n width: 4px;\n background-color: transparent;\n border-radius: 2px;\n }\n\n &.active:not(.disabled) {\n z-index: ", ";\n font-weight: bold;\n color: ", ";\n\n &:after {\n background-color: ", ";\n }\n\n svg path {\n fill: ", ";\n }\n }\n\n &.disabled {\n color: ", ";\n background-color: ", ";\n }\n\n &:hover:not(.disabled) {\n z-index: ", ";\n color: ", ";\n background-color: ", ";\n\n svg path {\n fill: ", ";\n }\n }\n\n &:active:not(.disabled) {\n z-index: ", ";\n color: ", ";\n background-color: ", ";\n box-shadow: none;\n\n &:after {\n background-color: ", ";\n }\n\n svg path {\n fill: ", ";\n }\n }\n\n &:focus:not(.disabled) {\n z-index: ", ";\n box-shadow: 0px 0px 8px ", ", 0px 4px 12px rgba(46, 127, 161, 0.25);\n outline: none;\n }\n"])), ComponentMStyling(ComponentTextStyle.Regular, COLORS.neutral_600), Z_INDEXES.active, COLORS.neutral_800, COLORS.primary_500, COLORS.neutral_800, COLORS.neutral_300, COLORS.neutral_100, Z_INDEXES.hover, COLORS.primary_600, COLORS.primary_20, COLORS.primary_600, Z_INDEXES.active, COLORS.primary_800, COLORS.primary_100, COLORS.primary_500, COLORS.primary_800, Z_INDEXES.focus, COLORS.primary_500);
12
+ var StyledSwitcherItem = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n padding: 16px 25px;\n margin: 0 2px;\n\n display: flex;\n align-items: center;\n text-align: center;\n position: relative;\n\n ", "\n\n text-decoration: none;\n\n svg {\n margin-right: 16px;\n }\n\n &:after {\n content: '';\n display: block;\n position: absolute;\n left: 4px;\n top: 4px;\n bottom: 4px;\n width: 4px;\n background-color: transparent;\n border-radius: 2px;\n }\n\n &.active:not(.disabled) {\n z-index: ", ";\n font-weight: bold;\n color: ", ";\n\n &:after {\n background-color: ", ";\n }\n\n svg path {\n fill: ", ";\n }\n }\n\n &.disabled {\n color: ", ";\n background-color: ", ";\n }\n\n &:hover:not(.disabled) {\n z-index: ", ";\n color: ", ";\n background-color: ", ";\n\n svg path {\n fill: ", ";\n }\n }\n\n &:active:not(.disabled) {\n z-index: ", ";\n color: ", ";\n background-color: ", ";\n\n &:after {\n background-color: ", ";\n }\n\n svg path {\n fill: ", ";\n }\n }\n\n &:focus:not(.disabled) {\n ", "\n }\n"])), ComponentMStyling(ComponentTextStyle.Regular, COLORS.neutral_600), Z_INDEXES.active, COLORS.neutral_800, COLORS.primary_500, COLORS.neutral_800, COLORS.neutral_300, COLORS.neutral_100, Z_INDEXES.hover, COLORS.primary_600, COLORS.primary_20, COLORS.primary_600, Z_INDEXES.active, COLORS.primary_800, COLORS.primary_100, COLORS.primary_500, COLORS.primary_800, focusStyles);
13
13
  var A = styled.a(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral([""])));
14
14
 
15
15
  var SwitcherMenuItem = function SwitcherMenuItem(_ref) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/Switcher/SwitcherMenuItem.tsx"],"names":["React","styled","COLORS","ComponentTextStyle","ComponentMStyling","Z_INDEXES","StyledSwitcherItem","div","Regular","neutral_600","active","neutral_800","primary_500","neutral_300","neutral_100","hover","primary_600","primary_20","primary_800","primary_100","focus","A","a","SwitcherMenuItem","label","url","disabled","Icon","as","testId","window","location","href"],"mappings":";;;;AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,OAAOC,MAAP,MAAmB,mBAAnB;AACA,SAAQC,MAAR,EAAgBC,kBAAhB,QAAyC,WAAzC;AAEA,SAAQC,iBAAR,QAAgC,sBAAhC;AACA,SAAQC,SAAR,QAAwB,qBAAxB;;;AAEA,IAAMC,kBAAkB,GAAGL,MAAM,CAACM,GAAV,gwCASpBH,iBAAiB,CAACD,kBAAkB,CAACK,OAApB,EAA6BN,MAAM,CAACO,WAApC,CATG,EA8BTJ,SAAS,CAACK,MA9BD,EAgCXR,MAAM,CAACS,WAhCI,EAmCET,MAAM,CAACU,WAnCT,EAuCVV,MAAM,CAACS,WAvCG,EA4CXT,MAAM,CAACW,WA5CI,EA6CAX,MAAM,CAACY,WA7CP,EAiDTT,SAAS,CAACU,KAjDD,EAkDXb,MAAM,CAACc,WAlDI,EAmDAd,MAAM,CAACe,UAnDP,EAsDVf,MAAM,CAACc,WAtDG,EA2DTX,SAAS,CAACK,MA3DD,EA4DXR,MAAM,CAACgB,WA5DI,EA6DAhB,MAAM,CAACiB,WA7DP,EAiEEjB,MAAM,CAACU,WAjET,EAqEVV,MAAM,CAACgB,WArEG,EA0ETb,SAAS,CAACe,KA1ED,EA2EMlB,MAAM,CAACU,WA3Eb,CAAxB;AAgFA,IAAMS,CAAC,GAAGpB,MAAM,CAACqB,CAAV,uEAAP;;AAEA,IAAMC,gBAAgB,GAAG,SAAnBA,gBAAmB;AAAA,MAAGC,KAAH,QAAGA,KAAH;AAAA,MAAUC,GAAV,QAAUA,GAAV;AAAA,MAAeC,QAAf,QAAeA,QAAf;AAAA,MAAyBC,IAAzB,QAAyBA,IAAzB;AAAA,qBAA+BC,EAA/B;AAAA,MAA+BA,EAA/B,wBAAoCP,CAApC;AAAA,MAAuCQ,MAAvC,QAAuCA,MAAvC;AAAA,sBACvB,MAAC,kBAAD;AACE,IAAA,OAAO,EAAE;AAAA,aAAOC,MAAM,CAACC,QAAP,CAAgBC,IAAhB,GAAuBP,GAAG,IAAI,EAArC;AAAA,KADX;AAEE,IAAA,EAAE,EAAEG,EAFN;AAGE,IAAA,IAAI,EAAEH,GAAG,IAAI,EAHf;AAIE,IAAA,MAAM,EAAC,SAJT;AAME,IAAA,SAAS,EAAEC,QAAQ,GAAG,UAAH,GAAgB,EANrC;AAOE,mBAAaG,MAPf;AAAA,eAQGF,IAAI,iBAAI,KAAC,IAAD;AAAM,MAAA,IAAI,EAAC,MAAX;AAAkB,MAAA,KAAK,EAAC;AAAxB,MARX,EASGH,KATH;AAAA,KAKOA,KALP,CADuB;AAAA,CAAzB;;AAcA,eAAeD,gBAAf","sourcesContent":["import * as React from 'react';\nimport styled from 'styled-components';\nimport {COLORS, ComponentTextStyle} from '../styles';\nimport {SwitcherNavItem} from '../types';\nimport {ComponentMStyling} from '../styles/typography';\nimport {Z_INDEXES} from '../styles/z-indexes';\n\nconst StyledSwitcherItem = styled.div`\n padding: 16px 25px;\n margin: 0 2px;\n\n display: flex;\n align-items: center;\n text-align: center;\n position: relative;\n\n ${ComponentMStyling(ComponentTextStyle.Regular, COLORS.neutral_600)}\n\n text-decoration: none;\n\n svg {\n margin-right: 16px;\n }\n\n &:after {\n content: '';\n display: block;\n position: absolute;\n left: 4px;\n top: 4px;\n bottom: 4px;\n width: 4px;\n background-color: transparent;\n border-radius: 2px;\n }\n\n &.active:not(.disabled) {\n z-index: ${Z_INDEXES.active};\n font-weight: bold;\n color: ${COLORS.neutral_800};\n\n &:after {\n background-color: ${COLORS.primary_500};\n }\n\n svg path {\n fill: ${COLORS.neutral_800};\n }\n }\n\n &.disabled {\n color: ${COLORS.neutral_300};\n background-color: ${COLORS.neutral_100};\n }\n\n &:hover:not(.disabled) {\n z-index: ${Z_INDEXES.hover};\n color: ${COLORS.primary_600};\n background-color: ${COLORS.primary_20};\n\n svg path {\n fill: ${COLORS.primary_600};\n }\n }\n\n &:active:not(.disabled) {\n z-index: ${Z_INDEXES.active};\n color: ${COLORS.primary_800};\n background-color: ${COLORS.primary_100};\n box-shadow: none;\n\n &:after {\n background-color: ${COLORS.primary_500};\n }\n\n svg path {\n fill: ${COLORS.primary_800};\n }\n }\n\n &:focus:not(.disabled) {\n z-index: ${Z_INDEXES.focus};\n box-shadow: 0px 0px 8px ${COLORS.primary_500}, 0px 4px 12px rgba(46, 127, 161, 0.25);\n outline: none;\n }\n`;\n\nconst A = styled.a``;\n\nconst SwitcherMenuItem = ({ label, url, disabled, Icon, as = A, testId }: SwitcherNavItem) => (\n <StyledSwitcherItem\n onClick={() => (window.location.href = url || '')}\n as={as}\n href={url || ''}\n target=\"_parent\"\n key={label}\n className={disabled ? 'disabled' : ''}\n data-testid={testId}>\n {Icon && <Icon size=\"22px\" color=\"#666666\" />}\n {label}\n </StyledSwitcherItem>\n);\n\nexport default SwitcherMenuItem;\n"],"file":"SwitcherMenuItem.js"}
1
+ {"version":3,"sources":["../../src/Switcher/SwitcherMenuItem.tsx"],"names":["React","styled","COLORS","ComponentTextStyle","focusStyles","ComponentMStyling","Z_INDEXES","StyledSwitcherItem","div","Regular","neutral_600","active","neutral_800","primary_500","neutral_300","neutral_100","hover","primary_600","primary_20","primary_800","primary_100","A","a","SwitcherMenuItem","label","url","disabled","Icon","as","testId","window","location","href"],"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AAG,IAAI,EAArC;AAAA,KADX;AAEE,IAAA,EAAE,EAAEG,EAFN;AAGE,IAAA,IAAI,EAAEH,GAAG,IAAI,EAHf;AAIE,IAAA,MAAM,EAAC,SAJT;AAME,IAAA,SAAS,EAAEC,QAAQ,GAAG,UAAH,GAAgB,EANrC;AAOE,mBAAaG,MAPf;AAAA,eAQGF,IAAI,iBAAI,KAAC,IAAD;AAAM,MAAA,IAAI,EAAC,MAAX;AAAkB,MAAA,KAAK,EAAC;AAAxB,MARX,EASGH,KATH;AAAA,KAKOA,KALP,CADuB;AAAA,CAAzB;;AAcA,eAAeD,gBAAf","sourcesContent":["import * as React from 'react';\nimport styled from 'styled-components';\nimport {COLORS, ComponentTextStyle, focusStyles} from '../styles';\nimport {SwitcherNavItem} from '../types';\nimport {ComponentMStyling} from '../styles/typography';\nimport {Z_INDEXES} from '../styles/z-indexes';\n\nconst StyledSwitcherItem = styled.div`\n padding: 16px 25px;\n margin: 0 2px;\n\n display: flex;\n align-items: center;\n text-align: center;\n position: relative;\n\n ${ComponentMStyling(ComponentTextStyle.Regular, COLORS.neutral_600)}\n\n text-decoration: none;\n\n svg {\n margin-right: 16px;\n }\n\n &:after {\n content: '';\n display: block;\n position: absolute;\n left: 4px;\n top: 4px;\n bottom: 4px;\n width: 4px;\n background-color: transparent;\n border-radius: 2px;\n }\n\n &.active:not(.disabled) {\n z-index: ${Z_INDEXES.active};\n font-weight: bold;\n color: ${COLORS.neutral_800};\n\n &:after {\n background-color: ${COLORS.primary_500};\n }\n\n svg path {\n fill: ${COLORS.neutral_800};\n }\n }\n\n &.disabled {\n color: ${COLORS.neutral_300};\n background-color: ${COLORS.neutral_100};\n }\n\n &:hover:not(.disabled) {\n z-index: ${Z_INDEXES.hover};\n color: ${COLORS.primary_600};\n background-color: ${COLORS.primary_20};\n\n svg path {\n fill: ${COLORS.primary_600};\n }\n }\n\n &:active:not(.disabled) {\n z-index: ${Z_INDEXES.active};\n color: ${COLORS.primary_800};\n background-color: ${COLORS.primary_100};\n\n &:after {\n background-color: ${COLORS.primary_500};\n }\n\n svg path {\n fill: ${COLORS.primary_800};\n }\n }\n\n &:focus:not(.disabled) {\n ${focusStyles}\n }\n`;\n\nconst A = styled.a``;\n\nconst SwitcherMenuItem = ({ label, url, disabled, Icon, as = A, testId }: SwitcherNavItem) => (\n <StyledSwitcherItem\n onClick={() => (window.location.href = url || '')}\n as={as}\n href={url || ''}\n target=\"_parent\"\n key={label}\n className={disabled ? 'disabled' : ''}\n data-testid={testId}>\n {Icon && <Icon size=\"22px\" color=\"#666666\" />}\n {label}\n </StyledSwitcherItem>\n);\n\nexport default SwitcherMenuItem;\n"],"file":"SwitcherMenuItem.js"}
@@ -52,15 +52,15 @@ var StyledTableHeaderColumnContent = _styledComponents.default.div(_templateObje
52
52
 
53
53
  exports.StyledTableHeaderColumnContent = StyledTableHeaderColumnContent;
54
54
 
55
- var StyledTableHeaderColumn = _styledComponents.default.th(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n ", "\n position: relative;\n text-align: unset;\n background-color: ", ";\n\n //fixes header heights no idea why\n height: 1px;\n\n &.sortable {\n cursor: pointer;\n\n &:hover {\n background-color: ", ";\n color: ", ";\n z-index: ", ";\n }\n\n &:active {\n background-color: ", ";\n color: ", ";\n box-shadow: none !important;\n z-index: ", ";\n }\n\n &:focus {\n outline: none;\n box-shadow: 0 4px 12px ", ", 0 0 8px ", ";\n z-index: ", ";\n }\n }\n\n &.sortable ", " > svg {\n opacity: 0;\n }\n\n &.sortable.sorted ", " > svg {\n opacity: 1;\n }\n\n &.sorted {\n background-color: ", ";\n }\n"])), (0, _typography.ComponentSStyling)(_typography.ComponentTextStyle.Bold, _styles.COLORS.neutral_600), _styles.COLORS.white, _styles.COLORS.primary_20, _styles.COLORS.primary_700, _zIndexes.Z_INDEXES.hover, _styles.COLORS.primary_100, _styles.COLORS.primary_800, _zIndexes.Z_INDEXES.active, _styles.COLORS.focus_25, _styles.COLORS.focus, _zIndexes.Z_INDEXES.focus, StyledTableHeaderColumnContent, StyledTableHeaderColumnContent, _styles.COLORS.neutral_20);
55
+ var StyledTableHeaderColumn = _styledComponents.default.th(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n ", "\n position: relative;\n text-align: unset;\n background-color: ", ";\n\n //fixes header heights no idea why\n height: 1px;\n\n &.sortable {\n cursor: pointer;\n\n &:hover {\n background-color: ", ";\n color: ", ";\n z-index: ", ";\n }\n\n &:active {\n background-color: ", ";\n color: ", ";\n z-index: ", ";\n }\n\n &:focus {\n ", "\n }\n }\n\n &.sortable ", " > svg {\n opacity: 0;\n }\n\n &.sortable.sorted ", " > svg {\n opacity: 1;\n }\n\n &.sorted {\n background-color: ", ";\n }\n"])), (0, _typography.ComponentSStyling)(_typography.ComponentTextStyle.Bold, _styles.COLORS.neutral_600), _styles.COLORS.white, _styles.COLORS.primary_20, _styles.COLORS.primary_700, _zIndexes.Z_INDEXES.hover, _styles.COLORS.primary_100, _styles.COLORS.primary_800, _zIndexes.Z_INDEXES.active, _styles.focusStyles, StyledTableHeaderColumnContent, StyledTableHeaderColumnContent, _styles.COLORS.neutral_20);
56
56
 
57
57
  exports.StyledTableHeaderColumn = StyledTableHeaderColumn;
58
58
 
59
- var StyledTableBodyRow = _styledComponents.default.tr(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\n cursor: pointer;\n position: relative;\n outline: none;\n\n &.selected{\n background-color: ", ";\n }\n \n &:hover {\n background-color: ", ";\n z-index: ", ";\n }\n\n &:focus {\n background-color: ", ";\n box-shadow: 0px 4px 12px rgba(46, 127, 161, 0.25), 0px 0px 8px #2E7FA1;\n z-index: ", ";\n outline: none;\n }\n\n &:active {\n box-shadow: none;\n z-index: ", ";\n }\n\n"])), _styles.COLORS.primary_100, _styles.COLORS.primary_200, _zIndexes.Z_INDEXES.hover, _styles.COLORS.primary_200, _zIndexes.Z_INDEXES.focus, _zIndexes.Z_INDEXES.active);
59
+ var StyledTableBodyRow = _styledComponents.default.tr(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\n cursor: pointer;\n position: relative;\n outline: none;\n\n &.selected{\n background-color: ", ";\n }\n \n &:hover {\n background-color: ", ";\n z-index: ", ";\n }\n\n &:focus {\n ", "\n }\n\n &:active {\n z-index: ", ";\n }\n\n"])), _styles.COLORS.primary_100, _styles.COLORS.primary_200, _zIndexes.Z_INDEXES.hover, _styles.focusStyles, _zIndexes.Z_INDEXES.active);
60
60
 
61
61
  exports.StyledTableBodyRow = StyledTableBodyRow;
62
62
 
63
- var StyledTableBody = _styledComponents.default.tbody(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2.default)(["\n ", ":nth-child(odd):not(.selected):not(:hover):not(:focus):not(:active) {\n background-color: ", ";\n }\n\n ", ":nth-child(even):not(.selected):not(:hover):not(:focus):not(:active) {\n background-color: ", ";\n }\n"])), StyledTableBodyRow, _styles.COLORS.neutral_100, StyledTableBodyRow, _styles.COLORS.neutral_20);
63
+ var StyledTableBody = _styledComponents.default.tbody(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2.default)(["\n"])));
64
64
 
65
65
  exports.StyledTableBody = StyledTableBody;
66
66
 
@@ -100,7 +100,7 @@ var StyledTableSpinner = _styledComponents.default.div(_templateObject19 || (_te
100
100
 
101
101
  exports.StyledTableSpinner = StyledTableSpinner;
102
102
 
103
- var StyledTableFooterCollapseButton = _styledComponents.default.button(_templateObject20 || (_templateObject20 = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n border-bottom: 1px solid ", ";\n border-top: 1px solid ", ";\n border-left: none;\n border-right: none;\n box-sizing: border-box;\n min-height: 48px;\n display: flex;\n width: 100%;\n align-items: center;\n justify-content: center;\n gap: 4px;\n background: ", ";\n\n cursor: pointer;\n\n ", "\n \n &:focus {\n outline: none;\n z-index: ", ";\n color: ", ";\n box-shadow: 0px 4px 12px rgba(46, 127, 161, 0.25), 0px 0px 8px #2E7FA1;\n }\n\n &:hover {\n z-index: ", ";\n background: ", ";\n color: ", ";\n }\n\n &:active {\n box-shadow: none;\n z-index: ", ";\n background: ", ";\n color: ", ";\n }\n\n &:disabled {\n display: none;\n }\n\n"])), _styles.COLORS.neutral_200, _styles.COLORS.neutral_200, _styles.COLORS.white, (0, _typography.ComponentMStyling)(_typography.ComponentTextStyle.Bold, _styles.COLORS.neutral_600), _zIndexes.Z_INDEXES.focus, _styles.COLORS.neutral_600, _zIndexes.Z_INDEXES.hover, _styles.COLORS.primary_20, _styles.COLORS.primary_700, _zIndexes.Z_INDEXES.active, _styles.COLORS.primary_100, _styles.COLORS.primary_800);
103
+ var StyledTableFooterCollapseButton = _styledComponents.default.button(_templateObject20 || (_templateObject20 = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n border-bottom: 1px solid ", ";\n border-top: 1px solid ", ";\n border-left: none;\n border-right: none;\n box-sizing: border-box;\n min-height: 48px;\n display: flex;\n width: 100%;\n align-items: center;\n justify-content: center;\n gap: 4px;\n background: ", ";\n\n cursor: pointer;\n\n ", "\n \n &:focus {\n ", "\n }\n\n &:hover {\n z-index: ", ";\n background: ", ";\n color: ", ";\n }\n\n &:active {\n z-index: ", ";\n background: ", ";\n color: ", ";\n }\n\n &:disabled {\n display: none;\n }\n\n"])), _styles.COLORS.neutral_200, _styles.COLORS.neutral_200, _styles.COLORS.white, (0, _typography.ComponentMStyling)(_typography.ComponentTextStyle.Bold, _styles.COLORS.neutral_600), _styles.focusStyles, _zIndexes.Z_INDEXES.hover, _styles.COLORS.primary_20, _styles.COLORS.primary_700, _zIndexes.Z_INDEXES.active, _styles.COLORS.primary_100, _styles.COLORS.primary_800);
104
104
 
105
105
  exports.StyledTableFooterCollapseButton = StyledTableFooterCollapseButton;
106
106
  //# sourceMappingURL=TableStyles.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/Table/TableStyles.ts"],"names":["TableWrapper","styled","div","StyledTable","table","StyledTableHeader","thead","StyledTableHeaderTitle","tr","StyledTableHeaderTitleContent","COLORS","neutral_200","ComponentTextStyle","Bold","black","StyledTableHeaderColumns","StyledTableHeaderColumnContent","StyledTableHeaderColumn","th","neutral_600","white","primary_20","primary_700","Z_INDEXES","hover","primary_100","primary_800","active","focus_25","focus","neutral_20","StyledTableBodyRow","primary_200","StyledTableBody","tbody","neutral_100","StyledTableCell","td","StyledTableCellContent","Regular","StyledCheckBox","StyledTableCellIcon","neutral_700","StyledTableCellText","span","StyledTableFooter","tfoot","StyledTableFooterContent","StyledTableFooterCurrentInfo","StyledTableFooterControls","StyledTableSpinner","backdrop","StyledTableFooterCollapseButton","button"],"mappings":";;;;;;;;;;;AAGA;;AAKA;;AACA;;AAOA;;AACA;;;;AAEA;AACA;AACA;AAEO,IAAMA,YAAY,GAAGC,0BAAOC,GAAV,4GAAlB;;;;AAKA,IAAMC,WAAW,GAAGF,0BAAOG,KAAV,6NAAjB;;;;AAaA,IAAMC,iBAAiB,GAAGJ,0BAAOK,KAAV,uFAAvB;;;;AAGA,IAAMC,sBAAsB,GAAGN,0BAAOO,EAAV,uFAA5B;;;;AAGA,IAAMC,6BAA6B,GAAGR,0BAAOC,GAAV,oXAObQ,eAAOC,WAPM,EAQhBD,eAAOC,WARS,EAWtC,mCAAkBC,+BAAmBC,IAArC,EAA2CH,eAAOI,KAAlD,CAXsC,CAAnC;;;;AAiBA,IAAMC,wBAAwB,GAAGd,0BAAOO,EAAV,uFAA9B;;;;AAGA,IAAMQ,8BAA8B,GAAGf,0BAAOC,GAAV,2TAQjBQ,eAAOC,WARU,EASdD,eAAOC,WATO,CAApC;;;;AAYA,IAAMM,uBAAuB,GAAGhB,0BAAOiB,EAAV,ywBAChC,mCAAkBN,+BAAmBC,IAArC,EAA2CH,eAAOS,WAAlD,CADgC,EAIdT,eAAOU,KAJO,EAaVV,eAAOW,UAbG,EAcrBX,eAAOY,WAdc,EAenBC,oBAAUC,KAfS,EAmBVd,eAAOe,WAnBG,EAoBrBf,eAAOgB,WApBc,EAsBnBH,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BqB,oBAAU4B,QANQ,CAAxB;;;;AASA,IAAMC,+BAA+B,GAAGnD,0BAAOoD,MAAV,2yBAEf3C,eAAOC,WAFQ,EAGlBD,eAAOC,WAHW,EAa5BD,eAAOU,KAbqB,EAiBxC,mCAAkBR,+BAAmBC,IAArC,EAA2CH,eAAOS,WAAlD,CAjBwC,EAqB7BI,oBAAUM,KArBmB,EAsB/BnB,eAAOS,WAtBwB,EA2B7BI,oBAAUC,KA3BmB,EA4B1Bd,eAAOW,UA5BmB,EA6B/BX,eAAOY,WA7BwB,EAkC7BC,oBAAUI,MAlCmB,EAmC1BjB,eAAOe,WAnCmB,EAoC/Bf,eAAOgB,WApCwB,CAArC","sourcesContent":["/**\n * Import third-party libraries.\n */\nimport styled from 'styled-components';\n\n/**\n * Import custom style properties.\n */\nimport {COLORS} from '../styles';\nimport {\n ComponentLStyling,\n ComponentMStyling,\n ComponentSStyling,\n ComponentTextStyle,\n ComponentXSStyling\n} from '../styles/typography';\nimport {Z_INDEXES} from '../styles/z-indexes';\nimport {StyledCheckBox} from '../InputFields/Checkbox';\n\n/**\n * Table styles\n */\n\nexport const TableWrapper = styled.div`\n position: relative;\n`;\n\n\nexport const StyledTable = styled.table`\n background: transparent;\n width: 100%;\n\n &.fixed {\n table-layout: fixed;\n }\n\n &.auto {\n table-layout: auto;\n }\n`;\n\nexport const StyledTableHeader = styled.thead`\n`;\n\nexport const StyledTableHeaderTitle = styled.tr`\n`;\n\nexport const StyledTableHeaderTitleContent = styled.div`\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n box-sizing: border-box;\n min-height: 56px;\n border-bottom: 1px solid ${COLORS.neutral_200};\n border-top: 2px solid ${COLORS.neutral_200};\n padding: 0 16px;\n\n ${ComponentLStyling(ComponentTextStyle.Bold, COLORS.black)}\n .title-menu {\n margin-right: -16px;\n }\n`;\n\nexport const StyledTableHeaderColumns = styled.tr`\n`;\n\nexport const StyledTableHeaderColumnContent = styled.div`\n box-sizing: border-box;\n min-height: 56px;\n padding: 0 16px;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: space-between;\n border-top: 1px solid ${COLORS.neutral_200};\n border-bottom: 1px solid ${COLORS.neutral_200};\n`;\n\nexport const StyledTableHeaderColumn = styled.th`\n ${ComponentSStyling(ComponentTextStyle.Bold, COLORS.neutral_600)}\n position: relative;\n text-align: unset;\n background-color: ${COLORS.white};\n\n //fixes header heights no idea why\n height: 1px;\n\n &.sortable {\n cursor: pointer;\n\n &:hover {\n background-color: ${COLORS.primary_20};\n color: ${COLORS.primary_700};\n z-index: ${Z_INDEXES.hover};\n }\n\n &:active {\n background-color: ${COLORS.primary_100};\n color: ${COLORS.primary_800};\n box-shadow: none !important;\n z-index: ${Z_INDEXES.active};\n }\n\n &:focus {\n outline: none;\n box-shadow: 0 4px 12px ${COLORS.focus_25}, 0 0 8px ${COLORS.focus};\n z-index: ${Z_INDEXES.focus};\n }\n }\n\n &.sortable ${StyledTableHeaderColumnContent} > svg {\n opacity: 0;\n }\n\n &.sortable.sorted ${StyledTableHeaderColumnContent} > svg {\n opacity: 1;\n }\n\n &.sorted {\n background-color: ${COLORS.neutral_20};\n }\n`;\n\nexport const StyledTableBodyRow = styled.tr`\n cursor: pointer;\n position: relative;\n outline: none;\n\n &.selected{\n background-color: ${COLORS.primary_100};\n }\n \n &:hover {\n background-color: ${COLORS.primary_200};\n z-index: ${Z_INDEXES.hover};\n }\n\n &:focus {\n background-color: ${COLORS.primary_200};\n box-shadow: 0px 4px 12px rgba(46, 127, 161, 0.25), 0px 0px 8px #2E7FA1;\n z-index: ${Z_INDEXES.focus};\n outline: none;\n }\n\n &:active {\n box-shadow: none;\n z-index: ${Z_INDEXES.active};\n }\n\n`;\n\nexport const StyledTableBody = styled.tbody`\n ${StyledTableBodyRow}:nth-child(odd):not(.selected):not(:hover):not(:focus):not(:active) {\n background-color: ${COLORS.neutral_100};\n }\n\n ${StyledTableBodyRow}:nth-child(even):not(.selected):not(:hover):not(:focus):not(:active) {\n background-color: ${COLORS.neutral_20};\n }\n`;\n\n\nexport const StyledTableCell = styled.td``;\n\nexport const StyledTableCellContent = styled.div`\n min-height: 48px;\n\n padding: 0 16px;\n ${ComponentSStyling(ComponentTextStyle.Regular, COLORS.black)}\n\n display: flex;\n align-items: center;\n justify-content: left;\n gap: 8px;\n\n &.truncate-text,\n &.truncate-text span {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n &.left {\n justify-content: left;\n }\n\n &.right {\n justify-content: right;\n }\n\n &.center {\n justify-content: center;\n }\n\n a:first-letter,\n span:first-letter {\n text-transform: uppercase;\n }\n \n ${StyledCheckBox}{\n width: fit-content;\n }\n`;\n\nexport const StyledTableCellIcon = styled.div`\n color: ${COLORS.neutral_700};\n width: 24px;\n height: 24px;\n\n svg {\n color: ${COLORS.neutral_700};\n width: 24px;\n height: 24px;\n }\n`;\n\nexport const StyledTableCellText = styled.span`\n padding: 12px 0;\n`;\n\n\nexport const StyledTableFooter = styled.tfoot`\n`;\n\nexport const StyledTableFooterContent = styled.div`\n border-top: 2px solid ${COLORS.neutral_200};\n border-bottom: 1px solid ${COLORS.neutral_200};\n box-sizing: border-box;\n min-height: 56px;\n\n display: flex;\n align-items: center;\n justify-content: right;\n\n`;\n\nexport const StyledTableFooterCurrentInfo = styled.span`\n padding: 0 16px;\n ${ComponentXSStyling(ComponentTextStyle.Regular, COLORS.black)}\n`;\n\nexport const StyledTableFooterControls = styled.div`\n display: flex;\n`;\n\nexport const StyledTableSpinner = styled.div`\n height: 100%;\n width: 100%;\n position: absolute;\n background-color: rgba(0, 0, 0, 0.5);\n top: 0;\n z-index: ${Z_INDEXES.backdrop};\n`;\n\nexport const StyledTableFooterCollapseButton = styled.button`\n position: relative;\n border-bottom: 1px solid ${COLORS.neutral_200};\n border-top: 1px solid ${COLORS.neutral_200};\n border-left: none;\n border-right: none;\n box-sizing: border-box;\n min-height: 48px;\n display: flex;\n width: 100%;\n align-items: center;\n justify-content: center;\n gap: 4px;\n background: ${COLORS.white};\n\n cursor: pointer;\n\n ${ComponentMStyling(ComponentTextStyle.Bold, COLORS.neutral_600)}\n \n &:focus {\n outline: none;\n z-index: ${Z_INDEXES.focus};\n color: ${COLORS.neutral_600};\n box-shadow: 0px 4px 12px rgba(46, 127, 161, 0.25), 0px 0px 8px #2E7FA1;\n }\n\n &:hover {\n z-index: ${Z_INDEXES.hover};\n background: ${COLORS.primary_20};\n color: ${COLORS.primary_700};\n }\n\n &:active {\n box-shadow: none;\n z-index: ${Z_INDEXES.active};\n background: ${COLORS.primary_100};\n color: ${COLORS.primary_800};\n }\n\n &:disabled {\n display: none;\n }\n\n`;\n"],"file":"TableStyles.cjs"}
1
+ {"version":3,"sources":["../../src/Table/TableStyles.ts"],"names":["TableWrapper","styled","div","StyledTable","table","StyledTableHeader","thead","StyledTableHeaderTitle","tr","StyledTableHeaderTitleContent","COLORS","neutral_200","ComponentTextStyle","Bold","black","StyledTableHeaderColumns","StyledTableHeaderColumnContent","StyledTableHeaderColumn","th","neutral_600","white","primary_20","primary_700","Z_INDEXES","hover","primary_100","primary_800","active","focusStyles","neutral_20","StyledTableBodyRow","primary_200","StyledTableBody","tbody","StyledTableCell","td","StyledTableCellContent","Regular","StyledCheckBox","StyledTableCellIcon","neutral_700","StyledTableCellText","span","StyledTableFooter","tfoot","StyledTableFooterContent","StyledTableFooterCurrentInfo","StyledTableFooterControls","StyledTableSpinner","backdrop","StyledTableFooterCollapseButton","button"],"mappings":";;;;;;;;;;;AAGA;;AAKA;;AACA;;AAOA;;AACA;;;;AAEA;AACA;AACA;AAEO,IAAMA,YAAY,GAAGC,0BAAOC,GAAV,4GAAlB;;;;AAKA,IAAMC,WAAW,GAAGF,0BAAOG,KAAV,6NAAjB;;;;AAaA,IAAMC,iBAAiB,GAAGJ,0BAAOK,KAAV,uFAAvB;;;;AAGA,IAAMC,sBAAsB,GAAGN,0BAAOO,EAAV,uFAA5B;;;;AAGA,IAAMC,6BAA6B,GAAGR,0BAAOC,GAAV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O2C,KAAV,yFAAvB;;;;AAGA,IAAMC,wBAAwB,GAAG5C,0BAAOC,GAAV,oRACXQ,eAAOC,WADI,EAERD,eAAOC,WAFC,CAA9B;;;;AAYA,IAAMmC,4BAA4B,GAAG7C,0BAAOyC,IAAV,sHAErC,oCAAmB9B,+BAAmByB,OAAtC,EAA+C3B,eAAOI,KAAtD,CAFqC,CAAlC;;;;AAKA,IAAMiC,yBAAyB,GAAG9C,0BAAOC,GAAV,2GAA/B;;;;AAIA,IAAM8C,kBAAkB,GAAG/C,0BAAOC,GAAV,wNAMlBqB,oBAAU0B,QANQ,CAAxB;;;;AASA,IAAMC,+BAA+B,GAAGjD,0BAAOkD,MAAV,upBAEfzC,eAAOC,WAFQ,EAGlBD,eAAOC,WAHW,EAa5BD,eAAOU,KAbqB,EAiBxC,mCAAkBR,+BAAmBC,IAArC,EAA2CH,eAAOS,WAAlD,CAjBwC,EAoBtCS,mBApBsC,EAwB7BL,oBAAUC,KAxBmB,EAyB1Bd,eAAOW,UAzBmB,EA0B/BX,eAAOY,WA1BwB,EA8B7BC,oBAAUI,MA9BmB,EA+B1BjB,eAAOe,WA/BmB,EAgC/Bf,eAAOgB,WAhCwB,CAArC","sourcesContent":["/**\n * Import third-party libraries.\n */\nimport styled from 'styled-components';\n\n/**\n * Import custom style properties.\n */\nimport {COLORS, focusStyles} from '../styles';\nimport {\n ComponentLStyling,\n ComponentMStyling,\n ComponentSStyling,\n ComponentTextStyle,\n ComponentXSStyling\n} from '../styles/typography';\nimport {Z_INDEXES} from '../styles/z-indexes';\nimport {StyledCheckBox} from '../InputFields/Checkbox';\n\n/**\n * Table styles\n */\n\nexport const TableWrapper = styled.div`\n position: relative;\n`;\n\n\nexport const StyledTable = styled.table`\n background: transparent;\n width: 100%;\n\n &.fixed {\n table-layout: fixed;\n }\n\n &.auto {\n table-layout: auto;\n }\n`;\n\nexport const StyledTableHeader = styled.thead`\n`;\n\nexport const StyledTableHeaderTitle = styled.tr`\n`;\n\nexport const StyledTableHeaderTitleContent = styled.div`\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n box-sizing: border-box;\n min-height: 56px;\n border-bottom: 1px solid ${COLORS.neutral_200};\n border-top: 2px solid ${COLORS.neutral_200};\n padding: 0 16px;\n\n ${ComponentLStyling(ComponentTextStyle.Bold, COLORS.black)}\n .title-menu {\n margin-right: -16px;\n }\n`;\n\nexport const StyledTableHeaderColumns = styled.tr`\n`;\n\nexport const StyledTableHeaderColumnContent = styled.div`\n box-sizing: border-box;\n min-height: 56px;\n padding: 0 16px;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: space-between;\n border-top: 1px solid ${COLORS.neutral_200};\n border-bottom: 1px solid ${COLORS.neutral_200};\n`;\n\nexport const StyledTableHeaderColumn = styled.th`\n ${ComponentSStyling(ComponentTextStyle.Bold, COLORS.neutral_600)}\n position: relative;\n text-align: unset;\n background-color: ${COLORS.white};\n\n //fixes header heights no idea why\n height: 1px;\n\n &.sortable {\n cursor: pointer;\n\n &:hover {\n background-color: ${COLORS.primary_20};\n color: ${COLORS.primary_700};\n z-index: ${Z_INDEXES.hover};\n }\n\n &:active {\n background-color: ${COLORS.primary_100};\n color: ${COLORS.primary_800};\n z-index: ${Z_INDEXES.active};\n }\n\n &:focus {\n ${focusStyles}\n }\n }\n\n &.sortable ${StyledTableHeaderColumnContent} > svg {\n opacity: 0;\n }\n\n &.sortable.sorted ${StyledTableHeaderColumnContent} > svg {\n opacity: 1;\n }\n\n &.sorted {\n background-color: ${COLORS.neutral_20};\n }\n`;\n\nexport const StyledTableBodyRow = styled.tr`\n cursor: pointer;\n position: relative;\n outline: none;\n\n &.selected{\n background-color: ${COLORS.primary_100};\n }\n \n &:hover {\n background-color: ${COLORS.primary_200};\n z-index: ${Z_INDEXES.hover};\n }\n\n &:focus {\n ${focusStyles}\n }\n\n &:active {\n z-index: ${Z_INDEXES.active};\n }\n\n`;\n\nexport const StyledTableBody = styled.tbody`\n`;\n\n\nexport const StyledTableCell = styled.td``;\n\nexport const StyledTableCellContent = styled.div`\n min-height: 48px;\n\n padding: 0 16px;\n ${ComponentSStyling(ComponentTextStyle.Regular, COLORS.black)}\n\n display: flex;\n align-items: center;\n justify-content: left;\n gap: 8px;\n\n &.truncate-text,\n &.truncate-text span {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n &.left {\n justify-content: left;\n }\n\n &.right {\n justify-content: right;\n }\n\n &.center {\n justify-content: center;\n }\n\n a:first-letter,\n span:first-letter {\n text-transform: uppercase;\n }\n \n ${StyledCheckBox}{\n width: fit-content;\n }\n`;\n\nexport const StyledTableCellIcon = styled.div`\n color: ${COLORS.neutral_700};\n width: 24px;\n height: 24px;\n\n svg {\n color: ${COLORS.neutral_700};\n width: 24px;\n height: 24px;\n }\n`;\n\nexport const StyledTableCellText = styled.span`\n padding: 12px 0;\n`;\n\n\nexport const StyledTableFooter = styled.tfoot`\n`;\n\nexport const StyledTableFooterContent = styled.div`\n border-top: 2px solid ${COLORS.neutral_200};\n border-bottom: 1px solid ${COLORS.neutral_200};\n box-sizing: border-box;\n min-height: 56px;\n\n display: flex;\n align-items: center;\n justify-content: right;\n\n`;\n\nexport const StyledTableFooterCurrentInfo = styled.span`\n padding: 0 16px;\n ${ComponentXSStyling(ComponentTextStyle.Regular, COLORS.black)}\n`;\n\nexport const StyledTableFooterControls = styled.div`\n display: flex;\n`;\n\nexport const StyledTableSpinner = styled.div`\n height: 100%;\n width: 100%;\n position: absolute;\n background-color: rgba(0, 0, 0, 0.5);\n top: 0;\n z-index: ${Z_INDEXES.backdrop};\n`;\n\nexport const StyledTableFooterCollapseButton = styled.button`\n position: relative;\n border-bottom: 1px solid ${COLORS.neutral_200};\n border-top: 1px solid ${COLORS.neutral_200};\n border-left: none;\n border-right: none;\n box-sizing: border-box;\n min-height: 48px;\n display: flex;\n width: 100%;\n align-items: center;\n justify-content: center;\n gap: 4px;\n background: ${COLORS.white};\n\n cursor: pointer;\n\n ${ComponentMStyling(ComponentTextStyle.Bold, COLORS.neutral_600)}\n \n &:focus {\n ${focusStyles}\n }\n\n &:hover {\n z-index: ${Z_INDEXES.hover};\n background: ${COLORS.primary_20};\n color: ${COLORS.primary_700};\n }\n\n &:active {\n z-index: ${Z_INDEXES.active};\n background: ${COLORS.primary_100};\n color: ${COLORS.primary_800};\n }\n\n &:disabled {\n display: none;\n }\n\n`;\n"],"file":"TableStyles.cjs"}