@laerdal/life-react-components 2.3.1-dev.1.full → 2.3.1-dev.10

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 (250) hide show
  1. package/dist/Accordion/AccordionItem.cjs +2 -1
  2. package/dist/Accordion/AccordionItem.cjs.map +1 -1
  3. package/dist/Accordion/AccordionItem.js +2 -1
  4. package/dist/Accordion/AccordionItem.js.map +1 -1
  5. package/dist/Accordion/ContentAccordion.cjs +3 -5
  6. package/dist/Accordion/ContentAccordion.cjs.map +1 -1
  7. package/dist/Accordion/ContentAccordion.d.ts +1 -1
  8. package/dist/Accordion/ContentAccordion.js +3 -5
  9. package/dist/Accordion/ContentAccordion.js.map +1 -1
  10. package/dist/Accordion/styles.cjs +8 -4
  11. package/dist/Accordion/styles.cjs.map +1 -1
  12. package/dist/Accordion/styles.js +8 -4
  13. package/dist/Accordion/styles.js.map +1 -1
  14. package/dist/AuthPage/AuthPage.cjs +21 -43
  15. package/dist/AuthPage/AuthPage.cjs.map +1 -1
  16. package/dist/AuthPage/AuthPage.d.ts +4 -28
  17. package/dist/AuthPage/AuthPage.js +21 -44
  18. package/dist/AuthPage/AuthPage.js.map +1 -1
  19. package/dist/AuthPage/ScreenSetsContainer.cjs +2 -3
  20. package/dist/AuthPage/ScreenSetsContainer.cjs.map +1 -1
  21. package/dist/AuthPage/ScreenSetsContainer.js +2 -3
  22. package/dist/AuthPage/ScreenSetsContainer.js.map +1 -1
  23. package/dist/AuthPage/index.cjs +0 -38
  24. package/dist/AuthPage/index.cjs.map +1 -1
  25. package/dist/AuthPage/index.d.ts +1 -3
  26. package/dist/AuthPage/index.js +1 -3
  27. package/dist/AuthPage/index.js.map +1 -1
  28. package/dist/Banners/Banner.cjs +1 -1
  29. package/dist/Banners/Banner.cjs.map +1 -1
  30. package/dist/Banners/Banner.js +1 -1
  31. package/dist/Banners/Banner.js.map +1 -1
  32. package/dist/Banners/OverviewBanner.cjs +1 -2
  33. package/dist/Banners/OverviewBanner.cjs.map +1 -1
  34. package/dist/Banners/OverviewBanner.js +1 -2
  35. package/dist/Banners/OverviewBanner.js.map +1 -1
  36. package/dist/Button/Iconbutton.cjs.map +1 -1
  37. package/dist/Button/Iconbutton.d.ts +1 -1
  38. package/dist/Button/Iconbutton.js.map +1 -1
  39. package/dist/Card/HorizontalCard/types.cjs.map +1 -1
  40. package/dist/Card/HorizontalCard/types.d.ts +1 -1
  41. package/dist/Card/HorizontalCard/types.js.map +1 -1
  42. package/dist/Dropdown/BasicDropdown.cjs +17 -5
  43. package/dist/Dropdown/BasicDropdown.cjs.map +1 -1
  44. package/dist/Dropdown/BasicDropdown.d.ts +1 -0
  45. package/dist/Dropdown/BasicDropdown.js +17 -5
  46. package/dist/Dropdown/BasicDropdown.js.map +1 -1
  47. package/dist/Dropdown/CommonStyling.cjs +6 -3
  48. package/dist/Dropdown/CommonStyling.cjs.map +1 -1
  49. package/dist/Dropdown/CommonStyling.d.ts +3 -1
  50. package/dist/Dropdown/CommonStyling.js +6 -3
  51. package/dist/Dropdown/CommonStyling.js.map +1 -1
  52. package/dist/Dropdown/DropdownContent.cjs +1 -1
  53. package/dist/Dropdown/DropdownContent.js +1 -1
  54. package/dist/Dropdown/DropdownFilter.cjs +11 -1
  55. package/dist/Dropdown/DropdownFilter.cjs.map +1 -1
  56. package/dist/Dropdown/DropdownFilter.js +11 -1
  57. package/dist/Dropdown/DropdownFilter.js.map +1 -1
  58. package/dist/Footer/Components/FooterNavSection.cjs +1 -1
  59. package/dist/Footer/Components/FooterNavSection.cjs.map +1 -1
  60. package/dist/Footer/Components/FooterNavSection.js +1 -1
  61. package/dist/Footer/Components/FooterNavSection.js.map +1 -1
  62. package/dist/Footer/Components/FooterNewsletterAndSocialSection.cjs.map +1 -1
  63. package/dist/Footer/Components/FooterNewsletterAndSocialSection.js.map +1 -1
  64. package/dist/Footer/SiteFooter.cjs +30 -19
  65. package/dist/Footer/SiteFooter.cjs.map +1 -1
  66. package/dist/Footer/SiteFooter.d.ts +3 -1
  67. package/dist/Footer/SiteFooter.js +31 -19
  68. package/dist/Footer/SiteFooter.js.map +1 -1
  69. package/dist/GlobalNavigationBar/GlobalNavigationBar.cjs +15 -8
  70. package/dist/GlobalNavigationBar/GlobalNavigationBar.cjs.map +1 -1
  71. package/dist/GlobalNavigationBar/GlobalNavigationBar.d.ts +2 -1
  72. package/dist/GlobalNavigationBar/GlobalNavigationBar.js +15 -8
  73. package/dist/GlobalNavigationBar/GlobalNavigationBar.js.map +1 -1
  74. package/dist/GlobalNavigationBar/Logo.cjs +3 -3
  75. package/dist/GlobalNavigationBar/Logo.cjs.map +1 -1
  76. package/dist/GlobalNavigationBar/Logo.js +3 -3
  77. package/dist/GlobalNavigationBar/Logo.js.map +1 -1
  78. package/dist/GlobalNavigationBar/desktop/DesktopActions.cjs +1 -1
  79. package/dist/GlobalNavigationBar/desktop/DesktopActions.cjs.map +1 -1
  80. package/dist/GlobalNavigationBar/desktop/DesktopActions.js +1 -1
  81. package/dist/GlobalNavigationBar/desktop/DesktopActions.js.map +1 -1
  82. package/dist/GlobalNavigationBar/desktop/ExtendedMainMenu.cjs +6 -1
  83. package/dist/GlobalNavigationBar/desktop/ExtendedMainMenu.cjs.map +1 -1
  84. package/dist/GlobalNavigationBar/desktop/ExtendedMainMenu.d.ts +4 -0
  85. package/dist/GlobalNavigationBar/desktop/ExtendedMainMenu.js +5 -4
  86. package/dist/GlobalNavigationBar/desktop/ExtendedMainMenu.js.map +1 -1
  87. package/dist/GlobalNavigationBar/desktop/MainMenu.cjs +146 -56
  88. package/dist/GlobalNavigationBar/desktop/MainMenu.cjs.map +1 -1
  89. package/dist/GlobalNavigationBar/desktop/MainMenu.d.ts +2 -2
  90. package/dist/GlobalNavigationBar/desktop/MainMenu.js +146 -56
  91. package/dist/GlobalNavigationBar/desktop/MainMenu.js.map +1 -1
  92. package/dist/GlobalNavigationBar/desktop/RightSideNav.cjs +1 -1
  93. package/dist/GlobalNavigationBar/desktop/RightSideNav.cjs.map +1 -1
  94. package/dist/GlobalNavigationBar/desktop/RightSideNav.js +1 -1
  95. package/dist/GlobalNavigationBar/desktop/RightSideNav.js.map +1 -1
  96. package/dist/GlobalNavigationBar/desktop/SubMenu.cjs +176 -0
  97. package/dist/GlobalNavigationBar/desktop/SubMenu.cjs.map +1 -0
  98. package/dist/GlobalNavigationBar/desktop/SubMenu.d.ts +18 -0
  99. package/dist/GlobalNavigationBar/desktop/SubMenu.js +166 -0
  100. package/dist/GlobalNavigationBar/desktop/SubMenu.js.map +1 -0
  101. package/dist/GlobalNavigationBar/desktop/UserMenu.cjs.map +1 -1
  102. package/dist/GlobalNavigationBar/desktop/UserMenu.js.map +1 -1
  103. package/dist/GlobalNavigationBar/mobile/CommonStyles.cjs +2 -2
  104. package/dist/GlobalNavigationBar/mobile/CommonStyles.cjs.map +1 -1
  105. package/dist/GlobalNavigationBar/mobile/CommonStyles.js +3 -5
  106. package/dist/GlobalNavigationBar/mobile/CommonStyles.js.map +1 -1
  107. package/dist/GlobalNavigationBar/mobile/MobileMenuContent.cjs +1 -1
  108. package/dist/GlobalNavigationBar/mobile/MobileMenuContent.cjs.map +1 -1
  109. package/dist/GlobalNavigationBar/mobile/MobileMenuContent.js +2 -2
  110. package/dist/GlobalNavigationBar/mobile/MobileMenuContent.js.map +1 -1
  111. package/dist/GlobalNavigationBar/types.cjs.map +1 -1
  112. package/dist/GlobalNavigationBar/types.d.ts +12 -2
  113. package/dist/GlobalNavigationBar/types.js.map +1 -1
  114. package/dist/GlobalNavigationBar/utils.cjs +17 -0
  115. package/dist/GlobalNavigationBar/utils.cjs.map +1 -0
  116. package/dist/GlobalNavigationBar/utils.d.ts +2 -0
  117. package/dist/GlobalNavigationBar/utils.js +10 -0
  118. package/dist/GlobalNavigationBar/utils.js.map +1 -0
  119. package/dist/InputFields/DatepickerField.cjs +18 -5
  120. package/dist/InputFields/DatepickerField.cjs.map +1 -1
  121. package/dist/InputFields/DatepickerField.d.ts +1 -1
  122. package/dist/InputFields/DatepickerField.js +18 -5
  123. package/dist/InputFields/DatepickerField.js.map +1 -1
  124. package/dist/InputFields/DatepickerFieldHeader.cjs.map +1 -1
  125. package/dist/InputFields/DatepickerFieldHeader.js.map +1 -1
  126. package/dist/InputFields/NumberField.cjs +14 -4
  127. package/dist/InputFields/NumberField.cjs.map +1 -1
  128. package/dist/InputFields/NumberField.d.ts +1 -1
  129. package/dist/InputFields/NumberField.js +14 -4
  130. package/dist/InputFields/NumberField.js.map +1 -1
  131. package/dist/InputFields/PasswordField.d.ts +1 -1
  132. package/dist/InputFields/TextField.cjs +12 -3
  133. package/dist/InputFields/TextField.cjs.map +1 -1
  134. package/dist/InputFields/TextField.d.ts +1 -1
  135. package/dist/InputFields/TextField.js +12 -3
  136. package/dist/InputFields/TextField.js.map +1 -1
  137. package/dist/InputFields/styling.cjs +7 -3
  138. package/dist/InputFields/styling.cjs.map +1 -1
  139. package/dist/InputFields/styling.d.ts +1 -0
  140. package/dist/InputFields/styling.js +7 -3
  141. package/dist/InputFields/styling.js.map +1 -1
  142. package/dist/Layouts/index.cjs +18 -12
  143. package/dist/Layouts/index.cjs.map +1 -1
  144. package/dist/Layouts/index.d.ts +1 -1
  145. package/dist/Layouts/index.js +17 -10
  146. package/dist/Layouts/index.js.map +1 -1
  147. package/dist/NavItem/NavItem.cjs +4 -7
  148. package/dist/NavItem/NavItem.cjs.map +1 -1
  149. package/dist/NavItem/NavItem.d.ts +1 -0
  150. package/dist/NavItem/NavItem.js +3 -7
  151. package/dist/NavItem/NavItem.js.map +1 -1
  152. package/dist/NavItem/NestedNavItem.cjs +38 -0
  153. package/dist/NavItem/NestedNavItem.cjs.map +1 -0
  154. package/dist/NavItem/NestedNavItem.d.ts +13 -0
  155. package/dist/NavItem/NestedNavItem.js +28 -0
  156. package/dist/NavItem/NestedNavItem.js.map +1 -0
  157. package/dist/Paginator/Paginator.cjs.map +1 -1
  158. package/dist/Paginator/Paginator.js.map +1 -1
  159. package/dist/Panel/Panel.cjs +138 -0
  160. package/dist/Panel/Panel.cjs.map +1 -0
  161. package/dist/Panel/Panel.d.ts +29 -0
  162. package/dist/Panel/Panel.js +131 -0
  163. package/dist/Panel/Panel.js.map +1 -0
  164. package/dist/Panel/index.cjs +17 -0
  165. package/dist/Panel/index.cjs.map +1 -0
  166. package/dist/Panel/index.d.ts +1 -0
  167. package/dist/Panel/index.js +2 -0
  168. package/dist/Panel/index.js.map +1 -0
  169. package/dist/Table/Table.cjs +1 -1
  170. package/dist/Table/Table.js +1 -1
  171. package/dist/Table/TableFooter.cjs.map +1 -1
  172. package/dist/Table/TableFooter.js.map +1 -1
  173. package/dist/Tabs/TabLink.cjs +39 -14
  174. package/dist/Tabs/TabLink.cjs.map +1 -1
  175. package/dist/Tabs/TabLink.d.ts +6 -1
  176. package/dist/Tabs/TabLink.js +39 -14
  177. package/dist/Tabs/TabLink.js.map +1 -1
  178. package/dist/Tabs/VerticalTabs.cjs +2 -0
  179. package/dist/Tabs/VerticalTabs.cjs.map +1 -1
  180. package/dist/Tabs/VerticalTabs.d.ts +1 -0
  181. package/dist/Tabs/VerticalTabs.js +2 -0
  182. package/dist/Tabs/VerticalTabs.js.map +1 -1
  183. package/dist/Tile/TileHeader.cjs +3 -3
  184. package/dist/Tile/TileHeader.cjs.map +1 -1
  185. package/dist/Tile/TileHeader.js +3 -3
  186. package/dist/Tile/TileHeader.js.map +1 -1
  187. package/dist/Tooltips/TooltipOverflow.cjs +117 -0
  188. package/dist/Tooltips/TooltipOverflow.cjs.map +1 -0
  189. package/dist/Tooltips/TooltipOverflow.d.ts +10 -0
  190. package/dist/Tooltips/TooltipOverflow.js +107 -0
  191. package/dist/Tooltips/TooltipOverflow.js.map +1 -0
  192. package/dist/Tooltips/TooltipStyles.cjs +5 -2
  193. package/dist/Tooltips/TooltipStyles.cjs.map +1 -1
  194. package/dist/Tooltips/TooltipStyles.d.ts +1 -0
  195. package/dist/Tooltips/TooltipStyles.js +5 -2
  196. package/dist/Tooltips/TooltipStyles.js.map +1 -1
  197. package/dist/assets/index.cjs.map +1 -1
  198. package/dist/assets/index.js.map +1 -1
  199. package/dist/common/ActionWithin.cjs +1 -1
  200. package/dist/common/ActionWithin.js +1 -1
  201. package/dist/common/FocusVisible.cjs +1 -1
  202. package/dist/common/FocusVisible.js +1 -1
  203. package/dist/common/NavigationHelper.cjs +2 -3
  204. package/dist/common/NavigationHelper.cjs.map +1 -1
  205. package/dist/common/NavigationHelper.js +1 -2
  206. package/dist/common/NavigationHelper.js.map +1 -1
  207. package/dist/icons/systemicons/LoadingMedium.cjs.map +1 -1
  208. package/dist/icons/systemicons/LoadingMedium.js.map +1 -1
  209. package/dist/icons/systemicons/LoadingSmall.cjs.map +1 -1
  210. package/dist/icons/systemicons/LoadingSmall.js.map +1 -1
  211. package/dist/index.cjs +12 -0
  212. package/dist/index.cjs.map +1 -1
  213. package/dist/index.d.ts +1 -0
  214. package/dist/index.js +1 -0
  215. package/dist/index.js.map +1 -1
  216. package/dist/styles/breakpoints.cjs +2 -4
  217. package/dist/styles/breakpoints.cjs.map +1 -1
  218. package/dist/styles/breakpoints.d.ts +0 -2
  219. package/dist/styles/breakpoints.js +2 -4
  220. package/dist/styles/breakpoints.js.map +1 -1
  221. package/dist/styles/global.cjs +2 -1
  222. package/dist/styles/global.cjs.map +1 -1
  223. package/dist/styles/global.js +2 -1
  224. package/dist/styles/global.js.map +1 -1
  225. package/dist/styles/index.cjs +11 -259
  226. package/dist/styles/index.cjs.map +1 -1
  227. package/dist/styles/index.d.ts +1 -12
  228. package/dist/styles/index.js +1 -12
  229. package/dist/styles/index.js.map +1 -1
  230. package/dist/styles/typography.cjs +53 -301
  231. package/dist/styles/typography.cjs.map +1 -1
  232. package/dist/styles/typography.d.ts +7 -45
  233. package/dist/styles/typography.js +45 -281
  234. package/dist/styles/typography.js.map +1 -1
  235. package/package.json +3 -1
  236. package/dist/AuthPage/Information.cjs +0 -26
  237. package/dist/AuthPage/Information.cjs.map +0 -1
  238. package/dist/AuthPage/Information.d.ts +0 -7
  239. package/dist/AuthPage/Information.js +0 -14
  240. package/dist/AuthPage/Information.js.map +0 -1
  241. package/dist/AuthPage/_AuthPageSection.cjs +0 -15
  242. package/dist/AuthPage/_AuthPageSection.cjs.map +0 -1
  243. package/dist/AuthPage/_AuthPageSection.d.ts +0 -2
  244. package/dist/AuthPage/_AuthPageSection.js +0 -7
  245. package/dist/AuthPage/_AuthPageSection.js.map +0 -1
  246. package/dist/AuthPage/screenSetsErrorMessages.cjs +0 -13
  247. package/dist/AuthPage/screenSetsErrorMessages.cjs.map +0 -1
  248. package/dist/AuthPage/screenSetsErrorMessages.d.ts +0 -5
  249. package/dist/AuthPage/screenSetsErrorMessages.js +0 -6
  250. package/dist/AuthPage/screenSetsErrorMessages.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"styling.cjs","names":["InputWrapper","styled","div","props","readOnly","disabled","margin","readOnlyState","css","COLORS","neutral_100","neutral_300","neutral_600","activeErrorMessageState","critical_400","InputFieldStyling","input","withoutBorder","neutral_400","ComponentSStyling","ComponentTextStyle","Italic","neutral_500","BREAKPOINTS","MEDIUM","ComponentMStyling","black","activeErrorMessage","suppressReadOnlyStyles","primary_800","focusStyles","correct_500","primary_700","ValidationStyling","ComponentXXSStyling","Regular","Warning","ComponentXSStyling","ErrorMessage","critical_500","StateColors","States","Default","Valid","Invalid","ValidationMessage","type","NoteMessage","AutofilledMessage","StyledIcon","SearchIconWrapper"],"sources":["../../src/InputFields/styling.ts"],"sourcesContent":["import styled, { css } from 'styled-components';\nimport { BREAKPOINTS, COLORS, focusStyles } from '../styles';\nimport { ComponentXXSStyling, ComponentTextStyle, ComponentSStyling, ComponentMStyling, ComponentXSStyling } from '../styles/typography';\nimport {Size, States} from '../types';\n\nexport const InputWrapper = styled.div<{ readOnly?: boolean; disabled?: boolean; margin?: string }>`\n outline: none;\n ${(props) => (props.readOnly || props.disabled ? 'cursor: not-allowed;' : '')};\n ${(props) => (props.margin ? `margin: ${props.margin};` : '')}\n position: relative;\n`;\n\nexport const readOnlyState = css`\n background-color: ${COLORS.neutral_100};\n box-shadow: inset 0 0 0 1px ${COLORS.neutral_300} !important;\n color: ${COLORS.neutral_600} !important;\n pointer-events: none;\n outline: none;\n cursor: not-allowed;\n`;\nexport const activeErrorMessageState = css`\n box-shadow: inset 0 0 0 2px ${COLORS.critical_400};\n`;\n\nconst InputFieldStyling = styled.input<{\n activeErrorMessage?: boolean;\n active?: boolean;\n withoutBorder?: boolean;\n size?: string;\n suppressReadOnlyStyles?: boolean;\n}>`\n height: 48px;\n width: 100%;\n border-radius: 4px;\n margin-bottom: 4px;\n\n border: 0;\n -webkit-appearance: none;\n ${(props) =>\n props.withoutBorder\n ? `-webkit-box-shadow: none;\n -moz-box-shadow: none;\n box-shadow: none;\n `\n : `-webkit-box-shadow: inset 0px 0px 0px 1px ${COLORS.neutral_400};\n -moz-box-shadow: inset 0px 0px 0px 1px ${COLORS.neutral_400};\n box-shadow: inset 0px 0px 0px 1px ${COLORS.neutral_400};`}\n background-color: #fff;\n box-sizing: border-box;\n padding: 0 16px !important;\n\n outline: none;\n position: relative;\n\n font-size: 16px;\n\n &::placeholder {\n ${ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_500)}\n }\n\n ${BREAKPOINTS.MEDIUM} {\n font-size: 18px;\n line-height: 18px;\n height: 56px;\n padding: 0 16px !important;\n\n &::placeholder {\n ${ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_500)}\n }\n }\n\n &.small {\n font-size: 16px;\n height: 48px;\n &::placeholder {\n font-size: 16px;\n }\n }\n &.medium {\n font-size: 18px;\n height: 56px;\n &::placeholder {\n font-size: 18px;\n }\n }\n\n color: ${COLORS.black} !important;\n\n ${(props) => (props.activeErrorMessage ? activeErrorMessageState : '')}\n\n &:read-only:not(:disabled) {\n ${(props) => (props.suppressReadOnlyStyles ? '' : readOnlyState)}\n }\n\n &:disabled {\n border: 1px solid ${COLORS.neutral_100};\n pointer-events: none;\n box-shadow: none !important;\n outline: none;\n cursor: not-allowed;\n color: ${COLORS.neutral_300} !important;\n }\n &:focus:not(.focus-visible) {\n box-shadow: inset 0px 0px 0px 2px ${COLORS.primary_800};\n }\n\n &.focus-visible {\n ${focusStyles}\n }\n\n &.invalid {\n box-shadow: inset 0 0 0 2px ${COLORS.critical_400};\n }\n &.valid {\n box-shadow: inset 0 0 0 2px ${COLORS.correct_500};\n }\n\n &:not(.placeholder) {\n line-height: 40px;\n }\n\n &:hover {\n box-shadow: inset 0px 0px 0px 2px ${COLORS.primary_700};\n }\n\n &.active {\n box-shadow: inset 0px 0px 0px 2px ${COLORS.primary_800};\n }\n\n &.show-checkmark.valid {\n background-image: none;\n }\n\n &.show-checkmark.pending {\n background-image: none;\n }\n`;\n\nconst ValidationStyling = css`\n &.error-msg {\n ${ComponentXXSStyling(ComponentTextStyle.Regular, COLORS.black)}\n text-align: center;\n font-weight: 400;\n box-sizing: border-box;\n }\n\n &.error-msg {\n padding-top: 8px;\n padding-bottom: 0;\n ${ComponentXXSStyling(ComponentTextStyle.Regular, '#e76468')}\n font-weight: 700;\n line-height: 15px;\n }\n`;\n\nexport const Warning = styled.div`\n display: flex;\n align-items: center;\n margin-bottom: 4px;\n ${ComponentXXSStyling(ComponentTextStyle.Regular, null)}\n\n svg {\n width: 16px;\n height: 16px;\n }\n\n ${BREAKPOINTS.MEDIUM} {\n ${ComponentXSStyling(ComponentTextStyle.Regular, null)}\n svg {\n width: 20px;\n height: 20px;\n }\n }\n\n &.small {\n ${ComponentXXSStyling(ComponentTextStyle.Regular, null)}\n svg {\n width: 16px;\n height: 16px;\n }\n }\n &.medium {\n ${ComponentXSStyling(ComponentTextStyle.Regular, null)}\n svg {\n width: 20px;\n height: 20px;\n }\n }\n\n & * {\n vertical-align: middle;\n display: inline-block;\n }\n\n svg {\n margin-right: 4px;\n }\n`;\nexport const ErrorMessage = styled(Warning)`\n color: ${COLORS.critical_500};\n`;\n\nconst StateColors = {\n [States.Default]: COLORS.neutral_500,\n [States.Valid]: COLORS.correct_500,\n [States.Invalid]: COLORS.critical_500,\n}\n\nexport const ValidationMessage = styled(Warning)<{ type: States.Valid | States.Invalid | States.Default}>`\n color: ${(props) => StateColors[props.type]};\n`;\n\nexport const NoteMessage = styled(Warning)`\n color: ${COLORS.neutral_500};\n`;\nexport const AutofilledMessage = styled(Warning)`\n color: ${COLORS.neutral_600};\n`;\n\nexport { ValidationStyling, InputFieldStyling };\n\nexport const StyledIcon = styled.div`\n border-radius: 50%;\n`;\n\nexport const SearchIconWrapper = styled(StyledIcon)`\n position: absolute;\n border-radius: 50%;\n`;\n"],"mappings":"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"}
