@innovaccer/design-system 2.8.1-0 → 2.9.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.
- package/.github/workflows/docs_pull_request.yml +20 -0
- package/CHANGELOG.md +40 -0
- package/README.md +6 -0
- package/core/components/atoms/button/Button.tsx +1 -2
- package/core/components/atoms/dropdown/DropdownList.tsx +2 -3
- 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/organisms/dateRangePicker/DateRangePicker.tsx +2 -1
- package/core/components/organisms/grid/GridBody.tsx +1 -2
- package/core/components/organisms/pageHeader/__stories__/variants/withTabs.story.tsx +7 -7
- package/core/components/organisms/table/Table.tsx +0 -1
- 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 +162 -1
- package/css/dist/index.css +50 -56
- package/css/dist/index.css.map +1 -1
- package/css/src/components/avatarGroup.css +0 -9
- package/css/src/components/button.css +3 -4
- package/css/src/components/calendar.css +1 -0
- package/css/src/components/checkbox.css +1 -0
- package/css/src/components/chip.css +1 -0
- package/css/src/components/dropdown.css +1 -9
- package/css/src/components/dropdownButton.css +1 -0
- package/css/src/components/grid.css +0 -11
- package/css/src/components/horizontalNav.css +1 -0
- package/css/src/components/input.css +1 -0
- package/css/src/components/link.css +1 -0
- package/css/src/components/metricInput.css +1 -0
- package/css/src/components/overlay.css +0 -11
- package/css/src/components/radio.css +2 -0
- package/css/src/components/slider.css +2 -0
- package/css/src/components/tabs.css +1 -1
- package/css/src/components/textarea.css +0 -11
- package/css/src/components/verticalNav.css +3 -0
- package/css/src/core/utilities.css +11 -0
- package/css/src/variables/index.css +19 -0
- 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/organisms/verticalNav/MenuItem.d.ts +1 -0
- package/dist/core/components/organisms/verticalNav/VerticalNav.d.ts +2 -0
- package/dist/index.esm.js +36 -34
- package/dist/index.js +16 -14
- 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 +58 -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 +286 -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 +104 -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 +101 -0
- package/docs/src/components/templates/Default.js +23 -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 +13 -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 +52 -0
- package/docs/src/pages/components/badges/code.mdx +14 -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 +42 -0
- package/docs/src/pages/components/breadcrumbs/code.mdx +14 -0
- package/docs/src/pages/components/breadcrumbs/usage.mdx +29 -0
- package/docs/src/pages/components/button/code.mdx +17 -0
- package/docs/src/pages/components/button/content.mdx +651 -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 +99 -0
- package/docs/src/pages/components/calendar/code.mdx +14 -0
- package/docs/src/pages/components/calendar/usage.mdx +8 -0
- package/docs/src/pages/components/card/code.mdx +14 -0
- package/docs/src/pages/components/card/usage.mdx +53 -0
- package/docs/src/pages/components/checkbox/code.mdx +15 -0
- package/docs/src/pages/components/checkbox/usage.mdx +48 -0
- package/docs/src/pages/components/chips/code.mdx +14 -0
- package/docs/src/pages/components/chips/usage.mdx +33 -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 +6 -0
- package/docs/src/pages/components/message/code.mdx +15 -0
- package/docs/src/pages/components/message/usage.mdx +25 -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 +29 -0
- package/docs/src/pages/components/overview/tabs/status.mdx +22 -0
- package/docs/src/pages/components/radio/code.mdx +16 -0
- package/docs/src/pages/components/radio/usage.mdx +125 -0
- package/docs/src/pages/components/sidesheet/code.mdx +7 -0
- package/docs/src/pages/components/sidesheet/interactions.mdx +7 -0
- package/docs/src/pages/components/sidesheet/usage.mdx +24 -0
- package/docs/src/pages/components/slider/code.mdx +14 -0
- package/docs/src/pages/components/slider/usage.mdx +48 -0
- package/docs/src/pages/components/statushint/code.mdx +14 -0
- package/docs/src/pages/components/statushint/usage.mdx +18 -0
- package/docs/src/pages/components/steppers/code.mdx +15 -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 +27 -0
- package/docs/src/pages/components/steppers/usage.mdx +200 -0
- package/docs/src/pages/components/switch/code.mdx +15 -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 +391 -0
- package/docs/src/pages/components/switch/usage.mdx +113 -0
- package/docs/src/pages/components/table/code.mdx +13 -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 +96 -0
- package/docs/src/pages/components/table/usage.mdx +363 -0
- package/docs/src/pages/components/tabs/code.mdx +14 -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 +486 -0
- package/docs/src/pages/components/tabs/usage.mdx +163 -0
- package/docs/src/pages/components/toast/code.mdx +14 -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 +217 -0
- package/docs/src/pages/components/toast/usage.mdx +155 -0
- package/docs/src/pages/components/tooltip/code.mdx +15 -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 +218 -0
- package/docs/src/pages/components/tooltip/usage.mdx +79 -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 +33 -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,4 +1,44 @@
|
|
|
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)
|
|
33
|
+
|
|
34
|
+
### Improvements
|
|
35
|
+
NA
|
|
36
|
+
|
|
37
|
+
### Documentation
|
|
38
|
+
* Adds documentations for components.
|
|
39
|
+
|
|
40
|
+
-------------------
|
|
41
|
+
|
|
2
42
|
## 2.8.0-0 (2022-01-12)
|
|
3
43
|
### Highlights
|
|
4
44
|
|
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)
|
|
@@ -97,6 +97,7 @@ const sizeMapping: Record<ButtonSize, number> = {
|
|
|
97
97
|
large: 20,
|
|
98
98
|
};
|
|
99
99
|
|
|
100
|
+
// eslint-disable-next-line react/display-name
|
|
100
101
|
const ButtonElement = React.forwardRef<HTMLButtonElement, ButtonProps>((props, ref) => {
|
|
101
102
|
const {
|
|
102
103
|
size = 'regular',
|
|
@@ -179,8 +180,6 @@ const ButtonElement = React.forwardRef<HTMLButtonElement, ButtonProps>((props, r
|
|
|
179
180
|
);
|
|
180
181
|
});
|
|
181
182
|
|
|
182
|
-
ButtonElement.displayName = 'ButtonElement';
|
|
183
|
-
|
|
184
183
|
export const Button = React.forwardRef<HTMLButtonElement, ButtonProps>((props, ref) => {
|
|
185
184
|
const { icon, tooltip, children } = props;
|
|
186
185
|
|
|
@@ -287,14 +287,13 @@ const DropdownList = (props: OptionsProps) => {
|
|
|
287
287
|
|
|
288
288
|
const animateClass = classNames({
|
|
289
289
|
['fade-in']: dropdownOpen,
|
|
290
|
-
['opacity-0']:
|
|
290
|
+
['opacity-0']: dropdownOpen,
|
|
291
291
|
['Dropdown-items']: true,
|
|
292
|
-
['fade-out']: !dropdownOpen,
|
|
293
292
|
});
|
|
294
293
|
|
|
295
294
|
const getAnimateOrderStyle = (order: number) => {
|
|
296
295
|
const animateStyle: React.CSSProperties = {
|
|
297
|
-
animationDelay:
|
|
296
|
+
animationDelay: dropdownOpen ? order * 20 + 'ms' : '',
|
|
298
297
|
};
|
|
299
298
|
return animateStyle;
|
|
300
299
|
};
|
|
@@ -2,7 +2,9 @@ import * as React from 'react';
|
|
|
2
2
|
import { Toast } from '@/index';
|
|
3
3
|
|
|
4
4
|
// CSF format story
|
|
5
|
-
export const toastWithDescription = () =>
|
|
5
|
+
export const toastWithDescription = () => (
|
|
6
|
+
<Toast appearance="success" title="Message sent successfully" message="Description goes here" />
|
|
7
|
+
);
|
|
6
8
|
|
|
7
9
|
export default {
|
|
8
10
|
title: 'Components/Toast/Toast With Description',
|
|
@@ -161,3 +161,21 @@ export const gridBreakpointData = [
|
|
|
161
161
|
{ token: '--grid-l-breakpoint', value: '992px' },
|
|
162
162
|
{ token: '--grid-xl-breakpoint', value: '1200px' },
|
|
163
163
|
];
|
|
164
|
+
|
|
165
|
+
export const transitionsCurveData = [
|
|
166
|
+
{ token: '--standard-productive-curve', value: 'cubic-bezier(0.2, 0, 0.38, 0.9)' },
|
|
167
|
+
{ token: '--standard-expressive-curve', value: 'cubic-bezier(0.4, 0.14, 0.3, 1)' },
|
|
168
|
+
{ token: '--entrance-productive-curve', value: 'cubic-bezier(0, 0, 0.38, 0.9)' },
|
|
169
|
+
{ token: '--entrance-expressive-curve', value: 'cubic-bezier(0, 0, 0.3, 1)' },
|
|
170
|
+
{ token: '--exit-productive-curve', value: 'cubic-bezier(0.2, 0, 1, 0.9)' },
|
|
171
|
+
{ token: '--exit-expressive-curve', value: 'cubic-bezier(0.4, 0.14, 1, 1)' },
|
|
172
|
+
];
|
|
173
|
+
|
|
174
|
+
export const transitionsDurationData = [
|
|
175
|
+
{ token: '--duration--fast-01', value: '80ms' },
|
|
176
|
+
{ token: '--duration--fast-02', value: '120ms' },
|
|
177
|
+
{ token: '--duration--moderate-01', value: '160ms' },
|
|
178
|
+
{ token: '--duration--moderate-02', value: '240ms' },
|
|
179
|
+
{ token: '--duration--slow-01', value: '400ms' },
|
|
180
|
+
{ token: '--duration--slow-02', value: '720ms' },
|
|
181
|
+
];
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Card, Heading, Table } from '@/index';
|
|
3
|
+
import { spaceSchema } from './Schema';
|
|
4
|
+
import { transitionsCurveData, transitionsDurationData } from './Data';
|
|
5
|
+
|
|
6
|
+
export const transitions = () => {
|
|
7
|
+
return (
|
|
8
|
+
<div>
|
|
9
|
+
<Heading size="xxl">Design Tokens</Heading>
|
|
10
|
+
<br />
|
|
11
|
+
<br />
|
|
12
|
+
<Heading size="m">Transitions</Heading>
|
|
13
|
+
<br />
|
|
14
|
+
<Heading size="m">Transition curve</Heading>
|
|
15
|
+
<Card className="h-100 overflow-hidden">
|
|
16
|
+
<Table data={transitionsCurveData} schema={spaceSchema} />
|
|
17
|
+
</Card>
|
|
18
|
+
<br />
|
|
19
|
+
<Heading size="m">Transition Duration</Heading>
|
|
20
|
+
<Card className="h-100 overflow-hidden">
|
|
21
|
+
<Table data={transitionsDurationData} schema={spaceSchema} />
|
|
22
|
+
</Card>
|
|
23
|
+
<br />
|
|
24
|
+
</div>
|
|
25
|
+
);
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export default {
|
|
29
|
+
title: 'Others/Design Tokens/Transitions',
|
|
30
|
+
parameters: {
|
|
31
|
+
viewMode: 'story',
|
|
32
|
+
docs: {
|
|
33
|
+
page: null,
|
|
34
|
+
docPage: null,
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
};
|
|
@@ -241,9 +241,10 @@ export class DateRangePicker extends React.Component<DateRangePickerProps, DateR
|
|
|
241
241
|
else onRangeChange(undefined, undefined, sValue, eValue);
|
|
242
242
|
}
|
|
243
243
|
}
|
|
244
|
+
|
|
244
245
|
if (this.state.startDate && this.state.endDate) {
|
|
245
246
|
this.setState({
|
|
246
|
-
open:
|
|
247
|
+
open: false,
|
|
247
248
|
});
|
|
248
249
|
}
|
|
249
250
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import PageHeader from '../../PageHeader';
|
|
3
|
-
import { Button, Text, Tab, TabsWrapper,
|
|
3
|
+
import { Button, Text, Tab, TabsWrapper, Pills } from '@/index';
|
|
4
4
|
import { action } from '@storybook/addon-actions';
|
|
5
5
|
import { updateKnob } from '@/utils/storybookEventEmitter';
|
|
6
6
|
import { number, text, boolean } from '@storybook/addon-knobs';
|
|
@@ -24,7 +24,7 @@ export const withTabs = () => {
|
|
|
24
24
|
label={
|
|
25
25
|
<>
|
|
26
26
|
<div className="Tab-count">
|
|
27
|
-
<
|
|
27
|
+
<Pills appearance="secondary">2</Pills>
|
|
28
28
|
</div>
|
|
29
29
|
<Text appearance={active !== 0 ? 'subtle' : undefined}>Tab 1</Text>
|
|
30
30
|
</>
|
|
@@ -36,7 +36,7 @@ export const withTabs = () => {
|
|
|
36
36
|
label={
|
|
37
37
|
<>
|
|
38
38
|
<div className="Tab-count">
|
|
39
|
-
<
|
|
39
|
+
<Pills appearance="secondary">12</Pills>
|
|
40
40
|
</div>
|
|
41
41
|
<Text appearance={active !== 1 ? 'subtle' : undefined}>Tab 2</Text>
|
|
42
42
|
</>
|
|
@@ -48,7 +48,7 @@ export const withTabs = () => {
|
|
|
48
48
|
label={
|
|
49
49
|
<>
|
|
50
50
|
<div className="Tab-count">
|
|
51
|
-
<
|
|
51
|
+
<Pills appearance="secondary">5</Pills>
|
|
52
52
|
</div>
|
|
53
53
|
<Text appearance={active !== 2 ? 'subtle' : undefined}>Tab 3</Text>
|
|
54
54
|
</>
|
|
@@ -95,7 +95,7 @@ const customCode = `() => {
|
|
|
95
95
|
label={(
|
|
96
96
|
<>
|
|
97
97
|
<div className="Tab-count">
|
|
98
|
-
<
|
|
98
|
+
<Pills appearance="secondary">2</Pills>
|
|
99
99
|
</div>
|
|
100
100
|
<Text appearance={active !== 0 ? 'subtle' : undefined}>Tab 1</Text>
|
|
101
101
|
</>
|
|
@@ -107,7 +107,7 @@ const customCode = `() => {
|
|
|
107
107
|
label={(
|
|
108
108
|
<>
|
|
109
109
|
<div className="Tab-count">
|
|
110
|
-
<
|
|
110
|
+
<Pills appearance="secondary">12</Pills>
|
|
111
111
|
</div>
|
|
112
112
|
<Text appearance={active !== 1 ? 'subtle' : undefined}>Tab 2</Text>
|
|
113
113
|
</>
|
|
@@ -119,7 +119,7 @@ const customCode = `() => {
|
|
|
119
119
|
label={(
|
|
120
120
|
<>
|
|
121
121
|
<div className="Tab-count">
|
|
122
|
-
<
|
|
122
|
+
<Pills appearance="secondary">5</Pills>
|
|
123
123
|
</div>
|
|
124
124
|
<Text appearance={active !== 2 ? 'subtle' : undefined}>Tab 3</Text>
|
|
125
125
|
</>
|
|
@@ -13,10 +13,12 @@ export interface MenuItemProps extends BaseProps {
|
|
|
13
13
|
isChildren?: boolean;
|
|
14
14
|
isChildrenVisible?: boolean;
|
|
15
15
|
onClick?: (menu: Menu) => void;
|
|
16
|
+
customItemRenderer?: (props: MenuItemProps) => JSX.Element;
|
|
16
17
|
}
|
|
17
18
|
|
|
18
19
|
export const MenuItem = (props: MenuItemProps) => {
|
|
19
|
-
const { menu, isActive, expanded, rounded, hasSubmenu, isChildren, isChildrenVisible, onClick } =
|
|
20
|
+
const { menu, isActive, expanded, rounded, hasSubmenu, isChildren, isChildrenVisible, onClick, customItemRenderer } =
|
|
21
|
+
props;
|
|
20
22
|
|
|
21
23
|
const baseProps = extractBaseProps(props);
|
|
22
24
|
|
|
@@ -70,7 +72,9 @@ export const MenuItem = (props: MenuItemProps) => {
|
|
|
70
72
|
|
|
71
73
|
if (!expanded && !menu.icon) return null;
|
|
72
74
|
|
|
73
|
-
return (
|
|
75
|
+
return customItemRenderer ? (
|
|
76
|
+
customItemRenderer(props)
|
|
77
|
+
) : (
|
|
74
78
|
// TODO(a11y)
|
|
75
79
|
// eslint-disable-next-line
|
|
76
80
|
<div className={ItemClass} {...baseProps} onClick={onClickHandler}>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import classNames from 'classnames';
|
|
3
3
|
import { Text } from '@/index';
|
|
4
|
-
import { MenuItem } from './MenuItem';
|
|
4
|
+
import { MenuItem, MenuItemProps } from './MenuItem';
|
|
5
5
|
import { BaseProps, extractBaseProps } from '@/utils/types';
|
|
6
6
|
import { getMenu, isMenuActive, ActiveMenu, Menu } from '@/utils/navigationHelper';
|
|
7
7
|
|
|
@@ -54,6 +54,10 @@ export interface VerticalNavProps extends BaseProps {
|
|
|
54
54
|
* Only one SubMenu visible at a time**(applicable only for type: `vertical`)**
|
|
55
55
|
*/
|
|
56
56
|
autoCollapse: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* Option to pass Custom Item Renderer
|
|
59
|
+
*/
|
|
60
|
+
customItemRenderer?: (props: MenuItemProps) => JSX.Element;
|
|
57
61
|
}
|
|
58
62
|
|
|
59
63
|
/**
|
|
@@ -61,7 +65,7 @@ export interface VerticalNavProps extends BaseProps {
|
|
|
61
65
|
*/
|
|
62
66
|
|
|
63
67
|
export const VerticalNav = (props: VerticalNavProps) => {
|
|
64
|
-
const { menus, active, onClick, expanded, rounded, autoCollapse, className } = props;
|
|
68
|
+
const { menus, active, onClick, expanded, rounded, autoCollapse, className, customItemRenderer } = props;
|
|
65
69
|
|
|
66
70
|
const [menuState, setMenuState] = React.useState<Record<string, boolean>>({});
|
|
67
71
|
const baseProps = extractBaseProps(props);
|
|
@@ -137,6 +141,7 @@ export const VerticalNav = (props: VerticalNavProps) => {
|
|
|
137
141
|
rounded={rounded}
|
|
138
142
|
isChildrenVisible={isChildrenVisible}
|
|
139
143
|
onClick={onClickHandler}
|
|
144
|
+
customItemRenderer={customItemRenderer}
|
|
140
145
|
/>
|
|
141
146
|
{menuState[menu.name] &&
|
|
142
147
|
menu.subMenu &&
|
|
@@ -151,6 +156,7 @@ export const VerticalNav = (props: VerticalNavProps) => {
|
|
|
151
156
|
rounded={rounded}
|
|
152
157
|
onClick={onClickHandler}
|
|
153
158
|
isActive={isMenuActive(menus, subMenu, active)}
|
|
159
|
+
customItemRenderer={customItemRenderer}
|
|
154
160
|
/>
|
|
155
161
|
);
|
|
156
162
|
})}
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { VerticalNav, Icon, Tooltip, Text } from '@/index';
|
|
3
|
+
import { MenuItemProps } from '../MenuItem';
|
|
4
|
+
|
|
5
|
+
export const CustomItemsRenderer = () => {
|
|
6
|
+
const data = [
|
|
7
|
+
{
|
|
8
|
+
name: 'clinical_data',
|
|
9
|
+
label: 'Clinical Data',
|
|
10
|
+
icon: 'assignment_ind',
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
name: 'care_management',
|
|
14
|
+
label: 'Care Management',
|
|
15
|
+
icon: 'forum',
|
|
16
|
+
subMenu: [
|
|
17
|
+
{
|
|
18
|
+
name: 'care_management.timeline',
|
|
19
|
+
label: 'Timeline',
|
|
20
|
+
icon: 'people',
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
name: 'care_management.care_protocol',
|
|
24
|
+
label: 'Care Protocol',
|
|
25
|
+
icon: 'fact_check',
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
name: 'care_management.assessments',
|
|
29
|
+
label: 'Assessments',
|
|
30
|
+
icon: 'assessment',
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
name: 'care_management.tasks',
|
|
34
|
+
label: 'Tasks',
|
|
35
|
+
icon: 'alarm',
|
|
36
|
+
},
|
|
37
|
+
],
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
name: 'episodes',
|
|
41
|
+
label: 'Episodes',
|
|
42
|
+
icon: 'airline_seat_flat_angled',
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
name: 'risk',
|
|
46
|
+
label: 'Risk',
|
|
47
|
+
icon: 'favorite',
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
name: 'preventive_health',
|
|
51
|
+
label: 'Preventive Health',
|
|
52
|
+
icon: 'beenhere',
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
name: 'profile',
|
|
56
|
+
label: 'Profile',
|
|
57
|
+
icon: 'receipt',
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
name: 'claims',
|
|
61
|
+
label: 'Claims',
|
|
62
|
+
icon: 'account_circle',
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
name: 'manual_entry',
|
|
66
|
+
label: 'Manual Entry',
|
|
67
|
+
icon: 'edit',
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
name: 'patient_notes',
|
|
71
|
+
label: 'Patient Notes',
|
|
72
|
+
icon: 'note_add',
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
name: 'documents',
|
|
76
|
+
label: 'Documents',
|
|
77
|
+
icon: 'assignment',
|
|
78
|
+
},
|
|
79
|
+
];
|
|
80
|
+
|
|
81
|
+
const [active, setActive] = React.useState({
|
|
82
|
+
name: 'care_management.timeline',
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
const customItemRenderer = (props: MenuItemProps) => {
|
|
86
|
+
const { menu, expanded, isChildren } = props;
|
|
87
|
+
return (
|
|
88
|
+
<div className={`p-5 d-flex align-items-center cursor-pointer ${isChildren ? 'ml-7' : ''}`}>
|
|
89
|
+
{menu.icon && (
|
|
90
|
+
<Icon data-test="DesignSystem-VerticalNav--Icon" className={expanded ? 'mr-4' : ''} name={menu.icon} />
|
|
91
|
+
)}
|
|
92
|
+
<Tooltip tooltip={menu.label}>
|
|
93
|
+
<Text weight="medium">{menu.label}</Text>
|
|
94
|
+
</Tooltip>
|
|
95
|
+
</div>
|
|
96
|
+
);
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
return (
|
|
100
|
+
<div style={{ height: '90vh', background: 'var(--secondary-lightest)' }}>
|
|
101
|
+
<VerticalNav
|
|
102
|
+
menus={data}
|
|
103
|
+
expanded={true}
|
|
104
|
+
active={active}
|
|
105
|
+
onClick={setActive}
|
|
106
|
+
customItemRenderer={customItemRenderer}
|
|
107
|
+
/>
|
|
108
|
+
</div>
|
|
109
|
+
);
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
const customCode = `() => {
|
|
113
|
+
const data = [
|
|
114
|
+
{
|
|
115
|
+
name: 'clinical_data',
|
|
116
|
+
label: 'Clinical Data',
|
|
117
|
+
icon: 'assignment_ind'
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
name: 'care_management',
|
|
121
|
+
label: 'Care Management',
|
|
122
|
+
icon: 'forum',
|
|
123
|
+
subMenu: [
|
|
124
|
+
{
|
|
125
|
+
name: 'care_management.timeline',
|
|
126
|
+
label: 'Timeline',
|
|
127
|
+
icon: 'people'
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
name: 'care_management.care_protocol',
|
|
131
|
+
label: 'Care Protocol',
|
|
132
|
+
icon: 'fact_check'
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
name: 'care_management.assessments',
|
|
136
|
+
label: 'Assessments',
|
|
137
|
+
icon: 'assessment'
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
name: 'care_management.tasks',
|
|
141
|
+
label: 'Tasks',
|
|
142
|
+
icon: 'alarm'
|
|
143
|
+
},
|
|
144
|
+
]
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
name: 'episodes',
|
|
148
|
+
label: 'Episodes',
|
|
149
|
+
icon: 'airline_seat_flat_angled'
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
name: 'risk',
|
|
153
|
+
label: 'Risk',
|
|
154
|
+
icon: 'favorite'
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
name: 'preventive_health',
|
|
158
|
+
label: 'Preventive Health',
|
|
159
|
+
icon: 'beenhere'
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
name: 'profile',
|
|
163
|
+
label: 'Profile',
|
|
164
|
+
icon: 'receipt'
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
name: 'claims',
|
|
168
|
+
label: 'Claims',
|
|
169
|
+
icon: 'account_circle'
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
name: 'manual_entry',
|
|
173
|
+
label: 'Manual Entry',
|
|
174
|
+
icon: 'edit'
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
name: 'patient_notes',
|
|
178
|
+
label: 'Patient Notes',
|
|
179
|
+
icon: 'note_add'
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
name: 'documents',
|
|
183
|
+
label: 'Documents',
|
|
184
|
+
icon: 'assignment'
|
|
185
|
+
},
|
|
186
|
+
];
|
|
187
|
+
|
|
188
|
+
const [active, setActive] = React.useState({
|
|
189
|
+
name: 'care_management.timeline'
|
|
190
|
+
});
|
|
191
|
+
|
|
192
|
+
const customItemRenderer = (props) => {
|
|
193
|
+
const {menu, onClick, expanded, isChildren} = props;
|
|
194
|
+
return (
|
|
195
|
+
<div
|
|
196
|
+
onClick={() => onClick(menu)}
|
|
197
|
+
className={\`p-5 d-flex align-items-center cursor-pointer \${isChildren ? 'ml-7' : ''}\`}
|
|
198
|
+
>
|
|
199
|
+
{menu.icon &&
|
|
200
|
+
<Icon
|
|
201
|
+
data-test="DesignSystem-VerticalNav--Icon"
|
|
202
|
+
className={expanded ? 'mr-4' : ''}
|
|
203
|
+
name={menu.icon}
|
|
204
|
+
/>
|
|
205
|
+
}
|
|
206
|
+
<Tooltip tooltip={menu.label}>
|
|
207
|
+
<Text weight="medium">
|
|
208
|
+
{menu.label}
|
|
209
|
+
</Text>
|
|
210
|
+
</Tooltip>
|
|
211
|
+
</div>
|
|
212
|
+
);
|
|
213
|
+
};
|
|
214
|
+
|
|
215
|
+
return (
|
|
216
|
+
<div style={{ height: '90vh', background: 'var(--secondary-lightest)' }}>
|
|
217
|
+
<VerticalNav
|
|
218
|
+
menus={data}
|
|
219
|
+
expanded={true}
|
|
220
|
+
active={active}
|
|
221
|
+
onClick={setActive}
|
|
222
|
+
customItemRenderer={customItemRenderer}
|
|
223
|
+
/>
|
|
224
|
+
</div>
|
|
225
|
+
);
|
|
226
|
+
}`;
|
|
227
|
+
|
|
228
|
+
export default {
|
|
229
|
+
title: 'Components/VerticalNav/Custom Items Renderer',
|
|
230
|
+
component: VerticalNav,
|
|
231
|
+
parameters: {
|
|
232
|
+
docs: {
|
|
233
|
+
docPage: {
|
|
234
|
+
customCode,
|
|
235
|
+
},
|
|
236
|
+
},
|
|
237
|
+
},
|
|
238
|
+
};
|