@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
|
@@ -3,7 +3,6 @@ import Button from '@/components/atoms/button';
|
|
|
3
3
|
import Dropdown from '@/components/atoms/dropdown';
|
|
4
4
|
|
|
5
5
|
export const splitButton = () => {
|
|
6
|
-
|
|
7
6
|
const options = [
|
|
8
7
|
{
|
|
9
8
|
label: 'Download All',
|
|
@@ -24,7 +23,7 @@ export const splitButton = () => {
|
|
|
24
23
|
<Dropdown menu={true} icon="expand_more" options={options} />
|
|
25
24
|
</div>
|
|
26
25
|
</div>
|
|
27
|
-
)
|
|
26
|
+
);
|
|
28
27
|
};
|
|
29
28
|
|
|
30
29
|
export default {
|
|
@@ -1,36 +1,38 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { Checkbox, Label, Row, Column,
|
|
2
|
+
import { Checkbox, Label, Row, Column, Heading } from '@/index';
|
|
3
3
|
|
|
4
|
-
const
|
|
4
|
+
export const AlignmentOfCheckboxGroup = () => {
|
|
5
|
+
const days = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'];
|
|
5
6
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
7
|
+
return (
|
|
8
|
+
<div>
|
|
9
|
+
<Row>
|
|
10
|
+
<Column>
|
|
11
|
+
<Heading size="s">Horizontal Alignment</Heading>
|
|
12
|
+
<Label>Days</Label>
|
|
13
|
+
<div className="d-flex">
|
|
14
|
+
{days.map((day, index) => {
|
|
15
|
+
return (
|
|
16
|
+
<Checkbox className={index !== 0 ? 'ml-7' : ''} key={index} label={day} defaultChecked={index < 2} />
|
|
17
|
+
);
|
|
18
|
+
})}
|
|
19
|
+
</div>
|
|
20
|
+
</Column>
|
|
21
|
+
</Row>
|
|
22
|
+
<Row>
|
|
23
|
+
<Column className="pt-5 mt-8">
|
|
24
|
+
<Heading size="s">Vertical Alignment</Heading>
|
|
25
|
+
<Label>Days</Label>
|
|
21
26
|
{days.map((day, index) => {
|
|
22
27
|
return (
|
|
23
|
-
<Checkbox
|
|
28
|
+
<Checkbox key={index} label={day} defaultChecked={index < 2} className={index !== 0 ? 'mt-4' : ''} />
|
|
24
29
|
);
|
|
25
30
|
})}
|
|
26
|
-
</
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
</Row>
|
|
32
|
-
</div>
|
|
33
|
-
);
|
|
31
|
+
</Column>
|
|
32
|
+
</Row>
|
|
33
|
+
</div>
|
|
34
|
+
);
|
|
35
|
+
};
|
|
34
36
|
|
|
35
37
|
export default {
|
|
36
38
|
title: 'Components/Checkbox/Alignment Of Checkbox Group',
|
|
@@ -7,7 +7,7 @@ export const controlledCheckbox = () => {
|
|
|
7
7
|
|
|
8
8
|
const handleParentChange = (event) => {
|
|
9
9
|
const updatedChecked = event.target.checked;
|
|
10
|
-
window.setTimeout(() => {
|
|
10
|
+
this.window.setTimeout(() => {
|
|
11
11
|
setChecked(updatedChecked);
|
|
12
12
|
}, 2000);
|
|
13
13
|
};
|
|
@@ -20,7 +20,7 @@ const customCode = `() => {
|
|
|
20
20
|
|
|
21
21
|
const handleParentChange = (event) => {
|
|
22
22
|
const updatedChecked = event.target.checked;
|
|
23
|
-
window.setTimeout(() => {
|
|
23
|
+
this.window.setTimeout(() => {
|
|
24
24
|
setChecked(updatedChecked);
|
|
25
25
|
}, 2000);
|
|
26
26
|
};
|
|
@@ -27,8 +27,8 @@ export const all = () => {
|
|
|
27
27
|
clearButton={clearButton}
|
|
28
28
|
disabled={disabled}
|
|
29
29
|
type={type}
|
|
30
|
-
onClose={action(`onClose: ${
|
|
31
|
-
onClick={action(`onClick: ${
|
|
30
|
+
onClose={action(`onClose: ${label}`)}
|
|
31
|
+
onClick={action(`onClick: ${label}`)}
|
|
32
32
|
selected={selected}
|
|
33
33
|
name={'chip'}
|
|
34
34
|
/>
|
|
@@ -16,8 +16,8 @@ export const Action = () => {
|
|
|
16
16
|
icon={icon}
|
|
17
17
|
label={label}
|
|
18
18
|
disabled={booleanvalue}
|
|
19
|
-
onClose={action(`onClose: ${
|
|
20
|
-
onClick={action(`onClick: ${
|
|
19
|
+
onClose={action(`onClose: ${label}`)}
|
|
20
|
+
onClick={action(`onClick: ${label}`)}
|
|
21
21
|
type="action"
|
|
22
22
|
name={'chip'}
|
|
23
23
|
/>
|
|
@@ -17,8 +17,8 @@ export const Input = () => {
|
|
|
17
17
|
clearButton={true}
|
|
18
18
|
disabled={booleanvalue}
|
|
19
19
|
type="input"
|
|
20
|
-
onClose={action(`onClose: ${
|
|
21
|
-
onClick={action(`onClick: ${
|
|
20
|
+
onClose={action(`onClose: ${label}`)}
|
|
21
|
+
onClick={action(`onClick: ${label}`)}
|
|
22
22
|
name={'chip'}
|
|
23
23
|
/>
|
|
24
24
|
<br />
|
|
@@ -17,8 +17,8 @@ export const Selection = () => {
|
|
|
17
17
|
clearButton={true}
|
|
18
18
|
disabled={booleanvalue}
|
|
19
19
|
type="selection"
|
|
20
|
-
onClose={action(`onClose: ${
|
|
21
|
-
onClick={action(`onClick: ${
|
|
20
|
+
onClose={action(`onClose: ${label}`)}
|
|
21
|
+
onClick={action(`onClick: ${label}`)}
|
|
22
22
|
selected={false}
|
|
23
23
|
name={'chip'}
|
|
24
24
|
/>
|
|
@@ -33,8 +33,8 @@ export const Selection = () => {
|
|
|
33
33
|
label={label}
|
|
34
34
|
clearButton={true}
|
|
35
35
|
type="selection"
|
|
36
|
-
onClose={action(`onClose: ${
|
|
37
|
-
onClick={action(`onClick: ${
|
|
36
|
+
onClose={action(`onClose: ${label}`)}
|
|
37
|
+
onClick={action(`onClick: ${label}`)}
|
|
38
38
|
selected={true}
|
|
39
39
|
name={'chip'}
|
|
40
40
|
/>
|
|
@@ -47,8 +47,8 @@ export const Selection = () => {
|
|
|
47
47
|
label={label}
|
|
48
48
|
clearButton={true}
|
|
49
49
|
type="selection"
|
|
50
|
-
onClose={action(`onClose: ${
|
|
51
|
-
onClick={action(`onClick: ${
|
|
50
|
+
onClose={action(`onClose: ${label}`)}
|
|
51
|
+
onClick={action(`onClick: ${label}`)}
|
|
52
52
|
selected={true}
|
|
53
53
|
disabled={true}
|
|
54
54
|
name={'chip'}
|
|
@@ -20,8 +20,8 @@ export const Types = () => {
|
|
|
20
20
|
clearButton={clearButton}
|
|
21
21
|
disabled={disabled}
|
|
22
22
|
type={type}
|
|
23
|
-
onClose={action(`onClose: ${
|
|
24
|
-
onClick={action(`onClick: ${
|
|
23
|
+
onClose={action(`onClose: ${label}`)}
|
|
24
|
+
onClick={action(`onClick: ${label}`)}
|
|
25
25
|
selected={selected}
|
|
26
26
|
name={'chip'}
|
|
27
27
|
/>
|
|
@@ -38,7 +38,7 @@ export const all = () => {
|
|
|
38
38
|
},
|
|
39
39
|
];
|
|
40
40
|
|
|
41
|
-
return <ChipGroup onClose={action(`onClose
|
|
41
|
+
return <ChipGroup onClose={action(`onClose event`)} onClick={action(`onClick event`)} list={list} />;
|
|
42
42
|
};
|
|
43
43
|
export default {
|
|
44
44
|
title: 'Components/ChipGroup/All',
|
|
@@ -1,50 +1,18 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import Collapsible from '@/components/atoms/collapsible';
|
|
3
|
-
import { Icon,
|
|
3
|
+
import { Icon, Text, Heading } from '@/index';
|
|
4
4
|
|
|
5
5
|
// CSF format story
|
|
6
6
|
export const CustomTrigger = () => {
|
|
7
7
|
const [expanded, setExpanded] = React.useState(false);
|
|
8
|
-
const [active, setActive] = React.useState({
|
|
9
|
-
name: 'To-do\'s.Due',
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
const data = [
|
|
13
|
-
{
|
|
14
|
-
name: 'To-do\'s',
|
|
15
|
-
label: 'To-do\'s',
|
|
16
|
-
icon: 'assignment_ind',
|
|
17
|
-
count: 31,
|
|
18
|
-
subMenu: [
|
|
19
|
-
{
|
|
20
|
-
name: 'To-do\'s.Due',
|
|
21
|
-
label: 'Due',
|
|
22
|
-
count: 31
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
name: 'To-do\'s.Completed',
|
|
26
|
-
label: 'Completed',
|
|
27
|
-
count: 0
|
|
28
|
-
},
|
|
29
|
-
],
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
name: 'Received',
|
|
33
|
-
label: 'Received',
|
|
34
|
-
count: 0
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
name: 'Sent',
|
|
38
|
-
label: 'Sent',
|
|
39
|
-
count: 5
|
|
40
|
-
},
|
|
41
|
-
];
|
|
42
8
|
|
|
43
9
|
return (
|
|
44
10
|
<div>
|
|
45
|
-
<div className=
|
|
11
|
+
<div className="d-flex align-items-center mb-3">
|
|
46
12
|
<Icon name="menu" className="cursor-pointer" onClick={() => setExpanded(!expanded)}></Icon>
|
|
47
|
-
<Heading size=
|
|
13
|
+
<Heading size="s" className="ml-4">
|
|
14
|
+
Click to Open
|
|
15
|
+
</Heading>
|
|
48
16
|
</div>
|
|
49
17
|
<Collapsible withTrigger={false} expanded={expanded} height="100vh">
|
|
50
18
|
<div className="d-flex pt-4">
|
|
@@ -58,40 +26,6 @@ export const CustomTrigger = () => {
|
|
|
58
26
|
|
|
59
27
|
const customCode = `() => {
|
|
60
28
|
const [expanded, setExpanded] = React.useState(false);
|
|
61
|
-
const [active, setActive] = React.useState({
|
|
62
|
-
name: 'TODOs.Due',
|
|
63
|
-
});
|
|
64
|
-
|
|
65
|
-
const data = [
|
|
66
|
-
{
|
|
67
|
-
name: 'TODOs',
|
|
68
|
-
label: 'TODOs',
|
|
69
|
-
icon: 'assignment_ind',
|
|
70
|
-
count: 31,
|
|
71
|
-
subMenu: [
|
|
72
|
-
{
|
|
73
|
-
name: 'TODOs.Due',
|
|
74
|
-
label: 'Due',
|
|
75
|
-
count: 31
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
name: 'TODOs.Completed',
|
|
79
|
-
label: 'Completed',
|
|
80
|
-
count: 0
|
|
81
|
-
},
|
|
82
|
-
],
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
name: 'Received',
|
|
86
|
-
label: 'Received',
|
|
87
|
-
count: 0
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
name: 'Sent',
|
|
91
|
-
label: 'Sent',
|
|
92
|
-
count: 5
|
|
93
|
-
},
|
|
94
|
-
];
|
|
95
29
|
|
|
96
30
|
return (
|
|
97
31
|
<div>
|
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
_showSelectedItems,
|
|
11
11
|
_isOpenControlled,
|
|
12
12
|
_isSelectAllPresent,
|
|
13
|
+
scrollToOptionIndex,
|
|
13
14
|
} from './utility';
|
|
14
15
|
import { BaseProps } from '@/utils/types';
|
|
15
16
|
import { ChangeEvent } from '@/common.type';
|
|
@@ -192,6 +193,10 @@ interface SharedDropdownProps extends DropdownListProps, BaseProps {
|
|
|
192
193
|
* Callback function called when dropdown is closed
|
|
193
194
|
*/
|
|
194
195
|
onClose?: (selected: any[], name?: string | number) => void;
|
|
196
|
+
/**
|
|
197
|
+
* Specify the option index which needs to be focused
|
|
198
|
+
*/
|
|
199
|
+
tabIndex?: number;
|
|
195
200
|
}
|
|
196
201
|
|
|
197
202
|
type SyncDropdownProps = SyncProps & SharedDropdownProps;
|
|
@@ -219,6 +224,7 @@ interface DropdownState {
|
|
|
219
224
|
selected: OptionSchema[];
|
|
220
225
|
tempSelected: OptionSchema[];
|
|
221
226
|
previousSelected: OptionSchema[];
|
|
227
|
+
scrollIndex?: number;
|
|
222
228
|
}
|
|
223
229
|
|
|
224
230
|
/**
|
|
@@ -383,6 +389,11 @@ export class Dropdown extends React.Component<DropdownProps, DropdownState> {
|
|
|
383
389
|
|
|
384
390
|
fetchFunction(searchTerm).then((res: any) => {
|
|
385
391
|
const { options, count } = res;
|
|
392
|
+
if (res.scrollToIndex) {
|
|
393
|
+
setTimeout(() => {
|
|
394
|
+
scrollToOptionIndex(res.scrollToIndex, options);
|
|
395
|
+
}, 0);
|
|
396
|
+
}
|
|
386
397
|
if (!res.searchTerm || (res.searchTerm && res.searchTerm === this.state.searchTerm)) {
|
|
387
398
|
updatedAsync = searchTerm === '' ? count > this.staticLimit : updatedAsync;
|
|
388
399
|
|
|
@@ -395,6 +406,7 @@ export class Dropdown extends React.Component<DropdownProps, DropdownState> {
|
|
|
395
406
|
|
|
396
407
|
this.setState({
|
|
397
408
|
...this.state,
|
|
409
|
+
scrollIndex: res.scrollToIndex || 0,
|
|
398
410
|
optionsLength,
|
|
399
411
|
loading: false,
|
|
400
412
|
async: updatedAsync,
|
|
@@ -716,14 +728,17 @@ export class Dropdown extends React.Component<DropdownProps, DropdownState> {
|
|
|
716
728
|
selectAll,
|
|
717
729
|
triggerLabel,
|
|
718
730
|
previousSelected,
|
|
731
|
+
scrollIndex,
|
|
719
732
|
} = this.state;
|
|
720
733
|
|
|
721
734
|
const { withSelectAll = true, withCheckbox } = this.props;
|
|
722
735
|
|
|
723
|
-
const { triggerOptions = {}, selected, ...rest } = this.props;
|
|
736
|
+
const { triggerOptions = {}, selected, tabIndex, ...rest } = this.props;
|
|
724
737
|
const remainingOptionsLen = searchedOptionsLength - options.length;
|
|
725
738
|
|
|
726
|
-
const firstEnabledOption =
|
|
739
|
+
const firstEnabledOption = tabIndex
|
|
740
|
+
? tabIndex
|
|
741
|
+
: _isSelectAllPresent(searchTerm, remainingOptionsLen, withSelectAll, withCheckbox)
|
|
727
742
|
? 0
|
|
728
743
|
: options.findIndex((option) => !option.disabled);
|
|
729
744
|
|
|
@@ -752,6 +767,7 @@ export class Dropdown extends React.Component<DropdownProps, DropdownState> {
|
|
|
752
767
|
onOptionSelect={this.onOptionSelect}
|
|
753
768
|
onSelectAll={this.onSelectAll}
|
|
754
769
|
customTrigger={triggerOptions.customTrigger}
|
|
770
|
+
scrollIndex={scrollIndex}
|
|
755
771
|
{...rest}
|
|
756
772
|
/>
|
|
757
773
|
);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { scrollIntoView, _isEqual, _isSelectAllPresent } from './utility';
|
|
2
|
+
import { scrollIntoView, _isEqual, _isSelectAllPresent, scrollToOptionIndex } from './utility';
|
|
3
3
|
import { Popover, Checkbox, Button, Text, Input } from '@/index';
|
|
4
4
|
import { PopoverProps } from '@/index.type';
|
|
5
5
|
import DropdownButton, { TriggerProps } from './DropdownButton';
|
|
@@ -145,6 +145,11 @@ export interface DropdownListProps extends TriggerAndOptionProps {
|
|
|
145
145
|
* Adds custom placeholder to searchBar
|
|
146
146
|
*/
|
|
147
147
|
searchPlaceholder?: string;
|
|
148
|
+
/**
|
|
149
|
+
* Specify index of option where cursor should scroll
|
|
150
|
+
* @ignore
|
|
151
|
+
*/
|
|
152
|
+
scrollIndex?: number;
|
|
148
153
|
}
|
|
149
154
|
|
|
150
155
|
interface OptionsProps extends DropdownListProps, BaseProps {
|
|
@@ -212,6 +217,7 @@ const DropdownList = (props: OptionsProps) => {
|
|
|
212
217
|
toggleDropdown,
|
|
213
218
|
className,
|
|
214
219
|
searchPlaceholder = 'Search..',
|
|
220
|
+
scrollIndex,
|
|
215
221
|
} = props;
|
|
216
222
|
|
|
217
223
|
const baseProps = extractBaseProps(props);
|
|
@@ -225,10 +231,8 @@ const DropdownList = (props: OptionsProps) => {
|
|
|
225
231
|
const [popoverStyle, setPopoverStyle] = React.useState<PopoverProps['customStyle']>();
|
|
226
232
|
const [cursor, setCursor] = React.useState(firstEnabledOption);
|
|
227
233
|
|
|
228
|
-
// Re-initializes its value to 0 on every re-render
|
|
229
|
-
let animateOrder = 0;
|
|
230
|
-
|
|
231
234
|
React.useEffect(() => {
|
|
235
|
+
let timer: any;
|
|
232
236
|
if (dropdownOpen) {
|
|
233
237
|
const { width, minWidth, maxWidth } = props;
|
|
234
238
|
const popperWidth = triggerRef.current?.clientWidth;
|
|
@@ -241,7 +245,18 @@ const DropdownList = (props: OptionsProps) => {
|
|
|
241
245
|
};
|
|
242
246
|
|
|
243
247
|
setPopoverStyle(popperWrapperStyle);
|
|
248
|
+
|
|
249
|
+
// scrolls to current time
|
|
250
|
+
if (scrollIndex && tempSelected.length === 0) {
|
|
251
|
+
timer = setTimeout(() => {
|
|
252
|
+
scrollToOptionIndex(scrollIndex, listOptions);
|
|
253
|
+
}, 100);
|
|
254
|
+
}
|
|
244
255
|
}
|
|
256
|
+
|
|
257
|
+
return () => {
|
|
258
|
+
clearTimeout(timer);
|
|
259
|
+
};
|
|
245
260
|
}, [dropdownOpen]);
|
|
246
261
|
|
|
247
262
|
React.useEffect(() => {
|
|
@@ -285,27 +300,11 @@ const DropdownList = (props: OptionsProps) => {
|
|
|
285
300
|
return Dropdown;
|
|
286
301
|
};
|
|
287
302
|
|
|
288
|
-
const animateClass = classNames({
|
|
289
|
-
['fade-in']: dropdownOpen,
|
|
290
|
-
['opacity-0']: dropdownOpen,
|
|
291
|
-
['Dropdown-items']: true,
|
|
292
|
-
});
|
|
293
|
-
|
|
294
|
-
const getAnimateOrderStyle = (order: number) => {
|
|
295
|
-
const animateStyle: React.CSSProperties = {
|
|
296
|
-
animationDelay: dropdownOpen ? order * 20 + 'ms' : '',
|
|
297
|
-
};
|
|
298
|
-
return animateStyle;
|
|
299
|
-
};
|
|
300
|
-
|
|
301
303
|
const getDropdownSectionClass = (showClearButton?: boolean) => {
|
|
302
|
-
return classNames(
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
},
|
|
307
|
-
animateClass
|
|
308
|
-
);
|
|
304
|
+
return classNames({
|
|
305
|
+
['Dropdown-section']: true,
|
|
306
|
+
['Dropdown-section--withClear']: showClearButton,
|
|
307
|
+
});
|
|
309
308
|
};
|
|
310
309
|
|
|
311
310
|
const dropdownClass = classNames(
|
|
@@ -320,14 +319,11 @@ const DropdownList = (props: OptionsProps) => {
|
|
|
320
319
|
['Dropdown-wrapper--wrap']: !truncateOption,
|
|
321
320
|
});
|
|
322
321
|
|
|
323
|
-
const SelectAllClass = classNames(
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
},
|
|
329
|
-
animateClass
|
|
330
|
-
);
|
|
322
|
+
const SelectAllClass = classNames({
|
|
323
|
+
['Option-checkbox']: true,
|
|
324
|
+
['Option-checkbox--active']: cursor === 0,
|
|
325
|
+
['OptionWrapper']: true,
|
|
326
|
+
});
|
|
331
327
|
|
|
332
328
|
const onToggleDropdown = (open: boolean, type?: string) => {
|
|
333
329
|
toggleDropdown(open, type);
|
|
@@ -369,7 +365,7 @@ const DropdownList = (props: OptionsProps) => {
|
|
|
369
365
|
const renderFooter = () => {
|
|
370
366
|
const { footerLabel = 'Search for more options' } = props;
|
|
371
367
|
return (
|
|
372
|
-
<div className=
|
|
368
|
+
<div className="Dropdown-footer">
|
|
373
369
|
<Text size="small" appearance={'subtle'}>
|
|
374
370
|
{footerLabel}
|
|
375
371
|
</Text>
|
|
@@ -382,7 +378,7 @@ const DropdownList = (props: OptionsProps) => {
|
|
|
382
378
|
const isClearDisabled = selected.every((option) => option.disabled);
|
|
383
379
|
|
|
384
380
|
return (
|
|
385
|
-
<div className={getDropdownSectionClass(selectedGroup)}
|
|
381
|
+
<div className={getDropdownSectionClass(selectedGroup)}>
|
|
386
382
|
<Text size="small" appearance={'subtle'}>
|
|
387
383
|
{group}
|
|
388
384
|
</Text>
|
|
@@ -404,7 +400,7 @@ const DropdownList = (props: OptionsProps) => {
|
|
|
404
400
|
const renderApplyButton = () => {
|
|
405
401
|
const disable = _isEqual(previousSelected, tempSelected);
|
|
406
402
|
return (
|
|
407
|
-
<div className=
|
|
403
|
+
<div className="Dropdown-buttonWrapper">
|
|
408
404
|
<Button
|
|
409
405
|
ref={dropdownCancelButtonRef}
|
|
410
406
|
className="mr-4"
|
|
@@ -432,7 +428,7 @@ const DropdownList = (props: OptionsProps) => {
|
|
|
432
428
|
|
|
433
429
|
const renderSearch = () => {
|
|
434
430
|
return (
|
|
435
|
-
<div className=
|
|
431
|
+
<div className="Dropdown-inputWrapper">
|
|
436
432
|
<Input
|
|
437
433
|
name="Dropdown-search"
|
|
438
434
|
icon={'search'}
|
|
@@ -469,11 +465,7 @@ const DropdownList = (props: OptionsProps) => {
|
|
|
469
465
|
const label = selectAllLabel.trim() ? selectAllLabel.trim() : 'Select All';
|
|
470
466
|
|
|
471
467
|
return (
|
|
472
|
-
<div
|
|
473
|
-
style={getAnimateOrderStyle(++animateOrder)}
|
|
474
|
-
className={SelectAllClass}
|
|
475
|
-
onMouseEnter={() => updateActiveOption(0, true)}
|
|
476
|
-
>
|
|
468
|
+
<div className={SelectAllClass} onMouseEnter={() => updateActiveOption(0, true)}>
|
|
477
469
|
<Checkbox
|
|
478
470
|
label={label}
|
|
479
471
|
onChange={onSelectAll}
|
|
@@ -497,22 +489,20 @@ const DropdownList = (props: OptionsProps) => {
|
|
|
497
489
|
const active = selectAllPresent ? index + 1 === cursor : index === cursor;
|
|
498
490
|
const optionIsSelected = tempSelected.findIndex((option) => option.value === item.value) !== -1;
|
|
499
491
|
return (
|
|
500
|
-
<
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
/>
|
|
515
|
-
</div>
|
|
492
|
+
<Option
|
|
493
|
+
optionData={item}
|
|
494
|
+
truncateOption={truncateOption}
|
|
495
|
+
selected={optionIsSelected}
|
|
496
|
+
index={index}
|
|
497
|
+
updateActiveOption={updateActiveOption}
|
|
498
|
+
optionRenderer={optionRenderer}
|
|
499
|
+
active={active}
|
|
500
|
+
checkboxes={withCheckbox}
|
|
501
|
+
menu={menu}
|
|
502
|
+
onClick={() => optionClickHandler(item)}
|
|
503
|
+
onChange={(e) => props.onSelect(item, e.target.checked)}
|
|
504
|
+
optionType={props.optionType}
|
|
505
|
+
/>
|
|
516
506
|
);
|
|
517
507
|
};
|
|
518
508
|
|
|
@@ -23,10 +23,10 @@ export const customSearchPlaceholder = () => {
|
|
|
23
23
|
},
|
|
24
24
|
];
|
|
25
25
|
return (
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
<div className="mb-10 w-25">
|
|
27
|
+
<Label withInput={true}>Gender</Label>
|
|
28
|
+
<Dropdown options={options} searchPlaceholder="Search Gender" withSearch={true} />
|
|
29
|
+
</div>
|
|
30
30
|
);
|
|
31
31
|
};
|
|
32
32
|
|
|
@@ -22,9 +22,7 @@ export const dropdownItemsWithCheckbox = () => {
|
|
|
22
22
|
value: '56_above',
|
|
23
23
|
},
|
|
24
24
|
];
|
|
25
|
-
|
|
26
|
-
<Dropdown options={options} withCheckbox={true} className="w-25" placeholder="Select" />
|
|
27
|
-
);
|
|
25
|
+
return <Dropdown options={options} withCheckbox={true} className="w-25" placeholder="Select" />;
|
|
28
26
|
};
|
|
29
27
|
|
|
30
28
|
export default {
|
|
@@ -26,10 +26,8 @@ export const dropdownItemsWithIcon = () => {
|
|
|
26
26
|
icon: 'check',
|
|
27
27
|
},
|
|
28
28
|
];
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
);
|
|
32
|
-
}
|
|
29
|
+
return <Dropdown options={options} optionType="WITH_ICON" className="w-25" placeholder="Select status" />;
|
|
30
|
+
};
|
|
33
31
|
|
|
34
32
|
export default {
|
|
35
33
|
title: 'Components/Dropdown/Dropdown Items With Icon',
|
|
@@ -3,8 +3,7 @@ import { Dropdown } from '@/index';
|
|
|
3
3
|
import { Uncontrolled, Controlled } from './_common_/types';
|
|
4
4
|
|
|
5
5
|
// CSF format story
|
|
6
|
-
export const dropdownItemsWithSubInfo = () =>{
|
|
7
|
-
|
|
6
|
+
export const dropdownItemsWithSubInfo = () => {
|
|
8
7
|
const options = [
|
|
9
8
|
{
|
|
10
9
|
label: 'Lawson, Joy',
|
|
@@ -23,9 +22,7 @@ export const dropdownItemsWithSubInfo = () =>{
|
|
|
23
22
|
},
|
|
24
23
|
];
|
|
25
24
|
|
|
26
|
-
return
|
|
27
|
-
<Dropdown options={options} optionType="WITH_META" className="w-25" placeholder="Select Recipient" />
|
|
28
|
-
);
|
|
25
|
+
return <Dropdown options={options} optionType="WITH_META" className="w-25" placeholder="Select Recipient" />;
|
|
29
26
|
};
|
|
30
27
|
|
|
31
28
|
export default {
|
|
@@ -2,9 +2,8 @@ import * as React from 'react';
|
|
|
2
2
|
import { Dropdown } from '@/index';
|
|
3
3
|
import { Uncontrolled, Controlled } from './_common_/types';
|
|
4
4
|
|
|
5
|
-
|
|
6
5
|
// CSF format story
|
|
7
|
-
export const dropdownWithIcon = () =>{
|
|
6
|
+
export const dropdownWithIcon = () => {
|
|
8
7
|
const options = [
|
|
9
8
|
{
|
|
10
9
|
label: 'Alabama',
|
|
@@ -204,9 +203,9 @@ export const dropdownWithIcon = () =>{
|
|
|
204
203
|
},
|
|
205
204
|
];
|
|
206
205
|
return (
|
|
207
|
-
|
|
206
|
+
<Dropdown options={options} icon="location_on" className="w-25" placeholder="Select state" staticLimit={100} />
|
|
208
207
|
);
|
|
209
|
-
}
|
|
208
|
+
};
|
|
210
209
|
|
|
211
210
|
export default {
|
|
212
211
|
title: 'Components/Dropdown/Dropdown With Icon',
|
|
@@ -47,16 +47,16 @@ export const dropdownWithActionButtons = () => {
|
|
|
47
47
|
},
|
|
48
48
|
];
|
|
49
49
|
return (
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
50
|
+
<Dropdown
|
|
51
|
+
options={options}
|
|
52
|
+
withSearch={true}
|
|
53
|
+
className="w-25"
|
|
54
|
+
placeholder="Select problem"
|
|
55
|
+
withCheckbox={true}
|
|
56
|
+
showApplyButton={true}
|
|
57
|
+
/>
|
|
58
58
|
);
|
|
59
|
-
}
|
|
59
|
+
};
|
|
60
60
|
|
|
61
61
|
export default {
|
|
62
62
|
title: 'Components/Dropdown/Dropdown With Action Buttons',
|