1
+ {"version":3,"file":"styling.cjs","names":["InputWrapper","styled","div","props","readOnly","disabled","margin","TooltipTrigger","readOnlyState","css","COLORS","neutral_100","neutral_300","neutral_600","activeErrorMessageState","critical_400","InputFieldStyling","input","withoutBorder","neutral_400","extraRightPadding","ComponentSStyling","ComponentTextStyle","Italic","neutral_500","BREAKPOINTS","MEDIUM","ComponentMStyling","black","activeErrorMessage","suppressReadOnlyStyles","primary_800","focusStyles","correct_500","primary_700","ValidationStyling","ComponentXXSStyling","Regular","Warning","ComponentXSStyling","ErrorMessage","critical_500","StateColors","States","Default","Valid","Invalid","ValidationMessage","type","NoteMessage","AutofilledMessage","StyledIcon","SearchIconWrapper"],"sources":["../../src/InputFields/styling.ts"],"sourcesContent":["import { TooltipTrigger } from '../Tooltips/TooltipStyles';\nimport styled, { css } from 'styled-components';\nimport { BREAKPOINTS, COLORS, focusStyles } from '../styles';\nimport { ComponentXXSStyling, ComponentTextStyle, ComponentSStyling, ComponentMStyling, ComponentXSStyling } from '../styles/typography';\nimport {Size, States} from '../types';\n\nexport const InputWrapper = styled.div<{ readOnly?: boolean; disabled?: boolean; margin?: string }>`\n outline: none;\n ${(props) => (props.readOnly || props.disabled ? 'cursor: not-allowed;' : '')};\n ${(props) => (props.margin ? `margin: ${props.margin};` : '')}\n position: relative;\n \n ${TooltipTrigger()}\n\n`;\n\nexport const readOnlyState = css`\n background-color: ${COLORS.neutral_100};\n box-shadow: inset 0 0 0 1px ${COLORS.neutral_300} !important;\n color: ${COLORS.neutral_600} !important;\n pointer-events: none;\n outline: none;\n cursor: not-allowed;\n`;\nexport const activeErrorMessageState = css`\n box-shadow: inset 0 0 0 2px ${COLORS.critical_400};\n`;\n\nconst InputFieldStyling = styled.input<{\n activeErrorMessage?: boolean;\n active?: boolean;\n withoutBorder?: boolean;\n size?: string;\n suppressReadOnlyStyles?: boolean;\n extraRightPadding?: number;\n}>`\n height: 48px;\n width: 100%;\n border-radius: 4px;\n margin-bottom: 4px;\n\n border: 0;\n -webkit-appearance: none;\n ${(props) =>\n props.withoutBorder\n ? `-webkit-box-shadow: none;\n -moz-box-shadow: none;\n box-shadow: none;\n `\n : `-webkit-box-shadow: inset 0px 0px 0px 1px ${COLORS.neutral_400};\n -moz-box-shadow: inset 0px 0px 0px 1px ${COLORS.neutral_400};\n box-shadow: inset 0px 0px 0px 1px ${COLORS.neutral_400};`}\n background-color: #fff;\n box-sizing: border-box;\n padding: 0 ${props => 16 + (props.extraRightPadding ?? 0)}px 0 16px !important;\n text-overflow: ellipsis;\n\n outline: none;\n position: relative;\n\n font-size: 16px;\n\n &::placeholder {\n ${ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_500)}\n }\n\n ${BREAKPOINTS.MEDIUM} {\n font-size: 18px;\n line-height: 18px;\n height: 56px;\n padding: 0 16px !important;\n\n &::placeholder {\n ${ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_500)}\n }\n }\n\n &.small {\n font-size: 16px;\n height: 48px;\n &::placeholder {\n font-size: 16px;\n }\n }\n &.medium {\n font-size: 18px;\n height: 56px;\n &::placeholder {\n font-size: 18px;\n }\n }\n\n color: ${COLORS.black} !important;\n\n ${(props) => (props.activeErrorMessage ? activeErrorMessageState : '')}\n\n &:read-only:not(:disabled) {\n ${(props) => (props.suppressReadOnlyStyles ? '' : readOnlyState)}\n }\n\n &:disabled {\n border: 1px solid ${COLORS.neutral_100};\n pointer-events: none;\n box-shadow: none !important;\n outline: none;\n cursor: not-allowed;\n color: ${COLORS.neutral_300} !important;\n }\n &:focus:not(.focus-visible) {\n box-shadow: inset 0px 0px 0px 2px ${COLORS.primary_800};\n }\n\n &.focus-visible {\n ${focusStyles}\n }\n\n &.invalid {\n box-shadow: inset 0 0 0 2px ${COLORS.critical_400};\n }\n &.valid {\n box-shadow: inset 0 0 0 2px ${COLORS.correct_500};\n }\n\n &:not(.placeholder) {\n line-height: 40px;\n }\n\n &:hover {\n box-shadow: inset 0px 0px 0px 2px ${COLORS.primary_700};\n }\n\n &.active {\n box-shadow: inset 0px 0px 0px 2px ${COLORS.primary_800};\n }\n\n &.show-checkmark.valid {\n background-image: none;\n }\n\n &.show-checkmark.pending {\n background-image: none;\n }\n`;\n\nconst ValidationStyling = css`\n &.error-msg {\n ${ComponentXXSStyling(ComponentTextStyle.Regular, COLORS.black)}\n text-align: center;\n font-weight: 400;\n box-sizing: border-box;\n }\n\n &.error-msg {\n padding-top: 8px;\n padding-bottom: 0;\n ${ComponentXXSStyling(ComponentTextStyle.Regular, '#e76468')}\n font-weight: 700;\n line-height: 15px;\n }\n`;\n\nexport const Warning = styled.div`\n display: flex;\n align-items: center;\n margin-bottom: 4px;\n ${ComponentXXSStyling(ComponentTextStyle.Regular, null)}\n\n svg {\n width: 16px;\n height: 16px;\n }\n\n ${BREAKPOINTS.MEDIUM} {\n ${ComponentXSStyling(ComponentTextStyle.Regular, null)}\n svg {\n width: 20px;\n height: 20px;\n }\n }\n\n &.small {\n ${ComponentXXSStyling(ComponentTextStyle.Regular, null)}\n svg {\n width: 16px;\n height: 16px;\n }\n }\n &.medium {\n ${ComponentXSStyling(ComponentTextStyle.Regular, null)}\n svg {\n width: 20px;\n height: 20px;\n }\n }\n\n & * {\n vertical-align: middle;\n display: inline-block;\n }\n\n svg {\n margin-right: 4px;\n }\n`;\nexport const ErrorMessage = styled(Warning)`\n color: ${COLORS.critical_500};\n`;\n\nconst StateColors = {\n [States.Default]: COLORS.neutral_500,\n [States.Valid]: COLORS.correct_500,\n [States.Invalid]: COLORS.critical_500,\n}\n\nexport const ValidationMessage = styled(Warning)<{ type: States.Valid | States.Invalid | States.Default}>`\n color: ${(props) => StateColors[props.type]};\n`;\n\nexport const NoteMessage = styled(Warning)`\n color: ${COLORS.neutral_500};\n`;\nexport const AutofilledMessage = styled(Warning)`\n color: ${COLORS.neutral_600};\n`;\n\nexport { ValidationStyling, InputFieldStyling };\n\nexport const StyledIcon = styled.div`\n border-radius: 50%;\n`;\n\nexport const SearchIconWrapper = styled(StyledIcon)`\n position: absolute;\n border-radius: 50%;\n`;\n"],"mappings":"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"}
@@ -12,6 +12,7 @@ declare const InputFieldStyling: import("styled-components").StyledComponent<"in
12
12
  withoutBorder?: boolean | undefined;
