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.
Files changed (83) hide show
  1. package/esm/__internal__/input/input.component.js +3 -0
  2. package/esm/__internal__/label/icon-wrapper.style.d.ts +2 -0
  3. package/esm/__internal__/label/icon-wrapper.style.js +4 -4
  4. package/esm/__internal__/label/index.d.ts +2 -1
  5. package/esm/__internal__/label/label.component.d.ts +27 -0
  6. package/esm/__internal__/label/label.component.js +42 -80
  7. package/esm/__internal__/label/label.style.d.ts +23 -3
  8. package/esm/__internal__/label/label.style.js +4 -19
  9. package/esm/__internal__/utils/helpers/events/events.d.ts +0 -58
  10. package/esm/__internal__/utils/helpers/events/events.js +12 -128
  11. package/esm/__spec_helper__/test-utils.d.ts +4 -25
  12. package/esm/__spec_helper__/test-utils.js +12 -25
  13. package/esm/components/action-popover/action-popover-menu/action-popover-menu.component.js +2 -2
  14. package/esm/components/anchor-navigation/anchor-navigation-item/anchor-navigation-item.component.d.ts +19 -0
  15. package/esm/components/anchor-navigation/anchor-navigation-item/anchor-navigation-item.component.js +14 -21
  16. package/esm/components/anchor-navigation/anchor-navigation-item/anchor-navigation-item.style.d.ts +5 -0
  17. package/esm/components/anchor-navigation/anchor-navigation-item/anchor-navigation-item.style.js +0 -4
  18. package/esm/components/anchor-navigation/anchor-navigation.component.d.ts +14 -0
  19. package/esm/components/anchor-navigation/anchor-navigation.component.js +55 -72
  20. package/esm/components/anchor-navigation/anchor-navigation.style.d.ts +4 -0
  21. package/esm/components/anchor-navigation/anchor-section-divider.component.d.ts +4 -0
  22. package/esm/components/anchor-navigation/{anchor-section-divider/anchor-section-divider.style.js → anchor-section-divider.component.js} +3 -2
  23. package/esm/components/anchor-navigation/index.d.ts +5 -3
  24. package/esm/components/anchor-navigation/index.js +1 -1
  25. package/esm/components/date/__internal__/date-picker/date-picker.component.js +10 -1
  26. package/esm/components/flat-table/flat-table-cell/flat-table-cell.component.js +1 -0
  27. package/esm/components/flat-table/flat-table-checkbox/flat-table-checkbox.component.js +1 -0
  28. package/esm/components/flat-table/flat-table-header/flat-table-header.component.js +1 -0
  29. package/esm/components/flat-table/flat-table-row/flat-table-row.component.js +3 -3
  30. package/esm/components/flat-table/flat-table-row-header/flat-table-row-header.component.js +1 -0
  31. package/esm/components/help/help.style.d.ts +2 -0
  32. package/esm/components/menu/__internal__/spec-helper/index.js +1 -2
  33. package/esm/components/menu/__internal__/submenu/submenu.component.js +1 -1
  34. package/esm/components/multi-action-button/multi-action-button.component.js +3 -0
  35. package/esm/components/numeral-date/numeral-date.component.js +1 -1
  36. package/esm/components/search/search.component.js +1 -2
  37. package/esm/components/tabs/tabs.component.js +28 -20
  38. package/lib/__internal__/input/input.component.js +3 -0
  39. package/lib/__internal__/label/icon-wrapper.style.d.ts +2 -0
  40. package/lib/__internal__/label/icon-wrapper.style.js +2 -2
  41. package/lib/__internal__/label/index.d.ts +2 -1
  42. package/lib/__internal__/label/label.component.d.ts +27 -0
  43. package/lib/__internal__/label/label.component.js +40 -78
  44. package/lib/__internal__/label/label.style.d.ts +23 -3
  45. package/lib/__internal__/label/label.style.js +4 -22
  46. package/lib/__internal__/utils/helpers/events/events.d.ts +0 -58
  47. package/lib/__internal__/utils/helpers/events/events.js +12 -128
  48. package/lib/__spec_helper__/test-utils.d.ts +4 -25
  49. package/lib/__spec_helper__/test-utils.js +12 -25
  50. package/lib/components/action-popover/action-popover-menu/action-popover-menu.component.js +2 -2
  51. package/lib/components/anchor-navigation/anchor-navigation-item/anchor-navigation-item.component.d.ts +19 -0
  52. package/lib/components/anchor-navigation/anchor-navigation-item/anchor-navigation-item.component.js +14 -21
  53. package/lib/components/anchor-navigation/anchor-navigation-item/anchor-navigation-item.style.d.ts +5 -0
  54. package/lib/components/anchor-navigation/anchor-navigation-item/anchor-navigation-item.style.js +0 -7
  55. package/lib/components/anchor-navigation/anchor-navigation.component.d.ts +14 -0
  56. package/lib/components/anchor-navigation/anchor-navigation.component.js +57 -73
  57. package/lib/components/anchor-navigation/anchor-navigation.style.d.ts +4 -0
  58. package/lib/components/anchor-navigation/anchor-section-divider.component.d.ts +4 -0
  59. package/lib/components/anchor-navigation/{anchor-section-divider/anchor-section-divider.style.js → anchor-section-divider.component.js} +3 -2
  60. package/lib/components/anchor-navigation/index.d.ts +5 -3
  61. package/lib/components/anchor-navigation/index.js +1 -1
  62. package/lib/components/date/__internal__/date-picker/date-picker.component.js +10 -1
  63. package/lib/components/flat-table/flat-table-cell/flat-table-cell.component.js +1 -0
  64. package/lib/components/flat-table/flat-table-checkbox/flat-table-checkbox.component.js +1 -0
  65. package/lib/components/flat-table/flat-table-header/flat-table-header.component.js +1 -0
  66. package/lib/components/flat-table/flat-table-row/flat-table-row.component.js +2 -4
  67. package/lib/components/flat-table/flat-table-row-header/flat-table-row-header.component.js +1 -0
  68. package/lib/components/help/help.style.d.ts +2 -0
  69. package/lib/components/menu/__internal__/spec-helper/index.js +1 -2
  70. package/lib/components/menu/__internal__/submenu/submenu.component.js +1 -1
  71. package/lib/components/multi-action-button/multi-action-button.component.js +3 -0
  72. package/lib/components/numeral-date/numeral-date.component.js +1 -1
  73. package/lib/components/search/search.component.js +1 -3
  74. package/lib/components/tabs/tabs.component.js +28 -20
  75. package/package.json +4 -4
  76. package/esm/__internal__/label/label.d.ts +0 -43
  77. package/esm/components/anchor-navigation/anchor-navigation-item/anchor-navigation-item.d.ts +0 -23
  78. package/esm/components/anchor-navigation/anchor-navigation.d.ts +0 -11
  79. package/esm/components/anchor-navigation/anchor-section-divider/anchor-section-divider.d.ts +0 -12
  80. package/lib/__internal__/label/label.d.ts +0 -43
  81. package/lib/components/anchor-navigation/anchor-navigation-item/anchor-navigation-item.d.ts +0 -23
  82. package/lib/components/anchor-navigation/anchor-navigation.d.ts +0 -11
  83. package/lib/components/anchor-navigation/anchor-section-divider/anchor-section-divider.d.ts +0 -12
