@laerdal/life-react-components 2.2.0 → 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 (48) hide show
  1. package/dist/Button/Iconbutton.cjs.map +1 -1
  2. package/dist/Button/Iconbutton.d.ts +1 -1
  3. package/dist/Button/Iconbutton.js.map +1 -1
  4. package/dist/Dropdown/BasicDropdown.cjs +17 -5
  5. package/dist/Dropdown/BasicDropdown.cjs.map +1 -1
  6. package/dist/Dropdown/BasicDropdown.d.ts +1 -0
  7. package/dist/Dropdown/BasicDropdown.js +17 -5
  8. package/dist/Dropdown/BasicDropdown.js.map +1 -1
  9. package/dist/Dropdown/CommonStyling.cjs +6 -3
  10. package/dist/Dropdown/CommonStyling.cjs.map +1 -1
  11. package/dist/Dropdown/CommonStyling.d.ts +3 -1
  12. package/dist/Dropdown/CommonStyling.js +6 -3
  13. package/dist/Dropdown/CommonStyling.js.map +1 -1
  14. package/dist/Dropdown/DropdownFilter.cjs +11 -1
  15. package/dist/Dropdown/DropdownFilter.cjs.map +1 -1
  16. package/dist/Dropdown/DropdownFilter.js +11 -1
  17. package/dist/Dropdown/DropdownFilter.js.map +1 -1
  18. package/dist/GlobalNavigationBar/types.cjs.map +1 -1
  19. package/dist/GlobalNavigationBar/types.d.ts +1 -0
  20. package/dist/GlobalNavigationBar/types.js.map +1 -1
  21. package/dist/InputFields/DatepickerField.cjs +19 -6
  22. package/dist/InputFields/DatepickerField.cjs.map +1 -1
  23. package/dist/InputFields/DatepickerField.js +19 -6
  24. package/dist/InputFields/DatepickerField.js.map +1 -1
  25. package/dist/InputFields/NumberField.cjs +14 -4
  26. package/dist/InputFields/NumberField.cjs.map +1 -1
  27. package/dist/InputFields/NumberField.js +14 -4
  28. package/dist/InputFields/NumberField.js.map +1 -1
  29. package/dist/InputFields/TextField.cjs +11 -1
  30. package/dist/InputFields/TextField.cjs.map +1 -1
  31. package/dist/InputFields/TextField.js +11 -1
  32. package/dist/InputFields/TextField.js.map +1 -1
  33. package/dist/InputFields/styling.cjs +7 -3
  34. package/dist/InputFields/styling.cjs.map +1 -1
  35. package/dist/InputFields/styling.d.ts +1 -0
  36. package/dist/InputFields/styling.js +7 -3
  37. package/dist/InputFields/styling.js.map +1 -1
  38. package/dist/Tooltips/TooltipOverflow.cjs +117 -0
  39. package/dist/Tooltips/TooltipOverflow.cjs.map +1 -0
  40. package/dist/Tooltips/TooltipOverflow.d.ts +10 -0
  41. package/dist/Tooltips/TooltipOverflow.js +107 -0
  42. package/dist/Tooltips/TooltipOverflow.js.map +1 -0
  43. package/dist/Tooltips/TooltipStyles.cjs +5 -2
  44. package/dist/Tooltips/TooltipStyles.cjs.map +1 -1
  45. package/dist/Tooltips/TooltipStyles.d.ts +1 -0
  46. package/dist/Tooltips/TooltipStyles.js +5 -2
  47. package/dist/Tooltips/TooltipStyles.js.map +1 -1
  48. package/package.json +2 -1
@@ -1 +1 @@
1
- {"version":3,"file":"CommonStyling.cjs","names":["Dropdown","styled","div","props","isButton","minWidth","readOnly","disabled","margin","Z_INDEXES","focus","COLORS","primary_600","primary_800","lockedState","css","neutral_100","neutral_300","neutral_600","disabledState","white","activeValidationMessage","critical_400","placeholderStyling","ComponentMStyling","ComponentTextStyle","Italic","InputField","input","black","StyledField","ComponentSStyling","Regular","neutral_400","ComponentXXSStyling","BREAKPOINTS","MEDIUM","ComponentXSStyling","isPlaceholder","undefined","primary_200","primary_300","Bold","neutral_800","neutral_20","showValidationMessage","CommonInteractionStyling","dropdown","focusStyles","ButtonDropdownContentStyling","TextButtonDropdownContent","TextButtonDropdownIcon","TextButtonDropdownArrow","TextButtonDropdownText","TextButtonDropdownWrapper","primary_20","primary_700","primary_100"],"sources":["../../src/Dropdown/CommonStyling.tsx"],"sourcesContent":["import styled, {css} from 'styled-components';\nimport {CommonInteractionStyling} from '../common';\nimport {BREAKPOINTS, COLORS, ComponentTextStyle, focusStyles} from '../styles';\nimport {\n ComponentMStyling,\n ComponentLStyling,\n ComponentSStyling,\n ComponentXSStyling,\n ComponentXXSStyling\n} from '../styles/typography';\nimport {Size} from '../types';\nimport {Z_INDEXES} from '../styles/z-indexes';\n\nexport const Dropdown = styled.div<{ isButton: boolean; readOnly?: boolean; disabled?: boolean; margin?: string; minWidth?: string }>`\n display: inline-block;\n\n ${(props) => !props.isButton && (props?.minWidth ? `width: 100%; min-width: ${props.minWidth};` : 'width: 100%; min-width: 344px;')}\n ${(props) => (props.readOnly || props.disabled ? 'cursor: not-allowed;' : '')}\n ${(props) => (props.margin ? `margin: ${props.margin};` : '')}\n .show {\n display: block;\n }\n\n .value {\n flex-grow: 1;\n }\n\n &:focus-within {\n z-index: ${Z_INDEXES.focus};\n }\n\n input:hover + div {\n color: ${COLORS.primary_600};\n }\n\n input:active + div {\n color: ${COLORS.primary_800};\n }\n\n\n`;\n\nconst lockedState = css`\n background-color: ${COLORS.neutral_100};\n box-shadow: inset 0px 0px 0px 1px ${COLORS.neutral_300};\n color: ${COLORS.neutral_600};\n pointer-events: none;\n cursor: not-allowed;\n\n input {\n color: ${COLORS.neutral_600} !important;\n }\n\n .dropdown-arrow {\n color: ${COLORS.neutral_300} !important;\n }\n`;\n\nconst disabledState = css`\n background-color: ${COLORS.white};\n box-shadow: inset 0px 0px 0px 1px ${COLORS.neutral_100};\n color: ${COLORS.neutral_300};\n pointer-events: none;\n cursor: not-allowed;\n\n .dropdown-arrow {\n color: ${COLORS.neutral_300} !important;\n }\n\n input {\n color: ${COLORS.neutral_300} !important;\n\n ::placeholder {\n color: ${COLORS.neutral_300} !important;\n }\n }\n`;\n\nconst activeValidationMessage = css`\n box-shadow: inset 0px 0px 0px 2px ${COLORS.critical_400};\n`;\n\nconst placeholderStyling = css`\n ${ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_600)}\n`;\n\nexport const InputField = styled.input`\n border: none;\n outline: none;\n background-color: inherit;\n cursor: pointer;\n color: ${COLORS.black} !important;\n padding: 0;\n flex-grow: 1;\n display: flex;\n justify-content: center;\n \n ::placeholder {\n color: ${COLORS.neutral_600};\n font-style: italic;\n }\n\n ::-webkit-search-decoration,\n ::-webkit-search-cancel-button,\n ::-webkit-search-results-button,\n ::-webkit-search-results-decoration {\n -webkit-appearance: none;\n }\n`;\n\nexport const StyledField = styled.div<{ disabled: boolean; readOnly: boolean; showValidationMessage?: boolean; isPlaceholder?: boolean; fontSize?: string; minWidth?: string }>`\n ${ComponentSStyling(ComponentTextStyle.Regular, 'inherit')}\n\n padding: 12px 16px;\n height: 48px;\n min-width: ${(props) => (props.minWidth ? `${props.minWidth}` : '344px')};\n width: 100%;\n\n background: ${COLORS.white};\n box-shadow: inset 0px 0px 0px 1px ${COLORS.neutral_400};\n box-sizing: border-box;\n border-radius: 4px;\n cursor: pointer;\n\n display: flex;\n align-items: center;\n gap: 4px;\n position: relative;\n\n input {\n font-size: inherit;\n line-height: inherit;\n color: inherit;\n }\n\n &::placeholder {\n ${ComponentXXSStyling(ComponentTextStyle.Italic, COLORS.neutral_600)}\n }\n\n ${BREAKPOINTS.MEDIUM} {\n ${ComponentMStyling(ComponentTextStyle.Regular, 'inherit')}\n padding: 16px;\n height: 56px;\n\n &::placeholder {\n ${ComponentXSStyling(ComponentTextStyle.Italic, COLORS.neutral_600)}\n }\n }\n\n &.small {\n ${ComponentSStyling(ComponentTextStyle.Regular, 'inherit')}\n padding: 12px 16px;\n height: 48px;\n\n &::placeholder {\n ${ComponentXXSStyling(ComponentTextStyle.Italic, COLORS.neutral_600)}\n }\n }\n\n &.medium {\n ${ComponentMStyling(ComponentTextStyle.Regular, 'inherit')}\n height: 56px;\n padding: 16px;\n\n &::placeholder {\n ${ComponentXSStyling(ComponentTextStyle.Italic, COLORS.neutral_600)}\n }\n }\n\n .dropdown-arrow {\n pointer-events: none;\n width: 24px;\n height: 24px;\n color: ${(props) => props.isPlaceholder ? COLORS.neutral_600 : undefined};\n }\n\n &:focus {\n outline: 3px solid #ddd;\n }\n\n &:focus-within,\n &.focus-visible-within {\n box-shadow: inset 0px 0px 0px 2px ${COLORS.primary_800};\n }\n\n &:hover:not(.action-within) {\n box-shadow: inset 0px 0px 0px 1px ${COLORS.primary_200};\n\n input {\n ::placeholder {\n color: ${COLORS.primary_600};\n }\n }\n\n .dropdown-arrow {\n color: ${COLORS.primary_600};\n }\n\n cursor: pointer;\n }\n\n &:active:not(.action-within) {\n box-shadow: inset 0px 0px 0px 1px ${COLORS.primary_300};\n\n input {\n ::placeholder {\n color: ${COLORS.primary_800};\n }\n }\n\n .dropdown-arrow {\n color: ${COLORS.primary_800};\n }\n }\n\n &.button {\n ${(props) => ComponentSStyling(ComponentTextStyle.Bold, props.disabled ? COLORS.neutral_300 : COLORS.neutral_600)}\n\n box-sizing: border-box;\n height: 32px;\n padding: 0 8px;\n width: initial;\n min-width: initial;\n border: none !important;\n box-shadow: none;\n border-radius: 4px;\n\n &.expanded {\n color: ${COLORS.neutral_800};\n background: ${COLORS.neutral_20};\n }\n }\n\n\n ${(props) => (props.disabled ? disabledState : '')}\n ${(props) => (props.readOnly ? lockedState : '')}\n ${(props) => (props.showValidationMessage ? activeValidationMessage : '')}\n ${(props) => (props.isPlaceholder ? placeholderStyling : '')}\n\n ${CommonInteractionStyling};\n\n &.focus-visible,\n &.focus-visible-within {\n z-index: ${Z_INDEXES.dropdown + 1} !important;\n ${focusStyles}\n }\n`;\n\nexport const ButtonDropdownContentStyling = css`\n min-width: 344px;\n`;\n\n\n\nexport const TextButtonDropdownContent = styled.div`\n display: flex;\n gap: 4px;\n align-items: center;\n box-sizing: border-box;\n min-width: 64px;\n min-height: 32px;\n padding: 4px 8px;\n border-radius: 4px;\n`;\n\nexport const TextButtonDropdownIcon = styled.div`\n width: 24px;\n height: 24px;\n`;\n\nexport const TextButtonDropdownArrow = styled.div`\n width: 24px;\n height: 24px;\n\n svg {\n pointer-events: none;\n }\n`;\n\nexport const TextButtonDropdownText = styled.div`\n flex: 1\n`;\n\nexport const TextButtonDropdownWrapper = styled.div`\n box-sizing: border-box;\n min-height: 48px;\n display: flex;\n align-items: center;\n width: fit-content;\n cursor: pointer;\n\n ${ComponentSStyling(ComponentTextStyle.Bold, COLORS.neutral_600)}\n\n .expanded {\n color: ${COLORS.neutral_800};\n\n ${TextButtonDropdownContent} {\n background: ${COLORS.neutral_20};\n }\n }\n\n &:focus {\n ${focusStyles}\n }\n\n &:hover:not(.disabled) {\n ${TextButtonDropdownContent} {\n background-color: ${COLORS.primary_20};\n color: ${COLORS.primary_700};\n }\n }\n\n &:active:not(.disabled) {\n ${TextButtonDropdownContent} {\n background-color: ${COLORS.primary_100};\n color: ${COLORS.primary_800};\n }\n }\n\n &.disabled {\n cursor: not-allowed;\n color: ${COLORS.neutral_300};\n }\n\n}`;\n"],"mappings":";;;;;;;;;AAAA;AACA;AACA;AACA;AAQA;AAA8C;AAAA;AAAA;AAEvC,IAAMA,QAAQ,GAAGC,yBAAM,CAACC,GAAG,yWAG9B,UAACC,KAAK;EAAA,OAAK,CAACA,KAAK,CAACC,QAAQ,KAAKD,KAAK,aAALA,KAAK,eAALA,KAAK,CAAEE,QAAQ,qCAA8BF,KAAK,CAACE,QAAQ,SAAM,gCAAgC,CAAC;AAAA,GACjI,UAACF,KAAK;EAAA,OAAMA,KAAK,CAACG,QAAQ,IAAIH,KAAK,CAACI,QAAQ,GAAG,sBAAsB,GAAG,EAAE;AAAA,CAAC,EAC3E,UAACJ,KAAK;EAAA,OAAMA,KAAK,CAACK,MAAM,qBAAcL,KAAK,CAACK,MAAM,SAAM,EAAE;AAAA,CAAC,EAUhDC,mBAAS,CAACC,KAAK,EAIjBC,cAAM,CAACC,WAAW,EAIlBD,cAAM,CAACE,WAAW,CAI9B;AAAC;AAEF,IAAMC,WAAW,OAAGC,qBAAG,wUACDJ,cAAM,CAACK,WAAW,EACFL,cAAM,CAACM,WAAW,EAC7CN,cAAM,CAACO,WAAW,EAKhBP,cAAM,CAACO,WAAW,EAIlBP,cAAM,CAACM,WAAW,CAE9B;AAED,IAAME,aAAa,OAAG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AAEK,IAAMkD,uBAAuB,GAAGnD,yBAAM,CAACC,GAAG,qKAOhD;AAAC;AAEK,IAAMmD,sBAAsB,GAAGpD,yBAAM,CAACC,GAAG,oGAE/C;AAAC;AAEK,IAAMoD,yBAAyB,GAAGrD,yBAAM,CAACC,GAAG,snBAQ/C,IAAA6B,6BAAiB,EAACN,0BAAkB,CAACiB,IAAI,EAAE/B,cAAM,CAACO,WAAW,CAAC,EAGrDP,cAAM,CAACgC,WAAW,EAEzBO,yBAAyB,EACXvC,cAAM,CAACiC,UAAU,EAK/BI,mBAAW,EAIXE,yBAAyB,EACLvC,cAAM,CAAC4C,UAAU,EAC5B5C,cAAM,CAAC6C,WAAW,EAK3BN,yBAAyB,EACLvC,cAAM,CAAC8C,WAAW,EAC7B9C,cAAM,CAACE,WAAW,EAMpBF,cAAM,CAACM,WAAW,CAG7B;AAAC"}
1
+ {"version":3,"file":"CommonStyling.cjs","names":["Dropdown","styled","div","props","isButton","minWidth","readOnly","disabled","margin","Z_INDEXES","focus","COLORS","primary_600","primary_800","lockedState","css","neutral_100","neutral_300","neutral_600","disabledState","white","activeValidationMessage","critical_400","placeholderStyling","ComponentMStyling","ComponentTextStyle","Italic","InputField","input","black","ellipsis","StyledField","ComponentSStyling","Regular","neutral_400","TooltipTrigger","ComponentXXSStyling","BREAKPOINTS","MEDIUM","ComponentXSStyling","isPlaceholder","undefined","primary_200","primary_300","Bold","neutral_800","neutral_20","showValidationMessage","CommonInteractionStyling","dropdown","focusStyles","ButtonDropdownContentStyling","TextButtonDropdownContent","TextButtonDropdownIcon","TextButtonDropdownArrow","TextButtonDropdownText","TextButtonDropdownWrapper","primary_20","primary_700","primary_100"],"sources":["../../src/Dropdown/CommonStyling.tsx"],"sourcesContent":["import styled, {css} from 'styled-components';\nimport {CommonInteractionStyling} from '../common';\nimport {BREAKPOINTS, COLORS, ComponentTextStyle, focusStyles} from '../styles';\nimport {\n ComponentMStyling,\n ComponentLStyling,\n ComponentSStyling,\n ComponentXSStyling,\n ComponentXXSStyling\n} from '../styles/typography';\nimport {Size} from '../types';\nimport {Z_INDEXES} from '../styles/z-indexes';\nimport { TooltipTrigger, Tooltip } from '../Tooltips/TooltipStyles';\n\nexport const Dropdown = styled.div<{ isButton: boolean; readOnly?: boolean; disabled?: boolean; margin?: string; minWidth?: string }>`\n display: inline-block;\n\n ${(props) => !props.isButton && (props?.minWidth ? `width: 100%; min-width: ${props.minWidth};` : 'width: 100%; min-width: 344px;')}\n ${(props) => (props.readOnly || props.disabled ? 'cursor: not-allowed;' : '')}\n ${(props) => (props.margin ? `margin: ${props.margin};` : '')}\n .show {\n display: block;\n }\n\n .value {\n flex-grow: 1;\n }\n\n &:focus-within {\n z-index: ${Z_INDEXES.focus};\n }\n\n input:hover + div {\n color: ${COLORS.primary_600};\n }\n\n input:active + div {\n color: ${COLORS.primary_800};\n }\n\n\n`;\n\nconst lockedState = css`\n background-color: ${COLORS.neutral_100};\n box-shadow: inset 0px 0px 0px 1px ${COLORS.neutral_300};\n color: ${COLORS.neutral_600};\n pointer-events: none;\n cursor: not-allowed;\n\n input {\n color: ${COLORS.neutral_600} !important;\n }\n\n .dropdown-arrow {\n color: ${COLORS.neutral_300} !important;\n }\n`;\n\nconst disabledState = css`\n background-color: ${COLORS.white};\n box-shadow: inset 0px 0px 0px 1px ${COLORS.neutral_100};\n color: ${COLORS.neutral_300};\n pointer-events: none;\n cursor: not-allowed;\n\n .dropdown-arrow {\n color: ${COLORS.neutral_300} !important;\n }\n\n input {\n color: ${COLORS.neutral_300} !important;\n\n ::placeholder {\n color: ${COLORS.neutral_300} !important;\n }\n }\n`;\n\nconst activeValidationMessage = css`\n box-shadow: inset 0px 0px 0px 2px ${COLORS.critical_400};\n`;\n\nconst placeholderStyling = css`\n ${ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_600)}\n`;\n\nexport const InputField = styled.input<{ellipsis?: boolean}>`\n border: none;\n outline: none;\n background-color: inherit;\n cursor: pointer;\n color: ${COLORS.black} !important;\n padding: 0;\n flex-grow: 1;\n display: flex;\n justify-content: center;\n ${props => props.ellipsis ? 'text-overflow: ellipsis;' : ''}\n \n ::placeholder {\n color: ${COLORS.neutral_600};\n font-style: italic;\n }\n\n ::-webkit-search-decoration,\n ::-webkit-search-cancel-button,\n ::-webkit-search-results-button,\n ::-webkit-search-results-decoration {\n -webkit-appearance: none;\n }\n`;\n\nexport const StyledField = styled.div<{ disabled: boolean; readOnly: boolean; showValidationMessage?: boolean; isPlaceholder?: boolean; fontSize?: string; minWidth?: string }>`\n ${ComponentSStyling(ComponentTextStyle.Regular, 'inherit')}\n\n padding: 12px 16px;\n height: 48px;\n min-width: ${(props) => (props.minWidth ? `${props.minWidth}` : '344px')};\n width: 100%;\n\n background: ${COLORS.white};\n box-shadow: inset 0px 0px 0px 1px ${COLORS.neutral_400};\n box-sizing: border-box;\n border-radius: 4px;\n cursor: pointer;\n\n display: flex;\n align-items: center;\n gap: 4px;\n position: relative;\n\n input {\n font-size: inherit;\n line-height: inherit;\n color: inherit;\n }\n\n ${TooltipTrigger()}\n\n &::placeholder {\n ${ComponentXXSStyling(ComponentTextStyle.Italic, COLORS.neutral_600)}\n }\n\n ${BREAKPOINTS.MEDIUM} {\n ${ComponentMStyling(ComponentTextStyle.Regular, 'inherit')}\n padding: 16px;\n height: 56px;\n\n &::placeholder {\n ${ComponentXSStyling(ComponentTextStyle.Italic, COLORS.neutral_600)}\n }\n }\n\n &.small {\n ${ComponentSStyling(ComponentTextStyle.Regular, 'inherit')}\n padding: 12px 16px;\n height: 48px;\n\n &::placeholder {\n ${ComponentXXSStyling(ComponentTextStyle.Italic, COLORS.neutral_600)}\n }\n }\n\n &.medium {\n ${ComponentMStyling(ComponentTextStyle.Regular, 'inherit')}\n height: 56px;\n padding: 16px;\n\n &::placeholder {\n ${ComponentXSStyling(ComponentTextStyle.Italic, COLORS.neutral_600)}\n }\n }\n\n .dropdown-arrow {\n pointer-events: none;\n width: 24px;\n height: 24px;\n color: ${(props) => props.isPlaceholder ? COLORS.neutral_600 : undefined};\n }\n\n &:focus {\n outline: 3px solid #ddd;\n }\n\n &:focus-within,\n &.focus-visible-within {\n box-shadow: inset 0px 0px 0px 2px ${COLORS.primary_800};\n }\n\n &:hover:not(.action-within) {\n box-shadow: inset 0px 0px 0px 1px ${COLORS.primary_200};\n\n input {\n ::placeholder {\n color: ${COLORS.primary_600};\n }\n }\n\n .dropdown-arrow {\n color: ${COLORS.primary_600};\n }\n\n cursor: pointer;\n }\n\n &:active:not(.action-within) {\n box-shadow: inset 0px 0px 0px 1px ${COLORS.primary_300};\n\n input {\n ::placeholder {\n color: ${COLORS.primary_800};\n }\n }\n\n .dropdown-arrow {\n color: ${COLORS.primary_800};\n }\n }\n\n &.button {\n ${(props) => ComponentSStyling(ComponentTextStyle.Bold, props.disabled ? COLORS.neutral_300 : COLORS.neutral_600)}\n\n box-sizing: border-box;\n height: 32px;\n padding: 0 8px;\n width: initial;\n min-width: initial;\n border: none !important;\n box-shadow: none;\n border-radius: 4px;\n\n &.expanded {\n color: ${COLORS.neutral_800};\n background: ${COLORS.neutral_20};\n }\n }\n\n\n ${(props) => (props.disabled ? disabledState : '')}\n ${(props) => (props.readOnly ? lockedState : '')}\n ${(props) => (props.showValidationMessage ? activeValidationMessage : '')}\n ${(props) => (props.isPlaceholder ? placeholderStyling : '')}\n\n ${CommonInteractionStyling};\n\n &.focus-visible,\n &.focus-visible-within {\n z-index: ${Z_INDEXES.dropdown + 1} !important;\n ${focusStyles}\n }\n`;\n\nexport const ButtonDropdownContentStyling = css`\n min-width: 344px;\n`;\n\n\n\nexport const TextButtonDropdownContent = styled.div`\n display: flex;\n gap: 4px;\n align-items: center;\n box-sizing: border-box;\n min-width: 64px;\n min-height: 32px;\n padding: 4px 8px;\n border-radius: 4px;\n`;\n\nexport const TextButtonDropdownIcon = styled.div`\n width: 24px;\n height: 24px;\n`;\n\nexport const TextButtonDropdownArrow = styled.div`\n width: 24px;\n height: 24px;\n\n svg {\n pointer-events: none;\n }\n`;\n\nexport const TextButtonDropdownText = styled.div`\n flex: 1\n`;\n\nexport const TextButtonDropdownWrapper = styled.div`\n box-sizing: border-box;\n min-height: 48px;\n display: flex;\n align-items: center;\n width: fit-content;\n cursor: pointer;\n\n ${ComponentSStyling(ComponentTextStyle.Bold, COLORS.neutral_600)}\n\n .expanded {\n color: ${COLORS.neutral_800};\n\n ${TextButtonDropdownContent} {\n background: ${COLORS.neutral_20};\n }\n }\n\n &:focus {\n ${focusStyles}\n }\n\n &:hover:not(.disabled) {\n ${TextButtonDropdownContent} {\n background-color: ${COLORS.primary_20};\n color: ${COLORS.primary_700};\n }\n }\n\n &:active:not(.disabled) {\n ${TextButtonDropdownContent} {\n background-color: ${COLORS.primary_100};\n color: ${COLORS.primary_800};\n }\n }\n\n &.disabled {\n cursor: not-allowed;\n color: ${COLORS.neutral_300};\n }\n\n}`;\n"],"mappings":";;;;;;;;;AAAA;AACA;AACA;AACA;AAQA;AACA;AAAoE;AAAA;AAAA;AAE7D,IAAMA,QAAQ,GAAGC,yBAAM,CAACC,GAAG,yWAG9B,UAACC,KAAK;EAAA,OAAK,CAACA,KAAK,CAACC,QAAQ,KAAKD,KAAK,aAALA,KAAK,eAALA,KAAK,CAAEE,QAAQ,qCAA8BF,KAAK,CAACE,QAAQ,SAAM,gCAAgC,CAAC;AAAA,GACjI,UAACF,KAAK;EAAA,OAAMA,KAAK,CAACG,QAAQ,IAAIH,KAAK,CAACI,QAAQ,GAAG,sBAAsB,GAAG,EAAE;AAAA,CAAC,EAC3E,UAACJ,KAAK;EAAA,OAAMA,KAAK,CAACK,MAAM,qBAAcL,KAAK,CAACK,MAAM,SAAM,EAAE;AAAA,CAAC,EAUhDC,mBAAS,CAACC,KAAK,EAIjBC,cAAM,CAACC,WAAW,EAIlBD,cAAM,CAACE,WAAW,CAI9B;AAAC;AAEF,IAAMC,WAAW,OAAGC,qBAAG,wUACDJ,cAAM,CAACK,WAAW,EACFL,cAAM,CAACM,WAAW,EAC7CN,cAAM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C,EAC/BC,mBAAW,CAEhB;AAAC;AAEK,IAAMC,4BAA4B,OAAGpC,qBAAG,6GAE9C;AAAC;AAIK,IAAMqC,yBAAyB,GAAGnD,yBAAM,CAACC,GAAG,8PASlD;AAAC;AAEK,IAAMmD,sBAAsB,GAAGpD,yBAAM,CAACC,GAAG,0HAG/C;AAAC;AAEK,IAAMoD,uBAAuB,GAAGrD,yBAAM,CAACC,GAAG,qKAOhD;AAAC;AAEK,IAAMqD,sBAAsB,GAAGtD,yBAAM,CAACC,GAAG,oGAE/C;AAAC;AAEK,IAAMsD,yBAAyB,GAAGvD,yBAAM,CAACC,GAAG,snBAQ/C,IAAA8B,6BAAiB,EAACP,0BAAkB,CAACmB,IAAI,EAAEjC,cAAM,CAACO,WAAW,CAAC,EAGrDP,cAAM,CAACkC,WAAW,EAEzBO,yBAAyB,EACXzC,cAAM,CAACmC,UAAU,EAK/BI,mBAAW,EAIXE,yBAAyB,EACLzC,cAAM,CAAC8C,UAAU,EAC5B9C,cAAM,CAAC+C,WAAW,EAK3BN,yBAAyB,EACLzC,cAAM,CAACgD,WAAW,EAC7BhD,cAAM,CAACE,WAAW,EAMpBF,cAAM,CAACM,WAAW,CAG7B;AAAC"}
@@ -5,7 +5,9 @@ export declare const Dropdown: import("styled-components").StyledComponent<"div"
5
5
  margin?: string | undefined;