13
13
  size?: string | undefined;
14
14
  suppressReadOnlyStyles?: boolean | undefined;
15
+ extraRightPadding?: number | undefined;
15
16
  }, never>;
16
17
  declare const ValidationStyling: import("styled-components").FlattenSimpleInterpolation;
17
18
  export declare const Warning: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -1,19 +1,23 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
2
  import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
3
3
  var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _StateColors, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12;
4
+ import { TooltipTrigger } from '../Tooltips/TooltipStyles';
4
5
  import styled, { css } from 'styled-components';
5
6
  import { BREAKPOINTS, COLORS, focusStyles } from '../styles';
6
7
  import { ComponentXXSStyling, ComponentTextStyle, ComponentSStyling, ComponentMStyling, ComponentXSStyling } from '../styles/typography';
7
8
  import { States } from '../types';
8
- export var InputWrapper = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n outline: none;\n ", ";\n ", "\n position: relative;\n"])), function (props) {
9
+ export var InputWrapper = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n outline: none;\n ", ";\n ", "\n position: relative;\n \n ", "\n\n"])), function (props) {
9
10
  return props.readOnly || props.disabled ? 'cursor: not-allowed;' : '';
10
11
  }, function (props) {
11
12
  return props.margin ? "margin: ".concat(props.margin, ";") : '';
12
- });
13
+ }, TooltipTrigger());
13
14
  export var readOnlyState = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n background-color: ", ";\n box-shadow: inset 0 0 0 1px ", " !important;\n color: ", " !important;\n pointer-events: none;\n outline: none;\n cursor: not-allowed;\n"])), COLORS.neutral_100, COLORS.neutral_300, COLORS.neutral_600);
14
15
  export var activeErrorMessageState = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n box-shadow: inset 0 0 0 2px ", ";\n"])), COLORS.critical_400);
15
- var InputFieldStyling = styled.input(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n height: 48px;\n width: 100%;\n border-radius: 4px;\n margin-bottom: 4px;\n\n border: 0;\n -webkit-appearance: none;\n ", "\n background-color: #fff;\n box-sizing: border-box;\n padding: 0 16px !important;\n\n outline: none;\n position: relative;\n\n font-size: 16px;\n\n &::placeholder {\n ", "\n }\n\n ", " {\n font-size: 18px;\n line-height: 18px;\n height: 56px;\n padding: 0 16px !important;\n\n &::placeholder {\n ", "\n }\n }\n\n &.small {\n font-size: 16px;\n height: 48px;\n &::placeholder {\n font-size: 16px;\n }\n }\n &.medium {\n font-size: 18px;\n height: 56px;\n &::placeholder {\n font-size: 18px;\n }\n }\n\n color: ", " !important;\n\n ", "\n\n &:read-only:not(:disabled) {\n ", "\n }\n\n &:disabled {\n border: 1px solid ", ";\n pointer-events: none;\n box-shadow: none !important;\n outline: none;\n cursor: not-allowed;\n color: ", " !important;\n }\n &:focus:not(.focus-visible) {\n box-shadow: inset 0px 0px 0px 2px ", ";\n }\n\n &.focus-visible {\n ", "\n }\n\n &.invalid {\n box-shadow: inset 0 0 0 2px ", ";\n }\n &.valid {\n box-shadow: inset 0 0 0 2px ", ";\n }\n\n &:not(.placeholder) {\n line-height: 40px;\n }\n\n &:hover {\n box-shadow: inset 0px 0px 0px 2px ", ";\n }\n\n &.active {\n box-shadow: inset 0px 0px 0px 2px ", ";\n }\n\n &.show-checkmark.valid {\n background-image: none;\n }\n\n &.show-checkmark.pending {\n background-image: none;\n }\n"])), function (props) {
16
+ var InputFieldStyling = styled.input(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n height: 48px;\n width: 100%;\n border-radius: 4px;\n margin-bottom: 4px;\n\n border: 0;\n -webkit-appearance: none;\n ", "\n background-color: #fff;\n box-sizing: border-box;\n padding: 0 ", "px 0 16px !important;\n text-overflow: ellipsis;\n\n outline: none;\n position: relative;\n\n font-size: 16px;\n\n &::placeholder {\n ", "\n }\n\n ", " {\n font-size: 18px;\n line-height: 18px;\n height: 56px;\n padding: 0 16px !important;\n\n &::placeholder {\n ", "\n }\n }\n\n &.small {\n font-size: 16px;\n height: 48px;\n &::placeholder {\n font-size: 16px;\n }\n }\n &.medium {\n font-size: 18px;\n height: 56px;\n &::placeholder {\n font-size: 18px;\n }\n }\n\n color: ", " !important;\n\n ", "\n\n &:read-only:not(:disabled) {\n ", "\n }\n\n &:disabled {\n border: 1px solid ", ";\n pointer-events: none;\n box-shadow: none !important;\n outline: none;\n cursor: not-allowed;\n color: ", " !important;\n }\n &:focus:not(.focus-visible) {\n box-shadow: inset 0px 0px 0px 2px ", ";\n }\n\n &.focus-visible {\n ", "\n }\n\n &.invalid {\n box-shadow: inset 0 0 0 2px ", ";\n }\n &.valid {\n box-shadow: inset 0 0 0 2px ", ";\n }\n\n &:not(.placeholder) {\n line-height: 40px;\n }\n\n &:hover {\n box-shadow: inset 0px 0px 0px 2px ", ";\n }\n\n &.active {\n box-shadow: inset 0px 0px 0px 2px ", ";\n }\n\n &.show-checkmark.valid {\n background-image: none;\n }\n\n &.show-checkmark.pending {\n background-image: none;\n }\n"])), function (props) {
16
17
  return props.withoutBorder ? "-webkit-box-shadow: none;\n -moz-box-shadow: none;\n box-shadow: none;\n " : "-webkit-box-shadow: inset 0px 0px 0px 1px ".concat(COLORS.neutral_400, ";\n -moz-box-shadow: inset 0px 0px 0px 1px ").concat(COLORS.neutral_400, ";\n box-shadow: inset 0px 0px 0px 1px ").concat(COLORS.neutral_400, ";");
18
+ }, function (props) {
19
+ var _props$extraRightPadd;
20
+ return 16 + ((_props$extraRightPadd = props.extraRightPadding) !== null && _props$extraRightPadd !== void 0 ? _props$extraRightPadd : 0);
17
21
  }, ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_500), BREAKPOINTS.MEDIUM, ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_500), COLORS.black, function (props) {
18
22
  return props.activeErrorMessage ? activeErrorMessageState : '';
19
23
  }, function (props) {
@@ -1 +1 @@
1
- {"version":3,"file":"styling.js","names":["styled","css","BREAKPOINTS","COLORS","focusStyles","ComponentXXSStyling","ComponentTextStyle","ComponentSStyling","ComponentMStyling","ComponentXSStyling","States","InputWrapper","div","props","readOnly","disabled","margin","readOnlyState","neutral_100","neutral_300","neutral_600","activeErrorMessageState","critical_400","InputFieldStyling","input","withoutBorder","neutral_400","Italic","neutral_500","MEDIUM","black","activeErrorMessage","suppressReadOnlyStyles","primary_800","correct_500","primary_700","ValidationStyling","Regular","Warning","ErrorMessage","critical_500","StateColors","Default","Valid","Invalid","ValidationMessage","type","NoteMessage","AutofilledMessage","StyledIcon","SearchIconWrapper"],"sources":["../../src/InputFields/styling.ts"],"sourcesContent":["import styled, { css } from 'styled-components';\nimport { BREAKPOINTS, COLORS, focusStyles } from '../styles';\nimport { ComponentXXSStyling, ComponentTextStyle, ComponentSStyling, ComponentMStyling, ComponentXSStyling } from '../styles/typography';\nimport {Size, States} from '../types';\n\nexport const InputWrapper = styled.div<{ readOnly?: boolean; disabled?: boolean; margin?: string }>`\n outline: none;\n ${(props) => (props.readOnly || props.disabled ? 'cursor: not-allowed;' : '')};\n ${(props) => (props.margin ? `margin: ${props.margin};` : '')}\n position: relative;\n`;\n\nexport const readOnlyState = css`\n background-color: ${COLORS.neutral_100};\n box-shadow: inset 0 0 0 1px ${COLORS.neutral_300} !important;\n color: ${COLORS.neutral_600} !important;\n pointer-events: none;\n outline: none;\n cursor: not-allowed;\n`;\nexport const activeErrorMessageState = css`\n box-shadow: inset 0 0 0 2px ${COLORS.critical_400};\n`;\n\nconst InputFieldStyling = styled.input<{\n activeErrorMessage?: boolean;\n active?: boolean;\n withoutBorder?: boolean;\n size?: string;\n suppressReadOnlyStyles?: boolean;\n}>`\n height: 48px;\n width: 100%;\n border-radius: 4px;\n margin-bottom: 4px;\n\n border: 0;\n -webkit-appearance: none;\n ${(props) =>\n props.withoutBorder\n ? `-webkit-box-shadow: none;\n -moz-box-shadow: none;\n box-shadow: none;\n `\n : `-webkit-box-shadow: inset 0px 0px 0px 1px ${COLORS.neutral_400};\n -moz-box-shadow: inset 0px 0px 0px 1px ${COLORS.neutral_400};\n box-shadow: inset 0px 0px 0px 1px ${COLORS.neutral_400};`}\n background-color: #fff;\n box-sizing: border-box;\n padding: 0 16px !important;\n\n outline: none;\n position: relative;\n\n font-size: 16px;\n\n &::placeholder {\n ${ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_500)}\n }\n\n ${BREAKPOINTS.MEDIUM} {\n font-size: 18px;\n line-height: 18px;\n height: 56px;\n padding: 0 16px !important;\n\n &::placeholder {\n ${ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_500)}\n }\n }\n\n &.small {\n font-size: 16px;\n height: 48px;\n &::placeholder {\n font-size: 16px;\n }\n }\n &.medium {\n font-size: 18px;\n height: 56px;\n &::placeholder {\n font-size: 18px;\n }\n }\n\n color: ${COLORS.black} !important;\n\n ${(props) => (props.activeErrorMessage ? activeErrorMessageState : '')}\n\n &:read-only:not(:disabled) {\n ${(props) => (props.suppressReadOnlyStyles ? '' : readOnlyState)}\n }\n\n &:disabled {\n border: 1px solid ${COLORS.neutral_100};\n pointer-events: none;\n box-shadow: none !important;\n outline: none;\n cursor: not-allowed;\n color: ${COLORS.neutral_300} !important;\n }\n &:focus:not(.focus-visible) {\n box-shadow: inset 0px 0px 0px 2px ${COLORS.primary_800};\n }\n\n &.focus-visible {\n ${focusStyles}\n }\n\n &.invalid {\n box-shadow: inset 0 0 0 2px ${COLORS.critical_400};\n }\n &.valid {\n box-shadow: inset 0 0 0 2px ${COLORS.correct_500};\n }\n\n &:not(.placeholder) {\n line-height: 40px;\n }\n\n &:hover {\n box-shadow: inset 0px 0px 0px 2px ${COLORS.primary_700};\n }\n\n &.active {\n box-shadow: inset 0px 0px 0px 2px ${COLORS.primary_800};\n }\n\n &.show-checkmark.valid {\n background-image: none;\n }\n\n &.show-checkmark.pending {\n background-image: none;\n }\n`;\n\nconst ValidationStyling = css`\n &.error-msg {\n ${ComponentXXSStyling(ComponentTextStyle.Regular, COLORS.black)}\n text-align: center;\n font-weight: 400;\n box-sizing: border-box;\n }\n\n &.error-msg {\n padding-top: 8px;\n padding-bottom: 0;\n ${ComponentXXSStyling(ComponentTextStyle.Regular, '#e76468')}\n font-weight: 700;\n line-height: 15px;\n }\n`;\n\nexport const Warning = styled.div`\n display: flex;\n align-items: center;\n margin-bottom: 4px;\n ${ComponentXXSStyling(ComponentTextStyle.Regular, null)}\n\n svg {\n width: 16px;\n height: 16px;\n }\n\n ${BREAKPOINTS.MEDIUM} {\n ${ComponentXSStyling(ComponentTextStyle.Regular, null)}\n svg {\n width: 20px;\n height: 20px;\n }\n }\n\n &.small {\n ${ComponentXXSStyling(ComponentTextStyle.Regular, null)}\n svg {\n width: 16px;\n height: 16px;\n }\n }\n &.medium {\n ${ComponentXSStyling(ComponentTextStyle.Regular, null)}\n svg {\n width: 20px;\n height: 20px;\n }\n }\n\n & * {\n vertical-align: middle;\n display: inline-block;\n }\n\n svg {\n margin-right: 4px;\n }\n`;\nexport const ErrorMessage = styled(Warning)`\n color: ${COLORS.critical_500};\n`;\n\nconst StateColors = {\n [States.Default]: COLORS.neutral_500,\n [States.Valid]: COLORS.correct_500,\n [States.Invalid]: COLORS.critical_500,\n}\n\nexport const ValidationMessage = styled(Warning)<{ type: States.Valid | States.Invalid | States.Default}>`\n color: ${(props) => StateColors[props.type]};\n`;\n\nexport const NoteMessage = styled(Warning)`\n color: ${COLORS.neutral_500};\n`;\nexport const AutofilledMessage = styled(Warning)`\n color: ${COLORS.neutral_600};\n`;\n\nexport { ValidationStyling, InputFieldStyling };\n\nexport const StyledIcon = styled.div`\n border-radius: 50%;\n`;\n\nexport const SearchIconWrapper = styled(StyledIcon)`\n position: absolute;\n border-radius: 50%;\n`;\n"],"mappings":"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"}
1
+ {"version":3,"file":"styling.js","names":["TooltipTrigger","styled","css","BREAKPOINTS","COLORS","focusStyles","ComponentXXSStyling","ComponentTextStyle","ComponentSStyling","ComponentMStyling","ComponentXSStyling","States","InputWrapper","div","props","readOnly","disabled","margin","readOnlyState","neutral_100","neutral_300","neutral_600","activeErrorMessageState","critical_400","InputFieldStyling","input","withoutBorder","neutral_400","extraRightPadding","Italic","neutral_500","MEDIUM","black","activeErrorMessage","suppressReadOnlyStyles","primary_800","correct_500","primary_700","ValidationStyling","Regular","Warning","ErrorMessage","critical_500","StateColors","Default","Valid","Invalid","ValidationMessage","type","NoteMessage","AutofilledMessage","StyledIcon","SearchIconWrapper"],"sources":["../../src/InputFields/styling.ts"],"sourcesContent":["import { TooltipTrigger } from '../Tooltips/TooltipStyles';\nimport styled, { css } from 'styled-components';\nimport { BREAKPOINTS, COLORS, focusStyles } from '../styles';\nimport { ComponentXXSStyling, ComponentTextStyle, ComponentSStyling, ComponentMStyling, ComponentXSStyling } from '../styles/typography';\nimport {Size, States} from '../types';\n\nexport const InputWrapper = styled.div<{ readOnly?: boolean; disabled?: boolean; margin?: string }>`\n outline: none;\n ${(props) => (props.readOnly || props.disabled ? 'cursor: not-allowed;' : '')};\n ${(props) => (props.margin ? `margin: ${props.margin};` : '')}\n position: relative;\n \n ${TooltipTrigger()}\n\n`;\n\nexport const readOnlyState = css`\n background-color: ${COLORS.neutral_100};\n box-shadow: inset 0 0 0 1px ${COLORS.neutral_300} !important;\n color: ${COLORS.neutral_600} !important;\n pointer-events: none;\n outline: none;\n cursor: not-allowed;\n`;\nexport const activeErrorMessageState = css`\n box-shadow: inset 0 0 0 2px ${COLORS.critical_400};\n`;\n\nconst InputFieldStyling = styled.input<{\n activeErrorMessage?: boolean;\n active?: boolean;\n withoutBorder?: boolean;\n size?: string;\n suppressReadOnlyStyles?: boolean;\n extraRightPadding?: number;\n}>`\n height: 48px;\n width: 100%;\n border-radius: 4px;\n margin-bottom: 4px;\n\n border: 0;\n -webkit-appearance: none;\n ${(props) =>\n props.withoutBorder\n ? `-webkit-box-shadow: none;\n -moz-box-shadow: none;\n box-shadow: none;\n `\n : `-webkit-box-shadow: inset 0px 0px 0px 1px ${COLORS.neutral_400};\n -moz-box-shadow: inset 0px 0px 0px 1px ${COLORS.neutral_400};\n box-shadow: inset 0px 0px 0px 1px ${COLORS.neutral_400};`}\n background-color: #fff;\n box-sizing: border-box;\n padding: 0 ${props => 16 + (props.extraRightPadding ?? 0)}px 0 16px !important;\n text-overflow: ellipsis;\n\n outline: none;\n position: relative;\n\n font-size: 16px;\n\n &::placeholder {\n ${ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_500)}\n }\n\n ${BREAKPOINTS.MEDIUM} {\n font-size: 18px;\n line-height: 18px;\n height: 56px;\n padding: 0 16px !important;\n\n &::placeholder {\n ${ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_500)}\n }\n }\n\n &.small {\n font-size: 16px;\n height: 48px;\n &::placeholder {\n font-size: 16px;\n }\n }\n &.medium {\n font-size: 18px;\n height: 56px;\n &::placeholder {\n font-size: 18px;\n }\n }\n\n color: ${COLORS.black} !important;\n\n ${(props) => (props.activeErrorMessage ? activeErrorMessageState : '')}\n\n &:read-only:not(:disabled) {\n ${(props) => (props.suppressReadOnlyStyles ? '' : readOnlyState)}\n }\n\n &:disabled {\n border: 1px solid ${COLORS.neutral_100};\n pointer-events: none;\n box-shadow: none !important;\n outline: none;\n cursor: not-allowed;\n color: ${COLORS.neutral_300} !important;\n }\n &:focus:not(.focus-visible) {\n box-shadow: inset 0px 0px 0px 2px ${COLORS.primary_800};\n }\n\n &.focus-visible {\n ${focusStyles}\n }\n\n &.invalid {\n box-shadow: inset 0 0 0 2px ${COLORS.critical_400};\n }\n &.valid {\n box-shadow: inset 0 0 0 2px ${COLORS.correct_500};\n }\n\n &:not(.placeholder) {\n line-height: 40px;\n }\n\n &:hover {\n box-shadow: inset 0px 0px 0px 2px ${COLORS.primary_700};\n }\n\n &.active {\n box-shadow: inset 0px 0px 0px 2px ${COLORS.primary_800};\n }\n\n &.show-checkmark.valid {\n background-image: none;\n }\n\n &.show-checkmark.pending {\n background-image: none;\n }\n`;\n\nconst ValidationStyling = css`\n &.error-msg {\n ${ComponentXXSStyling(ComponentTextStyle.Regular, COLORS.black)}\n text-align: center;\n font-weight: 400;\n box-sizing: border-box;\n }\n\n &.error-msg {\n padding-top: 8px;\n padding-bottom: 0;\n ${ComponentXXSStyling(ComponentTextStyle.Regular, '#e76468')}\n font-weight: 700;\n line-height: 15px;\n }\n`;\n\nexport const Warning = styled.div`\n display: flex;\n align-items: center;\n margin-bottom: 4px;\n ${ComponentXXSStyling(ComponentTextStyle.Regular, null)}\n\n svg {\n width: 16px;\n height: 16px;\n }\n\n ${BREAKPOINTS.MEDIUM} {\n ${ComponentXSStyling(ComponentTextStyle.Regular, null)}\n svg {\n width: 20px;\n height: 20px;\n }\n }\n\n &.small {\n ${ComponentXXSStyling(ComponentTextStyle.Regular, null)}\n svg {\n width: 16px;\n height: 16px;\n }\n }\n &.medium {\n ${ComponentXSStyling(ComponentTextStyle.Regular, null)}\n svg {\n width: 20px;\n height: 20px;\n }\n }\n\n & * {\n vertical-align: middle;\n display: inline-block;\n }\n\n svg {\n margin-right: 4px;\n }\n`;\nexport const ErrorMessage = styled(Warning)`\n color: ${COLORS.critical_500};\n`;\n\nconst StateColors = {\n [States.Default]: COLORS.neutral_500,\n [States.Valid]: COLORS.correct_500,\n [States.Invalid]: COLORS.critical_500,\n}\n\nexport const ValidationMessage = styled(Warning)<{ type: States.Valid | States.Invalid | States.Default}>`\n color: ${(props) => StateColors[props.type]};\n`;\n\nexport const NoteMessage = styled(Warning)`\n color: ${COLORS.neutral_500};\n`;\nexport const AutofilledMessage = styled(Warning)`\n color: ${COLORS.neutral_600};\n`;\n\nexport { ValidationStyling, InputFieldStyling };\n\nexport const StyledIcon = styled.div`\n border-radius: 50%;\n`;\n\nexport const SearchIconWrapper = styled(StyledIcon)`\n position: absolute;\n border-radius: 50%;\n`;\n"],"mappings":"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"}
@@ -4,25 +4,33 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.PageWidth = exports.ContainerMargins = exports.Columns = void 0;
7
+ exports.PageWidth = exports.Columns = void 0;
8
8
  var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
9
9
  var _styledComponents = _interopRequireDefault(require("styled-components"));
10
10
  var _styles = require("../styles");
11
- var _templateObject, _templateObject2, _templateObject3;
11
+ var _templateObject, _templateObject2;
12
12
  var GRID = {
13
13
  GAP: {
14
- SMALL: '24px',
15
- MEDIUM: '32px',
16
- LARGE: '40px'
14
+ SMALL: '16px',
15
+ MEDIUM: '24px',
16
+ LARGE: '32px'
17
17
  },
18
18
  GUTTER: {
19
- SMALL: '16px',
20
- MEDIUM: '32px',
21
- LARGE: '56px'
19
+ SMALL: '16px 16px 32px',
20
+ MEDIUM: '24px 32px 64px',
21
+ LARGE: '32px 64px 128px'
22
22
  }
23
23
  };
24
- var PageWidth = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: block;\n margin: 0 ", ";\n\n ", " {\n margin: 0 ", ";\n }\n ", " {\n margin: 0 ", ";\n }\n\n ", " {\n max-width: ", ";\n margin: 0 auto;\n }\n"])), GRID.GUTTER.SMALL, _styles.BREAKPOINTS.MEDIUM, GRID.GUTTER.MEDIUM, _styles.BREAKPOINTS.LARGE, GRID.GUTTER.LARGE, _styles.BREAKPOINTS.XLARGE, function (props) {
25
- return props.useMaxWidth ? props.maxWidth ? 'min(100% - 112px,' + props.maxWidth + 'px)' : 'calc(100% - 112px)' : '1088px';
24
+ var PageWidth = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: block;\n margin: ", ";\n ", "\n\n ", " {\n margin: ", ";\n ", "\n }\n\n ", " {\n margin: ", ";\n ", "\n }\n\n ", " {\n max-width: ", ";\n\n margin: 32px auto 128px;\n ", "\n }\n"])), GRID.GUTTER.SMALL, function (props) {
25
+ return props.unsetMargin && 'margin-top: 0; margin-bottom: 0;';
26
+ }, _styles.BREAKPOINTS.MEDIUM, GRID.GUTTER.MEDIUM, function (props) {
27
+ return props.unsetMargin && 'margin-top: 0; margin-bottom: 0;';
28
+ }, _styles.BREAKPOINTS.LARGE, GRID.GUTTER.LARGE, function (props) {
29
+ return props.unsetMargin && 'margin-top: 0; margin-bottom: 0;';
30
+ }, _styles.BREAKPOINTS.LARGE, function (props) {
31
+ return props.useMaxWidth ? props.maxWidth ? 'min(100% - 128px,' + props.maxWidth + 'px)' : 'calc(100% - 128px)' : 'calc(1600px - 128px)';
32
+ }, function (props) {
33
+ return props.unsetMargin && 'margin-top: 0; margin-bottom: 0;';
26
34
  });
