@innovaccer/design-system 2.13.3 → 2.13.4-2
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/core/components/atoms/button/__stories__/SplitButton.story.jsx +1 -2
- package/core/components/atoms/checkbox/__stories__/Alignment.story.jsx +28 -26
- package/core/components/atoms/checkbox/__stories__/variants/Controlled.story.jsx +2 -2
- package/core/components/atoms/chip/__stories__/index.story.jsx +2 -2
- package/core/components/atoms/chip/__stories__/variants/Action.story.jsx +2 -2
- package/core/components/atoms/chip/__stories__/variants/Input.story.jsx +2 -2
- package/core/components/atoms/chip/__stories__/variants/Selection.story.jsx +6 -6
- package/core/components/atoms/chip/__stories__/variants/Type.story.jsx +2 -2
- package/core/components/atoms/chipGroup/_stories_/index.story.jsx +1 -1
- package/core/components/atoms/collapsible/__stories__/CustomTrigger.story.jsx +5 -71
- package/core/components/atoms/dropdown/Dropdown.tsx +18 -2
- package/core/components/atoms/dropdown/DropdownList.tsx +47 -57
- package/core/components/atoms/dropdown/__stories__/CustomSearchPlaceholder.story.jsx +4 -4
- package/core/components/atoms/dropdown/__stories__/DropdownItemsWithCheckbox.story.jsx +1 -3
- package/core/components/atoms/dropdown/__stories__/DropdownItemsWithIcon.story.jsx +2 -4
- package/core/components/atoms/dropdown/__stories__/DropdownItemsWithInfo.story.jsx +2 -5
- package/core/components/atoms/dropdown/__stories__/DropdownWIthIcon.story.jsx +3 -4
- package/core/components/atoms/dropdown/__stories__/DropdownWithActionButtons.story.jsx +9 -9
- package/core/components/atoms/dropdown/__stories__/DropdownWithCaption.story.jsx +7 -7
- package/core/components/atoms/dropdown/__stories__/Gender.story.jsx +6 -6
- package/core/components/atoms/dropdown/__stories__/LabelInline.story.jsx +58 -0
- package/core/components/atoms/dropdown/__stories__/{LabelPositionInDropdown.story.jsx → LabelOnTop.story.jsx} +8 -9
- package/core/components/atoms/dropdown/__stories__/Languages.story.jsx +6 -6
- package/core/components/atoms/dropdown/__stories__/Menu.story.jsx +5 -6
- package/core/components/atoms/dropdown/__stories__/OptionsLessThan50.story.jsx +3 -7
- package/core/components/atoms/dropdown/__stories__/OptionsMoreThan50.story.jsx +2 -2
- package/core/components/atoms/dropdown/__stories__/SearchInDropdown.story.jsx +3 -5
- package/core/components/atoms/dropdown/__stories__/StandardDropdown.story.jsx +2 -2
- package/core/components/atoms/dropdown/__stories__/StatusWithoutLabel.story.jsx +3 -3
- package/core/components/atoms/dropdown/__stories__/WithCheckboxAndSubInfo.story.jsx +2 -4
- package/core/components/atoms/dropdown/__stories__/index.story.jsx +2 -2
- package/core/components/atoms/dropdown/__stories__/variants/LoadingType.story.jsx +0 -1
- package/core/components/atoms/dropdown/__stories__/variants/PreSelection.story.jsx +2 -2
- package/core/components/atoms/dropdown/__stories__/variants/StaticLimit.story.jsx +2 -2
- package/core/components/atoms/dropdown/__stories__/variants/controlledDropdown/BulkMultiSelectWithApply.story.jsx +2 -2
- package/core/components/atoms/dropdown/__stories__/variants/controlledDropdown/MultiSelect.story.jsx +2 -2
- package/core/components/atoms/dropdown/__stories__/variants/controlledDropdown/SingleSelect.story.jsx +4 -4
- package/core/components/atoms/dropdown/option/DefaultOption.tsx +1 -1
- package/core/components/atoms/dropdown/utility.tsx +6 -0
- package/core/components/atoms/icon/__stories__/variants/Image.story.jsx +1 -6
- package/core/components/atoms/input/__stories__/variants/Size.story.jsx +9 -9
- package/core/components/atoms/input/__stories__/variants/controlledInput.story.jsx +3 -3
- package/core/components/atoms/metaList/_stories_/index.story.jsx +0 -1
- package/core/components/atoms/rangeSlider/__stories__/index.story.jsx +2 -2
- package/core/components/atoms/rangeSlider/__stories__/variants/Controlled.story.jsx +2 -2
- package/core/components/atoms/slider/__stories__/variants/Controlled.story.jsx +2 -2
- package/core/components/css-utilities/Miscellaneous/Miscellaneous.story.tsx +4 -0
- package/core/components/molecules/dropzone/FileSelectorUtils.tsx +3 -0
- package/core/components/molecules/editableDropdown/__stories__/index.story.jsx +2 -2
- package/core/components/molecules/fullscreenModal/__stories__/DefaultWidth.story.jsx +4 -2
- package/core/components/molecules/fullscreenModal/__stories__/LargeWidth.story.jsx +4 -2
- package/core/components/molecules/fullscreenModal/__stories__/Layering.story.jsx +3 -1
- package/core/components/molecules/fullscreenModal/__stories__/Scrolling.story.jsx +4 -2
- package/core/components/molecules/fullscreenModal/__stories__/TwoStepWorkflow.story.jsx +1 -2
- package/core/components/molecules/fullscreenModal/__stories__/twoSteps.story.jsx +0 -1
- package/core/components/molecules/fullscreenModal/__stories__/variants/dimension/Large.story.jsx +0 -1
- package/core/components/molecules/fullscreenModal/__stories__/variants/dimension/Medium.story.jsx +0 -1
- package/core/components/molecules/modal/__stories__/Alert.story.jsx +3 -1
- package/core/components/molecules/modal/__stories__/Confirmation.story.jsx +3 -1
- package/core/components/molecules/modal/__stories__/Dialog.story.jsx +3 -1
- package/core/components/molecules/modal/__stories__/Input.story.jsx +3 -1
- package/core/components/molecules/modal/__stories__/Layering.story.jsx +3 -1
- package/core/components/molecules/modal/__stories__/NoFooter.story.jsx +3 -1
- package/core/components/molecules/modal/__stories__/Scrolling.story.jsx +4 -2
- package/core/components/molecules/modal/__stories__/index.story.jsx +3 -1
- package/core/components/molecules/modal/__stories__/old.story.jsx +3 -1
- package/core/components/molecules/modal/__stories__/variants/dimension/Large.story.jsx +3 -1
- package/core/components/molecules/modal/__stories__/variants/dimension/Medium.story.jsx +3 -1
- package/core/components/molecules/modal/__stories__/variants/dimension/Small.story.jsx +3 -1
- package/core/components/molecules/popover/__stories__/Actions.story.jsx +1 -6
- package/core/components/molecules/popover/__stories__/Inputs.story.jsx +1 -6
- package/core/components/molecules/popover/__stories__/Light.story.jsx +1 -6
- package/core/components/molecules/popover/__stories__/variants/boundaryElement.story.jsx +1 -1
- package/core/components/molecules/sidesheet/__stories__/index.story.jsx +3 -1
- package/core/components/molecules/sidesheet/__stories__/variants/CustomHeader.story.jsx +3 -1
- package/core/components/molecules/sidesheet/__stories__/variants/Layering.story.jsx +3 -1
- package/core/components/molecules/sidesheet/__stories__/variants/LayeringWithModal.story.jsx +3 -1
- package/core/components/molecules/sidesheet/__stories__/variants/dimension/Large.story.jsx +3 -1
- package/core/components/molecules/sidesheet/__stories__/variants/dimension/Regular.story.jsx +4 -2
- package/core/components/molecules/sidesheet/__stories__/variants/stickyFooter.story.jsx +3 -1
- package/core/components/molecules/sidesheet/__stories__/variants/twoSteps.story.jsx +6 -4
- package/core/components/molecules/tabs/__stories__/DismissibleTab.story.jsx +1 -0
- package/core/components/molecules/tooltip/__stories__/variants/Position.story.jsx +2 -13
- package/core/components/organisms/calendar/__stories__/index.story.jsx +40 -7
- package/core/components/organisms/calendar/__stories__/variants/size.story.jsx +2 -3
- package/core/components/organisms/datePicker/DatePicker.tsx +1 -1
- package/core/components/organisms/dateRangePicker/__stories__/variants/withSingleInput.story.jsx +3 -0
- package/core/components/organisms/horizontalNav/__stories__/leftAlign.story.jsx +35 -19
- package/core/components/organisms/inlineMessage/__stories__/variants/Default.story.jsx +1 -3
- package/core/components/organisms/inlineMessage/__stories__/variants/Error.story.jsx +1 -3
- package/core/components/organisms/inlineMessage/__stories__/variants/Info.story.jsx +1 -3
- package/core/components/organisms/inlineMessage/__stories__/variants/Success.story.jsx +1 -3
- package/core/components/organisms/inlineMessage/__stories__/variants/Warning.story.jsx +1 -3
- package/core/components/organisms/pageHeader/__stories__/Responsiveness.story.jsx +2 -2
- package/core/components/organisms/pageHeader/__stories__/variants/withNavigation.story.jsx +2 -2
- package/core/components/organisms/pageHeader/__stories__/variants/withNavigationL1.story.jsx +2 -2
- package/core/components/organisms/pageHeader/__stories__/variants/withStepper.story.jsx +2 -2
- package/core/components/organisms/pageHeader/__stories__/variants/withStepperL1.story.jsx +2 -2
- package/core/components/organisms/pageHeader/__stories__/variants/withTabs.story.jsx +2 -2
- package/core/components/organisms/pageHeader/__stories__/variants/withTabsL1.story.jsx +2 -2
- package/core/components/organisms/pageHeader/__stories__/withFilter.story.jsx +2 -2
- package/core/components/organisms/pageHeader/__stories__/withFilterL1.story.jsx +2 -2
- package/core/components/organisms/pageHeader/__stories__/withNavigation.story.jsx +2 -2
- package/core/components/organisms/pageHeader/__stories__/withNavigationL1.story.jsx +9 -3
- package/core/components/organisms/pageHeader/__stories__/withStepperL1.story.jsx +4 -4
- package/core/components/organisms/table/__stories__/TableAsDescriptionList.story.jsx +4 -4
- package/core/components/organisms/timePicker/TimePicker.tsx +6 -113
- package/core/components/organisms/timePicker/TimePickerWithInput.tsx +124 -0
- package/core/components/organisms/timePicker/TimePickerWithSearch.tsx +198 -0
- package/core/components/organisms/timePicker/__stories__/TimeIntervals.story.jsx +52 -0
- package/core/components/organisms/timePicker/__stories__/disabledOption.story.jsx +52 -0
- package/core/components/organisms/timePicker/__stories__/fromTo.story.jsx +72 -0
- package/core/components/organisms/timePicker/__stories__/showDuration.story.jsx +52 -0
- package/core/components/organisms/timePicker/__stories__/withDatePicker.story.jsx +88 -0
- package/core/components/organisms/timePicker/__stories__/{index.story.jsx → withInput.story.jsx} +6 -3
- package/core/components/organisms/timePicker/__stories__/withSearch.story.jsx +89 -0
- package/core/components/organisms/timePicker/__tests__/TimePickerWithSearch.test.tsx +464 -0
- package/core/components/organisms/timePicker/__tests__/__snapshots__/TimePickerWithSearch.test.tsx.snap +169 -0
- package/core/components/organisms/timePicker/index.tsx +2 -0
- package/core/components/organisms/timePicker/utility/searchUtils.tsx +295 -0
- package/core/components/organisms/timePicker/utility/timePickerUtility.tsx +219 -0
- package/core/components/organisms/timePicker/utils.tsx +1 -1
- package/core/components/organisms/verticalNav/MenuItem.tsx +11 -6
- package/core/components/organisms/verticalNav/__stories__/CustomOptionsRenderer.story.jsx +10 -9
- package/core/components/organisms/verticalNav/__stories__/CustomTrigger.story.jsx +14 -12
- package/core/components/organisms/verticalNav/__stories__/FlatEdgedVerticalNav.story.jsx +5 -5
- package/core/components/organisms/verticalNav/__stories__/LabelOverflowBehaviour.story.jsx +9 -15
- package/core/components/organisms/verticalNav/__tests__/__snapshots__/VerticalNav.test.tsx.snap +26 -24
- package/core/index.tsx +1 -0
- package/css/dist/index.css +9 -8
- package/css/dist/index.css.map +1 -1
- package/css/src/components/dropdown.css +6 -6
- package/css/src/components/metricInput.css +1 -0
- package/css/src/components/verticalNav.css +2 -0
- package/dist/core/components/atoms/dropdown/Dropdown.d.ts +2 -0
- package/dist/core/components/atoms/dropdown/DropdownList.d.ts +1 -0
- package/dist/core/components/atoms/dropdown/utility.d.ts +1 -0
- package/dist/core/components/atoms/popperWrapper/PopperWrapper.d.ts +22 -22
- package/dist/core/components/organisms/datePicker/DatePicker.d.ts +1 -1
- package/dist/core/components/organisms/timePicker/TimePicker.d.ts +5 -13
- package/dist/core/components/organisms/timePicker/TimePickerWithInput.d.ts +24 -0
- package/dist/core/components/organisms/timePicker/TimePickerWithSearch.d.ts +32 -0
- package/dist/core/components/organisms/timePicker/index.d.ts +2 -0
- package/dist/core/components/organisms/timePicker/utility/searchUtils.d.ts +7 -0
- package/dist/core/components/organisms/timePicker/utility/timePickerUtility.d.ts +19 -0
- package/dist/core/index.d.ts +1 -0
- package/dist/index.esm.js +719 -52
- package/dist/index.js +648 -74
- 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 +32 -1
- package/docs/.prettierrc +6 -0
- package/docs/README.md +14 -0
- package/docs/cypress/e2e/main.cy.js +35 -0
- package/docs/cypress/fixtures/example.json +5 -0
- package/docs/cypress/support/commands.ts +37 -0
- package/docs/cypress/support/e2e.ts +20 -0
- package/docs/cypress.config.js +9 -0
- package/docs/package.json +16 -3
- package/docs/src/components/Colors/Colors.css +4 -0
- package/docs/src/components/Colors/Colors.js +56 -61
- package/docs/src/components/Container/ComponentsContainer.js +10 -30
- package/docs/src/components/Container/Container.js +10 -41
- package/docs/src/components/ErrorBoundary.js +9 -3
- package/docs/src/components/Footer/Footer.js +11 -10
- package/docs/src/components/GlobalSearch/index.js +47 -44
- package/docs/src/components/Header/Header.css +4 -0
- package/docs/src/components/Header/Header.js +25 -19
- package/docs/src/components/Layout.js +59 -303
- package/docs/src/components/LeftNav/LeftNav.js +12 -28
- package/docs/src/components/Logos/Logos.js +12 -26
- package/docs/src/components/MDXComponents.js +213 -0
- package/docs/src/components/MDXHeading.js +12 -18
- package/docs/src/components/Meta.js +9 -9
- package/docs/src/components/PropsTable/ArgJsDoc.tsx +2 -6
- package/docs/src/components/PropsTable/ArgRow.tsx +19 -47
- package/docs/src/components/PropsTable/ArgValue.tsx +50 -93
- package/docs/src/components/PropsTable/EmptyBlock.tsx +2 -5
- package/docs/src/components/PropsTable/SectionRow.tsx +7 -18
- package/docs/src/components/PropsTable/Table.tsx +43 -130
- package/docs/src/components/PropsTable/generateImports.tsx +1 -3
- package/docs/src/components/PropsTable/index.js +94 -140
- package/docs/src/components/PropsTable/prism.css +19 -20
- package/docs/src/components/Rules/DONTs.js +1 -6
- package/docs/src/components/Rules/DOs.js +1 -6
- package/docs/src/components/Rules/IconWrapper.js +6 -7
- package/docs/src/components/Rules/InlineMessage.js +1 -5
- package/docs/src/components/Rules/Rules.js +18 -28
- package/docs/src/components/TableOfContent/TableOfContent.css +8 -1
- package/docs/src/components/TableOfContent/TableOfContent.js +67 -58
- package/docs/src/components/css/global.css +1 -1
- package/docs/src/components/css/prism.css +1 -1
- package/docs/src/components/css/style.css +13 -5
- package/docs/src/components/templates/Default.js +1 -1
- package/docs/src/components/templates/Homepage.js +4 -6
- package/docs/src/data/components/Overview.js +49 -56
- package/docs/src/data/components/images/Calendar.png +0 -0
- package/docs/src/data/components/images/MetaList.png +0 -0
- package/docs/src/data/components/images/PageHeader.png +0 -0
- package/docs/src/data/components/images/TimePicker.png +0 -0
- package/docs/src/data/components/images/mobile/Badge.png +0 -0
- package/docs/src/data/components/images/mobile/Dropdown.png +0 -0
- package/docs/src/data/components/images/mobile/Message.png +0 -0
- package/docs/src/data/components/images/mobile/MetaList.png +0 -0
- package/docs/src/data/components/images/mobile/Slider.png +0 -0
- package/docs/src/data/components/images/mobile/StatusHint.png +0 -0
- package/docs/src/data/components/images/mobile/Stepper.png +0 -0
- package/docs/src/data/components/index.js +168 -321
- package/docs/src/data/components/mobile.js +85 -125
- package/docs/src/data/components/overview.css +4 -2
- package/docs/src/data/components/patterns.js +25 -59
- package/docs/src/data/header-items.yaml +1 -0
- package/docs/src/data/nav/components.yaml +2 -8
- package/docs/src/pages/404.js +7 -17
- package/docs/src/pages/components/avatar/usage.mdx +23 -19
- package/docs/src/pages/components/calendar/usage.mdx +3 -3
- package/docs/src/pages/components/checkbox/usage.mdx +1 -1
- package/docs/src/pages/components/chips/images/actionchip-state.png +0 -0
- package/docs/src/pages/components/chips/images/inputchips-state.png +0 -0
- package/docs/src/pages/components/chips/images/selectionchip-state.png +0 -0
- package/docs/src/pages/components/chips/usage.mdx +24 -2
- package/docs/src/pages/components/datePicker/images/datePicker-3.png +0 -0
- package/docs/src/pages/components/datePicker/images/datePicker-6.png +0 -0
- package/docs/src/pages/components/datePicker/usage.mdx +9 -2
- package/docs/src/pages/components/dropdowns/usage.mdx +1 -1
- package/docs/src/pages/components/inlineEditableFields/images/inlineEditableField-2.png +0 -0
- package/docs/src/pages/components/inlineEditableFields/images/inlineEditableField-3.png +0 -0
- package/docs/src/pages/components/inlineEditableFields/images/inlineEditableFields-1.png +0 -0
- package/docs/src/pages/components/inlineEditableFields/images/inlineEditableFields-4.png +0 -0
- package/docs/src/pages/components/inlineEditableFields/usage.mdx +4 -4
- package/docs/src/pages/components/inputs/usage.mdx +7 -7
- package/docs/src/pages/components/tabs/images/tabs-1.png +0 -0
- package/docs/src/pages/content/button-guidelines/tabs/button-glossary.mdx +1776 -1
- package/docs/src/pages/content/button-guidelines/tabs/confusing-buttons.mdx +479 -8
- package/docs/src/pages/content/email-guidelines.mdx +3 -3
- package/docs/src/pages/content/house-rules/tabs/date,-time-&-numbers.mdx +24 -0
- package/docs/src/pages/content/house-rules/tabs/grammer.mdx +42 -2
- package/docs/src/pages/content/house-rules/tabs/punctuations.mdx +32 -0
- package/docs/src/pages/foundations/colors.mdx +338 -24
- package/docs/src/pages/foundations/layout/index.mdx +57 -82
- package/docs/src/pages/foundations/response-time.mdx +32 -77
- package/docs/src/pages/foundations/typography.mdx +166 -0
- package/docs/src/pages/index.js +92 -121
- package/docs/src/pages/introduction/get-started/designers.mdx +28 -188
- package/docs/src/pages/introduction/get-started/images/designers-1.png +0 -0
- package/docs/src/pages/introduction/get-started/images/designers-2.png +0 -0
- package/docs/src/pages/introduction/what's-new.mdx +322 -15
- package/docs/src/pages/mobile/components/badges/images/badge-1.png +0 -0
- package/docs/src/pages/mobile/components/badges/images/badge-2.png +0 -0
- package/docs/src/pages/mobile/components/badges/images/badge-3.png +0 -0
- package/docs/src/pages/mobile/components/badges/images/badge-4.png +0 -0
- package/docs/src/pages/mobile/components/badges/images/badge-5.png +0 -0
- package/docs/src/pages/mobile/components/badges/usage.mdx +100 -0
- package/docs/src/pages/mobile/components/card/images/mcard-1.png +0 -0
- package/docs/src/pages/mobile/components/card/images/mcard-2.png +0 -0
- package/docs/src/pages/mobile/components/card/images/mcard-3.png +0 -0
- package/docs/src/pages/mobile/components/card/images/mcard-4.png +0 -0
- package/docs/src/pages/mobile/components/card/images/mcard-5.png +0 -0
- package/docs/src/pages/mobile/components/card/images/mcard-6.png +0 -0
- package/docs/src/pages/mobile/components/card/usage.mdx +54 -67
- package/docs/src/pages/mobile/components/checkbox/images/checkbox-1.png +0 -0
- package/docs/src/pages/mobile/components/checkbox/usage.mdx +26 -2
- package/docs/src/pages/mobile/components/dropdowns/images/dropdown-1.png +0 -0
- package/docs/src/pages/mobile/components/dropdowns/images/dropdown-10.png +0 -0
- package/docs/src/pages/mobile/components/dropdowns/images/dropdown-11.png +0 -0
- package/docs/src/pages/mobile/components/dropdowns/images/dropdown-2.png +0 -0
- package/docs/src/pages/mobile/components/dropdowns/images/dropdown-3.png +0 -0
- package/docs/src/pages/mobile/components/dropdowns/images/dropdown-4.png +0 -0
- package/docs/src/pages/mobile/components/dropdowns/images/dropdown-5.png +0 -0
- package/docs/src/pages/mobile/components/dropdowns/images/dropdown-6.png +0 -0
- package/docs/src/pages/mobile/components/dropdowns/images/dropdown-7.png +0 -0
- package/docs/src/pages/mobile/components/dropdowns/images/dropdown-8.png +0 -0
- package/docs/src/pages/mobile/components/dropdowns/images/dropdown-9.png +0 -0
- package/docs/src/pages/mobile/components/dropdowns/usage.mdx +88 -0
- package/docs/src/pages/mobile/components/message/images/messages-1.png +0 -0
- package/docs/src/pages/mobile/components/message/images/messages-10.png +0 -0
- package/docs/src/pages/mobile/components/message/images/messages-11.png +0 -0
- package/docs/src/pages/mobile/components/message/images/messages-12.png +0 -0
- package/docs/src/pages/mobile/components/message/images/messages-2.png +0 -0
- package/docs/src/pages/mobile/components/message/images/messages-3.png +0 -0
- package/docs/src/pages/mobile/components/message/images/messages-4.png +0 -0
- package/docs/src/pages/mobile/components/message/images/messages-5.png +0 -0
- package/docs/src/pages/mobile/components/message/images/messages-6.png +0 -0
- package/docs/src/pages/mobile/components/message/images/messages-7.png +0 -0
- package/docs/src/pages/mobile/components/message/images/messages-8.png +0 -0
- package/docs/src/pages/mobile/components/message/images/messages-9.png +0 -0
- package/docs/src/pages/mobile/components/message/usage.mdx +170 -0
- package/docs/src/pages/mobile/components/metaList/images/metaList-1.png +0 -0
- package/docs/src/pages/mobile/components/metaList/images/metaList-2.png +0 -0
- package/docs/src/pages/mobile/components/metaList/images/metaList-3.png +0 -0
- package/docs/src/pages/mobile/components/metaList/images/metaList-4.png +0 -0
- package/docs/src/pages/mobile/components/metaList/usage.mdx +71 -0
- package/docs/src/pages/mobile/components/slider/images/slider-1.png +0 -0
- package/docs/src/pages/mobile/components/slider/images/slider-2.png +0 -0
- package/docs/src/pages/mobile/components/slider/images/slider-3.png +0 -0
- package/docs/src/pages/mobile/components/slider/images/slider-4.png +0 -0
- package/docs/src/pages/mobile/components/slider/images/slider-5.png +0 -0
- package/docs/src/pages/mobile/components/slider/usage.mdx +83 -0
- package/docs/src/pages/mobile/components/statusHint/images/statushint-1.png +0 -0
- package/docs/src/pages/mobile/components/statusHint/images/statushint-2.png +0 -0
- package/docs/src/pages/mobile/components/statusHint/images/statushint-3.png +0 -0
- package/docs/src/pages/mobile/components/statusHint/images/statushint-4.png +0 -0
- package/docs/src/pages/mobile/components/statusHint/images/statushint-5.png +0 -0
- package/docs/src/pages/mobile/components/statusHint/images/statushint-6.png +0 -0
- package/docs/src/pages/mobile/components/statusHint/images/statushint-7.png +0 -0
- package/docs/src/pages/mobile/components/statusHint/usage.mdx +108 -0
- package/docs/src/pages/mobile/components/steppers/images/stepper-1.png +0 -0
- package/docs/src/pages/mobile/components/steppers/images/stepper-2.png +0 -0
- package/docs/src/pages/mobile/components/steppers/images/stepper-3.png +0 -0
- package/docs/src/pages/mobile/components/steppers/images/stepper-4.png +0 -0
- package/docs/src/pages/mobile/components/steppers/images/stepper-5.png +0 -0
- package/docs/src/pages/mobile/components/steppers/images/stepper-6.png +0 -0
- package/docs/src/pages/mobile/components/steppers/usage.mdx +111 -0
- package/docs/src/pages/mobile/foundations/layout/images/layout-2.png +0 -0
- package/docs/src/pages/mobile/foundations/layout/index.mdx +3 -1
- package/docs/src/pages/mobile/foundations/page-types/index.mdx +0 -214
- package/docs/src/pages/mobile/foundations/spacing/index.mdx +5 -0
- package/docs/src/pages/mobile/foundations/typography.mdx +1 -1
- package/docs/src/pages/patterns/uiStates/usage.mdx +92 -0
- package/docs/src/util/Frontmatter.js +4 -4
- package/docs/src/util/HeaderItems.js +2 -1
- package/docs/src/util/Helpers.js +3 -3
- package/docs/src/util/HomeIcons.js +91 -53
- package/docs/src/util/InPageNavItems.js +2 -6
- package/docs/src/util/Logos.js +2 -2
- package/docs/src/util/MdsChangelog.js +5 -10
- package/docs/src/util/MediumBlogs.js +13 -13
- package/docs/src/util/NavItems.js +14 -17
- package/docs/src/util/Search.js +2 -2
- package/docs/src/util/StorybookData.js +2 -4
- package/docs/src/util/constants.js +1 -5
- package/docs/src/util/context/NavContext.js +1 -4
- package/docs/src/util/hooks/useMetadata.js +1 -1
- package/docs/tools/build.sh +1 -0
- package/docs/tools/changelog.sh +1 -1
- package/package.json +3 -3
- package/docs/src/pages/components/index.mdx +0 -11
- package/docs/src/pages/components/inlineEditableFields/images/inlineEditableFields-2.png +0 -0
- package/docs/src/pages/components/inlineEditableFields/images/inlineEditableFields-3.png +0 -0
- package/docs/src/pages/content/button-guidelines/index.mdx +0 -7
- package/docs/src/pages/content/voice-and-tone-guidelines/index.mdx +0 -7
- package/docs/src/pages/introduction/get-started/images/designers-3.png +0 -0
- package/docs/src/pages/introduction/get-started/images/designers-4.png +0 -0
- package/docs/src/pages/introduction/get-started/images/designers-5.png +0 -0
- package/docs/src/pages/introduction/get-started/images/designers-6.png +0 -0
- package/docs/src/pages/introduction/get-started/images/designers-7.png +0 -0
- package/docs/src/pages/introduction/get-started/images/designers-8.png +0 -0
|
@@ -7,13 +7,13 @@ https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javasc
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
.npm__react-simple-code-editor__textarea {
|
|
10
|
-
font-family:
|
|
10
|
+
font-family: 'Roboto Mono' !important;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
code[class*=
|
|
14
|
-
pre[class*=
|
|
13
|
+
code[class*='language-'],
|
|
14
|
+
pre[class*='language-'] {
|
|
15
15
|
background: none;
|
|
16
|
-
font-family:
|
|
16
|
+
font-family: 'Roboto Mono';
|
|
17
17
|
font-size: 1em;
|
|
18
18
|
text-align: left;
|
|
19
19
|
white-space: pre;
|
|
@@ -32,48 +32,47 @@ pre[class*="language-"] {
|
|
|
32
32
|
hyphens: none;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
|
|
36
35
|
#react-tab pre {
|
|
37
|
-
font-family:
|
|
36
|
+
font-family: 'Roboto Mono' !important;
|
|
38
37
|
}
|
|
39
38
|
|
|
40
|
-
pre[class*=
|
|
41
|
-
pre[class*=
|
|
42
|
-
code[class*=
|
|
43
|
-
code[class*=
|
|
39
|
+
pre[class*='language-']::-moz-selection,
|
|
40
|
+
pre[class*='language-'] ::-moz-selection,
|
|
41
|
+
code[class*='language-']::-moz-selection,
|
|
42
|
+
code[class*='language-'] ::-moz-selection {
|
|
44
43
|
text-shadow: none;
|
|
45
44
|
background: #b3d4fc;
|
|
46
45
|
}
|
|
47
46
|
|
|
48
|
-
pre[class*=
|
|
49
|
-
pre[class*=
|
|
50
|
-
code[class*=
|
|
51
|
-
code[class*=
|
|
47
|
+
pre[class*='language-']::selection,
|
|
48
|
+
pre[class*='language-'] ::selection,
|
|
49
|
+
code[class*='language-']::selection,
|
|
50
|
+
code[class*='language-'] ::selection {
|
|
52
51
|
text-shadow: none;
|
|
53
52
|
background: #b3d4fc;
|
|
54
53
|
}
|
|
55
54
|
|
|
56
55
|
@media print {
|
|
57
|
-
code[class*=
|
|
58
|
-
pre[class*=
|
|
56
|
+
code[class*='language-'],
|
|
57
|
+
pre[class*='language-'] {
|
|
59
58
|
text-shadow: none;
|
|
60
59
|
}
|
|
61
60
|
}
|
|
62
61
|
|
|
63
62
|
/* Code blocks */
|
|
64
|
-
pre[class*=
|
|
63
|
+
pre[class*='language-'] {
|
|
65
64
|
padding: 1em;
|
|
66
65
|
margin: 0.5em 0;
|
|
67
66
|
overflow: auto;
|
|
68
67
|
}
|
|
69
68
|
|
|
70
|
-
:not(pre) > code[class*=
|
|
71
|
-
pre[class*=
|
|
69
|
+
:not(pre) > code[class*='language-'],
|
|
70
|
+
pre[class*='language-'] {
|
|
72
71
|
background: #f5f2f0;
|
|
73
72
|
}
|
|
74
73
|
|
|
75
74
|
/* Inline code */
|
|
76
|
-
:not(pre) > code[class*=
|
|
75
|
+
:not(pre) > code[class*='language-'] {
|
|
77
76
|
padding: 0.1em;
|
|
78
77
|
border-radius: 0.3em;
|
|
79
78
|
white-space: normal;
|
|
@@ -2,12 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import './Rules.css';
|
|
3
3
|
|
|
4
4
|
const DONTs = ({ children }) => {
|
|
5
|
-
|
|
6
|
-
return (
|
|
7
|
-
<div className="px-6 Rules-Dont" >
|
|
8
|
-
{children}
|
|
9
|
-
</div>
|
|
10
|
-
);
|
|
5
|
+
return <div className="px-6 Rules-Dont">{children}</div>;
|
|
11
6
|
};
|
|
12
7
|
|
|
13
8
|
export default DONTs;
|
|
@@ -3,13 +3,12 @@ import { Icon } from '@innovaccer/design-system';
|
|
|
3
3
|
|
|
4
4
|
const IconWrapper = ({ children, iconType = 'success' }) => {
|
|
5
5
|
return (
|
|
6
|
-
<div
|
|
7
|
-
{
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
6
|
+
<div className="d-flex">
|
|
7
|
+
{iconType === 'error' ? (
|
|
8
|
+
<Icon className="mr-4 mt-2" appearance="alert" name="cancel" size={14} />
|
|
9
|
+
) : (
|
|
10
|
+
<Icon className="mr-4 mt-2" appearance="success" name="check_circle" size={14} />
|
|
11
|
+
)}
|
|
13
12
|
{children}
|
|
14
13
|
</div>
|
|
15
14
|
);
|
|
@@ -3,35 +3,25 @@ import { Row, Column } from '@innovaccer/design-system';
|
|
|
3
3
|
import './Rules.css';
|
|
4
4
|
|
|
5
5
|
const Rules = ({ children, isPortraitMode = false }) => {
|
|
6
|
-
|
|
7
6
|
return (
|
|
8
|
-
<div className=
|
|
9
|
-
{
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
<
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
</
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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
|
-
}
|
|
7
|
+
<div className="Rules-Container">
|
|
8
|
+
{isPortraitMode ? (
|
|
9
|
+
<>
|
|
10
|
+
<Row>
|
|
11
|
+
<Column>{children.length > 0 && <div>{children[0]}</div>}</Column>
|
|
12
|
+
</Row>
|
|
13
|
+
<Row>
|
|
14
|
+
<Column>{children.length > 1 && <div>{children[1]}</div>}</Column>
|
|
15
|
+
</Row>
|
|
16
|
+
</>
|
|
17
|
+
) : (
|
|
18
|
+
<>
|
|
19
|
+
<Row>
|
|
20
|
+
<Column>{children.length > 0 && <div>{children[0]}</div>}</Column>
|
|
21
|
+
<Column>{children.length > 1 && <div>{children[1]}</div>}</Column>
|
|
22
|
+
</Row>
|
|
23
|
+
</>
|
|
24
|
+
)}
|
|
35
25
|
</div>
|
|
36
26
|
);
|
|
37
27
|
};
|
|
@@ -4,12 +4,19 @@
|
|
|
4
4
|
|
|
5
5
|
.toc-link {
|
|
6
6
|
text-decoration: none;
|
|
7
|
-
font-size: var(--font-size);
|
|
8
7
|
color: var(--inverse);
|
|
9
8
|
padding: var(--spacing) 0;
|
|
10
9
|
display: inline-block;
|
|
11
10
|
}
|
|
12
11
|
|
|
12
|
+
.toc-font--regular {
|
|
13
|
+
font-size: var(--font-size);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.toc-font--small {
|
|
17
|
+
font-size: var(--font-size-s);
|
|
18
|
+
}
|
|
19
|
+
|
|
13
20
|
.right-nav-container {
|
|
14
21
|
height: max-content;
|
|
15
22
|
border-left: var(--border);
|
|
@@ -8,17 +8,18 @@ const TableOfContent = (props) => {
|
|
|
8
8
|
const { relativePagePath, location } = props;
|
|
9
9
|
const clickedRef = useRef(false);
|
|
10
10
|
const unsetClickedRef = useRef(null);
|
|
11
|
+
const depth = 0;
|
|
11
12
|
|
|
12
13
|
let navItems = useNavItems(relativePagePath);
|
|
13
14
|
const [active, setActive] = useState('');
|
|
14
15
|
|
|
15
16
|
useEffect(() => {
|
|
16
17
|
const navIds = getIds(navItems);
|
|
17
|
-
let element = document.getElementById(
|
|
18
|
+
let element = document.getElementById('main-container');
|
|
18
19
|
element.addEventListener('scroll', (e) => onScrollHandler(e, navIds), true);
|
|
19
20
|
return () => {
|
|
20
21
|
element.removeEventListener('scroll', (e) => onScrollHandler(e, navIds), true);
|
|
21
|
-
}
|
|
22
|
+
};
|
|
22
23
|
}, []);
|
|
23
24
|
|
|
24
25
|
useEffect(() => {
|
|
@@ -26,45 +27,57 @@ const TableOfContent = (props) => {
|
|
|
26
27
|
if (location && location.hash) {
|
|
27
28
|
urlHash = location.hash.slice(1);
|
|
28
29
|
setActive(urlHash);
|
|
29
|
-
} else if(navItems && navItems.length) {
|
|
30
|
-
|
|
30
|
+
} else if (navItems && navItems.length) {
|
|
31
|
+
setActive(navItems[0].url?.slice(1));
|
|
31
32
|
}
|
|
32
33
|
}, []);
|
|
33
34
|
|
|
34
35
|
const isInViewport = (element) => {
|
|
35
36
|
const rect = element.getBoundingClientRect();
|
|
36
|
-
let flag =
|
|
37
|
-
if (flag) return
|
|
38
|
-
else if(rect.bottom+25 > (window.innerHeight || document.documentElement.clientHeight)) return
|
|
39
|
-
else return
|
|
40
|
-
}
|
|
37
|
+
let flag = rect.top - 60 >= 0 && rect.bottom + 25 <= (window.innerHeight || document.documentElement.clientHeight);
|
|
38
|
+
if (flag) return 'inViewPort';
|
|
39
|
+
else if (rect.bottom + 25 > (window.innerHeight || document.documentElement.clientHeight)) return 'belowViewPort';
|
|
40
|
+
else return 'aboveViewPort';
|
|
41
|
+
};
|
|
41
42
|
|
|
42
43
|
const onScrollHandler = (e, idList) => {
|
|
43
44
|
// Don't set the active index based on scroll if a link was just clicked
|
|
44
45
|
if (clickedRef.current) {
|
|
45
46
|
return;
|
|
46
47
|
}
|
|
47
|
-
if(e.target.classList.contains(
|
|
48
|
+
if (e.target.classList.contains('in-page-nav')) {
|
|
48
49
|
return;
|
|
49
|
-
|
|
50
|
+
}
|
|
50
51
|
const headerHeight = document.getElementById('mainHeader').getBoundingClientRect().height;
|
|
51
52
|
const viewportHeight = document.body.offsetHeight - headerHeight;
|
|
52
53
|
let resultFound = false;
|
|
54
|
+
const fetchUrl = (activeUrl) => {
|
|
55
|
+
let path = activeUrl.split('#');
|
|
56
|
+
return path[path.length - 1];
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
idList &&
|
|
60
|
+
idList.forEach((item) => {
|
|
61
|
+
let element = document.getElementById(item);
|
|
62
|
+
if (element && !resultFound) {
|
|
63
|
+
const { top, height } = element.getBoundingClientRect();
|
|
64
|
+
if (top > 0 && viewportHeight > top - height) {
|
|
65
|
+
setActive(item);
|
|
66
|
+
resultFound = true;
|
|
67
|
+
let activeElement = document.getElementsByClassName('active-link')[0];
|
|
68
|
+
let activeUrl = activeElement.getElementsByClassName('toc-link')[0].href;
|
|
69
|
+
let subHeading = document.getElementsByClassName('subheading')[0];
|
|
53
70
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
else if(flag === "aboveViewPort") activeElement.scrollIntoView(true);
|
|
65
|
-
};
|
|
66
|
-
};
|
|
67
|
-
});
|
|
71
|
+
const activeContent = fetchUrl(activeUrl);
|
|
72
|
+
let flag = isInViewport(activeElement);
|
|
73
|
+
if (flag === 'belowViewPort') activeElement.scrollIntoView(true);
|
|
74
|
+
else if (flag === 'aboveViewPort') {
|
|
75
|
+
if (activeContent == idList[0]) subHeading.scrollIntoView(true);
|
|
76
|
+
else activeElement.scrollIntoView(true);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
});
|
|
68
81
|
};
|
|
69
82
|
|
|
70
83
|
const onClickHandler = (e, itemUrl) => {
|
|
@@ -90,47 +103,43 @@ const TableOfContent = (props) => {
|
|
|
90
103
|
}, []);
|
|
91
104
|
}
|
|
92
105
|
|
|
93
|
-
function renderItems(items) {
|
|
106
|
+
function renderItems(items,depth) {
|
|
94
107
|
return (
|
|
95
|
-
<ul className=
|
|
96
|
-
{items &&
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
<
|
|
100
|
-
className={`${active == item.url?.slice(1) ? 'active-link' : ''
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
>
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
</li>
|
|
117
|
-
);
|
|
118
|
-
})}
|
|
108
|
+
<ul className="table-of-content-list pr-8">
|
|
109
|
+
{items &&
|
|
110
|
+
items.map((item, key) => {
|
|
111
|
+
return (
|
|
112
|
+
<li key={key}>
|
|
113
|
+
<div className={`${active == item.url?.slice(1) ? 'active-link' : ''}`}>
|
|
114
|
+
<Link
|
|
115
|
+
to={item.url}
|
|
116
|
+
onClick={(e) => onClickHandler(e, item.url.slice(1))}
|
|
117
|
+
className={`toc-link ${depth == 0 ? 'toc-font--regular' : 'toc-font--small'}`}
|
|
118
|
+
style={{
|
|
119
|
+
display: `${item.title ? 'inline-block' : 'none'}`,
|
|
120
|
+
}}
|
|
121
|
+
>
|
|
122
|
+
{item.title}
|
|
123
|
+
</Link>
|
|
124
|
+
</div>
|
|
125
|
+
{item.items && renderItems(item.items,1)}
|
|
126
|
+
</li>
|
|
127
|
+
);
|
|
128
|
+
})}
|
|
119
129
|
</ul>
|
|
120
130
|
);
|
|
121
131
|
}
|
|
122
132
|
|
|
123
133
|
return (
|
|
124
|
-
<div className=
|
|
134
|
+
<div className="d-flex flex-column right-nav-container overflow-hidden">
|
|
125
135
|
{navItems && navItems.length ? (
|
|
126
136
|
<>
|
|
127
|
-
<
|
|
128
|
-
appearance=
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
{renderItems(navItems)}
|
|
137
|
+
<div className="subheading">
|
|
138
|
+
<Subheading appearance="subtle" className="pl-6 mt-10">
|
|
139
|
+
CONTENTS
|
|
140
|
+
</Subheading>
|
|
141
|
+
</div>
|
|
142
|
+
{renderItems(navItems,depth)}
|
|
134
143
|
</>
|
|
135
144
|
) : (
|
|
136
145
|
''
|
|
@@ -35,7 +35,7 @@ ol {
|
|
|
35
35
|
|
|
36
36
|
.list > li {
|
|
37
37
|
list-style: none;
|
|
38
|
-
margin-bottom: var(--spacing
|
|
38
|
+
margin-bottom: var(--spacing);
|
|
39
39
|
margin-left: var(--spacing-s);
|
|
40
40
|
}
|
|
41
41
|
|
|
@@ -43,10 +43,14 @@ ol {
|
|
|
43
43
|
content: '\2022';
|
|
44
44
|
width: 2px;
|
|
45
45
|
display: inline-block;
|
|
46
|
-
color: var(--inverse-
|
|
46
|
+
color: var(--inverse-light);
|
|
47
47
|
margin-right: var(--spacing-l);
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
+
.ordered-list > li {
|
|
51
|
+
margin-bottom: var(--spacing);
|
|
52
|
+
}
|
|
53
|
+
|
|
50
54
|
.toast {
|
|
51
55
|
left: 0;
|
|
52
56
|
bottom: 0;
|
|
@@ -75,7 +79,7 @@ ol {
|
|
|
75
79
|
font-size: var(--spacing-l);
|
|
76
80
|
}
|
|
77
81
|
|
|
78
|
-
.overflow-x-scroll::-webkit-scrollbar,
|
|
82
|
+
.overflow-x-scroll::-webkit-scrollbar,
|
|
79
83
|
.scroll-y::-webkit-scrollbar {
|
|
80
84
|
display: none;
|
|
81
85
|
}
|
|
@@ -89,7 +93,7 @@ table {
|
|
|
89
93
|
border-collapse: collapse;
|
|
90
94
|
border-radius: 4px;
|
|
91
95
|
border-style: hidden; /* hide standard table (collapsed) border */
|
|
92
|
-
box-shadow: 0 0 0 1px var(--secondary-light); /* this draws the table border */
|
|
96
|
+
box-shadow: 0 0 0 1px var(--secondary-light); /* this draws the table border */
|
|
93
97
|
}
|
|
94
98
|
|
|
95
99
|
table th,
|
|
@@ -117,7 +121,7 @@ table td {
|
|
|
117
121
|
.bitmap-container {
|
|
118
122
|
text-align: center !important;
|
|
119
123
|
}
|
|
120
|
-
.bitmap-container img{
|
|
124
|
+
.bitmap-container img {
|
|
121
125
|
height: auto;
|
|
122
126
|
width: 50%;
|
|
123
127
|
}
|
|
@@ -139,3 +143,7 @@ blockquote p {
|
|
|
139
143
|
width: 80px;
|
|
140
144
|
text-align: center;
|
|
141
145
|
}
|
|
146
|
+
|
|
147
|
+
.text-align--center {
|
|
148
|
+
text-align: center;
|
|
149
|
+
}
|
|
@@ -4,7 +4,7 @@ import LastModifiedDate from '../LastModifiedDate';
|
|
|
4
4
|
|
|
5
5
|
export default ({ pageContext, children, ...rest }) => {
|
|
6
6
|
const { frontmatter = {}, titleType, relativePagePath } = pageContext;
|
|
7
|
-
const { title, description, keywords, tabs, logos, showMobile=false } = frontmatter;
|
|
7
|
+
const { title, description, keywords, tabs, logos, showMobile = false } = frontmatter;
|
|
8
8
|
return (
|
|
9
9
|
<Layout
|
|
10
10
|
pageTitle={title}
|
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import React from
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import Header from '../Header';
|
|
3
3
|
|
|
4
|
-
export default ({relativePagePath, children }) => {
|
|
4
|
+
export default ({ relativePagePath, children }) => {
|
|
5
5
|
return (
|
|
6
6
|
<div>
|
|
7
|
-
<Header
|
|
8
|
-
relativePagePath={relativePagePath}
|
|
9
|
-
/>
|
|
7
|
+
<Header relativePagePath={relativePagePath} />
|
|
10
8
|
{children}
|
|
11
9
|
</div>
|
|
12
10
|
);
|
|
13
|
-
}
|
|
11
|
+
};
|
|
@@ -6,26 +6,23 @@ import { debounce } from '../../util/Helpers';
|
|
|
6
6
|
import noResultImage from './images/noresult.png';
|
|
7
7
|
|
|
8
8
|
const StatusTag = ({ category }) => {
|
|
9
|
-
|
|
10
9
|
const categoryName = category?.toUpperCase();
|
|
11
10
|
|
|
12
11
|
const appearance = {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
12
|
+
'CODE UNAVAILABLE': 'accent1',
|
|
13
|
+
BETA: 'accent2',
|
|
14
|
+
};
|
|
16
15
|
|
|
17
|
-
return <Badge appearance={appearance[categoryName]}>{category}</Badge
|
|
18
|
-
}
|
|
16
|
+
return <Badge appearance={appearance[categoryName]}>{category}</Badge>;
|
|
17
|
+
};
|
|
19
18
|
|
|
20
19
|
function Overview({ data, mode, path = 'components' }) {
|
|
21
|
-
|
|
22
20
|
const [previewList, setPreviewList] = useState(data);
|
|
23
|
-
const [searchKey, setSearchKey] = useState('')
|
|
21
|
+
const [searchKey, setSearchKey] = useState('');
|
|
24
22
|
|
|
25
23
|
const onSearchHandler = debounce((target) => {
|
|
26
|
-
setSearchKey(target.value)
|
|
27
|
-
const searchList = data
|
|
28
|
-
.filter((item) => item.name.toLowerCase().match(target.value.toLowerCase()));
|
|
24
|
+
setSearchKey(target.value);
|
|
25
|
+
const searchList = data.filter((item) => item.name.toLowerCase().match(target.value.toLowerCase()));
|
|
29
26
|
setPreviewList(searchList);
|
|
30
27
|
});
|
|
31
28
|
|
|
@@ -39,56 +36,52 @@ function Overview({ data, mode, path = 'components' }) {
|
|
|
39
36
|
onChange={({ target }) => onSearchHandler(target)}
|
|
40
37
|
/>
|
|
41
38
|
|
|
42
|
-
<div className=
|
|
43
|
-
{
|
|
44
|
-
previewList.
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
<
|
|
48
|
-
|
|
49
|
-
|
|
39
|
+
<div className="d-flex flex-wrap">
|
|
40
|
+
{previewList.length > 0 ? (
|
|
41
|
+
previewList.map(({ image = () => <img alt="" />, name, status, link = '' }) => {
|
|
42
|
+
return (
|
|
43
|
+
<div key={name} className="overview-container-card pb-6 mr-6">
|
|
44
|
+
<Link
|
|
45
|
+
className="card-link"
|
|
46
|
+
disabled={!link.length}
|
|
47
|
+
to={mode === 'mobile' ? `/mobile/${path}/${link}` : `/${path}/${link}`}
|
|
50
48
|
>
|
|
49
|
+
<Card shadow="none" className="w-100 overflow-hidden overview-card pb-5 h-100">
|
|
50
|
+
<CardBody className="px-0">
|
|
51
|
+
<div className="py-5 card-opacity d-flex flex-column">
|
|
52
|
+
<div className="d-flex justify-content-end mr-5">
|
|
53
|
+
{status && <StatusTag category={status} />}
|
|
54
|
+
</div>
|
|
51
55
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
<Card
|
|
58
|
-
shadow='none'
|
|
59
|
-
className='w-100 overflow-hidden overview-card pb-5 h-100'
|
|
60
|
-
>
|
|
61
|
-
<CardBody className='px-0'>
|
|
62
|
-
<div className='py-5 card-opacity d-flex flex-column'>
|
|
63
|
-
<div className='d-flex justify-content-end mr-5'>
|
|
64
|
-
{status && <StatusTag category={status} />}
|
|
65
|
-
</div>
|
|
66
|
-
|
|
67
|
-
<div className='d-flex justify-content-center align-items-center' style={{ overflow: 'hidden', height: '168px' }}>
|
|
68
|
-
{React.createElement(image)}
|
|
69
|
-
</div>
|
|
56
|
+
<div
|
|
57
|
+
className="d-flex justify-content-center align-items-center"
|
|
58
|
+
style={{ overflow: 'hidden', height: '168px' }}
|
|
59
|
+
>
|
|
60
|
+
{React.createElement(image)}
|
|
70
61
|
</div>
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
</
|
|
75
|
-
</
|
|
76
|
-
</
|
|
77
|
-
</
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
62
|
+
</div>
|
|
63
|
+
<Heading size="s" className="ml-6 position-absolute card-heading">
|
|
64
|
+
{name}
|
|
65
|
+
</Heading>
|
|
66
|
+
</CardBody>
|
|
67
|
+
</Card>
|
|
68
|
+
</Link>
|
|
69
|
+
</div>
|
|
70
|
+
);
|
|
71
|
+
})
|
|
72
|
+
) : (
|
|
73
|
+
<div className="d-flex justify-content-center" style={{ transform: 'translate(50%,64px)' }}>
|
|
74
|
+
<EmptyState
|
|
75
|
+
size="small"
|
|
76
|
+
description="Sorry! We could not find any match. Please try again"
|
|
77
|
+
imageSrc={noResultImage}
|
|
78
|
+
title={`No results found for '${searchKey}'`}
|
|
79
|
+
/>
|
|
80
|
+
</div>
|
|
81
|
+
)}
|
|
89
82
|
</div>
|
|
90
83
|
</div>
|
|
91
|
-
)
|
|
84
|
+
);
|
|
92
85
|
}
|
|
93
86
|
|
|
94
87
|
export default Overview;
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|