@muraldevkit/ui-toolkit 4.72.0 → 4.73.0-dev-t0WE.1
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/cjs/components/avatar/MrlAvatarButton/MrlAvatarButton.js +8 -1
- package/dist/cjs/components/avatar/MrlAvatarButton/MrlAvatarButton.js.map +1 -1
- package/dist/cjs/components/breadcrumb/MrlBreadcrumbItem/MrlBreadcrumbItem.js +14 -4
- package/dist/cjs/components/breadcrumb/MrlBreadcrumbItem/MrlBreadcrumbItem.js.map +1 -1
- package/dist/cjs/components/button/MrlAnimatedIconButton/MrlAnimatedIconButton.js +8 -1
- package/dist/cjs/components/button/MrlAnimatedIconButton/MrlAnimatedIconButton.js.map +1 -1
- package/dist/cjs/components/button/MrlButton/MrlButton.js +3 -3
- package/dist/cjs/components/button/MrlButton/MrlButton.js.map +1 -1
- package/dist/cjs/components/button/MrlIconButton/MrlIconButton.js +8 -1
- package/dist/cjs/components/button/MrlIconButton/MrlIconButton.js.map +1 -1
- package/dist/cjs/components/button/MrlProcessingButton/MrlProcessingButton.js +21 -2
- package/dist/cjs/components/button/MrlProcessingButton/MrlProcessingButton.js.map +1 -1
- package/dist/cjs/components/callout/MrlCallout/MrlCallout.js +36 -3
- package/dist/cjs/components/callout/MrlCallout/MrlCallout.js.map +1 -1
- package/dist/cjs/components/filter/MrlFilter/MrlFilter.js +18 -2
- package/dist/cjs/components/filter/MrlFilter/MrlFilter.js.map +1 -1
- package/dist/cjs/components/filter/MrlFilterItem/MrlFilterItem.js +11 -1
- package/dist/cjs/components/filter/MrlFilterItem/MrlFilterItem.js.map +1 -1
- package/dist/cjs/components/form/checkbox/MrlCheckbox/MrlCheckbox.js +17 -1
- package/dist/cjs/components/form/checkbox/MrlCheckbox/MrlCheckbox.js.map +1 -1
- package/dist/cjs/components/form/checkbox/MrlCheckboxStandalone/MrlCheckboxStandalone.js +24 -1
- package/dist/cjs/components/form/checkbox/MrlCheckboxStandalone/MrlCheckboxStandalone.js.map +1 -1
- package/dist/cjs/components/form/date-picker/MrlDatePicker.js +17 -2
- package/dist/cjs/components/form/date-picker/MrlDatePicker.js.map +1 -1
- package/dist/cjs/components/form/legacy-select/MrlLegacySelect/MrlLegacySelect.js +11 -2
- package/dist/cjs/components/form/legacy-select/MrlLegacySelect/MrlLegacySelect.js.map +1 -1
- package/dist/cjs/components/form/legacy-select/MrlLegacySelectItem/MrlLegacySelectItem.js +8 -1
- package/dist/cjs/components/form/legacy-select/MrlLegacySelectItem/MrlLegacySelectItem.js.map +1 -1
- package/dist/cjs/components/form/radio/MrlRadioButton/MrlRadioButton.js +19 -1
- package/dist/cjs/components/form/radio/MrlRadioButton/MrlRadioButton.js.map +1 -1
- package/dist/cjs/components/form/radio/MrlRadioButtonStandalone/MrlRadioButtonStandalone.js +19 -1
- package/dist/cjs/components/form/radio/MrlRadioButtonStandalone/MrlRadioButtonStandalone.js.map +1 -1
- package/dist/cjs/components/form/select/MrlCreatableSelect/MrlCreatableSelect.js +42 -2
- package/dist/cjs/components/form/select/MrlCreatableSelect/MrlCreatableSelect.js.map +1 -1
- package/dist/cjs/components/form/select/MrlMultiCreatableSelect/MrlMultiCreatableSelect.js +42 -2
- package/dist/cjs/components/form/select/MrlMultiCreatableSelect/MrlMultiCreatableSelect.js.map +1 -1
- package/dist/cjs/components/form/select/MrlMultiSelect/MrlMultiSelect.js +34 -2
- package/dist/cjs/components/form/select/MrlMultiSelect/MrlMultiSelect.js.map +1 -1
- package/dist/cjs/components/form/select/MrlSelect/MrlSelect.js +34 -2
- package/dist/cjs/components/form/select/MrlSelect/MrlSelect.js.map +1 -1
- package/dist/cjs/components/form/switch/MrlSwitch/MrlSwitch.js +14 -2
- package/dist/cjs/components/form/switch/MrlSwitch/MrlSwitch.js.map +1 -1
- package/dist/cjs/components/form/switch/MrlSwitchStandalone/MrlSwitchStandalone.js +10 -1
- package/dist/cjs/components/form/switch/MrlSwitchStandalone/MrlSwitchStandalone.js.map +1 -1
- package/dist/cjs/components/form/text-input/MrlEditableTextInput/MrlEditableTextInput.js +20 -3
- package/dist/cjs/components/form/text-input/MrlEditableTextInput/MrlEditableTextInput.js.map +1 -1
- package/dist/cjs/components/form/text-input/MrlTextInput/MrlTextInput.js +20 -3
- package/dist/cjs/components/form/text-input/MrlTextInput/MrlTextInput.js.map +1 -1
- package/dist/cjs/components/form/textarea/MrlEditableTextarea/MrlEditableTextarea.js +20 -3
- package/dist/cjs/components/form/textarea/MrlEditableTextarea/MrlEditableTextarea.js.map +1 -1
- package/dist/cjs/components/form/textarea/MrlTextarea/MrlTextarea.js +38 -1
- package/dist/cjs/components/form/textarea/MrlTextarea/MrlTextarea.js.map +1 -1
- package/dist/cjs/components/layout/MrlSidebar/MrlSidebar.js +12 -2
- package/dist/cjs/components/layout/MrlSidebar/MrlSidebar.js.map +1 -1
- package/dist/cjs/components/link/MrlLink/MrlLink.js +21 -2
- package/dist/cjs/components/link/MrlLink/MrlLink.js.map +1 -1
- package/dist/cjs/components/link/MrlLinkButton/MrlLinkButton.js +12 -1
- package/dist/cjs/components/link/MrlLinkButton/MrlLinkButton.js.map +1 -1
- package/dist/cjs/components/menu/MrlMenu/MrlMenu.js +20 -1
- package/dist/cjs/components/menu/MrlMenu/MrlMenu.js.map +1 -1
- package/dist/cjs/components/menu/MrlMenuItem/MrlMenuItem.js +18 -1
- package/dist/cjs/components/menu/MrlMenuItem/MrlMenuItem.js.map +1 -1
- package/dist/cjs/components/menu/MrlMenuItemLink/MrlMenuItemLink.js +10 -1
- package/dist/cjs/components/menu/MrlMenuItemLink/MrlMenuItemLink.js.map +1 -1
- package/dist/cjs/components/modal/MrlModal/MrlModal.js +22 -1
- package/dist/cjs/components/modal/MrlModal/MrlModal.js.map +1 -1
- package/dist/cjs/components/notification/MrlBlockNotification/MrlBlockNotification.js +27 -1
- package/dist/cjs/components/notification/MrlBlockNotification/MrlBlockNotification.js.map +1 -1
- package/dist/cjs/components/notification/MrlToast/MrlToast.js +28 -3
- package/dist/cjs/components/notification/MrlToast/MrlToast.js.map +1 -1
- package/dist/cjs/components/pagination/MrlPaginationButton/MrlPaginationButton.js +18 -2
- package/dist/cjs/components/pagination/MrlPaginationButton/MrlPaginationButton.js.map +1 -1
- package/dist/cjs/components/panel/MrlPanel/MrlPanel.js +24 -4
- package/dist/cjs/components/panel/MrlPanel/MrlPanel.js.map +1 -1
- package/dist/cjs/components/popover/MrlPopover/MrlPopover.js +18 -1
- package/dist/cjs/components/popover/MrlPopover/MrlPopover.js.map +1 -1
- package/dist/cjs/components/table/MrlSmartTable/MrlSmartTable.js +31 -2
- package/dist/cjs/components/table/MrlSmartTable/MrlSmartTable.js.map +1 -1
- package/dist/cjs/components/table/MrlTableRow/MrlTableRow.js +13 -3
- package/dist/cjs/components/table/MrlTableRow/MrlTableRow.js.map +1 -1
- package/dist/cjs/components/tabs/MrlTab/MrlTab.js +10 -1
- package/dist/cjs/components/tabs/MrlTab/MrlTab.js.map +1 -1
- package/dist/cjs/components/tabs/MrlTabLink/MrlTabLink.js +10 -1
- package/dist/cjs/components/tabs/MrlTabLink/MrlTabLink.js.map +1 -1
- package/dist/cjs/components/toolbar/MrlToolbarButton/MrlToolbarButton.js +19 -3
- package/dist/cjs/components/toolbar/MrlToolbarButton/MrlToolbarButton.js.map +1 -1
- package/dist/cjs/components/tooltip/MrlTooltip/MrlTooltip.js +23 -1
- package/dist/cjs/components/tooltip/MrlTooltip/MrlTooltip.js.map +1 -1
- package/dist/cjs/hooks/useMrlAnalytics/useMrlAnalytics.js +7 -7
- package/dist/cjs/hooks/useMrlAnalytics/useMrlAnalytics.js.map +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/version.js.map +1 -1
- package/dist/components/avatar/MrlAvatarButton/MrlAvatarButton.d.ts +6 -1
- package/dist/components/breadcrumb/MrlBreadcrumbItem/MrlBreadcrumbItem.d.ts +5 -0
- package/dist/components/button/MrlButton/MrlButton.d.ts +1 -1
- package/dist/components/button/MrlIconButton/MrlIconButton.d.ts +5 -0
- package/dist/components/callout/MrlCallout/MrlCallout.d.ts +7 -0
- package/dist/components/filter/MrlFilter/MrlFilter.d.ts +7 -0
- package/dist/components/filter/MrlFilterItem/MrlFilterItem.d.ts +7 -0
- package/dist/components/form/checkbox/MrlCheckbox/MrlCheckbox.d.ts +6 -1
- package/dist/components/form/checkbox/MrlCheckboxStandalone/MrlCheckboxStandalone.d.ts +6 -1
- package/dist/components/form/date-picker/MrlDatePicker.d.ts +7 -0
- package/dist/components/form/legacy-select/MrlLegacySelect/MrlLegacySelect.d.ts +6 -1
- package/dist/components/form/legacy-select/MrlLegacySelectItem/MrlLegacySelectItem.d.ts +8 -1
- package/dist/components/form/radio/MrlRadioButton/MrlRadioButton.d.ts +6 -1
- package/dist/components/form/radio/MrlRadioButtonStandalone/MrlRadioButtonStandalone.d.ts +6 -1
- package/dist/components/form/select/MrlCreatableSelect/MrlCreatableSelect.d.ts +7 -0
- package/dist/components/form/select/MrlMultiCreatableSelect/MrlMultiCreatableSelect.d.ts +7 -0
- package/dist/components/form/select/MrlMultiSelect/MrlMultiSelect.d.ts +7 -0
- package/dist/components/form/select/MrlSelect/MrlSelect.d.ts +7 -0
- package/dist/components/form/switch/MrlSwitch/MrlSwitch.d.ts +6 -1
- package/dist/components/form/switch/MrlSwitchStandalone/MrlSwitchStandalone.d.ts +6 -1
- package/dist/components/form/text-input/MrlEditableTextInput/MrlEditableTextInput.d.ts +8 -0
- package/dist/components/form/text-input/MrlTextInput/MrlTextInput.d.ts +8 -0
- package/dist/components/form/textarea/MrlEditableTextarea/MrlEditableTextarea.d.ts +8 -0
- package/dist/components/form/textarea/MrlTextarea/MrlTextarea.d.ts +9 -1
- package/dist/components/layout/MrlSidebar/MrlSidebar.d.ts +8 -1
- package/dist/components/link/MrlLink/MrlLink.d.ts +6 -1
- package/dist/components/link/MrlLinkButton/MrlLinkButton.d.ts +5 -0
- package/dist/components/menu/MrlMenu/MrlMenu.d.ts +6 -1
- package/dist/components/menu/MrlMenuItem/MrlMenuItem.d.ts +6 -1
- package/dist/components/menu/MrlMenuItemLink/MrlMenuItemLink.d.ts +6 -1
- package/dist/components/modal/MrlModal/MrlModal.d.ts +5 -0
- package/dist/components/notification/MrlBlockNotification/MrlBlockNotification.d.ts +7 -0
- package/dist/components/notification/MrlToast/MrlToast.d.ts +8 -1
- package/dist/components/pagination/MrlPaginationButton/MrlPaginationButton.d.ts +6 -1
- package/dist/components/panel/MrlPanel/MrlPanel.d.ts +8 -0
- package/dist/components/popover/MrlPopover/MrlPopover.d.ts +6 -1
- package/dist/components/table/MrlSmartTable/MrlSmartTable.d.ts +7 -0
- package/dist/components/table/MrlTableRow/MrlTableRow.d.ts +7 -0
- package/dist/components/tabs/MrlTab/MrlTab.d.ts +6 -1
- package/dist/components/tabs/MrlTabLink/MrlTabLink.d.ts +6 -1
- package/dist/components/toolbar/MrlToolbarButton/MrlToolbarButton.d.ts +5 -0
- package/dist/components/tooltip/MrlTooltip/MrlTooltip.d.ts +8 -0
- package/dist/contexts/MrlAnalyticsContext/types.d.ts +1 -1
- package/dist/esm/components/avatar/MrlAvatarButton/MrlAvatarButton.js +8 -1
- package/dist/esm/components/avatar/MrlAvatarButton/MrlAvatarButton.js.map +1 -1
- package/dist/esm/components/breadcrumb/MrlBreadcrumbItem/MrlBreadcrumbItem.js +14 -4
- package/dist/esm/components/breadcrumb/MrlBreadcrumbItem/MrlBreadcrumbItem.js.map +1 -1
- package/dist/esm/components/button/MrlAnimatedIconButton/MrlAnimatedIconButton.js +8 -1
- package/dist/esm/components/button/MrlAnimatedIconButton/MrlAnimatedIconButton.js.map +1 -1
- package/dist/esm/components/button/MrlButton/MrlButton.js +3 -3
- package/dist/esm/components/button/MrlButton/MrlButton.js.map +1 -1
- package/dist/esm/components/button/MrlIconButton/MrlIconButton.js +8 -1
- package/dist/esm/components/button/MrlIconButton/MrlIconButton.js.map +1 -1
- package/dist/esm/components/button/MrlProcessingButton/MrlProcessingButton.js +21 -2
- package/dist/esm/components/button/MrlProcessingButton/MrlProcessingButton.js.map +1 -1
- package/dist/esm/components/callout/MrlCallout/MrlCallout.js +36 -3
- package/dist/esm/components/callout/MrlCallout/MrlCallout.js.map +1 -1
- package/dist/esm/components/filter/MrlFilter/MrlFilter.js +18 -2
- package/dist/esm/components/filter/MrlFilter/MrlFilter.js.map +1 -1
- package/dist/esm/components/filter/MrlFilterItem/MrlFilterItem.js +11 -1
- package/dist/esm/components/filter/MrlFilterItem/MrlFilterItem.js.map +1 -1
- package/dist/esm/components/form/checkbox/MrlCheckbox/MrlCheckbox.js +17 -1
- package/dist/esm/components/form/checkbox/MrlCheckbox/MrlCheckbox.js.map +1 -1
- package/dist/esm/components/form/checkbox/MrlCheckboxStandalone/MrlCheckboxStandalone.js +24 -1
- package/dist/esm/components/form/checkbox/MrlCheckboxStandalone/MrlCheckboxStandalone.js.map +1 -1
- package/dist/esm/components/form/date-picker/MrlDatePicker.js +17 -2
- package/dist/esm/components/form/date-picker/MrlDatePicker.js.map +1 -1
- package/dist/esm/components/form/legacy-select/MrlLegacySelect/MrlLegacySelect.js +11 -2
- package/dist/esm/components/form/legacy-select/MrlLegacySelect/MrlLegacySelect.js.map +1 -1
- package/dist/esm/components/form/legacy-select/MrlLegacySelectItem/MrlLegacySelectItem.js +8 -1
- package/dist/esm/components/form/legacy-select/MrlLegacySelectItem/MrlLegacySelectItem.js.map +1 -1
- package/dist/esm/components/form/radio/MrlRadioButton/MrlRadioButton.js +19 -1
- package/dist/esm/components/form/radio/MrlRadioButton/MrlRadioButton.js.map +1 -1
- package/dist/esm/components/form/radio/MrlRadioButtonStandalone/MrlRadioButtonStandalone.js +19 -1
- package/dist/esm/components/form/radio/MrlRadioButtonStandalone/MrlRadioButtonStandalone.js.map +1 -1
- package/dist/esm/components/form/select/MrlCreatableSelect/MrlCreatableSelect.js +42 -2
- package/dist/esm/components/form/select/MrlCreatableSelect/MrlCreatableSelect.js.map +1 -1
- package/dist/esm/components/form/select/MrlMultiCreatableSelect/MrlMultiCreatableSelect.js +42 -2
- package/dist/esm/components/form/select/MrlMultiCreatableSelect/MrlMultiCreatableSelect.js.map +1 -1
- package/dist/esm/components/form/select/MrlMultiSelect/MrlMultiSelect.js +34 -2
- package/dist/esm/components/form/select/MrlMultiSelect/MrlMultiSelect.js.map +1 -1
- package/dist/esm/components/form/select/MrlSelect/MrlSelect.js +34 -2
- package/dist/esm/components/form/select/MrlSelect/MrlSelect.js.map +1 -1
- package/dist/esm/components/form/switch/MrlSwitch/MrlSwitch.js +14 -2
- package/dist/esm/components/form/switch/MrlSwitch/MrlSwitch.js.map +1 -1
- package/dist/esm/components/form/switch/MrlSwitchStandalone/MrlSwitchStandalone.js +10 -1
- package/dist/esm/components/form/switch/MrlSwitchStandalone/MrlSwitchStandalone.js.map +1 -1
- package/dist/esm/components/form/text-input/MrlEditableTextInput/MrlEditableTextInput.js +20 -3
- package/dist/esm/components/form/text-input/MrlEditableTextInput/MrlEditableTextInput.js.map +1 -1
- package/dist/esm/components/form/text-input/MrlTextInput/MrlTextInput.js +20 -3
- package/dist/esm/components/form/text-input/MrlTextInput/MrlTextInput.js.map +1 -1
- package/dist/esm/components/form/textarea/MrlEditableTextarea/MrlEditableTextarea.js +20 -3
- package/dist/esm/components/form/textarea/MrlEditableTextarea/MrlEditableTextarea.js.map +1 -1
- package/dist/esm/components/form/textarea/MrlTextarea/MrlTextarea.js +38 -1
- package/dist/esm/components/form/textarea/MrlTextarea/MrlTextarea.js.map +1 -1
- package/dist/esm/components/layout/MrlSidebar/MrlSidebar.js +12 -2
- package/dist/esm/components/layout/MrlSidebar/MrlSidebar.js.map +1 -1
- package/dist/esm/components/link/MrlLink/MrlLink.js +21 -2
- package/dist/esm/components/link/MrlLink/MrlLink.js.map +1 -1
- package/dist/esm/components/link/MrlLinkButton/MrlLinkButton.js +12 -1
- package/dist/esm/components/link/MrlLinkButton/MrlLinkButton.js.map +1 -1
- package/dist/esm/components/menu/MrlMenu/MrlMenu.js +20 -1
- package/dist/esm/components/menu/MrlMenu/MrlMenu.js.map +1 -1
- package/dist/esm/components/menu/MrlMenuItem/MrlMenuItem.js +18 -1
- package/dist/esm/components/menu/MrlMenuItem/MrlMenuItem.js.map +1 -1
- package/dist/esm/components/menu/MrlMenuItemLink/MrlMenuItemLink.js +10 -1
- package/dist/esm/components/menu/MrlMenuItemLink/MrlMenuItemLink.js.map +1 -1
- package/dist/esm/components/modal/MrlModal/MrlModal.js +22 -1
- package/dist/esm/components/modal/MrlModal/MrlModal.js.map +1 -1
- package/dist/esm/components/notification/MrlBlockNotification/MrlBlockNotification.js +27 -1
- package/dist/esm/components/notification/MrlBlockNotification/MrlBlockNotification.js.map +1 -1
- package/dist/esm/components/notification/MrlToast/MrlToast.js +28 -3
- package/dist/esm/components/notification/MrlToast/MrlToast.js.map +1 -1
- package/dist/esm/components/pagination/MrlPaginationButton/MrlPaginationButton.js +18 -2
- package/dist/esm/components/pagination/MrlPaginationButton/MrlPaginationButton.js.map +1 -1
- package/dist/esm/components/panel/MrlPanel/MrlPanel.js +24 -4
- package/dist/esm/components/panel/MrlPanel/MrlPanel.js.map +1 -1
- package/dist/esm/components/popover/MrlPopover/MrlPopover.js +18 -1
- package/dist/esm/components/popover/MrlPopover/MrlPopover.js.map +1 -1
- package/dist/esm/components/table/MrlSmartTable/MrlSmartTable.js +31 -2
- package/dist/esm/components/table/MrlSmartTable/MrlSmartTable.js.map +1 -1
- package/dist/esm/components/table/MrlTableRow/MrlTableRow.js +13 -3
- package/dist/esm/components/table/MrlTableRow/MrlTableRow.js.map +1 -1
- package/dist/esm/components/tabs/MrlTab/MrlTab.js +10 -1
- package/dist/esm/components/tabs/MrlTab/MrlTab.js.map +1 -1
- package/dist/esm/components/tabs/MrlTabLink/MrlTabLink.js +10 -1
- package/dist/esm/components/tabs/MrlTabLink/MrlTabLink.js.map +1 -1
- package/dist/esm/components/toolbar/MrlToolbarButton/MrlToolbarButton.js +19 -3
- package/dist/esm/components/toolbar/MrlToolbarButton/MrlToolbarButton.js.map +1 -1
- package/dist/esm/components/tooltip/MrlTooltip/MrlTooltip.js +23 -1
- package/dist/esm/components/tooltip/MrlTooltip/MrlTooltip.js.map +1 -1
- package/dist/esm/hooks/useMrlAnalytics/useMrlAnalytics.js +7 -7
- package/dist/esm/hooks/useMrlAnalytics/useMrlAnalytics.js.map +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/esm/version.js.map +1 -1
- package/dist/hooks/useMrlAnalytics/useMrlAnalytics.d.ts +4 -4
- package/dist/types/components/avatar/MrlAvatarButton/MrlAvatarButton.d.ts +6 -1
- package/dist/types/components/breadcrumb/MrlBreadcrumbItem/MrlBreadcrumbItem.d.ts +5 -0
- package/dist/types/components/button/MrlButton/MrlButton.d.ts +1 -1
- package/dist/types/components/button/MrlIconButton/MrlIconButton.d.ts +5 -0
- package/dist/types/components/callout/MrlCallout/MrlCallout.d.ts +7 -0
- package/dist/types/components/filter/MrlFilter/MrlFilter.d.ts +7 -0
- package/dist/types/components/filter/MrlFilterItem/MrlFilterItem.d.ts +7 -0
- package/dist/types/components/form/checkbox/MrlCheckbox/MrlCheckbox.d.ts +6 -1
- package/dist/types/components/form/checkbox/MrlCheckboxStandalone/MrlCheckboxStandalone.d.ts +6 -1
- package/dist/types/components/form/date-picker/MrlDatePicker.d.ts +7 -0
- package/dist/types/components/form/legacy-select/MrlLegacySelect/MrlLegacySelect.d.ts +6 -1
- package/dist/types/components/form/legacy-select/MrlLegacySelectItem/MrlLegacySelectItem.d.ts +8 -1
- package/dist/types/components/form/radio/MrlRadioButton/MrlRadioButton.d.ts +6 -1
- package/dist/types/components/form/radio/MrlRadioButtonStandalone/MrlRadioButtonStandalone.d.ts +6 -1
- package/dist/types/components/form/select/MrlCreatableSelect/MrlCreatableSelect.d.ts +7 -0
- package/dist/types/components/form/select/MrlMultiCreatableSelect/MrlMultiCreatableSelect.d.ts +7 -0
- package/dist/types/components/form/select/MrlMultiSelect/MrlMultiSelect.d.ts +7 -0
- package/dist/types/components/form/select/MrlSelect/MrlSelect.d.ts +7 -0
- package/dist/types/components/form/switch/MrlSwitch/MrlSwitch.d.ts +6 -1
- package/dist/types/components/form/switch/MrlSwitchStandalone/MrlSwitchStandalone.d.ts +6 -1
- package/dist/types/components/form/text-input/MrlEditableTextInput/MrlEditableTextInput.d.ts +8 -0
- package/dist/types/components/form/text-input/MrlTextInput/MrlTextInput.d.ts +8 -0
- package/dist/types/components/form/textarea/MrlEditableTextarea/MrlEditableTextarea.d.ts +8 -0
- package/dist/types/components/form/textarea/MrlTextarea/MrlTextarea.d.ts +9 -1
- package/dist/types/components/layout/MrlSidebar/MrlSidebar.d.ts +8 -1
- package/dist/types/components/link/MrlLink/MrlLink.d.ts +6 -1
- package/dist/types/components/link/MrlLinkButton/MrlLinkButton.d.ts +5 -0
- package/dist/types/components/menu/MrlMenu/MrlMenu.d.ts +6 -1
- package/dist/types/components/menu/MrlMenuItem/MrlMenuItem.d.ts +6 -1
- package/dist/types/components/menu/MrlMenuItemLink/MrlMenuItemLink.d.ts +6 -1
- package/dist/types/components/modal/MrlModal/MrlModal.d.ts +5 -0
- package/dist/types/components/notification/MrlBlockNotification/MrlBlockNotification.d.ts +7 -0
- package/dist/types/components/notification/MrlToast/MrlToast.d.ts +8 -1
- package/dist/types/components/pagination/MrlPaginationButton/MrlPaginationButton.d.ts +6 -1
- package/dist/types/components/panel/MrlPanel/MrlPanel.d.ts +8 -0
- package/dist/types/components/popover/MrlPopover/MrlPopover.d.ts +6 -1
- package/dist/types/components/table/MrlSmartTable/MrlSmartTable.d.ts +7 -0
- package/dist/types/components/table/MrlTableRow/MrlTableRow.d.ts +7 -0
- package/dist/types/components/tabs/MrlTab/MrlTab.d.ts +6 -1
- package/dist/types/components/tabs/MrlTabLink/MrlTabLink.d.ts +6 -1
- package/dist/types/components/toolbar/MrlToolbarButton/MrlToolbarButton.d.ts +5 -0
- package/dist/types/components/tooltip/MrlTooltip/MrlTooltip.d.ts +8 -0
- package/dist/types/contexts/MrlAnalyticsContext/types.d.ts +1 -1
- package/dist/types/hooks/useMrlAnalytics/useMrlAnalytics.d.ts +4 -4
- package/package.json +1 -1
|
@@ -32,6 +32,14 @@ interface MrlTextInputProps extends Omit<MrlComponentProps, 'style'>, React.Comp
|
|
|
32
32
|
dynamicIcon?: RightActionConfig;
|
|
33
33
|
/** Preset for setting up a clearable input via a right icon */
|
|
34
34
|
isClearable?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Enables interaction tracking for this input. Provide a stable, non-PII id
|
|
37
|
+
* (e.g. 'mural-search'). When omitted, the input emits no analytics.
|
|
38
|
+
*
|
|
39
|
+
* Note: the input's value is never emitted, and `change` is emitted once per
|
|
40
|
+
* editing session (on blur, when the value actually changed) rather than per keystroke.
|
|
41
|
+
*/
|
|
42
|
+
eventId?: string;
|
|
35
43
|
}
|
|
36
44
|
/**
|
|
37
45
|
* Allows the user to input plain text
|
|
@@ -34,6 +34,14 @@ interface MrlEditableTextareaProps extends React.TextareaHTMLAttributes<HTMLText
|
|
|
34
34
|
setIsEditable?: (isEditableUpdate: boolean) => void;
|
|
35
35
|
/** Autoexpand will automatically adjust the height of the textarea based on the amount of text within it */
|
|
36
36
|
autoExpand?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Enables interaction tracking for this textarea. Provide a stable, non-PII id
|
|
39
|
+
* (e.g. 'mural-description'). When omitted, the textarea emits no analytics.
|
|
40
|
+
*
|
|
41
|
+
* Note: the textarea's value is never emitted, and `change` is emitted once per
|
|
42
|
+
* editing session (on blur, when the value actually changed) rather than per keystroke.
|
|
43
|
+
*/
|
|
44
|
+
eventId?: string;
|
|
37
45
|
}
|
|
38
46
|
/**
|
|
39
47
|
* Allows the user to input plain text in a multi-line format
|
|
@@ -27,11 +27,19 @@ interface MrlTextareaProps {
|
|
|
27
27
|
className?: string;
|
|
28
28
|
/** Autoexpand will automatically adjust the height of the textarea based on the amount of text within it */
|
|
29
29
|
autoExpand?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Enables interaction tracking for this textarea. Provide a stable, non-PII id
|
|
32
|
+
* (e.g. 'template-description'). When omitted, the textarea emits no analytics.
|
|
33
|
+
*
|
|
34
|
+
* Note: the textarea's value is never emitted, and `change` is emitted once per
|
|
35
|
+
* editing session (on blur, when the value actually changed) rather than per keystroke.
|
|
36
|
+
*/
|
|
37
|
+
eventId?: string;
|
|
30
38
|
}
|
|
31
39
|
/**
|
|
32
40
|
* Allows the user to input plain text in a multi-line format
|
|
33
41
|
* @param {MrlTextareaProps} props - the component props
|
|
34
42
|
* @returns a textarea element
|
|
35
43
|
*/
|
|
36
|
-
export declare function MrlTextarea({ attrs, className, inputId, state, maxLength, placeholder, value, autoExpand, ...rest }: MrlTextareaProps): JSX.Element;
|
|
44
|
+
export declare function MrlTextarea({ attrs, className, inputId, state, maxLength, placeholder, eventId, value, autoExpand, ...rest }: MrlTextareaProps): JSX.Element;
|
|
37
45
|
export {};
|
|
@@ -7,6 +7,13 @@ interface MrlSidebarHook {
|
|
|
7
7
|
hookClose?: (info: MrlSidebarHookInfo) => void;
|
|
8
8
|
hookOpen?: (info: MrlSidebarHookInfo) => void;
|
|
9
9
|
}
|
|
10
|
+
interface MrlSidebarAnalytics {
|
|
11
|
+
/**
|
|
12
|
+
* Enables interaction tracking for this sidebar. Provide a stable, non-PII id
|
|
13
|
+
* (e.g. 'dashboard-sidebar'). When omitted, the sidebar emits no analytics.
|
|
14
|
+
*/
|
|
15
|
+
eventId?: string;
|
|
16
|
+
}
|
|
10
17
|
export interface MrlSidebarHandle {
|
|
11
18
|
close: () => void;
|
|
12
19
|
open: () => void;
|
|
@@ -17,5 +24,5 @@ export interface MrlSidebarHandle {
|
|
|
17
24
|
* @param props - component props
|
|
18
25
|
* @returns a MrlSidebar React component.
|
|
19
26
|
*/
|
|
20
|
-
export declare const MrlSidebar: React.ForwardRefExoticComponent<LayoutComponent & LayoutSection & MrlSidebarHook & React.RefAttributes<MrlSidebarHandle>>;
|
|
27
|
+
export declare const MrlSidebar: React.ForwardRefExoticComponent<LayoutComponent & LayoutSection & MrlSidebarHook & MrlSidebarAnalytics & React.RefAttributes<MrlSidebarHandle>>;
|
|
21
28
|
export {};
|
|
@@ -39,6 +39,11 @@ export interface MrlLinkProptypes extends React.ComponentProps<'a'> {
|
|
|
39
39
|
* Custom on click listener
|
|
40
40
|
*/
|
|
41
41
|
onClick?: (e: React.MouseEvent<HTMLElement>) => void | undefined;
|
|
42
|
+
/**
|
|
43
|
+
* Enables interaction tracking for this link. Provide a stable, non-PII id
|
|
44
|
+
* (e.g. 'help-center-link'). When omitted, the link emits no analytics.
|
|
45
|
+
*/
|
|
46
|
+
eventId?: string;
|
|
42
47
|
}
|
|
43
48
|
/**
|
|
44
49
|
* Renders a link component
|
|
@@ -46,4 +51,4 @@ export interface MrlLinkProptypes extends React.ComponentProps<'a'> {
|
|
|
46
51
|
* @param {MrlLinkProptypes} props the props for your MrlLink
|
|
47
52
|
* @returns {React.ReactElement} an a element containing the text you pass
|
|
48
53
|
*/
|
|
49
|
-
export declare const MrlLink: ({ target, className, color, kind, size, href, attrs, onClick, text, ...remainingProps }: MrlLinkProptypes) => React.ReactElement;
|
|
54
|
+
export declare const MrlLink: ({ target, className, color, kind, size, href, attrs, onClick, text, eventId, ...remainingProps }: MrlLinkProptypes) => React.ReactElement;
|
|
@@ -46,6 +46,11 @@ export interface MrlLinkButtonProps extends Omit<MrlComponentProps, 'style'>, Re
|
|
|
46
46
|
* Tooltip configuration for the button
|
|
47
47
|
*/
|
|
48
48
|
tooltip?: TooltipConfig;
|
|
49
|
+
/**
|
|
50
|
+
* Enables interaction tracking for this link button. Provide a stable, non-PII id
|
|
51
|
+
* (e.g. 'upgrade-plan-cta'). When omitted, the link button emits no analytics.
|
|
52
|
+
*/
|
|
53
|
+
eventId?: string;
|
|
49
54
|
}
|
|
50
55
|
/**
|
|
51
56
|
* Warning: use this component with care. Our links generally do not look like buttons.
|
|
@@ -105,6 +105,11 @@ export interface MrlMenuProps {
|
|
|
105
105
|
* @param type - type of close event
|
|
106
106
|
*/
|
|
107
107
|
onClose?: (type?: string) => void;
|
|
108
|
+
/**
|
|
109
|
+
* Enables interaction tracking for this menu. Provide a stable, non-PII id
|
|
110
|
+
* (e.g. 'mural-context-menu'). When omitted, the menu emits no analytics.
|
|
111
|
+
*/
|
|
112
|
+
eventId?: string;
|
|
108
113
|
}
|
|
109
114
|
/**
|
|
110
115
|
* MrlMenu component
|
|
@@ -113,7 +118,7 @@ export interface MrlMenuProps {
|
|
|
113
118
|
* @param {MrlMenuProps} props - The props for the MrlMenu component
|
|
114
119
|
* @returns {Element} - rendered MrlMenu component
|
|
115
120
|
*/
|
|
116
|
-
export declare function MrlMenu({ actionState, alignment, children, closeOnScroll, closeParent, customPosition, clickOutsideEvent, disableArrowOpen, disableFlipping, id, isInternal, isSubMenu, spacing, menuOffset, portalProps, position, triggerStopPropagation, onClose, triggerRef, ...remainingProps }: MrlMenuProps): JSX.Element;
|
|
121
|
+
export declare function MrlMenu({ actionState, alignment, children, closeOnScroll, closeParent, customPosition, clickOutsideEvent, disableArrowOpen, disableFlipping, id, isInternal, isSubMenu, spacing, menuOffset, portalProps, position, triggerStopPropagation, onClose, eventId, triggerRef, ...remainingProps }: MrlMenuProps): JSX.Element;
|
|
117
122
|
export declare namespace MrlMenu {
|
|
118
123
|
var componentType: string;
|
|
119
124
|
}
|
|
@@ -39,6 +39,11 @@ export interface MrlMenuItemProps {
|
|
|
39
39
|
role?: MenuItemRole;
|
|
40
40
|
/** If the menu item is selected */
|
|
41
41
|
selected?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Enables interaction tracking for this menu item. Provide a stable, non-PII id
|
|
44
|
+
* (e.g. 'mural-menu-duplicate'). When omitted, the menu item emits no analytics.
|
|
45
|
+
*/
|
|
46
|
+
eventId?: string;
|
|
42
47
|
}
|
|
43
48
|
/**
|
|
44
49
|
* MrlMenuItem component
|
|
@@ -47,4 +52,4 @@ export interface MrlMenuItemProps {
|
|
|
47
52
|
* @param {MrlMenuItemProps} props - The props for the MrlMenuItem component
|
|
48
53
|
* @returns {Element} - rendered MrlMenuItem component
|
|
49
54
|
*/
|
|
50
|
-
export declare function MrlMenuItem({ ariaDescribedBy, ariaHasPopup, children, className, dataQa, disabled, icon, id, onClick, onMouseOut, onMouseOver, role, selected, ...rest }: MrlMenuItemProps): JSX.Element;
|
|
55
|
+
export declare function MrlMenuItem({ ariaDescribedBy, ariaHasPopup, children, className, dataQa, disabled, icon, id, onClick, onMouseOut, onMouseOver, role, selected, eventId, ...rest }: MrlMenuItemProps): JSX.Element;
|
|
@@ -27,6 +27,11 @@ export interface MrlMenuItemLinkProps {
|
|
|
27
27
|
selected?: boolean;
|
|
28
28
|
/** Rel attr for the menu item */
|
|
29
29
|
rel?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Enables interaction tracking for this menu item. Provide a stable, non-PII id
|
|
32
|
+
* (e.g. 'help-menu-docs'). When omitted, the menu item emits no analytics.
|
|
33
|
+
*/
|
|
34
|
+
eventId?: string;
|
|
30
35
|
}
|
|
31
36
|
/**
|
|
32
37
|
* MrlMenuItem component
|
|
@@ -35,4 +40,4 @@ export interface MrlMenuItemLinkProps {
|
|
|
35
40
|
* @param {MrlMenuItemLinkProps} props - The props for the MrlMenuItem component
|
|
36
41
|
* @returns {Element} - rendered MrlMenuItem component
|
|
37
42
|
*/
|
|
38
|
-
export declare function MrlMenuItemLink({ ariaDescribedBy, children, className, dataQa, disabled, href, icon, id, onClick, selected, target, ...rest }: MrlMenuItemLinkProps): JSX.Element;
|
|
43
|
+
export declare function MrlMenuItemLink({ ariaDescribedBy, children, className, dataQa, disabled, href, icon, id, onClick, selected, target, eventId, ...rest }: MrlMenuItemLinkProps): JSX.Element;
|
|
@@ -39,6 +39,11 @@ interface ModalProps extends MrlComponentProps {
|
|
|
39
39
|
state?: ModalState;
|
|
40
40
|
/** Additional function to be run when the modal closes */
|
|
41
41
|
hookClose?: (() => void) | undefined;
|
|
42
|
+
/**
|
|
43
|
+
* Enables interaction tracking for this modal. Provide a stable, non-PII id
|
|
44
|
+
* (e.g. 'share-mural-modal'). When omitted, the modal emits no analytics.
|
|
45
|
+
*/
|
|
46
|
+
eventId?: string;
|
|
42
47
|
}
|
|
43
48
|
/**
|
|
44
49
|
* Modal Component.
|
|
@@ -88,6 +88,13 @@ export interface MrlBlockNotificationProps {
|
|
|
88
88
|
* Callback to be called when component closes (see useAutoClose)
|
|
89
89
|
*/
|
|
90
90
|
onAutoClose?: Parameters<useAutoClose>[2];
|
|
91
|
+
/**
|
|
92
|
+
* Enables interaction tracking for this notification. Provide a stable, non-PII id
|
|
93
|
+
* (e.g. 'trial-expiry-notification'). When omitted, the notification emits no analytics.
|
|
94
|
+
*
|
|
95
|
+
* Note: heading and message text are never emitted.
|
|
96
|
+
*/
|
|
97
|
+
eventId?: string;
|
|
91
98
|
}
|
|
92
99
|
/**
|
|
93
100
|
* Block Notification Component
|
|
@@ -57,10 +57,17 @@ export interface MrlToastProps {
|
|
|
57
57
|
/** Determines whether the close icon button should be shown. */
|
|
58
58
|
showCloseButton?: boolean;
|
|
59
59
|
showIcon?: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Enables interaction tracking for this toast. Provide a stable, non-PII id
|
|
62
|
+
* (e.g. 'export-complete-toast'). When omitted, the toast emits no analytics.
|
|
63
|
+
*
|
|
64
|
+
* Note: message text is never emitted.
|
|
65
|
+
*/
|
|
66
|
+
eventId?: string;
|
|
60
67
|
}
|
|
61
68
|
/**
|
|
62
69
|
* MrlToast component.
|
|
63
70
|
* @param {MrlToastProps} props - The props for the MrlToast component.
|
|
64
71
|
* @returns {React.ReactElement} The MrlToast component.
|
|
65
72
|
*/
|
|
66
|
-
export declare const MrlToast: ({ ["data-qa"]: qa, autoClose, avatar, backgroundColor, className, closeAfterMs, kind, link, onClose, primaryCTA, primaryMessage, secondaryCTA, secondaryMessage, showCloseButton, showIcon, ...rest }: MrlToastProps) => React.ReactElement;
|
|
73
|
+
export declare const MrlToast: ({ ["data-qa"]: qa, autoClose, avatar, backgroundColor, className, closeAfterMs, kind, link, onClose, primaryCTA, primaryMessage, secondaryCTA, secondaryMessage, showCloseButton, showIcon, eventId, ...rest }: MrlToastProps) => React.ReactElement;
|
|
@@ -15,6 +15,11 @@ interface MrlPaginationButtonProps {
|
|
|
15
15
|
handleClick?: (e: React.SyntheticEvent<HTMLButtonElement>) => void;
|
|
16
16
|
/** Pagination heading */
|
|
17
17
|
text?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Enables interaction tracking for this button. Provide a stable, non-PII id
|
|
20
|
+
* (e.g. 'templates-pagination'). When omitted, the button emits no analytics.
|
|
21
|
+
*/
|
|
22
|
+
eventId?: string;
|
|
18
23
|
/** The anchor of the tooltips on the buttons */
|
|
19
24
|
tooltipAnchor?: MrlTooltipAnchor;
|
|
20
25
|
/** The placement of the tooltips on the buttons */
|
|
@@ -25,5 +30,5 @@ interface MrlPaginationButtonProps {
|
|
|
25
30
|
* @param {MrlPaginationButtonProps} props - the component props
|
|
26
31
|
* @returns a pagintaion button
|
|
27
32
|
*/
|
|
28
|
-
export declare function MrlPaginationButton({ buttonClass, className, disabled, kind, handleClick, text, tooltipAnchor, tooltipPosition, ...rest }: MrlPaginationButtonProps): JSX.Element;
|
|
33
|
+
export declare function MrlPaginationButton({ buttonClass, className, disabled, kind, handleClick, text, tooltipAnchor, tooltipPosition, eventId, ...rest }: MrlPaginationButtonProps): JSX.Element;
|
|
29
34
|
export {};
|
|
@@ -42,6 +42,14 @@ interface MrlPanelProps extends React.ComponentPropsWithRef<'div'> {
|
|
|
42
42
|
* hasDataScrollAnchor is required to enable infinite scroll
|
|
43
43
|
*/
|
|
44
44
|
hasDataScrollAnchor?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Enables interaction tracking for this panel. Provide a stable, non-PII id
|
|
47
|
+
* (e.g. 'comments-panel'). When omitted, the panel emits no analytics.
|
|
48
|
+
*
|
|
49
|
+
* `open` is emitted when the panel mounts, since consumers control the panel's
|
|
50
|
+
* presence by rendering it.
|
|
51
|
+
*/
|
|
52
|
+
eventId?: string;
|
|
45
53
|
}
|
|
46
54
|
/**
|
|
47
55
|
* MrlPanel component.
|
|
@@ -117,6 +117,11 @@ export interface MrlPopoverProps {
|
|
|
117
117
|
* data-qa attribute for the popover
|
|
118
118
|
*/
|
|
119
119
|
['data-qa']?: string;
|
|
120
|
+
/**
|
|
121
|
+
* Enables interaction tracking for this popover. Provide a stable, non-PII id
|
|
122
|
+
* (e.g. 'sticky-note-color-picker'). When omitted, the popover emits no analytics.
|
|
123
|
+
*/
|
|
124
|
+
eventId?: string;
|
|
120
125
|
}
|
|
121
126
|
/**
|
|
122
127
|
* MrlPopover
|
|
@@ -125,7 +130,7 @@ export interface MrlPopoverProps {
|
|
|
125
130
|
* @param {MrlPopoverProps} props - The props for the MrlPopover component
|
|
126
131
|
* @returns {Element} - rendered MrlPopover component
|
|
127
132
|
*/
|
|
128
|
-
export declare function MrlPopover({ alignment, ariaLabel, ariaLabelledBy, children, className, customPosition, disableClickToOpen, disableClickOutside, disableFlipping, disableFocusTrap, hasCloseButton, spacing, id, isSubMenu, actionState, position, point, portalProps, kind, offset, onClose, onOpen, triggerRef, ...rest }: MrlPopoverProps): JSX.Element;
|
|
133
|
+
export declare function MrlPopover({ alignment, ariaLabel, ariaLabelledBy, children, className, customPosition, disableClickToOpen, disableClickOutside, disableFlipping, disableFocusTrap, hasCloseButton, spacing, id, isSubMenu, actionState, position, point, portalProps, kind, offset, onClose, onOpen, eventId, triggerRef, ...rest }: MrlPopoverProps): JSX.Element;
|
|
129
134
|
export declare namespace MrlPopover {
|
|
130
135
|
var componentType: string;
|
|
131
136
|
}
|
|
@@ -214,6 +214,13 @@ export interface MrlSmartTableProps extends Partial<Pick<MrlTableProps, 'aria-la
|
|
|
214
214
|
* @default false
|
|
215
215
|
*/
|
|
216
216
|
enableVirtualization?: boolean;
|
|
217
|
+
/**
|
|
218
|
+
* Enables interaction tracking for this table. Provide a stable, non-PII id
|
|
219
|
+
* (e.g. 'workspace-members-table'). When omitted, the table emits no analytics.
|
|
220
|
+
*
|
|
221
|
+
* Note: row content is never emitted — selection events carry counts only.
|
|
222
|
+
*/
|
|
223
|
+
eventId?: string;
|
|
217
224
|
}
|
|
218
225
|
/**
|
|
219
226
|
* MrlSmartTable Component
|
|
@@ -16,6 +16,13 @@ export interface MrlTableRowProps extends React.ComponentPropsWithoutRef<'tr'> {
|
|
|
16
16
|
* Custom click handler to be used for mouse and keyboard selection of table row
|
|
17
17
|
*/
|
|
18
18
|
onClick?: (e: React.MouseEvent<HTMLElement> | React.KeyboardEvent) => void;
|
|
19
|
+
/**
|
|
20
|
+
* Enables interaction tracking for this row. Provide a stable, non-PII id
|
|
21
|
+
* (e.g. 'members-table-row'). When omitted, the row emits no analytics.
|
|
22
|
+
*
|
|
23
|
+
* Note: row content is never emitted.
|
|
24
|
+
*/
|
|
25
|
+
eventId?: string;
|
|
19
26
|
}
|
|
20
27
|
/**
|
|
21
28
|
* MrlTableRow Component
|
|
@@ -11,10 +11,15 @@ export interface MrlTabProps extends React.ComponentProps<'button'> {
|
|
|
11
11
|
/** An addition function to call when clicking on a tab */
|
|
12
12
|
hookClick?: () => void;
|
|
13
13
|
text: string;
|
|
14
|
+
/**
|
|
15
|
+
* Enables interaction tracking for this tab. Provide a stable, non-PII id
|
|
16
|
+
* (e.g. 'settings-tabs'). When omitted, the tab emits no analytics.
|
|
17
|
+
*/
|
|
18
|
+
eventId?: string;
|
|
14
19
|
}
|
|
15
20
|
/**
|
|
16
21
|
* Renders a tab component
|
|
17
22
|
* @param {MrlTabProps} props the props for your MrlTab
|
|
18
23
|
* @returns {React.ReactElement} an a element containing the text you pass
|
|
19
24
|
*/
|
|
20
|
-
export declare const MrlTab: ({ className, icon, id, hookClick, text, ...rest }: MrlTabProps) => React.ReactElement;
|
|
25
|
+
export declare const MrlTab: ({ className, icon, id, hookClick, text, eventId, ...rest }: MrlTabProps) => React.ReactElement;
|
|
@@ -18,6 +18,11 @@ export interface MrlTabLinkProps extends NavLinkProps {
|
|
|
18
18
|
* use children to provide content
|
|
19
19
|
*/
|
|
20
20
|
text?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Enables interaction tracking for this tab. Provide a stable, non-PII id
|
|
23
|
+
* (e.g. 'workspace-nav-tabs'). When omitted, the tab emits no analytics.
|
|
24
|
+
*/
|
|
25
|
+
eventId?: string;
|
|
21
26
|
}
|
|
22
27
|
/**
|
|
23
28
|
* Renders a tab component
|
|
@@ -25,4 +30,4 @@ export interface MrlTabLinkProps extends NavLinkProps {
|
|
|
25
30
|
* @param {MrlTabLinkProps} props the props for your MrlTabLink
|
|
26
31
|
* @returns {React.ReactElement} an a element containing the text you pass
|
|
27
32
|
*/
|
|
28
|
-
export declare const MrlTabLink: ({ className, children, icon, id, hookClick, text, to, ...remainingProps }: MrlTabLinkProps) => React.ReactElement;
|
|
33
|
+
export declare const MrlTabLink: ({ className, children, icon, id, hookClick, text, to, eventId, ...remainingProps }: MrlTabLinkProps) => React.ReactElement;
|
|
@@ -29,6 +29,11 @@ export interface MrlToolbarButtonProps {
|
|
|
29
29
|
*/
|
|
30
30
|
renderInMenu?: boolean;
|
|
31
31
|
text: string;
|
|
32
|
+
/**
|
|
33
|
+
* Enables interaction tracking for this button. Provide a stable, non-PII id
|
|
34
|
+
* (e.g. 'canvas-toolbar-shapes'). When omitted, the button emits no analytics.
|
|
35
|
+
*/
|
|
36
|
+
eventId?: string;
|
|
32
37
|
/**
|
|
33
38
|
* Props used to control the display of the button in the toolbar.
|
|
34
39
|
*/
|
|
@@ -39,6 +39,14 @@ interface MrlTooltipProps {
|
|
|
39
39
|
tooltipContentClass?: string;
|
|
40
40
|
/** A custom render function to render the tooltip content */
|
|
41
41
|
customRender?: (text?: string) => React.ReactNode;
|
|
42
|
+
/**
|
|
43
|
+
* Enables interaction tracking for this tooltip. Provide a stable, non-PII id
|
|
44
|
+
* (e.g. 'facilitation-timer-tooltip'). When omitted, the tooltip emits no analytics.
|
|
45
|
+
*
|
|
46
|
+
* Note: tooltips open on hover, so an instrumented tooltip is a high-volume source.
|
|
47
|
+
* Only add an id where the reveal itself is the signal you need.
|
|
48
|
+
*/
|
|
49
|
+
eventId?: string;
|
|
42
50
|
}
|
|
43
51
|
/**
|
|
44
52
|
* MrlTooltip Component
|
|
@@ -12,7 +12,7 @@ export interface MrlAnalyticsEvent {
|
|
|
12
12
|
* Consumer-supplied attribution id. REQUIRED for an event to fire (opt-in).
|
|
13
13
|
* Must be a stable, non-PII identifier (e.g. 'board-share', not the user's name).
|
|
14
14
|
*/
|
|
15
|
-
|
|
15
|
+
eventId: string;
|
|
16
16
|
/** Non-PII component variant, e.g. button kind/size. Set by the component. */
|
|
17
17
|
variant?: string;
|
|
18
18
|
/** Curated, non-PII extra context. Never button labels, input values, etc. */
|
|
@@ -4,12 +4,13 @@ import classnames from 'classnames';
|
|
|
4
4
|
import { _isSelected, _isDisabled } from '../../button/helpers.js';
|
|
5
5
|
import { buttonDefaults } from '../../button/constants.js';
|
|
6
6
|
import styles from './MrlAvatarButton.module.scss.js';
|
|
7
|
+
import { useMrlTrackInteraction } from '../../../hooks/useMrlAnalytics/useMrlAnalytics.js';
|
|
7
8
|
import { setAttributes } from '../../../utils/setAttributes/setAttributes.js';
|
|
8
9
|
import { MrlTooltip } from '../../tooltip/MrlTooltip/MrlTooltip.js';
|
|
9
10
|
import { MrlAvatar } from '../MrlAvatar/MrlAvatar.js';
|
|
10
11
|
import { MrlSpinner } from '../../loader/MrlSpinner/MrlSpinner.js';
|
|
11
12
|
|
|
12
|
-
var _excluded = ["buttonClassName", "dataQa", "id", "includeInRoving", "isToggleButton", "label", "loading", "loadingText", "onClick", "size", "state", "toggleAria", "tooltip", "triggerRef"];
|
|
13
|
+
var _excluded = ["buttonClassName", "dataQa", "id", "includeInRoving", "isToggleButton", "label", "loading", "loadingText", "onClick", "size", "state", "toggleAria", "tooltip", "eventId", "triggerRef"];
|
|
13
14
|
/**
|
|
14
15
|
* Renders an avatar button
|
|
15
16
|
* @param {MrlAvatarButtonPropTypes} props the props for your MrlAvatarButton
|
|
@@ -33,12 +34,14 @@ var MrlAvatarButton = _ref => {
|
|
|
33
34
|
_ref$toggleAria = _ref.toggleAria,
|
|
34
35
|
toggleAria = _ref$toggleAria === void 0 ? buttonDefaults.toggleAria : _ref$toggleAria,
|
|
35
36
|
tooltip = _ref.tooltip,
|
|
37
|
+
eventId = _ref.eventId,
|
|
36
38
|
triggerRef = _ref.triggerRef,
|
|
37
39
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
38
40
|
var _React$useState = React.useState(() => _isSelected(state)),
|
|
39
41
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
40
42
|
isSelected = _React$useState2[0],
|
|
41
43
|
setIsSelected = _React$useState2[1];
|
|
44
|
+
var trackInteraction = useMrlTrackInteraction('MrlAvatarButton', eventId);
|
|
42
45
|
|
|
43
46
|
/**
|
|
44
47
|
* We need to watch the value of state to keep in sync
|
|
@@ -76,6 +79,10 @@ var MrlAvatarButton = _ref => {
|
|
|
76
79
|
if (_isDisabled(state, loading)) {
|
|
77
80
|
return;
|
|
78
81
|
}
|
|
82
|
+
trackInteraction({
|
|
83
|
+
action: 'click',
|
|
84
|
+
variant: size
|
|
85
|
+
});
|
|
79
86
|
if (isToggleButton) {
|
|
80
87
|
setIsSelected(prevIsSelected => !prevIsSelected);
|
|
81
88
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MrlAvatarButton.js","sources":["../../../../../src/components/avatar/MrlAvatarButton/MrlAvatarButton.tsx"],"sourcesContent":["import * as React from 'react';\nimport classNames from 'classnames';\nimport {\n\tMrlAvatar,\n\tMrlAvatarPropTypes,\n\tMrlButtonState,\n\tMrlSpinner,\n\tMrlTooltip,\n\tTooltipConfig\n} from '../../';\nimport { _isDisabled, _isSelected } from '../../button/helpers';\nimport { ToggleAria, buttonDefaults } from '../../button/constants';\nimport { setAttributes } from '../../../utils';\n\nimport styles from './MrlAvatarButton.module.scss';\n\nexport interface MrlAvatarButtonPropTypes\n\textends MrlAvatarPropTypes,\n\t\tReact.HTMLAttributes<HTMLButtonElement> {\n\t/**\n\t * An optional class name to add to button wrapping the MrlAvatar.\n\t */\n\tbuttonClassName?: string;\n\n\t/**\n\t * An optional boolean prop to include the button in roving tabindex\n\t */\n\tincludeInRoving?: boolean;\n\n\t/**\n\t * Selected state variant when the button is a Toggle Button. Setting this prop\n\t * informs the component that this is a toggle button and to add that functionality\n\t */\n\tisToggleButton?: boolean;\n\n\t/**\n\t * An optional aria-label to apply to the button element\n\t */\n\tlabel?: string;\n\n\t/**\n\t * Displays a spinner in the button to indicate some action is in progress.\n\t */\n\tloading?: boolean;\n\n\t/**\n\t * Text for the spinner when the button is in a loading state.\n\t */\n\tloadingText?: string;\n\n\t/**\n\t * onClick event for the button.\n\t */\n\tonClick?: (e: React.SyntheticEvent<HTMLButtonElement>) => void;\n\n\t/**\n\t * Changes the state of the button based on user permissions or actions.\n\t */\n\tstate?: MrlButtonState;\n\n\t/**\n\t * Determines which aria setup to use for various toggle/selected styles.\n\t * pressed - use for an traditional “toggle button”\n\t * selected - use for tabs and custom select options\n\t * expanded - use for menus, panels, and popovers\n\t * checked - use for custom [radiobutton](https://www.w3.org/WAI/ARIA/apg/patterns/radiobutton/#wai-aria-roles-states-and-properties-16)\n\t * \t\tor [checkbox](https://www.w3.org/WAI/ARIA/apg/patterns/checkbox/#wai-aria-roles-states-and-properties-5) inputs\n\t */\n\ttoggleAria?: ToggleAria;\n\n\t/**\n\t * Tooltip configuration for the button\n\t */\n\ttooltip?: TooltipConfig;\n\n\t/**\n\t * Reference to the DOM element that is the MrlAvatarButton\n\t */\n\ttriggerRef?: React.RefObject<HTMLButtonElement>;\n}\n\n/**\n * Renders an avatar button\n * @param {MrlAvatarButtonPropTypes} props the props for your MrlAvatarButton\n * @returns {React.ReactElement} an avatar button containing the props you pass\n */\nexport const MrlAvatarButton = ({\n\tbuttonClassName,\n\tdataQa,\n\tid,\n\tincludeInRoving,\n\tisToggleButton,\n\tlabel,\n\tloading = false,\n\tloadingText = 'Loading',\n\tonClick,\n\tsize,\n\tstate = 'default',\n\ttoggleAria = buttonDefaults.toggleAria,\n\ttooltip,\n\ttriggerRef,\n\t...rest\n}: MrlAvatarButtonPropTypes): React.ReactElement => {\n\tconst [isSelected, setIsSelected] = React.useState(() => _isSelected(state));\n\n\t/**\n\t * We need to watch the value of state to keep in sync\n\t * the value of state passed as props and the internal\n\t * isSelected piece of state.\n\t */\n\tReact.useEffect(() => {\n\t\t// allows consumers to set the 'selected' or 'selected-disabled' state from a parent component.\n\t\tsetIsSelected(_isSelected(state));\n\t}, [state]);\n\n\tconst spinner = (\n\t\t<MrlSpinner\n\t\t\tclassName=\"mrlButton-spinner MrlAvatarButton-spinner\"\n\t\t\tkind=\"default\"\n\t\t\trole=\"none\"\n\t\t\tsize=\"small\"\n\t\t\ttext={loadingText}\n\t\t/>\n\t);\n\n\tconst attributes = setAttributes(\n\t\t{},\n\t\t{\n\t\t\t'aria-disabled': _isDisabled(state, loading),\n\t\t\t'aria-label': label,\n\t\t\t...(isToggleButton && { [`aria-${toggleAria}`]: isSelected || false }),\n\t\t\t'data-roving': includeInRoving ? 'true' : undefined,\n\t\t\trole: 'button',\n\t\t\ttype: 'button'\n\t\t}\n\t);\n\n\t/**\n\t * Handle onClick events\n\t * @param {React.MouseEvent<HTMLButtonElement>} e - mouse event\n\t */\n\tfunction handleOnClick(e: React.MouseEvent<HTMLButtonElement>) {\n\t\te.stopPropagation();\n\n\t\tif (_isDisabled(state, loading)) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (isToggleButton) {\n\t\t\tsetIsSelected((prevIsSelected) => !prevIsSelected);\n\t\t}\n\n\t\tif (onClick && typeof onClick === 'function') {\n\t\t\tonClick(e);\n\t\t}\n\t}\n\n\tconst buttonClasses = classNames('MrlAvatarButton', styles['MrlAvatarButton'], buttonClassName, {\n\t\t[styles['MrlAvatarButton--large']]: size && size === 'large'\n\t});\n\n\tconst renderAvatarButton = () => (\n\t\t<button\n\t\t\t{...attributes}\n\t\t\taria-label={tooltip && tooltip.text}\n\t\t\tclassName={buttonClasses}\n\t\t\tdata-qa={dataQa && `${dataQa}-button`}\n\t\t\tid={id}\n\t\t\tonClick={handleOnClick}\n\t\t\tref={triggerRef}\n\t\t>\n\t\t\t{loading ? spinner : <MrlAvatar dataQa={dataQa} size={size} {...rest} />}\n\t\t</button>\n\t);\n\n\treturn !tooltip ? (\n\t\trenderAvatarButton()\n\t) : (\n\t\t<MrlTooltip\n\t\t\tposition={tooltip.position || 'bottom'}\n\t\t\tanchor={tooltip.anchor || 'center'}\n\t\t\ttext={tooltip.text}\n\t\t\tdataQa={tooltip.dataQa}\n\t\t>\n\t\t\t{renderAvatarButton()}\n\t\t</MrlTooltip>\n\t);\n};\n"],"names":["MrlAvatarButton","_ref","buttonClassName","dataQa","id","includeInRoving","isToggleButton","label","_ref$loading","loading","_ref$loadingText","loadingText","onClick","size","_ref$state","state","_ref$toggleAria","toggleAria","buttonDefaults","tooltip","triggerRef","rest","_objectWithoutProperties","_excluded","_React$useState","React","useState","_isSelected","_React$useState2","_slicedToArray","isSelected","setIsSelected","useEffect","spinner","createElement","MrlSpinner","className","kind","role","text","attributes","setAttributes","_objectSpread","_isDisabled","concat","undefined","type","handleOnClick","e","stopPropagation","prevIsSelected","buttonClasses","classNames","styles","renderAvatarButton","_extends","ref","MrlAvatar","MrlTooltip","position","anchor"],"mappings":"
|
|
1
|
+
{"version":3,"file":"MrlAvatarButton.js","sources":["../../../../../src/components/avatar/MrlAvatarButton/MrlAvatarButton.tsx"],"sourcesContent":["import * as React from 'react';\nimport classNames from 'classnames';\nimport {\n\tMrlAvatar,\n\tMrlAvatarPropTypes,\n\tMrlButtonState,\n\tMrlSpinner,\n\tMrlTooltip,\n\tTooltipConfig\n} from '../../';\nimport { _isDisabled, _isSelected } from '../../button/helpers';\nimport { ToggleAria, buttonDefaults } from '../../button/constants';\nimport { setAttributes } from '../../../utils';\nimport { useMrlTrackInteraction } from '../../../hooks/useMrlAnalytics';\n\nimport styles from './MrlAvatarButton.module.scss';\n\nexport interface MrlAvatarButtonPropTypes\n\textends MrlAvatarPropTypes,\n\t\tReact.HTMLAttributes<HTMLButtonElement> {\n\t/**\n\t * An optional class name to add to button wrapping the MrlAvatar.\n\t */\n\tbuttonClassName?: string;\n\n\t/**\n\t * An optional boolean prop to include the button in roving tabindex\n\t */\n\tincludeInRoving?: boolean;\n\n\t/**\n\t * Selected state variant when the button is a Toggle Button. Setting this prop\n\t * informs the component that this is a toggle button and to add that functionality\n\t */\n\tisToggleButton?: boolean;\n\n\t/**\n\t * An optional aria-label to apply to the button element\n\t */\n\tlabel?: string;\n\n\t/**\n\t * Displays a spinner in the button to indicate some action is in progress.\n\t */\n\tloading?: boolean;\n\n\t/**\n\t * Text for the spinner when the button is in a loading state.\n\t */\n\tloadingText?: string;\n\n\t/**\n\t * onClick event for the button.\n\t */\n\tonClick?: (e: React.SyntheticEvent<HTMLButtonElement>) => void;\n\n\t/**\n\t * Changes the state of the button based on user permissions or actions.\n\t */\n\tstate?: MrlButtonState;\n\n\t/**\n\t * Determines which aria setup to use for various toggle/selected styles.\n\t * pressed - use for an traditional “toggle button”\n\t * selected - use for tabs and custom select options\n\t * expanded - use for menus, panels, and popovers\n\t * checked - use for custom [radiobutton](https://www.w3.org/WAI/ARIA/apg/patterns/radiobutton/#wai-aria-roles-states-and-properties-16)\n\t * \t\tor [checkbox](https://www.w3.org/WAI/ARIA/apg/patterns/checkbox/#wai-aria-roles-states-and-properties-5) inputs\n\t */\n\ttoggleAria?: ToggleAria;\n\n\t/**\n\t * Tooltip configuration for the button\n\t */\n\ttooltip?: TooltipConfig;\n\n\t/**\n\t * Enables interaction tracking for this button. Provide a stable, non-PII id\n\t * (e.g. 'workspace-member-avatar'). When omitted, the button emits no analytics.\n\t */\n\teventId?: string;\n\n\t/**\n\t * Reference to the DOM element that is the MrlAvatarButton\n\t */\n\ttriggerRef?: React.RefObject<HTMLButtonElement>;\n}\n\n/**\n * Renders an avatar button\n * @param {MrlAvatarButtonPropTypes} props the props for your MrlAvatarButton\n * @returns {React.ReactElement} an avatar button containing the props you pass\n */\nexport const MrlAvatarButton = ({\n\tbuttonClassName,\n\tdataQa,\n\tid,\n\tincludeInRoving,\n\tisToggleButton,\n\tlabel,\n\tloading = false,\n\tloadingText = 'Loading',\n\tonClick,\n\tsize,\n\tstate = 'default',\n\ttoggleAria = buttonDefaults.toggleAria,\n\ttooltip,\n\teventId,\n\ttriggerRef,\n\t...rest\n}: MrlAvatarButtonPropTypes): React.ReactElement => {\n\tconst [isSelected, setIsSelected] = React.useState(() => _isSelected(state));\n\n\tconst trackInteraction = useMrlTrackInteraction('MrlAvatarButton', eventId);\n\n\t/**\n\t * We need to watch the value of state to keep in sync\n\t * the value of state passed as props and the internal\n\t * isSelected piece of state.\n\t */\n\tReact.useEffect(() => {\n\t\t// allows consumers to set the 'selected' or 'selected-disabled' state from a parent component.\n\t\tsetIsSelected(_isSelected(state));\n\t}, [state]);\n\n\tconst spinner = (\n\t\t<MrlSpinner\n\t\t\tclassName=\"mrlButton-spinner MrlAvatarButton-spinner\"\n\t\t\tkind=\"default\"\n\t\t\trole=\"none\"\n\t\t\tsize=\"small\"\n\t\t\ttext={loadingText}\n\t\t/>\n\t);\n\n\tconst attributes = setAttributes(\n\t\t{},\n\t\t{\n\t\t\t'aria-disabled': _isDisabled(state, loading),\n\t\t\t'aria-label': label,\n\t\t\t...(isToggleButton && { [`aria-${toggleAria}`]: isSelected || false }),\n\t\t\t'data-roving': includeInRoving ? 'true' : undefined,\n\t\t\trole: 'button',\n\t\t\ttype: 'button'\n\t\t}\n\t);\n\n\t/**\n\t * Handle onClick events\n\t * @param {React.MouseEvent<HTMLButtonElement>} e - mouse event\n\t */\n\tfunction handleOnClick(e: React.MouseEvent<HTMLButtonElement>) {\n\t\te.stopPropagation();\n\n\t\tif (_isDisabled(state, loading)) {\n\t\t\treturn;\n\t\t}\n\n\t\ttrackInteraction({ action: 'click', variant: size });\n\n\t\tif (isToggleButton) {\n\t\t\tsetIsSelected((prevIsSelected) => !prevIsSelected);\n\t\t}\n\n\t\tif (onClick && typeof onClick === 'function') {\n\t\t\tonClick(e);\n\t\t}\n\t}\n\n\tconst buttonClasses = classNames('MrlAvatarButton', styles['MrlAvatarButton'], buttonClassName, {\n\t\t[styles['MrlAvatarButton--large']]: size && size === 'large'\n\t});\n\n\tconst renderAvatarButton = () => (\n\t\t<button\n\t\t\t{...attributes}\n\t\t\taria-label={tooltip && tooltip.text}\n\t\t\tclassName={buttonClasses}\n\t\t\tdata-qa={dataQa && `${dataQa}-button`}\n\t\t\tid={id}\n\t\t\tonClick={handleOnClick}\n\t\t\tref={triggerRef}\n\t\t>\n\t\t\t{loading ? spinner : <MrlAvatar dataQa={dataQa} size={size} {...rest} />}\n\t\t</button>\n\t);\n\n\treturn !tooltip ? (\n\t\trenderAvatarButton()\n\t) : (\n\t\t<MrlTooltip\n\t\t\tposition={tooltip.position || 'bottom'}\n\t\t\tanchor={tooltip.anchor || 'center'}\n\t\t\ttext={tooltip.text}\n\t\t\tdataQa={tooltip.dataQa}\n\t\t>\n\t\t\t{renderAvatarButton()}\n\t\t</MrlTooltip>\n\t);\n};\n"],"names":["MrlAvatarButton","_ref","buttonClassName","dataQa","id","includeInRoving","isToggleButton","label","_ref$loading","loading","_ref$loadingText","loadingText","onClick","size","_ref$state","state","_ref$toggleAria","toggleAria","buttonDefaults","tooltip","eventId","triggerRef","rest","_objectWithoutProperties","_excluded","_React$useState","React","useState","_isSelected","_React$useState2","_slicedToArray","isSelected","setIsSelected","trackInteraction","useMrlTrackInteraction","useEffect","spinner","createElement","MrlSpinner","className","kind","role","text","attributes","setAttributes","_objectSpread","_isDisabled","concat","undefined","type","handleOnClick","e","stopPropagation","action","variant","prevIsSelected","buttonClasses","classNames","styles","renderAvatarButton","_extends","ref","MrlAvatar","MrlTooltip","position","anchor"],"mappings":";;;;;;;;;;;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AAQ,IAAI,QAAS;AACvCC,IAAAA,MAAM,EAAE9C,OAAO,CAAC8C,MAAM,IAAI,QAAS;IACnCvB,IAAI,EAAEvB,OAAO,CAACuB,IAAK;IACnBvC,MAAM,EAAEgB,OAAO,CAAChB;GAAO,EAEtBwD,kBAAkB,EACR,CACZ;AACF;;;;"}
|
|
@@ -4,10 +4,11 @@ import classnames from 'classnames';
|
|
|
4
4
|
import { Link } from 'react-router-dom';
|
|
5
5
|
import styles from './MrlBreadcrumbItem.module.scss.js';
|
|
6
6
|
import { more } from '@muraldevkit/ds-icons';
|
|
7
|
+
import { useMrlTrackInteraction } from '../../../hooks/useMrlAnalytics/useMrlAnalytics.js';
|
|
7
8
|
import { MrlSvg } from '../../svg/MrlSvg/MrlSvg.js';
|
|
8
9
|
import { MrlBreadcrumbSeparator } from '../MrlBreadcrumbSeparator/MrlBreadcrumbSeparator.js';
|
|
9
10
|
|
|
10
|
-
var _excluded = ["link", "text", "isSelected", "hasSeparator", "isTruncated"];
|
|
11
|
+
var _excluded = ["link", "text", "isSelected", "hasSeparator", "isTruncated", "eventId"];
|
|
11
12
|
/**
|
|
12
13
|
* MrlBreadcrumbItem component.
|
|
13
14
|
* @param props The MrlBreadcrumbItem component properties.
|
|
@@ -21,22 +22,31 @@ function MrlBreadcrumbItem(props) {
|
|
|
21
22
|
hasSeparator = _props$hasSeparator === void 0 ? true : _props$hasSeparator,
|
|
22
23
|
_props$isTruncated = props.isTruncated,
|
|
23
24
|
isTruncated = _props$isTruncated === void 0 ? false : _props$isTruncated,
|
|
25
|
+
eventId = props.eventId,
|
|
24
26
|
rest = _objectWithoutProperties(props, _excluded);
|
|
27
|
+
var trackInteraction = useMrlTrackInteraction('MrlBreadcrumbItem', eventId);
|
|
25
28
|
var breadcrumbItem = React.useMemo(() => {
|
|
29
|
+
// the selected crumb is the current page, so it navigates nowhere and emits nothing.
|
|
26
30
|
if (isSelected) {
|
|
27
31
|
// eslint-disable-next-line jsx-a11y/anchor-is-valid
|
|
28
32
|
return /*#__PURE__*/React.createElement("a", {
|
|
29
33
|
"aria-current": "page"
|
|
30
34
|
}, text);
|
|
31
35
|
}
|
|
36
|
+
var handleClick = () => trackInteraction({
|
|
37
|
+
action: 'click'
|
|
38
|
+
});
|
|
32
39
|
if (typeof link === 'string') {
|
|
33
40
|
return /*#__PURE__*/React.createElement("a", {
|
|
34
|
-
href: link
|
|
41
|
+
href: link,
|
|
42
|
+
onClick: handleClick
|
|
35
43
|
}, text);
|
|
36
44
|
} else if (typeof link === 'object') {
|
|
37
|
-
return /*#__PURE__*/React.createElement(Link, link,
|
|
45
|
+
return /*#__PURE__*/React.createElement(Link, _extends({}, link, {
|
|
46
|
+
onClick: handleClick
|
|
47
|
+
}), text);
|
|
38
48
|
}
|
|
39
|
-
}, [link, text, isSelected]);
|
|
49
|
+
}, [link, text, isSelected, trackInteraction]);
|
|
40
50
|
return /*#__PURE__*/React.createElement("li", _extends({}, rest, {
|
|
41
51
|
className: classnames(styles['MrlBreadcrumbItem'], 'MrlBreadcrumbItem', {
|
|
42
52
|
[styles['MrlBreadcrumbItem--selected']]: isSelected,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MrlBreadcrumbItem.js","sources":["../../../../../src/components/breadcrumb/MrlBreadcrumbItem/MrlBreadcrumbItem.tsx"],"sourcesContent":["/* eslint-disable no-mixed-spaces-and-tabs */\nimport * as React from 'react';\nimport classnames from 'classnames';\nimport { Link } from 'react-router-dom';\nimport styles from './MrlBreadcrumbItem.module.scss';\nimport { MrlSvg } from '../../svg';\nimport { more } from '@muraldevkit/ds-icons';\nimport { MrlBreadcrumbSeparator } from '../MrlBreadcrumbSeparator';\n\nexport type BreadcrumbItemLink =\n\t| {\n\t\t\ttext: string;\n\t\t\tlink: string;\n\t }\n\t| {\n\t\t\ttext: string;\n\t\t\tlink: React.ComponentPropsWithoutRef<typeof Link>;\n\t };\n\nexport type BreadcrumbItem = {\n\tisSelected?: boolean;\n\thasSeparator?: boolean;\n\tisTruncated?: boolean;\n} & BreadcrumbItemLink;\n\nexport interface MrlBreadcrumbItemProps extends React.ComponentPropsWithRef<'li'> {\n\t/**\n\t * Children to be rendered within the component\n\t */\n\tchildren?: React.ReactNode;\n\n\t/**\n\t * Determines whether a separator should be displayed after this breadcrumb item.\n\t */\n\thasSeparator?: BreadcrumbItem['hasSeparator'];\n\n\t/**\n\t * Indicates whether this breadcrumb item represents the currently selected or\n\t * active page.\n\t */\n\tisSelected?: BreadcrumbItem['isSelected'];\n\n\t/**\n\t * Specifies whether the text content of this breadcrumb item should be truncated\n\t * if it exceeds a certain width. This is useful for handling long page titles\n\t * or labels within the breadcrumb.\n\t */\n\tisTruncated?: boolean;\n\n\tlink?: BreadcrumbItem['link'];\n\ttext?: BreadcrumbItem['text'];\n}\n\n/**\n * MrlBreadcrumbItem component.\n * @param props The MrlBreadcrumbItem component properties.\n * @returns The MrlBreadcrumbItem component.\n */\nexport function MrlBreadcrumbItem(props: MrlBreadcrumbItemProps): JSX.Element {\n\tconst {
|
|
1
|
+
{"version":3,"file":"MrlBreadcrumbItem.js","sources":["../../../../../src/components/breadcrumb/MrlBreadcrumbItem/MrlBreadcrumbItem.tsx"],"sourcesContent":["/* eslint-disable no-mixed-spaces-and-tabs */\nimport * as React from 'react';\nimport classnames from 'classnames';\nimport { Link } from 'react-router-dom';\nimport styles from './MrlBreadcrumbItem.module.scss';\nimport { MrlSvg } from '../../svg';\nimport { more } from '@muraldevkit/ds-icons';\nimport { MrlBreadcrumbSeparator } from '../MrlBreadcrumbSeparator';\nimport { useMrlTrackInteraction } from '../../../hooks/useMrlAnalytics';\n\nexport type BreadcrumbItemLink =\n\t| {\n\t\t\ttext: string;\n\t\t\tlink: string;\n\t }\n\t| {\n\t\t\ttext: string;\n\t\t\tlink: React.ComponentPropsWithoutRef<typeof Link>;\n\t };\n\nexport type BreadcrumbItem = {\n\tisSelected?: boolean;\n\thasSeparator?: boolean;\n\tisTruncated?: boolean;\n} & BreadcrumbItemLink;\n\nexport interface MrlBreadcrumbItemProps extends React.ComponentPropsWithRef<'li'> {\n\t/**\n\t * Children to be rendered within the component\n\t */\n\tchildren?: React.ReactNode;\n\n\t/**\n\t * Determines whether a separator should be displayed after this breadcrumb item.\n\t */\n\thasSeparator?: BreadcrumbItem['hasSeparator'];\n\n\t/**\n\t * Indicates whether this breadcrumb item represents the currently selected or\n\t * active page.\n\t */\n\tisSelected?: BreadcrumbItem['isSelected'];\n\n\t/**\n\t * Specifies whether the text content of this breadcrumb item should be truncated\n\t * if it exceeds a certain width. This is useful for handling long page titles\n\t * or labels within the breadcrumb.\n\t */\n\tisTruncated?: boolean;\n\n\tlink?: BreadcrumbItem['link'];\n\ttext?: BreadcrumbItem['text'];\n\n\t/**\n\t * Enables interaction tracking for this breadcrumb. Provide a stable, non-PII id\n\t * (e.g. 'room-breadcrumb'). When omitted, the breadcrumb emits no analytics.\n\t */\n\teventId?: string;\n}\n\n/**\n * MrlBreadcrumbItem component.\n * @param props The MrlBreadcrumbItem component properties.\n * @returns The MrlBreadcrumbItem component.\n */\nexport function MrlBreadcrumbItem(props: MrlBreadcrumbItemProps): JSX.Element {\n\tconst {\n\t\tlink,\n\t\ttext,\n\t\tisSelected,\n\t\thasSeparator = true,\n\t\tisTruncated = false,\n\t\teventId,\n\t\t...rest\n\t} = props;\n\n\tconst trackInteraction = useMrlTrackInteraction('MrlBreadcrumbItem', eventId);\n\n\tconst breadcrumbItem = React.useMemo(() => {\n\t\t// the selected crumb is the current page, so it navigates nowhere and emits nothing.\n\t\tif (isSelected) {\n\t\t\t// eslint-disable-next-line jsx-a11y/anchor-is-valid\n\t\t\treturn <a aria-current=\"page\">{text}</a>;\n\t\t}\n\n\t\tconst handleClick = () => trackInteraction({ action: 'click' });\n\n\t\tif (typeof link === 'string') {\n\t\t\treturn (\n\t\t\t\t<a href={link} onClick={handleClick}>\n\t\t\t\t\t{text}\n\t\t\t\t</a>\n\t\t\t);\n\t\t} else if (typeof link === 'object') {\n\t\t\treturn (\n\t\t\t\t<Link {...link} onClick={handleClick}>\n\t\t\t\t\t{text}\n\t\t\t\t</Link>\n\t\t\t);\n\t\t}\n\t}, [link, text, isSelected, trackInteraction]);\n\n\treturn (\n\t\t<li\n\t\t\t{...rest}\n\t\t\tclassName={classnames(styles['MrlBreadcrumbItem'], 'MrlBreadcrumbItem', {\n\t\t\t\t[styles['MrlBreadcrumbItem--selected']]: isSelected,\n\t\t\t\t['MrlBreadcrumbItem--selected']: isSelected\n\t\t\t})}\n\t\t>\n\t\t\t{isTruncated && (\n\t\t\t\t<span className={classnames(styles['MrlBreadcrumbItem--icon'])}>\n\t\t\t\t\t<MrlSvg size=\"auto\" svg={more} />\n\t\t\t\t</span>\n\t\t\t)}\n\t\t\t{!isTruncated && breadcrumbItem}\n\t\t\t{hasSeparator && <MrlBreadcrumbSeparator />}\n\t\t</li>\n\t);\n}\n"],"names":["MrlBreadcrumbItem","props","link","text","isSelected","_props$hasSeparator","hasSeparator","_props$isTruncated","isTruncated","eventId","rest","_objectWithoutProperties","_excluded","trackInteraction","useMrlTrackInteraction","breadcrumbItem","React","useMemo","createElement","handleClick","action","href","onClick","Link","_extends","className","classnames","styles","MrlSvg","size","svg","more","MrlBreadcrumbSeparator"],"mappings":";;;;;;;;;;;AA4DA;AACA;AACA;AACA;AACA;AACO,SAASA,iBAAiBA,CAACC,KAA6B,EAAe;AAC7E,EAAA,IACCC,IAAI,GAODD,KAAK,CAPRC,IAAI;IACJC,IAAI,GAMDF,KAAK,CANRE,IAAI;IACJC,UAAU,GAKPH,KAAK,CALRG,UAAU;IAAAC,mBAAA,GAKPJ,KAAK,CAJRK,YAAY;AAAZA,IAAAA,YAAY,GAAAD,mBAAA,KAAA,MAAA,GAAG,IAAI,GAAAA,mBAAA;IAAAE,kBAAA,GAIhBN,KAAK,CAHRO,WAAW;AAAXA,IAAAA,WAAW,GAAAD,kBAAA,KAAA,MAAA,GAAG,KAAK,GAAAA,kBAAA;IACnBE,OAAO,GAEJR,KAAK,C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AE,GAAA,CAAA,EAEFI,WAAW,iBACXQ,KAAA,CAAAE,aAAA,CAAA,MAAA,EAAA;AAAMO,IAAAA,SAAS,EAAEC,UAAU,CAACC,MAAM,CAAC,yBAAyB,CAAC;AAAE,GAAA,eAC9DX,KAAA,CAAAE,aAAA,CAACU,MAAM,EAAA;AAACC,IAAAA,IAAI,EAAC,MAAM;AAACC,IAAAA,GAAG,EAAEC;AAAK,GAAE,CAC3B,CACN,EACA,CAACvB,WAAW,IAAIO,cAAc,EAC9BT,YAAY,iBAAIU,KAAA,CAAAE,aAAA,CAACc,sBAAsB,EAAA,IAAE,CACvC,CAAC;AAEP;;;;"}
|
|
@@ -5,10 +5,11 @@ import { MrlSvgAnimate } from '../../svg/MrlSvgAnimate/MrlSvgAnimate.js';
|
|
|
5
5
|
import { MrlTooltipDefaults } from '../../tooltip/constants.js';
|
|
6
6
|
import { buttonDefaults } from '../constants.js';
|
|
7
7
|
import { _isSelected, _isDisabled, _isToggleButton } from '../helpers.js';
|
|
8
|
+
import { useMrlTrackInteraction } from '../../../hooks/useMrlAnalytics/useMrlAnalytics.js';
|
|
8
9
|
import { setAttributes } from '../../../utils/setAttributes/setAttributes.js';
|
|
9
10
|
import { MrlTooltip } from '../../tooltip/MrlTooltip/MrlTooltip.js';
|
|
10
11
|
|
|
11
|
-
var _excluded = ["attrs", "badge", "disableEvents", "icon", "kind", "loading", "onClick", "position", "toggleAria", "toggleStyle", "text", "tipAnchor", "size", "state"];
|
|
12
|
+
var _excluded = ["attrs", "badge", "disableEvents", "icon", "kind", "loading", "onClick", "position", "toggleAria", "toggleStyle", "text", "tipAnchor", "eventId", "size", "state"];
|
|
12
13
|
var MrlAnimatedIconButton = /*#__PURE__*/React.forwardRef(function MrlAnimatedIconButton(_ref, ref) {
|
|
13
14
|
var _ref$attrs = _ref.attrs,
|
|
14
15
|
attrs = _ref$attrs === void 0 ? {} : _ref$attrs,
|
|
@@ -29,6 +30,7 @@ var MrlAnimatedIconButton = /*#__PURE__*/React.forwardRef(function MrlAnimatedIc
|
|
|
29
30
|
text = _ref.text,
|
|
30
31
|
_ref$tipAnchor = _ref.tipAnchor,
|
|
31
32
|
tipAnchor = _ref$tipAnchor === void 0 ? MrlTooltipDefaults.anchor : _ref$tipAnchor,
|
|
33
|
+
eventId = _ref.eventId,
|
|
32
34
|
_ref$size = _ref.size,
|
|
33
35
|
size = _ref$size === void 0 ? buttonDefaults.size : _ref$size,
|
|
34
36
|
_ref$state = _ref.state,
|
|
@@ -49,6 +51,7 @@ var MrlAnimatedIconButton = /*#__PURE__*/React.forwardRef(function MrlAnimatedIc
|
|
|
49
51
|
_React$useState6 = _slicedToArray(_React$useState5, 2),
|
|
50
52
|
isSelected = _React$useState6[0],
|
|
51
53
|
setIsSelected = _React$useState6[1];
|
|
54
|
+
var trackInteraction = useMrlTrackInteraction('MrlAnimatedIconButton', eventId);
|
|
52
55
|
var buttonRef = React.useRef(null);
|
|
53
56
|
/**
|
|
54
57
|
* `useImperativeHandle` customizes the instance value
|
|
@@ -80,6 +83,10 @@ var MrlAnimatedIconButton = /*#__PURE__*/React.forwardRef(function MrlAnimatedIc
|
|
|
80
83
|
if (_isDisabled(state, loading) || disableEvents) {
|
|
81
84
|
return;
|
|
82
85
|
}
|
|
86
|
+
trackInteraction({
|
|
87
|
+
action: 'click',
|
|
88
|
+
variant: kind
|
|
89
|
+
});
|
|
83
90
|
if (isToggleButton) {
|
|
84
91
|
setIsSelected(prevIsSelected => !prevIsSelected);
|
|
85
92
|
}
|