27
35
  exports.PageWidth = PageWidth;
28
36
  var Columns = _styledComponents.default.section(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n display: grid;\n grid-gap: ", ";\n word-break: break-word; /* Prevent long words from breaking the layout \u2013 consider making this rule global */\n\n ", " {\n grid-template-columns: ", ";\n -ms-grid-columns: ", ";\n grid-gap: ", ";\n }\n\n ", " {\n grid-gap: ", ";\n }\n\n @media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {\n display: -ms-grid;\n\n > *:not(:first-child) {\n margin-left: ", ";\n }\n }\n\n @media print {\n grid-gap: 0;\n grid-template-columns: ", ";\n }\n"])), function (props) {
@@ -39,6 +47,4 @@ var Columns = _styledComponents.default.section(_templateObject2 || (_templateOb
39
47
  return props.printColumns || 'none';
40
48
  });
41
49
  exports.Columns = Columns;
42
- var ContainerMargins = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n /* X small devices (mobile phones, 320px and up) */\n @media only screen and (min-width: 320px) {\n margin: 16px;\n column-gap: 16px;\n }\n\n /* Small devices (portrait tablets, 576px and up) */\n @media only screen and (min-width: 576px) {\n margin: 16px;\n column-gap: 16px;\n }\n\n /* Medium devices (landscape tablets, 768px and up) */\n @media only screen and (min-width: 768px) {\n margin: 32px;\n column-gap: 32px;\n }\n\n /* Large devices (laptops/desktops, 992px and up) */\n @media only screen and (min-width: 992px) {\n margin: 56px;\n column-gap: 24px;\n }\n\n /* X large devices (laptops/desktops, 1200px and up) */\n @media only screen and (min-width: 1200px) {\n margin: 56px;\n column-gap: 40px;\n }\n"])));
43
- exports.ContainerMargins = ContainerMargins;
44
50
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":["GRID","GAP","SMALL","MEDIUM","LARGE","GUTTER","PageWidth","styled","div","BREAKPOINTS","XLARGE","props","useMaxWidth","maxWidth","Columns","section","gap","columns","printColumns","ContainerMargins"],"sources":["../../src/Layouts/index.ts"],"sourcesContent":["import styled from 'styled-components';\n\nimport { BREAKPOINTS } from '../styles';\n\nconst GRID = {\n GAP: {\n SMALL: '24px',\n MEDIUM: '32px',\n LARGE: '40px',\n },\n GUTTER: {\n SMALL: '16px',\n MEDIUM: '32px',\n LARGE: '56px',\n },\n};\n\nexport const PageWidth = styled.div<{ useMaxWidth?: boolean; maxWidth?: number }>`\n display: block;\n margin: 0 ${GRID.GUTTER.SMALL};\n\n ${BREAKPOINTS.MEDIUM} {\n margin: 0 ${GRID.GUTTER.MEDIUM};\n }\n ${BREAKPOINTS.LARGE} {\n margin: 0 ${GRID.GUTTER.LARGE};\n }\n\n ${BREAKPOINTS.XLARGE} {\n max-width: ${(props) => (props.useMaxWidth ? (props.maxWidth ? 'min(100% - 112px,' + props.maxWidth + 'px)' : 'calc(100% - 112px)') : '1088px')};\n margin: 0 auto;\n }\n`;\n\nexport const Columns = styled.section<{ gap?: string; columns?: string; printColumns?: string }>`\n width: 100%;\n display: grid;\n grid-gap: ${(props) => props.gap || GRID.GAP.SMALL};\n word-break: break-word; /* Prevent long words from breaking the layout – consider making this rule global */\n\n ${BREAKPOINTS.MEDIUM} {\n grid-template-columns: ${(props) => props.columns};\n -ms-grid-columns: ${(props) => props.columns};\n grid-gap: ${(props) => props.gap || GRID.GAP.MEDIUM};\n }\n\n ${BREAKPOINTS.LARGE} {\n grid-gap: ${(props) => props.gap || GRID.GAP.LARGE};\n }\n\n @media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {\n display: -ms-grid;\n\n > *:not(:first-child) {\n margin-left: ${GRID.GAP.MEDIUM};\n }\n }\n\n @media print {\n grid-gap: 0;\n grid-template-columns: ${(props) => props.printColumns || 'none'};\n }\n`;\n\nexport const ContainerMargins = styled.div`\n /* X small devices (mobile phones, 320px and up) */\n @media only screen and (min-width: 320px) {\n margin: 16px;\n column-gap: 16px;\n }\n\n /* Small devices (portrait tablets, 576px and up) */\n @media only screen and (min-width: 576px) {\n margin: 16px;\n column-gap: 16px;\n }\n\n /* Medium devices (landscape tablets, 768px and up) */\n @media only screen and (min-width: 768px) {\n margin: 32px;\n column-gap: 32px;\n }\n\n /* Large devices (laptops/desktops, 992px and up) */\n @media only screen and (min-width: 992px) {\n margin: 56px;\n column-gap: 24px;\n }\n\n /* X large devices (laptops/desktops, 1200px and up) */\n @media only screen and (min-width: 1200px) {\n margin: 56px;\n column-gap: 40px;\n }\n`;\n"],"mappings":";;;;;;;;AAAA;AAEA;AAAwC;AAExC,IAAMA,IAAI,GAAG;EACXC,GAAG,EAAE;IACHC,KAAK,EAAE,MAAM;IACbC,MAAM,EAAE,MAAM;IACdC,KAAK,EAAE;EACT,CAAC;EACDC,MAAM,EAAE;IACNH,KAAK,EAAE,MAAM;IACbC,MAAM,EAAE,MAAM;IACdC,KAAK,EAAE;EACT;AACF,CAAC;AAEM,IAAME,SAAS,GAAGC,yBAAM,CAACC,GAAG,kQAErBR,IAAI,CAACK,MAAM,CAACH,KAAK,EAE3BO,mBAAW,CAACN,MAAM,EACNH,IAAI,CAACK,MAAM,CAACF,MAAM,EAE9BM,mBAAW,CAACL,KAAK,EACLJ,IAAI,CAACK,MAAM,CAACD,KAAK,EAG7BK,mBAAW,CAACC,MAAM,EACL,UAACC,KAAK;EAAA,OAAMA,KAAK,CAACC,WAAW,GAAID,KAAK,CAACE,QAAQ,GAAG,mBAAmB,GAAGF,KAAK,CAACE,QAAQ,GAAG,KAAK,GAAG,oBAAoB,GAAI,QAAQ;AAAA,CAAC,CAGlJ;AAAC;AAEK,IAAMC,OAAO,GAAGP,yBAAM,CAACQ,OAAO,ooBAGvB,UAACJ,KAAK;EAAA,OAAKA,KAAK,CAACK,GAAG,IAAIhB,IAAI,CAACC,GAAG,CAACC,KAAK;AAAA,GAGhDO,mBAAW,CAACN,MAAM,EACO,UAACQ,KAAK;EAAA,OAAKA,KAAK,CAACM,OAAO;AAAA,GAC7B,UAACN,KAAK;EAAA,OAAKA,KAAK,CAACM,OAAO;AAAA,GAChC,UAACN,KAAK;EAAA,OAAKA,KAAK,CAACK,GAAG,IAAIhB,IAAI,CAACC,GAAG,CAACE,MAAM;AAAA,GAGnDM,mBAAW,CAACL,KAAK,EACL,UAACO,KAAK;EAAA,OAAKA,KAAK,CAACK,GAAG,IAAIhB,IAAI,CAACC,GAAG,CAACG,KAAK;AAAA,GAOjCJ,IAAI,CAACC,GAAG,CAACE,MAAM,EAMP,UAACQ,KAAK;EAAA,OAAKA,KAAK,CAACO,YAAY,IAAI,MAAM;AAAA,EAEnE;AAAC;AAEK,IAAMC,gBAAgB,GAAGZ,yBAAM,CAACC,GAAG,k1BA8BzC;AAAC"}
1
+ {"version":3,"file":"index.cjs","names":["GRID","GAP","SMALL","MEDIUM","LARGE","GUTTER","PageWidth","styled","div","props","unsetMargin","BREAKPOINTS","useMaxWidth","maxWidth","Columns","section","gap","columns","printColumns"],"sources":["../../src/Layouts/index.ts"],"sourcesContent":["import styled from 'styled-components';\n\nimport {BREAKPOINTS} from '../styles';\n\nconst GRID = {\n GAP: {\n SMALL: '16px',\n MEDIUM: '24px',\n LARGE: '32px',\n },\n GUTTER: {\n SMALL: '16px 16px 32px',\n MEDIUM: '24px 32px 64px',\n LARGE: '32px 64px 128px',\n },\n};\n\nexport const PageWidth = styled.div<{ useMaxWidth?: boolean; maxWidth?: number; unsetMargin?: boolean; }>`\n display: block;\n margin: ${GRID.GUTTER.SMALL};\n ${props => props.unsetMargin && 'margin-top: 0; margin-bottom: 0;'}\n\n ${BREAKPOINTS.MEDIUM} {\n margin: ${GRID.GUTTER.MEDIUM};\n ${props => props.unsetMargin && 'margin-top: 0; margin-bottom: 0;'}\n }\n\n ${BREAKPOINTS.LARGE} {\n margin: ${GRID.GUTTER.LARGE};\n ${props => props.unsetMargin && 'margin-top: 0; margin-bottom: 0;'}\n }\n\n ${BREAKPOINTS.LARGE} {\n max-width: ${(props) => (\n props.useMaxWidth\n ? (props.maxWidth\n ? 'min(100% - 128px,' + props.maxWidth + 'px)'\n : 'calc(100% - 128px)')\n : 'calc(1600px - 128px)')};\n\n margin: 32px auto 128px;\n ${props => props.unsetMargin && 'margin-top: 0; margin-bottom: 0;'}\n }\n`;\n\nexport const Columns = styled.section<{ gap?: string; columns?: string; printColumns?: string }>`\n width: 100%;\n display: grid;\n grid-gap: ${(props) => props.gap || GRID.GAP.SMALL};\n word-break: break-word; /* Prevent long words from breaking the layout – consider making this rule global */\n\n ${BREAKPOINTS.MEDIUM} {\n grid-template-columns: ${(props) => props.columns};\n -ms-grid-columns: ${(props) => props.columns};\n grid-gap: ${(props) => props.gap || GRID.GAP.MEDIUM};\n }\n\n ${BREAKPOINTS.LARGE} {\n grid-gap: ${(props) => props.gap || GRID.GAP.LARGE};\n }\n\n @media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {\n display: -ms-grid;\n\n > *:not(:first-child) {\n margin-left: ${GRID.GAP.MEDIUM};\n }\n }\n\n @media print {\n grid-gap: 0;\n grid-template-columns: ${(props) => props.printColumns || 'none'};\n }\n`;\n"],"mappings":";;;;;;;;AAAA;AAEA;AAAsC;AAEtC,IAAMA,IAAI,GAAG;EACXC,GAAG,EAAE;IACHC,KAAK,EAAE,MAAM;IACbC,MAAM,EAAE,MAAM;IACdC,KAAK,EAAE;EACT,CAAC;EACDC,MAAM,EAAE;IACNH,KAAK,EAAE,gBAAgB;IACvBC,MAAM,EAAE,gBAAgB;IACxBC,KAAK,EAAE;EACT;AACF,CAAC;AAEM,IAAME,SAAS,GAAGC,yBAAM,CAACC,GAAG,+SAEvBR,IAAI,CAACK,MAAM,CAACH,KAAK,EACzB,UAAAO,KAAK;EAAA,OAAIA,KAAK,CAACC,WAAW,IAAI,kCAAkC;AAAA,GAEhEC,mBAAW,CAACR,MAAM,EACRH,IAAI,CAACK,MAAM,CAACF,MAAM,EAC1B,UAAAM,KAAK;EAAA,OAAIA,KAAK,CAACC,WAAW,IAAI,kCAAkC;AAAA,GAGlEC,mBAAW,CAACP,KAAK,EACPJ,IAAI,CAACK,MAAM,CAACD,KAAK,EACzB,UAAAK,KAAK;EAAA,OAAIA,KAAK,CAACC,WAAW,IAAI,kCAAkC;AAAA,GAGlEC,mBAAW,CAACP,KAAK,EACJ,UAACK,KAAK;EAAA,OACXA,KAAK,CAACG,WAAW,GACNH,KAAK,CAACI,QAAQ,GACP,mBAAmB,GAAGJ,KAAK,CAACI,QAAQ,GAAG,KAAK,GAC5C,oBAAoB,GAC5B,sBAAsB;AAAA,CAAC,EAGvC,UAAAJ,KAAK;EAAA,OAAIA,KAAK,CAACC,WAAW,IAAI,kCAAkC;AAAA,EAErE;AAAC;AAEK,IAAMI,OAAO,GAAGP,yBAAM,CAACQ,OAAO,ooBAGvB,UAACN,KAAK;EAAA,OAAKA,KAAK,CAACO,GAAG,IAAIhB,IAAI,CAACC,GAAG,CAACC,KAAK;AAAA,GAGhDS,mBAAW,CAACR,MAAM,EACO,UAACM,KAAK;EAAA,OAAKA,KAAK,CAACQ,OAAO;AAAA,GAC7B,UAACR,KAAK;EAAA,OAAKA,KAAK,CAACQ,OAAO;AAAA,GAChC,UAACR,KAAK;EAAA,OAAKA,KAAK,CAACO,GAAG,IAAIhB,IAAI,CAACC,GAAG,CAACE,MAAM;AAAA,GAGnDQ,mBAAW,CAACP,KAAK,EACL,UAACK,KAAK;EAAA,OAAKA,KAAK,CAACO,GAAG,IAAIhB,IAAI,CAACC,GAAG,CAACG,KAAK;AAAA,GAOjCJ,IAAI,CAACC,GAAG,CAACE,MAAM,EAMP,UAACM,KAAK;EAAA,OAAKA,KAAK,CAACS,YAAY,IAAI,MAAM;AAAA,EAEnE;AAAC"}
@@ -1,10 +1,10 @@
1
1
  export declare const PageWidth: import("styled-components").StyledComponent<"div", any, {
2
2
  useMaxWidth?: boolean | undefined;
3
3
  maxWidth?: number | undefined;
4
+ unsetMargin?: boolean | undefined;
4
5
  }, never>;
5
6
  export declare const Columns: import("styled-components").StyledComponent<"section", any, {
6
7
  gap?: string | undefined;
7
8
  columns?: string | undefined;
8
9
  printColumns?: string | undefined;
9
10
  }, never>;
10
- export declare const ContainerMargins: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -1,21 +1,29 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
2
- var _templateObject, _templateObject2, _templateObject3;
2
+ var _templateObject, _templateObject2;
3
3
  import styled from 'styled-components';
4
4
  import { BREAKPOINTS } from '../styles';
5
5
  var GRID = {
6
6
  GAP: {
7
- SMALL: '24px',
8
- MEDIUM: '32px',
9
- LARGE: '40px'
7
+ SMALL: '16px',
8
+ MEDIUM: '24px',
9
+ LARGE: '32px'
10
10
  },
11
11
  GUTTER: {
12
- SMALL: '16px',
13
- MEDIUM: '32px',
14
- LARGE: '56px'
12
+ SMALL: '16px 16px 32px',
13
+ MEDIUM: '24px 32px 64px',
14
+ LARGE: '32px 64px 128px'
15
15
  }
16
16
  };
17
- export var PageWidth = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: block;\n margin: 0 ", ";\n\n ", " {\n margin: 0 ", ";\n }\n ", " {\n margin: 0 ", ";\n }\n\n ", " {\n max-width: ", ";\n margin: 0 auto;\n }\n"])), GRID.GUTTER.SMALL, BREAKPOINTS.MEDIUM, GRID.GUTTER.MEDIUM, BREAKPOINTS.LARGE, GRID.GUTTER.LARGE, BREAKPOINTS.XLARGE, function (props) {
18
- return props.useMaxWidth ? props.maxWidth ? 'min(100% - 112px,' + props.maxWidth + 'px)' : 'calc(100% - 112px)' : '1088px';
17
+ export var PageWidth = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: block;\n margin: ", ";\n ", "\n\n ", " {\n margin: ", ";\n ", "\n }\n\n ", " {\n margin: ", ";\n ", "\n }\n\n ", " {\n max-width: ", ";\n\n margin: 32px auto 128px;\n ", "\n }\n"])), GRID.GUTTER.SMALL, function (props) {
18
+ return props.unsetMargin && 'margin-top: 0; margin-bottom: 0;';
19
+ }, BREAKPOINTS.MEDIUM, GRID.GUTTER.MEDIUM, function (props) {
20
+ return props.unsetMargin && 'margin-top: 0; margin-bottom: 0;';
21
+ }, BREAKPOINTS.LARGE, GRID.GUTTER.LARGE, function (props) {
22
+ return props.unsetMargin && 'margin-top: 0; margin-bottom: 0;';
23
+ }, BREAKPOINTS.LARGE, function (props) {
24
+ return props.useMaxWidth ? props.maxWidth ? 'min(100% - 128px,' + props.maxWidth + 'px)' : 'calc(100% - 128px)' : 'calc(1600px - 128px)';
25
+ }, function (props) {
26
+ return props.unsetMargin && 'margin-top: 0; margin-bottom: 0;';
19
27
  });
