carbon-react 111.9.1 → 111.11.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__/form-field/form-field.component.js +1 -1
- package/esm/__internal__/input-icon-toggle/input-icon-toggle.component.js +1 -1
- package/esm/__internal__/label/label.component.js +1 -1
- package/esm/components/action-popover/action-popover-item/action-popover-item.component.js +1 -1
- package/esm/components/action-popover/action-popover-menu-button/action-popover-menu-button.component.js +1 -1
- package/esm/components/button/button.component.js +3 -3
- package/esm/components/button-toggle/button-toggle-icon.component.js +1 -1
- package/esm/components/button-toggle/button-toggle.component.js +1 -1
- package/esm/components/decimal/decimal.component.js +1 -1
- package/esm/components/grouped-character/grouped-character.component.js +1 -1
- package/esm/components/help/help.component.js +1 -1
- package/esm/components/icon/fonts/carbon-icons-webfont.woff +0 -0
- package/esm/components/icon/icon-config.js +1 -1
- package/esm/components/icon/icon-type.d.ts +1 -1
- package/esm/components/icon/icon-unicodes.d.ts +3 -0
- package/esm/components/icon/icon-unicodes.js +5 -2
- package/esm/components/icon/icon.component.js +1 -1
- package/esm/components/link/link.component.js +1 -1
- package/esm/components/multi-action-button/multi-action-button.component.js +1 -1
- package/esm/components/note/__internal__/status-icon/index.d.ts +1 -0
- package/esm/components/note/__internal__/status-icon/index.js +1 -0
- package/esm/components/note/__internal__/status-icon/status-icon.component.d.ts +9 -0
- package/esm/components/note/__internal__/{status-with-tooltip/status.component.js → status-icon/status-icon.component.js} +4 -6
- package/esm/components/note/__internal__/status-icon/status-icon.style.d.ts +2 -0
- package/esm/components/note/__internal__/{status-with-tooltip/status.style.js → status-icon/status-icon.style.js} +0 -0
- package/esm/components/note/index.d.ts +2 -2
- package/esm/components/note/note.component.d.ts +28 -0
- package/esm/components/note/note.component.js +188 -46
- package/esm/components/note/note.style.d.ts +13 -0
- package/esm/components/note/note.style.js +0 -5
- package/esm/components/numeral-date/index.d.ts +2 -1
- package/esm/components/numeral-date/numeral-date.component.d.ts +81 -0
- package/esm/components/numeral-date/numeral-date.component.js +237 -128
- package/esm/components/numeral-date/numeral-date.style.d.ts +11 -0
- package/esm/components/portrait/portrait.component.js +1 -1
- package/esm/components/sidebar/sidebar.component.d.ts +2 -2
- package/esm/components/sidebar/sidebar.component.js +106 -2
- package/esm/components/sidebar/sidebar.style.d.ts +1 -6
- package/esm/components/sidebar/sidebar.style.js +7 -2
- package/esm/components/split-button/split-button.component.js +1 -1
- package/esm/components/text-editor/__internal__/decorators/index.d.ts +3 -0
- package/esm/components/text-editor/__internal__/decorators/link-decorator.d.ts +7 -0
- package/esm/components/text-editor/__internal__/utils/index.d.ts +1 -0
- package/esm/components/text-editor/__internal__/utils/utils.d.ts +28 -0
- package/esm/components/text-editor/text-editor.component.d.ts +8 -0
- package/esm/components/text-editor/text-editor.style.d.ts +3 -0
- package/esm/components/textbox/textbox.component.js +1 -1
- package/esm/style/assets/carbon-icons-webfont.woff +0 -0
- package/esm/style/utils/width.d.ts +1 -1
- package/lib/__internal__/form-field/form-field.component.js +1 -1
- package/lib/__internal__/input-icon-toggle/input-icon-toggle.component.js +1 -1
- package/lib/__internal__/label/label.component.js +1 -1
- package/lib/components/action-popover/action-popover-item/action-popover-item.component.js +1 -1
- package/lib/components/action-popover/action-popover-menu-button/action-popover-menu-button.component.js +1 -1
- package/lib/components/button/button.component.js +3 -3
- package/lib/components/button-toggle/button-toggle-icon.component.js +1 -1
- package/lib/components/button-toggle/button-toggle.component.js +1 -1
- package/lib/components/decimal/decimal.component.js +1 -1
- package/lib/components/grouped-character/grouped-character.component.js +1 -1
- package/lib/components/help/help.component.js +1 -1
- package/lib/components/icon/fonts/carbon-icons-webfont.woff +0 -0
- package/lib/components/icon/icon-config.js +1 -1
- package/lib/components/icon/icon-type.d.ts +1 -1
- package/lib/components/icon/icon-unicodes.d.ts +3 -0
- package/lib/components/icon/icon-unicodes.js +5 -2
- package/lib/components/icon/icon.component.js +1 -1
- package/lib/components/link/link.component.js +1 -1
- package/lib/components/multi-action-button/multi-action-button.component.js +1 -1
- package/lib/components/note/__internal__/status-icon/index.d.ts +1 -0
- package/lib/components/note/__internal__/{status-with-tooltip → status-icon}/index.js +2 -2
- package/lib/components/note/__internal__/{status-with-tooltip → status-icon}/package.json +1 -1
- package/lib/components/note/__internal__/status-icon/status-icon.component.d.ts +9 -0
- package/lib/components/note/__internal__/{status-with-tooltip/status.component.js → status-icon/status-icon.component.js} +5 -7
- package/lib/components/note/__internal__/status-icon/status-icon.style.d.ts +2 -0
- package/lib/components/note/__internal__/{status-with-tooltip/status.style.js → status-icon/status-icon.style.js} +0 -0
- package/lib/components/note/index.d.ts +2 -2
- package/lib/components/note/note.component.d.ts +28 -0
- package/lib/components/note/note.component.js +195 -55
- package/lib/components/note/note.style.d.ts +13 -0
- package/lib/components/note/note.style.js +0 -6
- package/lib/components/numeral-date/index.d.ts +2 -1
- package/lib/components/numeral-date/numeral-date.component.d.ts +81 -0
- package/lib/components/numeral-date/numeral-date.component.js +237 -128
- package/lib/components/numeral-date/numeral-date.style.d.ts +11 -0
- package/lib/components/portrait/portrait.component.js +1 -1
- package/lib/components/sidebar/sidebar.component.d.ts +2 -2
- package/lib/components/sidebar/sidebar.component.js +106 -2
- package/lib/components/sidebar/sidebar.style.d.ts +1 -6
- package/lib/components/sidebar/sidebar.style.js +8 -2
- package/lib/components/split-button/split-button.component.js +1 -1
- package/lib/components/text-editor/__internal__/decorators/index.d.ts +3 -0
- package/lib/components/text-editor/__internal__/decorators/link-decorator.d.ts +7 -0
- package/lib/components/text-editor/__internal__/utils/index.d.ts +1 -0
- package/lib/components/text-editor/__internal__/utils/utils.d.ts +28 -0
- package/lib/components/text-editor/text-editor.component.d.ts +8 -0
- package/lib/components/text-editor/text-editor.style.d.ts +3 -0
- package/lib/components/textbox/textbox.component.js +1 -1
- package/lib/style/assets/carbon-icons-webfont.woff +0 -0
- package/lib/style/utils/width.d.ts +1 -1
- package/package.json +3 -2
- package/esm/components/note/__internal__/status-with-tooltip/index.js +0 -1
- package/esm/components/note/note.d.ts +0 -30
- package/esm/components/numeral-date/numeral-date.d.ts +0 -97
- package/lib/components/note/note.d.ts +0 -30
- package/lib/components/numeral-date/numeral-date.d.ts +0 -97
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare const StyledNoteContent: import("styled-components").StyledComponent<"div", any, {
|
|
2
|
+
hasPreview?: boolean | undefined;
|
|
3
|
+
}, never>;
|
|
4
|
+
declare const StyledInlineControl: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
5
|
+
declare const StyledTitle: import("styled-components").StyledComponent<"header", any, {}, never>;
|
|
6
|
+
declare const StyledFooterContent: import("styled-components").StyledComponent<"div", any, {
|
|
7
|
+
hasName: boolean;
|
|
8
|
+
}, never>;
|
|
9
|
+
declare const StyledFooter: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
10
|
+
declare const StyledNote: import("styled-components").StyledComponent<"div", any, {
|
|
11
|
+
width: number;
|
|
12
|
+
}, never>;
|
|
13
|
+
export { StyledNote, StyledNoteContent, StyledInlineControl, StyledTitle, StyledFooter, StyledFooterContent, };
|
|
@@ -7,8 +7,6 @@ exports.StyledFooterContent = exports.StyledFooter = exports.StyledTitle = expor
|
|
|
7
7
|
|
|
8
8
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
9
9
|
|
|
10
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
-
|
|
12
10
|
var _styledSystem = require("styled-system");
|
|
13
11
|
|
|
14
12
|
var _base = _interopRequireDefault(require("../../style/themes/base"));
|
|
@@ -150,10 +148,6 @@ const StyledNote = _styledComponents.default.div`
|
|
|
150
148
|
${_styledSystem.margin}
|
|
151
149
|
`;
|
|
152
150
|
exports.StyledNote = StyledNote;
|
|
153
|
-
StyledNote.propTypes = {
|
|
154
|
-
padding: _propTypes.default.string,
|
|
155
|
-
width: _propTypes.default.number
|
|
156
|
-
};
|
|
157
151
|
StyledNote.defaultProps = {
|
|
158
152
|
theme: _base.default
|
|
159
153
|
};
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export { default } from "./numeral-date";
|
|
1
|
+
export { default } from "./numeral-date.component";
|
|
2
|
+
export type { NumeralDateProps } from "./numeral-date.component";
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { MarginProps } from "styled-system";
|
|
3
|
+
import { ValidationProps } from "../../__internal__/validations";
|
|
4
|
+
export declare const ALLOWED_DATE_FORMATS: readonly [readonly ["dd", "mm", "yyyy"], readonly ["mm", "dd", "yyyy"], readonly ["dd", "mm"], readonly ["mm", "dd"], readonly ["mm", "yyyy"]];
|
|
5
|
+
export interface DayMonthDate {
|
|
6
|
+
dd: string;
|
|
7
|
+
mm: string;
|
|
8
|
+
}
|
|
9
|
+
export interface MonthYearDate {
|
|
10
|
+
mm: string;
|
|
11
|
+
yyyy: string;
|
|
12
|
+
}
|
|
13
|
+
export interface FullDate extends DayMonthDate {
|
|
14
|
+
yyyy: string;
|
|
15
|
+
}
|
|
16
|
+
export declare type NumeralDateObject = DayMonthDate | MonthYearDate | FullDate;
|
|
17
|
+
export interface NumeralDateEvent<DateType extends NumeralDateObject = FullDate> {
|
|
18
|
+
target: {
|
|
19
|
+
name?: string;
|
|
20
|
+
id: string;
|
|
21
|
+
value: DateType;
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
export interface NumeralDateProps<DateType extends NumeralDateObject = FullDate> extends ValidationProps, MarginProps {
|
|
25
|
+
/** Breakpoint for adaptive label (inline labels change to top aligned). Enables the adaptive behaviour when set */
|
|
26
|
+
adaptiveLabelBreakpoint?: number;
|
|
27
|
+
/** Identifier used for testing purposes, applied to the root element of the component. */
|
|
28
|
+
"data-component"?: string;
|
|
29
|
+
/** Identifier used for testing purposes, applied to the root element of the component. */
|
|
30
|
+
"data-element"?: string;
|
|
31
|
+
/** Identifier used for testing purposes, applied to the root element of the component. */
|
|
32
|
+
"data-role"?: string;
|
|
33
|
+
/** If true, the component will be disabled */
|
|
34
|
+
disabled?: boolean;
|
|
35
|
+
/** If true, the component will be read-only */
|
|
36
|
+
readOnly?: boolean;
|
|
37
|
+
dateFormat?: ValidDateFormat;
|
|
38
|
+
/** Default value for use in uncontrolled mode */
|
|
39
|
+
defaultValue?: DateType;
|
|
40
|
+
/** Value for use in controlled mode */
|
|
41
|
+
value?: DateType;
|
|
42
|
+
/** When true, enables the internal errors to be displayed */
|
|
43
|
+
enableInternalError?: boolean;
|
|
44
|
+
/** When true, enables the internal warnings to be displayed */
|
|
45
|
+
enableInternalWarning?: boolean;
|
|
46
|
+
/** Help content to be displayed under an input */
|
|
47
|
+
fieldHelp?: React.ReactNode;
|
|
48
|
+
/** `id` for events */
|
|
49
|
+
id?: string;
|
|
50
|
+
/** `name` for events */
|
|
51
|
+
name?: string;
|
|
52
|
+
/** Label */
|
|
53
|
+
label?: string;
|
|
54
|
+
/** Label alignment. Works only when labelInline is true */
|
|
55
|
+
labelAlign?: "left" | "right";
|
|
56
|
+
/** Text applied to label help tooltip */
|
|
57
|
+
labelHelp?: React.ReactNode;
|
|
58
|
+
/** When true, label is placed in line with an input */
|
|
59
|
+
labelInline?: boolean;
|
|
60
|
+
/** Label width */
|
|
61
|
+
labelWidth?: number;
|
|
62
|
+
/** Spacing between label and a field for inline label, given number will be multiplied by base spacing unit (8) */
|
|
63
|
+
labelSpacing?: 1 | 2;
|
|
64
|
+
/** Blur event handler */
|
|
65
|
+
onBlur?: (ev: NumeralDateEvent<DateType>) => void;
|
|
66
|
+
/** Change event handler */
|
|
67
|
+
onChange?: (ev: NumeralDateEvent<DateType>) => void;
|
|
68
|
+
/** Flag to configure component as mandatory */
|
|
69
|
+
required?: boolean;
|
|
70
|
+
/** Size of an input */
|
|
71
|
+
size?: "small" | "medium" | "large";
|
|
72
|
+
/** When true, validation icons will be placed on labels instead of being placed on the inputs */
|
|
73
|
+
validationOnLabel?: boolean;
|
|
74
|
+
/** Overrides the default tooltip position */
|
|
75
|
+
tooltipPosition?: "top" | "bottom" | "left" | "right";
|
|
76
|
+
/** Aria label for rendered help component */
|
|
77
|
+
helpAriaLabel?: string;
|
|
78
|
+
}
|
|
79
|
+
export declare type ValidDateFormat = typeof ALLOWED_DATE_FORMATS[number];
|
|
80
|
+
export declare const NumeralDate: <DateType extends NumeralDateObject = FullDate>({ dateFormat, defaultValue, disabled, error, warning, "data-component": dataComponent, "data-element": dataElement, "data-role": dataRole, info, id, name, onBlur, onChange, value, validationOnLabel, label, labelInline, labelWidth, labelAlign, labelHelp, labelSpacing, fieldHelp, adaptiveLabelBreakpoint, required, readOnly, size, enableInternalError, enableInternalWarning, tooltipPosition, helpAriaLabel, ...rest }: NumeralDateProps<DateType>) => JSX.Element;
|
|
81
|
+
export default NumeralDate;
|
|
@@ -3,14 +3,12 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.default = void 0;
|
|
6
|
+
exports.default = exports.NumeralDate = exports.ALLOWED_DATE_FORMATS = void 0;
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
9
|
|
|
10
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
11
|
|
|
12
|
-
var _propTypes2 = _interopRequireDefault(require("@styled-system/prop-types"));
|
|
13
|
-
|
|
14
12
|
var _invariant = _interopRequireDefault(require("invariant"));
|
|
15
13
|
|
|
16
14
|
var _utils = require("../../style/utils");
|
|
@@ -47,8 +45,9 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj;
|
|
|
47
45
|
|
|
48
46
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
49
47
|
|
|
50
|
-
const marginPropTypes = (0, _utils.filterStyledSystemMarginProps)(_propTypes2.default.space);
|
|
51
48
|
const ALLOWED_DATE_FORMATS = [["dd", "mm", "yyyy"], ["mm", "dd", "yyyy"], ["dd", "mm"], ["mm", "dd"], ["mm", "yyyy"]];
|
|
49
|
+
exports.ALLOWED_DATE_FORMATS = ALLOWED_DATE_FORMATS;
|
|
50
|
+
const incorrectDateFormatMessage = "Forbidden prop dateFormat supplied to NumeralDate. " + "Only one of these date formats is allowed: " + "['dd', 'mm', 'yyyy'], " + "['mm', 'dd', 'yyyy'], " + "['dd', 'mm'], " + "['mm', 'dd'], " + "['mm', 'yyyy']";
|
|
52
51
|
|
|
53
52
|
const isDayValid = day => day ? +day > 0 && +day < 32 : true;
|
|
54
53
|
|
|
@@ -105,7 +104,13 @@ const NumeralDate = ({
|
|
|
105
104
|
const isControlled = (0, _react.useRef)(value !== undefined);
|
|
106
105
|
const initialValue = isControlled.current ? value : defaultValue;
|
|
107
106
|
const refs = (0, _react.useRef)(dateFormat.map(() => /*#__PURE__*/_react.default.createRef()));
|
|
108
|
-
const [internalMessages, setInternalMessages] = (0, _react.useState)({
|
|
107
|
+
const [internalMessages, setInternalMessages] = (0, _react.useState)({ ...Object.fromEntries(dateFormat.map(datePart => [datePart, ""]))
|
|
108
|
+
});
|
|
109
|
+
const hasCorrectDateFormat = (0, _react.useMemo)(() => {
|
|
110
|
+
const isAllowed = !dateFormat || ALLOWED_DATE_FORMATS.find(allowedDateFormat => JSON.stringify(allowedDateFormat) === JSON.stringify(dateFormat));
|
|
111
|
+
return isAllowed;
|
|
112
|
+
}, [dateFormat]);
|
|
113
|
+
!hasCorrectDateFormat ? process.env.NODE_ENV !== "production" ? (0, _invariant.default)(false, incorrectDateFormatMessage) : (0, _invariant.default)(false) : void 0;
|
|
109
114
|
(0, _react.useEffect)(() => {
|
|
110
115
|
const modeSwitchedMessage = "Input elements should not switch from uncontrolled to controlled (or vice versa). " + "Decide between using a controlled or uncontrolled input element for the lifetime of the component";
|
|
111
116
|
!(isControlled.current === (value !== undefined)) ? process.env.NODE_ENV !== "production" ? (0, _invariant.default)(false, modeSwitchedMessage) : (0, _invariant.default)(false) : void 0;
|
|
@@ -115,10 +120,7 @@ const NumeralDate = ({
|
|
|
115
120
|
mm: l.numeralDate.validation.month(),
|
|
116
121
|
yyyy: l.numeralDate.validation.year()
|
|
117
122
|
};
|
|
118
|
-
const [dateValue, setDateValue] = (0, _react.useState)({ ...(initialValue || dateFormat.
|
|
119
|
-
dateObject[key] = "";
|
|
120
|
-
return dateObject;
|
|
121
|
-
}, {}))
|
|
123
|
+
const [dateValue, setDateValue] = (0, _react.useState)({ ...(initialValue || Object.fromEntries(dateFormat.map(datePart => [datePart, ""])))
|
|
122
124
|
});
|
|
123
125
|
|
|
124
126
|
const createCustomEventObject = newValue => ({
|
|
@@ -129,18 +131,18 @@ const NumeralDate = ({
|
|
|
129
131
|
}
|
|
130
132
|
});
|
|
131
133
|
|
|
132
|
-
const onKeyPress =
|
|
133
|
-
const isValidKey = _events.default.isNumberKey(
|
|
134
|
+
const onKeyPress = event => {
|
|
135
|
+
const isValidKey = _events.default.isNumberKey(event) || _events.default.isTabKey(event) || event.key === "Delete" || event.key === "Backspace";
|
|
134
136
|
|
|
135
137
|
if (!isValidKey) {
|
|
136
|
-
|
|
138
|
+
event.preventDefault();
|
|
137
139
|
}
|
|
138
140
|
};
|
|
139
141
|
|
|
140
|
-
const handleChange = (
|
|
142
|
+
const handleChange = (event, datePart) => {
|
|
141
143
|
const {
|
|
142
144
|
value: newValue
|
|
143
|
-
} =
|
|
145
|
+
} = event.target;
|
|
144
146
|
|
|
145
147
|
if (newValue.length <= datePart.length) {
|
|
146
148
|
const newDateValue = { ...dateValue,
|
|
@@ -159,8 +161,9 @@ const NumeralDate = ({
|
|
|
159
161
|
const internalValidationEnabled = enableInternalError || enableInternalWarning;
|
|
160
162
|
/* istanbul ignore else */
|
|
161
163
|
|
|
162
|
-
if (
|
|
163
|
-
const
|
|
164
|
+
if (internalValidationEnabled) {
|
|
165
|
+
const newDatePart = dateValue[datePart];
|
|
166
|
+
const errorMessage = validations[datePart](newDatePart) ? "" : validationMessages[datePart];
|
|
164
167
|
setInternalMessages(prev => ({ ...prev,
|
|
165
168
|
[datePart]: errorMessage
|
|
166
169
|
}));
|
|
@@ -176,7 +179,7 @@ const NumeralDate = ({
|
|
|
176
179
|
}, 5);
|
|
177
180
|
};
|
|
178
181
|
|
|
179
|
-
const internalMessage = Object.keys(internalMessages).reduce((
|
|
182
|
+
const internalMessage = Object.keys(internalMessages).reduce((combinedMessage, datePart) => internalMessages[datePart] ? `${combinedMessage + internalMessages[datePart]}\n` : combinedMessage, "");
|
|
180
183
|
const internalError = enableInternalError ? internalMessage + error : error;
|
|
181
184
|
const internalWarning = enableInternalWarning ? internalMessage + warning : warning;
|
|
182
185
|
return /*#__PURE__*/_react.default.createElement(_tooltipProvider.TooltipProvider, {
|
|
@@ -213,7 +216,7 @@ const NumeralDate = ({
|
|
|
213
216
|
const isMiddle = index === 1;
|
|
214
217
|
const validation = error || warning || info;
|
|
215
218
|
const isStringValidation = typeof validation === "string";
|
|
216
|
-
const hasValidationIcon = isStringValidation && validation.length;
|
|
219
|
+
const hasValidationIcon = isStringValidation && !!validation.length;
|
|
217
220
|
return /*#__PURE__*/_react.default.createElement(_numeralDateContext.default.Provider, {
|
|
218
221
|
value: {
|
|
219
222
|
disableErrorBorder: index !== 0
|
|
@@ -253,120 +256,226 @@ const NumeralDate = ({
|
|
|
253
256
|
})))));
|
|
254
257
|
};
|
|
255
258
|
|
|
259
|
+
exports.NumeralDate = NumeralDate;
|
|
256
260
|
NumeralDate.propTypes = {
|
|
257
|
-
|
|
258
|
-
...marginPropTypes,
|
|
259
|
-
|
|
260
|
-
/** Identifier used for testing purposes, applied to the root element of the component. */
|
|
261
|
+
"adaptiveLabelBreakpoint": _propTypes.default.number,
|
|
261
262
|
"data-component": _propTypes.default.string,
|
|
262
|
-
|
|
263
|
-
/** Identifier used for testing purposes, applied to the root element of the component. */
|
|
264
263
|
"data-element": _propTypes.default.string,
|
|
265
|
-
|
|
266
|
-
/** Identifier used for testing purposes, applied to the root element of the component. */
|
|
267
264
|
"data-role": _propTypes.default.string,
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
265
|
+
"dateFormat": _propTypes.default.shape({
|
|
266
|
+
"__@iterator": _propTypes.default.func.isRequired,
|
|
267
|
+
"0": _propTypes.default.oneOf(["dd"]).isRequired,
|
|
268
|
+
"1": _propTypes.default.oneOf(["mm"]).isRequired,
|
|
269
|
+
"2": _propTypes.default.oneOf(["yyyy"]).isRequired,
|
|
270
|
+
"concat": _propTypes.default.func.isRequired,
|
|
271
|
+
"entries": _propTypes.default.func.isRequired,
|
|
272
|
+
"every": _propTypes.default.func.isRequired,
|
|
273
|
+
"filter": _propTypes.default.func.isRequired,
|
|
274
|
+
"find": _propTypes.default.func.isRequired,
|
|
275
|
+
"findIndex": _propTypes.default.func.isRequired,
|
|
276
|
+
"flat": _propTypes.default.func.isRequired,
|
|
277
|
+
"flatMap": _propTypes.default.func.isRequired,
|
|
278
|
+
"forEach": _propTypes.default.func.isRequired,
|
|
279
|
+
"includes": _propTypes.default.func.isRequired,
|
|
280
|
+
"indexOf": _propTypes.default.func.isRequired,
|
|
281
|
+
"join": _propTypes.default.func.isRequired,
|
|
282
|
+
"keys": _propTypes.default.func.isRequired,
|
|
283
|
+
"lastIndexOf": _propTypes.default.func.isRequired,
|
|
284
|
+
"length": _propTypes.default.oneOf([3]).isRequired,
|
|
285
|
+
"map": _propTypes.default.func.isRequired,
|
|
286
|
+
"reduce": _propTypes.default.func.isRequired,
|
|
287
|
+
"reduceRight": _propTypes.default.func.isRequired,
|
|
288
|
+
"slice": _propTypes.default.func.isRequired,
|
|
289
|
+
"some": _propTypes.default.func.isRequired,
|
|
290
|
+
"toLocaleString": _propTypes.default.func.isRequired,
|
|
291
|
+
"toString": _propTypes.default.func.isRequired,
|
|
292
|
+
"values": _propTypes.default.func.isRequired
|
|
293
|
+
}),
|
|
294
|
+
"defaultValue": _propTypes.default.shape({
|
|
295
|
+
"dd": _propTypes.default.string.isRequired,
|
|
296
|
+
"mm": _propTypes.default.string.isRequired
|
|
297
|
+
}),
|
|
298
|
+
"disabled": _propTypes.default.bool,
|
|
299
|
+
"enableInternalError": _propTypes.default.bool,
|
|
300
|
+
"enableInternalWarning": _propTypes.default.bool,
|
|
301
|
+
"error": _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.bool]),
|
|
302
|
+
"fieldHelp": _propTypes.default.node,
|
|
303
|
+
"helpAriaLabel": _propTypes.default.string,
|
|
304
|
+
"id": _propTypes.default.string,
|
|
305
|
+
"info": _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.bool]),
|
|
306
|
+
"label": _propTypes.default.string,
|
|
307
|
+
"labelAlign": _propTypes.default.oneOf(["left", "right"]),
|
|
308
|
+
"labelHelp": _propTypes.default.node,
|
|
309
|
+
"labelInline": _propTypes.default.bool,
|
|
310
|
+
"labelSpacing": _propTypes.default.oneOf([1, 2]),
|
|
311
|
+
"labelWidth": _propTypes.default.number,
|
|
312
|
+
"m": _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.oneOf([null]), _propTypes.default.number, _propTypes.default.shape({
|
|
313
|
+
"__@toStringTag": _propTypes.default.string.isRequired,
|
|
314
|
+
"description": _propTypes.default.string,
|
|
315
|
+
"toString": _propTypes.default.func.isRequired,
|
|
316
|
+
"valueOf": _propTypes.default.func.isRequired
|
|
317
|
+
}), _propTypes.default.string])), _propTypes.default.number, _propTypes.default.object, _propTypes.default.shape({
|
|
318
|
+
"__@toStringTag": _propTypes.default.string.isRequired,
|
|
319
|
+
"description": _propTypes.default.string,
|
|
320
|
+
"toString": _propTypes.default.func.isRequired,
|
|
321
|
+
"valueOf": _propTypes.default.func.isRequired
|
|
322
|
+
}), _propTypes.default.string]),
|
|
323
|
+
"margin": _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.oneOf([null]), _propTypes.default.number, _propTypes.default.shape({
|
|
324
|
+
"__@toStringTag": _propTypes.default.string.isRequired,
|
|
325
|
+
"description": _propTypes.default.string,
|
|
326
|
+
"toString": _propTypes.default.func.isRequired,
|
|
327
|
+
"valueOf": _propTypes.default.func.isRequired
|
|
328
|
+
}), _propTypes.default.string])), _propTypes.default.number, _propTypes.default.object, _propTypes.default.shape({
|
|
329
|
+
"__@toStringTag": _propTypes.default.string.isRequired,
|
|
330
|
+
"description": _propTypes.default.string,
|
|
331
|
+
"toString": _propTypes.default.func.isRequired,
|
|
332
|
+
"valueOf": _propTypes.default.func.isRequired
|
|
333
|
+
}), _propTypes.default.string]),
|
|
334
|
+
"marginBottom": _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.oneOf([null]), _propTypes.default.number, _propTypes.default.shape({
|
|
335
|
+
"__@toStringTag": _propTypes.default.string.isRequired,
|
|
336
|
+
"description": _propTypes.default.string,
|
|
337
|
+
"toString": _propTypes.default.func.isRequired,
|
|
338
|
+
"valueOf": _propTypes.default.func.isRequired
|
|
339
|
+
}), _propTypes.default.string])), _propTypes.default.number, _propTypes.default.object, _propTypes.default.shape({
|
|
340
|
+
"__@toStringTag": _propTypes.default.string.isRequired,
|
|
341
|
+
"description": _propTypes.default.string,
|
|
342
|
+
"toString": _propTypes.default.func.isRequired,
|
|
343
|
+
"valueOf": _propTypes.default.func.isRequired
|
|
344
|
+
}), _propTypes.default.string]),
|
|
345
|
+
"marginLeft": _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.oneOf([null]), _propTypes.default.number, _propTypes.default.shape({
|
|
346
|
+
"__@toStringTag": _propTypes.default.string.isRequired,
|
|
347
|
+
"description": _propTypes.default.string,
|
|
348
|
+
"toString": _propTypes.default.func.isRequired,
|
|
349
|
+
"valueOf": _propTypes.default.func.isRequired
|
|
350
|
+
}), _propTypes.default.string])), _propTypes.default.number, _propTypes.default.object, _propTypes.default.shape({
|
|
351
|
+
"__@toStringTag": _propTypes.default.string.isRequired,
|
|
352
|
+
"description": _propTypes.default.string,
|
|
353
|
+
"toString": _propTypes.default.func.isRequired,
|
|
354
|
+
"valueOf": _propTypes.default.func.isRequired
|
|
355
|
+
}), _propTypes.default.string]),
|
|
356
|
+
"marginRight": _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.oneOf([null]), _propTypes.default.number, _propTypes.default.shape({
|
|
357
|
+
"__@toStringTag": _propTypes.default.string.isRequired,
|
|
358
|
+
"description": _propTypes.default.string,
|
|
359
|
+
"toString": _propTypes.default.func.isRequired,
|
|
360
|
+
"valueOf": _propTypes.default.func.isRequired
|
|
361
|
+
}), _propTypes.default.string])), _propTypes.default.number, _propTypes.default.object, _propTypes.default.shape({
|
|
362
|
+
"__@toStringTag": _propTypes.default.string.isRequired,
|
|
363
|
+
"description": _propTypes.default.string,
|
|
364
|
+
"toString": _propTypes.default.func.isRequired,
|
|
365
|
+
"valueOf": _propTypes.default.func.isRequired
|
|
366
|
+
}), _propTypes.default.string]),
|
|
367
|
+
"marginTop": _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.oneOf([null]), _propTypes.default.number, _propTypes.default.shape({
|
|
368
|
+
"__@toStringTag": _propTypes.default.string.isRequired,
|
|
369
|
+
"description": _propTypes.default.string,
|
|
370
|
+
"toString": _propTypes.default.func.isRequired,
|
|
371
|
+
"valueOf": _propTypes.default.func.isRequired
|
|
372
|
+
}), _propTypes.default.string])), _propTypes.default.number, _propTypes.default.object, _propTypes.default.shape({
|
|
373
|
+
"__@toStringTag": _propTypes.default.string.isRequired,
|
|
374
|
+
"description": _propTypes.default.string,
|
|
375
|
+
"toString": _propTypes.default.func.isRequired,
|
|
376
|
+
"valueOf": _propTypes.default.func.isRequired
|
|
377
|
+
}), _propTypes.default.string]),
|
|
378
|
+
"marginX": _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.oneOf([null]), _propTypes.default.number, _propTypes.default.shape({
|
|
379
|
+
"__@toStringTag": _propTypes.default.string.isRequired,
|
|
380
|
+
"description": _propTypes.default.string,
|
|
381
|
+
"toString": _propTypes.default.func.isRequired,
|
|
382
|
+
"valueOf": _propTypes.default.func.isRequired
|
|
383
|
+
}), _propTypes.default.string])), _propTypes.default.number, _propTypes.default.object, _propTypes.default.shape({
|
|
384
|
+
"__@toStringTag": _propTypes.default.string.isRequired,
|
|
385
|
+
"description": _propTypes.default.string,
|
|
386
|
+
"toString": _propTypes.default.func.isRequired,
|
|
387
|
+
"valueOf": _propTypes.default.func.isRequired
|
|
388
|
+
}), _propTypes.default.string]),
|
|
389
|
+
"marginY": _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.oneOf([null]), _propTypes.default.number, _propTypes.default.shape({
|
|
390
|
+
"__@toStringTag": _propTypes.default.string.isRequired,
|
|
391
|
+
"description": _propTypes.default.string,
|
|
392
|
+
"toString": _propTypes.default.func.isRequired,
|
|
393
|
+
"valueOf": _propTypes.default.func.isRequired
|
|
394
|
+
}), _propTypes.default.string])), _propTypes.default.number, _propTypes.default.object, _propTypes.default.shape({
|
|
395
|
+
"__@toStringTag": _propTypes.default.string.isRequired,
|
|
396
|
+
"description": _propTypes.default.string,
|
|
397
|
+
"toString": _propTypes.default.func.isRequired,
|
|
398
|
+
"valueOf": _propTypes.default.func.isRequired
|
|
399
|
+
}), _propTypes.default.string]),
|
|
400
|
+
"mb": _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.oneOf([null]), _propTypes.default.number, _propTypes.default.shape({
|
|
401
|
+
"__@toStringTag": _propTypes.default.string.isRequired,
|
|
402
|
+
"description": _propTypes.default.string,
|
|
403
|
+
"toString": _propTypes.default.func.isRequired,
|
|
404
|
+
"valueOf": _propTypes.default.func.isRequired
|
|
405
|
+
}), _propTypes.default.string])), _propTypes.default.number, _propTypes.default.object, _propTypes.default.shape({
|
|
406
|
+
"__@toStringTag": _propTypes.default.string.isRequired,
|
|
407
|
+
"description": _propTypes.default.string,
|
|
408
|
+
"toString": _propTypes.default.func.isRequired,
|
|
409
|
+
"valueOf": _propTypes.default.func.isRequired
|
|
410
|
+
}), _propTypes.default.string]),
|
|
411
|
+
"ml": _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.oneOf([null]), _propTypes.default.number, _propTypes.default.shape({
|
|
412
|
+
"__@toStringTag": _propTypes.default.string.isRequired,
|
|
413
|
+
"description": _propTypes.default.string,
|
|
414
|
+
"toString": _propTypes.default.func.isRequired,
|
|
415
|
+
"valueOf": _propTypes.default.func.isRequired
|
|
416
|
+
}), _propTypes.default.string])), _propTypes.default.number, _propTypes.default.object, _propTypes.default.shape({
|
|
417
|
+
"__@toStringTag": _propTypes.default.string.isRequired,
|
|
418
|
+
"description": _propTypes.default.string,
|
|
419
|
+
"toString": _propTypes.default.func.isRequired,
|
|
420
|
+
"valueOf": _propTypes.default.func.isRequired
|
|
421
|
+
}), _propTypes.default.string]),
|
|
422
|
+
"mr": _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.oneOf([null]), _propTypes.default.number, _propTypes.default.shape({
|
|
423
|
+
"__@toStringTag": _propTypes.default.string.isRequired,
|
|
424
|
+
"description": _propTypes.default.string,
|
|
425
|
+
"toString": _propTypes.default.func.isRequired,
|
|
426
|
+
"valueOf": _propTypes.default.func.isRequired
|
|
427
|
+
}), _propTypes.default.string])), _propTypes.default.number, _propTypes.default.object, _propTypes.default.shape({
|
|
428
|
+
"__@toStringTag": _propTypes.default.string.isRequired,
|
|
429
|
+
"description": _propTypes.default.string,
|
|
430
|
+
"toString": _propTypes.default.func.isRequired,
|
|
431
|
+
"valueOf": _propTypes.default.func.isRequired
|
|
432
|
+
}), _propTypes.default.string]),
|
|
433
|
+
"mt": _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.oneOf([null]), _propTypes.default.number, _propTypes.default.shape({
|
|
434
|
+
"__@toStringTag": _propTypes.default.string.isRequired,
|
|
435
|
+
"description": _propTypes.default.string,
|
|
436
|
+
"toString": _propTypes.default.func.isRequired,
|
|
437
|
+
"valueOf": _propTypes.default.func.isRequired
|
|
438
|
+
}), _propTypes.default.string])), _propTypes.default.number, _propTypes.default.object, _propTypes.default.shape({
|
|
439
|
+
"__@toStringTag": _propTypes.default.string.isRequired,
|
|
440
|
+
"description": _propTypes.default.string,
|
|
441
|
+
"toString": _propTypes.default.func.isRequired,
|
|
442
|
+
"valueOf": _propTypes.default.func.isRequired
|
|
443
|
+
}), _propTypes.default.string]),
|
|
444
|
+
"mx": _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.oneOf([null]), _propTypes.default.number, _propTypes.default.shape({
|
|
445
|
+
"__@toStringTag": _propTypes.default.string.isRequired,
|
|
446
|
+
"description": _propTypes.default.string,
|
|
447
|
+
"toString": _propTypes.default.func.isRequired,
|
|
448
|
+
"valueOf": _propTypes.default.func.isRequired
|
|
449
|
+
}), _propTypes.default.string])), _propTypes.default.number, _propTypes.default.object, _propTypes.default.shape({
|
|
450
|
+
"__@toStringTag": _propTypes.default.string.isRequired,
|
|
451
|
+
"description": _propTypes.default.string,
|
|
452
|
+
"toString": _propTypes.default.func.isRequired,
|
|
453
|
+
"valueOf": _propTypes.default.func.isRequired
|
|
454
|
+
}), _propTypes.default.string]),
|
|
455
|
+
"my": _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.oneOf([null]), _propTypes.default.number, _propTypes.default.shape({
|
|
456
|
+
"__@toStringTag": _propTypes.default.string.isRequired,
|
|
457
|
+
"description": _propTypes.default.string,
|
|
458
|
+
"toString": _propTypes.default.func.isRequired,
|
|
459
|
+
"valueOf": _propTypes.default.func.isRequired
|
|
460
|
+
}), _propTypes.default.string])), _propTypes.default.number, _propTypes.default.object, _propTypes.default.shape({
|
|
461
|
+
"__@toStringTag": _propTypes.default.string.isRequired,
|
|
462
|
+
"description": _propTypes.default.string,
|
|
463
|
+
"toString": _propTypes.default.func.isRequired,
|
|
464
|
+
"valueOf": _propTypes.default.func.isRequired
|
|
465
|
+
}), _propTypes.default.string]),
|
|
466
|
+
"name": _propTypes.default.string,
|
|
467
|
+
"onBlur": _propTypes.default.func,
|
|
468
|
+
"onChange": _propTypes.default.func,
|
|
469
|
+
"readOnly": _propTypes.default.bool,
|
|
470
|
+
"required": _propTypes.default.bool,
|
|
471
|
+
"size": _propTypes.default.oneOf(["large", "medium", "small"]),
|
|
472
|
+
"tooltipPosition": _propTypes.default.oneOf(["bottom", "left", "right", "top"]),
|
|
473
|
+
"validationOnLabel": _propTypes.default.bool,
|
|
474
|
+
"value": _propTypes.default.shape({
|
|
475
|
+
"dd": _propTypes.default.string.isRequired,
|
|
476
|
+
"mm": _propTypes.default.string.isRequired
|
|
477
|
+
}),
|
|
478
|
+
"warning": _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.bool])
|
|
370
479
|
};
|
|
371
480
|
var _default = NumeralDate;
|
|
372
481
|
exports.default = _default;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
interface StyledDateFieldProps {
|
|
2
|
+
isEnd?: boolean;
|
|
3
|
+
isMiddle?: boolean;
|
|
4
|
+
isYearInput?: boolean;
|
|
5
|
+
hasValidationIcon?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare const StyledNumeralDate: import("styled-components").StyledComponent<"div", any, {
|
|
8
|
+
name?: string | undefined;
|
|
9
|
+
}, never>;
|
|
10
|
+
export declare const StyledDateField: import("styled-components").StyledComponent<"div", any, StyledDateFieldProps, never>;
|
|
11
|
+
export {};
|
|
@@ -122,7 +122,7 @@ Portrait.propTypes = {
|
|
|
122
122
|
"alt": _propTypes.default.string,
|
|
123
123
|
"darkBackground": _propTypes.default.bool,
|
|
124
124
|
"gravatar": _propTypes.default.string,
|
|
125
|
-
"iconType": _propTypes.default.oneOf(["add", "admin", "alert_on", "alert", "analysis", "arrow_down", "arrow_left_boxed", "arrow_left_right_small", "arrow_left_small", "arrow_left", "arrow_right_small", "arrow_right", "arrow_up", "arrow", "attach", "bank", "basket_with_squares", "basket", "bin", "block_arrow_right", "blocked_square", "blocked", "bold", "boxed_shapes", "bulk_destroy", "bullet_list_dotted", "bullet_list_numbers", "bullet_list", "business", "calendar_today", "calendar", "call", "camera", "card_view", "caret_down", "caret_large_down", "caret_large_left", "caret_large_right", "caret_large_up", "caret_left", "caret_right", "caret_up", "cart", "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", "contacts", "copy", "create", "credit_card_slash", "credit_card", "cross_circle", "cross", "csv", "delete", "delivery", "disconnect", "disputed", "document_right_align", "document_tick", "document_vertical_lines", "download", "draft", "drag_vertical", "drag", "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", "gift", "go", "graph", "grid", "help", "hide", "home", "image", "in_progress", "in_transit", "individual", "info", "italic", "key", "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", "person_info", "person_tick", "person", "phone", "piggy_bank", "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", "three_boxes", "tick_circle", "tick_thick", "tick", "true_tick", "undo", "unlocked", "upload", "uploaded", "video", "view", "warning"]),
|
|
125
|
+
"iconType": _propTypes.default.oneOf(["add", "admin", "alert_on", "alert", "analysis", "arrow_down", "arrow_left_boxed", "arrow_left_right_small", "arrow_left_small", "arrow_left", "arrow_right_small", "arrow_right", "arrow_up", "arrow", "attach", "bank", "basket_with_squares", "basket", "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", "card_view", "caret_down", "caret_large_down", "caret_large_left", "caret_large_right", "caret_large_up", "caret_left", "caret_right", "caret_up", "cart", "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", "contacts", "copy", "create", "credit_card_slash", "credit_card", "cross_circle", "cross", "csv", "delete", "delivery", "disconnect", "disputed", "document_right_align", "document_tick", "document_vertical_lines", "download", "draft", "drag_vertical", "drag", "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", "gift", "go", "graph", "grid", "help", "hide", "home", "image", "in_progress", "in_transit", "individual", "info", "italic", "key", "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", "person_info", "person_tick", "person", "phone", "piggy_bank", "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", "three_boxes", "tick_circle", "tick_thick", "tick", "true_tick", "u_turn_left", "u_turn_right", "undo", "unlocked", "upload", "uploaded", "video", "view", "warning"]),
|
|
126
126
|
"initials": _propTypes.default.string,
|
|
127
127
|
"m": _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.oneOf([null]), _propTypes.default.number, _propTypes.default.shape({
|
|
128
128
|
"__@toStringTag": _propTypes.default.string.isRequired,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { PaddingProps } from "styled-system";
|
|
2
|
+
import { PaddingProps, WidthProps } from "styled-system";
|
|
3
3
|
import { TagProps } from "../../__internal__/utils/helpers/tags/tags";
|
|
4
4
|
declare type CustomRefObject<T> = {
|
|
5
5
|
current?: T | null;
|
|
@@ -8,7 +8,7 @@ export interface SidebarContextProps {
|
|
|
8
8
|
isInSidebar?: boolean;
|
|
9
9
|
}
|
|
10
10
|
export declare const SidebarContext: React.Context<SidebarContextProps>;
|
|
11
|
-
export interface SidebarProps extends PaddingProps, TagProps {
|
|
11
|
+
export interface SidebarProps extends PaddingProps, TagProps, WidthProps {
|
|
12
12
|
/** Prop to specify the aria-describedby property of the component */
|
|
13
13
|
"aria-describedby"?: string;
|
|
14
14
|
/**
|