@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,291 @@
|
|
|
1
|
+
/* eslint-disable import/no-unresolved */
|
|
2
|
+
import React, { useState } from 'react';
|
|
3
|
+
import '@fontsource/nunito-sans';
|
|
4
|
+
import {
|
|
5
|
+
Row,
|
|
6
|
+
Column,
|
|
7
|
+
Heading,
|
|
8
|
+
Button,
|
|
9
|
+
Toast,
|
|
10
|
+
} from '@innovaccer/design-system';
|
|
11
|
+
import LeftNav from './LeftNav';
|
|
12
|
+
import TableOfContent from './TableOfContent/TableOfContent';
|
|
13
|
+
import Header from './Header';
|
|
14
|
+
import Container from './Container';
|
|
15
|
+
import ComponentsContainer from './Container/ComponentsContainer';
|
|
16
|
+
import { MDXProvider } from "@mdx-js/react";
|
|
17
|
+
import * as MDSComponents from '@innovaccer/design-system';
|
|
18
|
+
import Meta from './Meta';
|
|
19
|
+
import './css/style.css';
|
|
20
|
+
import PropsTable from './PropsTable/index';
|
|
21
|
+
import Rules from './Rules/Rules';
|
|
22
|
+
import DOs from './Rules/DOs';
|
|
23
|
+
import DONTs from './Rules/DONTs';
|
|
24
|
+
import InlineMessage from './Rules/InlineMessage';
|
|
25
|
+
import IconWrapper from './Rules/IconWrapper';
|
|
26
|
+
import Footer from './Footer/Footer';
|
|
27
|
+
import ProductLogos from './Logos/Logos';
|
|
28
|
+
import ProductColors from './Colors/Colors';
|
|
29
|
+
import { useGetStorybookData } from '../util/StorybookData';
|
|
30
|
+
import { ArgsTable } from './PropsTable/Table';
|
|
31
|
+
import Markdown from 'markdown-to-jsx';
|
|
32
|
+
import { useFrontmatter } from '../util/Frontmatter';
|
|
33
|
+
|
|
34
|
+
const copyToClipboard = (str) => {
|
|
35
|
+
let codeBlock = '';
|
|
36
|
+
if (Object.keys(str).length > 0) {
|
|
37
|
+
const element = str.props.children;
|
|
38
|
+
if (Array.isArray(element) && element.length) {
|
|
39
|
+
element.map((elt) => {
|
|
40
|
+
if (typeof elt === 'object') {
|
|
41
|
+
codeBlock = codeBlock + elt.props.children;
|
|
42
|
+
} else {
|
|
43
|
+
codeBlock = codeBlock + elt;
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
} else {
|
|
47
|
+
codeBlock = str.props.children;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
navigator.clipboard.writeText(codeBlock);
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
const Code = ({ children, ...rest }) => {
|
|
54
|
+
return (
|
|
55
|
+
<>
|
|
56
|
+
<div {...rest}>{children}</div>
|
|
57
|
+
<Button
|
|
58
|
+
icon='copy'
|
|
59
|
+
className='ml-auto p-0'
|
|
60
|
+
onClick={() => copyToClipboard(children)}
|
|
61
|
+
/>
|
|
62
|
+
</>
|
|
63
|
+
);
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
const List = ({ children, ...rest }) => {
|
|
67
|
+
return (
|
|
68
|
+
<div className='list'>
|
|
69
|
+
{children}
|
|
70
|
+
</div>
|
|
71
|
+
)
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
const leftMenuList = [
|
|
75
|
+
{
|
|
76
|
+
title: 'Gatsby Theme MDS'
|
|
77
|
+
}
|
|
78
|
+
];
|
|
79
|
+
|
|
80
|
+
const Layout = ({
|
|
81
|
+
children,
|
|
82
|
+
titleType,
|
|
83
|
+
pageTitle,
|
|
84
|
+
pageDescription,
|
|
85
|
+
pageKeywords,
|
|
86
|
+
relativePagePath,
|
|
87
|
+
component,
|
|
88
|
+
tabs,
|
|
89
|
+
logos,
|
|
90
|
+
showMobile,
|
|
91
|
+
...rest
|
|
92
|
+
}) => {
|
|
93
|
+
const is404 = children && children.key === null;
|
|
94
|
+
const [isToastActive, setIsToastActive] = useState(false);
|
|
95
|
+
const [toastTitle, setToastTitle] = useState('');
|
|
96
|
+
const frontmatter = useFrontmatter(relativePagePath);
|
|
97
|
+
|
|
98
|
+
function getJsxCode(name) {
|
|
99
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
100
|
+
const componentData = useGetStorybookData(name);
|
|
101
|
+
|
|
102
|
+
const jsxCode = componentData && componentData.parameters
|
|
103
|
+
? componentData.parameters.docs.docPage?.customCode ||
|
|
104
|
+
componentData.parameters.storySource.source
|
|
105
|
+
: '';
|
|
106
|
+
return jsxCode;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
function getPropTableData(name) {
|
|
110
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
111
|
+
const componentData = useGetStorybookData(name);
|
|
112
|
+
|
|
113
|
+
const jsxCode = componentData
|
|
114
|
+
? componentData.parameters.argTypes
|
|
115
|
+
: '';
|
|
116
|
+
return jsxCode;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
const Preview = ({ name }) => {
|
|
120
|
+
return (
|
|
121
|
+
<div>
|
|
122
|
+
<PropsTable
|
|
123
|
+
componentData={getJsxCode(name)}
|
|
124
|
+
/>
|
|
125
|
+
</div>
|
|
126
|
+
);
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
const A11yBlock = ({ name }) => {
|
|
130
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
131
|
+
const componentData = useGetStorybookData(name);
|
|
132
|
+
const a11yProps = componentData && componentData.parameters.docs.docPage?.a11yProps;
|
|
133
|
+
return (
|
|
134
|
+
<div className="mb-8">
|
|
135
|
+
{a11yProps && <Markdown className="A11y-markdown">{a11yProps}</Markdown>}
|
|
136
|
+
</div>
|
|
137
|
+
);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
const PreviewWithPropTable = ({ name }) => {
|
|
141
|
+
return (
|
|
142
|
+
<div className="overflow-x-scroll">
|
|
143
|
+
<ArgsTable rows={getPropTableData(name)} />
|
|
144
|
+
</div>
|
|
145
|
+
);
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
const toggleToast = (name) => {
|
|
149
|
+
setIsToastActive(true);
|
|
150
|
+
setToastTitle(name);
|
|
151
|
+
setTimeout(() => setIsToastActive(false), 1500);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
const Logos = ({ children, logoData, ...rest }) => {
|
|
155
|
+
return (
|
|
156
|
+
<ProductLogos
|
|
157
|
+
logoData={logoData}
|
|
158
|
+
toggleToast={toggleToast}
|
|
159
|
+
/>
|
|
160
|
+
);
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
const Rectangle = ({ name, ...rest }) => {
|
|
164
|
+
return (
|
|
165
|
+
<div className='rectangle'>{name}</div>
|
|
166
|
+
);
|
|
167
|
+
};
|
|
168
|
+
|
|
169
|
+
const Colors = ({ children, colorData, ...rest }) => {
|
|
170
|
+
return (
|
|
171
|
+
<ProductColors
|
|
172
|
+
colorData={colorData}
|
|
173
|
+
toggleToast={toggleToast}
|
|
174
|
+
/>
|
|
175
|
+
);
|
|
176
|
+
};
|
|
177
|
+
|
|
178
|
+
const DSComponents = {
|
|
179
|
+
...MDSComponents,
|
|
180
|
+
pre: Code,
|
|
181
|
+
Preview: Preview,
|
|
182
|
+
PreviewWithPropTable: PreviewWithPropTable,
|
|
183
|
+
A11yBlock: A11yBlock,
|
|
184
|
+
Rules,
|
|
185
|
+
DOs,
|
|
186
|
+
DONTs,
|
|
187
|
+
InlineMessage,
|
|
188
|
+
IconWrapper,
|
|
189
|
+
h1: (props) => <Heading size='xxl' {...props} />,
|
|
190
|
+
h2: (props) => <Heading size='xl' {...props} />,
|
|
191
|
+
h3: (props) => <Heading size='l' {...props} />,
|
|
192
|
+
h4: (props) => <Heading size='m' {...props} />,
|
|
193
|
+
h5: (props) => <Heading size='s' {...props} />,
|
|
194
|
+
ul: List,
|
|
195
|
+
Logos: (props) => <Logos {...props} />,
|
|
196
|
+
Rectangle: (props) => <Rectangle {...props} />,
|
|
197
|
+
Colors: (props) => <Colors {...props} />,
|
|
198
|
+
};
|
|
199
|
+
|
|
200
|
+
const showAnimation = () => {
|
|
201
|
+
//show animation for only first tab or pages without tabs
|
|
202
|
+
|
|
203
|
+
const { tabs } = frontmatter;
|
|
204
|
+
const name = relativePagePath.slice(relativePagePath.lastIndexOf('/') + 1, relativePagePath.lastIndexOf('.mdx'));
|
|
205
|
+
if (tabs?.length && name !== tabs[0].toLowerCase().split(' ').join('-')) {
|
|
206
|
+
return false;
|
|
207
|
+
}
|
|
208
|
+
return true;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
return (
|
|
212
|
+
<>
|
|
213
|
+
<Meta
|
|
214
|
+
titleType={titleType}
|
|
215
|
+
pageTitle={pageTitle}
|
|
216
|
+
pageDescription={pageDescription}
|
|
217
|
+
pageKeywords={pageKeywords}
|
|
218
|
+
/>
|
|
219
|
+
<Header
|
|
220
|
+
leftMenuList={leftMenuList}
|
|
221
|
+
relativePagePath={relativePagePath}
|
|
222
|
+
/>
|
|
223
|
+
<Row style={{ height: 'calc(100vh - 48px)' }}>
|
|
224
|
+
<LeftNav
|
|
225
|
+
is404Page={is404}
|
|
226
|
+
relativePagePath={relativePagePath}
|
|
227
|
+
pageTitle={pageTitle}
|
|
228
|
+
showMobile={showMobile}
|
|
229
|
+
frontmatter={frontmatter}
|
|
230
|
+
/>
|
|
231
|
+
<Column className={`${showAnimation() ? "page-animation" : ''} page-scroll h-100`}>
|
|
232
|
+
<Row>
|
|
233
|
+
<Column className="px-12 py-8 min-vh-100" size={9}>
|
|
234
|
+
{!relativePagePath.includes('components') && (
|
|
235
|
+
<Container
|
|
236
|
+
pageTitle={pageTitle}
|
|
237
|
+
relativePagePath={relativePagePath}
|
|
238
|
+
tabs={tabs}
|
|
239
|
+
pageDescription={pageDescription}
|
|
240
|
+
logos={logos}
|
|
241
|
+
frontmatter={frontmatter}
|
|
242
|
+
>
|
|
243
|
+
<MDXProvider components={DSComponents}>
|
|
244
|
+
{children}
|
|
245
|
+
</MDXProvider>
|
|
246
|
+
</Container>
|
|
247
|
+
)}
|
|
248
|
+
{relativePagePath.includes('components') && (
|
|
249
|
+
<ComponentsContainer
|
|
250
|
+
pageTitle={pageTitle}
|
|
251
|
+
relativePagePath={relativePagePath}
|
|
252
|
+
component={component}
|
|
253
|
+
tabs={tabs}
|
|
254
|
+
pageDescription={pageDescription}
|
|
255
|
+
frontmatter={frontmatter}
|
|
256
|
+
>
|
|
257
|
+
<MDXProvider components={DSComponents}>
|
|
258
|
+
{children}
|
|
259
|
+
</MDXProvider>
|
|
260
|
+
</ComponentsContainer>
|
|
261
|
+
)}
|
|
262
|
+
</Column>
|
|
263
|
+
|
|
264
|
+
<Column
|
|
265
|
+
size={3}
|
|
266
|
+
className="pb-6 in-page-nav position-sticky"
|
|
267
|
+
>
|
|
268
|
+
<TableOfContent
|
|
269
|
+
is404Page={is404}
|
|
270
|
+
relativePagePath={relativePagePath}
|
|
271
|
+
pageTitle={pageTitle}
|
|
272
|
+
location={rest.location}
|
|
273
|
+
/>
|
|
274
|
+
</Column>
|
|
275
|
+
</Row>
|
|
276
|
+
{isToastActive && (
|
|
277
|
+
<Toast
|
|
278
|
+
appearance='success'
|
|
279
|
+
title={toastTitle}
|
|
280
|
+
className='position-fixed ml-5 toast'
|
|
281
|
+
onClose={() => setIsToastActive(false)}
|
|
282
|
+
/>
|
|
283
|
+
)}
|
|
284
|
+
<Footer relativePagePath={relativePagePath} />
|
|
285
|
+
</Column>
|
|
286
|
+
</Row>
|
|
287
|
+
</>
|
|
288
|
+
);
|
|
289
|
+
};
|
|
290
|
+
|
|
291
|
+
export default Layout;
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import React, { useEffect } from 'react';
|
|
2
|
+
import { useNavItems } from '../../util/NavItems';
|
|
3
|
+
import {
|
|
4
|
+
VerticalNav,
|
|
5
|
+
Subheading,
|
|
6
|
+
Button,
|
|
7
|
+
} from '@innovaccer/design-system';
|
|
8
|
+
import { navigate } from 'gatsby';
|
|
9
|
+
import { MOBILE } from '../../util/constants';
|
|
10
|
+
|
|
11
|
+
const isBrowser = typeof window !== 'undefined';
|
|
12
|
+
|
|
13
|
+
const LeftNav = (props) => {
|
|
14
|
+
const { relativePagePath, showMobile, frontmatter } = props;
|
|
15
|
+
const navItems = useNavItems(relativePagePath);
|
|
16
|
+
const showMenuButtons = showMobile || frontmatter?.showMobile;
|
|
17
|
+
const [active, setActive] = React.useState();
|
|
18
|
+
|
|
19
|
+
function getActiveNavItem() {
|
|
20
|
+
if (isBrowser && window.location.pathname && frontmatter.tabs) {
|
|
21
|
+
|
|
22
|
+
const url = window.location.pathname.split('/');
|
|
23
|
+
const activeMenu = navItems.filter(({ link }) => {
|
|
24
|
+
return link && link.includes(url[1] + '/' + url[2]);
|
|
25
|
+
});
|
|
26
|
+
return activeMenu[0]?.link;
|
|
27
|
+
|
|
28
|
+
} else {
|
|
29
|
+
return window.location.pathname;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
useEffect(() => {
|
|
34
|
+
const active = isBrowser ? getActiveNavItem() : '';
|
|
35
|
+
const obj = { link: active }
|
|
36
|
+
setActive(obj);
|
|
37
|
+
}, []);
|
|
38
|
+
|
|
39
|
+
const onClickHandler = (menu) => {
|
|
40
|
+
navigate(menu.link);
|
|
41
|
+
setActive(menu);
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
const handleNavigate = (name) => {
|
|
45
|
+
if (name === MOBILE) {
|
|
46
|
+
navigate(`/mobile${window.location.pathname}`);
|
|
47
|
+
} else {
|
|
48
|
+
if (window.location.pathname.includes('/mobile')) {
|
|
49
|
+
navigate(
|
|
50
|
+
window.location.pathname.replace('/mobile', '')
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
const getHeading = () => {
|
|
57
|
+
const componentName =
|
|
58
|
+
relativePagePath && relativePagePath.split('/')[1];
|
|
59
|
+
return componentName.toUpperCase();
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
return (
|
|
63
|
+
<div className='h-100 bg-secondary-lightest border-right'>
|
|
64
|
+
{showMenuButtons && (
|
|
65
|
+
<div className='d-flex pt-6 pl-6'>
|
|
66
|
+
<Button
|
|
67
|
+
appearance='basic'
|
|
68
|
+
size='regular'
|
|
69
|
+
className='mr-4'
|
|
70
|
+
onClick={() => handleNavigate()}
|
|
71
|
+
selected={!relativePagePath.includes(MOBILE)}
|
|
72
|
+
expanded={true}
|
|
73
|
+
>
|
|
74
|
+
Web
|
|
75
|
+
</Button>
|
|
76
|
+
<Button
|
|
77
|
+
appearance='basic'
|
|
78
|
+
onClick={() => handleNavigate(MOBILE)}
|
|
79
|
+
selected={relativePagePath.includes(MOBILE)}
|
|
80
|
+
className='mr-6'
|
|
81
|
+
expanded={true}
|
|
82
|
+
>
|
|
83
|
+
Mobile
|
|
84
|
+
</Button>
|
|
85
|
+
</div>
|
|
86
|
+
)}
|
|
87
|
+
<Subheading className='pl-6 pt-6 pb-3' appearance='subtle'>
|
|
88
|
+
{getHeading()}
|
|
89
|
+
</Subheading>
|
|
90
|
+
<VerticalNav
|
|
91
|
+
menus={navItems}
|
|
92
|
+
active={active}
|
|
93
|
+
onClick={onClickHandler}
|
|
94
|
+
expanded={true}
|
|
95
|
+
autoCollapse={false}
|
|
96
|
+
/>
|
|
97
|
+
</div>
|
|
98
|
+
);
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
export default LeftNav;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
.paragraph {
|
|
2
|
+
color: var(--inverse-lighter);
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.container {
|
|
6
|
+
border-radius: var(--spacing-m) var(--spacing-m) 0 0;
|
|
7
|
+
width: 196px;
|
|
8
|
+
height: 120px;
|
|
9
|
+
background: var(--secondary-lightest);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.image {
|
|
13
|
+
position: relative;
|
|
14
|
+
top: 50%;
|
|
15
|
+
left: 50%;
|
|
16
|
+
transform: translate(-50%, -50%);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.imgName {
|
|
20
|
+
color: var(--inverse);
|
|
21
|
+
font-size: 14px;
|
|
22
|
+
font-weight: var(--font-weight-medium);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.download-logos {
|
|
26
|
+
position: absolute !important;
|
|
27
|
+
right: 100px;
|
|
28
|
+
top: 60px;
|
|
29
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {
|
|
3
|
+
Card,
|
|
4
|
+
Column,
|
|
5
|
+
Icon,
|
|
6
|
+
Toast,
|
|
7
|
+
} from '@innovaccer/design-system';
|
|
8
|
+
import './Logos.css';
|
|
9
|
+
import { GatsbyImage, getImage } from 'gatsby-plugin-image';
|
|
10
|
+
import { Link } from 'gatsby';
|
|
11
|
+
import { useLogoItems } from '../../util/Logos';
|
|
12
|
+
|
|
13
|
+
const ProductLogos = (props) => {
|
|
14
|
+
const nodes = useLogoItems();
|
|
15
|
+
|
|
16
|
+
const { logoData } = props;
|
|
17
|
+
|
|
18
|
+
return logoData.map((elt) => {
|
|
19
|
+
const filteredGatsbyImage = nodes.filter((img) => {
|
|
20
|
+
if (img.fluid.src.includes(elt.imgName)) {
|
|
21
|
+
return elt;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
let image;
|
|
26
|
+
if (filteredGatsbyImage.length) {
|
|
27
|
+
image = getImage(
|
|
28
|
+
filteredGatsbyImage[0].gatsbyImageData
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
return (
|
|
33
|
+
<Column size='4'>
|
|
34
|
+
<Card className='mr-7 mt-7' shadow='none'>
|
|
35
|
+
<div className='px-6'>
|
|
36
|
+
<div className='mt-6 px-8 py-8 container w-auto'>
|
|
37
|
+
<GatsbyImage
|
|
38
|
+
image={image}
|
|
39
|
+
alt={elt.name}
|
|
40
|
+
className='image'
|
|
41
|
+
/>
|
|
42
|
+
</div>
|
|
43
|
+
<div className='d-flex align-items-center'>
|
|
44
|
+
<p className='imgName mr-auto'>{elt.name} </p>
|
|
45
|
+
<Link
|
|
46
|
+
href={image.images.fallback.src}
|
|
47
|
+
download
|
|
48
|
+
>
|
|
49
|
+
<Icon
|
|
50
|
+
size={16}
|
|
51
|
+
name='download'
|
|
52
|
+
className='mr-3 imgName'
|
|
53
|
+
onClick={() => props.toggleToast(`Downloading ${elt.name}`)}
|
|
54
|
+
/>
|
|
55
|
+
</Link>
|
|
56
|
+
</div>
|
|
57
|
+
</div>
|
|
58
|
+
</Card>
|
|
59
|
+
</Column>
|
|
60
|
+
);
|
|
61
|
+
});
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
export default ProductLogos;
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Helmet } from 'react-helmet';
|
|
3
|
+
import { useMetadata } from '../util/hooks';
|
|
4
|
+
|
|
5
|
+
const favicon = '/icons/favicon_io/favicon-16x16.png';
|
|
6
|
+
const faviconLarge = '/icons/favicon_io/favicon-32x32.png';
|
|
7
|
+
const faviconApple = '/icons/favicon_io/apple-touch-icon.png';
|
|
8
|
+
const cardImage = '/icons/card-image.png';
|
|
9
|
+
|
|
10
|
+
const Meta = ({ pageTitle, pageDescription, pageKeywords, titleType }) => {
|
|
11
|
+
const { title, description, keywords, lang } = useMetadata();
|
|
12
|
+
|
|
13
|
+
const getPageTitle = () => {
|
|
14
|
+
switch (titleType) {
|
|
15
|
+
case 'page':
|
|
16
|
+
// use site title for fallback
|
|
17
|
+
return pageTitle || title;
|
|
18
|
+
case 'site':
|
|
19
|
+
return title;
|
|
20
|
+
case 'append':
|
|
21
|
+
return `${title}${pageTitle ? ` – ${pageTitle}` : ''}`;
|
|
22
|
+
case 'prepend':
|
|
23
|
+
return `${pageTitle ? `${pageTitle} – ` : ''}${title}`;
|
|
24
|
+
default:
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
return (
|
|
30
|
+
<Helmet
|
|
31
|
+
title={getPageTitle()}
|
|
32
|
+
meta={[
|
|
33
|
+
{
|
|
34
|
+
property: 'title',
|
|
35
|
+
content: pageTitle || title,
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
name: 'description',
|
|
39
|
+
content: pageDescription || description,
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
name: 'keywords',
|
|
43
|
+
content: pageKeywords || keywords,
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
property: `image`,
|
|
47
|
+
content: cardImage,
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
property: `type`,
|
|
51
|
+
content: 'website',
|
|
52
|
+
},
|
|
53
|
+
|
|
54
|
+
{
|
|
55
|
+
name: `og:title`,
|
|
56
|
+
content: pageTitle || title,
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
name: `og:description`,
|
|
60
|
+
content: pageDescription || description,
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
name: `og:image`,
|
|
64
|
+
content: cardImage,
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
name: `og:image:alt`,
|
|
68
|
+
content: 'Masala Design System logo',
|
|
69
|
+
},
|
|
70
|
+
|
|
71
|
+
{
|
|
72
|
+
name: `twitter:card`,
|
|
73
|
+
content: 'masala-design-system',
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
name: `twitter:title`,
|
|
77
|
+
content: pageTitle || title,
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
name: `twitter:description`,
|
|
81
|
+
content: pageDescription || description,
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
name: `twitter:image`,
|
|
85
|
+
content: cardImage,
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
name: `twitter:image:alt`,
|
|
89
|
+
content: 'Masala Design System logo',
|
|
90
|
+
},
|
|
91
|
+
]}
|
|
92
|
+
>
|
|
93
|
+
<html lang={lang} />
|
|
94
|
+
<link rel='icon' href={favicon} />
|
|
95
|
+
<link rel='icon' href={faviconLarge} />
|
|
96
|
+
<link rel='icon' href={faviconApple} />
|
|
97
|
+
</Helmet>
|
|
98
|
+
);
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
export default Meta;
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
|
+
import { styled } from '@storybook/theming';
|
|
3
|
+
import { JsDocTags } from './types';
|
|
4
|
+
import { codeCommon } from './Shared';
|
|
5
|
+
|
|
6
|
+
interface ArgJsDocArgs {
|
|
7
|
+
tags: JsDocTags;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export const Table = styled.table(({ theme }) => ({
|
|
11
|
+
'&&': {
|
|
12
|
+
// Escape default table styles
|
|
13
|
+
borderCollapse: 'collapse',
|
|
14
|
+
borderSpacing: 0,
|
|
15
|
+
border: 'none',
|
|
16
|
+
|
|
17
|
+
tr: {
|
|
18
|
+
border: 'none !important',
|
|
19
|
+
background: 'none',
|
|
20
|
+
},
|
|
21
|
+
|
|
22
|
+
'td, th': {
|
|
23
|
+
padding: 0,
|
|
24
|
+
border: 'none',
|
|
25
|
+
width: 'auto!important',
|
|
26
|
+
},
|
|
27
|
+
// End escape
|
|
28
|
+
|
|
29
|
+
marginTop: 0,
|
|
30
|
+
marginBottom: 0,
|
|
31
|
+
|
|
32
|
+
'th:first-of-type, td:first-of-type': {
|
|
33
|
+
paddingLeft: 0,
|
|
34
|
+
},
|
|
35
|
+
|
|
36
|
+
'th:last-of-type, td:last-of-type': {
|
|
37
|
+
paddingRight: 0,
|
|
38
|
+
},
|
|
39
|
+
|
|
40
|
+
td: {
|
|
41
|
+
paddingTop: 0,
|
|
42
|
+
paddingBottom: 4,
|
|
43
|
+
|
|
44
|
+
'&:not(:first-of-type)': {
|
|
45
|
+
paddingLeft: 10,
|
|
46
|
+
paddingRight: 0,
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
|
|
50
|
+
tbody: {
|
|
51
|
+
boxShadow: 'none',
|
|
52
|
+
border: 'none',
|
|
53
|
+
},
|
|
54
|
+
|
|
55
|
+
code: codeCommon(),
|
|
56
|
+
|
|
57
|
+
'& code': {
|
|
58
|
+
margin: 0,
|
|
59
|
+
display: 'inline-block',
|
|
60
|
+
fontSize: theme.typography.size.s1,
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
}));
|
|
64
|
+
|
|
65
|
+
export const ArgJsDoc: FC<ArgJsDocArgs> = ({ tags }) => {
|
|
66
|
+
const params = (tags.params || []).filter(
|
|
67
|
+
(x) => x.description
|
|
68
|
+
);
|
|
69
|
+
const hasDisplayableParams = params.length !== 0;
|
|
70
|
+
const hasDisplayableReturns =
|
|
71
|
+
tags.returns != null &&
|
|
72
|
+
tags.returns.description != null;
|
|
73
|
+
|
|
74
|
+
if (!hasDisplayableParams && !hasDisplayableReturns) {
|
|
75
|
+
return null;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
return (
|
|
79
|
+
<Table>
|
|
80
|
+
<tbody>
|
|
81
|
+
{hasDisplayableParams &&
|
|
82
|
+
params.map((x) => {
|
|
83
|
+
return (
|
|
84
|
+
<tr key={x.name}>
|
|
85
|
+
<td>
|
|
86
|
+
<code>{x.name}</code>
|
|
87
|
+
</td>
|
|
88
|
+
<td>{x.description}</td>
|
|
89
|
+
</tr>
|
|
90
|
+
);
|
|
91
|
+
})}
|
|
92
|
+
{hasDisplayableReturns && (
|
|
93
|
+
<tr key="returns">
|
|
94
|
+
<td>
|
|
95
|
+
<code>Returns</code>
|
|
96
|
+
</td>
|
|
97
|
+
</tr>
|
|
98
|
+
)}
|
|
99
|
+
</tbody>
|
|
100
|
+
</Table>
|
|
101
|
+
);
|
|
102
|
+
};
|