carbon-react 116.1.1 → 116.1.3
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__/utils/helpers/events/events.d.ts +1 -1
- package/esm/components/button-toggle/button-toggle.style.js +2 -0
- package/esm/components/date/date.component.js +9 -1
- package/esm/components/date/date.style.js +5 -2
- package/esm/components/detail/detail.component.d.ts +19 -0
- package/esm/components/detail/detail.component.js +176 -42
- package/esm/components/detail/detail.style.d.ts +10 -0
- package/esm/components/detail/index.d.ts +2 -1
- package/esm/components/drawer/drawer.component.d.ts +1 -1
- package/esm/components/icon/icon.component.js +1 -1
- package/esm/components/menu/index.d.ts +1 -0
- package/esm/components/tabs/__internal__/tab-title/index.d.ts +2 -1
- package/esm/components/tabs/__internal__/tab-title/index.js +1 -1
- package/esm/components/tabs/__internal__/tab-title/tab-title.component.d.ts +37 -3
- package/esm/components/tabs/__internal__/tab-title/tab-title.component.js +99 -97
- package/esm/components/tabs/__internal__/tab-title/tab-title.style.d.ts +18 -4
- package/esm/components/tabs/__internal__/tab-title/tab-title.style.js +14 -50
- package/esm/components/tabs/__internal__/tabs-header/index.d.ts +2 -1
- package/esm/components/tabs/__internal__/tabs-header/tabs-header.component.d.ts +13 -0
- package/esm/components/tabs/__internal__/tabs-header/tabs-header.component.js +8 -8
- package/esm/components/tabs/__internal__/tabs-header/tabs-header.style.d.ts +6 -6
- package/esm/components/tabs/__internal__/tabs-header/tabs-header.style.js +8 -27
- package/esm/components/tabs/index.d.ts +3 -2
- package/esm/components/tabs/tab/index.d.ts +2 -2
- package/esm/components/tabs/tab/tab.component.d.ts +53 -0
- package/esm/components/tabs/tab/tab.component.js +180 -61
- package/esm/components/tabs/tab/tab.style.d.ts +8 -1
- package/esm/components/tabs/tab/tab.style.js +1 -6
- package/esm/components/tabs/tabs.component.d.ts +49 -0
- package/esm/components/tabs/tabs.component.js +188 -70
- package/esm/components/tabs/tabs.style.d.ts +5 -1
- package/esm/components/tabs/tabs.style.js +2 -8
- package/esm/components/textbox/textbox.component.d.ts +1 -1
- package/lib/__internal__/utils/helpers/events/events.d.ts +1 -1
- package/lib/components/button-toggle/button-toggle.style.js +2 -0
- package/lib/components/date/date.component.js +9 -1
- package/lib/components/date/date.style.js +5 -2
- package/lib/components/detail/detail.component.d.ts +19 -0
- package/lib/components/detail/detail.component.js +178 -47
- package/lib/components/detail/detail.style.d.ts +10 -0
- package/lib/components/detail/index.d.ts +2 -1
- package/lib/components/drawer/drawer.component.d.ts +1 -1
- package/lib/components/icon/icon.component.js +1 -1
- package/lib/components/menu/index.d.ts +1 -0
- package/lib/components/tabs/__internal__/tab-title/index.d.ts +2 -1
- package/lib/components/tabs/__internal__/tab-title/index.js +10 -2
- package/lib/components/tabs/__internal__/tab-title/tab-title.component.d.ts +37 -3
- package/lib/components/tabs/__internal__/tab-title/tab-title.component.js +99 -97
- package/lib/components/tabs/__internal__/tab-title/tab-title.style.d.ts +18 -4
- package/lib/components/tabs/__internal__/tab-title/tab-title.style.js +17 -53
- package/lib/components/tabs/__internal__/tabs-header/index.d.ts +2 -1
- package/lib/components/tabs/__internal__/tabs-header/tabs-header.component.d.ts +13 -0
- package/lib/components/tabs/__internal__/tabs-header/tabs-header.component.js +8 -8
- package/lib/components/tabs/__internal__/tabs-header/tabs-header.style.d.ts +6 -6
- package/lib/components/tabs/__internal__/tabs-header/tabs-header.style.js +9 -31
- package/lib/components/tabs/index.d.ts +3 -2
- package/lib/components/tabs/tab/index.d.ts +2 -2
- package/lib/components/tabs/tab/tab.component.d.ts +53 -0
- package/lib/components/tabs/tab/tab.component.js +181 -64
- package/lib/components/tabs/tab/tab.style.d.ts +8 -1
- package/lib/components/tabs/tab/tab.style.js +1 -7
- package/lib/components/tabs/tabs.component.d.ts +49 -0
- package/lib/components/tabs/tabs.component.js +188 -73
- package/lib/components/tabs/tabs.style.d.ts +5 -1
- package/lib/components/tabs/tabs.style.js +2 -9
- package/lib/components/textbox/textbox.component.d.ts +1 -1
- package/package.json +1 -1
- package/esm/components/detail/detail.d.ts +0 -16
- package/esm/components/tabs/__internal__/tab-title/tab-title.d.ts +0 -47
- package/esm/components/tabs/__internal__/tabs-header/tab-header.d.ts +0 -16
- package/esm/components/tabs/tab/tab.d.ts +0 -54
- package/esm/components/tabs/tabs.d.ts +0 -51
- package/lib/components/detail/detail.d.ts +0 -16
- package/lib/components/tabs/__internal__/tab-title/tab-title.d.ts +0 -47
- package/lib/components/tabs/__internal__/tabs-header/tab-header.d.ts +0 -16
- package/lib/components/tabs/tab/tab.d.ts +0 -54
- package/lib/components/tabs/tabs.d.ts +0 -51
|
@@ -17,7 +17,7 @@ declare const Events: {
|
|
|
17
17
|
/**
|
|
18
18
|
* Determines if event is a keyboard event
|
|
19
19
|
*/
|
|
20
|
-
isKeyboardEvent: (ev: React.SyntheticEvent | Event) => ev is React.KeyboardEvent<Element
|
|
20
|
+
isKeyboardEvent: (ev: React.SyntheticEvent | Event) => ev is KeyboardEvent | React.KeyboardEvent<Element>;
|
|
21
21
|
/**
|
|
22
22
|
* Determines if a number key along the top of the keyboard or a number key on the
|
|
23
23
|
* keypad is pressed
|
|
@@ -31,11 +31,13 @@ const StyledButtonToggleContentWrapper = styled.div`
|
|
|
31
31
|
align-items: center;
|
|
32
32
|
width: 100%;
|
|
33
33
|
height: 100%;
|
|
34
|
+
flex-flow: wrap;
|
|
34
35
|
`;
|
|
35
36
|
const StyledButtonToggleLabel = styled.label`
|
|
36
37
|
display: inline-block;
|
|
37
38
|
position: relative;
|
|
38
39
|
box-sizing: border-box;
|
|
40
|
+
max-width: 100%;
|
|
39
41
|
${({
|
|
40
42
|
size
|
|
41
43
|
}) => css`
|
|
@@ -41,6 +41,9 @@ const DateInput = /*#__PURE__*/React.forwardRef(({
|
|
|
41
41
|
tooltipPosition,
|
|
42
42
|
value,
|
|
43
43
|
inputRef,
|
|
44
|
+
inputWidth,
|
|
45
|
+
labelWidth,
|
|
46
|
+
maxWidth,
|
|
44
47
|
...rest
|
|
45
48
|
}, ref) => {
|
|
46
49
|
const wrapperRef = useRef();
|
|
@@ -306,7 +309,9 @@ const DateInput = /*#__PURE__*/React.forwardRef(({
|
|
|
306
309
|
"data-element": dataElement,
|
|
307
310
|
"data-role": dataRole
|
|
308
311
|
}, marginProps, {
|
|
309
|
-
applyDateRangeStyling: !!inputRefMap
|
|
312
|
+
applyDateRangeStyling: !!inputRefMap,
|
|
313
|
+
maxWidth: maxWidth,
|
|
314
|
+
inputWidth: inputWidth
|
|
310
315
|
}), /*#__PURE__*/React.createElement(Textbox, _extends({}, filterOutStyledSystemSpacingProps(rest), {
|
|
311
316
|
inputRef: inputRef,
|
|
312
317
|
value: computedValue(),
|
|
@@ -328,6 +333,9 @@ const DateInput = /*#__PURE__*/React.forwardRef(({
|
|
|
328
333
|
size: size,
|
|
329
334
|
disabled: disabled,
|
|
330
335
|
readOnly: readOnly,
|
|
336
|
+
inputWidth: inputWidth,
|
|
337
|
+
labelWidth: labelWidth,
|
|
338
|
+
maxWidth: maxWidth,
|
|
331
339
|
m: 0
|
|
332
340
|
})), /*#__PURE__*/React.createElement(DatePicker, {
|
|
333
341
|
disablePortal: disablePortal,
|
|
@@ -18,8 +18,10 @@ const StyledDateInput = styled.div`
|
|
|
18
18
|
& ${StyledInputPresentation} {
|
|
19
19
|
flex: none;
|
|
20
20
|
width: ${({
|
|
21
|
+
inputWidth,
|
|
22
|
+
maxWidth,
|
|
21
23
|
size
|
|
22
|
-
}) => datePickerWidth[size]};
|
|
24
|
+
}) => maxWidth || inputWidth ? "" : datePickerWidth[size]};
|
|
23
25
|
|
|
24
26
|
${StyledInput} {
|
|
25
27
|
margin-right: -8px;
|
|
@@ -28,11 +30,12 @@ const StyledDateInput = styled.div`
|
|
|
28
30
|
|
|
29
31
|
${({
|
|
30
32
|
applyDateRangeStyling,
|
|
33
|
+
maxWidth,
|
|
31
34
|
size,
|
|
32
35
|
labelInline
|
|
33
36
|
}) => applyDateRangeStyling && !labelInline && css`
|
|
34
37
|
${FieldLineStyle} {
|
|
35
|
-
max-width: ${datePickerWidth[size]};
|
|
38
|
+
max-width: ${maxWidth || datePickerWidth[size]}};
|
|
36
39
|
}
|
|
37
40
|
|
|
38
41
|
${StyledValidationMessage}, ${StyledLabel} {
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { MarginProps } from "styled-system";
|
|
3
|
+
import { IconType } from "../icon";
|
|
4
|
+
import { TagProps } from "../../__internal__/utils/helpers/tags/tags";
|
|
5
|
+
export interface DetailProps extends MarginProps, TagProps {
|
|
6
|
+
/** Custom className. */
|
|
7
|
+
className?: string;
|
|
8
|
+
/** The type of icon to use. */
|
|
9
|
+
icon?: IconType;
|
|
10
|
+
/** A small detail to display under the main content. */
|
|
11
|
+
footnote?: string;
|
|
12
|
+
/** The rendered children of the component. */
|
|
13
|
+
children?: React.ReactNode;
|
|
14
|
+
}
|
|
15
|
+
export declare const Detail: {
|
|
16
|
+
({ className, icon, footnote, children, ...rest }: DetailProps): JSX.Element;
|
|
17
|
+
displayName: string;
|
|
18
|
+
};
|
|
19
|
+
export default Detail;
|
|
@@ -2,12 +2,9 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
|
|
|
2
2
|
|
|
3
3
|
import React from "react";
|
|
4
4
|
import PropTypes from "prop-types";
|
|
5
|
-
import classNames from "classnames";
|
|
6
|
-
import styledSystemPropTypes from "@styled-system/prop-types";
|
|
7
5
|
import { filterStyledSystemMarginProps } from "../../style/utils";
|
|
8
6
|
import tagComponent from "../../__internal__/utils/helpers/tags/tags";
|
|
9
7
|
import { StyledDetail, StyledDetailContent, StyledDetailIcon, StyledDetailFootnote } from "./detail.style";
|
|
10
|
-
const marginPropTypes = filterStyledSystemMarginProps(styledSystemPropTypes);
|
|
11
8
|
|
|
12
9
|
const Detail = ({
|
|
13
10
|
className,
|
|
@@ -15,45 +12,182 @@ const Detail = ({
|
|
|
15
12
|
footnote,
|
|
16
13
|
children,
|
|
17
14
|
...rest
|
|
18
|
-
}) => {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
"data-element": "footnote",
|
|
31
|
-
hasIcon: icon
|
|
32
|
-
}, footnote));
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
Detail.propTypes = { ...marginPropTypes,
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* Custom className
|
|
39
|
-
*/
|
|
40
|
-
className: PropTypes.string,
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* <a href="https://carbon.sage.com/?path=/docs/icon--list-of-icons#list-of-icons" target="_blank">List of supported icons</a>
|
|
44
|
-
*
|
|
45
|
-
* The type of icon to use.
|
|
46
|
-
*/
|
|
47
|
-
icon: PropTypes.string,
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* A small detail to display under the main content.
|
|
51
|
-
*/
|
|
52
|
-
footnote: PropTypes.string,
|
|
15
|
+
}) => /*#__PURE__*/React.createElement(StyledDetail, _extends({
|
|
16
|
+
className: `carbon-detail ${className}`
|
|
17
|
+
}, tagComponent("detail", rest), filterStyledSystemMarginProps(rest)), icon && /*#__PURE__*/React.createElement(StyledDetailIcon, {
|
|
18
|
+
type: icon,
|
|
19
|
+
"data-element": "icon"
|
|
20
|
+
}), /*#__PURE__*/React.createElement(StyledDetailContent, {
|
|
21
|
+
"data-element": "detail-content",
|
|
22
|
+
hasIcon: !!icon
|
|
23
|
+
}, children), footnote && /*#__PURE__*/React.createElement(StyledDetailFootnote, {
|
|
24
|
+
"data-element": "footnote",
|
|
25
|
+
hasIcon: !!icon
|
|
26
|
+
}, footnote));
|
|
53
27
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
28
|
+
Detail.propTypes = {
|
|
29
|
+
"children": PropTypes.node,
|
|
30
|
+
"className": PropTypes.string,
|
|
31
|
+
"data-component": PropTypes.string,
|
|
32
|
+
"data-element": PropTypes.string,
|
|
33
|
+
"data-role": PropTypes.string,
|
|
34
|
+
"footnote": PropTypes.string,
|
|
35
|
+
"icon": 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"]),
|
|
36
|
+
"m": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
37
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
38
|
+
"description": PropTypes.string,
|
|
39
|
+
"toString": PropTypes.func.isRequired,
|
|
40
|
+
"valueOf": PropTypes.func.isRequired
|
|
41
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
42
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
43
|
+
"description": PropTypes.string,
|
|
44
|
+
"toString": PropTypes.func.isRequired,
|
|
45
|
+
"valueOf": PropTypes.func.isRequired
|
|
46
|
+
}), PropTypes.string]),
|
|
47
|
+
"margin": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
48
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
49
|
+
"description": PropTypes.string,
|
|
50
|
+
"toString": PropTypes.func.isRequired,
|
|
51
|
+
"valueOf": PropTypes.func.isRequired
|
|
52
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
53
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
54
|
+
"description": PropTypes.string,
|
|
55
|
+
"toString": PropTypes.func.isRequired,
|
|
56
|
+
"valueOf": PropTypes.func.isRequired
|
|
57
|
+
}), PropTypes.string]),
|
|
58
|
+
"marginBottom": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
59
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
60
|
+
"description": PropTypes.string,
|
|
61
|
+
"toString": PropTypes.func.isRequired,
|
|
62
|
+
"valueOf": PropTypes.func.isRequired
|
|
63
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
64
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
65
|
+
"description": PropTypes.string,
|
|
66
|
+
"toString": PropTypes.func.isRequired,
|
|
67
|
+
"valueOf": PropTypes.func.isRequired
|
|
68
|
+
}), PropTypes.string]),
|
|
69
|
+
"marginLeft": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
70
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
71
|
+
"description": PropTypes.string,
|
|
72
|
+
"toString": PropTypes.func.isRequired,
|
|
73
|
+
"valueOf": PropTypes.func.isRequired
|
|
74
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
75
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
76
|
+
"description": PropTypes.string,
|
|
77
|
+
"toString": PropTypes.func.isRequired,
|
|
78
|
+
"valueOf": PropTypes.func.isRequired
|
|
79
|
+
}), PropTypes.string]),
|
|
80
|
+
"marginRight": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
81
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
82
|
+
"description": PropTypes.string,
|
|
83
|
+
"toString": PropTypes.func.isRequired,
|
|
84
|
+
"valueOf": PropTypes.func.isRequired
|
|
85
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
86
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
87
|
+
"description": PropTypes.string,
|
|
88
|
+
"toString": PropTypes.func.isRequired,
|
|
89
|
+
"valueOf": PropTypes.func.isRequired
|
|
90
|
+
}), PropTypes.string]),
|
|
91
|
+
"marginTop": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
92
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
93
|
+
"description": PropTypes.string,
|
|
94
|
+
"toString": PropTypes.func.isRequired,
|
|
95
|
+
"valueOf": PropTypes.func.isRequired
|
|
96
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
97
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
98
|
+
"description": PropTypes.string,
|
|
99
|
+
"toString": PropTypes.func.isRequired,
|
|
100
|
+
"valueOf": PropTypes.func.isRequired
|
|
101
|
+
}), PropTypes.string]),
|
|
102
|
+
"marginX": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
103
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
104
|
+
"description": PropTypes.string,
|
|
105
|
+
"toString": PropTypes.func.isRequired,
|
|
106
|
+
"valueOf": PropTypes.func.isRequired
|
|
107
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
108
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
109
|
+
"description": PropTypes.string,
|
|
110
|
+
"toString": PropTypes.func.isRequired,
|
|
111
|
+
"valueOf": PropTypes.func.isRequired
|
|
112
|
+
}), PropTypes.string]),
|
|
113
|
+
"marginY": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
114
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
115
|
+
"description": PropTypes.string,
|
|
116
|
+
"toString": PropTypes.func.isRequired,
|
|
117
|
+
"valueOf": PropTypes.func.isRequired
|
|
118
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
119
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
120
|
+
"description": PropTypes.string,
|
|
121
|
+
"toString": PropTypes.func.isRequired,
|
|
122
|
+
"valueOf": PropTypes.func.isRequired
|
|
123
|
+
}), PropTypes.string]),
|
|
124
|
+
"mb": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
125
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
126
|
+
"description": PropTypes.string,
|
|
127
|
+
"toString": PropTypes.func.isRequired,
|
|
128
|
+
"valueOf": PropTypes.func.isRequired
|
|
129
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
130
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
131
|
+
"description": PropTypes.string,
|
|
132
|
+
"toString": PropTypes.func.isRequired,
|
|
133
|
+
"valueOf": PropTypes.func.isRequired
|
|
134
|
+
}), PropTypes.string]),
|
|
135
|
+
"ml": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
136
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
137
|
+
"description": PropTypes.string,
|
|
138
|
+
"toString": PropTypes.func.isRequired,
|
|
139
|
+
"valueOf": PropTypes.func.isRequired
|
|
140
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
141
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
142
|
+
"description": PropTypes.string,
|
|
143
|
+
"toString": PropTypes.func.isRequired,
|
|
144
|
+
"valueOf": PropTypes.func.isRequired
|
|
145
|
+
}), PropTypes.string]),
|
|
146
|
+
"mr": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
147
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
148
|
+
"description": PropTypes.string,
|
|
149
|
+
"toString": PropTypes.func.isRequired,
|
|
150
|
+
"valueOf": PropTypes.func.isRequired
|
|
151
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
152
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
153
|
+
"description": PropTypes.string,
|
|
154
|
+
"toString": PropTypes.func.isRequired,
|
|
155
|
+
"valueOf": PropTypes.func.isRequired
|
|
156
|
+
}), PropTypes.string]),
|
|
157
|
+
"mt": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
158
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
159
|
+
"description": PropTypes.string,
|
|
160
|
+
"toString": PropTypes.func.isRequired,
|
|
161
|
+
"valueOf": PropTypes.func.isRequired
|
|
162
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
163
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
164
|
+
"description": PropTypes.string,
|
|
165
|
+
"toString": PropTypes.func.isRequired,
|
|
166
|
+
"valueOf": PropTypes.func.isRequired
|
|
167
|
+
}), PropTypes.string]),
|
|
168
|
+
"mx": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
169
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
170
|
+
"description": PropTypes.string,
|
|
171
|
+
"toString": PropTypes.func.isRequired,
|
|
172
|
+
"valueOf": PropTypes.func.isRequired
|
|
173
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
174
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
175
|
+
"description": PropTypes.string,
|
|
176
|
+
"toString": PropTypes.func.isRequired,
|
|
177
|
+
"valueOf": PropTypes.func.isRequired
|
|
178
|
+
}), PropTypes.string]),
|
|
179
|
+
"my": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
180
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
181
|
+
"description": PropTypes.string,
|
|
182
|
+
"toString": PropTypes.func.isRequired,
|
|
183
|
+
"valueOf": PropTypes.func.isRequired
|
|
184
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
185
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
186
|
+
"description": PropTypes.string,
|
|
187
|
+
"toString": PropTypes.func.isRequired,
|
|
188
|
+
"valueOf": PropTypes.func.isRequired
|
|
189
|
+
}), PropTypes.string])
|
|
58
190
|
};
|
|
191
|
+
export { Detail };
|
|
192
|
+
Detail.displayName = "Detail";
|
|
59
193
|
export default Detail;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare const StyledDetail: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
|
+
declare const StyledDetailContent: import("styled-components").StyledComponent<"div", any, {
|
|
4
|
+
hasIcon: boolean;
|
|
5
|
+
}, never>;
|
|
6
|
+
declare const StyledDetailIcon: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../icon").IconProps & import("react").RefAttributes<HTMLSpanElement>>, any, {}, never>;
|
|
7
|
+
declare const StyledDetailFootnote: import("styled-components").StyledComponent<"div", any, {
|
|
8
|
+
hasIcon: boolean;
|
|
9
|
+
}, never>;
|
|
10
|
+
export { StyledDetail, StyledDetailContent, StyledDetailIcon, StyledDetailFootnote, };
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export { default } from "./detail";
|
|
1
|
+
export { default } from "./detail.component";
|
|
2
|
+
export type { DetailProps } from "./detail.component";
|
|
@@ -31,7 +31,7 @@ export interface DrawerProps {
|
|
|
31
31
|
/** Makes the footer of the drawer sticky. Footer prop must also be set. */
|
|
32
32
|
stickyFooter?: boolean;
|
|
33
33
|
}
|
|
34
|
-
declare const DrawerSidebarContext: React.Context<
|
|
34
|
+
declare const DrawerSidebarContext: React.Context<Partial<DrawerSidebarContextProps>>;
|
|
35
35
|
export declare const Drawer: ({ defaultExpanded, expanded, onChange, children, expandedWidth, sidebar, animationDuration, backgroundColor, title, footer, showControls, height, stickyHeader, stickyFooter, ...rest }: DrawerProps) => JSX.Element;
|
|
36
36
|
export { DrawerSidebarContext };
|
|
37
37
|
export default Drawer;
|
|
@@ -7,7 +7,7 @@ import { TooltipContext } from "../../__internal__/tooltip-provider";
|
|
|
7
7
|
import tagComponent from "../../__internal__/utils/helpers/tags/tags";
|
|
8
8
|
import StyledIcon from "./icon.style";
|
|
9
9
|
import { ICON_TOOLTIP_POSITIONS } from "./icon-config";
|
|
10
|
-
import { TabTitleContext } from "../tabs/__internal__/tab-title
|
|
10
|
+
import { TabTitleContext } from "../tabs/__internal__/tab-title";
|
|
11
11
|
const Icon = /*#__PURE__*/React.forwardRef(({
|
|
12
12
|
"aria-hidden": ariaHidden,
|
|
13
13
|
ariaLabel,
|
|
@@ -3,3 +3,4 @@ export { default as MenuItem } from "./menu-item/menu-item";
|
|
|
3
3
|
export { default as ScrollableBlock } from "./scrollable-block/scrollable-block";
|
|
4
4
|
export { default as MenuDivider } from "./menu-divider/menu-divider";
|
|
5
5
|
export { default as MenuSegmentTitle } from "./menu-segment-title/menu-segment-title";
|
|
6
|
+
export { default as MenuFullscreen } from "./menu-full-screen/menu-full-screen";
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export { default } from "./tab-title";
|
|
1
|
+
export { default, TabTitleContext } from "./tab-title.component";
|
|
2
|
+
export type { TabTitleProps } from "./tab-title.component";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from "./tab-title.component";
|
|
1
|
+
export { default, TabTitleContext } from "./tab-title.component";
|
|
@@ -1,4 +1,38 @@
|
|
|
1
|
-
export const TabTitleContext: React.Context<{}>;
|
|
2
|
-
export default TabTitle;
|
|
3
1
|
import React from "react";
|
|
4
|
-
|
|
2
|
+
interface TabTitleContextProps {
|
|
3
|
+
isInTab?: boolean;
|
|
4
|
+
}
|
|
5
|
+
export interface TabTitleProps {
|
|
6
|
+
/** Identifier used for testing purposes */
|
|
7
|
+
"data-role"?: string;
|
|
8
|
+
title?: string;
|
|
9
|
+
id?: string;
|
|
10
|
+
dataTabId?: string;
|
|
11
|
+
className?: string;
|
|
12
|
+
children?: React.ReactNode;
|
|
13
|
+
isTabSelected?: boolean;
|
|
14
|
+
position?: "top" | "left";
|
|
15
|
+
errorMessage?: string;
|
|
16
|
+
warningMessage?: string;
|
|
17
|
+
infoMessage?: string;
|
|
18
|
+
error?: boolean;
|
|
19
|
+
warning?: boolean;
|
|
20
|
+
info?: boolean;
|
|
21
|
+
borders?: boolean;
|
|
22
|
+
noLeftBorder?: boolean;
|
|
23
|
+
noRightBorder?: boolean;
|
|
24
|
+
alternateStyling?: boolean;
|
|
25
|
+
isInSidebar?: boolean;
|
|
26
|
+
siblings?: React.ReactNode;
|
|
27
|
+
titlePosition?: "before" | "after";
|
|
28
|
+
href?: string;
|
|
29
|
+
tabIndex?: number;
|
|
30
|
+
size?: "default" | "large";
|
|
31
|
+
align?: "left" | "right";
|
|
32
|
+
customLayout?: React.ReactNode;
|
|
33
|
+
onClick: (ev: React.MouseEvent<HTMLButtonElement | HTMLAnchorElement>) => void;
|
|
34
|
+
onKeyDown: (ev: React.KeyboardEvent<HTMLButtonElement | HTMLAnchorElement>) => void;
|
|
35
|
+
}
|
|
36
|
+
export declare const TabTitleContext: React.Context<TabTitleContextProps>;
|
|
37
|
+
declare const TabTitle: React.ForwardRefExoticComponent<TabTitleProps & React.RefAttributes<HTMLElement>>;
|
|
38
|
+
export default TabTitle;
|