carbon-react 162.20.3 → 162.21.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/esm/__internal__/character-count/character-count.style.js +1 -1
- package/esm/__internal__/checkable-input/checkable-input.style.js +1 -1
- package/esm/__internal__/checkable-input/hidden-checkable-input.style.js +1 -1
- package/esm/__internal__/error-border/error-border.style.js +1 -1
- package/esm/__internal__/field-help/field-help.style.js +1 -1
- package/esm/__internal__/fieldset/__next__/fieldset.style.js +1 -1
- package/esm/__internal__/fieldset/fieldset.style.js +1 -1
- package/esm/__internal__/form-field/form-field.style.js +1 -1
- package/esm/__internal__/full-screen-heading/full-screen-heading.style.js +1 -1
- package/esm/__internal__/hint-text/hint-text.style.js +1 -1
- package/esm/__internal__/input/input.style.js +1 -1
- package/esm/__internal__/input-icon-toggle/input-icon-toggle.style.js +1 -1
- package/esm/__internal__/label/label.style.js +1 -1
- package/esm/__internal__/legacy-error-border/error-border.style.js +1 -1
- package/esm/__internal__/legacy-hint-text/hint-text.style.js +1 -1
- package/esm/__internal__/legacy-input/input-presentation.style.js +1 -1
- package/esm/__internal__/legacy-input/input.style.js +1 -1
- package/esm/__internal__/legacy-label/icon-wrapper.style.js +1 -1
- package/esm/__internal__/legacy-label/label.style.js +1 -1
- package/esm/__internal__/modal/modal.style.js +1 -1
- package/esm/__internal__/popover/popover.style.js +1 -1
- package/esm/__internal__/popover-menu/hooks/index.d.ts +1 -0
- package/esm/__internal__/popover-menu/hooks/useHandleDropdownMenuKeyDown.d.ts +7 -1
- package/esm/__internal__/popover-menu/hooks/useHandleDropdownMenuKeyDown.js +1 -1
- package/esm/__internal__/popover-menu/menu-item/menu-item-content/menu-item-label.component.js +1 -1
- package/esm/__internal__/popover-menu/menu-item/menu-item-content/menu-item-leading.component.js +1 -1
- package/esm/__internal__/popover-menu/menu-item/menu-item-content/menu-item-subtext.component.js +1 -1
- package/esm/__internal__/popover-menu/menu-item/menu-item-divider/menu-item-divider.component.js +1 -1
- package/esm/__internal__/popover-menu/menu-item/menu-item-heading/menu-item-heading.component.js +1 -1
- package/esm/__internal__/popover-menu/menu-item/menu-item.component.js +1 -1
- package/esm/__internal__/popover-menu/popover-menu.component.d.ts +6 -1
- package/esm/__internal__/popover-menu/popover-menu.component.js +1 -1
- package/esm/__internal__/validation-message/__next__/validation-message.style.js +1 -1
- package/esm/__internal__/validation-message/validation-message.style.js +1 -1
- package/esm/__internal__/validations/validation-icon.style.js +1 -1
- package/esm/components/accordion/accordion.style.js +1 -1
- package/esm/components/action-popover/__internal__/action-popover.context.d.ts +0 -4
- package/esm/components/action-popover/__internal__/action-popover.utils.d.ts +2 -7
- package/esm/components/action-popover/__internal__/action-popover.utils.js +1 -1
- package/esm/components/action-popover/action-popover-divider/action-popover-divider.component.d.ts +1 -1
- package/esm/components/action-popover/action-popover-divider/action-popover-divider.component.js +1 -1
- package/esm/components/action-popover/action-popover-item/action-popover-item.component.d.ts +2 -7
- package/esm/components/action-popover/action-popover-item/action-popover-item.component.js +1 -1
- package/esm/components/action-popover/action-popover-menu/action-popover-menu.component.d.ts +4 -23
- package/esm/components/action-popover/action-popover-menu/action-popover-menu.component.js +1 -1
- package/esm/components/action-popover/action-popover-menu-button/action-popover-menu-button.component.d.ts +23 -20
- package/esm/components/action-popover/action-popover-menu-button/action-popover-menu-button.component.js +1 -1
- package/esm/components/action-popover/action-popover.component.d.ts +17 -6
- package/esm/components/action-popover/action-popover.component.js +1 -1
- package/esm/components/action-popover/action-popover.style.d.ts +1 -21
- package/esm/components/action-popover/action-popover.style.js +1 -1
- package/esm/components/action-popover/index.js +1 -1
- package/esm/components/adaptive-sidebar/adaptive-sidebar.style.js +1 -1
- package/esm/components/advanced-color-picker/advanced-color-picker-cell.style.js +1 -1
- package/esm/components/advanced-color-picker/advanced-color-picker.style.js +1 -1
- package/esm/components/anchor-navigation/anchor-navigation-item/anchor-navigation-item.style.js +1 -1
- package/esm/components/anchor-navigation/anchor-navigation.style.js +1 -1
- package/esm/components/anchor-navigation/anchor-section-divider.component.js +1 -1
- package/esm/components/badge/badge.style.js +1 -1
- package/esm/components/batch-selection/batch-selection.style.js +1 -1
- package/esm/components/box/box.style.js +1 -1
- package/esm/components/breadcrumbs/breadcrumbs.style.js +1 -1
- package/esm/components/breadcrumbs/crumb/crumb.style.js +1 -1
- package/esm/components/button/__next__/button.style.js +1 -1
- package/esm/components/button/button.style.js +1 -1
- package/esm/components/button-bar/button-bar.style.js +1 -1
- package/esm/components/button-minor/button-minor.style.js +1 -1
- package/esm/components/button-toggle/button-toggle-group/button-toggle-group.style.js +1 -1
- package/esm/components/button-toggle/button-toggle.style.js +1 -1
- package/esm/components/card/card-column/card-column.style.js +1 -1
- package/esm/components/card/card-footer/card-footer.style.js +1 -1
- package/esm/components/card/card-row/card-row.style.js +1 -1
- package/esm/components/card/card.style.js +1 -1
- package/esm/components/checkbox/checkbox-group/checkbox-group.style.js +1 -1
- package/esm/components/checkbox/checkbox.style.js +1 -1
- package/esm/components/confirm/confirm.style.js +1 -1
- package/esm/components/content/content.style.js +1 -1
- package/esm/components/date/__internal__/calendar/calendar-close-button.style.js +1 -1
- package/esm/components/date/__internal__/calendar/calendar-navigation.style.js +1 -1
- package/esm/components/date/__internal__/calendar/calendar-select/calendar-select.style.js +1 -1
- package/esm/components/date/__internal__/calendar/calendar-weekday.style.js +1 -1
- package/esm/components/date/__internal__/date-picker/date-picker.style.js +1 -1
- package/esm/components/date/__internal__/date-picker-trigger/date-picker-trigger.style.js +1 -1
- package/esm/components/date/date.style.js +1 -1
- package/esm/components/date-range/date-range.style.js +1 -1
- package/esm/components/decimal/__internal__/decimal-popover-button.style.js +1 -1
- package/esm/components/decimal/decimal.style.js +1 -1
- package/esm/components/definition-list/definition-list.style.d.ts +1 -1
- package/esm/components/definition-list/definition-list.style.js +1 -1
- package/esm/components/detail/detail.style.js +1 -1
- package/esm/components/dialog/__internal__/__next__/dialog.style.js +1 -1
- package/esm/components/dismissible-box/dismissible-box.style.js +1 -1
- package/esm/components/divider/divider.style.js +1 -1
- package/esm/components/draggable/draggable-item/draggable-item.style.js +1 -1
- package/esm/components/drawer/drawer.style.js +1 -1
- package/esm/components/duelling-picklist/duelling-picklist.style.js +1 -1
- package/esm/components/duelling-picklist/picklist/picklist.style.js +1 -1
- package/esm/components/duelling-picklist/picklist-divider/picklist-divider.style.js +1 -1
- package/esm/components/duelling-picklist/picklist-group/picklist-group.style.js +1 -1
- package/esm/components/duelling-picklist/picklist-item/picklist-item.style.js +1 -1
- package/esm/components/fieldset/fieldset.style.js +1 -1
- package/esm/components/file-input/__internal__/file-upload-status/file-upload-status.style.js +1 -1
- package/esm/components/file-input/file-input.style.js +1 -1
- package/esm/components/flat-table/flat-table-body-draggable/flat-table-body-draggable.style.js +1 -1
- package/esm/components/flat-table/flat-table-cell/flat-table-cell.style.js +1 -1
- package/esm/components/flat-table/flat-table-checkbox/flat-table-checkbox.style.js +1 -1
- package/esm/components/flat-table/flat-table-head/flat-table-head.style.js +1 -1
- package/esm/components/flat-table/flat-table-header/flat-table-header.style.js +1 -1
- package/esm/components/flat-table/flat-table-row/flat-table-row.component.js +1 -1
- package/esm/components/flat-table/flat-table-row/flat-table-row.style.js +1 -1
- package/esm/components/flat-table/flat-table-row-header/flat-table-row-header.style.js +1 -1
- package/esm/components/flat-table/flat-table.style.js +1 -1
- package/esm/components/flat-table/sort/sort.style.js +1 -1
- package/esm/components/form/__internal__/form-summary.style.js +1 -1
- package/esm/components/form/form.style.js +1 -1
- package/esm/components/form/required-fields-indicator/required-fields-indicator.component.js +1 -1
- package/esm/components/global-header/global-header.component.js +1 -1
- package/esm/components/grid/grid-container/grid-container.style.js +1 -1
- package/esm/components/grid/grid-item/grid-item.style.js +1 -1
- package/esm/components/heading/heading.style.js +1 -1
- package/esm/components/help/help.style.js +1 -1
- package/esm/components/hr/hr.style.js +1 -1
- package/esm/components/icon/icon.style.js +1 -1
- package/esm/components/icon-button/icon-button.style.js +1 -1
- package/esm/components/image/image.style.js +1 -1
- package/esm/components/inline-inputs/inline-inputs.style.js +1 -1
- package/esm/components/link/link.style.js +1 -1
- package/esm/components/link-preview/__internal__/placeholder.component.js +1 -1
- package/esm/components/link-preview/link-preview.style.js +1 -1
- package/esm/components/loader/__next__/internal/star.style.js +1 -1
- package/esm/components/loader/__next__/loader.style.js +1 -1
- package/esm/components/loader/loader-square.style.js +1 -1
- package/esm/components/loader/loader.style.js +1 -1
- package/esm/components/loader-bar/loader-bar.style.js +1 -1
- package/esm/components/loader-spinner/loader-spinner.style.js +1 -1
- package/esm/components/loader-star/internal/star.style.js +1 -1
- package/esm/components/loader-star/loader-star.style.js +1 -1
- package/esm/components/menu/__internal__/submenu/submenu.style.js +1 -1
- package/esm/components/menu/menu-divider/menu-divider.style.js +1 -1
- package/esm/components/menu/menu-full-screen/menu-full-screen.style.js +1 -1
- package/esm/components/menu/menu-item/menu-item.style.js +1 -1
- package/esm/components/menu/menu-segment-title/menu-segment-title.style.js +1 -1
- package/esm/components/menu/menu.style.js +1 -1
- package/esm/components/menu/scrollable-block/scrollable-block.style.js +1 -1
- package/esm/components/message/message.style.js +1 -1
- package/esm/components/multi-action-button/multi-action-button.style.js +1 -1
- package/esm/components/navigation-bar/navigation-bar.style.js +1 -1
- package/esm/components/note/note.style.js +1 -1
- package/esm/components/numeral-date/numeral-date.style.js +1 -1
- package/esm/components/option-tile/option-tile.style.js +1 -1
- package/esm/components/pager/__internal__/pagination-navigation.style.js +1 -1
- package/esm/components/pager/pager.style.js +1 -1
- package/esm/components/pages/page/page.style.js +1 -1
- package/esm/components/pages/pages.style.js +1 -1
- package/esm/components/password/password.style.js +1 -1
- package/esm/components/pill/pill.style.js +1 -1
- package/esm/components/pod/pod.style.js +1 -1
- package/esm/components/popover-container/popover-container.style.js +1 -1
- package/esm/components/portal/portal.js +1 -1
- package/esm/components/portal/portal.style.js +1 -1
- package/esm/components/portrait/portrait.style.js +1 -1
- package/esm/components/preview/preview.style.js +1 -1
- package/esm/components/profile/profile.style.js +1 -1
- package/esm/components/progress-tracker/progress-tracker.style.js +1 -1
- package/esm/components/radio-button/radio-button-group/radio-button-group.style.js +1 -1
- package/esm/components/radio-button/radio-button.style.js +1 -1
- package/esm/components/search/__internal__/results-announcement.component.js +1 -1
- package/esm/components/search/search.component.js +1 -1
- package/esm/components/select/__internal__/list-action-button/list-action-button.style.js +1 -1
- package/esm/components/select/__internal__/select-list/select-list.style.js +1 -1
- package/esm/components/select/__internal__/select-textbox/select-textbox.style.js +1 -1
- package/esm/components/select/__internal__/utils/matching-text.style.js +1 -1
- package/esm/components/select/multi-select/multi-select.style.js +1 -1
- package/esm/components/select/option/option.style.js +1 -1
- package/esm/components/select/option-group-header/option-group-header.style.js +1 -1
- package/esm/components/select/option-row/option-row.style.js +1 -1
- package/esm/components/select/select.style.js +1 -1
- package/esm/components/settings-row/settings-row.style.js +1 -1
- package/esm/components/sidebar/__internal__/sidebar-content/sidebar-content.style.js +1 -1
- package/esm/components/sidebar/__internal__/sidebar-footer/sidebar-footer.style.js +1 -1
- package/esm/components/sidebar/__internal__/sidebar-header/sidebar-header.style.js +1 -1
- package/esm/components/sidebar/sidebar.style.js +1 -1
- package/esm/components/simple-color-picker/simple-color/simple-color.style.js +1 -1
- package/esm/components/simple-color-picker/simple-color-picker.style.js +1 -1
- package/esm/components/split-button/split-button-toggle.style.js +1 -1
- package/esm/components/split-button/split-button.style.js +1 -1
- package/esm/components/step-flow/step-flow.style.js +1 -1
- package/esm/components/step-sequence/step-sequence-item/step-sequence-item.style.js +1 -1
- package/esm/components/step-sequence/step-sequence.style.js +1 -1
- package/esm/components/switch/switch.style.js +1 -1
- package/esm/components/table/table-body/table-body.component.js +1 -1
- package/esm/components/table/table-cell/table-cell.style.js +1 -1
- package/esm/components/table/table-foot/table-foot.component.js +1 -1
- package/esm/components/table/table-head/table-head.component.js +1 -1
- package/esm/components/table/table-header/__internal__/sort/sort.style.js +1 -1
- package/esm/components/table/table-header/table-header.style.js +1 -1
- package/esm/components/table/table-row/table-row.style.js +1 -1
- package/esm/components/table/table.style.js +1 -1
- package/esm/components/tabs/__next__/tabs.style.js +1 -1
- package/esm/components/text-editor/__internal__/__ui__/CharacterCounter/character-counter.style.js +1 -1
- package/esm/components/text-editor/__internal__/__ui__/ContentEditor/content-editor.style.js +1 -1
- package/esm/components/text-editor/__internal__/__ui__/Mentions/mentions.style.js +1 -1
- package/esm/components/text-editor/__internal__/__ui__/Placeholder/placeholder.style.js +1 -1
- package/esm/components/text-editor/__internal__/__ui__/Toolbar/button-group/button-group.style.js +1 -1
- package/esm/components/text-editor/__internal__/__ui__/Toolbar/buttons/typography-dropdown/dropdown.style.js +1 -1
- package/esm/components/text-editor/__internal__/__ui__/Toolbar/toolbar.style.js +1 -1
- package/esm/components/text-editor/text-editor.style.js +1 -1
- package/esm/components/textarea/textarea.style.js +1 -1
- package/esm/components/textbox/__internal__/__next__/text-input.style.js +1 -1
- package/esm/components/tile/tile-footer/tile-footer.style.js +1 -1
- package/esm/components/tile/tile.style.js +1 -1
- package/esm/components/tile-select/__internal__/accordion/accordion.style.js +1 -1
- package/esm/components/tile-select/tile-select.style.js +1 -1
- package/esm/components/time/time.style.js +1 -1
- package/esm/components/toast/toast.style.js +1 -1
- package/esm/components/tokens-wrapper/tokens-wrapper.component.js +1 -1
- package/esm/components/tooltip/tooltip-pointer.style.js +1 -1
- package/esm/components/tooltip/tooltip.style.js +1 -1
- package/esm/components/typography/__internal__/__next__/typography.style.js +1 -1
- package/esm/components/typography/typography.style.js +1 -1
- package/esm/components/vertical-divider/vertical-divider.style.js +1 -1
- package/esm/components/vertical-menu/responsive-vertical-menu/responsive-vertical-menu-divider/responsive-vertical-menu-divider.style.js +1 -1
- package/esm/components/vertical-menu/responsive-vertical-menu/responsive-vertical-menu-item/responsive-vertical-menu-item.style.js +1 -1
- package/esm/components/vertical-menu/responsive-vertical-menu/responsive-vertical-menu.style.js +1 -1
- package/esm/components/vertical-menu/vertical-menu.style.js +1 -1
- package/esm/hooks/__internal__/useFloating/useFloating.js +1 -1
- package/esm/index.d.ts +2 -0
- package/esm/index.js +1 -1
- package/esm/locales/en-gb.js +1 -1
- package/esm/locales/locale.d.ts +1 -0
- package/esm/style/design-tokens/carbon-scoped-tokens-provider/carbon-scoped-tokens-provider.component.js +1 -1
- package/lib/__internal__/character-count/character-count.style.js +1 -1
- package/lib/__internal__/checkable-input/checkable-input.style.js +1 -1
- package/lib/__internal__/checkable-input/hidden-checkable-input.style.js +1 -1
- package/lib/__internal__/error-border/error-border.style.js +1 -1
- package/lib/__internal__/field-help/field-help.style.js +1 -1
- package/lib/__internal__/fieldset/__next__/fieldset.style.js +1 -1
- package/lib/__internal__/fieldset/fieldset.style.js +1 -1
- package/lib/__internal__/form-field/form-field.style.js +1 -1
- package/lib/__internal__/full-screen-heading/full-screen-heading.style.js +1 -1
- package/lib/__internal__/hint-text/hint-text.style.js +1 -1
- package/lib/__internal__/input/input.style.js +1 -1
- package/lib/__internal__/input-icon-toggle/input-icon-toggle.style.js +1 -1
- package/lib/__internal__/label/label.style.js +1 -1
- package/lib/__internal__/legacy-error-border/error-border.style.js +1 -1
- package/lib/__internal__/legacy-hint-text/hint-text.style.js +1 -1
- package/lib/__internal__/legacy-input/input-presentation.style.js +1 -1
- package/lib/__internal__/legacy-input/input.style.js +1 -1
- package/lib/__internal__/legacy-label/icon-wrapper.style.js +1 -1
- package/lib/__internal__/legacy-label/label.style.js +1 -1
- package/lib/__internal__/modal/modal.style.js +1 -1
- package/lib/__internal__/popover/popover.style.js +1 -1
- package/lib/__internal__/popover-menu/hooks/index.d.ts +1 -0
- package/lib/__internal__/popover-menu/hooks/useHandleDropdownMenuKeyDown.d.ts +7 -1
- package/lib/__internal__/popover-menu/hooks/useHandleDropdownMenuKeyDown.js +1 -1
- package/lib/__internal__/popover-menu/menu-item/menu-item-content/menu-item-label.component.js +1 -1
- package/lib/__internal__/popover-menu/menu-item/menu-item-content/menu-item-leading.component.js +1 -1
- package/lib/__internal__/popover-menu/menu-item/menu-item-content/menu-item-subtext.component.js +1 -1
- package/lib/__internal__/popover-menu/menu-item/menu-item-divider/menu-item-divider.component.js +1 -1
- package/lib/__internal__/popover-menu/menu-item/menu-item-heading/menu-item-heading.component.js +1 -1
- package/lib/__internal__/popover-menu/menu-item/menu-item.component.js +1 -1
- package/lib/__internal__/popover-menu/popover-menu.component.d.ts +6 -1
- package/lib/__internal__/popover-menu/popover-menu.component.js +1 -1
- package/lib/__internal__/validation-message/__next__/validation-message.style.js +1 -1
- package/lib/__internal__/validation-message/validation-message.style.js +1 -1
- package/lib/__internal__/validations/validation-icon.style.js +1 -1
- package/lib/components/accordion/accordion.style.js +1 -1
- package/lib/components/action-popover/__internal__/action-popover.context.d.ts +0 -4
- package/lib/components/action-popover/__internal__/action-popover.utils.d.ts +2 -7
- package/lib/components/action-popover/__internal__/action-popover.utils.js +1 -1
- package/lib/components/action-popover/action-popover-divider/action-popover-divider.component.d.ts +1 -1
- package/lib/components/action-popover/action-popover-divider/action-popover-divider.component.js +1 -1
- package/lib/components/action-popover/action-popover-item/action-popover-item.component.d.ts +2 -7
- package/lib/components/action-popover/action-popover-item/action-popover-item.component.js +1 -1
- package/lib/components/action-popover/action-popover-menu/action-popover-menu.component.d.ts +4 -23
- package/lib/components/action-popover/action-popover-menu/action-popover-menu.component.js +1 -1
- package/lib/components/action-popover/action-popover-menu-button/action-popover-menu-button.component.d.ts +23 -20
- package/lib/components/action-popover/action-popover-menu-button/action-popover-menu-button.component.js +1 -1
- package/lib/components/action-popover/action-popover.component.d.ts +17 -6
- package/lib/components/action-popover/action-popover.component.js +1 -1
- package/lib/components/action-popover/action-popover.style.d.ts +1 -21
- package/lib/components/action-popover/action-popover.style.js +1 -1
- package/lib/components/action-popover/index.js +1 -1
- package/lib/components/adaptive-sidebar/adaptive-sidebar.style.js +1 -1
- package/lib/components/advanced-color-picker/advanced-color-picker-cell.style.js +1 -1
- package/lib/components/advanced-color-picker/advanced-color-picker.style.js +1 -1
- package/lib/components/anchor-navigation/anchor-navigation-item/anchor-navigation-item.style.js +1 -1
- package/lib/components/anchor-navigation/anchor-navigation.style.js +1 -1
- package/lib/components/anchor-navigation/anchor-section-divider.component.js +1 -1
- package/lib/components/badge/badge.style.js +1 -1
- package/lib/components/batch-selection/batch-selection.style.js +1 -1
- package/lib/components/box/box.style.js +1 -1
- package/lib/components/breadcrumbs/breadcrumbs.style.js +1 -1
- package/lib/components/breadcrumbs/crumb/crumb.style.js +1 -1
- package/lib/components/button/__next__/button.style.js +1 -1
- package/lib/components/button/button.style.js +1 -1
- package/lib/components/button-bar/button-bar.style.js +1 -1
- package/lib/components/button-minor/button-minor.style.js +1 -1
- package/lib/components/button-toggle/button-toggle-group/button-toggle-group.style.js +1 -1
- package/lib/components/button-toggle/button-toggle.style.js +1 -1
- package/lib/components/card/card-column/card-column.style.js +1 -1
- package/lib/components/card/card-footer/card-footer.style.js +1 -1
- package/lib/components/card/card-row/card-row.style.js +1 -1
- package/lib/components/card/card.style.js +1 -1
- package/lib/components/checkbox/checkbox-group/checkbox-group.style.js +1 -1
- package/lib/components/checkbox/checkbox.style.js +1 -1
- package/lib/components/confirm/confirm.style.js +1 -1
- package/lib/components/content/content.style.js +1 -1
- package/lib/components/date/__internal__/calendar/calendar-close-button.style.js +1 -1
- package/lib/components/date/__internal__/calendar/calendar-navigation.style.js +1 -1
- package/lib/components/date/__internal__/calendar/calendar-select/calendar-select.style.js +1 -1
- package/lib/components/date/__internal__/calendar/calendar-weekday.style.js +1 -1
- package/lib/components/date/__internal__/date-picker/date-picker.style.js +1 -1
- package/lib/components/date/__internal__/date-picker-trigger/date-picker-trigger.style.js +1 -1
- package/lib/components/date/date.style.js +1 -1
- package/lib/components/date-range/date-range.style.js +1 -1
- package/lib/components/decimal/__internal__/decimal-popover-button.style.js +1 -1
- package/lib/components/decimal/decimal.style.js +1 -1
- package/lib/components/definition-list/definition-list.style.d.ts +1 -1
- package/lib/components/definition-list/definition-list.style.js +1 -1
- package/lib/components/detail/detail.style.js +1 -1
- package/lib/components/dialog/__internal__/__next__/dialog.style.js +1 -1
- package/lib/components/dismissible-box/dismissible-box.style.js +1 -1
- package/lib/components/divider/divider.style.js +1 -1
- package/lib/components/draggable/draggable-item/draggable-item.style.js +1 -1
- package/lib/components/drawer/drawer.style.js +1 -1
- package/lib/components/duelling-picklist/duelling-picklist.style.js +1 -1
- package/lib/components/duelling-picklist/picklist/picklist.style.js +1 -1
- package/lib/components/duelling-picklist/picklist-divider/picklist-divider.style.js +1 -1
- package/lib/components/duelling-picklist/picklist-group/picklist-group.style.js +1 -1
- package/lib/components/duelling-picklist/picklist-item/picklist-item.style.js +1 -1
- package/lib/components/fieldset/fieldset.style.js +1 -1
- package/lib/components/file-input/__internal__/file-upload-status/file-upload-status.style.js +1 -1
- package/lib/components/file-input/file-input.style.js +1 -1
- package/lib/components/flat-table/flat-table-body-draggable/flat-table-body-draggable.style.js +1 -1
- package/lib/components/flat-table/flat-table-cell/flat-table-cell.style.js +1 -1
- package/lib/components/flat-table/flat-table-checkbox/flat-table-checkbox.style.js +1 -1
- package/lib/components/flat-table/flat-table-head/flat-table-head.style.js +1 -1
- package/lib/components/flat-table/flat-table-header/flat-table-header.style.js +1 -1
- package/lib/components/flat-table/flat-table-row/flat-table-row.component.js +1 -1
- package/lib/components/flat-table/flat-table-row/flat-table-row.style.js +1 -1
- package/lib/components/flat-table/flat-table-row-header/flat-table-row-header.style.js +1 -1
- package/lib/components/flat-table/flat-table.style.js +1 -1
- package/lib/components/flat-table/sort/sort.style.js +1 -1
- package/lib/components/form/__internal__/form-summary.style.js +1 -1
- package/lib/components/form/form.style.js +1 -1
- package/lib/components/form/required-fields-indicator/required-fields-indicator.component.js +1 -1
- package/lib/components/global-header/global-header.component.js +1 -1
- package/lib/components/grid/grid-container/grid-container.style.js +1 -1
- package/lib/components/grid/grid-item/grid-item.style.js +1 -1
- package/lib/components/heading/heading.style.js +1 -1
- package/lib/components/help/help.style.js +1 -1
- package/lib/components/hr/hr.style.js +1 -1
- package/lib/components/icon/icon.style.js +1 -1
- package/lib/components/icon-button/icon-button.style.js +1 -1
- package/lib/components/image/image.style.js +1 -1
- package/lib/components/inline-inputs/inline-inputs.style.js +1 -1
- package/lib/components/link/link.style.js +1 -1
- package/lib/components/link-preview/__internal__/placeholder.component.js +1 -1
- package/lib/components/link-preview/link-preview.style.js +1 -1
- package/lib/components/loader/__next__/internal/star.style.js +1 -1
- package/lib/components/loader/__next__/loader.style.js +1 -1
- package/lib/components/loader/loader-square.style.js +1 -1
- package/lib/components/loader/loader.style.js +1 -1
- package/lib/components/loader-bar/loader-bar.style.js +1 -1
- package/lib/components/loader-spinner/loader-spinner.style.js +1 -1
- package/lib/components/loader-star/internal/star.style.js +1 -1
- package/lib/components/loader-star/loader-star.style.js +1 -1
- package/lib/components/menu/__internal__/submenu/submenu.style.js +1 -1
- package/lib/components/menu/menu-divider/menu-divider.style.js +1 -1
- package/lib/components/menu/menu-full-screen/menu-full-screen.style.js +1 -1
- package/lib/components/menu/menu-item/menu-item.style.js +1 -1
- package/lib/components/menu/menu-segment-title/menu-segment-title.style.js +1 -1
- package/lib/components/menu/menu.style.js +1 -1
- package/lib/components/menu/scrollable-block/scrollable-block.style.js +1 -1
- package/lib/components/message/message.style.js +1 -1
- package/lib/components/multi-action-button/multi-action-button.style.js +1 -1
- package/lib/components/navigation-bar/navigation-bar.style.js +1 -1
- package/lib/components/note/note.style.js +1 -1
- package/lib/components/numeral-date/numeral-date.style.js +1 -1
- package/lib/components/option-tile/option-tile.style.js +1 -1
- package/lib/components/pager/__internal__/pagination-navigation.style.js +1 -1
- package/lib/components/pager/pager.style.js +1 -1
- package/lib/components/pages/page/page.style.js +1 -1
- package/lib/components/pages/pages.style.js +1 -1
- package/lib/components/password/password.style.js +1 -1
- package/lib/components/pill/pill.style.js +1 -1
- package/lib/components/pod/pod.style.js +1 -1
- package/lib/components/popover-container/popover-container.style.js +1 -1
- package/lib/components/portal/portal.js +1 -1
- package/lib/components/portal/portal.style.js +1 -1
- package/lib/components/portrait/portrait.style.js +1 -1
- package/lib/components/preview/preview.style.js +1 -1
- package/lib/components/profile/profile.style.js +1 -1
- package/lib/components/progress-tracker/progress-tracker.style.js +1 -1
- package/lib/components/radio-button/radio-button-group/radio-button-group.style.js +1 -1
- package/lib/components/radio-button/radio-button.style.js +1 -1
- package/lib/components/search/__internal__/results-announcement.component.js +1 -1
- package/lib/components/search/search.component.js +1 -1
- package/lib/components/select/__internal__/list-action-button/list-action-button.style.js +1 -1
- package/lib/components/select/__internal__/select-list/select-list.style.js +1 -1
- package/lib/components/select/__internal__/select-textbox/select-textbox.style.js +1 -1
- package/lib/components/select/__internal__/utils/matching-text.style.js +1 -1
- package/lib/components/select/multi-select/multi-select.style.js +1 -1
- package/lib/components/select/option/option.style.js +1 -1
- package/lib/components/select/option-group-header/option-group-header.style.js +1 -1
- package/lib/components/select/option-row/option-row.style.js +1 -1
- package/lib/components/select/select.style.js +1 -1
- package/lib/components/settings-row/settings-row.style.js +1 -1
- package/lib/components/sidebar/__internal__/sidebar-content/sidebar-content.style.js +1 -1
- package/lib/components/sidebar/__internal__/sidebar-footer/sidebar-footer.style.js +1 -1
- package/lib/components/sidebar/__internal__/sidebar-header/sidebar-header.style.js +1 -1
- package/lib/components/sidebar/sidebar.style.js +1 -1
- package/lib/components/simple-color-picker/simple-color/simple-color.style.js +1 -1
- package/lib/components/simple-color-picker/simple-color-picker.style.js +1 -1
- package/lib/components/split-button/split-button-toggle.style.js +1 -1
- package/lib/components/split-button/split-button.style.js +1 -1
- package/lib/components/step-flow/step-flow.style.js +1 -1
- package/lib/components/step-sequence/step-sequence-item/step-sequence-item.style.js +1 -1
- package/lib/components/step-sequence/step-sequence.style.js +1 -1
- package/lib/components/switch/switch.style.js +1 -1
- package/lib/components/table/table-body/table-body.component.js +1 -1
- package/lib/components/table/table-cell/table-cell.style.js +1 -1
- package/lib/components/table/table-foot/table-foot.component.js +1 -1
- package/lib/components/table/table-head/table-head.component.js +1 -1
- package/lib/components/table/table-header/__internal__/sort/sort.style.js +1 -1
- package/lib/components/table/table-header/table-header.style.js +1 -1
- package/lib/components/table/table-row/table-row.style.js +1 -1
- package/lib/components/table/table.style.js +1 -1
- package/lib/components/tabs/__next__/tabs.style.js +1 -1
- package/lib/components/text-editor/__internal__/__ui__/CharacterCounter/character-counter.style.js +1 -1
- package/lib/components/text-editor/__internal__/__ui__/ContentEditor/content-editor.style.js +1 -1
- package/lib/components/text-editor/__internal__/__ui__/Mentions/mentions.style.js +1 -1
- package/lib/components/text-editor/__internal__/__ui__/Placeholder/placeholder.style.js +1 -1
- package/lib/components/text-editor/__internal__/__ui__/Toolbar/button-group/button-group.style.js +1 -1
- package/lib/components/text-editor/__internal__/__ui__/Toolbar/buttons/typography-dropdown/dropdown.style.js +1 -1
- package/lib/components/text-editor/__internal__/__ui__/Toolbar/toolbar.style.js +1 -1
- package/lib/components/text-editor/text-editor.style.js +1 -1
- package/lib/components/textarea/textarea.style.js +1 -1
- package/lib/components/textbox/__internal__/__next__/text-input.style.js +1 -1
- package/lib/components/tile/tile-footer/tile-footer.style.js +1 -1
- package/lib/components/tile/tile.style.js +1 -1
- package/lib/components/tile-select/__internal__/accordion/accordion.style.js +1 -1
- package/lib/components/tile-select/tile-select.style.js +1 -1
- package/lib/components/time/time.style.js +1 -1
- package/lib/components/toast/toast.style.js +1 -1
- package/lib/components/tokens-wrapper/tokens-wrapper.component.js +1 -1
- package/lib/components/tooltip/tooltip-pointer.style.js +1 -1
- package/lib/components/tooltip/tooltip.style.js +1 -1
- package/lib/components/typography/__internal__/__next__/typography.style.js +1 -1
- package/lib/components/typography/typography.style.js +1 -1
- package/lib/components/vertical-divider/vertical-divider.style.js +1 -1
- package/lib/components/vertical-menu/responsive-vertical-menu/responsive-vertical-menu-divider/responsive-vertical-menu-divider.style.js +1 -1
- package/lib/components/vertical-menu/responsive-vertical-menu/responsive-vertical-menu-item/responsive-vertical-menu-item.style.js +1 -1
- package/lib/components/vertical-menu/responsive-vertical-menu/responsive-vertical-menu.style.js +1 -1
- package/lib/components/vertical-menu/vertical-menu.style.js +1 -1
- package/lib/hooks/__internal__/useFloating/useFloating.js +1 -1
- package/lib/index.d.ts +2 -0
- package/lib/index.js +1 -1
- package/lib/locales/en-gb.js +1 -1
- package/lib/locales/locale.d.ts +1 -0
- package/lib/style/design-tokens/carbon-scoped-tokens-provider/carbon-scoped-tokens-provider.component.js +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("styled-components");function t(e){return e&&e.__esModule?e:{default:e}}var a=t(e);const i=a.default.label.withConfig({displayName:"label.style__StyledLabel",componentId:"
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("styled-components");function t(e){return e&&e.__esModule?e:{default:e}}var a=t(e);const i=a.default.label.withConfig({displayName:"label.style__StyledLabel",componentId:"carbon_v162_21_0__sc-1af3965d-0"})([""," display:block;font-weight:var(--fontWeights500);"," "," ",""],(({isDarkBackground:t})=>e.css(["color:",";"],t?"var(--colorsUtilityYang100)":"var(--colorsUtilityYin090)")),(({isLarge:t})=>t&&e.css(["font-size:var(--fontSizes200);"])),(({isRequired:t})=>t&&e.css(['::after{content:"*";color:var(--colorsSemanticNegative500);font-weight:var(--fontWeights500);margin-left:var(--spacing050);}'])),(({disabled:t})=>t&&e.css(["color:var(--input-labelset-label-disabled);"]))),s=a.default.div.withConfig({displayName:"label.style__StyledLabelContainer",componentId:"carbon_v162_21_0__sc-1af3965d-1"})(["display:flex;align-items:center;margin-bottom:8px;.fieldset-content &{margin-bottom:var(--global-space-comp-xs);}"," ",""],(({align:t})=>e.css(["justify-content:",";"],"right"!==t?"flex-start":"flex-end")),(({inline:t,pr:a,width:i})=>t&&e.css(["box-sizing:border-box;margin-bottom:0;",";width:","%;"],a&&e.css(["padding-right:var(",");"],1===a?"--spacing100":"--spacing200"),i)));exports.StyledLabelContainer=s,exports.default=i;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var t=require("styled-components"),e=require("../../style/themes/apply-base-theme.js");function a(t){return t&&t.__esModule?t:{default:t}}var i=a(t);const o=i.default.div.withConfig({displayName:"modal.style__StyledModalBackground",componentId:"
|
|
1
|
+
"use strict";var t=require("styled-components"),e=require("../../style/themes/apply-base-theme.js");function a(t){return t&&t.__esModule?t:{default:t}}var i=a(t);const o=i.default.div.withConfig({displayName:"modal.style__StyledModalBackground",componentId:"carbon_v162_21_0__sc-1ca46940-0"})(["background-color:var(--container-standard-dimmer);bottom:0;left:0;position:fixed;right:0;top:0;",";"],(({transitionName:e,transitionTime:a})=>t.css(["&.","-enter,.","-appear{opacity:0;}&.","-enter.","-enter-active,&.","-appear.","-appear-active{opacity:1;transition:opacity ","ms ease-out;}&.","-exit.","-exit-active{opacity:0;transition:opacity ","ms 100ms ease-out;}"],e,e,e,e,e,e,a,e,e,a))),n=i.default.div.attrs(e.default).withConfig({displayName:"modal.style__StyledModal",componentId:"carbon_v162_21_0__sc-1ca46940-1"})(["position:absolute;z-index:",";",""],(({theme:t,topModalOverride:e})=>`${e?t.zIndex.notification:t.zIndex.modal}`),(({transitionName:e,transitionTime:a})=>t.css([".","-enter,.","-appear{opacity:0;}.","-enter.","-enter-active,.","-appear.","-appear-active{opacity:1;transition:all ","ms 100ms ease-out;}.","-exit.","-exit-active{opacity:0;transition:all ","ms ease-out;}"],e,e,e,e,e,e,a,e,e,a)));exports.StyledModal=n,exports.StyledModalBackground=o;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("styled-components"),t=require("../../style/themes/apply-base-theme.js");function o(e){return e&&e.__esModule?e:{default:e}}var d=o(e);const r=d.default.div.attrs(t.default).withConfig({displayName:"popover.style__StyledBackdrop",componentId:"
|
|
1
|
+
"use strict";var e=require("styled-components"),t=require("../../style/themes/apply-base-theme.js");function o(e){return e&&e.__esModule?e:{default:e}}var d=o(e);const r=d.default.div.attrs(t.default).withConfig({displayName:"popover.style__StyledBackdrop",componentId:"carbon_v162_21_0__sc-fb4df9e5-0"})(["bottom:0;left:0;position:fixed;right:0;top:0;z-index:var( --adaptiveSidebarModalBackdrop,"," );background:transparent;"],(({theme:e})=>e.zIndex.popover)),a=d.default.div.withConfig({displayName:"popover.style__StyledPopoverContent",componentId:"carbon_v162_21_0__sc-fb4df9e5-1"})(["",""],(({hide:e})=>e&&"display: none;"));exports.StyledBackdrop=r,exports.StyledPopoverContent=a;
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import { MutableRefObject } from "react";
|
|
2
2
|
export declare const setFocus: (el?: HTMLElement, highlightedItem?: HTMLElement, isButtonMenu?: boolean) => void;
|
|
3
|
+
export interface TypeaheadHandler {
|
|
4
|
+
ev: React.KeyboardEvent<HTMLElement>;
|
|
5
|
+
items: HTMLElement[];
|
|
6
|
+
setAriaActivedescendant: React.Dispatch<React.SetStateAction<string>>;
|
|
7
|
+
focus: typeof setFocus;
|
|
8
|
+
}
|
|
3
9
|
export declare const useHandleDropdownMenuKeyDown: (ref: MutableRefObject<HTMLUListElement | null>, setAriaActivedescendant: React.Dispatch<React.SetStateAction<string>>, onClose: (e?: Event) => void, submenuOptions: {
|
|
4
10
|
isButtonMenu?: boolean;
|
|
5
11
|
isSubmenu?: boolean;
|
|
6
12
|
controlReference?: React.RefObject<HTMLLIElement>;
|
|
7
|
-
}) => (ev: React.KeyboardEvent<HTMLElement>) => void;
|
|
13
|
+
}, typeahead?: (args: TypeaheadHandler) => void) => (ev: React.KeyboardEvent<HTMLElement>) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("react"),t=require("../utils/index.js");const n=(e,t,n)=>{var l;n?null==e||e.focus():(null==t||t.setAttribute("data-has-focus","false"),null==e||e.setAttribute("data-has-focus","true"),null==e||null===(l=e.scrollIntoView)||void 0===l||l.call(e,{block:"nearest",inline:"nearest"}))};exports.setFocus=n,exports.useHandleDropdownMenuKeyDown=(l,o,
|
|
1
|
+
"use strict";var e=require("react"),t=require("../utils/index.js");const n=(e,t,n)=>{var l;n?null==e||e.focus():(null==t||t.setAttribute("data-has-focus","false"),null==e||e.setAttribute("data-has-focus","true"),null==e||null===(l=e.scrollIntoView)||void 0===l||l.call(e,{block:"nearest",inline:"nearest"}))};exports.setFocus=n,exports.useHandleDropdownMenuKeyDown=(l,i,o,r,u)=>e.useCallback((e=>{var d,a;const v=null===(d=document.activeElement)||void 0===d?void 0:d.closest('[data-component="scroll-wrapper"]');if(v&&!v.contains(l.current))return;const{isButtonMenu:s,isSubmenu:c}=r,f=Array.from((null===(a=l.current)||void 0===a?void 0:a.querySelectorAll(s?t.buttonMenuItemQuerySelector(c):t.itemQuerySelector(c)))||[]),p=f[0],m=f[f.length-1],y=s?f.find((e=>e.contains(document.activeElement))):f.find((e=>"true"===e.getAttribute("data-has-focus"))),g=f.find((e=>"true"===e.getAttribute("aria-selected")));if(u&&u({ev:e,items:f,setAriaActivedescendant:i,focus:n}),"ArrowDown"===e.key){if(e.preventDefault(),e.stopPropagation(),!y){const e=null!=g?g:p;var h;return i(null!==(h=null==e?void 0:e.id)&&void 0!==h?h:""),void n(e,y,s)}var A;if(!s&&m===y)return i(null!==(A=null==p?void 0:p.id)&&void 0!==A?A:""),void n(p,y,s);const t=f.indexOf(y),l=f[s?Math.min(t+1,f.length-1):(t+1)%f.length];var b;return i(null!==(b=null==l?void 0:l.id)&&void 0!==b?b:""),void n(l,y,s)}if("ArrowUp"===e.key){if(e.preventDefault(),e.stopPropagation(),!y){const e=null!=g?g:m;var k;return i(null!==(k=null==e?void 0:e.id)&&void 0!==k?k:""),void n(e,y,s)}var D;if(!s&&p===y)return i(null!==(D=null==m?void 0:m.id)&&void 0!==D?D:""),void n(m,y,s);const t=f.indexOf(y),l=f[s?Math.max(t-1,0):(t-1+f.length)%f.length];var w;return i(null!==(w=null==l?void 0:l.id)&&void 0!==w?w:""),void n(l,y,s)}var x,E;return"Home"===e.key?(e.preventDefault(),i(null!==(x=null==p?void 0:p.id)&&void 0!==x?x:""),void n(p,y,s)):"End"===e.key?(e.preventDefault(),i(null!==(E=null==m?void 0:m.id)&&void 0!==E?E:""),void n(m,y,s)):("Enter"!==e.key||s||y&&(e.preventDefault(),e.stopPropagation(),y.click()),void("Tab"!==e.key||o(e.nativeEvent)))}),[l,i,o,r,u]);
|
package/lib/__internal__/popover-menu/menu-item/menu-item-content/menu-item-label.component.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),n=require("styled-components"),r=require("../../contexts/popover-menu.context.js");function o(e){return e&&e.__esModule?e:{default:e}}require("../../contexts/menu-heading.context.js"),require("../../contexts/menu-item.context.js");const i=o(n).default.span.withConfig({displayName:"menu-item-label.component__StyledMenuItemLabel",componentId:"
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),n=require("styled-components"),r=require("../../contexts/popover-menu.context.js");function o(e){return e&&e.__esModule?e:{default:e}}require("../../contexts/menu-heading.context.js"),require("../../contexts/menu-item.context.js");const i=o(n).default.span.withConfig({displayName:"menu-item-label.component__StyledMenuItemLabel",componentId:"carbon_v162_21_0__sc-3e81ec8-0"})(["grid-column:-2 / -1;grid-row:1;",""],(({$size:e})=>n.css(["span.menu-item-label-prefix{font:var(--global-font-static-comp-medium-",");}"],e.charAt(0)))),s=({children:n,prefix:o})=>{const{size:s}=t.useContext(r.PopoverMenuContext);return e.jsxs(i,{"data-element":"menu-item-label",$size:s,children:[o&&e.jsx("span",{"data-element":"menu-item-label-prefix",className:"menu-item-label-prefix",children:o}),n]})};s.displayName="PopoverMenuItemLabel",exports.default=s;
|
package/lib/__internal__/popover-menu/menu-item/menu-item-content/menu-item-leading.component.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),n=require("react"),t=require("styled-components"),o=require("../../contexts/popover-menu.context.js");require("../../contexts/menu-heading.context.js"),require("../../contexts/menu-item.context.js");var i=require("../../../../components/icon/icon.component.js");function c(e){return e&&e.__esModule?e:{default:e}}require("../../../../components/icon/icon.style.js");var r=c(t);const a=r.default.span.withConfig({displayName:"menu-item-leading.component__StyledMenuItemLeading",componentId:"
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),n=require("react"),t=require("styled-components"),o=require("../../contexts/popover-menu.context.js");require("../../contexts/menu-heading.context.js"),require("../../contexts/menu-item.context.js");var i=require("../../../../components/icon/icon.component.js");function c(e){return e&&e.__esModule?e:{default:e}}require("../../../../components/icon/icon.style.js");var r=c(t);const a=r.default.span.withConfig({displayName:"menu-item-leading.component__StyledMenuItemLeading",componentId:"carbon_v162_21_0__sc-38bfc3f-0"})(['display:flex;grid-row:1;[data-component="icon"]{width:20px;height:20px;}']),s=r.default.span.withConfig({displayName:"menu-item-leading.component__StyledSelectedIconWrapper",componentId:"carbon_v162_21_0__sc-38bfc3f-1"})(["",""],(({$hasIcon:e})=>`\n padding: 0 var(--global-space-comp-2-xs);\n visibility: ${e?"visible":"hidden"};\n `)),d=({children:t,selectedIcon:c=!1})=>{const{isButtonMenu:r}=n.useContext(o.PopoverMenuContext);return e.jsxs(a,{className:"menu-item-leading","data-element":"leading",children:[!r&&e.jsx(s,{"data-role":"selected-icon-wrapper",$hasIcon:c,children:e.jsx(i.default,{type:"tick_thick","data-role":"selected-icon"})}),t]})};d.displayName="PopoverMenuItemLeading",exports.default=d;
|
package/lib/__internal__/popover-menu/menu-item/menu-item-content/menu-item-subtext.component.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),n=require("styled-components"),o=require("../../contexts/popover-menu.context.js");function r(e){return e&&e.__esModule?e:{default:e}}require("../../contexts/menu-heading.context.js"),require("../../contexts/menu-item.context.js");const s=r(n).default.span.withConfig({displayName:"menu-item-subtext.component__StyledMenuItemSubtext",componentId:"
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),n=require("styled-components"),o=require("../../contexts/popover-menu.context.js");function r(e){return e&&e.__esModule?e:{default:e}}require("../../contexts/menu-heading.context.js"),require("../../contexts/menu-item.context.js");const s=r(n).default.span.withConfig({displayName:"menu-item-subtext.component__StyledMenuItemSubtext",componentId:"carbon_v162_21_0__sc-8eef9447-0"})(["grid-column:-2 / -1;grid-row:2;color:var(--input-dropdown-label-subtxt);",""],(({$size:e})=>n.css([""," ",""],("small"===e||"medium"===e)&&"\n font: var(--global-font-static-comp-regular-xs);\n ","large"===e&&"\n font: var(--global-font-static-comp-regular-s);\n "))),u=({children:n})=>{const{size:r}=t.useContext(o.PopoverMenuContext);return e.jsx(s,{"data-element":"menu-item-subtext",className:"menu-item-subtext",$size:r,children:n})};u.displayName="PopoverMenuItemSubtext",exports.default=u;
|
package/lib/__internal__/popover-menu/menu-item/menu-item-divider/menu-item-divider.component.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime");require("react");var r=require("styled-components"),i=require("../../../../components/divider/divider.component.js");function o(e){return e&&e.__esModule?e:{default:e}}const t=o(r).default.li.withConfig({displayName:"menu-item-divider.component__StyledMenuItemDivider",componentId:"
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime");require("react");var r=require("styled-components"),i=require("../../../../components/divider/divider.component.js");function o(e){return e&&e.__esModule?e:{default:e}}const t=o(r).default.li.withConfig({displayName:"menu-item-divider.component__StyledMenuItemDivider",componentId:"carbon_v162_21_0__sc-dae620b3-0"})(["margin:var(--global-space-comp-m);hr{background-color:var(--container-standard-border-default);height:var(--global-borderwidth-xs);}"]),d=()=>e.jsx(t,{"data-component":"popover-menu-divider","aria-hidden":"true",children:e.jsx(i.Divider,{m:0,type:"horizontal"})});d.displayName="PopoverMenuItemDivider",exports.default=d;
|
package/lib/__internal__/popover-menu/menu-item/menu-item-heading/menu-item-heading.component.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),n=require("styled-components"),r=require("../../contexts/popover-menu.context.js"),o=require("../../contexts/menu-heading.context.js");require("../../contexts/menu-item.context.js");var i=require("../../../utils/helpers/guid/index.js");function a(e){return e&&e.__esModule?e:{default:e}}var c=a(n);function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){l(e,t,n[t])}))}return e}function u(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e}const d=c.default.div.withConfig({displayName:"menu-item-heading.component__StyledMenuHeadingWithIcon",componentId:"
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),n=require("styled-components"),r=require("../../contexts/popover-menu.context.js"),o=require("../../contexts/menu-heading.context.js");require("../../contexts/menu-item.context.js");var i=require("../../../utils/helpers/guid/index.js");function a(e){return e&&e.__esModule?e:{default:e}}var c=a(n);function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){l(e,t,n[t])}))}return e}function u(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e}const d=c.default.div.withConfig({displayName:"menu-item-heading.component__StyledMenuHeadingWithIcon",componentId:"carbon_v162_21_0__sc-f76e7b6a-0"})(["display:flex;align-items:center;gap:",";"],(({$size:e})=>"small"===e?"var(--global-space-comp-2-xs)":"var(--global-space-comp-xs)")),p=c.default.li.withConfig({displayName:"menu-item-heading.component__StyledMenuHeading",componentId:"carbon_v162_21_0__sc-f76e7b6a-1"})(['div[data-element="text"]{'," color:var(--input-dropdown-label-alt);}ul{margin:0;padding:0;list-style:none;overflow:hidden;}"],(({$size:e})=>`\n padding: 0 var(--global-space-comp-m);\n font: var(--global-font-static-comp-medium-${e.charAt(0)});\n margin-left: calc(var(--global-space-comp-m) - 2px);\n `)),m=({children:n,text:a,icon:c})=>{const{size:l}=t.useContext(r.PopoverMenuContext),m=t.useRef(`popover-menu-heading-${i.default()}`),f={"data-element":"text",id:m.current};return e.jsxs(p,{"data-component":"popover-menu-item-heading",$size:l,role:"option",children:[c?e.jsxs(d,u(s({"data-role":"text-with-icon",$size:l},f),{children:[c,a]})):e.jsx("div",u(s({},f),{children:a})),e.jsx(o.default.Provider,{value:{headingId:m.current},children:e.jsx("ul",{role:"listbox","aria-label":a,children:n})})]})};m.displayName="PopoverMenuItemHeading",exports.default=m;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),n=require("react"),o=require("styled-components"),t=require("../contexts/popover-menu.context.js"),r=require("../contexts/menu-heading.context.js"),a=require("../contexts/menu-item.context.js"),l=require("../../utils/helpers/guid/index.js"),u=require("../../../components/icon/icon.component.js");require("../../../components/icon/icon.style.js");var i=require("../utils/index.js");function s(e){return e&&e.__esModule?e:{default:e}}var c=s(n),d=s(o);function p(e,n,o){return n in e?Object.defineProperty(e,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[n]=o,e}function
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),n=require("react"),o=require("styled-components"),t=require("../contexts/popover-menu.context.js"),r=require("../contexts/menu-heading.context.js"),a=require("../contexts/menu-item.context.js"),l=require("../../utils/helpers/guid/index.js"),u=require("../../../components/icon/icon.component.js");require("../../../components/icon/icon.style.js");var i=require("../utils/index.js");function s(e){return e&&e.__esModule?e:{default:e}}var c=s(n),d=s(o);function p(e,n,o){return n in e?Object.defineProperty(e,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[n]=o,e}function m(e){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{},t=Object.keys(o);"function"==typeof Object.getOwnPropertySymbols&&(t=t.concat(Object.getOwnPropertySymbols(o).filter((function(e){return Object.getOwnPropertyDescriptor(o,e).enumerable})))),t.forEach((function(n){p(e,n,o[n])}))}return e}function b(e,n){return n=null!=n?n:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):function(e){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n.push.apply(n,o)}return n}(Object(n)).forEach((function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(n,o))})),e}const v=d.default.li.withConfig({displayName:"menu-item.component__StyledMenuItem",componentId:"carbon_v162_21_0__sc-29021491-0"})(['width:100%;position:relative;box-sizing:border-box;& > [data-element="submenu-parent"] > [data-role="button-child-container"]{flex:1;}&:not(:has(button)):not(:has(a)){'," display:grid;grid-template-columns:auto 1fr;align-items:center;column-gap:var(--global-space-comp-xs);&:not(:has(.menu-item-leading)){grid-template-columns:1fr;}}"," "," ",""],(({$disabled:e})=>e?"\n * {\n color: var(--input-dropdown-label-disabled);\n }\n cursor: not-allowed;\n ":"\n color: var(--input-dropdown-label-alt);\n cursor: pointer;\n\n :hover {\n * {\n color: var(--input-dropdown-label-hover);\n }\n background-color: var(--input-dropdown-bg-hover);\n }\n "),(({$disabled:e,$isButtonMenu:n})=>e?`\n * {\n color: var(--${n?"popover-label-disabled":"input-dropdown-label-disabled"});\n }\n\n & > button, & > a {\n background-color: transparent;\n }\n cursor: not-allowed;\n `:`\n cursor: pointer;\n\n ${n?"\n color: var(--popover-label-default);\n\n & > button:active,\n & > a:active {\n background-color: var(--popover-bg-active);\n color: var(--popover-label-active);\n }\n\n & > button:not(:active):hover,\n & > a:not(:active):hover {\n color: var(--popover-label-hover);\n background-color: var(--popover-bg-hover);\n }\n ":"\n color: var(--input-dropdown-label-alt);\n\n &:not(:active):hover {\n * {\n color: var(--input-dropdown-label-hover);\n }\n background-color: var(--popover-bg-hover);\n }\n "}\n `),(({$isButtonMenu:e})=>o.css(["",""],e?"\n &:focus {\n outline: none;\n }\n ":'\n &[data-has-focus="true"] {\n outline: var(--focus-borderalt) solid var(--global-borderwidth-s);\n outline-offset: calc(var(--global-borderwidth-s) * -1);\n }\n ')),(({$size:e,$isButtonMenu:n})=>o.css([""," "," ",""],"small"===e&&`\n &:not(:has(button)):not(:has(a)) {\n padding: var(--global-space-comp-xs) 0;\n\n &:not(:has(.menu-item-subtext)) {\n min-height: var(--global-size-s);\n }\n }\n\n button, a {\n width: 100%;\n padding: var(--global-space-comp-xs) var(--global-space-comp-m) var(--global-space-comp-xs) var(--global-space-comp-m);\n }\n\n *:not(.menu-item-subtext):not(.menu-item-label-prefix) {\n font: var(--global-font-static-comp-${n?"medium":"regular"}-s);\n }\n `,"medium"===e&&`\n &:not(:has(button)):not(:has(a)) {\n padding: var(--global-space-comp-s) 0;\n\n &:not(:has(.menu-item-subtext)) {\n min-height: var(--global-size-m);\n }\n }\n\n button, a {\n width: 100%;\n padding: var(--global-space-comp-s) var(--global-space-comp-m) var(--global-space-comp-s) var(--global-space-comp-m);\n }\n\n *:not(.menu-item-subtext):not(.menu-item-label-prefix) {\n font: var(--global-font-static-comp-${n?"medium":"regular"}-m);\n }\n `,"large"===e&&`\n &:not(:has(button)):not(:has(a)) {\n padding: var(--global-space-comp-m) 0;\n\n &:not(:has(.menu-item-subtext)) {\n min-height: var(--global-size-l);\n }\n }\n \n button, a {\n width: 100%;\n padding: var(--global-space-comp-m) var(--global-space-comp-m) var(--global-space-comp-m) var(--global-space-comp-m);\n }\n\n *:not(.menu-item-subtext):not(.menu-item-label-prefix) {\n font: var(--global-font-static-comp-${n?"medium":"regular"}-l);\n }\n `))),f=d.default.div.withConfig({displayName:"menu-item.component__SubmenuParentWrapper",componentId:"carbon_v162_21_0__sc-29021491-1"})(["display:flex;align-items:center;justify-content:flex-start;width:100%;gap:var(--global-space-comp-s);"]),g=e=>{if(!c.default.isValidElement(e))return!1;const n=e.props;return!(!n.disabled&&!0!==n["aria-disabled"]&&"true"!==n["aria-disabled"])||c.default.Children.toArray(n.children).some(g)},h=e=>{var n;const o=null===(n=e.current)||void 0===n?void 0:n.querySelector(i.buttonMenuItemQuerySelector(!0));null==o||o.focus()},y=o=>{var{children:i,onClick:s,selected:d,disabled:p,submenu:y,submenuOpen:x,onSubmenuOpen:w,onSubmenuClose:O,submenuWidth:j,id:C}=o,P=function(e,n){if(null==e)return{};var o,t,r=function(e,n){if(null==e)return{};var o,t,r={},a=Object.keys(e);for(t=0;t<a.length;t++)o=a[t],n.indexOf(o)>=0||(r[o]=e[o]);return r}(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(t=0;t<a.length;t++)o=a[t],n.indexOf(o)>=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(r[o]=e[o])}return r}(o,["children","onClick","selected","disabled","submenu","submenuOpen","onSubmenuOpen","onSubmenuClose","submenuWidth","id"]);const $=n.useRef(null),{size:_,isButtonMenu:k,isSubmenu:S,onSubmenuCloseContext:M,focusSubmenuParent:D,renderSubmenu:q}=n.useContext(t.PopoverMenuContext),z=!!y,E=k&&g(i),I=p||E,B=n.useCallback((n=>((n,o)=>c.default.isValidElement(n)&&1===c.default.Children.count(n)?c.default.cloneElement(n,m({"data-element":"submenu-parent",children:e.jsxs(f,{"data-element":"submenu-parent-wrapper",children:[n.props.children,e.jsx(u.default,{type:"caret_right","data-element":"submenu-icon",ml:"auto"})]})},o)):n)(i,m({},n))),[i]),N=n.useRef(null),R=n.useContext(r.default),A=null==R?void 0:R.headingId,W=n.useRef(null!=C?C:`popover-menu-item-${l.default()}`).current,K=n.useCallback((e=>{if(z&&k)return"ArrowRight"===e.key?(e.preventDefault(),void(x?h(N):null==w||w())):void 0}),[z,k,w,x]);n.useEffect((()=>{x&&h(N)}),[x]);const V=n.useCallback((e=>{var n;const{activeElement:o}=document,t="popover-submenu-item"===(null==o||null===(n=o.parentElement)||void 0===n?void 0:n.getAttribute("data-component"));if("ArrowLeft"===e.key&&(e.preventDefault(),t))return null==D||D(),void(null==M||M())}),[D,M]),L=n.useCallback((e=>{null==w||w(),null==s||s(e)}),[w,s]);return k&&z&&q?q({open:!!x,submenu:y,submenuWidth:j,size:_,onClose:()=>null==O?void 0:O(),ref:N,triggerRef:$,control:n=>e.jsx(v,{ref:$,id:W,"data-component":"popover-menu-item",className:"popover-menu-item"+(I?"-disabled":""),$size:_,onClick:I?void 0:L,onMouseDown:I?void 0:e=>e.preventDefault(),onKeyDown:I?void 0:K,$disabled:I,$isButtonMenu:k,children:B(b(m({},n),{disabled:I}))})}):e.jsx(v,b(m({ref:$,id:W,"data-component":`popover-${S?"submenu":"menu"}-item`,className:"popover-menu-item"+(I?"-disabled":""),$size:_,onClick:I?void 0:s,onMouseDown:I?void 0:e=>e.preventDefault(),onKeyDown:V,role:k?void 0:"option","aria-selected":k?void 0:d&&!I,"aria-disabled":k?void 0:I,$disabled:I,$isButtonMenu:k},P),{"aria-describedby":A,children:e.jsx(a.default.Provider,{value:{isDisabled:!!I},children:i})}))};y.displayName="PopoverMenuItem",exports.default=y;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import type { CSSObject } from "styled-components";
|
|
3
3
|
import { PopoverProps } from "../popover";
|
|
4
|
+
import { type TypeaheadHandler } from "./hooks";
|
|
4
5
|
import { PopoverMenuContextProps, PopoverControlProps } from "./contexts";
|
|
5
6
|
import { TagProps } from "../utils/helpers/tags";
|
|
6
7
|
interface ListProps {
|
|
@@ -36,6 +37,8 @@ export interface PopoverMenuProps<TRef extends FocusableHandle = HTMLElement> ex
|
|
|
36
37
|
width?: string;
|
|
37
38
|
/** Whether the menu width should match the control reference width */
|
|
38
39
|
matchReferenceWidth?: boolean;
|
|
40
|
+
/** Hide the menu when its control is fully clipped. Defaults to false. */
|
|
41
|
+
hideWhenReferenceHidden?: boolean;
|
|
39
42
|
/** Strategy used to position the popover */
|
|
40
43
|
popoverStrategy?: PopoverProps["popoverStrategy"];
|
|
41
44
|
/** Override default control reference for popover */
|
|
@@ -54,8 +57,10 @@ export interface PopoverMenuProps<TRef extends FocusableHandle = HTMLElement> ex
|
|
|
54
57
|
isSubmenu?: boolean;
|
|
55
58
|
/** Ref to the listbox/menu element */
|
|
56
59
|
listRef?: React.Ref<HTMLUListElement>;
|
|
60
|
+
/** Callback for handling typeahead keyboard navigation */
|
|
61
|
+
typeahead?: (args: TypeaheadHandler) => void;
|
|
57
62
|
}
|
|
58
|
-
declare const menuPopoverMiddleware: (width?: string, isButtonMenu?: boolean, isSubmenu?: boolean, matchReferenceWidth?: boolean) => {
|
|
63
|
+
declare const menuPopoverMiddleware: (width?: string, isButtonMenu?: boolean, isSubmenu?: boolean, matchReferenceWidth?: boolean, hideWhenReferenceHidden?: boolean) => {
|
|
59
64
|
name: string;
|
|
60
65
|
options?: any;
|
|
61
66
|
fn: (state: import("@floating-ui/dom").MiddlewareState) => import("@floating-ui/core").MiddlewareReturn | Promise<import("@floating-ui/core").MiddlewareReturn>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),n=require("react"),t=require("styled-components"),r=require("../popover/popover.component.js"),o=require("@floating-ui/dom"),l=require("./utils/index.js"),i=require("../../hooks/__internal__/useClickAwayListener/useClickAwayListener.js"),a=require("./hooks/useHandleDropdownMenuKeyDown.js"),s=require("../utils/helpers/guid/index.js"),u=require("./contexts/popover-menu.context.js");require("./contexts/menu-heading.context.js"),require("./contexts/menu-item.context.js");var c=require("../utils/helpers/combine-refs/index.js");require("../../components/table/__internal__/contexts/table.context.js"),require("../../components/table/__internal__/contexts/table-row.context.js"),require("../../components/table/__internal__/contexts/table-footer.context.js"),require("../../components/table/__internal__/contexts/sub-row.context.js"),require("../../components/table/__internal__/contexts/table-header.context.js");var p=require("../../components/table/__internal__/contexts/table-body.context.js");function d(e){return e&&e.__esModule?e:{default:e}}var f=d(t);function v(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const b=f.default.div.withConfig({displayName:"popover-menu.component__PopoverControlWrapper",componentId:"carbon_v162_21_0__sc-6c9f2311-0"})(["display:inline-block;",""],(({$controlWrapperStyle:e})=>e)),m=f.default.ul.withConfig({displayName:"popover-menu.component__List",componentId:"carbon_v162_21_0__sc-6c9f2311-1"})(['margin:var(--global-space-none);padding:var(--global-space-none);background-color:var(--popover-bg-default);display:flex;flex-direction:column;list-style-type:"";list-style:none;',""],(({$isButtonMenu:e,$size:n,$maxHeight:r})=>!e&&t.css(["overflow:hidden auto;-webkit-overflow-scrolling:touch;max-height:",";"],null!=r?r:`calc(5 * var(--global-size-${n.charAt(0)}))`))),y={small:"var(--global-space-comp-xs)",medium:"var(--global-space-comp-s)",large:"var(--global-space-comp-m)"},h=f.default.div.withConfig({displayName:"popover-menu.component__MenuWrapper",componentId:"carbon_v162_21_0__sc-6c9f2311-2"})(["box-shadow:var(--global-depth-lvl1);border-radius:var(--global-radius-container-m);background-color:var(--popover-bg-default);width:max-content;position:relative;z-index:calc(var(--carbon-zindex-overlay) + 2);padding:",";",""],(({$size:e})=>t.css([""," var(--global-space-none)"],y[e])),(({$isButtonMenu:e})=>!e&&t.css(["overflow:hidden;max-width:100%;max-height:100%;"]))),x=f.default.div.withConfig({displayName:"popover-menu.component__ScrollWrapper",componentId:"carbon_v162_21_0__sc-6c9f2311-3"})(["max-height:100%;width:100%;"]),g=e=>{null==e||e.focus()},_=({open:n,placement:t,controlWrapperRef:o,size:l,listRef:i,listboxAriaLabelledBy:a,listboxAriaLabel:s,isButtonMenu:u,children:c,onKeyDown:p,middleware:d,scrollRef:f,listId:v,disablePortal:b,portalTarget:y,maxHeight:g,popoverStrategy:_})=>e.jsx(r.default,{placement:t,reference:o,isOpen:n,"data-component":"popover-menu",middleware:d,disablePortal:b,portalTarget:y,popoverStrategy:_,children:e.jsx(h,{$size:l,onKeyDown:p,"data-role":"menu-wrapper",onMouseDown:e=>e.preventDefault(),$isButtonMenu:u,children:e.jsx(x,{ref:f,"data-component":"scroll-wrapper",children:e.jsx(m,{$size:l,ref:i,role:u?"list":"listbox",id:v,"aria-labelledby":a,$isButtonMenu:u,"aria-label":s,$maxHeight:g,children:c})})})}),w=({open:n,isButtonMenu:t,isSubmenu:r,popoverControl:o,controlRef:l,controlWrapperRef:i,onKeyDown:a,listId:s,"aria-activedescendant":u,controlWrapperStyle:c})=>r?o(l,{"aria-haspopup":"true","aria-controls":n?s:void 0,"aria-expanded":n}):e.jsx(b,{ref:i,onKeyDown:a,"data-component":"popover-menu-control",$controlWrapperStyle:c,children:o(l,{"aria-haspopup":t?"true":"listbox","aria-controls":n?s:void 0,"aria-expanded":n,"aria-activedescendant":t?void 0:u,role:t?void 0:"combobox"})}),j=(t,r)=>{var{children:d,open:f,popoverControl:b,size:m="medium",placement:y="bottom-end",onOpen:h,onClose:x,width:j,matchReferenceWidth:S=!1,hideWhenReferenceHidden:R=!1,popoverStrategy:k="absolute",listboxAriaLabelledBy:C,listboxAriaLabel:P,isButtonMenu:q=!1,isSubmenu:M=!1,id:D,controlReference:W,listRef:L,controlWrapperStyle:B,maxHeight:A,typeahead:z}=t,$=function(e,n){if(null==e)return{};var t,r,o=function(e,n){if(null==e)return{};var t,r,o={},l=Object.keys(e);for(r=0;r<l.length;r++)t=l[r],n.indexOf(t)>=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)t=l[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}(t,["children","open","popoverControl","size","placement","onOpen","onClose","width","matchReferenceWidth","hideWhenReferenceHidden","popoverStrategy","listboxAriaLabelledBy","listboxAriaLabel","isButtonMenu","isSubmenu","id","controlReference","listRef","controlWrapperStyle","maxHeight","typeahead"]);const E=n.useRef(null),I=null!=W?W:E,H=n.useRef(null),K=n.useRef(null),T=c.default(L,K),F=n.useRef(null!=D?D:`popover-menu-wrapper-${s.default()}`),N=n.useRef(null),Q=c.default(N,r),U=l.wrapChildrenInItem(d),G=n.useRef(null),J=n.useRef(null),V=n.useCallback((e=>{f&&J.current!==e&&(J.current=e,x(e))}),[f,x]),X=i.default(V),[Y,Z]=n.useState(""),ee=((e,n,t,r,l)=>[o.offset(t?0:8),o.flip({fallbackStrategy:"initialPlacement"}),o.size({apply({rects:t,elements:o}){(!n||r||e)&&(o.floating.style.width=e||`${t.reference.width}px`)}}),...l?[o.hide({strategy:"referenceHidden"})]:[]])(j,q,M,S,R),ne=n.useRef(null),te=n.useCallback((()=>{if(M){var e;const n=null==W||null===(e=W.current)||void 0===e?void 0:e.querySelector("button, a");n&&g(n)}}),[M,W]),re=n.useCallback((e=>{f&&"Escape"===e.key&&(e.preventDefault(),e.stopPropagation(),M&&te(),x(e),M||g(G.current))}),[f,x,M,te]);n.useEffect((()=>{const e=M?H.current:N.current;null==e||e.addEventListener("click",X,{passive:!0}),null==e||e.addEventListener("keydown",re);const n=M?null==W?void 0:W.current:null;return null==n||n.addEventListener("click",X,{passive:!0}),()=>{null==e||e.removeEventListener("click",X),null==e||e.removeEventListener("keydown",re),null==n||n.removeEventListener("click",X)}}),[M,X,re,W]);const oe=a.useHandleDropdownMenuKeyDown(K,q?()=>{}:Z,x,{isButtonMenu:q,isSubmenu:M},z),{isInTable:le}=n.useContext(p.default),ie=n.useCallback((e=>{var n;if(f&&(null===(n=E.current)||void 0===n?void 0:n.contains(document.activeElement)))oe(e);else if(!f&&q&&!le&&!M){if("ArrowDown"===e.key)return e.preventDefault(),null==h||h(),void(ne.current="down");if("ArrowUp"===e.key)return e.preventDefault(),null==h||h(),void(ne.current="up")}}),[f,oe,q,le,h,M]);n.useEffect((()=>{let e;return f&&q&&!M&&(e=requestAnimationFrame((()=>{var e;const n=null===(e=H.current)||void 0===e?void 0:e.querySelectorAll(l.buttonMenuItemQuerySelector(!1)),t="up"===ne.current?null==n?void 0:n[n.length-1]:null==n?void 0:n[0];ne.current=null,t&&(Z(t.id),a.setFocus(t,void 0,q))}))),()=>cancelAnimationFrame(e)}),[f,q,M]);const ae=n.useCallback((n=>e.jsx(O,{open:n.open,onClose:e=>{var t;n.onClose(),"click"!==(null==e?void 0:e.type)||(null===(t=N.current)||void 0===t?void 0:t.contains(e.target))?"Tab"===(null==e?void 0:e.key)&&x(e):V(e)},size:n.size,isButtonMenu:!0,isSubmenu:!0,hideWhenReferenceHidden:R,width:n.submenuWidth,listRef:n.ref,popoverControl:(e,t)=>n.control(t),placement:"right-start",controlReference:n.triggerRef,typeahead:z,children:n.submenu})),[x,V,z,R]),se=e.jsxs(e.Fragment,{children:[e.jsx(w,{open:f,isButtonMenu:q,isSubmenu:M,popoverControl:b,controlRef:G,controlWrapperRef:E,controlWrapperStyle:B,onKeyDown:ie,listId:F.current,"aria-activedescendant":f&&Y?Y:void 0}),e.jsx(u.PopoverMenuContext.Provider,{value:{size:m,isButtonMenu:q,isSubmenu:M,onSubmenuCloseContext:M?x:void 0,focusSubmenuParent:M?te:void 0,renderSubmenu:q&&!M?ae:void 0},children:f&&e.jsx(_,{open:f,placement:y,controlWrapperRef:I,size:m,listRef:T,listboxAriaLabelledBy:C,listboxAriaLabel:P,isButtonMenu:q,onKeyDown:oe,middleware:ee,scrollRef:H,listId:F.current,disablePortal:!M,portalTarget:M?null==W?void 0:W.current:void 0,maxHeight:A,popoverStrategy:k,children:U})})]});return M?se:e.jsx("div",(ue=function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{},r=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),r.forEach((function(n){v(e,n,t[n])}))}return e}({ref:Q,"data-component":"popover-menu"},$),ce=null!=(ce={children:se})?ce:{},Object.getOwnPropertyDescriptors?Object.defineProperties(ue,Object.getOwnPropertyDescriptors(ce)):function(e){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n.push.apply(n,t)}return n}(Object(ce)).forEach((function(e){Object.defineProperty(ue,e,Object.getOwnPropertyDescriptor(ce,e))})),ue));var ue,ce},O=n.forwardRef(j);exports.List=m,exports.default=O;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("styled-components"),a=require("./validation-message-style-overrides.style.js");function t(e){return e&&e.__esModule?e:{default:e}}const l=t(e).default.span.withConfig({displayName:"validation-message.style__StyledValidationMessage",componentId:"
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("styled-components"),a=require("./validation-message-style-overrides.style.js");function t(e){return e&&e.__esModule?e:{default:e}}const l=t(e).default.span.withConfig({displayName:"validation-message.style__StyledValidationMessage",componentId:"carbon_v162_21_0__sc-ade67d83-0"})(["",""],(({$isError:t,$size:l})=>e.css(["display:flex;align-items:center;align-content:center;align-self:stretch;flex-wrap:wrap;margin:0px;color:",";"," "," "," ",""],t?"var(--input-validation-label-error)":"var(--input-validation-label-warn)","large"===l&&e.css(["font:",";"],t?"var(--global-font-static-comp-medium-l)":"var(--global-font-static-comp-regular-l)"),"medium"===l&&e.css(["font:",";"],t?"var(--global-font-static-comp-medium-m)":"var(--global-font-static-comp-regular-m)"),"small"===l&&e.css(["font:",";"],t?"var(--global-font-static-comp-medium-s)":"var(--global-font-static-comp-regular-s)"),a.default)));exports.default=l;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("styled-components");function t(e){return e&&e.__esModule?e:{default:e}}const o=t(e).default.p.withConfig({displayName:"validation-message.style__StyledValidationMessage",componentId:"
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("styled-components");function t(e){return e&&e.__esModule?e:{default:e}}const o=t(e).default.p.withConfig({displayName:"validation-message.style__StyledValidationMessage",componentId:"carbon_v162_21_0__sc-3359a809-0"})(["",""],(({isWarning:t,isDarkBackground:o,validationMessagePositionTop:a,isLarge:i})=>{const n=o?"var(--colorsSemanticNegative450)":"var(--colorsSemanticNegative500)";return e.css(["color:",";font-weight:",";font-size:",";margin:0px;margin-",":8px;"],t?"var(--tempColorsSemanticCaution600)":n,t?"normal":"500",i?"var(--fontSizes200)":"var(--fontSizes100)",a?"bottom":"top")}));exports.default=o;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("styled-components"),t=require("styled-system"),o=require("../../style/themes/apply-base-theme.js"),r=require("../../components/icon/icon.style.js"),n=require("../../style/utils/add-focus-styling.js");function a(e){return e&&e.__esModule?e:{default:e}}const s={error:"var(--colorsSemanticNegative500)",info:"var(--colorsSemanticInfo500)",warning:"var(--colorsSemanticCaution500)"},i=a(e).default.span.attrs(o.default).withConfig({displayName:"validation-icon.style__ValidationIconStyle",componentId:"
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("styled-components"),t=require("styled-system"),o=require("../../style/themes/apply-base-theme.js"),r=require("../../components/icon/icon.style.js"),n=require("../../style/utils/add-focus-styling.js");function a(e){return e&&e.__esModule?e:{default:e}}const s={error:"var(--colorsSemanticNegative500)",info:"var(--colorsSemanticInfo500)",warning:"var(--colorsSemanticCaution500)"},i=a(e).default.span.attrs(o.default).withConfig({displayName:"validation-icon.style__ValidationIconStyle",componentId:"carbon_v162_21_0__sc-91300c1b-0"})(["background:none;cursor:default;display:flex;align-items:center;margin-top:0;margin-bottom:0;border:0;outline:none;"," ",":before{color:",";}",":focus{","}",""],(({isPartOfInput:t})=>t&&e.css(["cursor:pointer;"])),r.default,(({validationType:e})=>s[e]),r.default,n.default(),t.margin);exports.default=i;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var o=require("styled-components"),e=require("styled-system"),t=require("../icon/icon.component.js");require("../icon/icon.style.js");var i=require("../../style/themes/apply-base-theme.js"),n=require("../../style/utils/add-focus-styling.js");function a(o){return o&&o.__esModule?o:{default:o}}var c=a(o);const r={small:{titleFont:"var(--global-font-static-section-heading-s)",subtitleFont:"var(--global-font-static-comp-medium-s)",headingPadding:"var(--global-space-comp-l)"},medium:{titleFont:"var(--global-font-static-section-heading-m)",subtitleFont:"var(--global-font-static-comp-medium-l)",headingPadding:"var(--global-space-comp-xl)"}},s=c.default.div.attrs(i.default).withConfig({displayName:"accordion.style__StyledAccordionGroup",componentId:"
|
|
1
|
+
"use strict";var o=require("styled-components"),e=require("styled-system"),t=require("../icon/icon.component.js");require("../icon/icon.style.js");var i=require("../../style/themes/apply-base-theme.js"),n=require("../../style/utils/add-focus-styling.js");function a(o){return o&&o.__esModule?o:{default:o}}var c=a(o);const r={small:{titleFont:"var(--global-font-static-section-heading-s)",subtitleFont:"var(--global-font-static-comp-medium-s)",headingPadding:"var(--global-space-comp-l)"},medium:{titleFont:"var(--global-font-static-section-heading-m)",subtitleFont:"var(--global-font-static-comp-medium-l)",headingPadding:"var(--global-space-comp-xl)"}},s=c.default.div.attrs(i.default).withConfig({displayName:"accordion.style__StyledAccordionGroup",componentId:"carbon_v162_21_0__sc-5e39e462-0"})(["",""],e.margin),l=c.default.div.attrs(i.default).withConfig({displayName:"accordion.style__StyledAccordionContainer",componentId:"carbon_v162_21_0__sc-5e39e462-1"})(["display:flex;align-items:stretch;justify-content:center;flex-direction:column;box-sizing:border-box;width:",";"," &&{","}"],(({$width:o})=>o||"100%"),(({$variant:e,$borders:t,$isExpanded:i,$allowMotion:n})=>o.css([""," ",""],"standard"===e&&o.css(["& + &{margin-top:-1px;}border:1px solid var(--container-action-border-default);",";",";"],"default"===t&&o.css(["border-left:none;border-right:none;"]),"none"===t&&o.css(["border:none;"])),"simple"===e&&o.css(["gap:",";",""],i?"var(--global-space-comp-l)":"0px",n&&o.css(["transition:gap 0.4s;"])))),e.space),d=c.default.h3.withConfig({displayName:"accordion.style__StyledAccordionTitle",componentId:"carbon_v162_21_0__sc-5e39e462-2"})([""," color:var(--container-action-txt-default);margin:0;"],(({$size:e})=>e&&o.css(["font:",";"],r[e].titleFont))),p=c.default.span.withConfig({displayName:"accordion.style__StyledAccordionSubTitle",componentId:"carbon_v162_21_0__sc-5e39e462-3"})([""," color:var(--container-action-txt-alt-default);"],(({$size:e})=>e&&o.css(["font:",";"],r[e].subtitleFont))),_=c.default(t.default).withConfig({displayName:"accordion.style__StyledAccordionIcon",componentId:"carbon_v162_21_0__sc-5e39e462-4"})(["width:var(--global-size-2-xs);height:var(--global-size-2-xs);color:var(--container-action-icon-default);",";"],(({$isExpanded:e,$allowMotion:t})=>o.css(["transform:rotate(0deg);"," ",""],e&&o.css(["transform:rotate(-180deg);"]),t&&o.css(["transition:transform 0.4s;"])))),g=c.default.div.withConfig({displayName:"accordion.style__StyledAccordionTitleWrapper",componentId:"carbon_v162_21_0__sc-5e39e462-5"})(["display:flex;flex-direction:column;align-items:flex-start;gap:var(--global-space-comp-xs);flex:1 0 0;"]),f=c.default.div.attrs(i.default).withConfig({displayName:"accordion.style__StyledAccordionTitleContainer",componentId:"carbon_v162_21_0__sc-5e39e462-6"})(["",""],(({$size:t,$iconAlign:i})=>t&&o.css(["display:flex;flex:1 0 0;align-items:center;align-self:stretch;background-color:transparent;border:none;text-align:left;gap:var(--global-space-comp-l);padding:",";"," "," &:hover{cursor:pointer;background-color:var(--container-action-bg-hover);}&:focus{"," z-index:1;}"],r[t].headingPadding,"right"===i&&o.css(["flex-direction:row-reverse;"]),e.space,n.default()))),y=c.default.div.withConfig({displayName:"accordion.style__StyledAccordionLine",componentId:"carbon_v162_21_0__sc-5e39e462-7"})(["position:absolute;width:2px;background-color:var(--input-typical-border-alt);border-radius:var(--global-radius-action-xs);height:100%;"]),m=c.default.div.withConfig({displayName:"accordion.style__StyledAccordionContentContainer",componentId:"carbon_v162_21_0__sc-5e39e462-8"})(["position:relative;overflow:hidden;height:0;opacity:0;",""],(({$height:e,$isExpanded:t,$allowMotion:i})=>o.css([""," ",""],i&&o.css(["transition:height 0.4s,opacity 0.2s;"]),t&&o.css(["height:","px;opacity:1;"],e)))),u=c.default.div.withConfig({displayName:"accordion.style__StyledAccordionContent",componentId:"carbon_v162_21_0__sc-5e39e462-9"})(["",""],(({$variant:e})=>o.css(["overflow:hidden;",""],"simple"===e&&o.css(["margin-left:var(--global-space-comp-l);"]))));exports.StyledAccordionContainer=l,exports.StyledAccordionContent=u,exports.StyledAccordionContentContainer=m,exports.StyledAccordionGroup=s,exports.StyledAccordionIcon=_,exports.StyledAccordionLine=y,exports.StyledAccordionSubTitle=p,exports.StyledAccordionTitle=d,exports.StyledAccordionTitleContainer=f,exports.StyledAccordionTitleWrapper=g;
|
|
@@ -2,10 +2,6 @@ export type Alignment = "left" | "right";
|
|
|
2
2
|
type ActionPopoverContextType = {
|
|
3
3
|
setOpenPopover: (isOpen: boolean) => void;
|
|
4
4
|
focusButton: () => void;
|
|
5
|
-
horizontalAlignment: Alignment;
|
|
6
|
-
submenuPosition: Alignment;
|
|
7
|
-
selectedSubmenuRef: HTMLUListElement | null;
|
|
8
|
-
setSelectedSubmenuRef: (ref: HTMLUListElement | null) => void;
|
|
9
5
|
};
|
|
10
6
|
export declare const ActionPopoverProvider: import("react").Provider<ActionPopoverContextType | null>;
|
|
11
7
|
export declare const useActionPopoverContext: () => ActionPopoverContextType;
|
|
@@ -1,8 +1,3 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
export declare const isItemDisabled: (item: ReactItem) => boolean;
|
|
5
|
-
export declare const findFirstFocusableItem: (items: ReactItem[]) => number;
|
|
6
|
-
export declare const findLastFocusableItem: (items: ReactItem[]) => number;
|
|
7
|
-
export declare const checkChildrenForString: (children: React.ReactNode) => boolean;
|
|
8
|
-
export {};
|
|
2
|
+
declare const checkChildrenForString: (children: React.ReactNode) => boolean;
|
|
3
|
+
export default checkChildrenForString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var t=e(require("react"));const r=e=>t.default.Children.toArray(e).some((e=>"string"==typeof e||!!t.default.isValidElement(e)&&r(e.props.children)));exports.default=r;
|
package/lib/components/action-popover/action-popover-divider/action-popover-divider.component.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { MenuItemDivider as ActionPopoverDivider } from "
|
|
1
|
+
import { MenuItemDivider as ActionPopoverDivider } from "../../../__internal__/popover-menu";
|
|
2
2
|
export default ActionPopoverDivider;
|
package/lib/components/action-popover/action-popover-divider/action-popover-divider.component.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),require("../../../__internal__/popover-menu/popover-menu.component.js"),require("../../../__internal__/popover-menu/menu-item/menu-item.component.js"),require("../../../__internal__/popover-menu/menu-item/menu-item-content/menu-item-leading.component.js"),require("../../../__internal__/popover-menu/menu-item/menu-item-content/menu-item-label.component.js"),require("../../../__internal__/popover-menu/menu-item/menu-item-content/menu-item-subtext.component.js");var e=require("../../../__internal__/popover-menu/menu-item/menu-item-divider/menu-item-divider.component.js");require("../../../__internal__/popover-menu/menu-item/menu-item-heading/menu-item-heading.component.js"),e.default.displayName="ActionPopoverDivider",exports.default=e.default;
|
package/lib/components/action-popover/action-popover-item/action-popover-item.component.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { Alignment } from "../__internal__/action-popover.context";
|
|
3
2
|
import { IconType } from "../../icon";
|
|
4
3
|
export interface ActionPopoverItemProps {
|
|
5
4
|
/** The text label to display for this Item */
|
|
@@ -17,14 +16,10 @@ export interface ActionPopoverItemProps {
|
|
|
17
16
|
/** Submenu component for item */
|
|
18
17
|
submenu?: React.ReactNode;
|
|
19
18
|
/** @ignore @private */
|
|
20
|
-
|
|
21
|
-
/** @ignore @private */
|
|
22
|
-
currentSubmenuPosition?: Alignment;
|
|
23
|
-
/** @ignore @private */
|
|
24
|
-
setCurrentSubmenuPosition?: (value: Alignment) => void;
|
|
19
|
+
__isSubmenuParent?: boolean;
|
|
25
20
|
}
|
|
26
21
|
export declare const ActionPopoverItem: {
|
|
27
|
-
({ children, icon, disabled, onClick
|
|
22
|
+
({ children, icon, disabled, onClick, download, href, __isSubmenuParent, ...rest }: ActionPopoverItemProps): React.JSX.Element;
|
|
28
23
|
displayName: string;
|
|
29
24
|
};
|
|
30
25
|
export default ActionPopoverItem;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),r=require("../../button/__next__/button.component.js"),n=require("../__internal__/action-popover.context.js");function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function c(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){o(e,t,r[t])}))}return e}function i(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t}(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})),e}const u=o=>{var{children:u,icon:l,disabled:s=!1,onClick:b,download:p,href:a,__isSubmenuParent:f}=o,O=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},c=Object.keys(e);for(n=0;n<c.length;n++)r=c[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(n=0;n<c.length;n++)r=c[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(o,["children","icon","disabled","onClick","download","href","__isSubmenuParent"]);const{setOpenPopover:y,focusButton:d}=n.useActionPopoverContext(),j=t.useCallback((e=>{f||(y(!1),d(),null==b||b(e))}),[f,d,b,y]);return e.jsx(r.Button,i(c(i(c({},O),{disabled:s,href:a,iconType:l,iconPosition:"before",onClick:j}),a&&p?{download:!0}:{}),{children:u}))};u.displayName="ActionPopoverItem",exports.ActionPopoverItem=u,exports.default=u;
|
package/lib/components/action-popover/action-popover-menu/action-popover-menu.component.d.ts
CHANGED
|
@@ -2,41 +2,22 @@ import React from "react";
|
|
|
2
2
|
export interface ActionPopoverMenuBaseProps {
|
|
3
3
|
/** Children for the menu */
|
|
4
4
|
children?: React.ReactNode;
|
|
5
|
-
/**
|
|
6
|
-
* @ignore
|
|
7
|
-
* @private
|
|
8
|
-
* @internal
|
|
9
|
-
* Index to control which item is focused */
|
|
10
|
-
focusIndex?: number;
|
|
11
5
|
/** Flag to indicate whether a menu should open */
|
|
12
6
|
isOpen?: boolean;
|
|
13
7
|
/** A unique ID for the menu */
|
|
14
8
|
menuID?: string;
|
|
15
|
-
/**
|
|
16
|
-
* @ignore
|
|
17
|
-
* @private
|
|
18
|
-
* @internal
|
|
19
|
-
* Callback to set the index of the focused item */
|
|
20
|
-
setFocusIndex?: (args: number) => void;
|
|
21
9
|
/** Callback to set the isOpen flag */
|
|
22
10
|
setOpen?: (args: boolean) => void;
|
|
23
11
|
/** Unique ID for the menu's parent */
|
|
24
12
|
parentID?: string;
|
|
25
13
|
/** Set whether the menu should open above or below the button */
|
|
26
14
|
placement?: "bottom" | "top";
|
|
27
|
-
/** @ignore @private */
|
|
28
|
-
role?: string;
|
|
29
|
-
/** @ignore @private */
|
|
30
|
-
"data-element"?: string;
|
|
31
|
-
/** @ignore @private */
|
|
32
|
-
style?: {
|
|
33
|
-
left: string | number;
|
|
34
|
-
top?: string;
|
|
35
|
-
bottom?: string;
|
|
36
|
-
right: string | number;
|
|
37
|
-
};
|
|
38
15
|
}
|
|
39
16
|
export interface ActionPopoverMenuProps extends ActionPopoverMenuBaseProps, React.RefAttributes<HTMLUListElement> {
|
|
40
17
|
}
|
|
18
|
+
/**
|
|
19
|
+
* @deprecated This has been kept for backward compatibility.
|
|
20
|
+
* Wrap ActionPopoverItems in a fragment and pass to `submenu` directly
|
|
21
|
+
* */
|
|
41
22
|
declare const ActionPopoverMenu: React.ForwardRefExoticComponent<ActionPopoverMenuBaseProps & React.RefAttributes<HTMLUListElement>>;
|
|
42
23
|
export default ActionPopoverMenu;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime")
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime");function r(e){return e&&e.__esModule?e:{default:e}}const t=r(require("react")).default.forwardRef(((r,t)=>{var{children:n}=r;return function(e,r){if(null==e)return{};var t,n,o=function(e,r){if(null==e)return{};var t,n,o={},u=Object.keys(e);for(n=0;n<u.length;n++)t=u[n],r.indexOf(t)>=0||(o[t]=e[t]);return o}(e,r);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(e);for(n=0;n<u.length;n++)t=u[n],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}}(r,["children"]),e.jsx(e.Fragment,{children:n})}));t.displayName="ActionPopoverMenu",exports.default=t;
|
|
@@ -1,34 +1,37 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { ButtonProps } from "../../button/__next__/";
|
|
3
3
|
import { IconType } from "../../icon";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
"aria-label"?: string;
|
|
7
|
-
"aria-labelledby"?: string;
|
|
8
|
-
"aria-describedby"?: string;
|
|
9
|
-
"aria-controls": string;
|
|
10
|
-
"aria-expanded": string;
|
|
11
|
-
};
|
|
4
|
+
import { RenderButtonProps } from "../action-popover.component";
|
|
5
|
+
export type ActionPopoverMenuButtonAria = RenderButtonProps["ariaAttributes"];
|
|
12
6
|
export interface ActionPopoverMenuButtonProps {
|
|
13
7
|
/** ARIA attributes to be applied to the button HTML element */
|
|
14
8
|
ariaAttributes: ActionPopoverMenuButtonAria;
|
|
15
|
-
/**
|
|
16
|
-
|
|
9
|
+
/**
|
|
10
|
+
* Variant of the menu button
|
|
11
|
+
*/
|
|
12
|
+
buttonType?: Extract<ButtonProps["variantType"], "primary" | "secondary" | "tertiary">;
|
|
17
13
|
/** Identifier used for testing purposes, applied to the root element of the component. */
|
|
18
14
|
"data-element": string;
|
|
19
15
|
/** Content of the button */
|
|
20
16
|
children?: string;
|
|
21
|
-
/**
|
|
22
|
-
|
|
23
|
-
|
|
17
|
+
/**
|
|
18
|
+
* Defines an Icon position related to the children: "before" | "after"
|
|
19
|
+
*/
|
|
20
|
+
iconPosition?: ButtonProps["iconPosition"];
|
|
21
|
+
/**
|
|
22
|
+
* Defines an Icon type within the button
|
|
23
|
+
*/
|
|
24
24
|
iconType?: IconType;
|
|
25
25
|
/** Assigns a size to the button: "small" | "medium" | "large" */
|
|
26
|
-
size?:
|
|
27
|
-
/**
|
|
26
|
+
size?: ButtonProps["size"];
|
|
27
|
+
/**
|
|
28
|
+
* Overrides the default tabindex of the component
|
|
29
|
+
*/
|
|
28
30
|
tabIndex: number;
|
|
29
31
|
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
/**
|
|
33
|
+
* @deprecated This component is kept for backward compatibility.
|
|
34
|
+
* Use `Button` component directly instead.
|
|
35
|
+
* */
|
|
36
|
+
export declare const ActionPopoverMenuButton: React.ForwardRefExoticComponent<ActionPopoverMenuButtonProps & React.RefAttributes<HTMLElement>>;
|
|
34
37
|
export default ActionPopoverMenuButton;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime")
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),r=require("../../button/__next__/button.component.js");function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const i=n(t).default.forwardRef(((t,n)=>{var i,c,{buttonType:u,iconType:p,iconPosition:s,size:l,children:b,ariaAttributes:a}=t,f=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(t,["buttonType","iconType","iconPosition","size","children","ariaAttributes"]);return e.jsx(r.Button,(i=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){o(e,t,r[t])}))}return e}({variantType:u,iconType:p,iconPosition:s,size:l},a,f),c=null!=(c={ref:n,children:b})?c:{},Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(c)):function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t}(Object(c)).forEach((function(e){Object.defineProperty(i,e,Object.getOwnPropertyDescriptor(c,e))})),i))}));i.displayName="ActionPopoverMenuButton",exports.ActionPopoverMenuButton=i,exports.default=i;
|