carbon-react 118.2.1 → 118.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/components/button-minor/button-minor.component.d.ts +5 -1
- package/esm/components/button-minor/button-minor.component.js +4 -1
- package/esm/components/button-minor/button-minor.style.d.ts +2 -1
- package/esm/components/button-minor/button-minor.style.js +17 -0
- package/esm/components/button-minor/index.d.ts +1 -1
- package/esm/components/i18n-provider/i18n-provider.component.js +4 -0
- package/esm/components/password/index.d.ts +2 -0
- package/esm/components/password/index.js +1 -0
- package/esm/components/password/password.component.d.ts +9 -0
- package/esm/components/password/password.component.js +580 -0
- package/esm/components/password/password.style.d.ts +5 -0
- package/esm/components/password/password.style.js +8 -0
- package/esm/components/text-editor/__internal__/decorators/index.d.ts +2 -2
- package/esm/components/text-editor/__internal__/decorators/link-decorator.d.ts +7 -6
- package/esm/components/text-editor/__internal__/editor-counter/editor-counter.component.d.ts +15 -0
- package/esm/components/text-editor/__internal__/editor-counter/editor-counter.component.js +5 -15
- package/esm/components/text-editor/__internal__/editor-counter/editor-counter.style.d.ts +5 -0
- package/esm/components/text-editor/__internal__/editor-counter/index.d.ts +2 -2
- package/esm/components/text-editor/__internal__/editor-link/editor-link.component.d.ts +9 -0
- package/esm/components/text-editor/__internal__/editor-link/editor-link.component.js +3 -4
- package/esm/components/text-editor/__internal__/editor-link/editor-link.style.d.ts +3 -0
- package/esm/components/text-editor/__internal__/editor-link/index.d.ts +2 -2
- package/esm/components/text-editor/__internal__/label-wrapper/index.d.ts +2 -2
- package/esm/components/text-editor/__internal__/label-wrapper/label-wrapper.component.d.ts +12 -0
- package/esm/components/text-editor/__internal__/label-wrapper/label-wrapper.component.js +4 -3
- package/esm/components/text-editor/__internal__/toolbar/index.d.ts +2 -2
- package/esm/components/text-editor/__internal__/toolbar/toolbar-button/index.d.ts +2 -2
- package/esm/components/text-editor/__internal__/toolbar/toolbar-button/toolbar-button.component.d.ts +25 -0
- package/esm/components/text-editor/__internal__/toolbar/toolbar-button/toolbar-button.component.js +12 -23
- package/esm/components/text-editor/__internal__/toolbar/toolbar-button/toolbar-button.style.d.ts +6 -0
- package/esm/components/text-editor/__internal__/toolbar/toolbar.component.d.ts +16 -0
- package/esm/components/text-editor/__internal__/toolbar/toolbar.component.js +40 -36
- package/esm/components/text-editor/__internal__/toolbar/toolbar.style.d.ts +4 -0
- package/esm/components/text-editor/__internal__/utils/index.d.ts +1 -1
- package/esm/components/text-editor/__internal__/utils/utils.d.ts +27 -26
- package/esm/components/text-editor/__internal__/utils/utils.js +9 -10
- package/esm/components/text-editor/index.d.ts +2 -2
- package/esm/components/text-editor/text-editor.component.d.ts +36 -7
- package/esm/components/text-editor/text-editor.component.js +230 -87
- package/esm/components/text-editor/text-editor.style.d.ts +11 -3
- package/esm/components/text-editor/text-editor.style.js +1 -2
- package/esm/components/text-editor/types.d.ts +6 -0
- package/esm/components/text-editor/types.js +4 -0
- package/esm/components/textbox/textbox.component.js +1 -1
- package/esm/{__internal__/utils/helpers → hooks/__internal__}/useUniqueId/index.js +1 -1
- package/esm/locales/en-gb.js +4 -0
- package/esm/locales/locale.d.ts +4 -0
- package/esm/locales/pl-pl.js +4 -0
- package/lib/components/button-minor/button-minor.component.d.ts +5 -1
- package/lib/components/button-minor/button-minor.component.js +4 -1
- package/lib/components/button-minor/button-minor.style.d.ts +2 -1
- package/lib/components/button-minor/button-minor.style.js +17 -0
- package/lib/components/button-minor/index.d.ts +1 -1
- package/lib/components/i18n-provider/i18n-provider.component.js +4 -0
- package/lib/components/password/index.d.ts +2 -0
- package/lib/components/password/index.js +15 -0
- package/lib/components/password/package.json +6 -0
- package/lib/components/password/password.component.d.ts +9 -0
- package/lib/components/password/password.component.js +600 -0
- package/lib/components/password/password.style.d.ts +5 -0
- package/lib/components/password/password.style.js +21 -0
- package/lib/components/text-editor/__internal__/decorators/index.d.ts +2 -2
- package/lib/components/text-editor/__internal__/decorators/link-decorator.d.ts +7 -6
- package/lib/components/text-editor/__internal__/editor-counter/editor-counter.component.d.ts +15 -0
- package/lib/components/text-editor/__internal__/editor-counter/editor-counter.component.js +5 -15
- package/lib/components/text-editor/__internal__/editor-counter/editor-counter.style.d.ts +5 -0
- package/lib/components/text-editor/__internal__/editor-counter/index.d.ts +2 -2
- package/lib/components/text-editor/__internal__/editor-link/editor-link.component.d.ts +9 -0
- package/lib/components/text-editor/__internal__/editor-link/editor-link.component.js +3 -4
- package/lib/components/text-editor/__internal__/editor-link/editor-link.style.d.ts +3 -0
- package/lib/components/text-editor/__internal__/editor-link/index.d.ts +2 -2
- package/lib/components/text-editor/__internal__/label-wrapper/index.d.ts +2 -2
- package/lib/components/text-editor/__internal__/label-wrapper/label-wrapper.component.d.ts +12 -0
- package/lib/components/text-editor/__internal__/label-wrapper/label-wrapper.component.js +2 -8
- package/lib/components/text-editor/__internal__/toolbar/index.d.ts +2 -2
- package/lib/components/text-editor/__internal__/toolbar/toolbar-button/index.d.ts +2 -2
- package/lib/components/text-editor/__internal__/toolbar/toolbar-button/toolbar-button.component.d.ts +25 -0
- package/lib/components/text-editor/__internal__/toolbar/toolbar-button/toolbar-button.component.js +13 -24
- package/lib/components/text-editor/__internal__/toolbar/toolbar-button/toolbar-button.style.d.ts +6 -0
- package/lib/components/text-editor/__internal__/toolbar/toolbar.component.d.ts +16 -0
- package/lib/components/text-editor/__internal__/toolbar/toolbar.component.js +50 -46
- package/lib/components/text-editor/__internal__/toolbar/toolbar.style.d.ts +4 -0
- package/lib/components/text-editor/__internal__/utils/index.d.ts +1 -1
- package/lib/components/text-editor/__internal__/utils/utils.d.ts +27 -26
- package/lib/components/text-editor/__internal__/utils/utils.js +10 -11
- package/lib/components/text-editor/index.d.ts +2 -2
- package/lib/components/text-editor/text-editor.component.d.ts +36 -7
- package/lib/components/text-editor/text-editor.component.js +231 -88
- package/lib/components/text-editor/text-editor.style.d.ts +11 -3
- package/lib/components/text-editor/text-editor.style.js +1 -2
- package/lib/components/text-editor/types.d.ts +6 -0
- package/lib/components/text-editor/types.js +14 -0
- package/lib/components/textbox/textbox.component.js +1 -1
- package/lib/{__internal__/utils/helpers → hooks/__internal__}/useUniqueId/index.js +1 -1
- package/lib/hooks/__internal__/useUniqueId/package.json +6 -0
- package/lib/locales/en-gb.js +4 -0
- package/lib/locales/locale.d.ts +4 -0
- package/lib/locales/pl-pl.js +4 -0
- package/package.json +4 -4
- package/esm/__internal__/DeprecationWarning.js +0 -20
- package/esm/__internal__/utils/storybook/partial-action.d.ts +0 -3
- package/esm/__internal__/utils/storybook/partial-action.js +0 -13
- package/esm/components/text-editor/__internal__/editor-counter/editor-counter.d.ts +0 -11
- package/esm/components/text-editor/__internal__/editor-link/editor-link.d.ts +0 -11
- package/esm/components/text-editor/__internal__/label-wrapper/label-wrapper.d.ts +0 -10
- package/esm/components/text-editor/__internal__/toolbar/toolbar-button/toolbar-button.d.ts +0 -20
- package/esm/components/text-editor/__internal__/toolbar/toolbar.d.ts +0 -13
- package/esm/components/text-editor/text-editor.d.ts +0 -40
- package/lib/__internal__/DeprecationWarning.js +0 -31
- package/lib/__internal__/utils/helpers/useUniqueId/package.json +0 -6
- package/lib/__internal__/utils/storybook/partial-action.d.ts +0 -3
- package/lib/__internal__/utils/storybook/partial-action.js +0 -21
- package/lib/components/text-editor/__internal__/editor-counter/editor-counter.d.ts +0 -11
- package/lib/components/text-editor/__internal__/editor-link/editor-link.d.ts +0 -11
- package/lib/components/text-editor/__internal__/label-wrapper/label-wrapper.d.ts +0 -10
- package/lib/components/text-editor/__internal__/toolbar/toolbar-button/toolbar-button.d.ts +0 -20
- package/lib/components/text-editor/__internal__/toolbar/toolbar.d.ts +0 -13
- package/lib/components/text-editor/text-editor.d.ts +0 -40
- /package/esm/{__internal__/utils/helpers → hooks/__internal__}/useUniqueId/index.d.ts +0 -0
- /package/lib/{__internal__/utils/helpers → hooks/__internal__}/useUniqueId/index.d.ts +0 -0
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ButtonProps } from "../button";
|
|
3
|
+
export interface ButtonMinorProps extends ButtonProps {
|
|
4
|
+
/** @private @ignore */
|
|
5
|
+
isInPassword?: boolean;
|
|
6
|
+
}
|
|
3
7
|
export declare const ButtonMinor: {
|
|
4
|
-
({ buttonType, size, ...rest }:
|
|
8
|
+
({ buttonType, size, isInPassword, ...rest }: ButtonMinorProps): JSX.Element;
|
|
5
9
|
displayName: string;
|
|
6
10
|
};
|
|
7
11
|
export default ButtonMinor;
|
|
@@ -7,10 +7,12 @@ import StyledButtonMinor from "./button-minor.style";
|
|
|
7
7
|
const ButtonMinor = ({
|
|
8
8
|
buttonType = "secondary",
|
|
9
9
|
size = "medium",
|
|
10
|
+
isInPassword,
|
|
10
11
|
...rest
|
|
11
12
|
}) => /*#__PURE__*/React.createElement(StyledButtonMinor, _extends({
|
|
12
13
|
size: size,
|
|
13
|
-
buttonType: buttonType
|
|
14
|
+
buttonType: buttonType,
|
|
15
|
+
isInPassword: isInPassword
|
|
14
16
|
}, rest));
|
|
15
17
|
|
|
16
18
|
ButtonMinor.propTypes = {
|
|
@@ -29,6 +31,7 @@ ButtonMinor.propTypes = {
|
|
|
29
31
|
"iconTooltipPosition": PropTypes.oneOf(["bottom", "left", "right", "top"]),
|
|
30
32
|
"iconType": PropTypes.oneOf(["add", "admin", "alert_on", "alert", "analysis", "arrow_bottom_right_circle", "arrow_down", "arrow_left_boxed", "arrow_left_right_small", "arrow_left_small", "arrow_left", "arrow_right_small", "arrow_right", "arrow_top_left_circle", "arrow_up", "arrow", "arrows_left_right", "attach", "bank_with_card", "bank", "basket_with_squares", "basket", "bed", "bin", "block_arrow_right", "blocked_square", "blocked", "bold", "box_arrow_left", "boxed_shapes", "bulk_destroy", "bullet_list_dotted", "bullet_list_numbers", "bullet_list", "business", "calendar_today", "calendar", "call", "camera", "car_lock", "car_money", "car_repair", "card_view", "caret_down", "caret_large_down", "caret_large_left", "caret_large_right", "caret_large_up", "caret_left", "caret_right", "caret_up", "cart", "cash", "chart_bar", "chart_line", "chart_pie", "chat_notes", "chat", "chevron_down_thick", "chevron_down", "chevron_left_thick", "chevron_left", "chevron_right_thick", "chevron_right", "chevron_up_thick", "chevron_up", "circle_with_dots", "circles_connection", "clock", "close", "coins", "collaborate", "computer_clock", "connect", "construction", "contacts", "copy", "create", "credit_card_slash", "credit_card", "cross_circle", "cross", "csv", "dashboard", "delete", "delivery", "disconnect", "disputed", "document_right_align", "document_tick", "document_vertical_lines", "download", "draft", "drag_vertical", "drag", "drill", "dropdown", "duplicate", "edit", "edited", "ellipsis_horizontal", "ellipsis_vertical", "email_switch", "email", "entry", "envelope_dollar", "envelope_euro", "error_square", "error", "euro", "expand", "factory", "favourite_lined", "favourite", "fax", "feedback", "file_excel", "file_generic", "file_image", "file_pdf", "file_word", "files_leaning", "filter_new", "filter", "fit_height", "fit_width", "flag", "folder", "form_refresh", "gift", "go", "graduation_hat", "graph", "grid", "hand_cash_coins", "hand_cash_note", "help", "hide", "home", "image", "in_progress", "in_transit", "individual", "info", "italic", "key", "laptop", "ledger_arrow_left", "ledger_arrow_right", "ledger", "lightbulb_off", "lightbulb_on", "link", "list_view", "location", "locked", "logout", "lookup", "marker", "message", "minus_large", "minus", "mobile", "money_bag", "none", "old_warning", "palm_tree", "pause_circle", "pause", "pdf", "people_switch", "people", "percentage_boxed", "person_info", "person_tick", "person", "petrol_pump", "phone", "piggy_bank", "plane", "play_circle", "play", "plus_large", "plus", "pound", "print", "progress", "progressed", "question_hollow", "question_mark", "question", "refresh_clock", "refresh", "remove", "sage_coin", "save", "scan", "search", "services", "settings_old", "settings", "share", "shop", "sort_down", "sort_up", "spanner", "split_container", "split", "square_dot", "squares_nine", "stacked_boxes", "stacked_squares", "submitted", "sync", "tag", "talk", "theatre_masks", "three_boxes", "tick_circle", "tick_thick", "tick", "true_tick", "u_turn_left", "u_turn_right", "undo", "unlocked", "upload", "uploaded", "video", "view", "warning"]),
|
|
31
33
|
"id": PropTypes.string,
|
|
34
|
+
"isInPassword": PropTypes.bool,
|
|
32
35
|
"m": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
33
36
|
"__@toStringTag": PropTypes.string.isRequired,
|
|
34
37
|
"description": PropTypes.string,
|
|
@@ -1,3 +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
4
|
export default StyledButtonMinor;
|
|
@@ -61,6 +61,23 @@ const StyledButtonMinor = styled(Button)`
|
|
|
61
61
|
}
|
|
62
62
|
`}
|
|
63
63
|
`}
|
|
64
|
+
|
|
65
|
+
${({
|
|
66
|
+
isInPassword,
|
|
67
|
+
disabled
|
|
68
|
+
}) => isInPassword && !disabled && css`
|
|
69
|
+
${StyledIcon} {
|
|
70
|
+
color: var(--colorsUtilityMajor300);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
&:hover {
|
|
74
|
+
${StyledIcon} {
|
|
75
|
+
color: var(--colorsUtilityMajor300);
|
|
76
|
+
}
|
|
77
|
+
color: var(--colorsActionMinor500);
|
|
78
|
+
background: transparent;
|
|
79
|
+
}
|
|
80
|
+
`}
|
|
64
81
|
|
|
65
82
|
${({
|
|
66
83
|
size
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { default } from "./button-minor.component";
|
|
2
|
-
export type {
|
|
2
|
+
export type { ButtonMinorProps } from "./button-minor.component";
|
|
@@ -89,6 +89,10 @@ I18nProvider.propTypes = {
|
|
|
89
89
|
"records": PropTypes.func.isRequired,
|
|
90
90
|
"show": PropTypes.func.isRequired
|
|
91
91
|
}),
|
|
92
|
+
"password": PropTypes.shape({
|
|
93
|
+
"ariaLiveHiddenMessage": PropTypes.func.isRequired,
|
|
94
|
+
"ariaLiveShownMessage": PropTypes.func.isRequired
|
|
95
|
+
}),
|
|
92
96
|
"pod": PropTypes.shape({
|
|
93
97
|
"undo": PropTypes.func.isRequired
|
|
94
98
|
}),
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./password.component";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { TextboxProps } from "../textbox";
|
|
3
|
+
import { TagProps } from "../../__internal__/utils/helpers/tags/tags";
|
|
4
|
+
export interface PasswordProps extends TextboxProps, TagProps {
|
|
5
|
+
/** When `true` input `type` is `password` and text is obscured. */
|
|
6
|
+
forceObscurity?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const Password: ({ id, disabled, forceObscurity, ...rest }: PasswordProps) => JSX.Element;
|
|
9
|
+
export default Password;
|