carbon-react 111.12.2 → 111.12.3
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__/DeprecationWarning.js +0 -2
- package/esm/__internal__/character-count/character-count.component.js +0 -2
- package/esm/__internal__/checkable-input/checkable-input.component.js +0 -5
- package/esm/__internal__/checkable-input/hidden-checkable-input.component.js +0 -11
- package/esm/__internal__/field-help/field-help.component.js +0 -2
- package/esm/__internal__/fieldset/fieldset.component.js +0 -3
- package/esm/__internal__/focus-trap/focus-trap-utils.js +6 -25
- package/esm/__internal__/focus-trap/focus-trap.component.js +7 -17
- package/esm/__internal__/form-field/form-field.component.js +0 -5
- package/esm/__internal__/full-screen-heading/full-screen-heading.component.js +0 -1
- package/esm/__internal__/input/input-presentation.component.js +0 -5
- package/esm/__internal__/input/input-presentation.style.js +0 -5
- package/esm/__internal__/input/input.component.js +2 -25
- package/esm/__internal__/input-behaviour/input-behaviour.component.js +2 -3
- package/esm/__internal__/input-behaviour/input-group-behaviour.component.js +0 -2
- package/esm/__internal__/input-behaviour/useInputBehaviour.js +2 -4
- package/esm/__internal__/input-icon-toggle/input-icon-toggle.component.js +0 -5
- package/esm/__internal__/input-icon-toggle/input-icon-toggle.style.js +0 -1
- package/esm/__internal__/label/label.component.js +0 -10
- package/esm/__internal__/popover/popover.component.js +0 -11
- package/esm/__internal__/radio-button-mapper/radio-button-mapper.component.js +0 -10
- package/esm/__internal__/sticky-footer/sticky-footer.component.js +0 -5
- package/esm/__internal__/utils/helpers/browser-type-check/index.js +0 -1
- package/esm/__internal__/utils/helpers/events/composedPath.js +1 -4
- package/esm/__internal__/utils/helpers/events/events.js +1 -16
- package/esm/__internal__/utils/helpers/guid/index.js +0 -1
- package/esm/__internal__/utils/helpers/tags/tags-specs/tags-specs.js +2 -3
- package/esm/__internal__/utils/helpers/tags/tags.js +0 -4
- package/esm/__internal__/utils/logger/index.js +1 -1
- package/esm/__internal__/validation-message/validation-message.component.js +0 -2
- package/esm/__internal__/validations/validation-icon.component.js +0 -8
- package/esm/__spec_helper__/enzyme-snapshot-helper.js +0 -5
- package/esm/__spec_helper__/expect.js +2 -5
- package/esm/__spec_helper__/mock-match-media.js +0 -3
- package/esm/__spec_helper__/mock-resize-observer.js +0 -2
- package/esm/__spec_helper__/test-utils.js +27 -62
- package/esm/components/accordion/accordion-group/accordion-group.component.js +0 -9
- package/esm/components/accordion/accordion.component.js +0 -7
- package/esm/components/action-popover/action-popover-item/action-popover-item.component.js +2 -21
- package/esm/components/action-popover/action-popover-menu/action-popover-menu.component.js +2 -7
- package/esm/components/action-popover/action-popover-menu-button/action-popover-menu-button.component.js +0 -3
- package/esm/components/action-popover/action-popover.component.js +4 -19
- package/esm/components/advanced-color-picker/advanced-color-picker.component.js +0 -19
- package/esm/components/alert/alert.component.js +0 -3
- package/esm/components/anchor-navigation/anchor-navigation.component.js +5 -14
- package/esm/components/badge/badge.component.js +0 -2
- package/esm/components/batch-selection/batch-selection.component.js +0 -6
- package/esm/components/box/box.config.js +0 -1
- package/esm/components/button/button-types.style.js +0 -2
- package/esm/components/button/button.component.js +0 -12
- package/esm/components/button/button.style.js +0 -8
- package/esm/components/button-bar/button-bar.component.js +2 -8
- package/esm/components/button-toggle/button-toggle-icon.component.js +0 -2
- package/esm/components/button-toggle/button-toggle-input.component.js +0 -6
- package/esm/components/button-toggle/button-toggle.component.js +0 -6
- package/esm/components/button-toggle-group/button-toggle-group.component.js +0 -3
- package/esm/components/carbon-provider/carbon-provider.component.js +0 -2
- package/esm/components/carbon-provider/top-modal-context.js +3 -7
- package/esm/components/card/card-column/card-column.component.js +0 -2
- package/esm/components/card/card-footer/card-footer.component.js +0 -3
- package/esm/components/card/card-row/card-row.component.js +0 -3
- package/esm/components/card/card.component.js +0 -8
- package/esm/components/carousel/carousel.component.js +0 -15
- package/esm/components/carousel/slide/slide.component.js +0 -3
- package/esm/components/carousel/slide/slide.style.js +2 -1
- package/esm/components/checkbox/checkbox-group.component.js +0 -3
- package/esm/components/checkbox/checkbox-svg.component.js +0 -2
- package/esm/components/checkbox/checkbox.component.js +0 -7
- package/esm/components/confirm/confirm.component.js +0 -38
- package/esm/components/content/content.component.js +0 -3
- package/esm/components/date/__internal__/date-formats/index.js +6 -19
- package/esm/components/date/__internal__/date-picker/date-picker.component.js +2 -15
- package/esm/components/date/__internal__/date-picker/day-picker.style.js +2 -2
- package/esm/components/date/__internal__/navbar/navbar.component.js +0 -2
- package/esm/components/date/__internal__/utils.js +1 -31
- package/esm/components/date/__internal__/weekday/weekday.component.js +0 -3
- package/esm/components/date/date.component.js +10 -54
- package/esm/components/date-range/date-range.component.js +14 -46
- package/esm/components/decimal/decimal.component.js +4 -29
- package/esm/components/definition-list/dd.component.js +0 -3
- package/esm/components/definition-list/dl.component.js +0 -8
- package/esm/components/definition-list/dt.component.js +0 -3
- package/esm/components/detail/detail.component.js +2 -8
- package/esm/components/dialog/dialog.component.js +0 -14
- package/esm/components/dialog/dialog.style.js +0 -2
- package/esm/components/dialog-full-screen/dialog-full-screen.component.js +0 -25
- package/esm/components/dismissible-box/dismissible-box.component.js +0 -3
- package/esm/components/draggable/draggable-container.component.js +4 -16
- package/esm/components/draggable/draggable-item.component.js +2 -11
- package/esm/components/drawer/drawer.component.js +0 -16
- package/esm/components/drawer/drawer.style.js +0 -7
- package/esm/components/duelling-picklist/duelling-picklist.component.js +2 -14
- package/esm/components/duelling-picklist/picklist/picklist.component.js +0 -7
- package/esm/components/duelling-picklist/picklist-divider/picklist-divider.component.js +0 -3
- package/esm/components/duelling-picklist/picklist-group/picklist-group.component.js +0 -7
- package/esm/components/duelling-picklist/picklist-item/picklist-item.component.js +0 -14
- package/esm/components/duelling-picklist/picklist-placeholder/picklist-placeholder.component.js +0 -2
- package/esm/components/fieldset/fieldset.component.js +0 -4
- package/esm/components/flat-table/flat-table-body/flat-table-body.component.js +0 -1
- package/esm/components/flat-table/flat-table-body-draggable/flat-table-body-draggable.component.js +0 -13
- package/esm/components/flat-table/flat-table-cell/flat-table-cell.component.js +0 -18
- package/esm/components/flat-table/flat-table-checkbox/flat-table-checkbox.component.js +0 -15
- package/esm/components/flat-table/flat-table-head/flat-table-head.component.js +4 -8
- package/esm/components/flat-table/flat-table-header/flat-table-header-utils.js +1 -4
- package/esm/components/flat-table/flat-table-header/flat-table-header.component.js +0 -13
- package/esm/components/flat-table/flat-table-row/__internal__/flat-table-row-draggable.component.js +0 -9
- package/esm/components/flat-table/flat-table-row/flat-table-row.component.js +0 -35
- package/esm/components/flat-table/flat-table-row/flat-table-row.style.js +2 -11
- package/esm/components/flat-table/flat-table-row-header/flat-table-row-header.component.js +0 -15
- package/esm/components/flat-table/flat-table.component.js +2 -20
- package/esm/components/flat-table/flat-table.style.js +0 -3
- package/esm/components/flat-table/sort/sort.component.js +0 -7
- package/esm/components/form/__internal__/form-summary.component.js +0 -7
- package/esm/components/form/form.component.js +0 -3
- package/esm/components/form/form.style.js +2 -3
- package/esm/components/global-header/global-header.component.js +1 -6
- package/esm/components/grid/grid-container/grid-container.component.js +0 -6
- package/esm/components/grid/grid-item/grid-item.component.js +0 -6
- package/esm/components/grid/grid-item/grid-item.style.js +0 -14
- package/esm/components/grouped-character/grouped-character.component.js +3 -21
- package/esm/components/heading/heading.component.js +2 -9
- package/esm/components/help/help.component.js +0 -8
- package/esm/components/hr/hr.component.js +0 -5
- package/esm/components/i18n-provider/i18n-provider.component.js +0 -2
- package/esm/components/icon/icon-unicodes.js +2 -1
- package/esm/components/icon/icon.component.js +1 -12
- package/esm/components/icon/icon.style.js +0 -6
- package/esm/components/icon-button/icon-button.component.js +0 -4
- package/esm/components/image/image.component.js +0 -3
- package/esm/components/image/image.style.js +2 -1
- package/esm/components/inline-inputs/inline-inputs.component.js +0 -6
- package/esm/components/link/link.component.js +3 -12
- package/esm/components/link/link.style.js +0 -4
- package/esm/components/link-preview/__internal__/placeholder.component.js +0 -2
- package/esm/components/link-preview/link-preview.component.js +0 -7
- package/esm/components/loader/loader-square.style.js +0 -6
- package/esm/components/loader/loader.component.js +0 -3
- package/esm/components/loader-bar/loader-bar.component.js +0 -3
- package/esm/components/loader-bar/loader-bar.style.js +0 -4
- package/esm/components/menu/__internal__/keyboard-navigation/index.js +0 -9
- package/esm/components/menu/__internal__/spec-helper/index.js +0 -2
- package/esm/components/menu/__internal__/submenu/submenu.component.js +7 -59
- package/esm/components/menu/menu-full-screen/menu-full-screen.component.js +0 -8
- package/esm/components/menu/menu-item/menu-item.component.js +0 -35
- package/esm/components/menu/menu-segment-title/menu-segment-title.component.js +0 -1
- package/esm/components/menu/menu.component.js +0 -8
- package/esm/components/menu/menu.context.js +1 -3
- package/esm/components/menu/scrollable-block/scrollable-block.component.js +0 -9
- package/esm/components/message/message-content/message-content.component.js +0 -2
- package/esm/components/message/message.component.js +0 -5
- package/esm/components/message/type-icon/type-icon.component.js +0 -2
- package/esm/components/modal/__internal__/modal-manager.js +0 -24
- package/esm/components/modal/modal.component.js +0 -6
- package/esm/components/multi-action-button/multi-action-button.component.js +3 -20
- package/esm/components/navigation-bar/navigation-bar.component.js +0 -3
- package/esm/components/note/note.component.js +1 -10
- package/esm/components/number/number.component.js +2 -9
- package/esm/components/numeral-date/numeral-date.component.js +9 -22
- package/esm/components/pager/__internal__/pager-navigation-link.component.js +0 -11
- package/esm/components/pager/__internal__/pager-navigation.component.js +0 -22
- package/esm/components/pager/pager.component.js +0 -29
- package/esm/components/pages/page/page.component.js +0 -3
- package/esm/components/pages/pages.component.js +4 -14
- package/esm/components/pill/pill.component.js +0 -3
- package/esm/components/pill/pill.style.js +0 -4
- package/esm/components/pod/pod.component.js +4 -40
- package/esm/components/pod/pod.style.js +6 -8
- package/esm/components/popover-container/popover-container.component.js +2 -14
- package/esm/components/popover-container/popover-container.style.js +0 -3
- package/esm/components/portal/portal.js +2 -14
- package/esm/components/portrait/portrait-gravatar.component.js +0 -4
- package/esm/components/portrait/portrait-initials.component.js +10 -12
- package/esm/components/portrait/portrait.component.js +0 -10
- package/esm/components/portrait/portrait.style.js +3 -10
- package/esm/components/preview/__internal__/preview-placeholder.component.js +0 -3
- package/esm/components/preview/preview.component.js +0 -7
- package/esm/components/preview/preview.style.js +2 -1
- package/esm/components/profile/profile.component.js +0 -8
- package/esm/components/progress-tracker/progress-tracker.component.js +2 -24
- package/esm/components/progress-tracker/progress-tracker.style.js +0 -5
- package/esm/components/radio-button/radio-button-group.component.js +2 -27
- package/esm/components/radio-button/radio-button-svg.component.js +0 -2
- package/esm/components/radio-button/radio-button.component.js +6 -32
- package/esm/components/search/search.component.js +2 -21
- package/esm/components/select/__internal__/select-text/select-text.component.js +0 -13
- package/esm/components/select/filterable-select/filterable-select.component.js +8 -73
- package/esm/components/select/list-action-button/list-action-button.component.js +0 -4
- package/esm/components/select/multi-select/multi-select.component.js +15 -81
- package/esm/components/select/option/option.component.js +0 -12
- package/esm/components/select/option-group-header/option-group-header.component.js +0 -3
- package/esm/components/select/option-row/option-row.component.js +0 -9
- package/esm/components/select/select-list/select-list.component.js +2 -45
- package/esm/components/select/select-list/select-list.style.js +2 -1
- package/esm/components/select/select-list/update-list-scroll.js +0 -3
- package/esm/components/select/select-textbox/select-textbox.component.js +2 -41
- package/esm/components/select/simple-select/simple-select.component.js +2 -60
- package/esm/components/select/utils/get-next-child-by-text.js +0 -8
- package/esm/components/select/utils/get-next-index-by-key.js +0 -13
- package/esm/components/select/utils/highlight-part-of-text.js +0 -7
- package/esm/components/select/utils/is-expected-option.js +0 -4
- package/esm/components/select/utils/is-expected-value.js +0 -1
- package/esm/components/select/utils/with-filter.hoc.js +3 -29
- package/esm/components/settings-row/settings-row.component.js +2 -10
- package/esm/components/show-edit-pod/show-edit-pod.component.js +6 -43
- package/esm/components/sidebar/__internal__/sidebar-header/sidebar-header.component.js +0 -2
- package/esm/components/sidebar/sidebar.component.js +3 -4
- package/esm/components/simple-color-picker/color-sample-box/color-sample-box.component.js +1 -5
- package/esm/components/simple-color-picker/simple-color/simple-color.component.js +0 -7
- package/esm/components/simple-color-picker/simple-color-picker.component.js +8 -41
- package/esm/components/simple-color-picker/simple-color-picker.style.js +0 -2
- package/esm/components/simple-color-picker/tick-icon/tick-icon.style.js +4 -6
- package/esm/components/split-button/split-button.component.js +1 -20
- package/esm/components/step-sequence/step-sequence-item/step-sequence-item.component.js +0 -9
- package/esm/components/step-sequence/step-sequence.component.js +0 -3
- package/esm/components/switch/__internal__/switch-slider.component.js +0 -2
- package/esm/components/switch/switch.component.js +0 -7
- package/esm/components/tabs/__internal__/tab-title/tab-title.component.js +8 -19
- package/esm/components/tabs/__internal__/tabs-header/tabs-header.component.js +0 -2
- package/esm/components/tabs/__internal__/tabs-header/tabs-header.style.js +0 -3
- package/esm/components/tabs/tab/tab.component.js +8 -24
- package/esm/components/tabs/tabs.component.js +24 -54
- package/esm/components/text-editor/__internal__/decorators/link-decorator.js +10 -10
- package/esm/components/text-editor/__internal__/editor-counter/editor-counter.component.js +0 -6
- package/esm/components/text-editor/__internal__/editor-link/editor-link.component.js +2 -7
- package/esm/components/text-editor/__internal__/label-wrapper/label-wrapper.component.js +0 -3
- package/esm/components/text-editor/__internal__/toolbar/toolbar-button/toolbar-button.component.js +0 -6
- package/esm/components/text-editor/__internal__/toolbar/toolbar.component.js +0 -10
- package/esm/components/text-editor/__internal__/utils/utils.js +9 -21
- package/esm/components/text-editor/text-editor.component.js +22 -53
- package/esm/components/textarea/textarea.component.js +6 -50
- package/esm/components/textbox/textbox.component.js +2 -9
- package/esm/components/tile/tile-footer/tile-footer.component.js +2 -5
- package/esm/components/tile/tile.component.js +0 -10
- package/esm/components/tile-select/__internal__/accordion/accordion.component.js +0 -2
- package/esm/components/tile-select/tile-select-group.component.js +2 -16
- package/esm/components/tile-select/tile-select.component.js +4 -33
- package/esm/components/toast/toast.component.js +0 -18
- package/esm/components/tooltip/tooltip-pointer.style.js +0 -2
- package/esm/components/tooltip/tooltip.component.js +0 -3
- package/esm/components/tooltip/tooltip.style.js +0 -6
- package/esm/components/typography/list.component.js +0 -7
- package/esm/components/typography/typography.component.js +0 -28
- package/esm/components/vertical-divider/vertical-divider.component.js +0 -3
- package/esm/hooks/__internal__/useCharacterCount/useCharacterCount.js +0 -4
- package/esm/hooks/__internal__/useClickAwayListener/useClickAwayListener.js +3 -2
- package/esm/hooks/__internal__/useFloating/useFloating.js +0 -6
- package/esm/hooks/__internal__/useIsStickyFooterForm/useIsStickyFooterForm.js +0 -1
- package/esm/hooks/__internal__/useMenuKeyboardNavigation/useMenuKeyboardNavigation.js +2 -16
- package/esm/hooks/__internal__/useModalManager/useModalManager.js +0 -4
- package/esm/hooks/__internal__/useResizeObserver/useResizeObserver.js +3 -8
- package/esm/hooks/__internal__/useScrollBlock/scroll-block-manager.js +6 -16
- package/esm/hooks/__internal__/useScrollBlock/useScrollBlock.js +11 -15
- package/esm/hooks/useMediaQuery/useMediaQuery.js +0 -2
- package/esm/locales/en-gb.js +1 -8
- package/esm/locales/pl-pl.js +1 -8
- package/esm/style/design-tokens/carbon-scoped-tokens-provider/carbon-scoped-tokens-provider.component.js +1 -0
- package/esm/style/design-tokens/debug-theme.util.js +5 -9
- package/esm/style/design-tokens/generate-css-variables.util.js +1 -0
- package/esm/style/palette/index.js +2 -6
- package/esm/style/themes/aegean/aegean-theme.config.js +0 -3
- package/esm/style/themes/base/base-theme.config.js +2 -4
- package/esm/style/themes/base/index.js +4 -2
- package/esm/style/themes/mint/mint-theme.config.js +0 -3
- package/esm/style/themes/sage/index.js +4 -2
- package/esm/style/themes/test-utils.js +4 -4
- package/esm/style/utils/add-hex-symbols.js +0 -1
- package/esm/style/utils/at-opacity.js +0 -1
- package/esm/style/utils/color.js +3 -8
- package/esm/style/utils/filter-out-styled-system-spacing-props.js +0 -2
- package/esm/style/utils/filter-styled-system-padding-props.js +2 -1
- package/esm/style/utils/form-style-utils.js +0 -12
- package/esm/style/utils/get-color-value.js +0 -1
- package/esm/style/utils/get-rgb-values.js +1 -1
- package/esm/style/utils/merge-deep.js +1 -6
- package/esm/style/utils/mix.js +1 -7
- package/esm/style/utils/width.js +1 -0
- package/lib/__internal__/DeprecationWarning.js +0 -5
- package/lib/__internal__/character-count/character-count.component.js +0 -6
- package/lib/__internal__/character-count/character-count.style.js +0 -6
- package/lib/__internal__/character-count/index.js +0 -2
- package/lib/__internal__/checkable-input/checkable-input-svg-wrapper.style.js +0 -3
- package/lib/__internal__/checkable-input/checkable-input.component.js +0 -16
- package/lib/__internal__/checkable-input/checkable-input.style.js +0 -11
- package/lib/__internal__/checkable-input/hidden-checkable-input.component.js +0 -20
- package/lib/__internal__/checkable-input/hidden-checkable-input.style.js +0 -3
- package/lib/__internal__/checkable-input/index.js +0 -2
- package/lib/__internal__/field-help/field-help.component.js +0 -6
- package/lib/__internal__/field-help/field-help.style.js +0 -4
- package/lib/__internal__/field-help/index.js +0 -2
- package/lib/__internal__/fieldset/fieldset.component.js +0 -9
- package/lib/__internal__/fieldset/fieldset.style.js +0 -7
- package/lib/__internal__/fieldset/index.js +0 -2
- package/lib/__internal__/filter-object-properties/filter-object-properties.js +0 -1
- package/lib/__internal__/filter-object-properties/index.js +0 -2
- package/lib/__internal__/focus-trap/focus-trap-utils.js +6 -26
- package/lib/__internal__/focus-trap/focus-trap.component.js +4 -26
- package/lib/__internal__/focus-trap/index.js +0 -2
- package/lib/__internal__/form-field/form-field.component.js +0 -18
- package/lib/__internal__/form-field/form-field.style.js +0 -6
- package/lib/__internal__/form-field/index.js +0 -2
- package/lib/__internal__/full-screen-heading/full-screen-heading.component.js +0 -10
- package/lib/__internal__/full-screen-heading/full-screen-heading.style.js +0 -5
- package/lib/__internal__/full-screen-heading/index.js +0 -2
- package/lib/__internal__/i18n-context/index.js +0 -5
- package/lib/__internal__/input/index.js +0 -4
- package/lib/__internal__/input/input-presentation.component.js +0 -13
- package/lib/__internal__/input/input-presentation.style.js +0 -12
- package/lib/__internal__/input/input.component.js +2 -33
- package/lib/__internal__/input/input.style.js +0 -4
- package/lib/__internal__/input-behaviour/index.js +0 -2
- package/lib/__internal__/input-behaviour/input-behaviour.component.js +2 -12
- package/lib/__internal__/input-behaviour/input-group-behaviour.component.js +0 -8
- package/lib/__internal__/input-behaviour/useInputBehaviour.js +2 -5
- package/lib/__internal__/input-icon-toggle/index.js +0 -2
- package/lib/__internal__/input-icon-toggle/input-icon-toggle.component.js +0 -11
- package/lib/__internal__/input-icon-toggle/input-icon-toggle.style.js +0 -7
- package/lib/__internal__/label/icon-wrapper.style.js +0 -5
- package/lib/__internal__/label/index.js +0 -2
- package/lib/__internal__/label/label.component.js +0 -22
- package/lib/__internal__/label/label.style.js +0 -4
- package/lib/__internal__/popover/index.js +0 -2
- package/lib/__internal__/popover/popover.component.js +0 -24
- package/lib/__internal__/popover/popover.style.js +0 -4
- package/lib/__internal__/radio-button-mapper/index.js +0 -2
- package/lib/__internal__/radio-button-mapper/radio-button-mapper.component.js +0 -15
- package/lib/__internal__/sticky-footer/index.js +0 -2
- package/lib/__internal__/sticky-footer/sticky-footer.component.js +0 -13
- package/lib/__internal__/sticky-footer/sticky-footer.style.js +0 -4
- package/lib/__internal__/tooltip-provider/index.js +0 -9
- package/lib/__internal__/utils/helpers/browser-type-check/index.js +0 -3
- package/lib/__internal__/utils/helpers/events/composedPath.js +0 -6
- package/lib/__internal__/utils/helpers/events/events.js +0 -18
- package/lib/__internal__/utils/helpers/events/index.js +0 -2
- package/lib/__internal__/utils/helpers/guid/index.js +0 -3
- package/lib/__internal__/utils/helpers/tags/index.js +0 -2
- package/lib/__internal__/utils/helpers/tags/tags-specs/index.js +0 -1
- package/lib/__internal__/utils/helpers/tags/tags-specs/tags-specs.js +2 -5
- package/lib/__internal__/utils/helpers/tags/tags.js +0 -5
- package/lib/__internal__/utils/helpers/useUniqueId/index.js +0 -5
- package/lib/__internal__/utils/logger/index.js +1 -2
- package/lib/__internal__/validation-message/index.js +0 -2
- package/lib/__internal__/validation-message/validation-message.component.js +0 -6
- package/lib/__internal__/validation-message/validation-message.style.js +0 -4
- package/lib/__internal__/validations/index.js +0 -2
- package/lib/__internal__/validations/validation-icon.component.js +0 -18
- package/lib/__internal__/validations/validation-icon.style.js +0 -8
- package/lib/__spec_helper__/enzyme-snapshot-helper.js +0 -6
- package/lib/__spec_helper__/expect.js +2 -8
- package/lib/__spec_helper__/index.js +0 -4
- package/lib/__spec_helper__/mock-match-media.js +0 -7
- package/lib/__spec_helper__/mock-resize-observer.js +0 -3
- package/lib/__spec_helper__/test-utils.js +28 -87
- package/lib/components/accordion/accordion-group/accordion-group.component.js +0 -20
- package/lib/components/accordion/accordion.component.js +0 -19
- package/lib/components/accordion/accordion.style.js +0 -9
- package/lib/components/accordion/index.js +0 -3
- package/lib/components/action-popover/action-popover-context.js +0 -4
- package/lib/components/action-popover/action-popover-divider/action-popover-divider.component.js +0 -2
- package/lib/components/action-popover/action-popover-item/action-popover-item.component.js +2 -34
- package/lib/components/action-popover/action-popover-menu/action-popover-menu.component.js +2 -22
- package/lib/components/action-popover/action-popover-menu-button/action-popover-menu-button.component.js +0 -8
- package/lib/components/action-popover/action-popover.component.js +4 -35
- package/lib/components/action-popover/action-popover.style.js +0 -10
- package/lib/components/action-popover/index.js +0 -6
- package/lib/components/advanced-color-picker/advanced-color-picker-cell.style.js +0 -4
- package/lib/components/advanced-color-picker/advanced-color-picker.component.js +0 -30
- package/lib/components/advanced-color-picker/advanced-color-picker.style.js +0 -14
- package/lib/components/advanced-color-picker/index.js +0 -2
- package/lib/components/alert/alert.component.js +0 -7
- package/lib/components/alert/index.js +0 -2
- package/lib/components/anchor-navigation/anchor-navigation-item/anchor-navigation-item.component.js +0 -6
- package/lib/components/anchor-navigation/anchor-navigation-item/anchor-navigation-item.style.js +0 -4
- package/lib/components/anchor-navigation/anchor-navigation.component.js +5 -27
- package/lib/components/anchor-navigation/anchor-navigation.style.js +0 -3
- package/lib/components/anchor-navigation/anchor-section-divider.component.js +0 -3
- package/lib/components/anchor-navigation/index.js +0 -4
- package/lib/components/badge/badge.component.js +0 -6
- package/lib/components/badge/badge.style.js +0 -6
- package/lib/components/badge/index.js +0 -2
- package/lib/components/batch-selection/batch-selection.component.js +0 -11
- package/lib/components/batch-selection/batch-selection.style.js +0 -7
- package/lib/components/batch-selection/index.js +0 -2
- package/lib/components/box/box.component.js +0 -9
- package/lib/components/box/box.config.js +0 -3
- package/lib/components/box/index.js +0 -2
- package/lib/components/button/button-types.style.js +0 -6
- package/lib/components/button/button.component.js +0 -29
- package/lib/components/button/button.style.js +0 -16
- package/lib/components/button/index.js +0 -3
- package/lib/components/button-bar/button-bar.component.js +2 -18
- package/lib/components/button-bar/button-bar.style.js +0 -8
- package/lib/components/button-bar/index.js +0 -2
- package/lib/components/button-toggle/button-toggle-icon.component.js +0 -7
- package/lib/components/button-toggle/button-toggle-input.component.js +0 -15
- package/lib/components/button-toggle/button-toggle.component.js +0 -17
- package/lib/components/button-toggle/button-toggle.style.js +0 -6
- package/lib/components/button-toggle/index.js +0 -2
- package/lib/components/button-toggle-group/button-toggle-group.component.js +0 -18
- package/lib/components/button-toggle-group/button-toggle-group.style.js +0 -7
- package/lib/components/button-toggle-group/index.js +0 -2
- package/lib/components/carbon-provider/carbon-provider.component.js +0 -12
- package/lib/components/carbon-provider/index.js +0 -2
- package/lib/components/carbon-provider/top-modal-context.js +3 -13
- package/lib/components/card/card-column/card-column.component.js +0 -6
- package/lib/components/card/card-column/card-column.style.js +0 -3
- package/lib/components/card/card-column/index.js +0 -2
- package/lib/components/card/card-footer/card-footer.component.js +0 -8
- package/lib/components/card/card-footer/card-footer.style.js +0 -7
- package/lib/components/card/card-footer/index.js +0 -2
- package/lib/components/card/card-row/card-row.component.js +0 -8
- package/lib/components/card/card-row/card-row.style.js +0 -7
- package/lib/components/card/card-row/index.js +0 -2
- package/lib/components/card/card.component.js +0 -19
- package/lib/components/card/card.style.js +0 -7
- package/lib/components/card/index.js +0 -5
- package/lib/components/carousel/carousel.component.js +0 -24
- package/lib/components/carousel/carousel.style.js +0 -8
- package/lib/components/carousel/index.js +0 -3
- package/lib/components/carousel/slide/index.js +0 -2
- package/lib/components/carousel/slide/slide.component.js +0 -8
- package/lib/components/carousel/slide/slide.style.js +2 -5
- package/lib/components/carousel/slide.config.js +0 -2
- package/lib/components/checkbox/checkbox-group.component.js +0 -13
- package/lib/components/checkbox/checkbox-group.style.js +0 -10
- package/lib/components/checkbox/checkbox-svg.component.js +0 -6
- package/lib/components/checkbox/checkbox.component.js +0 -19
- package/lib/components/checkbox/checkbox.style.js +0 -13
- package/lib/components/checkbox/index.js +0 -3
- package/lib/components/confirm/confirm.component.js +0 -51
- package/lib/components/confirm/confirm.style.js +0 -8
- package/lib/components/confirm/index.js +0 -2
- package/lib/components/content/content.component.js +0 -7
- package/lib/components/content/content.style.js +0 -6
- package/lib/components/content/index.js +0 -2
- package/lib/components/date/__internal__/date-formats/index.js +6 -19
- package/lib/components/date/__internal__/date-picker/date-picker.component.js +2 -31
- package/lib/components/date/__internal__/date-picker/day-picker.style.js +0 -5
- package/lib/components/date/__internal__/date-picker/index.js +0 -2
- package/lib/components/date/__internal__/navbar/button.style.js +0 -3
- package/lib/components/date/__internal__/navbar/index.js +0 -2
- package/lib/components/date/__internal__/navbar/navbar.component.js +0 -8
- package/lib/components/date/__internal__/navbar/navbar.style.js +0 -3
- package/lib/components/date/__internal__/utils.js +1 -42
- package/lib/components/date/__internal__/weekday/abbr.style.js +0 -3
- package/lib/components/date/__internal__/weekday/index.js +0 -2
- package/lib/components/date/__internal__/weekday/weekday.component.js +0 -8
- package/lib/components/date/__internal__/weekday/weekday.style.js +0 -3
- package/lib/components/date/date.component.js +10 -71
- package/lib/components/date/date.style.js +0 -8
- package/lib/components/date/index.js +0 -2
- package/lib/components/date-range/date-range.component.js +14 -63
- package/lib/components/date-range/date-range.context.js +0 -4
- package/lib/components/date-range/date-range.style.js +0 -8
- package/lib/components/date-range/index.js +0 -2
- package/lib/components/decimal/decimal.component.js +4 -38
- package/lib/components/decimal/index.js +0 -2
- package/lib/components/definition-list/__internal__/dl.context.js +0 -4
- package/lib/components/definition-list/dd.component.js +0 -7
- package/lib/components/definition-list/definition-list.style.js +0 -8
- package/lib/components/definition-list/dl.component.js +0 -20
- package/lib/components/definition-list/dt.component.js +0 -10
- package/lib/components/definition-list/index.js +0 -4
- package/lib/components/detail/detail.component.js +2 -17
- package/lib/components/detail/detail.style.js +0 -8
- package/lib/components/detail/index.js +0 -2
- package/lib/components/dialog/dialog.component.js +0 -32
- package/lib/components/dialog/dialog.style.js +0 -14
- package/lib/components/dialog/index.js +0 -2
- package/lib/components/dialog-full-screen/content.style.js +0 -5
- package/lib/components/dialog-full-screen/dialog-full-screen.component.js +0 -42
- package/lib/components/dialog-full-screen/dialog-full-screen.style.js +0 -11
- package/lib/components/dialog-full-screen/index.js +0 -2
- package/lib/components/dismissible-box/dismissible-box.component.js +0 -9
- package/lib/components/dismissible-box/dismissible-box.style.js +0 -7
- package/lib/components/dismissible-box/index.js +0 -2
- package/lib/components/draggable/draggable-container.component.js +4 -30
- package/lib/components/draggable/draggable-item.component.js +2 -19
- package/lib/components/draggable/draggable-item.style.js +0 -6
- package/lib/components/draggable/index.js +0 -3
- package/lib/components/drawer/drawer.component.js +0 -29
- package/lib/components/drawer/drawer.style.js +0 -15
- package/lib/components/drawer/index.js +0 -3
- package/lib/components/duelling-picklist/duelling-picklist.component.js +2 -26
- package/lib/components/duelling-picklist/duelling-picklist.context.js +0 -4
- package/lib/components/duelling-picklist/duelling-picklist.style.js +0 -6
- package/lib/components/duelling-picklist/index.js +0 -7
- package/lib/components/duelling-picklist/picklist/picklist.component.js +0 -25
- package/lib/components/duelling-picklist/picklist/picklist.style.js +0 -4
- package/lib/components/duelling-picklist/picklist-divider/picklist-divider.component.js +0 -6
- package/lib/components/duelling-picklist/picklist-divider/picklist-divider.style.js +0 -3
- package/lib/components/duelling-picklist/picklist-group/picklist-group.component.js +0 -22
- package/lib/components/duelling-picklist/picklist-group/picklist-group.style.js +0 -7
- package/lib/components/duelling-picklist/picklist-item/picklist-item.component.js +0 -25
- package/lib/components/duelling-picklist/picklist-item/picklist-item.style.js +0 -8
- package/lib/components/duelling-picklist/picklist-placeholder/picklist-placeholder.component.js +0 -6
- package/lib/components/fieldset/fieldset.component.js +0 -11
- package/lib/components/fieldset/fieldset.style.js +0 -9
- package/lib/components/fieldset/index.js +0 -2
- package/lib/components/flat-table/flat-table-body/flat-table-body.component.js +0 -6
- package/lib/components/flat-table/flat-table-body/index.js +0 -2
- package/lib/components/flat-table/flat-table-body-draggable/flat-table-body-draggable.component.js +0 -23
- package/lib/components/flat-table/flat-table-body-draggable/flat-table-body-draggable.style.js +0 -4
- package/lib/components/flat-table/flat-table-body-draggable/index.js +0 -2
- package/lib/components/flat-table/flat-table-cell/flat-table-cell.component.js +0 -28
- package/lib/components/flat-table/flat-table-cell/flat-table-cell.style.js +0 -8
- package/lib/components/flat-table/flat-table-cell/index.js +0 -2
- package/lib/components/flat-table/flat-table-checkbox/flat-table-checkbox.component.js +0 -22
- package/lib/components/flat-table/flat-table-checkbox/flat-table-checkbox.style.js +0 -6
- package/lib/components/flat-table/flat-table-checkbox/index.js +0 -2
- package/lib/components/flat-table/flat-table-head/flat-table-head.component.js +4 -15
- package/lib/components/flat-table/flat-table-head/flat-table-head.style.js +0 -6
- package/lib/components/flat-table/flat-table-head/index.js +0 -2
- package/lib/components/flat-table/flat-table-header/flat-table-header-utils.js +1 -5
- package/lib/components/flat-table/flat-table-header/flat-table-header.component.js +0 -23
- package/lib/components/flat-table/flat-table-header/flat-table-header.style.js +0 -9
- package/lib/components/flat-table/flat-table-header/index.js +0 -2
- package/lib/components/flat-table/flat-table-row/__internal__/flat-table-row-draggable.component.js +0 -13
- package/lib/components/flat-table/flat-table-row/flat-table-row.component.js +0 -50
- package/lib/components/flat-table/flat-table-row/flat-table-row.style.js +2 -23
- package/lib/components/flat-table/flat-table-row/index.js +0 -2
- package/lib/components/flat-table/flat-table-row-header/flat-table-row-header.component.js +0 -25
- package/lib/components/flat-table/flat-table-row-header/flat-table-row-header.style.js +0 -8
- package/lib/components/flat-table/flat-table-row-header/index.js +0 -2
- package/lib/components/flat-table/flat-table.component.js +2 -29
- package/lib/components/flat-table/flat-table.style.js +0 -17
- package/lib/components/flat-table/index.js +0 -11
- package/lib/components/flat-table/sort/index.js +0 -2
- package/lib/components/flat-table/sort/sort.component.js +0 -16
- package/lib/components/flat-table/sort/sort.style.js +0 -4
- package/lib/components/form/__internal__/form-summary.component.js +0 -15
- package/lib/components/form/__internal__/form-summary.style.js +0 -7
- package/lib/components/form/form.component.js +0 -12
- package/lib/components/form/form.style.js +2 -17
- package/lib/components/form/index.js +0 -2
- package/lib/components/global-header/global-header.component.js +1 -16
- package/lib/components/global-header/index.js +0 -2
- package/lib/components/grid/grid-container/grid-container.component.js +0 -10
- package/lib/components/grid/grid-container/grid-container.style.js +0 -4
- package/lib/components/grid/grid-container/index.js +0 -2
- package/lib/components/grid/grid-item/grid-item.component.js +0 -10
- package/lib/components/grid/grid-item/grid-item.style.js +0 -19
- package/lib/components/grid/grid-item/index.js +0 -2
- package/lib/components/grid/index.js +0 -3
- package/lib/components/grouped-character/grouped-character.component.js +3 -28
- package/lib/components/grouped-character/grouped-character.utils.js +0 -4
- package/lib/components/grouped-character/index.js +0 -2
- package/lib/components/heading/heading.component.js +2 -16
- package/lib/components/heading/heading.style.js +0 -13
- package/lib/components/heading/index.js +0 -2
- package/lib/components/help/help.component.js +0 -20
- package/lib/components/help/help.style.js +0 -8
- package/lib/components/help/index.js +0 -2
- package/lib/components/hr/hr.component.js +0 -10
- package/lib/components/hr/hr.style.js +0 -5
- package/lib/components/hr/index.js +0 -2
- package/lib/components/i18n-provider/i18n-provider.component.js +0 -8
- package/lib/components/i18n-provider/index.js +0 -2
- package/lib/components/icon/icon-unicodes.js +2 -1
- package/lib/components/icon/icon.component.js +1 -27
- package/lib/components/icon/icon.style.js +0 -18
- package/lib/components/icon/index.js +0 -2
- package/lib/components/icon-button/icon-button.component.js +0 -15
- package/lib/components/icon-button/icon-button.style.js +0 -8
- package/lib/components/icon-button/index.js +0 -2
- package/lib/components/image/image.component.js +0 -8
- package/lib/components/image/image.style.js +2 -7
- package/lib/components/image/index.js +0 -2
- package/lib/components/inline-inputs/index.js +0 -3
- package/lib/components/inline-inputs/inline-inputs.component.js +0 -17
- package/lib/components/inline-inputs/inline-inputs.style.js +0 -8
- package/lib/components/link/index.js +0 -2
- package/lib/components/link/link.component.js +3 -24
- package/lib/components/link/link.style.js +0 -11
- package/lib/components/link-preview/__internal__/placeholder.component.js +0 -6
- package/lib/components/link-preview/index.js +0 -2
- package/lib/components/link-preview/link-preview.component.js +0 -17
- package/lib/components/link-preview/link-preview.style.js +0 -6
- package/lib/components/loader/index.js +0 -2
- package/lib/components/loader/loader-square.style.js +0 -10
- package/lib/components/loader/loader.component.js +0 -9
- package/lib/components/loader/loader.style.js +0 -5
- package/lib/components/loader-bar/index.js +0 -2
- package/lib/components/loader-bar/loader-bar.component.js +0 -10
- package/lib/components/loader-bar/loader-bar.style.js +0 -10
- package/lib/components/menu/__internal__/keyboard-navigation/index.js +0 -11
- package/lib/components/menu/__internal__/spec-helper/index.js +0 -7
- package/lib/components/menu/__internal__/submenu/submenu.component.js +7 -80
- package/lib/components/menu/__internal__/submenu/submenu.context.js +0 -4
- package/lib/components/menu/__internal__/submenu/submenu.style.js +0 -12
- package/lib/components/menu/index.js +0 -7
- package/lib/components/menu/menu-divider/menu-divider.component.js +0 -10
- package/lib/components/menu/menu-divider/menu-divider.style.js +0 -6
- package/lib/components/menu/menu-full-screen/index.js +0 -2
- package/lib/components/menu/menu-full-screen/menu-full-screen.component.js +0 -23
- package/lib/components/menu/menu-full-screen/menu-full-screen.style.js +0 -12
- package/lib/components/menu/menu-item/index.js +0 -2
- package/lib/components/menu/menu-item/menu-item.component.js +0 -52
- package/lib/components/menu/menu-item/menu-item.style.js +0 -8
- package/lib/components/menu/menu-segment-title/menu-segment-title.component.js +0 -11
- package/lib/components/menu/menu-segment-title/menu-segment-title.style.js +0 -6
- package/lib/components/menu/menu.component.js +0 -18
- package/lib/components/menu/menu.context.js +1 -7
- package/lib/components/menu/menu.style.js +0 -9
- package/lib/components/menu/scrollable-block/index.js +0 -2
- package/lib/components/menu/scrollable-block/scrollable-block.component.js +0 -19
- package/lib/components/menu/scrollable-block/scrollable-block.style.js +0 -7
- package/lib/components/message/index.js +0 -2
- package/lib/components/message/message-content/message-content.component.js +0 -7
- package/lib/components/message/message-content/message-content.style.js +0 -3
- package/lib/components/message/message.component.js +0 -16
- package/lib/components/message/message.style.js +0 -8
- package/lib/components/message/type-icon/type-icon.component.js +0 -7
- package/lib/components/message/type-icon/type-icon.style.js +0 -4
- package/lib/components/modal/__internal__/modal-manager.js +0 -25
- package/lib/components/modal/index.js +0 -3
- package/lib/components/modal/modal.component.js +0 -19
- package/lib/components/modal/modal.style.js +0 -6
- package/lib/components/multi-action-button/index.js +0 -2
- package/lib/components/multi-action-button/multi-action-button.component.js +3 -32
- package/lib/components/multi-action-button/multi-action-button.style.js +0 -9
- package/lib/components/navigation-bar/index.js +0 -2
- package/lib/components/navigation-bar/navigation-bar.component.js +0 -7
- package/lib/components/navigation-bar/navigation-bar.style.js +0 -6
- package/lib/components/note/__internal__/status-icon/index.js +0 -2
- package/lib/components/note/__internal__/status-icon/status-icon.component.js +0 -7
- package/lib/components/note/__internal__/status-icon/status-icon.style.js +0 -3
- package/lib/components/note/index.js +0 -2
- package/lib/components/note/note.component.js +1 -21
- package/lib/components/note/note.style.js +0 -8
- package/lib/components/number/index.js +0 -3
- package/lib/components/number/number.component.js +2 -14
- package/lib/components/numeral-date/index.js +0 -2
- package/lib/components/numeral-date/numeral-date-context.js +0 -4
- package/lib/components/numeral-date/numeral-date.component.js +9 -42
- package/lib/components/numeral-date/numeral-date.style.js +0 -9
- package/lib/components/pager/__internal__/pager-navigation-link.component.js +0 -18
- package/lib/components/pager/__internal__/pager-navigation.component.js +0 -34
- package/lib/components/pager/index.js +0 -2
- package/lib/components/pager/pager.component.js +0 -40
- package/lib/components/pager/pager.style.js +0 -10
- package/lib/components/pages/index.js +0 -3
- package/lib/components/pages/page/index.js +0 -2
- package/lib/components/pages/page/page.component.js +0 -14
- package/lib/components/pages/page/page.style.js +0 -5
- package/lib/components/pages/pages.component.js +4 -26
- package/lib/components/pages/pages.config.js +0 -2
- package/lib/components/pages/pages.style.js +0 -6
- package/lib/components/pill/index.js +0 -2
- package/lib/components/pill/pill.component.js +0 -10
- package/lib/components/pill/pill.style.config.js +0 -2
- package/lib/components/pill/pill.style.js +0 -15
- package/lib/components/pod/index.js +0 -2
- package/lib/components/pod/pod.component.js +4 -53
- package/lib/components/pod/pod.style.js +6 -19
- package/lib/components/popover-container/index.js +0 -2
- package/lib/components/popover-container/popover-container.component.js +2 -27
- package/lib/components/popover-container/popover-container.style.js +0 -10
- package/lib/components/portal/index.js +0 -2
- package/lib/components/portal/portal.js +2 -23
- package/lib/components/portrait/index.js +0 -2
- package/lib/components/portrait/portrait-gravatar.component.js +0 -10
- package/lib/components/portrait/portrait-initials.component.js +10 -20
- package/lib/components/portrait/portrait.component.js +0 -21
- package/lib/components/portrait/portrait.style.js +3 -19
- package/lib/components/preview/__internal__/preview-placeholder.component.js +0 -8
- package/lib/components/preview/__internal__/preview-placeholder.style.js +0 -4
- package/lib/components/preview/index.js +0 -2
- package/lib/components/preview/preview.component.js +0 -13
- package/lib/components/preview/preview.style.js +3 -6
- package/lib/components/profile/index.js +0 -2
- package/lib/components/profile/profile.component.js +0 -14
- package/lib/components/profile/profile.style.js +0 -7
- package/lib/components/progress-tracker/index.js +0 -2
- package/lib/components/progress-tracker/progress-tracker.component.js +2 -35
- package/lib/components/progress-tracker/progress-tracker.config.js +0 -1
- package/lib/components/progress-tracker/progress-tracker.style.js +0 -14
- package/lib/components/radio-button/index.js +0 -6
- package/lib/components/radio-button/radio-button-group.component.js +2 -39
- package/lib/components/radio-button/radio-button-group.style.js +0 -4
- package/lib/components/radio-button/radio-button-svg.component.js +0 -6
- package/lib/components/radio-button/radio-button.component.js +6 -48
- package/lib/components/radio-button/radio-button.style.js +0 -14
- package/lib/components/search/index.js +0 -2
- package/lib/components/search/search-button.style.js +0 -6
- package/lib/components/search/search.component.js +2 -34
- package/lib/components/search/search.style.js +0 -12
- package/lib/components/select/__internal__/select-list-context.js +0 -4
- package/lib/components/select/__internal__/select-text/select-text.component.js +0 -17
- package/lib/components/select/__internal__/select-text/select-text.style.js +0 -6
- package/lib/components/select/filterable-select/filterable-select.component.js +8 -91
- package/lib/components/select/index.js +0 -7
- package/lib/components/select/list-action-button/list-action-button.component.js +0 -12
- package/lib/components/select/list-action-button/list-action-button.style.js +0 -4
- package/lib/components/select/multi-select/multi-select.component.js +15 -102
- package/lib/components/select/multi-select/multi-select.style.js +0 -10
- package/lib/components/select/option/option.component.js +0 -21
- package/lib/components/select/option/option.style.js +0 -6
- package/lib/components/select/option-group-header/option-group-header.component.js +0 -8
- package/lib/components/select/option-group-header/option-group-header.style.js +0 -4
- package/lib/components/select/option-row/option-row.component.js +0 -18
- package/lib/components/select/option-row/option-row.style.js +0 -4
- package/lib/components/select/select-list/select-list-container.style.js +0 -4
- package/lib/components/select/select-list/select-list.component.js +2 -67
- package/lib/components/select/select-list/select-list.style.js +2 -5
- package/lib/components/select/select-list/update-list-scroll.js +0 -4
- package/lib/components/select/select-textbox/select-textbox.component.js +2 -53
- package/lib/components/select/select.style.js +0 -10
- package/lib/components/select/simple-select/simple-select.component.js +2 -78
- package/lib/components/select/utils/get-next-child-by-text.js +0 -9
- package/lib/components/select/utils/get-next-index-by-key.js +0 -14
- package/lib/components/select/utils/highlight-part-of-text.js +0 -11
- package/lib/components/select/utils/is-expected-option.js +0 -9
- package/lib/components/select/utils/is-expected-value.js +0 -2
- package/lib/components/select/utils/is-navigation-key.js +0 -1
- package/lib/components/select/utils/matching-text.style.js +0 -3
- package/lib/components/select/utils/with-filter.hoc.js +3 -43
- package/lib/components/settings-row/index.js +0 -2
- package/lib/components/settings-row/settings-row.component.js +2 -19
- package/lib/components/settings-row/settings-row.style.js +0 -8
- package/lib/components/show-edit-pod/index.js +0 -2
- package/lib/components/show-edit-pod/show-edit-pod.component.js +6 -58
- package/lib/components/show-edit-pod/show-edit-pod.style.js +0 -6
- package/lib/components/sidebar/__internal__/sidebar-header/index.js +0 -2
- package/lib/components/sidebar/__internal__/sidebar-header/sidebar-header.component.js +0 -6
- package/lib/components/sidebar/__internal__/sidebar-header/sidebar-header.style.js +0 -3
- package/lib/components/sidebar/index.js +0 -3
- package/lib/components/sidebar/sidebar.component.js +0 -26
- package/lib/components/sidebar/sidebar.style.js +0 -11
- package/lib/components/simple-color-picker/color-sample-box/color-sample-box.component.js +1 -11
- package/lib/components/simple-color-picker/color-sample-box/color-sample-box.style.js +0 -7
- package/lib/components/simple-color-picker/color-sample-box/index.js +0 -2
- package/lib/components/simple-color-picker/index.js +0 -3
- package/lib/components/simple-color-picker/simple-color/index.js +0 -2
- package/lib/components/simple-color-picker/simple-color/simple-color.component.js +0 -16
- package/lib/components/simple-color-picker/simple-color/simple-color.style.js +0 -3
- package/lib/components/simple-color-picker/simple-color-input/simple-color-input.style.js +0 -5
- package/lib/components/simple-color-picker/simple-color-picker.component.js +8 -59
- package/lib/components/simple-color-picker/simple-color-picker.style.js +0 -8
- package/lib/components/simple-color-picker/tick-icon/tick-icon.style.js +4 -12
- package/lib/components/split-button/index.js +0 -2
- package/lib/components/split-button/split-button-children.style.js +0 -7
- package/lib/components/split-button/split-button-toggle.style.js +0 -7
- package/lib/components/split-button/split-button.component.js +1 -40
- package/lib/components/split-button/split-button.style.js +0 -6
- package/lib/components/step-sequence/index.js +0 -3
- package/lib/components/step-sequence/step-sequence-item/index.js +0 -2
- package/lib/components/step-sequence/step-sequence-item/step-sequence-item.component.js +0 -17
- package/lib/components/step-sequence/step-sequence-item/step-sequence-item.style.js +0 -6
- package/lib/components/step-sequence/step-sequence.component.js +0 -9
- package/lib/components/step-sequence/step-sequence.style.js +0 -6
- package/lib/components/switch/__internal__/switch-slider-panel.style.js +0 -7
- package/lib/components/switch/__internal__/switch-slider.component.js +0 -12
- package/lib/components/switch/__internal__/switch-slider.style.js +0 -7
- package/lib/components/switch/index.js +0 -2
- package/lib/components/switch/switch.component.js +0 -18
- package/lib/components/switch/switch.style.js +0 -14
- package/lib/components/tabs/__internal__/tab-title/index.js +0 -2
- package/lib/components/tabs/__internal__/tab-title/tab-title.component.js +8 -37
- package/lib/components/tabs/__internal__/tab-title/tab-title.style.js +0 -8
- package/lib/components/tabs/__internal__/tabs-header/index.js +0 -2
- package/lib/components/tabs/__internal__/tabs-header/tabs-header.component.js +0 -6
- package/lib/components/tabs/__internal__/tabs-header/tabs-header.style.js +0 -8
- package/lib/components/tabs/index.js +0 -1
- package/lib/components/tabs/tab/index.js +0 -3
- package/lib/components/tabs/tab/tab.component.js +8 -35
- package/lib/components/tabs/tab/tab.style.js +0 -8
- package/lib/components/tabs/tabs.component.js +24 -75
- package/lib/components/tabs/tabs.style.js +0 -10
- package/lib/components/text-editor/__internal__/decorators/index.js +0 -5
- package/lib/components/text-editor/__internal__/decorators/link-decorator.js +10 -12
- package/lib/components/text-editor/__internal__/editor-counter/editor-counter.component.js +0 -11
- package/lib/components/text-editor/__internal__/editor-counter/editor-counter.style.js +0 -3
- package/lib/components/text-editor/__internal__/editor-counter/index.js +0 -2
- package/lib/components/text-editor/__internal__/editor-link/editor-link.component.js +2 -14
- package/lib/components/text-editor/__internal__/editor-link/editor-link.style.js +0 -4
- package/lib/components/text-editor/__internal__/editor-link/index.js +0 -2
- package/lib/components/text-editor/__internal__/label-wrapper/index.js +0 -2
- package/lib/components/text-editor/__internal__/label-wrapper/label-wrapper.component.js +0 -6
- package/lib/components/text-editor/__internal__/toolbar/index.js +0 -2
- package/lib/components/text-editor/__internal__/toolbar/toolbar-button/index.js +0 -2
- package/lib/components/text-editor/__internal__/toolbar/toolbar-button/toolbar-button.component.js +0 -12
- package/lib/components/text-editor/__internal__/toolbar/toolbar-button/toolbar-button.style.js +0 -6
- package/lib/components/text-editor/__internal__/toolbar/toolbar.component.js +0 -22
- package/lib/components/text-editor/__internal__/toolbar/toolbar.style.js +0 -4
- package/lib/components/text-editor/__internal__/utils/index.js +0 -1
- package/lib/components/text-editor/__internal__/utils/utils.js +9 -49
- package/lib/components/text-editor/index.js +0 -3
- package/lib/components/text-editor/text-editor.component.js +22 -76
- package/lib/components/text-editor/text-editor.style.js +0 -8
- package/lib/components/textarea/index.js +0 -2
- package/lib/components/textarea/textarea.component.js +6 -71
- package/lib/components/textarea/textarea.style.js +0 -10
- package/lib/components/textbox/__internal__/prefix.style.js +0 -3
- package/lib/components/textbox/index.js +0 -2
- package/lib/components/textbox/textbox.component.js +2 -28
- package/lib/components/textbox/textbox.style.js +0 -4
- package/lib/components/tile/index.js +0 -2
- package/lib/components/tile/tile-footer/index.js +0 -2
- package/lib/components/tile/tile-footer/tile-footer.component.js +2 -12
- package/lib/components/tile/tile-footer/tile-footer.style.js +0 -6
- package/lib/components/tile/tile.component.js +0 -16
- package/lib/components/tile/tile.style.js +0 -9
- package/lib/components/tile-select/__internal__/accordion/accordion.component.js +0 -9
- package/lib/components/tile-select/__internal__/accordion/accordion.style.js +0 -4
- package/lib/components/tile-select/__internal__/accordion/index.js +0 -2
- package/lib/components/tile-select/index.js +0 -3
- package/lib/components/tile-select/tile-select-group.component.js +2 -28
- package/lib/components/tile-select/tile-select.component.js +4 -48
- package/lib/components/tile-select/tile-select.style.js +0 -11
- package/lib/components/toast/index.js +0 -2
- package/lib/components/toast/toast.component.js +0 -34
- package/lib/components/toast/toast.style.js +0 -12
- package/lib/components/tooltip/index.js +0 -2
- package/lib/components/tooltip/tooltip-pointer.style.js +0 -8
- package/lib/components/tooltip/tooltip.component.js +0 -17
- package/lib/components/tooltip/tooltip.style.js +0 -13
- package/lib/components/typography/index.js +0 -3
- package/lib/components/typography/list.component.js +0 -11
- package/lib/components/typography/typography.component.js +0 -36
- package/lib/components/vertical-divider/index.js +0 -2
- package/lib/components/vertical-divider/vertical-divider.component.js +0 -10
- package/lib/components/vertical-divider/vertical-divider.style.js +0 -6
- package/lib/hooks/__internal__/useCharacterCount/index.js +0 -2
- package/lib/hooks/__internal__/useCharacterCount/useCharacterCount.js +0 -10
- package/lib/hooks/__internal__/useClickAwayListener/index.js +0 -2
- package/lib/hooks/__internal__/useClickAwayListener/useClickAwayListener.js +0 -4
- package/lib/hooks/__internal__/useFloating/index.js +0 -2
- package/lib/hooks/__internal__/useFloating/useFloating.js +0 -8
- package/lib/hooks/__internal__/useInputAccessibility/index.js +0 -2
- package/lib/hooks/__internal__/useInputAccessibility/useInputAccessibility.js +0 -1
- package/lib/hooks/__internal__/useIsAboveBreakpoint/index.js +0 -2
- package/lib/hooks/__internal__/useIsAboveBreakpoint/useIsAboveBreakpoint.js +0 -3
- package/lib/hooks/__internal__/useIsStickyFooterForm/index.js +0 -2
- package/lib/hooks/__internal__/useIsStickyFooterForm/useIsStickyFooterForm.js +0 -8
- package/lib/hooks/__internal__/useLocale/index.js +0 -2
- package/lib/hooks/__internal__/useLocale/useLocale.js +0 -4
- package/lib/hooks/__internal__/useMenuKeyboardNavigation/index.js +0 -2
- package/lib/hooks/__internal__/useMenuKeyboardNavigation/useMenuKeyboardNavigation.js +2 -23
- package/lib/hooks/__internal__/useModalManager/index.js +0 -2
- package/lib/hooks/__internal__/useModalManager/useModalManager.js +0 -9
- package/lib/hooks/__internal__/usePrevious/index.js +0 -2
- package/lib/hooks/__internal__/useResizeObserver/index.js +0 -2
- package/lib/hooks/__internal__/useResizeObserver/useResizeObserver.js +3 -10
- package/lib/hooks/__internal__/useScrollBlock/index.js +0 -2
- package/lib/hooks/__internal__/useScrollBlock/scroll-block-manager.js +6 -17
- package/lib/hooks/__internal__/useScrollBlock/useScrollBlock.js +8 -18
- package/lib/hooks/useMediaQuery/index.js +0 -2
- package/lib/hooks/useMediaQuery/useMediaQuery.js +0 -8
- package/lib/locales/date-fns-locales/index.js +0 -2
- package/lib/locales/en-gb.js +1 -9
- package/lib/locales/index.js +0 -3
- package/lib/locales/pl-pl.js +1 -9
- package/lib/style/design-tokens/carbon-scoped-tokens-provider/carbon-scoped-tokens-provider.component.js +1 -5
- package/lib/style/design-tokens/carbon-scoped-tokens-provider/index.js +0 -2
- package/lib/style/design-tokens/debug-theme.util.js +5 -12
- package/lib/style/design-tokens/generate-css-variables.util.js +0 -2
- package/lib/style/global-style.js +0 -2
- package/lib/style/palette/index.js +2 -9
- package/lib/style/themes/aegean/aegean-theme.config.js +0 -5
- package/lib/style/themes/aegean/index.js +0 -5
- package/lib/style/themes/base/base-theme.config.js +2 -9
- package/lib/style/themes/base/index.js +4 -12
- package/lib/style/themes/index.js +0 -7
- package/lib/style/themes/medium/index.js +0 -3
- package/lib/style/themes/mint/index.js +0 -5
- package/lib/style/themes/mint/mint-theme.config.js +0 -5
- package/lib/style/themes/none/index.js +0 -5
- package/lib/style/themes/none/none-theme.config.js +0 -2
- package/lib/style/themes/sage/index.js +4 -6
- package/lib/style/themes/small/index.js +0 -3
- package/lib/style/themes/test-utils.js +4 -6
- package/lib/style/utils/add-hex-symbols.js +0 -3
- package/lib/style/utils/at-opacity.js +0 -3
- package/lib/style/utils/color.js +3 -14
- package/lib/style/utils/filter-out-position-props.js +0 -4
- package/lib/style/utils/filter-out-styled-system-spacing-props.js +0 -4
- package/lib/style/utils/filter-styled-system-margin-props.js +0 -4
- package/lib/style/utils/filter-styled-system-padding-props.js +2 -5
- package/lib/style/utils/form-style-utils.js +0 -18
- package/lib/style/utils/get-color-value.js +0 -5
- package/lib/style/utils/get-rgb-values.js +1 -2
- package/lib/style/utils/index.js +0 -4
- package/lib/style/utils/merge-deep.js +1 -7
- package/lib/style/utils/mix.js +1 -9
- package/lib/style/utils/shade.js +0 -4
- package/lib/style/utils/tint.js +0 -4
- package/lib/style/utils/width.js +0 -4
- package/package.json +1 -1
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
-
|
|
3
2
|
import React, { useRef, useEffect, useContext } from "react";
|
|
4
3
|
import PropTypes from "prop-types";
|
|
5
4
|
import styledSystemPropTypes from "@styled-system/prop-types";
|
|
@@ -18,7 +17,6 @@ import { NewValidationContext } from "../carbon-provider/carbon-provider.compone
|
|
|
18
17
|
import { ErrorBorder, StyledHintText } from "../textbox/textbox.style";
|
|
19
18
|
import ValidationMessage from "../../__internal__/validation-message";
|
|
20
19
|
const marginPropTypes = filterStyledSystemMarginProps(styledSystemPropTypes.space);
|
|
21
|
-
|
|
22
20
|
const Textarea = ({
|
|
23
21
|
autoFocus,
|
|
24
22
|
fieldHelp,
|
|
@@ -60,25 +58,20 @@ const Textarea = ({
|
|
|
60
58
|
const {
|
|
61
59
|
validationRedesignOptIn
|
|
62
60
|
} = useContext(NewValidationContext);
|
|
63
|
-
|
|
64
61
|
const computeLabelPropValues = prop => validationRedesignOptIn ? undefined : prop;
|
|
65
|
-
|
|
66
62
|
const {
|
|
67
63
|
current: id
|
|
68
64
|
} = useRef(idProp || guid());
|
|
69
65
|
const inputRef = useRef();
|
|
70
66
|
const minHeight = useRef(MIN_HEIGHT);
|
|
71
|
-
|
|
72
67
|
const expandTextarea = () => {
|
|
73
68
|
const textarea = inputRef.current;
|
|
74
|
-
|
|
75
69
|
if (textarea.scrollHeight > minHeight.current) {
|
|
76
|
-
textarea.style.height = "0px";
|
|
77
|
-
|
|
70
|
+
textarea.style.height = "0px";
|
|
71
|
+
// Set the height so all content is shown
|
|
78
72
|
textarea.style.height = `${Math.max(textarea.scrollHeight, minHeight.current)}px`;
|
|
79
73
|
}
|
|
80
74
|
};
|
|
81
|
-
|
|
82
75
|
const {
|
|
83
76
|
labelId,
|
|
84
77
|
validationIconId,
|
|
@@ -93,7 +86,8 @@ const Textarea = ({
|
|
|
93
86
|
label,
|
|
94
87
|
fieldHelp
|
|
95
88
|
});
|
|
96
|
-
const [maxLength, characterCount] = useCharacterCount(value,
|
|
89
|
+
const [maxLength, characterCount] = useCharacterCount(value,
|
|
90
|
+
// TODO: Can be removed after the characterLimit type is changed to number
|
|
97
91
|
typeof characterLimit === "string" ? parseInt(characterLimit, 10) : characterLimit, warnOverLimit, enforceCharacterLimit);
|
|
98
92
|
useEffect(() => {
|
|
99
93
|
if (rows) {
|
|
@@ -110,7 +104,6 @@ const Textarea = ({
|
|
|
110
104
|
window.addEventListener("resize", expandTextarea);
|
|
111
105
|
minHeight.current = inputRef.current.clientHeight;
|
|
112
106
|
}
|
|
113
|
-
|
|
114
107
|
return () => {
|
|
115
108
|
if (expandable) {
|
|
116
109
|
window.removeEventListener("resize", expandTextarea);
|
|
@@ -189,127 +182,90 @@ const Textarea = ({
|
|
|
189
182
|
useValidationIcon: !(validationRedesignOptIn || validationOnLabel)
|
|
190
183
|
}))), characterCount)));
|
|
191
184
|
};
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
185
|
+
Textarea.propTypes = {
|
|
186
|
+
...marginPropTypes,
|
|
195
187
|
/** Automatically focus the input on component mount */
|
|
196
188
|
autoFocus: PropTypes.bool,
|
|
197
|
-
|
|
198
189
|
/** Identifier used for testing purposes, applied to the root element of the component. */
|
|
199
190
|
"data-component": PropTypes.string,
|
|
200
|
-
|
|
201
191
|
/** Identifier used for testing purposes, applied to the root element of the component. */
|
|
202
192
|
"data-element": PropTypes.string,
|
|
203
|
-
|
|
204
193
|
/** Identifier used for testing purposes, applied to the root element of the component. */
|
|
205
194
|
"data-role": PropTypes.string,
|
|
206
|
-
|
|
207
195
|
/** id of the input */
|
|
208
196
|
id: PropTypes.string,
|
|
209
|
-
|
|
210
197
|
/** Character limit of the textarea */
|
|
211
198
|
characterLimit: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
212
|
-
|
|
213
199
|
/** Type of the icon that will be rendered next to the input */
|
|
214
200
|
children: PropTypes.node,
|
|
215
|
-
|
|
216
201
|
/** The visible width of the text control, in average character widths */
|
|
217
202
|
cols: PropTypes.number,
|
|
218
|
-
|
|
219
203
|
/** Adds disabled property */
|
|
220
204
|
disabled: PropTypes.bool,
|
|
221
|
-
|
|
222
205
|
/** Stop the user typing over the characterLimit */
|
|
223
206
|
enforceCharacterLimit: PropTypes.bool,
|
|
224
|
-
|
|
225
207
|
/** Allows the Textareas Height to change based on user input */
|
|
226
208
|
expandable: PropTypes.bool,
|
|
227
|
-
|
|
228
209
|
/** Help content to be displayed under an input */
|
|
229
210
|
fieldHelp: PropTypes.node,
|
|
230
|
-
|
|
231
211
|
/** The content of the label for the input */
|
|
232
212
|
label: PropTypes.string,
|
|
233
|
-
|
|
234
213
|
/** Text applied to label help tooltip */
|
|
235
214
|
labelHelp: PropTypes.node,
|
|
236
|
-
|
|
237
215
|
/** Inline label alignment */
|
|
238
216
|
labelAlign: PropTypes.oneOf(["left", "right"]),
|
|
239
|
-
|
|
240
217
|
/** When true, label is placed in line with an input */
|
|
241
218
|
labelInline: PropTypes.bool,
|
|
242
|
-
|
|
243
219
|
/** Spacing between label and a field for inline label, given number will be multiplied by base spacing unit (8) */
|
|
244
220
|
labelSpacing: PropTypes.oneOf([1, 2]),
|
|
245
|
-
|
|
246
221
|
/** Width of a label in percentage. Works only when labelInline is true */
|
|
247
222
|
labelWidth: PropTypes.number,
|
|
248
|
-
|
|
249
223
|
/** Width of an input in percentage. Works only when labelInline is true */
|
|
250
224
|
inputWidth: PropTypes.number,
|
|
251
|
-
|
|
252
225
|
/** Name of the input */
|
|
253
226
|
name: PropTypes.string,
|
|
254
|
-
|
|
255
227
|
/** Callback fired when the user types in the Textarea */
|
|
256
228
|
onChange: PropTypes.func,
|
|
257
|
-
|
|
258
229
|
/** Placeholder text for the component */
|
|
259
230
|
placeholder: PropTypes.string,
|
|
260
|
-
|
|
261
231
|
/** Adds readOnly property */
|
|
262
232
|
readOnly: PropTypes.bool,
|
|
263
|
-
|
|
264
233
|
/** The number of visible text lines for the control */
|
|
265
234
|
rows: PropTypes.number,
|
|
266
|
-
|
|
267
235
|
/** One of type of size to apply to the textarea */
|
|
268
236
|
size: PropTypes.oneOf(["small", "medium", "large"]),
|
|
269
|
-
|
|
270
237
|
/** The value of the Textarea */
|
|
271
238
|
value: PropTypes.string,
|
|
272
|
-
|
|
273
239
|
/** Whether to display the character count message in red */
|
|
274
240
|
warnOverLimit: PropTypes.bool,
|
|
275
|
-
|
|
276
241
|
/** Indicate that error has occurred
|
|
277
242
|
Pass string to display icon, tooltip and red border
|
|
278
243
|
Pass true boolean to only display red border */
|
|
279
244
|
error: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
|
|
280
|
-
|
|
281
245
|
/** Indicate that warning has occurred
|
|
282
246
|
Pass string to display icon, tooltip and orange border
|
|
283
247
|
Pass true boolean to only display orange border */
|
|
284
248
|
warning: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
|
|
285
|
-
|
|
286
249
|
/** Indicate additional information
|
|
287
250
|
Pass string to display icon, tooltip and blue border
|
|
288
251
|
Pass true boolean to only display blue border */
|
|
289
252
|
info: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
|
|
290
|
-
|
|
291
253
|
/** When true, validation icon will be placed on label instead of being placed on the input */
|
|
292
254
|
validationOnLabel: PropTypes.bool,
|
|
293
|
-
|
|
294
255
|
/**
|
|
295
256
|
* <a href="https://brand.sage.com/d/NdbrveWvNheA/foundations#/icons/icons" target="_blank">List of supported icons</a>
|
|
296
257
|
*
|
|
297
258
|
* Icon to display inside of the Textarea
|
|
298
259
|
*/
|
|
299
260
|
inputIcon: PropTypes.string,
|
|
300
|
-
|
|
301
261
|
/** Message to be displayed in a Tooltip when the user hovers over the help icon */
|
|
302
262
|
tooltipMessage: PropTypes.string,
|
|
303
|
-
|
|
304
263
|
/** Breakpoint for adaptive label (inline labels change to top aligned). Enables the adaptive behaviour when set */
|
|
305
264
|
adaptiveLabelBreakpoint: PropTypes.number,
|
|
306
|
-
|
|
307
265
|
/** Flag to configure component as mandatory */
|
|
308
266
|
required: PropTypes.bool,
|
|
309
|
-
|
|
310
267
|
/** Overrides the default tooltip position */
|
|
311
268
|
tooltipPosition: PropTypes.oneOf(["top", "bottom", "left", "right"]),
|
|
312
|
-
|
|
313
269
|
/** Aria label for rendered help component */
|
|
314
270
|
helpAriaLabel: PropTypes.string
|
|
315
271
|
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
-
|
|
3
2
|
import React, { useContext } from "react";
|
|
4
3
|
import PropTypes from "prop-types";
|
|
5
4
|
import { filterStyledSystemMarginProps } from "../../style/utils";
|
|
@@ -16,7 +15,6 @@ import { ErrorBorder, StyledHintText } from "./textbox.style";
|
|
|
16
15
|
import ValidationMessage from "../../__internal__/validation-message";
|
|
17
16
|
import { NewValidationContext } from "../carbon-provider/carbon-provider.component";
|
|
18
17
|
import NumeralDateContext from "../numeral-date/numeral-date-context";
|
|
19
|
-
|
|
20
18
|
const Textbox = ({
|
|
21
19
|
align = "left",
|
|
22
20
|
autoFocus,
|
|
@@ -72,7 +70,8 @@ const Textbox = ({
|
|
|
72
70
|
...props
|
|
73
71
|
}) => {
|
|
74
72
|
const characterCountValue = typeof value === "string" ? value : "";
|
|
75
|
-
const [maxLength, characterCount] = useCharacterCount(characterCountValue,
|
|
73
|
+
const [maxLength, characterCount] = useCharacterCount(characterCountValue,
|
|
74
|
+
// TODO: Can be removed after the characterLimit type is changed to number
|
|
76
75
|
typeof characterLimit === "string" ? parseInt(characterLimit, 10) : characterLimit, warnOverLimit, enforceCharacterLimit);
|
|
77
76
|
const {
|
|
78
77
|
validationRedesignOptIn
|
|
@@ -80,9 +79,7 @@ const Textbox = ({
|
|
|
80
79
|
const {
|
|
81
80
|
disableErrorBorder
|
|
82
81
|
} = useContext(NumeralDateContext);
|
|
83
|
-
|
|
84
82
|
const computeLabelPropValues = prop => validationRedesignOptIn ? undefined : prop;
|
|
85
|
-
|
|
86
83
|
const [uniqueId, uniqueName] = useUniqueId(id, name);
|
|
87
84
|
const {
|
|
88
85
|
labelId: internalLabelId,
|
|
@@ -184,7 +181,6 @@ const Textbox = ({
|
|
|
184
181
|
validationIconId: validationRedesignOptIn ? undefined : validationIconId
|
|
185
182
|
}))), characterCount));
|
|
186
183
|
};
|
|
187
|
-
|
|
188
184
|
Textbox.propTypes = {
|
|
189
185
|
"about": PropTypes.string,
|
|
190
186
|
"accept": PropTypes.string,
|
|
@@ -254,9 +250,6 @@ Textbox.propTypes = {
|
|
|
254
250
|
"contentEditable": PropTypes.oneOfType([PropTypes.oneOf(["false", "inherit", "true"]), PropTypes.bool]),
|
|
255
251
|
"contextMenu": PropTypes.string,
|
|
256
252
|
"crossOrigin": PropTypes.string,
|
|
257
|
-
"css": PropTypes.oneOfType([PropTypes.func, PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
258
|
-
"__emotion_styles": PropTypes.any.isRequired
|
|
259
|
-
}), PropTypes.string, PropTypes.bool]),
|
|
260
253
|
"dangerouslySetInnerHTML": PropTypes.shape({
|
|
261
254
|
"__html": PropTypes.string.isRequired
|
|
262
255
|
}),
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
-
|
|
3
2
|
import React from "react";
|
|
4
3
|
import PropTypes from "prop-types";
|
|
5
4
|
import styledSystemPropTypes from "@styled-system/prop-types";
|
|
6
5
|
import StyledTileFooter from "./tile-footer.style";
|
|
7
6
|
import { filterStyledSystemPaddingProps } from "../../../style/utils";
|
|
8
7
|
const paddingPropTypes = filterStyledSystemPaddingProps(styledSystemPropTypes.space);
|
|
9
|
-
|
|
10
8
|
const TileFooter = ({
|
|
11
9
|
variant,
|
|
12
10
|
children,
|
|
@@ -17,9 +15,8 @@ const TileFooter = ({
|
|
|
17
15
|
variant: variant
|
|
18
16
|
}, props), children);
|
|
19
17
|
};
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
TileFooter.propTypes = {
|
|
19
|
+
...paddingPropTypes,
|
|
23
20
|
/** set which background color variant should be used */
|
|
24
21
|
variant: PropTypes.oneOf(["default", "transparent"]),
|
|
25
22
|
children: PropTypes.node
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
-
|
|
3
2
|
import React from "react";
|
|
4
3
|
import PropTypes from "prop-types";
|
|
5
4
|
import propTypes from "@styled-system/prop-types";
|
|
6
5
|
import { StyledTile, TileContent } from "./tile.style.js";
|
|
7
|
-
|
|
8
6
|
const Tile = ({
|
|
9
7
|
variant = "tile",
|
|
10
8
|
p = 3,
|
|
@@ -14,14 +12,11 @@ const Tile = ({
|
|
|
14
12
|
...props
|
|
15
13
|
}) => {
|
|
16
14
|
const isHorizontal = () => orientation === "horizontal";
|
|
17
|
-
|
|
18
15
|
const isVertical = () => orientation === "vertical";
|
|
19
|
-
|
|
20
16
|
const wrappedChildren = React.Children.map(children, (child, index) => {
|
|
21
17
|
if (!child) {
|
|
22
18
|
return null;
|
|
23
19
|
}
|
|
24
|
-
|
|
25
20
|
const {
|
|
26
21
|
width: contentWidth,
|
|
27
22
|
...childProps
|
|
@@ -48,14 +43,11 @@ const Tile = ({
|
|
|
48
43
|
p: p
|
|
49
44
|
}, props), wrappedChildren);
|
|
50
45
|
};
|
|
51
|
-
|
|
52
46
|
Tile.propTypes = {
|
|
53
47
|
/** Styled system spacing props */
|
|
54
48
|
...propTypes.space,
|
|
55
|
-
|
|
56
49
|
/** Sets the theme of the tile - either 'tile', 'transparent' or 'active' */
|
|
57
50
|
variant: PropTypes.oneOf(["tile", "transparent", "active"]),
|
|
58
|
-
|
|
59
51
|
/**
|
|
60
52
|
* The content to render within the tile. Each child will be wrapped with
|
|
61
53
|
* a TileContent wrapper, which allows any individual child component to take a
|
|
@@ -64,10 +56,8 @@ Tile.propTypes = {
|
|
|
64
56
|
* Width will have no effect on a child component if the tile orientation is set to 'vertical'.
|
|
65
57
|
*/
|
|
66
58
|
children: PropTypes.node,
|
|
67
|
-
|
|
68
59
|
/** The orientation of the tile - set to either horizontal or vertical */
|
|
69
60
|
orientation: PropTypes.oneOf(["horizontal", "vertical"]),
|
|
70
|
-
|
|
71
61
|
/**
|
|
72
62
|
* Set a percentage-based width for the whole Tile component, relative to its parent.
|
|
73
63
|
* If unset or zero, this will default to 100%.
|
|
@@ -2,7 +2,6 @@ import React, { useEffect, useRef, useState } from "react";
|
|
|
2
2
|
import PropTypes from "prop-types";
|
|
3
3
|
import { StyledContentContainer, StyledContent } from "./accordion.style";
|
|
4
4
|
import useResizeObserver from "../../../../hooks/__internal__/useResizeObserver";
|
|
5
|
-
|
|
6
5
|
const Accordion = ({
|
|
7
6
|
children,
|
|
8
7
|
expanded,
|
|
@@ -29,7 +28,6 @@ const Accordion = ({
|
|
|
29
28
|
"aria-labelledby": controlId
|
|
30
29
|
}, children));
|
|
31
30
|
};
|
|
32
|
-
|
|
33
31
|
Accordion.propTypes = {
|
|
34
32
|
children: PropTypes.node.isRequired,
|
|
35
33
|
expanded: PropTypes.bool,
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
-
|
|
3
2
|
import React from "react";
|
|
4
3
|
import PropTypes from "prop-types";
|
|
5
4
|
import styledSystemPropTypes from "@styled-system/prop-types";
|
|
@@ -9,7 +8,6 @@ import RadioButtonMapper from "../../__internal__/radio-button-mapper/radio-butt
|
|
|
9
8
|
import { StyledTileSelectFieldset, StyledGroupDescription } from "./tile-select.style";
|
|
10
9
|
import { filterStyledSystemMarginProps } from "../../style/utils";
|
|
11
10
|
const marginPropTypes = filterStyledSystemMarginProps(styledSystemPropTypes.space);
|
|
12
|
-
|
|
13
11
|
const TileSelectGroup = props => {
|
|
14
12
|
const {
|
|
15
13
|
children,
|
|
@@ -23,7 +21,6 @@ const TileSelectGroup = props => {
|
|
|
23
21
|
...rest
|
|
24
22
|
} = props;
|
|
25
23
|
let tiles;
|
|
26
|
-
|
|
27
24
|
if (multiSelect) {
|
|
28
25
|
tiles = children;
|
|
29
26
|
} else {
|
|
@@ -36,16 +33,14 @@ const TileSelectGroup = props => {
|
|
|
36
33
|
type: "radio"
|
|
37
34
|
})));
|
|
38
35
|
}
|
|
39
|
-
|
|
40
36
|
return /*#__PURE__*/React.createElement(StyledTileSelectFieldset, _extends({
|
|
41
37
|
legend: legend
|
|
42
38
|
}, tagComponent("tile-select-group", rest), {
|
|
43
39
|
multiSelect: multiSelect
|
|
44
40
|
}, filterStyledSystemMarginProps(rest)), /*#__PURE__*/React.createElement(StyledGroupDescription, null, description), /*#__PURE__*/React.createElement("div", null, tiles));
|
|
45
41
|
};
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
42
|
+
TileSelectGroup.propTypes = {
|
|
43
|
+
...marginPropTypes,
|
|
49
44
|
/** The TileSelect components to be rendered in the group */
|
|
50
45
|
children: (props, propName, componentName) => {
|
|
51
46
|
let error;
|
|
@@ -57,29 +52,20 @@ TileSelectGroup.propTypes = { ...marginPropTypes,
|
|
|
57
52
|
});
|
|
58
53
|
return error;
|
|
59
54
|
},
|
|
60
|
-
|
|
61
55
|
/** The content for the TileSelectGroup Legend */
|
|
62
56
|
legend: PropTypes.string,
|
|
63
|
-
|
|
64
57
|
/** Description to be rendered below the legend */
|
|
65
58
|
description: PropTypes.string,
|
|
66
|
-
|
|
67
59
|
/** The currently selected value - only for single select mode. */
|
|
68
60
|
value: PropTypes.string,
|
|
69
|
-
|
|
70
61
|
/** The name to apply to the input - only for single select mode. */
|
|
71
62
|
name: PropTypes.string,
|
|
72
|
-
|
|
73
63
|
/** A callback triggered when one of tiles is selected - only for single select mode. */
|
|
74
64
|
onChange: PropTypes.func,
|
|
75
|
-
|
|
76
65
|
/** A callback triggered when one of tiles is blurred - only for single select mode. */
|
|
77
66
|
onBlur: PropTypes.func,
|
|
78
|
-
|
|
79
67
|
/** When passed as true TileSelectGroup serves only visual purpose */
|
|
80
|
-
|
|
81
68
|
/** It wraps TileSelects in fieldset element and renders the legend and description props content */
|
|
82
|
-
|
|
83
69
|
/** onChange, onBlur, value, checked and name props are meant to be passed individually on each of the TileSelects */
|
|
84
70
|
multiSelect: PropTypes.bool
|
|
85
71
|
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
-
|
|
3
2
|
import React, { useState, useEffect, useRef } from "react";
|
|
4
3
|
import PropTypes from "prop-types";
|
|
5
4
|
import styledSystemPropTypes from "@styled-system/prop-types";
|
|
@@ -12,11 +11,9 @@ import Accordion from "./__internal__/accordion";
|
|
|
12
11
|
import { StyledTileSelectContainer, StyledTileSelect, StyledTileSelectInput, StyledTitleContainer, StyledTitle, StyledSubtitle, StyledAdornment, StyledDescription, StyledDeselectWrapper, StyledFooterWrapper, StyledFocusWrapper, StyledAccordionFooterWrapper } from "./tile-select.style";
|
|
13
12
|
import { filterStyledSystemMarginProps } from "../../style/utils";
|
|
14
13
|
const marginPropTypes = filterStyledSystemMarginProps(styledSystemPropTypes.space);
|
|
15
|
-
|
|
16
14
|
const checkPropTypeIsNode = prop => typeof prop !== "string" && {
|
|
17
15
|
as: "div"
|
|
18
16
|
};
|
|
19
|
-
|
|
20
17
|
const TileSelect = ({
|
|
21
18
|
onChange,
|
|
22
19
|
onBlur,
|
|
@@ -44,9 +41,9 @@ const TileSelect = ({
|
|
|
44
41
|
}) => {
|
|
45
42
|
const l = useLocale();
|
|
46
43
|
const [hasFocus, setHasFocus] = useState(false);
|
|
47
|
-
|
|
48
44
|
const handleDeselect = () => onChange({
|
|
49
|
-
target: {
|
|
45
|
+
target: {
|
|
46
|
+
...(name && {
|
|
50
47
|
name
|
|
51
48
|
}),
|
|
52
49
|
...(id && {
|
|
@@ -56,7 +53,6 @@ const TileSelect = ({
|
|
|
56
53
|
checked: false
|
|
57
54
|
}
|
|
58
55
|
});
|
|
59
|
-
|
|
60
56
|
const renderActionButton = () => /*#__PURE__*/React.createElement(StyledDeselectWrapper, {
|
|
61
57
|
hasActionAdornment: !!actionButtonAdornment
|
|
62
58
|
}, customActionButton && customActionButton(handleDeselect), !customActionButton && checked && /*#__PURE__*/React.createElement(Button, {
|
|
@@ -65,7 +61,6 @@ const TileSelect = ({
|
|
|
65
61
|
disabled: disabled,
|
|
66
62
|
onClick: handleDeselect
|
|
67
63
|
}, l.tileSelect.deselect()), actionButtonAdornment);
|
|
68
|
-
|
|
69
64
|
useEffect(() => {
|
|
70
65
|
if (disabled && hasFocus) {
|
|
71
66
|
setHasFocus(false);
|
|
@@ -86,13 +81,11 @@ const TileSelect = ({
|
|
|
86
81
|
onBlur: ev => {
|
|
87
82
|
setHasFocus(false);
|
|
88
83
|
/* istanbul ignore else */
|
|
89
|
-
|
|
90
84
|
if (onBlur) onBlur(ev);
|
|
91
85
|
},
|
|
92
86
|
onFocus: ev => {
|
|
93
87
|
setHasFocus(true);
|
|
94
88
|
/* istanbul ignore else */
|
|
95
|
-
|
|
96
89
|
if (onFocus) onFocus(ev);
|
|
97
90
|
},
|
|
98
91
|
checked: checked,
|
|
@@ -125,79 +118,57 @@ const TileSelect = ({
|
|
|
125
118
|
expanded: accordionExpanded
|
|
126
119
|
}, accordionContent)));
|
|
127
120
|
};
|
|
128
|
-
|
|
129
121
|
TileSelect.defaultProps = {
|
|
130
122
|
checked: false,
|
|
131
123
|
type: "checkbox"
|
|
132
124
|
};
|
|
133
|
-
TileSelect.propTypes = {
|
|
134
|
-
|
|
125
|
+
TileSelect.propTypes = {
|
|
126
|
+
...marginPropTypes,
|
|
135
127
|
/** title of the TileSelect */
|
|
136
128
|
title: PropTypes.node,
|
|
137
|
-
|
|
138
129
|
/** adornment to be rendered next to the title */
|
|
139
130
|
titleAdornment: PropTypes.node,
|
|
140
|
-
|
|
141
131
|
/** subtitle of the TileSelect */
|
|
142
132
|
subtitle: PropTypes.node,
|
|
143
|
-
|
|
144
133
|
/** description of the TileSelect */
|
|
145
134
|
description: PropTypes.node,
|
|
146
|
-
|
|
147
135
|
/** disables the TileSelect input */
|
|
148
136
|
disabled: PropTypes.bool,
|
|
149
|
-
|
|
150
137
|
/** the value that is represented by this TileSelect */
|
|
151
138
|
value: PropTypes.string,
|
|
152
|
-
|
|
153
139
|
/** input id */
|
|
154
140
|
id: PropTypes.string,
|
|
155
|
-
|
|
156
141
|
/** input name */
|
|
157
142
|
name: PropTypes.string,
|
|
158
|
-
|
|
159
143
|
/** Callback triggered when user selects or deselects this tile */
|
|
160
144
|
onChange: PropTypes.func,
|
|
161
|
-
|
|
162
145
|
/** Callback triggered when the user blurs this tile */
|
|
163
146
|
onBlur: PropTypes.func,
|
|
164
|
-
|
|
165
147
|
/** Callback triggered when the user focuses this tile */
|
|
166
148
|
onFocus: PropTypes.func,
|
|
167
|
-
|
|
168
149
|
/** determines if this tile is selected or unselected */
|
|
169
150
|
checked: PropTypes.bool,
|
|
170
|
-
|
|
171
151
|
/** Custom class name passed to the root element of TileSelect */
|
|
172
152
|
className: PropTypes.string,
|
|
173
|
-
|
|
174
153
|
/** Type of the TileSelect input */
|
|
175
154
|
type: PropTypes.oneOf(["radio", "checkbox"]),
|
|
176
|
-
|
|
177
155
|
/** Render prop that allows overriding the default action button. `(onClick) => <Button onClick={onClick}>...</Button>` */
|
|
178
156
|
customActionButton: PropTypes.func,
|
|
179
|
-
|
|
180
157
|
/** An additional help info icon rendered next to the action button */
|
|
181
158
|
actionButtonAdornment: PropTypes.node,
|
|
182
|
-
|
|
183
159
|
/** footer of the TileSelect */
|
|
184
160
|
footer: PropTypes.node,
|
|
185
|
-
|
|
186
161
|
/** Component to render in the top left corner of TileSelect */
|
|
187
162
|
prefixAdornment: PropTypes.node,
|
|
188
|
-
|
|
189
163
|
/** Component to render additional information row between title and description */
|
|
190
164
|
additionalInformation: PropTypes.node,
|
|
191
|
-
|
|
192
165
|
/** Components to render in the TileSelect Accordion */
|
|
193
166
|
accordionContent: PropTypes.node,
|
|
194
|
-
|
|
195
167
|
/**
|
|
196
168
|
* Render prop to support rendering the control to handle the expanded state of the TileSelect Accordion.
|
|
197
169
|
* `(controlId, contentId) => <Button id={controlId} aria-controls={contentId}>...</Button>`
|
|
198
170
|
*/
|
|
199
171
|
accordionControl: PropTypes.func,
|
|
200
|
-
|
|
201
172
|
/** Flag to control the open state of TileSelect Accordion */
|
|
202
173
|
accordionExpanded: PropTypes.bool
|
|
203
174
|
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
-
|
|
3
2
|
import React, { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
4
3
|
import classNames from "classnames";
|
|
5
4
|
import { TransitionGroup, CSSTransition } from "react-transition-group";
|
|
@@ -46,18 +45,15 @@ const Toast = /*#__PURE__*/React.forwardRef(({
|
|
|
46
45
|
useModalManager(open, dismissToast, refToPass);
|
|
47
46
|
useEffect(() => {
|
|
48
47
|
clearTimeout(timer.current);
|
|
49
|
-
|
|
50
48
|
if (!timeout || !open || !onDismiss) {
|
|
51
49
|
return;
|
|
52
50
|
}
|
|
53
|
-
|
|
54
51
|
timer.current = setTimeout(() => onDismiss(), timeout);
|
|
55
52
|
}, [onDismiss, open, timeout]);
|
|
56
53
|
useEffect(() => {
|
|
57
54
|
if (!disableAutoFocus) {
|
|
58
55
|
if (open) {
|
|
59
56
|
var _toastContentNodeRef$;
|
|
60
|
-
|
|
61
57
|
focusedElementBeforeOpening.current = document.activeElement;
|
|
62
58
|
(_toastContentNodeRef$ = toastContentNodeRef.current) === null || _toastContentNodeRef$ === void 0 ? void 0 : _toastContentNodeRef$.focus();
|
|
63
59
|
} else if (focusedElementBeforeOpening.current) {
|
|
@@ -74,7 +70,6 @@ const Toast = /*#__PURE__*/React.forwardRef(({
|
|
|
74
70
|
}
|
|
75
71
|
};
|
|
76
72
|
}, []);
|
|
77
|
-
|
|
78
73
|
function renderCloseIcon() {
|
|
79
74
|
if (!onDismiss) return null;
|
|
80
75
|
return /*#__PURE__*/React.createElement(IconButton, {
|
|
@@ -86,7 +81,6 @@ const Toast = /*#__PURE__*/React.forwardRef(({
|
|
|
86
81
|
type: "close"
|
|
87
82
|
}));
|
|
88
83
|
}
|
|
89
|
-
|
|
90
84
|
function renderToastContent() {
|
|
91
85
|
if (!open) return null;
|
|
92
86
|
const toastProps = {
|
|
@@ -122,7 +116,6 @@ const Toast = /*#__PURE__*/React.forwardRef(({
|
|
|
122
116
|
isDismiss: onDismiss
|
|
123
117
|
}, children), renderCloseIcon()));
|
|
124
118
|
}
|
|
125
|
-
|
|
126
119
|
return /*#__PURE__*/React.createElement(StyledPortal, {
|
|
127
120
|
id: targetPortalId,
|
|
128
121
|
isCenter: isCenter,
|
|
@@ -136,37 +129,26 @@ const Toast = /*#__PURE__*/React.forwardRef(({
|
|
|
136
129
|
Toast.propTypes = {
|
|
137
130
|
/** Customizes the appearance in the DLS theme */
|
|
138
131
|
variant: PropTypes.oneOf(["error", "info", "success", "warning", "notice"]),
|
|
139
|
-
|
|
140
132
|
/** Custom className */
|
|
141
133
|
className: PropTypes.string,
|
|
142
|
-
|
|
143
134
|
/** Custom id */
|
|
144
135
|
id: PropTypes.string,
|
|
145
|
-
|
|
146
136
|
/** Component name */
|
|
147
137
|
"data-component": PropTypes.string,
|
|
148
|
-
|
|
149
138
|
/** The rendered children of the component. */
|
|
150
139
|
children: PropTypes.node,
|
|
151
|
-
|
|
152
140
|
/** Determines if the Toast is open. */
|
|
153
141
|
open: PropTypes.bool,
|
|
154
|
-
|
|
155
142
|
/** Callback for when dismissed. */
|
|
156
143
|
onDismiss: PropTypes.func,
|
|
157
|
-
|
|
158
144
|
/** Time for Toast to remain on screen */
|
|
159
145
|
timeout: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
160
|
-
|
|
161
146
|
/** Centers the Toast on the screen */
|
|
162
147
|
isCenter: PropTypes.bool,
|
|
163
|
-
|
|
164
148
|
/** Target Portal ID where the Toast will render */
|
|
165
149
|
targetPortalId: PropTypes.string,
|
|
166
|
-
|
|
167
150
|
/** Maximum toast width */
|
|
168
151
|
maxWidth: PropTypes.string,
|
|
169
|
-
|
|
170
152
|
/** Disables auto focus functionality when the Toast has a close icon */
|
|
171
153
|
disableAutoFocus: PropTypes.bool
|
|
172
154
|
};
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import styled, { css } from "styled-components";
|
|
2
2
|
import baseTheme from "../../style/themes/base";
|
|
3
3
|
import { toColor } from "../../style/utils/color";
|
|
4
|
-
|
|
5
4
|
const pointerColor = (theme, bgColor, type) => {
|
|
6
5
|
if (bgColor) return toColor(theme, bgColor);
|
|
7
6
|
return type === "error" ? "var(--colorsSemanticNegative500)" : "var(--colorsSemanticNeutral500)";
|
|
8
7
|
};
|
|
9
|
-
|
|
10
8
|
const StyledTooltipPointer = styled.div`
|
|
11
9
|
${({
|
|
12
10
|
position,
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
-
|
|
3
2
|
import React from "react";
|
|
4
3
|
import PropTypes from "prop-types";
|
|
5
4
|
import Tippy from "@tippyjs/react/headless";
|
|
@@ -30,7 +29,6 @@ const Tooltip = /*#__PURE__*/React.forwardRef(({
|
|
|
30
29
|
}, ref) => {
|
|
31
30
|
const isFlipOverridesValid = !flipOverrides || Array.isArray(flipOverrides) && flipOverrides.every(placement => TOOLTIP_POSITIONS.includes(placement));
|
|
32
31
|
!isFlipOverridesValid ? process.env.NODE_ENV !== "production" ? invariant(false, `The flipOverrides prop supplied to Tooltip must be an array containing some or all of ["top", "bottom", "left", "right"].`) : invariant(false) : void 0;
|
|
33
|
-
|
|
34
32
|
const tooltip = (attrs, content) => {
|
|
35
33
|
const currentPosition = attrs["data-placement"] || position;
|
|
36
34
|
return /*#__PURE__*/React.createElement(CarbonScopedTokensProvider, null, /*#__PURE__*/React.createElement(StyledTooltip, _extends({
|
|
@@ -58,7 +56,6 @@ const Tooltip = /*#__PURE__*/React.forwardRef(({
|
|
|
58
56
|
bgColor: bgColor
|
|
59
57
|
})), content));
|
|
60
58
|
};
|
|
61
|
-
|
|
62
59
|
return /*#__PURE__*/React.createElement(Tippy, _extends({
|
|
63
60
|
placement: position,
|
|
64
61
|
delay: TOOLTIP_DELAY
|