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
|
@@ -4,41 +4,28 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
-
|
|
10
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
-
|
|
12
9
|
var _events = _interopRequireDefault(require("../../../__internal__/utils/helpers/events"));
|
|
13
|
-
|
|
14
10
|
var _icon = _interopRequireDefault(require("../../icon"));
|
|
15
|
-
|
|
16
11
|
var _sort = require("./sort.style");
|
|
17
|
-
|
|
18
12
|
var _guid = _interopRequireDefault(require("../../../__internal__/utils/helpers/guid"));
|
|
19
|
-
|
|
20
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
|
-
|
|
22
14
|
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
|
|
23
|
-
|
|
24
15
|
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
25
|
-
|
|
26
16
|
const Sort = ({
|
|
27
17
|
children,
|
|
28
18
|
onClick,
|
|
29
19
|
sortType
|
|
30
20
|
}) => {
|
|
31
21
|
const id = (0, _react.useRef)((0, _guid.default)());
|
|
32
|
-
|
|
33
22
|
const onKeyDown = e => {
|
|
34
23
|
if (_events.default.isEnterOrSpaceKey(e)) {
|
|
35
24
|
e.preventDefault();
|
|
36
25
|
return onClick();
|
|
37
26
|
}
|
|
38
|
-
|
|
39
27
|
return null;
|
|
40
28
|
};
|
|
41
|
-
|
|
42
29
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("span", {
|
|
43
30
|
hidden: true,
|
|
44
31
|
id: id.current
|
|
@@ -55,14 +42,11 @@ const Sort = ({
|
|
|
55
42
|
color: "--colorsUtilityMajor200"
|
|
56
43
|
})), !sortType && /*#__PURE__*/_react.default.createElement(_sort.StyledSpaceHolder, null));
|
|
57
44
|
};
|
|
58
|
-
|
|
59
45
|
Sort.propTypes = {
|
|
60
46
|
/** if `asc` it will show `sort_up` icon, if `desc` it will show `sort_down` */
|
|
61
47
|
sortType: _propTypes.default.oneOf(["ascending", "descending", false]),
|
|
62
|
-
|
|
63
48
|
/** Callback fired when the `FlatTableSortHeader` is clicked */
|
|
64
49
|
onClick: _propTypes.default.func,
|
|
65
|
-
|
|
66
50
|
/** The content of `FlatTableSortHeader` */
|
|
67
51
|
children: _propTypes.default.node
|
|
68
52
|
};
|
|
@@ -4,13 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.StyledSpaceHolder = exports.StyledSort = void 0;
|
|
7
|
-
|
|
8
7
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
9
|
-
|
|
10
8
|
var _icon = _interopRequireDefault(require("../../icon/icon.style"));
|
|
11
|
-
|
|
12
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
|
|
14
10
|
const StyledSort = _styledComponents.default.div`
|
|
15
11
|
display: inline-flex;
|
|
16
12
|
align-items: center;
|
|
@@ -4,25 +4,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = exports.Summary = void 0;
|
|
7
|
-
|
|
8
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
-
|
|
10
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
-
|
|
12
9
|
var _formSummary = require("./form-summary.style");
|
|
13
|
-
|
|
14
10
|
var _icon = _interopRequireDefault(require("../../icon"));
|
|
15
|
-
|
|
16
11
|
var _useLocale = _interopRequireDefault(require("../../../hooks/__internal__/useLocale"));
|
|
17
|
-
|
|
18
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
|
-
|
|
20
13
|
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
|
|
21
|
-
|
|
22
14
|
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
23
|
-
|
|
24
15
|
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); }
|
|
25
|
-
|
|
26
16
|
const Summary = ({
|
|
27
17
|
type,
|
|
28
18
|
errorCount = 0,
|
|
@@ -34,7 +24,6 @@ const Summary = ({
|
|
|
34
24
|
warningCount
|
|
35
25
|
};
|
|
36
26
|
const message = (0, _react.useMemo)(() => l.errors.messages.formSummary(errorCount, warningCount, type), [l.errors.messages, errorCount, warningCount, type]);
|
|
37
|
-
|
|
38
27
|
if (messages[`${type}Count`]) {
|
|
39
28
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_formSummary.StyledMessagePrefix, null, message === null || message === void 0 ? void 0 : message[0]), /*#__PURE__*/_react.default.createElement(_formSummary.StyledInternalSummary, {
|
|
40
29
|
type: type,
|
|
@@ -43,17 +32,14 @@ const Summary = ({
|
|
|
43
32
|
type: type
|
|
44
33
|
}), /*#__PURE__*/_react.default.createElement("span", null, message === null || message === void 0 ? void 0 : message[1])));
|
|
45
34
|
}
|
|
46
|
-
|
|
47
35
|
return null;
|
|
48
36
|
};
|
|
49
|
-
|
|
50
37
|
exports.Summary = Summary;
|
|
51
38
|
Summary.propTypes = {
|
|
52
39
|
"errorCount": _propTypes.default.number,
|
|
53
40
|
"type": _propTypes.default.oneOf(["error", "warning"]).isRequired,
|
|
54
41
|
"warningCount": _propTypes.default.number
|
|
55
42
|
};
|
|
56
|
-
|
|
57
43
|
const FormSummary = ({
|
|
58
44
|
fullWidth,
|
|
59
45
|
...props
|
|
@@ -68,7 +54,6 @@ const FormSummary = ({
|
|
|
68
54
|
type: "warning"
|
|
69
55
|
}, props)), props.children);
|
|
70
56
|
};
|
|
71
|
-
|
|
72
57
|
FormSummary.propTypes = {
|
|
73
58
|
"children": _propTypes.default.node,
|
|
74
59
|
"errorCount": _propTypes.default.number,
|
|
@@ -4,19 +4,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.StyledInternalSummary = exports.StyledMessagePrefix = exports.StyledFormSummary = void 0;
|
|
7
|
-
|
|
8
7
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
9
|
-
|
|
10
8
|
var _icon = _interopRequireDefault(require("../../icon/icon.style"));
|
|
11
|
-
|
|
12
9
|
var _button = _interopRequireDefault(require("../../button/button.style"));
|
|
13
|
-
|
|
14
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
-
|
|
16
11
|
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
|
|
17
|
-
|
|
18
12
|
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
19
|
-
|
|
20
13
|
const StyledFormSummary = _styledComponents.default.div`
|
|
21
14
|
display: inline-flex;
|
|
22
15
|
align-items: center;
|
|
@@ -4,27 +4,16 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = exports.Form = void 0;
|
|
7
|
-
|
|
8
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
-
|
|
10
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
-
|
|
12
9
|
var _sidebar = require("../sidebar/sidebar.component");
|
|
13
|
-
|
|
14
10
|
var _modal = require("../modal/modal.component");
|
|
15
|
-
|
|
16
11
|
var _formSummary = _interopRequireDefault(require("./__internal__/form-summary.component"));
|
|
17
|
-
|
|
18
12
|
var _form = require("./form.style");
|
|
19
|
-
|
|
20
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
|
-
|
|
22
14
|
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
|
|
23
|
-
|
|
24
15
|
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
25
|
-
|
|
26
16
|
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); }
|
|
27
|
-
|
|
28
17
|
const Form = ({
|
|
29
18
|
children,
|
|
30
19
|
saveButton,
|
|
@@ -96,7 +85,6 @@ const Form = ({
|
|
|
96
85
|
warningCount: warningCount
|
|
97
86
|
}, saveButton))));
|
|
98
87
|
};
|
|
99
|
-
|
|
100
88
|
exports.Form = Form;
|
|
101
89
|
Form.propTypes = {
|
|
102
90
|
"buttonAlignment": _propTypes.default.oneOf(["left", "right"]),
|
|
@@ -4,33 +4,19 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.StyledLeftButtons = exports.StyledFullWidthButtons = exports.StyledRightButtons = exports.StyledForm = exports.StyledFormFooter = exports.StyledFormContent = void 0;
|
|
7
|
-
|
|
8
7
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
9
|
-
|
|
10
8
|
var _styledSystem = require("styled-system");
|
|
11
|
-
|
|
12
9
|
var _formField = _interopRequireDefault(require("../../__internal__/form-field/form-field.style"));
|
|
13
|
-
|
|
14
10
|
var _fieldset = require("../../__internal__/fieldset/fieldset.style");
|
|
15
|
-
|
|
16
11
|
var _button = _interopRequireDefault(require("../button/button.style"));
|
|
17
|
-
|
|
18
12
|
var _base = _interopRequireDefault(require("../../style/themes/base"));
|
|
19
|
-
|
|
20
13
|
var _fieldset2 = require("../fieldset/fieldset.style");
|
|
21
|
-
|
|
22
14
|
var _inlineInputs = _interopRequireDefault(require("../inline-inputs/inline-inputs.style"));
|
|
23
|
-
|
|
24
15
|
var _search = _interopRequireDefault(require("../search/search.style"));
|
|
25
|
-
|
|
26
16
|
var _textarea = _interopRequireDefault(require("../textarea/textarea.style"));
|
|
27
|
-
|
|
28
17
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
29
|
-
|
|
30
18
|
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
|
|
31
|
-
|
|
32
19
|
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
33
|
-
|
|
34
20
|
const StyledFormContent = _styledComponents.default.div`
|
|
35
21
|
${({
|
|
36
22
|
stickyFooter,
|
|
@@ -82,7 +68,6 @@ const StyledFormFooter = _styledComponents.default.div`
|
|
|
82
68
|
`}
|
|
83
69
|
`;
|
|
84
70
|
exports.StyledFormFooter = StyledFormFooter;
|
|
85
|
-
|
|
86
71
|
const formBottomMargins = fieldSpacing => ({
|
|
87
72
|
0: "var(--spacing000)",
|
|
88
73
|
1: "var(--spacing100)",
|
|
@@ -92,9 +77,9 @@ const formBottomMargins = fieldSpacing => ({
|
|
|
92
77
|
5: "var(--spacing500)",
|
|
93
78
|
6: "var(--spacing600)",
|
|
94
79
|
7: "var(--spacing700)"
|
|
95
|
-
})[fieldSpacing];
|
|
96
|
-
|
|
80
|
+
})[fieldSpacing];
|
|
97
81
|
|
|
82
|
+
// Accounts for height of the header of Modal parent, the height form footer and some additional spacing
|
|
98
83
|
const HEIGHT_SPACING = 216;
|
|
99
84
|
const StyledForm = _styledComponents.default.form`
|
|
100
85
|
${_styledSystem.space}
|
|
@@ -4,33 +4,20 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
-
|
|
12
9
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
13
|
-
|
|
14
10
|
var _themes = require("../../style/themes");
|
|
15
|
-
|
|
16
11
|
var _navigationBar = _interopRequireDefault(require("../navigation-bar/navigation-bar.style"));
|
|
17
|
-
|
|
18
12
|
var _box = _interopRequireDefault(require("../box"));
|
|
19
|
-
|
|
20
13
|
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
|
|
21
|
-
|
|
22
14
|
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
23
|
-
|
|
24
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
|
-
|
|
26
16
|
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); }
|
|
27
|
-
|
|
28
17
|
const StyledGlobalHeader = (0, _styledComponents.default)(_navigationBar.default).attrs(({
|
|
29
18
|
theme
|
|
30
19
|
}) => ({
|
|
31
|
-
theme: theme ||
|
|
32
|
-
/* istanbul ignore next */
|
|
33
|
-
_themes.baseTheme
|
|
20
|
+
theme: theme || /* istanbul ignore next */_themes.baseTheme
|
|
34
21
|
}))`
|
|
35
22
|
${({
|
|
36
23
|
theme
|
|
@@ -58,7 +45,6 @@ const StyledLogo = (0, _styledComponents.default)(_box.default)`
|
|
|
58
45
|
margin-left: var(--spacing500);
|
|
59
46
|
}
|
|
60
47
|
`;
|
|
61
|
-
|
|
62
48
|
const GlobalHeader = ({
|
|
63
49
|
children,
|
|
64
50
|
logo,
|
|
@@ -75,7 +61,6 @@ const GlobalHeader = ({
|
|
|
75
61
|
"data-element": "global-header-logo-wrapper"
|
|
76
62
|
}, logo), children);
|
|
77
63
|
};
|
|
78
|
-
|
|
79
64
|
GlobalHeader.propTypes = {
|
|
80
65
|
"alignContent": _propTypes.default.oneOfType([_propTypes.default.oneOf(["-moz-initial", "baseline", "center", "end", "flex-end", "flex-start", "inherit", "initial", "normal", "revert", "space-around", "space-between", "space-evenly", "start", "stretch", "unset"]), _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.oneOf(["-moz-initial", "baseline", "center", "end", "flex-end", "flex-start", "inherit", "initial", "normal", "revert", "space-around", "space-between", "space-evenly", "start", "stretch", "unset", null]), _propTypes.default.shape({
|
|
81
66
|
"__@iterator": _propTypes.default.func.isRequired,
|
|
@@ -9,7 +9,5 @@ Object.defineProperty(exports, "default", {
|
|
|
9
9
|
return _globalHeader.default;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
-
|
|
13
12
|
var _globalHeader = _interopRequireDefault(require("./global-header.component"));
|
|
14
|
-
|
|
15
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -4,21 +4,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = exports.GridContainer = void 0;
|
|
7
|
-
|
|
8
7
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
-
|
|
12
9
|
var _gridContainer = _interopRequireDefault(require("./grid-container.style"));
|
|
13
|
-
|
|
14
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
-
|
|
16
11
|
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); }
|
|
17
|
-
|
|
18
12
|
const GridContainer = props => /*#__PURE__*/_react.default.createElement(_gridContainer.default, _extends({
|
|
19
13
|
"data-component": "grid"
|
|
20
14
|
}, props));
|
|
21
|
-
|
|
22
15
|
exports.GridContainer = GridContainer;
|
|
23
16
|
GridContainer.propTypes = {
|
|
24
17
|
"about": _propTypes.default.string,
|
|
@@ -79,9 +72,6 @@ GridContainer.propTypes = {
|
|
|
79
72
|
"color": _propTypes.default.string,
|
|
80
73
|
"contentEditable": _propTypes.default.oneOfType([_propTypes.default.oneOf(["false", "inherit", "true"]), _propTypes.default.bool]),
|
|
81
74
|
"contextMenu": _propTypes.default.string,
|
|
82
|
-
"css": _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.number, _propTypes.default.object, _propTypes.default.shape({
|
|
83
|
-
"__emotion_styles": _propTypes.default.any.isRequired
|
|
84
|
-
}), _propTypes.default.string, _propTypes.default.bool]),
|
|
85
75
|
"dangerouslySetInnerHTML": _propTypes.default.shape({
|
|
86
76
|
"__html": _propTypes.default.string.isRequired
|
|
87
77
|
}),
|
|
@@ -4,13 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
9
|
-
|
|
10
8
|
var _styledSystem = require("styled-system");
|
|
11
|
-
|
|
12
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
|
|
14
10
|
const StyledGridContainer = _styledComponents.default.div`
|
|
15
11
|
display: grid;
|
|
16
12
|
grid-template-columns: repeat(12, 1fr);
|
|
@@ -9,7 +9,5 @@ Object.defineProperty(exports, "default", {
|
|
|
9
9
|
return _gridContainer.default;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
-
|
|
13
12
|
var _gridContainer = _interopRequireDefault(require("./grid-container.component"));
|
|
14
|
-
|
|
15
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -4,17 +4,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = exports.GridItem = void 0;
|
|
7
|
-
|
|
8
7
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
-
|
|
12
9
|
var _gridItem = _interopRequireDefault(require("./grid-item.style"));
|
|
13
|
-
|
|
14
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
-
|
|
16
11
|
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); }
|
|
17
|
-
|
|
18
12
|
const GridItem = props => {
|
|
19
13
|
const {
|
|
20
14
|
children,
|
|
@@ -25,7 +19,6 @@ const GridItem = props => {
|
|
|
25
19
|
responsiveSettings: responsiveSettings
|
|
26
20
|
}), children);
|
|
27
21
|
};
|
|
28
|
-
|
|
29
22
|
exports.GridItem = GridItem;
|
|
30
23
|
GridItem.propTypes = {
|
|
31
24
|
"about": _propTypes.default.string,
|
|
@@ -87,9 +80,6 @@ GridItem.propTypes = {
|
|
|
87
80
|
"color": _propTypes.default.string,
|
|
88
81
|
"contentEditable": _propTypes.default.oneOfType([_propTypes.default.oneOf(["false", "inherit", "true"]), _propTypes.default.bool]),
|
|
89
82
|
"contextMenu": _propTypes.default.string,
|
|
90
|
-
"css": _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.number, _propTypes.default.object, _propTypes.default.shape({
|
|
91
|
-
"__emotion_styles": _propTypes.default.any.isRequired
|
|
92
|
-
}), _propTypes.default.string, _propTypes.default.bool]),
|
|
93
83
|
"dangerouslySetInnerHTML": _propTypes.default.shape({
|
|
94
84
|
"__html": _propTypes.default.string.isRequired
|
|
95
85
|
}),
|
|
@@ -5,59 +5,41 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.getSpacing = getSpacing;
|
|
7
7
|
exports.default = void 0;
|
|
8
|
-
|
|
9
8
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
10
|
-
|
|
11
9
|
var _styledSystem = require("styled-system");
|
|
12
|
-
|
|
13
10
|
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
|
|
14
|
-
|
|
15
11
|
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
16
|
-
|
|
17
12
|
function getSpacing(prop) {
|
|
18
13
|
if (typeof prop === "number") {
|
|
19
14
|
switch (prop) {
|
|
20
15
|
case 0:
|
|
21
16
|
return "var(--spacing000)";
|
|
22
|
-
|
|
23
17
|
case 1:
|
|
24
18
|
return "var(--spacing100)";
|
|
25
|
-
|
|
26
19
|
case 2:
|
|
27
20
|
return "var(--spacing200)";
|
|
28
|
-
|
|
29
21
|
case 3:
|
|
30
22
|
return "var(--spacing300)";
|
|
31
|
-
|
|
32
23
|
case 4:
|
|
33
24
|
return "var(--spacing400)";
|
|
34
|
-
|
|
35
25
|
case 5:
|
|
36
26
|
return "var(--spacing500)";
|
|
37
|
-
|
|
38
27
|
case 6:
|
|
39
28
|
return "var(--spacing600)";
|
|
40
|
-
|
|
41
29
|
case 7:
|
|
42
30
|
return "var(--spacing700)";
|
|
43
|
-
|
|
44
31
|
case 8:
|
|
45
32
|
return "var(--spacing800)";
|
|
46
|
-
|
|
47
33
|
case 9:
|
|
48
34
|
return "var(--spacing900)";
|
|
49
|
-
|
|
50
35
|
case 10:
|
|
51
36
|
return "var(--spacing1000)";
|
|
52
|
-
|
|
53
37
|
default:
|
|
54
38
|
return "var(--spacing100)";
|
|
55
39
|
}
|
|
56
40
|
}
|
|
57
|
-
|
|
58
41
|
return String(prop);
|
|
59
42
|
}
|
|
60
|
-
|
|
61
43
|
function responsiveGridItem(responsiveSettings) {
|
|
62
44
|
return responsiveSettings.map(setting => {
|
|
63
45
|
const {
|
|
@@ -89,7 +71,6 @@ function responsiveGridItem(responsiveSettings) {
|
|
|
89
71
|
`;
|
|
90
72
|
});
|
|
91
73
|
}
|
|
92
|
-
|
|
93
74
|
const StyledGridItem = _styledComponents.default.div`
|
|
94
75
|
margin: 0;
|
|
95
76
|
${_styledSystem.padding}
|
|
@@ -15,9 +15,6 @@ Object.defineProperty(exports, "GridItem", {
|
|
|
15
15
|
return _gridItem.default;
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
|
-
|
|
19
18
|
var _gridContainer = _interopRequireDefault(require("./grid-container"));
|
|
20
|
-
|
|
21
19
|
var _gridItem = _interopRequireDefault(require("./grid-item"));
|
|
22
|
-
|
|
23
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -4,23 +4,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = exports.GroupedCharacter = void 0;
|
|
7
|
-
|
|
8
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
-
|
|
10
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
-
|
|
12
9
|
var _textbox = _interopRequireDefault(require("../textbox"));
|
|
13
|
-
|
|
14
10
|
var _groupedCharacter = require("./grouped-character.utils");
|
|
15
|
-
|
|
16
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
-
|
|
18
12
|
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
|
|
19
|
-
|
|
20
13
|
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
21
|
-
|
|
22
14
|
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); }
|
|
23
|
-
|
|
24
15
|
const buildCustomTarget = ({
|
|
25
16
|
target
|
|
26
17
|
}, value) => {
|
|
@@ -28,7 +19,8 @@ const buildCustomTarget = ({
|
|
|
28
19
|
name,
|
|
29
20
|
id
|
|
30
21
|
} = target;
|
|
31
|
-
return {
|
|
22
|
+
return {
|
|
23
|
+
...(name && {
|
|
32
24
|
name
|
|
33
25
|
}),
|
|
34
26
|
...(id && {
|
|
@@ -37,7 +29,6 @@ const buildCustomTarget = ({
|
|
|
37
29
|
value
|
|
38
30
|
};
|
|
39
31
|
};
|
|
40
|
-
|
|
41
32
|
const GroupedCharacter = ({
|
|
42
33
|
defaultValue,
|
|
43
34
|
groups,
|
|
@@ -52,13 +43,9 @@ const GroupedCharacter = ({
|
|
|
52
43
|
const separator = rawSeparator.substring(0, 1); // Ensure max length is 1
|
|
53
44
|
|
|
54
45
|
const maxRawLength = groups.reduce(_groupedCharacter.toSum);
|
|
55
|
-
|
|
56
46
|
const formatValue = val => (0, _groupedCharacter.generateGroups)(groups, val).join(separator);
|
|
57
|
-
|
|
58
47
|
const sanitizeValue = val => val.split(separator).join("").substring(0, maxRawLength);
|
|
59
|
-
|
|
60
48
|
const value = isControlled ? externalValue : internalValue;
|
|
61
|
-
|
|
62
49
|
const handleChange = ev => {
|
|
63
50
|
const {
|
|
64
51
|
target
|
|
@@ -71,7 +58,6 @@ const GroupedCharacter = ({
|
|
|
71
58
|
const formattedValue = formatValue(rawValue);
|
|
72
59
|
const isLastPosition = target.value.length === newCursorPos;
|
|
73
60
|
const isAtOneBeyondSeparator = formattedValue[newCursorPos - 1] === separator;
|
|
74
|
-
|
|
75
61
|
if (isLastPosition) {
|
|
76
62
|
const targetValSeparatorCount = target.value.split(separator).length - 1;
|
|
77
63
|
const formatValSeparatorCount = formattedValue.split(separator).length - 1;
|
|
@@ -81,21 +67,17 @@ const GroupedCharacter = ({
|
|
|
81
67
|
const isDeleting = value.length > rawValue.length;
|
|
82
68
|
newCursorPos += isDeleting ? -1 : 1;
|
|
83
69
|
}
|
|
84
|
-
|
|
85
70
|
const modifiedEvent = ev;
|
|
86
71
|
modifiedEvent.target = buildCustomTarget(ev, {
|
|
87
72
|
rawValue,
|
|
88
73
|
formattedValue
|
|
89
74
|
});
|
|
90
75
|
onChange === null || onChange === void 0 ? void 0 : onChange(modifiedEvent);
|
|
91
|
-
|
|
92
76
|
if (!isControlled) {
|
|
93
77
|
setInternalValue(rawValue);
|
|
94
78
|
}
|
|
95
|
-
|
|
96
79
|
setTimeout(() => target.setSelectionRange(newCursorPos, newCursorPos));
|
|
97
80
|
};
|
|
98
|
-
|
|
99
81
|
const handleBlur = ev => {
|
|
100
82
|
if (onBlur) {
|
|
101
83
|
const {
|
|
@@ -111,21 +93,18 @@ const GroupedCharacter = ({
|
|
|
111
93
|
onBlur(modifiedEvent);
|
|
112
94
|
}
|
|
113
95
|
};
|
|
114
|
-
|
|
115
96
|
const handleKeyPress = ev => {
|
|
116
97
|
const {
|
|
117
98
|
selectionStart,
|
|
118
99
|
selectionEnd
|
|
119
100
|
} = ev.target;
|
|
120
|
-
/* istanbul ignore next */
|
|
121
101
|
|
|
102
|
+
/* istanbul ignore next */
|
|
122
103
|
const hasSelection = (selectionEnd ?? 0) - (selectionStart ?? 0) > 0;
|
|
123
|
-
|
|
124
104
|
if (maxRawLength === value.length && !hasSelection) {
|
|
125
105
|
ev.preventDefault();
|
|
126
106
|
}
|
|
127
107
|
};
|
|
128
|
-
|
|
129
108
|
return /*#__PURE__*/_react.default.createElement(_textbox.default, _extends({}, rest, {
|
|
130
109
|
value: value,
|
|
131
110
|
formattedValue: formatValue(value),
|
|
@@ -134,7 +113,6 @@ const GroupedCharacter = ({
|
|
|
134
113
|
onKeyPress: handleKeyPress
|
|
135
114
|
}));
|
|
136
115
|
};
|
|
137
|
-
|
|
138
116
|
exports.GroupedCharacter = GroupedCharacter;
|
|
139
117
|
GroupedCharacter.propTypes = {
|
|
140
118
|
"about": _propTypes.default.string,
|
|
@@ -205,9 +183,6 @@ GroupedCharacter.propTypes = {
|
|
|
205
183
|
"contentEditable": _propTypes.default.oneOfType([_propTypes.default.oneOf(["false", "inherit", "true"]), _propTypes.default.bool]),
|
|
206
184
|
"contextMenu": _propTypes.default.string,
|
|
207
185
|
"crossOrigin": _propTypes.default.string,
|
|
208
|
-
"css": _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.number, _propTypes.default.object, _propTypes.default.shape({
|
|
209
|
-
"__emotion_styles": _propTypes.default.any.isRequired
|
|
210
|
-
}), _propTypes.default.string, _propTypes.default.bool]),
|
|
211
186
|
"dangerouslySetInnerHTML": _propTypes.default.shape({
|
|
212
187
|
"__html": _propTypes.default.string.isRequired
|
|
213
188
|
}),
|
|
@@ -4,11 +4,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.generateGroups = exports.toSum = void 0;
|
|
7
|
-
|
|
8
7
|
const toSum = (acc, i) => acc + i;
|
|
9
|
-
|
|
10
8
|
exports.toSum = toSum;
|
|
11
|
-
|
|
12
9
|
const generateGroups = (groups, rawValue) => {
|
|
13
10
|
return groups.reduce((acc, group, index, src) => {
|
|
14
11
|
const soFar = src.slice(0, index).reduce(toSum, 0);
|
|
@@ -16,5 +13,4 @@ const generateGroups = (groups, rawValue) => {
|
|
|
16
13
|
return toAdd ? [...acc, toAdd] : acc;
|
|
17
14
|
}, []);
|
|
18
15
|
};
|
|
19
|
-
|
|
20
16
|
exports.generateGroups = generateGroups;
|
|
@@ -9,7 +9,5 @@ Object.defineProperty(exports, "default", {
|
|
|
9
9
|
return _groupedCharacter.default;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
-
|
|
13
12
|
var _groupedCharacter = _interopRequireDefault(require("./grouped-character.component"));
|
|
14
|
-
|
|
15
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|