carbon-react 150.1.0 → 151.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__/form-field/form-field.component.d.ts +2 -0
- package/esm/__internal__/utils/helpers/tags/tags.d.ts +11 -3
- package/esm/components/accordion/accordion-group/accordion-group.component.d.ts +1 -1
- package/esm/components/accordion/accordion-group/accordion-group.component.js +2 -3
- package/esm/components/accordion/accordion.component.d.ts +2 -1
- package/esm/components/accordion/accordion.component.js +4 -3
- package/esm/components/action-popover/action-popover.component.d.ts +2 -1
- package/esm/components/action-popover/action-popover.component.js +4 -3
- package/esm/components/advanced-color-picker/advanced-color-picker.component.d.ts +3 -2
- package/esm/components/advanced-color-picker/advanced-color-picker.component.js +2 -3
- package/esm/components/alert/alert.component.d.ts +1 -1
- package/esm/components/alert/alert.component.js +3 -2
- package/esm/components/anchor-navigation/anchor-navigation.component.d.ts +1 -1
- package/esm/components/badge/badge.component.d.ts +3 -2
- package/esm/components/badge/badge.component.js +5 -2
- package/esm/components/batch-selection/batch-selection.component.d.ts +3 -2
- package/esm/components/batch-selection/batch-selection.component.js +5 -2
- package/esm/components/box/box.component.d.ts +2 -0
- package/esm/components/breadcrumbs/breadcrumbs.component.js +2 -4
- package/esm/components/breadcrumbs/crumb/crumb.component.js +1 -2
- package/esm/components/button/button.component.js +0 -1
- package/esm/components/button-bar/button-bar.component.d.ts +2 -1
- package/esm/components/button-bar/button-bar.component.js +2 -1
- package/esm/components/button-minor/button-minor.component.js +0 -1
- package/esm/components/button-toggle/button-toggle-group/button-toggle-group.component.d.ts +3 -1
- package/esm/components/button-toggle/button-toggle-group/button-toggle-group.component.js +2 -10
- package/esm/components/button-toggle/button-toggle.component.d.ts +4 -7
- package/esm/components/checkbox/checkbox-group/checkbox-group.component.d.ts +2 -1
- package/esm/components/checkbox/checkbox-group/checkbox-group.component.js +1 -1
- package/esm/components/checkbox/checkbox.component.d.ts +2 -7
- package/esm/components/checkbox/checkbox.component.js +7 -7
- package/esm/components/confirm/confirm.component.d.ts +1 -1
- package/esm/components/confirm/confirm.component.js +3 -2
- package/esm/components/content/content.component.d.ts +2 -1
- package/esm/components/content/content.component.js +2 -3
- package/esm/components/date/date.component.d.ts +1 -1
- package/esm/components/date/date.component.js +7 -7
- package/esm/components/decimal/decimal.component.d.ts +1 -1
- package/esm/components/decimal/decimal.component.js +2 -2
- package/esm/components/definition-list/dd/dd.component.d.ts +2 -1
- package/esm/components/definition-list/dd/dd.component.js +2 -1
- package/esm/components/definition-list/dl.component.d.ts +2 -1
- package/esm/components/definition-list/dl.component.js +2 -3
- package/esm/components/definition-list/dt/dt.component.d.ts +2 -1
- package/esm/components/definition-list/dt/dt.component.js +2 -1
- package/esm/components/dialog/dialog.component.d.ts +2 -0
- package/esm/components/dialog-full-screen/dialog-full-screen.component.js +1 -6
- package/esm/components/dismissible-box/dismissible-box.component.d.ts +1 -1
- package/esm/components/dismissible-box/dismissible-box.component.js +1 -2
- package/esm/components/draggable/__internal__/drop-target.component.d.ts +1 -1
- package/esm/components/draggable/__internal__/drop-target.component.js +3 -7
- package/esm/components/draggable/draggable-container.component.d.ts +1 -1
- package/esm/components/draggable/draggable-item/draggable-item.component.d.ts +3 -2
- package/esm/components/draggable/draggable-item/draggable-item.component.js +9 -3
- package/esm/components/drawer/drawer.component.d.ts +1 -1
- package/esm/components/duelling-picklist/duelling-picklist.component.d.ts +2 -1
- package/esm/components/duelling-picklist/duelling-picklist.component.js +3 -4
- package/esm/components/fieldset/fieldset.component.d.ts +2 -1
- package/esm/components/fieldset/fieldset.component.js +2 -2
- package/esm/components/file-input/file-input.component.d.ts +1 -1
- package/esm/components/flat-table/flat-table-body/flat-table-body.component.d.ts +1 -1
- package/esm/components/flat-table/flat-table-body-draggable/flat-table-body-draggable.component.d.ts +1 -1
- package/esm/components/flat-table/flat-table-cell/flat-table-cell.component.d.ts +1 -1
- package/esm/components/flat-table/flat-table-head/flat-table-head.component.d.ts +1 -1
- package/esm/components/flat-table/flat-table-header/flat-table-header.component.d.ts +1 -1
- package/esm/components/flat-table/flat-table-row/flat-table-row.component.d.ts +1 -1
- package/esm/components/flat-table/flat-table-row-header/flat-table-row-header.component.d.ts +1 -1
- package/esm/components/flat-table/flat-table.component.d.ts +1 -1
- package/esm/components/flat-table/sort/sort.component.d.ts +1 -1
- package/esm/components/form/form.component.d.ts +2 -1
- package/esm/components/form/form.component.js +2 -1
- package/esm/components/global-header/global-header.component.d.ts +2 -1
- package/esm/components/grid/grid-container/grid-container.component.d.ts +2 -1
- package/esm/components/grid/grid-container/grid-container.component.js +2 -3
- package/esm/components/grid/grid-item/grid-item.component.d.ts +2 -1
- package/esm/components/grid/grid-item/grid-item.component.js +2 -1
- package/esm/components/grouped-character/grouped-character.component.d.ts +1 -1
- package/esm/components/grouped-character/grouped-character.component.js +2 -2
- package/esm/components/heading/heading.component.js +1 -5
- package/esm/components/help/help.component.d.ts +2 -1
- package/esm/components/help/help.component.js +5 -4
- package/esm/components/hr/hr.component.d.ts +2 -1
- package/esm/components/hr/hr.component.js +4 -3
- package/esm/components/icon/icon.component.d.ts +1 -1
- package/esm/components/icon-button/icon-button.component.d.ts +4 -1
- package/esm/components/icon-button/icon-button.component.js +5 -1
- package/esm/components/image/image.component.js +2 -1
- package/esm/components/image/image.style.d.ts +2 -1
- package/esm/components/inline-inputs/inline-inputs.component.d.ts +2 -1
- package/esm/components/inline-inputs/inline-inputs.component.js +2 -3
- package/esm/components/link/link.component.d.ts +2 -1
- package/esm/components/link/link.component.js +2 -0
- package/esm/components/link-preview/link-preview.component.d.ts +2 -1
- package/esm/components/link-preview/link-preview.component.js +2 -2
- package/esm/components/loader-star/loader-star.component.d.ts +1 -1
- package/esm/components/menu/menu-divider/menu-divider.component.js +0 -1
- package/esm/components/menu/menu-full-screen/menu-full-screen.component.d.ts +1 -1
- package/esm/components/menu/menu-item/menu-item.component.d.ts +1 -1
- package/esm/components/menu/menu-segment-title/menu-segment-title.component.js +0 -1
- package/esm/components/menu/scrollable-block/scrollable-block.component.js +2 -2
- package/esm/components/message/message.component.d.ts +2 -1
- package/esm/components/message/message.component.js +2 -0
- package/esm/components/modal/modal.component.d.ts +1 -1
- package/esm/components/navigation-bar/navigation-bar.component.d.ts +2 -1
- package/esm/components/navigation-bar/navigation-bar.component.js +4 -2
- package/esm/components/note/note.component.d.ts +2 -1
- package/esm/components/note/note.component.js +2 -3
- package/esm/components/number/number.component.js +2 -1
- package/esm/components/numeral-date/numeral-date.component.d.ts +3 -8
- package/esm/components/numeral-date/numeral-date.component.js +3 -11
- package/esm/components/pager/pager.component.d.ts +2 -1
- package/esm/components/pager/pager.component.js +2 -3
- package/esm/components/pages/page/page.component.d.ts +2 -1
- package/esm/components/pages/pages.component.d.ts +2 -1
- package/esm/components/pages/pages.component.js +1 -1
- package/esm/components/password/password.component.d.ts +1 -2
- package/esm/components/password/password.component.js +2 -2
- package/esm/components/pill/pill.component.d.ts +2 -5
- package/esm/components/pill/pill.component.js +2 -3
- package/esm/components/pod/pod.component.d.ts +2 -5
- package/esm/components/pod/pod.component.js +3 -7
- package/esm/components/popover-container/popover-container.component.d.ts +1 -1
- package/esm/components/popover-container/popover-container.component.js +4 -4
- package/esm/components/portrait/portrait.component.d.ts +1 -1
- package/esm/components/preview/preview.component.d.ts +2 -1
- package/esm/components/preview/preview.component.js +2 -2
- package/esm/components/profile/profile.component.d.ts +2 -1
- package/esm/components/progress-tracker/progress-tracker.component.d.ts +2 -1
- package/esm/components/radio-button/radio-button-group/radio-button-group.component.d.ts +2 -1
- package/esm/components/radio-button/radio-button.component.d.ts +2 -7
- package/esm/components/radio-button/radio-button.component.js +7 -7
- package/esm/components/search/search.component.d.ts +2 -1
- package/esm/components/search/search.component.js +4 -3
- package/esm/components/select/__internal__/select-textbox/select-textbox.component.d.ts +1 -1
- package/esm/components/select/__internal__/select-textbox/select-textbox.component.js +0 -1
- package/esm/components/select/filterable-select/filterable-select.component.d.ts +0 -6
- package/esm/components/select/filterable-select/filterable-select.component.js +3 -4
- package/esm/components/select/multi-select/multi-select.component.d.ts +0 -6
- package/esm/components/select/multi-select/multi-select.component.js +3 -4
- package/esm/components/select/option/option.component.d.ts +1 -1
- package/esm/components/select/option-group-header/option-group-header.component.d.ts +1 -1
- package/esm/components/select/option-row/option-row.component.d.ts +1 -1
- package/esm/components/select/simple-select/simple-select.component.d.ts +0 -6
- package/esm/components/select/simple-select/simple-select.component.js +3 -4
- package/esm/components/settings-row/settings-row.component.d.ts +2 -1
- package/esm/components/sidebar/sidebar.component.d.ts +2 -2
- package/esm/components/simple-color-picker/simple-color-picker.component.d.ts +2 -1
- package/esm/components/simple-color-picker/simple-color-picker.component.js +2 -0
- package/esm/components/split-button/split-button.component.d.ts +2 -5
- package/esm/components/step-flow/step-flow.component.js +0 -1
- package/esm/components/step-sequence/step-sequence-item/step-sequence-item.component.d.ts +2 -1
- package/esm/components/step-sequence/step-sequence-item/step-sequence-item.component.js +2 -2
- package/esm/components/step-sequence/step-sequence.component.d.ts +2 -1
- package/esm/components/step-sequence/step-sequence.component.js +2 -2
- package/esm/components/switch/switch.component.d.ts +2 -7
- package/esm/components/switch/switch.component.js +4 -5
- package/esm/components/tabs/tab/tab.component.d.ts +2 -1
- package/esm/components/tabs/tab/tab.component.js +1 -1
- package/esm/components/tabs/tabs.component.d.ts +2 -1
- package/esm/components/tabs/tabs.component.js +2 -3
- package/esm/components/textarea/textarea.component.d.ts +2 -7
- package/esm/components/textarea/textarea.component.js +5 -6
- package/esm/components/textbox/textbox.component.d.ts +4 -7
- package/esm/components/tile/flex-tile-divider/flex-tile-divider.component.js +1 -0
- package/esm/components/tile-select/tile-select-group/tile-select-group.component.d.ts +2 -1
- package/esm/components/tile-select/tile-select.component.d.ts +2 -1
- package/esm/components/tile-select/tile-select.component.js +8 -1
- package/esm/components/time/__internal__/time-toggle/time-toggle.component.d.ts +4 -4
- package/esm/components/time/time.component.d.ts +2 -2
- package/esm/components/toast/toast.component.d.ts +1 -3
- package/esm/components/toast/toast.component.js +3 -2
- package/esm/components/tooltip/tooltip.component.d.ts +2 -1
- package/esm/components/tooltip/tooltip.component.js +2 -0
- package/esm/components/typography/typography.component.d.ts +2 -0
- package/esm/components/vertical-divider/vertical-divider.component.d.ts +2 -1
- package/esm/components/vertical-divider/vertical-divider.component.js +4 -2
- package/lib/__internal__/form-field/form-field.component.d.ts +2 -0
- package/lib/__internal__/utils/helpers/tags/tags.d.ts +11 -3
- package/lib/components/accordion/accordion-group/accordion-group.component.d.ts +1 -1
- package/lib/components/accordion/accordion-group/accordion-group.component.js +2 -3
- package/lib/components/accordion/accordion.component.d.ts +2 -1
- package/lib/components/accordion/accordion.component.js +4 -3
- package/lib/components/action-popover/action-popover.component.d.ts +2 -1
- package/lib/components/action-popover/action-popover.component.js +4 -3
- package/lib/components/advanced-color-picker/advanced-color-picker.component.d.ts +3 -2
- package/lib/components/advanced-color-picker/advanced-color-picker.component.js +2 -3
- package/lib/components/alert/alert.component.d.ts +1 -1
- package/lib/components/alert/alert.component.js +3 -2
- package/lib/components/anchor-navigation/anchor-navigation.component.d.ts +1 -1
- package/lib/components/badge/badge.component.d.ts +3 -2
- package/lib/components/badge/badge.component.js +5 -2
- package/lib/components/batch-selection/batch-selection.component.d.ts +3 -2
- package/lib/components/batch-selection/batch-selection.component.js +5 -2
- package/lib/components/box/box.component.d.ts +2 -0
- package/lib/components/breadcrumbs/breadcrumbs.component.js +2 -4
- package/lib/components/breadcrumbs/crumb/crumb.component.js +1 -2
- package/lib/components/button/button.component.js +0 -1
- package/lib/components/button-bar/button-bar.component.d.ts +2 -1
- package/lib/components/button-bar/button-bar.component.js +2 -1
- package/lib/components/button-minor/button-minor.component.js +0 -1
- package/lib/components/button-toggle/button-toggle-group/button-toggle-group.component.d.ts +3 -1
- package/lib/components/button-toggle/button-toggle-group/button-toggle-group.component.js +2 -10
- package/lib/components/button-toggle/button-toggle.component.d.ts +4 -7
- package/lib/components/checkbox/checkbox-group/checkbox-group.component.d.ts +2 -1
- package/lib/components/checkbox/checkbox-group/checkbox-group.component.js +1 -1
- package/lib/components/checkbox/checkbox.component.d.ts +2 -7
- package/lib/components/checkbox/checkbox.component.js +7 -7
- package/lib/components/confirm/confirm.component.d.ts +1 -1
- package/lib/components/confirm/confirm.component.js +3 -2
- package/lib/components/content/content.component.d.ts +2 -1
- package/lib/components/content/content.component.js +2 -3
- package/lib/components/date/date.component.d.ts +1 -1
- package/lib/components/date/date.component.js +7 -7
- package/lib/components/decimal/decimal.component.d.ts +1 -1
- package/lib/components/decimal/decimal.component.js +2 -2
- package/lib/components/definition-list/dd/dd.component.d.ts +2 -1
- package/lib/components/definition-list/dd/dd.component.js +2 -1
- package/lib/components/definition-list/dl.component.d.ts +2 -1
- package/lib/components/definition-list/dl.component.js +2 -3
- package/lib/components/definition-list/dt/dt.component.d.ts +2 -1
- package/lib/components/definition-list/dt/dt.component.js +2 -1
- package/lib/components/dialog/dialog.component.d.ts +2 -0
- package/lib/components/dialog-full-screen/dialog-full-screen.component.js +1 -6
- package/lib/components/dismissible-box/dismissible-box.component.d.ts +1 -1
- package/lib/components/dismissible-box/dismissible-box.component.js +1 -2
- package/lib/components/draggable/__internal__/drop-target.component.d.ts +1 -1
- package/lib/components/draggable/__internal__/drop-target.component.js +3 -7
- package/lib/components/draggable/draggable-container.component.d.ts +1 -1
- package/lib/components/draggable/draggable-item/draggable-item.component.d.ts +3 -2
- package/lib/components/draggable/draggable-item/draggable-item.component.js +9 -3
- package/lib/components/drawer/drawer.component.d.ts +1 -1
- package/lib/components/duelling-picklist/duelling-picklist.component.d.ts +2 -1
- package/lib/components/duelling-picklist/duelling-picklist.component.js +3 -4
- package/lib/components/fieldset/fieldset.component.d.ts +2 -1
- package/lib/components/fieldset/fieldset.component.js +2 -2
- package/lib/components/file-input/file-input.component.d.ts +1 -1
- package/lib/components/flat-table/flat-table-body/flat-table-body.component.d.ts +1 -1
- package/lib/components/flat-table/flat-table-body-draggable/flat-table-body-draggable.component.d.ts +1 -1
- package/lib/components/flat-table/flat-table-cell/flat-table-cell.component.d.ts +1 -1
- package/lib/components/flat-table/flat-table-head/flat-table-head.component.d.ts +1 -1
- package/lib/components/flat-table/flat-table-header/flat-table-header.component.d.ts +1 -1
- package/lib/components/flat-table/flat-table-row/flat-table-row.component.d.ts +1 -1
- package/lib/components/flat-table/flat-table-row-header/flat-table-row-header.component.d.ts +1 -1
- package/lib/components/flat-table/flat-table.component.d.ts +1 -1
- package/lib/components/flat-table/sort/sort.component.d.ts +1 -1
- package/lib/components/form/form.component.d.ts +2 -1
- package/lib/components/form/form.component.js +2 -1
- package/lib/components/global-header/global-header.component.d.ts +2 -1
- package/lib/components/grid/grid-container/grid-container.component.d.ts +2 -1
- package/lib/components/grid/grid-container/grid-container.component.js +2 -3
- package/lib/components/grid/grid-item/grid-item.component.d.ts +2 -1
- package/lib/components/grid/grid-item/grid-item.component.js +2 -1
- package/lib/components/grouped-character/grouped-character.component.d.ts +1 -1
- package/lib/components/grouped-character/grouped-character.component.js +2 -2
- package/lib/components/heading/heading.component.js +1 -5
- package/lib/components/help/help.component.d.ts +2 -1
- package/lib/components/help/help.component.js +5 -4
- package/lib/components/hr/hr.component.d.ts +2 -1
- package/lib/components/hr/hr.component.js +4 -3
- package/lib/components/icon/icon.component.d.ts +1 -1
- package/lib/components/icon-button/icon-button.component.d.ts +4 -1
- package/lib/components/icon-button/icon-button.component.js +5 -1
- package/lib/components/image/image.component.js +2 -1
- package/lib/components/image/image.style.d.ts +2 -1
- package/lib/components/inline-inputs/inline-inputs.component.d.ts +2 -1
- package/lib/components/inline-inputs/inline-inputs.component.js +2 -3
- package/lib/components/link/link.component.d.ts +2 -1
- package/lib/components/link/link.component.js +2 -0
- package/lib/components/link-preview/link-preview.component.d.ts +2 -1
- package/lib/components/link-preview/link-preview.component.js +2 -2
- package/lib/components/loader-star/loader-star.component.d.ts +1 -1
- package/lib/components/menu/menu-divider/menu-divider.component.js +0 -1
- package/lib/components/menu/menu-full-screen/menu-full-screen.component.d.ts +1 -1
- package/lib/components/menu/menu-item/menu-item.component.d.ts +1 -1
- package/lib/components/menu/menu-segment-title/menu-segment-title.component.js +0 -1
- package/lib/components/menu/scrollable-block/scrollable-block.component.js +2 -2
- package/lib/components/message/message.component.d.ts +2 -1
- package/lib/components/message/message.component.js +2 -0
- package/lib/components/modal/modal.component.d.ts +1 -1
- package/lib/components/navigation-bar/navigation-bar.component.d.ts +2 -1
- package/lib/components/navigation-bar/navigation-bar.component.js +4 -2
- package/lib/components/note/note.component.d.ts +2 -1
- package/lib/components/note/note.component.js +2 -3
- package/lib/components/number/number.component.js +2 -1
- package/lib/components/numeral-date/numeral-date.component.d.ts +3 -8
- package/lib/components/numeral-date/numeral-date.component.js +3 -11
- package/lib/components/pager/pager.component.d.ts +2 -1
- package/lib/components/pager/pager.component.js +2 -3
- package/lib/components/pages/page/page.component.d.ts +2 -1
- package/lib/components/pages/pages.component.d.ts +2 -1
- package/lib/components/pages/pages.component.js +1 -1
- package/lib/components/password/password.component.d.ts +1 -2
- package/lib/components/password/password.component.js +2 -2
- package/lib/components/pill/pill.component.d.ts +2 -5
- package/lib/components/pill/pill.component.js +2 -3
- package/lib/components/pod/pod.component.d.ts +2 -5
- package/lib/components/pod/pod.component.js +3 -7
- package/lib/components/popover-container/popover-container.component.d.ts +1 -1
- package/lib/components/popover-container/popover-container.component.js +4 -4
- package/lib/components/portrait/portrait.component.d.ts +1 -1
- package/lib/components/preview/preview.component.d.ts +2 -1
- package/lib/components/preview/preview.component.js +2 -2
- package/lib/components/profile/profile.component.d.ts +2 -1
- package/lib/components/progress-tracker/progress-tracker.component.d.ts +2 -1
- package/lib/components/radio-button/radio-button-group/radio-button-group.component.d.ts +2 -1
- package/lib/components/radio-button/radio-button.component.d.ts +2 -7
- package/lib/components/radio-button/radio-button.component.js +7 -7
- package/lib/components/search/search.component.d.ts +2 -1
- package/lib/components/search/search.component.js +4 -3
- package/lib/components/select/__internal__/select-textbox/select-textbox.component.d.ts +1 -1
- package/lib/components/select/__internal__/select-textbox/select-textbox.component.js +0 -1
- package/lib/components/select/filterable-select/filterable-select.component.d.ts +0 -6
- package/lib/components/select/filterable-select/filterable-select.component.js +3 -4
- package/lib/components/select/multi-select/multi-select.component.d.ts +0 -6
- package/lib/components/select/multi-select/multi-select.component.js +3 -4
- package/lib/components/select/option/option.component.d.ts +1 -1
- package/lib/components/select/option-group-header/option-group-header.component.d.ts +1 -1
- package/lib/components/select/option-row/option-row.component.d.ts +1 -1
- package/lib/components/select/simple-select/simple-select.component.d.ts +0 -6
- package/lib/components/select/simple-select/simple-select.component.js +3 -4
- package/lib/components/settings-row/settings-row.component.d.ts +2 -1
- package/lib/components/sidebar/sidebar.component.d.ts +2 -2
- package/lib/components/simple-color-picker/simple-color-picker.component.d.ts +2 -1
- package/lib/components/simple-color-picker/simple-color-picker.component.js +2 -0
- package/lib/components/split-button/split-button.component.d.ts +2 -5
- package/lib/components/step-flow/step-flow.component.js +0 -1
- package/lib/components/step-sequence/step-sequence-item/step-sequence-item.component.d.ts +2 -1
- package/lib/components/step-sequence/step-sequence-item/step-sequence-item.component.js +2 -2
- package/lib/components/step-sequence/step-sequence.component.d.ts +2 -1
- package/lib/components/step-sequence/step-sequence.component.js +2 -2
- package/lib/components/switch/switch.component.d.ts +2 -7
- package/lib/components/switch/switch.component.js +4 -5
- package/lib/components/tabs/tab/tab.component.d.ts +2 -1
- package/lib/components/tabs/tab/tab.component.js +1 -1
- package/lib/components/tabs/tabs.component.d.ts +2 -1
- package/lib/components/tabs/tabs.component.js +2 -3
- package/lib/components/textarea/textarea.component.d.ts +2 -7
- package/lib/components/textarea/textarea.component.js +5 -6
- package/lib/components/textbox/textbox.component.d.ts +4 -7
- package/lib/components/tile/flex-tile-divider/flex-tile-divider.component.js +1 -0
- package/lib/components/tile-select/tile-select-group/tile-select-group.component.d.ts +2 -1
- package/lib/components/tile-select/tile-select.component.d.ts +2 -1
- package/lib/components/tile-select/tile-select.component.js +8 -1
- package/lib/components/time/__internal__/time-toggle/time-toggle.component.d.ts +4 -4
- package/lib/components/time/time.component.d.ts +2 -2
- package/lib/components/toast/toast.component.d.ts +1 -3
- package/lib/components/toast/toast.component.js +3 -2
- package/lib/components/tooltip/tooltip.component.d.ts +2 -1
- package/lib/components/tooltip/tooltip.component.js +2 -0
- package/lib/components/typography/typography.component.d.ts +2 -0
- package/lib/components/vertical-divider/vertical-divider.component.d.ts +2 -1
- package/lib/components/vertical-divider/vertical-divider.component.js +4 -2
- package/package.json +1 -1
|
@@ -61,6 +61,8 @@ export interface FormFieldProps extends CommonFormFieldProps, TagProps {
|
|
|
61
61
|
useValidationIcon?: boolean;
|
|
62
62
|
/** String value for max-width of `field-line` element */
|
|
63
63
|
maxWidth?: string;
|
|
64
|
+
/** @private @internal @ignore */
|
|
65
|
+
"data-component"?: string;
|
|
64
66
|
}
|
|
65
67
|
declare const FormField: {
|
|
66
68
|
({ maxWidth, children, "data-component": dataComponent, disabled, loading, fieldHelp: fieldHelpContent, fieldHelpInline, error, warning, info, tooltipId, fieldHelpId, label, labelId, labelAlign, labelHelp, labelHelpIcon, labelInline, labelSpacing, labelWidth, labelAs, id, reverse, isOptional, useValidationIcon, adaptiveLabelBreakpoint, isRequired, validationIconId, validationRedesignOptIn, ...rest }: FormFieldProps): React.JSX.Element;
|
|
@@ -2,15 +2,23 @@ interface RestProps {
|
|
|
2
2
|
[restKeys: string]: any;
|
|
3
3
|
}
|
|
4
4
|
export interface TagProps {
|
|
5
|
-
/** @private @ignore Identifier used for testing purposes, applied to the root element of the component. */
|
|
6
|
-
"data-component"?: string;
|
|
7
5
|
/** Identifier used for testing purposes, applied to the root element of the component. */
|
|
8
6
|
"data-element"?: string;
|
|
9
7
|
/** Identifier used for testing purposes, applied to the root element of the component. */
|
|
10
8
|
"data-role"?: string;
|
|
11
9
|
}
|
|
10
|
+
interface InternalTagProps extends TagProps {
|
|
11
|
+
/**
|
|
12
|
+
* @private
|
|
13
|
+
* @internal
|
|
14
|
+
* @ignore
|
|
15
|
+
* Identifier used for testing purposes, applied to the root element of the component.
|
|
16
|
+
* INTERNAL USE ONLY.
|
|
17
|
+
*/
|
|
18
|
+
"data-component"?: string;
|
|
19
|
+
}
|
|
12
20
|
/**
|
|
13
21
|
* Builds props object containing top level data tags
|
|
14
22
|
*/
|
|
15
|
-
declare function tagComponent(componentName: string | undefined, props: TagProps & RestProps):
|
|
23
|
+
declare function tagComponent(componentName: string | undefined, props: TagProps & RestProps): InternalTagProps;
|
|
16
24
|
export default tagComponent;
|
|
@@ -4,7 +4,7 @@ import { TagProps } from "../../../__internal__/utils/helpers/tags";
|
|
|
4
4
|
declare type AccordionGroupChild = React.ReactElement | boolean | null | undefined | AccordionGroupChildArray;
|
|
5
5
|
interface AccordionGroupChildArray extends Array<AccordionGroupChild> {
|
|
6
6
|
}
|
|
7
|
-
export interface AccordionGroupProps extends MarginProps,
|
|
7
|
+
export interface AccordionGroupProps extends MarginProps, TagProps {
|
|
8
8
|
/** An Accordion or list of Accordion components to be rendered inside the AccordionGroup */
|
|
9
9
|
children?: AccordionGroupChild;
|
|
10
10
|
}
|
|
@@ -5,6 +5,7 @@ import invariant from "invariant";
|
|
|
5
5
|
import Events from "../../../__internal__/utils/helpers/events";
|
|
6
6
|
import Accordion from "../accordion.component";
|
|
7
7
|
import { StyledAccordionGroup } from "../accordion.style";
|
|
8
|
+
import tagComponent from "../../../__internal__/utils/helpers/tags";
|
|
8
9
|
|
|
9
10
|
// typescript-to-proptypes breaks on recursive type references so it has to be an interface
|
|
10
11
|
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
@@ -51,9 +52,7 @@ export const AccordionGroup = ({
|
|
|
51
52
|
focusAccordion(ev, refs.length - 1);
|
|
52
53
|
}
|
|
53
54
|
}, [focusAccordion, refs]);
|
|
54
|
-
return /*#__PURE__*/React.createElement(StyledAccordionGroup, _extends({}, rest,
|
|
55
|
-
"data-component": "accordion-group"
|
|
56
|
-
}), filteredChildren.map((child, index) =>
|
|
55
|
+
return /*#__PURE__*/React.createElement(StyledAccordionGroup, _extends({}, rest, tagComponent("accordion-group", rest)), filteredChildren.map((child, index) =>
|
|
57
56
|
/*#__PURE__*/
|
|
58
57
|
// casted to ReactElement as there is no overload for an FunctionComponentElement in cloneElement
|
|
59
58
|
React.cloneElement(child, {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { SpaceProps } from "styled-system";
|
|
3
|
+
import { TagProps } from "../../__internal__/utils/helpers/tags";
|
|
3
4
|
import { StyledAccordionContainerProps } from "./accordion.style";
|
|
4
|
-
export interface AccordionProps extends StyledAccordionContainerProps, SpaceProps {
|
|
5
|
+
export interface AccordionProps extends StyledAccordionContainerProps, SpaceProps, TagProps {
|
|
5
6
|
/** Content of the Accordion component */
|
|
6
7
|
children?: React.ReactNode;
|
|
7
8
|
/** Set the default state of expansion of the Accordion if component is meant to be used as uncontrolled */
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
2
2
|
import React, { useState, useRef, useEffect, useCallback } from "react";
|
|
3
3
|
import PropTypes from "prop-types";
|
|
4
|
+
import tagComponent from "../../__internal__/utils/helpers/tags";
|
|
4
5
|
import useResizeObserver from "../../hooks/__internal__/useResizeObserver";
|
|
5
6
|
import createGuid from "../../__internal__/utils/helpers/guid";
|
|
6
7
|
import Events from "../../__internal__/utils/helpers/events";
|
|
@@ -64,12 +65,10 @@ const Accordion = /*#__PURE__*/React.forwardRef(({
|
|
|
64
65
|
const getIconType = () => size === "small" || variant === "subtle" ? "chevron_down_thick" : "chevron_down";
|
|
65
66
|
return /*#__PURE__*/React.createElement(StyledAccordionContainer, _extends({
|
|
66
67
|
id: accordionId,
|
|
67
|
-
"data-component": "accordion",
|
|
68
|
-
"data-role": "accordion-container",
|
|
69
68
|
width: width,
|
|
70
69
|
borders: variant === "subtle" ? "none" : borders,
|
|
71
70
|
variant: variant
|
|
72
|
-
}, rest), /*#__PURE__*/React.createElement(StyledAccordionTitleContainer, _extends({
|
|
71
|
+
}, rest, tagComponent("accordion", rest)), /*#__PURE__*/React.createElement(StyledAccordionTitleContainer, _extends({
|
|
73
72
|
"data-element": "accordion-title-container",
|
|
74
73
|
id: headerId,
|
|
75
74
|
"aria-expanded": isExpanded,
|
|
@@ -121,6 +120,8 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
121
120
|
Accordion.propTypes = {
|
|
122
121
|
"borders": PropTypes.oneOf(["default", "full", "none"]),
|
|
123
122
|
"children": PropTypes.node,
|
|
123
|
+
"data-element": PropTypes.string,
|
|
124
|
+
"data-role": PropTypes.string,
|
|
124
125
|
"defaultExpanded": PropTypes.bool,
|
|
125
126
|
"disableContentPadding": PropTypes.bool,
|
|
126
127
|
"error": PropTypes.string,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { MarginProps } from "styled-system";
|
|
3
|
+
import { TagProps } from "../../__internal__/utils/helpers/tags";
|
|
3
4
|
import { Alignment } from "./__internal__/action-popover.context";
|
|
4
5
|
export interface RenderButtonProps {
|
|
5
6
|
tabIndex: number;
|
|
@@ -13,7 +14,7 @@ export interface RenderButtonProps {
|
|
|
13
14
|
"aria-expanded": string;
|
|
14
15
|
};
|
|
15
16
|
}
|
|
16
|
-
export interface ActionPopoverProps extends MarginProps {
|
|
17
|
+
export interface ActionPopoverProps extends MarginProps, TagProps {
|
|
17
18
|
/** Children for popover component */
|
|
18
19
|
children?: React.ReactNode;
|
|
19
20
|
/** Horizontal alignment of menu items content */
|
|
@@ -2,6 +2,7 @@ function _extends() { return _extends = Object.assign ? Object.assign.bind() : f
|
|
|
2
2
|
import React, { useState, useCallback, useMemo, useEffect, useRef, useImperativeHandle, forwardRef } from "react";
|
|
3
3
|
import PropTypes from "prop-types";
|
|
4
4
|
import invariant from "invariant";
|
|
5
|
+
import tagComponent from "../../__internal__/utils/helpers/tags";
|
|
5
6
|
import { MenuButton, ButtonIcon, StyledButtonIcon } from "./action-popover.style";
|
|
6
7
|
import Events from "../../__internal__/utils/helpers/events";
|
|
7
8
|
import Popover from "../../__internal__/popover";
|
|
@@ -200,13 +201,11 @@ const ActionPopover = /*#__PURE__*/forwardRef(({
|
|
|
200
201
|
};
|
|
201
202
|
return /*#__PURE__*/React.createElement(MenuButton, _extends({
|
|
202
203
|
id: parentID,
|
|
203
|
-
"data-component": "action-popover-wrapper",
|
|
204
|
-
"data-role": "action-popover-wrapper",
|
|
205
204
|
onKeyDown: onButtonKeyDown,
|
|
206
205
|
onClick: onButtonClick,
|
|
207
206
|
isOpen,
|
|
208
207
|
ref: buttonRef
|
|
209
|
-
}, rest), menuButton(menuID), /*#__PURE__*/React.createElement(ActionPopoverContext.Provider, {
|
|
208
|
+
}, rest, tagComponent("action-popover-wrapper", rest)), menuButton(menuID), /*#__PURE__*/React.createElement(ActionPopoverContext.Provider, {
|
|
210
209
|
value: {
|
|
211
210
|
setOpenPopover: setOpen,
|
|
212
211
|
focusButton,
|
|
@@ -227,6 +226,8 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
227
226
|
"aria-label": PropTypes.string,
|
|
228
227
|
"aria-labelledby": PropTypes.string,
|
|
229
228
|
"children": PropTypes.node,
|
|
229
|
+
"data-element": PropTypes.string,
|
|
230
|
+
"data-role": PropTypes.string,
|
|
230
231
|
"horizontalAlignment": PropTypes.oneOf(["left", "right"]),
|
|
231
232
|
"id": PropTypes.string,
|
|
232
233
|
"m": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { MarginProps } from "styled-system";
|
|
3
3
|
import { ModalProps } from "../modal";
|
|
4
|
+
import { TagProps } from "../../__internal__/utils/helpers/tags";
|
|
4
5
|
export interface AdvancedColor {
|
|
5
6
|
label: string;
|
|
6
7
|
value: string;
|
|
7
8
|
}
|
|
8
|
-
export interface AdvancedColorPickerProps extends MarginProps, Pick<ModalProps, "restoreFocusOnClose"
|
|
9
|
+
export interface AdvancedColorPickerProps extends MarginProps, Pick<ModalProps, "restoreFocusOnClose">, TagProps {
|
|
9
10
|
/** Prop to specify the aria-describedby property of the component */
|
|
10
11
|
"aria-describedby"?: string;
|
|
11
12
|
/**
|
|
@@ -14,7 +15,7 @@ export interface AdvancedColorPickerProps extends MarginProps, Pick<ModalProps,
|
|
|
14
15
|
*/
|
|
15
16
|
"aria-label"?: string;
|
|
16
17
|
/**
|
|
17
|
-
* Prop to specify the aria-
|
|
18
|
+
* Prop to specify the aria-labelledby property of the component
|
|
18
19
|
* To be used when the title prop is a custom React Node,
|
|
19
20
|
* or the component is labelled by an internal element other than the title.
|
|
20
21
|
*/
|
|
@@ -9,6 +9,7 @@ import guid from "../../__internal__/utils/helpers/guid";
|
|
|
9
9
|
import useLocale from "../../hooks/__internal__/useLocale";
|
|
10
10
|
import { Dt, Dd } from "../definition-list";
|
|
11
11
|
import Logger from "../../__internal__/utils/logger";
|
|
12
|
+
import tagComponent from "../../__internal__/utils/helpers/tags";
|
|
12
13
|
let deprecateUncontrolledWarnTriggered = false;
|
|
13
14
|
export const AdvancedColorPicker = ({
|
|
14
15
|
"aria-describedby": ariaDescribedBy,
|
|
@@ -121,9 +122,7 @@ export const AdvancedColorPicker = ({
|
|
|
121
122
|
}
|
|
122
123
|
return /*#__PURE__*/React.createElement(StyledAdvancedColorPickerWrapper, _extends({
|
|
123
124
|
m: "15px auto auto 15px"
|
|
124
|
-
}, filterStyledSystemMarginProps(props), {
|
|
125
|
-
"data-role": "advanced-color-picker-wrapper"
|
|
126
|
-
}), /*#__PURE__*/React.createElement(StyledAdvancedColorPickerCell, {
|
|
125
|
+
}, filterStyledSystemMarginProps(props), tagComponent("advanced-color-picker", props)), /*#__PURE__*/React.createElement(StyledAdvancedColorPickerCell, {
|
|
127
126
|
"data-element": "color-picker-cell",
|
|
128
127
|
"aria-label": l.advancedColorPicker.ariaLabel(),
|
|
129
128
|
"aria-describedby": descriptionId.current,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { DialogProps } from "../dialog";
|
|
3
|
-
export declare const Alert: ({ children, size, topModalOverride, closeButtonDataProps, ...rest }: DialogProps) => React.JSX.Element;
|
|
3
|
+
export declare const Alert: ({ children, size, topModalOverride, closeButtonDataProps, ...rest }: Omit<DialogProps, "data-component">) => React.JSX.Element;
|
|
4
4
|
export default Alert;
|
|
@@ -9,10 +9,11 @@ export const Alert = ({
|
|
|
9
9
|
closeButtonDataProps,
|
|
10
10
|
...rest
|
|
11
11
|
}) => /*#__PURE__*/React.createElement(Dialog, _extends({
|
|
12
|
-
"data-component": "alert",
|
|
13
12
|
role: "alertdialog",
|
|
14
13
|
size: size,
|
|
15
14
|
topModalOverride: topModalOverride,
|
|
16
15
|
closeButtonDataProps: closeButtonDataProps
|
|
17
|
-
}, rest
|
|
16
|
+
}, rest, {
|
|
17
|
+
"data-component": "alert"
|
|
18
|
+
}), children);
|
|
18
19
|
export default Alert;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { TagProps } from "../../__internal__/utils/helpers/tags";
|
|
3
|
-
export interface AnchorNavigationProps extends
|
|
3
|
+
export interface AnchorNavigationProps extends TagProps {
|
|
4
4
|
/** Child elements */
|
|
5
5
|
children?: React.ReactNode;
|
|
6
6
|
/** The AnchorNavigationItems components to be rendered in the sticky navigation.
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
|
|
2
|
+
import { TagProps } from "../../__internal__/utils/helpers/tags";
|
|
3
|
+
export interface BadgeProps extends TagProps {
|
|
3
4
|
/** Prop to specify an aria-label for the component */
|
|
4
5
|
"aria-label"?: string;
|
|
5
6
|
/** The badge will be added to this element */
|
|
@@ -11,5 +12,5 @@ export interface BadgeProps {
|
|
|
11
12
|
/** Callback fired when badge is clicked */
|
|
12
13
|
onClick?: (ev: React.MouseEvent<HTMLElement>) => void;
|
|
13
14
|
}
|
|
14
|
-
export declare const Badge: ({ "aria-label": ariaLabel, children, counter, color, onClick, }: BadgeProps) => React.JSX.Element;
|
|
15
|
+
export declare const Badge: ({ "aria-label": ariaLabel, children, counter, color, onClick, "data-element": dataElement, "data-role": dataRole, }: BadgeProps) => React.JSX.Element;
|
|
15
16
|
export default Badge;
|
|
@@ -7,7 +7,9 @@ export const Badge = ({
|
|
|
7
7
|
children,
|
|
8
8
|
counter = 0,
|
|
9
9
|
color = "--colorsActionMajor500",
|
|
10
|
-
onClick
|
|
10
|
+
onClick,
|
|
11
|
+
"data-element": dataElement,
|
|
12
|
+
"data-role": dataRole
|
|
11
13
|
}) => {
|
|
12
14
|
const shouldDisplayCounter = +counter > 0;
|
|
13
15
|
const counterToDisplay = +counter > 99 ? 99 : counter;
|
|
@@ -22,8 +24,9 @@ export const Badge = ({
|
|
|
22
24
|
};
|
|
23
25
|
if (shouldDisplayCounter) {
|
|
24
26
|
return /*#__PURE__*/React.createElement(StyledBadge, _extends({
|
|
25
|
-
"data-role": "badge",
|
|
26
27
|
"data-component": "badge",
|
|
28
|
+
"data-element": dataElement,
|
|
29
|
+
"data-role": dataRole,
|
|
27
30
|
color: color
|
|
28
31
|
}, props, {
|
|
29
32
|
onFocus: () => {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
|
|
2
|
+
import { TagProps } from "../../__internal__/utils/helpers/tags";
|
|
3
|
+
export interface BatchSelectionProps extends TagProps {
|
|
3
4
|
/** Content to be rendered after selected count */
|
|
4
5
|
children: React.ReactNode;
|
|
5
6
|
/** Color of the background, transparent if not defined */
|
|
@@ -11,5 +12,5 @@ export interface BatchSelectionProps {
|
|
|
11
12
|
/** Number of selected elements */
|
|
12
13
|
selectedCount: number;
|
|
13
14
|
}
|
|
14
|
-
export declare const BatchSelection: ({ disabled, children, colorTheme, selectedCount, hidden, }: BatchSelectionProps) => React.JSX.Element;
|
|
15
|
+
export declare const BatchSelection: ({ disabled, children, colorTheme, selectedCount, hidden, "data-element": dataElement, "data-role": dataRole, }: BatchSelectionProps) => React.JSX.Element;
|
|
15
16
|
export default BatchSelection;
|
|
@@ -8,13 +8,16 @@ export const BatchSelection = ({
|
|
|
8
8
|
children,
|
|
9
9
|
colorTheme = "transparent",
|
|
10
10
|
selectedCount,
|
|
11
|
-
hidden
|
|
11
|
+
hidden,
|
|
12
|
+
"data-element": dataElement,
|
|
13
|
+
"data-role": dataRole
|
|
12
14
|
}) => {
|
|
13
15
|
const l = useLocale();
|
|
14
16
|
return /*#__PURE__*/React.createElement(StyledBatchSelection, {
|
|
15
17
|
colorTheme: colorTheme,
|
|
16
18
|
"data-component": "batch-selection",
|
|
17
|
-
"data-
|
|
19
|
+
"data-element": dataElement,
|
|
20
|
+
"data-role": dataRole,
|
|
18
21
|
disabled: disabled,
|
|
19
22
|
hidden: hidden
|
|
20
23
|
}, /*#__PURE__*/React.createElement(StyledSelectionCount, {
|
|
@@ -49,6 +49,8 @@ export interface BoxProps extends FlexboxProps, Omit<GridProps, "gridGap" | "gri
|
|
|
49
49
|
opacity?: string | number;
|
|
50
50
|
/** Set the container to be hidden from screen readers */
|
|
51
51
|
"aria-hidden"?: "true" | "false";
|
|
52
|
+
/** @private @internal @ignore */
|
|
53
|
+
"data-component"?: string;
|
|
52
54
|
}
|
|
53
55
|
export declare const Box: React.ForwardRefExoticComponent<BoxProps & React.RefAttributes<HTMLDivElement>>;
|
|
54
56
|
export default Box;
|
|
@@ -17,15 +17,13 @@ const Breadcrumbs = /*#__PURE__*/React.forwardRef(({
|
|
|
17
17
|
}
|
|
18
18
|
}, /*#__PURE__*/React.createElement(StyledBreadcrumbs, _extends({
|
|
19
19
|
ref: ref,
|
|
20
|
-
role: "navigation"
|
|
21
|
-
}, tagComponent("breadcrumbs", rest), {
|
|
20
|
+
role: "navigation",
|
|
22
21
|
"aria-label": l.breadcrumbs.ariaLabel()
|
|
23
|
-
}, rest), /*#__PURE__*/React.createElement("ol", null, children)));
|
|
22
|
+
}, rest, tagComponent("breadcrumbs", rest)), /*#__PURE__*/React.createElement("ol", null, children)));
|
|
24
23
|
});
|
|
25
24
|
if (process.env.NODE_ENV !== "production") {
|
|
26
25
|
Breadcrumbs.propTypes = {
|
|
27
26
|
"children": PropTypes.node,
|
|
28
|
-
"data-component": PropTypes.string,
|
|
29
27
|
"data-element": PropTypes.string,
|
|
30
28
|
"data-role": PropTypes.string,
|
|
31
29
|
"isDarkBackground": PropTypes.bool,
|
|
@@ -19,7 +19,7 @@ const Crumb = /*#__PURE__*/React.forwardRef(({
|
|
|
19
19
|
isCurrent: isCurrent,
|
|
20
20
|
"aria-current": isCurrent ? "page" : undefined,
|
|
21
21
|
isDarkBackground: isDarkBackground
|
|
22
|
-
}, tagComponent("crumb", rest),
|
|
22
|
+
}, rest, tagComponent("crumb", rest), !isCurrent && {
|
|
23
23
|
href,
|
|
24
24
|
onClick
|
|
25
25
|
}), children), !isCurrent && /*#__PURE__*/React.createElement(Divider, {
|
|
@@ -84,7 +84,6 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
84
84
|
"aria-valuenow": PropTypes.number,
|
|
85
85
|
"aria-valuetext": PropTypes.string,
|
|
86
86
|
"children": PropTypes.node,
|
|
87
|
-
"data-component": PropTypes.string,
|
|
88
87
|
"data-element": PropTypes.string,
|
|
89
88
|
"data-role": PropTypes.string,
|
|
90
89
|
"hasFocus": PropTypes.bool,
|
|
@@ -177,7 +177,6 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
177
177
|
"buttonType": PropTypes.oneOf(["darkBackground", "gradient-grey", "gradient-white", "primary", "secondary", "tertiary"]),
|
|
178
178
|
"children": PropTypes.node,
|
|
179
179
|
"className": PropTypes.string,
|
|
180
|
-
"data-component": PropTypes.string,
|
|
181
180
|
"data-element": PropTypes.string,
|
|
182
181
|
"data-role": PropTypes.string,
|
|
183
182
|
"destructive": PropTypes.bool,
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { SpaceProps } from "styled-system";
|
|
3
3
|
import { ButtonBarContextProps } from "./__internal__/button-bar.context";
|
|
4
|
-
|
|
4
|
+
import { TagProps } from "../../__internal__/utils/helpers/tags";
|
|
5
|
+
export interface ButtonBarProps extends ButtonBarContextProps, SpaceProps, TagProps {
|
|
5
6
|
/** Button or IconButton Elements, to be rendered inside the component */
|
|
6
7
|
children: React.ReactNode;
|
|
7
8
|
}
|
|
@@ -3,13 +3,14 @@ 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
|
+
import tagComponent from "../../__internal__/utils/helpers/tags";
|
|
6
7
|
export const ButtonBar = ({
|
|
7
8
|
children,
|
|
8
9
|
size = "medium",
|
|
9
10
|
iconPosition = "before",
|
|
10
11
|
fullWidth = false,
|
|
11
12
|
...rest
|
|
12
|
-
}) => /*#__PURE__*/React.createElement(StyledButtonBar, _extends({}, rest, {
|
|
13
|
+
}) => /*#__PURE__*/React.createElement(StyledButtonBar, _extends({}, rest, tagComponent("button-bar", rest), {
|
|
13
14
|
fullWidth: fullWidth,
|
|
14
15
|
size: size
|
|
15
16
|
}), /*#__PURE__*/React.createElement(ButtonBarContext.Provider, {
|
|
@@ -46,7 +46,6 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
46
46
|
"buttonType": PropTypes.oneOf(["darkBackground", "gradient-grey", "gradient-white", "primary", "secondary", "tertiary"]),
|
|
47
47
|
"children": PropTypes.node,
|
|
48
48
|
"className": PropTypes.string,
|
|
49
|
-
"data-component": PropTypes.string,
|
|
50
49
|
"data-element": PropTypes.string,
|
|
51
50
|
"data-role": PropTypes.string,
|
|
52
51
|
"destructive": PropTypes.bool,
|
|
@@ -38,9 +38,11 @@ export interface ButtonToggleGroupProps extends MarginProps, TagProps {
|
|
|
38
38
|
allowDeselect?: boolean;
|
|
39
39
|
/** Disable all user interaction. */
|
|
40
40
|
disabled?: boolean;
|
|
41
|
+
/** @private @internal @ignore */
|
|
42
|
+
"data-component"?: string;
|
|
41
43
|
}
|
|
42
44
|
declare const ButtonToggleGroup: {
|
|
43
|
-
({ children, fieldHelp, fieldHelpInline, "aria-label": ariaLabel, label, labelHelp, labelSpacing, inputHint, inputWidth, fullWidth, labelInline, labelWidth, onChange, value,
|
|
45
|
+
({ children, fieldHelp, fieldHelpInline, "aria-label": ariaLabel, label, labelHelp, labelSpacing, inputHint, inputWidth, fullWidth, labelInline, labelWidth, onChange, value, helpAriaLabel, id, allowDeselect, disabled, ...props }: ButtonToggleGroupProps): React.JSX.Element;
|
|
44
46
|
displayName: string;
|
|
45
47
|
};
|
|
46
48
|
export default ButtonToggleGroup;
|
|
@@ -3,6 +3,7 @@ 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";
|
|
6
|
+
import tagComponent from "../../../__internal__/utils/helpers/tags";
|
|
6
7
|
import guid from "../../../__internal__/utils/helpers/guid";
|
|
7
8
|
import StyledButtonToggleGroup from "./button-toggle-group.style";
|
|
8
9
|
import { ButtonToggle } from "..";
|
|
@@ -29,9 +30,6 @@ const ButtonToggleGroup = ({
|
|
|
29
30
|
labelWidth,
|
|
30
31
|
onChange,
|
|
31
32
|
value,
|
|
32
|
-
"data-component": dataComponent = "button-toggle-group",
|
|
33
|
-
"data-element": dataElement,
|
|
34
|
-
"data-role": dataRole,
|
|
35
33
|
helpAriaLabel,
|
|
36
34
|
id,
|
|
37
35
|
allowDeselect,
|
|
@@ -111,13 +109,10 @@ const ButtonToggleGroup = ({
|
|
|
111
109
|
labelInline: computeLabelPropValues(labelInline),
|
|
112
110
|
labelWidth: computeLabelPropValues(labelWidth),
|
|
113
111
|
labelId: labelId.current,
|
|
114
|
-
"data-component": dataComponent,
|
|
115
|
-
"data-role": dataRole,
|
|
116
|
-
"data-element": dataElement,
|
|
117
112
|
id: id,
|
|
118
113
|
labelAs: "span",
|
|
119
114
|
disabled: disabled
|
|
120
|
-
}, filterStyledSystemMarginProps(props)), /*#__PURE__*/React.createElement(ButtonToggleGroupContext.Provider, {
|
|
115
|
+
}, filterStyledSystemMarginProps(props), tagComponent(props["data-component"] ?? "button-toggle-group", props)), /*#__PURE__*/React.createElement(ButtonToggleGroupContext.Provider, {
|
|
121
116
|
value: {
|
|
122
117
|
onButtonClick,
|
|
123
118
|
handleKeyDown,
|
|
@@ -145,9 +140,6 @@ const ButtonToggleGroup = ({
|
|
|
145
140
|
inputWidth: inputWidth,
|
|
146
141
|
fullWidth: fullWidth,
|
|
147
142
|
role: "group",
|
|
148
|
-
"data-component": dataComponent,
|
|
149
|
-
"data-role": dataRole,
|
|
150
|
-
"data-element": dataElement,
|
|
151
143
|
id: id,
|
|
152
144
|
disabled: disabled
|
|
153
145
|
}), children)))));
|
|
@@ -1,18 +1,13 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { StyledButtonToggleProps } from "./button-toggle.style";
|
|
3
|
-
|
|
3
|
+
import { TagProps } from "../../__internal__/utils/helpers/tags";
|
|
4
|
+
export interface ButtonToggleProps extends Partial<StyledButtonToggleProps>, TagProps {
|
|
4
5
|
/** Prop to specify the aria-label of the component */
|
|
5
6
|
"aria-label"?: string;
|
|
6
7
|
/** Prop to specify the aria-labelledby property of the component */
|
|
7
8
|
"aria-labelledby"?: string;
|
|
8
9
|
/** Text to display for the button. */
|
|
9
10
|
children?: React.ReactNode;
|
|
10
|
-
/** Identifier used for testing purposes, applied to the root element of the component. */
|
|
11
|
-
"data-component"?: string;
|
|
12
|
-
/** Identifier used for testing purposes, applied to the root element of the component. */
|
|
13
|
-
"data-element"?: string;
|
|
14
|
-
/** Identifier used for testing purposes, applied to the root element of the component. */
|
|
15
|
-
"data-role"?: string;
|
|
16
11
|
/** Callback triggered by blur event on the button. */
|
|
17
12
|
onBlur?: (ev: React.FocusEvent<HTMLButtonElement>) => void;
|
|
18
13
|
/** Callback triggered by focus event on the button. */
|
|
@@ -23,6 +18,8 @@ export interface ButtonToggleProps extends Partial<StyledButtonToggleProps> {
|
|
|
23
18
|
pressed?: boolean;
|
|
24
19
|
/** An optional string by which to identify the button in either an onClick handler, or an onChange handler on the parent ButtonToggleGroup. */
|
|
25
20
|
value?: string;
|
|
21
|
+
/** @private @internal @ignore */
|
|
22
|
+
"data-component"?: string;
|
|
26
23
|
}
|
|
27
24
|
export declare const ButtonToggle: {
|
|
28
25
|
({ "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, buttonIcon, buttonIconSize, children, "data-component": dataComponent, "data-element": dataElement, "data-role": dataRole, disabled, onBlur, onFocus, onClick, pressed, size, value, }: ButtonToggleProps): React.JSX.Element;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { MarginProps } from "styled-system";
|
|
3
|
+
import { TagProps } from "../../../__internal__/utils/helpers/tags/tags";
|
|
3
4
|
import { ValidationProps } from "../../../__internal__/validations";
|
|
4
|
-
export interface CheckboxGroupProps extends ValidationProps, MarginProps {
|
|
5
|
+
export interface CheckboxGroupProps extends ValidationProps, MarginProps, TagProps {
|
|
5
6
|
/**
|
|
6
7
|
* Unique identifier for the component.
|
|
7
8
|
* Will use a randomly generated GUID if none is provided.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
2
2
|
import React, { useContext, useRef } from "react";
|
|
3
3
|
import PropTypes from "prop-types";
|
|
4
|
-
import tagComponent from "../../../__internal__/utils/helpers/tags/tags";
|
|
5
4
|
import StyledCheckboxGroup from "./checkbox-group.style";
|
|
5
|
+
import tagComponent from "../../../__internal__/utils/helpers/tags/tags";
|
|
6
6
|
import Fieldset from "../../../__internal__/fieldset";
|
|
7
7
|
import { filterStyledSystemMarginProps } from "../../../style/utils";
|
|
8
8
|
import { TooltipProvider } from "../../../__internal__/tooltip-provider";
|
|
@@ -1,17 +1,12 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { MarginProps } from "styled-system";
|
|
3
|
+
import { TagProps } from "../../__internal__/utils/helpers/tags";
|
|
3
4
|
import { CommonCheckableInputProps } from "../../__internal__/checkable-input/checkable-input.component";
|
|
4
|
-
export interface CheckboxProps extends CommonCheckableInputProps, MarginProps {
|
|
5
|
+
export interface CheckboxProps extends CommonCheckableInputProps, MarginProps, TagProps {
|
|
5
6
|
/** Breakpoint for adaptive spacing (left margin changes to 0). Enables the adaptive behaviour when set */
|
|
6
7
|
adaptiveSpacingBreakpoint?: number;
|
|
7
8
|
/** Prop to specify the aria-labelledby property of the input */
|
|
8
9
|
"aria-labelledby"?: string;
|
|
9
|
-
/** Identifier used for testing purposes, applied to the root element of the component. */
|
|
10
|
-
"data-component"?: string;
|
|
11
|
-
/** Identifier used for testing purposes, applied to the root element of the component. */
|
|
12
|
-
"data-element"?: string;
|
|
13
|
-
/** Identifier used for testing purposes, applied to the root element of the component. */
|
|
14
|
-
"data-role"?: string;
|
|
15
10
|
/** [Legacy] Aria label for rendered help component */
|
|
16
11
|
helpAriaLabel?: string;
|
|
17
12
|
/** When true label is inline */
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
2
2
|
import React, { useContext } from "react";
|
|
3
3
|
import PropTypes from "prop-types";
|
|
4
|
+
import tagComponent from "../../__internal__/utils/helpers/tags";
|
|
4
5
|
import CheckboxStyle from "./checkbox.style";
|
|
5
6
|
import CheckableInput from "../../__internal__/checkable-input/checkable-input.component";
|
|
6
7
|
import CheckboxSvg from "./checkbox-svg.component";
|
|
@@ -40,7 +41,6 @@ const Checkbox = /*#__PURE__*/React.forwardRef(({
|
|
|
40
41
|
inputWidth,
|
|
41
42
|
size,
|
|
42
43
|
tooltipPosition,
|
|
43
|
-
"data-component": dataComponent = "checkbox",
|
|
44
44
|
"data-element": dataElement,
|
|
45
45
|
"data-role": dataRole,
|
|
46
46
|
helpAriaLabel,
|
|
@@ -86,7 +86,8 @@ const Checkbox = /*#__PURE__*/React.forwardRef(({
|
|
|
86
86
|
inputWidth,
|
|
87
87
|
labelWidth,
|
|
88
88
|
ref,
|
|
89
|
-
...rest
|
|
89
|
+
...rest,
|
|
90
|
+
"data-component": undefined
|
|
90
91
|
};
|
|
91
92
|
const validationProps = {
|
|
92
93
|
error: contextError || error,
|
|
@@ -99,9 +100,6 @@ const Checkbox = /*#__PURE__*/React.forwardRef(({
|
|
|
99
100
|
};
|
|
100
101
|
const marginProps = useFormSpacing(rest);
|
|
101
102
|
const componentToRender = /*#__PURE__*/React.createElement(CheckboxStyle, _extends({
|
|
102
|
-
"data-component": dataComponent,
|
|
103
|
-
"data-role": dataRole,
|
|
104
|
-
"data-element": dataElement,
|
|
105
103
|
disabled: disabled,
|
|
106
104
|
labelSpacing: labelSpacing,
|
|
107
105
|
inputWidth: inputWidth,
|
|
@@ -111,7 +109,10 @@ const Checkbox = /*#__PURE__*/React.forwardRef(({
|
|
|
111
109
|
reverse: reverse,
|
|
112
110
|
size: size,
|
|
113
111
|
applyNewValidation: validationRedesignOptIn
|
|
114
|
-
}, marginProps
|
|
112
|
+
}, marginProps, tagComponent("checkbox", {
|
|
113
|
+
"data-element": dataElement,
|
|
114
|
+
"data-role": dataRole
|
|
115
|
+
})), /*#__PURE__*/React.createElement(CheckableInput, _extends({}, inputProps, validationProps), /*#__PURE__*/React.createElement(CheckboxSvg, null)));
|
|
115
116
|
return /*#__PURE__*/React.createElement(React.Fragment, null, validationRedesignOptIn ? componentToRender : /*#__PURE__*/React.createElement(TooltipProvider, {
|
|
116
117
|
helpAriaLabel: helpAriaLabel,
|
|
117
118
|
tooltipPosition: tooltipPosition
|
|
@@ -245,7 +246,6 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
245
246
|
"dangerouslySetInnerHTML": PropTypes.shape({
|
|
246
247
|
"__html": PropTypes.oneOfType([PropTypes.object, PropTypes.string]).isRequired
|
|
247
248
|
}),
|
|
248
|
-
"data-component": PropTypes.string,
|
|
249
249
|
"data-element": PropTypes.string,
|
|
250
250
|
"data-role": PropTypes.string,
|
|
251
251
|
"datatype": PropTypes.string,
|
|
@@ -2,7 +2,7 @@ import React from "react";
|
|
|
2
2
|
import { DialogProps } from "../dialog";
|
|
3
3
|
import { IconType } from "../icon";
|
|
4
4
|
import { TagProps } from "../../__internal__/utils/helpers/tags";
|
|
5
|
-
export interface ConfirmProps extends Omit<DialogProps, "className" | "disableFocusTrap" | "bespokeFocusTrap" | "focusableSelectors" | "help" | "role" | "contentPadding" | "focusableContainers" | "ariaRole" | "timeout" | "enableBackgroundUI" | "disableClose"> {
|
|
5
|
+
export interface ConfirmProps extends Omit<DialogProps, "className" | "disableFocusTrap" | "bespokeFocusTrap" | "focusableSelectors" | "help" | "role" | "contentPadding" | "focusableContainers" | "ariaRole" | "timeout" | "enableBackgroundUI" | "disableClose" | "data-component"> {
|
|
6
6
|
/** Color variants for new business themes: "primary" | "secondary" | "tertiary" | "darkBackground" */
|
|
7
7
|
cancelButtonType?: "primary" | "secondary" | "tertiary" | "darkBackground";
|
|
8
8
|
/** Color variants for new business themes: "primary" | "secondary" | "tertiary" | "darkBackground" */
|
|
@@ -113,11 +113,12 @@ export const Confirm = ({
|
|
|
113
113
|
disableClose: disableCancel,
|
|
114
114
|
subtitle: subtitle,
|
|
115
115
|
title: getTitle(),
|
|
116
|
-
"data-component": "confirm",
|
|
117
116
|
role: "alertdialog",
|
|
118
117
|
size: size,
|
|
119
118
|
showCloseIcon: showCloseIcon,
|
|
120
119
|
topModalOverride: topModalOverride
|
|
121
|
-
}, ariaProps, rest
|
|
120
|
+
}, ariaProps, rest, {
|
|
121
|
+
"data-component": "confirm"
|
|
122
|
+
}), children, /*#__PURE__*/React.createElement(StyledConfirmButtons, null, renderCancelButton(), renderConfirmButton()));
|
|
122
123
|
};
|
|
123
124
|
export default Confirm;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { StyledContentProps, StyledContentTitleProps, StyledContentBodyProps } from "./content.style";
|
|
3
|
-
|
|
3
|
+
import { TagProps } from "../../__internal__/utils/helpers/tags";
|
|
4
|
+
export interface ContentProps extends StyledContentProps, StyledContentTitleProps, StyledContentBodyProps, TagProps {
|
|
4
5
|
/** The body of the content component */
|
|
5
6
|
children?: React.ReactNode;
|
|
6
7
|
/** The title of the content component */
|