20
28
  export var Columns = styled.section(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n width: 100%;\n display: grid;\n grid-gap: ", ";\n word-break: break-word; /* Prevent long words from breaking the layout \u2013 consider making this rule global */\n\n ", " {\n grid-template-columns: ", ";\n -ms-grid-columns: ", ";\n grid-gap: ", ";\n }\n\n ", " {\n grid-gap: ", ";\n }\n\n @media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {\n display: -ms-grid;\n\n > *:not(:first-child) {\n margin-left: ", ";\n }\n }\n\n @media print {\n grid-gap: 0;\n grid-template-columns: ", ";\n }\n"])), function (props) {
21
29
  return props.gap || GRID.GAP.SMALL;
@@ -30,5 +38,4 @@ export var Columns = styled.section(_templateObject2 || (_templateObject2 = _tag
30
38
  }, GRID.GAP.MEDIUM, function (props) {
31
39
  return props.printColumns || 'none';
32
40
  });
33
- export var ContainerMargins = styled.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n /* X small devices (mobile phones, 320px and up) */\n @media only screen and (min-width: 320px) {\n margin: 16px;\n column-gap: 16px;\n }\n\n /* Small devices (portrait tablets, 576px and up) */\n @media only screen and (min-width: 576px) {\n margin: 16px;\n column-gap: 16px;\n }\n\n /* Medium devices (landscape tablets, 768px and up) */\n @media only screen and (min-width: 768px) {\n margin: 32px;\n column-gap: 32px;\n }\n\n /* Large devices (laptops/desktops, 992px and up) */\n @media only screen and (min-width: 992px) {\n margin: 56px;\n column-gap: 24px;\n }\n\n /* X large devices (laptops/desktops, 1200px and up) */\n @media only screen and (min-width: 1200px) {\n margin: 56px;\n column-gap: 40px;\n }\n"])));
34
41
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["styled","BREAKPOINTS","GRID","GAP","SMALL","MEDIUM","LARGE","GUTTER","PageWidth","div","XLARGE","props","useMaxWidth","maxWidth","Columns","section","gap","columns","printColumns","ContainerMargins"],"sources":["../../src/Layouts/index.ts"],"sourcesContent":["import styled from 'styled-components';\n\nimport { BREAKPOINTS } from '../styles';\n\nconst GRID = {\n GAP: {\n SMALL: '24px',\n MEDIUM: '32px',\n LARGE: '40px',\n },\n GUTTER: {\n SMALL: '16px',\n MEDIUM: '32px',\n LARGE: '56px',\n },\n};\n\nexport const PageWidth = styled.div<{ useMaxWidth?: boolean; maxWidth?: number }>`\n display: block;\n margin: 0 ${GRID.GUTTER.SMALL};\n\n ${BREAKPOINTS.MEDIUM} {\n margin: 0 ${GRID.GUTTER.MEDIUM};\n }\n ${BREAKPOINTS.LARGE} {\n margin: 0 ${GRID.GUTTER.LARGE};\n }\n\n ${BREAKPOINTS.XLARGE} {\n max-width: ${(props) => (props.useMaxWidth ? (props.maxWidth ? 'min(100% - 112px,' + props.maxWidth + 'px)' : 'calc(100% - 112px)') : '1088px')};\n margin: 0 auto;\n }\n`;\n\nexport const Columns = styled.section<{ gap?: string; columns?: string; printColumns?: string }>`\n width: 100%;\n display: grid;\n grid-gap: ${(props) => props.gap || GRID.GAP.SMALL};\n word-break: break-word; /* Prevent long words from breaking the layout – consider making this rule global */\n\n ${BREAKPOINTS.MEDIUM} {\n grid-template-columns: ${(props) => props.columns};\n -ms-grid-columns: ${(props) => props.columns};\n grid-gap: ${(props) => props.gap || GRID.GAP.MEDIUM};\n }\n\n ${BREAKPOINTS.LARGE} {\n grid-gap: ${(props) => props.gap || GRID.GAP.LARGE};\n }\n\n @media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {\n display: -ms-grid;\n\n > *:not(:first-child) {\n margin-left: ${GRID.GAP.MEDIUM};\n }\n }\n\n @media print {\n grid-gap: 0;\n grid-template-columns: ${(props) => props.printColumns || 'none'};\n }\n`;\n\nexport const ContainerMargins = styled.div`\n /* X small devices (mobile phones, 320px and up) */\n @media only screen and (min-width: 320px) {\n margin: 16px;\n column-gap: 16px;\n }\n\n /* Small devices (portrait tablets, 576px and up) */\n @media only screen and (min-width: 576px) {\n margin: 16px;\n column-gap: 16px;\n }\n\n /* Medium devices (landscape tablets, 768px and up) */\n @media only screen and (min-width: 768px) {\n margin: 32px;\n column-gap: 32px;\n }\n\n /* Large devices (laptops/desktops, 992px and up) */\n @media only screen and (min-width: 992px) {\n margin: 56px;\n column-gap: 24px;\n }\n\n /* X large devices (laptops/desktops, 1200px and up) */\n @media only screen and (min-width: 1200px) {\n margin: 56px;\n column-gap: 40px;\n }\n`;\n"],"mappings":";;AAAA,OAAOA,MAAM,MAAM,mBAAmB;AAEtC,SAASC,WAAW,QAAQ,WAAW;AAEvC,IAAMC,IAAI,GAAG;EACXC,GAAG,EAAE;IACHC,KAAK,EAAE,MAAM;IACbC,MAAM,EAAE,MAAM;IACdC,KAAK,EAAE;EACT,CAAC;EACDC,MAAM,EAAE;IACNH,KAAK,EAAE,MAAM;IACbC,MAAM,EAAE,MAAM;IACdC,KAAK,EAAE;EACT;AACF,CAAC;AAED,OAAO,IAAME,SAAS,GAAGR,MAAM,CAACS,GAAG,oPAErBP,IAAI,CAACK,MAAM,CAACH,KAAK,EAE3BH,WAAW,CAACI,MAAM,EACNH,IAAI,CAACK,MAAM,CAACF,MAAM,EAE9BJ,WAAW,CAACK,KAAK,EACLJ,IAAI,CAACK,MAAM,CAACD,KAAK,EAG7BL,WAAW,CAACS,MAAM,EACL,UAACC,KAAK;EAAA,OAAMA,KAAK,CAACC,WAAW,GAAID,KAAK,CAACE,QAAQ,GAAG,mBAAmB,GAAGF,KAAK,CAACE,QAAQ,GAAG,KAAK,GAAG,oBAAoB,GAAI,QAAQ;AAAA,CAAC,CAGlJ;AAED,OAAO,IAAMC,OAAO,GAAGd,MAAM,CAACe,OAAO,snBAGvB,UAACJ,KAAK;EAAA,OAAKA,KAAK,CAACK,GAAG,IAAId,IAAI,CAACC,GAAG,CAACC,KAAK;AAAA,GAGhDH,WAAW,CAACI,MAAM,EACO,UAACM,KAAK;EAAA,OAAKA,KAAK,CAACM,OAAO;AAAA,GAC7B,UAACN,KAAK;EAAA,OAAKA,KAAK,CAACM,OAAO;AAAA,GAChC,UAACN,KAAK;EAAA,OAAKA,KAAK,CAACK,GAAG,IAAId,IAAI,CAACC,GAAG,CAACE,MAAM;AAAA,GAGnDJ,WAAW,CAACK,KAAK,EACL,UAACK,KAAK;EAAA,OAAKA,KAAK,CAACK,GAAG,IAAId,IAAI,CAACC,GAAG,CAACG,KAAK;AAAA,GAOjCJ,IAAI,CAACC,GAAG,CAACE,MAAM,EAMP,UAACM,KAAK;EAAA,OAAKA,KAAK,CAACO,YAAY,IAAI,MAAM;AAAA,EAEnE;AAED,OAAO,IAAMC,gBAAgB,GAAGnB,MAAM,CAACS,GAAG,o0BA8BzC"}
1
+ {"version":3,"file":"index.js","names":["styled","BREAKPOINTS","GRID","GAP","SMALL","MEDIUM","LARGE","GUTTER","PageWidth","div","props","unsetMargin","useMaxWidth","maxWidth","Columns","section","gap","columns","printColumns"],"sources":["../../src/Layouts/index.ts"],"sourcesContent":["import styled from 'styled-components';\n\nimport {BREAKPOINTS} from '../styles';\n\nconst GRID = {\n GAP: {\n SMALL: '16px',\n MEDIUM: '24px',\n LARGE: '32px',\n },\n GUTTER: {\n SMALL: '16px 16px 32px',\n MEDIUM: '24px 32px 64px',\n LARGE: '32px 64px 128px',\n },\n};\n\nexport const PageWidth = styled.div<{ useMaxWidth?: boolean; maxWidth?: number; unsetMargin?: boolean; }>`\n display: block;\n margin: ${GRID.GUTTER.SMALL};\n ${props => props.unsetMargin && 'margin-top: 0; margin-bottom: 0;'}\n\n ${BREAKPOINTS.MEDIUM} {\n margin: ${GRID.GUTTER.MEDIUM};\n ${props => props.unsetMargin && 'margin-top: 0; margin-bottom: 0;'}\n }\n\n ${BREAKPOINTS.LARGE} {\n margin: ${GRID.GUTTER.LARGE};\n ${props => props.unsetMargin && 'margin-top: 0; margin-bottom: 0;'}\n }\n\n ${BREAKPOINTS.LARGE} {\n max-width: ${(props) => (\n props.useMaxWidth\n ? (props.maxWidth\n ? 'min(100% - 128px,' + props.maxWidth + 'px)'\n : 'calc(100% - 128px)')\n : 'calc(1600px - 128px)')};\n\n margin: 32px auto 128px;\n ${props => props.unsetMargin && 'margin-top: 0; margin-bottom: 0;'}\n }\n`;\n\nexport const Columns = styled.section<{ gap?: string; columns?: string; printColumns?: string }>`\n width: 100%;\n display: grid;\n grid-gap: ${(props) => props.gap || GRID.GAP.SMALL};\n word-break: break-word; /* Prevent long words from breaking the layout – consider making this rule global */\n\n ${BREAKPOINTS.MEDIUM} {\n grid-template-columns: ${(props) => props.columns};\n -ms-grid-columns: ${(props) => props.columns};\n grid-gap: ${(props) => props.gap || GRID.GAP.MEDIUM};\n }\n\n ${BREAKPOINTS.LARGE} {\n grid-gap: ${(props) => props.gap || GRID.GAP.LARGE};\n }\n\n @media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {\n display: -ms-grid;\n\n > *:not(:first-child) {\n margin-left: ${GRID.GAP.MEDIUM};\n }\n }\n\n @media print {\n grid-gap: 0;\n grid-template-columns: ${(props) => props.printColumns || 'none'};\n }\n`;\n"],"mappings":";;AAAA,OAAOA,MAAM,MAAM,mBAAmB;AAEtC,SAAQC,WAAW,QAAO,WAAW;AAErC,IAAMC,IAAI,GAAG;EACXC,GAAG,EAAE;IACHC,KAAK,EAAE,MAAM;IACbC,MAAM,EAAE,MAAM;IACdC,KAAK,EAAE;EACT,CAAC;EACDC,MAAM,EAAE;IACNH,KAAK,EAAE,gBAAgB;IACvBC,MAAM,EAAE,gBAAgB;IACxBC,KAAK,EAAE;EACT;AACF,CAAC;AAED,OAAO,IAAME,SAAS,GAAGR,MAAM,CAACS,GAAG,iSAEvBP,IAAI,CAACK,MAAM,CAACH,KAAK,EACzB,UAAAM,KAAK;EAAA,OAAIA,KAAK,CAACC,WAAW,IAAI,kCAAkC;AAAA,GAEhEV,WAAW,CAACI,MAAM,EACRH,IAAI,CAACK,MAAM,CAACF,MAAM,EAC1B,UAAAK,KAAK;EAAA,OAAIA,KAAK,CAACC,WAAW,IAAI,kCAAkC;AAAA,GAGlEV,WAAW,CAACK,KAAK,EACPJ,IAAI,CAACK,MAAM,CAACD,KAAK,EACzB,UAAAI,KAAK;EAAA,OAAIA,KAAK,CAACC,WAAW,IAAI,kCAAkC;AAAA,GAGlEV,WAAW,CAACK,KAAK,EACJ,UAACI,KAAK;EAAA,OACXA,KAAK,CAACE,WAAW,GACNF,KAAK,CAACG,QAAQ,GACP,mBAAmB,GAAGH,KAAK,CAACG,QAAQ,GAAG,KAAK,GAC5C,oBAAoB,GAC5B,sBAAsB;AAAA,CAAC,EAGvC,UAAAH,KAAK;EAAA,OAAIA,KAAK,CAACC,WAAW,IAAI,kCAAkC;AAAA,EAErE;AAED,OAAO,IAAMG,OAAO,GAAGd,MAAM,CAACe,OAAO,snBAGvB,UAACL,KAAK;EAAA,OAAKA,KAAK,CAACM,GAAG,IAAId,IAAI,CAACC,GAAG,CAACC,KAAK;AAAA,GAGhDH,WAAW,CAACI,MAAM,EACO,UAACK,KAAK;EAAA,OAAKA,KAAK,CAACO,OAAO;AAAA,GAC7B,UAACP,KAAK;EAAA,OAAKA,KAAK,CAACO,OAAO;AAAA,GAChC,UAACP,KAAK;EAAA,OAAKA,KAAK,CAACM,GAAG,IAAId,IAAI,CAACC,GAAG,CAACE,MAAM;AAAA,GAGnDJ,WAAW,CAACK,KAAK,EACL,UAACI,KAAK;EAAA,OAAKA,KAAK,CAACM,GAAG,IAAId,IAAI,CAACC,GAAG,CAACG,KAAK;AAAA,GAOjCJ,IAAI,CAACC,GAAG,CAACE,MAAM,EAMP,UAACK,KAAK;EAAA,OAAKA,KAAK,CAACQ,YAAY,IAAI,MAAM;AAAA,EAEnE"}
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.default = void 0;
7
+ exports.default = exports.NavItemDiv = void 0;
8
8
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
9
  var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
