@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,248 @@
|
|
|
1
|
+
import React, { useState, useRef } from 'react';
|
|
2
|
+
import '@innovaccer/design-system/css';
|
|
3
|
+
import { renderToStaticMarkup } from 'react-dom/server';
|
|
4
|
+
import { html as beautifyHTML } from 'js-beautify';
|
|
5
|
+
import SyntaxHighlighter from 'react-syntax-highlighter';
|
|
6
|
+
import openSandbox from './sandbox.tsx';
|
|
7
|
+
import vsDark from 'prism-react-renderer/themes/vsDark';
|
|
8
|
+
import generateImports from './generateImports';
|
|
9
|
+
import * as DS from '@innovaccer/design-system';
|
|
10
|
+
import './card.css';
|
|
11
|
+
import { vs2015 } from 'react-syntax-highlighter/dist/esm/styles/hljs';
|
|
12
|
+
import {
|
|
13
|
+
Card,
|
|
14
|
+
CardHeader,
|
|
15
|
+
CardBody,
|
|
16
|
+
Button,
|
|
17
|
+
Icon,
|
|
18
|
+
Toast
|
|
19
|
+
} from '@innovaccer/design-system';
|
|
20
|
+
import {
|
|
21
|
+
LiveProvider,
|
|
22
|
+
LiveEditor,
|
|
23
|
+
LiveError,
|
|
24
|
+
LivePreview,
|
|
25
|
+
withLive
|
|
26
|
+
} from 'react-live';
|
|
27
|
+
import './prism.css';
|
|
28
|
+
|
|
29
|
+
const beautifyHTMLOptions = {
|
|
30
|
+
indent_size: 2,
|
|
31
|
+
wrap_line_length: 0,
|
|
32
|
+
preserve_newlines: true,
|
|
33
|
+
jslint_happy: true,
|
|
34
|
+
end_with_newline: false,
|
|
35
|
+
indent_inner_html: true,
|
|
36
|
+
break_chained_methods: true,
|
|
37
|
+
keep_array_indentation: true,
|
|
38
|
+
good_stuff: true,
|
|
39
|
+
indent_empty_lines: true,
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
const getRawPreviewCode = (customCode, comp) => {
|
|
43
|
+
if (customCode) {
|
|
44
|
+
return `${generateImports(
|
|
45
|
+
customCode,
|
|
46
|
+
DS,
|
|
47
|
+
'@innovaccer/design-system'
|
|
48
|
+
)}
|
|
49
|
+
|
|
50
|
+
${customCode}
|
|
51
|
+
`;
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
const StoryComp = ({
|
|
56
|
+
componentData,
|
|
57
|
+
}) => {
|
|
58
|
+
const testRef = useRef(null);
|
|
59
|
+
const [zoom, setZoom] = useState(1);
|
|
60
|
+
const [htmlCode, setHtmlCode] = useState('');
|
|
61
|
+
const [isExpanded, setIsExpanded] = useState(false);
|
|
62
|
+
const [activeButton, setActiveButton] = useState('React');
|
|
63
|
+
const [showToast, setShowToast] = useState(false);
|
|
64
|
+
const [jsxCode, setJsxCode] = React.useState(getRawPreviewCode(componentData));
|
|
65
|
+
|
|
66
|
+
const TabsWrap = withLive(({ live }) => {
|
|
67
|
+
const { element: Element } = live;
|
|
68
|
+
try {
|
|
69
|
+
const htmlValue = beautifyHTML(renderToStaticMarkup(<Element />), beautifyHTMLOptions);
|
|
70
|
+
setHtmlCode(htmlValue);
|
|
71
|
+
} catch (e) { }
|
|
72
|
+
return null;
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
const renderCodeBlock = (val) => (
|
|
76
|
+
<div>
|
|
77
|
+
<style>
|
|
78
|
+
{`pre {
|
|
79
|
+
margin: 0;
|
|
80
|
+
text-align: left;
|
|
81
|
+
|
|
82
|
+
}`}
|
|
83
|
+
</style>
|
|
84
|
+
<SyntaxHighlighter
|
|
85
|
+
language='javascript'
|
|
86
|
+
style={vs2015}
|
|
87
|
+
showLineNumbers={true}
|
|
88
|
+
>
|
|
89
|
+
{val}
|
|
90
|
+
</SyntaxHighlighter>
|
|
91
|
+
</div>
|
|
92
|
+
);
|
|
93
|
+
|
|
94
|
+
const copyToClipboard = (reactCode, htmlCode) => {
|
|
95
|
+
if (activeButton === 'React') {
|
|
96
|
+
navigator.clipboard.writeText(reactCode);
|
|
97
|
+
} else {
|
|
98
|
+
navigator.clipboard.writeText(htmlCode);
|
|
99
|
+
}
|
|
100
|
+
setShowToast(true);
|
|
101
|
+
setTimeout(() => setShowToast(false), 1000);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
const CopyCode = (props) => {
|
|
105
|
+
const { onClick } = props;
|
|
106
|
+
return (
|
|
107
|
+
<div className='ml-auto d-flex'>
|
|
108
|
+
{activeButton === 'React' &&
|
|
109
|
+
<img
|
|
110
|
+
src="/icons/4691539_codesandbox_icon.svg"
|
|
111
|
+
className='codesandBox-icon cursor-pointer mr-6 align-self-center'
|
|
112
|
+
onClick={(e) => {
|
|
113
|
+
e.preventDefault();
|
|
114
|
+
openSandbox(jsxCode);
|
|
115
|
+
}}
|
|
116
|
+
/>
|
|
117
|
+
}
|
|
118
|
+
<Icon
|
|
119
|
+
name='content_copy'
|
|
120
|
+
size={20}
|
|
121
|
+
appearance='white'
|
|
122
|
+
onClick={onClick}
|
|
123
|
+
className='align-self-center cursor-pointer'
|
|
124
|
+
/>
|
|
125
|
+
</div>
|
|
126
|
+
);
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
const handleZoomIn = () => {
|
|
130
|
+
setZoom(zoom + 0.5);
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
const handleZoomOut = () => {
|
|
134
|
+
setZoom(zoom - 0.5);
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
const showLiveEditorContent = () => {
|
|
138
|
+
if (activeButton === 'React') {
|
|
139
|
+
return (
|
|
140
|
+
<div className="px-4">
|
|
141
|
+
<LiveEditor theme={vsDark} />
|
|
142
|
+
</div>
|
|
143
|
+
);
|
|
144
|
+
} else {
|
|
145
|
+
return renderCodeBlock(htmlCode);
|
|
146
|
+
}
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
const imports = React.useMemo(() => ({ ...DS }), []);
|
|
150
|
+
|
|
151
|
+
return (
|
|
152
|
+
<>
|
|
153
|
+
<div className='pb-8 pt-4 d-flex w-100 m-auto flex-column align-items-center'>
|
|
154
|
+
<LiveProvider code={jsxCode} scope={imports}>
|
|
155
|
+
<Card
|
|
156
|
+
shadow='none'
|
|
157
|
+
className='w-100 overflow-hidden'
|
|
158
|
+
>
|
|
159
|
+
<CardHeader>
|
|
160
|
+
<div className='d-flex justify-content-end'>
|
|
161
|
+
<Button
|
|
162
|
+
appearance="transparent"
|
|
163
|
+
aria-label="Zoom In"
|
|
164
|
+
onClick={() => handleZoomIn()}
|
|
165
|
+
icon='zoom_in'
|
|
166
|
+
largeIcon
|
|
167
|
+
/>
|
|
168
|
+
<Button
|
|
169
|
+
onClick={() => handleZoomOut()}
|
|
170
|
+
icon='zoom_out'
|
|
171
|
+
appearance='transparent'
|
|
172
|
+
aria-label="Zoom Out"
|
|
173
|
+
largeIcon
|
|
174
|
+
></Button>
|
|
175
|
+
</div>
|
|
176
|
+
</CardHeader>
|
|
177
|
+
<CardBody className='d-flex flex-column align-items-center'>
|
|
178
|
+
<div className='w-100 overflow-x-scroll' ref={testRef}>
|
|
179
|
+
<LivePreview
|
|
180
|
+
className='p-8 mw-100 mh-100 d-block'
|
|
181
|
+
style={{ zoom: zoom }}
|
|
182
|
+
/>
|
|
183
|
+
<LiveError />
|
|
184
|
+
</div>
|
|
185
|
+
<div className='d-flex justify-content-end w-100 mb-6'>
|
|
186
|
+
<Button
|
|
187
|
+
appearance='basic'
|
|
188
|
+
onClick={() => setIsExpanded(!isExpanded)}
|
|
189
|
+
>
|
|
190
|
+
{isExpanded ? 'Hide code' : 'Show code'}
|
|
191
|
+
</Button>
|
|
192
|
+
</div>
|
|
193
|
+
</CardBody>
|
|
194
|
+
</Card>
|
|
195
|
+
<TabsWrap />
|
|
196
|
+
{isExpanded && (
|
|
197
|
+
<Card
|
|
198
|
+
shadow='none'
|
|
199
|
+
className='w-100 overflow-hidden mt-4 live-editor-card'
|
|
200
|
+
>
|
|
201
|
+
<div className='d-flex px-5 pt-5 pb-4'>
|
|
202
|
+
<Button
|
|
203
|
+
appearance='basic'
|
|
204
|
+
onClick={() => setActiveButton('React')}
|
|
205
|
+
selected={
|
|
206
|
+
activeButton === 'React'
|
|
207
|
+
? true
|
|
208
|
+
: false
|
|
209
|
+
}
|
|
210
|
+
className='mr-3'
|
|
211
|
+
>
|
|
212
|
+
React
|
|
213
|
+
</Button>
|
|
214
|
+
<Button
|
|
215
|
+
appearance='basic'
|
|
216
|
+
onClick={() => setActiveButton('HTML')}
|
|
217
|
+
selected={
|
|
218
|
+
activeButton === 'HTML' ? true : false
|
|
219
|
+
}
|
|
220
|
+
>
|
|
221
|
+
HTML
|
|
222
|
+
</Button>
|
|
223
|
+
<CopyCode
|
|
224
|
+
onClick={() => {
|
|
225
|
+
copyToClipboard(jsxCode, htmlCode);
|
|
226
|
+
}}
|
|
227
|
+
/>
|
|
228
|
+
</div>
|
|
229
|
+
|
|
230
|
+
{showLiveEditorContent()}
|
|
231
|
+
</Card>
|
|
232
|
+
)}
|
|
233
|
+
</LiveProvider>
|
|
234
|
+
{
|
|
235
|
+
showToast &&
|
|
236
|
+
<Toast
|
|
237
|
+
appearance="success"
|
|
238
|
+
title="Copied to clipboard"
|
|
239
|
+
className="position-fixed ml-5 toast"
|
|
240
|
+
onClose={() => setShowToast(false)}
|
|
241
|
+
/>
|
|
242
|
+
}
|
|
243
|
+
</div>
|
|
244
|
+
</>
|
|
245
|
+
);
|
|
246
|
+
};
|
|
247
|
+
|
|
248
|
+
export default StoryComp;
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
/* PrismJS 1.16.0
|
|
2
|
+
https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript+graphql+jsx+regex */
|
|
3
|
+
/**
|
|
4
|
+
* prism.js default theme for JavaScript, CSS and HTML
|
|
5
|
+
* Based on dabblet (http://dabblet.com)
|
|
6
|
+
* @author Lea Verou
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
.npm__react-simple-code-editor__textarea {
|
|
10
|
+
font-family: "Roboto Mono" !important;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
code[class*="language-"],
|
|
14
|
+
pre[class*="language-"] {
|
|
15
|
+
background: none;
|
|
16
|
+
font-family: "Roboto Mono";
|
|
17
|
+
font-size: 1em;
|
|
18
|
+
text-align: left;
|
|
19
|
+
white-space: pre;
|
|
20
|
+
word-spacing: normal;
|
|
21
|
+
word-break: normal;
|
|
22
|
+
word-wrap: normal;
|
|
23
|
+
line-height: 1.5;
|
|
24
|
+
|
|
25
|
+
-moz-tab-size: 4;
|
|
26
|
+
-o-tab-size: 4;
|
|
27
|
+
tab-size: 4;
|
|
28
|
+
|
|
29
|
+
-webkit-hyphens: none;
|
|
30
|
+
-moz-hyphens: none;
|
|
31
|
+
-ms-hyphens: none;
|
|
32
|
+
hyphens: none;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
pre[class*="language-"]::-moz-selection,
|
|
36
|
+
pre[class*="language-"] ::-moz-selection,
|
|
37
|
+
code[class*="language-"]::-moz-selection,
|
|
38
|
+
code[class*="language-"] ::-moz-selection {
|
|
39
|
+
text-shadow: none;
|
|
40
|
+
background: #b3d4fc;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
pre[class*="language-"]::selection,
|
|
44
|
+
pre[class*="language-"] ::selection,
|
|
45
|
+
code[class*="language-"]::selection,
|
|
46
|
+
code[class*="language-"] ::selection {
|
|
47
|
+
text-shadow: none;
|
|
48
|
+
background: #b3d4fc;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
@media print {
|
|
52
|
+
code[class*="language-"],
|
|
53
|
+
pre[class*="language-"] {
|
|
54
|
+
text-shadow: none;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/* Code blocks */
|
|
59
|
+
pre[class*="language-"] {
|
|
60
|
+
padding: 1em;
|
|
61
|
+
margin: 0.5em 0;
|
|
62
|
+
overflow: auto;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
:not(pre) > code[class*="language-"],
|
|
66
|
+
pre[class*="language-"] {
|
|
67
|
+
background: #f5f2f0;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/* Inline code */
|
|
71
|
+
:not(pre) > code[class*="language-"] {
|
|
72
|
+
padding: 0.1em;
|
|
73
|
+
border-radius: 0.3em;
|
|
74
|
+
white-space: normal;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.token.comment,
|
|
78
|
+
.token.prolog,
|
|
79
|
+
.token.doctype,
|
|
80
|
+
.token.cdata {
|
|
81
|
+
color: slategray;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.token.punctuation {
|
|
85
|
+
color: #999;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.namespace {
|
|
89
|
+
opacity: 0.7;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.token.property,
|
|
93
|
+
.token.tag,
|
|
94
|
+
.token.boolean,
|
|
95
|
+
.token.number,
|
|
96
|
+
.token.constant,
|
|
97
|
+
.token.symbol,
|
|
98
|
+
.token.deleted {
|
|
99
|
+
color: #905;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.token.selector,
|
|
103
|
+
.token.attr-name,
|
|
104
|
+
.token.string,
|
|
105
|
+
.token.char,
|
|
106
|
+
.token.builtin,
|
|
107
|
+
.token.inserted {
|
|
108
|
+
color: #690;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.token.operator,
|
|
112
|
+
.token.entity,
|
|
113
|
+
.token.url,
|
|
114
|
+
.language-css .token.string,
|
|
115
|
+
.style .token.string {
|
|
116
|
+
color: #9a6e3a;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.token.atrule,
|
|
120
|
+
.token.attr-value,
|
|
121
|
+
.token.keyword {
|
|
122
|
+
color: #07a;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.token.function,
|
|
126
|
+
.token.class-name {
|
|
127
|
+
color: #dd4a68;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.token.regex,
|
|
131
|
+
.token.important,
|
|
132
|
+
.token.variable {
|
|
133
|
+
color: #e90;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.token.important,
|
|
137
|
+
.token.bold {
|
|
138
|
+
font-weight: bold;
|
|
139
|
+
}
|
|
140
|
+
.token.italic {
|
|
141
|
+
font-style: italic;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.token.entity {
|
|
145
|
+
cursor: help;
|
|
146
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import * as LZString from 'lz-string';
|
|
2
|
+
|
|
3
|
+
// https://github.com/codesandbox/codesandbox-importers/blob/master/packages/import-utils/src/api/define.ts
|
|
4
|
+
|
|
5
|
+
type IPackage = {
|
|
6
|
+
dependencies: object;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
interface IFiles {
|
|
10
|
+
[key: string]: {
|
|
11
|
+
content: string | IPackage;
|
|
12
|
+
isBinary?: boolean;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const compress = (input: string) => {
|
|
17
|
+
return LZString.compressToBase64(input)
|
|
18
|
+
.replace(/\+/g, '-') // Convert '+' to '-'
|
|
19
|
+
.replace(/\//g, '_') // Convert '/' to '_'
|
|
20
|
+
.replace(/=+$/, ''); // Remove ending '='
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
const getParameters = (options: { files: IFiles }) => {
|
|
24
|
+
return compress(JSON.stringify(options));
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export default (jsxStoryCode: string) => {
|
|
28
|
+
const structuredCode = jsxStoryCode
|
|
29
|
+
.trim()
|
|
30
|
+
// @ts-ignore
|
|
31
|
+
.replaceAll('// import', 'import')
|
|
32
|
+
.replace('() => ', 'const App = () => ')
|
|
33
|
+
.replaceAll('<>', '<React.Fragment>')
|
|
34
|
+
.replaceAll('</>', '</React.Fragment>');
|
|
35
|
+
const code = `
|
|
36
|
+
import ReactDOM from "react-dom";
|
|
37
|
+
import React from "react";
|
|
38
|
+
import "@innovaccer/design-system/css";
|
|
39
|
+
${structuredCode}
|
|
40
|
+
|
|
41
|
+
ReactDOM.render(<App />, document.getElementById("root"));
|
|
42
|
+
`;
|
|
43
|
+
|
|
44
|
+
const html = `
|
|
45
|
+
<link
|
|
46
|
+
href="https://fonts.googleapis.com/css?family=Nunito+Sans:300,300i,400,400i,600,600i,700,700i,800,800i,900,900i&display=swap"
|
|
47
|
+
rel="stylesheet"
|
|
48
|
+
/>
|
|
49
|
+
<link
|
|
50
|
+
href="https://fonts.googleapis.com/icon?family=Material+Icons"
|
|
51
|
+
rel="stylesheet"
|
|
52
|
+
/>
|
|
53
|
+
<div class="p-6">
|
|
54
|
+
<div id="root"></div>
|
|
55
|
+
</div>
|
|
56
|
+
|
|
57
|
+
`;
|
|
58
|
+
|
|
59
|
+
const parameters = getParameters({
|
|
60
|
+
files: {
|
|
61
|
+
'package.json': {
|
|
62
|
+
content: {
|
|
63
|
+
dependencies: {
|
|
64
|
+
react: '16.12.0',
|
|
65
|
+
'react-dom': '16.12.0',
|
|
66
|
+
'@innovaccer/design-system': 'latest',
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
'index.js': {
|
|
71
|
+
content: code,
|
|
72
|
+
},
|
|
73
|
+
'index.html': {
|
|
74
|
+
content: html,
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
const url = `https://codesandbox.io/api/v1/sandboxes/define?parameters=${parameters}`;
|
|
80
|
+
return window.open(url);
|
|
81
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
export const theme = {
|
|
2
|
+
base: 'light',
|
|
3
|
+
|
|
4
|
+
colorPrimary: '#0000001a',
|
|
5
|
+
colorSecondary: 'deepskyblue',
|
|
6
|
+
|
|
7
|
+
// UI
|
|
8
|
+
appBg: 'white',
|
|
9
|
+
appContentBg: 'white',
|
|
10
|
+
appBorderColor: '#0000001a',
|
|
11
|
+
appBorderRadius: 4,
|
|
12
|
+
|
|
13
|
+
// Typography
|
|
14
|
+
typography: {
|
|
15
|
+
fonts: {
|
|
16
|
+
mono: 'Roboto mono',
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
background: {
|
|
20
|
+
content: 'white',
|
|
21
|
+
},
|
|
22
|
+
animation: 'ease-out',
|
|
23
|
+
input: '',
|
|
24
|
+
color: {
|
|
25
|
+
defaultText: '#151414',
|
|
26
|
+
secondary: 'black',
|
|
27
|
+
negative: 'black',
|
|
28
|
+
},
|
|
29
|
+
fonts: {
|
|
30
|
+
base: '',
|
|
31
|
+
},
|
|
32
|
+
fontBase: '"Nunito Sans", "Open Sans", sans-serif',
|
|
33
|
+
fontCode: 'Roboto mono',
|
|
34
|
+
|
|
35
|
+
// Text colors
|
|
36
|
+
textColor: 'black',
|
|
37
|
+
textInverseColor: 'rgba(255,255,255,0.9)',
|
|
38
|
+
|
|
39
|
+
// Toolbar default and active colors
|
|
40
|
+
barTextColor: 'silver',
|
|
41
|
+
barSelectedColor: 'black',
|
|
42
|
+
barBg: 'white',
|
|
43
|
+
|
|
44
|
+
// Form colors
|
|
45
|
+
inputBg: 'white',
|
|
46
|
+
inputBorder: 'silver',
|
|
47
|
+
inputTextColor: 'black',
|
|
48
|
+
inputBorderRadius: 4,
|
|
49
|
+
brand: 'Test',
|
|
50
|
+
code: '123',
|
|
51
|
+
easing: '',
|
|
52
|
+
layoutMargin: '',
|
|
53
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export interface JsDocParam {
|
|
2
|
+
name: string;
|
|
3
|
+
description?: string;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export interface JsDocReturns {
|
|
7
|
+
description?: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface JsDocTags {
|
|
11
|
+
params?: JsDocParam[];
|
|
12
|
+
returns?: JsDocReturns;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface PropSummaryValue {
|
|
16
|
+
summary: string;
|
|
17
|
+
detail?: string;
|
|
18
|
+
required?: boolean;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export type PropType = PropSummaryValue;
|
|
22
|
+
export type PropDefaultValue = PropSummaryValue;
|
|
23
|
+
|
|
24
|
+
export interface TableAnnotation {
|
|
25
|
+
type: PropType;
|
|
26
|
+
jsDocTags?: JsDocTags;
|
|
27
|
+
defaultValue?: PropDefaultValue;
|
|
28
|
+
category?: string;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface ArgType {
|
|
32
|
+
name?: string;
|
|
33
|
+
description?: string;
|
|
34
|
+
defaultValue?: any;
|
|
35
|
+
[key: string]: any;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface ArgTypes {
|
|
39
|
+
[key: string]: ArgType;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export interface Args {
|
|
43
|
+
[key: string]: any;
|
|
44
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Icon } from '@innovaccer/design-system';
|
|
3
|
+
|
|
4
|
+
const IconWrapper = ({ children, iconType = 'success' }) => {
|
|
5
|
+
return (
|
|
6
|
+
<div class='d-flex'>
|
|
7
|
+
{
|
|
8
|
+
iconType === 'error' ?
|
|
9
|
+
<Icon className='mr-4 mt-2' appearance="alert" name="cancel" size={14} />
|
|
10
|
+
:
|
|
11
|
+
<Icon className='mr-4 mt-2' appearance="success" name="check_circle" size={14} />
|
|
12
|
+
}
|
|
13
|
+
{children}
|
|
14
|
+
</div>
|
|
15
|
+
);
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export default IconWrapper;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
.Rules-Container {
|
|
2
|
+
background-color: var(--secondary-lightest);
|
|
3
|
+
border-radius: var(--spacing-m);
|
|
4
|
+
pointer-events: none;
|
|
5
|
+
margin-top: var(--spacing-2);
|
|
6
|
+
margin-bottom: var(--spacing-4);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.Rules-Dont {
|
|
10
|
+
border-top: var(--spacing-s) solid var(--alert);
|
|
11
|
+
border-top-right-radius: var(--spacing-m);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.Rules-Do {
|
|
15
|
+
border-top: var(--spacing-s) solid var(--success);
|
|
16
|
+
border-top-left-radius: var(--spacing-m);
|
|
17
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Row, Column } from '@innovaccer/design-system';
|
|
3
|
+
import './Rules.css';
|
|
4
|
+
|
|
5
|
+
const Rules = ({ children, isPortraitMode = false }) => {
|
|
6
|
+
|
|
7
|
+
return (
|
|
8
|
+
<div className='Rules-Container'>
|
|
9
|
+
{
|
|
10
|
+
isPortraitMode ?
|
|
11
|
+
<>
|
|
12
|
+
<Row>
|
|
13
|
+
<Column>
|
|
14
|
+
{children.length > 0 && <div>{children[0]}</div>}
|
|
15
|
+
</Column>
|
|
16
|
+
</Row>
|
|
17
|
+
<Row>
|
|
18
|
+
<Column>
|
|
19
|
+
{children.length > 1 && <div>{children[1]}</div>}
|
|
20
|
+
</Column>
|
|
21
|
+
</Row>
|
|
22
|
+
</>
|
|
23
|
+
:
|
|
24
|
+
<>
|
|
25
|
+
<Row>
|
|
26
|
+
<Column>
|
|
27
|
+
{children.length > 0 && <div>{children[0]}</div>}
|
|
28
|
+
</Column>
|
|
29
|
+
<Column>
|
|
30
|
+
{children.length > 1 && <div>{children[1]}</div>}
|
|
31
|
+
</Column>
|
|
32
|
+
</Row>
|
|
33
|
+
</>
|
|
34
|
+
}
|
|
35
|
+
</div>
|
|
36
|
+
);
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export default Rules;
|