@innovaccer/design-system 2.7.0 → 2.9.0-0
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.
- package/.github/workflows/chromatic.yml +3 -1
- package/.github/workflows/docs_pull_request.yml +20 -0
- package/.github/workflows/main.yml +1 -1
- package/.github/workflows/manual.yml +1 -1
- package/.github/workflows/pull_request.yml +1 -1
- package/.github/workflows/test.yml +1 -1
- package/CHANGELOG.md +68 -0
- package/README.md +6 -0
- package/core/components/atoms/_chip/__tests__/__snapshots__/_chip.test.tsx.snap +8 -8
- package/core/components/atoms/_chip/index.tsx +1 -1
- package/core/components/atoms/avatar/__tests__/__snapshots__/Avatar.test.tsx.snap +20 -0
- package/core/components/atoms/avatarGroup/AvatarCount.tsx +29 -0
- package/core/components/atoms/avatarGroup/AvatarGroup.tsx +16 -62
- package/core/components/atoms/avatarGroup/AvatarPopperBody.tsx +37 -0
- package/core/components/atoms/avatarGroup/Avatars.tsx +23 -0
- package/core/components/atoms/avatarGroup/__stories__/index.story.tsx +41 -0
- package/core/components/atoms/avatarGroup/__tests__/AvatarGroup.test.tsx +1 -1
- package/core/components/atoms/avatarGroup/__tests__/__snapshots__/AvatarGroup.test.tsx.snap +8 -4
- package/core/components/atoms/button/Button.tsx +1 -2
- package/core/components/atoms/checkbox/__stories__/Group.story.tsx +1 -1
- package/core/components/atoms/checkbox/__stories__/Nested.story.tsx +2 -0
- package/core/components/atoms/chip/__tests__/__snapshots__/Chip.test.tsx.snap +11 -11
- package/core/components/atoms/chipGroup/__tests__/__snapshots__/chipGroup.test.tsx.snap +4 -4
- package/core/components/atoms/dropdown/DropdownButton.tsx +1 -1
- package/core/components/atoms/dropdown/DropdownList.tsx +56 -29
- package/core/components/atoms/dropdown/__tests__/__snapshots__/Dropdown.test.tsx.snap +29 -2
- package/core/components/atoms/popperWrapper/PopperWrapper.tsx +104 -12
- package/core/components/atoms/toast/__stories__/WithDescription.story.tsx +3 -1
- package/core/components/css-utilities/designTokens/Data.tsx +18 -0
- package/core/components/css-utilities/designTokens/Transitions.story.tsx +37 -0
- package/core/components/molecules/chipInput/__tests__/__snapshots__/ChipInput.test.tsx.snap +4 -4
- package/core/components/molecules/dialog/__tests__/__snapshots__/Dialog.test.tsx.snap +260 -195
- package/core/components/molecules/editableChipInput/__tests__/__snapshots__/EditableChipInput.test.tsx.snap +4 -4
- package/core/components/molecules/editableDropdown/__tests__/__snapshots__/EditableDropdown.test.tsx.snap +1 -0
- package/core/components/molecules/fullscreenModal/FullscreenModal.tsx +13 -12
- package/core/components/molecules/fullscreenModal/__tests__/Fullscreen.test.tsx +2 -5
- package/core/components/molecules/fullscreenModal/__tests__/__snapshots__/Fullscreen.test.tsx.snap +126 -96
- package/core/components/molecules/modal/Modal.tsx +11 -9
- package/core/components/molecules/modal/__tests__/__snapshots__/Modal.test.tsx.snap +240 -180
- package/core/components/molecules/popover/Popover.tsx +9 -0
- package/core/components/molecules/popover/__tests__/__snapshots__/Popover.test.tsx.snap +16 -8
- package/core/components/molecules/sidesheet/Sidesheet.tsx +23 -22
- package/core/components/molecules/sidesheet/__tests__/__snapshots__/Sidesheet.test.tsx.snap +40 -30
- package/core/components/molecules/tooltip/Tooltip.tsx +20 -1
- package/core/components/molecules/tooltip/__tests__/__snapshots__/Tooltip.test.tsx.snap +8 -0
- package/core/components/organisms/calendar/__tests__/__snapshots__/Calendar.test.tsx.snap +8 -8
- package/core/components/organisms/datePicker/__tests__/__snapshots__/DatePicker.test.tsx.snap +14 -13
- package/core/components/organisms/dateRangePicker/__tests__/__snapshots__/DateRangePicker.test.tsx.snap +42 -30
- package/core/components/organisms/grid/GridBody.tsx +1 -2
- package/core/components/organisms/table/Table.tsx +0 -1
- package/core/components/organisms/table/__stories__/NestedTableWithNestedCard.story.tsx +2 -2
- package/core/components/organisms/table/__tests__/__snapshots__/Table.test.tsx.snap +1544 -0
- package/core/components/organisms/verticalNav/MenuItem.tsx +6 -2
- package/core/components/organisms/verticalNav/VerticalNav.tsx +8 -2
- package/core/components/organisms/verticalNav/__stories__/CustomItemsRenderer.story.tsx +238 -0
- package/core/utils/__tests__/__snapshots__/TS.test.tsx.snap +168 -3
- package/css/dist/index.css +300 -62
- package/css/dist/index.css.map +1 -1
- package/css/src/components/ProgressBar.css +1 -1
- package/css/src/components/avatarGroup.css +0 -9
- package/css/src/components/button.css +4 -4
- package/css/src/components/chip.css +4 -0
- package/css/src/components/dropdown.css +5 -9
- package/css/src/components/dropdownButton.css +2 -0
- package/css/src/components/fullscreenModal.css +0 -5
- package/css/src/components/grid.css +0 -11
- package/css/src/components/overlay.css +0 -11
- package/css/src/components/popover.css +12 -0
- package/css/src/components/slider.css +1 -0
- package/css/src/components/tabs.css +1 -1
- package/css/src/components/textarea.css +0 -11
- package/css/src/components/tooltip.css +115 -0
- package/css/src/components/verticalNav.css +2 -0
- package/css/src/core/animation.css +8 -0
- package/css/src/core/utilities.css +11 -0
- package/css/src/utils/utility.css +4 -0
- package/css/src/variables/index.css +19 -0
- package/dist/core/components/atoms/avatarGroup/AvatarCount.d.ts +2 -0
- package/dist/core/components/atoms/avatarGroup/AvatarGroup.d.ts +2 -2
- package/dist/core/components/atoms/avatarGroup/AvatarPopperBody.d.ts +2 -0
- package/dist/core/components/atoms/avatarGroup/Avatars.d.ts +2 -0
- package/dist/core/components/atoms/popperWrapper/PopperWrapper.d.ts +61 -54
- package/dist/core/components/css-utilities/designTokens/Data.d.ts +8 -0
- package/dist/core/components/css-utilities/designTokens/Transitions.story.d.ts +12 -0
- package/dist/core/components/molecules/popover/Popover.d.ts +4 -0
- package/dist/core/components/molecules/sidesheet/Sidesheet.d.ts +1 -0
- package/dist/core/components/organisms/verticalNav/MenuItem.d.ts +1 -0
- package/dist/core/components/organisms/verticalNav/VerticalNav.d.ts +2 -0
- package/dist/index.esm.js +278 -142
- package/dist/index.js +282 -149
- package/dist/index.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.br +0 -0
- package/dist/index.umd.js.gz +0 -0
- package/docs/.eslintrc.json +1 -0
- package/docs/.unotes/templates/title_date.hbs +4 -0
- package/docs/.unotes/unotes_meta.json +302 -0
- package/docs/LICENSE +21 -0
- package/docs/README.md +31 -0
- package/docs/gatsby-browser.js +6 -0
- package/docs/gatsby-config.js +171 -0
- package/docs/gatsby-node.js +75 -0
- package/docs/index.js +1 -0
- package/docs/package.json +54 -0
- package/docs/src/components/Colors/Colors.css +19 -0
- package/docs/src/components/Colors/Colors.js +82 -0
- package/docs/src/components/Container/ComponentsContainer.js +75 -0
- package/docs/src/components/Container/Container.js +114 -0
- package/docs/src/components/Container/index.js +3 -0
- package/docs/src/components/Footer/Footer.css +7 -0
- package/docs/src/components/Footer/Footer.js +40 -0
- package/docs/src/components/Header/Header.css +32 -0
- package/docs/src/components/Header/Header.js +60 -0
- package/docs/src/components/Header/index.js +3 -0
- package/docs/src/components/LastModifiedDate/LastModifiedDate.js +24 -0
- package/docs/src/components/LastModifiedDate/index.js +3 -0
- package/docs/src/components/Layout.js +291 -0
- package/docs/src/components/LeftNav/LeftNav.js +101 -0
- package/docs/src/components/LeftNav/index.js +3 -0
- package/docs/src/components/Logos/Logos.css +29 -0
- package/docs/src/components/Logos/Logos.js +64 -0
- package/docs/src/components/Meta.js +101 -0
- package/docs/src/components/PropsTable/ArgJsDoc.tsx +102 -0
- package/docs/src/components/PropsTable/ArgRow.tsx +142 -0
- package/docs/src/components/PropsTable/ArgValue.tsx +182 -0
- package/docs/src/components/PropsTable/EmptyBlock.tsx +22 -0
- package/docs/src/components/PropsTable/SectionRow.tsx +126 -0
- package/docs/src/components/PropsTable/Shared.tsx +53 -0
- package/docs/src/components/PropsTable/Table.tsx +463 -0
- package/docs/src/components/PropsTable/card.css +7 -0
- package/docs/src/components/PropsTable/generateImports.tsx +20 -0
- package/docs/src/components/PropsTable/index.js +248 -0
- package/docs/src/components/PropsTable/prism.css +146 -0
- package/docs/src/components/PropsTable/sandbox.tsx +81 -0
- package/docs/src/components/PropsTable/theme.js +53 -0
- package/docs/src/components/PropsTable/types.tsx +44 -0
- package/docs/src/components/Rules/DONTs.js +13 -0
- package/docs/src/components/Rules/DOs.js +13 -0
- package/docs/src/components/Rules/IconWrapper.js +18 -0
- package/docs/src/components/Rules/InlineMessage.js +11 -0
- package/docs/src/components/Rules/Rules.css +17 -0
- package/docs/src/components/Rules/Rules.js +39 -0
- package/docs/src/components/TableOfContent/TableOfContent.css +37 -0
- package/docs/src/components/TableOfContent/TableOfContent.js +126 -0
- package/docs/src/components/css/global.css +15 -0
- package/docs/src/components/css/prism.css +38 -0
- package/docs/src/components/css/style.css +97 -0
- package/docs/src/components/templates/Default.js +24 -0
- package/docs/src/components/templates/Homepage.js +13 -0
- package/docs/src/data/components/images/Avatars.png +0 -0
- package/docs/src/data/components/images/Datepicker.png +0 -0
- package/docs/src/data/components/images/EditableChipInput.png +0 -0
- package/docs/src/data/components/images/Modal.png +0 -0
- package/docs/src/data/components/images/Sidesheet.png +0 -0
- package/docs/src/data/components/images/Table.png +0 -0
- package/docs/src/data/components/index.js +285 -0
- package/docs/src/data/footer-items.yaml +16 -0
- package/docs/src/data/header-items.yaml +20 -0
- package/docs/src/data/home-menu.yaml +23 -0
- package/docs/src/data/home-resources.yaml +14 -0
- package/docs/src/data/nav/components.yaml +45 -0
- package/docs/src/data/nav/content.yaml +25 -0
- package/docs/src/data/nav/default.yaml +11 -0
- package/docs/src/data/nav/foundations.yaml +22 -0
- package/docs/src/data/nav/guide-items.yaml +6 -0
- package/docs/src/data/nav/introduction.yaml +11 -0
- package/docs/src/data/storybook.json +345189 -0
- package/docs/src/pages/404.js +31 -0
- package/docs/src/pages/components/avatar/code.mdx +14 -0
- package/docs/src/pages/components/avatar/images/avatar-1.png +0 -0
- package/docs/src/pages/components/avatar/images/avatar-2.png +0 -0
- package/docs/src/pages/components/avatar/images/avatar-3.png +0 -0
- package/docs/src/pages/components/avatar/images/avatar-4.png +0 -0
- package/docs/src/pages/components/avatar/images/avatar-5.png +0 -0
- package/docs/src/pages/components/avatar/usage.mdx +53 -0
- package/docs/src/pages/components/badges/code.mdx +15 -0
- package/docs/src/pages/components/badges/images/badges-1.png +0 -0
- package/docs/src/pages/components/badges/images/badges-2.png +0 -0
- package/docs/src/pages/components/badges/usage.mdx +43 -0
- package/docs/src/pages/components/breadcrumbs/code.mdx +15 -0
- package/docs/src/pages/components/breadcrumbs/usage.mdx +30 -0
- package/docs/src/pages/components/button/code.mdx +18 -0
- package/docs/src/pages/components/button/content.mdx +652 -0
- package/docs/src/pages/components/button/images/buttons-1.png +0 -0
- package/docs/src/pages/components/button/images/buttons-2.png +0 -0
- package/docs/src/pages/components/button/usage.mdx +100 -0
- package/docs/src/pages/components/calendar/code.mdx +15 -0
- package/docs/src/pages/components/calendar/usage.mdx +9 -0
- package/docs/src/pages/components/card/code.mdx +15 -0
- package/docs/src/pages/components/card/usage.mdx +54 -0
- package/docs/src/pages/components/checkbox/code.mdx +16 -0
- package/docs/src/pages/components/checkbox/usage.mdx +49 -0
- package/docs/src/pages/components/chips/code.mdx +15 -0
- package/docs/src/pages/components/chips/usage.mdx +34 -0
- package/docs/src/pages/components/datePicker/code.mdx +7 -0
- package/docs/src/pages/components/datePicker/images/datePicker-1.png +0 -0
- package/docs/src/pages/components/datePicker/images/datePicker-2.png +0 -0
- package/docs/src/pages/components/datePicker/images/datePicker-3.png +0 -0
- package/docs/src/pages/components/datePicker/images/datePicker-4.png +0 -0
- package/docs/src/pages/components/datePicker/images/datePicker-5.png +0 -0
- package/docs/src/pages/components/datePicker/usage.mdx +58 -0
- package/docs/src/pages/components/index.mdx +7 -0
- package/docs/src/pages/components/message/code.mdx +16 -0
- package/docs/src/pages/components/message/usage.mdx +26 -0
- package/docs/src/pages/components/overview/index.mdx +6 -0
- package/docs/src/pages/components/overview/tabs/Overview.js +72 -0
- package/docs/src/pages/components/overview/tabs/all-components.mdx +10 -0
- package/docs/src/pages/components/overview/tabs/overview.css +30 -0
- package/docs/src/pages/components/overview/tabs/status.mdx +22 -0
- package/docs/src/pages/components/radio/code.mdx +17 -0
- package/docs/src/pages/components/radio/usage.mdx +126 -0
- package/docs/src/pages/components/sidesheet/code.mdx +8 -0
- package/docs/src/pages/components/sidesheet/interactions.mdx +8 -0
- package/docs/src/pages/components/sidesheet/usage.mdx +25 -0
- package/docs/src/pages/components/slider/code.mdx +15 -0
- package/docs/src/pages/components/slider/usage.mdx +49 -0
- package/docs/src/pages/components/statushint/code.mdx +15 -0
- package/docs/src/pages/components/statushint/usage.mdx +19 -0
- package/docs/src/pages/components/steppers/code.mdx +16 -0
- package/docs/src/pages/components/steppers/images/stepper-1.gif +0 -0
- package/docs/src/pages/components/steppers/images/stepper-2.png +0 -0
- package/docs/src/pages/components/steppers/images/stepper-3.png +0 -0
- package/docs/src/pages/components/steppers/images/stepper-4.png +0 -0
- package/docs/src/pages/components/steppers/images/stepper-5.png +0 -0
- package/docs/src/pages/components/steppers/images/stepper-6.png +0 -0
- package/docs/src/pages/components/steppers/interactions.mdx +28 -0
- package/docs/src/pages/components/steppers/usage.mdx +201 -0
- package/docs/src/pages/components/switch/code.mdx +16 -0
- package/docs/src/pages/components/switch/images/switch-1.gif +0 -0
- package/docs/src/pages/components/switch/images/switch-2.gif +0 -0
- package/docs/src/pages/components/switch/images/switch-3.png +0 -0
- package/docs/src/pages/components/switch/interactions.mdx +392 -0
- package/docs/src/pages/components/switch/usage.mdx +114 -0
- package/docs/src/pages/components/table/code.mdx +14 -0
- package/docs/src/pages/components/table/images/table-1.png +0 -0
- package/docs/src/pages/components/table/images/table-10.png +0 -0
- package/docs/src/pages/components/table/images/table-11.gif +0 -0
- package/docs/src/pages/components/table/images/table-12.png +0 -0
- package/docs/src/pages/components/table/images/table-13.png +0 -0
- package/docs/src/pages/components/table/images/table-14.png +0 -0
- package/docs/src/pages/components/table/images/table-15.png +0 -0
- package/docs/src/pages/components/table/images/table-16.png +0 -0
- package/docs/src/pages/components/table/images/table-17.png +0 -0
- package/docs/src/pages/components/table/images/table-18.png +0 -0
- package/docs/src/pages/components/table/images/table-19.png +0 -0
- package/docs/src/pages/components/table/images/table-2.png +0 -0
- package/docs/src/pages/components/table/images/table-20.png +0 -0
- package/docs/src/pages/components/table/images/table-21.png +0 -0
- package/docs/src/pages/components/table/images/table-22.png +0 -0
- package/docs/src/pages/components/table/images/table-23.png +0 -0
- package/docs/src/pages/components/table/images/table-24.png +0 -0
- package/docs/src/pages/components/table/images/table-25.png +0 -0
- package/docs/src/pages/components/table/images/table-26.png +0 -0
- package/docs/src/pages/components/table/images/table-27.png +0 -0
- package/docs/src/pages/components/table/images/table-28.png +0 -0
- package/docs/src/pages/components/table/images/table-29.png +0 -0
- package/docs/src/pages/components/table/images/table-3.png +0 -0
- package/docs/src/pages/components/table/images/table-30.png +0 -0
- package/docs/src/pages/components/table/images/table-4.png +0 -0
- package/docs/src/pages/components/table/images/table-5.png +0 -0
- package/docs/src/pages/components/table/images/table-6.png +0 -0
- package/docs/src/pages/components/table/images/table-7.png +0 -0
- package/docs/src/pages/components/table/images/table-8.png +0 -0
- package/docs/src/pages/components/table/images/table-9.png +0 -0
- package/docs/src/pages/components/table/interactions.mdx +97 -0
- package/docs/src/pages/components/table/usage.mdx +364 -0
- package/docs/src/pages/components/tabs/code.mdx +15 -0
- package/docs/src/pages/components/tabs/images/tabs-1.png +0 -0
- package/docs/src/pages/components/tabs/images/tabs-2.png +0 -0
- package/docs/src/pages/components/tabs/images/tabs-3.png +0 -0
- package/docs/src/pages/components/tabs/images/tabs-4.png +0 -0
- package/docs/src/pages/components/tabs/images/tabs-5.png +0 -0
- package/docs/src/pages/components/tabs/images/tabs-6.png +0 -0
- package/docs/src/pages/components/tabs/images/tabs-7.png +0 -0
- package/docs/src/pages/components/tabs/interactions.mdx +487 -0
- package/docs/src/pages/components/tabs/usage.mdx +164 -0
- package/docs/src/pages/components/toast/code.mdx +15 -0
- package/docs/src/pages/components/toast/images/toast-1.png +0 -0
- package/docs/src/pages/components/toast/images/toast-2.gif +0 -0
- package/docs/src/pages/components/toast/images/toast-3.gif +0 -0
- package/docs/src/pages/components/toast/images/toast-4.png +0 -0
- package/docs/src/pages/components/toast/images/toast-5.gif +0 -0
- package/docs/src/pages/components/toast/images/toast-6.gif +0 -0
- package/docs/src/pages/components/toast/interactions.mdx +218 -0
- package/docs/src/pages/components/toast/usage.mdx +156 -0
- package/docs/src/pages/components/tooltip/code.mdx +16 -0
- package/docs/src/pages/components/tooltip/images/Tooltip-1.png +0 -0
- package/docs/src/pages/components/tooltip/images/tooltip-2.gif +0 -0
- package/docs/src/pages/components/tooltip/images/tooltip-3.gif +0 -0
- package/docs/src/pages/components/tooltip/interactions.mdx +219 -0
- package/docs/src/pages/components/tooltip/usage.mdx +80 -0
- package/docs/src/pages/content/button-guidelines/index.mdx +7 -0
- package/docs/src/pages/content/button-guidelines/tabs/button-glossary.mdx +144 -0
- package/docs/src/pages/content/button-guidelines/tabs/confusing-buttons.mdx +184 -0
- package/docs/src/pages/content/email-guidelines.mdx +107 -0
- package/docs/src/pages/content/empty-states.mdx +8 -0
- package/docs/src/pages/content/error-messages.mdx +165 -0
- package/docs/src/pages/content/house-rules/tabs/basics.mdx +236 -0
- package/docs/src/pages/content/house-rules/tabs/date,-time-&-numbers.mdx +462 -0
- package/docs/src/pages/content/house-rules/tabs/grammer.mdx +744 -0
- package/docs/src/pages/content/house-rules/tabs/punctuations.mdx +666 -0
- package/docs/src/pages/content/placeholder-text.mdx +58 -0
- package/docs/src/pages/content/rules.mdx +136 -0
- package/docs/src/pages/content/voice-and-tone-guidelines/index.mdx +7 -0
- package/docs/src/pages/content/voice-and-tone-guidelines/tabs/usage.mdx +309 -0
- package/docs/src/pages/content/voice-and-tone-guidelines/tabs/voice-and-tone.mdx +38 -0
- package/docs/src/pages/contributions.mdx +16 -0
- package/docs/src/pages/foundations/colors.mdx +149 -0
- package/docs/src/pages/foundations/interactions.mdx +192 -0
- package/docs/src/pages/foundations/layout/images/baseline-grid.png +0 -0
- package/docs/src/pages/foundations/layout/images/grid-column.jpeg +0 -0
- package/docs/src/pages/foundations/layout/images/grid-layout.jpeg +0 -0
- package/docs/src/pages/foundations/layout/images/grid-margin.jpeg +0 -0
- package/docs/src/pages/foundations/layout/images/spacing.png +0 -0
- package/docs/src/pages/foundations/layout/images/typography.png +0 -0
- package/docs/src/pages/foundations/layout/index.mdx +151 -0
- package/docs/src/pages/foundations/logos.mdx +88 -0
- package/docs/src/pages/foundations/principles.mdx +60 -0
- package/docs/src/pages/foundations/response-time.mdx +124 -0
- package/docs/src/pages/foundations/typography.mdx +8 -0
- package/docs/src/pages/getting-started/index.mdx +9 -0
- package/docs/src/pages/guides/MDX.mdx +17 -0
- package/docs/src/pages/home/HomeBanner.png +0 -0
- package/docs/src/pages/home/homepage.css +23 -0
- package/docs/src/pages/index.js +241 -0
- package/docs/src/pages/introduction/get-started/designers.mdx +89 -0
- package/docs/src/pages/introduction/get-started/developers.mdx +128 -0
- package/docs/src/pages/introduction/what's-new.mdx +801 -0
- package/docs/src/pages/mobile/components/avatar/code.mdx +12 -0
- package/docs/src/pages/mobile/components/avatar/usage.mdx +20 -0
- package/docs/src/pages/mobile/components/badges/code.mdx +16 -0
- package/docs/src/pages/mobile/components/badges/usage.mdx +23 -0
- package/docs/src/pages/mobile/components/breadcrumbs/code.mdx +16 -0
- package/docs/src/pages/mobile/components/breadcrumbs/usage.mdx +34 -0
- package/docs/src/pages/mobile/components/button/code.mdx +12 -0
- package/docs/src/pages/mobile/components/button/content.mdx +1 -0
- package/docs/src/pages/mobile/components/button/usage.mdx +55 -0
- package/docs/src/pages/mobile/components/card/code.mdx +16 -0
- package/docs/src/pages/mobile/components/card/usage.mdx +23 -0
- package/docs/src/pages/mobile/components/checkbox/code.mdx +16 -0
- package/docs/src/pages/mobile/components/checkbox/usage.mdx +49 -0
- package/docs/src/pages/mobile/components/index.mdx +7 -0
- package/docs/src/pages/mobile/components/message/code.mdx +16 -0
- package/docs/src/pages/mobile/components/message/usage.mdx +26 -0
- package/docs/src/pages/mobile/components/overview/index.mdx +8 -0
- package/docs/src/pages/mobile/components/overview/tabs/all-components.mdx +8 -0
- package/docs/src/pages/mobile/components/overview/tabs/status.mdx +115 -0
- package/docs/src/pages/mobile/foundations/colors.mdx +149 -0
- package/docs/src/pages/mobile/foundations/interactions.mdx +192 -0
- package/docs/src/pages/mobile/foundations/layout/images/baseline-grid.png +0 -0
- package/docs/src/pages/mobile/foundations/layout/images/grid-column.jpeg +0 -0
- package/docs/src/pages/mobile/foundations/layout/images/grid-layout.jpeg +0 -0
- package/docs/src/pages/mobile/foundations/layout/images/grid-margin.jpeg +0 -0
- package/docs/src/pages/mobile/foundations/layout/images/spacing.png +0 -0
- package/docs/src/pages/mobile/foundations/layout/images/typography.png +0 -0
- package/docs/src/pages/mobile/foundations/layout/index.mdx +151 -0
- package/docs/src/pages/mobile/foundations/logos.mdx +88 -0
- package/docs/src/pages/mobile/foundations/principles.mdx +47 -0
- package/docs/src/pages/mobile/foundations/response-time.mdx +124 -0
- package/docs/src/pages/mobile/foundations/typography.mdx +8 -0
- package/docs/src/pages/patterns/index.mdx +7 -0
- package/docs/src/pages/resources/index.mdx +7 -0
- package/docs/src/util/FooterItems.js +21 -0
- package/docs/src/util/Frontmatter.js +35 -0
- package/docs/src/util/HeaderItems.js +21 -0
- package/docs/src/util/Helpers.js +7 -0
- package/docs/src/util/HomeMenu.js +24 -0
- package/docs/src/util/HomeResources.js +23 -0
- package/docs/src/util/InPageNavItems.js +36 -0
- package/docs/src/util/Logos.js +19 -0
- package/docs/src/util/MdsChangelog.js +55 -0
- package/docs/src/util/MediumBlogs.js +27 -0
- package/docs/src/util/NavItems.js +82 -0
- package/docs/src/util/StorybookData.js +24 -0
- package/docs/src/util/constants.js +7 -0
- package/docs/src/util/context/NavContext.js +54 -0
- package/docs/src/util/hooks/index.js +1 -0
- package/docs/src/util/hooks/useMetadata.js +21 -0
- package/docs/src/util/index.js +4 -0
- package/docs/static/icons/4691539_codesandbox_icon.svg +1 -0
- package/docs/static/icons/card-image.png +0 -0
- package/docs/static/icons/favicon_io/android-chrome-192x192.png +0 -0
- package/docs/static/icons/favicon_io/android-chrome-512x512.png +0 -0
- package/docs/static/icons/favicon_io/apple-touch-icon.png +0 -0
- package/docs/static/icons/favicon_io/favicon-16x16.png +0 -0
- package/docs/static/icons/favicon_io/favicon-32x32.png +0 -0
- package/docs/static/icons/favicon_io/favicon.ico +0 -0
- package/docs/static/images/P360.png +0 -0
- package/docs/static/images/dap.png +0 -0
- package/docs/static/images/default.png +0 -0
- package/docs/static/images/designtoken.png +0 -0
- package/docs/static/images/figma.png +0 -0
- package/docs/static/images/headerLogo.png +0 -0
- package/docs/static/images/inacademy.png +0 -0
- package/docs/static/images/inapi.png +0 -0
- package/docs/static/images/incare.png +0 -0
- package/docs/static/images/inconnect.png +0 -0
- package/docs/static/images/indata.png +0 -0
- package/docs/static/images/ingraph.png +0 -0
- package/docs/static/images/innote.png +0 -0
- package/docs/static/images/inoffice.png +0 -0
- package/docs/static/images/inreport.png +0 -0
- package/docs/static/images/storybook.png +0 -0
- package/docs/static/images/withoutType.png +0 -0
- package/docs/tools/build.sh +6 -0
- package/docs/tools/changelog.sh +1 -0
- package/docs/tools/changeloghead.md +14 -0
- package/docs/tools/develop.sh +5 -0
- package/docs/tools/extract.js +52 -0
- package/docs/tools/update-mds.sh +3 -0
- package/package.json +1 -1
- package/tsconfig.json +1 -1
- package/tsconfig.type.json +2 -1
- package/docs/AppTutorial.md +0 -474
- package/docs/images/BasicLayout.png +0 -0
- package/docs/images/Breadcrumb.png +0 -0
- package/docs/images/Covid-App.png +0 -0
- package/docs/images/DrilledLayout.png +0 -0
- package/docs/images/DrilledPage.png +0 -0
- package/docs/images/Footer.png +0 -0
- package/docs/images/Graph1.png +0 -0
- package/docs/images/Graph2.png +0 -0
- package/docs/images/Header.png +0 -0
- package/docs/images/Map.png +0 -0
- package/docs/images/StaticComponent.png +0 -0
- package/docs/images/Summary.png +0 -0
- package/docs/images/Table.png +0 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
name: Pull request
|
|
2
|
+
|
|
3
|
+
on: pull_request
|
|
4
|
+
|
|
5
|
+
jobs:
|
|
6
|
+
lint_test_build:
|
|
7
|
+
name: lint, test and build
|
|
8
|
+
runs-on: ubuntu-latest
|
|
9
|
+
steps:
|
|
10
|
+
- uses: actions/checkout@v1
|
|
11
|
+
|
|
12
|
+
- uses: actions/setup-node@v1
|
|
13
|
+
with:
|
|
14
|
+
node-version: '14.x'
|
|
15
|
+
|
|
16
|
+
- name: yarn install
|
|
17
|
+
run: cd docs && yarn install
|
|
18
|
+
|
|
19
|
+
- name: build
|
|
20
|
+
run: cd docs && yarn build
|
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,74 @@
|
|
|
1
1
|
|
|
2
|
+
## 2.9.0-0 (2022-02-01)
|
|
3
|
+
### Highlights
|
|
4
|
+
* feat: adds docs site (44ab33d3)
|
|
5
|
+
* feat(verticalNav): add custom item renderer option (810a099f)
|
|
6
|
+
|
|
7
|
+
### Breaking changes
|
|
8
|
+
NA
|
|
9
|
+
|
|
10
|
+
### Migration guide
|
|
11
|
+
NA
|
|
12
|
+
|
|
13
|
+
### Deprecations
|
|
14
|
+
NA
|
|
15
|
+
|
|
16
|
+
### Features
|
|
17
|
+
* feat: adds docs site (44ab33d3)
|
|
18
|
+
* feat(verticalNav): add custom item renderer option (810a099f)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### Fixes
|
|
22
|
+
* fix(verticalnav): fix verticalnav active hover state shadow (1b341516)
|
|
23
|
+
* fix(button): fix button hover background color (1e696743)
|
|
24
|
+
* fix(button): fix button hover and focus style (795ae48b)
|
|
25
|
+
* fix(dropdown): fix dropdown items closing animation (dc8c6102)
|
|
26
|
+
* fix(tabs): fix tabs conflict in selected focused state style (fa4ff904)
|
|
27
|
+
* fix(toast): add message to discription story (1cac895d)
|
|
28
|
+
* fix(button): props table not showing (70ac3e39)
|
|
29
|
+
* fix(leftNav): fix left navbar highlighting on tab changes (d836a42e)
|
|
30
|
+
* fix(table): add border in table for mdx and fix overflow behaviour (233293ed)
|
|
31
|
+
* fix(table): make scrollbar width consistent (af5da8f6)
|
|
32
|
+
* fix(table): fix table data issue when rows are more than 27 (b33aafc1)
|
|
2
33
|
|
|
34
|
+
### Improvements
|
|
35
|
+
NA
|
|
3
36
|
|
|
37
|
+
### Documentation
|
|
38
|
+
* Adds documentations for components.
|
|
39
|
+
|
|
40
|
+
-------------------
|
|
41
|
+
|
|
42
|
+
## 2.8.0-0 (2022-01-12)
|
|
43
|
+
### Highlights
|
|
44
|
+
|
|
45
|
+
### Breaking changes
|
|
46
|
+
NA
|
|
47
|
+
|
|
48
|
+
### Migration guide
|
|
49
|
+
NA
|
|
50
|
+
|
|
51
|
+
### Deprecations
|
|
52
|
+
NA
|
|
53
|
+
|
|
54
|
+
### Features
|
|
55
|
+
NA
|
|
56
|
+
|
|
57
|
+
### Fixes
|
|
58
|
+
* Fix chip inline alignment problem (253ba672)
|
|
59
|
+
* Fix progressbar background color (938be99b)
|
|
60
|
+
* Fix disabled slider knob shadow (aff1ddb6)
|
|
61
|
+
* Fix broken alignment due to inlineLabel in Dropdown (d7b51053)
|
|
62
|
+
* Resolve tooltip close issue on disabled button (cc0c693d)
|
|
63
|
+
|
|
64
|
+
### Improvements
|
|
65
|
+
* Add popover transitions (f1873f65)
|
|
66
|
+
* Add support for three characters in Avatar component (ba6bc35b)
|
|
67
|
+
|
|
68
|
+
### Documentation
|
|
69
|
+
NA
|
|
70
|
+
|
|
71
|
+
-------------------
|
|
4
72
|
|
|
5
73
|
## 2.7.0 (2021-12-23)
|
|
6
74
|
### Highlights
|
package/README.md
CHANGED
|
@@ -126,6 +126,12 @@ For css variables to work on IE we use a polyfill at runtime to achieve dynamic
|
|
|
126
126
|
</script>
|
|
127
127
|
```
|
|
128
128
|
|
|
129
|
+
## :card_file_box: Repos
|
|
130
|
+
Here are the supporting repositories.
|
|
131
|
+
- **[MDS Rich Text Editor](https://github.com/innovaccer/mds-rich-text-editor)** - Feature-rich WYSIWYG (What You See Is What You Get) HTML editor and WYSIWYG Markdown editor. It is used to create blogs, notes sections, comment sections etc. It has a variety of tools to edit and format rich content.
|
|
132
|
+
- **[MDS Docs](https://github.com/innovaccer/mds-docs)** - Documentation site for Masala design system.
|
|
133
|
+
- **[MDS Helpers](https://github.com/innovaccer/mds-helpers)** - Alert Service.
|
|
134
|
+
|
|
129
135
|
## :books: Documentation
|
|
130
136
|
|
|
131
137
|
- [🌶 Masala Design System](http://design.innovaccer.com)
|
|
@@ -6,7 +6,7 @@ exports[`Chip component
|
|
|
6
6
|
<body>
|
|
7
7
|
<div>
|
|
8
8
|
<div
|
|
9
|
-
class="undefined"
|
|
9
|
+
class="Chip-wrapper undefined"
|
|
10
10
|
data-test="DesignSystem-GenericChip--GenericChipWrapper"
|
|
11
11
|
>
|
|
12
12
|
<i
|
|
@@ -34,7 +34,7 @@ exports[`Chip component
|
|
|
34
34
|
<body>
|
|
35
35
|
<div>
|
|
36
36
|
<div
|
|
37
|
-
class="undefined"
|
|
37
|
+
class="Chip-wrapper undefined"
|
|
38
38
|
data-test="DesignSystem-GenericChip--GenericChipWrapper"
|
|
39
39
|
>
|
|
40
40
|
<i
|
|
@@ -62,7 +62,7 @@ exports[`Chip component
|
|
|
62
62
|
<body>
|
|
63
63
|
<div>
|
|
64
64
|
<div
|
|
65
|
-
class="undefined"
|
|
65
|
+
class="Chip-wrapper undefined"
|
|
66
66
|
data-test="DesignSystem-GenericChip--GenericChipWrapper"
|
|
67
67
|
>
|
|
68
68
|
<i
|
|
@@ -90,7 +90,7 @@ exports[`Chip component
|
|
|
90
90
|
<body>
|
|
91
91
|
<div>
|
|
92
92
|
<div
|
|
93
|
-
class="undefined"
|
|
93
|
+
class="Chip-wrapper undefined"
|
|
94
94
|
data-test="DesignSystem-GenericChip--GenericChipWrapper"
|
|
95
95
|
>
|
|
96
96
|
<i
|
|
@@ -118,7 +118,7 @@ exports[`Chip component
|
|
|
118
118
|
<body>
|
|
119
119
|
<div>
|
|
120
120
|
<div
|
|
121
|
-
class="undefined"
|
|
121
|
+
class="Chip-wrapper undefined"
|
|
122
122
|
data-test="DesignSystem-GenericChip--GenericChipWrapper"
|
|
123
123
|
>
|
|
124
124
|
<i
|
|
@@ -155,7 +155,7 @@ exports[`Chip component
|
|
|
155
155
|
<body>
|
|
156
156
|
<div>
|
|
157
157
|
<div
|
|
158
|
-
class="undefined"
|
|
158
|
+
class="Chip-wrapper undefined"
|
|
159
159
|
data-test="DesignSystem-GenericChip--GenericChipWrapper"
|
|
160
160
|
>
|
|
161
161
|
<i
|
|
@@ -192,7 +192,7 @@ exports[`Chip component
|
|
|
192
192
|
<body>
|
|
193
193
|
<div>
|
|
194
194
|
<div
|
|
195
|
-
class="undefined"
|
|
195
|
+
class="Chip-wrapper undefined"
|
|
196
196
|
data-test="DesignSystem-GenericChip--GenericChipWrapper"
|
|
197
197
|
>
|
|
198
198
|
<i
|
|
@@ -229,7 +229,7 @@ exports[`Chip component
|
|
|
229
229
|
<body>
|
|
230
230
|
<div>
|
|
231
231
|
<div
|
|
232
|
-
class="undefined"
|
|
232
|
+
class="Chip-wrapper undefined"
|
|
233
233
|
data-test="DesignSystem-GenericChip--GenericChipWrapper"
|
|
234
234
|
>
|
|
235
235
|
<i
|
|
@@ -57,7 +57,7 @@ export const GenericChip = (props: GenericChipProps) => {
|
|
|
57
57
|
<div
|
|
58
58
|
data-test="DesignSystem-GenericChip--GenericChipWrapper"
|
|
59
59
|
{...baseProps}
|
|
60
|
-
className={
|
|
60
|
+
className={`Chip-wrapper ${className}`}
|
|
61
61
|
onClick={onClickHandler}
|
|
62
62
|
>
|
|
63
63
|
{icon && (
|
|
@@ -7,6 +7,7 @@ Object {
|
|
|
7
7
|
"asFragment": [Function],
|
|
8
8
|
"baseElement": <body>
|
|
9
9
|
<div>
|
|
10
|
+
<style />
|
|
10
11
|
<div
|
|
11
12
|
class="OutsideClick PopperWrapper-trigger flex-grow-0"
|
|
12
13
|
>
|
|
@@ -25,6 +26,7 @@ Object {
|
|
|
25
26
|
</div>
|
|
26
27
|
</body>,
|
|
27
28
|
"container": <div>
|
|
29
|
+
<style />
|
|
28
30
|
<div
|
|
29
31
|
class="OutsideClick PopperWrapper-trigger flex-grow-0"
|
|
30
32
|
>
|
|
@@ -102,6 +104,7 @@ Object {
|
|
|
102
104
|
"asFragment": [Function],
|
|
103
105
|
"baseElement": <body>
|
|
104
106
|
<div>
|
|
107
|
+
<style />
|
|
105
108
|
<div
|
|
106
109
|
class="OutsideClick PopperWrapper-trigger flex-grow-0"
|
|
107
110
|
>
|
|
@@ -120,6 +123,7 @@ Object {
|
|
|
120
123
|
</div>
|
|
121
124
|
</body>,
|
|
122
125
|
"container": <div>
|
|
126
|
+
<style />
|
|
123
127
|
<div
|
|
124
128
|
class="OutsideClick PopperWrapper-trigger flex-grow-0"
|
|
125
129
|
>
|
|
@@ -197,6 +201,7 @@ Object {
|
|
|
197
201
|
"asFragment": [Function],
|
|
198
202
|
"baseElement": <body>
|
|
199
203
|
<div>
|
|
204
|
+
<style />
|
|
200
205
|
<div
|
|
201
206
|
class="OutsideClick PopperWrapper-trigger flex-grow-0"
|
|
202
207
|
>
|
|
@@ -215,6 +220,7 @@ Object {
|
|
|
215
220
|
</div>
|
|
216
221
|
</body>,
|
|
217
222
|
"container": <div>
|
|
223
|
+
<style />
|
|
218
224
|
<div
|
|
219
225
|
class="OutsideClick PopperWrapper-trigger flex-grow-0"
|
|
220
226
|
>
|
|
@@ -292,6 +298,7 @@ Object {
|
|
|
292
298
|
"asFragment": [Function],
|
|
293
299
|
"baseElement": <body>
|
|
294
300
|
<div>
|
|
301
|
+
<style />
|
|
295
302
|
<div
|
|
296
303
|
class="OutsideClick PopperWrapper-trigger flex-grow-0"
|
|
297
304
|
>
|
|
@@ -310,6 +317,7 @@ Object {
|
|
|
310
317
|
</div>
|
|
311
318
|
</body>,
|
|
312
319
|
"container": <div>
|
|
320
|
+
<style />
|
|
313
321
|
<div
|
|
314
322
|
class="OutsideClick PopperWrapper-trigger flex-grow-0"
|
|
315
323
|
>
|
|
@@ -387,6 +395,7 @@ Object {
|
|
|
387
395
|
"asFragment": [Function],
|
|
388
396
|
"baseElement": <body>
|
|
389
397
|
<div>
|
|
398
|
+
<style />
|
|
390
399
|
<div
|
|
391
400
|
class="OutsideClick PopperWrapper-trigger flex-grow-0"
|
|
392
401
|
>
|
|
@@ -405,6 +414,7 @@ Object {
|
|
|
405
414
|
</div>
|
|
406
415
|
</body>,
|
|
407
416
|
"container": <div>
|
|
417
|
+
<style />
|
|
408
418
|
<div
|
|
409
419
|
class="OutsideClick PopperWrapper-trigger flex-grow-0"
|
|
410
420
|
>
|
|
@@ -482,6 +492,7 @@ Object {
|
|
|
482
492
|
"asFragment": [Function],
|
|
483
493
|
"baseElement": <body>
|
|
484
494
|
<div>
|
|
495
|
+
<style />
|
|
485
496
|
<div
|
|
486
497
|
class="OutsideClick PopperWrapper-trigger flex-grow-0"
|
|
487
498
|
>
|
|
@@ -500,6 +511,7 @@ Object {
|
|
|
500
511
|
</div>
|
|
501
512
|
</body>,
|
|
502
513
|
"container": <div>
|
|
514
|
+
<style />
|
|
503
515
|
<div
|
|
504
516
|
class="OutsideClick PopperWrapper-trigger flex-grow-0"
|
|
505
517
|
>
|
|
@@ -577,6 +589,7 @@ Object {
|
|
|
577
589
|
"asFragment": [Function],
|
|
578
590
|
"baseElement": <body>
|
|
579
591
|
<div>
|
|
592
|
+
<style />
|
|
580
593
|
<div
|
|
581
594
|
class="OutsideClick PopperWrapper-trigger flex-grow-0"
|
|
582
595
|
>
|
|
@@ -595,6 +608,7 @@ Object {
|
|
|
595
608
|
</div>
|
|
596
609
|
</body>,
|
|
597
610
|
"container": <div>
|
|
611
|
+
<style />
|
|
598
612
|
<div
|
|
599
613
|
class="OutsideClick PopperWrapper-trigger flex-grow-0"
|
|
600
614
|
>
|
|
@@ -672,6 +686,7 @@ Object {
|
|
|
672
686
|
"asFragment": [Function],
|
|
673
687
|
"baseElement": <body>
|
|
674
688
|
<div>
|
|
689
|
+
<style />
|
|
675
690
|
<div
|
|
676
691
|
class="OutsideClick PopperWrapper-trigger flex-grow-0"
|
|
677
692
|
>
|
|
@@ -690,6 +705,7 @@ Object {
|
|
|
690
705
|
</div>
|
|
691
706
|
</body>,
|
|
692
707
|
"container": <div>
|
|
708
|
+
<style />
|
|
693
709
|
<div
|
|
694
710
|
class="OutsideClick PopperWrapper-trigger flex-grow-0"
|
|
695
711
|
>
|
|
@@ -767,6 +783,7 @@ Object {
|
|
|
767
783
|
"asFragment": [Function],
|
|
768
784
|
"baseElement": <body>
|
|
769
785
|
<div>
|
|
786
|
+
<style />
|
|
770
787
|
<div
|
|
771
788
|
class="OutsideClick PopperWrapper-trigger flex-grow-0"
|
|
772
789
|
>
|
|
@@ -785,6 +802,7 @@ Object {
|
|
|
785
802
|
</div>
|
|
786
803
|
</body>,
|
|
787
804
|
"container": <div>
|
|
805
|
+
<style />
|
|
788
806
|
<div
|
|
789
807
|
class="OutsideClick PopperWrapper-trigger flex-grow-0"
|
|
790
808
|
>
|
|
@@ -862,6 +880,7 @@ Object {
|
|
|
862
880
|
"asFragment": [Function],
|
|
863
881
|
"baseElement": <body>
|
|
864
882
|
<div>
|
|
883
|
+
<style />
|
|
865
884
|
<div
|
|
866
885
|
class="OutsideClick PopperWrapper-trigger flex-grow-0"
|
|
867
886
|
>
|
|
@@ -880,6 +899,7 @@ Object {
|
|
|
880
899
|
</div>
|
|
881
900
|
</body>,
|
|
882
901
|
"container": <div>
|
|
902
|
+
<style />
|
|
883
903
|
<div
|
|
884
904
|
class="OutsideClick PopperWrapper-trigger flex-grow-0"
|
|
885
905
|
>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import classNames from 'classnames';
|
|
3
|
+
import { Text } from '@/index';
|
|
4
|
+
|
|
5
|
+
const AvatarCount = (props: any) => {
|
|
6
|
+
const { hiddenAvatarCount, avatarStyle } = props;
|
|
7
|
+
|
|
8
|
+
const ContentClass = classNames({
|
|
9
|
+
[`Avatar-content--secondary`]: true,
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
const AvatarVariantsClass = classNames({
|
|
13
|
+
Avatar: true,
|
|
14
|
+
[`Avatar--regular`]: true,
|
|
15
|
+
[`Avatar--secondary`]: true,
|
|
16
|
+
['Avatar--disabled']: true,
|
|
17
|
+
});
|
|
18
|
+
return (
|
|
19
|
+
<div data-test="DesignSystem-AvatarGroup--TriggerAvatar" style={avatarStyle}>
|
|
20
|
+
<span className={AvatarVariantsClass}>
|
|
21
|
+
<Text appearance={'white'} className={ContentClass}>
|
|
22
|
+
{`+${hiddenAvatarCount}`}
|
|
23
|
+
</Text>
|
|
24
|
+
</span>
|
|
25
|
+
</div>
|
|
26
|
+
);
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export default AvatarCount;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import classNames from 'classnames';
|
|
3
3
|
import { BaseProps, extractBaseProps } from '@/utils/types';
|
|
4
|
-
import {
|
|
4
|
+
import { Popover } from '@/index';
|
|
5
5
|
import { AvatarProps, PopoverProps } from '@/index.type';
|
|
6
|
+
import AvatarCount from './AvatarCount';
|
|
7
|
+
import Avatars from './Avatars';
|
|
8
|
+
import AvatarPopperBody from './AvatarPopperBody';
|
|
6
9
|
|
|
7
10
|
interface AvatarData extends Record<string, any> {
|
|
8
11
|
firstName?: string;
|
|
@@ -10,7 +13,7 @@ interface AvatarData extends Record<string, any> {
|
|
|
10
13
|
appearance?: AvatarProps['appearance'];
|
|
11
14
|
}
|
|
12
15
|
|
|
13
|
-
interface
|
|
16
|
+
interface AvatarPopoverProps {
|
|
14
17
|
popperRenderer?: (names: AvatarData[]) => JSX.Element;
|
|
15
18
|
appendToBody?: PopoverProps['appendToBody'];
|
|
16
19
|
dark?: PopoverProps['dark'];
|
|
@@ -46,7 +49,7 @@ export interface AvatarGroupProps extends BaseProps {
|
|
|
46
49
|
* **Popover for +x avatar**
|
|
47
50
|
*
|
|
48
51
|
* <pre className="DocPage-codeBlock">
|
|
49
|
-
*
|
|
52
|
+
* AvatarPopoverProps: {
|
|
50
53
|
* popperRenderer?: (names: AvatarData[]) => JSX.Element;
|
|
51
54
|
* appendToBody?: boolean;
|
|
52
55
|
* dark?: boolean;
|
|
@@ -68,7 +71,7 @@ export interface AvatarGroupProps extends BaseProps {
|
|
|
68
71
|
* </pre>
|
|
69
72
|
*
|
|
70
73
|
*/
|
|
71
|
-
popoverOptions:
|
|
74
|
+
popoverOptions: AvatarPopoverProps;
|
|
72
75
|
/**
|
|
73
76
|
* Position to place the tooltip on `Avatars` shown before +x
|
|
74
77
|
*/
|
|
@@ -90,7 +93,7 @@ export const AvatarGroup = (props: AvatarGroupProps) => {
|
|
|
90
93
|
|
|
91
94
|
const baseProps = extractBaseProps(props);
|
|
92
95
|
|
|
93
|
-
const
|
|
96
|
+
const hiddenAvatarCount = list.length > max ? Math.min(list.length - max, 99) : 0;
|
|
94
97
|
|
|
95
98
|
const style = {
|
|
96
99
|
borderRadius: '50%',
|
|
@@ -113,74 +116,25 @@ export const AvatarGroup = (props: AvatarGroupProps) => {
|
|
|
113
116
|
popperClassName
|
|
114
117
|
);
|
|
115
118
|
|
|
116
|
-
const trigger = (
|
|
117
|
-
<div data-test="DesignSystem-AvatarGroup--TriggerAvatar" style={style}>
|
|
118
|
-
<Avatar appearance="secondary" firstName="+" lastName={`${extraAvatars}`} withTooltip={false} />
|
|
119
|
-
</div>
|
|
120
|
-
);
|
|
121
|
-
|
|
122
|
-
const renderPopper = () => {
|
|
123
|
-
const extraAvatarsList = list.slice(max, list.length);
|
|
124
|
-
|
|
125
|
-
if (popperRenderer && typeof renderPopper === 'function') {
|
|
126
|
-
return popperRenderer(extraAvatarsList);
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
return (
|
|
130
|
-
<div className="py-6 pr-4 pl-6">
|
|
131
|
-
<div className="AvatarGroup-TextWrapper" style={{ maxHeight }}>
|
|
132
|
-
{extraAvatarsList.map((item, ind) => {
|
|
133
|
-
const { firstName = '', lastName = '' } = item;
|
|
134
|
-
const name = `${firstName} ${lastName}`;
|
|
135
|
-
|
|
136
|
-
return (
|
|
137
|
-
<Text
|
|
138
|
-
key={ind}
|
|
139
|
-
appearance={dark ? 'white' : 'default'}
|
|
140
|
-
className={ind < extraAvatars - 1 ? 'mb-5' : ''}
|
|
141
|
-
data-test="DesignSystem-AvatarGroup--Text"
|
|
142
|
-
>
|
|
143
|
-
{name}
|
|
144
|
-
</Text>
|
|
145
|
-
);
|
|
146
|
-
})}
|
|
147
|
-
</div>
|
|
148
|
-
</div>
|
|
149
|
-
);
|
|
150
|
-
};
|
|
151
|
-
|
|
152
|
-
const renderAvatars = () => {
|
|
153
|
-
const avatars = list.slice(0, max).map((item, index) => {
|
|
154
|
-
const { appearance, firstName, lastName } = item;
|
|
155
|
-
return (
|
|
156
|
-
<div data-test="DesignSystem-AvatarGroup--Avatar" className="AvatarGroup-item" style={style} key={index}>
|
|
157
|
-
<Avatar
|
|
158
|
-
appearance={appearance}
|
|
159
|
-
firstName={firstName}
|
|
160
|
-
lastName={lastName}
|
|
161
|
-
withTooltip={true}
|
|
162
|
-
tooltipPosition={tooltipPosition}
|
|
163
|
-
/>
|
|
164
|
-
</div>
|
|
165
|
-
);
|
|
166
|
-
});
|
|
167
|
-
return avatars;
|
|
168
|
-
};
|
|
169
|
-
|
|
170
119
|
return (
|
|
171
120
|
<div data-test="DesignSystem-AvatarGroup" {...baseProps} className={`${AvatarGroupClass} d-inline-flex`}>
|
|
172
|
-
{
|
|
121
|
+
<Avatars avatarList={list.slice(0, max)} avatarStyle={style} tooltipPosition={tooltipPosition} />
|
|
173
122
|
{list.length - max > 0 && (
|
|
174
123
|
<Popover
|
|
175
124
|
on={on}
|
|
176
125
|
dark={dark}
|
|
177
|
-
trigger={
|
|
126
|
+
trigger={<AvatarCount hiddenAvatarCount={hiddenAvatarCount} avatarStyle={style} />}
|
|
178
127
|
position={position}
|
|
179
128
|
appendToBody={appendToBody}
|
|
180
129
|
className={popperClass}
|
|
181
130
|
offset="medium"
|
|
182
131
|
>
|
|
183
|
-
|
|
132
|
+
<AvatarPopperBody
|
|
133
|
+
hiddenAvatarList={list.slice(max, list.length)}
|
|
134
|
+
popperRenderer={popperRenderer}
|
|
135
|
+
maxHeight={maxHeight}
|
|
136
|
+
dark={dark}
|
|
137
|
+
/>
|
|
184
138
|
</Popover>
|
|
185
139
|
)}
|
|
186
140
|
</div>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Text } from '@/index';
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
|
|
5
|
+
const AvatarPopperBody = (props: any) => {
|
|
6
|
+
const { hiddenAvatarList, popperRenderer, maxHeight, dark } = props;
|
|
7
|
+
|
|
8
|
+
if (popperRenderer) {
|
|
9
|
+
return popperRenderer(hiddenAvatarList);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
return (
|
|
13
|
+
<div className="py-6 pr-4 pl-6">
|
|
14
|
+
<div className="AvatarGroup-TextWrapper" style={{ maxHeight }}>
|
|
15
|
+
{hiddenAvatarList.map((item: any, ind: any) => {
|
|
16
|
+
const { firstName = '', lastName = '' } = item;
|
|
17
|
+
const name = `${firstName} ${lastName}`;
|
|
18
|
+
const AvatarTextClass = classNames({
|
|
19
|
+
[`mb-5`]: ind < hiddenAvatarList.length - 1,
|
|
20
|
+
});
|
|
21
|
+
return (
|
|
22
|
+
<Text
|
|
23
|
+
key={ind}
|
|
24
|
+
appearance={dark ? 'white' : 'default'}
|
|
25
|
+
className={AvatarTextClass}
|
|
26
|
+
data-test="DesignSystem-AvatarGroup--Text"
|
|
27
|
+
>
|
|
28
|
+
{name}
|
|
29
|
+
</Text>
|
|
30
|
+
);
|
|
31
|
+
})}
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
);
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export default AvatarPopperBody;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Avatar } from '@/index';
|
|
3
|
+
|
|
4
|
+
const Avatars = (props: any) => {
|
|
5
|
+
const { avatarList, avatarStyle, tooltipPosition } = props;
|
|
6
|
+
const avatars = avatarList.map((item: any, index: any) => {
|
|
7
|
+
const { appearance, firstName, lastName } = item;
|
|
8
|
+
return (
|
|
9
|
+
<div data-test="DesignSystem-AvatarGroup--Avatar" className="AvatarGroup-item" style={avatarStyle} key={index}>
|
|
10
|
+
<Avatar
|
|
11
|
+
appearance={appearance}
|
|
12
|
+
firstName={firstName}
|
|
13
|
+
lastName={lastName}
|
|
14
|
+
withTooltip={true}
|
|
15
|
+
tooltipPosition={tooltipPosition}
|
|
16
|
+
/>
|
|
17
|
+
</div>
|
|
18
|
+
);
|
|
19
|
+
});
|
|
20
|
+
return avatars;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export default Avatars;
|
|
@@ -29,7 +29,48 @@ export const all = () => {
|
|
|
29
29
|
return <AvatarGroup {...options} />;
|
|
30
30
|
};
|
|
31
31
|
|
|
32
|
+
const customCode = `() => {
|
|
33
|
+
const list = [
|
|
34
|
+
{
|
|
35
|
+
firstName: 'John',
|
|
36
|
+
lastName: 'Doe',
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
firstName: 'Steven',
|
|
40
|
+
lastName: 'Packton',
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
firstName: 'Nancy',
|
|
44
|
+
lastName: 'Wheeler'
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
firstName: 'Monica',
|
|
48
|
+
lastName: 'Geller'
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
firstName: 'Arya',
|
|
52
|
+
lastName: 'Stark',
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
firstName: 'Rachel',
|
|
56
|
+
lastName: 'Green',
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
firstName: 'Walter',
|
|
60
|
+
lastName: 'Wheeler'
|
|
61
|
+
},
|
|
62
|
+
];
|
|
63
|
+
return <AvatarGroup list={list} popoverOptions={{ dark: true, on: 'hover', position: 'bottom'}}/>;
|
|
64
|
+
}`;
|
|
65
|
+
|
|
32
66
|
export default {
|
|
33
67
|
title: 'Components/AvatarGroup/All',
|
|
34
68
|
component: AvatarGroup,
|
|
69
|
+
parameters: {
|
|
70
|
+
docs: {
|
|
71
|
+
docPage: {
|
|
72
|
+
customCode,
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
},
|
|
35
76
|
};
|
|
@@ -135,7 +135,7 @@ describe('AvatarGroup Component with prop: popoverOptions', () => {
|
|
|
135
135
|
it('renders avatars with prop: popperRenderer', () => {
|
|
136
136
|
const max = 3;
|
|
137
137
|
const popperList = list.slice(max, list.length);
|
|
138
|
-
const popperRenderer = jest.fn();
|
|
138
|
+
const popperRenderer = jest.fn(() => <div>Avatar</div>);
|
|
139
139
|
|
|
140
140
|
const { getByTestId } = render(
|
|
141
141
|
<AvatarGroup list={list} max={max} popoverOptions={{ popperRenderer, on: 'click', dark: false }} />
|