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
|
@@ -12,12 +12,12 @@ var _tooltipProvider = require("../../__internal__/tooltip-provider");
|
|
|
12
12
|
var _newValidation = _interopRequireDefault(require("../carbon-provider/__internal__/new-validation.context"));
|
|
13
13
|
var _logger = _interopRequireDefault(require("../../__internal__/utils/logger"));
|
|
14
14
|
var _validationMessage = _interopRequireDefault(require("../../__internal__/validation-message/validation-message.component"));
|
|
15
|
-
var _useFormSpacing = _interopRequireDefault(require("../../hooks/__internal__/useFormSpacing"));
|
|
16
15
|
var _useIsAboveBreakpoint = _interopRequireDefault(require("../../hooks/__internal__/useIsAboveBreakpoint"));
|
|
17
16
|
var _switch = _interopRequireWildcard(require("./switch.style"));
|
|
18
17
|
var _switchSlider = _interopRequireDefault(require("./__internal__/switch-slider.component"));
|
|
19
18
|
var _guid = _interopRequireDefault(require("../../__internal__/utils/helpers/guid"));
|
|
20
19
|
var _hintText = _interopRequireDefault(require("../../__internal__/hint-text"));
|
|
20
|
+
var _utils = require("../../style/utils");
|
|
21
21
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
22
22
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
23
23
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
@@ -80,7 +80,7 @@ const Switch = exports.Switch = /*#__PURE__*/_react.default.forwardRef(({
|
|
|
80
80
|
shouldLabelBeInline = largeScreen;
|
|
81
81
|
}
|
|
82
82
|
const shouldValidationBeOnLabel = labelInline && !reverse ? true : validationOnLabel;
|
|
83
|
-
const marginProps = (0,
|
|
83
|
+
const marginProps = (0, _utils.filterStyledSystemMarginProps)(rest);
|
|
84
84
|
const switchStyleProps = {
|
|
85
85
|
"data-component": "switch",
|
|
86
86
|
"data-role": dataRole,
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
+
import { ThemeObject } from "../../style/themes/base";
|
|
2
|
+
import { SwitchProps } from "./switch.component";
|
|
3
|
+
interface StyledSwitchProps extends Pick<SwitchProps, "fieldHelpInline" | "labelInline" | "reverse" | "size"> {
|
|
4
|
+
theme: ThemeObject;
|
|
5
|
+
}
|
|
1
6
|
export declare const ErrorBorder: import("styled-components").StyledComponent<"span", any, {
|
|
2
7
|
reverse: boolean;
|
|
3
8
|
warning: boolean;
|
|
4
9
|
isDarkBackground: boolean;
|
|
5
10
|
}, never>;
|
|
6
|
-
declare const StyledSwitch: import("styled-components").StyledComponent<"div", any,
|
|
11
|
+
declare const StyledSwitch: import("styled-components").StyledComponent<"div", any, StyledSwitchProps, never>;
|
|
7
12
|
export default StyledSwitch;
|
|
@@ -391,10 +391,9 @@ const tabTitleStyles = (0, _styledComponents.css)`
|
|
|
391
391
|
border-bottom: 0px;
|
|
392
392
|
|
|
393
393
|
${!isInSidebar && !error && (0, _styledComponents.css)`
|
|
394
|
-
--border-right-value: ${validationRedesignOptIn ? "0px" : "2px"}
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
var(--colorsActionMinor100);
|
|
394
|
+
--border-right-value: ${validationRedesignOptIn ? "0px" : "2px"};
|
|
395
|
+
border-right: ${alternateStyling ? "1px" : "var(--border-right-value)"}
|
|
396
|
+
solid var(--colorsActionMinor100);
|
|
398
397
|
`}
|
|
399
398
|
|
|
400
399
|
${!borders && (0, _styledComponents.css)`
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { TabHeaderProps } from "./tabs-header.component";
|
|
2
|
-
|
|
2
|
+
type StyledTabsHeaderWrapperProps = Pick<TabHeaderProps, "position" | "isInSidebar">;
|
|
3
3
|
declare const StyledTabsHeaderWrapper: import("styled-components").StyledComponent<"div", any, StyledTabsHeaderWrapperProps, never>;
|
|
4
|
-
export
|
|
4
|
+
export type StyledTabsHeaderListProps = Pick<TabHeaderProps, "align" | "extendedLine" | "noRightBorder" | "isInSidebar" | "position">;
|
|
5
5
|
declare const StyledTabsHeaderList: import("styled-components").StyledComponent<"div", any, StyledTabsHeaderListProps, never>;
|
|
6
|
-
|
|
6
|
+
type StyledVerticalTabsWrapperProps = Pick<TabHeaderProps, "isInSidebar">;
|
|
7
7
|
declare const StyledVerticalTabsWrapper: import("styled-components").StyledComponent<"div", any, StyledVerticalTabsWrapperProps, never>;
|
|
8
|
-
|
|
8
|
+
type StyledWrapperProps = {
|
|
9
9
|
align: string;
|
|
10
10
|
position: string;
|
|
11
11
|
role?: string;
|
|
@@ -13,7 +13,7 @@ declare type StyledWrapperProps = {
|
|
|
13
13
|
noRightBorder?: boolean;
|
|
14
14
|
isInSidebar?: boolean;
|
|
15
15
|
};
|
|
16
|
-
|
|
16
|
+
type StyledNavigationButtonWrapperProps = {
|
|
17
17
|
position: string;
|
|
18
18
|
visible: boolean;
|
|
19
19
|
size: string;
|
|
@@ -115,10 +115,13 @@ const StyledNavigationButtonWrapper = exports.StyledNavigationButtonWrapper = _s
|
|
|
115
115
|
visible,
|
|
116
116
|
size
|
|
117
117
|
}) => (0, _styledComponents.css)`
|
|
118
|
-
height: ${size === "default" ? "48px" : "56px"}
|
|
118
|
+
height: ${size === "default" ? "48px" : "56px"};
|
|
119
119
|
z-index: 8;
|
|
120
120
|
display: ${visible ? "block" : "none"};
|
|
121
|
-
${position === "right" && `
|
|
121
|
+
${position === "right" && `
|
|
122
|
+
right: 0;
|
|
123
|
+
position: absolute;
|
|
124
|
+
`}
|
|
122
125
|
`}
|
|
123
126
|
`;
|
|
124
127
|
const StyledNavigationButton = exports.StyledNavigationButton = _styledComponents.default.button`
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ThemeObject } from "../../../style/themes/base";
|
|
2
2
|
import { TabProps } from ".";
|
|
3
|
-
export
|
|
3
|
+
export type StyledTabProps = Pick<TabProps, "position" | "isTabSelected"> & {
|
|
4
4
|
theme?: ThemeObject;
|
|
5
5
|
};
|
|
6
6
|
declare const StyledTab: import("styled-components").StyledComponent<"div", any, Pick<TabProps, "position" | "isTabSelected"> & {
|
|
@@ -7,5 +7,5 @@ interface FormattingButtonProps extends ButtonProps {
|
|
|
7
7
|
declare const StyledToolbar: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
8
8
|
declare const FormattingButtons: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
9
9
|
declare const CommandButtons: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
10
|
-
declare const FormattingButton: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<ButtonProps & import("react").RefAttributes<HTMLButtonElement>>, any, FormattingButtonProps, never>;
|
|
10
|
+
declare const FormattingButton: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<ButtonProps & import("react").RefAttributes<HTMLAnchorElement | HTMLButtonElement>>, any, FormattingButtonProps, never>;
|
|
11
11
|
export { StyledToolbar, FormattingButtons, CommandButtons, FormattingButton };
|
|
@@ -15,6 +15,7 @@ const StyledTextEditor = exports.StyledTextEditor = (0, _styledComponents.defaul
|
|
|
15
15
|
position: relative;
|
|
16
16
|
`;
|
|
17
17
|
const StyledTextEditorWrapper = exports.StyledTextEditorWrapper = _styledComponents.default.div`
|
|
18
|
+
margin-bottom: var(--fieldSpacing);
|
|
18
19
|
${_styledSystem.margin}
|
|
19
20
|
`;
|
|
20
21
|
const StyledWrapper = exports.StyledWrapper = _styledComponents.default.div`
|
|
@@ -21,8 +21,8 @@ var _textbox = _interopRequireDefault(require("../textbox/textbox.style"));
|
|
|
21
21
|
var _validationMessage = _interopRequireDefault(require("../../__internal__/validation-message"));
|
|
22
22
|
var _box = _interopRequireDefault(require("../box"));
|
|
23
23
|
var _logger = _interopRequireDefault(require("../../__internal__/utils/logger"));
|
|
24
|
-
var _useFormSpacing = _interopRequireDefault(require("../../hooks/__internal__/useFormSpacing"));
|
|
25
24
|
var _hintText = _interopRequireDefault(require("../../__internal__/hint-text"));
|
|
25
|
+
var _utils = require("../../style/utils");
|
|
26
26
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
27
27
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
28
28
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
@@ -222,7 +222,7 @@ const Textarea = exports.OriginalTextarea = exports.Textarea = /*#__PURE__*/_rea
|
|
|
222
222
|
validationIconId: validationRedesignOptIn ? undefined : validationId,
|
|
223
223
|
useValidationIcon: !(validationRedesignOptIn || validationOnLabel)
|
|
224
224
|
}));
|
|
225
|
-
const marginProps = (0,
|
|
225
|
+
const marginProps = (0, _utils.filterStyledSystemMarginProps)(rest);
|
|
226
226
|
return /*#__PURE__*/_react.default.createElement(_tooltipProvider.TooltipProvider, {
|
|
227
227
|
tooltipPosition: tooltipPosition,
|
|
228
228
|
helpAriaLabel: helpAriaLabel
|
|
@@ -252,7 +252,8 @@ const Textarea = exports.OriginalTextarea = exports.Textarea = /*#__PURE__*/_rea
|
|
|
252
252
|
isOptional: isOptional,
|
|
253
253
|
useValidationIcon: computeLabelPropValues(validationOnLabel),
|
|
254
254
|
adaptiveLabelBreakpoint: adaptiveLabelBreakpoint,
|
|
255
|
-
validationRedesignOptIn: validationRedesignOptIn
|
|
255
|
+
validationRedesignOptIn: validationRedesignOptIn,
|
|
256
|
+
my: 0 // prevents any form spacing being applied
|
|
256
257
|
}, (inputHint || labelHelp && validationRedesignOptIn) && /*#__PURE__*/_react.default.createElement(_hintText.default, {
|
|
257
258
|
align: labelAlign,
|
|
258
259
|
id: inputHintId,
|
|
@@ -15,6 +15,7 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
|
|
|
15
15
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
16
16
|
const DEFAULT_MIN_HEIGHT = exports.DEFAULT_MIN_HEIGHT = 64;
|
|
17
17
|
const StyledTextarea = _styledComponents.default.div`
|
|
18
|
+
margin-bottom: var(--fieldSpacing);
|
|
18
19
|
${_styledSystem.margin};
|
|
19
20
|
|
|
20
21
|
${_input.default} {
|
|
@@ -27,7 +28,7 @@ const StyledTextarea = _styledComponents.default.div`
|
|
|
27
28
|
|
|
28
29
|
${({
|
|
29
30
|
hasIcon
|
|
30
|
-
}) => hasIcon && "padding-right: var(--spacing500)"}
|
|
31
|
+
}) => hasIcon && "padding-right: var(--spacing500);"}
|
|
31
32
|
}
|
|
32
33
|
|
|
33
34
|
${({
|
|
@@ -229,7 +229,7 @@ const Textbox = exports.Textbox = /*#__PURE__*/_react.default.forwardRef(({
|
|
|
229
229
|
warning: warning
|
|
230
230
|
}), !disableErrorBorder && (error || warning) && /*#__PURE__*/_react.default.createElement(_textbox.default, {
|
|
231
231
|
warning: !!(!error && warning)
|
|
232
|
-
}), input) : input
|
|
232
|
+
}), input) : input, characterCount)));
|
|
233
233
|
});
|
|
234
234
|
Textbox.displayName = "Textbox";
|
|
235
235
|
var _default = exports.default = Textbox;
|
|
@@ -3,8 +3,8 @@ import * as DesignTokens from "@sage/design-tokens/js/base/common";
|
|
|
3
3
|
import { SpaceProps, WidthProps } from "styled-system";
|
|
4
4
|
import { TagProps } from "../../__internal__/utils/helpers/tags";
|
|
5
5
|
import { TILE_HIGHLIGHT_VARIANTS } from "./tile.config";
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
type DesignTokensType = keyof typeof DesignTokens;
|
|
7
|
+
type HighlightVariantType = (typeof TILE_HIGHLIGHT_VARIANTS)[number];
|
|
8
8
|
export interface TileProps extends SpaceProps, WidthProps, TagProps {
|
|
9
9
|
/** Sets the theme of the tile */
|
|
10
10
|
variant?: "tile" | "transparent" | "active" | "grey";
|
|
@@ -4,8 +4,8 @@ import { ValidationProps } from "../../__internal__/validations";
|
|
|
4
4
|
import { TagProps } from "../../__internal__/utils/helpers/tags";
|
|
5
5
|
import { Sizes } from "../../__internal__/input/input-presentation.component";
|
|
6
6
|
import { ToggleDataProps } from "./__internal__/time-toggle";
|
|
7
|
-
export
|
|
8
|
-
export
|
|
7
|
+
export type ToggleValue = "AM" | "PM";
|
|
8
|
+
export type TimeValue = {
|
|
9
9
|
hours: string;
|
|
10
10
|
minutes: string;
|
|
11
11
|
period?: ToggleValue;
|
|
@@ -69,7 +69,7 @@ export interface TimeProps extends TagProps, MarginProps {
|
|
|
69
69
|
/** Set custom data- attributes on the toggle elements */
|
|
70
70
|
toggleProps?: ToggleDataProps;
|
|
71
71
|
}
|
|
72
|
-
export
|
|
72
|
+
export type TimeHandle = {
|
|
73
73
|
/** Programmatically focus the hours input. */
|
|
74
74
|
focusHoursInput: () => void;
|
|
75
75
|
/** Programmatically focus the minutes input. */
|
|
@@ -9,6 +9,7 @@ var _guid = _interopRequireDefault(require("../../__internal__/utils/helpers/gui
|
|
|
9
9
|
var _useLocale = _interopRequireDefault(require("../../hooks/__internal__/useLocale"));
|
|
10
10
|
var _tags = _interopRequireDefault(require("../../__internal__/utils/helpers/tags/tags"));
|
|
11
11
|
var _useInputAccessibility = _interopRequireDefault(require("../../hooks/__internal__/useInputAccessibility"));
|
|
12
|
+
var _utils = require("../../style/utils");
|
|
12
13
|
var _fieldset = _interopRequireDefault(require("../../__internal__/fieldset"));
|
|
13
14
|
var _box = _interopRequireDefault(require("../box"));
|
|
14
15
|
var _textbox = _interopRequireDefault(require("../textbox/textbox.style"));
|
|
@@ -179,7 +180,7 @@ const Time = /*#__PURE__*/_react.default.forwardRef(({
|
|
|
179
180
|
isDisabled: disabled,
|
|
180
181
|
name: name,
|
|
181
182
|
id: internalId.current
|
|
182
|
-
}, rest, (0, _tags.default)("time", rest), {
|
|
183
|
+
}, rest, (0, _utils.filterStyledSystemMarginProps)(rest), (0, _tags.default)("time", rest), {
|
|
183
184
|
"aria-describedby": inputHint ? combinedAriaDescribedBy : ariaDescribedBy
|
|
184
185
|
}), inputHint && /*#__PURE__*/_react.default.createElement(_hintText.default, {
|
|
185
186
|
align: labelAlign,
|
|
@@ -213,7 +214,8 @@ const Time = /*#__PURE__*/_react.default.forwardRef(({
|
|
|
213
214
|
error: !!hoursError,
|
|
214
215
|
warning: !!hoursWarning,
|
|
215
216
|
disabled: disabled,
|
|
216
|
-
readOnly: readOnly
|
|
217
|
+
readOnly: readOnly,
|
|
218
|
+
my: 0 // prevents any form spacing being applied
|
|
217
219
|
}))), /*#__PURE__*/_react.default.createElement(_box.default, {
|
|
218
220
|
display: "flex",
|
|
219
221
|
flexDirection: "column",
|
|
@@ -241,7 +243,8 @@ const Time = /*#__PURE__*/_react.default.forwardRef(({
|
|
|
241
243
|
error: !!minutesError,
|
|
242
244
|
warning: !!minutesWarning,
|
|
243
245
|
disabled: disabled,
|
|
244
|
-
readOnly: readOnly
|
|
246
|
+
readOnly: readOnly,
|
|
247
|
+
my: 0 // prevents any form spacing being applied
|
|
245
248
|
}))), showToggle && /*#__PURE__*/_react.default.createElement(_box.default, {
|
|
246
249
|
display: "flex",
|
|
247
250
|
flexDirection: "column",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { TagProps } from "../../__internal__/utils/helpers/tags/tags";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
type ToastVariants = "error" | "info" | "success" | "warning" | "notice" | "neutral" | "notification";
|
|
4
|
+
type AlignOptions = "left" | "center" | "right";
|
|
5
|
+
type AlignYOptions = "top" | "center" | "bottom";
|
|
6
6
|
export interface ToastProps extends TagProps {
|
|
7
7
|
/** Sets the horizontal alignment of the component. */
|
|
8
8
|
align?: AlignOptions;
|
|
@@ -6,8 +6,8 @@ declare const StyledPortal: import("styled-components").StyledComponent<({ child
|
|
|
6
6
|
alignY?: "center" | "top" | "bottom" | undefined;
|
|
7
7
|
isNotice?: boolean | undefined;
|
|
8
8
|
}, never>;
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
type ToastVariants = MessageVariant;
|
|
10
|
+
type ToastStyleProps = {
|
|
11
11
|
align?: "left" | "center" | "right";
|
|
12
12
|
alignY?: "top" | "center" | "bottom";
|
|
13
13
|
maxWidth?: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { TooltipPositions } from "./tooltip.config";
|
|
3
3
|
import { TagProps } from "../../__internal__/utils/helpers/tags/tags";
|
|
4
|
-
export
|
|
4
|
+
export type InputSizes = "small" | "medium" | "large";
|
|
5
5
|
export interface TooltipProps extends TagProps {
|
|
6
6
|
/** The message to be displayed within the tooltip */
|
|
7
7
|
message: React.ReactNode;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare const TOOLTIP_POSITIONS: string[];
|
|
2
|
-
export
|
|
2
|
+
export type TooltipPositions = "top" | "bottom" | "left" | "right";
|
|
@@ -2,7 +2,7 @@ import React from "react";
|
|
|
2
2
|
import { SpaceProps } from "styled-system";
|
|
3
3
|
import { TagProps } from "../../__internal__/utils/helpers/tags";
|
|
4
4
|
export declare const VARIANT_TYPES: readonly ["h1-large", "h1", "h2", "h3", "h4", "h5", "segment-header", "segment-header-small", "segment-subheader", "segment-subheader-alt", "p", "span", "small", "big", "sup", "sub", "strong", "b", "em", "ul", "ol"];
|
|
5
|
-
export
|
|
5
|
+
export type VariantTypes = (typeof VARIANT_TYPES)[number];
|
|
6
6
|
export interface TypographyProps extends SpaceProps, TagProps {
|
|
7
7
|
/** Override the variant component */
|
|
8
8
|
as?: React.ElementType;
|
|
@@ -11,6 +11,21 @@ var _typography = _interopRequireDefault(require("./typography.style"));
|
|
|
11
11
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
12
|
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); }
|
|
13
13
|
const VARIANT_TYPES = exports.VARIANT_TYPES = ["h1-large", "h1", "h2", "h3", "h4", "h5", "segment-header", "segment-header-small", "segment-subheader", "segment-subheader-alt", "p", "span", "small", "big", "sup", "sub", "strong", "b", "em", "ul", "ol"];
|
|
14
|
+
const getAs = variant => {
|
|
15
|
+
switch (variant) {
|
|
16
|
+
case "h1-large":
|
|
17
|
+
return "h1";
|
|
18
|
+
case "segment-header":
|
|
19
|
+
case "segment-header-small":
|
|
20
|
+
case "segment-subheader":
|
|
21
|
+
case "segment-subheader-alt":
|
|
22
|
+
return "h5";
|
|
23
|
+
case "big":
|
|
24
|
+
return "p";
|
|
25
|
+
default:
|
|
26
|
+
return variant;
|
|
27
|
+
}
|
|
28
|
+
};
|
|
14
29
|
const Typography = ({
|
|
15
30
|
"data-component": dataComponent,
|
|
16
31
|
variant = "p",
|
|
@@ -42,7 +57,7 @@ const Typography = ({
|
|
|
42
57
|
}) => {
|
|
43
58
|
return /*#__PURE__*/_react.default.createElement(_typography.default, _extends({
|
|
44
59
|
variant: variant,
|
|
45
|
-
as: as,
|
|
60
|
+
as: as || getAs(variant),
|
|
46
61
|
id: id,
|
|
47
62
|
fontSize: fontSize,
|
|
48
63
|
fontWeight: fontWeight,
|
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { TypographyProps } from "./typography.component";
|
|
3
|
-
declare const StyledTypography: import("styled-components").StyledComponent<"span", any,
|
|
4
|
-
as: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
5
|
-
size: string;
|
|
6
|
-
weight: string;
|
|
7
|
-
textTransform: string;
|
|
8
|
-
textDecoration: string;
|
|
9
|
-
lineHeight: string;
|
|
10
|
-
defaultMargin: string;
|
|
11
|
-
} & TypographyProps, "textDecoration" | "size" | "as" | "weight" | "textTransform" | "lineHeight" | "defaultMargin">;
|
|
2
|
+
declare const StyledTypography: import("styled-components").StyledComponent<"span", any, TypographyProps, never>;
|
|
12
3
|
export default StyledTypography;
|
|
@@ -12,21 +12,6 @@ var _visuallyHidden = _interopRequireDefault(require("../../style/utils/visually
|
|
|
12
12
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
13
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
14
14
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
15
|
-
const getAs = variant => {
|
|
16
|
-
switch (variant) {
|
|
17
|
-
case "h1-large":
|
|
18
|
-
return "h1";
|
|
19
|
-
case "segment-header":
|
|
20
|
-
case "segment-header-small":
|
|
21
|
-
case "segment-subheader":
|
|
22
|
-
case "segment-subheader-alt":
|
|
23
|
-
return "h5";
|
|
24
|
-
case "big":
|
|
25
|
-
return "p";
|
|
26
|
-
default:
|
|
27
|
-
return variant;
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
15
|
const getSize = variant => {
|
|
31
16
|
switch (variant) {
|
|
32
17
|
case "h1-large":
|
|
@@ -134,67 +119,57 @@ const getDecoration = variant => {
|
|
|
134
119
|
}
|
|
135
120
|
return "none";
|
|
136
121
|
};
|
|
137
|
-
const StyledTypography = _styledComponents.default.span
|
|
138
|
-
|
|
139
|
-
as,
|
|
122
|
+
const StyledTypography = _styledComponents.default.span`
|
|
123
|
+
${({
|
|
140
124
|
fontSize,
|
|
141
125
|
fontWeight,
|
|
142
|
-
textTransform,
|
|
143
|
-
lineHeight,
|
|
144
|
-
textDecoration
|
|
145
|
-
}) => {
|
|
146
|
-
return {
|
|
147
|
-
as: as || getAs(variant),
|
|
148
|
-
size: fontSize || getSize(variant),
|
|
149
|
-
weight: fontWeight || getWeight(variant),
|
|
150
|
-
textTransform: textTransform || getTransform(variant),
|
|
151
|
-
textDecoration: textDecoration || getDecoration(variant),
|
|
152
|
-
lineHeight: lineHeight || getLineHeight(variant),
|
|
153
|
-
defaultMargin: variant === "p" ? "0 0 16px" : "0"
|
|
154
|
-
};
|
|
155
|
-
})`
|
|
156
|
-
${({
|
|
157
|
-
size,
|
|
158
|
-
weight,
|
|
159
|
-
textTransform,
|
|
160
|
-
lineHeight,
|
|
161
|
-
defaultMargin,
|
|
162
|
-
textDecoration,
|
|
163
126
|
display,
|
|
164
127
|
variant,
|
|
128
|
+
lineHeight: lHeight,
|
|
165
129
|
listStyleType,
|
|
166
130
|
whiteSpace,
|
|
167
131
|
wordBreak,
|
|
168
132
|
wordWrap,
|
|
169
133
|
textAlign,
|
|
134
|
+
textDecoration: decoration,
|
|
170
135
|
textOverflow,
|
|
136
|
+
textTransform: transform,
|
|
171
137
|
truncate,
|
|
172
138
|
screenReaderOnly
|
|
173
|
-
}) =>
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
139
|
+
}) => {
|
|
140
|
+
const size = fontSize || getSize(variant);
|
|
141
|
+
const weight = fontWeight || getWeight(variant);
|
|
142
|
+
const textTransform = transform || getTransform(variant);
|
|
143
|
+
const textDecoration = decoration || getDecoration(variant);
|
|
144
|
+
const lineHeight = lHeight || getLineHeight(variant);
|
|
145
|
+
const defaultMargin = variant === "p" ? "0 0 16px" : "0";
|
|
146
|
+
return (0, _styledComponents.css)`
|
|
147
|
+
font-style: normal;
|
|
148
|
+
font-size: ${size};
|
|
149
|
+
font-weight: ${weight};
|
|
150
|
+
text-transform: ${textTransform};
|
|
151
|
+
text-decoration: ${textDecoration};
|
|
152
|
+
line-height: ${lineHeight};
|
|
153
|
+
margin: ${defaultMargin};
|
|
154
|
+
padding: 0;
|
|
155
|
+
white-space: ${truncate ? "nowrap" : whiteSpace};
|
|
156
|
+
word-break: ${wordBreak};
|
|
157
|
+
word-wrap: ${wordWrap};
|
|
158
|
+
text-align: ${textAlign};
|
|
159
|
+
text-overflow: ${textOverflow || truncate && "ellipsis"};
|
|
160
|
+
${truncate && `
|
|
161
|
+
overflow: hidden;
|
|
162
|
+
`};
|
|
163
|
+
${screenReaderOnly && _visuallyHidden.default}
|
|
164
|
+
${variant === "sup" && "vertical-align: super;"}
|
|
165
|
+
${variant === "sub" && "vertical-align: sub;"}
|
|
166
|
+
${display && `display: ${display};`}
|
|
167
|
+
${listStyleType && `list-style-type: ${listStyleType};`}
|
|
168
|
+
`;
|
|
169
|
+
}}
|
|
196
170
|
${_styledSystem.space}
|
|
197
|
-
|
|
171
|
+
|
|
172
|
+
${({
|
|
198
173
|
color,
|
|
199
174
|
bg,
|
|
200
175
|
backgroundColor,
|
|
@@ -205,6 +180,7 @@ const StyledTypography = _styledComponents.default.span.attrs(({
|
|
|
205
180
|
backgroundColor,
|
|
206
181
|
...rest
|
|
207
182
|
})}
|
|
183
|
+
|
|
208
184
|
${({
|
|
209
185
|
isDisabled
|
|
210
186
|
}) => isDisabled && (0, _styledComponents.css)`
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SpaceProps } from "styled-system";
|
|
2
2
|
import { TagProps } from "../../__internal__/utils/helpers/tags";
|
|
3
|
-
|
|
3
|
+
type TintRange = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100;
|
|
4
4
|
export interface VerticalDividerProps extends SpaceProps, TagProps {
|
|
5
5
|
/** Shorthand for the height attribute */
|
|
6
6
|
h?: number | string;
|
|
@@ -22,6 +22,6 @@ export interface VerticalMenuItemProps<T = React.ElementType> extends PaddingPro
|
|
|
22
22
|
/** Optional component to render instead of the default div, useful for rendering router link components */
|
|
23
23
|
component?: T;
|
|
24
24
|
}
|
|
25
|
-
|
|
25
|
+
type InferredComponentProps<T extends React.ElementType> = Omit<React.ComponentProps<T>, keyof VerticalMenuItemProps<T>>;
|
|
26
26
|
export declare const VerticalMenuItem: <T>({ defaultOpen, title, iconType, adornment, children, component, active, height, href, ...rest }: T extends React.ElementType<any, keyof React.JSX.IntrinsicElements> ? InferredComponentProps<T> & VerticalMenuItemProps<T> : VerticalMenuItemProps<React.ElementType<any, keyof React.JSX.IntrinsicElements>>) => React.JSX.Element;
|
|
27
27
|
export default VerticalMenuItem;
|
package/lib/global.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ declare const useChildButtons: (toggleButtonRef: React.RefObject<HTMLButtonEleme
|
|
|
4
4
|
showButtons: () => void;
|
|
5
5
|
hideButtons: () => void;
|
|
6
6
|
buttonNode: import("react").RefObject<HTMLDivElement>;
|
|
7
|
-
handleToggleButtonKeyDown: (ev: React.KeyboardEvent<HTMLButtonElement>) => void;
|
|
7
|
+
handleToggleButtonKeyDown: (ev: React.KeyboardEvent<HTMLButtonElement | HTMLAnchorElement>) => void;
|
|
8
8
|
wrapperProps: {
|
|
9
9
|
"data-element": string;
|
|
10
10
|
role: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PaletteFunction } from "../../palette";
|
|
2
|
-
export
|
|
2
|
+
export type BasePalette = Record<string, string | PaletteFunction> & {
|
|
3
3
|
blackOpacity: PaletteFunction;
|
|
4
4
|
whiteOpacity: PaletteFunction;
|
|
5
5
|
[key: string]: PaletteFunction;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const GAP_VALUES: number[];
|
|
2
|
-
export
|
|
3
|
-
export
|
|
2
|
+
export type AllowedNumericalValues = (typeof GAP_VALUES)[number];
|
|
3
|
+
export type Gap = AllowedNumericalValues | string;
|
|
4
4
|
export declare const getGapValue: (gapValue: number | string) => string;
|
|
5
5
|
export default function gap(gapValue: number | string): string;
|