carbon-react 152.2.0 → 153.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/__internal__/fieldset/fieldset.component.js +2 -2
- package/esm/__internal__/fieldset/fieldset.style.d.ts +3 -3
- package/esm/__internal__/fieldset/fieldset.style.js +1 -0
- package/esm/__internal__/focus-trap/focus-trap-utils.d.ts +1 -1
- package/esm/__internal__/focus-trap/focus-trap.component.d.ts +1 -1
- package/esm/__internal__/form-field/form-field.component.js +2 -2
- package/esm/__internal__/form-field/form-field.style.js +1 -0
- package/esm/__internal__/input/input-presentation.component.d.ts +1 -1
- package/esm/__internal__/input/input-presentation.style.d.ts +1 -1
- package/esm/__internal__/input/input.component.d.ts +1 -1
- package/esm/__internal__/popover/popover.component.d.ts +1 -1
- package/esm/__internal__/popover/popover.style.d.ts +1 -1
- package/esm/__internal__/validations/validation-icon.component.d.ts +1 -1
- package/esm/__internal__/validations/validation-icon.style.d.ts +1 -1
- package/esm/components/accordion/accordion-group/accordion-group.component.d.ts +1 -1
- package/esm/components/accordion/accordion.style.js +2 -2
- package/esm/components/action-popover/__internal__/action-popover-utils.d.ts +1 -1
- package/esm/components/action-popover/__internal__/action-popover.context.d.ts +2 -2
- package/esm/components/action-popover/action-popover-menu-button/action-popover-menu-button.component.d.ts +1 -1
- package/esm/components/action-popover/action-popover.component.d.ts +1 -1
- package/esm/components/action-popover/action-popover.style.d.ts +1 -1
- package/esm/components/badge/badge.style.d.ts +1 -1
- package/esm/components/batch-selection/__internal__/batch-selection.context.d.ts +1 -1
- package/esm/components/box/box.component.d.ts +6 -6
- package/esm/components/breadcrumbs/__internal__/breadcrumbs.context.d.ts +1 -1
- package/esm/components/button/button.component.d.ts +8 -8
- package/esm/components/button/button.component.js +1 -1
- package/esm/components/button/button.style.js +22 -8
- package/esm/components/button-minor/button-minor.style.d.ts +1 -1
- package/esm/components/button-toggle/button-toggle-group/__internal__/button-toggle-group.context.d.ts +1 -1
- package/esm/components/button-toggle/button-toggle-group/button-toggle-group.style.d.ts +1 -1
- package/esm/components/button-toggle/button-toggle.style.d.ts +1 -1
- package/esm/components/carbon-provider/__internal__/top-modal.context.d.ts +1 -1
- package/esm/components/card/card.component.d.ts +2 -2
- package/esm/components/card/card.config.d.ts +2 -2
- package/esm/components/card/card.style.d.ts +2 -2
- package/esm/components/checkbox/checkbox-group/checkbox-group.component.js +2 -7
- package/esm/components/checkbox/checkbox.component.js +2 -2
- package/esm/components/checkbox/checkbox.style.js +1 -0
- package/esm/components/content/content.style.d.ts +2 -2
- package/esm/components/date/__internal__/date-picker/date-picker.component.d.ts +1 -1
- package/esm/components/date/__internal__/weekday/weekday.style.js +1 -1
- package/esm/components/date/date.component.js +2 -3
- package/esm/components/date/date.style.js +1 -0
- package/esm/components/date-range/__internal__/date-range.context.d.ts +4 -4
- package/esm/components/date-range/date-range.style.js +1 -0
- package/esm/components/definition-list/__internal__/dl.context.d.ts +1 -1
- package/esm/components/dialog/dialog.component.d.ts +2 -2
- package/esm/components/dialog/dialog.config.d.ts +1 -1
- package/esm/components/dialog/dialog.style.d.ts +1 -1
- package/esm/components/dialog-full-screen/content.style.d.ts +1 -1
- package/esm/components/dialog-full-screen/content.style.js +8 -7
- package/esm/components/duelling-picklist/__internal__/duelling-picklist.context.d.ts +1 -1
- package/esm/components/duelling-picklist/picklist-divider/picklist-divider.component.d.ts +1 -1
- package/esm/components/duelling-picklist/picklist-group/picklist-group.style.d.ts +1 -1
- package/esm/components/duelling-picklist/picklist-item/picklist-item.component.d.ts +1 -1
- package/esm/components/duelling-picklist/picklist-item/picklist-item.style.d.ts +1 -1
- package/esm/components/fieldset/fieldset.component.js +3 -6
- package/esm/components/fieldset/fieldset.style.js +5 -0
- package/esm/components/file-input/__internal__/file-upload-status/file-upload-status.component.d.ts +1 -1
- package/esm/components/flat-table/index.d.ts +2 -2
- package/esm/components/form/__internal__/form-summary.style.d.ts +2 -2
- package/esm/components/form/form.component.js +3 -6
- package/esm/components/form/form.config.d.ts +1 -1
- package/esm/components/form/form.style.d.ts +1 -1
- package/esm/components/form/form.style.js +20 -11
- package/esm/components/grouped-character/grouped-character.component.d.ts +2 -2
- package/esm/components/heading/heading.component.d.ts +1 -1
- package/esm/components/heading/heading.style.d.ts +3 -3
- package/esm/components/icon/icon-type.d.ts +1 -1
- package/esm/components/icon/icon-unicodes.d.ts +248 -248
- package/esm/components/icon/icon.component.d.ts +1 -1
- package/esm/components/icon/icon.style.d.ts +3 -3
- package/esm/components/icon/icon.style.js +5 -11
- package/esm/components/image/image.style.d.ts +2 -2
- package/esm/components/inline-inputs/inline-inputs.component.js +3 -6
- package/esm/components/inline-inputs/inline-inputs.style.d.ts +1 -1
- package/esm/components/inline-inputs/inline-inputs.style.js +1 -0
- package/esm/components/link/link.style.d.ts +1 -1
- package/esm/components/loader-spinner/loader-spinner.config.d.ts +3 -3
- package/esm/components/loader-spinner/loader-spinner.style.js +1 -1
- package/esm/components/menu/__internal__/locators.d.ts +3 -3
- package/esm/components/menu/__internal__/menu.context.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.d.ts +1 -1
- package/esm/components/message/__internal__/type-icon/type-icon.style.d.ts +1 -1
- package/esm/components/message/message.component.d.ts +1 -1
- package/esm/components/message/message.style.d.ts +1 -1
- package/esm/components/modal/__internal__/modal-manager.d.ts +2 -2
- package/esm/components/modal/modal.style.d.ts +1 -1
- package/esm/components/multi-action-button/multi-action-button.component.d.ts +1 -1
- package/esm/components/multi-action-button/multi-action-button.style.d.ts +1 -1
- package/esm/components/multi-action-button/multi-action-button.style.js +6 -5
- package/esm/components/navigation-bar/__internal__/fixed-navigation-bar.context.d.ts +1 -1
- package/esm/components/navigation-bar/navigation-bar.component.d.ts +3 -3
- package/esm/components/navigation-bar/navigation-bar.style.d.ts +1 -1
- package/esm/components/numeral-date/__internal__/numeral-date.context.d.ts +1 -1
- package/esm/components/numeral-date/numeral-date.component.d.ts +2 -2
- package/esm/components/numeral-date/numeral-date.component.js +2 -1
- package/esm/components/pager/pager.component.d.ts +1 -1
- package/esm/components/pod/pod.config.d.ts +3 -3
- package/esm/components/popover-container/popover-container.component.d.ts +1 -1
- package/esm/components/popover-container/popover-container.style.d.ts +3 -3
- package/esm/components/portrait/portrait.component.d.ts +2 -2
- package/esm/components/portrait/portrait.config.d.ts +1 -1
- package/esm/components/portrait/portrait.style.d.ts +1 -1
- package/esm/components/preview/preview.component.d.ts +1 -1
- package/esm/components/preview/preview.style.js +4 -4
- package/esm/components/profile/profile.config.d.ts +2 -2
- package/esm/components/progress-tracker/progress-tracker.style.js +1 -1
- package/esm/components/search/search.component.d.ts +1 -1
- package/esm/components/search/search.component.js +3 -3
- package/esm/components/search/search.style.js +1 -0
- package/esm/components/select/__internal__/select-list/select-list.component.d.ts +2 -2
- package/esm/components/select/__internal__/select-list/select-list.context.d.ts +1 -1
- package/esm/components/select/__internal__/select-textbox/select-textbox.context.d.ts +1 -1
- package/esm/components/select/filterable-select/filterable-select.component.js +2 -3
- package/esm/components/select/multi-select/multi-select.component.js +2 -3
- package/esm/components/select/option/option.component.d.ts +1 -1
- package/esm/components/select/select.style.js +1 -0
- package/esm/components/select/simple-select/simple-select.component.js +2 -3
- package/esm/components/sidebar/sidebar.component.d.ts +1 -1
- package/esm/components/sidebar/sidebar.style.d.ts +1 -1
- package/esm/components/simple-color-picker/simple-color-picker.style.d.ts +1 -1
- package/esm/components/split-button/split-button-children.style.d.ts +1 -1
- package/esm/components/split-button/split-button-toggle.style.d.ts +1 -1
- package/esm/components/split-button/split-button.component.d.ts +1 -1
- package/esm/components/step-flow/__internal__/step-flow.context.d.ts +1 -1
- package/esm/components/step-flow/step-flow.component.d.ts +2 -2
- package/esm/components/switch/switch.component.js +2 -2
- package/esm/components/switch/switch.style.d.ts +6 -1
- package/esm/components/switch/switch.style.js +1 -0
- package/esm/components/tabs/__internal__/tab-title/tab-title.style.js +3 -4
- package/esm/components/tabs/__internal__/tabs-header/tabs-header.style.d.ts +5 -5
- package/esm/components/tabs/__internal__/tabs-header/tabs-header.style.js +5 -2
- package/esm/components/tabs/tab/tab.style.d.ts +1 -1
- package/esm/components/text-editor/__internal__/plugins/Toolbar/toolbar.style.d.ts +1 -1
- package/esm/components/text-editor/text-editor.style.d.ts +1 -1
- package/esm/components/text-editor/text-editor.style.js +1 -0
- package/esm/components/textarea/textarea.component.js +4 -3
- package/esm/components/textarea/textarea.style.js +2 -1
- package/esm/components/textbox/textbox.component.js +1 -1
- package/esm/components/tile/tile.component.d.ts +2 -2
- package/esm/components/time/time.component.d.ts +3 -3
- package/esm/components/time/time.component.js +6 -3
- package/esm/components/toast/toast.component.d.ts +3 -3
- package/esm/components/toast/toast.style.d.ts +2 -2
- package/esm/components/tooltip/tooltip.component.d.ts +1 -1
- package/esm/components/tooltip/tooltip.config.d.ts +1 -1
- package/esm/components/typography/typography.component.d.ts +1 -1
- package/esm/components/typography/typography.component.js +16 -1
- package/esm/components/typography/typography.style.d.ts +1 -10
- package/esm/components/typography/typography.style.js +39 -63
- package/esm/components/vertical-divider/vertical-divider.component.d.ts +1 -1
- package/esm/components/vertical-menu/vertical-menu-item/vertical-menu-item.component.d.ts +1 -1
- package/esm/global.d.ts +1 -1
- package/esm/hooks/__internal__/useChildButtons/useChildButtons.d.ts +1 -1
- package/esm/hooks/__internal__/useDebounce/useDebounce.d.ts +1 -1
- package/esm/hooks/__internal__/useFloating/useFloating.d.ts +1 -1
- package/esm/hooks/__internal__/useModalManager/useModalManager.d.ts +1 -1
- package/esm/hooks/__internal__/useThrottle/useThrottle.d.ts +1 -1
- package/esm/style/palette/index.d.ts +1 -1
- package/esm/style/themes/base/base-theme.config.d.ts +1 -1
- package/esm/style/utils/box-gap.d.ts +2 -2
- package/lib/__internal__/fieldset/fieldset.component.js +2 -2
- package/lib/__internal__/fieldset/fieldset.style.d.ts +3 -3
- package/lib/__internal__/fieldset/fieldset.style.js +1 -0
- package/lib/__internal__/focus-trap/focus-trap-utils.d.ts +1 -1
- package/lib/__internal__/focus-trap/focus-trap.component.d.ts +1 -1
- package/lib/__internal__/form-field/form-field.component.js +2 -2
- package/lib/__internal__/form-field/form-field.style.js +1 -0
- package/lib/__internal__/input/input-presentation.component.d.ts +1 -1
- package/lib/__internal__/input/input-presentation.style.d.ts +1 -1
- package/lib/__internal__/input/input.component.d.ts +1 -1
- package/lib/__internal__/popover/popover.component.d.ts +1 -1
- package/lib/__internal__/popover/popover.style.d.ts +1 -1
- package/lib/__internal__/validations/validation-icon.component.d.ts +1 -1
- package/lib/__internal__/validations/validation-icon.style.d.ts +1 -1
- package/lib/components/accordion/accordion-group/accordion-group.component.d.ts +1 -1
- package/lib/components/accordion/accordion.style.js +2 -2
- package/lib/components/action-popover/__internal__/action-popover-utils.d.ts +1 -1
- package/lib/components/action-popover/__internal__/action-popover.context.d.ts +2 -2
- package/lib/components/action-popover/action-popover-menu-button/action-popover-menu-button.component.d.ts +1 -1
- package/lib/components/action-popover/action-popover.component.d.ts +1 -1
- package/lib/components/action-popover/action-popover.style.d.ts +1 -1
- package/lib/components/badge/badge.style.d.ts +1 -1
- package/lib/components/batch-selection/__internal__/batch-selection.context.d.ts +1 -1
- package/lib/components/box/box.component.d.ts +6 -6
- package/lib/components/breadcrumbs/__internal__/breadcrumbs.context.d.ts +1 -1
- package/lib/components/button/button.component.d.ts +8 -8
- package/lib/components/button/button.component.js +1 -1
- package/lib/components/button/button.style.js +22 -8
- package/lib/components/button-minor/button-minor.style.d.ts +1 -1
- package/lib/components/button-toggle/button-toggle-group/__internal__/button-toggle-group.context.d.ts +1 -1
- package/lib/components/button-toggle/button-toggle-group/button-toggle-group.style.d.ts +1 -1
- package/lib/components/button-toggle/button-toggle.style.d.ts +1 -1
- package/lib/components/carbon-provider/__internal__/top-modal.context.d.ts +1 -1
- package/lib/components/card/card.component.d.ts +2 -2
- package/lib/components/card/card.config.d.ts +2 -2
- package/lib/components/card/card.style.d.ts +2 -2
- package/lib/components/checkbox/checkbox-group/checkbox-group.component.js +2 -7
- package/lib/components/checkbox/checkbox.component.js +2 -2
- package/lib/components/checkbox/checkbox.style.js +1 -0
- package/lib/components/content/content.style.d.ts +2 -2
- package/lib/components/date/__internal__/date-picker/date-picker.component.d.ts +1 -1
- package/lib/components/date/__internal__/weekday/weekday.style.js +1 -1
- package/lib/components/date/date.component.js +1 -2
- package/lib/components/date/date.style.js +1 -0
- package/lib/components/date-range/__internal__/date-range.context.d.ts +4 -4
- package/lib/components/date-range/date-range.style.js +1 -0
- package/lib/components/definition-list/__internal__/dl.context.d.ts +1 -1
- package/lib/components/dialog/dialog.component.d.ts +2 -2
- package/lib/components/dialog/dialog.config.d.ts +1 -1
- package/lib/components/dialog/dialog.style.d.ts +1 -1
- package/lib/components/dialog-full-screen/content.style.d.ts +1 -1
- package/lib/components/dialog-full-screen/content.style.js +8 -7
- package/lib/components/duelling-picklist/__internal__/duelling-picklist.context.d.ts +1 -1
- package/lib/components/duelling-picklist/picklist-divider/picklist-divider.component.d.ts +1 -1
- package/lib/components/duelling-picklist/picklist-group/picklist-group.style.d.ts +1 -1
- package/lib/components/duelling-picklist/picklist-item/picklist-item.component.d.ts +1 -1
- package/lib/components/duelling-picklist/picklist-item/picklist-item.style.d.ts +1 -1
- package/lib/components/fieldset/fieldset.component.js +3 -6
- package/lib/components/fieldset/fieldset.style.js +5 -0
- package/lib/components/file-input/__internal__/file-upload-status/file-upload-status.component.d.ts +1 -1
- package/lib/components/flat-table/index.d.ts +2 -2
- package/lib/components/form/__internal__/form-summary.style.d.ts +2 -2
- package/lib/components/form/form.component.js +3 -6
- package/lib/components/form/form.config.d.ts +1 -1
- package/lib/components/form/form.style.d.ts +1 -1
- package/lib/components/form/form.style.js +20 -11
- package/lib/components/grouped-character/grouped-character.component.d.ts +2 -2
- package/lib/components/heading/heading.component.d.ts +1 -1
- package/lib/components/heading/heading.style.d.ts +3 -3
- package/lib/components/icon/icon-type.d.ts +1 -1
- package/lib/components/icon/icon-unicodes.d.ts +248 -248
- package/lib/components/icon/icon.component.d.ts +1 -1
- package/lib/components/icon/icon.style.d.ts +3 -3
- package/lib/components/icon/icon.style.js +5 -11
- package/lib/components/image/image.style.d.ts +2 -2
- package/lib/components/inline-inputs/inline-inputs.component.js +3 -6
- package/lib/components/inline-inputs/inline-inputs.style.d.ts +1 -1
- package/lib/components/inline-inputs/inline-inputs.style.js +1 -0
- package/lib/components/link/link.style.d.ts +1 -1
- package/lib/components/loader-spinner/loader-spinner.config.d.ts +3 -3
- package/lib/components/loader-spinner/loader-spinner.style.js +1 -1
- package/lib/components/menu/__internal__/locators.d.ts +3 -3
- package/lib/components/menu/__internal__/menu.context.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.d.ts +1 -1
- package/lib/components/message/__internal__/type-icon/type-icon.style.d.ts +1 -1
- package/lib/components/message/message.component.d.ts +1 -1
- package/lib/components/message/message.style.d.ts +1 -1
- package/lib/components/modal/__internal__/modal-manager.d.ts +2 -2
- package/lib/components/modal/modal.style.d.ts +1 -1
- package/lib/components/multi-action-button/multi-action-button.component.d.ts +1 -1
- package/lib/components/multi-action-button/multi-action-button.style.d.ts +1 -1
- package/lib/components/multi-action-button/multi-action-button.style.js +6 -5
- package/lib/components/navigation-bar/__internal__/fixed-navigation-bar.context.d.ts +1 -1
- package/lib/components/navigation-bar/navigation-bar.component.d.ts +3 -3
- package/lib/components/navigation-bar/navigation-bar.style.d.ts +1 -1
- package/lib/components/numeral-date/__internal__/numeral-date.context.d.ts +1 -1
- package/lib/components/numeral-date/numeral-date.component.d.ts +2 -2
- package/lib/components/numeral-date/numeral-date.component.js +2 -1
- package/lib/components/pager/pager.component.d.ts +1 -1
- package/lib/components/pod/pod.config.d.ts +3 -3
- package/lib/components/popover-container/popover-container.component.d.ts +1 -1
- package/lib/components/popover-container/popover-container.style.d.ts +3 -3
- package/lib/components/portrait/portrait.component.d.ts +2 -2
- package/lib/components/portrait/portrait.config.d.ts +1 -1
- package/lib/components/portrait/portrait.style.d.ts +1 -1
- package/lib/components/preview/preview.component.d.ts +1 -1
- package/lib/components/preview/preview.style.js +4 -4
- package/lib/components/profile/profile.config.d.ts +2 -2
- package/lib/components/progress-tracker/progress-tracker.style.js +1 -1
- package/lib/components/search/search.component.d.ts +1 -1
- package/lib/components/search/search.component.js +3 -3
- package/lib/components/search/search.style.js +1 -0
- package/lib/components/select/__internal__/select-list/select-list.component.d.ts +2 -2
- package/lib/components/select/__internal__/select-list/select-list.context.d.ts +1 -1
- package/lib/components/select/__internal__/select-textbox/select-textbox.context.d.ts +1 -1
- package/lib/components/select/filterable-select/filterable-select.component.js +1 -2
- package/lib/components/select/multi-select/multi-select.component.js +1 -2
- package/lib/components/select/option/option.component.d.ts +1 -1
- package/lib/components/select/select.style.js +1 -0
- package/lib/components/select/simple-select/simple-select.component.js +1 -2
- package/lib/components/sidebar/sidebar.component.d.ts +1 -1
- package/lib/components/sidebar/sidebar.style.d.ts +1 -1
- package/lib/components/simple-color-picker/simple-color-picker.style.d.ts +1 -1
- package/lib/components/split-button/split-button-children.style.d.ts +1 -1
- package/lib/components/split-button/split-button-toggle.style.d.ts +1 -1
- package/lib/components/split-button/split-button.component.d.ts +1 -1
- package/lib/components/step-flow/__internal__/step-flow.context.d.ts +1 -1
- package/lib/components/step-flow/step-flow.component.d.ts +2 -2
- package/lib/components/switch/switch.component.js +2 -2
- package/lib/components/switch/switch.style.d.ts +6 -1
- package/lib/components/switch/switch.style.js +1 -0
- package/lib/components/tabs/__internal__/tab-title/tab-title.style.js +3 -4
- package/lib/components/tabs/__internal__/tabs-header/tabs-header.style.d.ts +5 -5
- package/lib/components/tabs/__internal__/tabs-header/tabs-header.style.js +5 -2
- package/lib/components/tabs/tab/tab.style.d.ts +1 -1
- package/lib/components/text-editor/__internal__/plugins/Toolbar/toolbar.style.d.ts +1 -1
- package/lib/components/text-editor/text-editor.style.d.ts +1 -1
- package/lib/components/text-editor/text-editor.style.js +1 -0
- package/lib/components/textarea/textarea.component.js +4 -3
- package/lib/components/textarea/textarea.style.js +2 -1
- package/lib/components/textbox/textbox.component.js +1 -1
- package/lib/components/tile/tile.component.d.ts +2 -2
- package/lib/components/time/time.component.d.ts +3 -3
- package/lib/components/time/time.component.js +6 -3
- package/lib/components/toast/toast.component.d.ts +3 -3
- package/lib/components/toast/toast.style.d.ts +2 -2
- package/lib/components/tooltip/tooltip.component.d.ts +1 -1
- package/lib/components/tooltip/tooltip.config.d.ts +1 -1
- package/lib/components/typography/typography.component.d.ts +1 -1
- package/lib/components/typography/typography.component.js +16 -1
- package/lib/components/typography/typography.style.d.ts +1 -10
- package/lib/components/typography/typography.style.js +39 -63
- package/lib/components/vertical-divider/vertical-divider.component.d.ts +1 -1
- package/lib/components/vertical-menu/vertical-menu-item/vertical-menu-item.component.d.ts +1 -1
- package/lib/global.d.ts +1 -1
- package/lib/hooks/__internal__/useChildButtons/useChildButtons.d.ts +1 -1
- package/lib/hooks/__internal__/useDebounce/useDebounce.d.ts +1 -1
- package/lib/hooks/__internal__/useFloating/useFloating.d.ts +1 -1
- package/lib/hooks/__internal__/useModalManager/useModalManager.d.ts +1 -1
- package/lib/hooks/__internal__/useThrottle/useThrottle.d.ts +1 -1
- package/lib/style/palette/index.d.ts +1 -1
- package/lib/style/themes/base/base-theme.config.d.ts +1 -1
- package/lib/style/utils/box-gap.d.ts +2 -2
- package/package.json +8 -8
- package/esm/__internal__/form-spacing-provider/form-spacing-provider.component.d.ts +0 -7
- package/esm/__internal__/form-spacing-provider/form-spacing-provider.component.js +0 -11
- package/esm/__internal__/form-spacing-provider/form-spacing.context.d.ts +0 -5
- package/esm/__internal__/form-spacing-provider/form-spacing.context.js +0 -2
- package/esm/__internal__/form-spacing-provider/index.d.ts +0 -3
- package/esm/__internal__/form-spacing-provider/index.js +0 -2
- package/esm/hooks/__internal__/useFormSpacing/add-form-spacing/index.d.ts +0 -3
- package/esm/hooks/__internal__/useFormSpacing/add-form-spacing/index.js +0 -27
- package/esm/hooks/__internal__/useFormSpacing/index.d.ts +0 -3
- package/esm/hooks/__internal__/useFormSpacing/index.js +0 -11
- package/lib/__internal__/form-spacing-provider/form-spacing-provider.component.d.ts +0 -7
- package/lib/__internal__/form-spacing-provider/form-spacing-provider.component.js +0 -18
- package/lib/__internal__/form-spacing-provider/form-spacing.context.d.ts +0 -5
- package/lib/__internal__/form-spacing-provider/form-spacing.context.js +0 -9
- package/lib/__internal__/form-spacing-provider/index.d.ts +0 -3
- package/lib/__internal__/form-spacing-provider/index.js +0 -20
- package/lib/__internal__/form-spacing-provider/package.json +0 -6
- package/lib/hooks/__internal__/useFormSpacing/add-form-spacing/index.d.ts +0 -3
- package/lib/hooks/__internal__/useFormSpacing/add-form-spacing/index.js +0 -34
- package/lib/hooks/__internal__/useFormSpacing/add-form-spacing/package.json +0 -6
- package/lib/hooks/__internal__/useFormSpacing/index.d.ts +0 -3
- package/lib/hooks/__internal__/useFormSpacing/index.js +0 -19
- package/lib/hooks/__internal__/useFormSpacing/package.json +0 -6
|
@@ -4,9 +4,9 @@ import { StyledFieldset, StyledLegend, StyledLegendContent, StyledIconWrapper }
|
|
|
4
4
|
import ValidationIcon from "../validations/validation-icon.component";
|
|
5
5
|
import NewValidationContext from "../../components/carbon-provider/__internal__/new-validation.context";
|
|
6
6
|
import { InputGroupBehaviour, InputGroupContext } from "../input-behaviour";
|
|
7
|
-
import useFormSpacing from "../../hooks/__internal__/useFormSpacing";
|
|
8
7
|
import Help from "../../components/help";
|
|
9
8
|
import Typography from "../../components/typography";
|
|
9
|
+
import { filterStyledSystemMarginProps } from "../../style/utils";
|
|
10
10
|
const Fieldset = ({
|
|
11
11
|
legend,
|
|
12
12
|
children,
|
|
@@ -29,7 +29,7 @@ const Fieldset = ({
|
|
|
29
29
|
const {
|
|
30
30
|
validationRedesignOptIn
|
|
31
31
|
} = useContext(NewValidationContext);
|
|
32
|
-
const marginProps =
|
|
32
|
+
const marginProps = filterStyledSystemMarginProps(rest);
|
|
33
33
|
const [ref, setRef] = useState(null);
|
|
34
34
|
const [isFocused, setFocus] = useState(false);
|
|
35
35
|
useEffect(() => {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
type StyledFieldsetProps = {
|
|
2
2
|
width?: string;
|
|
3
3
|
};
|
|
4
4
|
declare const StyledFieldset: import("styled-components").StyledComponent<"fieldset", any, StyledFieldsetProps, never>;
|
|
5
|
-
|
|
5
|
+
type StyledLegendContentProps = {
|
|
6
6
|
isRequired?: boolean;
|
|
7
7
|
isOptional?: boolean;
|
|
8
8
|
isDisabled?: boolean;
|
|
9
9
|
};
|
|
10
10
|
declare const StyledLegendContent: import("styled-components").StyledComponent<"span", any, StyledLegendContentProps, never>;
|
|
11
|
-
export
|
|
11
|
+
export type StyledLegendProps = {
|
|
12
12
|
inline?: boolean;
|
|
13
13
|
width?: number;
|
|
14
14
|
align?: "left" | "right";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
type CustomRefObject<T> = {
|
|
2
2
|
current?: T | null;
|
|
3
3
|
};
|
|
4
4
|
declare const defaultFocusableSelectors = "button:not([disabled]), [href], input:not([type=\"hidden\"]):not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
export declare const TAB_GUARD_TOP = "tab-guard-top";
|
|
3
3
|
export declare const TAB_GUARD_BOTTOM = "tab-guard-bottom";
|
|
4
|
-
export
|
|
4
|
+
export type CustomRefObject<T> = {
|
|
5
5
|
current?: T | null;
|
|
6
6
|
};
|
|
7
7
|
export interface FocusTrapProps {
|
|
@@ -7,7 +7,7 @@ import FieldHelp from "../field-help";
|
|
|
7
7
|
import tagComponent from "../utils/helpers/tags/tags";
|
|
8
8
|
import TabContext from "../../components/tabs/tab/__internal__/tab.context";
|
|
9
9
|
import useIsAboveBreakpoint from "../../hooks/__internal__/useIsAboveBreakpoint";
|
|
10
|
-
import
|
|
10
|
+
import { filterStyledSystemMarginProps } from "../../style/utils";
|
|
11
11
|
const FormField = ({
|
|
12
12
|
maxWidth,
|
|
13
13
|
children,
|
|
@@ -61,7 +61,7 @@ const FormField = ({
|
|
|
61
61
|
setWarning,
|
|
62
62
|
setInfo
|
|
63
63
|
} = useContext(TabContext);
|
|
64
|
-
const marginProps =
|
|
64
|
+
const marginProps = filterStyledSystemMarginProps(rest);
|
|
65
65
|
const isMounted = useRef(false);
|
|
66
66
|
useLayoutEffect(() => {
|
|
67
67
|
isMounted.current = true;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { BorderRadiusType } from "../../components/box/box.component";
|
|
3
3
|
import { ValidationProps } from "../validations";
|
|
4
|
-
export
|
|
4
|
+
export type Sizes = "small" | "medium" | "large";
|
|
5
5
|
export interface CommonInputPresentationProps extends ValidationProps {
|
|
6
6
|
children: React.ReactNode;
|
|
7
7
|
/** If true, the component will be disabled */
|
|
@@ -2,5 +2,5 @@ import { CommonInputPresentationProps } from "./input-presentation.component";
|
|
|
2
2
|
import { InputContextProps } from "../input-behaviour";
|
|
3
3
|
import { CarbonProviderProps } from "../../components/carbon-provider";
|
|
4
4
|
export declare const StyledInputPresentationContainer: import("styled-components").StyledComponent<"div", any, Pick<CommonInputPresentationProps, "maxWidth" | "inputWidth">, never>;
|
|
5
|
-
declare const InputPresentationStyle: import("styled-components").StyledComponent<"div", any, Pick<InputContextProps, "hasFocus"> & Pick<CommonInputPresentationProps, "disabled" | "error" | "info" | "warning" | "prefix" | "align" | "
|
|
5
|
+
declare const InputPresentationStyle: import("styled-components").StyledComponent<"div", any, Pick<InputContextProps, "hasFocus"> & Pick<CommonInputPresentationProps, "disabled" | "error" | "info" | "warning" | "prefix" | "align" | "size" | "readOnly" | "borderRadius" | "hasIcon" | "hideBorders"> & Pick<CarbonProviderProps, "validationRedesignOptIn">, never>;
|
|
6
6
|
export default InputPresentationStyle;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { BorderRadiusType } from "../../components/box/box.component";
|
|
3
|
-
export
|
|
3
|
+
export type EnterKeyHintTypes = "enter" | "done" | "go" | "next" | "previous" | "search" | "send";
|
|
4
4
|
export interface CommonInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "type"> {
|
|
5
5
|
align?: "right" | "left";
|
|
6
6
|
/** The id of the element that describe the input. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const StyledBackdrop: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
2
|
-
|
|
2
|
+
type StyledPopoverContentProps = {
|
|
3
3
|
isOpen?: boolean;
|
|
4
4
|
};
|
|
5
5
|
export declare const StyledPopoverContent: import("styled-components").StyledComponent<"div", any, StyledPopoverContentProps, never>;
|
|
@@ -17,7 +17,7 @@ export interface ValidationProps {
|
|
|
17
17
|
*/
|
|
18
18
|
warning?: boolean | string;
|
|
19
19
|
}
|
|
20
|
-
|
|
20
|
+
type TooltipPositions = "top" | "bottom" | "left" | "right";
|
|
21
21
|
export interface ValidationIconProps extends ValidationProps, Pick<MarginProps, "mr" | "ml"> {
|
|
22
22
|
/** A small string to indicate the size of the icon */
|
|
23
23
|
size?: "small" | "medium" | "large";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ValidationIconProps } from "./validation-icon.component";
|
|
2
|
-
|
|
2
|
+
type ValidationType = "error" | "warning" | "info";
|
|
3
3
|
declare const ValidationIconStyle: import("styled-components").StyledComponent<"span", any, ValidationIconProps & {
|
|
4
4
|
validationType: ValidationType;
|
|
5
5
|
}, never>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { MarginProps } from "styled-system";
|
|
3
3
|
import { TagProps } from "../../../__internal__/utils/helpers/tags";
|
|
4
|
-
|
|
4
|
+
type AccordionGroupChild = React.ReactElement | boolean | null | undefined | AccordionGroupChildArray;
|
|
5
5
|
interface AccordionGroupChildArray extends Array<AccordionGroupChild> {
|
|
6
6
|
}
|
|
7
7
|
export interface AccordionGroupProps extends MarginProps, TagProps {
|
|
@@ -72,8 +72,8 @@ const StyledAccordionIcon = styled(Icon)`
|
|
|
72
72
|
isExpanded,
|
|
73
73
|
iconAlign
|
|
74
74
|
}) => {
|
|
75
|
-
return isExpanded && (iconAlign === "right" ? "transform: rotate(180deg)" : "transform: rotate(-180deg)");
|
|
76
|
-
}}
|
|
75
|
+
return isExpanded && (iconAlign === "right" ? "transform: rotate(180deg);" : "transform: rotate(-180deg);");
|
|
76
|
+
}}
|
|
77
77
|
|
|
78
78
|
color: var(--colorsActionMinor500);
|
|
79
79
|
`;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
|
|
2
|
+
type ReactItem = React.ReactChild | React.ReactFragment | React.ReactPortal;
|
|
3
3
|
export declare const getItems: (children: React.ReactNode | React.ReactNode[]) => ReactItem[];
|
|
4
4
|
export declare const isItemDisabled: (item: ReactItem) => boolean;
|
|
5
5
|
export declare const findFirstFocusableItem: (items: ReactItem[]) => number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
export
|
|
3
|
-
|
|
2
|
+
export type Alignment = "left" | "right";
|
|
3
|
+
type ActionPopoverContextType = {
|
|
4
4
|
setOpenPopover: (isOpen: boolean) => void;
|
|
5
5
|
focusButton: () => void;
|
|
6
6
|
submenuPosition: Alignment;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { ButtonIconPosition, ButtonTypes, SizeOptions } from "../../button/button.component";
|
|
3
3
|
import { IconType } from "../../icon";
|
|
4
|
-
export
|
|
4
|
+
export type ActionPopoverMenuButtonAria = {
|
|
5
5
|
"aria-haspopup": string;
|
|
6
6
|
"aria-label"?: string;
|
|
7
7
|
"aria-labelledby"?: string;
|
|
@@ -40,7 +40,7 @@ export interface ActionPopoverProps extends MarginProps, TagProps {
|
|
|
40
40
|
/** Prop to specify an aria-describedby for the component */
|
|
41
41
|
"aria-describedby"?: string;
|
|
42
42
|
}
|
|
43
|
-
export
|
|
43
|
+
export type ActionPopoverHandle = {
|
|
44
44
|
focusButton: () => void;
|
|
45
45
|
} | null;
|
|
46
46
|
export declare const ActionPopover: React.ForwardRefExoticComponent<ActionPopoverProps & React.RefAttributes<ActionPopoverHandle>>;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
declare const Menu: import("styled-components").StyledComponent<"ul", any, {
|
|
3
3
|
isOpen?: boolean | undefined;
|
|
4
4
|
}, never>;
|
|
5
|
-
|
|
5
|
+
type StyledMenuItemProps = {
|
|
6
6
|
isDisabled: boolean;
|
|
7
7
|
horizontalAlignment?: "left" | "right";
|
|
8
8
|
submenuPosition?: "left" | "right";
|
|
@@ -7,7 +7,7 @@ interface StyledBadgeProps {
|
|
|
7
7
|
isHovered?: boolean;
|
|
8
8
|
}
|
|
9
9
|
declare const StyledBadge: import("styled-components").StyledComponent<"span", any, {
|
|
10
|
-
as: import("react").ForwardRefExoticComponent<import("../button").ButtonProps & import("react").RefAttributes<HTMLButtonElement>> | undefined;
|
|
10
|
+
as: import("react").ForwardRefExoticComponent<import("../button").ButtonProps & import("react").RefAttributes<HTMLAnchorElement | HTMLButtonElement>> | undefined;
|
|
11
11
|
} & StyledBadgeProps, "as">;
|
|
12
12
|
declare const StyledCrossIcon: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../icon").IconProps & import("react").RefAttributes<HTMLSpanElement>>, any, {}, never>;
|
|
13
13
|
export { StyledBadge, StyledBadgeWrapper, StyledCrossIcon, StyledCounter };
|
|
@@ -3,12 +3,12 @@ import { SpaceProps, LayoutProps, FlexboxProps, PositionProps, GridProps } from
|
|
|
3
3
|
import * as DesignTokens from "@sage/design-tokens/js/base/common";
|
|
4
4
|
import { Gap } from "style/utils/box-gap";
|
|
5
5
|
import { TagProps } from "../../__internal__/utils/helpers/tags";
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
export
|
|
6
|
+
export type OverflowWrap = "break-word" | "anywhere";
|
|
7
|
+
export type ScrollVariant = "light" | "dark";
|
|
8
|
+
export type BoxSizing = "content-box" | "border-box";
|
|
9
|
+
type DesignTokensType = keyof typeof DesignTokens;
|
|
10
|
+
type BoxShadowsType = Extract<DesignTokensType, `boxShadow${string}`>;
|
|
11
|
+
export type BorderRadiusType = Extract<DesignTokensType, `borderRadius${string}`>;
|
|
12
12
|
export interface BoxProps extends FlexboxProps, Omit<GridProps, "gridGap" | "gridRowGap" | "gridColumnGap">, LayoutProps, Omit<PositionProps, "zIndex">, SpaceProps, TagProps {
|
|
13
13
|
as?: keyof JSX.IntrinsicElements | React.ComponentType<any>;
|
|
14
14
|
/** Set the ID attribute of the Box component */
|
|
@@ -3,9 +3,9 @@ import { SpaceProps } from "styled-system";
|
|
|
3
3
|
import { IconType } from "../icon";
|
|
4
4
|
import { TagProps } from "../../__internal__/utils/helpers/tags/tags";
|
|
5
5
|
import { TooltipPositions } from "../tooltip/tooltip.config";
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
6
|
+
export type ButtonTypes = "primary" | "secondary" | "tertiary" | "darkBackground" | "gradient-grey" | "gradient-white";
|
|
7
|
+
export type SizeOptions = "small" | "medium" | "large";
|
|
8
|
+
export type ButtonIconPosition = "before" | "after";
|
|
9
9
|
export interface ButtonProps extends SpaceProps, TagProps {
|
|
10
10
|
/**
|
|
11
11
|
* Prop to specify the aria-label attribute of the component
|
|
@@ -45,13 +45,13 @@ export interface ButtonProps extends SpaceProps, TagProps {
|
|
|
45
45
|
/** If provided, the text inside a button will not wrap */
|
|
46
46
|
noWrap?: boolean;
|
|
47
47
|
/** Specify a callback triggered on blur */
|
|
48
|
-
onBlur?: (ev: React.FocusEvent<HTMLButtonElement>) => void;
|
|
48
|
+
onBlur?: (ev: React.FocusEvent<HTMLButtonElement | HTMLAnchorElement>) => void;
|
|
49
49
|
/** Specify a callback triggered on change */
|
|
50
|
-
onChange?: (ev: React.ChangeEvent<HTMLButtonElement>) => void;
|
|
50
|
+
onChange?: (ev: React.FormEvent<HTMLButtonElement | HTMLAnchorElement> | React.ChangeEvent<HTMLButtonElement | HTMLAnchorElement>) => void;
|
|
51
51
|
/** Specify a callback triggered on focus */
|
|
52
|
-
onFocus?: (ev: React.FocusEvent<HTMLButtonElement>) => void;
|
|
52
|
+
onFocus?: (ev: React.FocusEvent<HTMLButtonElement | HTMLAnchorElement>) => void;
|
|
53
53
|
/** Specify a callback triggered on keyDown */
|
|
54
|
-
onKeyDown?: (ev: React.KeyboardEvent<HTMLButtonElement>) => void;
|
|
54
|
+
onKeyDown?: (ev: React.KeyboardEvent<HTMLButtonElement | HTMLAnchorElement>) => void;
|
|
55
55
|
/** onClick handler */
|
|
56
56
|
onClick?: (event: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => void;
|
|
57
57
|
/** Assigns a size to the button: "small" | "medium" | "large" */
|
|
@@ -72,5 +72,5 @@ export interface ButtonProps extends SpaceProps, TagProps {
|
|
|
72
72
|
*/
|
|
73
73
|
className?: string;
|
|
74
74
|
}
|
|
75
|
-
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
75
|
+
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
76
76
|
export default Button;
|
|
@@ -99,7 +99,7 @@ const Button = /*#__PURE__*/React.forwardRef(({
|
|
|
99
99
|
if (subtext) {
|
|
100
100
|
!(size === "large") ? process.env.NODE_ENV !== "production" ? invariant(false, "subtext prop has no effect unless the button is large.") : invariant(false) : void 0;
|
|
101
101
|
}
|
|
102
|
-
const [internalRef, setInternalRef] = useState();
|
|
102
|
+
const [internalRef, setInternalRef] = useState(null);
|
|
103
103
|
const {
|
|
104
104
|
inSplitButton,
|
|
105
105
|
onChildButtonClick
|
|
@@ -21,9 +21,10 @@ function stylingForIconOnly(size) {
|
|
|
21
21
|
dimension = "40px";
|
|
22
22
|
}
|
|
23
23
|
return `
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
padding: 0px;
|
|
25
|
+
width: ${dimension};
|
|
26
|
+
min-height: ${dimension};
|
|
27
|
+
`;
|
|
27
28
|
}
|
|
28
29
|
function stylingForType({
|
|
29
30
|
iconOnly,
|
|
@@ -63,7 +64,7 @@ const StyledButton = styled.button`
|
|
|
63
64
|
align-items: center;
|
|
64
65
|
cursor: ${disabled ? "not-allowed" : "pointer"};
|
|
65
66
|
display: inline-flex;
|
|
66
|
-
${noWrap ? "white-space: nowrap
|
|
67
|
+
${noWrap ? "white-space: nowrap" : "flex-flow: wrap"};
|
|
67
68
|
justify-content: center;
|
|
68
69
|
vertical-align: middle;
|
|
69
70
|
outline-offset: 0;
|
|
@@ -92,15 +93,28 @@ const StyledButton = styled.button`
|
|
|
92
93
|
iconType
|
|
93
94
|
}) => css`
|
|
94
95
|
${StyledIcon} {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
96
|
+
${iconOnly && css`
|
|
97
|
+
margin-left: auto;
|
|
98
|
+
margin-right: auto;
|
|
99
|
+
margin-bottom: 1px;
|
|
100
|
+
`}
|
|
101
|
+
${!iconOnly && css`
|
|
102
|
+
margin-bottom: 0px;
|
|
103
|
+
${iconPosition === "after" && `
|
|
104
|
+
margin-left: var(--spacing100);
|
|
105
|
+
margin-right: 0px;
|
|
106
|
+
`}
|
|
107
|
+
${iconPosition === "before" && `
|
|
108
|
+
margin-left: 0px;
|
|
109
|
+
margin-right: var(--spacing100);
|
|
110
|
+
`}
|
|
111
|
+
`}
|
|
112
|
+
|
|
98
113
|
height: ${additionalIconStyle(iconType)};
|
|
99
114
|
width: 20px;
|
|
100
115
|
svg {
|
|
101
116
|
margin-top: 0;
|
|
102
117
|
}
|
|
103
|
-
${iconOnly && "margin-left: auto; margin-right: auto"}
|
|
104
118
|
}
|
|
105
119
|
`}
|
|
106
120
|
`;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ButtonMinorProps } from "./button-minor.component";
|
|
3
|
-
declare const StyledButtonMinor: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../button").ButtonProps & import("react").RefAttributes<HTMLButtonElement>>, any, ButtonMinorProps, never>;
|
|
3
|
+
declare const StyledButtonMinor: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../button").ButtonProps & import("react").RefAttributes<HTMLAnchorElement | HTMLButtonElement>>, any, ButtonMinorProps, never>;
|
|
4
4
|
export default StyledButtonMinor;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { ButtonToggleGroupProps } from ".";
|
|
2
|
-
|
|
2
|
+
type StyledButtonToggleGroupProps = Pick<ButtonToggleGroupProps, "inputWidth" | "fullWidth" | "disabled" | "labelInline">;
|
|
3
3
|
declare const StyledButtonToggleGroup: import("styled-components").StyledComponent<"div", any, StyledButtonToggleGroupProps, never>;
|
|
4
4
|
export default StyledButtonToggleGroup;
|
|
@@ -3,8 +3,8 @@ import { MarginProps } from "styled-system";
|
|
|
3
3
|
import * as DesignTokens from "@sage/design-tokens/js/base/common";
|
|
4
4
|
import { CardContextProps } from "./__internal__/card.context";
|
|
5
5
|
import { TagProps } from "../../__internal__/utils/helpers/tags/tags";
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
type DesignTokensType = keyof typeof DesignTokens;
|
|
7
|
+
type BoxShadowsType = Extract<DesignTokensType, `boxShadow${string}`>;
|
|
8
8
|
export interface CardProps extends MarginProps, Pick<TagProps, "data-element" | "data-role"> {
|
|
9
9
|
/** Action to be executed when card is clicked or enter pressed.
|
|
10
10
|
* Renders a button when passed and no draggable or href props set
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export declare const CARD_SPACING: readonly ["small", "medium", "large"];
|
|
2
2
|
export declare const CARD_ALIGNS: readonly ["left", "center", "right"];
|
|
3
|
-
export
|
|
4
|
-
export
|
|
3
|
+
export type CardAlign = (typeof CARD_ALIGNS)[number];
|
|
4
|
+
export type CardSpacing = (typeof CARD_SPACING)[number];
|
|
@@ -12,8 +12,8 @@ export declare const marginSizes: {
|
|
|
12
12
|
medium: string;
|
|
13
13
|
large: string;
|
|
14
14
|
};
|
|
15
|
-
|
|
16
|
-
export
|
|
15
|
+
type DesignTokensType = keyof typeof DesignTokens;
|
|
16
|
+
export type BoxShadowsType = Extract<DesignTokensType, `boxShadow${string}`>;
|
|
17
17
|
export interface StyledCardProps extends MarginProps, Pick<CardContextProps, "roundness" | "spacing">, Pick<CardProps, "href" | "onClick"> {
|
|
18
18
|
cardWidth: string;
|
|
19
19
|
interactive: boolean;
|
|
@@ -5,7 +5,6 @@ import tagComponent from "../../../__internal__/utils/helpers/tags/tags";
|
|
|
5
5
|
import Fieldset from "../../../__internal__/fieldset";
|
|
6
6
|
import { filterStyledSystemMarginProps } from "../../../style/utils";
|
|
7
7
|
import { TooltipProvider } from "../../../__internal__/tooltip-provider";
|
|
8
|
-
import FormSpacingProvider from "../../../__internal__/form-spacing-provider";
|
|
9
8
|
import NewValidationContext from "../../carbon-provider/__internal__/new-validation.context";
|
|
10
9
|
import ValidationMessage from "../../../__internal__/validation-message/validation-message.component";
|
|
11
10
|
import Box from "../../box";
|
|
@@ -84,9 +83,7 @@ export const CheckboxGroup = ({
|
|
|
84
83
|
error: !!error,
|
|
85
84
|
warning: !!warning
|
|
86
85
|
}
|
|
87
|
-
}, /*#__PURE__*/React.createElement(
|
|
88
|
-
marginBottom: undefined
|
|
89
|
-
}, children))))) : /*#__PURE__*/React.createElement(TooltipProvider, {
|
|
86
|
+
}, children)))) : /*#__PURE__*/React.createElement(TooltipProvider, {
|
|
90
87
|
tooltipPosition: tooltipPosition
|
|
91
88
|
}, /*#__PURE__*/React.createElement(Fieldset, _extends({
|
|
92
89
|
id: uniqueId,
|
|
@@ -114,9 +111,7 @@ export const CheckboxGroup = ({
|
|
|
114
111
|
warning: !!warning,
|
|
115
112
|
info: !!info
|
|
116
113
|
}
|
|
117
|
-
},
|
|
118
|
-
marginBottom: undefined
|
|
119
|
-
}, children))))));
|
|
114
|
+
}, children)))));
|
|
120
115
|
};
|
|
121
116
|
CheckboxGroup.displayName = "CheckboxGroup";
|
|
122
117
|
export default CheckboxGroup;
|
|
@@ -8,8 +8,8 @@ import useIsAboveBreakpoint from "../../hooks/__internal__/useIsAboveBreakpoint"
|
|
|
8
8
|
import { TooltipProvider } from "../../__internal__/tooltip-provider";
|
|
9
9
|
import CheckboxGroupContext from "./checkbox-group/__internal__/checkbox-group.context";
|
|
10
10
|
import Logger from "../../__internal__/utils/logger";
|
|
11
|
-
import useFormSpacing from "../../hooks/__internal__/useFormSpacing";
|
|
12
11
|
import NewValidationContext from "../carbon-provider/__internal__/new-validation.context";
|
|
12
|
+
import { filterStyledSystemMarginProps } from "../../style/utils";
|
|
13
13
|
let deprecateUncontrolledWarnTriggered = false;
|
|
14
14
|
export const Checkbox = /*#__PURE__*/React.forwardRef(({
|
|
15
15
|
"aria-labelledby": ariaLabelledBy,
|
|
@@ -97,7 +97,7 @@ export const Checkbox = /*#__PURE__*/React.forwardRef(({
|
|
|
97
97
|
info: contextInfo || info
|
|
98
98
|
})
|
|
99
99
|
};
|
|
100
|
-
const marginProps =
|
|
100
|
+
const marginProps = filterStyledSystemMarginProps(rest);
|
|
101
101
|
const componentToRender = /*#__PURE__*/React.createElement(CheckboxStyle, _extends({
|
|
102
102
|
disabled: disabled,
|
|
103
103
|
labelSpacing: labelSpacing,
|
|
@@ -9,6 +9,7 @@ import StyledValidationIcon from "../../__internal__/validations/validation-icon
|
|
|
9
9
|
import baseTheme from "../../style/themes/base";
|
|
10
10
|
import addFocusStyling from "../../style/utils/add-focus-styling";
|
|
11
11
|
const StyledCheckbox = styled.div`
|
|
12
|
+
margin-bottom: var(--fieldSpacing);
|
|
12
13
|
${margin}
|
|
13
14
|
${({
|
|
14
15
|
disabled,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MarginProps } from "styled-system";
|
|
2
|
-
export
|
|
3
|
-
export
|
|
2
|
+
export type AlignOptions = "left" | "center" | "right";
|
|
3
|
+
export type VariantOptions = "primary" | "secondary";
|
|
4
4
|
export interface StyledContentProps extends MarginProps {
|
|
5
5
|
/** Aligns the content (left, center or right) */
|
|
6
6
|
align?: AlignOptions;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { DayPickerProps, Modifiers } from "react-day-picker";
|
|
3
|
-
|
|
3
|
+
type CustomRefObject<T> = {
|
|
4
4
|
current?: T | null;
|
|
5
5
|
};
|
|
6
6
|
export interface PickerProps extends Omit<DayPickerProps, "mode" | "modifiers"> {
|
|
@@ -10,7 +10,7 @@ const StyledWeekday = styled.th`
|
|
|
10
10
|
color: var(--colorsActionMinor500);
|
|
11
11
|
text-transform: uppercase;
|
|
12
12
|
font-size: 12px;
|
|
13
|
-
//font: var(--typographyDatePickerCalendarDayM) font assets to be updated part of FE-4975
|
|
13
|
+
//font: var(--typographyDatePickerCalendarDayM); font assets to be updated part of FE-4975
|
|
14
14
|
text-align: center;
|
|
15
15
|
padding: 20px 0 5px;
|
|
16
16
|
box-sizing: border-box;
|
|
@@ -3,14 +3,13 @@ import React, { useContext, useEffect, useMemo, useRef, useState, useCallback }
|
|
|
3
3
|
import { additionalYears, findMatchedFormatAndValue, formattedValue, formatToISO, isDateValid, parseDate, parseISODate, checkISOFormatAndLength, getSeparator, isValidLocaleDate } from "./__internal__/utils";
|
|
4
4
|
import useLocale from "../../hooks/__internal__/useLocale";
|
|
5
5
|
import Events from "../../__internal__/utils/helpers/events";
|
|
6
|
-
import { filterOutStyledSystemSpacingProps } from "../../style/utils";
|
|
6
|
+
import { filterOutStyledSystemSpacingProps, filterStyledSystemMarginProps } from "../../style/utils";
|
|
7
7
|
import getFormatData from "./__internal__/date-formats";
|
|
8
8
|
import StyledDateInput from "./date.style";
|
|
9
9
|
import Textbox from "../textbox";
|
|
10
10
|
import DatePicker from "./__internal__/date-picker";
|
|
11
11
|
import DateRangeContext from "../date-range/__internal__/date-range.context";
|
|
12
12
|
import useClickAwayListener from "../../hooks/__internal__/useClickAwayListener";
|
|
13
|
-
import useFormSpacing from "../../hooks/__internal__/useFormSpacing";
|
|
14
13
|
import guid from "../../__internal__/utils/helpers/guid";
|
|
15
14
|
import tagComponent from "../../__internal__/utils/helpers/tags/tags";
|
|
16
15
|
export const DateInput = /*#__PURE__*/React.forwardRef(({
|
|
@@ -282,7 +281,7 @@ export const DateInput = /*#__PURE__*/React.forwardRef(({
|
|
|
282
281
|
}
|
|
283
282
|
return value;
|
|
284
283
|
};
|
|
285
|
-
const marginProps =
|
|
284
|
+
const marginProps = filterStyledSystemMarginProps(rest);
|
|
286
285
|
return /*#__PURE__*/React.createElement(StyledDateInput, _extends({
|
|
287
286
|
ref: wrapperRef,
|
|
288
287
|
role: "presentation",
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
export
|
|
3
|
-
|
|
2
|
+
export type InputName = "start" | "end";
|
|
3
|
+
type IsBlurBlocked = {
|
|
4
4
|
current: boolean;
|
|
5
5
|
};
|
|
6
|
-
|
|
7
|
-
export
|
|
6
|
+
type SetOpen = null | ((value: boolean) => void);
|
|
7
|
+
export type SetInputRefMapValue = {
|
|
8
8
|
[id in InputName]?: {
|
|
9
9
|
isBlurBlocked: IsBlurBlocked;
|
|
10
10
|
setOpen: SetOpen;
|
|
@@ -5,6 +5,7 @@ import { StyledLabelContainer } from "../../__internal__/label/label.style";
|
|
|
5
5
|
import { StyledInputPresentationContainer } from "../../__internal__/input/input-presentation.style";
|
|
6
6
|
import baseTheme from "../../style/themes/base";
|
|
7
7
|
const StyledDateRange = styled.div`
|
|
8
|
+
margin-bottom: var(--fieldSpacing);
|
|
8
9
|
${margin}
|
|
9
10
|
|
|
10
11
|
& ${StyledDateInput} {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
export
|
|
2
|
+
export type ElementAlignment = "left" | "center" | "right";
|
|
3
3
|
export interface DlContextProps {
|
|
4
4
|
/** Render the DefinitionList as a single column */
|
|
5
5
|
asSingleColumn?: boolean;
|