10
10
  var _propTypes = _interopRequireDefault(require("prop-types"));
@@ -13,17 +13,14 @@ var _react = _interopRequireDefault(require("react"));
13
13
  var _styles = require("../styles");
14
14
  var _typography = require("../styles/typography");
15
15
  var _zIndexes = require("../styles/z-indexes");
16
- var _common = require("../common");
17
16
  var _jsxRuntime = require("react/jsx-runtime");
18
17
  var _templateObject;
19
18
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
20
19
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
21
- var NavItemDiv = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n ", "\n\n margin: 0;\n padding: 0 21px 0 21px;\n height: 64px;\n\n display: flex;\n align-items: center;\n text-align: center;\n position: relative;\n\n &:after {\n content: '';\n display: block;\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n height: 3px;\n background-color: transparent;\n }\n\n &.active:not(.disabled) {\n z-index: ", ";\n background-color: ", ";\n color: ", ";\n &:after {\n background-color: ", ";\n }\n }\n\n &.disabled {\n color: ", ";\n background-color: ", ";\n &:after {\n background-color: ", ";\n }\n }\n\n &:hover:not(.disabled) {\n z-index: ", ";\n background-color: ", ";\n color: ", ";\n &:after {\n background-color: ", ";\n }\n }\n\n &.focus-visible {\n ", "\n }\n"])), (0, _typography.ComponentMStyling)(_typography.ComponentTextStyle.Regular, _styles.COLORS.neutral_600), _zIndexes.Z_INDEXES.active, _styles.COLORS.neutral_20, _styles.COLORS.neutral_800, _styles.COLORS.primary_600, _styles.COLORS.neutral_300, _styles.COLORS.neutral_100, _styles.COLORS.neutral_100, _zIndexes.Z_INDEXES.hover, _styles.COLORS.primary_20, _styles.COLORS.primary_700, _styles.COLORS.primary_600, _styles.focusStyles);
20
+ var NavItemDiv = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n ", "\n\n margin: 0;\n padding: 0 21px 0 21px;\n height: 64px;\n\n ", " {\n height: 80px;\n }\n\n display: flex;\n align-items: center;\n text-align: center;\n position: relative;\n\n &:after {\n content: '';\n display: block;\n position: absolute;\n background-color: transparent;\n height: 3px;\n border-radius: 3px;\n left: 2px;\n right: 2px;\n bottom: 2px;\n }\n\n &.active:not(.disabled) {\n z-index: ", ";\n background-color: ", ";\n color: ", ";\n\n &:after {\n background-color: ", ";\n }\n }\n\n &.disabled {\n color: ", ";\n background-color: ", ";\n\n &:after {\n background-color: ", ";\n }\n }\n\n &:hover:not(.disabled) {\n z-index: ", ";\n background-color: ", ";\n color: ", ";\n\n &:after {\n background-color: ", ";\n }\n }\n\n &:active:not(.disabled) {\n z-index: ", ";\n background-color: ", ";\n color: ", ";\n\n &:after {\n background-color: ", ";\n }\n }\n\n\n &:focus:not(.disabled) {\n ", "\n outline-offset: -4px;\n }\n"])), (0, _typography.ComponentMStyling)(_typography.ComponentTextStyle.Regular, _styles.COLORS.neutral_600), _styles.BREAKPOINTS.LARGE, _zIndexes.Z_INDEXES.active, _styles.COLORS.neutral_20, _styles.COLORS.neutral_800, _styles.COLORS.primary_600, _styles.COLORS.neutral_300, _styles.COLORS.neutral_100, _styles.COLORS.neutral_100, _zIndexes.Z_INDEXES.hover, _styles.COLORS.primary_20, _styles.COLORS.primary_700, _styles.COLORS.primary_700, _zIndexes.Z_INDEXES.active, _styles.COLORS.primary_100, _styles.COLORS.primary_800, _styles.COLORS.primary_800, _styles.focusStyles);
21
+ exports.NavItemDiv = NavItemDiv;
22
22
  var NavItem = function NavItem(props) {
23
- var focusVisibleRef = (0, _common.useFocusVisibleRef)();
24
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(NavItemDiv, _objectSpread(_objectSpread({}, props), {}, {
25
- ref: focusVisibleRef
26
- }));
23
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(NavItemDiv, _objectSpread({}, props));
27
24
  };
