carbon-react 138.2.2 → 140.0.0
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__/fieldset/fieldset.component.js +1 -1
- package/esm/__internal__/focus-trap/focus-trap.component.js +2 -2
- package/esm/__internal__/form-field/form-field.component.js +1 -1
- package/esm/__internal__/form-spacing-provider/form-spacing-provider.component.d.ts +1 -1
- package/esm/__internal__/form-spacing-provider/form-spacing-provider.component.js +1 -1
- package/esm/__internal__/form-spacing-provider/index.d.ts +2 -2
- package/esm/__internal__/form-spacing-provider/index.js +1 -1
- package/esm/__internal__/input/input-presentation.component.js +1 -1
- package/esm/__internal__/input/input.component.js +1 -1
- package/esm/__internal__/popover/popover.component.js +1 -1
- package/esm/__internal__/utils/helpers/events/events.d.ts +1 -1
- package/esm/components/action-popover/action-popover-item/action-popover-item.component.d.ts +1 -1
- package/esm/components/action-popover/action-popover-item/action-popover-item.component.js +1 -1
- package/esm/components/action-popover/action-popover-menu/action-popover-menu.component.d.ts +1 -1
- package/esm/components/action-popover/action-popover-menu/action-popover-menu.component.js +1 -1
- package/esm/components/action-popover/action-popover.component.d.ts +1 -1
- package/esm/components/action-popover/action-popover.component.js +1 -1
- package/esm/components/button/button.component.js +1 -1
- package/esm/components/button-bar/__internal__/button-bar.context.d.ts +13 -0
- package/esm/components/button-bar/button-bar.component.d.ts +1 -11
- package/esm/components/button-bar/button-bar.component.js +1 -1
- package/esm/components/button-minor/button-minor.component.js +1 -1
- package/esm/components/button-toggle/button-toggle-group/__internal__/button-toggle-group.context.d.ts +16 -0
- package/esm/components/button-toggle/button-toggle-group/__internal__/button-toggle-group.context.js +9 -0
- package/esm/components/button-toggle/button-toggle-group/button-toggle-group.component.d.ts +0 -14
- package/esm/components/button-toggle/button-toggle-group/button-toggle-group.component.js +3 -10
- package/esm/components/button-toggle/button-toggle.component.js +1 -1
- package/esm/components/carbon-provider/__internal__/new-validation.context.d.ts +14 -0
- package/esm/components/carbon-provider/__internal__/top-modal-provider.component.d.ts +5 -0
- package/esm/components/carbon-provider/{top-modal-context.js → __internal__/top-modal-provider.component.js} +5 -6
- package/esm/components/carbon-provider/__internal__/top-modal.context.d.ts +6 -0
- package/esm/components/carbon-provider/__internal__/top-modal.context.js +4 -0
- package/esm/components/carbon-provider/carbon-provider.component.d.ts +2 -9
- package/esm/components/carbon-provider/carbon-provider.component.js +4 -4
- package/esm/components/card/__internal__/{card-context/index.d.ts → card.context.d.ts} +1 -1
- package/esm/components/card/card-footer/card-footer.component.d.ts +1 -1
- package/esm/components/card/card-footer/card-footer.component.js +1 -1
- package/esm/components/card/card-footer/card-footer.style.d.ts +1 -1
- package/esm/components/card/card-row/card-row.component.js +1 -1
- package/esm/components/card/card.component.d.ts +1 -1
- package/esm/components/card/card.component.js +1 -1
- package/esm/components/card/card.style.d.ts +1 -1
- package/esm/components/checkbox/checkbox-group/__internal__/checkbox-group.context.d.ts +4 -0
- package/esm/components/checkbox/checkbox-group/__internal__/checkbox-group.context.js +2 -0
- package/esm/components/checkbox/checkbox-group/checkbox-group.component.d.ts +0 -1
- package/esm/components/checkbox/checkbox-group/checkbox-group.component.js +2 -2
- package/esm/components/checkbox/checkbox.component.js +2 -2
- package/esm/components/date/date.component.d.ts +1 -1
- package/esm/components/date/date.component.js +1 -1
- package/esm/components/date-range/__internal__/date-range.context.js +2 -0
- package/esm/components/date-range/date-range.component.js +1 -1
- package/esm/components/date-range/index.d.ts +1 -1
- package/esm/components/dialog/dialog.component.d.ts +1 -1
- package/esm/components/dialog/dialog.component.js +11 -12
- package/esm/components/drawer/__internal__/drawer-sidebar.context.d.ts +6 -0
- package/esm/components/drawer/__internal__/drawer-sidebar.context.js +4 -0
- package/esm/components/drawer/drawer.component.d.ts +4 -6
- package/esm/components/drawer/drawer.component.js +13 -7
- package/esm/components/drawer/index.d.ts +2 -2
- package/esm/components/drawer/index.js +1 -1
- package/esm/components/duelling-picklist/duelling-picklist.component.js +1 -1
- package/esm/components/duelling-picklist/picklist/picklist.component.js +1 -1
- package/esm/components/duelling-picklist/picklist-group/picklist-group.component.js +1 -1
- package/esm/components/duelling-picklist/picklist-item/picklist-item.component.js +1 -1
- package/esm/components/fieldset/fieldset.component.js +1 -1
- package/esm/components/flat-table/__internal__/flat-table.context.d.ts +7 -0
- package/esm/components/flat-table/__internal__/flat-table.context.js +4 -0
- package/esm/components/flat-table/__internal__/use-table-cell.js +3 -3
- package/esm/components/flat-table/flat-table-checkbox/flat-table-checkbox.component.js +1 -1
- package/esm/components/flat-table/flat-table-head/__internal__/flat-table-head.context.d.ts +6 -0
- package/esm/components/flat-table/flat-table-head/__internal__/flat-table-head.context.js +4 -0
- package/esm/components/flat-table/flat-table-head/flat-table-head.component.d.ts +0 -4
- package/esm/components/flat-table/flat-table-head/flat-table-head.component.js +1 -3
- package/esm/components/flat-table/flat-table-header/flat-table-header-utils.d.ts +1 -1
- package/esm/components/flat-table/flat-table-header/flat-table-header.component.js +2 -2
- package/esm/components/flat-table/flat-table-row/flat-table-row.component.js +5 -5
- package/esm/components/flat-table/flat-table.component.d.ts +0 -4
- package/esm/components/flat-table/flat-table.component.js +3 -5
- package/esm/components/flat-table/flat-table.style.d.ts +1 -1
- package/esm/components/flat-table/sort/sort.component.js +2 -2
- package/esm/components/form/form.component.js +2 -2
- package/esm/components/icon/icon.component.js +1 -1
- package/esm/components/link/link.component.js +1 -1
- package/esm/components/menu/__internal__/submenu/submenu.component.js +2 -2
- package/esm/components/menu/__internal__/submenu/submenu.style.d.ts +1 -1
- package/esm/components/menu/menu-divider/menu-divider.component.js +1 -1
- package/esm/components/menu/menu-divider/menu-divider.style.d.ts +1 -1
- package/esm/components/menu/menu-full-screen/menu-full-screen.component.js +1 -1
- package/esm/components/menu/menu-full-screen/menu-full-screen.style.d.ts +1 -1
- package/esm/components/menu/menu-item/menu-item.component.js +1 -1
- package/esm/components/menu/menu-item/menu-item.style.d.ts +1 -1
- package/esm/components/menu/menu-segment-title/menu-segment-title.component.js +1 -1
- package/esm/components/menu/menu-segment-title/menu-segment-title.style.d.ts +1 -1
- package/esm/components/menu/menu.component.d.ts +1 -1
- package/esm/components/menu/menu.component.js +1 -1
- package/esm/components/menu/scrollable-block/scrollable-block.component.js +1 -1
- package/esm/components/menu/scrollable-block/scrollable-block.style.d.ts +1 -1
- package/esm/components/modal/__internal__/modal.context.d.ts +8 -0
- package/esm/components/modal/__internal__/modal.context.js +2 -0
- package/esm/components/modal/index.d.ts +2 -2
- package/esm/components/modal/index.js +1 -1
- package/esm/components/modal/modal.component.d.ts +2 -8
- package/esm/components/modal/modal.component.js +6 -1
- package/{lib/components/navigation-bar → esm/components/navigation-bar/__internal__}/fixed-navigation-bar.context.d.ts +1 -1
- package/esm/components/navigation-bar/{fixed-navigation-bar.context.js → __internal__/fixed-navigation-bar.context.js} +1 -1
- package/esm/components/navigation-bar/navigation-bar.component.js +1 -1
- package/esm/components/note/note.component.js +1 -1
- package/esm/components/numeral-date/__internal__/numeral-date.context.js +2 -0
- package/esm/components/numeral-date/numeral-date.component.js +2 -2
- package/esm/components/pill/pill.style.js +7 -6
- package/esm/components/popover-container/popover-container.component.js +1 -1
- package/esm/components/portal/__internal__/portal.context.d.ts +6 -0
- package/esm/components/portal/__internal__/portal.context.js +2 -0
- package/esm/components/portal/portal.d.ts +0 -4
- package/esm/components/portal/portal.js +1 -1
- package/esm/components/portrait/portrait.component.js +1 -1
- package/esm/components/radio-button/radio-button-group/radio-button-group.component.js +1 -1
- package/esm/components/radio-button/radio-button.component.js +1 -1
- package/esm/components/select/{list-action-button → __internal__/list-action-button}/list-action-button.component.js +2 -2
- package/esm/components/select/{list-action-button → __internal__/list-action-button}/list-action-button.style.js +1 -1
- package/esm/components/select/{select-list → __internal__/select-list}/select-list.component.js +8 -8
- package/esm/components/select/{select-list → __internal__/select-list}/select-list.style.js +1 -1
- package/esm/components/select/__internal__/select-text/select-text.component.d.ts +0 -8
- package/{lib/components/select → esm/components/select/__internal__}/select-textbox/select-textbox.component.d.ts +3 -3
- package/esm/components/select/{select-textbox → __internal__/select-textbox}/select-textbox.component.js +5 -5
- package/esm/components/select/{utils → __internal__/utils}/is-expected-option.js +2 -2
- package/esm/components/select/{utils → __internal__/utils}/with-filter.hoc.js +5 -5
- package/esm/components/select/filterable-select/filterable-select.component.d.ts +1 -1
- package/esm/components/select/filterable-select/filterable-select.component.js +5 -5
- package/esm/components/select/multi-select/multi-select.component.d.ts +1 -1
- package/esm/components/select/multi-select/multi-select.component.js +6 -6
- package/esm/components/select/option/option.component.js +1 -1
- package/esm/components/select/option-row/option-row.component.js +1 -1
- package/esm/components/select/simple-select/simple-select.component.d.ts +1 -1
- package/esm/components/select/simple-select/simple-select.component.js +5 -5
- package/esm/components/sidebar/__internal__/sidebar.context.d.ts +6 -0
- package/esm/components/sidebar/__internal__/sidebar.context.js +2 -0
- package/esm/components/sidebar/index.d.ts +1 -1
- package/esm/components/sidebar/index.js +1 -1
- package/esm/components/sidebar/sidebar.component.d.ts +0 -4
- package/esm/components/sidebar/sidebar.component.js +1 -1
- package/esm/components/switch/switch.component.js +1 -1
- package/esm/components/tabs/__internal__/tab-title/index.d.ts +1 -1
- package/esm/components/tabs/__internal__/tab-title/index.js +1 -1
- package/esm/components/tabs/__internal__/tab-title/tab-title.component.d.ts +0 -4
- package/esm/components/tabs/__internal__/tab-title/tab-title.component.js +1 -1
- package/esm/components/tabs/__internal__/tab-title/tab-title.context.d.ts +6 -0
- package/esm/components/tabs/__internal__/tab-title/tab-title.context.js +2 -0
- package/esm/components/tabs/tab/__internal__/tab.context.d.ts +8 -0
- package/esm/components/tabs/tab/__internal__/tab.context.js +2 -0
- package/esm/components/tabs/tab/index.d.ts +2 -2
- package/esm/components/tabs/tab/index.js +1 -1
- package/esm/components/tabs/tab/tab.component.d.ts +0 -7
- package/esm/components/tabs/tab/tab.component.js +1 -2
- package/esm/components/tabs/tabs.component.js +1 -1
- package/esm/components/text-editor/__internal__/editor-link/editor-link.component.js +1 -1
- package/esm/components/text-editor/__internal__/editor.context.d.ts +6 -0
- package/esm/components/text-editor/__internal__/editor.context.js +2 -0
- package/esm/components/text-editor/text-editor.component.d.ts +0 -4
- package/esm/components/text-editor/text-editor.component.js +2 -2
- package/esm/components/textarea/textarea.component.js +1 -1
- package/esm/components/textbox/textbox.component.js +2 -2
- package/esm/components/tile/tile-content/tile-content.component.js +1 -1
- package/esm/components/tile/tile.component.js +1 -1
- package/esm/components/vertical-divider/vertical-divider.component.js +2 -0
- package/esm/components/vertical-menu/vertical-menu-full-screen/vertical-menu-full-screen.component.js +1 -1
- package/esm/components/vertical-menu/vertical-menu-item/__internal__/menu-item.context.d.ts +5 -0
- package/esm/components/vertical-menu/vertical-menu-item/__internal__/menu-item.context.js +4 -0
- package/esm/components/vertical-menu/vertical-menu-item/vertical-menu-item.component.js +2 -4
- package/esm/hooks/__internal__/useModalAria/useModalAria.js +1 -1
- package/lib/__internal__/fieldset/fieldset.component.js +2 -2
- package/lib/__internal__/focus-trap/focus-trap.component.js +4 -4
- package/lib/__internal__/form-field/form-field.component.js +2 -2
- package/lib/__internal__/form-spacing-provider/form-spacing-provider.component.d.ts +1 -1
- package/lib/__internal__/form-spacing-provider/form-spacing-provider.component.js +2 -2
- package/lib/__internal__/form-spacing-provider/index.d.ts +2 -2
- package/lib/__internal__/form-spacing-provider/index.js +2 -2
- package/lib/__internal__/input/input-presentation.component.js +2 -2
- package/lib/__internal__/input/input.component.js +2 -2
- package/lib/__internal__/popover/popover.component.js +2 -2
- package/lib/__internal__/utils/helpers/events/events.d.ts +1 -1
- package/lib/components/action-popover/action-popover-item/action-popover-item.component.d.ts +1 -1
- package/lib/components/action-popover/action-popover-item/action-popover-item.component.js +2 -2
- package/lib/components/action-popover/action-popover-menu/action-popover-menu.component.d.ts +1 -1
- package/lib/components/action-popover/action-popover-menu/action-popover-menu.component.js +2 -2
- package/lib/components/action-popover/action-popover.component.d.ts +1 -1
- package/lib/components/action-popover/action-popover.component.js +2 -2
- package/lib/components/button/button.component.js +2 -2
- package/lib/components/button-bar/__internal__/button-bar.context.d.ts +13 -0
- package/lib/components/button-bar/button-bar.component.d.ts +1 -11
- package/lib/components/button-bar/button-bar.component.js +3 -3
- package/lib/components/button-minor/button-minor.component.js +2 -2
- package/lib/components/button-toggle/button-toggle-group/__internal__/button-toggle-group.context.d.ts +16 -0
- package/lib/components/button-toggle/button-toggle-group/__internal__/button-toggle-group.context.js +16 -0
- package/lib/components/button-toggle/button-toggle-group/button-toggle-group.component.d.ts +0 -14
- package/lib/components/button-toggle/button-toggle-group/button-toggle-group.component.js +5 -12
- package/lib/components/button-toggle/button-toggle.component.js +2 -2
- package/lib/components/carbon-provider/__internal__/new-validation.context.d.ts +14 -0
- package/lib/components/carbon-provider/__internal__/top-modal-provider.component.d.ts +5 -0
- package/lib/components/carbon-provider/{top-modal-context.js → __internal__/top-modal-provider.component.js} +8 -8
- package/lib/components/carbon-provider/__internal__/top-modal.context.d.ts +6 -0
- package/lib/components/carbon-provider/__internal__/top-modal.context.js +11 -0
- package/lib/components/carbon-provider/carbon-provider.component.d.ts +2 -9
- package/lib/components/carbon-provider/carbon-provider.component.js +6 -6
- package/lib/components/card/__internal__/{card-context/index.d.ts → card.context.d.ts} +1 -1
- package/lib/components/card/card-footer/card-footer.component.d.ts +1 -1
- package/lib/components/card/card-footer/card-footer.component.js +2 -2
- package/lib/components/card/card-footer/card-footer.style.d.ts +1 -1
- package/lib/components/card/card-row/card-row.component.js +2 -2
- package/lib/components/card/card.component.d.ts +1 -1
- package/lib/components/card/card.component.js +5 -5
- package/lib/components/card/card.style.d.ts +1 -1
- package/lib/components/checkbox/checkbox-group/__internal__/checkbox-group.context.d.ts +4 -0
- package/lib/components/checkbox/checkbox-group/__internal__/checkbox-group.context.js +9 -0
- package/lib/components/checkbox/checkbox-group/checkbox-group.component.d.ts +0 -1
- package/lib/components/checkbox/checkbox-group/checkbox-group.component.js +6 -6
- package/lib/components/checkbox/checkbox.component.js +4 -4
- package/lib/components/date/date.component.d.ts +1 -1
- package/lib/components/date/date.component.js +1 -1
- package/lib/components/date-range/__internal__/date-range.context.js +9 -0
- package/lib/components/date-range/date-range.component.js +1 -1
- package/lib/components/date-range/index.d.ts +1 -1
- package/lib/components/dialog/dialog.component.d.ts +1 -1
- package/lib/components/dialog/dialog.component.js +11 -12
- package/lib/components/drawer/__internal__/drawer-sidebar.context.d.ts +6 -0
- package/lib/components/drawer/__internal__/drawer-sidebar.context.js +11 -0
- package/lib/components/drawer/drawer.component.d.ts +4 -6
- package/lib/components/drawer/drawer.component.js +22 -9
- package/lib/components/drawer/index.d.ts +2 -2
- package/lib/components/drawer/index.js +2 -9
- package/lib/components/duelling-picklist/duelling-picklist.component.js +1 -1
- package/lib/components/duelling-picklist/picklist/picklist.component.js +1 -1
- package/lib/components/duelling-picklist/picklist-group/picklist-group.component.js +1 -1
- package/lib/components/duelling-picklist/picklist-item/picklist-item.component.js +1 -1
- package/lib/components/fieldset/fieldset.component.js +2 -2
- package/lib/components/flat-table/__internal__/flat-table.context.d.ts +7 -0
- package/lib/components/flat-table/__internal__/flat-table.context.js +11 -0
- package/lib/components/flat-table/__internal__/use-table-cell.js +4 -4
- package/lib/components/flat-table/flat-table-checkbox/flat-table-checkbox.component.js +2 -2
- package/lib/components/flat-table/flat-table-head/__internal__/flat-table-head.context.d.ts +6 -0
- package/lib/components/flat-table/flat-table-head/__internal__/flat-table-head.context.js +11 -0
- package/lib/components/flat-table/flat-table-head/flat-table-head.component.d.ts +0 -4
- package/lib/components/flat-table/flat-table-head/flat-table-head.component.js +3 -5
- package/lib/components/flat-table/flat-table-header/flat-table-header-utils.d.ts +1 -1
- package/lib/components/flat-table/flat-table-header/flat-table-header.component.js +2 -2
- package/lib/components/flat-table/flat-table-row/flat-table-row.component.js +8 -8
- package/lib/components/flat-table/flat-table.component.d.ts +0 -4
- package/lib/components/flat-table/flat-table.component.js +5 -7
- package/lib/components/flat-table/flat-table.style.d.ts +1 -1
- package/lib/components/flat-table/sort/sort.component.js +2 -2
- package/lib/components/form/form.component.js +4 -4
- package/lib/components/icon/icon.component.js +2 -2
- package/lib/components/link/link.component.js +1 -1
- package/lib/components/menu/__internal__/submenu/submenu.component.js +2 -2
- package/lib/components/menu/__internal__/submenu/submenu.style.d.ts +1 -1
- package/lib/components/menu/menu-divider/menu-divider.component.js +1 -1
- package/lib/components/menu/menu-divider/menu-divider.style.d.ts +1 -1
- package/lib/components/menu/menu-full-screen/menu-full-screen.component.js +1 -1
- package/lib/components/menu/menu-full-screen/menu-full-screen.style.d.ts +1 -1
- package/lib/components/menu/menu-item/menu-item.component.js +1 -1
- package/lib/components/menu/menu-item/menu-item.style.d.ts +1 -1
- package/lib/components/menu/menu-segment-title/menu-segment-title.component.js +1 -1
- package/lib/components/menu/menu-segment-title/menu-segment-title.style.d.ts +1 -1
- package/lib/components/menu/menu.component.d.ts +1 -1
- package/lib/components/menu/menu.component.js +1 -1
- package/lib/components/menu/scrollable-block/scrollable-block.component.js +1 -1
- package/lib/components/menu/scrollable-block/scrollable-block.style.d.ts +1 -1
- package/lib/components/modal/__internal__/modal.context.d.ts +8 -0
- package/lib/components/modal/__internal__/modal.context.js +9 -0
- package/lib/components/modal/index.d.ts +2 -2
- package/lib/components/modal/index.js +2 -9
- package/lib/components/modal/modal.component.d.ts +2 -8
- package/lib/components/modal/modal.component.js +8 -3
- package/{esm/components/navigation-bar → lib/components/navigation-bar/__internal__}/fixed-navigation-bar.context.d.ts +1 -1
- package/lib/components/navigation-bar/{fixed-navigation-bar.context.js → __internal__/fixed-navigation-bar.context.js} +1 -1
- package/lib/components/navigation-bar/navigation-bar.component.js +1 -1
- package/lib/components/note/note.component.js +2 -2
- package/lib/components/numeral-date/__internal__/numeral-date.context.js +9 -0
- package/lib/components/numeral-date/numeral-date.component.js +4 -4
- package/lib/components/pill/pill.style.js +7 -6
- package/lib/components/popover-container/popover-container.component.js +2 -2
- package/lib/components/portal/__internal__/portal.context.d.ts +6 -0
- package/lib/components/portal/__internal__/portal.context.js +9 -0
- package/lib/components/portal/portal.d.ts +0 -4
- package/lib/components/portal/portal.js +3 -3
- package/lib/components/portrait/portrait.component.js +2 -2
- package/lib/components/radio-button/radio-button-group/radio-button-group.component.js +2 -2
- package/lib/components/radio-button/radio-button.component.js +2 -2
- package/lib/components/select/{list-action-button → __internal__/list-action-button}/list-action-button.component.js +2 -2
- package/lib/components/select/{list-action-button → __internal__/list-action-button}/list-action-button.style.js +1 -1
- package/lib/components/select/__internal__/list-action-button/package.json +6 -0
- package/lib/components/select/__internal__/select-list/package.json +6 -0
- package/lib/components/select/{select-list → __internal__/select-list}/select-list.component.js +9 -9
- package/lib/components/select/{select-list → __internal__/select-list}/select-list.style.js +1 -1
- package/lib/components/select/__internal__/select-text/select-text.component.d.ts +0 -8
- package/lib/components/select/__internal__/select-textbox/package.json +6 -0
- package/{esm/components/select → lib/components/select/__internal__}/select-textbox/select-textbox.component.d.ts +3 -3
- package/lib/components/select/{select-textbox → __internal__/select-textbox}/select-textbox.component.js +6 -6
- package/lib/components/select/{utils → __internal__/utils}/is-expected-option.js +2 -2
- package/lib/components/select/{utils → __internal__/utils}/with-filter.hoc.js +5 -5
- package/lib/components/select/filterable-select/filterable-select.component.d.ts +1 -1
- package/lib/components/select/filterable-select/filterable-select.component.js +5 -5
- package/lib/components/select/multi-select/multi-select.component.d.ts +1 -1
- package/lib/components/select/multi-select/multi-select.component.js +6 -6
- package/lib/components/select/option/option.component.js +2 -2
- package/lib/components/select/option-row/option-row.component.js +2 -2
- package/lib/components/select/simple-select/simple-select.component.d.ts +1 -1
- package/lib/components/select/simple-select/simple-select.component.js +5 -5
- package/lib/components/sidebar/__internal__/sidebar.context.d.ts +6 -0
- package/lib/components/sidebar/__internal__/sidebar.context.js +9 -0
- package/lib/components/sidebar/index.d.ts +1 -1
- package/lib/components/sidebar/index.js +2 -9
- package/lib/components/sidebar/sidebar.component.d.ts +0 -4
- package/lib/components/sidebar/sidebar.component.js +3 -3
- package/lib/components/switch/switch.component.js +2 -2
- package/lib/components/tabs/__internal__/tab-title/index.d.ts +1 -1
- package/lib/components/tabs/__internal__/tab-title/index.js +2 -9
- package/lib/components/tabs/__internal__/tab-title/tab-title.component.d.ts +0 -4
- package/lib/components/tabs/__internal__/tab-title/tab-title.component.js +3 -3
- package/lib/components/tabs/__internal__/tab-title/tab-title.context.d.ts +6 -0
- package/lib/components/tabs/__internal__/tab-title/tab-title.context.js +9 -0
- package/lib/components/tabs/tab/__internal__/tab.context.d.ts +8 -0
- package/lib/components/tabs/tab/__internal__/tab.context.js +9 -0
- package/lib/components/tabs/tab/index.d.ts +2 -2
- package/lib/components/tabs/tab/index.js +2 -9
- package/lib/components/tabs/tab/tab.component.d.ts +0 -7
- package/lib/components/tabs/tab/tab.component.js +3 -3
- package/lib/components/tabs/tabs.component.js +2 -2
- package/lib/components/text-editor/__internal__/editor-link/editor-link.component.js +2 -2
- package/lib/components/text-editor/__internal__/editor.context.d.ts +6 -0
- package/lib/components/text-editor/__internal__/editor.context.js +9 -0
- package/lib/components/text-editor/text-editor.component.d.ts +0 -4
- package/lib/components/text-editor/text-editor.component.js +5 -5
- package/lib/components/textarea/textarea.component.js +2 -2
- package/lib/components/textbox/textbox.component.js +4 -4
- package/lib/components/tile/tile-content/tile-content.component.js +2 -2
- package/lib/components/tile/tile.component.js +2 -2
- package/lib/components/vertical-divider/vertical-divider.component.js +2 -0
- package/lib/components/vertical-menu/vertical-menu-full-screen/vertical-menu-full-screen.component.js +1 -1
- package/lib/components/vertical-menu/vertical-menu-item/__internal__/menu-item.context.d.ts +5 -0
- package/lib/components/vertical-menu/vertical-menu-item/__internal__/menu-item.context.js +11 -0
- package/lib/components/vertical-menu/vertical-menu-item/vertical-menu-item.component.js +4 -6
- package/lib/hooks/__internal__/useModalAria/useModalAria.js +2 -2
- package/package.json +1 -1
- package/esm/__spec_helper__/enzyme-snapshot-helper.js +0 -22
- package/esm/__spec_helper__/expect.d.ts +0 -8
- package/esm/__spec_helper__/expect.js +0 -28
- package/esm/__spec_helper__/index.d.ts +0 -1
- package/esm/__spec_helper__/index.js +0 -12
- package/esm/__spec_helper__/select-test-utils.d.ts +0 -3
- package/esm/__spec_helper__/select-test-utils.js +0 -39
- package/esm/__spec_helper__/test-utils.d.ts +0 -51
- package/esm/__spec_helper__/test-utils.js +0 -358
- package/esm/components/carbon-provider/top-modal-context.d.ts +0 -9
- package/lib/__spec_helper__/enzyme-snapshot-helper.js +0 -29
- package/lib/__spec_helper__/expect.d.ts +0 -8
- package/lib/__spec_helper__/expect.js +0 -30
- package/lib/__spec_helper__/index.d.ts +0 -1
- package/lib/__spec_helper__/index.js +0 -15
- package/lib/__spec_helper__/package.json +0 -6
- package/lib/__spec_helper__/select-test-utils.d.ts +0 -3
- package/lib/__spec_helper__/select-test-utils.js +0 -46
- package/lib/__spec_helper__/test-utils.d.ts +0 -51
- package/lib/__spec_helper__/test-utils.js +0 -391
- package/lib/components/carbon-provider/top-modal-context.d.ts +0 -9
- package/lib/components/card/__internal__/card-context/package.json +0 -6
- package/lib/components/select/list-action-button/package.json +0 -6
- package/lib/components/select/select-list/package.json +0 -6
- package/lib/components/select/select-textbox/package.json +0 -6
- /package/esm/__internal__/form-spacing-provider/{form-spacing-context.d.ts → form-spacing.context.d.ts} +0 -0
- /package/esm/__internal__/form-spacing-provider/{form-spacing-context.js → form-spacing.context.js} +0 -0
- /package/esm/components/action-popover/{action-popover-context.d.ts → __internal__/action-popover.context.d.ts} +0 -0
- /package/esm/components/action-popover/{action-popover-context.js → __internal__/action-popover.context.js} +0 -0
- /package/esm/components/{date-range/date-range.context.js → button-bar/__internal__/button-bar.context.js} +0 -0
- /package/esm/components/{numeral-date/numeral-date-context.js → carbon-provider/__internal__/new-validation.context.js} +0 -0
- /package/esm/components/card/__internal__/{card-context/index.js → card.context.js} +0 -0
- /package/esm/components/date-range/{date-range.context.d.ts → __internal__/date-range.context.d.ts} +0 -0
- /package/esm/components/duelling-picklist/{duelling-picklist.context.d.ts → __internal__/duelling-picklist.context.d.ts} +0 -0
- /package/esm/components/duelling-picklist/{duelling-picklist.context.js → __internal__/duelling-picklist.context.js} +0 -0
- /package/esm/components/flat-table/flat-table-row/__internal__/{flat-table-row-context.d.ts → flat-table-row.context.d.ts} +0 -0
- /package/esm/components/flat-table/flat-table-row/__internal__/{flat-table-row-context.js → flat-table-row.context.js} +0 -0
- /package/esm/components/menu/{menu.context.d.ts → __internal__/menu.context.d.ts} +0 -0
- /package/esm/components/menu/{menu.context.js → __internal__/menu.context.js} +0 -0
- /package/esm/components/numeral-date/{numeral-date-context.d.ts → __internal__/numeral-date.context.d.ts} +0 -0
- /package/esm/components/select/{list-action-button → __internal__/list-action-button}/index.d.ts +0 -0
- /package/esm/components/select/{list-action-button → __internal__/list-action-button}/index.js +0 -0
- /package/esm/components/select/{list-action-button → __internal__/list-action-button}/list-action-button.component.d.ts +0 -0
- /package/esm/components/select/{list-action-button → __internal__/list-action-button}/list-action-button.style.d.ts +0 -0
- /package/esm/components/select/{select-list → __internal__/select-list}/index.d.ts +0 -0
- /package/esm/components/select/{select-list → __internal__/select-list}/index.js +0 -0
- /package/esm/components/select/{select-list → __internal__/select-list}/select-list.component.d.ts +0 -0
- /package/esm/components/select/__internal__/{select-list-context.d.ts → select-list/select-list.context.d.ts} +0 -0
- /package/esm/components/select/__internal__/{select-list-context.js → select-list/select-list.context.js} +0 -0
- /package/esm/components/select/{select-list → __internal__/select-list}/select-list.style.d.ts +0 -0
- /package/esm/components/select/{select-textbox → __internal__/select-textbox}/index.d.ts +0 -0
- /package/esm/components/select/{select-textbox → __internal__/select-textbox}/index.js +0 -0
- /package/esm/components/select/{select-textbox/select-textbox-context.d.ts → __internal__/select-textbox/select-textbox.context.d.ts} +0 -0
- /package/esm/components/select/{select-textbox/select-textbox-context.js → __internal__/select-textbox/select-textbox.context.js} +0 -0
- /package/esm/components/select/{utils → __internal__/utils}/get-next-child-by-text.d.ts +0 -0
- /package/esm/components/select/{utils → __internal__/utils}/get-next-child-by-text.js +0 -0
- /package/esm/components/select/{utils → __internal__/utils}/get-next-index-by-key.d.ts +0 -0
- /package/esm/components/select/{utils → __internal__/utils}/get-next-index-by-key.js +0 -0
- /package/esm/components/select/{utils → __internal__/utils}/highlight-part-of-text.d.ts +0 -0
- /package/esm/components/select/{utils → __internal__/utils}/highlight-part-of-text.js +0 -0
- /package/esm/components/select/{utils → __internal__/utils}/is-expected-option.d.ts +0 -0
- /package/esm/components/select/{utils → __internal__/utils}/is-expected-value.d.ts +0 -0
- /package/esm/components/select/{utils → __internal__/utils}/is-expected-value.js +0 -0
- /package/esm/components/select/{utils → __internal__/utils}/is-navigation-key.d.ts +0 -0
- /package/esm/components/select/{utils → __internal__/utils}/is-navigation-key.js +0 -0
- /package/esm/components/select/{utils → __internal__/utils}/matching-text.style.d.ts +0 -0
- /package/esm/components/select/{utils → __internal__/utils}/matching-text.style.js +0 -0
- /package/esm/components/select/{utils → __internal__/utils}/with-filter.hoc.d.ts +0 -0
- /package/esm/components/tile/__internal__/{tile-context.d.ts → tile.context.d.ts} +0 -0
- /package/esm/components/tile/__internal__/{tile-context.js → tile.context.js} +0 -0
- /package/esm/components/vertical-menu/vertical-menu-full-screen/{vertical-menu-full-screen.context.d.ts → __internal__/vertical-menu-full-screen.context.d.ts} +0 -0
- /package/esm/components/vertical-menu/vertical-menu-full-screen/{vertical-menu-full-screen.context.js → __internal__/vertical-menu-full-screen.context.js} +0 -0
- /package/lib/__internal__/form-spacing-provider/{form-spacing-context.d.ts → form-spacing.context.d.ts} +0 -0
- /package/lib/__internal__/form-spacing-provider/{form-spacing-context.js → form-spacing.context.js} +0 -0
- /package/lib/components/action-popover/{action-popover-context.d.ts → __internal__/action-popover.context.d.ts} +0 -0
- /package/lib/components/action-popover/{action-popover-context.js → __internal__/action-popover.context.js} +0 -0
- /package/lib/components/{date-range/date-range.context.js → button-bar/__internal__/button-bar.context.js} +0 -0
- /package/lib/components/{numeral-date/numeral-date-context.js → carbon-provider/__internal__/new-validation.context.js} +0 -0
- /package/lib/components/card/__internal__/{card-context/index.js → card.context.js} +0 -0
- /package/lib/components/date-range/{date-range.context.d.ts → __internal__/date-range.context.d.ts} +0 -0
- /package/lib/components/duelling-picklist/{duelling-picklist.context.d.ts → __internal__/duelling-picklist.context.d.ts} +0 -0
- /package/lib/components/duelling-picklist/{duelling-picklist.context.js → __internal__/duelling-picklist.context.js} +0 -0
- /package/lib/components/flat-table/flat-table-row/__internal__/{flat-table-row-context.d.ts → flat-table-row.context.d.ts} +0 -0
- /package/lib/components/flat-table/flat-table-row/__internal__/{flat-table-row-context.js → flat-table-row.context.js} +0 -0
- /package/lib/components/menu/{menu.context.d.ts → __internal__/menu.context.d.ts} +0 -0
- /package/lib/components/menu/{menu.context.js → __internal__/menu.context.js} +0 -0
- /package/lib/components/numeral-date/{numeral-date-context.d.ts → __internal__/numeral-date.context.d.ts} +0 -0
- /package/lib/components/select/{list-action-button → __internal__/list-action-button}/index.d.ts +0 -0
- /package/lib/components/select/{list-action-button → __internal__/list-action-button}/index.js +0 -0
- /package/lib/components/select/{list-action-button → __internal__/list-action-button}/list-action-button.component.d.ts +0 -0
- /package/lib/components/select/{list-action-button → __internal__/list-action-button}/list-action-button.style.d.ts +0 -0
- /package/lib/components/select/{select-list → __internal__/select-list}/index.d.ts +0 -0
- /package/lib/components/select/{select-list → __internal__/select-list}/index.js +0 -0
- /package/lib/components/select/{select-list → __internal__/select-list}/select-list.component.d.ts +0 -0
- /package/lib/components/select/__internal__/{select-list-context.d.ts → select-list/select-list.context.d.ts} +0 -0
- /package/lib/components/select/__internal__/{select-list-context.js → select-list/select-list.context.js} +0 -0
- /package/lib/components/select/{select-list → __internal__/select-list}/select-list.style.d.ts +0 -0
- /package/lib/components/select/{select-textbox → __internal__/select-textbox}/index.d.ts +0 -0
- /package/lib/components/select/{select-textbox → __internal__/select-textbox}/index.js +0 -0
- /package/lib/components/select/{select-textbox/select-textbox-context.d.ts → __internal__/select-textbox/select-textbox.context.d.ts} +0 -0
- /package/lib/components/select/{select-textbox/select-textbox-context.js → __internal__/select-textbox/select-textbox.context.js} +0 -0
- /package/lib/components/select/{utils → __internal__/utils}/get-next-child-by-text.d.ts +0 -0
- /package/lib/components/select/{utils → __internal__/utils}/get-next-child-by-text.js +0 -0
- /package/lib/components/select/{utils → __internal__/utils}/get-next-index-by-key.d.ts +0 -0
- /package/lib/components/select/{utils → __internal__/utils}/get-next-index-by-key.js +0 -0
- /package/lib/components/select/{utils → __internal__/utils}/highlight-part-of-text.d.ts +0 -0
- /package/lib/components/select/{utils → __internal__/utils}/highlight-part-of-text.js +0 -0
- /package/lib/components/select/{utils → __internal__/utils}/is-expected-option.d.ts +0 -0
- /package/lib/components/select/{utils → __internal__/utils}/is-expected-value.d.ts +0 -0
- /package/lib/components/select/{utils → __internal__/utils}/is-expected-value.js +0 -0
- /package/lib/components/select/{utils → __internal__/utils}/is-navigation-key.d.ts +0 -0
- /package/lib/components/select/{utils → __internal__/utils}/is-navigation-key.js +0 -0
- /package/lib/components/select/{utils → __internal__/utils}/matching-text.style.d.ts +0 -0
- /package/lib/components/select/{utils → __internal__/utils}/matching-text.style.js +0 -0
- /package/lib/components/select/{utils → __internal__/utils}/with-filter.hoc.d.ts +0 -0
- /package/lib/components/tile/__internal__/{tile-context.d.ts → tile.context.d.ts} +0 -0
- /package/lib/components/tile/__internal__/{tile-context.js → tile.context.js} +0 -0
- /package/lib/components/vertical-menu/vertical-menu-full-screen/{vertical-menu-full-screen.context.d.ts → __internal__/vertical-menu-full-screen.context.d.ts} +0 -0
- /package/lib/components/vertical-menu/vertical-menu-full-screen/{vertical-menu-full-screen.context.js → __internal__/vertical-menu-full-screen.context.js} +0 -0
|
@@ -3,7 +3,7 @@ import React, { useContext, useEffect, useState } from "react";
|
|
|
3
3
|
import PropTypes from "prop-types";
|
|
4
4
|
import { StyledFieldset, StyledLegend, StyledLegendContent } from "./fieldset.style";
|
|
5
5
|
import ValidationIcon from "../validations/validation-icon.component";
|
|
6
|
-
import
|
|
6
|
+
import NewValidationContext from "../../components/carbon-provider/__internal__/new-validation.context";
|
|
7
7
|
import { InputGroupBehaviour, InputGroupContext } from "../input-behaviour";
|
|
8
8
|
import useFormSpacing from "../../hooks/__internal__/useFormSpacing";
|
|
9
9
|
const Fieldset = ({
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React, { useCallback, useContext, useEffect, useMemo, useRef, useState } from "react";
|
|
2
2
|
import PropTypes from "prop-types";
|
|
3
3
|
import { defaultFocusableSelectors, setElementFocus, onTabGuardFocus, trapFunction } from "./focus-trap-utils";
|
|
4
|
-
import
|
|
4
|
+
import ModalContext from "../../components/modal/__internal__/modal.context";
|
|
5
5
|
import usePrevious from "../../hooks/__internal__/usePrevious";
|
|
6
|
-
import TopModalContext from "../../components/carbon-provider/top-modal
|
|
6
|
+
import TopModalContext from "../../components/carbon-provider/__internal__/top-modal.context";
|
|
7
7
|
export const TAB_GUARD_TOP = "tab-guard-top";
|
|
8
8
|
export const TAB_GUARD_BOTTOM = "tab-guard-bottom";
|
|
9
9
|
|
|
@@ -6,7 +6,7 @@ import FormFieldStyle, { FieldLineStyle } from "./form-field.style";
|
|
|
6
6
|
import Label from "../label";
|
|
7
7
|
import FieldHelp from "../field-help";
|
|
8
8
|
import tagComponent from "../utils/helpers/tags/tags";
|
|
9
|
-
import
|
|
9
|
+
import TabContext from "../../components/tabs/tab/__internal__/tab.context";
|
|
10
10
|
import useIsAboveBreakpoint from "../../hooks/__internal__/useIsAboveBreakpoint";
|
|
11
11
|
import useFormSpacing from "../../hooks/__internal__/useFormSpacing";
|
|
12
12
|
const FormField = ({
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { FormSpacingContext } from "./form-spacing
|
|
2
|
-
export type { FormSpacingContextProps } from "./form-spacing
|
|
1
|
+
export { FormSpacingContext } from "./form-spacing.context";
|
|
2
|
+
export type { FormSpacingContextProps } from "./form-spacing.context";
|
|
3
3
|
export { default } from "./form-spacing-provider.component";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { FormSpacingContext } from "./form-spacing
|
|
1
|
+
export { FormSpacingContext } from "./form-spacing.context";
|
|
2
2
|
export { default } from "./form-spacing-provider.component";
|
|
@@ -2,7 +2,7 @@ import React, { useContext } from "react";
|
|
|
2
2
|
import PropTypes from "prop-types";
|
|
3
3
|
import InputPresentationStyle, { StyledInputPresentationContainer } from "./input-presentation.style";
|
|
4
4
|
import { InputContext, InputGroupContext } from "../input-behaviour";
|
|
5
|
-
import
|
|
5
|
+
import NewValidationContext from "../../components/carbon-provider/__internal__/new-validation.context";
|
|
6
6
|
const InputPresentation = ({
|
|
7
7
|
align,
|
|
8
8
|
borderRadius = "borderRadius050",
|
|
@@ -3,7 +3,7 @@ import React, { useEffect, useContext, useRef, useCallback } from "react";
|
|
|
3
3
|
import PropTypes from "prop-types";
|
|
4
4
|
import StyledInput from "./input.style";
|
|
5
5
|
import { InputContext, InputGroupContext } from "../input-behaviour";
|
|
6
|
-
import { SelectTextboxContext } from "../../components/select/select-textbox/select-textbox
|
|
6
|
+
import { SelectTextboxContext } from "../../components/select/__internal__/select-textbox/select-textbox.context";
|
|
7
7
|
function selectTextOnFocus(input) {
|
|
8
8
|
// setTimeout is required so the dom has a chance to place the cursor in the input
|
|
9
9
|
setTimeout(() => {
|
|
@@ -5,7 +5,7 @@ import { flip } from "@floating-ui/dom";
|
|
|
5
5
|
import useFloating from "../../hooks/__internal__/useFloating";
|
|
6
6
|
import { StyledBackdrop, StyledPopoverContent } from "./popover.style";
|
|
7
7
|
import CarbonScopedTokensProvider from "../../style/design-tokens/carbon-scoped-tokens-provider/carbon-scoped-tokens-provider.component";
|
|
8
|
-
import
|
|
8
|
+
import ModalContext from "../../components/modal/__internal__/modal.context";
|
|
9
9
|
const defaultMiddleware = [flip({
|
|
10
10
|
fallbackStrategy: "initialPlacement"
|
|
11
11
|
})];
|
|
@@ -17,7 +17,7 @@ declare const Events: {
|
|
|
17
17
|
/**
|
|
18
18
|
* Determines if event is a keyboard event
|
|
19
19
|
*/
|
|
20
|
-
isKeyboardEvent: (ev: React.SyntheticEvent | Event) => ev is KeyboardEvent |
|
|
20
|
+
isKeyboardEvent: (ev: React.SyntheticEvent | Event) => ev is React.KeyboardEvent<Element> | KeyboardEvent;
|
|
21
21
|
/**
|
|
22
22
|
* Determines if a number key along the top of the keyboard or a number key on the
|
|
23
23
|
* keypad is pressed
|
package/esm/components/action-popover/action-popover-item/action-popover-item.component.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { Alignment } from "../action-popover
|
|
2
|
+
import { Alignment } from "../__internal__/action-popover.context";
|
|
3
3
|
import { IconType } from "../../icon";
|
|
4
4
|
export interface ActionPopoverItemProps {
|
|
5
5
|
/** The text label to display for this Item */
|
|
@@ -5,7 +5,7 @@ import invariant from "invariant";
|
|
|
5
5
|
import { MenuItemIcon, SubMenuItemIcon, StyledMenuItem, StyledMenuItemInnerText, StyledMenuItemOuterContainer, StyledMenuItemWrapper } from "../action-popover.style";
|
|
6
6
|
import Events from "../../../__internal__/utils/helpers/events";
|
|
7
7
|
import createGuid from "../../../__internal__/utils/helpers/guid";
|
|
8
|
-
import ActionPopoverContext from "../action-popover
|
|
8
|
+
import ActionPopoverContext from "../__internal__/action-popover.context";
|
|
9
9
|
import ActionPopoverMenu from "../action-popover-menu/action-popover-menu.component";
|
|
10
10
|
const INTERVAL = 150;
|
|
11
11
|
function checkRef(ref) {
|
|
@@ -6,7 +6,7 @@ import { Menu } from "../action-popover.style";
|
|
|
6
6
|
import Events from "../../../__internal__/utils/helpers/events";
|
|
7
7
|
import ActionPopoverItem from "../action-popover-item/action-popover-item.component";
|
|
8
8
|
import ActionPopoverDivider from "../action-popover-divider/action-popover-divider.component";
|
|
9
|
-
import ActionPopoverContext from "../action-popover
|
|
9
|
+
import ActionPopoverContext from "../__internal__/action-popover.context";
|
|
10
10
|
const ActionPopoverMenu = /*#__PURE__*/React.forwardRef(({
|
|
11
11
|
children,
|
|
12
12
|
parentID,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { MarginProps } from "styled-system";
|
|
3
|
-
import { Alignment } from "./action-popover
|
|
3
|
+
import { Alignment } from "./__internal__/action-popover.context";
|
|
4
4
|
export interface RenderButtonProps {
|
|
5
5
|
tabIndex: number;
|
|
6
6
|
"data-element": string;
|
|
@@ -10,7 +10,7 @@ import useLocale from "../../hooks/__internal__/useLocale";
|
|
|
10
10
|
import ActionPopoverMenu from "./action-popover-menu/action-popover-menu.component";
|
|
11
11
|
import ActionPopoverItem from "./action-popover-item/action-popover-item.component";
|
|
12
12
|
import ActionPopoverDivider from "./action-popover-divider/action-popover-divider.component";
|
|
13
|
-
import ActionPopoverContext from "./action-popover
|
|
13
|
+
import ActionPopoverContext from "./__internal__/action-popover.context";
|
|
14
14
|
import useModalManager from "../../hooks/__internal__/useModalManager";
|
|
15
15
|
const onOpenDefault = () => {};
|
|
16
16
|
const onCloseDefault = () => {};
|
|
@@ -6,7 +6,7 @@ import Icon from "../icon";
|
|
|
6
6
|
import StyledButton, { StyledButtonSubtext, StyledButtonMainText } from "./button.style";
|
|
7
7
|
import tagComponent from "../../__internal__/utils/helpers/tags/tags";
|
|
8
8
|
import { TooltipProvider } from "../../__internal__/tooltip-provider";
|
|
9
|
-
import
|
|
9
|
+
import ButtonBarContext from "../button-bar/__internal__/button-bar.context";
|
|
10
10
|
import SplitButtonContext from "../split-button/__internal__/split-button.context";
|
|
11
11
|
function renderChildren({
|
|
12
12
|
/* eslint-disable react/prop-types */
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface ButtonBarContextProps {
|
|
3
|
+
/** Apply fullWidth style to the button bar */
|
|
4
|
+
fullWidth?: boolean;
|
|
5
|
+
/** Defines an Icon position for buttons: "before" | "after" */
|
|
6
|
+
iconPosition?: "before" | "after";
|
|
7
|
+
/** Assigns a size to the buttons: "small" | "medium" | "large" */
|
|
8
|
+
size?: "small" | "medium" | "large";
|
|
9
|
+
/** Color variants for new business themes: "primary" | "secondary" | "tertiary" | "darkBackground" */
|
|
10
|
+
buttonType?: "primary" | "secondary" | "primary";
|
|
11
|
+
}
|
|
12
|
+
declare const _default: React.Context<ButtonBarContextProps>;
|
|
13
|
+
export default _default;
|
|
@@ -1,20 +1,10 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { SpaceProps } from "styled-system";
|
|
3
|
-
|
|
4
|
-
/** Apply fullWidth style to the button bar */
|
|
5
|
-
fullWidth?: boolean;
|
|
6
|
-
/** Defines an Icon position for buttons: "before" | "after" */
|
|
7
|
-
iconPosition?: "before" | "after";
|
|
8
|
-
/** Assigns a size to the buttons: "small" | "medium" | "large" */
|
|
9
|
-
size?: "small" | "medium" | "large";
|
|
10
|
-
/** Color variants for new business themes: "primary" | "secondary" | "tertiary" | "darkBackground" */
|
|
11
|
-
buttonType?: "primary" | "secondary" | "primary";
|
|
12
|
-
}
|
|
3
|
+
import { ButtonBarContextProps } from "./__internal__/button-bar.context";
|
|
13
4
|
export interface ButtonBarProps extends ButtonBarContextProps, SpaceProps {
|
|
14
5
|
/** Button or IconButton Elements, to be rendered inside the component */
|
|
15
6
|
children: React.ReactNode;
|
|
16
7
|
}
|
|
17
|
-
export declare const ButtonBarContext: React.Context<ButtonBarContextProps>;
|
|
18
8
|
export declare const ButtonBar: {
|
|
19
9
|
({ children, size, iconPosition, fullWidth, ...rest }: ButtonBarProps): React.JSX.Element;
|
|
20
10
|
displayName: string;
|
|
@@ -2,7 +2,7 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
|
2
2
|
import React from "react";
|
|
3
3
|
import PropTypes from "prop-types";
|
|
4
4
|
import StyledButtonBar from "./button-bar.style";
|
|
5
|
-
|
|
5
|
+
import ButtonBarContext from "./__internal__/button-bar.context";
|
|
6
6
|
export const ButtonBar = ({
|
|
7
7
|
children,
|
|
8
8
|
size = "medium",
|
|
@@ -2,7 +2,7 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
|
2
2
|
import React, { useContext } from "react";
|
|
3
3
|
import PropTypes from "prop-types";
|
|
4
4
|
import StyledButtonMinor from "./button-minor.style";
|
|
5
|
-
import
|
|
5
|
+
import ButtonBarContext from "../button-bar/__internal__/button-bar.context";
|
|
6
6
|
const ButtonMinor = /*#__PURE__*/React.forwardRef(({
|
|
7
7
|
buttonType: buttonTypeProp = "secondary",
|
|
8
8
|
disabled = false,
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
declare type ButtonToggleGroupContextType = {
|
|
3
|
+
onButtonClick: (value: string) => void;
|
|
4
|
+
handleKeyDown: (ev: React.KeyboardEvent<HTMLButtonElement>) => void;
|
|
5
|
+
pressedButtonValue?: string;
|
|
6
|
+
onChange?: (ev: React.MouseEvent<HTMLButtonElement>, value?: string) => void;
|
|
7
|
+
allowDeselect?: boolean;
|
|
8
|
+
isInGroup: boolean;
|
|
9
|
+
isDisabled?: boolean;
|
|
10
|
+
firstButton?: HTMLButtonElement;
|
|
11
|
+
childButtonCallbackRef?: (button: HTMLButtonElement | null) => void;
|
|
12
|
+
/** Identifier for the hint text, if it exists, that is rendered by ButtonToggleGroup */
|
|
13
|
+
hintTextId?: string;
|
|
14
|
+
};
|
|
15
|
+
declare const _default: React.Context<ButtonToggleGroupContextType>;
|
|
16
|
+
export default _default;
|
package/esm/components/button-toggle/button-toggle-group/__internal__/button-toggle-group.context.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export default /*#__PURE__*/React.createContext({
|
|
3
|
+
onButtonClick: /* istanbul ignore next */() => {},
|
|
4
|
+
handleKeyDown: /* istanbul ignore next */() => {},
|
|
5
|
+
pressedButtonValue: undefined,
|
|
6
|
+
allowDeselect: false,
|
|
7
|
+
isInGroup: false,
|
|
8
|
+
isDisabled: false
|
|
9
|
+
});
|
|
@@ -44,20 +44,6 @@ export interface ButtonToggleGroupProps extends MarginProps, TagProps {
|
|
|
44
44
|
*/
|
|
45
45
|
className?: string;
|
|
46
46
|
}
|
|
47
|
-
declare type ButtonToggleGroupContextType = {
|
|
48
|
-
onButtonClick: (value: string) => void;
|
|
49
|
-
handleKeyDown: (ev: React.KeyboardEvent<HTMLButtonElement>) => void;
|
|
50
|
-
pressedButtonValue?: string;
|
|
51
|
-
onChange?: (ev: React.MouseEvent<HTMLButtonElement>, value?: string) => void;
|
|
52
|
-
allowDeselect?: boolean;
|
|
53
|
-
isInGroup: boolean;
|
|
54
|
-
isDisabled?: boolean;
|
|
55
|
-
firstButton?: HTMLButtonElement;
|
|
56
|
-
childButtonCallbackRef?: (button: HTMLButtonElement | null) => void;
|
|
57
|
-
/** Identifier for the hint text, if it exists, that is rendered by ButtonToggleGroup */
|
|
58
|
-
hintTextId?: string;
|
|
59
|
-
};
|
|
60
|
-
export declare const ButtonToggleGroupContext: React.Context<ButtonToggleGroupContextType>;
|
|
61
47
|
declare const ButtonToggleGroup: {
|
|
62
48
|
({ children, fieldHelp, fieldHelpInline, "aria-label": ariaLabel, label, labelHelp, labelSpacing, inputHint, inputWidth, fullWidth, labelInline, labelWidth, onChange, value, "data-component": dataComponent, "data-element": dataElement, "data-role": dataRole, helpAriaLabel, id, allowDeselect, disabled, className, ...props }: ButtonToggleGroupProps): React.JSX.Element;
|
|
63
49
|
displayName: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
-
import React, {
|
|
2
|
+
import React, { useMemo, useState, useRef, useContext } from "react";
|
|
3
3
|
import PropTypes from "prop-types";
|
|
4
4
|
import invariant from "invariant";
|
|
5
5
|
import FormField from "../../../__internal__/form-field";
|
|
@@ -10,16 +10,9 @@ import { filterStyledSystemMarginProps } from "../../../style/utils";
|
|
|
10
10
|
import { TooltipProvider } from "../../../__internal__/tooltip-provider";
|
|
11
11
|
import { InputGroupBehaviour } from "../../../__internal__/input-behaviour";
|
|
12
12
|
import Events from "../../../__internal__/utils/helpers/events";
|
|
13
|
-
import
|
|
13
|
+
import NewValidationContext from "../../carbon-provider/__internal__/new-validation.context";
|
|
14
|
+
import ButtonToggleGroupContext from "./__internal__/button-toggle-group.context";
|
|
14
15
|
const BUTTON_TOGGLE_SELECTOR = '[data-element="button-toggle-button"]';
|
|
15
|
-
export const ButtonToggleGroupContext = /*#__PURE__*/createContext({
|
|
16
|
-
onButtonClick: /* istanbul ignore next */() => {},
|
|
17
|
-
handleKeyDown: /* istanbul ignore next */() => {},
|
|
18
|
-
pressedButtonValue: undefined,
|
|
19
|
-
allowDeselect: false,
|
|
20
|
-
isInGroup: false,
|
|
21
|
-
isDisabled: false
|
|
22
|
-
});
|
|
23
16
|
const ButtonToggleGroup = ({
|
|
24
17
|
children,
|
|
25
18
|
fieldHelp,
|
|
@@ -4,7 +4,7 @@ import PropTypes from "prop-types";
|
|
|
4
4
|
import invariant from "invariant";
|
|
5
5
|
import { StyledButtonToggle, StyledButtonToggleWrapper } from "./button-toggle.style";
|
|
6
6
|
import guid from "../../__internal__/utils/helpers/guid";
|
|
7
|
-
import
|
|
7
|
+
import ButtonToggleGroupContext from "./button-toggle-group/__internal__/button-toggle-group.context";
|
|
8
8
|
import ButtonToggleIcon from "./button-toggle-icon.component";
|
|
9
9
|
import Logger from "../../__internal__/utils/logger";
|
|
10
10
|
import { InputGroupContext } from "../../__internal__/input-behaviour";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface NewValidationContextProps {
|
|
3
|
+
/** Feature flag for opting in to the latest validation designs for components that support it.
|
|
4
|
+
*
|
|
5
|
+
* NOTE - Will eventually be set to `true` by default in the future. */
|
|
6
|
+
validationRedesignOptIn?: boolean;
|
|
7
|
+
/** Feature flag for opting out of styling components to have rounded corners.
|
|
8
|
+
*
|
|
9
|
+
* NOTE - Will eventually be set to `false` by default in the future. */
|
|
10
|
+
roundedCornersOptOut?: boolean;
|
|
11
|
+
focusRedesignOptOut?: boolean;
|
|
12
|
+
}
|
|
13
|
+
declare const _default: React.Context<NewValidationContextProps>;
|
|
14
|
+
export default _default;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import React, {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export const TopModalContextProvider = ({
|
|
1
|
+
import React, { useState, useEffect, useRef } from "react";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
|
+
import TopModalContext from "./top-modal.context";
|
|
4
|
+
export const TopModalProvider = ({
|
|
6
5
|
children
|
|
7
6
|
}) => {
|
|
8
7
|
const [topModal, setTopModal] = useState(null);
|
|
@@ -28,4 +27,4 @@ export const TopModalContextProvider = ({
|
|
|
28
27
|
}
|
|
29
28
|
}, children);
|
|
30
29
|
};
|
|
31
|
-
export default
|
|
30
|
+
export default TopModalProvider;
|
|
@@ -1,17 +1,10 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import type { ThemeObject } from "../../style/themes";
|
|
3
|
-
|
|
3
|
+
import { NewValidationContextProps } from "./__internal__/new-validation.context";
|
|
4
|
+
export interface CarbonProviderProps extends NewValidationContextProps {
|
|
4
5
|
children: React.ReactNode;
|
|
5
6
|
/** Theme which specifies styles to apply to all child components. Set to `sageTheme` by default. */
|
|
6
7
|
theme?: Partial<ThemeObject>;
|
|
7
|
-
/** Feature flag for opting in to the new validation redesign for components that support it.
|
|
8
|
-
*
|
|
9
|
-
* NOTE - Will eventually be set to `true` by default in the future. */
|
|
10
|
-
validationRedesignOptIn?: boolean;
|
|
11
|
-
/** Feature flag for opting out of styling components to have rounded corners. */
|
|
12
|
-
roundedCornersOptOut?: boolean;
|
|
13
|
-
focusRedesignOptOut?: boolean;
|
|
14
8
|
}
|
|
15
|
-
export declare const NewValidationContext: React.Context<Pick<CarbonProviderProps, "validationRedesignOptIn" | "roundedCornersOptOut" | "focusRedesignOptOut">>;
|
|
16
9
|
export declare const CarbonProvider: ({ children, theme, validationRedesignOptIn, roundedCornersOptOut, focusRedesignOptOut, }: CarbonProviderProps) => React.JSX.Element;
|
|
17
10
|
export default CarbonProvider;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, { useContext } from "react";
|
|
2
2
|
import PropTypes from "prop-types";
|
|
3
3
|
import { ThemeProvider } from "styled-components";
|
|
4
4
|
import CarbonScopedTokensProvider from "../../style/design-tokens/carbon-scoped-tokens-provider";
|
|
5
5
|
import { sageTheme } from "../../style/themes";
|
|
6
|
-
import
|
|
7
|
-
|
|
6
|
+
import NewValidationContext from "./__internal__/new-validation.context";
|
|
7
|
+
import TopModalProvider from "./__internal__/top-modal-provider.component";
|
|
8
8
|
export const CarbonProvider = ({
|
|
9
9
|
children,
|
|
10
10
|
theme = sageTheme,
|
|
@@ -29,6 +29,6 @@ export const CarbonProvider = ({
|
|
|
29
29
|
validationRedesignOptIn,
|
|
30
30
|
roundedCornersOptOut: roundedCornersOptOutValue
|
|
31
31
|
}
|
|
32
|
-
}, /*#__PURE__*/React.createElement(
|
|
32
|
+
}, /*#__PURE__*/React.createElement(TopModalProvider, null, children))));
|
|
33
33
|
};
|
|
34
34
|
export default CarbonProvider;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { CardSpacing } from "
|
|
2
|
+
import { CardSpacing } from "../card.config";
|
|
3
3
|
export interface CardContextProps {
|
|
4
4
|
/** Sets the level of roundness of the corners, "default" is 8px and "large" is 16px */
|
|
5
5
|
roundness?: "default" | "large";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { SpaceProps } from "styled-system";
|
|
3
|
-
import { CardContextProps } from "../__internal__/card
|
|
3
|
+
import { CardContextProps } from "../__internal__/card.context";
|
|
4
4
|
import { TagProps } from "../../../__internal__/utils/helpers/tags/tags";
|
|
5
5
|
export interface CardFooterProps extends SpaceProps, Pick<CardContextProps, "roundness">, Pick<TagProps, "data-element" | "data-role"> {
|
|
6
6
|
/** Child nodes */
|
|
@@ -3,7 +3,7 @@ import React, { useContext } from "react";
|
|
|
3
3
|
import PropTypes from "prop-types";
|
|
4
4
|
import { filterStyledSystemMarginProps, filterStyledSystemPaddingProps } from "../../../style/utils";
|
|
5
5
|
import StyledCardFooter from "./card-footer.style";
|
|
6
|
-
import CardContext from "../__internal__/card
|
|
6
|
+
import CardContext from "../__internal__/card.context";
|
|
7
7
|
import tagComponent from "../../../__internal__/utils/helpers/tags/tags";
|
|
8
8
|
const CardFooter = ({
|
|
9
9
|
children,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SpaceProps } from "styled-system";
|
|
2
|
-
import { CardContextProps } from "../__internal__/card
|
|
2
|
+
import { CardContextProps } from "../__internal__/card.context";
|
|
3
3
|
import { CardFooterProps } from "./card-footer.component";
|
|
4
4
|
export interface StyledCardFooterProps extends SpaceProps {
|
|
5
5
|
/** Specify styling variant to render */
|
|
@@ -4,7 +4,7 @@ import PropTypes from "prop-types";
|
|
|
4
4
|
import { filterStyledSystemPaddingProps } from "../../../style/utils";
|
|
5
5
|
import StyledCardRow from "./card-row.style";
|
|
6
6
|
import tagComponent from "../../../__internal__/utils/helpers/tags/tags";
|
|
7
|
-
import CardContext from "../__internal__/card
|
|
7
|
+
import CardContext from "../__internal__/card.context";
|
|
8
8
|
import guid from "../../../__internal__/utils/helpers/guid";
|
|
9
9
|
const CardRow = ({
|
|
10
10
|
children,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { MarginProps } from "styled-system";
|
|
3
3
|
import * as DesignTokens from "@sage/design-tokens/js/base/common";
|
|
4
|
-
import { CardContextProps } from "./__internal__/card
|
|
4
|
+
import { CardContextProps } from "./__internal__/card.context";
|
|
5
5
|
import { TagProps } from "../../__internal__/utils/helpers/tags/tags";
|
|
6
6
|
declare type DesignTokensType = keyof typeof DesignTokens;
|
|
7
7
|
declare type BoxShadowsType = Extract<DesignTokensType, `boxShadow${string}`>;
|
|
@@ -2,7 +2,7 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
|
2
2
|
import React, { useState } from "react";
|
|
3
3
|
import PropTypes from "prop-types";
|
|
4
4
|
import { filterStyledSystemMarginProps } from "../../style/utils";
|
|
5
|
-
import CardContext from "./__internal__/card
|
|
5
|
+
import CardContext from "./__internal__/card.context";
|
|
6
6
|
import { StyledCard, StyledCardContent } from "./card.style";
|
|
7
7
|
import Icon from "../icon";
|
|
8
8
|
import tagComponent from "../../__internal__/utils/helpers/tags/tags";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MarginProps } from "styled-system";
|
|
2
2
|
import * as DesignTokens from "@sage/design-tokens/js/base/common";
|
|
3
|
-
import { CardContextProps } from "./__internal__/card
|
|
3
|
+
import { CardContextProps } from "./__internal__/card.context";
|
|
4
4
|
import { CardProps } from "./card.component";
|
|
5
5
|
export declare const paddingSizes: {
|
|
6
6
|
small: string;
|
|
@@ -30,7 +30,6 @@ export interface CheckboxGroupProps extends ValidationProps, MarginProps {
|
|
|
30
30
|
/** When true, Checkboxes are in line */
|
|
31
31
|
inline?: boolean;
|
|
32
32
|
}
|
|
33
|
-
export declare const CheckboxGroupContext: React.Context<ValidationProps>;
|
|
34
33
|
export declare const CheckboxGroup: {
|
|
35
34
|
(props: CheckboxGroupProps): React.JSX.Element;
|
|
36
35
|
displayName: string;
|
|
@@ -7,11 +7,11 @@ import Fieldset from "../../../__internal__/fieldset";
|
|
|
7
7
|
import { filterStyledSystemMarginProps } from "../../../style/utils";
|
|
8
8
|
import { TooltipProvider } from "../../../__internal__/tooltip-provider";
|
|
9
9
|
import FormSpacingProvider from "../../../__internal__/form-spacing-provider";
|
|
10
|
-
import
|
|
10
|
+
import NewValidationContext from "../../carbon-provider/__internal__/new-validation.context";
|
|
11
11
|
import ValidationMessage from "../../../__internal__/validation-message/validation-message.component";
|
|
12
12
|
import Box from "../../box";
|
|
13
13
|
import { ErrorBorder } from "../../textbox/textbox.style";
|
|
14
|
-
|
|
14
|
+
import CheckboxGroupContext from "./__internal__/checkbox-group.context";
|
|
15
15
|
export const CheckboxGroup = props => {
|
|
16
16
|
const {
|
|
17
17
|
validationRedesignOptIn
|
|
@@ -6,10 +6,10 @@ import CheckableInput from "../../__internal__/checkable-input/checkable-input.c
|
|
|
6
6
|
import CheckboxSvg from "./checkbox-svg.component";
|
|
7
7
|
import useIsAboveBreakpoint from "../../hooks/__internal__/useIsAboveBreakpoint";
|
|
8
8
|
import { TooltipProvider } from "../../__internal__/tooltip-provider";
|
|
9
|
-
import
|
|
9
|
+
import CheckboxGroupContext from "./checkbox-group/__internal__/checkbox-group.context";
|
|
10
10
|
import Logger from "../../__internal__/utils/logger";
|
|
11
11
|
import useFormSpacing from "../../hooks/__internal__/useFormSpacing";
|
|
12
|
-
import
|
|
12
|
+
import NewValidationContext from "../carbon-provider/__internal__/new-validation.context";
|
|
13
13
|
let deprecateUncontrolledWarnTriggered = false;
|
|
14
14
|
const Checkbox = /*#__PURE__*/React.forwardRef(({
|
|
15
15
|
"aria-labelledby": ariaLabelledBy,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { TextboxProps } from "../textbox";
|
|
3
3
|
import { PickerProps } from "./__internal__/date-picker";
|
|
4
|
-
import { InputName } from "../date-range/date-range.context";
|
|
4
|
+
import { InputName } from "../date-range/__internal__/date-range.context";
|
|
5
5
|
export interface DateChangeEvent {
|
|
6
6
|
target: {
|
|
7
7
|
id?: string;
|
|
@@ -9,7 +9,7 @@ import getFormatData from "./__internal__/date-formats";
|
|
|
9
9
|
import StyledDateInput from "./date.style";
|
|
10
10
|
import Textbox from "../textbox";
|
|
11
11
|
import DatePicker from "./__internal__/date-picker";
|
|
12
|
-
import DateRangeContext from "../date-range/date-range.context";
|
|
12
|
+
import DateRangeContext from "../date-range/__internal__/date-range.context";
|
|
13
13
|
import useClickAwayListener from "../../hooks/__internal__/useClickAwayListener";
|
|
14
14
|
import useFormSpacing from "../../hooks/__internal__/useFormSpacing";
|
|
15
15
|
import guid from "../../__internal__/utils/helpers/guid";
|
|
@@ -10,7 +10,7 @@ import Events from "../../__internal__/utils/helpers/events";
|
|
|
10
10
|
import useLocale from "../../hooks/__internal__/useLocale";
|
|
11
11
|
import usePrevious from "../../hooks/__internal__/usePrevious";
|
|
12
12
|
import getFormatData from "../date/__internal__/date-formats";
|
|
13
|
-
import DateRangeContext from "./date-range.context";
|
|
13
|
+
import DateRangeContext from "./__internal__/date-range.context";
|
|
14
14
|
export const DateRange = ({
|
|
15
15
|
endDateProps = {},
|
|
16
16
|
id,
|
|
@@ -10,7 +10,7 @@ export interface ContentPaddingInterface {
|
|
|
10
10
|
py?: PaddingValues;
|
|
11
11
|
px?: PaddingValues;
|
|
12
12
|
}
|
|
13
|
-
export interface DialogProps extends ModalProps, TagProps {
|
|
13
|
+
export interface DialogProps extends ModalProps, Omit<TagProps, "data-component"> {
|
|
14
14
|
/** Custom class name */
|
|
15
15
|
className?: string;
|
|
16
16
|
/** Prop to specify the aria-describedby property of the Dialog component */
|