carbon-react 150.0.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__/hint-text/hint-text.component.d.ts +25 -0
- package/esm/__internal__/hint-text/hint-text.component.js +34 -0
- package/esm/__internal__/hint-text/hint-text.style.d.ts +3 -0
- package/esm/__internal__/hint-text/hint-text.style.js +50 -0
- package/esm/__internal__/hint-text/index.d.ts +2 -0
- package/esm/__internal__/hint-text/index.js +1 -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 +7 -13
- package/esm/components/button-toggle/button-toggle-group/button-toggle-group.style.d.ts +0 -3
- package/esm/components/button-toggle/button-toggle-group/button-toggle-group.style.js +0 -12
- 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 +7 -4
- package/esm/components/checkbox/checkbox-group/checkbox-group.style.d.ts +0 -1
- package/esm/components/checkbox/checkbox-group/checkbox-group.style.js +0 -6
- 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/file-input/file-input.component.js +3 -2
- 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 +6 -12
- 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-group/radio-button-group.component.js +7 -4
- package/esm/components/radio-button/radio-button-group/radio-button-group.style.d.ts +0 -1
- package/esm/components/radio-button/radio-button-group/radio-button-group.style.js +0 -6
- 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 +11 -8
- package/esm/components/switch/switch.style.d.ts +0 -4
- package/esm/components/switch/switch.style.js +0 -12
- 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/text-editor/text-editor.component.js +5 -4
- package/esm/components/text-editor/text-editor.style.d.ts +0 -1
- package/esm/components/text-editor/text-editor.style.js +0 -10
- package/esm/components/textarea/textarea.component.d.ts +2 -7
- package/esm/components/textarea/textarea.component.js +9 -8
- package/esm/components/textbox/textbox.component.d.ts +5 -8
- package/esm/components/textbox/textbox.component.js +14 -11
- package/esm/components/textbox/textbox.style.d.ts +1 -2
- package/esm/components/textbox/textbox.style.js +1 -11
- 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/time/time.component.js +7 -5
- package/esm/components/time/time.style.d.ts +2 -5
- package/esm/components/time/time.style.js +2 -13
- 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__/hint-text/hint-text.component.d.ts +25 -0
- package/lib/__internal__/hint-text/hint-text.component.js +44 -0
- package/lib/__internal__/hint-text/hint-text.style.d.ts +3 -0
- package/lib/__internal__/hint-text/hint-text.style.js +58 -0
- package/lib/__internal__/hint-text/index.d.ts +2 -0
- package/lib/__internal__/hint-text/index.js +13 -0
- package/lib/__internal__/hint-text/package.json +6 -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 +7 -13
- package/lib/components/button-toggle/button-toggle-group/button-toggle-group.style.d.ts +0 -3
- package/lib/components/button-toggle/button-toggle-group/button-toggle-group.style.js +1 -13
- 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 +8 -5
- package/lib/components/checkbox/checkbox-group/checkbox-group.style.d.ts +0 -1
- package/lib/components/checkbox/checkbox-group/checkbox-group.style.js +1 -7
- 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/file-input/file-input.component.js +4 -3
- 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 +7 -13
- 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-group/radio-button-group.component.js +8 -5
- package/lib/components/radio-button/radio-button-group/radio-button-group.style.d.ts +0 -1
- package/lib/components/radio-button/radio-button-group/radio-button-group.style.js +1 -7
- 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 +10 -7
- package/lib/components/switch/switch.style.d.ts +0 -4
- package/lib/components/switch/switch.style.js +1 -13
- 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/text-editor/text-editor.component.js +4 -3
- package/lib/components/text-editor/text-editor.style.d.ts +0 -1
- package/lib/components/text-editor/text-editor.style.js +1 -11
- package/lib/components/textarea/textarea.component.d.ts +2 -7
- package/lib/components/textarea/textarea.component.js +10 -9
- package/lib/components/textbox/textbox.component.d.ts +5 -8
- package/lib/components/textbox/textbox.component.js +15 -12
- package/lib/components/textbox/textbox.style.d.ts +1 -2
- package/lib/components/textbox/textbox.style.js +3 -12
- 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/time/time.component.js +8 -6
- package/lib/components/time/time.style.d.ts +2 -5
- package/lib/components/time/time.style.js +3 -14
- 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
|
@@ -1,7 +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, useEffect, useContext } from "react";
|
|
3
3
|
import PropTypes from "prop-types";
|
|
4
|
-
import tagComponent from "../../__internal__/utils/helpers/tags
|
|
4
|
+
import tagComponent from "../../__internal__/utils/helpers/tags";
|
|
5
5
|
import { FieldsetStyle, StyledLegend } from "./fieldset.style";
|
|
6
6
|
import NewValidationContext from "../carbon-provider/__internal__/new-validation.context";
|
|
7
7
|
import FormSpacingProvider from "../../__internal__/form-spacing-provider";
|
|
@@ -28,7 +28,7 @@ export const Fieldset = ({
|
|
|
28
28
|
return /*#__PURE__*/React.createElement(FieldsetStyle, _extends({
|
|
29
29
|
ref: setRef,
|
|
30
30
|
newValidation: validationRedesignOptIn
|
|
31
|
-
}, tagComponent("fieldset", rest)
|
|
31
|
+
}, rest, marginProps, tagComponent("fieldset", rest)), legend && /*#__PURE__*/React.createElement(StyledLegend, {
|
|
32
32
|
"data-element": "legend",
|
|
33
33
|
isRequired: required,
|
|
34
34
|
isOptional: isOptional
|
|
@@ -4,7 +4,7 @@ import { ValidationProps } from "../../__internal__/validations";
|
|
|
4
4
|
import { InputProps } from "../../__internal__/input";
|
|
5
5
|
import { TagProps } from "../../__internal__/utils/helpers/tags";
|
|
6
6
|
import { FileUploadStatusProps } from "./__internal__/file-upload-status";
|
|
7
|
-
export interface FileInputProps extends Pick<ValidationProps, "error">, Pick<InputProps, "id" | "name" | "required">,
|
|
7
|
+
export interface FileInputProps extends Pick<ValidationProps, "error">, Pick<InputProps, "id" | "name" | "required">, TagProps, MarginProps {
|
|
8
8
|
/** Which file format(s) to accept. Will be passed to the underlying HTML input.
|
|
9
9
|
* See https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/accept */
|
|
10
10
|
accept?: string;
|
|
@@ -8,12 +8,13 @@ import useUniqueId from "../../hooks/__internal__/useUniqueId";
|
|
|
8
8
|
import useInputAccessibility from "../../hooks/__internal__/useInputAccessibility/useInputAccessibility";
|
|
9
9
|
import ValidationMessage from "../../__internal__/validation-message";
|
|
10
10
|
import { StyledHiddenFileInput, StyledFileInputPresentation } from "./file-input.style";
|
|
11
|
-
import
|
|
11
|
+
import ErrorBorder from "../textbox/textbox.style";
|
|
12
12
|
import ButtonMinor from "../button-minor";
|
|
13
13
|
import Typography from "../typography";
|
|
14
14
|
import FileUploadStatus from "./__internal__/file-upload-status";
|
|
15
15
|
import Box from "../box";
|
|
16
16
|
import useLocale from "../../hooks/__internal__/useLocale";
|
|
17
|
+
import HintText from "../../__internal__/hint-text";
|
|
17
18
|
const FileInput = /*#__PURE__*/React.forwardRef(({
|
|
18
19
|
accept,
|
|
19
20
|
buttonText,
|
|
@@ -114,7 +115,7 @@ const FileInput = /*#__PURE__*/React.forwardRef(({
|
|
|
114
115
|
|
|
115
116
|
// allow for single input that a single set of status props is provided
|
|
116
117
|
const filesUploaded = Array.isArray(uploadStatus) ? uploadStatus : [uploadStatus];
|
|
117
|
-
const input = /*#__PURE__*/React.createElement(React.Fragment, null, inputHint && /*#__PURE__*/React.createElement(
|
|
118
|
+
const input = /*#__PURE__*/React.createElement(React.Fragment, null, inputHint && /*#__PURE__*/React.createElement(HintText, null, inputHint), /*#__PURE__*/React.createElement(Box, {
|
|
118
119
|
position: "relative"
|
|
119
120
|
}, /*#__PURE__*/React.createElement(ValidationMessage, {
|
|
120
121
|
error: error,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { TagProps } from "../../../__internal__/utils/helpers/tags";
|
|
3
|
-
export interface FlatTableBodyProps extends
|
|
3
|
+
export interface FlatTableBodyProps extends TagProps {
|
|
4
4
|
/** Array of FlatTableRow. */
|
|
5
5
|
children: React.ReactNode;
|
|
6
6
|
}
|
package/esm/components/flat-table/flat-table-body-draggable/flat-table-body-draggable.component.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { TagProps } from "../../../__internal__/utils/helpers/tags";
|
|
3
|
-
export interface FlatTableBodyDraggableProps extends
|
|
3
|
+
export interface FlatTableBodyDraggableProps extends TagProps {
|
|
4
4
|
/** Array of FlatTableRow. */
|
|
5
5
|
children: React.ReactNode;
|
|
6
6
|
/** Callback fired when order is changed */
|
|
@@ -2,7 +2,7 @@ import React from "react";
|
|
|
2
2
|
import { PaddingProps } from "styled-system";
|
|
3
3
|
import { TableBorderSize, TableCellAlign } from "..";
|
|
4
4
|
import { TagProps } from "../../../__internal__/utils/helpers/tags";
|
|
5
|
-
export interface FlatTableCellProps extends PaddingProps,
|
|
5
|
+
export interface FlatTableCellProps extends PaddingProps, TagProps {
|
|
6
6
|
/** Content alignment */
|
|
7
7
|
align?: TableCellAlign;
|
|
8
8
|
/** Cell content */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { TagProps } from "../../../__internal__/utils/helpers/tags";
|
|
3
|
-
export interface FlatTableHeadProps extends
|
|
3
|
+
export interface FlatTableHeadProps extends TagProps {
|
|
4
4
|
/** Array of FlatTableRow. */
|
|
5
5
|
children: React.ReactNode;
|
|
6
6
|
}
|
|
@@ -2,7 +2,7 @@ import React from "react";
|
|
|
2
2
|
import { PaddingProps } from "styled-system";
|
|
3
3
|
import { TagProps } from "../../../__internal__/utils/helpers/tags";
|
|
4
4
|
import { TableBorderSize, TableCellAlign } from "..";
|
|
5
|
-
export interface FlatTableHeaderProps extends PaddingProps,
|
|
5
|
+
export interface FlatTableHeaderProps extends PaddingProps, TagProps {
|
|
6
6
|
/** Content alignment */
|
|
7
7
|
align?: TableCellAlign;
|
|
8
8
|
/** If true sets alternative background color */
|
|
@@ -2,7 +2,7 @@ import React from "react";
|
|
|
2
2
|
import { TagProps } from "../../../__internal__/utils/helpers/tags";
|
|
3
3
|
import { TableBorderSize } from "..";
|
|
4
4
|
import { FlatTableRowDraggableProps } from "./__internal__/flat-table-row-draggable.component";
|
|
5
|
-
export interface FlatTableRowProps extends
|
|
5
|
+
export interface FlatTableRowProps extends TagProps {
|
|
6
6
|
/** Overrides default cell color, provide design token, any color from palette or any valid css color value. */
|
|
7
7
|
bgColor?: string;
|
|
8
8
|
/** Array of FlatTableHeader or FlatTableCell. FlatTableRowHeader could also be passed. */
|
package/esm/components/flat-table/flat-table-row-header/flat-table-row-header.component.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import React from "react";
|
|
|
2
2
|
import { PaddingProps } from "styled-system";
|
|
3
3
|
import { TableBorderSize, TableCellAlign } from "..";
|
|
4
4
|
import { TagProps } from "../../../__internal__/utils/helpers/tags/tags";
|
|
5
|
-
export interface FlatTableRowHeaderProps extends PaddingProps,
|
|
5
|
+
export interface FlatTableRowHeaderProps extends PaddingProps, TagProps {
|
|
6
6
|
/** Content alignment */
|
|
7
7
|
align?: TableCellAlign;
|
|
8
8
|
/** RowHeader content */
|
|
@@ -2,7 +2,7 @@ import React from "react";
|
|
|
2
2
|
import { MarginProps } from "styled-system";
|
|
3
3
|
import * as DesignTokens from "@sage/design-tokens/js/base/common";
|
|
4
4
|
import { TagProps } from "../../__internal__/utils/helpers/tags";
|
|
5
|
-
export interface FlatTableProps extends MarginProps,
|
|
5
|
+
export interface FlatTableProps extends MarginProps, TagProps {
|
|
6
6
|
/** The HTML id of the element that contains a description of this table. */
|
|
7
7
|
ariaDescribedby?: string;
|
|
8
8
|
/** A string to render as the table's caption */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { TagProps } from "../../../__internal__/utils/helpers/tags";
|
|
3
|
-
export interface SortProps extends
|
|
3
|
+
export interface SortProps extends TagProps {
|
|
4
4
|
/** if `asc` it will show `sort_up` icon, if `desc` it will show `sort_down` */
|
|
5
5
|
sortType?: "ascending" | "descending";
|
|
6
6
|
/** Callback fired when the component is clicked */
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { SpaceProps, PaddingProps } from "styled-system";
|
|
3
|
+
import { TagProps } from "../../__internal__/utils/helpers/tags";
|
|
3
4
|
import { FormButtonAlignment } from "./form.config";
|
|
4
|
-
export interface FormProps extends SpaceProps {
|
|
5
|
+
export interface FormProps extends SpaceProps, TagProps {
|
|
5
6
|
/** Alignment of buttons */
|
|
6
7
|
buttonAlignment?: FormButtonAlignment;
|
|
7
8
|
/** Child elements */
|
|
@@ -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, useRef } from "react";
|
|
3
3
|
import PropTypes from "prop-types";
|
|
4
|
+
import tagComponent from "../../__internal__/utils/helpers/tags";
|
|
4
5
|
import FormSummary from "./__internal__/form-summary.component";
|
|
5
6
|
import { StyledForm, StyledFormContent, StyledFormFooter, StyledLeftButtons, StyledRightButtons } from "./form.style";
|
|
6
7
|
import { formSpacing } from "./form.config";
|
|
@@ -39,7 +40,7 @@ export const Form = ({
|
|
|
39
40
|
noValidate: noValidate,
|
|
40
41
|
height: height,
|
|
41
42
|
isInModal: isInModal
|
|
42
|
-
}, rest), /*#__PURE__*/React.createElement(StyledFormContent, {
|
|
43
|
+
}, rest, tagComponent("form", rest)), /*#__PURE__*/React.createElement(StyledFormContent, {
|
|
43
44
|
"data-element": "form-content",
|
|
44
45
|
"data-role": "form-content",
|
|
45
46
|
stickyFooter: stickyFooter,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { PaddingProps, FlexboxProps } from "styled-system";
|
|
3
|
-
|
|
3
|
+
import { TagProps } from "../../__internal__/utils/helpers/tags";
|
|
4
|
+
export interface GlobalHeaderProps extends PaddingProps, FlexboxProps, TagProps {
|
|
4
5
|
/** Child elements */
|
|
5
6
|
children?: React.ReactNode;
|
|
6
7
|
/** Logo to render */
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { SpaceProps, GridProps } from "styled-system";
|
|
3
|
-
|
|
3
|
+
import { TagProps } from "../../../__internal__/utils/helpers/tags/tags";
|
|
4
|
+
export interface GridContainerProps extends SpaceProps, GridProps, React.HTMLAttributes<HTMLDivElement>, TagProps {
|
|
4
5
|
/** Defines the Components to be rendered within the GridContainer. Requires GridItemProps */
|
|
5
6
|
children?: React.ReactNode;
|
|
6
7
|
}
|
|
@@ -1,8 +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 from "react";
|
|
3
3
|
import PropTypes from "prop-types";
|
|
4
|
+
import tagComponent from "../../../__internal__/utils/helpers/tags/tags";
|
|
4
5
|
import StyledGridContainer from "./grid-container.style";
|
|
5
|
-
export const GridContainer = props => /*#__PURE__*/React.createElement(StyledGridContainer, _extends({
|
|
6
|
-
"data-component": "grid"
|
|
7
|
-
}, props));
|
|
6
|
+
export const GridContainer = props => /*#__PURE__*/React.createElement(StyledGridContainer, _extends({}, props, tagComponent("grid", props)));
|
|
8
7
|
export default GridContainer;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import { TagProps } from "../../../__internal__/utils/helpers/tags/tags";
|
|
2
3
|
import { StyledGridItemProps } from "./grid-item.style";
|
|
3
|
-
export interface GridItemProps extends StyledGridItemProps, React.HTMLAttributes<HTMLDivElement
|
|
4
|
+
export interface GridItemProps extends StyledGridItemProps, React.HTMLAttributes<HTMLDivElement>, TagProps {
|
|
4
5
|
/** Defines the Component(s) to be rendered within the GridItem */
|
|
5
6
|
children?: React.ReactNode;
|
|
6
7
|
}
|
|
@@ -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 from "react";
|
|
3
3
|
import PropTypes from "prop-types";
|
|
4
|
+
import tagComponent from "../../../__internal__/utils/helpers/tags/tags";
|
|
4
5
|
import StyledGridItem from "./grid-item.style";
|
|
5
6
|
export const GridItem = props => {
|
|
6
7
|
const {
|
|
@@ -8,7 +9,7 @@ export const GridItem = props => {
|
|
|
8
9
|
responsiveSettings,
|
|
9
10
|
...rest
|
|
10
11
|
} = props;
|
|
11
|
-
return /*#__PURE__*/React.createElement(StyledGridItem, _extends({}, rest, {
|
|
12
|
+
return /*#__PURE__*/React.createElement(StyledGridItem, _extends({}, rest, tagComponent("grid-item", rest), {
|
|
12
13
|
responsiveSettings: responsiveSettings
|
|
13
14
|
}), children);
|
|
14
15
|
};
|
|
@@ -12,7 +12,7 @@ declare type CustomTarget = {
|
|
|
12
12
|
export interface CustomEvent extends Omit<React.ChangeEvent<HTMLInputElement>, "target"> {
|
|
13
13
|
target: CustomTarget;
|
|
14
14
|
}
|
|
15
|
-
export interface GroupedCharacterProps extends Omit<TextboxProps, "onChange" | "onBlur"> {
|
|
15
|
+
export interface GroupedCharacterProps extends Omit<TextboxProps, "onChange" | "onBlur" | "data-component"> {
|
|
16
16
|
/** Default input value if component is meant to be used as an uncontrolled component */
|
|
17
17
|
defaultValue?: string;
|
|
18
18
|
/** pattern by which input value should be grouped */
|
|
@@ -4,6 +4,7 @@ import PropTypes from "prop-types";
|
|
|
4
4
|
import Textbox from "../textbox";
|
|
5
5
|
import { generateGroups, toSum } from "./grouped-character.utils";
|
|
6
6
|
import Logger from "../../__internal__/utils/logger";
|
|
7
|
+
import tagComponent from "../../__internal__/utils/helpers/tags/tags";
|
|
7
8
|
const buildCustomTarget = ({
|
|
8
9
|
target
|
|
9
10
|
}, value) => {
|
|
@@ -116,7 +117,7 @@ const GroupedCharacter = /*#__PURE__*/React.forwardRef(({
|
|
|
116
117
|
onBlur: handleBlur,
|
|
117
118
|
onKeyDown: handleKeyDown,
|
|
118
119
|
ref: ref
|
|
119
|
-
}));
|
|
120
|
+
}, tagComponent("grouped-character", rest)));
|
|
120
121
|
});
|
|
121
122
|
if (process.env.NODE_ENV !== "production") {
|
|
122
123
|
GroupedCharacter.propTypes = {
|
|
@@ -248,7 +249,6 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
248
249
|
"dangerouslySetInnerHTML": PropTypes.shape({
|
|
249
250
|
"__html": PropTypes.oneOfType([PropTypes.object, PropTypes.string]).isRequired
|
|
250
251
|
}),
|
|
251
|
-
"data-component": PropTypes.string,
|
|
252
252
|
"data-element": PropTypes.string,
|
|
253
253
|
"data-role": PropTypes.string,
|
|
254
254
|
"datatype": PropTypes.string,
|
|
@@ -63,11 +63,7 @@ export const Heading = ({
|
|
|
63
63
|
}, pills);
|
|
64
64
|
};
|
|
65
65
|
const marginProps = filterStyledSystemMarginProps(rest);
|
|
66
|
-
|
|
67
|
-
"data-element": rest["data-element"],
|
|
68
|
-
"data-role": rest["data-role"]
|
|
69
|
-
};
|
|
70
|
-
return title ? /*#__PURE__*/React.createElement(StyledHeading, _extends({}, tagComponent("heading", dataAttributes), marginProps), /*#__PURE__*/React.createElement(StyledHeader, {
|
|
66
|
+
return title ? /*#__PURE__*/React.createElement(StyledHeading, _extends({}, tagComponent("heading", rest), marginProps), /*#__PURE__*/React.createElement(StyledHeader, {
|
|
71
67
|
"data-element": "header-container",
|
|
72
68
|
divider: divider,
|
|
73
69
|
subheader: !!subheader,
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { MarginProps } from "styled-system";
|
|
3
|
+
import { TagProps } from "../../__internal__/utils/helpers/tags";
|
|
3
4
|
import { IconType } from "../icon";
|
|
4
5
|
import { TooltipPositions } from "../tooltip/tooltip.config";
|
|
5
|
-
export interface HelpProps extends MarginProps {
|
|
6
|
+
export interface HelpProps extends MarginProps, TagProps {
|
|
6
7
|
/** Overrides the default 'as' attribute of the Help component */
|
|
7
8
|
as?: keyof JSX.IntrinsicElements;
|
|
8
9
|
/** Aria label */
|
|
@@ -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, useEffect, useRef, useState } from "react";
|
|
3
3
|
import PropTypes from "prop-types";
|
|
4
|
+
import tagComponent from "../../__internal__/utils/helpers/tags";
|
|
4
5
|
import Icon from "../icon";
|
|
5
|
-
import tagComponent from "../../__internal__/utils/helpers/tags/tags";
|
|
6
6
|
import StyledHelp from "./help.style";
|
|
7
7
|
import Events from "../../__internal__/utils/helpers/events";
|
|
8
8
|
import { TooltipContext } from "../../__internal__/tooltip-provider";
|
|
@@ -61,15 +61,14 @@ const Help = ({
|
|
|
61
61
|
onFocus: handleFocusBlur(true),
|
|
62
62
|
onBlur: handleFocusBlur(false),
|
|
63
63
|
onMouseOver: handleFocusBlur(true),
|
|
64
|
-
onMouseLeave: handleFocusBlur(false)
|
|
65
|
-
}, tagComponent("help", rest), {
|
|
64
|
+
onMouseLeave: handleFocusBlur(false),
|
|
66
65
|
tabIndex: tabIndex
|
|
67
66
|
}, href ? {
|
|
68
67
|
target: "_blank",
|
|
69
68
|
rel: "noopener noreferrer"
|
|
70
69
|
} : {
|
|
71
70
|
role: "button"
|
|
72
|
-
}, filterStyledSystemMarginProps(rest), rest), /*#__PURE__*/React.createElement(Icon, {
|
|
71
|
+
}, filterStyledSystemMarginProps(rest), rest, tagComponent("help", rest)), /*#__PURE__*/React.createElement(Icon, {
|
|
73
72
|
"aria-hidden": true,
|
|
74
73
|
type: type,
|
|
75
74
|
tooltipMessage: children,
|
|
@@ -87,6 +86,8 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
87
86
|
"ariaLabel": PropTypes.string,
|
|
88
87
|
"as": PropTypes.oneOf(["a", "abbr", "address", "animate", "animateMotion", "animateTransform", "area", "article", "aside", "audio", "b", "base", "bdi", "bdo", "big", "blockquote", "body", "br", "button", "canvas", "caption", "center", "circle", "cite", "clipPath", "code", "col", "colgroup", "data", "datalist", "dd", "defs", "del", "desc", "details", "dfn", "dialog", "div", "dl", "dt", "ellipse", "em", "embed", "feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence", "fieldset", "figcaption", "figure", "filter", "footer", "foreignObject", "form", "g", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "iframe", "image", "img", "input", "ins", "kbd", "keygen", "label", "legend", "li", "line", "linearGradient", "link", "main", "map", "mark", "marker", "mask", "menu", "menuitem", "meta", "metadata", "meter", "mpath", "nav", "noindex", "noscript", "object", "ol", "optgroup", "option", "output", "p", "param", "path", "pattern", "picture", "polygon", "polyline", "pre", "progress", "q", "radialGradient", "rect", "rp", "rt", "ruby", "s", "samp", "script", "search", "section", "select", "set", "slot", "small", "source", "span", "stop", "strong", "style", "sub", "summary", "sup", "svg", "switch", "symbol", "table", "tbody", "td", "template", "text", "textarea", "textPath", "tfoot", "th", "thead", "time", "title", "tr", "track", "tspan", "u", "ul", "use", "var", "video", "view", "wbr", "webview"]),
|
|
89
88
|
"children": PropTypes.node,
|
|
89
|
+
"data-element": PropTypes.string,
|
|
90
|
+
"data-role": PropTypes.string,
|
|
90
91
|
"helpId": PropTypes.string,
|
|
91
92
|
"href": PropTypes.string,
|
|
92
93
|
"isFocused": PropTypes.bool,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { MarginProps } from "styled-system";
|
|
2
|
-
|
|
2
|
+
import { TagProps } from "../../__internal__/utils/helpers/tags";
|
|
3
|
+
export interface HrProps extends MarginProps, TagProps {
|
|
3
4
|
/** Set whether the component should be recognised by assistive technologies */
|
|
4
5
|
"aria-hidden"?: "true" | "false";
|
|
5
6
|
/** Breakpoint for adaptive left and right margins (below the breakpoint they go to 0).
|
|
@@ -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 from "react";
|
|
3
3
|
import PropTypes from "prop-types";
|
|
4
|
+
import tagComponent from "../../__internal__/utils/helpers/tags";
|
|
4
5
|
import StyledHr from "./hr.style";
|
|
5
6
|
import useIsAboveBreakpoint from "../../hooks/__internal__/useIsAboveBreakpoint";
|
|
6
7
|
const Hr = ({
|
|
@@ -20,19 +21,19 @@ const Hr = ({
|
|
|
20
21
|
}
|
|
21
22
|
return /*#__PURE__*/React.createElement(StyledHr, _extends({
|
|
22
23
|
"aria-hidden": ariaHidden,
|
|
23
|
-
"data-component": "hr",
|
|
24
|
-
"data-role": "hr",
|
|
25
24
|
height: height,
|
|
26
25
|
ml: marginLeft,
|
|
27
26
|
mr: marginRight,
|
|
28
27
|
mt: rest.mt || 3,
|
|
29
28
|
mb: rest.mb || 3
|
|
30
|
-
}, rest));
|
|
29
|
+
}, rest, tagComponent("hr", rest)));
|
|
31
30
|
};
|
|
32
31
|
if (process.env.NODE_ENV !== "production") {
|
|
33
32
|
Hr.propTypes = {
|
|
34
33
|
"adaptiveMxBreakpoint": PropTypes.number,
|
|
35
34
|
"aria-hidden": PropTypes.oneOf(["false", "true"]),
|
|
35
|
+
"data-element": PropTypes.string,
|
|
36
|
+
"data-role": PropTypes.string,
|
|
36
37
|
"height": PropTypes.oneOf(["large", "medium", "small"]),
|
|
37
38
|
"m": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
38
39
|
"__@toStringTag": PropTypes.string.isRequired,
|
|
@@ -5,7 +5,7 @@ import { StyledIconProps } from "./icon.style";
|
|
|
5
5
|
import { IconType } from "./icon-type";
|
|
6
6
|
import { TooltipPositions } from "../tooltip/tooltip.config";
|
|
7
7
|
export declare type LegacyIconTypes = "help" | "maintenance" | "new" | "success" | "messages";
|
|
8
|
-
export interface IconProps extends Omit<StyledIconProps, "type">, MarginProps,
|
|
8
|
+
export interface IconProps extends Omit<StyledIconProps, "type">, MarginProps, TagProps {
|
|
9
9
|
/** Set whether icon should be recognised by assistive technologies */
|
|
10
10
|
"aria-hidden"?: boolean;
|
|
11
11
|
/** Aria label for accessibility purposes */
|
|
@@ -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 { IconProps } from "../icon";
|
|
4
|
-
export interface IconButtonProps extends SpaceProps {
|
|
5
|
+
export interface IconButtonProps extends SpaceProps, TagProps {
|
|
5
6
|
/** Prop to specify the aria-label of the icon-button component */
|
|
6
7
|
"aria-label"?: string;
|
|
7
8
|
/** Icon meant to be rendered, should be an Icon component */
|
|
@@ -18,6 +19,8 @@ export interface IconButtonProps extends SpaceProps {
|
|
|
18
19
|
disabled?: boolean;
|
|
19
20
|
/** Callback triggered on click */
|
|
20
21
|
onClick?: (e: React.KeyboardEvent<HTMLButtonElement> | React.MouseEvent<HTMLButtonElement>) => void;
|
|
22
|
+
/** @private @internal @ignore */
|
|
23
|
+
"data-component"?: string;
|
|
21
24
|
}
|
|
22
25
|
declare const IconButton: React.ForwardRefExoticComponent<IconButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
23
26
|
export default IconButton;
|
|
@@ -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, useCallback, useContext } from "react";
|
|
3
3
|
import PropTypes from "prop-types";
|
|
4
|
+
import tagComponent from "../../__internal__/utils/helpers/tags";
|
|
4
5
|
import Events from "../../__internal__/utils/helpers/events";
|
|
5
6
|
import StyledIconButton from "./icon-button.style";
|
|
6
7
|
import { TooltipProvider } from "../../__internal__/tooltip-provider";
|
|
@@ -38,7 +39,7 @@ const IconButton = /*#__PURE__*/React.forwardRef(({
|
|
|
38
39
|
onClick: onClick,
|
|
39
40
|
ref: setRefs,
|
|
40
41
|
disabled: isDisabled
|
|
41
|
-
}), /*#__PURE__*/React.createElement(TooltipProvider, {
|
|
42
|
+
}, tagComponent(rest["data-component"] ?? "icon-button", rest)), /*#__PURE__*/React.createElement(TooltipProvider, {
|
|
42
43
|
disabled: isDisabled,
|
|
43
44
|
focusable: false,
|
|
44
45
|
target: internalRef
|
|
@@ -48,6 +49,9 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
48
49
|
IconButton.propTypes = {
|
|
49
50
|
"aria-label": PropTypes.string,
|
|
50
51
|
"children": PropTypes.element.isRequired,
|
|
52
|
+
"data-component": PropTypes.string,
|
|
53
|
+
"data-element": PropTypes.string,
|
|
54
|
+
"data-role": PropTypes.string,
|
|
51
55
|
"disabled": PropTypes.bool,
|
|
52
56
|
"m": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
53
57
|
"__@toStringTag": PropTypes.string.isRequired,
|
|
@@ -3,6 +3,7 @@ import React from "react";
|
|
|
3
3
|
import PropTypes from "prop-types";
|
|
4
4
|
import invariant from "invariant";
|
|
5
5
|
import { StyledImage } from "./image.style";
|
|
6
|
+
import tagComponent from "../../__internal__/utils/helpers/tags/tags";
|
|
6
7
|
export const Image = ({
|
|
7
8
|
alt,
|
|
8
9
|
decorative = false,
|
|
@@ -26,7 +27,7 @@ export const Image = ({
|
|
|
26
27
|
right: right,
|
|
27
28
|
bottom: bottom,
|
|
28
29
|
left: left
|
|
29
|
-
}, rest), children);
|
|
30
|
+
}, rest, tagComponent("image", rest)), children);
|
|
30
31
|
};
|
|
31
32
|
Image.displayName = "Image";
|
|
32
33
|
export default Image;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { MarginProps, BackgroundProps, LayoutProps, PaddingProps } from "styled-system";
|
|
3
|
+
import { TagProps } from "../../__internal__/utils/helpers/tags/tags";
|
|
3
4
|
export declare type PositionProps = "absolute" | "fixed" | "relative" | "static" | "sticky";
|
|
4
|
-
export interface StyledImageProps extends BackgroundProps, LayoutProps, MarginProps, PaddingProps {
|
|
5
|
+
export interface StyledImageProps extends BackgroundProps, LayoutProps, MarginProps, PaddingProps, TagProps {
|
|
5
6
|
/** HTML alt property to display when an img fails to load */
|
|
6
7
|
alt?: string;
|
|
7
8
|
/** Prop to specify if the image is decorative */
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { MarginProps } from "styled-system";
|
|
3
3
|
import { StyledContentContainerProps, StyledInlineInputsProps } from "./inline-inputs.style";
|
|
4
|
-
|
|
4
|
+
import { TagProps } from "../../__internal__/utils/helpers/tags";
|
|
5
|
+
export interface InlineInputsProps extends MarginProps, StyledContentContainerProps, StyledInlineInputsProps, TagProps {
|
|
5
6
|
/** Breakpoint for adaptive label (inline label change to top aligned). Enables the adaptive behaviour when set */
|
|
6
7
|
adaptiveLabelBreakpoint?: number;
|
|
7
8
|
/** Children elements */
|
|
@@ -6,6 +6,7 @@ import StyledInlineInputs, { StyledContentContainer, StyledInlineInput } from ".
|
|
|
6
6
|
import FormSpacingProvider from "../../__internal__/form-spacing-provider";
|
|
7
7
|
import useIsAboveBreakpoint from "../../hooks/__internal__/useIsAboveBreakpoint";
|
|
8
8
|
import useFormSpacing from "../../hooks/__internal__/useFormSpacing";
|
|
9
|
+
import tagComponent from "../../__internal__/utils/helpers/tags";
|
|
9
10
|
const columnWrapper = (children, gutter) => {
|
|
10
11
|
return React.Children.map(children, input => {
|
|
11
12
|
return /*#__PURE__*/React.createElement(StyledInlineInput, {
|
|
@@ -55,12 +56,10 @@ const InlineInputs = ({
|
|
|
55
56
|
}, [required]);
|
|
56
57
|
return /*#__PURE__*/React.createElement(StyledInlineInputs, _extends({
|
|
57
58
|
gutter: gutter,
|
|
58
|
-
"data-component": "inline-inputs",
|
|
59
|
-
"data-role": "inline-inputs",
|
|
60
59
|
labelWidth: labelWidth,
|
|
61
60
|
labelInline: inlineLabel,
|
|
62
61
|
ref: ref
|
|
63
|
-
}, marginProps), renderLabel(), /*#__PURE__*/React.createElement(StyledContentContainer, {
|
|
62
|
+
}, marginProps, tagComponent("inline-inputs", rest)), renderLabel(), /*#__PURE__*/React.createElement(StyledContentContainer, {
|
|
64
63
|
gutter: gutter,
|
|
65
64
|
"data-element": "inline-inputs-container",
|
|
66
65
|
"data-role": "inline-inputs-container",
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { IconType } from "../icon";
|
|
3
3
|
import { StyledLinkProps } from "./link.style";
|
|
4
|
-
|
|
4
|
+
import { TagProps } from "../../__internal__/utils/helpers/tags/tags";
|
|
5
|
+
export interface LinkProps extends StyledLinkProps, React.AriaAttributes, TagProps {
|
|
5
6
|
/** An href for an anchor tag. */
|
|
6
7
|
href?: string;
|
|
7
8
|
/** An icon to display next to the link. */
|
|
@@ -162,6 +162,8 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
162
162
|
"ariaLabel": PropTypes.string,
|
|
163
163
|
"children": PropTypes.node,
|
|
164
164
|
"className": PropTypes.string,
|
|
165
|
+
"data-element": PropTypes.string,
|
|
166
|
+
"data-role": PropTypes.string,
|
|
165
167
|
"disabled": PropTypes.bool,
|
|
166
168
|
"hasFocus": PropTypes.bool,
|
|
167
169
|
"href": PropTypes.string,
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import { TagProps } from "../../__internal__/utils/helpers/tags";
|
|
2
3
|
interface ImageShape {
|
|
3
4
|
/** The url string to be passed to image src */
|
|
4
5
|
url: string;
|
|
5
6
|
/** The string to be passed to image alt */
|
|
6
7
|
alt?: string;
|
|
7
8
|
}
|
|
8
|
-
export interface LinkPreviewProps {
|
|
9
|
+
export interface LinkPreviewProps extends TagProps {
|
|
9
10
|
/** Used to set the root element to either an anchor link or div container */
|
|
10
11
|
as?: "a" | "div";
|
|
11
12
|
/** The description to be displayed */
|
|
@@ -7,6 +7,7 @@ import Preview from "../preview";
|
|
|
7
7
|
import IconButton from "../icon-button";
|
|
8
8
|
import Icon from "../icon";
|
|
9
9
|
import Placeholder from "./__internal__/placeholder.component";
|
|
10
|
+
import tagComponent from "../../__internal__/utils/helpers/tags";
|
|
10
11
|
const SCHEME_SEPARATOR = "://";
|
|
11
12
|
export const LinkPreview = ({
|
|
12
13
|
as,
|
|
@@ -40,10 +41,9 @@ export const LinkPreview = ({
|
|
|
40
41
|
rel: "noopener noreferrer"
|
|
41
42
|
} : {};
|
|
42
43
|
return /*#__PURE__*/React.createElement(StyledLinkPreview, _extends({
|
|
43
|
-
"data-role": "link-preview",
|
|
44
44
|
as: loadingState ? "div" : as,
|
|
45
45
|
tabIndex: loadingState || as === "div" ? -1 : 0
|
|
46
|
-
}, linkProps, rest), imageProps().src ? /*#__PURE__*/React.createElement(Image, imageProps()) : /*#__PURE__*/React.createElement(Placeholder, null), /*#__PURE__*/React.createElement(StyledPreviewWrapper, {
|
|
46
|
+
}, linkProps, rest, tagComponent("link-preview", rest)), imageProps().src ? /*#__PURE__*/React.createElement(Image, imageProps()) : /*#__PURE__*/React.createElement(Placeholder, null), /*#__PURE__*/React.createElement(StyledPreviewWrapper, {
|
|
47
47
|
isLoading: loadingState
|
|
48
48
|
}, /*#__PURE__*/React.createElement(Preview, {
|
|
49
49
|
loading: loadingState,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TagProps } from "../../__internal__/utils/helpers/tags/tags";
|
|
2
|
-
export interface LoaderStarProps extends
|
|
2
|
+
export interface LoaderStarProps extends TagProps {
|
|
3
3
|
/**
|
|
4
4
|
* The loaderStarLabel prop allows a specific label to be set.
|
|
5
5
|
* This label will be present if the user has `reduce-motion` enabled and will also be available to assistive technologies.
|
|
@@ -21,7 +21,6 @@ const MenuDivider = /*#__PURE__*/React.forwardRef(({
|
|
|
21
21
|
});
|
|
22
22
|
if (process.env.NODE_ENV !== "production") {
|
|
23
23
|
MenuDivider.propTypes = {
|
|
24
|
-
"data-component": PropTypes.string,
|
|
25
24
|
"data-element": PropTypes.string,
|
|
26
25
|
"data-role": PropTypes.string,
|
|
27
26
|
"size": PropTypes.oneOf(["default", "large"])
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import type { TagProps } from "../../../__internal__/utils/helpers/tags";
|
|
3
|
-
export interface MenuFullscreenProps extends
|
|
3
|
+
export interface MenuFullscreenProps extends TagProps {
|
|
4
4
|
/** Accessible name that conveys the purpose of the menu */
|
|
5
5
|
"aria-label"?: string;
|
|
6
6
|
/** The child elements to render */
|
|
@@ -3,7 +3,7 @@ import { FlexboxProps, LayoutProps, MaxWidthProps, PaddingProps } from "styled-s
|
|
|
3
3
|
import { IconType } from "../../icon";
|
|
4
4
|
import { TagProps } from "../../../__internal__/utils/helpers/tags";
|
|
5
5
|
export declare type VariantType = "default" | "alternate";
|
|
6
|
-
interface MenuItemBaseProps extends
|
|
6
|
+
interface MenuItemBaseProps extends TagProps, Pick<LayoutProps, "width" | "maxWidth" | "minWidth">, FlexboxProps, PaddingProps {
|
|
7
7
|
/** onClick handler */
|
|
8
8
|
onClick?: (event: React.MouseEvent<HTMLAnchorElement> | React.MouseEvent<HTMLButtonElement>) => void;
|
|
9
9
|
/** Defines which direction the submenu will hang eg. left/right */
|
|
@@ -47,7 +47,6 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
47
47
|
MenuSegmentTitle.propTypes = {
|
|
48
48
|
"as": PropTypes.oneOf(["h2", "h3", "h4", "h5", "h6"]),
|
|
49
49
|
"children": PropTypes.node,
|
|
50
|
-
"data-component": PropTypes.string,
|
|
51
50
|
"data-element": PropTypes.string,
|
|
52
51
|
"data-role": PropTypes.string,
|
|
53
52
|
"text": PropTypes.string.isRequired,
|