28
25
  var _default = NavItem;
29
26
  exports.default = _default;
@@ -1 +1 @@
1
- {"version":3,"file":"NavItem.cjs","names":["NavItemDiv","styled","div","ComponentMStyling","ComponentTextStyle","Regular","COLORS","neutral_600","Z_INDEXES","active","neutral_20","neutral_800","primary_600","neutral_300","neutral_100","hover","primary_20","primary_700","focusStyles","NavItem","props","focusVisibleRef","useFocusVisibleRef"],"sources":["../../src/NavItem/NavItem.tsx"],"sourcesContent":["import styled, { StyledComponentProps } from 'styled-components';\nimport React from 'react';\nimport {COLORS, focusStyles} from '../styles';\nimport { ComponentMStyling, ComponentTextStyle } from '../styles/typography';\nimport {Z_INDEXES} from '../styles/z-indexes';\nimport { useFocusVisibleRef } from '../common';\n\nexport type StyledComponentPropsWithAs<\n C extends string | React.ComponentType<any>,\n T extends object,\n O extends object,\n A extends keyof any,\n AsC extends string | React.ComponentType<any> = C,\n FAsC extends string | React.ComponentType<any> = C\n> = StyledComponentProps<C, T, O, A, FAsC> & { as?: AsC | undefined; forwardedAs?: FAsC | undefined };\n\n\nconst NavItemDiv = styled.div`\n ${ComponentMStyling(ComponentTextStyle.Regular, COLORS.neutral_600)}\n\n margin: 0;\n padding: 0 21px 0 21px;\n height: 64px;\n\n display: flex;\n align-items: center;\n text-align: center;\n position: relative;\n\n &:after {\n content: '';\n display: block;\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n height: 3px;\n background-color: transparent;\n }\n\n &.active:not(.disabled) {\n z-index: ${Z_INDEXES.active};\n background-color: ${COLORS.neutral_20};\n color: ${COLORS.neutral_800};\n &:after {\n background-color: ${COLORS.primary_600};\n }\n }\n\n &.disabled {\n color: ${COLORS.neutral_300};\n background-color: ${COLORS.neutral_100};\n &:after {\n background-color: ${COLORS.neutral_100};\n }\n }\n\n &:hover:not(.disabled) {\n z-index: ${Z_INDEXES.hover};\n background-color: ${COLORS.primary_20};\n color: ${COLORS.primary_700};\n &:after {\n background-color: ${COLORS.primary_600};\n }\n }\n\n &.focus-visible {\n ${focusStyles}\n }\n`;\n\n\nconst NavItem = (props: StyledComponentPropsWithAs<string | React.ComponentType<any>, any, {}, never, string | React.ComponentType<any>, \"div\">) => {\n const focusVisibleRef = useFocusVisibleRef();\n return (\n <NavItemDiv {...props} ref={focusVisibleRef} />\n );\n};\n\nexport default NavItem;\n"],"mappings":";;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AAA+C;AAAA;AAAA;AAAA;AAY/C,IAAMA,UAAU,GAAGC,yBAAM,CAACC,GAAG,m4BACzB,IAAAC,6BAAiB,EAACC,8BAAkB,CAACC,OAAO,EAAEC,cAAM,CAACC,WAAW,CAAC,EAuBtDC,mBAAS,CAACC,MAAM,EACPH,cAAM,CAACI,UAAU,EAC5BJ,cAAM,CAACK,WAAW,EAELL,cAAM,CAACM,WAAW,EAK/BN,cAAM,CAACO,WAAW,EACPP,cAAM,CAACQ,WAAW,EAEhBR,cAAM,CAACQ,WAAW,EAK7BN,mBAAS,CAACO,KAAK,EACNT,cAAM,CAACU,UAAU,EAC5BV,cAAM,CAACW,WAAW,EAELX,cAAM,CAACM,WAAW,EAKtCM,mBAAW,CAEhB;AAGD,IAAMC,OAAO,GAAG,SAAVA,OAAO,CAAIC,KAA8H,EAAK;EAClJ,IAAMC,eAAe,GAAG,IAAAC,0BAAkB,GAAE;EAC5C,oBACE,qBAAC,UAAU,kCAAKF,KAAK;IAAE,GAAG,EAAEC;EAAgB,GAAG;AAEnD,CAAC;AAAC,eAEaF,OAAO;AAAA"}
1
+ {"version":3,"file":"NavItem.cjs","names":["NavItemDiv","styled","div","ComponentMStyling","ComponentTextStyle","Regular","COLORS","neutral_600","BREAKPOINTS","LARGE","Z_INDEXES","active","neutral_20","neutral_800","primary_600","neutral_300","neutral_100","hover","primary_20","primary_700","primary_100","primary_800","focusStyles","NavItem","props"],"sources":["../../src/NavItem/NavItem.tsx"],"sourcesContent":["import styled, {StyledComponentProps} from 'styled-components';\nimport React from 'react';\nimport {BREAKPOINTS, COLORS, focusStyles} from '../styles';\nimport {ComponentMStyling, ComponentTextStyle} from '../styles/typography';\nimport {Z_INDEXES} from '../styles/z-indexes';\nimport {useFocusVisibleRef} from '../common';\n\nexport type StyledComponentPropsWithAs<\n C extends string | React.ComponentType<any>,\n T extends object,\n O extends object,\n A extends keyof any,\n AsC extends string | React.ComponentType<any> = C,\n FAsC extends string | React.ComponentType<any> = C\n> = StyledComponentProps<C, T, O, A, FAsC> & { as?: AsC | undefined; forwardedAs?: FAsC | undefined };\n\n\nexport const NavItemDiv = styled.div`\n ${ComponentMStyling(ComponentTextStyle.Regular, COLORS.neutral_600)}\n\n margin: 0;\n padding: 0 21px 0 21px;\n height: 64px;\n\n ${BREAKPOINTS.LARGE} {\n height: 80px;\n }\n\n display: flex;\n align-items: center;\n text-align: center;\n position: relative;\n\n &:after {\n content: '';\n display: block;\n position: absolute;\n background-color: transparent;\n height: 3px;\n border-radius: 3px;\n left: 2px;\n right: 2px;\n bottom: 2px;\n }\n\n &.active:not(.disabled) {\n z-index: ${Z_INDEXES.active};\n background-color: ${COLORS.neutral_20};\n color: ${COLORS.neutral_800};\n\n &:after {\n background-color: ${COLORS.primary_600};\n }\n }\n\n &.disabled {\n color: ${COLORS.neutral_300};\n background-color: ${COLORS.neutral_100};\n\n &:after {\n background-color: ${COLORS.neutral_100};\n }\n }\n\n &:hover:not(.disabled) {\n z-index: ${Z_INDEXES.hover};\n background-color: ${COLORS.primary_20};\n color: ${COLORS.primary_700};\n\n &:after {\n background-color: ${COLORS.primary_700};\n }\n }\n\n &:active:not(.disabled) {\n z-index: ${Z_INDEXES.active};\n background-color: ${COLORS.primary_100};\n color: ${COLORS.primary_800};\n\n &:after {\n background-color: ${COLORS.primary_800};\n }\n }\n\n\n &:focus:not(.disabled) {\n ${focusStyles}\n outline-offset: -4px;\n }\n`;\n\n\nconst NavItem = (props: StyledComponentPropsWithAs<string | React.ComponentType<any>, any, {}, never, string | React.ComponentType<any>, \"div\">) => {\n return (\n <NavItemDiv {...props} />\n );\n};\n\nexport default NavItem;\n"],"mappings":";;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AAA8C;AAAA;AAAA;AAAA;AAavC,IAAMA,UAAU,GAAGC,yBAAM,CAACC,GAAG,8oCAChC,IAAAC,6BAAiB,EAACC,8BAAkB,CAACC,OAAO,EAAEC,cAAM,CAACC,WAAW,CAAC,EAMjEC,mBAAW,CAACC,KAAK,EAsBNC,mBAAS,CAACC,MAAM,EACPL,cAAM,CAACM,UAAU,EAC5BN,cAAM,CAACO,WAAW,EAGLP,cAAM,CAACQ,WAAW,EAK/BR,cAAM,CAACS,WAAW,EACPT,cAAM,CAACU,WAAW,EAGhBV,cAAM,CAACU,WAAW,EAK7BN,mBAAS,CAACO,KAAK,EACNX,cAAM,CAACY,UAAU,EAC5BZ,cAAM,CAACa,WAAW,EAGLb,cAAM,CAACa,WAAW,EAK7BT,mBAAS,CAACC,MAAM,EACPL,cAAM,CAACc,WAAW,EAC7Bd,cAAM,CAACe,WAAW,EAGLf,cAAM,CAACe,WAAW,EAMtCC,mBAAW,CAGhB;AAAC;AAGF,IAAMC,OAAO,GAAG,SAAVA,OAAO,CAAIC,KAA8H,EAAK;EAClJ,oBACE,qBAAC,UAAU,oBAAKA,KAAK,EAAI;AAE7B,CAAC;AAAC,eAEaD,OAAO;AAAA"}
@@ -4,5 +4,6 @@ export type StyledComponentPropsWithAs<C extends string | React.ComponentType<an
4
4
  as?: AsC | undefined;
5
5
  forwardedAs?: FAsC | undefined;
6
6
  };
7
+ export declare const NavItemDiv: import("styled-components").StyledComponent<"div", any, {}, never>;
7
8
  declare const NavItem: (props: StyledComponentPropsWithAs<string | React.ComponentType<any>, any, {}, never, string | React.ComponentType<any>, "div">) => JSX.Element;
8
9
  export default NavItem;
@@ -6,17 +6,13 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
6
6
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
7
7
  import styled from 'styled-components';
8
8
  import React from 'react';
9
- import { COLORS, focusStyles } from '../styles';
9
+ import { BREAKPOINTS, COLORS, focusStyles } from '../styles';
10
10
  import { ComponentMStyling, ComponentTextStyle } from '../styles/typography';
11
11
  import { Z_INDEXES } from '../styles/z-indexes';
12
- import { useFocusVisibleRef } from '../common';
13
12
  import { jsx as _jsx } from "react/jsx-runtime";
14
- var NavItemDiv = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n\n margin: 0;\n padding: 0 21px 0 21px;\n height: 64px;\n\n display: flex;\n align-items: center;\n text-align: center;\n position: relative;\n\n &:after {\n content: '';\n display: block;\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n height: 3px;\n background-color: transparent;\n }\n\n &.active:not(.disabled) {\n z-index: ", ";\n background-color: ", ";\n color: ", ";\n &:after {\n background-color: ", ";\n }\n }\n\n &.disabled {\n color: ", ";\n background-color: ", ";\n &:after {\n background-color: ", ";\n }\n }\n\n &:hover:not(.disabled) {\n z-index: ", ";\n background-color: ", ";\n color: ", ";\n &:after {\n background-color: ", ";\n }\n }\n\n &.focus-visible {\n ", "\n }\n"])), ComponentMStyling(ComponentTextStyle.Regular, COLORS.neutral_600), Z_INDEXES.active, COLORS.neutral_20, COLORS.neutral_800, COLORS.primary_600, COLORS.neutral_300, COLORS.neutral_100, COLORS.neutral_100, Z_INDEXES.hover, COLORS.primary_20, COLORS.primary_700, COLORS.primary_600, focusStyles);
13
+ export var NavItemDiv = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n\n margin: 0;\n padding: 0 21px 0 21px;\n height: 64px;\n\n ", " {\n height: 80px;\n }\n\n display: flex;\n align-items: center;\n text-align: center;\n position: relative;\n\n &:after {\n content: '';\n display: block;\n position: absolute;\n background-color: transparent;\n height: 3px;\n border-radius: 3px;\n left: 2px;\n right: 2px;\n bottom: 2px;\n }\n\n &.active:not(.disabled) {\n z-index: ", ";\n background-color: ", ";\n color: ", ";\n\n &:after {\n background-color: ", ";\n }\n }\n\n &.disabled {\n color: ", ";\n background-color: ", ";\n\n &:after {\n background-color: ", ";\n }\n }\n\n &:hover:not(.disabled) {\n z-index: ", ";\n background-color: ", ";\n color: ", ";\n\n &:after {\n background-color: ", ";\n }\n }\n\n &:active:not(.disabled) {\n z-index: ", ";\n background-color: ", ";\n color: ", ";\n\n &:after {\n background-color: ", ";\n }\n }\n\n\n &:focus:not(.disabled) {\n ", "\n outline-offset: -4px;\n }\n"])), ComponentMStyling(ComponentTextStyle.Regular, COLORS.neutral_600), BREAKPOINTS.LARGE, Z_INDEXES.active, COLORS.neutral_20, COLORS.neutral_800, COLORS.primary_600, COLORS.neutral_300, COLORS.neutral_100, COLORS.neutral_100, Z_INDEXES.hover, COLORS.primary_20, COLORS.primary_700, COLORS.primary_700, Z_INDEXES.active, COLORS.primary_100, COLORS.primary_800, COLORS.primary_800, focusStyles);
15
14
  var NavItem = function NavItem(props) {
16
- var focusVisibleRef = useFocusVisibleRef();
17
- return /*#__PURE__*/_jsx(NavItemDiv, _objectSpread(_objectSpread({}, props), {}, {
18
- ref: focusVisibleRef
19
- }));
15
+ return /*#__PURE__*/_jsx(NavItemDiv, _objectSpread({}, props));
20
16
  };
21
17
  export default NavItem;
