carbon-react 143.0.1 → 143.1.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 +51 -1
- package/esm/__internal__/checkable-input/hidden-checkable-input.component.js +51 -1
- package/esm/__internal__/input/input.component.js +51 -1
- package/esm/__internal__/popover/popover.component.js +1 -1
- package/esm/__internal__/radio-button-mapper/radio-button-mapper.component.js +1 -1
- package/esm/__internal__/utils/helpers/events/composedPath.js +2 -2
- package/esm/__internal__/utils/helpers/guid/index.js +2 -2
- package/esm/components/action-popover/action-popover-item/action-popover-item.component.js +1 -1
- package/esm/components/action-popover/action-popover-menu/action-popover-menu.component.d.ts +10 -2
- package/esm/components/action-popover/action-popover-menu/action-popover-menu.component.js +2 -2
- package/esm/components/button/button-types.style.js +2 -2
- package/esm/components/checkbox/checkbox.component.js +51 -1
- package/esm/components/date/date.component.js +51 -1
- package/esm/components/decimal/decimal.component.js +51 -1
- package/esm/components/duelling-picklist/duelling-picklist.component.js +1 -1
- package/esm/components/flat-table/__internal__/build-position-map.js +2 -2
- package/esm/components/flat-table/__internal__/use-table-cell.js +2 -2
- package/esm/components/form/required-fields-indicator/required-fields-indicator.component.js +2 -2
- package/esm/components/grouped-character/grouped-character.component.js +51 -1
- package/esm/components/number/number.component.js +51 -1
- package/esm/components/pill/pill.style.config.js +2 -2
- package/esm/components/portal/portal.js +1 -1
- package/esm/components/preview/preview.component.js +1 -1
- package/esm/components/radio-button/radio-button.component.js +51 -1
- package/esm/components/select/__internal__/select-list/select-list.component.js +1 -1
- package/esm/components/select/__internal__/select-textbox/select-textbox.component.js +51 -1
- package/esm/components/select/filterable-select/filterable-select.component.js +51 -1
- package/esm/components/select/multi-select/multi-select.component.js +52 -2
- package/esm/components/select/option/option.component.js +51 -1
- package/esm/components/select/simple-select/simple-select.component.js +51 -1
- package/esm/components/switch/switch.component.js +51 -1
- package/esm/components/text-editor/text-editor.component.js +1 -1
- package/esm/components/textarea/textarea.component.js +51 -1
- package/esm/components/textbox/textbox.component.js +51 -1
- package/esm/components/tile/__internal__/compute-content-padding.js +2 -2
- package/esm/components/tile-select/tile-select-group/tile-select-group.component.js +1 -1
- package/esm/hooks/__internal__/useClickAwayListener/useClickAwayListener.js +2 -2
- package/esm/hooks/__internal__/useFocusPortalContent/useFocusPortalContent.js +2 -2
- package/esm/hooks/__internal__/useFormSpacing/add-form-spacing/index.js +2 -2
- package/esm/hooks/__internal__/useFormSpacing/index.js +2 -2
- package/esm/hooks/__internal__/useMenuKeyboardNavigation/useMenuKeyboardNavigation.js +2 -2
- package/esm/hooks/__internal__/useResizeObserver/useResizeObserver.js +1 -1
- package/esm/hooks/__internal__/useUniqueId/index.js +2 -2
- package/esm/style/design-tokens/generate-css-variables.util.js +2 -2
- package/esm/style/themes/base/base-theme.config.js +2 -2
- package/esm/style/themes/none/none-theme.config.js +2 -2
- package/esm/style/utils/add-focus-styling.js +2 -2
- package/esm/style/utils/add-hex-symbols.js +1 -1
- package/esm/style/utils/at-opacity.js +2 -2
- package/esm/style/utils/color.js +2 -2
- package/esm/style/utils/element-sizing.js +2 -2
- package/esm/style/utils/get-color-value.js +2 -2
- package/esm/style/utils/mix.js +2 -2
- package/esm/style/utils/shade.js +1 -1
- package/esm/style/utils/tint.js +1 -1
- package/lib/__internal__/checkable-input/checkable-input.component.js +51 -1
- package/lib/__internal__/checkable-input/hidden-checkable-input.component.js +51 -1
- package/lib/__internal__/input/input.component.js +51 -1
- package/lib/__internal__/popover/popover.component.js +1 -1
- package/lib/__internal__/radio-button-mapper/radio-button-mapper.component.js +1 -1
- package/lib/components/action-popover/action-popover-item/action-popover-item.component.js +1 -1
- package/lib/components/action-popover/action-popover-menu/action-popover-menu.component.d.ts +10 -2
- package/lib/components/action-popover/action-popover-menu/action-popover-menu.component.js +2 -2
- package/lib/components/checkbox/checkbox.component.js +51 -1
- package/lib/components/date/date.component.js +51 -1
- package/lib/components/decimal/decimal.component.js +51 -1
- package/lib/components/duelling-picklist/duelling-picklist.component.js +1 -1
- package/lib/components/grouped-character/grouped-character.component.js +51 -1
- package/lib/components/number/number.component.js +51 -1
- package/lib/components/portal/portal.js +1 -1
- package/lib/components/preview/preview.component.js +1 -1
- package/lib/components/radio-button/radio-button.component.js +51 -1
- package/lib/components/select/__internal__/select-list/select-list.component.js +1 -1
- package/lib/components/select/__internal__/select-textbox/select-textbox.component.js +51 -1
- package/lib/components/select/filterable-select/filterable-select.component.js +51 -1
- package/lib/components/select/multi-select/multi-select.component.js +52 -2
- package/lib/components/select/option/option.component.js +51 -1
- package/lib/components/select/simple-select/simple-select.component.js +51 -1
- package/lib/components/switch/switch.component.js +51 -1
- package/lib/components/text-editor/text-editor.component.js +1 -1
- package/lib/components/textarea/textarea.component.js +51 -1
- package/lib/components/textbox/textbox.component.js +51 -1
- package/lib/components/tile-select/tile-select-group/tile-select-group.component.js +1 -1
- package/lib/hooks/__internal__/useResizeObserver/useResizeObserver.js +1 -1
- package/package.json +20 -16
|
@@ -84,6 +84,6 @@ export const Portal = ({
|
|
|
84
84
|
return /*#__PURE__*/React.createElement(StyledPortalEntrance, {
|
|
85
85
|
"data-role": "data-portal-entrance",
|
|
86
86
|
"data-portal-entrance": uniqueId
|
|
87
|
-
}, /*#__PURE__*/ReactDOM.createPortal(
|
|
87
|
+
}, /*#__PURE__*/ReactDOM.createPortal(/*#__PURE__*/React.createElement(CarbonScopedTokensProvider, null, portalContent), getPortalContainer()));
|
|
88
88
|
};
|
|
89
89
|
export default Portal;
|
|
@@ -23,7 +23,7 @@ export const Preview = ({
|
|
|
23
23
|
if (hasPlaceholder) {
|
|
24
24
|
const placeholders = [];
|
|
25
25
|
for (let i = 0; i < lines; i++) {
|
|
26
|
-
placeholders.push(
|
|
26
|
+
placeholders.push(/*#__PURE__*/React.createElement(StyledPreviewPlaceholder, _extends({
|
|
27
27
|
"data-component": "preview",
|
|
28
28
|
"data-role": "preview-placeholder",
|
|
29
29
|
key: i,
|
|
@@ -168,7 +168,57 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
168
168
|
"aria-valuetext": PropTypes.string,
|
|
169
169
|
"ariaDescribedBy": PropTypes.string,
|
|
170
170
|
"ariaLabelledBy": PropTypes.string,
|
|
171
|
-
"autoCapitalize": PropTypes.
|
|
171
|
+
"autoCapitalize": PropTypes.oneOfType([PropTypes.oneOf(["characters", "none", "off", "on", "sentences", "words"]), PropTypes.shape({
|
|
172
|
+
"__@iterator": PropTypes.func.isRequired,
|
|
173
|
+
"anchor": PropTypes.func.isRequired,
|
|
174
|
+
"at": PropTypes.func.isRequired,
|
|
175
|
+
"big": PropTypes.func.isRequired,
|
|
176
|
+
"blink": PropTypes.func.isRequired,
|
|
177
|
+
"bold": PropTypes.func.isRequired,
|
|
178
|
+
"charAt": PropTypes.func.isRequired,
|
|
179
|
+
"charCodeAt": PropTypes.func.isRequired,
|
|
180
|
+
"codePointAt": PropTypes.func.isRequired,
|
|
181
|
+
"concat": PropTypes.func.isRequired,
|
|
182
|
+
"endsWith": PropTypes.func.isRequired,
|
|
183
|
+
"fixed": PropTypes.func.isRequired,
|
|
184
|
+
"fontcolor": PropTypes.func.isRequired,
|
|
185
|
+
"fontsize": PropTypes.func.isRequired,
|
|
186
|
+
"includes": PropTypes.func.isRequired,
|
|
187
|
+
"indexOf": PropTypes.func.isRequired,
|
|
188
|
+
"italics": PropTypes.func.isRequired,
|
|
189
|
+
"lastIndexOf": PropTypes.func.isRequired,
|
|
190
|
+
"length": PropTypes.number.isRequired,
|
|
191
|
+
"link": PropTypes.func.isRequired,
|
|
192
|
+
"localeCompare": PropTypes.func.isRequired,
|
|
193
|
+
"match": PropTypes.func.isRequired,
|
|
194
|
+
"matchAll": PropTypes.func.isRequired,
|
|
195
|
+
"normalize": PropTypes.func.isRequired,
|
|
196
|
+
"padEnd": PropTypes.func.isRequired,
|
|
197
|
+
"padStart": PropTypes.func.isRequired,
|
|
198
|
+
"repeat": PropTypes.func.isRequired,
|
|
199
|
+
"replace": PropTypes.func.isRequired,
|
|
200
|
+
"search": PropTypes.func.isRequired,
|
|
201
|
+
"slice": PropTypes.func.isRequired,
|
|
202
|
+
"small": PropTypes.func.isRequired,
|
|
203
|
+
"split": PropTypes.func.isRequired,
|
|
204
|
+
"startsWith": PropTypes.func.isRequired,
|
|
205
|
+
"strike": PropTypes.func.isRequired,
|
|
206
|
+
"sub": PropTypes.func.isRequired,
|
|
207
|
+
"substr": PropTypes.func.isRequired,
|
|
208
|
+
"substring": PropTypes.func.isRequired,
|
|
209
|
+
"sup": PropTypes.func.isRequired,
|
|
210
|
+
"toLocaleLowerCase": PropTypes.func.isRequired,
|
|
211
|
+
"toLocaleUpperCase": PropTypes.func.isRequired,
|
|
212
|
+
"toLowerCase": PropTypes.func.isRequired,
|
|
213
|
+
"toString": PropTypes.func.isRequired,
|
|
214
|
+
"toUpperCase": PropTypes.func.isRequired,
|
|
215
|
+
"trim": PropTypes.func.isRequired,
|
|
216
|
+
"trimEnd": PropTypes.func.isRequired,
|
|
217
|
+
"trimLeft": PropTypes.func.isRequired,
|
|
218
|
+
"trimRight": PropTypes.func.isRequired,
|
|
219
|
+
"trimStart": PropTypes.func.isRequired,
|
|
220
|
+
"valueOf": PropTypes.func.isRequired
|
|
221
|
+
})]),
|
|
172
222
|
"autoComplete": PropTypes.string,
|
|
173
223
|
"autoCorrect": PropTypes.string,
|
|
174
224
|
"autoFocus": PropTypes.bool,
|
|
@@ -204,7 +204,7 @@ const SelectList = /*#__PURE__*/React.forwardRef(({
|
|
|
204
204
|
}
|
|
205
205
|
let nextIndex = getNextIndexByKey(key, indexOfHighlighted, lastIndex, isLoading);
|
|
206
206
|
const nextElement = childrenList[nextIndex];
|
|
207
|
-
if (
|
|
207
|
+
if (/*#__PURE__*/React.isValidElement(nextElement) && nextElement.type !== Option && nextElement.type !== OptionRow || nextElement.props.disabled) {
|
|
208
208
|
nextIndex = getNextHighlightableItemIndex(key, nextIndex);
|
|
209
209
|
}
|
|
210
210
|
return nextIndex;
|
|
@@ -157,7 +157,57 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
157
157
|
"ariaLabel": PropTypes.string,
|
|
158
158
|
"ariaLabelledby": PropTypes.string,
|
|
159
159
|
"as": PropTypes.elementType,
|
|
160
|
-
"autoCapitalize": PropTypes.
|
|
160
|
+
"autoCapitalize": PropTypes.oneOfType([PropTypes.oneOf(["characters", "none", "off", "on", "sentences", "words"]), PropTypes.shape({
|
|
161
|
+
"__@iterator": PropTypes.func.isRequired,
|
|
162
|
+
"anchor": PropTypes.func.isRequired,
|
|
163
|
+
"at": PropTypes.func.isRequired,
|
|
164
|
+
"big": PropTypes.func.isRequired,
|
|
165
|
+
"blink": PropTypes.func.isRequired,
|
|
166
|
+
"bold": PropTypes.func.isRequired,
|
|
167
|
+
"charAt": PropTypes.func.isRequired,
|
|
168
|
+
"charCodeAt": PropTypes.func.isRequired,
|
|
169
|
+
"codePointAt": PropTypes.func.isRequired,
|
|
170
|
+
"concat": PropTypes.func.isRequired,
|
|
171
|
+
"endsWith": PropTypes.func.isRequired,
|
|
172
|
+
"fixed": PropTypes.func.isRequired,
|
|
173
|
+
"fontcolor": PropTypes.func.isRequired,
|
|
174
|
+
"fontsize": PropTypes.func.isRequired,
|
|
175
|
+
"includes": PropTypes.func.isRequired,
|
|
176
|
+
"indexOf": PropTypes.func.isRequired,
|
|
177
|
+
"italics": PropTypes.func.isRequired,
|
|
178
|
+
"lastIndexOf": PropTypes.func.isRequired,
|
|
179
|
+
"length": PropTypes.number.isRequired,
|
|
180
|
+
"link": PropTypes.func.isRequired,
|
|
181
|
+
"localeCompare": PropTypes.func.isRequired,
|
|
182
|
+
"match": PropTypes.func.isRequired,
|
|
183
|
+
"matchAll": PropTypes.func.isRequired,
|
|
184
|
+
"normalize": PropTypes.func.isRequired,
|
|
185
|
+
"padEnd": PropTypes.func.isRequired,
|
|
186
|
+
"padStart": PropTypes.func.isRequired,
|
|
187
|
+
"repeat": PropTypes.func.isRequired,
|
|
188
|
+
"replace": PropTypes.func.isRequired,
|
|
189
|
+
"search": PropTypes.func.isRequired,
|
|
190
|
+
"slice": PropTypes.func.isRequired,
|
|
191
|
+
"small": PropTypes.func.isRequired,
|
|
192
|
+
"split": PropTypes.func.isRequired,
|
|
193
|
+
"startsWith": PropTypes.func.isRequired,
|
|
194
|
+
"strike": PropTypes.func.isRequired,
|
|
195
|
+
"sub": PropTypes.func.isRequired,
|
|
196
|
+
"substr": PropTypes.func.isRequired,
|
|
197
|
+
"substring": PropTypes.func.isRequired,
|
|
198
|
+
"sup": PropTypes.func.isRequired,
|
|
199
|
+
"toLocaleLowerCase": PropTypes.func.isRequired,
|
|
200
|
+
"toLocaleUpperCase": PropTypes.func.isRequired,
|
|
201
|
+
"toLowerCase": PropTypes.func.isRequired,
|
|
202
|
+
"toString": PropTypes.func.isRequired,
|
|
203
|
+
"toUpperCase": PropTypes.func.isRequired,
|
|
204
|
+
"trim": PropTypes.func.isRequired,
|
|
205
|
+
"trimEnd": PropTypes.func.isRequired,
|
|
206
|
+
"trimLeft": PropTypes.func.isRequired,
|
|
207
|
+
"trimRight": PropTypes.func.isRequired,
|
|
208
|
+
"trimStart": PropTypes.func.isRequired,
|
|
209
|
+
"valueOf": PropTypes.func.isRequired
|
|
210
|
+
})]),
|
|
161
211
|
"autoComplete": PropTypes.string,
|
|
162
212
|
"autoCorrect": PropTypes.string,
|
|
163
213
|
"autoFocus": PropTypes.bool,
|
|
@@ -517,7 +517,57 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
517
517
|
"ariaLabel": PropTypes.string,
|
|
518
518
|
"ariaLabelledby": PropTypes.string,
|
|
519
519
|
"as": PropTypes.elementType,
|
|
520
|
-
"autoCapitalize": PropTypes.
|
|
520
|
+
"autoCapitalize": PropTypes.oneOfType([PropTypes.oneOf(["characters", "none", "off", "on", "sentences", "words"]), PropTypes.shape({
|
|
521
|
+
"__@iterator": PropTypes.func.isRequired,
|
|
522
|
+
"anchor": PropTypes.func.isRequired,
|
|
523
|
+
"at": PropTypes.func.isRequired,
|
|
524
|
+
"big": PropTypes.func.isRequired,
|
|
525
|
+
"blink": PropTypes.func.isRequired,
|
|
526
|
+
"bold": PropTypes.func.isRequired,
|
|
527
|
+
"charAt": PropTypes.func.isRequired,
|
|
528
|
+
"charCodeAt": PropTypes.func.isRequired,
|
|
529
|
+
"codePointAt": PropTypes.func.isRequired,
|
|
530
|
+
"concat": PropTypes.func.isRequired,
|
|
531
|
+
"endsWith": PropTypes.func.isRequired,
|
|
532
|
+
"fixed": PropTypes.func.isRequired,
|
|
533
|
+
"fontcolor": PropTypes.func.isRequired,
|
|
534
|
+
"fontsize": PropTypes.func.isRequired,
|
|
535
|
+
"includes": PropTypes.func.isRequired,
|
|
536
|
+
"indexOf": PropTypes.func.isRequired,
|
|
537
|
+
"italics": PropTypes.func.isRequired,
|
|
538
|
+
"lastIndexOf": PropTypes.func.isRequired,
|
|
539
|
+
"length": PropTypes.number.isRequired,
|
|
540
|
+
"link": PropTypes.func.isRequired,
|
|
541
|
+
"localeCompare": PropTypes.func.isRequired,
|
|
542
|
+
"match": PropTypes.func.isRequired,
|
|
543
|
+
"matchAll": PropTypes.func.isRequired,
|
|
544
|
+
"normalize": PropTypes.func.isRequired,
|
|
545
|
+
"padEnd": PropTypes.func.isRequired,
|
|
546
|
+
"padStart": PropTypes.func.isRequired,
|
|
547
|
+
"repeat": PropTypes.func.isRequired,
|
|
548
|
+
"replace": PropTypes.func.isRequired,
|
|
549
|
+
"search": PropTypes.func.isRequired,
|
|
550
|
+
"slice": PropTypes.func.isRequired,
|
|
551
|
+
"small": PropTypes.func.isRequired,
|
|
552
|
+
"split": PropTypes.func.isRequired,
|
|
553
|
+
"startsWith": PropTypes.func.isRequired,
|
|
554
|
+
"strike": PropTypes.func.isRequired,
|
|
555
|
+
"sub": PropTypes.func.isRequired,
|
|
556
|
+
"substr": PropTypes.func.isRequired,
|
|
557
|
+
"substring": PropTypes.func.isRequired,
|
|
558
|
+
"sup": PropTypes.func.isRequired,
|
|
559
|
+
"toLocaleLowerCase": PropTypes.func.isRequired,
|
|
560
|
+
"toLocaleUpperCase": PropTypes.func.isRequired,
|
|
561
|
+
"toLowerCase": PropTypes.func.isRequired,
|
|
562
|
+
"toString": PropTypes.func.isRequired,
|
|
563
|
+
"toUpperCase": PropTypes.func.isRequired,
|
|
564
|
+
"trim": PropTypes.func.isRequired,
|
|
565
|
+
"trimEnd": PropTypes.func.isRequired,
|
|
566
|
+
"trimLeft": PropTypes.func.isRequired,
|
|
567
|
+
"trimRight": PropTypes.func.isRequired,
|
|
568
|
+
"trimStart": PropTypes.func.isRequired,
|
|
569
|
+
"valueOf": PropTypes.func.isRequired
|
|
570
|
+
})]),
|
|
521
571
|
"autoComplete": PropTypes.string,
|
|
522
572
|
"autoCorrect": PropTypes.string,
|
|
523
573
|
"autoFocus": PropTypes.bool,
|
|
@@ -215,7 +215,7 @@ const MultiSelect = /*#__PURE__*/React.forwardRef(({
|
|
|
215
215
|
}
|
|
216
216
|
|
|
217
217
|
/* istanbul ignore else */
|
|
218
|
-
if (
|
|
218
|
+
if (/*#__PURE__*/React.isValidElement(matchingOption)) {
|
|
219
219
|
matchingOptionValue = matchingOption?.props.value?.value !== undefined ? matchingOption?.props.value?.value : matchingOption?.props.value;
|
|
220
220
|
pillProps = {
|
|
221
221
|
title: matchingOption.props.text,
|
|
@@ -544,7 +544,57 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
544
544
|
"ariaLabel": PropTypes.string,
|
|
545
545
|
"ariaLabelledby": PropTypes.string,
|
|
546
546
|
"as": PropTypes.elementType,
|
|
547
|
-
"autoCapitalize": PropTypes.
|
|
547
|
+
"autoCapitalize": PropTypes.oneOfType([PropTypes.oneOf(["characters", "none", "off", "on", "sentences", "words"]), PropTypes.shape({
|
|
548
|
+
"__@iterator": PropTypes.func.isRequired,
|
|
549
|
+
"anchor": PropTypes.func.isRequired,
|
|
550
|
+
"at": PropTypes.func.isRequired,
|
|
551
|
+
"big": PropTypes.func.isRequired,
|
|
552
|
+
"blink": PropTypes.func.isRequired,
|
|
553
|
+
"bold": PropTypes.func.isRequired,
|
|
554
|
+
"charAt": PropTypes.func.isRequired,
|
|
555
|
+
"charCodeAt": PropTypes.func.isRequired,
|
|
556
|
+
"codePointAt": PropTypes.func.isRequired,
|
|
557
|
+
"concat": PropTypes.func.isRequired,
|
|
558
|
+
"endsWith": PropTypes.func.isRequired,
|
|
559
|
+
"fixed": PropTypes.func.isRequired,
|
|
560
|
+
"fontcolor": PropTypes.func.isRequired,
|
|
561
|
+
"fontsize": PropTypes.func.isRequired,
|
|
562
|
+
"includes": PropTypes.func.isRequired,
|
|
563
|
+
"indexOf": PropTypes.func.isRequired,
|
|
564
|
+
"italics": PropTypes.func.isRequired,
|
|
565
|
+
"lastIndexOf": PropTypes.func.isRequired,
|
|
566
|
+
"length": PropTypes.number.isRequired,
|
|
567
|
+
"link": PropTypes.func.isRequired,
|
|
568
|
+
"localeCompare": PropTypes.func.isRequired,
|
|
569
|
+
"match": PropTypes.func.isRequired,
|
|
570
|
+
"matchAll": PropTypes.func.isRequired,
|
|
571
|
+
"normalize": PropTypes.func.isRequired,
|
|
572
|
+
"padEnd": PropTypes.func.isRequired,
|
|
573
|
+
"padStart": PropTypes.func.isRequired,
|
|
574
|
+
"repeat": PropTypes.func.isRequired,
|
|
575
|
+
"replace": PropTypes.func.isRequired,
|
|
576
|
+
"search": PropTypes.func.isRequired,
|
|
577
|
+
"slice": PropTypes.func.isRequired,
|
|
578
|
+
"small": PropTypes.func.isRequired,
|
|
579
|
+
"split": PropTypes.func.isRequired,
|
|
580
|
+
"startsWith": PropTypes.func.isRequired,
|
|
581
|
+
"strike": PropTypes.func.isRequired,
|
|
582
|
+
"sub": PropTypes.func.isRequired,
|
|
583
|
+
"substr": PropTypes.func.isRequired,
|
|
584
|
+
"substring": PropTypes.func.isRequired,
|
|
585
|
+
"sup": PropTypes.func.isRequired,
|
|
586
|
+
"toLocaleLowerCase": PropTypes.func.isRequired,
|
|
587
|
+
"toLocaleUpperCase": PropTypes.func.isRequired,
|
|
588
|
+
"toLowerCase": PropTypes.func.isRequired,
|
|
589
|
+
"toString": PropTypes.func.isRequired,
|
|
590
|
+
"toUpperCase": PropTypes.func.isRequired,
|
|
591
|
+
"trim": PropTypes.func.isRequired,
|
|
592
|
+
"trimEnd": PropTypes.func.isRequired,
|
|
593
|
+
"trimLeft": PropTypes.func.isRequired,
|
|
594
|
+
"trimRight": PropTypes.func.isRequired,
|
|
595
|
+
"trimStart": PropTypes.func.isRequired,
|
|
596
|
+
"valueOf": PropTypes.func.isRequired
|
|
597
|
+
})]),
|
|
548
598
|
"autoComplete": PropTypes.string,
|
|
549
599
|
"autoCorrect": PropTypes.string,
|
|
550
600
|
"autoFocus": PropTypes.bool,
|
|
@@ -109,7 +109,57 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
109
109
|
"aria-valuemin": PropTypes.number,
|
|
110
110
|
"aria-valuenow": PropTypes.number,
|
|
111
111
|
"aria-valuetext": PropTypes.string,
|
|
112
|
-
"autoCapitalize": PropTypes.
|
|
112
|
+
"autoCapitalize": PropTypes.oneOfType([PropTypes.oneOf(["characters", "none", "off", "on", "sentences", "words"]), PropTypes.shape({
|
|
113
|
+
"__@iterator": PropTypes.func.isRequired,
|
|
114
|
+
"anchor": PropTypes.func.isRequired,
|
|
115
|
+
"at": PropTypes.func.isRequired,
|
|
116
|
+
"big": PropTypes.func.isRequired,
|
|
117
|
+
"blink": PropTypes.func.isRequired,
|
|
118
|
+
"bold": PropTypes.func.isRequired,
|
|
119
|
+
"charAt": PropTypes.func.isRequired,
|
|
120
|
+
"charCodeAt": PropTypes.func.isRequired,
|
|
121
|
+
"codePointAt": PropTypes.func.isRequired,
|
|
122
|
+
"concat": PropTypes.func.isRequired,
|
|
123
|
+
"endsWith": PropTypes.func.isRequired,
|
|
124
|
+
"fixed": PropTypes.func.isRequired,
|
|
125
|
+
"fontcolor": PropTypes.func.isRequired,
|
|
126
|
+
"fontsize": PropTypes.func.isRequired,
|
|
127
|
+
"includes": PropTypes.func.isRequired,
|
|
128
|
+
"indexOf": PropTypes.func.isRequired,
|
|
129
|
+
"italics": PropTypes.func.isRequired,
|
|
130
|
+
"lastIndexOf": PropTypes.func.isRequired,
|
|
131
|
+
"length": PropTypes.number.isRequired,
|
|
132
|
+
"link": PropTypes.func.isRequired,
|
|
133
|
+
"localeCompare": PropTypes.func.isRequired,
|
|
134
|
+
"match": PropTypes.func.isRequired,
|
|
135
|
+
"matchAll": PropTypes.func.isRequired,
|
|
136
|
+
"normalize": PropTypes.func.isRequired,
|
|
137
|
+
"padEnd": PropTypes.func.isRequired,
|
|
138
|
+
"padStart": PropTypes.func.isRequired,
|
|
139
|
+
"repeat": PropTypes.func.isRequired,
|
|
140
|
+
"replace": PropTypes.func.isRequired,
|
|
141
|
+
"search": PropTypes.func.isRequired,
|
|
142
|
+
"slice": PropTypes.func.isRequired,
|
|
143
|
+
"small": PropTypes.func.isRequired,
|
|
144
|
+
"split": PropTypes.func.isRequired,
|
|
145
|
+
"startsWith": PropTypes.func.isRequired,
|
|
146
|
+
"strike": PropTypes.func.isRequired,
|
|
147
|
+
"sub": PropTypes.func.isRequired,
|
|
148
|
+
"substr": PropTypes.func.isRequired,
|
|
149
|
+
"substring": PropTypes.func.isRequired,
|
|
150
|
+
"sup": PropTypes.func.isRequired,
|
|
151
|
+
"toLocaleLowerCase": PropTypes.func.isRequired,
|
|
152
|
+
"toLocaleUpperCase": PropTypes.func.isRequired,
|
|
153
|
+
"toLowerCase": PropTypes.func.isRequired,
|
|
154
|
+
"toString": PropTypes.func.isRequired,
|
|
155
|
+
"toUpperCase": PropTypes.func.isRequired,
|
|
156
|
+
"trim": PropTypes.func.isRequired,
|
|
157
|
+
"trimEnd": PropTypes.func.isRequired,
|
|
158
|
+
"trimLeft": PropTypes.func.isRequired,
|
|
159
|
+
"trimRight": PropTypes.func.isRequired,
|
|
160
|
+
"trimStart": PropTypes.func.isRequired,
|
|
161
|
+
"valueOf": PropTypes.func.isRequired
|
|
162
|
+
})]),
|
|
113
163
|
"autoComplete": PropTypes.string,
|
|
114
164
|
"autoCorrect": PropTypes.string,
|
|
115
165
|
"autoFocus": PropTypes.bool,
|
|
@@ -407,7 +407,57 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
407
407
|
"ariaLabel": PropTypes.string,
|
|
408
408
|
"ariaLabelledby": PropTypes.string,
|
|
409
409
|
"as": PropTypes.elementType,
|
|
410
|
-
"autoCapitalize": PropTypes.
|
|
410
|
+
"autoCapitalize": PropTypes.oneOfType([PropTypes.oneOf(["characters", "none", "off", "on", "sentences", "words"]), PropTypes.shape({
|
|
411
|
+
"__@iterator": PropTypes.func.isRequired,
|
|
412
|
+
"anchor": PropTypes.func.isRequired,
|
|
413
|
+
"at": PropTypes.func.isRequired,
|
|
414
|
+
"big": PropTypes.func.isRequired,
|
|
415
|
+
"blink": PropTypes.func.isRequired,
|
|
416
|
+
"bold": PropTypes.func.isRequired,
|
|
417
|
+
"charAt": PropTypes.func.isRequired,
|
|
418
|
+
"charCodeAt": PropTypes.func.isRequired,
|
|
419
|
+
"codePointAt": PropTypes.func.isRequired,
|
|
420
|
+
"concat": PropTypes.func.isRequired,
|
|
421
|
+
"endsWith": PropTypes.func.isRequired,
|
|
422
|
+
"fixed": PropTypes.func.isRequired,
|
|
423
|
+
"fontcolor": PropTypes.func.isRequired,
|
|
424
|
+
"fontsize": PropTypes.func.isRequired,
|
|
425
|
+
"includes": PropTypes.func.isRequired,
|
|
426
|
+
"indexOf": PropTypes.func.isRequired,
|
|
427
|
+
"italics": PropTypes.func.isRequired,
|
|
428
|
+
"lastIndexOf": PropTypes.func.isRequired,
|
|
429
|
+
"length": PropTypes.number.isRequired,
|
|
430
|
+
"link": PropTypes.func.isRequired,
|
|
431
|
+
"localeCompare": PropTypes.func.isRequired,
|
|
432
|
+
"match": PropTypes.func.isRequired,
|
|
433
|
+
"matchAll": PropTypes.func.isRequired,
|
|
434
|
+
"normalize": PropTypes.func.isRequired,
|
|
435
|
+
"padEnd": PropTypes.func.isRequired,
|
|
436
|
+
"padStart": PropTypes.func.isRequired,
|
|
437
|
+
"repeat": PropTypes.func.isRequired,
|
|
438
|
+
"replace": PropTypes.func.isRequired,
|
|
439
|
+
"search": PropTypes.func.isRequired,
|
|
440
|
+
"slice": PropTypes.func.isRequired,
|
|
441
|
+
"small": PropTypes.func.isRequired,
|
|
442
|
+
"split": PropTypes.func.isRequired,
|
|
443
|
+
"startsWith": PropTypes.func.isRequired,
|
|
444
|
+
"strike": PropTypes.func.isRequired,
|
|
445
|
+
"sub": PropTypes.func.isRequired,
|
|
446
|
+
"substr": PropTypes.func.isRequired,
|
|
447
|
+
"substring": PropTypes.func.isRequired,
|
|
448
|
+
"sup": PropTypes.func.isRequired,
|
|
449
|
+
"toLocaleLowerCase": PropTypes.func.isRequired,
|
|
450
|
+
"toLocaleUpperCase": PropTypes.func.isRequired,
|
|
451
|
+
"toLowerCase": PropTypes.func.isRequired,
|
|
452
|
+
"toString": PropTypes.func.isRequired,
|
|
453
|
+
"toUpperCase": PropTypes.func.isRequired,
|
|
454
|
+
"trim": PropTypes.func.isRequired,
|
|
455
|
+
"trimEnd": PropTypes.func.isRequired,
|
|
456
|
+
"trimLeft": PropTypes.func.isRequired,
|
|
457
|
+
"trimRight": PropTypes.func.isRequired,
|
|
458
|
+
"trimStart": PropTypes.func.isRequired,
|
|
459
|
+
"valueOf": PropTypes.func.isRequired
|
|
460
|
+
})]),
|
|
411
461
|
"autoComplete": PropTypes.string,
|
|
412
462
|
"autoCorrect": PropTypes.string,
|
|
413
463
|
"autoFocus": PropTypes.bool,
|
|
@@ -228,7 +228,57 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
228
228
|
"aria-valuetext": PropTypes.string,
|
|
229
229
|
"ariaDescribedBy": PropTypes.string,
|
|
230
230
|
"ariaLabelledBy": PropTypes.string,
|
|
231
|
-
"autoCapitalize": PropTypes.
|
|
231
|
+
"autoCapitalize": PropTypes.oneOfType([PropTypes.oneOf(["characters", "none", "off", "on", "sentences", "words"]), PropTypes.shape({
|
|
232
|
+
"__@iterator": PropTypes.func.isRequired,
|
|
233
|
+
"anchor": PropTypes.func.isRequired,
|
|
234
|
+
"at": PropTypes.func.isRequired,
|
|
235
|
+
"big": PropTypes.func.isRequired,
|
|
236
|
+
"blink": PropTypes.func.isRequired,
|
|
237
|
+
"bold": PropTypes.func.isRequired,
|
|
238
|
+
"charAt": PropTypes.func.isRequired,
|
|
239
|
+
"charCodeAt": PropTypes.func.isRequired,
|
|
240
|
+
"codePointAt": PropTypes.func.isRequired,
|
|
241
|
+
"concat": PropTypes.func.isRequired,
|
|
242
|
+
"endsWith": PropTypes.func.isRequired,
|
|
243
|
+
"fixed": PropTypes.func.isRequired,
|
|
244
|
+
"fontcolor": PropTypes.func.isRequired,
|
|
245
|
+
"fontsize": PropTypes.func.isRequired,
|
|
246
|
+
"includes": PropTypes.func.isRequired,
|
|
247
|
+
"indexOf": PropTypes.func.isRequired,
|
|
248
|
+
"italics": PropTypes.func.isRequired,
|
|
249
|
+
"lastIndexOf": PropTypes.func.isRequired,
|
|
250
|
+
"length": PropTypes.number.isRequired,
|
|
251
|
+
"link": PropTypes.func.isRequired,
|
|
252
|
+
"localeCompare": PropTypes.func.isRequired,
|
|
253
|
+
"match": PropTypes.func.isRequired,
|
|
254
|
+
"matchAll": PropTypes.func.isRequired,
|
|
255
|
+
"normalize": PropTypes.func.isRequired,
|
|
256
|
+
"padEnd": PropTypes.func.isRequired,
|
|
257
|
+
"padStart": PropTypes.func.isRequired,
|
|
258
|
+
"repeat": PropTypes.func.isRequired,
|
|
259
|
+
"replace": PropTypes.func.isRequired,
|
|
260
|
+
"search": PropTypes.func.isRequired,
|
|
261
|
+
"slice": PropTypes.func.isRequired,
|
|
262
|
+
"small": PropTypes.func.isRequired,
|
|
263
|
+
"split": PropTypes.func.isRequired,
|
|
264
|
+
"startsWith": PropTypes.func.isRequired,
|
|
265
|
+
"strike": PropTypes.func.isRequired,
|
|
266
|
+
"sub": PropTypes.func.isRequired,
|
|
267
|
+
"substr": PropTypes.func.isRequired,
|
|
268
|
+
"substring": PropTypes.func.isRequired,
|
|
269
|
+
"sup": PropTypes.func.isRequired,
|
|
270
|
+
"toLocaleLowerCase": PropTypes.func.isRequired,
|
|
271
|
+
"toLocaleUpperCase": PropTypes.func.isRequired,
|
|
272
|
+
"toLowerCase": PropTypes.func.isRequired,
|
|
273
|
+
"toString": PropTypes.func.isRequired,
|
|
274
|
+
"toUpperCase": PropTypes.func.isRequired,
|
|
275
|
+
"trim": PropTypes.func.isRequired,
|
|
276
|
+
"trimEnd": PropTypes.func.isRequired,
|
|
277
|
+
"trimLeft": PropTypes.func.isRequired,
|
|
278
|
+
"trimRight": PropTypes.func.isRequired,
|
|
279
|
+
"trimStart": PropTypes.func.isRequired,
|
|
280
|
+
"valueOf": PropTypes.func.isRequired
|
|
281
|
+
})]),
|
|
232
282
|
"autoComplete": PropTypes.string,
|
|
233
283
|
"autoCorrect": PropTypes.string,
|
|
234
284
|
"autoFocus": PropTypes.bool,
|
|
@@ -302,7 +302,7 @@ const TextEditor = /*#__PURE__*/React.forwardRef(({
|
|
|
302
302
|
keyBindingFn: keyBindingFn,
|
|
303
303
|
tabIndex: 0
|
|
304
304
|
}), React.Children.map(previews, preview => {
|
|
305
|
-
if (
|
|
305
|
+
if (/*#__PURE__*/React.isValidElement(preview)) {
|
|
306
306
|
const {
|
|
307
307
|
onClose
|
|
308
308
|
} = preview?.props;
|
|
@@ -314,7 +314,57 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
314
314
|
"aria-valuetext": PropTypes.string,
|
|
315
315
|
"ariaDescribedBy": PropTypes.string,
|
|
316
316
|
"as": PropTypes.elementType,
|
|
317
|
-
"autoCapitalize": PropTypes.
|
|
317
|
+
"autoCapitalize": PropTypes.oneOfType([PropTypes.oneOf(["characters", "none", "off", "on", "sentences", "words"]), PropTypes.shape({
|
|
318
|
+
"__@iterator": PropTypes.func.isRequired,
|
|
319
|
+
"anchor": PropTypes.func.isRequired,
|
|
320
|
+
"at": PropTypes.func.isRequired,
|
|
321
|
+
"big": PropTypes.func.isRequired,
|
|
322
|
+
"blink": PropTypes.func.isRequired,
|
|
323
|
+
"bold": PropTypes.func.isRequired,
|
|
324
|
+
"charAt": PropTypes.func.isRequired,
|
|
325
|
+
"charCodeAt": PropTypes.func.isRequired,
|
|
326
|
+
"codePointAt": PropTypes.func.isRequired,
|
|
327
|
+
"concat": PropTypes.func.isRequired,
|
|
328
|
+
"endsWith": PropTypes.func.isRequired,
|
|
329
|
+
"fixed": PropTypes.func.isRequired,
|
|
330
|
+
"fontcolor": PropTypes.func.isRequired,
|
|
331
|
+
"fontsize": PropTypes.func.isRequired,
|
|
332
|
+
"includes": PropTypes.func.isRequired,
|
|
333
|
+
"indexOf": PropTypes.func.isRequired,
|
|
334
|
+
"italics": PropTypes.func.isRequired,
|
|
335
|
+
"lastIndexOf": PropTypes.func.isRequired,
|
|
336
|
+
"length": PropTypes.number.isRequired,
|
|
337
|
+
"link": PropTypes.func.isRequired,
|
|
338
|
+
"localeCompare": PropTypes.func.isRequired,
|
|
339
|
+
"match": PropTypes.func.isRequired,
|
|
340
|
+
"matchAll": PropTypes.func.isRequired,
|
|
341
|
+
"normalize": PropTypes.func.isRequired,
|
|
342
|
+
"padEnd": PropTypes.func.isRequired,
|
|
343
|
+
"padStart": PropTypes.func.isRequired,
|
|
344
|
+
"repeat": PropTypes.func.isRequired,
|
|
345
|
+
"replace": PropTypes.func.isRequired,
|
|
346
|
+
"search": PropTypes.func.isRequired,
|
|
347
|
+
"slice": PropTypes.func.isRequired,
|
|
348
|
+
"small": PropTypes.func.isRequired,
|
|
349
|
+
"split": PropTypes.func.isRequired,
|
|
350
|
+
"startsWith": PropTypes.func.isRequired,
|
|
351
|
+
"strike": PropTypes.func.isRequired,
|
|
352
|
+
"sub": PropTypes.func.isRequired,
|
|
353
|
+
"substr": PropTypes.func.isRequired,
|
|
354
|
+
"substring": PropTypes.func.isRequired,
|
|
355
|
+
"sup": PropTypes.func.isRequired,
|
|
356
|
+
"toLocaleLowerCase": PropTypes.func.isRequired,
|
|
357
|
+
"toLocaleUpperCase": PropTypes.func.isRequired,
|
|
358
|
+
"toLowerCase": PropTypes.func.isRequired,
|
|
359
|
+
"toString": PropTypes.func.isRequired,
|
|
360
|
+
"toUpperCase": PropTypes.func.isRequired,
|
|
361
|
+
"trim": PropTypes.func.isRequired,
|
|
362
|
+
"trimEnd": PropTypes.func.isRequired,
|
|
363
|
+
"trimLeft": PropTypes.func.isRequired,
|
|
364
|
+
"trimRight": PropTypes.func.isRequired,
|
|
365
|
+
"trimStart": PropTypes.func.isRequired,
|
|
366
|
+
"valueOf": PropTypes.func.isRequired
|
|
367
|
+
})]),
|
|
318
368
|
"autoComplete": PropTypes.string,
|
|
319
369
|
"autoCorrect": PropTypes.string,
|
|
320
370
|
"autoFocus": PropTypes.bool,
|
|
@@ -276,7 +276,57 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
276
276
|
"aria-valuetext": PropTypes.string,
|
|
277
277
|
"ariaDescribedBy": PropTypes.string,
|
|
278
278
|
"as": PropTypes.elementType,
|
|
279
|
-
"autoCapitalize": PropTypes.
|
|
279
|
+
"autoCapitalize": PropTypes.oneOfType([PropTypes.oneOf(["characters", "none", "off", "on", "sentences", "words"]), PropTypes.shape({
|
|
280
|
+
"__@iterator": PropTypes.func.isRequired,
|
|
281
|
+
"anchor": PropTypes.func.isRequired,
|
|
282
|
+
"at": PropTypes.func.isRequired,
|
|
283
|
+
"big": PropTypes.func.isRequired,
|
|
284
|
+
"blink": PropTypes.func.isRequired,
|
|
285
|
+
"bold": PropTypes.func.isRequired,
|
|
286
|
+
"charAt": PropTypes.func.isRequired,
|
|
287
|
+
"charCodeAt": PropTypes.func.isRequired,
|
|
288
|
+
"codePointAt": PropTypes.func.isRequired,
|
|
289
|
+
"concat": PropTypes.func.isRequired,
|
|
290
|
+
"endsWith": PropTypes.func.isRequired,
|
|
291
|
+
"fixed": PropTypes.func.isRequired,
|
|
292
|
+
"fontcolor": PropTypes.func.isRequired,
|
|
293
|
+
"fontsize": PropTypes.func.isRequired,
|
|
294
|
+
"includes": PropTypes.func.isRequired,
|
|
295
|
+
"indexOf": PropTypes.func.isRequired,
|
|
296
|
+
"italics": PropTypes.func.isRequired,
|
|
297
|
+
"lastIndexOf": PropTypes.func.isRequired,
|
|
298
|
+
"length": PropTypes.number.isRequired,
|
|
299
|
+
"link": PropTypes.func.isRequired,
|
|
300
|
+
"localeCompare": PropTypes.func.isRequired,
|
|
301
|
+
"match": PropTypes.func.isRequired,
|
|
302
|
+
"matchAll": PropTypes.func.isRequired,
|
|
303
|
+
"normalize": PropTypes.func.isRequired,
|
|
304
|
+
"padEnd": PropTypes.func.isRequired,
|
|
305
|
+
"padStart": PropTypes.func.isRequired,
|
|
306
|
+
"repeat": PropTypes.func.isRequired,
|
|
307
|
+
"replace": PropTypes.func.isRequired,
|
|
308
|
+
"search": PropTypes.func.isRequired,
|
|
309
|
+
"slice": PropTypes.func.isRequired,
|
|
310
|
+
"small": PropTypes.func.isRequired,
|
|
311
|
+
"split": PropTypes.func.isRequired,
|
|
312
|
+
"startsWith": PropTypes.func.isRequired,
|
|
313
|
+
"strike": PropTypes.func.isRequired,
|
|
314
|
+
"sub": PropTypes.func.isRequired,
|
|
315
|
+
"substr": PropTypes.func.isRequired,
|
|
316
|
+
"substring": PropTypes.func.isRequired,
|
|
317
|
+
"sup": PropTypes.func.isRequired,
|
|
318
|
+
"toLocaleLowerCase": PropTypes.func.isRequired,
|
|
319
|
+
"toLocaleUpperCase": PropTypes.func.isRequired,
|
|
320
|
+
"toLowerCase": PropTypes.func.isRequired,
|
|
321
|
+
"toString": PropTypes.func.isRequired,
|
|
322
|
+
"toUpperCase": PropTypes.func.isRequired,
|
|
323
|
+
"trim": PropTypes.func.isRequired,
|
|
324
|
+
"trimEnd": PropTypes.func.isRequired,
|
|
325
|
+
"trimLeft": PropTypes.func.isRequired,
|
|
326
|
+
"trimRight": PropTypes.func.isRequired,
|
|
327
|
+
"trimStart": PropTypes.func.isRequired,
|
|
328
|
+
"valueOf": PropTypes.func.isRequired
|
|
329
|
+
})]),
|
|
280
330
|
"autoComplete": PropTypes.string,
|
|
281
331
|
"autoCorrect": PropTypes.string,
|
|
282
332
|
"autoFocus": PropTypes.bool,
|
|
@@ -3,7 +3,7 @@ const CONTENT_PADDING_LEFT_KEYS = [...paddingLeftPropertyNames, ...paddingXPrope
|
|
|
3
3
|
const CONTENT_PADDING_RIGHT_KEYS = [...paddingRightPropertyNames, ...paddingXPropertyNames, ...paddingNames];
|
|
4
4
|
const CONTENT_PADDING_TOP_KEYS = [...paddingTopPropertyNames, ...paddingYPropertyNames, ...paddingNames];
|
|
5
5
|
const CONTENT_PADDING_BOTTOM_KEYS = [...paddingBottomPropertyNames, ...paddingYPropertyNames, ...paddingNames];
|
|
6
|
-
export default (
|
|
6
|
+
export default (paddingProps, isHorizontal) => {
|
|
7
7
|
const getPaddingProps = paddingKeys => {
|
|
8
8
|
const key = paddingKeys.find(propName => paddingProps[propName]);
|
|
9
9
|
|
|
@@ -20,4 +20,4 @@ export default ((paddingProps, isHorizontal) => {
|
|
|
20
20
|
pt: getPaddingProps(CONTENT_PADDING_TOP_KEYS),
|
|
21
21
|
pb: getPaddingProps(CONTENT_PADDING_BOTTOM_KEYS)
|
|
22
22
|
};
|
|
23
|
-
}
|
|
23
|
+
};
|
|
@@ -27,7 +27,7 @@ export const TileSelectGroup = ({
|
|
|
27
27
|
value: value,
|
|
28
28
|
"data-role": "tile-select-group-radio-button-mapper"
|
|
29
29
|
}, React.Children.map(children, child => {
|
|
30
|
-
if (
|
|
30
|
+
if (/*#__PURE__*/React.isValidElement(child)) {
|
|
31
31
|
return /*#__PURE__*/React.cloneElement(child, {
|
|
32
32
|
type: "radio"
|
|
33
33
|
});
|
|
@@ -4,7 +4,7 @@ import { useEffect, useRef, useCallback } from "react";
|
|
|
4
4
|
// event.stopPropagation() which could have unexpected and frustrating consequences for consumers.
|
|
5
5
|
// Simple approach taken from https://github.com/facebook/react/issues/10962#issuecomment-444622208
|
|
6
6
|
|
|
7
|
-
export default (
|
|
7
|
+
export default (handleClickAway, eventTypeId = "click") => {
|
|
8
8
|
const clickIsInside = useRef(false);
|
|
9
9
|
const onDocumentClick = useCallback(ev => {
|
|
10
10
|
if (clickIsInside.current) {
|
|
@@ -23,4 +23,4 @@ export default ((handleClickAway, eventTypeId = "click") => {
|
|
|
23
23
|
};
|
|
24
24
|
}, [onDocumentClick, eventTypeId]);
|
|
25
25
|
return onInsideClick;
|
|
26
|
-
}
|
|
26
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useEffect } from "react";
|
|
2
2
|
import Events from "../../../__internal__/utils/helpers/events";
|
|
3
3
|
import { defaultFocusableSelectors } from "../../../__internal__/focus-trap/focus-trap-utils";
|
|
4
|
-
export default (
|
|
4
|
+
export default (container, target, focusCallback) => {
|
|
5
5
|
useEffect(() => {
|
|
6
6
|
const handleFocusPortalContent = ev => {
|
|
7
7
|
if (container?.current && target?.current) {
|
|
@@ -49,4 +49,4 @@ export default ((container, target, focusCallback) => {
|
|
|
49
49
|
document.removeEventListener("keydown", handleFocusPortalContent);
|
|
50
50
|
};
|
|
51
51
|
}, [target, container, focusCallback]);
|
|
52
|
-
}
|
|
52
|
+
};
|