6
6
  minWidth?: string | undefined;
7
7
  }, never>;
8
- export declare const InputField: import("styled-components").StyledComponent<"input", any, {}, never>;
8
+ export declare const InputField: import("styled-components").StyledComponent<"input", any, {
9
+ ellipsis?: boolean | undefined;
10
+ }, never>;
9
11
  export declare const StyledField: import("styled-components").StyledComponent<"div", any, {
10
12
  disabled: boolean;
11
13
  readOnly: boolean;
@@ -5,6 +5,7 @@ import { CommonInteractionStyling } from '../common';
5
5
  import { BREAKPOINTS, COLORS, ComponentTextStyle, focusStyles } from '../styles';
6
6
  import { ComponentMStyling, ComponentSStyling, ComponentXSStyling, ComponentXXSStyling } from '../styles/typography';
7
7
  import { Z_INDEXES } from '../styles/z-indexes';
8
+ import { TooltipTrigger } from '../Tooltips/TooltipStyles';
8
9
  export var Dropdown = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: inline-block;\n\n ", "\n ", "\n ", "\n .show {\n display: block;\n }\n\n .value {\n flex-grow: 1;\n }\n\n &:focus-within {\n z-index: ", ";\n }\n\n input:hover + div {\n color: ", ";\n }\n\n input:active + div {\n color: ", ";\n }\n\n\n"])), function (props) {
9
10
  return !props.isButton && (props !== null && props !== void 0 && props.minWidth ? "width: 100%; min-width: ".concat(props.minWidth, ";") : 'width: 100%; min-width: 344px;');
10
11
  }, function (props) {
@@ -16,10 +17,12 @@ var lockedState = css(_templateObject2 || (_templateObject2 = _taggedTemplateLit
16
17
  var disabledState = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n background-color: ", ";\n box-shadow: inset 0px 0px 0px 1px ", ";\n color: ", ";\n pointer-events: none;\n cursor: not-allowed;\n\n .dropdown-arrow {\n color: ", " !important;\n }\n\n input {\n color: ", " !important;\n\n ::placeholder {\n color: ", " !important;\n }\n }\n"])), COLORS.white, COLORS.neutral_100, COLORS.neutral_300, COLORS.neutral_300, COLORS.neutral_300, COLORS.neutral_300);
17
18
  var activeValidationMessage = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n box-shadow: inset 0px 0px 0px 2px ", ";\n"])), COLORS.critical_400);
18
19
  var placeholderStyling = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n ", "\n"])), ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_600));
19
- export var InputField = styled.input(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n border: none;\n outline: none;\n background-color: inherit;\n cursor: pointer;\n color: ", " !important;\n padding: 0;\n flex-grow: 1;\n display: flex;\n justify-content: center;\n \n ::placeholder {\n color: ", ";\n font-style: italic;\n }\n\n ::-webkit-search-decoration,\n ::-webkit-search-cancel-button,\n ::-webkit-search-results-button,\n ::-webkit-search-results-decoration {\n -webkit-appearance: none;\n }\n"])), COLORS.black, COLORS.neutral_600);
20
- export var StyledField = styled.div(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n ", "\n\n padding: 12px 16px;\n height: 48px;\n min-width: ", ";\n width: 100%;\n\n background: ", ";\n box-shadow: inset 0px 0px 0px 1px ", ";\n box-sizing: border-box;\n border-radius: 4px;\n cursor: pointer;\n\n display: flex;\n align-items: center;\n gap: 4px;\n position: relative;\n\n input {\n font-size: inherit;\n line-height: inherit;\n color: inherit;\n }\n\n &::placeholder {\n ", "\n }\n\n ", " {\n ", "\n padding: 16px;\n height: 56px;\n\n &::placeholder {\n ", "\n }\n }\n\n &.small {\n ", "\n padding: 12px 16px;\n height: 48px;\n\n &::placeholder {\n ", "\n }\n }\n\n &.medium {\n ", "\n height: 56px;\n padding: 16px;\n\n &::placeholder {\n ", "\n }\n }\n\n .dropdown-arrow {\n pointer-events: none;\n width: 24px;\n height: 24px;\n color: ", ";\n }\n\n &:focus {\n outline: 3px solid #ddd;\n }\n\n &:focus-within,\n &.focus-visible-within {\n box-shadow: inset 0px 0px 0px 2px ", ";\n }\n\n &:hover:not(.action-within) {\n box-shadow: inset 0px 0px 0px 1px ", ";\n\n input {\n ::placeholder {\n color: ", ";\n }\n }\n\n .dropdown-arrow {\n color: ", ";\n }\n\n cursor: pointer;\n }\n\n &:active:not(.action-within) {\n box-shadow: inset 0px 0px 0px 1px ", ";\n\n input {\n ::placeholder {\n color: ", ";\n }\n }\n\n .dropdown-arrow {\n color: ", ";\n }\n }\n\n &.button {\n ", "\n\n box-sizing: border-box;\n height: 32px;\n padding: 0 8px;\n width: initial;\n min-width: initial;\n border: none !important;\n box-shadow: none;\n border-radius: 4px;\n\n &.expanded {\n color: ", ";\n background: ", ";\n }\n }\n\n\n ", "\n ", "\n ", "\n ", "\n\n ", ";\n\n &.focus-visible,\n &.focus-visible-within {\n z-index: ", " !important;\n ", "\n }\n"])), ComponentSStyling(ComponentTextStyle.Regular, 'inherit'), function (props) {
20
+ export var InputField = styled.input(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n border: none;\n outline: none;\n background-color: inherit;\n cursor: pointer;\n color: ", " !important;\n padding: 0;\n flex-grow: 1;\n display: flex;\n justify-content: center;\n ", "\n \n ::placeholder {\n color: ", ";\n font-style: italic;\n }\n\n ::-webkit-search-decoration,\n ::-webkit-search-cancel-button,\n ::-webkit-search-results-button,\n ::-webkit-search-results-decoration {\n -webkit-appearance: none;\n }\n"])), COLORS.black, function (props) {
21
+ return props.ellipsis ? 'text-overflow: ellipsis;' : '';
22
+ }, COLORS.neutral_600);
23
+ export var StyledField = styled.div(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n ", "\n\n padding: 12px 16px;\n height: 48px;\n min-width: ", ";\n width: 100%;\n\n background: ", ";\n box-shadow: inset 0px 0px 0px 1px ", ";\n box-sizing: border-box;\n border-radius: 4px;\n cursor: pointer;\n\n display: flex;\n align-items: center;\n gap: 4px;\n position: relative;\n\n input {\n font-size: inherit;\n line-height: inherit;\n color: inherit;\n }\n\n ", "\n\n &::placeholder {\n ", "\n }\n\n ", " {\n ", "\n padding: 16px;\n height: 56px;\n\n &::placeholder {\n ", "\n }\n }\n\n &.small {\n ", "\n padding: 12px 16px;\n height: 48px;\n\n &::placeholder {\n ", "\n }\n }\n\n &.medium {\n ", "\n height: 56px;\n padding: 16px;\n\n &::placeholder {\n ", "\n }\n }\n\n .dropdown-arrow {\n pointer-events: none;\n width: 24px;\n height: 24px;\n color: ", ";\n }\n\n &:focus {\n outline: 3px solid #ddd;\n }\n\n &:focus-within,\n &.focus-visible-within {\n box-shadow: inset 0px 0px 0px 2px ", ";\n }\n\n &:hover:not(.action-within) {\n box-shadow: inset 0px 0px 0px 1px ", ";\n\n input {\n ::placeholder {\n color: ", ";\n }\n }\n\n .dropdown-arrow {\n color: ", ";\n }\n\n cursor: pointer;\n }\n\n &:active:not(.action-within) {\n box-shadow: inset 0px 0px 0px 1px ", ";\n\n input {\n ::placeholder {\n color: ", ";\n }\n }\n\n .dropdown-arrow {\n color: ", ";\n }\n }\n\n &.button {\n ", "\n\n box-sizing: border-box;\n height: 32px;\n padding: 0 8px;\n width: initial;\n min-width: initial;\n border: none !important;\n box-shadow: none;\n border-radius: 4px;\n\n &.expanded {\n color: ", ";\n background: ", ";\n }\n }\n\n\n ", "\n ", "\n ", "\n ", "\n\n ", ";\n\n &.focus-visible,\n &.focus-visible-within {\n z-index: ", " !important;\n ", "\n }\n"])), ComponentSStyling(ComponentTextStyle.Regular, 'inherit'), function (props) {
21
24
  return props.minWidth ? "".concat(props.minWidth) : '344px';
22
- }, COLORS.white, COLORS.neutral_400, ComponentXXSStyling(ComponentTextStyle.Italic, COLORS.neutral_600), BREAKPOINTS.MEDIUM, ComponentMStyling(ComponentTextStyle.Regular, 'inherit'), ComponentXSStyling(ComponentTextStyle.Italic, COLORS.neutral_600), ComponentSStyling(ComponentTextStyle.Regular, 'inherit'), ComponentXXSStyling(ComponentTextStyle.Italic, COLORS.neutral_600), ComponentMStyling(ComponentTextStyle.Regular, 'inherit'), ComponentXSStyling(ComponentTextStyle.Italic, COLORS.neutral_600), function (props) {
25
+ }, COLORS.white, COLORS.neutral_400, TooltipTrigger(), ComponentXXSStyling(ComponentTextStyle.Italic, COLORS.neutral_600), BREAKPOINTS.MEDIUM, ComponentMStyling(ComponentTextStyle.Regular, 'inherit'), ComponentXSStyling(ComponentTextStyle.Italic, COLORS.neutral_600), ComponentSStyling(ComponentTextStyle.Regular, 'inherit'), ComponentXXSStyling(ComponentTextStyle.Italic, COLORS.neutral_600), ComponentMStyling(ComponentTextStyle.Regular, 'inherit'), ComponentXSStyling(ComponentTextStyle.Italic, COLORS.neutral_600), function (props) {
23
26
  return props.isPlaceholder ? COLORS.neutral_600 : undefined;
24
27
  }, COLORS.primary_800, COLORS.primary_200, COLORS.primary_600, COLORS.primary_600, COLORS.primary_300, COLORS.primary_800, COLORS.primary_800, function (props) {
25
28
  return ComponentSStyling(ComponentTextStyle.Bold, props.disabled ? COLORS.neutral_300 : COLORS.neutral_600);
@@ -1 +1 @@
1
- {"version":3,"file":"CommonStyling.js","names":["styled","css","CommonInteractionStyling","BREAKPOINTS","COLORS","ComponentTextStyle","focusStyles","ComponentMStyling","ComponentSStyling","ComponentXSStyling","ComponentXXSStyling","Z_INDEXES","Dropdown","div","props","isButton","minWidth","readOnly","disabled","margin","focus","primary_600","primary_800","lockedState","neutral_100","neutral_300","neutral_600","disabledState","white","activeValidationMessage","critical_400","placeholderStyling","Italic","InputField","input","black","StyledField","Regular","neutral_400","MEDIUM","isPlaceholder","undefined","primary_200","primary_300","Bold","neutral_800","neutral_20","showValidationMessage","dropdown","ButtonDropdownContentStyling","TextButtonDropdownContent","TextButtonDropdownIcon","TextButtonDropdownArrow","TextButtonDropdownText","TextButtonDropdownWrapper","primary_20","primary_700","primary_100"],"sources":["../../src/Dropdown/CommonStyling.tsx"],"sourcesContent":["import styled, {css} from 'styled-components';\nimport {CommonInteractionStyling} from '../common';\nimport {BREAKPOINTS, COLORS, ComponentTextStyle, focusStyles} from '../styles';\nimport {\n ComponentMStyling,\n ComponentLStyling,\n ComponentSStyling,\n ComponentXSStyling,\n ComponentXXSStyling\n} from '../styles/typography';\nimport {Size} from '../types';\nimport {Z_INDEXES} from '../styles/z-indexes';\n\nexport const Dropdown = styled.div<{ isButton: boolean; readOnly?: boolean; disabled?: boolean; margin?: string; minWidth?: string }>`\n display: inline-block;\n\n ${(props) => !props.isButton && (props?.minWidth ? `width: 100%; min-width: ${props.minWidth};` : 'width: 100%; min-width: 344px;')}\n ${(props) => (props.readOnly || props.disabled ? 'cursor: not-allowed;' : '')}\n ${(props) => (props.margin ? `margin: ${props.margin};` : '')}\n .show {\n display: block;\n }\n\n .value {\n flex-grow: 1;\n }\n\n &:focus-within {\n z-index: ${Z_INDEXES.focus};\n }\n\n input:hover + div {\n color: ${COLORS.primary_600};\n }\n\n input:active + div {\n color: ${COLORS.primary_800};\n }\n\n\n`;\n\nconst lockedState = css`\n background-color: ${COLORS.neutral_100};\n box-shadow: inset 0px 0px 0px 1px ${COLORS.neutral_300};\n color: ${COLORS.neutral_600};\n pointer-events: none;\n cursor: not-allowed;\n\n input {\n color: ${COLORS.neutral_600} !important;\n }\n\n .dropdown-arrow {\n color: ${COLORS.neutral_300} !important;\n }\n`;\n\nconst disabledState = css`\n background-color: ${COLORS.white};\n box-shadow: inset 0px 0px 0px 1px ${COLORS.neutral_100};\n color: ${COLORS.neutral_300};\n pointer-events: none;\n cursor: not-allowed;\n\n .dropdown-arrow {\n color: ${COLORS.neutral_300} !important;\n }\n\n input {\n color: ${COLORS.neutral_300} !important;\n\n ::placeholder {\n color: ${COLORS.neutral_300} !important;\n }\n }\n`;\n\nconst activeValidationMessage = css`\n box-shadow: inset 0px 0px 0px 2px ${COLORS.critical_400};\n`;\n\nconst placeholderStyling = css`\n ${ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_600)}\n`;\n\nexport const InputField = styled.input`\n border: none;\n outline: none;\n background-color: inherit;\n cursor: pointer;\n color: ${COLORS.black} !important;\n padding: 0;\n flex-grow: 1;\n display: flex;\n justify-content: center;\n \n ::placeholder {\n color: ${COLORS.neutral_600};\n font-style: italic;\n }\n\n ::-webkit-search-decoration,\n ::-webkit-search-cancel-button,\n ::-webkit-search-results-button,\n ::-webkit-search-results-decoration {\n -webkit-appearance: none;\n }\n`;\n\nexport const StyledField = styled.div<{ disabled: boolean; readOnly: boolean; showValidationMessage?: boolean; isPlaceholder?: boolean; fontSize?: string; minWidth?: string }>`\n ${ComponentSStyling(ComponentTextStyle.Regular, 'inherit')}\n\n padding: 12px 16px;\n height: 48px;\n min-width: ${(props) => (props.minWidth ? `${props.minWidth}` : '344px')};\n width: 100%;\n\n background: ${COLORS.white};\n box-shadow: inset 0px 0px 0px 1px ${COLORS.neutral_400};\n box-sizing: border-box;\n border-radius: 4px;\n cursor: pointer;\n\n display: flex;\n align-items: center;\n gap: 4px;\n position: relative;\n\n input {\n font-size: inherit;\n line-height: inherit;\n color: inherit;\n }\n\n &::placeholder {\n ${ComponentXXSStyling(ComponentTextStyle.Italic, COLORS.neutral_600)}\n }\n\n ${BREAKPOINTS.MEDIUM} {\n ${ComponentMStyling(ComponentTextStyle.Regular, 'inherit')}\n padding: 16px;\n height: 56px;\n\n &::placeholder {\n ${ComponentXSStyling(ComponentTextStyle.Italic, COLORS.neutral_600)}\n }\n }\n\n &.small {\n ${ComponentSStyling(ComponentTextStyle.Regular, 'inherit')}\n padding: 12px 16px;\n height: 48px;\n\n &::placeholder {\n ${ComponentXXSStyling(ComponentTextStyle.Italic, COLORS.neutral_600)}\n }\n }\n\n &.medium {\n ${ComponentMStyling(ComponentTextStyle.Regular, 'inherit')}\n height: 56px;\n padding: 16px;\n\n &::placeholder {\n ${ComponentXSStyling(ComponentTextStyle.Italic, COLORS.neutral_600)}\n }\n }\n\n .dropdown-arrow {\n pointer-events: none;\n width: 24px;\n height: 24px;\n color: ${(props) => props.isPlaceholder ? COLORS.neutral_600 : undefined};\n }\n\n &:focus {\n outline: 3px solid #ddd;\n }\n\n &:focus-within,\n &.focus-visible-within {\n box-shadow: inset 0px 0px 0px 2px ${COLORS.primary_800};\n }\n\n &:hover:not(.action-within) {\n box-shadow: inset 0px 0px 0px 1px ${COLORS.primary_200};\n\n input {\n ::placeholder {\n color: ${COLORS.primary_600};\n }\n }\n\n .dropdown-arrow {\n color: ${COLORS.primary_600};\n }\n\n cursor: pointer;\n }\n\n &:active:not(.action-within) {\n box-shadow: inset 0px 0px 0px 1px ${COLORS.primary_300};\n\n input {\n ::placeholder {\n color: ${COLORS.primary_800};\n }\n }\n\n .dropdown-arrow {\n color: ${COLORS.primary_800};\n }\n }\n\n &.button {\n ${(props) => ComponentSStyling(ComponentTextStyle.Bold, props.disabled ? COLORS.neutral_300 : COLORS.neutral_600)}\n\n box-sizing: border-box;\n height: 32px;\n padding: 0 8px;\n width: initial;\n min-width: initial;\n border: none !important;\n box-shadow: none;\n border-radius: 4px;\n\n &.expanded {\n color: ${COLORS.neutral_800};\n background: ${COLORS.neutral_20};\n }\n }\n\n\n ${(props) => (props.disabled ? disabledState : '')}\n ${(props) => (props.readOnly ? lockedState : '')}\n ${(props) => (props.showValidationMessage ? activeValidationMessage : '')}\n ${(props) => (props.isPlaceholder ? placeholderStyling : '')}\n\n ${CommonInteractionStyling};\n\n &.focus-visible,\n &.focus-visible-within {\n z-index: ${Z_INDEXES.dropdown + 1} !important;\n ${focusStyles}\n }\n`;\n\nexport const ButtonDropdownContentStyling = css`\n min-width: 344px;\n`;\n\n\n\nexport const TextButtonDropdownContent = styled.div`\n display: flex;\n gap: 4px;\n align-items: center;\n box-sizing: border-box;\n min-width: 64px;\n min-height: 32px;\n padding: 4px 8px;\n border-radius: 4px;\n`;\n\nexport const TextButtonDropdownIcon = styled.div`\n width: 24px;\n height: 24px;\n`;\n\nexport const TextButtonDropdownArrow = styled.div`\n width: 24px;\n height: 24px;\n\n svg {\n pointer-events: none;\n }\n`;\n\nexport const TextButtonDropdownText = styled.div`\n flex: 1\n`;\n\nexport const TextButtonDropdownWrapper = styled.div`\n box-sizing: border-box;\n min-height: 48px;\n display: flex;\n align-items: center;\n width: fit-content;\n cursor: pointer;\n\n ${ComponentSStyling(ComponentTextStyle.Bold, COLORS.neutral_600)}\n\n .expanded {\n color: ${COLORS.neutral_800};\n\n ${TextButtonDropdownContent} {\n background: ${COLORS.neutral_20};\n }\n }\n\n &:focus {\n ${focusStyles}\n }\n\n &:hover:not(.disabled) {\n ${TextButtonDropdownContent} {\n background-color: ${COLORS.primary_20};\n color: ${COLORS.primary_700};\n }\n }\n\n &:active:not(.disabled) {\n ${TextButtonDropdownContent} {\n background-color: ${COLORS.primary_100};\n color: ${COLORS.primary_800};\n }\n }\n\n &.disabled {\n cursor: not-allowed;\n color: ${COLORS.neutral_300};\n }\n\n}`;\n"],"mappings":";;AAAA,OAAOA,MAAM,IAAGC,GAAG,QAAO,mBAAmB;AAC7C,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yBAAyB,EACX9C,MAAM,CAAC0C,UAAU,EAK/BxC,WAAW,EAIX4C,yBAAyB,EACL9C,MAAM,CAACmD,UAAU,EAC5BnD,MAAM,CAACoD,WAAW,EAK3BN,yBAAyB,EACL9C,MAAM,CAACqD,WAAW,EAC7BrD,MAAM,CAACkB,WAAW,EAMpBlB,MAAM,CAACqB,WAAW,CAG7B"}
1
+ {"version":3,"file":"CommonStyling.js","names":["styled","css","CommonInteractionStyling","BREAKPOINTS","COLORS","ComponentTextStyle","focusStyles","ComponentMStyling","ComponentSStyling","ComponentXSStyling","ComponentXXSStyling","Z_INDEXES","TooltipTrigger","Dropdown","div","props","isButton","minWidth","readOnly","disabled","margin","focus","primary_600","primary_800","lockedState","neutral_100","neutral_300","neutral_600","disabledState","white","activeValidationMessage","critical_400","placeholderStyling","Italic","InputField","input","black","ellipsis","StyledField","Regular","neutral_400","MEDIUM","isPlaceholder","undefined","primary_200","primary_300","Bold","neutral_800","neutral_20","showValidationMessage","dropdown","ButtonDropdownContentStyling","TextButtonDropdownContent","TextButtonDropdownIcon","TextButtonDropdownArrow","TextButtonDropdownText","TextButtonDropdownWrapper","primary_20","primary_700","primary_100"],"sources":["../../src/Dropdown/CommonStyling.tsx"],"sourcesContent":["import styled, {css} from 'styled-components';\nimport {CommonInteractionStyling} from '../common';\nimport {BREAKPOINTS, COLORS, ComponentTextStyle, focusStyles} from '../styles';\nimport {\n ComponentMStyling,\n ComponentLStyling,\n ComponentSStyling,\n ComponentXSStyling,\n ComponentXXSStyling\n} from '../styles/typography';\nimport {Size} from '../types';\nimport {Z_INDEXES} from '../styles/z-indexes';\nimport { TooltipTrigger, Tooltip } from '../Tooltips/TooltipStyles';\n\nexport const Dropdown = styled.div<{ isButton: boolean; readOnly?: boolean; disabled?: boolean; margin?: string; minWidth?: string }>`\n display: inline-block;\n\n ${(props) => !props.isButton && (props?.minWidth ? `width: 100%; min-width: ${props.minWidth};` : 'width: 100%; min-width: 344px;')}\n ${(props) => (props.readOnly || props.disabled ? 'cursor: not-allowed;' : '')}\n ${(props) => (props.margin ? `margin: ${props.margin};` : '')}\n .show {\n display: block;\n }\n\n .value {\n flex-grow: 1;\n }\n\n &:focus-within {\n z-index: ${Z_INDEXES.focus};\n }\n\n input:hover + div {\n color: ${COLORS.primary_600};\n }\n\n input:active + div {\n color: ${COLORS.primary_800};\n }\n\n\n`;\n\nconst lockedState = css`\n background-color: ${COLORS.neutral_100};\n box-shadow: inset 0px 0px 0px 1px ${COLORS.neutral_300};\n color: ${COLORS.neutral_600};\n pointer-events: none;\n cursor: not-allowed;\n\n input {\n color: ${COLORS.neutral_600} !important;\n }\n\n .dropdown-arrow {\n color: ${COLORS.neutral_300} !important;\n }\n`;\n\nconst disabledState = css`\n background-color: ${COLORS.white};\n box-shadow: inset 0px 0px 0px 1px ${COLORS.neutral_100};\n color: ${COLORS.neutral_300};\n pointer-events: none;\n cursor: not-allowed;\n\n .dropdown-arrow {\n color: ${COLORS.neutral_300} !important;\n }\n\n input {\n color: ${COLORS.neutral_300} !important;\n\n ::placeholder {\n color: ${COLORS.neutral_300} !important;\n }\n }\n`;\n\nconst activeValidationMessage = css`\n box-shadow: inset 0px 0px 0px 2px ${COLORS.critical_400};\n`;\n\nconst placeholderStyling = css`\n ${ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_600)}\n`;\n\nexport const InputField = styled.input<{ellipsis?: boolean}>`\n border: none;\n outline: none;\n background-color: inherit;\n cursor: pointer;\n color: ${COLORS.black} !important;\n padding: 0;\n flex-grow: 1;\n display: flex;\n justify-content: center;\n ${props => props.ellipsis ? 'text-overflow: ellipsis;' : ''}\n \n ::placeholder {\n color: ${COLORS.neutral_600};\n font-style: italic;\n }\n\n ::-webkit-search-decoration,\n ::-webkit-search-cancel-button,\n ::-webkit-search-results-button,\n ::-webkit-search-results-decoration {\n -webkit-appearance: none;\n }\n`;\n\nexport const StyledField = styled.div<{ disabled: boolean; readOnly: boolean; showValidationMessage?: boolean; isPlaceholder?: boolean; fontSize?: string; minWidth?: string }>`\n ${ComponentSStyling(ComponentTextStyle.Regular, 'inherit')}\n\n padding: 12px 16px;\n height: 48px;\n min-width: ${(props) => (props.minWidth ? `${props.minWidth}` : '344px')};\n width: 100%;\n\n background: ${COLORS.white};\n box-shadow: inset 0px 0px 0px 1px ${COLORS.neutral_400};\n box-sizing: border-box;\n border-radius: 4px;\n cursor: pointer;\n\n display: flex;\n align-items: center;\n gap: 4px;\n position: relative;\n\n input {\n font-size: inherit;\n line-height: inherit;\n color: inherit;\n }\n\n ${TooltipTrigger()}\n\n &::placeholder {\n ${ComponentXXSStyling(ComponentTextStyle.Italic, COLORS.neutral_600)}\n }\n\n ${BREAKPOINTS.MEDIUM} {\n ${ComponentMStyling(ComponentTextStyle.Regular, 'inherit')}\n padding: 16px;\n height: 56px;\n\n &::placeholder {\n ${ComponentXSStyling(ComponentTextStyle.Italic, COLORS.neutral_600)}\n }\n }\n\n &.small {\n ${ComponentSStyling(ComponentTextStyle.Regular, 'inherit')}\n padding: 12px 16px;\n height: 48px;\n\n &::placeholder {\n ${ComponentXXSStyling(ComponentTextStyle.Italic, COLORS.neutral_600)}\n }\n }\n\n &.medium {\n ${ComponentMStyling(ComponentTextStyle.Regular, 'inherit')}\n height: 56px;\n padding: 16px;\n\n &::placeholder {\n ${ComponentXSStyling(ComponentTextStyle.Italic, COLORS.neutral_600)}\n }\n }\n\n .dropdown-arrow {\n pointer-events: none;\n width: 24px;\n height: 24px;\n color: ${(props) => props.isPlaceholder ? COLORS.neutral_600 : undefined};\n }\n\n &:focus {\n outline: 3px solid #ddd;\n }\n\n &:focus-within,\n &.focus-visible-within {\n box-shadow: inset 0px 0px 0px 2px ${COLORS.primary_800};\n }\n\n &:hover:not(.action-within) {\n box-shadow: inset 0px 0px 0px 1px ${COLORS.primary_200};\n\n input {\n ::placeholder {\n color: ${COLORS.primary_600};\n }\n }\n\n .dropdown-arrow {\n color: ${COLORS.primary_600};\n }\n\n cursor: pointer;\n }\n\n &:active:not(.action-within) {\n box-shadow: inset 0px 0px 0px 1px ${COLORS.primary_300};\n\n input {\n ::placeholder {\n color: ${COLORS.primary_800};\n }\n }\n\n .dropdown-arrow {\n color: ${COLORS.primary_800};\n }\n }\n\n &.button {\n ${(props) => ComponentSStyling(ComponentTextStyle.Bold, props.disabled ? COLORS.neutral_300 : COLORS.neutral_600)}\n\n box-sizing: border-box;\n height: 32px;\n padding: 0 8px;\n width: initial;\n min-width: initial;\n border: none !important;\n box-shadow: none;\n border-radius: 4px;\n\n &.expanded {\n color: ${COLORS.neutral_800};\n background: ${COLORS.neutral_20};\n }\n }\n\n\n ${(props) => (props.disabled ? disabledState : '')}\n ${(props) => (props.readOnly ? lockedState : '')}\n ${(props) => (props.showValidationMessage ? activeValidationMessage : '')}\n ${(props) => (props.isPlaceholder ? placeholderStyling : '')}\n\n ${CommonInteractionStyling};\n\n &.focus-visible,\n &.focus-visible-within {\n z-index: ${Z_INDEXES.dropdown + 1} !important;\n ${focusStyles}\n }\n`;\n\nexport const ButtonDropdownContentStyling = css`\n min-width: 344px;\n`;\n\n\n\nexport const TextButtonDropdownContent = styled.div`\n display: flex;\n gap: 4px;\n align-items: center;\n box-sizing: border-box;\n min-width: 64px;\n min-height: 32px;\n padding: 4px 8px;\n border-radius: 4px;\n`;\n\nexport const TextButtonDropdownIcon = styled.div`\n width: 24px;\n height: 24px;\n`;\n\nexport const TextButtonDropdownArrow = styled.div`\n width: 24px;\n height: 24px;\n\n svg {\n pointer-events: none;\n }\n`;\n\nexport const TextButtonDropdownText = styled.div`\n flex: 1\n`;\n\nexport const TextButtonDropdownWrapper = styled.div`\n box-sizing: border-box;\n min-height: 48px;\n display: flex;\n align-items: center;\n width: fit-content;\n cursor: pointer;\n\n ${ComponentSStyling(ComponentTextStyle.Bold, COLORS.neutral_600)}\n\n .expanded {\n color: ${COLORS.neutral_800};\n\n ${TextButtonDropdownContent} {\n background: ${COLORS.neutral_20};\n }\n }\n\n &:focus {\n ${focusStyles}\n }\n\n &:hover:not(.disabled) {\n ${TextButtonDropdownContent} {\n background-color: ${COLORS.primary_20};\n color: ${COLORS.primary_700};\n }\n }\n\n &:active:not(.disabled) {\n ${TextButtonDropdownContent} {\n background-color: ${COLORS.primary_100};\n color: ${COLORS.primary_800};\n }\n }\n\n &.disabled {\n cursor: not-allowed;\n color: ${COLORS.neutral_300};\n }\n\n}`;\n"],"mappings":";;AAAA,OAAOA,MAAM,IAAGC,GAAG,QAAO,mBAAmB;AAC7C,SAAQC,wBAAwB,QAAO,WAAW;AAClD,SAAQC,WAAW,EAAEC,MAAM,EAAEC,kBAAkB,EAAEC,WAAW,QAAO,WAAW;AAC9E,SACEC,iBAAiB,EAEjBC,iBAAiB,EACjBC,kBAAkB,EAClBC,mBAAmB,QACd,sBAAsB;AAE7B,SAAQC,SAAS,QAAO,qBAAqB;AAC7C,SAASC,cAAc,QAAiB,2BAA2B;AAEnE,OAAO,IAAMC,QAAQ,GAAGb,MAAM,CAACc,GAAG,2VAG9B,UAACC,KAAK;EAAA,OAAK,CAACA,KAAK,CAACC,QAAQ,KAAKD,KAAK,aAALA,KAAK,eAALA,KAAK,CAAEE,QAAQ,qCAA8BF,KAAK,CAACE,QAAQ,SAAM,gCAAgC,CAAC;AAAA,GACjI,UAACF,KAAK;EAAA,OAAMA,KAAK,CAACG,QAAQ,IAAIH,KAAK,CAACI,QAAQ,GAAG,sBAAsB,GAAG,EAAE;AAAA,CAAC,EAC3E,UAACJ,KAAK;EAAA,OAAMA,KAAK,CAACK,MAAM,qBAAcL,KAAK,CAACK,MAAM,SAAM,EAAE;AAAA,CAAC,EAUhDT,SAAS,CAACU,KAAK,EAIjBjB,MAAM,CAACkB,WAAW,EAIlBlB,MAAM,CAACmB,WAAW,CAI9B;AAED,IAAMC,WAAW,GAAGvB,GAAG,yTACDG,MAAM,CAACqB,WAAW,EACFrB,MAAM,CAACsB,WAAW,EAC7CtB,MAAM,CAACuB,WAAW,EAKhBvB,MAAM,CAACuB,WAAW,EAIlBvB,MA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D,GAAG,8FAE9C;AAID,OAAO,IAAMmD,yBAAyB,GAAGpD,MAAM,CAACc,GAAG,gPASlD;AAED,OAAO,IAAMuC,sBAAsB,GAAGrD,MAAM,CAACc,GAAG,4GAG/C;AAED,OAAO,IAAMwC,uBAAuB,GAAGtD,MAAM,CAACc,GAAG,uJAOhD;AAED,OAAO,IAAMyC,sBAAsB,GAAGvD,MAAM,CAACc,GAAG,sFAE/C;AAED,OAAO,IAAM0C,yBAAyB,GAAGxD,MAAM,CAACc,GAAG,wmBAQ/CN,iBAAiB,CAACH,kBAAkB,CAACyC,IAAI,EAAE1C,MAAM,CAACuB,WAAW,CAAC,EAGrDvB,MAAM,CAAC2C,WAAW,EAEzBK,yBAAyB,EACXhD,MAAM,CAAC4C,UAAU,EAK/B1C,WAAW,EAIX8C,yBAAyB,EACLhD,MAAM,CAACqD,UAAU,EAC5BrD,MAAM,CAACsD,WAAW,EAK3BN,yBAAyB,EACLhD,MAAM,CAACuD,WAAW,EAC7BvD,MAAM,CAACmB,WAAW,EAMpBnB,MAAM,CAACsB,WAAW,CAG7B"}
@@ -18,6 +18,7 @@ var _CommonStyling = require("./CommonStyling");
18
18
  var _DropdownContent = _interopRequireDefault(require("./DropdownContent"));
19
19
  var _types = require("../types");
20
20
  var _InputFields = require("../InputFields");
21
+ var _TooltipOverflow = _interopRequireDefault(require("../Tooltips/TooltipOverflow"));
21
22
  var _common = require("../common");
22
23
  var _Button = require("../Button");
23
24
  var _icons = require("../icons");
@@ -181,6 +182,7 @@ var DropdownFilter = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
181
182
  type: "search",
182
183
  placeholder: inputFocused ? '' : placeholder,
183
184
  onKeyDown: handleInputKeyDown,
185
+ ellipsis: true,
184
186
  value: input || '',
185
187
  onChange: function onChange(e) {
186
188
  if (!e.target.value) {
@@ -207,7 +209,15 @@ var DropdownFilter = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
207
209
  tabIndex: disabled || readOnly ? -1 : 0,
208
210
  disabled: disabled || false,
209
211
  "data-testid": dataTestId
210
- }, rest)), input && !readOnly && !disabled && !loading && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.IconButton, {
212
+ }, rest)), !isOpen ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_TooltipOverflow.default, {
213
+ input: inputRef,
214
+ withArrow: true,
215
+ maxWidth: "100%",
216
+ size: size,
217
+ align: "end",
218
+ position: "bottom",
219
+ children: input
220
+ }) : null, input && !readOnly && !disabled && !loading && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.IconButton, {
211
221
  action: handleInputClear,
212
222
  ref: clearButtonRef,
213
223
  useTransparentBackground: true,
@@ -1 +1 @@
1
- {"version":3,"file":"DropdownFilter.cjs","names":["DropdownFilter","React","forwardRef","ref","id","list","placeholder","onSelect","onInputChange","value","required","messageOnNoResults","disabled","readOnly","scrollable","activeValidationMessage","autofilledMessage","size","disableFiltering","buttonFontSize","margin","loading","onFocus","onBlur","dataTestId","rest","useState","isOpen","setIsOpen","input","setInput","activeDescendant","setActiveDescendant","restartFilter","setRestartFilter","selectedItem","setSelectedItem","selectedValues","setSelectedValues","focused","setFocused","inputFocused","setInputFocused","init","setInit","styledFieldRef","useFocusVisibleRef","inputRef","clearButtonRef","useRef","useActionWithin","useImperativeHandle","current","containerRef","useClickOutsideRef","useFocusOutsideRef","handleInputKeyDown","e","key","preventDefault","useEffect","length","val","item","find","a","displayLabel","undefined","handleInputClear","focus","focusVisible","detail","renderInput","stopPropagation","blur","defaultOnMouseDownHandler","Math","floor","random","target","marginLeft","Size","Small","COLORS","neutral_600","itemsType","multiSelect","action","onValueUpdate","values","items","critical_400"],"sources":["../../src/Dropdown/DropdownFilter.tsx"],"sourcesContent":["import * as React from 'react';\nimport { COLORS } from '../styles';\nimport { ArrowDropDown, ArrowDropUp, Information, TechnicalWarning } from '../icons/systemicons/SystemIcons';\nimport { LoadingIndicator } from '../LoadingIndicator';\nimport { StyledField, Dropdown, InputField } from './CommonStyling';\nimport DropdownContent, { DropdownItem } from './DropdownContent';\nimport { Size, Testable } from '../types';\nimport { AutofilledMessage, ErrorMessage } from '../InputFields';\nimport { defaultOnMouseDownHandler, useActionWithin, useClickOutsideRef, useFocusOutsideRef, useFocusVisibleRef } from '../common';\nimport { IconButton } from '../Button';\nimport { SystemIcons } from '../icons';\n\ninterface DropdownFilterProps extends Testable, Omit<React.InputHTMLAttributes<HTMLInputElement>, 'onSelect' | 'size' | 'list' | 'autoComplete' | 'type' | 'placeholder' | 'onKeyDown' | 'value' | 'onChange' | 'required' | 'tabIndex' | 'disabled' | 'readOnly'> {\n list: DropdownItem[];\n placeholder?: string;\n \n value?: string;\n onSelect?: (value: string) => void;\n onInputChange?: (input: string) => void;\n\n required?: boolean;\n disabled?: boolean;\n readOnly?: boolean;\n loading?: boolean;\n\n disableFiltering?: boolean;\n\n messageOnNoResults?: string;\n activeValidationMessage?: string;\n autofilledMessage?: string;\n size?: Size.Small | Size.Medium;\n\n buttonFontSize?: string;\n margin?: string;\n scrollable?: boolean;\n}\n\nconst DropdownFilter = React.forwardRef( ({\n id,\n list,\n placeholder,\n onSelect,\n onInputChange,\n value,\n required,\n messageOnNoResults,\n disabled,\n readOnly,\n scrollable,\n activeValidationMessage,\n autofilledMessage,\n size,\n disableFiltering,\n buttonFontSize,\n margin = '4px 0',\n loading,\n onFocus,\n onBlur,\n dataTestId,\n ...rest\n }: DropdownFilterProps, ref) => {\n const [isOpen, setIsOpen] = React.useState<boolean>(false);\n const [input, setInput] = React.useState<string>();\n const [activeDescendant, setActiveDescendant] = React.useState<string>();\n const [restartFilter, setRestartFilter] = React.useState<boolean>(false);\n const [selectedItem, setSelectedItem] = React.useState<DropdownItem>();\n const [selectedValues, setSelectedValues] = React.useState<string[]>([]);\n const [focused, setFocused] = React.useState<number | null>(null);\n const [inputFocused, setInputFocused] = React.useState<boolean>(false);\n const [init, setInit] = React.useState<boolean>(true);\n\n const styledFieldRef = useFocusVisibleRef();\n const inputRef = useFocusVisibleRef([styledFieldRef]);\n const clearButtonRef = React.useRef<HTMLButtonElement>(null);\n\n useActionWithin(styledFieldRef, input && !readOnly && !disabled ? [clearButtonRef] : []);\n\n React.useImperativeHandle(ref, () => inputRef.current, [inputRef]);\n\n const containerRef = useClickOutsideRef(\n () => setIsOpen(false),\n [],\n useFocusOutsideRef(() => setIsOpen(false)),\n );\n\n const handleInputKeyDown = (e: React.KeyboardEvent<HTMLInputElement>) => {\n if (e.key === 'Esc' || e.key === 'Escape') {\n e.preventDefault();\n }\n if (e.key === 'ArrowDown' || e.key === 'Down' || e.key === 'ArrowUp' || e.key === 'Up') {\n e.preventDefault();\n if (!isOpen) {\n setIsOpen(true);\n }\n }\n };\n\n React.useEffect(() => {\n setInit(true);\n setSelectedValues(!!value ? [value] : []);\n }, [value]);\n\n React.useEffect(() => {\n if (selectedValues?.length) {\n const val = selectedValues[0];\n const item = list.find((a) => a.value === val);\n setSelectedItem(item);\n setInput(item?.displayLabel ?? item?.value ?? '');\n onSelect && !init && onSelect(val);\n } else {\n setSelectedItem(undefined);\n onSelect && !init && onSelect('');\n setInput('');\n }\n }, [selectedValues]);\n\n React.useEffect(() => {\n if (!isOpen) {\n if (!!selectedItem) {\n setInput(selectedItem?.displayLabel ?? selectedItem?.value ?? '');\n } else {\n setInput('');\n }\n }\n\n setRestartFilter(true);\n }, [isOpen, selectedItem]);\n\n const handleInputClear = (e: any) => {\n setInput('');\n setSelectedValues([]);\n onSelect && onSelect('');\n inputRef.current?.focus({ focusVisible: e?.detail !== 1 } as any);\n };\n\n const renderInput = () => {\n return (\n <StyledField\n ref={styledFieldRef}\n className={size ? size : ''}\n onClick={(e: any) => {\n if (!readOnly && !disabled) {\n e.stopPropagation();\n setIsOpen(!isOpen);\n if (isOpen) {\n inputRef.current?.blur();\n } else {\n inputRef.current?.focus();\n }\n }\n }}\n disabled={disabled || false}\n readOnly={readOnly || false}\n isPlaceholder={!input}\n fontSize={buttonFontSize}\n showValidationMessage={!!activeValidationMessage}\n onMouseDown={defaultOnMouseDownHandler}\n data-testid={`otherdiv_${id}`}>\n <InputField\n id={id}\n ref={inputRef}\n autoComplete={'off-' + Math.floor(Math.random() * 999999999999)}\n type=\"search\"\n placeholder={inputFocused ? '' : placeholder}\n onKeyDown={handleInputKeyDown}\n value={input || ''}\n onChange={(e: any) => {\n if (!e.target.value) {\n setSelectedValues([]);\n }\n if (!readOnly && !disabled && e.target.value !== input) {\n setRestartFilter(false);\n setIsOpen(true);\n setInput(e.target.value);\n if (onInputChange) {\n onInputChange(e.target.value || '');\n }\n }\n }}\n onFocus={(e) => {\n setInputFocused(true);\n onFocus && onFocus(e);\n }}\n onBlur={(e) => {\n setInputFocused(false);\n onBlur && onBlur(e);\n }}\n required={required}\n tabIndex={disabled || readOnly ? -1 : 0}\n disabled={disabled || false}\n data-testid={dataTestId}\n {...rest}\n />\n {input && !readOnly && !disabled && !loading && (\n <IconButton action={handleInputClear} ref={clearButtonRef} useTransparentBackground={true} shape={'circular'} style={{ marginLeft: '-4px' }} variant={'secondary'}>\n <SystemIcons.Clear />\n </IconButton>\n )}\n\n {!disabled && !readOnly && loading && (\n <div style={{ marginLeft: '-4xp' }}>\n <LoadingIndicator size={Size.Small} color={COLORS.neutral_600} />\n </div>\n )}\n\n <div className={'dropdown-arrow'}>\n {isOpen && !readOnly && !disabled ? <ArrowDropUp size=\"24px\" className={size ? size : ''} /> : <ArrowDropDown size=\"24px\" className={size ? size : ''} />}\n </div>\n </StyledField>\n );\n };\n\n return (\n <>\n <Dropdown ref={containerRef}\n role=\"combobox\"\n aria-multiselectable={true} \n aria-controls={`${id}_dropdowncontent`}\n aria-activedescendant={activeDescendant}\n aria-expanded={isOpen ? true : false}\n disabled={disabled} isButton={false} readOnly={readOnly} className={size ? size : ''} margin={margin}>\n {renderInput()}\n {!readOnly && !disabled && (\n <DropdownContent\n containerRef={containerRef}\n isOpen={isOpen && !loading}\n messageOnNoResults={messageOnNoResults ?? ''}\n selectedValues={selectedValues}\n setSelectedValues={setSelectedValues}\n size={size ?? Size.Small}\n onActiveDescendantChanged={(e) => setActiveDescendant(e)}\n focused={focused}\n ariaRolesType=\"input\"\n setFocused={setFocused}\n outline={false}\n customizationProps={{\n itemsType: 'normal',\n scrollable: scrollable,\n multiSelect: false,\n action: () => {},\n onValueUpdate: (values: string[]) => {\n setRestartFilter(true);\n setInit(false);\n },\n items: list,\n }}\n filter={!disableFiltering && !restartFilter ? input || '' : ''}\n setIsOpen={setIsOpen}\n isButton={false}\n id={`${id}_dropdowncontent`}\n />\n )}\n </Dropdown>\n {activeValidationMessage && (\n <ErrorMessage className={size || ''}>\n <TechnicalWarning color={COLORS.critical_400} />\n <span>{activeValidationMessage}</span>\n </ErrorMessage>\n )}\n {autofilledMessage && (\n <AutofilledMessage className={size || ''}>\n <Information color={COLORS.neutral_600} />\n <span>{autofilledMessage}</span>\n </AutofilledMessage>\n )}\n </>\n );\n});\n\nexport default DropdownFilter;\n"],"mappings":";;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAuC;AAAA;AAAA;AAAA;AAAA;AAAA;AA2BvC,IAAMA,cAAc,gBAAGC,KAAK,CAACC,UAAU,CAAE,gBAuByBC,GAAG,EAAK;EAAA,IAtB9BC,EAAE,QAAFA,EAAE;IACFC,IAAI,QAAJA,IAAI;IACJC,WAAW,QAAXA,WAAW;IACXC,QAAQ,QAARA,QAAQ;IACRC,aAAa,QAAbA,aAAa;IACbC,KAAK,QAALA,KAAK;IACLC,QAAQ,QAARA,QAAQ;IACRC,kBAAkB,QAAlBA,kBAAkB;IAClBC,QAAQ,QAARA,QAAQ;IACRC,QAAQ,QAARA,QAAQ;IACRC,UAAU,QAAVA,UAAU;IACVC,uBAAuB,QAAvBA,uBAAuB;IACvBC,iBAAiB,QAAjBA,iBAAiB;IACjBC,IAAI,QAAJA,IAAI;IACJC,gBAAgB,QAAhBA,gBAAgB;IAChBC,cAAc,QAAdA,cAAc;IAAA,mBACdC,MAAM;IAAN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G,cAAc;EACdC,MAAM;EACNN,UAAU;AAAA;AAAA,eA2OGd,cAAc;AAAA"}
1
+ {"version":3,"file":"DropdownFilter.cjs","names":["DropdownFilter","React","forwardRef","ref","id","list","placeholder","onSelect","onInputChange","value","required","messageOnNoResults","disabled","readOnly","scrollable","activeValidationMessage","autofilledMessage","size","disableFiltering","buttonFontSize","margin","loading","onFocus","onBlur","dataTestId","rest","useState","isOpen","setIsOpen","input","setInput","activeDescendant","setActiveDescendant","restartFilter","setRestartFilter","selectedItem","setSelectedItem","selectedValues","setSelectedValues","focused","setFocused","inputFocused","setInputFocused","init","setInit","styledFieldRef","useFocusVisibleRef","inputRef","clearButtonRef","useRef","useActionWithin","useImperativeHandle","current","containerRef","useClickOutsideRef","useFocusOutsideRef","handleInputKeyDown","e","key","preventDefault","useEffect","length","val","item","find","a","displayLabel","undefined","handleInputClear","focus","focusVisible","detail","renderInput","stopPropagation","blur","defaultOnMouseDownHandler","Math","floor","random","target","marginLeft","Size","Small","COLORS","neutral_600","itemsType","multiSelect","action","onValueUpdate","values","items","critical_400"],"sources":["../../src/Dropdown/DropdownFilter.tsx"],"sourcesContent":["import * as React from 'react';\nimport { COLORS } from '../styles';\nimport { ArrowDropDown, ArrowDropUp, Information, TechnicalWarning } from '../icons/systemicons/SystemIcons';\nimport { LoadingIndicator } from '../LoadingIndicator';\nimport { StyledField, Dropdown, InputField } from './CommonStyling';\nimport DropdownContent, { DropdownItem } from './DropdownContent';\nimport { Size, Testable } from '../types';\nimport { AutofilledMessage, ErrorMessage } from '../InputFields';\nimport TooltipOverflow from '../Tooltips/TooltipOverflow';\nimport { defaultOnMouseDownHandler, useActionWithin, useClickOutsideRef, useFocusOutsideRef, useFocusVisibleRef } from '../common';\nimport { IconButton } from '../Button';\nimport { SystemIcons } from '../icons';\n\ninterface DropdownFilterProps extends Testable, Omit<React.InputHTMLAttributes<HTMLInputElement>, 'onSelect' | 'size' | 'list' | 'autoComplete' | 'type' | 'placeholder' | 'onKeyDown' | 'value' | 'onChange' | 'required' | 'tabIndex' | 'disabled' | 'readOnly'> {\n list: DropdownItem[];\n placeholder?: string;\n \n value?: string;\n onSelect?: (value: string) => void;\n onInputChange?: (input: string) => void;\n\n required?: boolean;\n disabled?: boolean;\n readOnly?: boolean;\n loading?: boolean;\n\n disableFiltering?: boolean;\n\n messageOnNoResults?: string;\n activeValidationMessage?: string;\n autofilledMessage?: string;\n size?: Size.Small | Size.Medium;\n\n buttonFontSize?: string;\n margin?: string;\n scrollable?: boolean;\n}\n\nconst DropdownFilter = React.forwardRef( ({\n id,\n list,\n placeholder,\n onSelect,\n onInputChange,\n value,\n required,\n messageOnNoResults,\n disabled,\n readOnly,\n scrollable,\n activeValidationMessage,\n autofilledMessage,\n size,\n disableFiltering,\n buttonFontSize,\n margin = '4px 0',\n loading,\n onFocus,\n onBlur,\n dataTestId,\n ...rest\n }: DropdownFilterProps, ref) => {\n const [isOpen, setIsOpen] = React.useState<boolean>(false);\n const [input, setInput] = React.useState<string>();\n const [activeDescendant, setActiveDescendant] = React.useState<string>();\n const [restartFilter, setRestartFilter] = React.useState<boolean>(false);\n const [selectedItem, setSelectedItem] = React.useState<DropdownItem>();\n const [selectedValues, setSelectedValues] = React.useState<string[]>([]);\n const [focused, setFocused] = React.useState<number | null>(null);\n const [inputFocused, setInputFocused] = React.useState<boolean>(false);\n const [init, setInit] = React.useState<boolean>(true);\n\n const styledFieldRef = useFocusVisibleRef();\n const inputRef = useFocusVisibleRef([styledFieldRef]);\n const clearButtonRef = React.useRef<HTMLButtonElement>(null);\n\n useActionWithin(styledFieldRef, input && !readOnly && !disabled ? [clearButtonRef] : []);\n\n React.useImperativeHandle(ref, () => inputRef.current, [inputRef]);\n\n const containerRef = useClickOutsideRef(\n () => setIsOpen(false),\n [],\n useFocusOutsideRef(() => setIsOpen(false)),\n );\n\n const handleInputKeyDown = (e: React.KeyboardEvent<HTMLInputElement>) => {\n if (e.key === 'Esc' || e.key === 'Escape') {\n e.preventDefault();\n }\n if (e.key === 'ArrowDown' || e.key === 'Down' || e.key === 'ArrowUp' || e.key === 'Up') {\n e.preventDefault();\n if (!isOpen) {\n setIsOpen(true);\n }\n }\n };\n\n React.useEffect(() => {\n setInit(true);\n setSelectedValues(!!value ? [value] : []);\n }, [value]);\n\n React.useEffect(() => {\n if (selectedValues?.length) {\n const val = selectedValues[0];\n const item = list.find((a) => a.value === val);\n setSelectedItem(item);\n setInput(item?.displayLabel ?? item?.value ?? '');\n onSelect && !init && onSelect(val);\n } else {\n setSelectedItem(undefined);\n onSelect && !init && onSelect('');\n setInput('');\n }\n }, [selectedValues]);\n\n React.useEffect(() => {\n if (!isOpen) {\n if (!!selectedItem) {\n setInput(selectedItem?.displayLabel ?? selectedItem?.value ?? '');\n } else {\n setInput('');\n }\n }\n\n setRestartFilter(true);\n }, [isOpen, selectedItem]);\n\n const handleInputClear = (e: any) => {\n setInput('');\n setSelectedValues([]);\n onSelect && onSelect('');\n inputRef.current?.focus({ focusVisible: e?.detail !== 1 } as any);\n };\n\n const renderInput = () => {\n return (\n <StyledField\n ref={styledFieldRef}\n className={size ? size : ''}\n onClick={(e: any) => {\n if (!readOnly && !disabled) {\n e.stopPropagation();\n setIsOpen(!isOpen);\n if (isOpen) {\n inputRef.current?.blur();\n } else {\n inputRef.current?.focus();\n }\n }\n }}\n disabled={disabled || false}\n readOnly={readOnly || false}\n isPlaceholder={!input}\n fontSize={buttonFontSize}\n showValidationMessage={!!activeValidationMessage}\n onMouseDown={defaultOnMouseDownHandler}\n data-testid={`otherdiv_${id}`}>\n <InputField\n id={id}\n ref={inputRef}\n autoComplete={'off-' + Math.floor(Math.random() * 999999999999)}\n type=\"search\"\n placeholder={inputFocused ? '' : placeholder}\n onKeyDown={handleInputKeyDown}\n ellipsis\n value={input || ''}\n onChange={(e: any) => {\n if (!e.target.value) {\n setSelectedValues([]);\n }\n if (!readOnly && !disabled && e.target.value !== input) {\n setRestartFilter(false);\n setIsOpen(true);\n setInput(e.target.value);\n if (onInputChange) {\n onInputChange(e.target.value || '');\n }\n }\n }}\n onFocus={(e) => {\n setInputFocused(true);\n onFocus && onFocus(e);\n }}\n onBlur={(e) => {\n setInputFocused(false);\n onBlur && onBlur(e);\n }}\n required={required}\n tabIndex={disabled || readOnly ? -1 : 0}\n disabled={disabled || false}\n data-testid={dataTestId}\n {...rest}\n />\n {!isOpen ? <TooltipOverflow input={inputRef} withArrow={true} maxWidth=\"100%\" size={size} align='end' position='bottom'>\n {input}\n </TooltipOverflow> : null}\n {input && !readOnly && !disabled && !loading && (\n <IconButton action={handleInputClear} ref={clearButtonRef} useTransparentBackground={true} shape={'circular'} style={{ marginLeft: '-4px' }} variant={'secondary'}>\n <SystemIcons.Clear />\n </IconButton>\n )}\n\n {!disabled && !readOnly && loading && (\n <div style={{ marginLeft: '-4xp' }}>\n <LoadingIndicator size={Size.Small} color={COLORS.neutral_600} />\n </div>\n )}\n\n <div className={'dropdown-arrow'}>\n {isOpen && !readOnly && !disabled ? <ArrowDropUp size=\"24px\" className={size ? size : ''} /> : <ArrowDropDown size=\"24px\" className={size ? size : ''} />}\n </div>\n </StyledField>\n );\n };\n\n return (\n <>\n <Dropdown ref={containerRef}\n role=\"combobox\"\n aria-multiselectable={true} \n aria-controls={`${id}_dropdowncontent`}\n aria-activedescendant={activeDescendant}\n aria-expanded={isOpen ? true : false}\n disabled={disabled} isButton={false} readOnly={readOnly} className={size ? size : ''} margin={margin}>\n {renderInput()}\n {!readOnly && !disabled && (\n <DropdownContent\n containerRef={containerRef}\n isOpen={isOpen && !loading}\n messageOnNoResults={messageOnNoResults ?? ''}\n selectedValues={selectedValues}\n setSelectedValues={setSelectedValues}\n size={size ?? Size.Small}\n onActiveDescendantChanged={(e) => setActiveDescendant(e)}\n focused={focused}\n ariaRolesType=\"input\"\n setFocused={setFocused}\n outline={false}\n customizationProps={{\n itemsType: 'normal',\n scrollable: scrollable,\n multiSelect: false,\n action: () => {},\n onValueUpdate: (values: string[]) => {\n setRestartFilter(true);\n setInit(false);\n },\n items: list,\n }}\n filter={!disableFiltering && !restartFilter ? input || '' : ''}\n setIsOpen={setIsOpen}\n isButton={false}\n id={`${id}_dropdowncontent`}\n />\n )}\n </Dropdown>\n {activeValidationMessage && (\n <ErrorMessage className={size || ''}>\n <TechnicalWarning color={COLORS.critical_400} />\n <span>{activeValidationMessage}</span>\n </ErrorMessage>\n )}\n {autofilledMessage && (\n <AutofilledMessage className={size || ''}>\n <Information color={COLORS.neutral_600} />\n <span>{autofilledMessage}</span>\n </AutofilledMessage>\n )}\n </>\n );\n});\n\nexport default DropdownFilter;\n"],"mappings":";;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAuC;AAAA;AAAA;AAAA;AAAA;AAAA;AA2BvC,IAAMA,cAAc,gBAAGC,KAAK,CAACC,UAAU,CAAE,gBAuByBC,GAAG,EAAK;EAAA,IAtB9BC,EAAE,QAAFA,EAAE;IACFC,IAAI,QAAJA,IAAI;IACJC,WAAW,QAAXA,WAAW;IACXC,QAAQ,QAARA,QAAQ;IACRC,aAAa,QAAbA,aAAa;IACbC,KAAK,QAALA,KAAK;IACLC,QAAQ,QAARA,QAAQ;IACRC,kBAAkB,QAAlBA,kBAAkB;IAClBC,QAAQ,QAARA,QAAQ;IACRC,QAAQ,QAARA,QAAQ;IACRC,UAAU,QAAVA,UAAU;IACVC,uBAAuB,QAAvBA,uBAAuB;IACvBC,iBAAiB,QAAjBA,iBAAiB;IACjBC,IAAI,QAAJA,IAAI;IACJC,gBAAgB,QAAhBA,gBAAgB;IAChBC,cAAc,QAAdA,cAAc;IAAA,mBACdC,MAAM;IAANA,MAAM,4BAAG,OAAO;IAChBC,OAAO,QAAPA,OAAO;IACPC,QAAO,QAAPA,OAAO;IACPC,OAAM,QAANA,MAAM;IACNC,UAAU,QAAVA,UAAU;IACPC,IAAI;EAEjD,sBAA4BxB,KAAK,CAACyB,QAAQ,CAAU,KAAK,CAAC;IAAA;IAAnDC,MAAM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,uBAAuB;EACvBC,iBAAiB;EAGjBG,cAAc;EACdC,MAAM;EACNN,UAAU;AAAA;AAAA,eA+OGd,cAAc;AAAA"}
@@ -13,6 +13,7 @@ import { StyledField, Dropdown, InputField } from './CommonStyling';
13
13
  import DropdownContent from './DropdownContent';
14
14
  import { Size } from '../types';
15
15
  import { AutofilledMessage, ErrorMessage } from '../InputFields';
16
+ import TooltipOverflow from '../Tooltips/TooltipOverflow';
16
17
  import { defaultOnMouseDownHandler, useActionWithin, useClickOutsideRef, useFocusOutsideRef, useFocusVisibleRef } from '../common';
17
18
  import { IconButton } from '../Button';
18
19
  import { SystemIcons } from '../icons';
@@ -173,6 +174,7 @@ var DropdownFilter = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
173
174
  type: "search",
174
175
  placeholder: inputFocused ? '' : placeholder,
175
176
  onKeyDown: handleInputKeyDown,
177
+ ellipsis: true,
176
178
  value: input || '',
177
179
  onChange: function onChange(e) {
178
180
  if (!e.target.value) {
@@ -199,7 +201,15 @@ var DropdownFilter = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
199
201
  tabIndex: disabled || readOnly ? -1 : 0,
200
202
  disabled: disabled || false,
201
203
  "data-testid": dataTestId
202
- }, rest)), input && !readOnly && !disabled && !loading && /*#__PURE__*/_jsx(IconButton, {
204
+ }, rest)), !isOpen ? /*#__PURE__*/_jsx(TooltipOverflow, {
205
+ input: inputRef,
206
+ withArrow: true,
207
+ maxWidth: "100%",
208
+ size: size,
209
+ align: "end",
210
+ position: "bottom",
211
+ children: input
212
+ }) : null, input && !readOnly && !disabled && !loading && /*#__PURE__*/_jsx(IconButton, {
203
213
  action: handleInputClear,
204
214
  ref: clearButtonRef,
205
215
  useTransparentBackground: true,
@@ -1 +1 @@
1
- {"version":3,"file":"DropdownFilter.js","names":["React","COLORS","ArrowDropDown","ArrowDropUp","Information","TechnicalWarning","LoadingIndicator","StyledField","Dropdown","InputField","DropdownContent","Size","AutofilledMessage","ErrorMessage","defaultOnMouseDownHandler","useActionWithin","useClickOutsideRef","useFocusOutsideRef","useFocusVisibleRef","IconButton","SystemIcons","DropdownFilter","forwardRef","ref","id","list","placeholder","onSelect","onInputChange","value","required","messageOnNoResults","disabled","readOnly","scrollable","activeValidationMessage","autofilledMessage","size","disableFiltering","buttonFontSize","margin","loading","onFocus","onBlur","dataTestId","rest","useState","isOpen","setIsOpen","input","setInput","activeDescendant","setActiveDescendant","restartFilter","setRestartFilter","selectedItem","setSelectedItem","selectedValues","setSelectedValues","focused","setFocused","inputFocused","setInputFocused","init","setInit","styledFieldRef","inputRef","clearButtonRef","useRef","useImperativeHandle","current","containerRef","handleInputKeyDown","e","key","preventDefault","useEffect","length","val","item","find","a","displayLabel","undefined","handleInputClear","focus","focusVisible","detail","renderInput","stopPropagation","blur","Math","floor","random","target","marginLeft","Small","neutral_600","itemsType","multiSelect","action","onValueUpdate","values","items","critical_400"],"sources":["../../src/Dropdown/DropdownFilter.tsx"],"sourcesContent":["import * as React from 'react';\nimport { COLORS } from '../styles';\nimport { ArrowDropDown, ArrowDropUp, Information, TechnicalWarning } from '../icons/systemicons/SystemIcons';\nimport { LoadingIndicator } from '../LoadingIndicator';\nimport { StyledField, Dropdown, InputField } from './CommonStyling';\nimport DropdownContent, { DropdownItem } from './DropdownContent';\nimport { Size, Testable } from '../types';\nimport { AutofilledMessage, ErrorMessage } from '../InputFields';\nimport { defaultOnMouseDownHandler, useActionWithin, useClickOutsideRef, useFocusOutsideRef, useFocusVisibleRef } from '../common';\nimport { IconButton } from '../Button';\nimport { SystemIcons } from '../icons';\n\ninterface DropdownFilterProps extends Testable, Omit<React.InputHTMLAttributes<HTMLInputElement>, 'onSelect' | 'size' | 'list' | 'autoComplete' | 'type' | 'placeholder' | 'onKeyDown' | 'value' | 'onChange' | 'required' | 'tabIndex' | 'disabled' | 'readOnly'> {\n list: DropdownItem[];\n placeholder?: string;\n \n value?: string;\n onSelect?: (value: string) => void;\n onInputChange?: (input: string) => void;\n\n required?: boolean;\n disabled?: boolean;\n readOnly?: boolean;\n loading?: boolean;\n\n disableFiltering?: boolean;\n\n messageOnNoResults?: string;\n activeValidationMessage?: string;\n autofilledMessage?: string;\n size?: Size.Small | Size.Medium;\n\n buttonFontSize?: string;\n margin?: string;\n scrollable?: boolean;\n}\n\nconst DropdownFilter = React.forwardRef( ({\n id,\n list,\n placeholder,\n onSelect,\n onInputChange,\n value,\n required,\n messageOnNoResults,\n disabled,\n readOnly,\n scrollable,\n activeValidationMessage,\n autofilledMessage,\n size,\n disableFiltering,\n buttonFontSize,\n margin = '4px 0',\n loading,\n onFocus,\n onBlur,\n dataTestId,\n ...rest\n }: DropdownFilterProps, ref) => {\n const [isOpen, setIsOpen] = React.useState<boolean>(false);\n const [input, setInput] = React.useState<string>();\n const [activeDescendant, setActiveDescendant] = React.useState<string>();\n const [restartFilter, setRestartFilter] = React.useState<boolean>(false);\n const [selectedItem, setSelectedItem] = React.useState<DropdownItem>();\n const [selectedValues, setSelectedValues] = React.useState<string[]>([]);\n const [focused, setFocused] = React.useState<number | null>(null);\n const [inputFocused, setInputFocused] = React.useState<boolean>(false);\n const [init, setInit] = React.useState<boolean>(true);\n\n const styledFieldRef = useFocusVisibleRef();\n const inputRef = useFocusVisibleRef([styledFieldRef]);\n const clearButtonRef = React.useRef<HTMLButtonElement>(null);\n\n useActionWithin(styledFieldRef, input && !readOnly && !disabled ? [clearButtonRef] : []);\n\n React.useImperativeHandle(ref, () => inputRef.current, [inputRef]);\n\n const containerRef = useClickOutsideRef(\n () => setIsOpen(false),\n [],\n useFocusOutsideRef(() => setIsOpen(false)),\n );\n\n const handleInputKeyDown = (e: React.KeyboardEvent<HTMLInputElement>) => {\n if (e.key === 'Esc' || e.key === 'Escape') {\n e.preventDefault();\n }\n if (e.key === 'ArrowDown' || e.key === 'Down' || e.key === 'ArrowUp' || e.key === 'Up') {\n e.preventDefault();\n if (!isOpen) {\n setIsOpen(true);\n }\n }\n };\n\n React.useEffect(() => {\n setInit(true);\n setSelectedValues(!!value ? [value] : []);\n }, [value]);\n\n React.useEffect(() => {\n if (selectedValues?.length) {\n const val = selectedValues[0];\n const item = list.find((a) => a.value === val);\n setSelectedItem(item);\n setInput(item?.displayLabel ?? item?.value ?? '');\n onSelect && !init && onSelect(val);\n } else {\n setSelectedItem(undefined);\n onSelect && !init && onSelect('');\n setInput('');\n }\n }, [selectedValues]);\n\n React.useEffect(() => {\n if (!isOpen) {\n if (!!selectedItem) {\n setInput(selectedItem?.displayLabel ?? selectedItem?.value ?? '');\n } else {\n setInput('');\n }\n }\n\n setRestartFilter(true);\n }, [isOpen, selectedItem]);\n\n const handleInputClear = (e: any) => {\n setInput('');\n setSelectedValues([]);\n onSelect && onSelect('');\n inputRef.current?.focus({ focusVisible: e?.detail !== 1 } as any);\n };\n\n const renderInput = () => {\n return (\n <StyledField\n ref={styledFieldRef}\n className={size ? size : ''}\n onClick={(e: any) => {\n if (!readOnly && !disabled) {\n e.stopPropagation();\n setIsOpen(!isOpen);\n if (isOpen) {\n inputRef.current?.blur();\n } else {\n inputRef.current?.focus();\n }\n }\n }}\n disabled={disabled || false}\n readOnly={readOnly || false}\n isPlaceholder={!input}\n fontSize={buttonFontSize}\n showValidationMessage={!!activeValidationMessage}\n onMouseDown={defaultOnMouseDownHandler}\n data-testid={`otherdiv_${id}`}>\n <InputField\n id={id}\n ref={inputRef}\n autoComplete={'off-' + Math.floor(Math.random() * 999999999999)}\n type=\"search\"\n placeholder={inputFocused ? '' : placeholder}\n onKeyDown={handleInputKeyDown}\n value={input || ''}\n onChange={(e: any) => {\n if (!e.target.value) {\n setSelectedValues([]);\n }\n if (!readOnly && !disabled && e.target.value !== input) {\n setRestartFilter(false);\n setIsOpen(true);\n setInput(e.target.value);\n if (onInputChange) {\n onInputChange(e.target.value || '');\n }\n }\n }}\n onFocus={(e) => {\n setInputFocused(true);\n onFocus && onFocus(e);\n }}\n onBlur={(e) => {\n setInputFocused(false);\n onBlur && onBlur(e);\n }}\n required={required}\n tabIndex={disabled || readOnly ? -1 : 0}\n disabled={disabled || false}\n data-testid={dataTestId}\n {...rest}\n />\n {input && !readOnly && !disabled && !loading && (\n <IconButton action={handleInputClear} ref={clearButtonRef} useTransparentBackground={true} shape={'circular'} style={{ marginLeft: '-4px' }} variant={'secondary'}>\n <SystemIcons.Clear />\n </IconButton>\n )}\n\n {!disabled && !readOnly && loading && (\n <div style={{ marginLeft: '-4xp' }}>\n <LoadingIndicator size={Size.Small} color={COLORS.neutral_600} />\n </div>\n )}\n\n <div className={'dropdown-arrow'}>\n {isOpen && !readOnly && !disabled ? <ArrowDropUp size=\"24px\" className={size ? size : ''} /> : <ArrowDropDown size=\"24px\" className={size ? size : ''} />}\n </div>\n </StyledField>\n );\n };\n\n return (\n <>\n <Dropdown ref={containerRef}\n role=\"combobox\"\n aria-multiselectable={true} \n aria-controls={`${id}_dropdowncontent`}\n aria-activedescendant={activeDescendant}\n aria-expanded={isOpen ? true : false}\n disabled={disabled} isButton={false} readOnly={readOnly} className={size ? size : ''} margin={margin}>\n {renderInput()}\n {!readOnly && !disabled && (\n <DropdownContent\n containerRef={containerRef}\n isOpen={isOpen && !loading}\n messageOnNoResults={messageOnNoResults ?? ''}\n selectedValues={selectedValues}\n setSelectedValues={setSelectedValues}\n size={size ?? Size.Small}\n onActiveDescendantChanged={(e) => setActiveDescendant(e)}\n focused={focused}\n ariaRolesType=\"input\"\n setFocused={setFocused}\n outline={false}\n customizationProps={{\n itemsType: 'normal',\n scrollable: scrollable,\n multiSelect: false,\n action: () => {},\n onValueUpdate: (values: string[]) => {\n setRestartFilter(true);\n setInit(false);\n },\n items: list,\n }}\n filter={!disableFiltering && !restartFilter ? input || '' : ''}\n setIsOpen={setIsOpen}\n isButton={false}\n id={`${id}_dropdowncontent`}\n />\n )}\n </Dropdown>\n {activeValidationMessage && (\n <ErrorMessage className={size || ''}>\n <TechnicalWarning color={COLORS.critical_400} />\n <span>{activeValidationMessage}</span>\n </ErrorMessage>\n )}\n {autofilledMessage && (\n <AutofilledMessage className={size || ''}>\n <Information color={COLORS.neutral_600} />\n <span>{autofilledMessage}</span>\n </AutofilledMessage>\n )}\n </>\n );\n});\n\nexport default DropdownFilter;\n"],"mappings":";;;;;;;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,MAAM,QAAQ,WAAW;AAClC,SAASC,aAAa,EAAEC,WAAW,EAAEC,WAAW,EAAEC,gBAAgB,QAAQ,kCAAkC;AAC5G,SAASC,gBAAgB,QAAQ,qBAAqB;AACtD,SAASC,WAAW,EAAEC,QAAQ,EAAEC,UAAU,QAAQ,iBAAiB;AACnE,OAAOC,eAAe,MAAwB,mBAAmB;AACjE,SAASC,IAAI,QAAkB,UAAU;AACzC,SAASC,iBAAiB,EAAEC,YAAY,QAAQ,gBAAgB;AAChE,SAASC,yBAAyB,EAAEC,eAAe,EAAEC,kBAAkB,EAAEC,kBAAkB,EAAEC,kBAAkB,QAAQ,WAAW;AAClI,SAASC,UAAU,QAAQ,WAAW;AACtC,SAASC,WAAW,QAAQ,UAAU;AAAC;AAAA;AAAA;AA2BvC,IAAMC,cAAc,gBAAGrB,KAAK,CAACsB,UAAU,CAAE,gBAuByBC,GAAG,EAAK;EAAA,IAtB9BC,EAAE,QAAFA,EAAE;IACFC,IAAI,QAAJA,IAAI;IACJC,WAAW,QAAXA,WAAW;IACXC,QAAQ,QAARA,QAAQ;IACRC,aAAa,QAAbA,aAAa;IACbC,KAAK,QAALA,KAAK;IACLC,QAAQ,QAARA,QAAQ;IACRC,kBAAkB,QAAlBA,kBAAkB;IAClBC,QAAQ,QAARA,QAAQ;IACRC,QAAQ,QAARA,QAAQ;IACRC,UAAU,QAAVA,UAAU;IACVC,uBAAuB,QAAvBA,uBAAuB;IACvBC,iBAAiB,QAAjBA,iBAAiB;IACjBC,IAAI,QAAJA,IAAI;IACJC,gBAAgB,QAAhBA,gBAAgB;IAChBC,cAAc,QAAdA,cAAc;IAAA,mBACdC,MAAM;IAANA,MAAM,4BAAG,OAAO;IAChBC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
1
+ {"version":3,"file":"DropdownFilter.js","names":["React","COLORS","ArrowDropDown","ArrowDropUp","Information","TechnicalWarning","LoadingIndicator","StyledField","Dropdown","InputField","DropdownContent","Size","AutofilledMessage","ErrorMessage","TooltipOverflow","defaultOnMouseDownHandler","useActionWithin","useClickOutsideRef","useFocusOutsideRef","useFocusVisibleRef","IconButton","SystemIcons","DropdownFilter","forwardRef","ref","id","list","placeholder","onSelect","onInputChange","value","required","messageOnNoResults","disabled","readOnly","scrollable","activeValidationMessage","autofilledMessage","size","disableFiltering","buttonFontSize","margin","loading","onFocus","onBlur","dataTestId","rest","useState","isOpen","setIsOpen","input","setInput","activeDescendant","setActiveDescendant","restartFilter","setRestartFilter","selectedItem","setSelectedItem","selectedValues","setSelectedValues","focused","setFocused","inputFocused","setInputFocused","init","setInit","styledFieldRef","inputRef","clearButtonRef","useRef","useImperativeHandle","current","containerRef","handleInputKeyDown","e","key","preventDefault","useEffect","length","val","item","find","a","displayLabel","undefined","handleInputClear","focus","focusVisible","detail","renderInput","stopPropagation","blur","Math","floor","random","target","marginLeft","Small","neutral_600","itemsType","multiSelect","action","onValueUpdate","values","items","critical_400"],"sources":["../../src/Dropdown/DropdownFilter.tsx"],"sourcesContent":["import * as React from 'react';\nimport { COLORS } from '../styles';\nimport { ArrowDropDown, ArrowDropUp, Information, TechnicalWarning } from '../icons/systemicons/SystemIcons';\nimport { LoadingIndicator } from '../LoadingIndicator';\nimport { StyledField, Dropdown, InputField } from './CommonStyling';\nimport DropdownContent, { DropdownItem } from './DropdownContent';\nimport { Size, Testable } from '../types';\nimport { AutofilledMessage, ErrorMessage } from '../InputFields';\nimport TooltipOverflow from '../Tooltips/TooltipOverflow';\nimport { defaultOnMouseDownHandler, useActionWithin, useClickOutsideRef, useFocusOutsideRef, useFocusVisibleRef } from '../common';\nimport { IconButton } from '../Button';\nimport { SystemIcons } from '../icons';\n\ninterface DropdownFilterProps extends Testable, Omit<React.InputHTMLAttributes<HTMLInputElement>, 'onSelect' | 'size' | 'list' | 'autoComplete' | 'type' | 'placeholder' | 'onKeyDown' | 'value' | 'onChange' | 'required' | 'tabIndex' | 'disabled' | 'readOnly'> {\n list: DropdownItem[];\n placeholder?: string;\n \n value?: string;\n onSelect?: (value: string) => void;\n onInputChange?: (input: string) => void;\n\n required?: boolean;\n disabled?: boolean;\n readOnly?: boolean;\n loading?: boolean;\n\n disableFiltering?: boolean;\n\n messageOnNoResults?: string;\n activeValidationMessage?: string;\n autofilledMessage?: string;\n size?: Size.Small | Size.Medium;\n\n buttonFontSize?: string;\n margin?: string;\n scrollable?: boolean;\n}\n\nconst DropdownFilter = React.forwardRef( ({\n id,\n list,\n placeholder,\n onSelect,\n onInputChange,\n value,\n required,\n messageOnNoResults,\n disabled,\n readOnly,\n scrollable,\n activeValidationMessage,\n autofilledMessage,\n size,\n disableFiltering,\n buttonFontSize,\n margin = '4px 0',\n loading,\n onFocus,\n onBlur,\n dataTestId,\n ...rest\n }: DropdownFilterProps, ref) => {\n const [isOpen, setIsOpen] = React.useState<boolean>(false);\n const [input, setInput] = React.useState<string>();\n const [activeDescendant, setActiveDescendant] = React.useState<string>();\n const [restartFilter, setRestartFilter] = React.useState<boolean>(false);\n const [selectedItem, setSelectedItem] = React.useState<DropdownItem>();\n const [selectedValues, setSelectedValues] = React.useState<string[]>([]);\n const [focused, setFocused] = React.useState<number | null>(null);\n const [inputFocused, setInputFocused] = React.useState<boolean>(false);\n const [init, setInit] = React.useState<boolean>(true);\n\n const styledFieldRef = useFocusVisibleRef();\n const inputRef = useFocusVisibleRef([styledFieldRef]);\n const clearButtonRef = React.useRef<HTMLButtonElement>(null);\n\n useActionWithin(styledFieldRef, input && !readOnly && !disabled ? [clearButtonRef] : []);\n\n React.useImperativeHandle(ref, () => inputRef.current, [inputRef]);\n\n const containerRef = useClickOutsideRef(\n () => setIsOpen(false),\n [],\n useFocusOutsideRef(() => setIsOpen(false)),\n );\n\n const handleInputKeyDown = (e: React.KeyboardEvent<HTMLInputElement>) => {\n if (e.key === 'Esc' || e.key === 'Escape') {\n e.preventDefault();\n }\n if (e.key === 'ArrowDown' || e.key === 'Down' || e.key === 'ArrowUp' || e.key === 'Up') {\n e.preventDefault();\n if (!isOpen) {\n setIsOpen(true);\n }\n }\n };\n\n React.useEffect(() => {\n setInit(true);\n setSelectedValues(!!value ? [value] : []);\n }, [value]);\n\n React.useEffect(() => {\n if (selectedValues?.length) {\n const val = selectedValues[0];\n const item = list.find((a) => a.value === val);\n setSelectedItem(item);\n setInput(item?.displayLabel ?? item?.value ?? '');\n onSelect && !init && onSelect(val);\n } else {\n setSelectedItem(undefined);\n onSelect && !init && onSelect('');\n setInput('');\n }\n }, [selectedValues]);\n\n React.useEffect(() => {\n if (!isOpen) {\n if (!!selectedItem) {\n setInput(selectedItem?.displayLabel ?? selectedItem?.value ?? '');\n } else {\n setInput('');\n }\n }\n\n setRestartFilter(true);\n }, [isOpen, selectedItem]);\n\n const handleInputClear = (e: any) => {\n setInput('');\n setSelectedValues([]);\n onSelect && onSelect('');\n inputRef.current?.focus({ focusVisible: e?.detail !== 1 } as any);\n };\n\n const renderInput = () => {\n return (\n <StyledField\n ref={styledFieldRef}\n className={size ? size : ''}\n onClick={(e: any) => {\n if (!readOnly && !disabled) {\n e.stopPropagation();\n setIsOpen(!isOpen);\n if (isOpen) {\n inputRef.current?.blur();\n } else {\n inputRef.current?.focus();\n }\n }\n }}\n disabled={disabled || false}\n readOnly={readOnly || false}\n isPlaceholder={!input}\n fontSize={buttonFontSize}\n showValidationMessage={!!activeValidationMessage}\n onMouseDown={defaultOnMouseDownHandler}\n data-testid={`otherdiv_${id}`}>\n <InputField\n id={id}\n ref={inputRef}\n autoComplete={'off-' + Math.floor(Math.random() * 999999999999)}\n type=\"search\"\n placeholder={inputFocused ? '' : placeholder}\n onKeyDown={handleInputKeyDown}\n ellipsis\n value={input || ''}\n onChange={(e: any) => {\n if (!e.target.value) {\n setSelectedValues([]);\n }\n if (!readOnly && !disabled && e.target.value !== input) {\n setRestartFilter(false);\n setIsOpen(true);\n setInput(e.target.value);\n if (onInputChange) {\n onInputChange(e.target.value || '');\n }\n }\n }}\n onFocus={(e) => {\n setInputFocused(true);\n onFocus && onFocus(e);\n }}\n onBlur={(e) => {\n setInputFocused(false);\n onBlur && onBlur(e);\n }}\n required={required}\n tabIndex={disabled || readOnly ? -1 : 0}\n disabled={disabled || false}\n data-testid={dataTestId}\n {...rest}\n />\n {!isOpen ? <TooltipOverflow input={inputRef} withArrow={true} maxWidth=\"100%\" size={size} align='end' position='bottom'>\n {input}\n </TooltipOverflow> : null}\n {input && !readOnly && !disabled && !loading && (\n <IconButton action={handleInputClear} ref={clearButtonRef} useTransparentBackground={true} shape={'circular'} style={{ marginLeft: '-4px' }} variant={'secondary'}>\n <SystemIcons.Clear />\n </IconButton>\n )}\n\n {!disabled && !readOnly && loading && (\n <div style={{ marginLeft: '-4xp' }}>\n <LoadingIndicator size={Size.Small} color={COLORS.neutral_600} />\n </div>\n )}\n\n <div className={'dropdown-arrow'}>\n {isOpen && !readOnly && !disabled ? <ArrowDropUp size=\"24px\" className={size ? size : ''} /> : <ArrowDropDown size=\"24px\" className={size ? size : ''} />}\n </div>\n </StyledField>\n );\n };\n\n return (\n <>\n <Dropdown ref={containerRef}\n role=\"combobox\"\n aria-multiselectable={true} \n aria-controls={`${id}_dropdowncontent`}\n aria-activedescendant={activeDescendant}\n aria-expanded={isOpen ? true : false}\n disabled={disabled} isButton={false} readOnly={readOnly} className={size ? size : ''} margin={margin}>\n {renderInput()}\n {!readOnly && !disabled && (\n <DropdownContent\n containerRef={containerRef}\n isOpen={isOpen && !loading}\n messageOnNoResults={messageOnNoResults ?? ''}\n selectedValues={selectedValues}\n setSelectedValues={setSelectedValues}\n size={size ?? Size.Small}\n onActiveDescendantChanged={(e) => setActiveDescendant(e)}\n focused={focused}\n ariaRolesType=\"input\"\n setFocused={setFocused}\n outline={false}\n customizationProps={{\n itemsType: 'normal',\n scrollable: scrollable,\n multiSelect: false,\n action: () => {},\n onValueUpdate: (values: string[]) => {\n setRestartFilter(true);\n setInit(false);\n },\n items: list,\n }}\n filter={!disableFiltering && !restartFilter ? input || '' : ''}\n setIsOpen={setIsOpen}\n isButton={false}\n id={`${id}_dropdowncontent`}\n />\n )}\n </Dropdown>\n {activeValidationMessage && (\n <ErrorMessage className={size || ''}>\n <TechnicalWarning color={COLORS.critical_400} />\n <span>{activeValidationMessage}</span>\n </ErrorMessage>\n )}\n {autofilledMessage && (\n <AutofilledMessage className={size || ''}>\n <Information color={COLORS.neutral_600} />\n <span>{autofilledMessage}</span>\n </AutofilledMessage>\n )}\n </>\n );\n});\n\nexport default DropdownFilter;\n"],"mappings":";;;;;;;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,MAAM,QAAQ,WAAW;AAClC,SAASC,aAAa,EAAEC,WAAW,EAAEC,WAAW,EAAEC,gBAAgB,QAAQ,kCAAkC;AAC5G,SAASC,gBAAgB,QAAQ,qBAAqB;AACtD,SAASC,WAAW,EAAEC,QAAQ,EAAEC,UAAU,QAAQ,iBAAiB;AACnE,OAAOC,eAAe,MAAwB,mBAAmB;AACjE,SAASC,IAAI,QAAkB,UAAU;AACzC,SAASC,iBAAiB,EAAEC,YAAY,QAAQ,gBAAgB;AAChE,OAAOC,eAAe,MAAM,6BAA6B;AACzD,SAASC,yBAAyB,EAAEC,eAAe,EAAEC,kBAAkB,EAAEC,kBAAkB,EAAEC,kBAAkB,QAAQ,WAAW;AAClI,SAASC,UAAU,QAAQ,WAAW;AACtC,SAASC,WAAW,QAAQ,UAAU;AAAC;AAAA;AAAA;AA2BvC,IAAMC,cAAc,gBAAGtB,KAAK,CAACuB,UAAU,CAAE,gBAuByBC,GAAG,EAAK;EAAA,IAtB9BC,EAAE,QAAFA,EAAE;IACFC,IAAI,QAAJA,IAAI;IACJC,WAAW,QAAXA,WAAW;IACXC,QAAQ,QAARA,QAAQ;IACRC,aAAa,QAAbA,aAAa;IACbC,KAAK,QAALA,KAAK;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;QAAC,KAAK,EAAErC,MAAM,CAACwG;MAAa,EAAG,eAChD;QAAA,UAAOrE;MAAuB,EAAQ;IAAA,EAEzC,EACAC,iBAAiB,iBAChB,MAAC,iBAAiB;MAAC,SAAS,EAAEC,IAAI,IAAI,EAAG;MAAA,wBACvC,KAAC,WAAW;QAAC,KAAK,EAAErC,MAAM,CAACiG;MAAY,EAAG,eAC1C;QAAA,UAAO7D;MAAiB,EAAQ;IAAA,EAEnC;EAAA,EACA;AAEP,CAAC,CAAC;AAAC;EAlQDX,IAAI;EACJC,WAAW;EAEXG,KAAK;EACLF,QAAQ;EACRC,aAAa;EAEbE,QAAQ;EACRE,QAAQ;EACRC,QAAQ;EACRQ,OAAO;EAEPH,gBAAgB;EAEhBP,kBAAkB;EAClBI,uBAAuB;EACvBC,iBAAiB;EAGjBG,cAAc;EACdC,MAAM;EACNN,UAAU;AAAA;AA+OZ,eAAeb,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"types.cjs","names":[],"sources":["../../src/GlobalNavigationBar/types.tsx"],"sourcesContent":["import React from 'react';\nimport { HyperlinkProps } from '../HyperLink/HyperLink';\nimport { IconButtonProps } from '../Button/Iconbutton';\nimport { ProfileButtonProps } from '../ProfileButton/ProfileButton';\nimport { NavLinkProps } from 'react-router-dom';\nimport {ButtonProps} from \"../Button/Button\";\nimport {TooltipProps} from \"../Tooltips/TooltipTypes\";\n\nexport interface MenuHyperLinkProps extends Pick<HyperlinkProps, 'id' | 'href' | 'onClick' | 'target'> {\n label: string;\n icon?: React.ReactElement;\n}\n\nexport interface MenuButton extends Omit<ButtonProps, 'onClick' | 'children' | 'size'> {\n label: string;\n action: () => void;\n\n tooltip?: TooltipProps;\n}\n\nexport interface MenuGroupFooter {\n header: string;\n note?: string;\n link?: MenuHyperLinkProps;\n}\n\nexport interface MenuGroupHeader {\n header: string;\n note?: string;\n link?: MenuHyperLinkProps;\n}\n\nexport interface MenuAccountInfo {\n firstName: string;\n lastName: string;\n email: string;\n link?: MenuHyperLinkProps;\n}\n\nexport interface ProfileMenu {\n label?: string;\n\n user: MenuAccountInfo;\n\n sections: MenuNavigationSection[];\n\n signOut?: MenuButton;\n}\n\nexport interface MenuIconSubMenuButton\n extends Omit<\n IconButtonProps,\n | 'type'\n | 'action'\n | 'shape'\n | 'variant'\n | 'hideOnLowWidth'\n | 'flatEdge'\n | 'isInMobileMenu'\n | 'useTransparentBackground'\n | 'shouldNotInteract'\n | 'iconColor'\n | 'unsetIconSize'\n | 'borderRadius'\n | 'focusBackgroundColor'\n | 'children'\n | 'invertFocus'\n > {\n type: 'submenu';\n icon: React.ReactNode;\n menu: MenuNavigationItemTypeGroup | MenuNavigationCustomSubMenu;\n placement?: 'left' | 'right';\n}\n\nexport interface MenuIconButton\n extends Omit<\n IconButtonProps,\n | 'type'\n | 'action'\n | 'shape'\n | 'variant'\n | 'hideOnLowWidth'\n | 'flatEdge'\n | 'isInMobileMenu'\n | 'useTransparentBackground'\n | 'shouldNotInteract'\n | 'iconColor'\n | 'unsetIconSize'\n | 'borderRadius'\n | 'focusBackgroundColor'\n | 'children'\n | 'invertFocus'\n > {\n type: 'action';\n icon: React.ReactNode;\n action: (button?: EventTarget) => boolean | void;\n placement?: 'left' | 'right';\n}\n\nexport interface MenuProfileButton extends Omit<ProfileButtonProps, 'type' | 'onClick' | 'initials' | 'hideOnLowWidth' | 'icon' | 'portraitSrc'> {\n type: 'profile';\n action?: (button?: EventTarget) => boolean | void;\n placement?: 'left' | 'right';\n}\n\nexport interface MenuSwitcherButton\n extends Omit<\n IconButtonProps,\n | 'id'\n | 'type'\n | 'action'\n | 'shape'\n | 'variant'\n | 'hideOnLowWidth'\n | 'flatEdge'\n | 'isInMobileMenu'\n | 'useTransparentBackground'\n | 'shouldNotInteract'\n | 'iconColor'\n | 'unsetIconSize'\n | 'borderRadius'\n | 'focusBackgroundColor'\n | 'children'\n | 'invertFocus'\n > {\n type: 'switcher';\n placement?: 'left' | 'right';\n action?: (button?: EventTarget) => boolean | void;\n}\n\nexport type DesktopMenuButtonTypes = MenuIconButton | MenuProfileButton | MenuSwitcherButton;\nexport type MobileMenuButtonTypes = MenuIconSubMenuButton | MenuIconButton | MenuProfileButton | MenuSwitcherButton;\n\nexport interface MobileNavigationMenuProps {\n label?: string;\n buttons?: MobileMenuButtonTypes[];\n\n header?: MenuGroupHeader;\n\n items?: (MenuNavigationItemTypeItem | MenuNavigationItemTypeGroup)[];\n\n footer?: MenuGroupFooter;\n action?: MenuButton;\n}\n\nexport interface DesktopNavigationMenuProps {\n buttons?: DesktopMenuButtonTypes[];\n items: MenuNavigationItemTypeItem[];\n action?: MenuButton;\n reverseRightSideOrder?: boolean;\n}\n\n// @ts-ignore\nexport interface MenuNavigationGroup<T = MenuNavigationItem | MenuNavigationSection | MenuNavigationGroup> {\n label: string;\n note?: string;\n\n buttons?: MobileMenuButtonTypes[];\n header?: MenuGroupHeader;\n\n items: T[];\n\n footer?: MenuGroupFooter;\n action?: MenuButton;\n}\n\nexport type MenuNavigationItem = {\n icon?: React.ReactNode;\n to: string;\n exact?: boolean;\n disabled?: boolean;\n external?: boolean;\n action?: (e: React.MouseEvent) => void;\n label: string;\n note?: string;\n pinned?: boolean;\n} & Omit<NavLinkProps, 'onClick' | 'to' | 'exact' | 'onMouseDown'>;\n\nexport interface MenuNavigationSection<T = MenuNavigationItem> {\n divider?: boolean;\n pinned?: boolean;\n label?: string;\n items: T[];\n}\n\nexport type MenuNavigationItemTypeItem = MenuNavigationItem & {\n type?: 'item';\n};\n\nexport type MenuNavigationItemTypeGroup = MenuNavigationGroup<MenuNavigationItemTypeItem | MenuNavigationItemTypeGroup | MenuNavigationItemTypeSection> & {\n type: 'group';\n icon?: React.ReactNode;\n pinned?: boolean;\n disabled?: boolean;\n};\n\nexport type MenuNavigationItemTypeSection = MenuNavigationSection<MenuNavigationItemTypeItem> & {\n type: 'section';\n};\n\nexport type MenuNavigationCustomSubMenu = {\n type: 'custom';\n label?: string;\n buttons?: MobileMenuButtonTypes[];\n custom: () => React.ReactNode;\n};\n"],"mappings":""}
1
+ {"version":3,"file":"types.cjs","names":[],"sources":["../../src/GlobalNavigationBar/types.tsx"],"sourcesContent":["import React from 'react';\nimport { HyperlinkProps } from '../HyperLink/HyperLink';\nimport { IconButtonProps } from '../Button/Iconbutton';\nimport { ProfileButtonProps } from '../ProfileButton/ProfileButton';\nimport { NavLinkProps } from 'react-router-dom';\nimport {ButtonProps} from \"../Button/Button\";\nimport {TooltipProps} from \"../Tooltips/TooltipTypes\";\n\nexport interface MenuHyperLinkProps extends Pick<HyperlinkProps, 'id' | 'href' | 'onClick' | 'target'> {\n label: string;\n icon?: React.ReactElement;\n}\n\nexport interface MenuButton extends Omit<ButtonProps, 'onClick' | 'children' | 'size'> {\n label: string;\n action: () => void;\n\n tooltip?: TooltipProps;\n}\n\nexport interface MenuGroupFooter {\n header: string;\n note?: string;\n link?: MenuHyperLinkProps;\n}\n\nexport interface MenuGroupHeader {\n header: string;\n note?: string;\n link?: MenuHyperLinkProps;\n}\n\nexport interface MenuAccountInfo {\n firstName: string;\n lastName: string;\n email: string;\n link?: MenuHyperLinkProps;\n}\n\nexport interface ProfileMenu {\n label?: string;\n\n user: MenuAccountInfo;\n\n sections: MenuNavigationSection[];\n\n signOut?: MenuButton;\n}\n\nexport interface MenuIconSubMenuButton\n extends Omit<\n IconButtonProps,\n | 'type'\n | 'action'\n | 'shape'\n | 'variant'\n | 'hideOnLowWidth'\n | 'flatEdge'\n | 'isInMobileMenu'\n | 'useTransparentBackground'\n | 'shouldNotInteract'\n | 'iconColor'\n | 'unsetIconSize'\n | 'borderRadius'\n | 'focusBackgroundColor'\n | 'children'\n | 'invertFocus'\n > {\n type: 'submenu';\n icon: React.ReactNode;\n menu: MenuNavigationItemTypeGroup | MenuNavigationCustomSubMenu;\n placement?: 'left' | 'right';\n}\n\nexport interface MenuIconButton\n extends Omit<\n IconButtonProps,\n | 'type'\n | 'action'\n | 'shape'\n | 'variant'\n | 'hideOnLowWidth'\n | 'flatEdge'\n | 'isInMobileMenu'\n | 'useTransparentBackground'\n | 'shouldNotInteract'\n | 'iconColor'\n | 'unsetIconSize'\n | 'borderRadius'\n | 'focusBackgroundColor'\n | 'children'\n | 'invertFocus'\n > {\n type: 'action';\n icon: React.ReactNode;\n action: (button?: EventTarget) => boolean | void;\n placement?: 'left' | 'right';\n}\n\nexport interface MenuProfileButton extends Omit<ProfileButtonProps, 'type' | 'onClick' | 'initials' | 'hideOnLowWidth' | 'icon' | 'portraitSrc'> {\n type: 'profile';\n action?: (button?: EventTarget) => boolean | void;\n placement?: 'left' | 'right';\n}\n\nexport interface MenuSwitcherButton\n extends Omit<\n IconButtonProps,\n | 'id'\n | 'type'\n | 'action'\n | 'shape'\n | 'variant'\n | 'hideOnLowWidth'\n | 'flatEdge'\n | 'isInMobileMenu'\n | 'useTransparentBackground'\n | 'shouldNotInteract'\n | 'iconColor'\n | 'unsetIconSize'\n | 'borderRadius'\n | 'focusBackgroundColor'\n | 'children'\n | 'invertFocus'\n > {\n type: 'switcher';\n placement?: 'left' | 'right';\n action?: (button?: EventTarget) => boolean | void;\n}\n\nexport type DesktopMenuButtonTypes = MenuIconButton | MenuProfileButton | MenuSwitcherButton;\nexport type MobileMenuButtonTypes = MenuIconSubMenuButton | MenuIconButton | MenuProfileButton | MenuSwitcherButton;\n\nexport interface MobileNavigationMenuProps {\n label?: string;\n buttons?: MobileMenuButtonTypes[];\n\n header?: MenuGroupHeader;\n\n items?: (MenuNavigationItemTypeItem | MenuNavigationItemTypeGroup)[];\n\n footer?: MenuGroupFooter;\n action?: MenuButton;\n}\n\nexport interface DesktopNavigationMenuProps {\n buttons?: DesktopMenuButtonTypes[];\n items: MenuNavigationItemTypeItem[];\n action?: MenuButton;\n reverseRightSideOrder?: boolean;\n}\n\n// @ts-ignore\nexport interface MenuNavigationGroup<T = MenuNavigationItem | MenuNavigationSection | MenuNavigationGroup> {\n label: string;\n note?: string;\n\n buttons?: MobileMenuButtonTypes[];\n header?: MenuGroupHeader;\n\n items: T[];\n\n footer?: MenuGroupFooter;\n action?: MenuButton;\n}\n\nexport type MenuNavigationItem = {\n icon?: React.ReactNode;\n to: string;\n exact?: boolean;\n disabled?: boolean;\n external?: boolean;\n action?: (e: React.MouseEvent) => void;\n label: string;\n note?: string;\n pinned?: boolean;\n subItems?: MenuNavigationItem[];\n} & Omit<NavLinkProps, 'onClick' | 'to' | 'exact' | 'onMouseDown'>;\n\nexport interface MenuNavigationSection<T = MenuNavigationItem> {\n divider?: boolean;\n pinned?: boolean;\n label?: string;\n items: T[];\n}\n\nexport type MenuNavigationItemTypeItem = MenuNavigationItem & {\n type?: 'item';\n};\n\nexport type MenuNavigationItemTypeGroup = MenuNavigationGroup<MenuNavigationItemTypeItem | MenuNavigationItemTypeGroup | MenuNavigationItemTypeSection> & {\n type: 'group';\n icon?: React.ReactNode;\n pinned?: boolean;\n disabled?: boolean;\n};\n\nexport type MenuNavigationItemTypeSection = MenuNavigationSection<MenuNavigationItemTypeItem> & {\n type: 'section';\n};\n\nexport type MenuNavigationCustomSubMenu = {\n type: 'custom';\n label?: string;\n buttons?: MobileMenuButtonTypes[];\n custom: () => React.ReactNode;\n};\n"],"mappings":""}
@@ -93,6 +93,7 @@ export type MenuNavigationItem = {
93
93
  label: string;
94
94
  note?: string;
95
95
  pinned?: boolean;
96
+ subItems?: MenuNavigationItem[];
96
97
  } & Omit<NavLinkProps, 'onClick' | 'to' | 'exact' | 'onMouseDown'>;
97
98
  export interface MenuNavigationSection<T = MenuNavigationItem> {
98
99
  divider?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":[],"sources":["../../src/GlobalNavigationBar/types.tsx"],"sourcesContent":["import React from 'react';\nimport { HyperlinkProps } from '../HyperLink/HyperLink';\nimport { IconButtonProps } from '../Button/Iconbutton';\nimport { ProfileButtonProps } from '../ProfileButton/ProfileButton';\nimport { NavLinkProps } from 'react-router-dom';\nimport {ButtonProps} from \"../Button/Button\";\nimport {TooltipProps} from \"../Tooltips/TooltipTypes\";\n\nexport interface MenuHyperLinkProps extends Pick<HyperlinkProps, 'id' | 'href' | 'onClick' | 'target'> {\n label: string;\n icon?: React.ReactElement;\n}\n\nexport interface MenuButton extends Omit<ButtonProps, 'onClick' | 'children' | 'size'> {\n label: string;\n action: () => void;\n\n tooltip?: TooltipProps;\n}\n\nexport interface MenuGroupFooter {\n header: string;\n note?: string;\n link?: MenuHyperLinkProps;\n}\n\nexport interface MenuGroupHeader {\n header: string;\n note?: string;\n link?: MenuHyperLinkProps;\n}\n\nexport interface MenuAccountInfo {\n firstName: string;\n lastName: string;\n email: string;\n link?: MenuHyperLinkProps;\n}\n\nexport interface ProfileMenu {\n label?: string;\n\n user: MenuAccountInfo;\n\n sections: MenuNavigationSection[];\n\n signOut?: MenuButton;\n}\n\nexport interface MenuIconSubMenuButton\n extends Omit<\n IconButtonProps,\n | 'type'\n | 'action'\n | 'shape'\n | 'variant'\n | 'hideOnLowWidth'\n | 'flatEdge'\n | 'isInMobileMenu'\n | 'useTransparentBackground'\n | 'shouldNotInteract'\n | 'iconColor'\n | 'unsetIconSize'\n | 'borderRadius'\n | 'focusBackgroundColor'\n | 'children'\n | 'invertFocus'\n > {\n type: 'submenu';\n icon: React.ReactNode;\n menu: MenuNavigationItemTypeGroup | MenuNavigationCustomSubMenu;\n placement?: 'left' | 'right';\n}\n\nexport interface MenuIconButton\n extends Omit<\n IconButtonProps,\n | 'type'\n | 'action'\n | 'shape'\n | 'variant'\n | 'hideOnLowWidth'\n | 'flatEdge'\n | 'isInMobileMenu'\n | 'useTransparentBackground'\n | 'shouldNotInteract'\n | 'iconColor'\n | 'unsetIconSize'\n | 'borderRadius'\n | 'focusBackgroundColor'\n | 'children'\n | 'invertFocus'\n > {\n type: 'action';\n icon: React.ReactNode;\n action: (button?: EventTarget) => boolean | void;\n placement?: 'left' | 'right';\n}\n\nexport interface MenuProfileButton extends Omit<ProfileButtonProps, 'type' | 'onClick' | 'initials' | 'hideOnLowWidth' | 'icon' | 'portraitSrc'> {\n type: 'profile';\n action?: (button?: EventTarget) => boolean | void;\n placement?: 'left' | 'right';\n}\n\nexport interface MenuSwitcherButton\n extends Omit<\n IconButtonProps,\n | 'id'\n | 'type'\n | 'action'\n | 'shape'\n | 'variant'\n | 'hideOnLowWidth'\n | 'flatEdge'\n | 'isInMobileMenu'\n | 'useTransparentBackground'\n | 'shouldNotInteract'\n | 'iconColor'\n | 'unsetIconSize'\n | 'borderRadius'\n | 'focusBackgroundColor'\n | 'children'\n | 'invertFocus'\n > {\n type: 'switcher';\n placement?: 'left' | 'right';\n action?: (button?: EventTarget) => boolean | void;\n}\n\nexport type DesktopMenuButtonTypes = MenuIconButton | MenuProfileButton | MenuSwitcherButton;\nexport type MobileMenuButtonTypes = MenuIconSubMenuButton | MenuIconButton | MenuProfileButton | MenuSwitcherButton;\n\nexport interface MobileNavigationMenuProps {\n label?: string;\n buttons?: MobileMenuButtonTypes[];\n\n header?: MenuGroupHeader;\n\n items?: (MenuNavigationItemTypeItem | MenuNavigationItemTypeGroup)[];\n\n footer?: MenuGroupFooter;\n action?: MenuButton;\n}\n\nexport interface DesktopNavigationMenuProps {\n buttons?: DesktopMenuButtonTypes[];\n items: MenuNavigationItemTypeItem[];\n action?: MenuButton;\n reverseRightSideOrder?: boolean;\n}\n\n// @ts-ignore\nexport interface MenuNavigationGroup<T = MenuNavigationItem | MenuNavigationSection | MenuNavigationGroup> {\n label: string;\n note?: string;\n\n buttons?: MobileMenuButtonTypes[];\n header?: MenuGroupHeader;\n\n items: T[];\n\n footer?: MenuGroupFooter;\n action?: MenuButton;\n}\n\nexport type MenuNavigationItem = {\n icon?: React.ReactNode;\n to: string;\n exact?: boolean;\n disabled?: boolean;\n external?: boolean;\n action?: (e: React.MouseEvent) => void;\n label: string;\n note?: string;\n pinned?: boolean;\n} & Omit<NavLinkProps, 'onClick' | 'to' | 'exact' | 'onMouseDown'>;\n\nexport interface MenuNavigationSection<T = MenuNavigationItem> {\n divider?: boolean;\n pinned?: boolean;\n label?: string;\n items: T[];\n}\n\nexport type MenuNavigationItemTypeItem = MenuNavigationItem & {\n type?: 'item';\n};\n\nexport type MenuNavigationItemTypeGroup = MenuNavigationGroup<MenuNavigationItemTypeItem | MenuNavigationItemTypeGroup | MenuNavigationItemTypeSection> & {\n type: 'group';\n icon?: React.ReactNode;\n pinned?: boolean;\n disabled?: boolean;\n};\n\nexport type MenuNavigationItemTypeSection = MenuNavigationSection<MenuNavigationItemTypeItem> & {\n type: 'section';\n};\n\nexport type MenuNavigationCustomSubMenu = {\n type: 'custom';\n label?: string;\n buttons?: MobileMenuButtonTypes[];\n custom: () => React.ReactNode;\n};\n"],"mappings":""}
1
+ {"version":3,"file":"types.js","names":[],"sources":["../../src/GlobalNavigationBar/types.tsx"],"sourcesContent":["import React from 'react';\nimport { HyperlinkProps } from '../HyperLink/HyperLink';\nimport { IconButtonProps } from '../Button/Iconbutton';\nimport { ProfileButtonProps } from '../ProfileButton/ProfileButton';\nimport { NavLinkProps } from 'react-router-dom';\nimport {ButtonProps} from \"../Button/Button\";\nimport {TooltipProps} from \"../Tooltips/TooltipTypes\";\n\nexport interface MenuHyperLinkProps extends Pick<HyperlinkProps, 'id' | 'href' | 'onClick' | 'target'> {\n label: string;\n icon?: React.ReactElement;\n}\n\nexport interface MenuButton extends Omit<ButtonProps, 'onClick' | 'children' | 'size'> {\n label: string;\n action: () => void;\n\n tooltip?: TooltipProps;\n}\n\nexport interface MenuGroupFooter {\n header: string;\n note?: string;\n link?: MenuHyperLinkProps;\n}\n\nexport interface MenuGroupHeader {\n header: string;\n note?: string;\n link?: MenuHyperLinkProps;\n}\n\nexport interface MenuAccountInfo {\n firstName: string;\n lastName: string;\n email: string;\n link?: MenuHyperLinkProps;\n}\n\nexport interface ProfileMenu {\n label?: string;\n\n user: MenuAccountInfo;\n\n sections: MenuNavigationSection[];\n\n signOut?: MenuButton;\n}\n\nexport interface MenuIconSubMenuButton\n extends Omit<\n IconButtonProps,\n | 'type'\n | 'action'\n | 'shape'\n | 'variant'\n | 'hideOnLowWidth'\n | 'flatEdge'\n | 'isInMobileMenu'\n | 'useTransparentBackground'\n | 'shouldNotInteract'\n | 'iconColor'\n | 'unsetIconSize'\n | 'borderRadius'\n | 'focusBackgroundColor'\n | 'children'\n | 'invertFocus'\n > {\n type: 'submenu';\n icon: React.ReactNode;\n menu: MenuNavigationItemTypeGroup | MenuNavigationCustomSubMenu;\n placement?: 'left' | 'right';\n}\n\nexport interface MenuIconButton\n extends Omit<\n IconButtonProps,\n | 'type'\n | 'action'\n | 'shape'\n | 'variant'\n | 'hideOnLowWidth'\n | 'flatEdge'\n | 'isInMobileMenu'\n | 'useTransparentBackground'\n | 'shouldNotInteract'\n | 'iconColor'\n | 'unsetIconSize'\n | 'borderRadius'\n | 'focusBackgroundColor'\n | 'children'\n | 'invertFocus'\n > {\n type: 'action';\n icon: React.ReactNode;\n action: (button?: EventTarget) => boolean | void;\n placement?: 'left' | 'right';\n}\n\nexport interface MenuProfileButton extends Omit<ProfileButtonProps, 'type' | 'onClick' | 'initials' | 'hideOnLowWidth' | 'icon' | 'portraitSrc'> {\n type: 'profile';\n action?: (button?: EventTarget) => boolean | void;\n placement?: 'left' | 'right';\n}\n\nexport interface MenuSwitcherButton\n extends Omit<\n IconButtonProps,\n | 'id'\n | 'type'\n | 'action'\n | 'shape'\n | 'variant'\n | 'hideOnLowWidth'\n | 'flatEdge'\n | 'isInMobileMenu'\n | 'useTransparentBackground'\n | 'shouldNotInteract'\n | 'iconColor'\n | 'unsetIconSize'\n | 'borderRadius'\n | 'focusBackgroundColor'\n | 'children'\n | 'invertFocus'\n > {\n type: 'switcher';\n placement?: 'left' | 'right';\n action?: (button?: EventTarget) => boolean | void;\n}\n\nexport type DesktopMenuButtonTypes = MenuIconButton | MenuProfileButton | MenuSwitcherButton;\nexport type MobileMenuButtonTypes = MenuIconSubMenuButton | MenuIconButton | MenuProfileButton | MenuSwitcherButton;\n\nexport interface MobileNavigationMenuProps {\n label?: string;\n buttons?: MobileMenuButtonTypes[];\n\n header?: MenuGroupHeader;\n\n items?: (MenuNavigationItemTypeItem | MenuNavigationItemTypeGroup)[];\n\n footer?: MenuGroupFooter;\n action?: MenuButton;\n}\n\nexport interface DesktopNavigationMenuProps {\n buttons?: DesktopMenuButtonTypes[];\n items: MenuNavigationItemTypeItem[];\n action?: MenuButton;\n reverseRightSideOrder?: boolean;\n}\n\n// @ts-ignore\nexport interface MenuNavigationGroup<T = MenuNavigationItem | MenuNavigationSection | MenuNavigationGroup> {\n label: string;\n note?: string;\n\n buttons?: MobileMenuButtonTypes[];\n header?: MenuGroupHeader;\n\n items: T[];\n\n footer?: MenuGroupFooter;\n action?: MenuButton;\n}\n\nexport type MenuNavigationItem = {\n icon?: React.ReactNode;\n to: string;\n exact?: boolean;\n disabled?: boolean;\n external?: boolean;\n action?: (e: React.MouseEvent) => void;\n label: string;\n note?: string;\n pinned?: boolean;\n subItems?: MenuNavigationItem[];\n} & Omit<NavLinkProps, 'onClick' | 'to' | 'exact' | 'onMouseDown'>;\n\nexport interface MenuNavigationSection<T = MenuNavigationItem> {\n divider?: boolean;\n pinned?: boolean;\n label?: string;\n items: T[];\n}\n\nexport type MenuNavigationItemTypeItem = MenuNavigationItem & {\n type?: 'item';\n};\n\nexport type MenuNavigationItemTypeGroup = MenuNavigationGroup<MenuNavigationItemTypeItem | MenuNavigationItemTypeGroup | MenuNavigationItemTypeSection> & {\n type: 'group';\n icon?: React.ReactNode;\n pinned?: boolean;\n disabled?: boolean;\n};\n\nexport type MenuNavigationItemTypeSection = MenuNavigationSection<MenuNavigationItemTypeItem> & {\n type: 'section';\n};\n\nexport type MenuNavigationCustomSubMenu = {\n type: 'custom';\n label?: string;\n buttons?: MobileMenuButtonTypes[];\n custom: () => React.ReactNode;\n};\n"],"mappings":""}