@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,19 @@
|
|
|
1
|
+
.container {
|
|
2
|
+
border-radius: var(--spacing-m);
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.copy-clipboard {
|
|
6
|
+
color: var(--white);
|
|
7
|
+
background: var(--inverse-light);
|
|
8
|
+
padding: var(--spacing-m);
|
|
9
|
+
border-radius: var(--spacing-m);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.overflow-visible {
|
|
13
|
+
overflow: visible;
|
|
14
|
+
word-break: break-word;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.underline {
|
|
18
|
+
text-decoration: underline;
|
|
19
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {
|
|
3
|
+
Card,
|
|
4
|
+
CardBody,
|
|
5
|
+
Tooltip,
|
|
6
|
+
Paragraph,
|
|
7
|
+
Column,
|
|
8
|
+
} from '@innovaccer/design-system';
|
|
9
|
+
import './Colors.css';
|
|
10
|
+
|
|
11
|
+
const Colors = (props) => {
|
|
12
|
+
const { colorData, toggleToast } = props;
|
|
13
|
+
const [isHover, setIsHover] = React.useState();
|
|
14
|
+
const ref = React.createRef();
|
|
15
|
+
return colorData.map((elt) => {
|
|
16
|
+
return (
|
|
17
|
+
<Column size='4'>
|
|
18
|
+
<Card
|
|
19
|
+
className='mr-7 mt-7 overflow-visible'
|
|
20
|
+
shadow='none'
|
|
21
|
+
ref={ref}
|
|
22
|
+
>
|
|
23
|
+
<div className='px-6'>
|
|
24
|
+
<div
|
|
25
|
+
style={{
|
|
26
|
+
backgroundColor: elt.backgroundColor,
|
|
27
|
+
}}
|
|
28
|
+
className='my-6 container w-auto'
|
|
29
|
+
></div>
|
|
30
|
+
<Tooltip
|
|
31
|
+
tooltip='Copy to clipboard'
|
|
32
|
+
appendToBody={false}
|
|
33
|
+
boundaryElement={ref}
|
|
34
|
+
>
|
|
35
|
+
<Paragraph
|
|
36
|
+
onClick={() => {
|
|
37
|
+
navigator.clipboard.writeText(
|
|
38
|
+
elt.hexCode
|
|
39
|
+
);
|
|
40
|
+
toggleToast(`Copied "${elt.hexCode}"`);
|
|
41
|
+
}}
|
|
42
|
+
className='cursor-pointer'
|
|
43
|
+
onMouseEnter={() => setIsHover(elt.name)}
|
|
44
|
+
onMouseLeave={() => setIsHover()}
|
|
45
|
+
>
|
|
46
|
+
{elt.name}
|
|
47
|
+
</Paragraph>
|
|
48
|
+
</Tooltip>
|
|
49
|
+
<div className='d-flex mb-7 mt-5'>
|
|
50
|
+
<div className='mr-auto'>
|
|
51
|
+
<Paragraph
|
|
52
|
+
appearance='subtle'
|
|
53
|
+
className='my-2'
|
|
54
|
+
>
|
|
55
|
+
Hex
|
|
56
|
+
</Paragraph>
|
|
57
|
+
<Paragraph
|
|
58
|
+
className={`${
|
|
59
|
+
isHover === elt.name ? 'underline' : ''
|
|
60
|
+
}`}
|
|
61
|
+
>
|
|
62
|
+
{elt.hexCode}
|
|
63
|
+
</Paragraph>
|
|
64
|
+
</div>
|
|
65
|
+
<div>
|
|
66
|
+
<Paragraph
|
|
67
|
+
appearance='subtle'
|
|
68
|
+
className='my-2'
|
|
69
|
+
>
|
|
70
|
+
RGB
|
|
71
|
+
</Paragraph>
|
|
72
|
+
<Paragraph>{elt.colorCode}</Paragraph>
|
|
73
|
+
</div>
|
|
74
|
+
</div>
|
|
75
|
+
</div>
|
|
76
|
+
</Card>
|
|
77
|
+
</Column>
|
|
78
|
+
);
|
|
79
|
+
});
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
export default Colors;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {
|
|
3
|
+
Heading,
|
|
4
|
+
Tabs,
|
|
5
|
+
Tab,
|
|
6
|
+
Paragraph
|
|
7
|
+
} from '@innovaccer/design-system';
|
|
8
|
+
import { navigate } from 'gatsby';
|
|
9
|
+
|
|
10
|
+
const ComponentsContainer = ({
|
|
11
|
+
children,
|
|
12
|
+
pageTitle,
|
|
13
|
+
relativePagePath,
|
|
14
|
+
tabs,
|
|
15
|
+
pageDescription,
|
|
16
|
+
frontmatter
|
|
17
|
+
}) => {
|
|
18
|
+
const page = relativePagePath.split('/');
|
|
19
|
+
const pageName = page[page.length - 1].split('.')[0];
|
|
20
|
+
const isSiblingTab = relativePagePath.split('.')[0] === '/' + pageTitle.replace(/\s/g, '');
|
|
21
|
+
const tabsList = isSiblingTab ? frontmatter?.tabs : tabs;
|
|
22
|
+
|
|
23
|
+
const getTabSlug = (tabIndex) => {
|
|
24
|
+
const tabName = tabsList[tabIndex];
|
|
25
|
+
let tabSlug = '';
|
|
26
|
+
if (tabName.length) {
|
|
27
|
+
tabSlug = tabName.toLowerCase().replace(/\s/g, '-');
|
|
28
|
+
}
|
|
29
|
+
return tabSlug;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
const activeTab =
|
|
33
|
+
tabsList && tabsList.length
|
|
34
|
+
? tabsList.findIndex(
|
|
35
|
+
(tab, index) =>
|
|
36
|
+
getTabSlug(index) === pageName.toLowerCase()
|
|
37
|
+
)
|
|
38
|
+
: '';
|
|
39
|
+
|
|
40
|
+
const [activeIndex, setActiveIndex] = React.useState(
|
|
41
|
+
activeTab || 0
|
|
42
|
+
);
|
|
43
|
+
|
|
44
|
+
const onTabChangeHandler = (tabIndex) => {
|
|
45
|
+
const nextTabSlug = getTabSlug(tabIndex);
|
|
46
|
+
const pagePath = relativePagePath.split('/');
|
|
47
|
+
const pages = pagePath.slice(0, pagePath.length - 1);
|
|
48
|
+
const path = `${pages.join('/')}/${nextTabSlug}/`;
|
|
49
|
+
navigate(path);
|
|
50
|
+
setActiveIndex(tabIndex);
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
return (
|
|
54
|
+
<>
|
|
55
|
+
<Heading>{isSiblingTab ? frontmatter?.title : pageTitle}</Heading>
|
|
56
|
+
<Paragraph>{isSiblingTab ? frontmatter?.description : pageDescription}</Paragraph>
|
|
57
|
+
|
|
58
|
+
{tabsList && tabsList.length && (
|
|
59
|
+
<div className='mb-7 mt-4'>
|
|
60
|
+
<Tabs
|
|
61
|
+
activeIndex={activeIndex}
|
|
62
|
+
onTabChange={onTabChangeHandler}
|
|
63
|
+
>
|
|
64
|
+
{tabsList.map((tab, index) => (
|
|
65
|
+
<Tab label={tab} key={index}></Tab>
|
|
66
|
+
))}
|
|
67
|
+
</Tabs>
|
|
68
|
+
</div>
|
|
69
|
+
)}
|
|
70
|
+
{children}
|
|
71
|
+
</>
|
|
72
|
+
);
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
export default ComponentsContainer;
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {
|
|
3
|
+
Paragraph,
|
|
4
|
+
Heading,
|
|
5
|
+
Tabs,
|
|
6
|
+
Tab,
|
|
7
|
+
Button,
|
|
8
|
+
} from '@innovaccer/design-system';
|
|
9
|
+
import { navigate } from 'gatsby';
|
|
10
|
+
import { useLogoItems } from '../../util/Logos';
|
|
11
|
+
|
|
12
|
+
const Container = ({
|
|
13
|
+
children,
|
|
14
|
+
pageTitle,
|
|
15
|
+
tabs,
|
|
16
|
+
relativePagePath,
|
|
17
|
+
pageDescription,
|
|
18
|
+
logos,
|
|
19
|
+
frontmatter
|
|
20
|
+
}) => {
|
|
21
|
+
const nodes = useLogoItems();
|
|
22
|
+
const page = relativePagePath.split('/');
|
|
23
|
+
const pageName = page[page.length - 1].split('.')[0];
|
|
24
|
+
|
|
25
|
+
const isSiblingTab = relativePagePath.split('.')[0] === '/' + pageTitle.replace(/\s/g, '');
|
|
26
|
+
const tabsList = isSiblingTab ? frontmatter?.tabs : tabs;
|
|
27
|
+
const logoList = isSiblingTab ? frontmatter?.logos : logos;
|
|
28
|
+
|
|
29
|
+
const getTabSlug = (tabIndex) => {
|
|
30
|
+
const tabName = tabsList[tabIndex];
|
|
31
|
+
let tabSlug = '';
|
|
32
|
+
if (tabName.length) {
|
|
33
|
+
tabSlug = tabName.toLowerCase().replace(/\s/g, '-');
|
|
34
|
+
}
|
|
35
|
+
return tabSlug;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
const activeTab =
|
|
39
|
+
tabsList && tabsList.length
|
|
40
|
+
? tabsList.findIndex(
|
|
41
|
+
(tab, index) =>
|
|
42
|
+
getTabSlug(index) === pageName.toLowerCase()
|
|
43
|
+
)
|
|
44
|
+
: '';
|
|
45
|
+
|
|
46
|
+
const [activeIndex, setActiveIndex] = React.useState(
|
|
47
|
+
activeTab || 0
|
|
48
|
+
);
|
|
49
|
+
|
|
50
|
+
const onTabChangeHandler = (tabIndex) => {
|
|
51
|
+
const nextTabSlug = getTabSlug(tabIndex);
|
|
52
|
+
const pagePath = relativePagePath.split('/');
|
|
53
|
+
const pages = pagePath.slice(0, pagePath.length - 1);
|
|
54
|
+
const path = `${pages.join('/')}/${nextTabSlug}/`;
|
|
55
|
+
navigate(path);
|
|
56
|
+
setActiveIndex(tabIndex);
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
const downloadAllLogos = () => {
|
|
60
|
+
const images = logoList.map((logo) => {
|
|
61
|
+
const filteredGatsbyImage = nodes.filter((img) =>
|
|
62
|
+
img.fluid.src.includes(logo)
|
|
63
|
+
);
|
|
64
|
+
if (filteredGatsbyImage.length) {
|
|
65
|
+
return {
|
|
66
|
+
name: logo,
|
|
67
|
+
src: filteredGatsbyImage[0].fluid.src,
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
images.map((image) => {
|
|
72
|
+
let element = document.createElement('a');
|
|
73
|
+
element.href = image.src;
|
|
74
|
+
element.setAttribute('download', image.name);
|
|
75
|
+
document.body.appendChild(element);
|
|
76
|
+
element.click();
|
|
77
|
+
document.body.removeChild(element);
|
|
78
|
+
});
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
return (
|
|
82
|
+
<>
|
|
83
|
+
<Heading size='xl' className='my-5'>
|
|
84
|
+
{isSiblingTab ? frontmatter?.title : pageTitle}
|
|
85
|
+
</Heading>
|
|
86
|
+
{logoList && logoList.length && (
|
|
87
|
+
<Button
|
|
88
|
+
className='download-logos'
|
|
89
|
+
icon='download'
|
|
90
|
+
onClick={downloadAllLogos}
|
|
91
|
+
>
|
|
92
|
+
Download all
|
|
93
|
+
</Button>
|
|
94
|
+
)}
|
|
95
|
+
{tabsList && tabsList.length && (
|
|
96
|
+
<>
|
|
97
|
+
<Paragraph>{isSiblingTab ? frontmatter?.description : pageDescription}</Paragraph>
|
|
98
|
+
<Tabs
|
|
99
|
+
activeIndex={activeIndex}
|
|
100
|
+
onTabChange={onTabChangeHandler}
|
|
101
|
+
className='mb-6 mt-4'
|
|
102
|
+
>
|
|
103
|
+
{tabsList.map((tab) => (
|
|
104
|
+
<Tab label={tab}></Tab>
|
|
105
|
+
))}
|
|
106
|
+
</Tabs>
|
|
107
|
+
</>
|
|
108
|
+
)}
|
|
109
|
+
{children}
|
|
110
|
+
</>
|
|
111
|
+
);
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
export default Container;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Link, Text } from '@innovaccer/design-system';
|
|
3
|
+
import { useFooterItems } from '../../util/FooterItems';
|
|
4
|
+
import './Footer.css';
|
|
5
|
+
|
|
6
|
+
const Footer = ({ relativePagePath }) => {
|
|
7
|
+
const items = useFooterItems();
|
|
8
|
+
return (
|
|
9
|
+
<div
|
|
10
|
+
className={`d-flex w-100 px-12 py-7 bg-secondary-lightest position-sticky align-items-center ${relativePagePath === '/home' ? 'justify-content-center' : ''}`}>
|
|
11
|
+
<div>
|
|
12
|
+
{items.map(({ link, label }, index) => {
|
|
13
|
+
let isExternal;
|
|
14
|
+
if (link) {
|
|
15
|
+
isExternal =
|
|
16
|
+
link.startsWith('http://') ||
|
|
17
|
+
link.startsWith('https://');
|
|
18
|
+
}
|
|
19
|
+
return (
|
|
20
|
+
<Link
|
|
21
|
+
key={index}
|
|
22
|
+
href={link}
|
|
23
|
+
className={`link ${index > 0 ? 'mr-7' : 'mr-8'} `}
|
|
24
|
+
target={isExternal && '_blank'}
|
|
25
|
+
disabled={index === 0}
|
|
26
|
+
>
|
|
27
|
+
<Text
|
|
28
|
+
appearance={index === 0 ? 'subtle' : 'default'}
|
|
29
|
+
>
|
|
30
|
+
{label}
|
|
31
|
+
</Text>
|
|
32
|
+
</Link>
|
|
33
|
+
);
|
|
34
|
+
})}
|
|
35
|
+
</div>
|
|
36
|
+
</div>
|
|
37
|
+
);
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export default Footer;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
.header {
|
|
2
|
+
z-index: 1000;
|
|
3
|
+
top: 0;
|
|
4
|
+
align-items: center;
|
|
5
|
+
border-bottom: var(--border);
|
|
6
|
+
padding-top: var(--spacing-s);
|
|
7
|
+
padding-bottom: 1px;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.HeaderLink:hover {
|
|
11
|
+
border-bottom: none !important;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.HeaderLink:focus {
|
|
15
|
+
box-shadow: none !important;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.HeaderLink {
|
|
19
|
+
text-decoration: none;
|
|
20
|
+
font-weight: var(--font-weight-normal);
|
|
21
|
+
padding: var(--spacing) 0;
|
|
22
|
+
margin-left: var(--spacing-3);
|
|
23
|
+
line-height: 0;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.HeaderLink--active {
|
|
27
|
+
color: var(--text-link);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.HeaderLink--default {
|
|
31
|
+
color: var(--inverse);
|
|
32
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Link } from 'gatsby';
|
|
3
|
+
import { useHeaderItems } from '../../util/HeaderItems';
|
|
4
|
+
import './Header.css';
|
|
5
|
+
import { Link as MDSLink } from '@innovaccer/design-system';
|
|
6
|
+
|
|
7
|
+
const Header = ({ relativePagePath }) => {
|
|
8
|
+
const items = useHeaderItems();
|
|
9
|
+
return (
|
|
10
|
+
<div
|
|
11
|
+
id="mainHeader"
|
|
12
|
+
className='header bg-light d-flex w-100 position-sticky px-5'
|
|
13
|
+
>
|
|
14
|
+
<Link to='/' className='HeaderLink ml-0'>
|
|
15
|
+
<img src="/images/headerLogo.png" width="290px" height="28px" />
|
|
16
|
+
</Link>
|
|
17
|
+
<div >
|
|
18
|
+
{items.map(({ link, label }, index) => {
|
|
19
|
+
const isExternal =
|
|
20
|
+
link.startsWith('http://') ||
|
|
21
|
+
link.startsWith('https://');
|
|
22
|
+
|
|
23
|
+
if (isExternal) {
|
|
24
|
+
return (
|
|
25
|
+
<MDSLink
|
|
26
|
+
key={index}
|
|
27
|
+
href={link}
|
|
28
|
+
className="HeaderLink HeaderLink--default"
|
|
29
|
+
target="_blank"
|
|
30
|
+
>
|
|
31
|
+
{label}
|
|
32
|
+
</MDSLink>
|
|
33
|
+
)
|
|
34
|
+
}
|
|
35
|
+
return (
|
|
36
|
+
<Link
|
|
37
|
+
key={index}
|
|
38
|
+
to={link}
|
|
39
|
+
className={`HeaderLink ${relativePagePath.includes(
|
|
40
|
+
label.toLowerCase()
|
|
41
|
+
)
|
|
42
|
+
? 'HeaderLink--active'
|
|
43
|
+
: ''
|
|
44
|
+
} ${relativePagePath.includes(
|
|
45
|
+
label.toLowerCase()
|
|
46
|
+
)
|
|
47
|
+
? 'HeaderLink--active'
|
|
48
|
+
: 'HeaderLink--default'
|
|
49
|
+
}`}
|
|
50
|
+
>
|
|
51
|
+
{label}
|
|
52
|
+
</Link>
|
|
53
|
+
);
|
|
54
|
+
})}
|
|
55
|
+
</div>
|
|
56
|
+
</div>
|
|
57
|
+
);
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export default Header;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Row, Column, Text } from '@innovaccer/design-system';
|
|
3
|
+
|
|
4
|
+
const LastModifiedDate = ({ date }) => {
|
|
5
|
+
const options = {
|
|
6
|
+
day: '2-digit',
|
|
7
|
+
year: 'numeric',
|
|
8
|
+
month: 'long',
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
const lastModified = new Date(date);
|
|
12
|
+
|
|
13
|
+
return date ? (
|
|
14
|
+
<Row>
|
|
15
|
+
<Column>
|
|
16
|
+
<Text>
|
|
17
|
+
Page last updated: {lastModified.toLocaleDateString('en-GB', options)}
|
|
18
|
+
{/* // https://www-03preprod.ibm.com/support/knowledgecenter/ibm_style/dates-and-times.html */}
|
|
19
|
+
</Text>
|
|
20
|
+
</Column>
|
|
21
|
+
</Row>
|
|
22
|
+
) : null;
|
|
23
|
+
};
|
|
24
|
+
export default LastModifiedDate;
|