@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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { action } from '@/utils/action';
|
|
3
|
-
import { Button,
|
|
3
|
+
import { Button, FullscreenModal, Label, Input, Textarea } from '@/index';
|
|
4
4
|
|
|
5
5
|
export const defaultWidth = () => {
|
|
6
6
|
const [open, setOpen] = React.useState(false);
|
|
@@ -11,7 +11,9 @@ export const defaultWidth = () => {
|
|
|
11
11
|
|
|
12
12
|
return (
|
|
13
13
|
<div>
|
|
14
|
-
<Button appearance="primary" onClick={() => setOpen(true)}>
|
|
14
|
+
<Button appearance="primary" onClick={() => setOpen(true)}>
|
|
15
|
+
Open Modal
|
|
16
|
+
</Button>
|
|
15
17
|
|
|
16
18
|
<FullscreenModal
|
|
17
19
|
open={open}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { action } from '@/utils/action';
|
|
3
|
-
import { Button,
|
|
3
|
+
import { Button, FullscreenModal, Label, Input, Radio, Icon, Text, Card } from '@/index';
|
|
4
4
|
|
|
5
5
|
export const largeWidth = () => {
|
|
6
6
|
const [open, setOpen] = React.useState(false);
|
|
@@ -19,7 +19,9 @@ export const largeWidth = () => {
|
|
|
19
19
|
|
|
20
20
|
return (
|
|
21
21
|
<div>
|
|
22
|
-
<Button appearance="primary" onClick={() => setOpen(true)}>
|
|
22
|
+
<Button appearance="primary" onClick={() => setOpen(true)}>
|
|
23
|
+
Open Modal
|
|
24
|
+
</Button>
|
|
23
25
|
<FullscreenModal
|
|
24
26
|
open={open}
|
|
25
27
|
dimension="large"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { action } from '@/utils/action';
|
|
3
|
-
import { Button, Text,
|
|
3
|
+
import { Button, Text, FullscreenModal } from '@/index';
|
|
4
4
|
|
|
5
5
|
export const scrolling = () => {
|
|
6
6
|
const [open, setOpen] = React.useState(false);
|
|
@@ -52,7 +52,9 @@ export const scrolling = () => {
|
|
|
52
52
|
|
|
53
53
|
return (
|
|
54
54
|
<div>
|
|
55
|
-
<Button appearance="primary" onClick={() => setOpen(true)}>
|
|
55
|
+
<Button appearance="primary" onClick={() => setOpen(true)}>
|
|
56
|
+
Open Modal
|
|
57
|
+
</Button>
|
|
56
58
|
<FullscreenModal
|
|
57
59
|
open={open}
|
|
58
60
|
dimension="large"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { Button,
|
|
2
|
+
import { Button, Text, Card, FullscreenModal, Input, Label } from '@/index';
|
|
3
3
|
import { List } from '@/index.type';
|
|
4
4
|
|
|
5
5
|
export const twoStepsWorkflow = () => {
|
|
@@ -50,7 +50,6 @@ export const twoStepsWorkflow = () => {
|
|
|
50
50
|
|
|
51
51
|
return (
|
|
52
52
|
<div>
|
|
53
|
-
|
|
54
53
|
<Button appearance="primary" onClick={openModal}>
|
|
55
54
|
Open Modal
|
|
56
55
|
</Button>
|
|
@@ -14,7 +14,9 @@ export const alerts = () => {
|
|
|
14
14
|
|
|
15
15
|
return (
|
|
16
16
|
<div>
|
|
17
|
-
<Button appearance="primary" onClick={() => setOpen(true)}>
|
|
17
|
+
<Button appearance="primary" onClick={() => setOpen(true)}>
|
|
18
|
+
Open Modal
|
|
19
|
+
</Button>
|
|
18
20
|
<Modal
|
|
19
21
|
open={open}
|
|
20
22
|
dimension={dimension}
|
|
@@ -14,7 +14,9 @@ export const confirmations = () => {
|
|
|
14
14
|
|
|
15
15
|
return (
|
|
16
16
|
<div>
|
|
17
|
-
<Button appearance="primary" onClick={() => setOpen(true)}>
|
|
17
|
+
<Button appearance="primary" onClick={() => setOpen(true)}>
|
|
18
|
+
Open Modal
|
|
19
|
+
</Button>
|
|
18
20
|
<Modal
|
|
19
21
|
open={open}
|
|
20
22
|
dimension={dimension}
|
|
@@ -38,7 +38,9 @@ export const dialogs = () => {
|
|
|
38
38
|
|
|
39
39
|
return (
|
|
40
40
|
<div>
|
|
41
|
-
<Button appearance="primary" onClick={() => setOpen(true)}>
|
|
41
|
+
<Button appearance="primary" onClick={() => setOpen(true)}>
|
|
42
|
+
Open Modal
|
|
43
|
+
</Button>
|
|
42
44
|
<Modal
|
|
43
45
|
open={open}
|
|
44
46
|
dimension={dimension}
|
|
@@ -61,7 +61,9 @@ export const inputModals = () => {
|
|
|
61
61
|
|
|
62
62
|
return (
|
|
63
63
|
<div>
|
|
64
|
-
<Button appearance="primary" onClick={() => setOpen(true)}>
|
|
64
|
+
<Button appearance="primary" onClick={() => setOpen(true)}>
|
|
65
|
+
Open Modal
|
|
66
|
+
</Button>
|
|
65
67
|
<Modal
|
|
66
68
|
open={open}
|
|
67
69
|
dimension="large"
|
|
@@ -20,7 +20,9 @@ export const layering = () => {
|
|
|
20
20
|
|
|
21
21
|
return (
|
|
22
22
|
<div>
|
|
23
|
-
<Button appearance="primary" onClick={() => setOpen(true)}>
|
|
23
|
+
<Button appearance="primary" onClick={() => setOpen(true)}>
|
|
24
|
+
Open Modal
|
|
25
|
+
</Button>
|
|
24
26
|
<Modal
|
|
25
27
|
closeOnEscape={true}
|
|
26
28
|
open={open}
|
|
@@ -14,7 +14,9 @@ export const noFooter = () => {
|
|
|
14
14
|
|
|
15
15
|
return (
|
|
16
16
|
<div>
|
|
17
|
-
<Button appearance="primary" onClick={() => setOpen(true)}>
|
|
17
|
+
<Button appearance="primary" onClick={() => setOpen(true)}>
|
|
18
|
+
Open Modal
|
|
19
|
+
</Button>
|
|
18
20
|
<Modal
|
|
19
21
|
open={open}
|
|
20
22
|
dimension={dimension}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { action } from '@/utils/action';
|
|
3
|
-
import { Modal, Button, Text
|
|
3
|
+
import { Modal, Button, Text } from '@/index';
|
|
4
4
|
|
|
5
5
|
export const scrolling = () => {
|
|
6
6
|
const [open, setOpen] = React.useState(false);
|
|
@@ -77,7 +77,9 @@ export const scrolling = () => {
|
|
|
77
77
|
|
|
78
78
|
return (
|
|
79
79
|
<div>
|
|
80
|
-
<Button appearance="primary" onClick={() => setOpen(true)}>
|
|
80
|
+
<Button appearance="primary" onClick={() => setOpen(true)}>
|
|
81
|
+
Open Modal
|
|
82
|
+
</Button>
|
|
81
83
|
<Modal
|
|
82
84
|
open={open}
|
|
83
85
|
dimension="large"
|
|
@@ -14,7 +14,9 @@ export const all = () => {
|
|
|
14
14
|
|
|
15
15
|
return (
|
|
16
16
|
<div>
|
|
17
|
-
<Button appearance="primary" onClick={() => setOpen(true)}>
|
|
17
|
+
<Button appearance="primary" onClick={() => setOpen(true)}>
|
|
18
|
+
Open Modal
|
|
19
|
+
</Button>
|
|
18
20
|
<Modal
|
|
19
21
|
open={open}
|
|
20
22
|
dimension={dimension}
|
|
@@ -14,7 +14,9 @@ export const old = () => {
|
|
|
14
14
|
|
|
15
15
|
return (
|
|
16
16
|
<div>
|
|
17
|
-
<Button appearance="primary" onClick={() => setOpen(true)}>
|
|
17
|
+
<Button appearance="primary" onClick={() => setOpen(true)}>
|
|
18
|
+
Open Modal
|
|
19
|
+
</Button>
|
|
18
20
|
<Modal open={open} dimension={dimension} backdropClose={backdropClose ? onClose : undefined}>
|
|
19
21
|
<ModalHeader onClose={onClose} heading="Heading" subHeading="Subheading" />
|
|
20
22
|
<ModalBody>
|
|
@@ -14,7 +14,9 @@ export const large = () => {
|
|
|
14
14
|
|
|
15
15
|
return (
|
|
16
16
|
<div>
|
|
17
|
-
<Button appearance="primary" onClick={() => setOpen(true)}>
|
|
17
|
+
<Button appearance="primary" onClick={() => setOpen(true)}>
|
|
18
|
+
Open Modal
|
|
19
|
+
</Button>
|
|
18
20
|
<Modal
|
|
19
21
|
open={open}
|
|
20
22
|
dimension={dimension}
|
|
@@ -14,7 +14,9 @@ export const medium = () => {
|
|
|
14
14
|
|
|
15
15
|
return (
|
|
16
16
|
<div>
|
|
17
|
-
<Button appearance="primary" onClick={() => setOpen(true)}>
|
|
17
|
+
<Button appearance="primary" onClick={() => setOpen(true)}>
|
|
18
|
+
Open Modal
|
|
19
|
+
</Button>
|
|
18
20
|
<Modal
|
|
19
21
|
open={open}
|
|
20
22
|
dimension={dimension}
|
|
@@ -14,7 +14,9 @@ export const small = () => {
|
|
|
14
14
|
|
|
15
15
|
return (
|
|
16
16
|
<div>
|
|
17
|
-
<Button appearance="primary" onClick={() => setOpen(true)}>
|
|
17
|
+
<Button appearance="primary" onClick={() => setOpen(true)}>
|
|
18
|
+
Open Modal
|
|
19
|
+
</Button>
|
|
18
20
|
<Modal
|
|
19
21
|
open={open}
|
|
20
22
|
dimension={dimension}
|
|
@@ -4,12 +4,7 @@ import { Text, Button, Popover } from '@/index';
|
|
|
4
4
|
// CSF format story
|
|
5
5
|
export const popoverWithAction = () => (
|
|
6
6
|
<div className="mb-10">
|
|
7
|
-
<Popover
|
|
8
|
-
position="bottom-start"
|
|
9
|
-
on="click"
|
|
10
|
-
trigger={<Button appearance="basic">Open Popover</Button>}
|
|
11
|
-
open={false}
|
|
12
|
-
>
|
|
7
|
+
<Popover position="bottom-start" on="click" trigger={<Button appearance="basic">Open Popover</Button>} open={false}>
|
|
13
8
|
<div style={{ width: 'var(--spacing-9)' }} className="mx-6 my-6">
|
|
14
9
|
<Text>You have some edits saved in draft state.You can resume editing or discard those changes.</Text>
|
|
15
10
|
<div className="d-flex">
|
|
@@ -4,12 +4,7 @@ import { Button, Popover, Label, Textarea, Link, Input } from '@/index';
|
|
|
4
4
|
// CSF format story
|
|
5
5
|
export const popoverWithInput = () => (
|
|
6
6
|
<div className="mb-13">
|
|
7
|
-
<Popover
|
|
8
|
-
position="bottom-start"
|
|
9
|
-
on="click"
|
|
10
|
-
trigger={<Link>Open Popover</Link>}
|
|
11
|
-
open={false}
|
|
12
|
-
>
|
|
7
|
+
<Popover position="bottom-start" on="click" trigger={<Link>Open Popover</Link>} open={false}>
|
|
13
8
|
<div style={{ width: 'var(--spacing-9)', height: 'var(--spacing-8)+var(--spacing-xl)' }} className="mx-6 my-6">
|
|
14
9
|
<Label required={true} withInput={true}>
|
|
15
10
|
Name
|
|
@@ -4,12 +4,7 @@ import { Button, Popover } from '@/index';
|
|
|
4
4
|
// CSF format story
|
|
5
5
|
export const lightPopover = () => (
|
|
6
6
|
<div className="mb-9">
|
|
7
|
-
<Popover
|
|
8
|
-
position="bottom"
|
|
9
|
-
on="click"
|
|
10
|
-
trigger={<Button appearance="basic">Open Popover</Button>}
|
|
11
|
-
open={false}
|
|
12
|
-
>
|
|
7
|
+
<Popover position="bottom" on="click" trigger={<Button appearance="basic">Open Popover</Button>} open={false}>
|
|
13
8
|
<div style={{ width: 'var(--spacing-7)', height: 'var(--spacing-7)' }} />
|
|
14
9
|
</Popover>
|
|
15
10
|
</div>
|
|
@@ -35,7 +35,7 @@ export const boundaryElement = () => {
|
|
|
35
35
|
};
|
|
36
36
|
if (on === 'hover') delete options.onToggle;
|
|
37
37
|
|
|
38
|
-
const ref = React.useRef<HTMLDivElement>
|
|
38
|
+
const ref = React.useRef < React.HTMLDivElement > null;
|
|
39
39
|
|
|
40
40
|
return (
|
|
41
41
|
<div ref={ref.current} style={{ height: 150, border: '1px dashed', padding: 20, overflow: 'auto' }}>
|
|
@@ -57,7 +57,9 @@ export const all = () => {
|
|
|
57
57
|
|
|
58
58
|
return (
|
|
59
59
|
<div>
|
|
60
|
-
<Button appearance="primary" onClick={() => setOpen(true)}>
|
|
60
|
+
<Button appearance="primary" onClick={() => setOpen(true)}>
|
|
61
|
+
Open Sidesheet
|
|
62
|
+
</Button>
|
|
61
63
|
<Sidesheet {...options}>
|
|
62
64
|
<Text>Modal Body</Text>
|
|
63
65
|
<ModalDescription {...modalDescriptionOptions} />
|
|
@@ -42,7 +42,9 @@ export const customHeader = () => {
|
|
|
42
42
|
|
|
43
43
|
return (
|
|
44
44
|
<div>
|
|
45
|
-
<Button appearance="primary" onClick={() => setOpen(true)}>
|
|
45
|
+
<Button appearance="primary" onClick={() => setOpen(true)}>
|
|
46
|
+
Open Sidesheet
|
|
47
|
+
</Button>
|
|
46
48
|
<Sidesheet
|
|
47
49
|
{...options}
|
|
48
50
|
dimension="regular"
|
|
@@ -80,7 +80,9 @@ export const layering = () => {
|
|
|
80
80
|
|
|
81
81
|
return (
|
|
82
82
|
<div>
|
|
83
|
-
<Button appearance="primary" onClick={() => setOpen(true)}>
|
|
83
|
+
<Button appearance="primary" onClick={() => setOpen(true)}>
|
|
84
|
+
Open Sidesheet
|
|
85
|
+
</Button>
|
|
84
86
|
<Sidesheet {...options} dimension="large" closeOnEscape={true}>
|
|
85
87
|
<Text>Modal Body</Text>
|
|
86
88
|
<ModalDescription {...modalDescriptionOptions} />
|
package/core/components/molecules/sidesheet/__stories__/variants/LayeringWithModal.story.jsx
CHANGED
|
@@ -64,7 +64,9 @@ export const layeringWithModal = () => {
|
|
|
64
64
|
|
|
65
65
|
return (
|
|
66
66
|
<div>
|
|
67
|
-
<Button appearance="primary" onClick={() => setOpen(true)}>
|
|
67
|
+
<Button appearance="primary" onClick={() => setOpen(true)}>
|
|
68
|
+
Open Sidesheet
|
|
69
|
+
</Button>
|
|
68
70
|
<Sidesheet {...options} closeOnEscape={true}>
|
|
69
71
|
<Text>Modal Body</Text>
|
|
70
72
|
<ModalDescription {...modalDescriptionOptions} />
|
|
@@ -55,7 +55,9 @@ export const Large = () => {
|
|
|
55
55
|
|
|
56
56
|
return (
|
|
57
57
|
<div>
|
|
58
|
-
<Button appearance="primary" onClick={() => setOpen(true)}>
|
|
58
|
+
<Button appearance="primary" onClick={() => setOpen(true)}>
|
|
59
|
+
Open Sidesheet
|
|
60
|
+
</Button>
|
|
59
61
|
<Sidesheet {...options} dimension="large">
|
|
60
62
|
<Text>Modal Body</Text>
|
|
61
63
|
<ModalDescription {...modalDescriptionOptions} />
|
package/core/components/molecules/sidesheet/__stories__/variants/dimension/Regular.story.jsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { action } from '@/utils/action';
|
|
3
|
-
import { Text,
|
|
3
|
+
import { Text, Sidesheet, ModalDescription, Button } from '@/index';
|
|
4
4
|
|
|
5
5
|
export const regular = () => {
|
|
6
6
|
const [open, setOpen] = React.useState(false);
|
|
@@ -55,7 +55,9 @@ export const regular = () => {
|
|
|
55
55
|
|
|
56
56
|
return (
|
|
57
57
|
<div>
|
|
58
|
-
<Button appearance="primary" onClick={() => setOpen(true)}>
|
|
58
|
+
<Button appearance="primary" onClick={() => setOpen(true)}>
|
|
59
|
+
Open Sidesheet
|
|
60
|
+
</Button>
|
|
59
61
|
<Sidesheet {...options} dimension="regular">
|
|
60
62
|
<Text>Modal Body</Text>
|
|
61
63
|
<ModalDescription {...modalDescriptionOptions} />
|
|
@@ -55,7 +55,9 @@ export const stickyFooter = () => {
|
|
|
55
55
|
|
|
56
56
|
return (
|
|
57
57
|
<div>
|
|
58
|
-
<Button appearance="primary" onClick={() => setOpen(true)}>
|
|
58
|
+
<Button appearance="primary" onClick={() => setOpen(true)}>
|
|
59
|
+
Open Sidesheet
|
|
60
|
+
</Button>
|
|
59
61
|
<Sidesheet {...options}>
|
|
60
62
|
<Text>Modal Body</Text>
|
|
61
63
|
<ModalDescription {...modalDescriptionOptions} />
|
|
@@ -3,7 +3,7 @@ import { action } from '@/utils/action';
|
|
|
3
3
|
import { Heading, Text, Sidesheet, ModalDescription, Button } from '@/index';
|
|
4
4
|
|
|
5
5
|
export const twoSteps = () => {
|
|
6
|
-
const [page, setPage] = React.useState(
|
|
6
|
+
const [page, setPage] = React.useState(1);
|
|
7
7
|
const [animate, setAnimate] = React.useState(true);
|
|
8
8
|
const [open, setOpen] = React.useState(false);
|
|
9
9
|
const seperator = false;
|
|
@@ -77,7 +77,9 @@ export const twoSteps = () => {
|
|
|
77
77
|
|
|
78
78
|
return (
|
|
79
79
|
<div>
|
|
80
|
-
<Button appearance="primary" onClick={() => setOpen(true)}>
|
|
80
|
+
<Button appearance="primary" onClick={() => setOpen(true)}>
|
|
81
|
+
Open Sidesheet
|
|
82
|
+
</Button>
|
|
81
83
|
<Sidesheet {...options}>
|
|
82
84
|
<div className={animate ? 'fade-in' : ''} onAnimationEnd={() => setAnimate(false)}>
|
|
83
85
|
<Heading size="s">{`Page ${page}`}</Heading>
|
|
@@ -92,11 +94,11 @@ export const twoSteps = () => {
|
|
|
92
94
|
|
|
93
95
|
const customCode = `() => {
|
|
94
96
|
const [open, setOpen] = React.useState(false);
|
|
95
|
-
const [page, setPage] = React.useState(
|
|
97
|
+
const [page, setPage] = React.useState(1);
|
|
96
98
|
const [animate, setAnimate] = React.useState(true);
|
|
97
99
|
|
|
98
100
|
const onClose = () => {
|
|
99
|
-
setOpen(
|
|
101
|
+
setOpen(false);
|
|
100
102
|
};
|
|
101
103
|
|
|
102
104
|
React.useEffect(() => {
|
|
@@ -3,7 +3,7 @@ import { Tooltip, Button } from '@/index';
|
|
|
3
3
|
|
|
4
4
|
// CSF format story
|
|
5
5
|
export const position = () => {
|
|
6
|
-
const positions = ['top', 'top-start', '
|
|
6
|
+
const positions = ['top', 'top-start', 'bottom', 'top-end', 'bottom-start', 'bottom-end', 'right', 'left'];
|
|
7
7
|
const appendToBody = false;
|
|
8
8
|
const tooltip = 'An awesome tooltip';
|
|
9
9
|
|
|
@@ -18,18 +18,7 @@ export const position = () => {
|
|
|
18
18
|
return (
|
|
19
19
|
<div key={ind} className="mr-13 mt-8">
|
|
20
20
|
<Tooltip position={pos} {...options}>
|
|
21
|
-
<
|
|
22
|
-
ref={(buttonRef) => {
|
|
23
|
-
const event = new MouseEvent('mouseover', {
|
|
24
|
-
view: window,
|
|
25
|
-
bubbles: true,
|
|
26
|
-
cancelable: true,
|
|
27
|
-
});
|
|
28
|
-
if (buttonRef) buttonRef.dispatchEvent(event);
|
|
29
|
-
}}
|
|
30
|
-
>
|
|
31
|
-
<Button>{pos}</Button>
|
|
32
|
-
</div>
|
|
21
|
+
<Button>{pos}</Button>
|
|
33
22
|
</Tooltip>
|
|
34
23
|
</div>
|
|
35
24
|
);
|
|
@@ -13,7 +13,7 @@ export const all = () => {
|
|
|
13
13
|
|
|
14
14
|
const endDate = new Date('Jan 20 2021');
|
|
15
15
|
|
|
16
|
-
const view = '
|
|
16
|
+
const view = 'date';
|
|
17
17
|
|
|
18
18
|
const rangePicker = false;
|
|
19
19
|
|
|
@@ -37,13 +37,46 @@ export const all = () => {
|
|
|
37
37
|
if (rangeLimit) attr.rangeLimit = rangeLimit;
|
|
38
38
|
if (yearNav !== -1) attr.yearNav = yearNav;
|
|
39
39
|
if (monthNav !== -1) attr.monthNav = monthNav;
|
|
40
|
-
|
|
41
|
-
// we redefine this function here because in storybook.json we
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
40
|
+
|
|
41
|
+
// we redefine this function here because in storybook.json we do not get imported functions.
|
|
42
|
+
|
|
43
|
+
const isValid = (validators, ...value) => {
|
|
44
|
+
const iterator = Array.isArray(validators) ? validators : [validators];
|
|
45
|
+
|
|
46
|
+
return iterator.every((validator) => validator(...value));
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
const translateToDate = (format, val, validators) => {
|
|
50
|
+
if (isValid(validators, val, format)) {
|
|
51
|
+
const separator = format.includes('/') ? '/' : '-';
|
|
52
|
+
|
|
53
|
+
let year = -1,
|
|
54
|
+
month = -1,
|
|
55
|
+
date = -1;
|
|
56
|
+
const v = val.split(separator);
|
|
57
|
+
format.split(separator).forEach((f, i) => {
|
|
58
|
+
switch (f) {
|
|
59
|
+
case 'mm':
|
|
60
|
+
month = +v[i] - 1;
|
|
61
|
+
break;
|
|
62
|
+
case 'yyyy':
|
|
63
|
+
year = +v[i];
|
|
64
|
+
break;
|
|
65
|
+
case 'dd':
|
|
66
|
+
date = +v[i];
|
|
67
|
+
break;
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
const d = convertToDate({ year, month, date });
|
|
71
|
+
return d;
|
|
72
|
+
} else {
|
|
73
|
+
return undefined;
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
const convertToDate = (d, format, validators) => {
|
|
45
78
|
let dateVal;
|
|
46
|
-
|
|
79
|
+
|
|
47
80
|
if (d) {
|
|
48
81
|
if (typeof d === 'number') {
|
|
49
82
|
dateVal = new Date(d);
|
|
@@ -5,7 +5,6 @@ import Heading from '@/components/atoms/heading';
|
|
|
5
5
|
|
|
6
6
|
// CSF format story
|
|
7
7
|
export const size = () => {
|
|
8
|
-
|
|
9
8
|
return (
|
|
10
9
|
<>
|
|
11
10
|
<div className="mt-8">
|
|
@@ -13,7 +12,7 @@ export const size = () => {
|
|
|
13
12
|
<div className="d-flex">
|
|
14
13
|
<div className="mr-8">
|
|
15
14
|
<Card className="d-inline-flex" shadow="light">
|
|
16
|
-
<Calendar date={new Date(2020, 2, 15)} size={'small'} view=
|
|
15
|
+
<Calendar date={new Date(2020, 2, 15)} size={'small'} view="date" />
|
|
17
16
|
</Card>
|
|
18
17
|
</div>
|
|
19
18
|
</div>
|
|
@@ -24,7 +23,7 @@ export const size = () => {
|
|
|
24
23
|
<div className="d-flex">
|
|
25
24
|
<div className="mr-8">
|
|
26
25
|
<Card className="d-inline-flex" shadow="light">
|
|
27
|
-
<Calendar date={new Date(2020, 2, 15)} size={'large'} view=
|
|
26
|
+
<Calendar date={new Date(2020, 2, 15)} size={'large'} view="date" />
|
|
28
27
|
</Card>
|
|
29
28
|
</div>
|
|
30
29
|
</div>
|
package/core/components/organisms/dateRangePicker/__stories__/variants/withSingleInput.story.jsx
CHANGED
|
@@ -28,6 +28,8 @@ export const withSingleInput = () => {
|
|
|
28
28
|
|
|
29
29
|
const monthNav = -1;
|
|
30
30
|
|
|
31
|
+
const open = false;
|
|
32
|
+
|
|
31
33
|
const attr = {};
|
|
32
34
|
if (disabledBefore) attr.disabledBefore = disabledBefore;
|
|
33
35
|
if (disabledAfter) attr.disabledAfter = disabledAfter;
|
|
@@ -55,6 +57,7 @@ export const withSingleInput = () => {
|
|
|
55
57
|
label: 'Date',
|
|
56
58
|
}}
|
|
57
59
|
{...attr}
|
|
60
|
+
open={open}
|
|
58
61
|
/>
|
|
59
62
|
</div>
|
|
60
63
|
);
|