carbon-react 111.12.1 → 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/accordion/accordion.style.js +1 -1
- 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-panel.style.d.ts +7 -0
- package/esm/components/switch/__internal__/switch-slider-panel.style.js +0 -5
- package/esm/components/switch/__internal__/switch-slider.component.d.ts +11 -0
- package/esm/components/switch/__internal__/switch-slider.component.js +8 -10
- package/esm/components/switch/__internal__/switch-slider.style.d.ts +6 -0
- package/esm/components/switch/__internal__/switch-slider.style.js +0 -9
- package/esm/components/switch/index.d.ts +2 -1
- package/esm/components/switch/switch.component.d.ts +31 -0
- package/esm/components/switch/switch.component.js +519 -128
- package/esm/components/switch/switch.style.d.ts +4 -0
- package/esm/components/switch/switch.style.js +0 -8
- 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 +1 -10
- 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.d.ts +7 -0
- package/lib/components/switch/__internal__/switch-slider-panel.style.js +0 -13
- package/lib/components/switch/__internal__/switch-slider.component.d.ts +11 -0
- package/lib/components/switch/__internal__/switch-slider.component.js +8 -20
- package/lib/components/switch/__internal__/switch-slider.style.d.ts +6 -0
- package/lib/components/switch/__internal__/switch-slider.style.js +0 -17
- package/lib/components/switch/index.d.ts +2 -1
- package/lib/components/switch/index.js +0 -2
- package/lib/components/switch/switch.component.d.ts +31 -0
- package/lib/components/switch/switch.component.js +520 -142
- package/lib/components/switch/switch.style.d.ts +4 -0
- package/lib/components/switch/switch.style.js +0 -23
- 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
- package/esm/components/switch/switch.d.ts +0 -37
- package/lib/components/switch/switch.d.ts +0 -37
|
@@ -10,7 +10,6 @@ const BOLD = "BOLD";
|
|
|
10
10
|
const ITALIC = "ITALIC";
|
|
11
11
|
const UNORDERED_LIST = "unordered-list-item";
|
|
12
12
|
const ORDERED_LIST = "ordered-list-item";
|
|
13
|
-
|
|
14
13
|
const Toolbar = ({
|
|
15
14
|
activeControls,
|
|
16
15
|
canFocus,
|
|
@@ -44,7 +43,6 @@ const Toolbar = ({
|
|
|
44
43
|
} else {
|
|
45
44
|
handleBlockType(ev, type);
|
|
46
45
|
}
|
|
47
|
-
|
|
48
46
|
setFocusIndex(0);
|
|
49
47
|
setTabbable(true);
|
|
50
48
|
} else if (Events.isLeftKey(ev)) {
|
|
@@ -55,7 +53,6 @@ const Toolbar = ({
|
|
|
55
53
|
controlRefs[focusIndex - 1].current.focus();
|
|
56
54
|
setFocusIndex(focusIndex - 1);
|
|
57
55
|
}
|
|
58
|
-
|
|
59
56
|
setTabbable(false);
|
|
60
57
|
} else if (Events.isRightKey(ev)) {
|
|
61
58
|
if (focusIndex === 3) {
|
|
@@ -65,7 +62,6 @@ const Toolbar = ({
|
|
|
65
62
|
controlRefs[focusIndex + 1].current.focus();
|
|
66
63
|
setFocusIndex(focusIndex + 1);
|
|
67
64
|
}
|
|
68
|
-
|
|
69
65
|
setTabbable(false);
|
|
70
66
|
}
|
|
71
67
|
}, [controlRefs, focusIndex, handleBlockType, handleInlineStyleChange]);
|
|
@@ -83,7 +79,6 @@ const Toolbar = ({
|
|
|
83
79
|
if (!controlRefs[index] || !controlRefs[index].current) {
|
|
84
80
|
return false;
|
|
85
81
|
}
|
|
86
|
-
|
|
87
82
|
return controlRefs[index].current === document.activeElement;
|
|
88
83
|
}, [controlRefs]);
|
|
89
84
|
return /*#__PURE__*/React.createElement(StyledToolbar, {
|
|
@@ -158,20 +153,15 @@ const Toolbar = ({
|
|
|
158
153
|
type: "bullet_list_numbers"
|
|
159
154
|
})))), toolbarElements && /*#__PURE__*/React.createElement(StyledEditorActionControls, null, toolbarElements));
|
|
160
155
|
};
|
|
161
|
-
|
|
162
156
|
Toolbar.propTypes = {
|
|
163
157
|
/** Used to override the active status of the inline controls */
|
|
164
158
|
activeControls: PropTypes.object.isRequired,
|
|
165
|
-
|
|
166
159
|
/** Flag to trigger control focusing */
|
|
167
160
|
canFocus: PropTypes.bool,
|
|
168
|
-
|
|
169
161
|
/** Callback to handle setting the inline styles */
|
|
170
162
|
setInlineStyle: PropTypes.func.isRequired,
|
|
171
|
-
|
|
172
163
|
/** Callback to handle setting the block styles */
|
|
173
164
|
setBlockStyle: PropTypes.func.isRequired,
|
|
174
|
-
|
|
175
165
|
/** Additional elements to be rendered in the Toolbar, e.g. Save and Cancel Button */
|
|
176
166
|
toolbarElements: PropTypes.node
|
|
177
167
|
};
|
|
@@ -6,34 +6,29 @@ export const computeBlockType = (char, type) => {
|
|
|
6
6
|
if (char === "." && type !== ORDERLIST_TYPE) {
|
|
7
7
|
return ORDERLIST_TYPE;
|
|
8
8
|
}
|
|
9
|
-
|
|
10
9
|
if (char === "*" && type !== UNORDERLIST_TYPE) {
|
|
11
10
|
return UNORDERLIST_TYPE;
|
|
12
11
|
}
|
|
13
|
-
|
|
14
12
|
return "unstyled";
|
|
15
13
|
};
|
|
14
|
+
|
|
16
15
|
/*
|
|
17
16
|
Returns default block-level metadata for various block type. Empty object otherwise.
|
|
18
17
|
*/
|
|
19
|
-
|
|
20
18
|
const getDefaultBlockData = (blockType, initialData = {}) => {
|
|
21
19
|
switch (blockType) {
|
|
22
20
|
case ORDERLIST_TYPE:
|
|
23
21
|
return {};
|
|
24
|
-
|
|
25
22
|
case UNORDERLIST_TYPE:
|
|
26
23
|
return {};
|
|
27
|
-
|
|
28
24
|
default:
|
|
29
25
|
return initialData;
|
|
30
26
|
}
|
|
31
27
|
};
|
|
28
|
+
|
|
32
29
|
/*
|
|
33
30
|
Changes the block type of the current block.
|
|
34
31
|
*/
|
|
35
|
-
|
|
36
|
-
|
|
37
32
|
export const resetBlockType = (value, newType = "unstyled") => {
|
|
38
33
|
const contentState = value.getCurrentContent();
|
|
39
34
|
const selectionState = value.getSelection();
|
|
@@ -58,35 +53,33 @@ export function blockStyleFn(block) {
|
|
|
58
53
|
switch (block.getType()) {
|
|
59
54
|
case "unordered-list-item":
|
|
60
55
|
return "text-editor-block-unordered";
|
|
61
|
-
|
|
62
56
|
case "ordered-list-item":
|
|
63
57
|
return "text-editor-block-ordered";
|
|
64
|
-
|
|
65
58
|
default:
|
|
66
59
|
return "";
|
|
67
60
|
}
|
|
68
61
|
}
|
|
62
|
+
|
|
69
63
|
/*
|
|
70
64
|
Return mutated editorState with decorators added
|
|
71
65
|
*/
|
|
72
|
-
|
|
73
66
|
export const getDecoratedValue = value => EditorState.set(value, {
|
|
74
67
|
decorator: decorators
|
|
75
68
|
});
|
|
69
|
+
|
|
76
70
|
/*
|
|
77
71
|
Get the current Content State
|
|
78
72
|
*/
|
|
79
|
-
|
|
80
73
|
export const getContent = value => value.getCurrentContent();
|
|
74
|
+
|
|
81
75
|
/*
|
|
82
76
|
Get the current selection State
|
|
83
77
|
*/
|
|
84
|
-
|
|
85
78
|
export const getSelection = value => value.getSelection();
|
|
79
|
+
|
|
86
80
|
/*
|
|
87
81
|
Get the current Content and Block information
|
|
88
82
|
*/
|
|
89
|
-
|
|
90
83
|
export const getContentInfo = value => {
|
|
91
84
|
const content = getContent(value);
|
|
92
85
|
const currentBlock = content.getBlockForKey(getSelection(value).getStartKey());
|
|
@@ -103,10 +96,10 @@ export const getContentInfo = value => {
|
|
|
103
96
|
blockMap
|
|
104
97
|
};
|
|
105
98
|
};
|
|
99
|
+
|
|
106
100
|
/*
|
|
107
101
|
Get the current Selection information
|
|
108
102
|
*/
|
|
109
|
-
|
|
110
103
|
export const getSelectionInfo = value => {
|
|
111
104
|
const selection = getSelection(value);
|
|
112
105
|
const startKey = selection.getStartKey();
|
|
@@ -121,19 +114,18 @@ export const getSelectionInfo = value => {
|
|
|
121
114
|
endOffset
|
|
122
115
|
};
|
|
123
116
|
};
|
|
117
|
+
|
|
124
118
|
/*
|
|
125
119
|
Move cursor to end of Content
|
|
126
120
|
*/
|
|
127
|
-
|
|
128
121
|
export const moveSelectionToEnd = value => EditorState.forceSelection(value, getContent(value).getSelectionAfter());
|
|
122
|
+
|
|
129
123
|
/*
|
|
130
124
|
Returns the current Selection length
|
|
131
125
|
*/
|
|
132
|
-
|
|
133
126
|
export const getSelectedLength = value => {
|
|
134
127
|
const selection = getSelection(value);
|
|
135
128
|
let length = 0;
|
|
136
|
-
|
|
137
129
|
if (!selection.isCollapsed()) {
|
|
138
130
|
const {
|
|
139
131
|
startKey,
|
|
@@ -147,12 +139,10 @@ export const getSelectedLength = value => {
|
|
|
147
139
|
} = getContentInfo(value);
|
|
148
140
|
const startLength = blockLength - startOffset;
|
|
149
141
|
const keyAfterEnd = content.getKeyAfter(endKey);
|
|
150
|
-
|
|
151
142
|
if (startKey === endKey) {
|
|
152
143
|
length += endOffset - startOffset;
|
|
153
144
|
} else {
|
|
154
145
|
let currentKey = startKey;
|
|
155
|
-
|
|
156
146
|
while (currentKey && currentKey !== keyAfterEnd) {
|
|
157
147
|
if (currentKey === startKey) {
|
|
158
148
|
length += startLength + 1;
|
|
@@ -161,12 +151,10 @@ export const getSelectedLength = value => {
|
|
|
161
151
|
} else {
|
|
162
152
|
length += content.getBlockForKey(currentKey).getLength() + 1;
|
|
163
153
|
}
|
|
164
|
-
|
|
165
154
|
currentKey = content.getKeyAfter(currentKey);
|
|
166
155
|
}
|
|
167
156
|
}
|
|
168
157
|
}
|
|
169
|
-
|
|
170
158
|
return length;
|
|
171
159
|
};
|
|
172
160
|
export function hasBlockStyle(value, type) {
|
|
@@ -41,84 +41,76 @@ const TextEditor = /*#__PURE__*/React.forwardRef(({
|
|
|
41
41
|
const moveCursor = useRef(contentLength > 0);
|
|
42
42
|
const lastKeyPressed = useRef();
|
|
43
43
|
const labelId = useRef(`text-editor-label-${createGuid()}`);
|
|
44
|
-
|
|
45
44
|
const keyBindingFn = ev => {
|
|
46
45
|
if (Events.isTabKey(ev) && !Events.isShiftKey(ev)) {
|
|
47
46
|
setFocusToolbar(true);
|
|
48
47
|
}
|
|
49
|
-
|
|
50
48
|
return getDefaultKeyBinding(ev);
|
|
51
49
|
};
|
|
52
|
-
|
|
53
50
|
const handleKeyCommand = command => {
|
|
54
51
|
// bail out if the enter is pressed and limit has been reached
|
|
55
52
|
if (command.includes("split-block") && contentLength === characterLimit) {
|
|
56
53
|
return "handled";
|
|
57
|
-
}
|
|
58
|
-
|
|
54
|
+
}
|
|
59
55
|
|
|
56
|
+
// if the backspace or enter is pressed get block type and text
|
|
60
57
|
if (command.includes("backspace") || command.includes("split-block")) {
|
|
61
58
|
const {
|
|
62
59
|
blockType,
|
|
63
60
|
blockLength
|
|
64
|
-
} = getContentInfo(value);
|
|
61
|
+
} = getContentInfo(value);
|
|
65
62
|
|
|
63
|
+
// if a block control is active and there is no text, deactivate it and reset the block
|
|
66
64
|
if (BLOCK_TYPES.includes(blockType) && !blockLength) {
|
|
67
65
|
onChange(resetBlockType(value, "unstyled"));
|
|
68
66
|
return true;
|
|
69
67
|
}
|
|
70
68
|
}
|
|
69
|
+
const style = command.toUpperCase();
|
|
71
70
|
|
|
72
|
-
|
|
73
|
-
|
|
71
|
+
// if formatting shortcut used eg. command is "bold" or "italic"
|
|
74
72
|
if (INLINE_STYLES.includes(style)) {
|
|
75
73
|
onChange(RichUtils.handleKeyCommand(value, command));
|
|
76
|
-
setActiveInlines({
|
|
74
|
+
setActiveInlines({
|
|
75
|
+
...activeInlines,
|
|
77
76
|
[style]: !hasInlineStyle(value, style)
|
|
78
77
|
});
|
|
79
78
|
return true;
|
|
80
79
|
}
|
|
81
|
-
|
|
82
80
|
return false;
|
|
83
81
|
};
|
|
84
|
-
|
|
85
82
|
const handleBeforeInput = (str, newState) => {
|
|
86
83
|
// short circuit if exceeds character limit
|
|
87
84
|
if (contentLength >= characterLimit) {
|
|
88
85
|
return "handled";
|
|
89
86
|
}
|
|
87
|
+
setActiveInlines({});
|
|
90
88
|
|
|
91
|
-
|
|
89
|
+
// there is a bug in how DraftJS handles the macOS double-space-period feature, this is added to catch this and
|
|
92
90
|
// prevent the editor from crashing until a fix can be added to their codebase
|
|
93
|
-
|
|
94
91
|
if (lastKeyPressed.current === " " && !isASCIIChar(str)) {
|
|
95
92
|
lastKeyPressed.current = null;
|
|
96
93
|
onChange(replaceText(newState, " ", newState.getCurrentInlineStyle(), true));
|
|
97
94
|
return "handled";
|
|
98
95
|
}
|
|
99
|
-
|
|
100
96
|
if (str === " ") {
|
|
101
97
|
lastKeyPressed.current = str;
|
|
102
98
|
return false;
|
|
103
99
|
}
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
100
|
+
lastKeyPressed.current = null;
|
|
101
|
+
// short circuit if str does not match expected chars
|
|
107
102
|
if (![".", "*"].includes(str)) {
|
|
108
103
|
return false;
|
|
109
104
|
}
|
|
110
|
-
|
|
111
105
|
const {
|
|
112
106
|
blockType,
|
|
113
107
|
blockLength,
|
|
114
108
|
blockText
|
|
115
109
|
} = getContentInfo(value);
|
|
116
|
-
|
|
117
110
|
if (blockLength === 1 && NUMBERS.includes(blockText) && str === "." || blockLength === 0 && str === "*") {
|
|
118
111
|
const newBlockType = computeBlockType(str, blockType);
|
|
119
112
|
const hasNumberList = hasBlockStyle(value, BLOCK_TYPES[0]);
|
|
120
113
|
const hasBulletList = hasBlockStyle(value, BLOCK_TYPES[1]);
|
|
121
|
-
|
|
122
114
|
if (BLOCK_TYPES.includes(newBlockType) && !hasNumberList && !hasBulletList) {
|
|
123
115
|
onChange(resetBlockType(value, newBlockType));
|
|
124
116
|
setActiveInlines({
|
|
@@ -128,37 +120,32 @@ const TextEditor = /*#__PURE__*/React.forwardRef(({
|
|
|
128
120
|
return true;
|
|
129
121
|
}
|
|
130
122
|
}
|
|
131
|
-
|
|
132
123
|
onChange(value);
|
|
133
124
|
return false;
|
|
134
125
|
};
|
|
135
|
-
|
|
136
126
|
const handlePastedText = pastedText => {
|
|
137
127
|
const selectedTextLength = getSelectedLength(value);
|
|
138
|
-
const newLength = contentLength + (pastedText === null || pastedText === void 0 ? void 0 : pastedText.length) - selectedTextLength;
|
|
139
|
-
|
|
128
|
+
const newLength = contentLength + (pastedText === null || pastedText === void 0 ? void 0 : pastedText.length) - selectedTextLength;
|
|
129
|
+
// if the pastedText will exceed the limit trim the excess
|
|
140
130
|
if (newLength > characterLimit) {
|
|
141
131
|
const newContentState = Modifier.insertText(getContent(value), value.getSelection(), pastedText.substring(0, characterLimit - contentLength));
|
|
142
132
|
const newState = EditorState.push(value, newContentState, "insert-fragment");
|
|
143
133
|
onChange(newState);
|
|
144
134
|
return "handled";
|
|
145
135
|
}
|
|
146
|
-
|
|
147
136
|
setActiveInlines({});
|
|
148
137
|
return "not-handled";
|
|
149
138
|
};
|
|
150
|
-
|
|
151
139
|
const getEditorState = () => {
|
|
152
|
-
let editorState = getDecoratedValue(value);
|
|
140
|
+
let editorState = getDecoratedValue(value);
|
|
153
141
|
|
|
142
|
+
// should the cursor position be forced to the end of the content
|
|
154
143
|
if (contentLength > 0 && moveCursor.current && isFocused) {
|
|
155
144
|
editorState = moveSelectionToEnd(editorState);
|
|
156
145
|
moveCursor.current = false;
|
|
157
146
|
}
|
|
158
|
-
|
|
159
147
|
return editorState;
|
|
160
148
|
};
|
|
161
|
-
|
|
162
149
|
const editorState = getEditorState();
|
|
163
150
|
const activeControls = {
|
|
164
151
|
BOLD: activeInlines.BOLD !== undefined ? activeInlines.BOLD : hasInlineStyle(editorState, INLINE_STYLES[0]),
|
|
@@ -169,22 +156,20 @@ const TextEditor = /*#__PURE__*/React.forwardRef(({
|
|
|
169
156
|
const handleEditorFocus = useCallback(focusValue => {
|
|
170
157
|
moveCursor.current = true;
|
|
171
158
|
setIsFocused(focusValue);
|
|
172
|
-
|
|
173
159
|
if (!isFocused && focusValue && editor.current !== document.activeElement) {
|
|
174
160
|
editor.current.focus();
|
|
175
161
|
setFocusToolbar(false);
|
|
176
162
|
}
|
|
177
163
|
}, [editor, isFocused]);
|
|
178
|
-
|
|
179
164
|
const handleInlineStyleChange = (ev, style) => {
|
|
180
165
|
ev.preventDefault();
|
|
181
|
-
setActiveInlines({
|
|
166
|
+
setActiveInlines({
|
|
167
|
+
...activeInlines,
|
|
182
168
|
[style]: !hasInlineStyle(value, style)
|
|
183
169
|
});
|
|
184
170
|
handleEditorFocus(true);
|
|
185
171
|
setInlines([...inlines, style]);
|
|
186
172
|
};
|
|
187
|
-
|
|
188
173
|
const handleBlockStyleChange = (ev, newBlockType) => {
|
|
189
174
|
ev.preventDefault();
|
|
190
175
|
handleEditorFocus(true);
|
|
@@ -197,31 +182,27 @@ const TextEditor = /*#__PURE__*/React.forwardRef(({
|
|
|
197
182
|
});
|
|
198
183
|
setInlines(temp);
|
|
199
184
|
};
|
|
200
|
-
|
|
201
185
|
useEffect(() => {
|
|
202
186
|
// apply the inline styling, having it run in as an effect ensures that styles can be added
|
|
203
187
|
// even when the editor is not focused
|
|
204
188
|
INLINE_STYLES.forEach(style => {
|
|
205
189
|
const preserveStyle = activeInlines[style] !== undefined && activeInlines[style] !== hasInlineStyle(value, style);
|
|
206
|
-
|
|
207
190
|
if (preserveStyle && value.getSelection().isCollapsed() || isFocused && inlines.includes(style)) {
|
|
208
191
|
onChange(RichUtils.toggleInlineStyle(value, style));
|
|
209
192
|
setInlines(inlines.filter(inline => inline !== style));
|
|
210
193
|
}
|
|
211
|
-
|
|
212
194
|
if (preserveStyle && !value.getSelection().isCollapsed()) {
|
|
213
|
-
setActiveInlines({
|
|
195
|
+
setActiveInlines({
|
|
196
|
+
...activeInlines,
|
|
214
197
|
[style]: undefined
|
|
215
198
|
});
|
|
216
199
|
}
|
|
217
200
|
});
|
|
218
201
|
}, [activeInlines, contentLength, editorState, inlines, isFocused, onChange, value]);
|
|
219
|
-
|
|
220
202
|
const handlePreviewClose = (onClose, url) => {
|
|
221
203
|
onClose(url);
|
|
222
204
|
editor.current.focus();
|
|
223
205
|
};
|
|
224
|
-
|
|
225
206
|
return /*#__PURE__*/React.createElement(EditorContext.Provider, {
|
|
226
207
|
value: {
|
|
227
208
|
onLinkAdded,
|
|
@@ -277,47 +258,35 @@ const TextEditor = /*#__PURE__*/React.forwardRef(({
|
|
|
277
258
|
toolbarElements: toolbarElements
|
|
278
259
|
})))));
|
|
279
260
|
});
|
|
280
|
-
TextEditor.propTypes = {
|
|
281
|
-
|
|
261
|
+
TextEditor.propTypes = {
|
|
262
|
+
...marginPropTypes,
|
|
282
263
|
/** The maximum characters that the input will accept */
|
|
283
264
|
characterLimit: PropTypes.number,
|
|
284
|
-
|
|
285
265
|
/** The text for the editor's label */
|
|
286
266
|
labelText: PropTypes.string.isRequired,
|
|
287
|
-
|
|
288
267
|
/** onChange callback to control value updates */
|
|
289
268
|
onChange: PropTypes.func.isRequired,
|
|
290
|
-
|
|
291
269
|
/** The value of the input, this is an EditorState immutable object */
|
|
292
270
|
value: PropTypes.object.isRequired,
|
|
293
|
-
|
|
294
271
|
/** Flag to configure component as mandatory */
|
|
295
272
|
required: PropTypes.bool,
|
|
296
|
-
|
|
297
273
|
/** Message to be displayed when there is an error */
|
|
298
274
|
error: PropTypes.string,
|
|
299
|
-
|
|
300
275
|
/** Message to be displayed when there is a warning */
|
|
301
276
|
warning: PropTypes.string,
|
|
302
|
-
|
|
303
277
|
/** Message to be displayed when there is an info */
|
|
304
278
|
info: PropTypes.string,
|
|
305
|
-
|
|
306
279
|
/** Additional elements to be rendered in the Editor Toolbar, e.g. Save and Cancel Button */
|
|
307
280
|
toolbarElements: PropTypes.node,
|
|
308
|
-
|
|
309
281
|
/** Number greater than 2 multiplied by line-height (21px) to override the default min-height of the editor */
|
|
310
282
|
rows: (props, propName, component) => {
|
|
311
283
|
if (props[propName] && (typeof props[propName] !== "number" || props[propName] < 2)) {
|
|
312
284
|
return new Error(`Prop \`${propName}\` must be a number value greater than 2 to override the min-height of the \`${component}\``);
|
|
313
285
|
}
|
|
314
|
-
|
|
315
286
|
return null;
|
|
316
287
|
},
|
|
317
|
-
|
|
318
288
|
/** The previews to display of any links added to the Editor */
|
|
319
289
|
previews: PropTypes.arrayOf(PropTypes.node),
|
|
320
|
-
|
|
321
290
|
/** Callback to report a url when a link is added */
|
|
322
291
|
onLinkAdded: PropTypes.func
|
|
323
292
|
};
|
|
@@ -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
|
}),
|