22
18
  //# sourceMappingURL=NavItem.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"NavItem.js","names":["styled","React","COLORS","focusStyles","ComponentMStyling","ComponentTextStyle","Z_INDEXES","useFocusVisibleRef","NavItemDiv","div","Regular","neutral_600","active","neutral_20","neutral_800","primary_600","neutral_300","neutral_100","hover","primary_20","primary_700","NavItem","props","focusVisibleRef"],"sources":["../../src/NavItem/NavItem.tsx"],"sourcesContent":["import styled, { StyledComponentProps } from 'styled-components';\nimport React from 'react';\nimport {COLORS, focusStyles} from '../styles';\nimport { ComponentMStyling, ComponentTextStyle } from '../styles/typography';\nimport {Z_INDEXES} from '../styles/z-indexes';\nimport { useFocusVisibleRef } from '../common';\n\nexport type StyledComponentPropsWithAs<\n C extends string | React.ComponentType<any>,\n T extends object,\n O extends object,\n A extends keyof any,\n AsC extends string | React.ComponentType<any> = C,\n FAsC extends string | React.ComponentType<any> = C\n> = StyledComponentProps<C, T, O, A, FAsC> & { as?: AsC | undefined; forwardedAs?: FAsC | undefined };\n\n\nconst NavItemDiv = styled.div`\n ${ComponentMStyling(ComponentTextStyle.Regular, COLORS.neutral_600)}\n\n margin: 0;\n padding: 0 21px 0 21px;\n height: 64px;\n\n display: flex;\n align-items: center;\n text-align: center;\n position: relative;\n\n &:after {\n content: '';\n display: block;\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n height: 3px;\n background-color: transparent;\n }\n\n &.active:not(.disabled) {\n z-index: ${Z_INDEXES.active};\n background-color: ${COLORS.neutral_20};\n color: ${COLORS.neutral_800};\n &:after {\n background-color: ${COLORS.primary_600};\n }\n }\n\n &.disabled {\n color: ${COLORS.neutral_300};\n background-color: ${COLORS.neutral_100};\n &:after {\n background-color: ${COLORS.neutral_100};\n }\n }\n\n &:hover:not(.disabled) {\n z-index: ${Z_INDEXES.hover};\n background-color: ${COLORS.primary_20};\n color: ${COLORS.primary_700};\n &:after {\n background-color: ${COLORS.primary_600};\n }\n }\n\n &.focus-visible {\n ${focusStyles}\n }\n`;\n\n\nconst NavItem = (props: StyledComponentPropsWithAs<string | React.ComponentType<any>, any, {}, never, string | React.ComponentType<any>, \"div\">) => {\n const focusVisibleRef = useFocusVisibleRef();\n return (\n <NavItemDiv {...props} ref={focusVisibleRef} />\n );\n};\n\nexport default NavItem;\n"],"mappings":";;;;;;AAAA,OAAOA,MAAM,MAAgC,mBAAmB;AAChE,OAAOC,KAAK,MAAM,OAAO;AACzB,SAAQC,MAAM,EAAEC,WAAW,QAAO,WAAW;AAC7C,SAASC,iBAAiB,EAAEC,kBAAkB,QAAQ,sBAAsB;AAC5E,SAAQC,SAAS,QAAO,qBAAqB;AAC7C,SAASC,kBAAkB,QAAQ,WAAW;AAAC;AAY/C,IAAMC,UAAU,GAAGR,MAAM,CAACS,GAAG,q3BACzBL,iBAAiB,CAACC,kBAAkB,CAACK,OAAO,EAAER,MAAM,CAACS,WAAW,CAAC,EAuBtDL,SAAS,CAACM,MAAM,EACPV,MAAM,CAACW,UAAU,EAC5BX,MAAM,CAACY,WAAW,EAELZ,MAAM,CAACa,WAAW,EAK/Bb,MAAM,CAACc,WAAW,EACPd,MAAM,CAACe,WAAW,EAEhBf,MAAM,CAACe,WAAW,EAK7BX,SAAS,CAACY,KAAK,EACNhB,MAAM,CAACiB,UAAU,EAC5BjB,MAAM,CAACkB,WAAW,EAELlB,MAAM,CAACa,WAAW,EAKtCZ,WAAW,CAEhB;AAGD,IAAMkB,OAAO,GAAG,SAAVA,OAAO,CAAIC,KAA8H,EAAK;EAClJ,IAAMC,eAAe,GAAGhB,kBAAkB,EAAE;EAC5C,oBACE,KAAC,UAAU,kCAAKe,KAAK;IAAE,GAAG,EAAEC;EAAgB,GAAG;AAEnD,CAAC;AAED,eAAeF,OAAO"}
1
+ {"version":3,"file":"NavItem.js","names":["styled","React","BREAKPOINTS","COLORS","focusStyles","ComponentMStyling","ComponentTextStyle","Z_INDEXES","NavItemDiv","div","Regular","neutral_600","LARGE","active","neutral_20","neutral_800","primary_600","neutral_300","neutral_100","hover","primary_20","primary_700","primary_100","primary_800","NavItem","props"],"sources":["../../src/NavItem/NavItem.tsx"],"sourcesContent":["import styled, {StyledComponentProps} from 'styled-components';\nimport React from 'react';\nimport {BREAKPOINTS, COLORS, focusStyles} from '../styles';\nimport {ComponentMStyling, ComponentTextStyle} from '../styles/typography';\nimport {Z_INDEXES} from '../styles/z-indexes';\nimport {useFocusVisibleRef} from '../common';\n\nexport type StyledComponentPropsWithAs<\n C extends string | React.ComponentType<any>,\n T extends object,\n O extends object,\n A extends keyof any,\n AsC extends string | React.ComponentType<any> = C,\n FAsC extends string | React.ComponentType<any> = C\n> = StyledComponentProps<C, T, O, A, FAsC> & { as?: AsC | undefined; forwardedAs?: FAsC | undefined };\n\n\nexport const NavItemDiv = styled.div`\n ${ComponentMStyling(ComponentTextStyle.Regular, COLORS.neutral_600)}\n\n margin: 0;\n padding: 0 21px 0 21px;\n height: 64px;\n\n ${BREAKPOINTS.LARGE} {\n height: 80px;\n }\n\n display: flex;\n align-items: center;\n text-align: center;\n position: relative;\n\n &:after {\n content: '';\n display: block;\n position: absolute;\n background-color: transparent;\n height: 3px;\n border-radius: 3px;\n left: 2px;\n right: 2px;\n bottom: 2px;\n }\n\n &.active:not(.disabled) {\n z-index: ${Z_INDEXES.active};\n background-color: ${COLORS.neutral_20};\n color: ${COLORS.neutral_800};\n\n &:after {\n background-color: ${COLORS.primary_600};\n }\n }\n\n &.disabled {\n color: ${COLORS.neutral_300};\n background-color: ${COLORS.neutral_100};\n\n &:after {\n background-color: ${COLORS.neutral_100};\n }\n }\n\n &:hover:not(.disabled) {\n z-index: ${Z_INDEXES.hover};\n background-color: ${COLORS.primary_20};\n color: ${COLORS.primary_700};\n\n &:after {\n background-color: ${COLORS.primary_700};\n }\n }\n\n &:active:not(.disabled) {\n z-index: ${Z_INDEXES.active};\n background-color: ${COLORS.primary_100};\n color: ${COLORS.primary_800};\n\n &:after {\n background-color: ${COLORS.primary_800};\n }\n }\n\n\n &:focus:not(.disabled) {\n ${focusStyles}\n outline-offset: -4px;\n }\n`;\n\n\nconst NavItem = (props: StyledComponentPropsWithAs<string | React.ComponentType<any>, any, {}, never, string | React.ComponentType<any>, \"div\">) => {\n return (\n <NavItemDiv {...props} />\n );\n};\n\nexport default NavItem;\n"],"mappings":";;;;;;AAAA,OAAOA,MAAM,MAA8B,mBAAmB;AAC9D,OAAOC,KAAK,MAAM,OAAO;AACzB,SAAQC,WAAW,EAAEC,MAAM,EAAEC,WAAW,QAAO,WAAW;AAC1D,SAAQC,iBAAiB,EAAEC,kBAAkB,QAAO,sBAAsB;AAC1E,SAAQC,SAAS,QAAO,qBAAqB;AAAC;AAa9C,OAAO,IAAMC,UAAU,GAAGR,MAAM,CAACS,GAAG,goCAChCJ,iBAAiB,CAACC,kBAAkB,CAACI,OAAO,EAAEP,MAAM,CAACQ,WAAW,CAAC,EAMjET,WAAW,CAACU,KAAK,EAsBNL,SAAS,CAACM,MAAM,EACPV,MAAM,CAACW,UAAU,EAC5BX,MAAM,CAACY,WAAW,EAGLZ,MAAM,CAACa,WAAW,EAK/Bb,MAAM,CAACc,WAAW,EACPd,MAAM,CAACe,WAAW,EAGhBf,MAAM,CAACe,WAAW,EAK7BX,SAAS,CAACY,KAAK,EACNhB,MAAM,CAACiB,UAAU,EAC5BjB,MAAM,CAACkB,WAAW,EAGLlB,MAAM,CAACkB,WAAW,EAK7Bd,SAAS,CAACM,MAAM,EACPV,MAAM,CAACmB,WAAW,EAC7BnB,MAAM,CAACoB,WAAW,EAGLpB,MAAM,CAACoB,WAAW,EAMtCnB,WAAW,CAGhB;AAGD,IAAMoB,OAAO,GAAG,SAAVA,OAAO,CAAIC,KAA8H,EAAK;EAClJ,oBACE,KAAC,UAAU,oBAAKA,KAAK,EAAI;AAE7B,CAAC;AAED,eAAeD,OAAO"}
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ var _typeof = require("@babel/runtime/helpers/typeof");
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.default = void 0;
9
+ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
10
+ var _propTypes = _interopRequireDefault(require("prop-types"));
11
+ var React = _interopRequireWildcard(require("react"));
12
+ var _types = require("../types");
13
+ var _jsxRuntime = require("react/jsx-runtime");
14
+ var _excluded = ["active", "item", "onClickHandler", "size", "className", "tabIndex", "iconRight", "id"];
15
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
16
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
17
+ var NestedNavItem = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
18
+ var active = _ref.active,
19
+ item = _ref.item,
20
+ onClickHandler = _ref.onClickHandler,
21
+ _ref$size = _ref.size,
22
+ size = _ref$size === void 0 ? _types.Size.Medium : _ref$size,
23
+ className = _ref.className,
24
+ tabIndex = _ref.tabIndex,
25
+ iconRight = _ref.iconRight,
26
+ id = _ref.id,
27
+ rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
28
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {});
29
+ });
30
+ NestedNavItem.propTypes = {
31
+ onClickHandler: _propTypes.default.func.isRequired,
32
+ active: _propTypes.default.bool.isRequired,
33
+ id: _propTypes.default.string.isRequired,
34
+ iconRight: _propTypes.default.element
35
+ };
36
+ var _default = NestedNavItem;
37
+ exports.default = _default;
38
+ //# sourceMappingURL=NestedNavItem.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NestedNavItem.cjs","names":["NestedNavItem","React","forwardRef","ref","active","item","onClickHandler","size","Size","Medium","className","tabIndex","iconRight","id","rest"],"sources":["../../src/NavItem/NestedNavItem.tsx"],"sourcesContent":["import * as React from 'react';\nimport {Size} from '../types';\nimport { DropdownItem } from '../Dropdown/DropdownContent';\n\nexport interface MenuItemProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'id' | 'disabled' | 'onMouseDown' | 'onClick'> {\n item: DropdownItem;\n onClickHandler: (e: React.MouseEvent) => void;\n active: boolean;\n id: string;\n size?: Size;\n iconRight?: React.ReactElement;\n}\n\n\nconst NestedNavItem = React.forwardRef<HTMLButtonElement, MenuItemProps>(({\n active,\n item,\n onClickHandler,\n size = Size.Medium,\n className,\n tabIndex,\n iconRight,\n id,\n ...rest\n }: MenuItemProps, ref) => {\n return (\n <></>\n );\n});\n\nexport default NestedNavItem;\n"],"mappings":";;;;;;;;;;AAAA;AACA;AAA8B;AAAA;AAAA;AAAA;AAa9B,IAAMA,aAAa,gBAAGC,KAAK,CAACC,UAAU,CAAmC,gBAUcC,GAAG,EAAK;EAAA,IATxBC,MAAM,QAANA,MAAM;IACNC,IAAI,QAAJA,IAAI;IACJC,cAAc,QAAdA,cAAc;IAAA,iBACdC,IAAI;IAAJA,IAAI,0BAAGC,WAAI,CAACC,MAAM;IAClBC,SAAS,QAATA,SAAS;IACTC,QAAQ,QAARA,QAAQ;IACRC,SAAS,QAATA,SAAS;IACTC,EAAE,QAAFA,EAAE;IACCC,IAAI;EAE5E,oBACC,8CAAK;AAER,CAAC,CAAC;AAAC;EAtBAR,cAAc;EACdF,MAAM;EACNS,EAAE;EAEFD,SAAS;AAAA;AAAA,eAoBGZ,aAAa;AAAA"}
@@ -0,0 +1,13 @@
1
+ import * as React from 'react';
2
+ import { Size } from '../types';
3
+ import { DropdownItem } from '../Dropdown/DropdownContent';
4
+ export interface MenuItemProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'id' | 'disabled' | 'onMouseDown' | 'onClick'> {
5
+ item: DropdownItem;
6
+ onClickHandler: (e: React.MouseEvent) => void;
7
+ active: boolean;
8
+ id: string;
9
+ size?: Size;
10
+ iconRight?: React.ReactElement;
11
+ }
12
+ declare const NestedNavItem: React.ForwardRefExoticComponent<MenuItemProps & React.RefAttributes<HTMLButtonElement>>;
13
+ export default NestedNavItem;
@@ -0,0 +1,28 @@
1
+ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
2
+ import _pt from "prop-types";
3
+ var _excluded = ["active", "item", "onClickHandler", "size", "className", "tabIndex", "iconRight", "id"];
4
+ import * as React from 'react';
5
+ import { Size } from '../types';
6
+ import { Fragment as _Fragment } from "react/jsx-runtime";
7
+ import { jsx as _jsx } from "react/jsx-runtime";
8
+ var NestedNavItem = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
9
+ var active = _ref.active,
10
+ item = _ref.item,
11
+ onClickHandler = _ref.onClickHandler,
12
+ _ref$size = _ref.size,
13
+ size = _ref$size === void 0 ? Size.Medium : _ref$size,
14
+ className = _ref.className,
15
+ tabIndex = _ref.tabIndex,
16
+ iconRight = _ref.iconRight,
17
+ id = _ref.id,
18
+ rest = _objectWithoutProperties(_ref, _excluded);
19
+ return /*#__PURE__*/_jsx(_Fragment, {});
20
+ });
21
+ NestedNavItem.propTypes = {
22
+ onClickHandler: _pt.func.isRequired,
23
+ active: _pt.bool.isRequired,
24
+ id: _pt.string.isRequired,
25
+ iconRight: _pt.element
26
+ };
27
+ export default NestedNavItem;
28
+ //# sourceMappingURL=NestedNavItem.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NestedNavItem.js","names":["React","Size","NestedNavItem","forwardRef","ref","active","item","onClickHandler","size","Medium","className","tabIndex","iconRight","id","rest"],"sources":["../../src/NavItem/NestedNavItem.tsx"],"sourcesContent":["import * as React from 'react';\nimport {Size} from '../types';\nimport { DropdownItem } from '../Dropdown/DropdownContent';\n\nexport interface MenuItemProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'id' | 'disabled' | 'onMouseDown' | 'onClick'> {\n item: DropdownItem;\n onClickHandler: (e: React.MouseEvent) => void;\n active: boolean;\n id: string;\n size?: Size;\n iconRight?: React.ReactElement;\n}\n\n\nconst NestedNavItem = React.forwardRef<HTMLButtonElement, MenuItemProps>(({\n active,\n item,\n onClickHandler,\n size = Size.Medium,\n className,\n tabIndex,\n iconRight,\n id,\n ...rest\n }: MenuItemProps, ref) => {\n return (\n <></>\n );\n});\n\nexport default NestedNavItem;\n"],"mappings":";;;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAAQC,IAAI,QAAO,UAAU;AAAC;AAAA;AAa9B,IAAMC,aAAa,gBAAGF,KAAK,CAACG,UAAU,CAAmC,gBAUcC,GAAG,EAAK;EAAA,IATxBC,MAAM,QAANA,MAAM;IACNC,IAAI,QAAJA,IAAI;IACJC,cAAc,QAAdA,cAAc;IAAA,iBACdC,IAAI;IAAJA,IAAI,0BAAGP,IAAI,CAACQ,MAAM;IAClBC,SAAS,QAATA,SAAS;IACTC,QAAQ,QAARA,QAAQ;IACRC,SAAS,QAATA,SAAS;IACTC,EAAE,QAAFA,EAAE;IACCC,IAAI;EAE5E,oBACC,mBAAK;AAER,CAAC,CAAC;AAAC;EAtBAP,cAAc;EACdF,MAAM;EACNQ,EAAE;EAEFD,SAAS;AAAA;AAoBZ,eAAeV,aAAa"}