@laerdal/life-react-components 2.1.1-dev.9.full → 2.2.1-dev.1

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 (113) hide show
  1. package/dist/AuthPage/AuthPage.js +1 -1
  2. package/dist/Banners/Banner.cjs.map +1 -1
  3. package/dist/Banners/Banner.js.map +1 -1
  4. package/dist/Button/Button.js +1 -1
  5. package/dist/Button/Iconbutton.cjs.map +1 -1
  6. package/dist/Button/Iconbutton.d.ts +1 -1
  7. package/dist/Button/Iconbutton.js.map +1 -1
  8. package/dist/Card/HorizontalCard/HorizontalCard.cjs +9 -3
  9. package/dist/Card/HorizontalCard/HorizontalCard.cjs.map +1 -1
  10. package/dist/Card/HorizontalCard/HorizontalCard.js +9 -3
  11. package/dist/Card/HorizontalCard/HorizontalCard.js.map +1 -1
  12. package/dist/Card/HorizontalCard/HorizontalCardThumbnail.js +1 -1
  13. package/dist/Card/HorizontalCard/types.cjs.map +1 -1
  14. package/dist/Card/HorizontalCard/types.d.ts +2 -1
  15. package/dist/Card/HorizontalCard/types.js.map +1 -1
  16. package/dist/Dropdown/BasicDropdown.cjs +17 -5
  17. package/dist/Dropdown/BasicDropdown.cjs.map +1 -1
  18. package/dist/Dropdown/BasicDropdown.d.ts +1 -0
  19. package/dist/Dropdown/BasicDropdown.js +18 -6
  20. package/dist/Dropdown/BasicDropdown.js.map +1 -1
  21. package/dist/Dropdown/CommonStyling.cjs +6 -3
  22. package/dist/Dropdown/CommonStyling.cjs.map +1 -1
  23. package/dist/Dropdown/CommonStyling.d.ts +3 -1
  24. package/dist/Dropdown/CommonStyling.js +6 -3
  25. package/dist/Dropdown/CommonStyling.js.map +1 -1
  26. package/dist/Dropdown/DropdownContent.cjs +1 -1
  27. package/dist/Dropdown/DropdownContent.js +1 -1
  28. package/dist/Dropdown/DropdownFilter.cjs +11 -1
  29. package/dist/Dropdown/DropdownFilter.cjs.map +1 -1
  30. package/dist/Dropdown/DropdownFilter.js +11 -1
  31. package/dist/Dropdown/DropdownFilter.js.map +1 -1
  32. package/dist/Footer/Components/FooterNewsletterAndSocialSection.cjs.map +1 -1
  33. package/dist/Footer/Components/FooterNewsletterAndSocialSection.js.map +1 -1
  34. package/dist/GlobalNavigationBar/GlobalNavigationBar.js +1 -1
  35. package/dist/GlobalNavigationBar/Logo.cjs.map +1 -1
  36. package/dist/GlobalNavigationBar/Logo.js.map +1 -1
  37. package/dist/GlobalNavigationBar/desktop/DesktopActions.cjs +15 -10
  38. package/dist/GlobalNavigationBar/desktop/DesktopActions.cjs.map +1 -1
  39. package/dist/GlobalNavigationBar/desktop/DesktopActions.js +15 -10
  40. package/dist/GlobalNavigationBar/desktop/DesktopActions.js.map +1 -1
  41. package/dist/GlobalNavigationBar/desktop/RightSideNav.cjs +16 -4
  42. package/dist/GlobalNavigationBar/desktop/RightSideNav.cjs.map +1 -1
  43. package/dist/GlobalNavigationBar/desktop/RightSideNav.js +16 -4
  44. package/dist/GlobalNavigationBar/desktop/RightSideNav.js.map +1 -1
  45. package/dist/GlobalNavigationBar/mobile/MobileActionContainer.cjs +2 -2
  46. package/dist/GlobalNavigationBar/mobile/MobileActionContainer.cjs.map +1 -1
  47. package/dist/GlobalNavigationBar/mobile/MobileActionContainer.js +2 -2
  48. package/dist/GlobalNavigationBar/mobile/MobileActionContainer.js.map +1 -1
  49. package/dist/GlobalNavigationBar/mobile/MobileMenu.cjs.map +1 -1
  50. package/dist/GlobalNavigationBar/mobile/MobileMenu.js.map +1 -1
  51. package/dist/GlobalNavigationBar/types.cjs.map +1 -1
  52. package/dist/GlobalNavigationBar/types.d.ts +5 -5
  53. package/dist/GlobalNavigationBar/types.js.map +1 -1
  54. package/dist/Image/ImageWithFallbacks.js +1 -1
  55. package/dist/InputFields/DatepickerField.cjs +19 -6
  56. package/dist/InputFields/DatepickerField.cjs.map +1 -1
  57. package/dist/InputFields/DatepickerField.js +20 -7
  58. package/dist/InputFields/DatepickerField.js.map +1 -1
  59. package/dist/InputFields/DatepickerFieldHeader.cjs.map +1 -1
  60. package/dist/InputFields/DatepickerFieldHeader.js +1 -1
  61. package/dist/InputFields/DatepickerFieldHeader.js.map +1 -1
  62. package/dist/InputFields/NumberField.cjs +14 -4
  63. package/dist/InputFields/NumberField.cjs.map +1 -1
  64. package/dist/InputFields/NumberField.js +15 -5
  65. package/dist/InputFields/NumberField.js.map +1 -1
  66. package/dist/InputFields/PasswordField.js +1 -1
  67. package/dist/InputFields/SearchBar.js +1 -1
  68. package/dist/InputFields/TextField.cjs +11 -1
  69. package/dist/InputFields/TextField.cjs.map +1 -1
  70. package/dist/InputFields/TextField.js +12 -2
  71. package/dist/InputFields/TextField.js.map +1 -1
  72. package/dist/InputFields/styling.cjs +7 -3
  73. package/dist/InputFields/styling.cjs.map +1 -1
  74. package/dist/InputFields/styling.d.ts +1 -0
  75. package/dist/InputFields/styling.js +7 -3
  76. package/dist/InputFields/styling.js.map +1 -1
  77. package/dist/LinearProgress/LinearProgress.js +1 -1
  78. package/dist/Paginator/Paginator.cjs.map +1 -1
  79. package/dist/Paginator/Paginator.js.map +1 -1
  80. package/dist/Table/Table.cjs +1 -1
  81. package/dist/Table/Table.js +1 -1
  82. package/dist/Table/TableFooter.cjs.map +1 -1
  83. package/dist/Table/TableFooter.js +1 -1
  84. package/dist/Table/TableFooter.js.map +1 -1
  85. package/dist/Tooltips/TooltipOverflow.cjs +117 -0
  86. package/dist/Tooltips/TooltipOverflow.cjs.map +1 -0
  87. package/dist/Tooltips/TooltipOverflow.d.ts +10 -0
  88. package/dist/Tooltips/TooltipOverflow.js +107 -0
  89. package/dist/Tooltips/TooltipOverflow.js.map +1 -0
  90. package/dist/Tooltips/TooltipStyles.cjs +7 -2
  91. package/dist/Tooltips/TooltipStyles.cjs.map +1 -1
  92. package/dist/Tooltips/TooltipStyles.d.ts +2 -0
  93. package/dist/Tooltips/TooltipStyles.js +7 -2
  94. package/dist/Tooltips/TooltipStyles.js.map +1 -1
  95. package/dist/Tooltips/TooltipTypes.cjs +0 -5
  96. package/dist/Tooltips/TooltipTypes.cjs.map +1 -1
  97. package/dist/Tooltips/TooltipTypes.d.ts +2 -0
  98. package/dist/Tooltips/TooltipTypes.js +0 -5
  99. package/dist/Tooltips/TooltipTypes.js.map +1 -1
  100. package/dist/Tooltips/TooltipWrapper.cjs +48 -1
  101. package/dist/Tooltips/TooltipWrapper.cjs.map +1 -1
  102. package/dist/Tooltips/TooltipWrapper.d.ts +1 -1
  103. package/dist/Tooltips/TooltipWrapper.js +50 -2
  104. package/dist/Tooltips/TooltipWrapper.js.map +1 -1
  105. package/dist/assets/index.cjs.map +1 -1
  106. package/dist/assets/index.js.map +1 -1
  107. package/dist/common/ActionWithin.cjs +1 -1
  108. package/dist/common/ActionWithin.js +1 -1
  109. package/dist/common/FocusVisible.cjs +1 -1
  110. package/dist/common/FocusVisible.js +1 -1
  111. package/dist/icons/systemicons/SystemIcons.cjs.map +1 -1
  112. package/dist/icons/systemicons/SystemIcons.js.map +1 -1
  113. package/package.json +2 -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","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 } 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\nconst 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\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 &.invalid {\n margin-bottom: 0 !important;\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 ${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\nexport const ValidationMessage = styled(Warning)<{ type: 'valid' | 'invalid' }>`\n color: ${(props) => (props.type === 'invalid' ? COLORS.critical_500 : COLORS.correct_500)};\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":";;;;;;;;;AAAA;AACA;AACA;AAAyI;AAAA;AAAA;AAGlI,IAAMA,YAAY,GAAGC,yBAAM,CAACC,GAAG,gJAElC,UAACC,KAAK;EAAA,OAAMA,KAAK,CAACC,QAAQ,IAAID,KAAK,CAACE,QAAQ,GAAG,sBAAsB,GAAG,EAAE;AAAA,CAAC,EAC3E,UAACF,KAAK;EAAA,OAAMA,KAAK,CAACG,MAAM,qBAAcH,KAAK,CAACG,MAAM,SAAM,EAAE;AAAA,CAAC,CAE9D;AAAC;AAEF,IAAMC,aAAa,OAAGC,qBAAG,kQACHC,cAAM,CAACC,WAAW,EACRD,cAAM,CAACE,WAAW,EACvCF,cAAM,CAACG,WAAW,CAI5B;AACM,IAAMC,uBAAuB,OAAGL,qBAAG,8HACVC,cAAM,CAACK,YAAY,CAClD;AAAC;AAEF,IAAMC,iBAAiB,GAAGd,yBAAM,CAACe,KAAK,ynDAalC,UAACb,KAAK;EAAA,OACNA,KAAK,CAACc,aAAa,oJAK8BR,cAAM,CAACS,WAAW,6DACxBT,cAAM,CAACS,WAAW,wDACvBT,cAAM,CAACS,WAAW,MAAG;AAAA,GAWzD,IAAAC,6BAAiB,EAACC,8BAAkB,CAACC,MAAM,EAAEZ,cAAM,CAACa,WAAW,CAAC,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B,GAAG,IAAAvC,yBAAM,EAACmC,OAAO,CAAC,wGACrC,UAACjC,KAAK;EAAA,OAAMA,KAAK,CAACsC,IAAI,KAAK,SAAS,GAAGhC,cAAM,CAAC8B,YAAY,GAAG9B,cAAM,CAACsB,WAAW;AAAA,CAAC,CAC1F;AAAC;AAEK,IAAMW,WAAW,GAAG,IAAAzC,yBAAM,EAACmC,OAAO,CAAC,wGAC/B3B,cAAM,CAACa,WAAW,CAC5B;AAAC;AACK,IAAMqB,iBAAiB,GAAG,IAAA1C,yBAAM,EAACmC,OAAO,CAAC,0GACrC3B,cAAM,CAACG,WAAW,CAC5B;AAAC;AAIK,IAAMgC,UAAU,GAAG3C,yBAAM,CAACC,GAAG,gHAEnC;AAAC;AAEK,IAAM2C,iBAAiB,GAAG,IAAA5C,yBAAM,EAAC2C,UAAU,CAAC,uIAGlD;AAAC"}
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","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 } 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\nconst 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\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 &.invalid {\n margin-bottom: 0 !important;\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 ${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\nexport const ValidationMessage = styled(Warning)<{ type: 'valid' | 'invalid' }>`\n color: ${(props) => (props.type === 'invalid' ? COLORS.critical_500 : COLORS.correct_500)};\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":";;;;;;;;;AAAA;AACA;AACA;AACA;AAAyI;AAAA;AAAA;AAGlI,IAAMA,YAAY,GAAGC,yBAAM,CAACC,GAAG,8JAElC,UAACC,KAAK;EAAA,OAAMA,KAAK,CAACC,QAAQ,IAAID,KAAK,CAACE,QAAQ,GAAG,sBAAsB,GAAG,EAAE;AAAA,CAAC,EAC3E,UAACF,KAAK;EAAA,OAAMA,KAAK,CAACG,MAAM,qBAAcH,KAAK,CAACG,MAAM,SAAM,EAAE;AAAA,CAAC,EAG3D,IAAAC,6BAAc,GAAE,CAEnB;AAAC;AAEF,IAAMC,aAAa,OAAGC,qBAAG,kQACHC,cAAM,CAACC,WAAW,EACRD,cAAM,CAACE,WAAW,EACvCF,cAAM,CAACG,WAAW,CAI5B;AACM,IAAMC,uBAAuB,OAAGL,qBAAG,8HACVC,cAAM,CAACK,YAAY,CAClD;AAAC;AAEF,IAAMC,iBAAiB,GAAGf,yBAAM,CAACgB,KAAK,8pDAclC,UAACd,KAAK;EAAA,OACNA,KAAK,CAACe,aAAa,oJAK8BR,cAAM,CAACS,WAAW,6DACxBT,cAAM,CAACS,WAAW,wDACvBT,cAAM,CAACS,WAAW,MAAG;AAAA,GAGhD,UAAAhB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AAkB,CAACe,OAAO,EAAE,IAAI,CAAC,CAezD;AAAC;AACK,IAAMG,YAAY,GAAG,IAAAvC,yBAAM,EAACqC,OAAO,CAAC,wGAChC5B,cAAM,CAAC+B,YAAY,CAC7B;AAAC;AAEK,IAAMC,iBAAiB,GAAG,IAAAzC,yBAAM,EAACqC,OAAO,CAAC,wGACrC,UAACnC,KAAK;EAAA,OAAMA,KAAK,CAACwC,IAAI,KAAK,SAAS,GAAGjC,cAAM,CAAC+B,YAAY,GAAG/B,cAAM,CAACuB,WAAW;AAAA,CAAC,CAC1F;AAAC;AAEK,IAAMW,WAAW,GAAG,IAAA3C,yBAAM,EAACqC,OAAO,CAAC,wGAC/B5B,cAAM,CAACc,WAAW,CAC5B;AAAC;AACK,IAAMqB,iBAAiB,GAAG,IAAA5C,yBAAM,EAACqC,OAAO,CAAC,0GACrC5B,cAAM,CAACG,WAAW,CAC5B;AAAC;AAIK,IAAMiC,UAAU,GAAG7C,yBAAM,CAACC,GAAG,gHAEnC;AAAC;AAEK,IAAM6C,iBAAiB,GAAG,IAAA9C,yBAAM,EAAC6C,UAAU,CAAC,uIAGlD;AAAC"}
@@ -10,6 +10,7 @@ declare const InputFieldStyling: import("styled-components").StyledComponent<"in
10
10
  withoutBorder?: boolean | undefined;
11
11
  size?: string | undefined;
12
12
  suppressReadOnlyStyles?: boolean | undefined;
13
+ extraRightPadding?: number | undefined;
13
14
  }, never>;
14
15
  declare const ValidationStyling: import("styled-components").FlattenSimpleInterpolation;
15
16
  export declare const Warning: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -1,17 +1,21 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
2
2
  var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12;
3
+ import { TooltipTrigger } from '../Tooltips/TooltipStyles';
3
4
  import styled, { css } from 'styled-components';
4
5
  import { BREAKPOINTS, COLORS, focusStyles } from '../styles';
5
6
  import { ComponentXXSStyling, ComponentTextStyle, ComponentSStyling, ComponentMStyling, ComponentXSStyling } from '../styles/typography';
6
- export var InputWrapper = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n outline: none;\n ", ";\n ", "\n position: relative;\n"])), function (props) {
7
+ export var InputWrapper = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n outline: none;\n ", ";\n ", "\n position: relative;\n \n ", "\n\n"])), function (props) {
7
8
  return props.readOnly || props.disabled ? 'cursor: not-allowed;' : '';
8
9
  }, function (props) {
9
10
  return props.margin ? "margin: ".concat(props.margin, ";") : '';
10
- });
11
+ }, TooltipTrigger());
11
12
  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);