@@ -0,0 +1,4 @@
1
+ declare const AnchorSectionDivider: import("styled-components").StyledComponent<"div", any, {
2
+ "data-element": string;
3
+ }, "data-element">;
4
+ export default AnchorSectionDivider;
@@ -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 StyledAnchorDivider = _styledComponents.default.div.attrs({
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
- var _default = StyledAnchorDivider;
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/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/anchor-section-divider.style"));
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;
@@ -107,5 +107,6 @@ FlatTableCheckbox.propTypes = {
107
107
  */
108
108
  reportCellWidth: _propTypes.default.func
109
109
  };
110
+ FlatTableCheckbox.displayName = "FlatTableCheckbox";
110
111
  var _default = FlatTableCheckbox;
111
112
  exports.default = _default;
@@ -105,5 +105,6 @@ FlatTableHeader.propTypes = {
105
105
  FlatTableHeader.defaultProps = {
106
106
  align: "left"
107
107
  };
108
+ FlatTableHeader.displayName = "FlatTableHeader";
108
109
  var _default = FlatTableHeader;
109
110
  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 childrenArray = _react.default.Children.toArray(children);
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;
@@ -0,0 +1,2 @@
1
+ export default StyledHelp;
2
+ declare const StyledHelp: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -13,8 +13,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
13
13
 
14
14
  const events = {
15
15
  space: {
16
- key: "Space",
17
- which: 32,
16
+ key: " ",
18
17
  preventDefault: jest.fn()
19
18
  }
20
19
  };
@@ -172,7 +172,7 @@ const Submenu = /*#__PURE__*/_react.default.forwardRef(({
172
172
  nextIndex = numberOfChildren - 1;
173
173
  }
174
174
 
175
- if (_events.default.isAlphabetKey(event) || _events.default.isNumberKey(event)) {
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.isDeletingKey(ev) || _events.default.isTabKey(ev);
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 (_events.default.isAlphabetKey(ev) || _events.default.isNumberKey(ev)) {
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().includes(selectedTabId)) {
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); // eslint-disable-next-line react-hooks/exhaustive-deps
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 = ids.length - 1;
165
- } else if (index === ids.length) {
181
+ newIndex = tabIds.length - 1;
182
+ } else if (index === tabIds.length) {
166
183
  newIndex = 0;
167
184
  }
168
185
 
169
- const nextTabId = ids[newIndex];
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",
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-ct",
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": "^9.6.0",
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;