@muraldevkit/ui-toolkit 4.45.2-dev-jOrv.1 → 4.45.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/dist/components/avatar/MrlAvatar/MrlAvatar.d.ts +30 -0
- package/dist/components/avatar/MrlAvatar/index.d.ts +1 -0
- package/dist/components/avatar/MrlAvatarButton/MrlAvatarButton.d.ts +62 -0
- package/dist/components/avatar/MrlAvatarButton/index.d.ts +1 -0
- package/dist/components/avatar/index.d.ts +2 -0
- package/dist/components/badge/MrlBadge/MrlBadge.d.ts +26 -0
- package/dist/components/badge/MrlBadge/index.d.ts +1 -0
- package/dist/components/badge/MrlBadgeNotification/MrlBadgeNotification.d.ts +25 -0
- package/dist/components/badge/MrlBadgeNotification/index.d.ts +1 -0
- package/dist/components/badge/index.d.ts +2 -0
- package/dist/components/breadcrumb/MrlBreadcrumbItem/MrlBreadcrumbItem.d.ts +44 -0
- package/dist/components/breadcrumb/MrlBreadcrumbItem/index.d.ts +1 -0
- package/dist/components/breadcrumb/MrlBreadcrumbSeparator/MrlBreadcrumbSeparator.d.ts +7 -0
- package/dist/components/breadcrumb/MrlBreadcrumbSeparator/index.d.ts +1 -0
- package/dist/components/breadcrumb/MrlBreadcrumbs/MrlBreadcrumbs.d.ts +29 -0
- package/dist/components/breadcrumb/MrlBreadcrumbs/index.d.ts +1 -0
- package/dist/components/breadcrumb/index.d.ts +3 -0
- package/dist/components/button/MrlAnimatedIconButton/MrlAnimatedIconButton.d.ts +9 -0
- package/dist/components/button/MrlAnimatedIconButton/index.d.ts +1 -0
- package/dist/components/button/MrlButton/MrlButton.d.ts +105 -0
- package/dist/components/button/MrlButton/index.d.ts +1 -0
- package/dist/components/button/MrlIconButton/MrlIconButton.d.ts +107 -0
- package/dist/components/button/MrlIconButton/index.d.ts +1 -0
- package/dist/components/button/constants.d.ts +33 -0
- package/dist/components/button/helpers.d.ts +40 -0
- package/dist/components/button/index.d.ts +3 -0
- package/dist/components/callout/MrlCallout/MrlCallout.d.ts +34 -0
- package/dist/components/callout/MrlCallout/index.d.ts +1 -0
- package/dist/components/callout/index.d.ts +1 -0
- package/dist/components/container/MrlContainer/MrlContainer.d.ts +22 -0
- package/dist/components/container/MrlContainer/index.d.ts +1 -0
- package/dist/components/container/constants.d.ts +12 -0
- package/dist/components/container/index.d.ts +1 -0
- package/dist/components/divider/MrlDivider/MrlDivider.d.ts +45 -0
- package/dist/components/divider/MrlDivider/index.d.ts +1 -0
- package/dist/components/divider/constants.d.ts +18 -0
- package/dist/components/divider/index.d.ts +1 -0
- package/dist/components/empty/default/MrlEmpty.d.ts +15 -0
- package/dist/components/empty/default/index.d.ts +1 -0
- package/dist/components/empty/index.d.ts +2 -0
- package/dist/components/empty/large/MrlEmptyLarge.d.ts +15 -0
- package/dist/components/empty/large/index.d.ts +1 -0
- package/dist/components/error-boundary/MrlErrorBoundary.d.ts +62 -0
- package/dist/components/error-boundary/index.d.ts +1 -0
- package/dist/components/filter/MrlFilter/MrlFilter.d.ts +28 -0
- package/dist/components/filter/MrlFilter/index.d.ts +1 -0
- package/dist/components/filter/MrlFilterContext/MrlFilterContext.d.ts +34 -0
- package/dist/components/filter/MrlFilterContext/index.d.ts +1 -0
- package/dist/components/filter/MrlFilterItem/MrlFilterItem.d.ts +23 -0
- package/dist/components/filter/MrlFilterItem/index.d.ts +1 -0
- package/dist/components/filter/index.d.ts +3 -0
- package/dist/components/focus-trap/MrlFocusTrap/MrlFocusTrap.d.ts +30 -0
- package/dist/components/focus-trap/MrlFocusTrap/index.d.ts +1 -0
- package/dist/components/focus-trap/index.d.ts +1 -0
- package/dist/components/form/checkbox/MrlCheckbox/MrlCheckbox.d.ts +44 -0
- package/dist/components/form/checkbox/MrlCheckbox/index.d.ts +1 -0
- package/dist/components/form/checkbox/MrlCheckboxStandalone/MrlCheckboxStandalone.d.ts +22 -0
- package/dist/components/form/checkbox/MrlCheckboxStandalone/index.d.ts +1 -0
- package/dist/components/form/constants.d.ts +85 -0
- package/dist/components/form/date-picker/MrlDatePicker.d.ts +30 -0
- package/dist/components/form/date-picker/index.d.ts +1 -0
- package/dist/components/form/fieldset/MrlFieldset/MrlFieldset.d.ts +20 -0
- package/dist/components/form/fieldset/MrlFieldset/index.d.ts +1 -0
- package/dist/components/form/hooks/useActiveColor.d.ts +13 -0
- package/dist/components/form/hooks/useIsEditable.d.ts +28 -0
- package/dist/components/form/index.d.ts +19 -0
- package/dist/components/form/label/MrlLabel/MrlLabel.d.ts +32 -0
- package/dist/components/form/label/MrlLabel/index.d.ts +1 -0
- package/dist/components/form/label/MrlLabelWithDescription/MrlLabelWithDescription.d.ts +32 -0
- package/dist/components/form/label/MrlLabelWithDescription/index.d.ts +1 -0
- package/dist/components/form/legacy-select/MrlLegacySelect/MrlLegacySelect.d.ts +58 -0
- package/dist/components/form/legacy-select/MrlLegacySelect/index.d.ts +1 -0
- package/dist/components/form/legacy-select/MrlLegacySelectItem/MrlLegacySelectItem.d.ts +36 -0
- package/dist/components/form/legacy-select/MrlLegacySelectItem/index.d.ts +1 -0
- package/dist/components/form/legacy-select/MrlLegacySelectMenu/MrlLegacySelectMenu.d.ts +43 -0
- package/dist/components/form/legacy-select/MrlLegacySelectMenu/index.d.ts +1 -0
- package/dist/components/form/legacy-select/context/SelectContext.d.ts +68 -0
- package/dist/components/form/legacy-select/index.d.ts +9 -0
- package/dist/components/form/legacy-select/stories.data.d.ts +1 -0
- package/dist/components/form/radio/MrlRadioButton/MrlRadioButton.d.ts +48 -0
- package/dist/components/form/radio/MrlRadioButton/index.d.ts +1 -0
- package/dist/components/form/radio/MrlRadioButtonStandalone/MrlRadioButtonStandalone.d.ts +26 -0
- package/dist/components/form/radio/MrlRadioButtonStandalone/index.d.ts +1 -0
- package/dist/components/form/radio/MrlRadioGroup/MrlRadioGroup.d.ts +22 -0
- package/dist/components/form/radio/MrlRadioGroup/index.d.ts +1 -0
- package/dist/components/form/select/MrlCreatableSelect/MrlCreatableSelect.d.ts +27 -0
- package/dist/components/form/select/MrlCreatableSelect/index.d.ts +1 -0
- package/dist/components/form/select/MrlMultiCreatableSelect/MrlMultiCreatableSelect.d.ts +26 -0
- package/dist/components/form/select/MrlMultiCreatableSelect/index.d.ts +1 -0
- package/dist/components/form/select/MrlMultiSelect/MrlMultiSelect.d.ts +25 -0
- package/dist/components/form/select/MrlMultiSelect/index.d.ts +1 -0
- package/dist/components/form/select/MrlSelect/MrlSelect.d.ts +25 -0
- package/dist/components/form/select/MrlSelect/index.d.ts +1 -0
- package/dist/components/form/select/components/MrlSelectClearIndicator.d.ts +8 -0
- package/dist/components/form/select/components/MrlSelectContainer.d.ts +9 -0
- package/dist/components/form/select/components/MrlSelectDropdownIndicator.d.ts +9 -0
- package/dist/components/form/select/components/MrlSelectMultiValue.d.ts +10 -0
- package/dist/components/form/select/components/MrlSelectMultiValueRemove.d.ts +9 -0
- package/dist/components/form/select/components/MrlSelectOption.d.ts +9 -0
- package/dist/components/form/select/components/MrlSelectValueContainer.d.ts +9 -0
- package/dist/components/form/select/components/index.d.ts +7 -0
- package/dist/components/form/select/index.d.ts +6 -0
- package/dist/components/form/select/styles/default.d.ts +7 -0
- package/dist/components/form/select/styles/index.d.ts +9 -0
- package/dist/components/form/select/styles/inline.d.ts +7 -0
- package/dist/components/form/select/styles/inlineNoLabel.d.ts +7 -0
- package/dist/components/form/select/styles/inlineStacked.d.ts +7 -0
- package/dist/components/form/select/types.d.ts +5 -0
- package/dist/components/form/select/utils/closeMenuOnScroll.d.ts +10 -0
- package/dist/components/form/select/utils/index.d.ts +1 -0
- package/dist/components/form/switch/MrlSwitch/MrlSwitch.d.ts +15 -0
- package/dist/components/form/switch/MrlSwitch/index.d.ts +1 -0
- package/dist/components/form/switch/MrlSwitchStandalone/MrlSwitchStandalone.d.ts +10 -0
- package/dist/components/form/switch/MrlSwitchStandalone/index.d.ts +1 -0
- package/dist/components/form/switch/index.d.ts +2 -0
- package/dist/components/form/text-input/MrlEditableTextInput/MrlEditableTextInput.d.ts +35 -0
- package/dist/components/form/text-input/MrlEditableTextInput/MrlEditableTextInputRightIcon.d.ts +25 -0
- package/dist/components/form/text-input/MrlEditableTextInput/index.d.ts +1 -0
- package/dist/components/form/text-input/MrlTextInput/MrlTextInput.d.ts +44 -0
- package/dist/components/form/text-input/MrlTextInput/MrlTextInputRightIcon.d.ts +24 -0
- package/dist/components/form/text-input/MrlTextInput/index.d.ts +1 -0
- package/dist/components/form/textarea/MrlEditableTextarea/MrlEditableTextarea.d.ts +44 -0
- package/dist/components/form/textarea/MrlEditableTextarea/MrlEditableTextareaRightButton.d.ts +25 -0
- package/dist/components/form/textarea/MrlEditableTextarea/index.d.ts +1 -0
- package/dist/components/form/textarea/MrlTextarea/MrlTextarea.d.ts +39 -0
- package/dist/components/form/textarea/MrlTextarea/index.d.ts +1 -0
- package/dist/components/form/utils.d.ts +94 -0
- package/dist/components/grid/MrlCol/MrlCol.d.ts +12 -0
- package/dist/components/grid/MrlCol/index.d.ts +1 -0
- package/dist/components/grid/MrlGrid/MrlGrid.d.ts +11 -0
- package/dist/components/grid/MrlGrid/index.d.ts +1 -0
- package/dist/components/grid/MrlRow/MrlRow.d.ts +25 -0
- package/dist/components/grid/MrlRow/index.d.ts +1 -0
- package/dist/components/grid/constants.d.ts +50 -0
- package/dist/components/grid/index.d.ts +3 -0
- package/dist/components/index.d.ts +33 -0
- package/dist/components/layout/MrlMain/MrlMain.d.ts +9 -0
- package/dist/components/layout/MrlMain/index.d.ts +1 -0
- package/dist/components/layout/MrlPage/MrlPage.d.ts +11 -0
- package/dist/components/layout/MrlPage/index.d.ts +11 -0
- package/dist/components/layout/MrlSidebar/MrlSidebar.d.ts +22 -0
- package/dist/components/layout/MrlSidebar/demo/MrlSidebarDemo.d.ts +8 -0
- package/dist/components/layout/MrlSidebar/index.d.ts +1 -0
- package/dist/components/layout/MrlTopbar/MrlTopbar.d.ts +11 -0
- package/dist/components/layout/MrlTopbar/index.d.ts +1 -0
- package/dist/components/layout/constants.d.ts +16 -0
- package/dist/components/layout/context/LayoutContext.d.ts +24 -0
- package/dist/components/layout/error-page/MrlBrandColors/MrlBrandColors.d.ts +13 -0
- package/dist/components/layout/error-page/MrlBrandColors/index.d.ts +1 -0
- package/dist/components/layout/error-page/MrlErrorPage/MrlErrorPage.d.ts +28 -0
- package/dist/components/layout/error-page/MrlErrorPage/index.d.ts +1 -0
- package/dist/components/layout/error-page/index.d.ts +2 -0
- package/dist/components/layout/index.d.ts +5 -0
- package/dist/components/layout/utils.d.ts +15 -0
- package/dist/components/link/MrlLink/MrlLink.d.ts +49 -0
- package/dist/components/link/MrlLink/index.d.ts +1 -0
- package/dist/components/link/MrlLinkButton/MrlLinkButton.d.ts +54 -0
- package/dist/components/link/MrlLinkButton/index.d.ts +1 -0
- package/dist/components/link/constants.d.ts +24 -0
- package/dist/components/link/index.d.ts +2 -0
- package/dist/components/live-region/MrlLiveRegion/MrlLiveRegion.d.ts +19 -0
- package/dist/components/live-region/MrlLiveRegion/index.d.ts +1 -0
- package/dist/components/live-region/demo/LiveRegionDemo.d.ts +7 -0
- package/dist/components/live-region/index.d.ts +1 -0
- package/dist/components/loader/MrlProgressBar/MrlProgressBar.d.ts +10 -0
- package/dist/components/loader/MrlProgressBar/index.d.ts +1 -0
- package/dist/components/loader/MrlSpinner/MrlSpinner.d.ts +10 -0
- package/dist/components/loader/MrlSpinner/index.d.ts +1 -0
- package/dist/components/loader/constants.d.ts +88 -0
- package/dist/components/loader/index.d.ts +3 -0
- package/dist/components/menu/MrlMenu/MrlMenu.d.ts +130 -0
- package/dist/components/menu/MrlMenu/index.d.ts +1 -0
- package/dist/components/menu/MrlMenu/utilities.d.ts +29 -0
- package/dist/components/menu/MrlMenuGroup/MrlMenuGroup.d.ts +13 -0
- package/dist/components/menu/MrlMenuGroup/index.d.ts +1 -0
- package/dist/components/menu/MrlMenuItem/MrlMenuItem.d.ts +37 -0
- package/dist/components/menu/MrlMenuItem/index.d.ts +1 -0
- package/dist/components/menu/MrlMenuItemLink/MrlMenuItemLink.d.ts +37 -0
- package/dist/components/menu/MrlMenuItemLink/index.d.ts +1 -0
- package/dist/components/menu/constants.d.ts +38 -0
- package/dist/components/menu/context/MrlMenuContext.d.ts +20 -0
- package/dist/components/menu/demo/MenuByConfig.d.ts +7 -0
- package/dist/components/menu/demo/MenuWithPopover.d.ts +18 -0
- package/dist/components/menu/demo/MenuWithSubmenu.d.ts +18 -0
- package/dist/components/menu/demo/MenuWithTrigger.d.ts +19 -0
- package/dist/components/menu/hooks/useBrowserEdgeScroll.d.ts +22 -0
- package/dist/components/menu/hooks/useSubMenuElementPosition.d.ts +18 -0
- package/dist/components/menu/index.d.ts +5 -0
- package/dist/components/menu/utilities/flip-position.d.ts +8 -0
- package/dist/components/menu/utilities/get-scrollable-parent.d.ts +7 -0
- package/dist/components/modal/MrlModal/MrlModal.d.ts +50 -0
- package/dist/components/modal/MrlModal/index.d.ts +1 -0
- package/dist/components/modal/MrlModalContent/MrlModalContent.d.ts +20 -0
- package/dist/components/modal/MrlModalContent/index.d.ts +1 -0
- package/dist/components/modal/MrlModalContext/MrlModalContext.d.ts +17 -0
- package/dist/components/modal/MrlModalContext/index.d.ts +1 -0
- package/dist/components/modal/MrlModalFooter/MrlModalFooter.d.ts +21 -0
- package/dist/components/modal/MrlModalFooter/index.d.ts +1 -0
- package/dist/components/modal/MrlModalHeader/MrlModalHeader.d.ts +25 -0
- package/dist/components/modal/MrlModalHeader/index.d.ts +1 -0
- package/dist/components/modal/constants.d.ts +18 -0
- package/dist/components/modal/demo/ModalWithTriggerDemo.d.ts +15 -0
- package/dist/components/modal/index.d.ts +5 -0
- package/dist/components/navigation-sidebar/MrlSidebarNavGroup/MrlSidebarNavGroup.d.ts +25 -0
- package/dist/components/navigation-sidebar/MrlSidebarNavGroup/index.d.ts +1 -0
- package/dist/components/navigation-sidebar/MrlSidebarNavItem/MrlSidebarNavItem.d.ts +33 -0
- package/dist/components/navigation-sidebar/MrlSidebarNavItem/index.d.ts +1 -0
- package/dist/components/navigation-sidebar/index.d.ts +2 -0
- package/dist/components/notification/MrlBlockNotification/MrlBlockNotification.d.ts +100 -0
- package/dist/components/notification/MrlBlockNotification/index.d.ts +1 -0
- package/dist/components/notification/MrlInlineMessage/MrlInlineMessage.d.ts +40 -0
- package/dist/components/notification/MrlInlineMessage/index.d.ts +1 -0
- package/dist/components/notification/MrlToast/MrlToast.d.ts +45 -0
- package/dist/components/notification/MrlToast/index.d.ts +1 -0
- package/dist/components/notification/constants.d.ts +26 -0
- package/dist/components/notification/index.d.ts +3 -0
- package/dist/components/pagination/MrlPagination/MrlPagination.d.ts +19 -0
- package/dist/components/pagination/MrlPagination/index.d.ts +1 -0
- package/dist/components/pagination/MrlPaginationButton/MrlPaginationButton.d.ts +30 -0
- package/dist/components/pagination/MrlPaginationButton/index.d.ts +1 -0
- package/dist/components/pagination/MrlPaginationText/MrlPaginationText.d.ts +23 -0
- package/dist/components/pagination/MrlPaginationText/index.d.ts +1 -0
- package/dist/components/pagination/constants.d.ts +1 -0
- package/dist/components/pagination/index.d.ts +3 -0
- package/dist/components/panel/MrlPanel/MrlPanel.d.ts +53 -0
- package/dist/components/panel/MrlPanel/index.d.ts +1 -0
- package/dist/components/panel/MrlPanelContext/MrlPanelContext.d.ts +16 -0
- package/dist/components/panel/MrlPanelContext/index.d.ts +1 -0
- package/dist/components/panel/MrlPanelFooter/MrlPanelFooter.d.ts +22 -0
- package/dist/components/panel/MrlPanelFooter/index.d.ts +1 -0
- package/dist/components/panel/MrlPanelStickyHeader/MrlPanelStickyHeader.d.ts +18 -0
- package/dist/components/panel/MrlPanelStickyHeader/index.d.ts +1 -0
- package/dist/components/panel/index.d.ts +3 -0
- package/dist/components/popover/MrlPopover/MrlPopover.d.ts +131 -0
- package/dist/components/popover/MrlPopover/context/MrlPopoverContext.d.ts +20 -0
- package/dist/components/popover/MrlPopover/hooks/use-mrl-popover-event-handlers.d.ts +32 -0
- package/dist/components/popover/MrlPopover/index.d.ts +2 -0
- package/dist/components/popover/MrlPopover/utilities/get-data-point.d.ts +9 -0
- package/dist/components/popover/MrlPopover/utilities/get-offset.d.ts +9 -0
- package/dist/components/popover/MrlPopover/utilities/index.d.ts +2 -0
- package/dist/components/popover/demo/PopoverWithIconButton.d.ts +21 -0
- package/dist/components/popover/demo/PopoverWithSelect.d.ts +24 -0
- package/dist/components/popover/demo/PopoverWithTrigger.d.ts +24 -0
- package/dist/components/popover/index.d.ts +1 -0
- package/dist/components/portal/MrlPortal.d.ts +20 -0
- package/dist/components/portal/index.d.ts +1 -0
- package/dist/components/rovingTabindex/MrlRovingTabindex/MrlRovingTabindex.d.ts +127 -0
- package/dist/components/rovingTabindex/MrlRovingTabindex/index.d.ts +1 -0
- package/dist/components/rovingTabindex/index.d.ts +1 -0
- package/dist/components/skeleton/MrlSkeleton/MrlSkeleton.d.ts +20 -0
- package/dist/components/skeleton/MrlSkeleton/index.d.ts +1 -0
- package/dist/components/skeleton/MrlSkeletonText/MrlSkeletonText.d.ts +22 -0
- package/dist/components/skeleton/MrlSkeletonText/index.d.ts +1 -0
- package/dist/components/skeleton/index.d.ts +2 -0
- package/dist/components/svg/MrlSvg/MrlSvg.d.ts +31 -0
- package/dist/components/svg/MrlSvg/index.d.ts +1 -0
- package/dist/components/svg/MrlSvgAnimate/MrlSvgAnimate.d.ts +51 -0
- package/dist/components/svg/MrlSvgAnimate/index.d.ts +1 -0
- package/dist/components/svg/config.d.ts +112 -0
- package/dist/components/svg/constants.d.ts +36 -0
- package/dist/components/svg/index.d.ts +3 -0
- package/dist/components/table/MrlSmartTable/MrlSmartTable.d.ts +216 -0
- package/dist/components/table/MrlSmartTable/index.d.ts +1 -0
- package/dist/components/table/MrlTable/MrlTable.d.ts +17 -0
- package/dist/components/table/MrlTable/index.d.ts +1 -0
- package/dist/components/table/MrlTableBody/MrlTableBody.d.ts +17 -0
- package/dist/components/table/MrlTableBody/index.d.ts +1 -0
- package/dist/components/table/MrlTableCell/MrlTableCell.d.ts +26 -0
- package/dist/components/table/MrlTableCell/index.d.ts +1 -0
- package/dist/components/table/MrlTableColumn/MrlTableColumn.d.ts +26 -0
- package/dist/components/table/MrlTableColumn/index.d.ts +1 -0
- package/dist/components/table/MrlTableEmptyState/MrlTableEmptyState.d.ts +15 -0
- package/dist/components/table/MrlTableEmptyState/index.d.ts +1 -0
- package/dist/components/table/MrlTableHeader/MrlTableHeader.d.ts +17 -0
- package/dist/components/table/MrlTableHeader/index.d.ts +1 -0
- package/dist/components/table/MrlTableRow/MrlTableRow.d.ts +26 -0
- package/dist/components/table/MrlTableRow/index.d.ts +1 -0
- package/dist/components/table/constants.d.ts +22 -0
- package/dist/components/table/fixtures.d.ts +94 -0
- package/dist/components/table/index.d.ts +9 -0
- package/dist/components/table/utils.d.ts +43 -0
- package/dist/components/tabs/MrlTab/MrlTab.d.ts +21 -0
- package/dist/components/tabs/MrlTab/index.d.ts +1 -0
- package/dist/components/tabs/MrlTabContent/MrlTabContent.d.ts +9 -0
- package/dist/components/tabs/MrlTabContent/index.d.ts +1 -0
- package/dist/components/tabs/MrlTabGroup/MrlTabGroup.d.ts +10 -0
- package/dist/components/tabs/MrlTabGroup/index.d.ts +1 -0
- package/dist/components/tabs/MrlTabLink/MrlTabLink.d.ts +28 -0
- package/dist/components/tabs/MrlTabLink/index.d.ts +1 -0
- package/dist/components/tabs/MrlTabs/MrlTabs.d.ts +21 -0
- package/dist/components/tabs/MrlTabs/index.d.ts +1 -0
- package/dist/components/tabs/constants.d.ts +1 -0
- package/dist/components/tabs/index.d.ts +5 -0
- package/dist/components/text/MrlText/MrlText.d.ts +26 -0
- package/dist/components/text/MrlText/index.d.ts +1 -0
- package/dist/components/text/MrlTextHeading/MrlTextHeading.d.ts +39 -0
- package/dist/components/text/MrlTextHeading/index.d.ts +1 -0
- package/dist/components/text/constants.d.ts +40 -0
- package/dist/components/text/index.d.ts +2 -0
- package/dist/components/toast/index.d.ts +1 -0
- package/dist/components/toolbar/MrlToolbar/MrlToolbar.d.ts +38 -0
- package/dist/components/toolbar/MrlToolbar/index.d.ts +1 -0
- package/dist/components/toolbar/MrlToolbarButton/MrlToolbarButton.d.ts +58 -0
- package/dist/components/toolbar/MrlToolbarButton/index.d.ts +1 -0
- package/dist/components/toolbar/MrlToolbarItem/MrlToolbarItem.d.ts +30 -0
- package/dist/components/toolbar/MrlToolbarItem/index.d.ts +1 -0
- package/dist/components/toolbar/index.d.ts +3 -0
- package/dist/components/tooltip/MrlTooltip/MrlTooltip.d.ts +58 -0
- package/dist/components/tooltip/MrlTooltip/index.d.ts +1 -0
- package/dist/components/tooltip/MrlTooltip/utilities.d.ts +8 -0
- package/dist/components/tooltip/MrlTooltipContent/MrlTooltipContent.d.ts +43 -0
- package/dist/components/tooltip/MrlTooltipContent/index.d.ts +1 -0
- package/dist/components/tooltip/constants.d.ts +27 -0
- package/dist/components/tooltip/index.d.ts +2 -0
- package/dist/components/tooltip/useTooltipPosition/constants.d.ts +9 -0
- package/dist/components/tooltip/useTooltipPosition/index.d.ts +14 -0
- package/dist/components/tooltip/useTooltipPosition/utilities.d.ts +19 -0
- package/dist/components/tooltip/utils.d.ts +9 -0
- package/dist/contexts/MrlTabContext/MrlTabContext.d.ts +6 -0
- package/dist/contexts/MrlTabContext/index.d.ts +1 -0
- package/dist/contexts/index.d.ts +1 -0
- package/dist/hooks/index.d.ts +4 -0
- package/dist/hooks/useAutoClose/index.d.ts +1 -0
- package/dist/hooks/useAutoClose/useAutoClose.d.ts +11 -0
- package/dist/hooks/useBreakpoint/index.d.ts +15 -0
- package/dist/hooks/useBreakpoint/useBreakpointDemo.d.ts +7 -0
- package/dist/hooks/useClickOutside/index.d.ts +11 -0
- package/dist/hooks/useCoordinate/index.d.ts +18 -0
- package/dist/hooks/useElementDimensions/index.d.ts +16 -0
- package/dist/hooks/useScrollbarInfo/index.d.ts +13 -0
- package/dist/hooks/useTriggerPosition/constants.d.ts +11 -0
- package/dist/hooks/useTriggerPosition/index.d.ts +17 -0
- package/dist/hooks/useTriggerPosition/utilities.d.ts +12 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +2 -0
- package/dist/index.js.LICENSE.txt +8 -0
- package/dist/src/components/layout/error-page/MrlBrandColors/MrlBrandColors.functions.scss +12 -0
- package/dist/styles/MrlAvatar/module.scss +97 -0
- package/dist/styles/MrlAvatarButton/module.scss +41 -0
- package/dist/styles/MrlBadge/module.scss +39 -0
- package/dist/styles/MrlBadgeNotification/module.scss +38 -0
- package/dist/styles/MrlBlockNotification/global.scss +19 -0
- package/dist/styles/MrlBlockNotification/mixins.scss +20 -0
- package/dist/styles/MrlBlockNotification/module.scss +79 -0
- package/dist/styles/MrlBlockNotification/variables.scss +66 -0
- package/dist/styles/MrlBrandColors/mixins.scss +9 -0
- package/dist/styles/MrlBrandColors/module.scss +24 -0
- package/dist/styles/MrlBrandColors/variables.scss +89 -0
- package/dist/styles/MrlBreadcrumbItem/module.scss +41 -0
- package/dist/styles/MrlBreadcrumbs/module.scss +7 -0
- package/dist/styles/MrlButton/global.scss +70 -0
- package/dist/styles/MrlCallout/module.scss +50 -0
- package/dist/styles/MrlCheckbox/global.scss +18 -0
- package/dist/styles/MrlCheckbox/module.scss +16 -0
- package/dist/styles/MrlCheckbox/variables.scss +10 -0
- package/dist/styles/MrlCheckboxStandalone/global.scss +18 -0
- package/dist/styles/MrlCheckboxStandalone/module.scss +42 -0
- package/dist/styles/MrlCheckboxStandalone/variables.scss +27 -0
- package/dist/styles/MrlContainer/module.scss +32 -0
- package/dist/styles/MrlDivider/module.scss +22 -0
- package/dist/styles/MrlEditableTextInput/module.scss +105 -0
- package/dist/styles/MrlEditableTextInput/variables.scss +5 -0
- package/dist/styles/MrlEditableTextarea/global.scss +24 -0
- package/dist/styles/MrlEditableTextarea/module.scss +78 -0
- package/dist/styles/MrlErrorPage/module.scss +43 -0
- package/dist/styles/MrlFieldset/module.scss +2 -0
- package/dist/styles/MrlFilter/module.scss +5 -0
- package/dist/styles/MrlFilterItem/module.scss +53 -0
- package/dist/styles/MrlInlineMessage/module.scss +45 -0
- package/dist/styles/MrlLabel/module.scss +25 -0
- package/dist/styles/MrlLabel/variables.scss +17 -0
- package/dist/styles/MrlLabelWithDescription/module.scss +54 -0
- package/dist/styles/MrlLabelWithDescription/variables.scss +14 -0
- package/dist/styles/MrlLegacySelect/module.scss +80 -0
- package/dist/styles/MrlLegacySelect/variables.scss +10 -0
- package/dist/styles/MrlLegacySelectItem/module.scss +39 -0
- package/dist/styles/MrlLegacySelectItem/variables.scss +26 -0
- package/dist/styles/MrlLegacySelectMenu/module.scss +30 -0
- package/dist/styles/MrlLegacySelectMenu/variables.scss +4 -0
- package/dist/styles/MrlLink/module.scss +68 -0
- package/dist/styles/MrlLinkButton/global.scss +4 -0
- package/dist/styles/MrlMain/module.scss +26 -0
- package/dist/styles/MrlMain/variables.scss +5 -0
- package/dist/styles/MrlMenu/module.scss +45 -0
- package/dist/styles/MrlMenuGroup/module.scss +3 -0
- package/dist/styles/MrlMenuItem/module.scss +118 -0
- package/dist/styles/MrlModal/global.scss +37 -0
- package/dist/styles/MrlModal/mixins.scss +23 -0
- package/dist/styles/MrlModal/module.scss +55 -0
- package/dist/styles/MrlModal/variables.scss +26 -0
- package/dist/styles/MrlModalContent/module.scss +19 -0
- package/dist/styles/MrlModalFooter/global.scss +16 -0
- package/dist/styles/MrlModalFooter/module.scss +41 -0
- package/dist/styles/MrlModalFooter/variables.scss +5 -0
- package/dist/styles/MrlModalHeader/module.scss +21 -0
- package/dist/styles/MrlPage/module.scss +13 -0
- package/dist/styles/MrlPagination/module.scss +29 -0
- package/dist/styles/MrlPanel/module.scss +61 -0
- package/dist/styles/MrlPanelFooter/module.scss +12 -0
- package/dist/styles/MrlPanelStickyHeader/module.scss +14 -0
- package/dist/styles/MrlPopover/module.scss +112 -0
- package/dist/styles/MrlPopover/variables.scss +16 -0
- package/dist/styles/MrlProgressBar/module.scss +57 -0
- package/dist/styles/MrlRadioButton/module.scss +8 -0
- package/dist/styles/MrlRadioButtonStandalone/global.scss +16 -0
- package/dist/styles/MrlRadioButtonStandalone/module.scss +59 -0
- package/dist/styles/MrlRadioButtonStandalone/variables.scss +31 -0
- package/dist/styles/MrlSidebar/module.scss +65 -0
- package/dist/styles/MrlSidebarNavGroup/module.scss +8 -0
- package/dist/styles/MrlSidebarNavItem/module.scss +47 -0
- package/dist/styles/MrlSkeleton/module.scss +9 -0
- package/dist/styles/MrlSkeletonText/module.scss +24 -0
- package/dist/styles/MrlSmartTable/module.scss +40 -0
- package/dist/styles/MrlSpinner/module.scss +109 -0
- package/dist/styles/MrlSvg/module.scss +24 -0
- package/dist/styles/MrlSvgAnimate/module.scss +13 -0
- package/dist/styles/MrlSwitch/module.scss +10 -0
- package/dist/styles/MrlSwitchStandalone/module.scss +84 -0
- package/dist/styles/MrlTab/module.scss +117 -0
- package/dist/styles/MrlTabContent/module.scss +7 -0
- package/dist/styles/MrlTabGroup/module.scss +66 -0
- package/dist/styles/MrlTable/module.scss +5 -0
- package/dist/styles/MrlTableBody/module.scss +2 -0
- package/dist/styles/MrlTableCell/module.scss +10 -0
- package/dist/styles/MrlTableColumn/module.scss +27 -0
- package/dist/styles/MrlTableEmptyState/module.scss +14 -0
- package/dist/styles/MrlTableHeader/module.scss +7 -0
- package/dist/styles/MrlTableRow/module.scss +17 -0
- package/dist/styles/MrlText/module.scss +8 -0
- package/dist/styles/MrlText/variables.scss +14 -0
- package/dist/styles/MrlTextHeading/module.scss +24 -0
- package/dist/styles/MrlTextHeading/variables.scss +40 -0
- package/dist/styles/MrlTextInput/module.scss +70 -0
- package/dist/styles/MrlTextInput/variables.scss +5 -0
- package/dist/styles/MrlTextarea/global.scss +12 -0
- package/dist/styles/MrlTextarea/module.scss +18 -0
- package/dist/styles/MrlToast/module.scss +114 -0
- package/dist/styles/MrlToolbar/module.scss +53 -0
- package/dist/styles/MrlToolbarButton/module.scss +3 -0
- package/dist/styles/MrlTooltipContent/global.scss +146 -0
- package/dist/styles/MrlTooltipContent/variables.scss +17 -0
- package/dist/styles/MrlTopbar/module.scss +12 -0
- package/dist/styles/a11y-helpers/global.scss +5 -0
- package/dist/styles/a11y-helpers/mixins.scss +11 -0
- package/dist/styles/button/global.scss +38 -0
- package/dist/styles/button/mixins.scss +42 -0
- package/dist/styles/button/variables.scss +164 -0
- package/dist/styles/components/module.scss +6 -0
- package/dist/styles/container/variables.scss +10 -0
- package/dist/styles/date-picker/module.scss +38 -0
- package/dist/styles/demo/module.scss +11 -0
- package/dist/styles/divider/mixins.scss +32 -0
- package/dist/styles/divider/variables.scss +22 -0
- package/dist/styles/empty/module.scss +18 -0
- package/dist/styles/form/global.scss +89 -0
- package/dist/styles/form/variables.scss +58 -0
- package/dist/styles/grid/global.scss +6 -0
- package/dist/styles/grid/variables.scss +26 -0
- package/dist/styles/layout/variables.scss +3 -0
- package/dist/styles/modal/variables.scss +32 -0
- package/dist/styles/skeleton/mixins.scss +44 -0
- package/dist/styles/skeleton/variables.scss +2 -0
- package/dist/styles/svg/variables.scss +17 -0
- package/dist/styles/table/global.scss +78 -0
- package/dist/styles/table/variables.scss +30 -0
- package/dist/styles/tooltip/mixins.scss +8 -0
- package/dist/styles.css +99 -0
- package/dist/utils/checkInvalidAttributes/index.d.ts +7 -0
- package/dist/utils/commonProps/index.d.ts +20 -0
- package/dist/utils/dataQa/index.d.ts +6 -0
- package/dist/utils/findAdjacentInteractiveElement/findAdjacentInteractiveElement.d.ts +8 -0
- package/dist/utils/findAdjacentInteractiveElement/index.d.ts +1 -0
- package/dist/utils/frameDebounce/index.d.ts +22 -0
- package/dist/utils/getCamelCase/getCamelCase.d.ts +7 -0
- package/dist/utils/getCamelCase/getCamelCase.test.d.ts +1 -0
- package/dist/utils/getCamelCase/index.d.ts +2 -0
- package/dist/utils/getScrollableContainer/getScrollableContainer.d.ts +7 -0
- package/dist/utils/hasHorizontalScroll/hasHorizontalScroll.d.ts +11 -0
- package/dist/utils/hasScrollContent/hasScrollContent.d.ts +11 -0
- package/dist/utils/index.d.ts +11 -0
- package/dist/utils/isElementScrollable/index.d.ts +7 -0
- package/dist/utils/isImagePath/index.d.ts +7 -0
- package/dist/utils/isImageUri/index.d.ts +7 -0
- package/dist/utils/isObject/index.d.ts +2 -0
- package/dist/utils/isObject/isObject.d.ts +14 -0
- package/dist/utils/isObject/isObject.test.d.ts +1 -0
- package/dist/utils/isTouch/index.d.ts +6 -0
- package/dist/utils/layers/index.d.ts +48 -0
- package/dist/utils/noop/index.d.ts +7 -0
- package/dist/utils/preventDefault/index.d.ts +1 -0
- package/dist/utils/preventDefault/preventDefault.d.ts +6 -0
- package/dist/utils/setAttributes/index.d.ts +2 -0
- package/dist/utils/setAttributes/setAttributes.d.ts +35 -0
- package/dist/utils/setAttributes/setAttributes.test.d.ts +1 -0
- package/dist/utils/trapFocus/index.d.ts +24 -0
- package/package.json +1 -1
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { DSIconType } from '../../../';
|
|
3
|
+
export interface MrlMenuItemLinkProps {
|
|
4
|
+
/** ID for associated description */
|
|
5
|
+
ariaDescribedBy?: string;
|
|
6
|
+
/**
|
|
7
|
+
Children to be rendered within the menu component
|
|
8
|
+
*/
|
|
9
|
+
children: React.ReactNode | string;
|
|
10
|
+
/** Class names for the menu item */
|
|
11
|
+
className?: string;
|
|
12
|
+
/** If the menu item is disabled */
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
/** Href for the menu item */
|
|
15
|
+
href: string;
|
|
16
|
+
/** Icon for menu item */
|
|
17
|
+
icon?: DSIconType;
|
|
18
|
+
/** Target for links */
|
|
19
|
+
target?: string;
|
|
20
|
+
/** Unique ID for the menu item */
|
|
21
|
+
id?: string;
|
|
22
|
+
/** Callback to be called when the menu item is clicked */
|
|
23
|
+
onClick?: (e: React.MouseEvent<HTMLElement>) => void;
|
|
24
|
+
/** Data-qa attribute for the menu item */
|
|
25
|
+
dataQa?: string;
|
|
26
|
+
/** If the menu item is selected */
|
|
27
|
+
selected?: boolean;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* MrlMenuItem component
|
|
31
|
+
*
|
|
32
|
+
* Renders a menu item to be used within the MrlMenu component
|
|
33
|
+
*
|
|
34
|
+
* @param {MrlMenuItemLinkProps} props - The props for the MrlMenuItem component
|
|
35
|
+
* @returns {Element} - rendered MrlMenuItem component
|
|
36
|
+
*/
|
|
37
|
+
export declare function MrlMenuItemLink({ ariaDescribedBy, children, className, dataQa, disabled, href, icon, id, onClick, selected, target }: MrlMenuItemLinkProps): JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './MrlMenuItemLink';
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export type MenuPosition = 'bottom' | 'left' | 'right' | 'top' | 'static' | MenuIgnore;
|
|
3
|
+
export type MenuAlignment = 'start' | 'end' | 'center';
|
|
4
|
+
export type HorizontalAlign = 'left' | 'right' | 'center';
|
|
5
|
+
export type VerticalAlign = 'top' | 'bottom' | 'center';
|
|
6
|
+
export type MenuIgnore = 'ignore';
|
|
7
|
+
export interface CustomMenuPosition {
|
|
8
|
+
left: number;
|
|
9
|
+
top: number;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* The type of action that is being performed.
|
|
13
|
+
*
|
|
14
|
+
* Used in conjunction with the `ActionState` interface.
|
|
15
|
+
*/
|
|
16
|
+
export type ActionType = 'ArrowUp' | 'ArrowDown' | 'ArrowRight' | 'Enter' | 'Escape' | ' ' | 'click' | null;
|
|
17
|
+
/**
|
|
18
|
+
* The state of the menu you are interacting with.
|
|
19
|
+
*
|
|
20
|
+
* @property {ActionType} actionType - The type of action that is being performed.
|
|
21
|
+
* @property {boolean} isOpen - Whether the menu is open or not.
|
|
22
|
+
*/
|
|
23
|
+
export interface ActionState {
|
|
24
|
+
actionType: ActionType;
|
|
25
|
+
isOpen: boolean;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Accepted component types for use as a submenu
|
|
29
|
+
*/
|
|
30
|
+
export type SubMenuTypes = 'Menu' | 'Popover';
|
|
31
|
+
/**
|
|
32
|
+
* Extension of the React.FunctionComponent type to include a componentType property.
|
|
33
|
+
*
|
|
34
|
+
* Allows custom component types to be used to render a submenu.
|
|
35
|
+
*/
|
|
36
|
+
export interface ComponentWithComponentType extends React.FunctionComponent {
|
|
37
|
+
componentType?: SubMenuTypes;
|
|
38
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
type MrlMenuContext = {
|
|
3
|
+
/**
|
|
4
|
+
* Close menu is shared in context to allow for closing the menu from a child component
|
|
5
|
+
*
|
|
6
|
+
* @returns {void}
|
|
7
|
+
*/
|
|
8
|
+
closeMenu: (shouldCloseParent?: boolean) => void;
|
|
9
|
+
/**
|
|
10
|
+
* Close parent is shared in context to allow for closing the parent menu from a submenu
|
|
11
|
+
*
|
|
12
|
+
* @returns {void}
|
|
13
|
+
*/
|
|
14
|
+
closeParent?: () => void;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Adds context for the MrlMenu component
|
|
18
|
+
*/
|
|
19
|
+
export declare const MrlMenuContext: React.Context<MrlMenuContext | undefined>;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { MenuPosition, ActionState, MenuAlignment } from '../constants';
|
|
3
|
+
interface MenuWithPopoverProps {
|
|
4
|
+
position?: MenuPosition;
|
|
5
|
+
spacing?: 'default' | 'compact';
|
|
6
|
+
alignment?: MenuAlignment;
|
|
7
|
+
actionState?: ActionState;
|
|
8
|
+
onClose?: () => void;
|
|
9
|
+
triggerAlignment?: 'left' | 'right' | 'center';
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Demo of a menu with a trigger for stories and testing
|
|
13
|
+
*
|
|
14
|
+
* @param {MenuWithPopoverProps} props - The props for the menu with trigger
|
|
15
|
+
* @returns {Element} The menu with trigger demo
|
|
16
|
+
*/
|
|
17
|
+
export declare const MenuWithPopover: ({ alignment, position, spacing, actionState, onClose, triggerAlignment }: MenuWithPopoverProps) => JSX.Element;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { MenuPosition, ActionState, MenuAlignment } from '../constants';
|
|
3
|
+
interface MenuWithSubmenuProps {
|
|
4
|
+
position?: MenuPosition;
|
|
5
|
+
spacing?: 'default' | 'compact';
|
|
6
|
+
alignment?: MenuAlignment;
|
|
7
|
+
actionState?: ActionState;
|
|
8
|
+
onClose?: () => void;
|
|
9
|
+
triggerAlignment?: 'left' | 'right' | 'center';
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Demo of a menu with a trigger for stories and testing
|
|
13
|
+
*
|
|
14
|
+
* @param {MenuWithSubmenuProps} props - The props for the menu with trigger
|
|
15
|
+
* @returns {Element} The menu with trigger demo
|
|
16
|
+
*/
|
|
17
|
+
export declare const MenuWithSubmenu: ({ alignment, position, spacing, actionState, onClose, triggerAlignment }: MenuWithSubmenuProps) => JSX.Element;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { CustomMenuPosition } from '../';
|
|
3
|
+
import { MenuPosition, ActionState, MenuAlignment } from '../constants';
|
|
4
|
+
export interface MenuWithTriggerProps {
|
|
5
|
+
position?: MenuPosition;
|
|
6
|
+
spacing?: 'default' | 'compact';
|
|
7
|
+
alignment?: MenuAlignment;
|
|
8
|
+
actionState?: ActionState;
|
|
9
|
+
onClose?: () => void;
|
|
10
|
+
customPosition?: CustomMenuPosition;
|
|
11
|
+
triggerAlignment?: 'left' | 'right' | 'center';
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Demo of a menu with a trigger for stories and testing
|
|
15
|
+
*
|
|
16
|
+
* @param {MenuWithTriggerProps} props - The props for the menu with trigger
|
|
17
|
+
* @returns {Element} The menu with trigger demo
|
|
18
|
+
*/
|
|
19
|
+
export declare const MenuWithTrigger: ({ alignment, position, spacing, actionState, customPosition, onClose, triggerAlignment }: MenuWithTriggerProps) => JSX.Element;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { MenuAlignment, MenuPosition } from '../constants';
|
|
2
|
+
interface ElementScrollStyles {
|
|
3
|
+
isScrolling: boolean;
|
|
4
|
+
styles: AdjustedElementStyle;
|
|
5
|
+
}
|
|
6
|
+
export interface AdjustedElementStyle {
|
|
7
|
+
maxHeight?: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* useBrowserEdgeScroll hook
|
|
11
|
+
*
|
|
12
|
+
* This hook will calculate if an element's top or bottom edge bleed over the viewport edge
|
|
13
|
+
* and will provide a max height value for the element to allow it to scroll instead of bleed over
|
|
14
|
+
*
|
|
15
|
+
* @param elementRef - reference to the DOM element that is the menu
|
|
16
|
+
* @param elementPosition - the position of the menu
|
|
17
|
+
* @param elementAlign - the alignment of the menu
|
|
18
|
+
* @param disable - disable the hook from running
|
|
19
|
+
* @returns AdjustedElementStyle - returns the new updated style for scrolling the menu
|
|
20
|
+
*/
|
|
21
|
+
export declare const useBrowserEdgeScroll: (elementRef: React.RefObject<HTMLElement>, elementPosition: MenuPosition | undefined, elementAlign: MenuAlignment, disable?: boolean) => ElementScrollStyles | null;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
interface SubMenuPosition {
|
|
3
|
+
left: string;
|
|
4
|
+
top: string;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Calculates the position of the sub menu element
|
|
8
|
+
*
|
|
9
|
+
* @param triggerRef - The trigger element ref
|
|
10
|
+
* @param menuRef - The menu element ref
|
|
11
|
+
* @param isSubMenu - Is the menu a sub menu
|
|
12
|
+
* @param isOpen - Is the element visible
|
|
13
|
+
* @param originalMenuRect - The menu element rect
|
|
14
|
+
* @param disable - Should the menu be disabled
|
|
15
|
+
* @returns The sub menu position
|
|
16
|
+
*/
|
|
17
|
+
export declare const useSubMenuElementPosition: (triggerRef: RefObject<HTMLElement> | undefined, menuRef: RefObject<HTMLDivElement>, isSubMenu: boolean, isOpen: boolean, originalMenuRect: DOMRect | null, disable?: boolean) => SubMenuPosition;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { MenuPosition } from '../constants';
|
|
2
|
+
/**
|
|
3
|
+
* Flips the given position to its opposite.
|
|
4
|
+
*
|
|
5
|
+
* @param pos - The position to flip. Can be 'left', 'right', 'top', or 'bottom'.
|
|
6
|
+
* @returns The flipped position. Will be 'right' for 'left', 'left' for 'right', 'bottom' for 'top', and 'top' for 'bottom'.
|
|
7
|
+
*/
|
|
8
|
+
export declare const flipPosition: (pos: MenuPosition) => MenuPosition;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns the closest scrollable parent of the provided element.
|
|
3
|
+
*
|
|
4
|
+
* @param element - The element to start from
|
|
5
|
+
* @returns The closest scrollable ancestor or the document's scrolling element
|
|
6
|
+
*/
|
|
7
|
+
export declare function getScrollableParent(element: HTMLElement | null): HTMLElement | Window;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { MrlComponentProps } from '../../../utils';
|
|
3
|
+
import { ModalSize, ModalState } from '../constants';
|
|
4
|
+
import './MrlModal.global.scss';
|
|
5
|
+
interface ModalProps extends MrlComponentProps {
|
|
6
|
+
/**
|
|
7
|
+
* Aria label for the modal
|
|
8
|
+
*/
|
|
9
|
+
ariaLabel?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Content of the modal
|
|
12
|
+
*/
|
|
13
|
+
children: React.ReactElement | React.ReactElement[];
|
|
14
|
+
/**
|
|
15
|
+
* Modal Wrapper Class
|
|
16
|
+
*/
|
|
17
|
+
className?: string;
|
|
18
|
+
/**
|
|
19
|
+
* !!!!! WARNING: do not use this prop without an explicit requirement from the design team !!!!!
|
|
20
|
+
*
|
|
21
|
+
* Enables/disables the ability to close the modal. This prop does the following:
|
|
22
|
+
* - removes close button
|
|
23
|
+
* - disables clicking on the overlay to close the modal
|
|
24
|
+
* - disables the escape key to close the modal
|
|
25
|
+
*/
|
|
26
|
+
closable?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Tells the modal whether we are in a loading state.
|
|
29
|
+
* This is used to disabled FocusTrap until the contents of the modal are loaded
|
|
30
|
+
*/
|
|
31
|
+
loading?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Prevents the background from scrolling when the modal is open
|
|
34
|
+
*/
|
|
35
|
+
preventBackgroundScroll?: boolean;
|
|
36
|
+
/** The size of the modal container */
|
|
37
|
+
size?: ModalSize;
|
|
38
|
+
/** Current state of the modal based on user interactions or permissions */
|
|
39
|
+
state?: ModalState;
|
|
40
|
+
/** Additional function to be run when the modal closes */
|
|
41
|
+
hookClose?: (() => void) | undefined;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Modal Component.
|
|
45
|
+
*
|
|
46
|
+
* @param props - Modal props
|
|
47
|
+
* @returns an instance of the MrlModal
|
|
48
|
+
*/
|
|
49
|
+
export declare const MrlModal: React.ForwardRefExoticComponent<ModalProps & React.RefAttributes<HTMLDivElement>>;
|
|
50
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { MrlModal } from './MrlModal';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
interface MrlModalHeaderProps {
|
|
3
|
+
/**
|
|
4
|
+
* Children to be rendered within the component.
|
|
5
|
+
*/
|
|
6
|
+
children: React.ReactElement | React.ReactElement[];
|
|
7
|
+
/**
|
|
8
|
+
* Wrapper Class
|
|
9
|
+
*/
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Modal Content component for the MrlModal
|
|
14
|
+
*
|
|
15
|
+
* @param {object} props - The props object
|
|
16
|
+
* @param {React.ReactElement} props.children - The children to be rendered within the component
|
|
17
|
+
* @returns {React.ReactElement}} The rendered MrlModalContent component
|
|
18
|
+
*/
|
|
19
|
+
export declare const MrlModalContent: ({ children, className }: MrlModalHeaderProps) => JSX.Element;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { MrlModalContent } from './MrlModalContent';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export type MrlModalScrollableContent = {
|
|
3
|
+
isContentScrollable: boolean;
|
|
4
|
+
hasScrollTop: boolean;
|
|
5
|
+
hasScrollBottom: boolean;
|
|
6
|
+
};
|
|
7
|
+
export type MrlModalContextState = {
|
|
8
|
+
scrollableContent: MrlModalScrollableContent;
|
|
9
|
+
setScrollableContent: React.Dispatch<React.SetStateAction<MrlModalScrollableContent>>;
|
|
10
|
+
};
|
|
11
|
+
export declare const MrlModalContext: React.Context<MrlModalContextState | undefined>;
|
|
12
|
+
/**
|
|
13
|
+
* Returns the MrlModalContext state.
|
|
14
|
+
*
|
|
15
|
+
* @returns The MrlModalContext state.
|
|
16
|
+
*/
|
|
17
|
+
export declare const useMrlModalContext: () => MrlModalContextState;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './MrlModalContext';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { MrlComponentProps } from '../../../utils';
|
|
3
|
+
import './MrlModalFooter.global.scss';
|
|
4
|
+
interface MrlModalFooterProps extends MrlComponentProps {
|
|
5
|
+
/**
|
|
6
|
+
* Content of the modal footer
|
|
7
|
+
*/
|
|
8
|
+
children?: React.ReactElement | React.ReactElement[];
|
|
9
|
+
/**
|
|
10
|
+
* Wrapper Class
|
|
11
|
+
*/
|
|
12
|
+
className?: string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Modal Footer component for the MrlModal
|
|
16
|
+
*
|
|
17
|
+
* @param {AttrsObject} attrs - Additional HTML attributes for the `mrl-modal` element
|
|
18
|
+
* @returns {React.ReactElement} The rendered MrlModalFooter component
|
|
19
|
+
*/
|
|
20
|
+
export declare const MrlModalFooter: ({ attrs, children, className }: MrlModalFooterProps) => JSX.Element;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { MrlModalFooter } from './MrlModalFooter';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { MrlComponentProps } from '../../../utils';
|
|
3
|
+
export interface MrlModalHeaderProps extends MrlComponentProps {
|
|
4
|
+
/**
|
|
5
|
+
* Content of the modal header
|
|
6
|
+
*/
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
/**
|
|
9
|
+
* Wrapper Class
|
|
10
|
+
*/
|
|
11
|
+
className?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Text the h1 element of modal header
|
|
14
|
+
*/
|
|
15
|
+
text: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Modal Header component for the MrlModal.
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
* @param {MrlModalHeaderProps} props - The props for the MrlModalFooter component
|
|
22
|
+
* @param {AttrsObject} props.attrs - Additional HTML attributes for the `mrl-modal` element
|
|
23
|
+
* @returns {React.ReactElement} The rendered MrlModalFooter component
|
|
24
|
+
*/
|
|
25
|
+
export declare const MrlModalHeader: ({ attrs, children, className, text }: MrlModalHeaderProps) => JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { MrlModalHeader } from './MrlModalHeader';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { AttrsObject } from '../../utils';
|
|
2
|
+
export declare const allowedValues: {
|
|
3
|
+
sizes: readonly ["small", "medium", "large"];
|
|
4
|
+
states: readonly ["open", "close"];
|
|
5
|
+
};
|
|
6
|
+
export type ModalSize = (typeof allowedValues.sizes)[number];
|
|
7
|
+
export type ModalState = (typeof allowedValues.states)[number];
|
|
8
|
+
export interface ModalDefaults {
|
|
9
|
+
attrs: AttrsObject;
|
|
10
|
+
size: ModalSize;
|
|
11
|
+
state: ModalState;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Default values for props on the Modal component;
|
|
15
|
+
* Shared between the component and Storybook
|
|
16
|
+
*/
|
|
17
|
+
export declare const defaults: ModalDefaults;
|
|
18
|
+
export declare const TransitionDuration = 300;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface ModalDemoProps {
|
|
3
|
+
/** Additional function to be run when the modal closes */
|
|
4
|
+
hookClose?: (() => void) | undefined;
|
|
5
|
+
closable?: boolean;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Demo for a modal with a trigger button
|
|
9
|
+
*
|
|
10
|
+
* @param {object} props - The props object
|
|
11
|
+
* @param {Function} props.hookClose - hookClose for modal
|
|
12
|
+
* @returns {Element} Rendered demo
|
|
13
|
+
*/
|
|
14
|
+
export declare const ModalWithTriggerDemo: ({ closable, hookClose }: ModalDemoProps) => JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { LevelType } from '../../text/constants';
|
|
3
|
+
interface MrlSidebarNavGroupProps extends React.ComponentPropsWithoutRef<'nav'> {
|
|
4
|
+
/** Additional class to add to the nav element */
|
|
5
|
+
className?: string;
|
|
6
|
+
/** A list of navigation items */
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
/** Set the semantic level of the heading, only applies when headingText is defined */
|
|
9
|
+
level?: Exclude<LevelType, '1'>;
|
|
10
|
+
/**
|
|
11
|
+
* Sets the heading's text.
|
|
12
|
+
* If no visual heading is required add the hiddenHeading prop
|
|
13
|
+
*/
|
|
14
|
+
headingText: string;
|
|
15
|
+
/** Prevents rendering the heading and uses aria-label to label the nav element */
|
|
16
|
+
hiddenHeading?: boolean;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Sidebar group component
|
|
20
|
+
*
|
|
21
|
+
* @param {MrlSidebarNavGroupProps} props - the component props
|
|
22
|
+
* @returns a sidebar nav group
|
|
23
|
+
*/
|
|
24
|
+
export declare function MrlSidebarNavGroup({ className, children, level, headingText, style, hiddenHeading, ...rest }: MrlSidebarNavGroupProps): JSX.Element;
|
|
25
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './MrlSidebarNavGroup';
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { DSIconType } from '../../';
|
|
3
|
+
interface MrlSidebarNavItemProps {
|
|
4
|
+
/** Additional class to add to the li element */
|
|
5
|
+
className?: string;
|
|
6
|
+
/** A string value used for data-qa attribute. */
|
|
7
|
+
['data-qa']?: string;
|
|
8
|
+
/** Leading icon of the sidebar nav item */
|
|
9
|
+
icon?: DSIconType;
|
|
10
|
+
/** Sets the selected state for the sidebar nav item */
|
|
11
|
+
isSelected?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Render function used to wrap the sidebar nav item with a link component.
|
|
14
|
+
* It allows users to wrap the sidebar nav item with different link implementations, react-router's link for example.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* <MrlSidebarNavItem renderLink={({linkContent}) => <Link to="/">{linkContent}</Link>}/>
|
|
18
|
+
* <MrlSidebarNavItem renderLink={({linkContent}) => <a href="/">{linkContent}</a>}/>
|
|
19
|
+
*/
|
|
20
|
+
renderLink: ({ linkContent }: {
|
|
21
|
+
linkContent: React.ReactNode;
|
|
22
|
+
}) => JSX.Element;
|
|
23
|
+
/** The text of the sidebar item */
|
|
24
|
+
text?: React.ReactNode;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Sidebar nav item component
|
|
28
|
+
*
|
|
29
|
+
* @param {MrlSidebarNavItemProps} props - the component props
|
|
30
|
+
* @returns a sidebar nav item
|
|
31
|
+
*/
|
|
32
|
+
export declare function MrlSidebarNavItem({ className, ['data-qa']: qa, icon, isSelected, text, renderLink }: MrlSidebarNavItemProps): JSX.Element;
|
|
33
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './MrlSidebarNavItem';
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { AttrsObject } from '../../../utils';
|
|
3
|
+
import { NotificationKind, NotificationScope, NotificationState, NotificationLevel } from '../constants';
|
|
4
|
+
import { DSIconType } from '../..';
|
|
5
|
+
import './MrlBlockNotification.global.scss';
|
|
6
|
+
import { useAutoClose } from '../../../hooks/useAutoClose';
|
|
7
|
+
export interface MrlBlockNotificationProps {
|
|
8
|
+
/**
|
|
9
|
+
* Block Notification Wrapper Class
|
|
10
|
+
*/
|
|
11
|
+
className?: string;
|
|
12
|
+
/**
|
|
13
|
+
* QA attribute for close button to allow tests to find the element easier
|
|
14
|
+
*/
|
|
15
|
+
closeQa?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Children
|
|
18
|
+
*
|
|
19
|
+
* IMPORTANT! — Make sure to set shouldAutoClose: false if children of this component
|
|
20
|
+
* contain interactive elements. Autoclosing interactive elements is an accessibility
|
|
21
|
+
* anti-pattern and should be avoided.
|
|
22
|
+
*/
|
|
23
|
+
children?: React.ReactNode;
|
|
24
|
+
/**
|
|
25
|
+
* Adds CTA button to the notification
|
|
26
|
+
*/
|
|
27
|
+
cta?: React.ReactElement;
|
|
28
|
+
/**
|
|
29
|
+
* The kind of notification to display.
|
|
30
|
+
*
|
|
31
|
+
* Examples: warning, error, info, success
|
|
32
|
+
*/
|
|
33
|
+
kind?: NotificationKind;
|
|
34
|
+
/**
|
|
35
|
+
* A custom DS icon.
|
|
36
|
+
*/
|
|
37
|
+
customIcon?: DSIconType;
|
|
38
|
+
/**
|
|
39
|
+
* Sets header text for notification
|
|
40
|
+
*/
|
|
41
|
+
heading?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Adds a close button to notificaiton if true
|
|
44
|
+
*/
|
|
45
|
+
dismissible?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Sets the primary content for the notification
|
|
48
|
+
*/
|
|
49
|
+
message?: React.ReactNode;
|
|
50
|
+
/**
|
|
51
|
+
* Sets the scope of the notification
|
|
52
|
+
*/
|
|
53
|
+
scope?: NotificationScope;
|
|
54
|
+
/**
|
|
55
|
+
* Open/Close state of the notification
|
|
56
|
+
*/
|
|
57
|
+
state?: NotificationState;
|
|
58
|
+
/**
|
|
59
|
+
* Open notification callback
|
|
60
|
+
*
|
|
61
|
+
* @returns {void}
|
|
62
|
+
*/
|
|
63
|
+
hookOpen?: () => void;
|
|
64
|
+
/**
|
|
65
|
+
* Close notification callback
|
|
66
|
+
*
|
|
67
|
+
* @returns {void}
|
|
68
|
+
*/
|
|
69
|
+
hookClose?: () => void;
|
|
70
|
+
/**
|
|
71
|
+
* Sets the header level
|
|
72
|
+
* Example output: h1, h2, h3, h4
|
|
73
|
+
*/
|
|
74
|
+
level?: NotificationLevel;
|
|
75
|
+
/**
|
|
76
|
+
* Attributes that are applied to the component during the initial render.
|
|
77
|
+
*
|
|
78
|
+
* Example usage: html attributes, custom data attributes (data-qa), aria
|
|
79
|
+
*/
|
|
80
|
+
attrs?: AttrsObject;
|
|
81
|
+
/**
|
|
82
|
+
* When false prevents automated close (e.g. can be used to prevent auto-dismissal of interactive elements, an accessibility anti-pattern) (see useAutoClose)
|
|
83
|
+
*/
|
|
84
|
+
shouldAutoClose?: Parameters<useAutoClose>[0];
|
|
85
|
+
/**
|
|
86
|
+
* Delay in milliseconds before the component closes (see useAutoClose)
|
|
87
|
+
*/
|
|
88
|
+
autoCloseAfterMs?: Parameters<useAutoClose>[1];
|
|
89
|
+
/**
|
|
90
|
+
* Callback to be called when component closes (see useAutoClose)
|
|
91
|
+
*/
|
|
92
|
+
onAutoClose?: Parameters<useAutoClose>[2];
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Block Notification Component
|
|
96
|
+
*
|
|
97
|
+
* @param props - Component props
|
|
98
|
+
* @returns {Element} Block Notification
|
|
99
|
+
*/
|
|
100
|
+
export declare const MrlBlockNotification: (props: MrlBlockNotificationProps) => JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { MrlBlockNotification, type MrlBlockNotificationProps } from './MrlBlockNotification';
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { DSIconType } from '../../svg';
|
|
3
|
+
export type InlineMessageKind = 'error' | 'info' | 'warning' | 'success' | 'helper';
|
|
4
|
+
export interface MrlInlineMessageProps {
|
|
5
|
+
/**
|
|
6
|
+
* A custom DS icon which is only applied if the alert is not an error, info, or warning type
|
|
7
|
+
*/
|
|
8
|
+
customIcon?: DSIconType;
|
|
9
|
+
/**
|
|
10
|
+
* The id of the notification.
|
|
11
|
+
*
|
|
12
|
+
* Used to link the notification to a form field using aria-describedby.
|
|
13
|
+
*/
|
|
14
|
+
id: string;
|
|
15
|
+
/**
|
|
16
|
+
* Choose the kind of notification to display.
|
|
17
|
+
*
|
|
18
|
+
* Accepted values: error, info, warning, success, helper
|
|
19
|
+
*/
|
|
20
|
+
kind: InlineMessageKind;
|
|
21
|
+
/**
|
|
22
|
+
* The text to be displayed in the notification. If not provided, children will be used.
|
|
23
|
+
*/
|
|
24
|
+
message?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Children to be rendered within the component, it will be used as the message if message is not provided.
|
|
27
|
+
*/
|
|
28
|
+
children?: React.ReactNode;
|
|
29
|
+
/**
|
|
30
|
+
* The data-qa attribute for testing purposes.
|
|
31
|
+
*/
|
|
32
|
+
['data-qa']?: string;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* MrlInlineMessage is a notification component that can be used to display messages to the user.
|
|
36
|
+
*
|
|
37
|
+
* @param props - The properties of the component.
|
|
38
|
+
* @returns A React component.
|
|
39
|
+
*/
|
|
40
|
+
export declare const MrlInlineMessage: ({ children, customIcon, id, kind, message, ["data-qa"]: qa }: MrlInlineMessageProps) => React.ReactElement;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { MrlInlineMessage, type MrlInlineMessageProps } from './MrlInlineMessage';
|