12
13
  export var activeErrorMessageState = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n box-shadow: inset 0 0 0 2px ", ";\n"])), COLORS.critical_400);
13
- var InputFieldStyling = styled.input(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n height: 48px;\n width: 100%;\n border-radius: 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 &.invalid {\n margin-bottom: 0 !important;\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) {
14
+ var InputFieldStyling = styled.input(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n height: 48px;\n width: 100%;\n border-radius: 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 &.invalid {\n margin-bottom: 0 !important;\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) {
14
15
  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, ";");
16
+ }, function (props) {
17
+ var _props$extraRightPadd;
18
+ return 16 + ((_props$extraRightPadd = props.extraRightPadding) !== null && _props$extraRightPadd !== void 0 ? _props$extraRightPadd : 0);
15
19
  }, ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_500), BREAKPOINTS.MEDIUM, ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_500), COLORS.black, function (props) {
16
20
  return props.activeErrorMessage ? activeErrorMessageState : '';
17
21
  }, function (props) {
@@ -1 +1 @@
1
- {"version":3,"file":"styling.js","names":["styled","css","BREAKPOINTS","COLORS","focusStyles","ComponentXXSStyling","ComponentTextStyle","ComponentSStyling","ComponentMStyling","ComponentXSStyling","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","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 } 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\nconst 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\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 &.invalid {\n margin-bottom: 0 !important;\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 ${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\nexport const ValidationMessage = styled(Warning)<{ type: 'valid' | 'invalid' }>`\n color: ${(props) => (props.type === 'invalid' ? COLORS.critical_500 : COLORS.correct_500)};\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":";;AAAA,OAAOA,MAAM,IAAIC,GAAG,QAAQ,mBAAmB;AAC/C,SAASC,WAAW,EAAEC,MAAM,EAAEC,WAAW,QAAQ,WAAW;AAC5D,SAASC,mBAAmB,EAAEC,kBAAkB,EAAEC,iBAAiB,EAAEC,iBAAiB,EAAEC,kBAAkB,QAAQ,sBAAsB;AAGxI,OAAO,IAAMC,YAAY,GAAGV,MAAM,CAACW,GAAG,kIAElC,UAACC,KAAK;EAAA,OAAMA,KAAK,CAACC,QAAQ,IAAID,KAAK,CAACE,QAAQ,GAAG,sBAAsB,GAAG,EAAE;AAAA,CAAC,EAC3E,UAACF,KAAK;EAAA,OAAMA,KAAK,CAACG,MAAM,qBAAcH,KAAK,CAACG,MAAM,SAAM,EAAE;AAAA,CAAC,CAE9D;AAED,IAAMC,aAAa,GAAGf,GAAG,mPACHE,MAAM,CAACc,WAAW,EACRd,MAAM,CAACe,WAAW,EACvCf,MAAM,CAACgB,WAAW,CAI5B;AACD,OAAO,IAAMC,uBAAuB,GAAGnB,GAAG,+GACVE,MAA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AAE,IAAI,CAAC,EAQpD/B,mBAAmB,CAACC,kBAAkB,CAAC8B,OAAO,EAAE,IAAI,CAAC,EAOrD3B,kBAAkB,CAACH,kBAAkB,CAAC8B,OAAO,EAAE,IAAI,CAAC,CAezD;AACD,OAAO,IAAME,YAAY,GAAGtC,MAAM,CAACqC,OAAO,CAAC,0FAChClC,MAAM,CAACoC,YAAY,CAC7B;AAED,OAAO,IAAMC,iBAAiB,GAAGxC,MAAM,CAACqC,OAAO,CAAC,0FACrC,UAACzB,KAAK;EAAA,OAAMA,KAAK,CAAC6B,IAAI,KAAK,SAAS,GAAGtC,MAAM,CAACoC,YAAY,GAAGpC,MAAM,CAAC8B,WAAW;AAAA,CAAC,CAC1F;AAED,OAAO,IAAMS,WAAW,GAAG1C,MAAM,CAACqC,OAAO,CAAC,0FAC/BlC,MAAM,CAACwB,WAAW,CAC5B;AACD,OAAO,IAAMgB,iBAAiB,GAAG3C,MAAM,CAACqC,OAAO,CAAC,4FACrClC,MAAM,CAACgB,WAAW,CAC5B;AAED,SAASgB,iBAAiB,EAAEb,iBAAiB;AAE7C,OAAO,IAAMsB,UAAU,GAAG5C,MAAM,CAACW,GAAG,kGAEnC;AAED,OAAO,IAAMkC,iBAAiB,GAAG7C,MAAM,CAAC4C,UAAU,CAAC,yHAGlD"}
1
+ {"version":3,"file":"styling.js","names":["TooltipTrigger","styled","css","BREAKPOINTS","COLORS","focusStyles","ComponentXXSStyling","ComponentTextStyle","ComponentSStyling","ComponentMStyling","ComponentXSStyling","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","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 } 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\nconst 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\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 &.invalid {\n margin-bottom: 0 !important;\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 ${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\nexport const ValidationMessage = styled(Warning)<{ type: 'valid' | 'invalid' }>`\n color: ${(props) => (props.type === 'invalid' ? COLORS.critical_500 : COLORS.correct_500)};\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":";;AAAA,SAASA,cAAc,QAAQ,2BAA2B;AAC1D,OAAOC,MAAM,IAAIC,GAAG,QAAQ,mBAAmB;AAC/C,SAASC,WAAW,EAAEC,MAAM,EAAEC,WAAW,QAAQ,WAAW;AAC5D,SAASC,mBAAmB,EAAEC,kBAAkB,EAAEC,iBAAiB,EAAEC,iBAAiB,EAAEC,kBAAkB,QAAQ,sBAAsB;AAGxI,OAAO,IAAMC,YAAY,GAAGV,MAAM,CAACW,GAAG,gJAElC,UAACC,KAAK;EAAA,OAAMA,KAAK,CAACC,QAAQ,IAAID,KAAK,CAACE,QAAQ,GAAG,sBAAsB,GAAG,EAAE;AAAA,CAAC,EAC3E,UAACF,KAAK;EAAA,OAAMA,KAAK,CAACG,MAAM,qBAAcH,KAAK,CAACG,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AAkB,CAAC+B,OAAO,EAAElC,MAAM,CAAC2B,KAAK,CAAC,EAS7DzB,mBAAmB,CAACC,kBAAkB,CAAC+B,OAAO,EAAE,SAAS,CAAC,CAI/D;AAED,OAAO,IAAMC,OAAO,GAAGtC,MAAM,CAACW,GAAG,yiBAG7BN,mBAAmB,CAACC,kBAAkB,CAAC+B,OAAO,EAAE,IAAI,CAAC,EAOrDnC,WAAW,CAAC2B,MAAM,EAChBpB,kBAAkB,CAACH,kBAAkB,CAAC+B,OAAO,EAAE,IAAI,CAAC,EAQpDhC,mBAAmB,CAACC,kBAAkB,CAAC+B,OAAO,EAAE,IAAI,CAAC,EAOrD5B,kBAAkB,CAACH,kBAAkB,CAAC+B,OAAO,EAAE,IAAI,CAAC,CAezD;AACD,OAAO,IAAME,YAAY,GAAGvC,MAAM,CAACsC,OAAO,CAAC,0FAChCnC,MAAM,CAACqC,YAAY,CAC7B;AAED,OAAO,IAAMC,iBAAiB,GAAGzC,MAAM,CAACsC,OAAO,CAAC,0FACrC,UAAC1B,KAAK;EAAA,OAAMA,KAAK,CAAC8B,IAAI,KAAK,SAAS,GAAGvC,MAAM,CAACqC,YAAY,GAAGrC,MAAM,CAAC+B,WAAW;AAAA,CAAC,CAC1F;AAED,OAAO,IAAMS,WAAW,GAAG3C,MAAM,CAACsC,OAAO,CAAC,0FAC/BnC,MAAM,CAACyB,WAAW,CAC5B;AACD,OAAO,IAAMgB,iBAAiB,GAAG5C,MAAM,CAACsC,OAAO,CAAC,4FACrCnC,MAAM,CAACgB,WAAW,CAC5B;AAED,SAASiB,iBAAiB,EAAEd,iBAAiB;AAE7C,OAAO,IAAMuB,UAAU,GAAG7C,MAAM,CAACW,GAAG,kGAEnC;AAED,OAAO,IAAMmC,iBAAiB,GAAG9C,MAAM,CAAC6C,UAAU,CAAC,yHAGlD"}
@@ -10,8 +10,8 @@ import React from 'react';
10
10
  import { Size } from '../types';
11
11
  import styled from 'styled-components';
12
12
  import { COLORS, ComponentLStyling, ComponentMStyling, ComponentSStyling, ComponentTextStyle } from '../styles';
13
- import { jsx as _jsx } from "react/jsx-runtime";
14
13
  import { Fragment as _Fragment } from "react/jsx-runtime";
14
+ import { jsx as _jsx } from "react/jsx-runtime";
15
15
  import { jsxs as _jsxs } from "react/jsx-runtime";
16
16
  export var Bar = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n flex: 1;\n height: 6px;\n\n &.small {\n height: 6px;\n }\n\n &.medium {\n height: 8px;\n }\n\n &.large {\n height: 12px;\n }\n\n background-color: ", ";\n\n &.active {\n background-color: ", ";\n }\n\n &.current {\n background-color: ", ";\n }\n\n &.inverted {\n background-color: ", ";\n }\n\n &.inverted.active {\n background-color: ", ";\n }\n\n &.inverted.current {\n background-color: ", ";\n }\n\n"])), COLORS.neutral_100, COLORS.accent1_400, COLORS.accent1_800, COLORS.neutral_600, COLORS.accent1_400, COLORS.white);
17
17
  export var Dot = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n justify-content: center;\n width: 16px;\n height: 16px;\n\n\n &:after {\n content: '';\n display: block;\n width: 6px;\n height: 6px;\n border-radius: 50%;\n background-color: ", ";\n }\n\n &.small {\n &:after {\n width: 6px;\n height: 6px;\n }\n\n &.current:after {\n width: 10px;\n height: 10px;\n }\n }\n\n &.medium {\n &:after {\n width: 8px;\n height: 8px;\n }\n\n &.current:after {\n width: 12px;\n height: 12px;\n }\n }\n\n &.large {\n &:after {\n width: 12px;\n height: 12px;\n }\n\n &.current:after {\n width: 16px;\n height: 16px;\n }\n }\n\n\n &.active:after {\n background-color: ", ";\n }\n\n &.current:after {\n background-color: ", ";\n }\n\n &.inverted:after {\n background-color: ", ";\n }\n\n &.inverted.active:after {\n background-color: ", ";\n }\n\n &.inverted.current:after {\n background-color: ", ";\n }\n"])), COLORS.neutral_400, COLORS.accent1_600, COLORS.accent1_800, COLORS.neutral_400, COLORS.accent1_400, COLORS.white);
@@ -1 +1 @@
1
- {"version":3,"file":"Paginator.cjs","names":["Container","styled","nav","BREAKPOINTS","MEDIUM","Items","ul","Item","li","ComponentMStyling","ComponentTextStyle","Regular","COLORS","neutral_600","focusStyles","Z_INDEXES","hover","primary_800","primary_20","active","primary_700","primary_100","neutral_800","neutral_20","Dots","ItemContent","primary_500","Step","up","target","disabled","page","onPageChange","id","navigateHook","useNavigate","handleButtonClick","event","Paginator","pageCount","currentPage","baseUrl","pages","from","to","i","push","findIndex","item","map"],"sources":["../../src/Paginator/Paginator.tsx"],"sourcesContent":["import * as React from 'react';\nimport styled from 'styled-components';\nimport {NavLink} from 'react-router-dom';\nimport {BREAKPOINTS, COLORS, ComponentTextStyle, focusStyles} from '../styles';\nimport {ChevronLeft, ChevronRight} from '../icons/systemicons/SystemIcons';\nimport {ComponentMStyling} from '../styles/typography';\nimport {Z_INDEXES} from '../styles/z-indexes';\nimport { useNavigate } from 'react-router';\nimport {IconButton} from '../Button';\n\nconst Container = styled.nav`\n margin: 20px 0;\n display: flex;\n justify-content: center;\n\n ${BREAKPOINTS.MEDIUM} {\n width: 75%;\n }\n`;\n\nconst Items = styled.ul`\n margin: 0;\n padding: 0;\n list-style: none;\n display: flex;\n`;\n\nconst Item = styled.li`\n width: 48px;\n height: 48px;\n display: flex;\n align-items: center;\n justify-content: center;\n\n & > * {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\n text-decoration: none;\n\n ${ComponentMStyling(ComponentTextStyle.Regular, COLORS.neutral_600)}\n\n &:focus,\n &:focus-within {\n ${focusStyles}\n }\n }\n & > a:hover {\n z-index: ${Z_INDEXES.hover};\n color: ${COLORS.primary_800};\n background-color: ${COLORS.primary_20};\n }\n & > a:active {\n z-index: ${Z_INDEXES.active};\n color: ${COLORS.primary_700};\n background-color: ${COLORS.primary_100};\n }\n & > a.active {\n z-index: ${Z_INDEXES.active};\n color: ${COLORS.neutral_800};\n background-color: ${COLORS.neutral_20};\n cursor: default;\n &:hover {\n color: ${COLORS.primary_800};\n background-color: ${COLORS.primary_20};\n }\n &:active {\n color: ${COLORS.primary_700};\n background-color: ${COLORS.primary_100};\n }\n }\n`;\n\nconst Dots = styled(Item)`\n cursor: not-allowed;\n &:after{\n ${ComponentMStyling(ComponentTextStyle.Regular, COLORS.neutral_600)}\n content: '...';\n }\n`;\n\nconst ItemContent = styled('div')`\n text-align:center;\n display: flex;\n justify-content: center;\n align-items: center;\n position: relative;\n width: 100%;\n height: 100%;\n \n &.active:after{\n content: '';\n position: absolute;\n bottom: 4px;\n width: 32px;\n border-radius: 4px;\n height: 4px;\n background-color: ${COLORS.primary_500}\n }\n &.active:hover:after{\n background-color: ${COLORS.primary_700}\n }\n &.active:active:after{\n background-color: ${COLORS.primary_800}\n }\n`\n\ntype PaginatorProps = {\n pageCount: number;\n currentPage: number;\n baseUrl: string;\n onPageChange?: (page: number) => void;\n};\n\nconst Step = ({\n up = true,\n target = '',\n disabled = false,\n page,\n onPageChange,\n id,\n}: {\n up: boolean;\n target: string;\n disabled: boolean;\n page: number;\n onPageChange?: (page: number) => void;\n id?: string;\n}) => {\n const navigateHook = useNavigate();\n\n const handleButtonClick = () => {\n navigateHook(target);\n onPageChange && onPageChange(page);\n }\n\n return (\n <IconButton id={id}\n action={event => handleButtonClick()}\n variant={'secondary'}\n shape={'circular'}\n disabled={disabled}>\n {up ? <ChevronRight/> : <ChevronLeft/>}\n </IconButton>\n )\n};\n\nconst Paginator = ({ pageCount = 1, currentPage = 1, baseUrl = '', onPageChange }: PaginatorProps) => {\n const pages = [];\n let from = 2;\n let to = 4;\n if (pageCount === 0) return null;\n\n if (pageCount > 1) {\n if (currentPage >= 4 && currentPage <= pageCount - 2) {\n from = currentPage - 1;\n to = currentPage + 1;\n } else if (pageCount - 2 > 1 && currentPage > pageCount - 2) {\n from = pageCount - 3;\n to = pageCount - 1;\n }\n if (to > pageCount) {\n to = pageCount;\n }\n for (let i = from; i <= to; i += 1) {\n pages.push(i);\n }\n }\n\n return (\n <Container>\n <Items>\n <Step up={false}\n target={`${baseUrl}/${currentPage - 1}`}\n page={currentPage - 1}\n disabled={currentPage === 1}\n onPageChange={() => {\n if (onPageChange) onPageChange(currentPage - 1);\n }}\n id=\"paginator-left\"/>\n {pages.findIndex(item => item === 1) === -1 && (\n <Item>\n <NavLink\n to={`${baseUrl}/1`}\n onClick={() => {\n if (onPageChange) onPageChange(1);\n }}>\n <ItemContent className={currentPage === 1 ? 'active' : ''}>\n <span>1</span>\n </ItemContent>\n </NavLink>\n </Item>\n )}\n {currentPage >= 4 && pageCount > 5 && pageCount && pages.findIndex(item => item === 1) === -1 && (\n <Dots/>\n )}\n {pages.map(page => (\n <Item key={page}>\n <NavLink\n to={`${baseUrl}/${page}`}\n onClick={() => {\n if (onPageChange) onPageChange(page);\n }}>\n <ItemContent className={currentPage === page ? 'active' : ''}>\n <span>{page}</span>\n </ItemContent>\n </NavLink>\n </Item>\n ))}\n {pageCount > 5 && currentPage <= pageCount - 3 && (\n <Dots/>\n )}\n {pages.findIndex(item => item === pageCount) === -1 && pageCount !== 1 && (\n <Item>\n <NavLink\n to={`${baseUrl}/${pageCount}`}\n onClick={() => {\n if (onPageChange) onPageChange(pageCount);\n }}>\n <ItemContent className={currentPage === pageCount ? 'active' : ''}>\n <span>{pageCount}</span>\n </ItemContent>\n </NavLink>\n </Item>\n )}\n <Step up\n target={`${baseUrl}/${currentPage + 1}`}\n page={currentPage + 1}\n disabled={currentPage === pageCount}\n onPageChange={() => {\n if (onPageChange) onPageChange(currentPage + 1);\n }}\n id=\"paginator-right\"/>\n </Items>\n </Container>\n );\n};\n\nexport default Paginator;\n"],"mappings":";;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAqC;AAAA;AAAA;AAAA;AAErC,IAAMA,SAAS,GAAGC,yBAAM,CAACC,GAAG,yLAKxBC,mBAAW,CAACC,MAAM,CAGrB;AAED,IAAMC,KAAK,GAAGJ,yBAAM,CAACK,EAAE,2JAKtB;AAED,IAAMC,IAAI,GAAG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AAQ,GAAG,EAAG;cAAA,uBAC5D;gBAAA,UAAOA;cAAI;YAAQ;UACN;QACR,GATDA,IAAI,CAUR;MAAA,CACR,CAAC,EACDQ,SAAS,GAAG,CAAC,IAAIC,WAAW,IAAID,SAAS,GAAG,CAAC,iBAC5C,qBAAC,IAAI,KACN,EACAG,KAAK,CAACK,SAAS,CAAC,UAAAC,IAAI;QAAA,OAAIA,IAAI,KAAKT,SAAS;MAAA,EAAC,KAAK,CAAC,CAAC,IAAIA,SAAS,KAAK,CAAC,iBACpE,qBAAC,IAAI;QAAA,uBACH,qBAAC,uBAAO;UACN,EAAE,YAAKE,OAAO,cAAIF,SAAS,CAAG;UAC9B,OAAO,EAAE,mBAAM;YACb,IAAIP,aAAY,EAAEA,aAAY,CAACO,SAAS,CAAC;UAC3C,CAAE;UAAA,uBACA,qBAAC,WAAW;YAAC,SAAS,EAAEC,WAAW,KAAKD,SAAS,GAAG,QAAQ,GAAG,EAAG;YAAA,uBACjE;cAAA,UAAOA;YAAS;UAAQ;QACX;MACR,EAEb,eACD,qBAAC,IAAI;QAAC,EAAE;QACF,MAAM,YAAKE,OAAO,cAAID,WAAW,GAAG,CAAC,CAAG;QACxC,IAAI,EAAEA,WAAW,GAAG,CAAE;QACtB,QAAQ,EAAEA,WAAW,KAAKD,SAAU;QACpC,YAAY,EAAE,wBAAM;UAClB,IAAIP,aAAY,EAAEA,aAAY,CAACQ,WAAW,GAAG,CAAC,CAAC;QACjD,CAAE;QACF,EAAE,EAAC;MAAiB,EAAE;IAAA;EACtB,EACE;AAEhB,CAAC;AAAC;EAhIAD,SAAS;EACTC,WAAW;EACXC,OAAO;EACPT,YAAY;AAAA;AAAA,eA+HCM,SAAS;AAAA"}
1
+ {"version":3,"file":"Paginator.cjs","names":["Container","styled","nav","BREAKPOINTS","MEDIUM","Items","ul","Item","li","ComponentMStyling","ComponentTextStyle","Regular","COLORS","neutral_600","focusStyles","Z_INDEXES","hover","primary_800","primary_20","active","primary_700","primary_100","neutral_800","neutral_20","Dots","ItemContent","primary_500","Step","up","target","disabled","page","onPageChange","id","navigateHook","useNavigate","handleButtonClick","event","Paginator","pageCount","currentPage","baseUrl","pages","from","to","i","push","findIndex","item","map"],"sources":["../../src/Paginator/Paginator.tsx"],"sourcesContent":["import * as React from 'react';\nimport styled from 'styled-components';\nimport {NavLink} from 'react-router-dom';\nimport {BREAKPOINTS, COLORS, ComponentTextStyle, focusStyles} from '../styles';\nimport {ChevronLeft, ChevronRight} from '../icons/systemicons/SystemIcons';\nimport {ComponentMStyling} from '../styles/typography';\nimport {Z_INDEXES} from '../styles/z-indexes';\nimport { useNavigate } from 'react-router';\nimport {IconButton} from '../Button';\n\nconst Container = styled.nav`\n margin: 20px 0;\n display: flex;\n justify-content: center;\n\n ${BREAKPOINTS.MEDIUM} {\n width: 75%;\n }\n`;\n\nconst Items = styled.ul`\n margin: 0;\n padding: 0;\n list-style: none;\n display: flex;\n`;\n\nconst Item = styled.li`\n width: 48px;\n height: 48px;\n display: flex;\n align-items: center;\n justify-content: center;\n\n & > * {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\n text-decoration: none;\n\n ${ComponentMStyling(ComponentTextStyle.Regular, COLORS.neutral_600)}\n\n &:focus,\n &:focus-within {\n ${focusStyles}\n }\n }\n & > a:hover {\n z-index: ${Z_INDEXES.hover};\n color: ${COLORS.primary_800};\n background-color: ${COLORS.primary_20};\n }\n & > a:active {\n z-index: ${Z_INDEXES.active};\n color: ${COLORS.primary_700};\n background-color: ${COLORS.primary_100};\n }\n & > a.active {\n z-index: ${Z_INDEXES.active};\n color: ${COLORS.neutral_800};\n background-color: ${COLORS.neutral_20};\n cursor: default;\n &:hover {\n color: ${COLORS.primary_800};\n background-color: ${COLORS.primary_20};\n }\n &:active {\n color: ${COLORS.primary_700};\n background-color: ${COLORS.primary_100};\n }\n }\n`;\n\nconst Dots = styled(Item)`\n cursor: not-allowed;\n &:after{\n ${ComponentMStyling(ComponentTextStyle.Regular, COLORS.neutral_600)}\n content: '...';\n }\n`;\n\nconst ItemContent = styled('div')`\n text-align:center;\n display: flex;\n justify-content: center;\n align-items: center;\n position: relative;\n width: 100%;\n height: 100%;\n \n &.active:after{\n content: '';\n position: absolute;\n bottom: 4px;\n width: 32px;\n border-radius: 4px;\n height: 4px;\n background-color: ${COLORS.primary_500}\n }\n &.active:hover:after{\n background-color: ${COLORS.primary_700}\n }\n &.active:active:after{\n background-color: ${COLORS.primary_800}\n }\n`\n\ntype PaginatorProps = {\n pageCount: number;\n currentPage: number;\n baseUrl: string;\n onPageChange?: (page: number) => void;\n};\n\nconst Step = ({\n up = true,\n target = '',\n disabled = false,\n page,\n onPageChange,\n id,\n}: {\n up: boolean;\n target: string;\n disabled: boolean;\n page: number;\n onPageChange?: (page: number) => void;\n id?: string;\n}) => {\n const navigateHook = useNavigate();\n\n const handleButtonClick = () => {\n navigateHook(target);\n onPageChange && onPageChange(page);\n }\n\n return (\n <IconButton id={id}\n action={event => handleButtonClick()}\n variant={'secondary'}\n shape={'circular'}\n disabled={disabled}>\n {up ? <ChevronRight/> : <ChevronLeft/>}\n </IconButton>\n )\n};\n\nconst Paginator = ({ pageCount = 1, currentPage = 1, baseUrl = '', onPageChange }: PaginatorProps) => {\n const pages = [];\n let from = 2;\n let to = 4;\n if (pageCount === 0) return null;\n\n if (pageCount > 1) {\n if (currentPage >= 4 && currentPage <= pageCount - 2) {\n from = currentPage - 1;\n to = currentPage + 1;\n } else if (pageCount - 2 > 1 && currentPage > pageCount - 2) {\n from = pageCount - 3;\n to = pageCount - 1;\n }\n if (to > pageCount) {\n to = pageCount;\n }\n for (let i = from; i <= to; i += 1) {\n pages.push(i);\n }\n }\n\n return (\n <Container>\n <Items>\n <Step up={false}\n target={`${baseUrl}/${currentPage - 1}`}\n page={currentPage - 1}\n disabled={currentPage === 1}\n onPageChange={() => {\n if (onPageChange) onPageChange(currentPage - 1);\n }}\n id=\"paginator-left\"/>\n {pages.findIndex(item => item === 1) === -1 && (\n <Item>\n <NavLink\n to={`${baseUrl}/1`}\n onClick={() => {\n if (onPageChange) onPageChange(1);\n }}>\n <ItemContent className={currentPage === 1 ? 'active' : ''}>\n <span>1</span>\n </ItemContent>\n </NavLink>\n </Item>\n )}\n {currentPage >= 4 && pageCount > 5 && pageCount && pages.findIndex(item => item === 1) === -1 && (\n <Dots/>\n )}\n {pages.map(page => (\n <Item key={page}>\n <NavLink\n to={`${baseUrl}/${page}`}\n onClick={() => {\n if (onPageChange) onPageChange(page);\n }}>\n <ItemContent className={currentPage === page ? 'active' : ''}>\n <span>{page}</span>\n </ItemContent>\n </NavLink>\n </Item>\n ))}\n {pageCount > 5 && currentPage <= pageCount - 3 && (\n <Dots/>\n )}\n {pages.findIndex(item => item === pageCount) === -1 && pageCount !== 1 && (\n <Item>\n <NavLink\n to={`${baseUrl}/${pageCount}`}\n onClick={() => {\n if (onPageChange) onPageChange(pageCount);\n }}>\n <ItemContent className={currentPage === pageCount ? 'active' : ''}>\n <span>{pageCount}</span>\n </ItemContent>\n </NavLink>\n </Item>\n )}\n <Step up\n target={`${baseUrl}/${currentPage + 1}`}\n page={currentPage + 1}\n disabled={currentPage === pageCount}\n onPageChange={() => {\n if (onPageChange) onPageChange(currentPage + 1);\n }}\n id=\"paginator-right\"/>\n </Items>\n </Container>\n );\n};\n\nexport default Paginator;\n"],"mappings":";;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAqC;AAAA;AAAA;AAAA;AAErC,IAAMA,SAAS,GAAGC,yBAAM,CAACC,GAAG,yLAKxBC,mBAAW,CAACC,MAAM,CAGrB;AAED,IAAMC,KAAK,GAAGJ,yBAAM,CAACK,EAAE,2JAKtB;AAED,IAAMC,IAAI,GAAGN,yBAAM,CAACO,EAAE,y1BAehB,IAAAC,6BAAiB,EAACC,0BAAkB,CAACC,OAAO,EAAEC,cAAM,CAACC,WAAW,CAAC,EAI/DC,mBAAW,EAIJC,mBAAS,CAACC,KAAK,EACjBJ,cA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AAS,GAAG,CAAC,iBAC5C,qBAAC,IAAI,KACN,EACAG,KAAK,CAACK,SAAS,CAAC,UAAAC,IAAI;QAAA,OAAIA,IAAI,KAAKT,SAAS;MAAA,EAAC,KAAK,CAAC,CAAC,IAAIA,SAAS,KAAK,CAAC,iBACpE,qBAAC,IAAI;QAAA,uBACH,qBAAC,uBAAO;UACN,EAAE,YAAKE,OAAO,cAAIF,SAAS,CAAG;UAC9B,OAAO,EAAE,mBAAM;YACb,IAAIP,aAAY,EAAEA,aAAY,CAACO,SAAS,CAAC;UAC3C,CAAE;UAAA,uBACA,qBAAC,WAAW;YAAC,SAAS,EAAEC,WAAW,KAAKD,SAAS,GAAG,QAAQ,GAAG,EAAG;YAAA,uBACjE;cAAA,UAAOA;YAAS;UAAQ;QACX;MACR,EAEb,eACD,qBAAC,IAAI;QAAC,EAAE;QACF,MAAM,YAAKE,OAAO,cAAID,WAAW,GAAG,CAAC,CAAG;QACxC,IAAI,EAAEA,WAAW,GAAG,CAAE;QACtB,QAAQ,EAAEA,WAAW,KAAKD,SAAU;QACpC,YAAY,EAAE,wBAAM;UAClB,IAAIP,aAAY,EAAEA,aAAY,CAACQ,WAAW,GAAG,CAAC,CAAC;QACjD,CAAE;QACF,EAAE,EAAC;MAAiB,EAAE;IAAA;EACtB,EACE;AAEhB,CAAC;AAAC;EAhIAD,SAAS;EACTC,WAAW;EACXC,OAAO;EACPT,YAAY;AAAA;AAAA,eA+HCM,SAAS;AAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"Paginator.js","names":["React","styled","NavLink","BREAKPOINTS","COLORS","ComponentTextStyle","focusStyles","ChevronLeft","ChevronRight","ComponentMStyling","Z_INDEXES","useNavigate","IconButton","Container","nav","MEDIUM","Items","ul","Item","li","Regular","neutral_600","hover","primary_800","primary_20","active","primary_700","primary_100","neutral_800","neutral_20","Dots","ItemContent","primary_500","Step","up","target","disabled","page","onPageChange","id","navigateHook","handleButtonClick","event","Paginator","pageCount","currentPage","baseUrl","pages","from","to","i","push","findIndex","item","map"],"sources":["../../src/Paginator/Paginator.tsx"],"sourcesContent":["import * as React from 'react';\nimport styled from 'styled-components';\nimport {NavLink} from 'react-router-dom';\nimport {BREAKPOINTS, COLORS, ComponentTextStyle, focusStyles} from '../styles';\nimport {ChevronLeft, ChevronRight} from '../icons/systemicons/SystemIcons';\nimport {ComponentMStyling} from '../styles/typography';\nimport {Z_INDEXES} from '../styles/z-indexes';\nimport { useNavigate } from 'react-router';\nimport {IconButton} from '../Button';\n\nconst Container = styled.nav`\n margin: 20px 0;\n display: flex;\n justify-content: center;\n\n ${BREAKPOINTS.MEDIUM} {\n width: 75%;\n }\n`;\n\nconst Items = styled.ul`\n margin: 0;\n padding: 0;\n list-style: none;\n display: flex;\n`;\n\nconst Item = styled.li`\n width: 48px;\n height: 48px;\n display: flex;\n align-items: center;\n justify-content: center;\n\n & > * {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\n text-decoration: none;\n\n ${ComponentMStyling(ComponentTextStyle.Regular, COLORS.neutral_600)}\n\n &:focus,\n &:focus-within {\n ${focusStyles}\n }\n }\n & > a:hover {\n z-index: ${Z_INDEXES.hover};\n color: ${COLORS.primary_800};\n background-color: ${COLORS.primary_20};\n }\n & > a:active {\n z-index: ${Z_INDEXES.active};\n color: ${COLORS.primary_700};\n background-color: ${COLORS.primary_100};\n }\n & > a.active {\n z-index: ${Z_INDEXES.active};\n color: ${COLORS.neutral_800};\n background-color: ${COLORS.neutral_20};\n cursor: default;\n &:hover {\n color: ${COLORS.primary_800};\n background-color: ${COLORS.primary_20};\n }\n &:active {\n color: ${COLORS.primary_700};\n background-color: ${COLORS.primary_100};\n }\n }\n`;\n\nconst Dots = styled(Item)`\n cursor: not-allowed;\n &:after{\n ${ComponentMStyling(ComponentTextStyle.Regular, COLORS.neutral_600)}\n content: '...';\n }\n`;\n\nconst ItemContent = styled('div')`\n text-align:center;\n display: flex;\n justify-content: center;\n align-items: center;\n position: relative;\n width: 100%;\n height: 100%;\n \n &.active:after{\n content: '';\n position: absolute;\n bottom: 4px;\n width: 32px;\n border-radius: 4px;\n height: 4px;\n background-color: ${COLORS.primary_500}\n }\n &.active:hover:after{\n background-color: ${COLORS.primary_700}\n }\n &.active:active:after{\n background-color: ${COLORS.primary_800}\n }\n`\n\ntype PaginatorProps = {\n pageCount: number;\n currentPage: number;\n baseUrl: string;\n onPageChange?: (page: number) => void;\n};\n\nconst Step = ({\n up = true,\n target = '',\n disabled = false,\n page,\n onPageChange,\n id,\n}: {\n up: boolean;\n target: string;\n disabled: boolean;\n page: number;\n onPageChange?: (page: number) => void;\n id?: string;\n}) => {\n const navigateHook = useNavigate();\n\n const handleButtonClick = () => {\n navigateHook(target);\n onPageChange && onPageChange(page);\n }\n\n return (\n <IconButton id={id}\n action={event => handleButtonClick()}\n variant={'secondary'}\n shape={'circular'}\n disabled={disabled}>\n {up ? <ChevronRight/> : <ChevronLeft/>}\n </IconButton>\n )\n};\n\nconst Paginator = ({ pageCount = 1, currentPage = 1, baseUrl = '', onPageChange }: PaginatorProps) => {\n const pages = [];\n let from = 2;\n let to = 4;\n if (pageCount === 0) return null;\n\n if (pageCount > 1) {\n if (currentPage >= 4 && currentPage <= pageCount - 2) {\n from = currentPage - 1;\n to = currentPage + 1;\n } else if (pageCount - 2 > 1 && currentPage > pageCount - 2) {\n from = pageCount - 3;\n to = pageCount - 1;\n }\n if (to > pageCount) {\n to = pageCount;\n }\n for (let i = from; i <= to; i += 1) {\n pages.push(i);\n }\n }\n\n return (\n <Container>\n <Items>\n <Step up={false}\n target={`${baseUrl}/${currentPage - 1}`}\n page={currentPage - 1}\n disabled={currentPage === 1}\n onPageChange={() => {\n if (onPageChange) onPageChange(currentPage - 1);\n }}\n id=\"paginator-left\"/>\n {pages.findIndex(item => item === 1) === -1 && (\n <Item>\n <NavLink\n to={`${baseUrl}/1`}\n onClick={() => {\n if (onPageChange) onPageChange(1);\n }}>\n <ItemContent className={currentPage === 1 ? 'active' : ''}>\n <span>1</span>\n </ItemContent>\n </NavLink>\n </Item>\n )}\n {currentPage >= 4 && pageCount > 5 && pageCount && pages.findIndex(item => item === 1) === -1 && (\n <Dots/>\n )}\n {pages.map(page => (\n <Item key={page}>\n <NavLink\n to={`${baseUrl}/${page}`}\n onClick={() => {\n if (onPageChange) onPageChange(page);\n }}>\n <ItemContent className={currentPage === page ? 'active' : ''}>\n <span>{page}</span>\n </ItemContent>\n </NavLink>\n </Item>\n ))}\n {pageCount > 5 && currentPage <= pageCount - 3 && (\n <Dots/>\n )}\n {pages.findIndex(item => item === pageCount) === -1 && pageCount !== 1 && (\n <Item>\n <NavLink\n to={`${baseUrl}/${pageCount}`}\n onClick={() => {\n if (onPageChange) onPageChange(pageCount);\n }}>\n <ItemContent className={currentPage === pageCount ? 'active' : ''}>\n <span>{pageCount}</span>\n </ItemContent>\n </NavLink>\n </Item>\n )}\n <Step up\n target={`${baseUrl}/${currentPage + 1}`}\n page={currentPage + 1}\n disabled={currentPage === pageCount}\n onPageChange={() => {\n if (onPageChange) onPageChange(currentPage + 1);\n }}\n id=\"paginator-right\"/>\n </Items>\n </Container>\n );\n};\n\nexport default Paginator;\n"],"mappings":";;;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,OAAOC,MAAM,MAAM,mBAAmB;AACtC,SAAQC,OAAO,QAAO,kBAAkB;AACxC,SAAQC,WAAW,EAAEC,MAAM,EAAEC,kBAAkB,EAAEC,WAAW,QAAO,WAAW;AAC9E,SAAQC,WAAW,EAAEC,YAAY,QAAO,kCAAkC;AAC1E,SAAQC,iBAAiB,QAAO,sBAAsB;AACtD,SAAQC,SAAS,QAAO,qBAAqB;AAC7C,SAASC,WAAW,QAAQ,cAAc;AAC1C,SAAQC,UAAU,QAAO,WAAW;AAAC;AAAA;AAErC,IAAMC,SAAS,GAAGZ,MAAM,CAACa,GAAG,2KAKxBX,WAAW,CAACY,MAAM,CAGrB;AAED,IAAMC,KAAK,GAAGf,MAAM,CAACgB,EAAE,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AI,GAAG,QAAQ,GAAG,EAAG;cAAA,uBAC5D;gBAAA,UAAOA;cAAI;YAAQ;UACN;QACR,GATDA,IAAI,CAUR;MAAA,CACR,CAAC,EACDO,SAAS,GAAG,CAAC,IAAIC,WAAW,IAAID,SAAS,GAAG,CAAC,iBAC5C,KAAC,IAAI,KACN,EACAG,KAAK,CAACK,SAAS,CAAC,UAAAC,IAAI;QAAA,OAAIA,IAAI,KAAKT,SAAS;MAAA,EAAC,KAAK,CAAC,CAAC,IAAIA,SAAS,KAAK,CAAC,iBACpE,KAAC,IAAI;QAAA,uBACH,KAAC,OAAO;UACN,EAAE,YAAKE,OAAO,cAAIF,SAAS,CAAG;UAC9B,OAAO,EAAE,mBAAM;YACb,IAAIN,aAAY,EAAEA,aAAY,CAACM,SAAS,CAAC;UAC3C,CAAE;UAAA,uBACA,KAAC,WAAW;YAAC,SAAS,EAAEC,WAAW,KAAKD,SAAS,GAAG,QAAQ,GAAG,EAAG;YAAA,uBACjE;cAAA,UAAOA;YAAS;UAAQ;QACX;MACR,EAEb,eACD,KAAC,IAAI;QAAC,EAAE;QACF,MAAM,YAAKE,OAAO,cAAID,WAAW,GAAG,CAAC,CAAG;QACxC,IAAI,EAAEA,WAAW,GAAG,CAAE;QACtB,QAAQ,EAAEA,WAAW,KAAKD,SAAU;QACpC,YAAY,EAAE,wBAAM;UAClB,IAAIN,aAAY,EAAEA,aAAY,CAACO,WAAW,GAAG,CAAC,CAAC;QACjD,CAAE;QACF,EAAE,EAAC;MAAiB,EAAE;IAAA;EACtB,EACE;AAEhB,CAAC;AAAC;EAhIAD,SAAS;EACTC,WAAW;EACXC,OAAO;EACPR,YAAY;AAAA;AA+Hd,eAAeK,SAAS"}
1
+ {"version":3,"file":"Paginator.js","names":["React","styled","NavLink","BREAKPOINTS","COLORS","ComponentTextStyle","focusStyles","ChevronLeft","ChevronRight","ComponentMStyling","Z_INDEXES","useNavigate","IconButton","Container","nav","MEDIUM","Items","ul","Item","li","Regular","neutral_600","hover","primary_800","primary_20","active","primary_700","primary_100","neutral_800","neutral_20","Dots","ItemContent","primary_500","Step","up","target","disabled","page","onPageChange","id","navigateHook","handleButtonClick","event","Paginator","pageCount","currentPage","baseUrl","pages","from","to","i","push","findIndex","item","map"],"sources":["../../src/Paginator/Paginator.tsx"],"sourcesContent":["import * as React from 'react';\nimport styled from 'styled-components';\nimport {NavLink} from 'react-router-dom';\nimport {BREAKPOINTS, COLORS, ComponentTextStyle, focusStyles} from '../styles';\nimport {ChevronLeft, ChevronRight} from '../icons/systemicons/SystemIcons';\nimport {ComponentMStyling} from '../styles/typography';\nimport {Z_INDEXES} from '../styles/z-indexes';\nimport { useNavigate } from 'react-router';\nimport {IconButton} from '../Button';\n\nconst Container = styled.nav`\n margin: 20px 0;\n display: flex;\n justify-content: center;\n\n ${BREAKPOINTS.MEDIUM} {\n width: 75%;\n }\n`;\n\nconst Items = styled.ul`\n margin: 0;\n padding: 0;\n list-style: none;\n display: flex;\n`;\n\nconst Item = styled.li`\n width: 48px;\n height: 48px;\n display: flex;\n align-items: center;\n justify-content: center;\n\n & > * {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\n text-decoration: none;\n\n ${ComponentMStyling(ComponentTextStyle.Regular, COLORS.neutral_600)}\n\n &:focus,\n &:focus-within {\n ${focusStyles}\n }\n }\n & > a:hover {\n z-index: ${Z_INDEXES.hover};\n color: ${COLORS.primary_800};\n background-color: ${COLORS.primary_20};\n }\n & > a:active {\n z-index: ${Z_INDEXES.active};\n color: ${COLORS.primary_700};\n background-color: ${COLORS.primary_100};\n }\n & > a.active {\n z-index: ${Z_INDEXES.active};\n color: ${COLORS.neutral_800};\n background-color: ${COLORS.neutral_20};\n cursor: default;\n &:hover {\n color: ${COLORS.primary_800};\n background-color: ${COLORS.primary_20};\n }\n &:active {\n color: ${COLORS.primary_700};\n background-color: ${COLORS.primary_100};\n }\n }\n`;\n\nconst Dots = styled(Item)`\n cursor: not-allowed;\n &:after{\n ${ComponentMStyling(ComponentTextStyle.Regular, COLORS.neutral_600)}\n content: '...';\n }\n`;\n\nconst ItemContent = styled('div')`\n text-align:center;\n display: flex;\n justify-content: center;\n align-items: center;\n position: relative;\n width: 100%;\n height: 100%;\n \n &.active:after{\n content: '';\n position: absolute;\n bottom: 4px;\n width: 32px;\n border-radius: 4px;\n height: 4px;\n background-color: ${COLORS.primary_500}\n }\n &.active:hover:after{\n background-color: ${COLORS.primary_700}\n }\n &.active:active:after{\n background-color: ${COLORS.primary_800}\n }\n`\n\ntype PaginatorProps = {\n pageCount: number;\n currentPage: number;\n baseUrl: string;\n onPageChange?: (page: number) => void;\n};\n\nconst Step = ({\n up = true,\n target = '',\n disabled = false,\n page,\n onPageChange,\n id,\n}: {\n up: boolean;\n target: string;\n disabled: boolean;\n page: number;\n onPageChange?: (page: number) => void;\n id?: string;\n}) => {\n const navigateHook = useNavigate();\n\n const handleButtonClick = () => {\n navigateHook(target);\n onPageChange && onPageChange(page);\n }\n\n return (\n <IconButton id={id}\n action={event => handleButtonClick()}\n variant={'secondary'}\n shape={'circular'}\n disabled={disabled}>\n {up ? <ChevronRight/> : <ChevronLeft/>}\n </IconButton>\n )\n};\n\nconst Paginator = ({ pageCount = 1, currentPage = 1, baseUrl = '', onPageChange }: PaginatorProps) => {\n const pages = [];\n let from = 2;\n let to = 4;\n if (pageCount === 0) return null;\n\n if (pageCount > 1) {\n if (currentPage >= 4 && currentPage <= pageCount - 2) {\n from = currentPage - 1;\n to = currentPage + 1;\n } else if (pageCount - 2 > 1 && currentPage > pageCount - 2) {\n from = pageCount - 3;\n to = pageCount - 1;\n }\n if (to > pageCount) {\n to = pageCount;\n }\n for (let i = from; i <= to; i += 1) {\n pages.push(i);\n }\n }\n\n return (\n <Container>\n <Items>\n <Step up={false}\n target={`${baseUrl}/${currentPage - 1}`}\n page={currentPage - 1}\n disabled={currentPage === 1}\n onPageChange={() => {\n if (onPageChange) onPageChange(currentPage - 1);\n }}\n id=\"paginator-left\"/>\n {pages.findIndex(item => item === 1) === -1 && (\n <Item>\n <NavLink\n to={`${baseUrl}/1`}\n onClick={() => {\n if (onPageChange) onPageChange(1);\n }}>\n <ItemContent className={currentPage === 1 ? 'active' : ''}>\n <span>1</span>\n </ItemContent>\n </NavLink>\n </Item>\n )}\n {currentPage >= 4 && pageCount > 5 && pageCount && pages.findIndex(item => item === 1) === -1 && (\n <Dots/>\n )}\n {pages.map(page => (\n <Item key={page}>\n <NavLink\n to={`${baseUrl}/${page}`}\n onClick={() => {\n if (onPageChange) onPageChange(page);\n }}>\n <ItemContent className={currentPage === page ? 'active' : ''}>\n <span>{page}</span>\n </ItemContent>\n </NavLink>\n </Item>\n ))}\n {pageCount > 5 && currentPage <= pageCount - 3 && (\n <Dots/>\n )}\n {pages.findIndex(item => item === pageCount) === -1 && pageCount !== 1 && (\n <Item>\n <NavLink\n to={`${baseUrl}/${pageCount}`}\n onClick={() => {\n if (onPageChange) onPageChange(pageCount);\n }}>\n <ItemContent className={currentPage === pageCount ? 'active' : ''}>\n <span>{pageCount}</span>\n </ItemContent>\n </NavLink>\n </Item>\n )}\n <Step up\n target={`${baseUrl}/${currentPage + 1}`}\n page={currentPage + 1}\n disabled={currentPage === pageCount}\n onPageChange={() => {\n if (onPageChange) onPageChange(currentPage + 1);\n }}\n id=\"paginator-right\"/>\n </Items>\n </Container>\n );\n};\n\nexport default Paginator;\n"],"mappings":";;;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,OAAOC,MAAM,MAAM,mBAAmB;AACtC,SAAQC,OAAO,QAAO,kBAAkB;AACxC,SAAQC,WAAW,EAAEC,MAAM,EAAEC,kBAAkB,EAAEC,WAAW,QAAO,WAAW;AAC9E,SAAQC,WAAW,EAAEC,YAAY,QAAO,kCAAkC;AAC1E,SAAQC,iBAAiB,QAAO,sBAAsB;AACtD,SAAQC,SAAS,QAAO,qBAAqB;AAC7C,SAASC,WAAW,QAAQ,cAAc;AAC1C,SAAQC,UAAU,QAAO,WAAW;AAA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ableOnly) { var keys = Object.keys(object); if (O
23
23
  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; }
24
24
  function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
25
25
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
26
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
26
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
27
27
  var Table = function Table(props) {
28
28
  var onPreviousPageClick = props.onPreviousPageClick,
29
29
  onNextPageClick = props.onNextPageClick,
@@ -5,7 +5,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
5
5
  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; }
6
6
  function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
7
7
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
8
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
8
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
9
9
  /**
10
10
  * Import React libraries.
11
11
  */
@@ -1 +1 @@
1
- {"version":3,"file":"TableFooter.cjs","names":["TableFooter","props","rowsPerPageValues","value","dropDownText","rowsPerPageLabel","rowsPerPage","accordion","setIsCollapsed","isCollapsed","defaultOnMouseDownHandler","rows","length","showMoreLabel","showFewerLabel","showLoadingIndicator","onRowsPerPageChange","total","from","to","prevPage","COLORS","neutral_600","nextPage"],"sources":["../../src/Table/TableFooter.tsx"],"sourcesContent":["import React from 'react';\nimport {TableProps} from './TableTypes';\nimport {DropdownButton, DropdownItem} from '../Dropdown';\nimport {IconButton} from '../Button';\nimport {ChevronLeft, ChevronRight} from '../icons/systemicons/SystemIcons';\nimport {COLORS} from '../styles';\nimport {\n StyledTableFooter, StyledTableFooterCollapseButton,\n StyledTableFooterContent,\n StyledTableFooterControls,\n StyledTableFooterCurrentInfo\n} from './TableStyles';\nimport {SystemIcons} from '../icons';\nimport {defaultOnMouseDownHandler} from '../common';\n\n\ninterface TableFooterProps extends TableProps {\n onRowsPerPageChange: (value: number) => void;\n rowsPerPage: number;\n from?: number;\n to?: number;\n total?: number;\n nextPage: () => void;\n prevPage: () => void;\n setIsCollapsed: (isCollapsed: boolean) => void;\n isCollapsed: boolean;\n}\n\nconst TableFooter: React.FunctionComponent<TableFooterProps> = (props) => {\n const rowsPerPageValues: DropdownItem[] = [{value: '10'}, {value: '20'}, {value: '50'}, {value: '100'}];\n\n const dropDownText = `${props.rowsPerPageLabel ?? 'Rows per page'} : ${props.rowsPerPage}`;\n\n return (\n <StyledTableFooter data-testid=\"TestTableFooterRow\">\n {\n props.accordion &&\n <StyledTableFooterCollapseButton onClick={() => props.setIsCollapsed(!props.isCollapsed)}\n onMouseDown={defaultOnMouseDownHandler}\n disabled={props.isCollapsed && props.rows.length <= props.rowsPerPage}>\n {\n props.isCollapsed &&\n <>\n <span>{props.showMoreLabel ?? 'Show more'} ({props.rows.length - props.rowsPerPage})</span>\n <SystemIcons.ArrowDropDown/>\n </>\n }\n {\n !props.isCollapsed &&\n <>\n <span>{props.showFewerLabel ?? 'Show fewer'}</span>\n <SystemIcons.ArrowDropUp/>\n </>\n }\n </StyledTableFooterCollapseButton>\n }\n {\n !props.accordion &&\n <StyledTableFooterContent>\n <DropdownButton\n type={'text'}\n items={rowsPerPageValues}\n disabled={props.showLoadingIndicator}\n value={[`${props.rowsPerPage}`]}\n onClick={(value) => props.onRowsPerPageChange(+value[0])}\n label={dropDownText}\n keepLabel={true}\n />\n <StyledTableFooterCurrentInfo>\n {props.total === 0 ? 0 : props.from}-{props.to} of {props.total}\n </StyledTableFooterCurrentInfo>\n <StyledTableFooterControls>\n <IconButton variant=\"secondary\" shape=\"circular\" action={() => props.prevPage()}\n disabled={props.from === 1 || props.showLoadingIndicator}>\n <ChevronLeft size=\"24\" color={COLORS.neutral_600}/>\n </IconButton>\n <IconButton variant=\"secondary\" shape=\"circular\" action={() => props.nextPage()}\n disabled={props.to === props.total || props.showLoadingIndicator}>\n <ChevronRight size=\"24\" color={COLORS.neutral_600}/>\n </IconButton>\n </StyledTableFooterControls>\n </StyledTableFooterContent>\n }\n </StyledTableFooter>\n );\n};\n\n\nexport default TableFooter;\n"],"mappings":";;;;;;;;AAAA;AAEA;AACA;AACA;AACA;AACA;AAMA;AACA;AAAoD;AAepD,IAAMA,WAAsD,GAAG,SAAzDA,WAAsD,CAAIC,KAAK,EAAK;EAAA;EACxE,IAAMC,iBAAiC,GAAG,CAAC;IAACC,KAAK,EAAE;EAAI,CAAC,EAAE;IAACA,KAAK,EAAE;EAAI,CAAC,EAAE;IAACA,KAAK,EAAE;EAAI,CAAC,EAAE;IAACA,KAAK,EAAE;EAAK,CAAC,CAAC;EAEvG,IAAM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C1BH,KAAK,CAACgB,KAAK,KAAK,CAAC,GAAG,CAAC,GAAGhB,KAAK,CAACiB,IAAI,OAAGjB,KAAK,CAACkB,EAAE,UAAMlB,KAAK,CAACgB,KAAK;MAAA,EAClC,eAC/B,sBAAC,sCAAyB;QAAA,wBACxB,qBAAC,kBAAU;UAAC,OAAO,EAAC,WAAW;UAAC,KAAK,EAAC,UAAU;UAAC,MAAM,EAAE;YAAA,OAAMhB,KAAK,CAACmB,QAAQ,EAAE;UAAA,CAAC;UACpE,QAAQ,EAAEnB,KAAK,CAACiB,IAAI,KAAK,CAAC,IAAIjB,KAAK,CAACc,oBAAqB;UAAA,uBACnE,qBAAC,wBAAW;YAAC,IAAI,EAAC,IAAI;YAAC,KAAK,EAAEM,cAAM,CAACC;UAAY;QAAE,EACxC,eACb,qBAAC,kBAAU;UAAC,OAAO,EAAC,WAAW;UAAC,KAAK,EAAC,UAAU;UAAC,MAAM,EAAE;YAAA,OAAMrB,KAAK,CAACsB,QAAQ,EAAE;UAAA,CAAC;UACpE,QAAQ,EAAEtB,KAAK,CAACkB,EAAE,KAAKlB,KAAK,CAACgB,KAAK,IAAIhB,KAAK,CAACc,oBAAqB;UAAA,uBAC3E,qBAAC,yBAAY;YAAC,IAAI,EAAC,IAAI;YAAC,KAAK,EAAEM,cAAM,CAACC;UAAY;QAAE,EACzC;MAAA,EACa;IAAA,EACH;EAAA,EAEf;AAExB,CAAC;AAAC;EApEAN,mBAAmB;EACnBV,WAAW;EACXY,IAAI;EACJC,EAAE;EACFF,KAAK;EACLM,QAAQ;EACRH,QAAQ;EACRZ,cAAc;EACdC,WAAW;AAAA;AAAA,eA+DET,WAAW;AAAA"}
1
+ {"version":3,"file":"TableFooter.cjs","names":["TableFooter","props","rowsPerPageValues","value","dropDownText","rowsPerPageLabel","rowsPerPage","accordion","setIsCollapsed","isCollapsed","defaultOnMouseDownHandler","rows","length","showMoreLabel","showFewerLabel","showLoadingIndicator","onRowsPerPageChange","total","from","to","prevPage","COLORS","neutral_600","nextPage"],"sources":["../../src/Table/TableFooter.tsx"],"sourcesContent":["import React from 'react';\nimport {TableProps} from './TableTypes';\nimport {DropdownButton, DropdownItem} from '../Dropdown';\nimport {IconButton} from '../Button';\nimport {ChevronLeft, ChevronRight} from '../icons/systemicons/SystemIcons';\nimport {COLORS} from '../styles';\nimport {\n StyledTableFooter, StyledTableFooterCollapseButton,\n StyledTableFooterContent,\n StyledTableFooterControls,\n StyledTableFooterCurrentInfo\n} from './TableStyles';\nimport {SystemIcons} from '../icons';\nimport {defaultOnMouseDownHandler} from '../common';\n\n\ninterface TableFooterProps extends TableProps {\n onRowsPerPageChange: (value: number) => void;\n rowsPerPage: number;\n from?: number;\n to?: number;\n total?: number;\n nextPage: () => void;\n prevPage: () => void;\n setIsCollapsed: (isCollapsed: boolean) => void;\n isCollapsed: boolean;\n}\n\nconst TableFooter: React.FunctionComponent<TableFooterProps> = (props) => {\n const rowsPerPageValues: DropdownItem[] = [{value: '10'}, {value: '20'}, {value: '50'}, {value: '100'}];\n\n const dropDownText = `${props.rowsPerPageLabel ?? 'Rows per page'} : ${props.rowsPerPage}`;\n\n return (\n <StyledTableFooter data-testid=\"TestTableFooterRow\">\n {\n props.accordion &&\n <StyledTableFooterCollapseButton onClick={() => props.setIsCollapsed(!props.isCollapsed)}\n onMouseDown={defaultOnMouseDownHandler}\n disabled={props.isCollapsed && props.rows.length <= props.rowsPerPage}>\n {\n props.isCollapsed &&\n <>\n <span>{props.showMoreLabel ?? 'Show more'} ({props.rows.length - props.rowsPerPage})</span>\n <SystemIcons.ArrowDropDown/>\n </>\n }\n {\n !props.isCollapsed &&\n <>\n <span>{props.showFewerLabel ?? 'Show fewer'}</span>\n <SystemIcons.ArrowDropUp/>\n </>\n }\n </StyledTableFooterCollapseButton>\n }\n {\n !props.accordion &&\n <StyledTableFooterContent>\n <DropdownButton\n type={'text'}\n items={rowsPerPageValues}\n disabled={props.showLoadingIndicator}\n value={[`${props.rowsPerPage}`]}\n onClick={(value) => props.onRowsPerPageChange(+value[0])}\n label={dropDownText}\n keepLabel={true}\n />\n <StyledTableFooterCurrentInfo>\n {props.total === 0 ? 0 : props.from}-{props.to} of {props.total}\n </StyledTableFooterCurrentInfo>\n <StyledTableFooterControls>\n <IconButton variant=\"secondary\" shape=\"circular\" action={() => props.prevPage()}\n disabled={props.from === 1 || props.showLoadingIndicator}>\n <ChevronLeft size=\"24\" color={COLORS.neutral_600}/>\n </IconButton>\n <IconButton variant=\"secondary\" shape=\"circular\" action={() => props.nextPage()}\n disabled={props.to === props.total || props.showLoadingIndicator}>\n <ChevronRight size=\"24\" color={COLORS.neutral_600}/>\n </IconButton>\n </StyledTableFooterControls>\n </StyledTableFooterContent>\n }\n </StyledTableFooter>\n );\n};\n\n\nexport default TableFooter;\n"],"mappings":";;;;;;;;AAAA;AAEA;AACA;AACA;AACA;AACA;AAMA;AACA;AAAoD;AAepD,IAAMA,WAAsD,GAAG,SAAzDA,WAAsD,CAAIC,KAAK,EAAK;EAAA;EACxE,IAAMC,iBAAiC,GAAG,CAAC;IAACC,KAAK,EAAE;EAAI,CAAC,EAAE;IAACA,KAAK,EAAE;EAAI,CAAC,EAAE;IAACA,KAAK,EAAE;EAAI,CAAC,EAAE;IAACA,KAAK,EAAE;EAAK,CAAC,CAAC;EAEvG,IAAMC,YAAY,sCAAMH,KAAK,CAACI,gBAAgB,yEAAI,eAAe,gBAAMJ,KAAK,CAACK,WAAW,CAAE;EAE1F,oBACE,sBAAC,8BAAiB;IAAC,eAAY,oBAAoB;IAAA,WAE3CL,KAAK,CAACM,SAAS,iBACf,sBAAC,4CAA+B;MAAC,OAAO,EAAE;QAAA,OAAMN,KAAK,CAACO,cAAc,CAAC,CAACP,KAAK,CAACQ,WAAW,CAAC;MAAA,CAAC;MACxD,WAAW,EAAEC,iCAA0B;MACvC,QAAQ,EAAET,KAAK,CAACQ,WAAW,IAAIR,KAAK,CAACU,IAAI,CAACC,MAAM,IAAIX,KAAK,CAACK,WAAY;MAAA,W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AK,CAACc,oBAAqB;UAAA,uBACnE,qBAAC,wBAAW;YAAC,IAAI,EAAC,IAAI;YAAC,KAAK,EAAEM,cAAM,CAACC;UAAY;QAAE,EACxC,eACb,qBAAC,kBAAU;UAAC,OAAO,EAAC,WAAW;UAAC,KAAK,EAAC,UAAU;UAAC,MAAM,EAAE;YAAA,OAAMrB,KAAK,CAACsB,QAAQ,EAAE;UAAA,CAAC;UACpE,QAAQ,EAAEtB,KAAK,CAACkB,EAAE,KAAKlB,KAAK,CAACgB,KAAK,IAAIhB,KAAK,CAACc,oBAAqB;UAAA,uBAC3E,qBAAC,yBAAY;YAAC,IAAI,EAAC,IAAI;YAAC,KAAK,EAAEM,cAAM,CAACC;UAAY;QAAE,EACzC;MAAA,EACa;IAAA,EACH;EAAA,EAEf;AAExB,CAAC;AAAC;EApEAN,mBAAmB;EACnBV,WAAW;EACXY,IAAI;EACJC,EAAE;EACFF,KAAK;EACLM,QAAQ;EACRH,QAAQ;EACRZ,cAAc;EACdC,WAAW;AAAA;AAAA,eA+DET,WAAW;AAAA"}
@@ -7,9 +7,9 @@ import { COLORS } from '../styles';
7
7
  import { StyledTableFooter, StyledTableFooterCollapseButton, StyledTableFooterContent, StyledTableFooterControls, StyledTableFooterCurrentInfo } from './TableStyles';
8
8
  import { SystemIcons } from '../icons';
9
9
  import { defaultOnMouseDownHandler } from '../common';
10
+ import { Fragment as _Fragment } from "react/jsx-runtime";
10
11
  import { jsxs as _jsxs } from "react/jsx-runtime";
11
12
  import { jsx as _jsx } from "react/jsx-runtime";
12
- import { Fragment as _Fragment } from "react/jsx-runtime";
13
13
  var TableFooter = function TableFooter(props) {
14
14
  var _props$rowsPerPageLab, _props$showMoreLabel, _props$showFewerLabel;
15
15
  var rowsPerPageValues = [{
@@ -1 +1 @@
1
- {"version":3,"file":"TableFooter.js","names":["React","DropdownButton","IconButton","ChevronLeft","ChevronRight","COLORS","StyledTableFooter","StyledTableFooterCollapseButton","StyledTableFooterContent","StyledTableFooterControls","StyledTableFooterCurrentInfo","SystemIcons","defaultOnMouseDownHandler","TableFooter","props","rowsPerPageValues","value","dropDownText","rowsPerPageLabel","rowsPerPage","accordion","setIsCollapsed","isCollapsed","rows","length","showMoreLabel","showFewerLabel","showLoadingIndicator","onRowsPerPageChange","total","from","to","prevPage","neutral_600","nextPage"],"sources":["../../src/Table/TableFooter.tsx"],"sourcesContent":["import React from 'react';\nimport {TableProps} from './TableTypes';\nimport {DropdownButton, DropdownItem} from '../Dropdown';\nimport {IconButton} from '../Button';\nimport {ChevronLeft, ChevronRight} from '../icons/systemicons/SystemIcons';\nimport {COLORS} from '../styles';\nimport {\n StyledTableFooter, StyledTableFooterCollapseButton,\n StyledTableFooterContent,\n StyledTableFooterControls,\n StyledTableFooterCurrentInfo\n} from './TableStyles';\nimport {SystemIcons} from '../icons';\nimport {defaultOnMouseDownHandler} from '../common';\n\n\ninterface TableFooterProps extends TableProps {\n onRowsPerPageChange: (value: number) => void;\n rowsPerPage: number;\n from?: number;\n to?: number;\n total?: number;\n nextPage: () => void;\n prevPage: () => void;\n setIsCollapsed: (isCollapsed: boolean) => void;\n isCollapsed: boolean;\n}\n\nconst TableFooter: React.FunctionComponent<TableFooterProps> = (props) => {\n const rowsPerPageValues: DropdownItem[] = [{value: '10'}, {value: '20'}, {value: '50'}, {value: '100'}];\n\n const dropDownText = `${props.rowsPerPageLabel ?? 'Rows per page'} : ${props.rowsPerPage}`;\n\n return (\n <StyledTableFooter data-testid=\"TestTableFooterRow\">\n {\n props.accordion &&\n <StyledTableFooterCollapseButton onClick={() => props.setIsCollapsed(!props.isCollapsed)}\n onMouseDown={defaultOnMouseDownHandler}\n disabled={props.isCollapsed && props.rows.length <= props.rowsPerPage}>\n {\n props.isCollapsed &&\n <>\n <span>{props.showMoreLabel ?? 'Show more'} ({props.rows.length - props.rowsPerPage})</span>\n <SystemIcons.ArrowDropDown/>\n </>\n }\n {\n !props.isCollapsed &&\n <>\n <span>{props.showFewerLabel ?? 'Show fewer'}</span>\n <SystemIcons.ArrowDropUp/>\n </>\n }\n </StyledTableFooterCollapseButton>\n }\n {\n !props.accordion &&\n <StyledTableFooterContent>\n <DropdownButton\n type={'text'}\n items={rowsPerPageValues}\n disabled={props.showLoadingIndicator}\n value={[`${props.rowsPerPage}`]}\n onClick={(value) => props.onRowsPerPageChange(+value[0])}\n label={dropDownText}\n keepLabel={true}\n />\n <StyledTableFooterCurrentInfo>\n {props.total === 0 ? 0 : props.from}-{props.to} of {props.total}\n </StyledTableFooterCurrentInfo>\n <StyledTableFooterControls>\n <IconButton variant=\"secondary\" shape=\"circular\" action={() => props.prevPage()}\n disabled={props.from === 1 || props.showLoadingIndicator}>\n <ChevronLeft size=\"24\" color={COLORS.neutral_600}/>\n </IconButton>\n <IconButton variant=\"secondary\" shape=\"circular\" action={() => props.nextPage()}\n disabled={props.to === props.total || props.showLoadingIndicator}>\n <ChevronRight size=\"24\" color={COLORS.neutral_600}/>\n </IconButton>\n </StyledTableFooterControls>\n </StyledTableFooterContent>\n }\n </StyledTableFooter>\n );\n};\n\n\nexport default TableFooter;\n"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SAAQC,cAAc,QAAqB,aAAa;AACxD,SAAQC,UAAU,QAAO,WAAW;AACpC,SAAQC,WAAW,EAAEC,YAAY,QAAO,kCAAkC;AAC1E,SAAQC,MAAM,QAAO,WAAW;AAChC,SACEC,iBAAiB,EAAEC,+BAA+B,EAClDC,wBAAwB,EACxBC,yBAAyB,EACzBC,4BAA4B,QACvB,eAAe;AACtB,SAAQC,WAAW,QAAO,UAAU;AACpC,SAAQC,yBAAyB,QAAO,WAAW;AAAC;AAAA;AAAA;AAepD,IAAMC,WAAsD,GAAG,SAAzDA,WAAsD,CAAIC,KAAK,EAAK;EAAA;EACxE,IAAMC,iBAAiC,GAAG,CAAC;IAACC,KAAK,EAAE;EAAI,CAAC,EAAE;IAACA,KAAK,EAAE;EAAI,CAAC,EAAE;IAACA,KAAK,EAAE;EAAI,CAA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S,EAAE;MAAK,EAChB,eACF,MAAC,4BAA4B;QAAA,WAC1BH,KAAK,CAACe,KAAK,KAAK,CAAC,GAAG,CAAC,GAAGf,KAAK,CAACgB,IAAI,OAAGhB,KAAK,CAACiB,EAAE,UAAMjB,KAAK,CAACe,KAAK;MAAA,EAClC,eAC/B,MAAC,yBAAyB;QAAA,wBACxB,KAAC,UAAU;UAAC,OAAO,EAAC,WAAW;UAAC,KAAK,EAAC,UAAU;UAAC,MAAM,EAAE;YAAA,OAAMf,KAAK,CAACkB,QAAQ,EAAE;UAAA,CAAC;UACpE,QAAQ,EAAElB,KAAK,CAACgB,IAAI,KAAK,CAAC,IAAIhB,KAAK,CAACa,oBAAqB;UAAA,uBACnE,KAAC,WAAW;YAAC,IAAI,EAAC,IAAI;YAAC,KAAK,EAAEtB,MAAM,CAAC4B;UAAY;QAAE,EACxC,eACb,KAAC,UAAU;UAAC,OAAO,EAAC,WAAW;UAAC,KAAK,EAAC,UAAU;UAAC,MAAM,EAAE;YAAA,OAAMnB,KAAK,CAACoB,QAAQ,EAAE;UAAA,CAAC;UACpE,QAAQ,EAAEpB,KAAK,CAACiB,EAAE,KAAKjB,KAAK,CAACe,KAAK,IAAIf,KAAK,CAACa,oBAAqB;UAAA,uBAC3E,KAAC,YAAY;YAAC,IAAI,EAAC,IAAI;YAAC,KAAK,EAAEtB,MAAM,CAAC4B;UAAY;QAAE,EACzC;MAAA,EACa;IAAA,EACH;EAAA,EAEf;AAExB,CAAC;AAAC;EApEAL,mBAAmB;EACnBT,WAAW;EACXW,IAAI;EACJC,EAAE;EACFF,KAAK;EACLK,QAAQ;EACRF,QAAQ;EACRX,cAAc;EACdC,WAAW;AAAA;AA+Db,eAAeT,WAAW"}
1
+ {"version":3,"file":"TableFooter.js","names":["React","DropdownButton","IconButton","ChevronLeft","ChevronRight","COLORS","StyledTableFooter","StyledTableFooterCollapseButton","StyledTableFooterContent","StyledTableFooterControls","StyledTableFooterCurrentInfo","SystemIcons","defaultOnMouseDownHandler","TableFooter","props","rowsPerPageValues","value","dropDownText","rowsPerPageLabel","rowsPerPage","accordion","setIsCollapsed","isCollapsed","rows","length","showMoreLabel","showFewerLabel","showLoadingIndicator","onRowsPerPageChange","total","from","to","prevPage","neutral_600","nextPage"],"sources":["../../src/Table/TableFooter.tsx"],"sourcesContent":["import React from 'react';\nimport {TableProps} from './TableTypes';\nimport {DropdownButton, DropdownItem} from '../Dropdown';\nimport {IconButton} from '../Button';\nimport {ChevronLeft, ChevronRight} from '../icons/systemicons/SystemIcons';\nimport {COLORS} from '../styles';\nimport {\n StyledTableFooter, StyledTableFooterCollapseButton,\n StyledTableFooterContent,\n StyledTableFooterControls,\n StyledTableFooterCurrentInfo\n} from './TableStyles';\nimport {SystemIcons} from '../icons';\nimport {defaultOnMouseDownHandler} from '../common';\n\n\ninterface TableFooterProps extends TableProps {\n onRowsPerPageChange: (value: number) => void;\n rowsPerPage: number;\n from?: number;\n to?: number;\n total?: number;\n nextPage: () => void;\n prevPage: () => void;\n setIsCollapsed: (isCollapsed: boolean) => void;\n isCollapsed: boolean;\n}\n\nconst TableFooter: React.FunctionComponent<TableFooterProps> = (props) => {\n const rowsPerPageValues: DropdownItem[] = [{value: '10'}, {value: '20'}, {value: '50'}, {value: '100'}];\n\n const dropDownText = `${props.rowsPerPageLabel ?? 'Rows per page'} : ${props.rowsPerPage}`;\n\n return (\n <StyledTableFooter data-testid=\"TestTableFooterRow\">\n {\n props.accordion &&\n <StyledTableFooterCollapseButton onClick={() => props.setIsCollapsed(!props.isCollapsed)}\n onMouseDown={defaultOnMouseDownHandler}\n disabled={props.isCollapsed && props.rows.length <= props.rowsPerPage}>\n {\n props.isCollapsed &&\n <>\n <span>{props.showMoreLabel ?? 'Show more'} ({props.rows.length - props.rowsPerPage})</span>\n <SystemIcons.ArrowDropDown/>\n </>\n }\n {\n !props.isCollapsed &&\n <>\n <span>{props.showFewerLabel ?? 'Show fewer'}</span>\n <SystemIcons.ArrowDropUp/>\n </>\n }\n </StyledTableFooterCollapseButton>\n }\n {\n !props.accordion &&\n <StyledTableFooterContent>\n <DropdownButton\n type={'text'}\n items={rowsPerPageValues}\n disabled={props.showLoadingIndicator}\n value={[`${props.rowsPerPage}`]}\n onClick={(value) => props.onRowsPerPageChange(+value[0])}\n label={dropDownText}\n keepLabel={true}\n />\n <StyledTableFooterCurrentInfo>\n {props.total === 0 ? 0 : props.from}-{props.to} of {props.total}\n </StyledTableFooterCurrentInfo>\n <StyledTableFooterControls>\n <IconButton variant=\"secondary\" shape=\"circular\" action={() => props.prevPage()}\n disabled={props.from === 1 || props.showLoadingIndicator}>\n <ChevronLeft size=\"24\" color={COLORS.neutral_600}/>\n </IconButton>\n <IconButton variant=\"secondary\" shape=\"circular\" action={() => props.nextPage()}\n disabled={props.to === props.total || props.showLoadingIndicator}>\n <ChevronRight size=\"24\" color={COLORS.neutral_600}/>\n </IconButton>\n </StyledTableFooterControls>\n </StyledTableFooterContent>\n }\n </StyledTableFooter>\n );\n};\n\n\nexport default TableFooter;\n"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SAAQC,cAAc,QAAqB,aAAa;AACxD,SAAQC,UAAU,QAAO,WAAW;AACpC,SAAQC,WAAW,EAAEC,YAAY,QAAO,kCAAkC;AAC1E,SAAQC,MAAM,QAAO,WAAW;AAChC,SACEC,iBAAiB,EAAEC,+BAA+B,EAClDC,wBAAwB,EACxBC,yBAAyB,EACzBC,4BAA4B,QACvB,eAAe;AACtB,SAAQC,WAAW,QAAO,UAAU;AACpC,SAAQC,yBAAyB,QAAO,WAAW;AAAC;AAAA;AAAA;AAepD,IAAMC,WAAsD,GAAG,SAAzDA,WAAsD,CAAIC,KAAK,EAAK;EAAA;EACxE,IAAMC,iBAAiC,GAAG,CAAC;IAACC,KAAK,EAAE;EAAI,CAAC,EAAE;IAACA,KAAK,EAAE;EAAI,CAAC,EAAE;IAACA,KAAK,EAAE;EAAI,CAAC,EAAE;IAACA,KAAK,EAAE;EAAK,CAAC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EAChB,eACF,MAAC,4BAA4B;QAAA,WAC1BH,KAAK,CAACe,KAAK,KAAK,CAAC,GAAG,CAAC,GAAGf,KAAK,CAACgB,IAAI,EAAC,GAAC,EAAChB,KAAK,CAACiB,EAAE,EAAC,MAAI,EAACjB,KAAK,CAACe,KAAK;MAAA,EAClC,eAC/B,MAAC,yBAAyB;QAAA,wBACxB,KAAC,UAAU;UAAC,OAAO,EAAC,WAAW;UAAC,KAAK,EAAC,UAAU;UAAC,MAAM,EAAE;YAAA,OAAMf,KAAK,CAACkB,QAAQ,EAAE;UAAA,CAAC;UACpE,QAAQ,EAAElB,KAAK,CAACgB,IAAI,KAAK,CAAC,IAAIhB,KAAK,CAACa,oBAAqB;UAAA,uBACnE,KAAC,WAAW;YAAC,IAAI,EAAC,IAAI;YAAC,KAAK,EAAEtB,MAAM,CAAC4B;UAAY;QAAE,EACxC,eACb,KAAC,UAAU;UAAC,OAAO,EAAC,WAAW;UAAC,KAAK,EAAC,UAAU;UAAC,MAAM,EAAE;YAAA,OAAMnB,KAAK,CAACoB,QAAQ,EAAE;UAAA,CAAC;UACpE,QAAQ,EAAEpB,KAAK,CAACiB,EAAE,KAAKjB,KAAK,CAACe,KAAK,IAAIf,KAAK,CAACa,oBAAqB;UAAA,uBAC3E,KAAC,YAAY;YAAC,IAAI,EAAC,IAAI;YAAC,KAAK,EAAEtB,MAAM,CAAC4B;UAAY;QAAE,EACzC;MAAA,EACa;IAAA,EACH;EAAA,EAEf;AAExB,CAAC;AAAC;EApEAL,mBAAmB;EACnBT,WAAW;EACXW,IAAI;EACJC,EAAE;EACFF,KAAK;EACLK,QAAQ;EACRF,QAAQ;EACRX,cAAc;EACdC,WAAW;AAAA;AA+Db,eAAeT,WAAW"}
@@ -0,0 +1,117 @@
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 _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
10
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
11
+ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
12
+ var _propTypes = _interopRequireDefault(require("prop-types"));
13
+ var React = _interopRequireWildcard(require("react"));
14
+ var _reactResizeDetector = require("react-resize-detector");
15
+ var _TooltipStyles = require("./TooltipStyles");
16
+ var _ = require("..");
17
+ var _jsxRuntime = require("react/jsx-runtime");
18
+ var _excluded = ["label", "children", "input", "withArrow", "maxWidth", "width", "value", "size", "height", "align", "position"];
19
+ 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); }
20
+ 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; }
21
+ 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; }
22
+ 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; }
23
+ var TooltipOverflow = function TooltipOverflow(_ref) {
24
+ var label = _ref.label,
25
+ children = _ref.children,
26
+ input = _ref.input,
27
+ withArrow = _ref.withArrow,
28
+ maxWidth = _ref.maxWidth,
29
+ width = _ref.width,
30
+ value = _ref.value,
31
+ _ref$size = _ref.size,
32
+ size = _ref$size === void 0 ? _.Size.Small : _ref$size,
33
+ _ref$height = _ref.height,
34
+ height = _ref$height === void 0 ? 'auto' : _ref$height,
35
+ _ref$align = _ref.align,
36
+ align = _ref$align === void 0 ? 'center' : _ref$align,
37
+ _ref$position = _ref.position,
38
+ position = _ref$position === void 0 ? 'bottom' : _ref$position,
39
+ props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
40
+ var _React$useState = React.useState(false),
41
+ _React$useState2 = (0, _slicedToArray2.default)(_React$useState, 2),
42
+ textOverflowed = _React$useState2[0],
43
+ setTextOverflowed = _React$useState2[1];
44
+ var _React$useState3 = React.useState(false),
45
+ _React$useState4 = (0, _slicedToArray2.default)(_React$useState3, 2),
46
+ focused = _React$useState4[0],
47
+ setFocused = _React$useState4[1];
48
+ var _useResizeDetector = (0, _reactResizeDetector.useResizeDetector)({
49
+ targetRef: input
50
+ }),
51
+ customW = _useResizeDetector.width,
52
+ customH = _useResizeDetector.height;
53
+ React.useEffect(function () {
54
+ checkIfOverflowed();
55
+ }, [customW, customH]);
56
+ var checkIfOverflowed = function checkIfOverflowed() {
57
+ var _ref2, _input$current;
58
+ //adding +3 offset to offsetWidth, because sometimes when there is no overflow, scrollWidth can be equal to offsetWidth + 1
59
+ var over = (_ref2 = input && !focused && input.current && input.current.offsetWidth + 3 < input.current.scrollWidth) !== null && _ref2 !== void 0 ? _ref2 : false;
60
+ if ((input === null || input === void 0 ? void 0 : (_input$current = input.current) === null || _input$current === void 0 ? void 0 : _input$current.id) == "overflowTest") {
61
+ console.log(input.current.offsetWidth);
62
+ console.log(input.current.scrollWidth);
63
+ console.log(input.current);
64
+ }
65
+ setTextOverflowed(over);
66
+ };
67
+ React.useEffect(function () {
68
+ checkIfOverflowed();
69
+ });
70
+ var onFocus = function onFocus() {
71
+ checkIfOverflowed();
72
+ setFocused(true);
73
+ };
74
+ var onBlur = function onBlur() {
75
+ setFocused(false);
76
+ };
77
+ React.useEffect(function () {
78
+ return function () {
79
+ if (input !== null && input !== void 0 && input.current) {
80
+ input === null || input === void 0 ? void 0 : input.current.removeEventListener("focus", onFocus);
81
+ input === null || input === void 0 ? void 0 : input.current.removeEventListener("blur", onBlur);
82
+ }
83
+ };
84
+ }, []);
85
+ var renderedCallback = React.useCallback(function (node) {
86
+ if (input && input.current) {
87
+ input.current.addEventListener("focus", onFocus);
88
+ input.current.addEventListener("blur", onBlur);
89
+ checkIfOverflowed();
90
+ }
91
+ }, []);
92
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
93
+ ref: renderedCallback,
94
+ children: textOverflowed && /*#__PURE__*/(0, _jsxRuntime.jsx)(_TooltipStyles.Tooltip, _objectSpread(_objectSpread({
95
+ align: align,
96
+ height: height,
97
+ role: "tooltip",
98
+ maxWidth: maxWidth,
99
+ width: width,
100
+ size: size,
101
+ withArrow: withArrow,
102
+ position: position
103
+ }, props), {}, {
104
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
105
+ children: [children, " "]
106
+ })
107
+ }))
108
+ });
109
+ };
110
+ TooltipOverflow.propTypes = {
111
+ maxWidth: _propTypes.default.string,
112
+ width: _propTypes.default.string,
113
+ value: _propTypes.default.string
114
+ };
115
+ var _default = TooltipOverflow;
116
+ exports.default = _default;
117
+ //# sourceMappingURL=TooltipOverflow.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TooltipOverflow.cjs","names":["TooltipOverflow","label","children","input","withArrow","maxWidth","width","value","size","Size","Small","height","align","position","props","React","useState","textOverflowed","setTextOverflowed","focused","setFocused","useResizeDetector","targetRef","customW","customH","useEffect","checkIfOverflowed","over","current","offsetWidth","scrollWidth","id","console","log","onFocus","onBlur","removeEventListener","renderedCallback","useCallback","node","addEventListener"],"sources":["../../src/Tooltips/TooltipOverflow.tsx"],"sourcesContent":["\nimport * as React from 'react';\n\nimport { TooltipProps } from './TooltipTypes';\nimport { useResizeDetector } from 'react-resize-detector';\n\nimport { TooltipContainer, Tooltip } from './TooltipStyles';\nimport { Size } from '..';\n \ninterface TooltipOverflowProps extends TooltipProps {\n input?: React.MutableRefObject<HTMLInputElement | null>;\n maxWidth?: string;\n width?: string;\n value?: string;\n}\n\n const TooltipOverflow = ({\n label, children,\n input,\n withArrow,\n maxWidth,\n width,\n value,\n size = Size.Small,\n height = 'auto',\n align = 'center', \n position = 'bottom',\n ...props } : TooltipOverflowProps) => {\n\n const [textOverflowed, setTextOverflowed] = React.useState<boolean>(false);\n const [focused, setFocused] = React.useState<boolean>(false);\n const {width: customW, height: customH} = useResizeDetector({ targetRef: input });\n\n React.useEffect(() => {\n checkIfOverflowed();\n }, [customW, customH]);\n\n const checkIfOverflowed = () => {\n //adding +3 offset to offsetWidth, because sometimes when there is no overflow, scrollWidth can be equal to offsetWidth + 1\n const over = (input && !focused && input.current && input.current.offsetWidth + 3 < input.current.scrollWidth) ?? false;\n if(input?.current?.id == \"overflowTest\")\n {\n console.log(input.current.offsetWidth);\n console.log(input.current.scrollWidth);\n console.log(input.current);\n }\n setTextOverflowed(over);\n };\n\n React.useEffect(() => {\n checkIfOverflowed();\n });\n\n const onFocus = () => {\n checkIfOverflowed();\n setFocused(true);\n };\n\n const onBlur = () => {\n setFocused(false);\n };\n\n React.useEffect(() => {\n return () => {\n if(input?.current)\n {\n input?.current.removeEventListener(\"focus\", onFocus);\n input?.current.removeEventListener(\"blur\", onBlur);\n }\n }\n }, []);\n\n const renderedCallback = React.useCallback(node => {\n if(input && input.current)\n {\n input.current.addEventListener(\"focus\", onFocus);\n input.current.addEventListener(\"blur\", onBlur);\n checkIfOverflowed();\n }\n }, []);\n \n return <div ref={renderedCallback}>{textOverflowed && <Tooltip align={align}\n height={height}\n role=\"tooltip\"\n maxWidth={maxWidth}\n width={width}\n size={size}\n withArrow={withArrow}\n position={position}\n {...props}>\n <span>\n {children} </span>\n </Tooltip> }</div>;\n };\n \n export default TooltipOverflow;\n"],"mappings":";;;;;;;;;;;;AACA;AAGA;AAEA;AACA;AAA0B;AAAA;AAAA;AAAA;AAAA;AAAA;AASzB,IAAMA,eAAe,GAAG,SAAlBA,eAAe,OAWmB;EAAA,IAVtCC,KAAK,QAALA,KAAK;IAAEC,QAAQ,QAARA,QAAQ;IACfC,KAAK,QAALA,KAAK;IACLC,SAAS,QAATA,SAAS;IACTC,QAAQ,QAARA,QAAQ;IACRC,KAAK,QAALA,KAAK;IACLC,KAAK,QAALA,KAAK;IAAA,iBACLC,IAAI;IAAJA,IAAI,0BAAGC,MAAI,CAACC,KAAK;IAAA,mBACjBC,MAAM;IAANA,MAAM,4BAAG,MAAM;IAAA,kBACfC,KAAK;IAALA,KAAK,2BAAG,QAAQ;IAAA,qBAChBC,QAAQ;IAARA,QAAQ,8BAAG,QAAQ;IAChBC,KAAK;EAET,sBAA4CC,KAAK,CAACC,QAAQ,CAAU,KAAK,CAAC;IAAA;IAAnEC,cAAc;IAAEC,iBAAiB;EACxC,uBAA8BH,KAAK,CAACC,QAAQ,CAAU,KAAK,CAAC;IAAA;IAArDG,OAAO;IAAEC,UAAU;EAC1B,yBAA0C,IAAAC,sCAAiB,EAAC;MAAEC,SAAS,EAAEnB;IAAM,CAAC,CAAC;IAAnEoB,OAAO,sBAAdjB,KAAK;IAAmBkB,OAAO,sBAA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AAK,aAALA,KAAK,uBAALA,KAAK,CAAEyB,OAAO,CAACQ,mBAAmB,CAAC,MAAM,EAAED,MAAM,CAAC;MACpD;IACF,CAAC;EACH,CAAC,EAAE,EAAE,CAAC;EAEN,IAAME,gBAAgB,GAAGtB,KAAK,CAACuB,WAAW,CAAC,UAAAC,IAAI,EAAI;IACjD,IAAGpC,KAAK,IAAIA,KAAK,CAACyB,OAAO,EACzB;MACEzB,KAAK,CAACyB,OAAO,CAACY,gBAAgB,CAAC,OAAO,EAAEN,OAAO,CAAC;MAChD/B,KAAK,CAACyB,OAAO,CAACY,gBAAgB,CAAC,MAAM,EAAEL,MAAM,CAAC;MAC9CT,iBAAiB,EAAE;IACrB;EACF,CAAC,EAAE,EAAE,CAAC;EAEJ,oBAAO;IAAK,GAAG,EAAEW,gBAAiB;IAAA,UAAEpB,cAAc,iBAAI,qBAAC,sBAAO;MAAC,KAAK,EAAEL,KAAM;MACjE,MAAM,EAAED,MAAO;MACf,IAAI,EAAC,SAAS;MACd,QAAQ,EAAEN,QAAS;MACnB,KAAK,EAAEC,KAAM;MACb,IAAI,EAAEE,IAAK;MACX,SAAS,EAAEJ,SAAU;MACrB,QAAQ,EAAES;IAAS,GACfC,KAAK;MAAA,uBACR;QAAA,WACAZ,QAAQ,EAAC,GAAC;MAAA;IAAO;EACX,EAAQ;AAC7B,CAAC;AAAC;EAlFCG,QAAQ;EACRC,KAAK;EACLC,KAAK;AAAA;AAAA,eAkFOP,eAAe;AAAA"}
@@ -0,0 +1,10 @@
1
+ import * as React from 'react';
2
+ import { TooltipProps } from './TooltipTypes';
3
+ interface TooltipOverflowProps extends TooltipProps {
4
+ input?: React.MutableRefObject<HTMLInputElement | null>;
5
+ maxWidth?: string;
6
+ width?: string;
7
+ value?: string;
8
+ }
9
+ declare const TooltipOverflow: ({ label, children, input, withArrow, maxWidth, width, value, size, height, align, position, ...props }: TooltipOverflowProps) => JSX.Element;
10
+ export default TooltipOverflow;