carbon-react 147.10.0 → 148.0.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__/checkable-input/checkable-input.component.js +9 -4
- package/esm/__internal__/checkable-input/hidden-checkable-input.component.js +9 -4
- package/esm/__internal__/input/input.component.js +9 -4
- package/esm/__internal__/radio-button-mapper/radio-button-mapper.component.js +1 -1
- package/esm/__internal__/utils/helpers/events/composedPath.d.ts +1 -1
- package/esm/__internal__/utils/helpers/events/events.d.ts +1 -1
- package/esm/components/accordion/accordion.component.js +1 -1
- package/esm/components/action-popover/action-popover-menu/action-popover-menu.component.js +1 -6
- package/esm/components/action-popover/action-popover.component.js +7 -2
- package/esm/components/advanced-color-picker/advanced-color-picker.component.d.ts +2 -2
- package/esm/components/advanced-color-picker/advanced-color-picker.component.js +1 -1
- package/esm/components/anchor-navigation/anchor-navigation.component.js +1 -1
- package/esm/components/box/box.component.js +1 -1
- package/esm/components/breadcrumbs/crumb/crumb.component.d.ts +1 -1
- package/esm/components/breadcrumbs/crumb/crumb.component.js +5 -1
- package/esm/components/breadcrumbs/crumb/crumb.style.d.ts +2 -2
- package/esm/components/button-toggle/button-toggle-group/button-toggle-group.component.js +1 -3
- package/esm/components/checkbox/checkbox.component.js +9 -4
- package/esm/components/content/content.style.js +2 -2
- package/esm/components/date/date.component.js +40 -60
- package/esm/components/decimal/decimal.component.js +10 -5
- package/esm/components/dialog/dialog.component.d.ts +1 -1
- package/esm/components/dialog-full-screen/dialog-full-screen.component.d.ts +1 -1
- package/esm/components/draggable/draggable-container.component.js +4 -1
- package/esm/components/drawer/drawer.component.js +1 -1
- package/esm/components/duelling-picklist/picklist-group/picklist-group.component.js +3 -0
- package/esm/components/grouped-character/grouped-character.component.js +9 -4
- package/esm/components/heading/heading.style.d.ts +1 -1
- package/esm/components/help/help.component.js +1 -1
- package/esm/components/hr/hr.component.d.ts +0 -1
- package/esm/components/image/image.style.d.ts +1 -1
- package/esm/components/link/link.component.d.ts +1 -3
- package/esm/components/link/link.component.js +5 -5
- package/esm/components/link/link.style.js +7 -4
- package/esm/components/loader-star/internal/star.component.d.ts +0 -1
- package/esm/components/loader-star/loader-star.component.d.ts +0 -1
- package/esm/components/menu/__internal__/menu.context.d.ts +1 -0
- package/esm/components/menu/__internal__/submenu/submenu.component.d.ts +1 -1
- package/esm/components/menu/__internal__/submenu/submenu.component.js +14 -37
- package/esm/components/menu/__internal__/submenu/submenu.context.d.ts +1 -2
- package/esm/components/menu/__internal__/submenu/submenu.style.js +0 -11
- package/esm/components/menu/menu-item/menu-item.component.js +39 -46
- package/esm/components/menu/menu-item/menu-item.style.d.ts +2 -2
- package/esm/components/menu/menu-item/menu-item.style.js +65 -83
- package/esm/components/menu/menu.component.js +1 -0
- package/esm/components/modal/modal.component.d.ts +1 -1
- package/esm/components/multi-action-button/multi-action-button.component.js +8 -4
- package/esm/components/number/number.component.js +9 -4
- package/esm/components/pager/pager.component.js +1 -1
- package/esm/components/pager/pager.style.d.ts +1 -1
- package/esm/components/pages/pages.component.js +1 -1
- package/esm/components/popover-container/popover-container.component.d.ts +1 -1
- package/esm/components/portrait/portrait.component.d.ts +2 -1
- package/esm/components/profile/profile.style.d.ts +1 -1
- package/esm/components/radio-button/radio-button.component.js +9 -4
- package/esm/components/radio-button/radio-button.style.d.ts +1 -1
- package/esm/components/search/search.component.js +0 -1
- package/esm/components/select/__internal__/select-list/select-list.component.d.ts +9 -8
- package/esm/components/select/__internal__/select-list/select-list.component.js +34 -66
- package/esm/components/select/__internal__/select-list/select-list.style.js +9 -3
- package/esm/components/select/__internal__/select-textbox/select-textbox.component.d.ts +1 -1
- package/esm/components/select/__internal__/select-textbox/select-textbox.component.js +10 -5
- package/esm/components/select/filterable-select/filterable-select.component.js +16 -13
- package/esm/components/select/multi-select/multi-select.component.js +12 -7
- package/esm/components/select/option/option.component.d.ts +6 -5
- package/esm/components/select/option/option.component.js +10 -5
- package/esm/components/select/option-row/option-row.component.d.ts +2 -2
- package/esm/components/select/simple-select/simple-select.component.d.ts +0 -7
- package/esm/components/select/simple-select/simple-select.component.js +12 -7
- package/esm/components/sidebar/sidebar.component.d.ts +1 -1
- package/esm/components/simple-color-picker/simple-color-picker.component.js +3 -6
- package/esm/components/split-button/split-button.component.js +8 -4
- package/esm/components/step-flow/step-flow.component.js +0 -1
- package/esm/components/switch/switch.component.js +9 -4
- package/esm/components/tabs/__internal__/tab-title/tab-title.component.js +2 -11
- package/esm/components/tabs/tab/tab.component.d.ts +3 -3
- package/esm/components/tabs/tabs.component.js +15 -25
- package/esm/components/text-editor/__internal__/editor-link/editor-link.style.d.ts +1 -1
- package/esm/components/textarea/textarea.component.js +9 -4
- package/esm/components/textbox/textbox.component.js +9 -4
- package/esm/components/tile/flex-tile-cell/flex-tile-cell.component.js +1 -1
- package/esm/components/tile/flex-tile-divider/flex-tile-divider.component.d.ts +0 -1
- package/esm/components/time/time.component.js +0 -1
- package/esm/components/toast/toast.style.d.ts +3 -3
- package/esm/components/typography/typography.style.d.ts +2 -2
- package/esm/components/vertical-divider/vertical-divider.component.d.ts +0 -1
- package/esm/components/vertical-menu/vertical-menu-full-screen/vertical-menu-full-screen.component.d.ts +1 -1
- package/esm/components/vertical-menu/vertical-menu-full-screen/vertical-menu-full-screen.component.js +1 -2
- package/esm/components/vertical-menu/vertical-menu-item/vertical-menu-item.component.d.ts +1 -1
- package/esm/hooks/__internal__/useCharacterCount/useCharacterCount.d.ts +0 -1
- package/esm/hooks/__internal__/useChildButtons/useChildButtons.d.ts +1 -1
- package/esm/hooks/__internal__/useMenuKeyboardNavigation/useMenuKeyboardNavigation.d.ts +1 -1
- package/esm/hooks/__internal__/useMenuKeyboardNavigation/useMenuKeyboardNavigation.js +2 -2
- package/esm/hooks/__internal__/useStableCallback/useStableCallback.d.ts +1 -1
- package/lib/__internal__/checkable-input/checkable-input.component.js +9 -4
- package/lib/__internal__/checkable-input/hidden-checkable-input.component.js +9 -4
- package/lib/__internal__/input/input.component.js +9 -4
- package/lib/__internal__/radio-button-mapper/radio-button-mapper.component.js +1 -1
- package/lib/__internal__/utils/helpers/events/composedPath.d.ts +1 -1
- package/lib/__internal__/utils/helpers/events/events.d.ts +1 -1
- package/lib/components/accordion/accordion.component.js +1 -1
- package/lib/components/action-popover/action-popover-menu/action-popover-menu.component.js +1 -6
- package/lib/components/action-popover/action-popover.component.js +7 -2
- package/lib/components/advanced-color-picker/advanced-color-picker.component.d.ts +2 -2
- package/lib/components/advanced-color-picker/advanced-color-picker.component.js +1 -1
- package/lib/components/anchor-navigation/anchor-navigation.component.js +1 -1
- package/lib/components/box/box.component.js +1 -1
- package/lib/components/breadcrumbs/crumb/crumb.component.d.ts +1 -1
- package/lib/components/breadcrumbs/crumb/crumb.component.js +5 -1
- package/lib/components/breadcrumbs/crumb/crumb.style.d.ts +2 -2
- package/lib/components/button-toggle/button-toggle-group/button-toggle-group.component.js +1 -3
- package/lib/components/checkbox/checkbox.component.js +9 -4
- package/lib/components/content/content.style.js +2 -2
- package/lib/components/date/date.component.js +40 -60
- package/lib/components/decimal/decimal.component.js +10 -5
- package/lib/components/dialog/dialog.component.d.ts +1 -1
- package/lib/components/dialog-full-screen/dialog-full-screen.component.d.ts +1 -1
- package/lib/components/draggable/draggable-container.component.js +4 -1
- package/lib/components/drawer/drawer.component.js +1 -1
- package/lib/components/duelling-picklist/picklist-group/picklist-group.component.js +3 -0
- package/lib/components/grouped-character/grouped-character.component.js +9 -4
- package/lib/components/heading/heading.style.d.ts +1 -1
- package/lib/components/help/help.component.js +1 -1
- package/lib/components/hr/hr.component.d.ts +0 -1
- package/lib/components/image/image.style.d.ts +1 -1
- package/lib/components/link/link.component.d.ts +1 -3
- package/lib/components/link/link.component.js +5 -5
- package/lib/components/link/link.style.js +7 -4
- package/lib/components/loader-star/internal/star.component.d.ts +0 -1
- package/lib/components/loader-star/loader-star.component.d.ts +0 -1
- package/lib/components/menu/__internal__/menu.context.d.ts +1 -0
- package/lib/components/menu/__internal__/submenu/submenu.component.d.ts +1 -1
- package/lib/components/menu/__internal__/submenu/submenu.component.js +14 -37
- package/lib/components/menu/__internal__/submenu/submenu.context.d.ts +1 -2
- package/lib/components/menu/__internal__/submenu/submenu.style.js +0 -11
- package/lib/components/menu/menu-item/menu-item.component.js +38 -45
- package/lib/components/menu/menu-item/menu-item.style.d.ts +2 -2
- package/lib/components/menu/menu-item/menu-item.style.js +65 -83
- package/lib/components/menu/menu.component.js +1 -0
- package/lib/components/modal/modal.component.d.ts +1 -1
- package/lib/components/multi-action-button/multi-action-button.component.js +8 -4
- package/lib/components/number/number.component.js +9 -4
- package/lib/components/pager/pager.component.js +1 -1
- package/lib/components/pager/pager.style.d.ts +1 -1
- package/lib/components/pages/pages.component.js +1 -1
- package/lib/components/popover-container/popover-container.component.d.ts +1 -1
- package/lib/components/portrait/portrait.component.d.ts +2 -1
- package/lib/components/profile/profile.style.d.ts +1 -1
- package/lib/components/radio-button/radio-button.component.js +9 -4
- package/lib/components/radio-button/radio-button.style.d.ts +1 -1
- package/lib/components/search/search.component.js +0 -1
- package/lib/components/select/__internal__/select-list/select-list.component.d.ts +9 -8
- package/lib/components/select/__internal__/select-list/select-list.component.js +34 -66
- package/lib/components/select/__internal__/select-list/select-list.style.js +9 -3
- package/lib/components/select/__internal__/select-textbox/select-textbox.component.d.ts +1 -1
- package/lib/components/select/__internal__/select-textbox/select-textbox.component.js +10 -5
- package/lib/components/select/filterable-select/filterable-select.component.js +16 -13
- package/lib/components/select/multi-select/multi-select.component.js +12 -7
- package/lib/components/select/option/option.component.d.ts +6 -5
- package/lib/components/select/option/option.component.js +10 -5
- package/lib/components/select/option-row/option-row.component.d.ts +2 -2
- package/lib/components/select/simple-select/simple-select.component.d.ts +0 -7
- package/lib/components/select/simple-select/simple-select.component.js +12 -7
- package/lib/components/sidebar/sidebar.component.d.ts +1 -1
- package/lib/components/simple-color-picker/simple-color-picker.component.js +3 -6
- package/lib/components/split-button/split-button.component.js +8 -4
- package/lib/components/step-flow/step-flow.component.js +0 -1
- package/lib/components/switch/switch.component.js +9 -4
- package/lib/components/tabs/__internal__/tab-title/tab-title.component.js +2 -11
- package/lib/components/tabs/tab/tab.component.d.ts +3 -3
- package/lib/components/tabs/tabs.component.js +15 -25
- package/lib/components/text-editor/__internal__/editor-link/editor-link.style.d.ts +1 -1
- package/lib/components/textarea/textarea.component.js +9 -4
- package/lib/components/textbox/textbox.component.js +9 -4
- package/lib/components/tile/flex-tile-cell/flex-tile-cell.component.js +1 -1
- package/lib/components/tile/flex-tile-divider/flex-tile-divider.component.d.ts +0 -1
- package/lib/components/time/time.component.js +0 -1
- package/lib/components/toast/toast.style.d.ts +3 -3
- package/lib/components/typography/typography.style.d.ts +2 -2
- package/lib/components/vertical-divider/vertical-divider.component.d.ts +0 -1
- package/lib/components/vertical-menu/vertical-menu-full-screen/vertical-menu-full-screen.component.d.ts +1 -1
- package/lib/components/vertical-menu/vertical-menu-full-screen/vertical-menu-full-screen.component.js +1 -2
- package/lib/components/vertical-menu/vertical-menu-item/vertical-menu-item.component.d.ts +1 -1
- package/lib/hooks/__internal__/useCharacterCount/useCharacterCount.d.ts +0 -1
- package/lib/hooks/__internal__/useChildButtons/useChildButtons.d.ts +1 -1
- package/lib/hooks/__internal__/useMenuKeyboardNavigation/useMenuKeyboardNavigation.d.ts +1 -1
- package/lib/hooks/__internal__/useMenuKeyboardNavigation/useMenuKeyboardNavigation.js +2 -2
- package/lib/hooks/__internal__/useStableCallback/useStableCallback.d.ts +1 -1
- package/package.json +31 -36
|
@@ -58,7 +58,7 @@ const FilterableSelect = /*#__PURE__*/React.forwardRef(({
|
|
|
58
58
|
listWidth,
|
|
59
59
|
...textboxProps
|
|
60
60
|
}, ref) => {
|
|
61
|
-
const [activeDescendantId, setActiveDescendantId] = useState();
|
|
61
|
+
const [activeDescendantId, setActiveDescendantId] = useState("");
|
|
62
62
|
const selectListId = useRef(guid());
|
|
63
63
|
const containerRef = useRef(null);
|
|
64
64
|
const listboxRef = useRef(null);
|
|
@@ -159,7 +159,10 @@ const FilterableSelect = /*#__PURE__*/React.forwardRef(({
|
|
|
159
159
|
}, [children, filterText]);
|
|
160
160
|
const handleTextboxChange = useCallback(event => {
|
|
161
161
|
const newValue = event.target.value;
|
|
162
|
-
const
|
|
162
|
+
const {
|
|
163
|
+
inputType
|
|
164
|
+
} = event.nativeEvent;
|
|
165
|
+
const isDeleteEvent = inputType === "deleteContentBackward" || inputType === "deleteContentForward" || inputType === "delete";
|
|
163
166
|
updateValues(newValue, isDeleteEvent);
|
|
164
167
|
setFilterText(newValue);
|
|
165
168
|
setOpen(true);
|
|
@@ -284,20 +287,15 @@ const FilterableSelect = /*#__PURE__*/React.forwardRef(({
|
|
|
284
287
|
const {
|
|
285
288
|
id: selectedOptionId,
|
|
286
289
|
text,
|
|
287
|
-
value: newValue
|
|
290
|
+
value: newValue,
|
|
288
291
|
selectionType,
|
|
289
292
|
selectionConfirmed
|
|
290
293
|
} = optionData;
|
|
291
|
-
if (selectionType === "tab") {
|
|
292
|
-
setOpen(false);
|
|
293
|
-
textboxRef?.focus();
|
|
294
|
-
return;
|
|
295
|
-
}
|
|
296
294
|
if (!isControlled.current) {
|
|
297
295
|
setSelectedValue(newValue);
|
|
298
296
|
setHighlightedValue(newValue);
|
|
299
297
|
}
|
|
300
|
-
setTextValue(text
|
|
298
|
+
setTextValue(text);
|
|
301
299
|
triggerChange(newValue, !!selectionConfirmed);
|
|
302
300
|
setActiveDescendantId(selectedOptionId);
|
|
303
301
|
if (selectionType !== "navigationKey") {
|
|
@@ -494,14 +492,18 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
494
492
|
"aria-activedescendant": PropTypes.string,
|
|
495
493
|
"aria-atomic": PropTypes.oneOfType([PropTypes.oneOf(["false", "true"]), PropTypes.bool]),
|
|
496
494
|
"aria-autocomplete": PropTypes.oneOf(["both", "inline", "list", "none"]),
|
|
495
|
+
"aria-braillelabel": PropTypes.string,
|
|
496
|
+
"aria-brailleroledescription": PropTypes.string,
|
|
497
497
|
"aria-busy": PropTypes.oneOfType([PropTypes.oneOf(["false", "true"]), PropTypes.bool]),
|
|
498
498
|
"aria-checked": PropTypes.oneOfType([PropTypes.oneOf(["false", "mixed", "true"]), PropTypes.bool]),
|
|
499
499
|
"aria-colcount": PropTypes.number,
|
|
500
500
|
"aria-colindex": PropTypes.number,
|
|
501
|
+
"aria-colindextext": PropTypes.string,
|
|
501
502
|
"aria-colspan": PropTypes.number,
|
|
502
503
|
"aria-controls": PropTypes.string,
|
|
503
504
|
"aria-current": PropTypes.oneOfType([PropTypes.oneOf(["date", "false", "location", "page", "step", "time", "true"]), PropTypes.bool]),
|
|
504
505
|
"aria-describedby": PropTypes.string,
|
|
506
|
+
"aria-description": PropTypes.string,
|
|
505
507
|
"aria-details": PropTypes.string,
|
|
506
508
|
"aria-disabled": PropTypes.oneOfType([PropTypes.oneOf(["false", "true"]), PropTypes.bool]),
|
|
507
509
|
"aria-dropeffect": PropTypes.oneOf(["copy", "execute", "link", "move", "none", "popup"]),
|
|
@@ -531,6 +533,7 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
531
533
|
"aria-roledescription": PropTypes.string,
|
|
532
534
|
"aria-rowcount": PropTypes.number,
|
|
533
535
|
"aria-rowindex": PropTypes.number,
|
|
536
|
+
"aria-rowindextext": PropTypes.string,
|
|
534
537
|
"aria-rowspan": PropTypes.number,
|
|
535
538
|
"aria-selected": PropTypes.oneOfType([PropTypes.oneOf(["false", "true"]), PropTypes.bool]),
|
|
536
539
|
"aria-setsize": PropTypes.number,
|
|
@@ -594,7 +597,7 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
594
597
|
"trimStart": PropTypes.func.isRequired,
|
|
595
598
|
"valueOf": PropTypes.func.isRequired
|
|
596
599
|
})]),
|
|
597
|
-
"autoComplete": PropTypes.
|
|
600
|
+
"autoComplete": PropTypes.any,
|
|
598
601
|
"autoCorrect": PropTypes.string,
|
|
599
602
|
"autoFocus": PropTypes.bool,
|
|
600
603
|
"autoSave": PropTypes.string,
|
|
@@ -604,7 +607,7 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
604
607
|
"className": PropTypes.string,
|
|
605
608
|
"color": PropTypes.string,
|
|
606
609
|
"content": PropTypes.string,
|
|
607
|
-
"contentEditable": PropTypes.oneOfType([PropTypes.oneOf(["false", "inherit", "true"]), PropTypes.bool]),
|
|
610
|
+
"contentEditable": PropTypes.oneOfType([PropTypes.oneOf(["false", "inherit", "plaintext-only", "true"]), PropTypes.bool]),
|
|
608
611
|
"contextMenu": PropTypes.string,
|
|
609
612
|
"dangerouslySetInnerHTML": PropTypes.shape({
|
|
610
613
|
"__html": PropTypes.oneOfType([PropTypes.object, PropTypes.string]).isRequired
|
|
@@ -947,9 +950,7 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
947
950
|
"onPointerDown": PropTypes.func,
|
|
948
951
|
"onPointerDownCapture": PropTypes.func,
|
|
949
952
|
"onPointerEnter": PropTypes.func,
|
|
950
|
-
"onPointerEnterCapture": PropTypes.func,
|
|
951
953
|
"onPointerLeave": PropTypes.func,
|
|
952
|
-
"onPointerLeaveCapture": PropTypes.func,
|
|
953
954
|
"onPointerMove": PropTypes.func,
|
|
954
955
|
"onPointerMoveCapture": PropTypes.func,
|
|
955
956
|
"onPointerOut": PropTypes.func,
|
|
@@ -964,6 +965,8 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
964
965
|
"onRateChangeCapture": PropTypes.func,
|
|
965
966
|
"onReset": PropTypes.func,
|
|
966
967
|
"onResetCapture": PropTypes.func,
|
|
968
|
+
"onResize": PropTypes.func,
|
|
969
|
+
"onResizeCapture": PropTypes.func,
|
|
967
970
|
"onScroll": PropTypes.func,
|
|
968
971
|
"onScrollCapture": PropTypes.func,
|
|
969
972
|
"onSeeked": PropTypes.func,
|
|
@@ -59,7 +59,7 @@ const MultiSelect = /*#__PURE__*/React.forwardRef(({
|
|
|
59
59
|
listWidth,
|
|
60
60
|
...textboxProps
|
|
61
61
|
}, ref) => {
|
|
62
|
-
const [activeDescendantId, setActiveDescendantId] = useState();
|
|
62
|
+
const [activeDescendantId, setActiveDescendantId] = useState("");
|
|
63
63
|
const selectListId = useRef(guid());
|
|
64
64
|
const accessibilityLabelId = useRef(guid());
|
|
65
65
|
const containerRef = useRef(null);
|
|
@@ -122,8 +122,8 @@ const MultiSelect = /*#__PURE__*/React.forwardRef(({
|
|
|
122
122
|
const updateValue = useCallback((updateFunction, selectionConfirmed) => {
|
|
123
123
|
const newValue = updateFunction(actualValue);
|
|
124
124
|
// only call onChange if an option has been selected or deselected
|
|
125
|
-
if (
|
|
126
|
-
onChange(createCustomEvent(newValue, selectionConfirmed));
|
|
125
|
+
if (newValue.length !== actualValue?.length) {
|
|
126
|
+
onChange?.(createCustomEvent(newValue, selectionConfirmed));
|
|
127
127
|
}
|
|
128
128
|
|
|
129
129
|
// no need to update selectedValue if the component is controlled: onChange should take care of updating the value
|
|
@@ -501,14 +501,18 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
501
501
|
"aria-activedescendant": PropTypes.string,
|
|
502
502
|
"aria-atomic": PropTypes.oneOfType([PropTypes.oneOf(["false", "true"]), PropTypes.bool]),
|
|
503
503
|
"aria-autocomplete": PropTypes.oneOf(["both", "inline", "list", "none"]),
|
|
504
|
+
"aria-braillelabel": PropTypes.string,
|
|
505
|
+
"aria-brailleroledescription": PropTypes.string,
|
|
504
506
|
"aria-busy": PropTypes.oneOfType([PropTypes.oneOf(["false", "true"]), PropTypes.bool]),
|
|
505
507
|
"aria-checked": PropTypes.oneOfType([PropTypes.oneOf(["false", "mixed", "true"]), PropTypes.bool]),
|
|
506
508
|
"aria-colcount": PropTypes.number,
|
|
507
509
|
"aria-colindex": PropTypes.number,
|
|
510
|
+
"aria-colindextext": PropTypes.string,
|
|
508
511
|
"aria-colspan": PropTypes.number,
|
|
509
512
|
"aria-controls": PropTypes.string,
|
|
510
513
|
"aria-current": PropTypes.oneOfType([PropTypes.oneOf(["date", "false", "location", "page", "step", "time", "true"]), PropTypes.bool]),
|
|
511
514
|
"aria-describedby": PropTypes.string,
|
|
515
|
+
"aria-description": PropTypes.string,
|
|
512
516
|
"aria-details": PropTypes.string,
|
|
513
517
|
"aria-disabled": PropTypes.oneOfType([PropTypes.oneOf(["false", "true"]), PropTypes.bool]),
|
|
514
518
|
"aria-dropeffect": PropTypes.oneOf(["copy", "execute", "link", "move", "none", "popup"]),
|
|
@@ -538,6 +542,7 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
538
542
|
"aria-roledescription": PropTypes.string,
|
|
539
543
|
"aria-rowcount": PropTypes.number,
|
|
540
544
|
"aria-rowindex": PropTypes.number,
|
|
545
|
+
"aria-rowindextext": PropTypes.string,
|
|
541
546
|
"aria-rowspan": PropTypes.number,
|
|
542
547
|
"aria-selected": PropTypes.oneOfType([PropTypes.oneOf(["false", "true"]), PropTypes.bool]),
|
|
543
548
|
"aria-setsize": PropTypes.number,
|
|
@@ -601,7 +606,7 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
601
606
|
"trimStart": PropTypes.func.isRequired,
|
|
602
607
|
"valueOf": PropTypes.func.isRequired
|
|
603
608
|
})]),
|
|
604
|
-
"autoComplete": PropTypes.
|
|
609
|
+
"autoComplete": PropTypes.any,
|
|
605
610
|
"autoCorrect": PropTypes.string,
|
|
606
611
|
"autoFocus": PropTypes.bool,
|
|
607
612
|
"autoSave": PropTypes.string,
|
|
@@ -611,7 +616,7 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
611
616
|
"className": PropTypes.string,
|
|
612
617
|
"color": PropTypes.string,
|
|
613
618
|
"content": PropTypes.string,
|
|
614
|
-
"contentEditable": PropTypes.oneOfType([PropTypes.oneOf(["false", "inherit", "true"]), PropTypes.bool]),
|
|
619
|
+
"contentEditable": PropTypes.oneOfType([PropTypes.oneOf(["false", "inherit", "plaintext-only", "true"]), PropTypes.bool]),
|
|
615
620
|
"contextMenu": PropTypes.string,
|
|
616
621
|
"dangerouslySetInnerHTML": PropTypes.shape({
|
|
617
622
|
"__html": PropTypes.oneOfType([PropTypes.object, PropTypes.string]).isRequired
|
|
@@ -951,9 +956,7 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
951
956
|
"onPointerDown": PropTypes.func,
|
|
952
957
|
"onPointerDownCapture": PropTypes.func,
|
|
953
958
|
"onPointerEnter": PropTypes.func,
|
|
954
|
-
"onPointerEnterCapture": PropTypes.func,
|
|
955
959
|
"onPointerLeave": PropTypes.func,
|
|
956
|
-
"onPointerLeaveCapture": PropTypes.func,
|
|
957
960
|
"onPointerMove": PropTypes.func,
|
|
958
961
|
"onPointerMoveCapture": PropTypes.func,
|
|
959
962
|
"onPointerOut": PropTypes.func,
|
|
@@ -968,6 +971,8 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
968
971
|
"onRateChangeCapture": PropTypes.func,
|
|
969
972
|
"onReset": PropTypes.func,
|
|
970
973
|
"onResetCapture": PropTypes.func,
|
|
974
|
+
"onResize": PropTypes.func,
|
|
975
|
+
"onResizeCapture": PropTypes.func,
|
|
971
976
|
"onScroll": PropTypes.func,
|
|
972
977
|
"onScrollCapture": PropTypes.func,
|
|
973
978
|
"onSeeked": PropTypes.func,
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { TagProps } from "../../../__internal__/utils/helpers/tags";
|
|
3
|
+
declare type OptionData = {
|
|
4
|
+
id?: string;
|
|
5
|
+
text?: string;
|
|
6
|
+
value?: string | Record<string, unknown>;
|
|
7
|
+
};
|
|
3
8
|
export interface OptionProps extends Omit<React.InputHTMLAttributes<HTMLLIElement>, "value" | "onSelect" | "onClick">, Omit<TagProps, "data-component"> {
|
|
4
9
|
/**
|
|
5
10
|
* Unique identifier for the component.
|
|
@@ -27,11 +32,7 @@ export interface OptionProps extends Omit<React.InputHTMLAttributes<HTMLLIElemen
|
|
|
27
32
|
* @private
|
|
28
33
|
* @ignore
|
|
29
34
|
* OnSelect callback */
|
|
30
|
-
onSelect?: (target
|
|
31
|
-
text?: string;
|
|
32
|
-
value?: string | Record<string, unknown>;
|
|
33
|
-
id?: string;
|
|
34
|
-
}) => void;
|
|
35
|
+
onSelect?: (target: OptionData) => void;
|
|
35
36
|
/**
|
|
36
37
|
* @private
|
|
37
38
|
* @ignore
|
|
@@ -34,7 +34,7 @@ const Option = /*#__PURE__*/React.forwardRef(({
|
|
|
34
34
|
id: internalIdRef.current
|
|
35
35
|
});
|
|
36
36
|
} else {
|
|
37
|
-
onSelect?.();
|
|
37
|
+
onSelect?.({});
|
|
38
38
|
onClick(value);
|
|
39
39
|
}
|
|
40
40
|
}
|
|
@@ -64,14 +64,18 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
64
64
|
"aria-activedescendant": PropTypes.string,
|
|
65
65
|
"aria-atomic": PropTypes.oneOfType([PropTypes.oneOf(["false", "true"]), PropTypes.bool]),
|
|
66
66
|
"aria-autocomplete": PropTypes.oneOf(["both", "inline", "list", "none"]),
|
|
67
|
+
"aria-braillelabel": PropTypes.string,
|
|
68
|
+
"aria-brailleroledescription": PropTypes.string,
|
|
67
69
|
"aria-busy": PropTypes.oneOfType([PropTypes.oneOf(["false", "true"]), PropTypes.bool]),
|
|
68
70
|
"aria-checked": PropTypes.oneOfType([PropTypes.oneOf(["false", "mixed", "true"]), PropTypes.bool]),
|
|
69
71
|
"aria-colcount": PropTypes.number,
|
|
70
72
|
"aria-colindex": PropTypes.number,
|
|
73
|
+
"aria-colindextext": PropTypes.string,
|
|
71
74
|
"aria-colspan": PropTypes.number,
|
|
72
75
|
"aria-controls": PropTypes.string,
|
|
73
76
|
"aria-current": PropTypes.oneOfType([PropTypes.oneOf(["date", "false", "location", "page", "step", "time", "true"]), PropTypes.bool]),
|
|
74
77
|
"aria-describedby": PropTypes.string,
|
|
78
|
+
"aria-description": PropTypes.string,
|
|
75
79
|
"aria-details": PropTypes.string,
|
|
76
80
|
"aria-disabled": PropTypes.oneOfType([PropTypes.oneOf(["false", "true"]), PropTypes.bool]),
|
|
77
81
|
"aria-dropeffect": PropTypes.oneOf(["copy", "execute", "link", "move", "none", "popup"]),
|
|
@@ -101,6 +105,7 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
101
105
|
"aria-roledescription": PropTypes.string,
|
|
102
106
|
"aria-rowcount": PropTypes.number,
|
|
103
107
|
"aria-rowindex": PropTypes.number,
|
|
108
|
+
"aria-rowindextext": PropTypes.string,
|
|
104
109
|
"aria-rowspan": PropTypes.number,
|
|
105
110
|
"aria-selected": PropTypes.oneOfType([PropTypes.oneOf(["false", "true"]), PropTypes.bool]),
|
|
106
111
|
"aria-setsize": PropTypes.number,
|
|
@@ -160,7 +165,7 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
160
165
|
"trimStart": PropTypes.func.isRequired,
|
|
161
166
|
"valueOf": PropTypes.func.isRequired
|
|
162
167
|
})]),
|
|
163
|
-
"autoComplete": PropTypes.
|
|
168
|
+
"autoComplete": PropTypes.any,
|
|
164
169
|
"autoCorrect": PropTypes.string,
|
|
165
170
|
"autoFocus": PropTypes.bool,
|
|
166
171
|
"autoSave": PropTypes.string,
|
|
@@ -171,7 +176,7 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
171
176
|
"className": PropTypes.string,
|
|
172
177
|
"color": PropTypes.string,
|
|
173
178
|
"content": PropTypes.string,
|
|
174
|
-
"contentEditable": PropTypes.oneOfType([PropTypes.oneOf(["false", "inherit", "true"]), PropTypes.bool]),
|
|
179
|
+
"contentEditable": PropTypes.oneOfType([PropTypes.oneOf(["false", "inherit", "plaintext-only", "true"]), PropTypes.bool]),
|
|
175
180
|
"contextMenu": PropTypes.string,
|
|
176
181
|
"dangerouslySetInnerHTML": PropTypes.shape({
|
|
177
182
|
"__html": PropTypes.oneOfType([PropTypes.object, PropTypes.string]).isRequired
|
|
@@ -324,9 +329,7 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
324
329
|
"onPointerDown": PropTypes.func,
|
|
325
330
|
"onPointerDownCapture": PropTypes.func,
|
|
326
331
|
"onPointerEnter": PropTypes.func,
|
|
327
|
-
"onPointerEnterCapture": PropTypes.func,
|
|
328
332
|
"onPointerLeave": PropTypes.func,
|
|
329
|
-
"onPointerLeaveCapture": PropTypes.func,
|
|
330
333
|
"onPointerMove": PropTypes.func,
|
|
331
334
|
"onPointerMoveCapture": PropTypes.func,
|
|
332
335
|
"onPointerOut": PropTypes.func,
|
|
@@ -341,6 +344,8 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
341
344
|
"onRateChangeCapture": PropTypes.func,
|
|
342
345
|
"onReset": PropTypes.func,
|
|
343
346
|
"onResetCapture": PropTypes.func,
|
|
347
|
+
"onResize": PropTypes.func,
|
|
348
|
+
"onResizeCapture": PropTypes.func,
|
|
344
349
|
"onScroll": PropTypes.func,
|
|
345
350
|
"onScrollCapture": PropTypes.func,
|
|
346
351
|
"onSeeked": PropTypes.func,
|
|
@@ -19,8 +19,8 @@ export interface OptionRowProps extends Omit<TagProps, "data-component"> {
|
|
|
19
19
|
* @private
|
|
20
20
|
* @ignore
|
|
21
21
|
* Callback to return value when the element is selected (prop added by the SelectList component) */
|
|
22
|
-
onSelect?: (
|
|
23
|
-
id
|
|
22
|
+
onSelect?: (data: {
|
|
23
|
+
id: string;
|
|
24
24
|
text: string;
|
|
25
25
|
value: string | Record<string, unknown>;
|
|
26
26
|
}) => void;
|
|
@@ -1,13 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { FormInputPropTypes } from "../__internal__/select-textbox";
|
|
3
3
|
import { ListPlacement } from "../__internal__/select-list/select-list.component";
|
|
4
|
-
export interface OptionData {
|
|
5
|
-
text?: string;
|
|
6
|
-
value?: string | Record<string, unknown>;
|
|
7
|
-
id?: string;
|
|
8
|
-
selectionType: string;
|
|
9
|
-
selectionConfirmed?: boolean;
|
|
10
|
-
}
|
|
11
4
|
export interface CustomSelectChangeEvent extends React.ChangeEvent<HTMLInputElement> {
|
|
12
5
|
selectionConfirmed?: boolean;
|
|
13
6
|
}
|
|
@@ -63,7 +63,7 @@ const SimpleSelect = /*#__PURE__*/React.forwardRef(({
|
|
|
63
63
|
const filterText = useRef();
|
|
64
64
|
const [textboxRef, setTextboxRef] = useState();
|
|
65
65
|
const [isOpen, setOpenState] = useState(false);
|
|
66
|
-
const [activeDescendantId, setActiveDescendantId] = useState();
|
|
66
|
+
const [activeDescendantId, setActiveDescendantId] = useState("");
|
|
67
67
|
const [textValue, setTextValue] = useState("");
|
|
68
68
|
const [selectedValue, setSelectedValue] = useState(value || defaultValue || "");
|
|
69
69
|
const inputId = useRef(id || guid());
|
|
@@ -240,7 +240,7 @@ const SimpleSelect = /*#__PURE__*/React.forwardRef(({
|
|
|
240
240
|
}
|
|
241
241
|
onChange?.(createCustomEvent(newValue, selectionConfirmed));
|
|
242
242
|
}
|
|
243
|
-
|
|
243
|
+
const onSelectOption = optionData => {
|
|
244
244
|
const {
|
|
245
245
|
text,
|
|
246
246
|
value: newValue,
|
|
@@ -258,7 +258,7 @@ const SimpleSelect = /*#__PURE__*/React.forwardRef(({
|
|
|
258
258
|
isClickTriggeredBySelect.current = true;
|
|
259
259
|
textboxRef?.focus();
|
|
260
260
|
}
|
|
261
|
-
}
|
|
261
|
+
};
|
|
262
262
|
const onSelectListClose = useCallback(() => {
|
|
263
263
|
setOpenState(false);
|
|
264
264
|
}, []);
|
|
@@ -360,14 +360,18 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
360
360
|
"aria-activedescendant": PropTypes.string,
|
|
361
361
|
"aria-atomic": PropTypes.oneOfType([PropTypes.oneOf(["false", "true"]), PropTypes.bool]),
|
|
362
362
|
"aria-autocomplete": PropTypes.oneOf(["both", "inline", "list", "none"]),
|
|
363
|
+
"aria-braillelabel": PropTypes.string,
|
|
364
|
+
"aria-brailleroledescription": PropTypes.string,
|
|
363
365
|
"aria-busy": PropTypes.oneOfType([PropTypes.oneOf(["false", "true"]), PropTypes.bool]),
|
|
364
366
|
"aria-checked": PropTypes.oneOfType([PropTypes.oneOf(["false", "mixed", "true"]), PropTypes.bool]),
|
|
365
367
|
"aria-colcount": PropTypes.number,
|
|
366
368
|
"aria-colindex": PropTypes.number,
|
|
369
|
+
"aria-colindextext": PropTypes.string,
|
|
367
370
|
"aria-colspan": PropTypes.number,
|
|
368
371
|
"aria-controls": PropTypes.string,
|
|
369
372
|
"aria-current": PropTypes.oneOfType([PropTypes.oneOf(["date", "false", "location", "page", "step", "time", "true"]), PropTypes.bool]),
|
|
370
373
|
"aria-describedby": PropTypes.string,
|
|
374
|
+
"aria-description": PropTypes.string,
|
|
371
375
|
"aria-details": PropTypes.string,
|
|
372
376
|
"aria-disabled": PropTypes.oneOfType([PropTypes.oneOf(["false", "true"]), PropTypes.bool]),
|
|
373
377
|
"aria-dropeffect": PropTypes.oneOf(["copy", "execute", "link", "move", "none", "popup"]),
|
|
@@ -397,6 +401,7 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
397
401
|
"aria-roledescription": PropTypes.string,
|
|
398
402
|
"aria-rowcount": PropTypes.number,
|
|
399
403
|
"aria-rowindex": PropTypes.number,
|
|
404
|
+
"aria-rowindextext": PropTypes.string,
|
|
400
405
|
"aria-rowspan": PropTypes.number,
|
|
401
406
|
"aria-selected": PropTypes.oneOfType([PropTypes.oneOf(["false", "true"]), PropTypes.bool]),
|
|
402
407
|
"aria-setsize": PropTypes.number,
|
|
@@ -460,7 +465,7 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
460
465
|
"trimStart": PropTypes.func.isRequired,
|
|
461
466
|
"valueOf": PropTypes.func.isRequired
|
|
462
467
|
})]),
|
|
463
|
-
"autoComplete": PropTypes.
|
|
468
|
+
"autoComplete": PropTypes.any,
|
|
464
469
|
"autoCorrect": PropTypes.string,
|
|
465
470
|
"autoFocus": PropTypes.bool,
|
|
466
471
|
"autoSave": PropTypes.string,
|
|
@@ -470,7 +475,7 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
470
475
|
"className": PropTypes.string,
|
|
471
476
|
"color": PropTypes.string,
|
|
472
477
|
"content": PropTypes.string,
|
|
473
|
-
"contentEditable": PropTypes.oneOfType([PropTypes.oneOf(["false", "inherit", "true"]), PropTypes.bool]),
|
|
478
|
+
"contentEditable": PropTypes.oneOfType([PropTypes.oneOf(["false", "inherit", "plaintext-only", "true"]), PropTypes.bool]),
|
|
474
479
|
"contextMenu": PropTypes.string,
|
|
475
480
|
"dangerouslySetInnerHTML": PropTypes.shape({
|
|
476
481
|
"__html": PropTypes.oneOfType([PropTypes.object, PropTypes.string]).isRequired
|
|
@@ -809,9 +814,7 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
809
814
|
"onPointerDown": PropTypes.func,
|
|
810
815
|
"onPointerDownCapture": PropTypes.func,
|
|
811
816
|
"onPointerEnter": PropTypes.func,
|
|
812
|
-
"onPointerEnterCapture": PropTypes.func,
|
|
813
817
|
"onPointerLeave": PropTypes.func,
|
|
814
|
-
"onPointerLeaveCapture": PropTypes.func,
|
|
815
818
|
"onPointerMove": PropTypes.func,
|
|
816
819
|
"onPointerMoveCapture": PropTypes.func,
|
|
817
820
|
"onPointerOut": PropTypes.func,
|
|
@@ -826,6 +829,8 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
826
829
|
"onRateChangeCapture": PropTypes.func,
|
|
827
830
|
"onReset": PropTypes.func,
|
|
828
831
|
"onResetCapture": PropTypes.func,
|
|
832
|
+
"onResize": PropTypes.func,
|
|
833
|
+
"onResizeCapture": PropTypes.func,
|
|
829
834
|
"onScroll": PropTypes.func,
|
|
830
835
|
"onScrollCapture": PropTypes.func,
|
|
831
836
|
"onSeeked": PropTypes.func,
|
|
@@ -37,7 +37,7 @@ export interface SidebarProps extends PaddingProps, Omit<TagProps, "data-compone
|
|
|
37
37
|
/** Node that will be used as sidebar header. */
|
|
38
38
|
header?: React.ReactNode;
|
|
39
39
|
/** A custom close event handler */
|
|
40
|
-
onCancel?: (ev: React.KeyboardEvent<HTMLElement> | React.MouseEvent<HTMLElement>) => void;
|
|
40
|
+
onCancel?: (ev: React.KeyboardEvent<HTMLElement> | KeyboardEvent | React.MouseEvent<HTMLElement>) => void;
|
|
41
41
|
/** Sets the open state of the modal */
|
|
42
42
|
open: boolean;
|
|
43
43
|
/** Sets the position of sidebar, either left or right. */
|
|
@@ -32,13 +32,10 @@ const SimpleColorPicker = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
32
32
|
...rest
|
|
33
33
|
} = props;
|
|
34
34
|
const hasProperChildren = useMemo(() => {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
if (typeof child === "string" || /*#__PURE__*/React.isValidElement(child) && child.type.displayName !== "SimpleColor") {
|
|
38
|
-
hasSimpleColorChildren = false;
|
|
39
|
-
}
|
|
35
|
+
const invalidChild = React.Children.toArray(children).find(child => {
|
|
36
|
+
return typeof child === "string" || /*#__PURE__*/React.isValidElement(child) && child.type.displayName !== "SimpleColor";
|
|
40
37
|
});
|
|
41
|
-
return
|
|
38
|
+
return !invalidChild;
|
|
42
39
|
}, [children]);
|
|
43
40
|
!hasProperChildren ? process.env.NODE_ENV !== "production" ? invariant(false, `SimpleColorPicker accepts only children of type \`${SimpleColor.displayName}\`.`) : invariant(false) : void 0;
|
|
44
41
|
const filteredChildren = useMemo(() => React.Children.toArray(children).filter(child => /*#__PURE__*/React.isValidElement(child)), [children]);
|
|
@@ -153,14 +153,18 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
153
153
|
"aria-activedescendant": PropTypes.string,
|
|
154
154
|
"aria-atomic": PropTypes.oneOfType([PropTypes.oneOf(["false", "true"]), PropTypes.bool]),
|
|
155
155
|
"aria-autocomplete": PropTypes.oneOf(["both", "inline", "list", "none"]),
|
|
156
|
+
"aria-braillelabel": PropTypes.string,
|
|
157
|
+
"aria-brailleroledescription": PropTypes.string,
|
|
156
158
|
"aria-busy": PropTypes.oneOfType([PropTypes.oneOf(["false", "true"]), PropTypes.bool]),
|
|
157
159
|
"aria-checked": PropTypes.oneOfType([PropTypes.oneOf(["false", "mixed", "true"]), PropTypes.bool]),
|
|
158
160
|
"aria-colcount": PropTypes.number,
|
|
159
161
|
"aria-colindex": PropTypes.number,
|
|
162
|
+
"aria-colindextext": PropTypes.string,
|
|
160
163
|
"aria-colspan": PropTypes.number,
|
|
161
164
|
"aria-controls": PropTypes.string,
|
|
162
165
|
"aria-current": PropTypes.oneOfType([PropTypes.oneOf(["date", "false", "location", "page", "step", "time", "true"]), PropTypes.bool]),
|
|
163
166
|
"aria-describedby": PropTypes.string,
|
|
167
|
+
"aria-description": PropTypes.string,
|
|
164
168
|
"aria-details": PropTypes.string,
|
|
165
169
|
"aria-disabled": PropTypes.oneOfType([PropTypes.oneOf(["false", "true"]), PropTypes.bool]),
|
|
166
170
|
"aria-dropeffect": PropTypes.oneOf(["copy", "execute", "link", "move", "none", "popup"]),
|
|
@@ -190,6 +194,7 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
190
194
|
"aria-roledescription": PropTypes.string,
|
|
191
195
|
"aria-rowcount": PropTypes.number,
|
|
192
196
|
"aria-rowindex": PropTypes.number,
|
|
197
|
+
"aria-rowindextext": PropTypes.string,
|
|
193
198
|
"aria-rowspan": PropTypes.number,
|
|
194
199
|
"aria-selected": PropTypes.oneOfType([PropTypes.oneOf(["false", "true"]), PropTypes.bool]),
|
|
195
200
|
"aria-setsize": PropTypes.number,
|
|
@@ -257,7 +262,7 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
257
262
|
"className": PropTypes.string,
|
|
258
263
|
"color": PropTypes.string,
|
|
259
264
|
"content": PropTypes.string,
|
|
260
|
-
"contentEditable": PropTypes.oneOfType([PropTypes.oneOf(["false", "inherit", "true"]), PropTypes.bool]),
|
|
265
|
+
"contentEditable": PropTypes.oneOfType([PropTypes.oneOf(["false", "inherit", "plaintext-only", "true"]), PropTypes.bool]),
|
|
261
266
|
"contextMenu": PropTypes.string,
|
|
262
267
|
"dangerouslySetInnerHTML": PropTypes.shape({
|
|
263
268
|
"__html": PropTypes.oneOfType([PropTypes.object, PropTypes.string]).isRequired
|
|
@@ -557,9 +562,7 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
557
562
|
"onPointerDown": PropTypes.func,
|
|
558
563
|
"onPointerDownCapture": PropTypes.func,
|
|
559
564
|
"onPointerEnter": PropTypes.func,
|
|
560
|
-
"onPointerEnterCapture": PropTypes.func,
|
|
561
565
|
"onPointerLeave": PropTypes.func,
|
|
562
|
-
"onPointerLeaveCapture": PropTypes.func,
|
|
563
566
|
"onPointerMove": PropTypes.func,
|
|
564
567
|
"onPointerMoveCapture": PropTypes.func,
|
|
565
568
|
"onPointerOut": PropTypes.func,
|
|
@@ -574,6 +577,8 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
574
577
|
"onRateChangeCapture": PropTypes.func,
|
|
575
578
|
"onReset": PropTypes.func,
|
|
576
579
|
"onResetCapture": PropTypes.func,
|
|
580
|
+
"onResize": PropTypes.func,
|
|
581
|
+
"onResizeCapture": PropTypes.func,
|
|
577
582
|
"onScroll": PropTypes.func,
|
|
578
583
|
"onScrollCapture": PropTypes.func,
|
|
579
584
|
"onSeeked": PropTypes.func,
|
|
@@ -606,7 +611,6 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
606
611
|
"onWaitingCapture": PropTypes.func,
|
|
607
612
|
"onWheel": PropTypes.func,
|
|
608
613
|
"onWheelCapture": PropTypes.func,
|
|
609
|
-
"placeholder": PropTypes.string,
|
|
610
614
|
"position": PropTypes.oneOf(["left", "right"]),
|
|
611
615
|
"prefix": PropTypes.string,
|
|
612
616
|
"property": PropTypes.string,
|
|
@@ -115,7 +115,6 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
115
115
|
"aria-label": PropTypes.string,
|
|
116
116
|
"aria-labelledby": PropTypes.string,
|
|
117
117
|
"category": PropTypes.string,
|
|
118
|
-
"children": PropTypes.node,
|
|
119
118
|
"currentStep": PropTypes.oneOf([1, 2, 3, 4, 5, 6, 7, 8]).isRequired,
|
|
120
119
|
"data-component": PropTypes.string,
|
|
121
120
|
"data-element": PropTypes.string,
|
|
@@ -246,14 +246,18 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
246
246
|
"aria-activedescendant": PropTypes.string,
|
|
247
247
|
"aria-atomic": PropTypes.oneOfType([PropTypes.oneOf(["false", "true"]), PropTypes.bool]),
|
|
248
248
|
"aria-autocomplete": PropTypes.oneOf(["both", "inline", "list", "none"]),
|
|
249
|
+
"aria-braillelabel": PropTypes.string,
|
|
250
|
+
"aria-brailleroledescription": PropTypes.string,
|
|
249
251
|
"aria-busy": PropTypes.oneOfType([PropTypes.oneOf(["false", "true"]), PropTypes.bool]),
|
|
250
252
|
"aria-checked": PropTypes.oneOfType([PropTypes.oneOf(["false", "mixed", "true"]), PropTypes.bool]),
|
|
251
253
|
"aria-colcount": PropTypes.number,
|
|
252
254
|
"aria-colindex": PropTypes.number,
|
|
255
|
+
"aria-colindextext": PropTypes.string,
|
|
253
256
|
"aria-colspan": PropTypes.number,
|
|
254
257
|
"aria-controls": PropTypes.string,
|
|
255
258
|
"aria-current": PropTypes.oneOfType([PropTypes.oneOf(["date", "false", "location", "page", "step", "time", "true"]), PropTypes.bool]),
|
|
256
259
|
"aria-describedby": PropTypes.string,
|
|
260
|
+
"aria-description": PropTypes.string,
|
|
257
261
|
"aria-details": PropTypes.string,
|
|
258
262
|
"aria-disabled": PropTypes.oneOfType([PropTypes.oneOf(["false", "true"]), PropTypes.bool]),
|
|
259
263
|
"aria-dropeffect": PropTypes.oneOf(["copy", "execute", "link", "move", "none", "popup"]),
|
|
@@ -283,6 +287,7 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
283
287
|
"aria-roledescription": PropTypes.string,
|
|
284
288
|
"aria-rowcount": PropTypes.number,
|
|
285
289
|
"aria-rowindex": PropTypes.number,
|
|
290
|
+
"aria-rowindextext": PropTypes.string,
|
|
286
291
|
"aria-rowspan": PropTypes.number,
|
|
287
292
|
"aria-selected": PropTypes.oneOfType([PropTypes.oneOf(["false", "true"]), PropTypes.bool]),
|
|
288
293
|
"aria-setsize": PropTypes.number,
|
|
@@ -344,7 +349,7 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
344
349
|
"trimStart": PropTypes.func.isRequired,
|
|
345
350
|
"valueOf": PropTypes.func.isRequired
|
|
346
351
|
})]),
|
|
347
|
-
"autoComplete": PropTypes.
|
|
352
|
+
"autoComplete": PropTypes.any,
|
|
348
353
|
"autoCorrect": PropTypes.string,
|
|
349
354
|
"autoFocus": PropTypes.bool,
|
|
350
355
|
"autoSave": PropTypes.string,
|
|
@@ -354,7 +359,7 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
354
359
|
"className": PropTypes.string,
|
|
355
360
|
"color": PropTypes.string,
|
|
356
361
|
"content": PropTypes.string,
|
|
357
|
-
"contentEditable": PropTypes.oneOfType([PropTypes.oneOf(["false", "inherit", "true"]), PropTypes.bool]),
|
|
362
|
+
"contentEditable": PropTypes.oneOfType([PropTypes.oneOf(["false", "inherit", "plaintext-only", "true"]), PropTypes.bool]),
|
|
358
363
|
"contextMenu": PropTypes.string,
|
|
359
364
|
"dangerouslySetInnerHTML": PropTypes.shape({
|
|
360
365
|
"__html": PropTypes.oneOfType([PropTypes.object, PropTypes.string]).isRequired
|
|
@@ -674,9 +679,7 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
674
679
|
"onPointerDown": PropTypes.func,
|
|
675
680
|
"onPointerDownCapture": PropTypes.func,
|
|
676
681
|
"onPointerEnter": PropTypes.func,
|
|
677
|
-
"onPointerEnterCapture": PropTypes.func,
|
|
678
682
|
"onPointerLeave": PropTypes.func,
|
|
679
|
-
"onPointerLeaveCapture": PropTypes.func,
|
|
680
683
|
"onPointerMove": PropTypes.func,
|
|
681
684
|
"onPointerMoveCapture": PropTypes.func,
|
|
682
685
|
"onPointerOut": PropTypes.func,
|
|
@@ -691,6 +694,8 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
691
694
|
"onRateChangeCapture": PropTypes.func,
|
|
692
695
|
"onReset": PropTypes.func,
|
|
693
696
|
"onResetCapture": PropTypes.func,
|
|
697
|
+
"onResize": PropTypes.func,
|
|
698
|
+
"onResizeCapture": PropTypes.func,
|
|
694
699
|
"onScroll": PropTypes.func,
|
|
695
700
|
"onScrollCapture": PropTypes.func,
|
|
696
701
|
"onSeeked": PropTypes.func,
|
|
@@ -69,17 +69,8 @@ const TabTitle = /*#__PURE__*/React.forwardRef(({
|
|
|
69
69
|
};
|
|
70
70
|
const handleClick = ev => {
|
|
71
71
|
ev.preventDefault();
|
|
72
|
-
const customEvent = {
|
|
73
|
-
...ev,
|
|
74
|
-
target: {
|
|
75
|
-
...ev.target,
|
|
76
|
-
dataset: {
|
|
77
|
-
tabid: dataTabId
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
};
|
|
81
72
|
if (href) {
|
|
82
|
-
onClick(
|
|
73
|
+
onClick(ev);
|
|
83
74
|
return window.open(href, "_blank");
|
|
84
75
|
}
|
|
85
76
|
|
|
@@ -88,7 +79,7 @@ const TabTitle = /*#__PURE__*/React.forwardRef(({
|
|
|
88
79
|
if (typeof ref === "object") {
|
|
89
80
|
ref?.current?.focus();
|
|
90
81
|
}
|
|
91
|
-
return onClick(
|
|
82
|
+
return onClick(ev);
|
|
92
83
|
};
|
|
93
84
|
const renderContent = () => {
|
|
94
85
|
if (customLayout) {
|
|
@@ -34,11 +34,11 @@ export interface TabProps extends PaddingProps {
|
|
|
34
34
|
/** @private @ignore */
|
|
35
35
|
ariaLabelledby?: string;
|
|
36
36
|
/** @private @ignore */
|
|
37
|
-
updateErrors?: (id: string, errors: Record<string, string | boolean>) => void;
|
|
37
|
+
updateErrors?: (id: string, errors: Record<string, undefined | string | boolean>) => void;
|
|
38
38
|
/** @private @ignore */
|
|
39
|
-
updateWarnings?: (id: string, warnings: Record<string, string | boolean>) => void;
|
|
39
|
+
updateWarnings?: (id: string, warnings: Record<string, undefined | string | boolean>) => void;
|
|
40
40
|
/** @private @ignore */
|
|
41
|
-
updateInfos?: (id: string, infos: Record<string, string | boolean>) => void;
|
|
41
|
+
updateInfos?: (id: string, infos: Record<string, undefined | string | boolean>) => void;
|
|
42
42
|
}
|
|
43
43
|
export declare const Tab: ({ ariaLabelledby, children, isTabSelected, position, role, tabId, updateErrors, updateWarnings, updateInfos, href, title, titleProps, ...rest }: TabProps) => React.JSX.Element;
|
|
44
44
|
export default Tab;
|