carbon-react 138.0.1 → 138.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/__internal__/input-icon-toggle/input-icon-toggle.component.js +2 -1
- package/esm/components/button-minor/button-minor.component.d.ts +1 -4
- package/esm/components/button-minor/button-minor.component.js +348 -3
- package/esm/components/menu/__internal__/submenu/submenu.component.js +1 -4
- package/esm/components/menu/menu-full-screen/menu-full-screen.component.js +4 -1
- package/esm/components/menu/menu-item/menu-item.component.js +5 -1
- package/esm/components/menu/menu-segment-title/menu-segment-title.component.js +3 -1
- package/esm/components/menu/scrollable-block/scrollable-block.component.js +2 -1
- package/esm/components/pill/pill.style.js +34 -76
- package/lib/__internal__/input-icon-toggle/input-icon-toggle.component.js +2 -1
- package/lib/components/button-minor/button-minor.component.d.ts +1 -4
- package/lib/components/button-minor/button-minor.component.js +347 -4
- package/lib/components/menu/__internal__/submenu/submenu.component.js +1 -4
- package/lib/components/menu/menu-full-screen/menu-full-screen.component.js +4 -1
- package/lib/components/menu/menu-item/menu-item.component.js +5 -1
- package/lib/components/menu/menu-segment-title/menu-segment-title.component.js +3 -1
- package/lib/components/menu/scrollable-block/scrollable-block.component.js +2 -1
- package/lib/components/pill/pill.style.js +34 -76
- package/package.json +1 -1
- package/esm/components/menu/__internal__/spec-helper/index.d.ts +0 -3
- package/esm/components/menu/__internal__/spec-helper/index.js +0 -19
- package/lib/components/menu/__internal__/spec-helper/index.d.ts +0 -3
- package/lib/components/menu/__internal__/spec-helper/index.js +0 -26
- package/lib/components/menu/__internal__/spec-helper/package.json +0 -6
|
@@ -59,7 +59,8 @@ const InputIconToggle = ({
|
|
|
59
59
|
tabIndex: iconTabIndex,
|
|
60
60
|
"data-element": "input-icon-toggle",
|
|
61
61
|
disabled: disabled,
|
|
62
|
-
readOnly: readOnly
|
|
62
|
+
readOnly: readOnly,
|
|
63
|
+
"data-role": "input-icon-toggle"
|
|
63
64
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
64
65
|
disabled: disabled || readOnly,
|
|
65
66
|
type: type
|
|
@@ -4,8 +4,5 @@ export interface ButtonMinorProps extends ButtonProps {
|
|
|
4
4
|
/** @private @ignore */
|
|
5
5
|
isInPassword?: boolean;
|
|
6
6
|
}
|
|
7
|
-
export declare const ButtonMinor:
|
|
8
|
-
({ buttonType: buttonTypeProp, disabled, destructive, size: sizeProp, iconPosition: iconPositionProp, fullWidth: fullWidthProp, ...rest }: ButtonMinorProps): React.JSX.Element;
|
|
9
|
-
displayName: string;
|
|
10
|
-
};
|
|
7
|
+
export declare const ButtonMinor: React.ForwardRefExoticComponent<ButtonMinorProps & React.RefAttributes<HTMLButtonElement>>;
|
|
11
8
|
export default ButtonMinor;
|
|
@@ -3,7 +3,7 @@ import React, { useContext } from "react";
|
|
|
3
3
|
import PropTypes from "prop-types";
|
|
4
4
|
import StyledButtonMinor from "./button-minor.style";
|
|
5
5
|
import { ButtonBarContext } from "../button-bar/button-bar.component";
|
|
6
|
-
|
|
6
|
+
const ButtonMinor = /*#__PURE__*/React.forwardRef(({
|
|
7
7
|
buttonType: buttonTypeProp = "secondary",
|
|
8
8
|
disabled = false,
|
|
9
9
|
destructive = false,
|
|
@@ -11,7 +11,7 @@ export const ButtonMinor = ({
|
|
|
11
11
|
iconPosition: iconPositionProp = "before",
|
|
12
12
|
fullWidth: fullWidthProp = false,
|
|
13
13
|
...rest
|
|
14
|
-
}) => {
|
|
14
|
+
}, ref) => {
|
|
15
15
|
const {
|
|
16
16
|
buttonType: buttonTypeContext,
|
|
17
17
|
size: sizeContext,
|
|
@@ -23,6 +23,7 @@ export const ButtonMinor = ({
|
|
|
23
23
|
const iconPosition = iconPositionContext || iconPositionProp;
|
|
24
24
|
const fullWidth = fullWidthContext || fullWidthProp;
|
|
25
25
|
return /*#__PURE__*/React.createElement(StyledButtonMinor, _extends({
|
|
26
|
+
ref: ref,
|
|
26
27
|
"data-component": "button-minor",
|
|
27
28
|
size: size,
|
|
28
29
|
fullWidth: fullWidth,
|
|
@@ -31,6 +32,350 @@ export const ButtonMinor = ({
|
|
|
31
32
|
disabled: disabled,
|
|
32
33
|
destructive: destructive
|
|
33
34
|
}, rest));
|
|
34
|
-
};
|
|
35
|
+
});
|
|
36
|
+
if (process.env.NODE_ENV !== "production") {
|
|
37
|
+
ButtonMinor.propTypes = {
|
|
38
|
+
"aria-describedby": PropTypes.string,
|
|
39
|
+
"aria-label": PropTypes.string,
|
|
40
|
+
"aria-labelledby": PropTypes.string,
|
|
41
|
+
"buttonType": PropTypes.oneOf(["darkBackground", "gradient-grey", "gradient-white", "primary", "secondary", "tertiary"]),
|
|
42
|
+
"children": PropTypes.node,
|
|
43
|
+
"className": PropTypes.string,
|
|
44
|
+
"data-component": PropTypes.string,
|
|
45
|
+
"data-element": PropTypes.string,
|
|
46
|
+
"data-role": PropTypes.string,
|
|
47
|
+
"destructive": PropTypes.bool,
|
|
48
|
+
"disabled": PropTypes.bool,
|
|
49
|
+
"fullWidth": PropTypes.bool,
|
|
50
|
+
"href": PropTypes.string,
|
|
51
|
+
"iconPosition": PropTypes.oneOf(["after", "before"]),
|
|
52
|
+
"iconTooltipMessage": PropTypes.string,
|
|
53
|
+
"iconTooltipPosition": PropTypes.oneOf(["bottom", "left", "right", "top"]),
|
|
54
|
+
"iconType": PropTypes.oneOf(["accessibility_web", "add", "admin", "alert_on", "alert", "analysis", "app_facebook", "app_instagram", "app_tiktok", "app_twitter", "app_youtube", "apps", "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", "bill_paid", "bill_unpaid", "bin", "biometric", "block_arrow_right", "blocked_square", "blocked", "bold", "box_arrow_left", "box_arrow_right", "boxed_shapes", "bulk_destroy", "bullet_list_dotted", "bullet_list_numbers", "bullet_list", "business", "calendar_pay_date", "calendar_today", "calendar", "call", "camera", "car_lock", "car_money", "car_repair", "card_view", "card_wallet", "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", "check_all", "check_none", "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", "cloud_co2", "coins", "collaborate", "computer_clock", "connect_off", "connect", "construction", "contact_card", "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", "export", "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", "heart_pulse", "help", "hide", "home", "image", "import", "in_progress", "in_transit", "individual", "info", "intranet", "italic", "job_seeked", "key", "laptop", "leaf", "ledger_arrow_left", "ledger_arrow_right", "ledger", "lightbulb_off", "lightbulb_on", "like_no", "like", "link_cloud", "link_on", "link", "list_view", "location", "locked", "logout", "lookup", "marker", "message", "microphone", "minimise", "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", "pin", "plane", "play_circle", "play", "plus_large", "plus", "pound", "print", "progress", "progressed", "protect", "question_hollow", "question_mark", "question", "recruiting", "refresh_clock", "refresh", "remove", "sage_coin", "save", "scan", "search", "send", "services", "settings_old", "settings", "share", "shop", "sort_down", "sort_up", "spanner", "split_container", "split", "square_dot", "squares_nine", "stacked_boxes", "stacked_squares", "submitted", "support_online", "sync", "tag", "talk", "target_man", "target", "theatre_masks", "three_boxes", "tick_circle", "tick_thick", "tick", "true_tick", "u_turn_left", "u_turn_right", "undo", "unlocked", "upload", "uploaded", "video", "view", "volunteering", "warning", "website", "welfare"]),
|
|
55
|
+
"id": PropTypes.string,
|
|
56
|
+
"isInPassword": PropTypes.bool,
|
|
57
|
+
"m": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
58
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
59
|
+
"description": PropTypes.string,
|
|
60
|
+
"toString": PropTypes.func.isRequired,
|
|
61
|
+
"valueOf": PropTypes.func.isRequired
|
|
62
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
63
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
64
|
+
"description": PropTypes.string,
|
|
65
|
+
"toString": PropTypes.func.isRequired,
|
|
66
|
+
"valueOf": PropTypes.func.isRequired
|
|
67
|
+
}), PropTypes.string]),
|
|
68
|
+
"margin": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
69
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
70
|
+
"description": PropTypes.string,
|
|
71
|
+
"toString": PropTypes.func.isRequired,
|
|
72
|
+
"valueOf": PropTypes.func.isRequired
|
|
73
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
74
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
75
|
+
"description": PropTypes.string,
|
|
76
|
+
"toString": PropTypes.func.isRequired,
|
|
77
|
+
"valueOf": PropTypes.func.isRequired
|
|
78
|
+
}), PropTypes.string]),
|
|
79
|
+
"marginBottom": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
80
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
81
|
+
"description": PropTypes.string,
|
|
82
|
+
"toString": PropTypes.func.isRequired,
|
|
83
|
+
"valueOf": PropTypes.func.isRequired
|
|
84
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
85
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
86
|
+
"description": PropTypes.string,
|
|
87
|
+
"toString": PropTypes.func.isRequired,
|
|
88
|
+
"valueOf": PropTypes.func.isRequired
|
|
89
|
+
}), PropTypes.string]),
|
|
90
|
+
"marginLeft": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
91
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
92
|
+
"description": PropTypes.string,
|
|
93
|
+
"toString": PropTypes.func.isRequired,
|
|
94
|
+
"valueOf": PropTypes.func.isRequired
|
|
95
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
96
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
97
|
+
"description": PropTypes.string,
|
|
98
|
+
"toString": PropTypes.func.isRequired,
|
|
99
|
+
"valueOf": PropTypes.func.isRequired
|
|
100
|
+
}), PropTypes.string]),
|
|
101
|
+
"marginRight": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
102
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
103
|
+
"description": PropTypes.string,
|
|
104
|
+
"toString": PropTypes.func.isRequired,
|
|
105
|
+
"valueOf": PropTypes.func.isRequired
|
|
106
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
107
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
108
|
+
"description": PropTypes.string,
|
|
109
|
+
"toString": PropTypes.func.isRequired,
|
|
110
|
+
"valueOf": PropTypes.func.isRequired
|
|
111
|
+
}), PropTypes.string]),
|
|
112
|
+
"marginTop": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
113
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
114
|
+
"description": PropTypes.string,
|
|
115
|
+
"toString": PropTypes.func.isRequired,
|
|
116
|
+
"valueOf": PropTypes.func.isRequired
|
|
117
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
118
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
119
|
+
"description": PropTypes.string,
|
|
120
|
+
"toString": PropTypes.func.isRequired,
|
|
121
|
+
"valueOf": PropTypes.func.isRequired
|
|
122
|
+
}), PropTypes.string]),
|
|
123
|
+
"marginX": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
124
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
125
|
+
"description": PropTypes.string,
|
|
126
|
+
"toString": PropTypes.func.isRequired,
|
|
127
|
+
"valueOf": PropTypes.func.isRequired
|
|
128
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
129
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
130
|
+
"description": PropTypes.string,
|
|
131
|
+
"toString": PropTypes.func.isRequired,
|
|
132
|
+
"valueOf": PropTypes.func.isRequired
|
|
133
|
+
}), PropTypes.string]),
|
|
134
|
+
"marginY": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
135
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
136
|
+
"description": PropTypes.string,
|
|
137
|
+
"toString": PropTypes.func.isRequired,
|
|
138
|
+
"valueOf": PropTypes.func.isRequired
|
|
139
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
140
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
141
|
+
"description": PropTypes.string,
|
|
142
|
+
"toString": PropTypes.func.isRequired,
|
|
143
|
+
"valueOf": PropTypes.func.isRequired
|
|
144
|
+
}), PropTypes.string]),
|
|
145
|
+
"mb": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
146
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
147
|
+
"description": PropTypes.string,
|
|
148
|
+
"toString": PropTypes.func.isRequired,
|
|
149
|
+
"valueOf": PropTypes.func.isRequired
|
|
150
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
151
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
152
|
+
"description": PropTypes.string,
|
|
153
|
+
"toString": PropTypes.func.isRequired,
|
|
154
|
+
"valueOf": PropTypes.func.isRequired
|
|
155
|
+
}), PropTypes.string]),
|
|
156
|
+
"ml": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
157
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
158
|
+
"description": PropTypes.string,
|
|
159
|
+
"toString": PropTypes.func.isRequired,
|
|
160
|
+
"valueOf": PropTypes.func.isRequired
|
|
161
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
162
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
163
|
+
"description": PropTypes.string,
|
|
164
|
+
"toString": PropTypes.func.isRequired,
|
|
165
|
+
"valueOf": PropTypes.func.isRequired
|
|
166
|
+
}), PropTypes.string]),
|
|
167
|
+
"mr": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
168
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
169
|
+
"description": PropTypes.string,
|
|
170
|
+
"toString": PropTypes.func.isRequired,
|
|
171
|
+
"valueOf": PropTypes.func.isRequired
|
|
172
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
173
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
174
|
+
"description": PropTypes.string,
|
|
175
|
+
"toString": PropTypes.func.isRequired,
|
|
176
|
+
"valueOf": PropTypes.func.isRequired
|
|
177
|
+
}), PropTypes.string]),
|
|
178
|
+
"mt": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
179
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
180
|
+
"description": PropTypes.string,
|
|
181
|
+
"toString": PropTypes.func.isRequired,
|
|
182
|
+
"valueOf": PropTypes.func.isRequired
|
|
183
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
184
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
185
|
+
"description": PropTypes.string,
|
|
186
|
+
"toString": PropTypes.func.isRequired,
|
|
187
|
+
"valueOf": PropTypes.func.isRequired
|
|
188
|
+
}), PropTypes.string]),
|
|
189
|
+
"mx": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
190
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
191
|
+
"description": PropTypes.string,
|
|
192
|
+
"toString": PropTypes.func.isRequired,
|
|
193
|
+
"valueOf": PropTypes.func.isRequired
|
|
194
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
195
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
196
|
+
"description": PropTypes.string,
|
|
197
|
+
"toString": PropTypes.func.isRequired,
|
|
198
|
+
"valueOf": PropTypes.func.isRequired
|
|
199
|
+
}), PropTypes.string]),
|
|
200
|
+
"my": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
201
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
202
|
+
"description": PropTypes.string,
|
|
203
|
+
"toString": PropTypes.func.isRequired,
|
|
204
|
+
"valueOf": PropTypes.func.isRequired
|
|
205
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
206
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
207
|
+
"description": PropTypes.string,
|
|
208
|
+
"toString": PropTypes.func.isRequired,
|
|
209
|
+
"valueOf": PropTypes.func.isRequired
|
|
210
|
+
}), PropTypes.string]),
|
|
211
|
+
"name": PropTypes.string,
|
|
212
|
+
"noWrap": PropTypes.bool,
|
|
213
|
+
"onBlur": PropTypes.func,
|
|
214
|
+
"onChange": PropTypes.func,
|
|
215
|
+
"onClick": PropTypes.func,
|
|
216
|
+
"onFocus": PropTypes.func,
|
|
217
|
+
"onKeyDown": PropTypes.func,
|
|
218
|
+
"p": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
219
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
220
|
+
"description": PropTypes.string,
|
|
221
|
+
"toString": PropTypes.func.isRequired,
|
|
222
|
+
"valueOf": PropTypes.func.isRequired
|
|
223
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
224
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
225
|
+
"description": PropTypes.string,
|
|
226
|
+
"toString": PropTypes.func.isRequired,
|
|
227
|
+
"valueOf": PropTypes.func.isRequired
|
|
228
|
+
}), PropTypes.string]),
|
|
229
|
+
"padding": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
230
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
231
|
+
"description": PropTypes.string,
|
|
232
|
+
"toString": PropTypes.func.isRequired,
|
|
233
|
+
"valueOf": PropTypes.func.isRequired
|
|
234
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
235
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
236
|
+
"description": PropTypes.string,
|
|
237
|
+
"toString": PropTypes.func.isRequired,
|
|
238
|
+
"valueOf": PropTypes.func.isRequired
|
|
239
|
+
}), PropTypes.string]),
|
|
240
|
+
"paddingBottom": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
241
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
242
|
+
"description": PropTypes.string,
|
|
243
|
+
"toString": PropTypes.func.isRequired,
|
|
244
|
+
"valueOf": PropTypes.func.isRequired
|
|
245
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
246
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
247
|
+
"description": PropTypes.string,
|
|
248
|
+
"toString": PropTypes.func.isRequired,
|
|
249
|
+
"valueOf": PropTypes.func.isRequired
|
|
250
|
+
}), PropTypes.string]),
|
|
251
|
+
"paddingLeft": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
252
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
253
|
+
"description": PropTypes.string,
|
|
254
|
+
"toString": PropTypes.func.isRequired,
|
|
255
|
+
"valueOf": PropTypes.func.isRequired
|
|
256
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
257
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
258
|
+
"description": PropTypes.string,
|
|
259
|
+
"toString": PropTypes.func.isRequired,
|
|
260
|
+
"valueOf": PropTypes.func.isRequired
|
|
261
|
+
}), PropTypes.string]),
|
|
262
|
+
"paddingRight": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
263
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
264
|
+
"description": PropTypes.string,
|
|
265
|
+
"toString": PropTypes.func.isRequired,
|
|
266
|
+
"valueOf": PropTypes.func.isRequired
|
|
267
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
268
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
269
|
+
"description": PropTypes.string,
|
|
270
|
+
"toString": PropTypes.func.isRequired,
|
|
271
|
+
"valueOf": PropTypes.func.isRequired
|
|
272
|
+
}), PropTypes.string]),
|
|
273
|
+
"paddingTop": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
274
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
275
|
+
"description": PropTypes.string,
|
|
276
|
+
"toString": PropTypes.func.isRequired,
|
|
277
|
+
"valueOf": PropTypes.func.isRequired
|
|
278
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
279
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
280
|
+
"description": PropTypes.string,
|
|
281
|
+
"toString": PropTypes.func.isRequired,
|
|
282
|
+
"valueOf": PropTypes.func.isRequired
|
|
283
|
+
}), PropTypes.string]),
|
|
284
|
+
"paddingX": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
285
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
286
|
+
"description": PropTypes.string,
|
|
287
|
+
"toString": PropTypes.func.isRequired,
|
|
288
|
+
"valueOf": PropTypes.func.isRequired
|
|
289
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
290
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
291
|
+
"description": PropTypes.string,
|
|
292
|
+
"toString": PropTypes.func.isRequired,
|
|
293
|
+
"valueOf": PropTypes.func.isRequired
|
|
294
|
+
}), PropTypes.string]),
|
|
295
|
+
"paddingY": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
296
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
297
|
+
"description": PropTypes.string,
|
|
298
|
+
"toString": PropTypes.func.isRequired,
|
|
299
|
+
"valueOf": PropTypes.func.isRequired
|
|
300
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
301
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
302
|
+
"description": PropTypes.string,
|
|
303
|
+
"toString": PropTypes.func.isRequired,
|
|
304
|
+
"valueOf": PropTypes.func.isRequired
|
|
305
|
+
}), PropTypes.string]),
|
|
306
|
+
"pb": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
307
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
308
|
+
"description": PropTypes.string,
|
|
309
|
+
"toString": PropTypes.func.isRequired,
|
|
310
|
+
"valueOf": PropTypes.func.isRequired
|
|
311
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
312
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
313
|
+
"description": PropTypes.string,
|
|
314
|
+
"toString": PropTypes.func.isRequired,
|
|
315
|
+
"valueOf": PropTypes.func.isRequired
|
|
316
|
+
}), PropTypes.string]),
|
|
317
|
+
"pl": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
318
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
319
|
+
"description": PropTypes.string,
|
|
320
|
+
"toString": PropTypes.func.isRequired,
|
|
321
|
+
"valueOf": PropTypes.func.isRequired
|
|
322
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
323
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
324
|
+
"description": PropTypes.string,
|
|
325
|
+
"toString": PropTypes.func.isRequired,
|
|
326
|
+
"valueOf": PropTypes.func.isRequired
|
|
327
|
+
}), PropTypes.string]),
|
|
328
|
+
"pr": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
329
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
330
|
+
"description": PropTypes.string,
|
|
331
|
+
"toString": PropTypes.func.isRequired,
|
|
332
|
+
"valueOf": PropTypes.func.isRequired
|
|
333
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
334
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
335
|
+
"description": PropTypes.string,
|
|
336
|
+
"toString": PropTypes.func.isRequired,
|
|
337
|
+
"valueOf": PropTypes.func.isRequired
|
|
338
|
+
}), PropTypes.string]),
|
|
339
|
+
"pt": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
340
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
341
|
+
"description": PropTypes.string,
|
|
342
|
+
"toString": PropTypes.func.isRequired,
|
|
343
|
+
"valueOf": PropTypes.func.isRequired
|
|
344
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
345
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
346
|
+
"description": PropTypes.string,
|
|
347
|
+
"toString": PropTypes.func.isRequired,
|
|
348
|
+
"valueOf": PropTypes.func.isRequired
|
|
349
|
+
}), PropTypes.string]),
|
|
350
|
+
"px": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
351
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
352
|
+
"description": PropTypes.string,
|
|
353
|
+
"toString": PropTypes.func.isRequired,
|
|
354
|
+
"valueOf": PropTypes.func.isRequired
|
|
355
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
356
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
357
|
+
"description": PropTypes.string,
|
|
358
|
+
"toString": PropTypes.func.isRequired,
|
|
359
|
+
"valueOf": PropTypes.func.isRequired
|
|
360
|
+
}), PropTypes.string]),
|
|
361
|
+
"py": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
362
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
363
|
+
"description": PropTypes.string,
|
|
364
|
+
"toString": PropTypes.func.isRequired,
|
|
365
|
+
"valueOf": PropTypes.func.isRequired
|
|
366
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
367
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
368
|
+
"description": PropTypes.string,
|
|
369
|
+
"toString": PropTypes.func.isRequired,
|
|
370
|
+
"valueOf": PropTypes.func.isRequired
|
|
371
|
+
}), PropTypes.string]),
|
|
372
|
+
"rel": PropTypes.string,
|
|
373
|
+
"size": PropTypes.oneOf(["large", "medium", "small"]),
|
|
374
|
+
"subtext": PropTypes.string,
|
|
375
|
+
"target": PropTypes.string,
|
|
376
|
+
"type": PropTypes.string
|
|
377
|
+
};
|
|
378
|
+
}
|
|
379
|
+
export { ButtonMinor };
|
|
35
380
|
ButtonMinor.displayName = "ButtonMinor";
|
|
36
381
|
export default ButtonMinor;
|
|
@@ -229,10 +229,6 @@ const Submenu = /*#__PURE__*/React.forwardRef(({
|
|
|
229
229
|
the browser navigates to the specified href of the menu-item. */
|
|
230
230
|
setTimeout(() => closeSubmenu(), 0);
|
|
231
231
|
}
|
|
232
|
-
if (href && Events.isEnterKey(event)) {
|
|
233
|
-
closeSubmenu();
|
|
234
|
-
return;
|
|
235
|
-
}
|
|
236
232
|
}
|
|
237
233
|
if (nextIndex !== index) {
|
|
238
234
|
setSubmenuFocusId(submenuItemIds[nextIndex]);
|
|
@@ -311,6 +307,7 @@ const Submenu = /*#__PURE__*/React.forwardRef(({
|
|
|
311
307
|
}
|
|
312
308
|
return /*#__PURE__*/React.createElement(StyledSubmenuWrapper, {
|
|
313
309
|
"data-component": "submenu-wrapper",
|
|
310
|
+
"data-role": "submenu-wrapper",
|
|
314
311
|
onMouseOver: !clickToOpen ? () => openSubmenu() : undefined,
|
|
315
312
|
onMouseLeave: () => closeSubmenu(),
|
|
316
313
|
isSubmenuOpen: submenuOpen,
|
|
@@ -37,11 +37,14 @@ export const MenuFullscreen = ({
|
|
|
37
37
|
const flattenedChildren = React.Children.toArray(children);
|
|
38
38
|
const childArray = React.Children.toArray(flattenedChildren.map((child, index) => {
|
|
39
39
|
if (index < flattenedChildren.length - 1) {
|
|
40
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, child, /*#__PURE__*/React.createElement(MenuDivider,
|
|
40
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, child, /*#__PURE__*/React.createElement(MenuDivider, {
|
|
41
|
+
"data-role": "divider"
|
|
42
|
+
}));
|
|
41
43
|
}
|
|
42
44
|
return child;
|
|
43
45
|
}));
|
|
44
46
|
const closeModal = useCallback(ev => {
|
|
47
|
+
/* istanbul ignore else */
|
|
45
48
|
if (onClose && Events.isEscKey(ev)) {
|
|
46
49
|
ev.stopImmediatePropagation();
|
|
47
50
|
onClose(ev);
|
|
@@ -60,10 +60,13 @@ export const MenuItem = ({
|
|
|
60
60
|
const focusRef = inputRef.current ? inputRef : ref;
|
|
61
61
|
useEffect(() => {
|
|
62
62
|
const id = menuItemId.current;
|
|
63
|
+
|
|
64
|
+
/* istanbul ignore else */
|
|
63
65
|
if (registerItem) {
|
|
64
66
|
registerItem(id);
|
|
65
67
|
}
|
|
66
68
|
return () => {
|
|
69
|
+
/* istanbul ignore else */
|
|
67
70
|
if (unregisterItem) {
|
|
68
71
|
unregisterItem(id);
|
|
69
72
|
}
|
|
@@ -165,7 +168,8 @@ export const MenuItem = ({
|
|
|
165
168
|
onClick: updateFocusOnClick,
|
|
166
169
|
as: as
|
|
167
170
|
}), /*#__PURE__*/React.createElement(StyledMenuItemWrapper, _extends({
|
|
168
|
-
menuType: menuType
|
|
171
|
+
menuType: menuType,
|
|
172
|
+
"data-role": "menu-item-wrapper"
|
|
169
173
|
}, elementProps, {
|
|
170
174
|
ariaLabel: ariaLabel,
|
|
171
175
|
maxWidth: maxWidth,
|
|
@@ -22,7 +22,9 @@ const MenuSegmentTitle = /*#__PURE__*/React.forwardRef(({
|
|
|
22
22
|
menuType: menuContext.menuType,
|
|
23
23
|
ref: ref,
|
|
24
24
|
variant: variant
|
|
25
|
-
}), text), children && /*#__PURE__*/React.createElement(StyledSegmentChildren,
|
|
25
|
+
}), text), children && /*#__PURE__*/React.createElement(StyledSegmentChildren, {
|
|
26
|
+
"data-role": "menu-segment-children"
|
|
27
|
+
}, children));
|
|
26
28
|
});
|
|
27
29
|
if (process.env.NODE_ENV !== "production") {
|
|
28
30
|
MenuSegmentTitle.propTypes = {
|
|
@@ -31,7 +31,8 @@ export const ScrollableBlock = ({
|
|
|
31
31
|
overrideColor: true,
|
|
32
32
|
variant: parentVariant,
|
|
33
33
|
p: "2px 16px",
|
|
34
|
-
as: "div"
|
|
34
|
+
as: "div",
|
|
35
|
+
"data-role": "scrollable-block-parent-menu-item"
|
|
35
36
|
}, parent), /*#__PURE__*/React.createElement(Box, {
|
|
36
37
|
overflowY: "scroll",
|
|
37
38
|
scrollVariant: scrollVariants[menuType],
|