carbon-react 107.1.3 → 107.1.6
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/input.component.js +3 -0
- package/esm/__internal__/label/icon-wrapper.style.d.ts +2 -0
- package/esm/__internal__/label/icon-wrapper.style.js +4 -4
- package/esm/__internal__/label/index.d.ts +2 -1
- package/esm/__internal__/label/label.component.d.ts +27 -0
- package/esm/__internal__/label/label.component.js +42 -80
- package/esm/__internal__/label/label.style.d.ts +23 -3
- package/esm/__internal__/label/label.style.js +4 -19
- package/esm/__internal__/utils/helpers/events/events.d.ts +0 -58
- package/esm/__internal__/utils/helpers/events/events.js +12 -128
- package/esm/__spec_helper__/test-utils.d.ts +4 -25
- package/esm/__spec_helper__/test-utils.js +12 -25
- package/esm/components/action-popover/action-popover-menu/action-popover-menu.component.js +2 -2
- package/esm/components/anchor-navigation/anchor-navigation-item/anchor-navigation-item.component.d.ts +19 -0
- package/esm/components/anchor-navigation/anchor-navigation-item/anchor-navigation-item.component.js +14 -21
- package/esm/components/anchor-navigation/anchor-navigation-item/anchor-navigation-item.style.d.ts +5 -0
- package/esm/components/anchor-navigation/anchor-navigation-item/anchor-navigation-item.style.js +0 -4
- package/esm/components/anchor-navigation/anchor-navigation.component.d.ts +14 -0
- package/esm/components/anchor-navigation/anchor-navigation.component.js +55 -72
- package/esm/components/anchor-navigation/anchor-navigation.style.d.ts +4 -0
- package/esm/components/anchor-navigation/anchor-section-divider.component.d.ts +4 -0
- package/esm/components/anchor-navigation/{anchor-section-divider/anchor-section-divider.style.js → anchor-section-divider.component.js} +3 -2
- package/esm/components/anchor-navigation/index.d.ts +5 -3
- package/esm/components/anchor-navigation/index.js +1 -1
- package/esm/components/date/__internal__/date-picker/date-picker.component.js +10 -1
- package/esm/components/flat-table/flat-table-cell/flat-table-cell.component.js +1 -0
- package/esm/components/flat-table/flat-table-checkbox/flat-table-checkbox.component.js +1 -0
- package/esm/components/flat-table/flat-table-header/flat-table-header.component.js +1 -0
- package/esm/components/flat-table/flat-table-row/flat-table-row.component.js +3 -3
- package/esm/components/flat-table/flat-table-row-header/flat-table-row-header.component.js +1 -0
- package/esm/components/help/help.style.d.ts +2 -0
- package/esm/components/menu/__internal__/spec-helper/index.js +1 -2
- package/esm/components/menu/__internal__/submenu/submenu.component.js +1 -1
- package/esm/components/multi-action-button/multi-action-button.component.js +3 -0
- package/esm/components/numeral-date/numeral-date.component.js +1 -1
- package/esm/components/search/search.component.js +1 -2
- package/esm/components/tabs/tabs.component.js +28 -20
- package/lib/__internal__/input/input.component.js +3 -0
- package/lib/__internal__/label/icon-wrapper.style.d.ts +2 -0
- package/lib/__internal__/label/icon-wrapper.style.js +2 -2
- package/lib/__internal__/label/index.d.ts +2 -1
- package/lib/__internal__/label/label.component.d.ts +27 -0
- package/lib/__internal__/label/label.component.js +40 -78
- package/lib/__internal__/label/label.style.d.ts +23 -3
- package/lib/__internal__/label/label.style.js +4 -22
- package/lib/__internal__/utils/helpers/events/events.d.ts +0 -58
- package/lib/__internal__/utils/helpers/events/events.js +12 -128
- package/lib/__spec_helper__/test-utils.d.ts +4 -25
- package/lib/__spec_helper__/test-utils.js +12 -25
- package/lib/components/action-popover/action-popover-menu/action-popover-menu.component.js +2 -2
- package/lib/components/anchor-navigation/anchor-navigation-item/anchor-navigation-item.component.d.ts +19 -0
- package/lib/components/anchor-navigation/anchor-navigation-item/anchor-navigation-item.component.js +14 -21
- package/lib/components/anchor-navigation/anchor-navigation-item/anchor-navigation-item.style.d.ts +5 -0
- package/lib/components/anchor-navigation/anchor-navigation-item/anchor-navigation-item.style.js +0 -7
- package/lib/components/anchor-navigation/anchor-navigation.component.d.ts +14 -0
- package/lib/components/anchor-navigation/anchor-navigation.component.js +57 -73
- package/lib/components/anchor-navigation/anchor-navigation.style.d.ts +4 -0
- package/lib/components/anchor-navigation/anchor-section-divider.component.d.ts +4 -0
- package/lib/components/anchor-navigation/{anchor-section-divider/anchor-section-divider.style.js → anchor-section-divider.component.js} +3 -2
- package/lib/components/anchor-navigation/index.d.ts +5 -3
- package/lib/components/anchor-navigation/index.js +1 -1
- package/lib/components/date/__internal__/date-picker/date-picker.component.js +10 -1
- package/lib/components/flat-table/flat-table-cell/flat-table-cell.component.js +1 -0
- package/lib/components/flat-table/flat-table-checkbox/flat-table-checkbox.component.js +1 -0
- package/lib/components/flat-table/flat-table-header/flat-table-header.component.js +1 -0
- package/lib/components/flat-table/flat-table-row/flat-table-row.component.js +2 -4
- package/lib/components/flat-table/flat-table-row-header/flat-table-row-header.component.js +1 -0
- package/lib/components/help/help.style.d.ts +2 -0
- package/lib/components/menu/__internal__/spec-helper/index.js +1 -2
- package/lib/components/menu/__internal__/submenu/submenu.component.js +1 -1
- package/lib/components/multi-action-button/multi-action-button.component.js +3 -0
- package/lib/components/numeral-date/numeral-date.component.js +1 -1
- package/lib/components/search/search.component.js +1 -3
- package/lib/components/tabs/tabs.component.js +28 -20
- package/package.json +4 -4
- package/esm/__internal__/label/label.d.ts +0 -43
- package/esm/components/anchor-navigation/anchor-navigation-item/anchor-navigation-item.d.ts +0 -23
- package/esm/components/anchor-navigation/anchor-navigation.d.ts +0 -11
- package/esm/components/anchor-navigation/anchor-section-divider/anchor-section-divider.d.ts +0 -12
- package/lib/__internal__/label/label.d.ts +0 -43
- package/lib/components/anchor-navigation/anchor-navigation-item/anchor-navigation-item.d.ts +0 -23
- package/lib/components/anchor-navigation/anchor-navigation.d.ts +0 -11
- package/lib/components/anchor-navigation/anchor-section-divider/anchor-section-divider.d.ts +0 -12
|
@@ -9,11 +9,12 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
|
9
9
|
|
|
10
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
11
|
|
|
12
|
-
const
|
|
12
|
+
const AnchorSectionDivider = _styledComponents.default.div.attrs({
|
|
13
13
|
"data-element": "anchor-navigation-divider"
|
|
14
14
|
})`
|
|
15
15
|
background-color: var(--colorsActionMinor200);
|
|
16
16
|
height: 1px;
|
|
17
17
|
`;
|
|
18
|
-
|
|
18
|
+
AnchorSectionDivider.displayName = "AnchorSectionDivider";
|
|
19
|
+
var _default = AnchorSectionDivider;
|
|
19
20
|
exports.default = _default;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
export { default as AnchorNavigation } from "./anchor-navigation";
|
|
2
|
-
export { default as AnchorNavigationItem } from "./anchor-navigation-item/anchor-navigation-item";
|
|
3
|
-
export { default as AnchorSectionDivider } from "./anchor-section-divider
|
|
1
|
+
export { default as AnchorNavigation } from "./anchor-navigation.component";
|
|
2
|
+
export { default as AnchorNavigationItem } from "./anchor-navigation-item/anchor-navigation-item.component";
|
|
3
|
+
export { default as AnchorSectionDivider } from "./anchor-section-divider.component";
|
|
4
|
+
export type { AnchorNavigationProps } from "./anchor-navigation.component";
|
|
5
|
+
export type { AnchorNavigationItemProps } from "./anchor-navigation-item/anchor-navigation-item.component";
|
|
@@ -26,6 +26,6 @@ var _anchorNavigation = _interopRequireDefault(require("./anchor-navigation.comp
|
|
|
26
26
|
|
|
27
27
|
var _anchorNavigationItem = _interopRequireDefault(require("./anchor-navigation-item/anchor-navigation-item.component"));
|
|
28
28
|
|
|
29
|
-
var _anchorSectionDivider = _interopRequireDefault(require("./anchor-section-divider
|
|
29
|
+
var _anchorSectionDivider = _interopRequireDefault(require("./anchor-section-divider.component"));
|
|
30
30
|
|
|
31
31
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -87,6 +87,16 @@ const DatePicker = /*#__PURE__*/_react.default.forwardRef(({
|
|
|
87
87
|
disabled
|
|
88
88
|
}, ev) => {
|
|
89
89
|
if (!disabled) {
|
|
90
|
+
var _inputElement$current;
|
|
91
|
+
|
|
92
|
+
const {
|
|
93
|
+
id,
|
|
94
|
+
name
|
|
95
|
+
} = inputElement === null || inputElement === void 0 ? void 0 : (_inputElement$current = inputElement.current) === null || _inputElement$current === void 0 ? void 0 : _inputElement$current.firstChild;
|
|
96
|
+
ev.target = { ...ev.target,
|
|
97
|
+
id,
|
|
98
|
+
name
|
|
99
|
+
};
|
|
90
100
|
onDayClick(date, ev);
|
|
91
101
|
}
|
|
92
102
|
};
|
|
@@ -123,7 +133,6 @@ const DatePicker = /*#__PURE__*/_react.default.forwardRef(({
|
|
|
123
133
|
}, weekdaysShort[weekday]);
|
|
124
134
|
},
|
|
125
135
|
navbarElement: /*#__PURE__*/_react.default.createElement(_navbar.default, null),
|
|
126
|
-
enableOutsideDays: true,
|
|
127
136
|
fixedWeeks: true,
|
|
128
137
|
initialMonth: selectedDays || undefined,
|
|
129
138
|
disabledDays: (0, _utils.getDisabledDays)(minDate, maxDate),
|
|
@@ -143,5 +143,6 @@ FlatTableCell.propTypes = {
|
|
|
143
143
|
/** Sets a vertical right border color, provide design token, any color from palette or any valid css color value. */
|
|
144
144
|
verticalBorderColor: _propTypes.default.string
|
|
145
145
|
};
|
|
146
|
+
FlatTableCell.displayName = "FlatTableCell";
|
|
146
147
|
var _default = FlatTableCell;
|
|
147
148
|
exports.default = _default;
|
|
@@ -59,10 +59,8 @@ const FlatTableRow = /*#__PURE__*/_react.default.forwardRef(({
|
|
|
59
59
|
const firstColumnExpandable = expandableArea === "firstColumn";
|
|
60
60
|
const [stickyCellWidths, setStickyCellWidths] = (0, _react.useState)([]);
|
|
61
61
|
const [leftPositions, setLeftPositions] = (0, _react.useState)([]);
|
|
62
|
-
|
|
63
|
-
const
|
|
64
|
-
|
|
65
|
-
const rowHeaderIndex = childrenArray.findIndex(child => child.type === _flatTableRowHeader.default);
|
|
62
|
+
const childrenArray = (0, _react.useMemo)(() => _react.default.Children.toArray(children), [children]);
|
|
63
|
+
const rowHeaderIndex = (0, _react.useMemo)(() => childrenArray.findIndex(child => child.type.displayName === _flatTableRowHeader.default.displayName), [childrenArray]);
|
|
66
64
|
const themeContext = (0, _react.useContext)(_flatTable.FlatTableThemeContext);
|
|
67
65
|
const reportCellWidth = (0, _react.useCallback)((width, index) => {
|
|
68
66
|
const copiedArray = stickyCellWidths;
|
|
@@ -100,5 +100,6 @@ FlatTableRowHeader.propTypes = {
|
|
|
100
100
|
/** Sets a vertical right border color, provide design token, any color from palette or any valid css color value. */
|
|
101
101
|
verticalBorderColor: _propTypes.default.string
|
|
102
102
|
};
|
|
103
|
+
FlatTableRowHeader.displayName = "FlatTableRowHeader";
|
|
103
104
|
var _default = FlatTableRowHeader;
|
|
104
105
|
exports.default = _default;
|
|
@@ -172,7 +172,7 @@ const Submenu = /*#__PURE__*/_react.default.forwardRef(({
|
|
|
172
172
|
nextIndex = numberOfChildren - 1;
|
|
173
173
|
}
|
|
174
174
|
|
|
175
|
-
if (
|
|
175
|
+
if (event.key.length === 1) {
|
|
176
176
|
event.stopPropagation();
|
|
177
177
|
|
|
178
178
|
if (characterTimer.current) {
|
|
@@ -304,6 +304,9 @@ MultiActionButton.propTypes = {
|
|
|
304
304
|
"color": _propTypes.default.string,
|
|
305
305
|
"contentEditable": _propTypes.default.oneOfType([_propTypes.default.oneOf(["false", "inherit", "true"]), _propTypes.default.bool]),
|
|
306
306
|
"contextMenu": _propTypes.default.string,
|
|
307
|
+
"css": _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.number, _propTypes.default.object, _propTypes.default.shape({
|
|
308
|
+
"__emotion_styles": _propTypes.default.any.isRequired
|
|
309
|
+
}), _propTypes.default.string, _propTypes.default.bool]),
|
|
307
310
|
"dangerouslySetInnerHTML": _propTypes.default.shape({
|
|
308
311
|
"__html": _propTypes.default.string.isRequired
|
|
309
312
|
}),
|
|
@@ -130,7 +130,7 @@ const NumeralDate = ({
|
|
|
130
130
|
});
|
|
131
131
|
|
|
132
132
|
const onKeyPress = ev => {
|
|
133
|
-
const isValidKey = _events.default.isNumberKey(ev) || _events.default.
|
|
133
|
+
const isValidKey = _events.default.isNumberKey(ev) || _events.default.isTabKey(ev) || ev.key === "Delete" || ev.key === "Backspace";
|
|
134
134
|
|
|
135
135
|
if (!isValidKey) {
|
|
136
136
|
ev.preventDefault();
|
|
@@ -25,8 +25,6 @@ var _textbox = _interopRequireDefault(require("../textbox"));
|
|
|
25
25
|
|
|
26
26
|
var _button = _interopRequireDefault(require("../button"));
|
|
27
27
|
|
|
28
|
-
var _events = _interopRequireDefault(require("../../__internal__/utils/helpers/events"));
|
|
29
|
-
|
|
30
28
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
31
29
|
|
|
32
30
|
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
|
|
@@ -145,7 +143,7 @@ const Search = ({
|
|
|
145
143
|
};
|
|
146
144
|
|
|
147
145
|
const handleKeyDown = ev => {
|
|
148
|
-
if (
|
|
146
|
+
if (ev.key.length === 1) {
|
|
149
147
|
ev.stopPropagation();
|
|
150
148
|
}
|
|
151
149
|
|
|
@@ -63,12 +63,9 @@ const Tabs = ({
|
|
|
63
63
|
const filteredChildren = (0, _react.useMemo)(() => _react.Children.toArray(children).filter(child => child), [children]);
|
|
64
64
|
/** Array of the tabIds for the child nodes */
|
|
65
65
|
|
|
66
|
-
const tabIds = () =>
|
|
67
|
-
return filteredChildren.map(child => child.props.tabId);
|
|
68
|
-
};
|
|
66
|
+
const tabIds = (0, _react.useMemo)(() => filteredChildren.map(child => child.props.tabId), [filteredChildren]);
|
|
69
67
|
/** Array of refs to the TabTitle nodes */
|
|
70
68
|
|
|
71
|
-
|
|
72
69
|
const tabRefs = (0, _react.useMemo)(() => Array.from({
|
|
73
70
|
length: filteredChildren.length
|
|
74
71
|
}).map(() => /*#__PURE__*/(0, _react.createRef)()), [filteredChildren.length]);
|
|
@@ -84,14 +81,14 @@ const Tabs = ({
|
|
|
84
81
|
(0, _react.useLayoutEffect)(() => {
|
|
85
82
|
const selectedTab = selectedTabId || _react.Children.toArray(children)[0].props.tabId;
|
|
86
83
|
|
|
87
|
-
if (!tabIds
|
|
84
|
+
if (!tabIds.includes(selectedTabId)) {
|
|
88
85
|
setTabStopId(_react.default.Children.toArray(children)[0].props.tabId);
|
|
89
86
|
} else {
|
|
90
87
|
setTabStopId(selectedTab);
|
|
91
88
|
}
|
|
92
89
|
|
|
93
|
-
setSelectedTabIdState(selectedTab);
|
|
94
|
-
}, []);
|
|
90
|
+
setSelectedTabIdState(selectedTab);
|
|
91
|
+
}, [children, selectedTabId, tabIds]);
|
|
95
92
|
const updateErrors = (0, _react.useCallback)((id, hasError) => {
|
|
96
93
|
if (tabsErrors[id] !== hasError) {
|
|
97
94
|
setTabsErrors({ ...tabsErrors,
|
|
@@ -132,6 +129,27 @@ const Tabs = ({
|
|
|
132
129
|
onTabChange(tabid);
|
|
133
130
|
}
|
|
134
131
|
}, [onTabChange, isTabSelected, hasTabStop]);
|
|
132
|
+
const blurPreviousSelectedTab = (0, _react.useCallback)(() => {
|
|
133
|
+
const previousTabIndex = tabIds.indexOf(previousSelectedTabId.current);
|
|
134
|
+
/* istanbul ignore else */
|
|
135
|
+
|
|
136
|
+
if (previousTabIndex !== -1) {
|
|
137
|
+
var _previousTabRef$curre;
|
|
138
|
+
|
|
139
|
+
const previousTabRef = tabRefs[previousTabIndex];
|
|
140
|
+
(_previousTabRef$curre = previousTabRef.current) === null || _previousTabRef$curre === void 0 ? void 0 : _previousTabRef$curre.blur();
|
|
141
|
+
}
|
|
142
|
+
}, [tabIds, tabRefs]);
|
|
143
|
+
(0, _react.useEffect)(() => {
|
|
144
|
+
if (previousSelectedTabId.current !== selectedTabId) {
|
|
145
|
+
if (selectedTabId !== selectedTabIdState) {
|
|
146
|
+
setSelectedTabIdState(selectedTabId);
|
|
147
|
+
blurPreviousSelectedTab();
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
previousSelectedTabId.current = selectedTabId;
|
|
151
|
+
}
|
|
152
|
+
}, [blurPreviousSelectedTab, previousSelectedTabId, selectedTabId, selectedTabIdState]);
|
|
135
153
|
/** Determines if the tab titles are in a vertical format. */
|
|
136
154
|
|
|
137
155
|
const isVertical = currentPosition => currentPosition === "left";
|
|
@@ -158,15 +176,14 @@ const Tabs = ({
|
|
|
158
176
|
const goToTab = (event, index) => {
|
|
159
177
|
event.preventDefault();
|
|
160
178
|
let newIndex = index;
|
|
161
|
-
const ids = tabIds();
|
|
162
179
|
|
|
163
180
|
if (index < 0) {
|
|
164
|
-
newIndex =
|
|
165
|
-
} else if (index ===
|
|
181
|
+
newIndex = tabIds.length - 1;
|
|
182
|
+
} else if (index === tabIds.length) {
|
|
166
183
|
newIndex = 0;
|
|
167
184
|
}
|
|
168
185
|
|
|
169
|
-
const nextTabId =
|
|
186
|
+
const nextTabId = tabIds[newIndex];
|
|
170
187
|
const nextRef = tabRefs[newIndex];
|
|
171
188
|
updateVisibleTab(nextTabId);
|
|
172
189
|
focusTab(nextRef);
|
|
@@ -310,15 +327,6 @@ const Tabs = ({
|
|
|
310
327
|
return tabs;
|
|
311
328
|
};
|
|
312
329
|
|
|
313
|
-
(0, _react.useEffect)(() => {
|
|
314
|
-
if (previousSelectedTabId.current !== selectedTabId) {
|
|
315
|
-
if (selectedTabId !== selectedTabIdState) {
|
|
316
|
-
setSelectedTabIdState(selectedTabId);
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
previousSelectedTabId.current = selectedTabId;
|
|
320
|
-
}
|
|
321
|
-
}, [previousSelectedTabId, selectedTabId, selectedTabIdState]);
|
|
322
330
|
return /*#__PURE__*/_react.default.createElement(_tabs.default, _extends({
|
|
323
331
|
className: className,
|
|
324
332
|
position: isInSidebar ? "left" : position,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "carbon-react",
|
|
3
|
-
"version": "107.1.
|
|
3
|
+
"version": "107.1.6",
|
|
4
4
|
"description": "A library of reusable React components for easily building user interfaces.",
|
|
5
5
|
"engineStrict": true,
|
|
6
6
|
"engines": {
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
"start:debug-theme": "cross-env STORYBOOK_DEBUG_THEME=true npm run start",
|
|
19
19
|
"test": "jest --config=./jest.conf.json",
|
|
20
20
|
"test-update": "jest --config=./jest.conf.json --updateSnapshot",
|
|
21
|
-
"test:cypress": "cypress open",
|
|
22
|
-
"cypress:react": "npx cypress open
|
|
21
|
+
"test:cypress": "npx cypress open --e2e",
|
|
22
|
+
"cypress:react": "npx cypress open --component",
|
|
23
23
|
"debug": "node --inspect ./node_modules/jest-cli/bin/jest --watch --config=./jest.conf.json",
|
|
24
24
|
"format": "prettier --write './src'",
|
|
25
25
|
"lint": "eslint ./src",
|
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
"core-js": "^3.20.3",
|
|
116
116
|
"cross-env": "^5.2.0",
|
|
117
117
|
"css-loader": "4.0.0",
|
|
118
|
-
"cypress": "^
|
|
118
|
+
"cypress": "^10.1.0",
|
|
119
119
|
"cypress-axe": "^0.14.0",
|
|
120
120
|
"cypress-cucumber-preprocessor": "^4.3.1",
|
|
121
121
|
"cypress-each": "^1.11.0",
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { ValidationProps } from "../validations";
|
|
3
|
-
|
|
4
|
-
export interface LabelPropTypes extends ValidationProps {
|
|
5
|
-
/** Label width */
|
|
6
|
-
width?: number;
|
|
7
|
-
/** Label alignment */
|
|
8
|
-
align?: "left" | "right";
|
|
9
|
-
/** When true, label is placed in line an input */
|
|
10
|
-
inline?: boolean;
|
|
11
|
-
/** Flag to configure component as mandatory */
|
|
12
|
-
isRequired?: boolean;
|
|
13
|
-
/** If true, the component will be disabled */
|
|
14
|
-
disabled?: boolean;
|
|
15
|
-
/** Flag to configure component as optional in Form */
|
|
16
|
-
optional?: boolean;
|
|
17
|
-
/** The unique id of the label element */
|
|
18
|
-
labelId?: string;
|
|
19
|
-
/** The unique id of the Help component tooltip, used for accessibility */
|
|
20
|
-
tooltipId?: string;
|
|
21
|
-
/** Children elements */
|
|
22
|
-
children?: React.ReactNode;
|
|
23
|
-
/** A message that the Help component will display */
|
|
24
|
-
help?: React.ReactNode;
|
|
25
|
-
/** Icon type */
|
|
26
|
-
helpIcon?: string;
|
|
27
|
-
/** Overrides the default tabindex of the Help component */
|
|
28
|
-
helpTabIndex?: string;
|
|
29
|
-
/** Whether to show the validation icon */
|
|
30
|
-
useValidationIcon?: boolean;
|
|
31
|
-
/** A string that represents the ID of another form element */
|
|
32
|
-
htmlFor?: string;
|
|
33
|
-
/** Padding right, integer multiplied by base spacing constant (8) */
|
|
34
|
-
pr?: 1 | 2;
|
|
35
|
-
/** Padding left, integer multiplied by base spacing constant (8) */
|
|
36
|
-
pl?: 1 | 2;
|
|
37
|
-
/** Id of the validation icon */
|
|
38
|
-
validationIconId?: string;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
declare function Label(props: LabelPropTypes): JSX.Element;
|
|
42
|
-
|
|
43
|
-
export default Label;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
|
|
3
|
-
export interface AnchorNavigationItemProps {
|
|
4
|
-
children?: React.ReactNode;
|
|
5
|
-
/** href to be passed to the anchor element, can be linked with id passed to the scrollable section */
|
|
6
|
-
href?: string;
|
|
7
|
-
/** Indicates if component is selected */
|
|
8
|
-
isSelected?: boolean;
|
|
9
|
-
/** onClick handler */
|
|
10
|
-
onClick?: (ev: React.MouseEvent<HTMLAnchorElement>) => void;
|
|
11
|
-
/** OnKeyDown handler */
|
|
12
|
-
onKeyDown?: (ev: React.KeyboardEvent<HTMLAnchorElement>) => void;
|
|
13
|
-
/** tabIndex passed to the anchor element */
|
|
14
|
-
tabIndex?: number;
|
|
15
|
-
/** Reference to the section html element meant to be shown */
|
|
16
|
-
target?: React.Ref<HTMLElement>;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
declare function AnchorNavigationItem(
|
|
20
|
-
props: AnchorNavigationItemProps & React.RefAttributes<HTMLAnchorElement>
|
|
21
|
-
): JSX.Element;
|
|
22
|
-
|
|
23
|
-
export default AnchorNavigationItem;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
|
|
3
|
-
export interface AnchorNavigationProps {
|
|
4
|
-
children?: React.ReactNode;
|
|
5
|
-
/** The AnchorNavigationItems components to be rendered in the sticky navigation */
|
|
6
|
-
stickyNavigation?: React.ReactNode;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
declare function AnchorNavigation(props: AnchorNavigationProps): JSX.Element;
|
|
10
|
-
|
|
11
|
-
export default AnchorNavigation;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { StyledComponentProps } from "styled-components";
|
|
2
|
-
|
|
3
|
-
declare function AnchorSectionDivider(
|
|
4
|
-
attrs: StyledComponentProps<
|
|
5
|
-
"div",
|
|
6
|
-
Record<string, unknown>,
|
|
7
|
-
Record<string, unknown>,
|
|
8
|
-
""
|
|
9
|
-
>
|
|
10
|
-
): JSX.Element;
|
|
11
|
-
|
|
12
|
-
export default AnchorSectionDivider;
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { ValidationProps } from "../validations";
|
|
3
|
-
|
|
4
|
-
export interface LabelPropTypes extends ValidationProps {
|
|
5
|
-
/** Label width */
|
|
6
|
-
width?: number;
|
|
7
|
-
/** Label alignment */
|
|
8
|
-
align?: "left" | "right";
|
|
9
|
-
/** When true, label is placed in line an input */
|
|
10
|
-
inline?: boolean;
|
|
11
|
-
/** Flag to configure component as mandatory */
|
|
12
|
-
isRequired?: boolean;
|
|
13
|
-
/** If true, the component will be disabled */
|
|
14
|
-
disabled?: boolean;
|
|
15
|
-
/** Flag to configure component as optional in Form */
|
|
16
|
-
optional?: boolean;
|
|
17
|
-
/** The unique id of the label element */
|
|
18
|
-
labelId?: string;
|
|
19
|
-
/** The unique id of the Help component tooltip, used for accessibility */
|
|
20
|
-
tooltipId?: string;
|
|
21
|
-
/** Children elements */
|
|
22
|
-
children?: React.ReactNode;
|
|
23
|
-
/** A message that the Help component will display */
|
|
24
|
-
help?: React.ReactNode;
|
|
25
|
-
/** Icon type */
|
|
26
|
-
helpIcon?: string;
|
|
27
|
-
/** Overrides the default tabindex of the Help component */
|
|
28
|
-
helpTabIndex?: string;
|
|
29
|
-
/** Whether to show the validation icon */
|
|
30
|
-
useValidationIcon?: boolean;
|
|
31
|
-
/** A string that represents the ID of another form element */
|
|
32
|
-
htmlFor?: string;
|
|
33
|
-
/** Padding right, integer multiplied by base spacing constant (8) */
|
|
34
|
-
pr?: 1 | 2;
|
|
35
|
-
/** Padding left, integer multiplied by base spacing constant (8) */
|
|
36
|
-
pl?: 1 | 2;
|
|
37
|
-
/** Id of the validation icon */
|
|
38
|
-
validationIconId?: string;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
declare function Label(props: LabelPropTypes): JSX.Element;
|
|
42
|
-
|
|
43
|
-
export default Label;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
|
|
3
|
-
export interface AnchorNavigationItemProps {
|
|
4
|
-
children?: React.ReactNode;
|
|
5
|
-
/** href to be passed to the anchor element, can be linked with id passed to the scrollable section */
|
|
6
|
-
href?: string;
|
|
7
|
-
/** Indicates if component is selected */
|
|
8
|
-
isSelected?: boolean;
|
|
9
|
-
/** onClick handler */
|
|
10
|
-
onClick?: (ev: React.MouseEvent<HTMLAnchorElement>) => void;
|
|
11
|
-
/** OnKeyDown handler */
|
|
12
|
-
onKeyDown?: (ev: React.KeyboardEvent<HTMLAnchorElement>) => void;
|
|
13
|
-
/** tabIndex passed to the anchor element */
|
|
14
|
-
tabIndex?: number;
|
|
15
|
-
/** Reference to the section html element meant to be shown */
|
|
16
|
-
target?: React.Ref<HTMLElement>;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
declare function AnchorNavigationItem(
|
|
20
|
-
props: AnchorNavigationItemProps & React.RefAttributes<HTMLAnchorElement>
|
|
21
|
-
): JSX.Element;
|
|
22
|
-
|
|
23
|
-
export default AnchorNavigationItem;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
|
|
3
|
-
export interface AnchorNavigationProps {
|
|
4
|
-
children?: React.ReactNode;
|
|
5
|
-
/** The AnchorNavigationItems components to be rendered in the sticky navigation */
|
|
6
|
-
stickyNavigation?: React.ReactNode;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
declare function AnchorNavigation(props: AnchorNavigationProps): JSX.Element;
|
|
10
|
-
|
|
11
|
-
export default AnchorNavigation;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { StyledComponentProps } from "styled-components";
|
|
2
|
-
|
|
3
|
-
declare function AnchorSectionDivider(
|
|
4
|
-
attrs: StyledComponentProps<
|
|
5
|
-
"div",
|
|
6
|
-
Record<string, unknown>,
|
|
7
|
-
Record<string, unknown>,
|
|
8
|
-
""
|
|
9
|
-
>
|
|
10
|
-
): JSX.Element;
|
|
11
|
-
|
|
12
|
-
export default AnchorSectionDivider;
|