@carbon/react 1.24.0 → 1.25.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/es/components/CodeSnippet/CodeSnippet.js +13 -115
- package/es/components/ComboBox/ComboBox.d.ts +6 -0
- package/es/components/ComboBox/ComboBox.js +19 -172
- package/es/components/ComboButton/index.js +164 -0
- package/es/components/ComposedModal/ComposedModal.js +1 -2
- package/es/components/DataTable/TableToolbar.d.ts +19 -0
- package/es/components/DataTable/TableToolbar.js +1 -1
- package/es/components/DataTable/TableToolbarAction.d.ts +21 -0
- package/es/components/DataTable/TableToolbarContent.d.ts +21 -0
- package/es/components/DataTable/TableToolbarMenu.d.ts +24 -0
- package/es/components/DataTable/TableToolbarMenu.js +3 -3
- package/es/components/DataTable/tools/sorting.js +2 -1
- package/es/components/DataTableSkeleton/DataTableSkeleton.d.ts +107 -0
- package/es/components/Dropdown/Dropdown.d.ts +6 -0
- package/es/components/Dropdown/Dropdown.js +8 -145
- package/es/components/FileUploader/FileUploader.js +1 -1
- package/es/components/FileUploader/FileUploaderDropContainer.js +30 -18
- package/es/components/FileUploader/FileUploaderItem.js +2 -1
- package/es/components/FileUploader/Filename.js +8 -2
- package/es/components/FluidTextArea/FluidTextArea.js +12 -1
- package/es/components/IconButton/index.js +1 -0
- package/es/components/ListBox/ListBoxSelection.js +4 -23
- package/es/components/ListBox/next/ListBoxSelection.js +2 -23
- package/es/components/Menu/Menu.js +50 -29
- package/es/components/Menu/MenuItem.js +1 -0
- package/es/components/MenuButton/index.js +127 -0
- package/es/components/Modal/Modal.js +4 -3
- package/es/components/MultiSelect/FilterableMultiSelect.js +31 -137
- package/es/components/MultiSelect/MultiSelect.d.ts +1 -1
- package/es/components/MultiSelect/MultiSelect.js +48 -26
- package/es/components/Notification/Notification.js +27 -264
- package/es/components/OverflowMenu/OverflowMenu.js +13 -139
- package/es/components/OverflowMenuItem/OverflowMenuItem.d.ts +58 -0
- package/es/components/OverflowMenuItem/OverflowMenuItem.js +12 -7
- package/es/components/OverflowMenuV2/index.js +15 -51
- package/es/components/Popover/index.d.ts +5 -1
- package/es/components/Popover/index.js +37 -9
- package/es/components/RadioButtonGroup/RadioButtonGroup.js +7 -4
- package/es/components/RadioTile/RadioTile.js +6 -6
- package/es/components/Select/Select.d.ts +89 -0
- package/es/components/SelectItem/SelectItem.d.ts +62 -0
- package/es/components/SelectItem/SelectItem.js +2 -4
- package/es/components/SelectItemGroup/SelectItemGroup.d.ts +52 -0
- package/es/components/SkeletonText/SkeletonText.js +1 -1
- package/es/components/StructuredList/StructuredList.js +10 -38
- package/es/components/Tabs/Tabs.js +3 -1
- package/es/components/TextArea/TextArea.Skeleton.d.ts +33 -0
- package/es/components/TextArea/TextArea.Skeleton.js +5 -5
- package/es/components/TextArea/TextArea.d.ts +9 -2
- package/es/components/TextArea/TextArea.js +31 -8
- package/es/components/TextArea/index.js +1 -0
- package/es/components/Toggle/Toggle.js +8 -19
- package/es/components/Tooltip/DefinitionTooltip.d.ts +52 -0
- package/es/components/Tooltip/DefinitionTooltip.js +2 -2
- package/es/components/Tooltip/Tooltip.d.ts +117 -0
- package/es/components/Tooltip/Tooltip.js +6 -4
- package/es/components/Tooltip/index.d.ts +9 -0
- package/es/index.d.ts +2 -0
- package/es/index.js +5 -3
- package/es/internal/ClickListener.js +1 -2
- package/es/internal/keyboard/match.js +1 -1
- package/es/internal/useAttachedMenu.js +85 -0
- package/es/internal/useDelayedState.d.ts +19 -0
- package/es/internal/useDelayedState.js +7 -3
- package/es/internal/useId.js +1 -1
- package/lib/components/CodeSnippet/CodeSnippet.js +13 -115
- package/lib/components/ComboBox/ComboBox.d.ts +6 -0
- package/lib/components/ComboBox/ComboBox.js +18 -171
- package/lib/components/ComboButton/index.js +174 -0
- package/lib/components/ComposedModal/ComposedModal.js +1 -2
- package/lib/components/DataTable/TableToolbar.d.ts +19 -0
- package/lib/components/DataTable/TableToolbar.js +1 -1
- package/lib/components/DataTable/TableToolbarAction.d.ts +21 -0
- package/lib/components/DataTable/TableToolbarContent.d.ts +21 -0
- package/lib/components/DataTable/TableToolbarMenu.d.ts +24 -0
- package/lib/components/DataTable/TableToolbarMenu.js +3 -3
- package/lib/components/DataTable/tools/sorting.js +2 -1
- package/lib/components/DataTableSkeleton/DataTableSkeleton.d.ts +107 -0
- package/lib/components/Dropdown/Dropdown.d.ts +6 -0
- package/lib/components/Dropdown/Dropdown.js +7 -144
- package/lib/components/FileUploader/FileUploader.js +1 -1
- package/lib/components/FileUploader/FileUploaderDropContainer.js +30 -18
- package/lib/components/FileUploader/FileUploaderItem.js +2 -1
- package/lib/components/FileUploader/Filename.js +8 -2
- package/lib/components/FluidTextArea/FluidTextArea.js +12 -1
- package/lib/components/IconButton/index.js +1 -0
- package/lib/components/ListBox/ListBoxSelection.js +4 -23
- package/lib/components/ListBox/next/ListBoxSelection.js +2 -23
- package/lib/components/Menu/Menu.js +50 -29
- package/lib/components/Menu/MenuItem.js +1 -0
- package/lib/components/MenuButton/index.js +137 -0
- package/lib/components/Modal/Modal.js +4 -3
- package/lib/components/MultiSelect/FilterableMultiSelect.js +29 -135
- package/lib/components/MultiSelect/MultiSelect.d.ts +1 -1
- package/lib/components/MultiSelect/MultiSelect.js +47 -25
- package/lib/components/Notification/Notification.js +27 -264
- package/lib/components/OverflowMenu/OverflowMenu.js +13 -139
- package/lib/components/OverflowMenuItem/OverflowMenuItem.d.ts +58 -0
- package/lib/components/OverflowMenuItem/OverflowMenuItem.js +12 -7
- package/lib/components/OverflowMenuV2/index.js +13 -49
- package/lib/components/Popover/index.d.ts +5 -1
- package/lib/components/Popover/index.js +37 -9
- package/lib/components/RadioButtonGroup/RadioButtonGroup.js +6 -3
- package/lib/components/RadioTile/RadioTile.js +6 -6
- package/lib/components/Select/Select.d.ts +89 -0
- package/lib/components/SelectItem/SelectItem.d.ts +62 -0
- package/lib/components/SelectItem/SelectItem.js +1 -3
- package/lib/components/SelectItemGroup/SelectItemGroup.d.ts +52 -0
- package/lib/components/SkeletonText/SkeletonText.js +1 -1
- package/lib/components/StructuredList/StructuredList.js +10 -38
- package/lib/components/Tabs/Tabs.js +3 -1
- package/lib/components/TextArea/TextArea.Skeleton.d.ts +33 -0
- package/lib/components/TextArea/TextArea.Skeleton.js +5 -5
- package/lib/components/TextArea/TextArea.d.ts +9 -2
- package/lib/components/TextArea/TextArea.js +30 -7
- package/lib/components/TextArea/index.js +2 -0
- package/lib/components/Toggle/Toggle.js +8 -19
- package/lib/components/Tooltip/DefinitionTooltip.d.ts +52 -0
- package/lib/components/Tooltip/DefinitionTooltip.js +2 -2
- package/lib/components/Tooltip/Tooltip.d.ts +117 -0
- package/lib/components/Tooltip/Tooltip.js +6 -4
- package/lib/components/Tooltip/index.d.ts +9 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +50 -46
- package/lib/internal/ClickListener.js +1 -2
- package/lib/internal/keyboard/match.js +1 -1
- package/lib/internal/useAttachedMenu.js +89 -0
- package/lib/internal/useDelayedState.d.ts +19 -0
- package/lib/internal/useDelayedState.js +7 -3
- package/lib/internal/useId.js +1 -1
- package/package.json +3 -3
|
@@ -38,7 +38,9 @@ var Downshift__default = /*#__PURE__*/_interopDefaultLegacy(Downshift);
|
|
|
38
38
|
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
39
39
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
40
40
|
|
|
41
|
-
var
|
|
41
|
+
var _ComboBox$propTypes, _ComboBox$defaultProp;
|
|
42
|
+
|
|
43
|
+
var _excluded = ["aria-label", "ariaLabel", "className", "direction", "disabled", "downshiftProps", "helperText", "id", "initialSelectedItem", "invalid", "invalidText", "items", "itemToElement", "itemToString", "light", "onChange", "onInputChange", "onToggleClick", "placeholder", "readOnly", "selectedItem", "shouldFilterItem", "size", "titleText", "translateWithId", "type", "warn", "warnText", "onStateChange"];
|
|
42
44
|
|
|
43
45
|
var defaultItemToString = function defaultItemToString(item) {
|
|
44
46
|
if (typeof item === 'string') {
|
|
@@ -95,7 +97,8 @@ var getInstanceId = setupGetInstanceId["default"]();
|
|
|
95
97
|
var ComboBox = /*#__PURE__*/React__default["default"].forwardRef(function (props, ref) {
|
|
96
98
|
var _cx, _ref4, _cx4, _Text;
|
|
97
99
|
|
|
98
|
-
var ariaLabel = props
|
|
100
|
+
var ariaLabel = props['aria-label'],
|
|
101
|
+
deprecatedAriaLabel = props.ariaLabel,
|
|
99
102
|
containerClassName = props.className,
|
|
100
103
|
direction = props.direction,
|
|
101
104
|
disabled = props.disabled,
|
|
@@ -315,6 +318,14 @@ var ComboBox = /*#__PURE__*/React__default["default"].forwardRef(function (props
|
|
|
315
318
|
if (match.match(event, keys.Enter) && !inputValue) {
|
|
316
319
|
toggleMenu();
|
|
317
320
|
}
|
|
321
|
+
|
|
322
|
+
if (match.match(event, keys.Escape) && inputValue) {
|
|
323
|
+
if (event.target === textInput.current && isOpen) {
|
|
324
|
+
toggleMenu();
|
|
325
|
+
event.preventDownshiftDefault = true;
|
|
326
|
+
event.persist();
|
|
327
|
+
}
|
|
328
|
+
}
|
|
318
329
|
}
|
|
319
330
|
});
|
|
320
331
|
|
|
@@ -377,7 +388,7 @@ var ComboBox = /*#__PURE__*/React__default["default"].forwardRef(function (props
|
|
|
377
388
|
isOpen: isOpen,
|
|
378
389
|
translateWithId: translateWithId
|
|
379
390
|
}))), /*#__PURE__*/React__default["default"].createElement(index$1["default"].Menu, getMenuProps({
|
|
380
|
-
'aria-label': ariaLabel
|
|
391
|
+
'aria-label': deprecatedAriaLabel || ariaLabel
|
|
381
392
|
}), isOpen ? filterItems(items, itemToString, inputValue).map(function (item, index) {
|
|
382
393
|
var _getItemProps;
|
|
383
394
|
|
|
@@ -406,178 +417,14 @@ var ComboBox = /*#__PURE__*/React__default["default"].forwardRef(function (props
|
|
|
406
417
|
});
|
|
407
418
|
});
|
|
408
419
|
ComboBox.displayName = 'ComboBox';
|
|
409
|
-
ComboBox.propTypes = {
|
|
410
|
-
|
|
411
|
-
* 'aria-label' of the ListBox component.
|
|
412
|
-
*/
|
|
413
|
-
ariaLabel: PropTypes__default["default"].string,
|
|
414
|
-
|
|
415
|
-
/**
|
|
416
|
-
* An optional className to add to the container node
|
|
417
|
-
*/
|
|
418
|
-
className: PropTypes__default["default"].string,
|
|
419
|
-
|
|
420
|
-
/**
|
|
421
|
-
* Specify the direction of the combobox dropdown. Can be either top or bottom.
|
|
422
|
-
*/
|
|
423
|
-
direction: PropTypes__default["default"].oneOf(['top', 'bottom']),
|
|
424
|
-
|
|
425
|
-
/**
|
|
426
|
-
* Specify if the control should be disabled, or not
|
|
427
|
-
*/
|
|
428
|
-
disabled: PropTypes__default["default"].bool,
|
|
429
|
-
|
|
430
|
-
/**
|
|
431
|
-
* Additional props passed to Downshift
|
|
432
|
-
*/
|
|
433
|
-
// @ts-ignore
|
|
434
|
-
downshiftProps: PropTypes__default["default"].shape(Downshift__default["default"].propTypes),
|
|
435
|
-
|
|
436
|
-
/**
|
|
437
|
-
* Provide helper text that is used alongside the control label for
|
|
438
|
-
* additional help
|
|
439
|
-
*/
|
|
440
|
-
helperText: PropTypes__default["default"].string,
|
|
441
|
-
|
|
442
|
-
/**
|
|
443
|
-
* Specify a custom `id` for the input
|
|
444
|
-
*/
|
|
445
|
-
id: PropTypes__default["default"].string.isRequired,
|
|
446
|
-
|
|
447
|
-
/**
|
|
448
|
-
* Allow users to pass in an arbitrary item or a string (in case their items are an array of strings)
|
|
449
|
-
* from their collection that are pre-selected
|
|
450
|
-
*/
|
|
451
|
-
initialSelectedItem: PropTypes__default["default"].oneOfType([PropTypes__default["default"].object, PropTypes__default["default"].string, PropTypes__default["default"].number]),
|
|
452
|
-
|
|
453
|
-
/**
|
|
454
|
-
* Specify if the currently selected value is invalid.
|
|
455
|
-
*/
|
|
456
|
-
invalid: PropTypes__default["default"].bool,
|
|
457
|
-
|
|
458
|
-
/**
|
|
459
|
-
* Message which is displayed if the value is invalid.
|
|
460
|
-
*/
|
|
461
|
-
invalidText: PropTypes__default["default"].node,
|
|
462
|
-
|
|
463
|
-
/**
|
|
464
|
-
* Optional function to render items as custom components instead of strings.
|
|
465
|
-
* Defaults to null and is overridden by a getter
|
|
466
|
-
*/
|
|
467
|
-
itemToElement: PropTypes__default["default"].func,
|
|
468
|
-
|
|
469
|
-
/**
|
|
470
|
-
* Helper function passed to downshift that allows the library to render a
|
|
471
|
-
* given item to a string label. By default, it extracts the `label` field
|
|
472
|
-
* from a given item to serve as the item label in the list
|
|
473
|
-
*/
|
|
474
|
-
itemToString: PropTypes__default["default"].func,
|
|
475
|
-
|
|
476
|
-
/**
|
|
477
|
-
* We try to stay as generic as possible here to allow individuals to pass
|
|
478
|
-
* in a collection of whatever kind of data structure they prefer
|
|
479
|
-
*/
|
|
480
|
-
items: PropTypes__default["default"].array.isRequired,
|
|
481
|
-
|
|
482
|
-
/**
|
|
483
|
-
* should use "light theme" (white background)?
|
|
484
|
-
*/
|
|
485
|
-
light: deprecate["default"](PropTypes__default["default"].bool, 'The `light` prop for `Combobox` has ' + 'been deprecated in favor of the new `Layer` component. It will be removed in the next major release.'),
|
|
486
|
-
|
|
487
|
-
/**
|
|
488
|
-
* `onChange` is a utility for this controlled component to communicate to a
|
|
489
|
-
* consuming component when a specific dropdown item is selected.
|
|
490
|
-
* `({ selectedItem }) => void`
|
|
491
|
-
* @param {{ selectedItem }}
|
|
492
|
-
*/
|
|
493
|
-
onChange: PropTypes__default["default"].func.isRequired,
|
|
494
|
-
|
|
495
|
-
/**
|
|
496
|
-
* Callback function to notify consumer when the text input changes.
|
|
497
|
-
* This provides support to change available items based on the text.
|
|
498
|
-
* `(inputText) => void`
|
|
499
|
-
* @param {string} inputText
|
|
500
|
-
*/
|
|
501
|
-
onInputChange: PropTypes__default["default"].func,
|
|
502
|
-
|
|
503
|
-
/**
|
|
504
|
-
* Helper function passed to Downshift that allows the user to observe internal
|
|
505
|
-
* state changes
|
|
506
|
-
* `(changes, stateAndHelpers) => void`
|
|
507
|
-
*/
|
|
508
|
-
onStateChange: PropTypes__default["default"].func,
|
|
509
|
-
|
|
510
|
-
/**
|
|
511
|
-
* Callback function that fires when the combobox menu toggle is clicked
|
|
512
|
-
* `(evt) => void`
|
|
513
|
-
* @param {MouseEvent} event
|
|
514
|
-
*/
|
|
515
|
-
onToggleClick: PropTypes__default["default"].func,
|
|
516
|
-
|
|
517
|
-
/**
|
|
518
|
-
* Used to provide a placeholder text node before a user enters any input.
|
|
519
|
-
* This is only present if the control has no items selected
|
|
520
|
-
*/
|
|
521
|
-
placeholder: PropTypes__default["default"].string,
|
|
522
|
-
|
|
523
|
-
/**
|
|
524
|
-
* Is the ComboBox readonly?
|
|
525
|
-
*/
|
|
526
|
-
readOnly: PropTypes__default["default"].bool,
|
|
527
|
-
|
|
528
|
-
/**
|
|
529
|
-
* For full control of the selection
|
|
530
|
-
*/
|
|
531
|
-
selectedItem: PropTypes__default["default"].oneOfType([PropTypes__default["default"].object, PropTypes__default["default"].string, PropTypes__default["default"].number]),
|
|
532
|
-
|
|
533
|
-
/**
|
|
534
|
-
* Specify your own filtering logic by passing in a `shouldFilterItem`
|
|
535
|
-
* function that takes in the current input and an item and passes back
|
|
536
|
-
* whether or not the item should be filtered.
|
|
537
|
-
*/
|
|
538
|
-
shouldFilterItem: PropTypes__default["default"].func,
|
|
539
|
-
|
|
540
|
-
/**
|
|
541
|
-
* Specify the size of the ListBox. Currently supports either `sm`, `md` or `lg` as an option.
|
|
542
|
-
*/
|
|
543
|
-
size: ListBoxPropTypes.ListBoxSize,
|
|
544
|
-
|
|
545
|
-
/**
|
|
546
|
-
* Provide text to be used in a `<label>` element that is tied to the
|
|
547
|
-
* combobox via ARIA attributes.
|
|
548
|
-
*/
|
|
549
|
-
titleText: PropTypes__default["default"].node,
|
|
550
|
-
|
|
551
|
-
/**
|
|
552
|
-
* Specify a custom translation function that takes in a message identifier
|
|
553
|
-
* and returns the localized string for the message
|
|
554
|
-
*/
|
|
555
|
-
translateWithId: PropTypes__default["default"].func,
|
|
556
|
-
|
|
557
|
-
/**
|
|
558
|
-
* Currently supports either the default type, or an inline variant
|
|
559
|
-
*/
|
|
560
|
-
type: ListBoxPropTypes.ListBoxType,
|
|
561
|
-
|
|
562
|
-
/**
|
|
563
|
-
* Specify whether the control is currently in warning state
|
|
564
|
-
*/
|
|
565
|
-
warn: PropTypes__default["default"].bool,
|
|
566
|
-
|
|
567
|
-
/**
|
|
568
|
-
* Provide the text that is displayed when the control is in warning state
|
|
569
|
-
*/
|
|
570
|
-
warnText: PropTypes__default["default"].node
|
|
571
|
-
};
|
|
572
|
-
ComboBox.defaultProps = {
|
|
420
|
+
ComboBox.propTypes = (_ComboBox$propTypes = {}, _rollupPluginBabelHelpers.defineProperty(_ComboBox$propTypes, 'aria-label', PropTypes__default["default"].string), _rollupPluginBabelHelpers.defineProperty(_ComboBox$propTypes, "ariaLabel", deprecate["default"](PropTypes__default["default"].string, 'This prop syntax has been deprecated. Please use the new `aria-label`.')), _rollupPluginBabelHelpers.defineProperty(_ComboBox$propTypes, "className", PropTypes__default["default"].string), _rollupPluginBabelHelpers.defineProperty(_ComboBox$propTypes, "direction", PropTypes__default["default"].oneOf(['top', 'bottom'])), _rollupPluginBabelHelpers.defineProperty(_ComboBox$propTypes, "disabled", PropTypes__default["default"].bool), _rollupPluginBabelHelpers.defineProperty(_ComboBox$propTypes, "downshiftProps", PropTypes__default["default"].shape(Downshift__default["default"].propTypes)), _rollupPluginBabelHelpers.defineProperty(_ComboBox$propTypes, "helperText", PropTypes__default["default"].string), _rollupPluginBabelHelpers.defineProperty(_ComboBox$propTypes, "id", PropTypes__default["default"].string.isRequired), _rollupPluginBabelHelpers.defineProperty(_ComboBox$propTypes, "initialSelectedItem", PropTypes__default["default"].oneOfType([PropTypes__default["default"].object, PropTypes__default["default"].string, PropTypes__default["default"].number])), _rollupPluginBabelHelpers.defineProperty(_ComboBox$propTypes, "invalid", PropTypes__default["default"].bool), _rollupPluginBabelHelpers.defineProperty(_ComboBox$propTypes, "invalidText", PropTypes__default["default"].node), _rollupPluginBabelHelpers.defineProperty(_ComboBox$propTypes, "itemToElement", PropTypes__default["default"].func), _rollupPluginBabelHelpers.defineProperty(_ComboBox$propTypes, "itemToString", PropTypes__default["default"].func), _rollupPluginBabelHelpers.defineProperty(_ComboBox$propTypes, "items", PropTypes__default["default"].array.isRequired), _rollupPluginBabelHelpers.defineProperty(_ComboBox$propTypes, "light", deprecate["default"](PropTypes__default["default"].bool, 'The `light` prop for `Combobox` has ' + 'been deprecated in favor of the new `Layer` component. It will be removed in the next major release.')), _rollupPluginBabelHelpers.defineProperty(_ComboBox$propTypes, "onChange", PropTypes__default["default"].func.isRequired), _rollupPluginBabelHelpers.defineProperty(_ComboBox$propTypes, "onInputChange", PropTypes__default["default"].func), _rollupPluginBabelHelpers.defineProperty(_ComboBox$propTypes, "onStateChange", PropTypes__default["default"].func), _rollupPluginBabelHelpers.defineProperty(_ComboBox$propTypes, "onToggleClick", PropTypes__default["default"].func), _rollupPluginBabelHelpers.defineProperty(_ComboBox$propTypes, "placeholder", PropTypes__default["default"].string), _rollupPluginBabelHelpers.defineProperty(_ComboBox$propTypes, "readOnly", PropTypes__default["default"].bool), _rollupPluginBabelHelpers.defineProperty(_ComboBox$propTypes, "selectedItem", PropTypes__default["default"].oneOfType([PropTypes__default["default"].object, PropTypes__default["default"].string, PropTypes__default["default"].number])), _rollupPluginBabelHelpers.defineProperty(_ComboBox$propTypes, "shouldFilterItem", PropTypes__default["default"].func), _rollupPluginBabelHelpers.defineProperty(_ComboBox$propTypes, "size", ListBoxPropTypes.ListBoxSize), _rollupPluginBabelHelpers.defineProperty(_ComboBox$propTypes, "titleText", PropTypes__default["default"].node), _rollupPluginBabelHelpers.defineProperty(_ComboBox$propTypes, "translateWithId", PropTypes__default["default"].func), _rollupPluginBabelHelpers.defineProperty(_ComboBox$propTypes, "type", ListBoxPropTypes.ListBoxType), _rollupPluginBabelHelpers.defineProperty(_ComboBox$propTypes, "warn", PropTypes__default["default"].bool), _rollupPluginBabelHelpers.defineProperty(_ComboBox$propTypes, "warnText", PropTypes__default["default"].node), _ComboBox$propTypes);
|
|
421
|
+
ComboBox.defaultProps = (_ComboBox$defaultProp = {
|
|
573
422
|
disabled: false,
|
|
574
423
|
itemToString: defaultItemToString,
|
|
575
424
|
itemToElement: null,
|
|
576
425
|
shouldFilterItem: defaultShouldFilterItem,
|
|
577
|
-
type: 'default'
|
|
578
|
-
|
|
579
|
-
direction: 'bottom'
|
|
580
|
-
};
|
|
426
|
+
type: 'default'
|
|
427
|
+
}, _rollupPluginBabelHelpers.defineProperty(_ComboBox$defaultProp, 'aria-label', 'Choose an item'), _rollupPluginBabelHelpers.defineProperty(_ComboBox$defaultProp, "direction", 'bottom'), _ComboBox$defaultProp);
|
|
581
428
|
var ComboBox$1 = ComboBox;
|
|
582
429
|
|
|
583
430
|
exports["default"] = ComboBox$1;
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp. 2016, 2023
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
'use strict';
|
|
9
|
+
|
|
10
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
11
|
+
|
|
12
|
+
var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelpers.js');
|
|
13
|
+
var React = require('react');
|
|
14
|
+
var PropTypes = require('prop-types');
|
|
15
|
+
var cx = require('classnames');
|
|
16
|
+
var iconsReact = require('@carbon/icons-react');
|
|
17
|
+
var Button = require('../Button/Button.js');
|
|
18
|
+
var index = require('../IconButton/index.js');
|
|
19
|
+
var Menu = require('../Menu/Menu.js');
|
|
20
|
+
var useAttachedMenu = require('../../internal/useAttachedMenu.js');
|
|
21
|
+
var useId = require('../../internal/useId.js');
|
|
22
|
+
var useMergedRefs = require('../../internal/useMergedRefs.js');
|
|
23
|
+
var usePrefix = require('../../internal/usePrefix.js');
|
|
24
|
+
|
|
25
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
26
|
+
|
|
27
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
28
|
+
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
29
|
+
var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
|
|
30
|
+
|
|
31
|
+
var _ChevronDown;
|
|
32
|
+
|
|
33
|
+
var _excluded = ["children", "className", "disabled", "label", "onClick", "size", "tooltipAlign", "translateWithId"];
|
|
34
|
+
var spacing = 4; // top and bottom spacing between the button and the menu. in px
|
|
35
|
+
|
|
36
|
+
var defaultTranslations = {
|
|
37
|
+
'carbon.combo-button.additional-actions': 'Additional actions'
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
function defaultTranslateWithId(messageId) {
|
|
41
|
+
return defaultTranslations[messageId];
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
var ComboButton = /*#__PURE__*/React__default["default"].forwardRef(function ComboButton(_ref, forwardRef) {
|
|
45
|
+
var children = _ref.children,
|
|
46
|
+
className = _ref.className,
|
|
47
|
+
disabled = _ref.disabled,
|
|
48
|
+
label = _ref.label,
|
|
49
|
+
onClick = _ref.onClick,
|
|
50
|
+
_ref$size = _ref.size,
|
|
51
|
+
size = _ref$size === void 0 ? 'lg' : _ref$size,
|
|
52
|
+
tooltipAlign = _ref.tooltipAlign,
|
|
53
|
+
_ref$translateWithId = _ref.translateWithId,
|
|
54
|
+
t = _ref$translateWithId === void 0 ? defaultTranslateWithId : _ref$translateWithId,
|
|
55
|
+
rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
|
|
56
|
+
|
|
57
|
+
var id = useId.useId('combobutton');
|
|
58
|
+
var prefix = usePrefix.usePrefix();
|
|
59
|
+
var containerRef = React.useRef(null);
|
|
60
|
+
var menuRef = React.useRef(null);
|
|
61
|
+
var ref = useMergedRefs.useMergedRefs([forwardRef, containerRef]);
|
|
62
|
+
|
|
63
|
+
var _useState = React.useState(0),
|
|
64
|
+
_useState2 = _rollupPluginBabelHelpers.slicedToArray(_useState, 2),
|
|
65
|
+
width = _useState2[0],
|
|
66
|
+
setWidth = _useState2[1];
|
|
67
|
+
|
|
68
|
+
var _useAttachedMenu = useAttachedMenu.useAttachedMenu(containerRef),
|
|
69
|
+
open = _useAttachedMenu.open,
|
|
70
|
+
x = _useAttachedMenu.x,
|
|
71
|
+
y = _useAttachedMenu.y,
|
|
72
|
+
hookOnClick = _useAttachedMenu.handleClick,
|
|
73
|
+
handleTriggerMousedown = _useAttachedMenu.handleMousedown,
|
|
74
|
+
handleClose = _useAttachedMenu.handleClose;
|
|
75
|
+
|
|
76
|
+
function handleTriggerClick() {
|
|
77
|
+
if (containerRef.current) {
|
|
78
|
+
var _containerRef$current = containerRef.current.getBoundingClientRect(),
|
|
79
|
+
w = _containerRef$current.width;
|
|
80
|
+
|
|
81
|
+
setWidth(w);
|
|
82
|
+
hookOnClick();
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
function handlePrimaryActionClick(e) {
|
|
87
|
+
if (onClick) {
|
|
88
|
+
onClick(e);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
function handleOpen() {
|
|
93
|
+
menuRef.current.style.width = "".concat(width, "px");
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
var containerClasses = cx__default["default"]("".concat(prefix, "--combo-button__container"), "".concat(prefix, "--combo-button__container--").concat(size), _rollupPluginBabelHelpers.defineProperty({}, "".concat(prefix, "--combo-button__container--open"), open), className);
|
|
97
|
+
var primaryActionClasses = cx__default["default"]("".concat(prefix, "--combo-button__primary-action"));
|
|
98
|
+
var triggerClasses = cx__default["default"]("".concat(prefix, "--combo-button__trigger"));
|
|
99
|
+
return /*#__PURE__*/React__default["default"].createElement("div", _rollupPluginBabelHelpers["extends"]({}, rest, {
|
|
100
|
+
className: containerClasses,
|
|
101
|
+
ref: ref
|
|
102
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
103
|
+
className: primaryActionClasses
|
|
104
|
+
}, /*#__PURE__*/React__default["default"].createElement(Button["default"], {
|
|
105
|
+
size: size,
|
|
106
|
+
disabled: disabled,
|
|
107
|
+
onClick: handlePrimaryActionClick
|
|
108
|
+
}, label)), /*#__PURE__*/React__default["default"].createElement(index.IconButton, {
|
|
109
|
+
className: triggerClasses,
|
|
110
|
+
label: t('carbon.combo-button.additional-actions'),
|
|
111
|
+
size: size,
|
|
112
|
+
disabled: disabled,
|
|
113
|
+
align: tooltipAlign,
|
|
114
|
+
"aria-haspopup": true,
|
|
115
|
+
"aria-expanded": open,
|
|
116
|
+
onClick: handleTriggerClick,
|
|
117
|
+
onMouseDown: handleTriggerMousedown,
|
|
118
|
+
"aria-owns": open ? id : null
|
|
119
|
+
}, _ChevronDown || (_ChevronDown = /*#__PURE__*/React__default["default"].createElement(iconsReact.ChevronDown, null))), /*#__PURE__*/React__default["default"].createElement(Menu.Menu, {
|
|
120
|
+
ref: menuRef,
|
|
121
|
+
id: id,
|
|
122
|
+
label: t('carbon.combo-button.additional-actions'),
|
|
123
|
+
size: size,
|
|
124
|
+
open: open,
|
|
125
|
+
onClose: handleClose,
|
|
126
|
+
onOpen: handleOpen,
|
|
127
|
+
x: x,
|
|
128
|
+
y: [y[0] - spacing, y[1] + spacing]
|
|
129
|
+
}, children));
|
|
130
|
+
});
|
|
131
|
+
ComboButton.propTypes = {
|
|
132
|
+
/**
|
|
133
|
+
* A collection of MenuItems to be rendered as additional actions for this ComboButton.
|
|
134
|
+
*/
|
|
135
|
+
children: PropTypes__default["default"].node.isRequired,
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Additional CSS class names.
|
|
139
|
+
*/
|
|
140
|
+
className: PropTypes__default["default"].string,
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* Specify whether the ComboButton should be disabled, or not.
|
|
144
|
+
*/
|
|
145
|
+
disabled: PropTypes__default["default"].bool,
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Provide the label to be renderd on the primary action button.
|
|
149
|
+
*/
|
|
150
|
+
label: PropTypes__default["default"].string.isRequired,
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Provide an optional function to be called when the primary action element is clicked.
|
|
154
|
+
*/
|
|
155
|
+
onClick: PropTypes__default["default"].func,
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Specify the size of the buttons and menu.
|
|
159
|
+
*/
|
|
160
|
+
size: PropTypes__default["default"].oneOf(['sm', 'md', 'lg']),
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* Specify how the trigger tooltip should be aligned.
|
|
164
|
+
*/
|
|
165
|
+
tooltipAlign: PropTypes__default["default"].oneOf(['top', 'top-left', 'top-right', 'bottom', 'bottom-left', 'bottom-right', 'left', 'right']),
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Optional method that takes in a message id and returns an
|
|
169
|
+
* internationalized string.
|
|
170
|
+
*/
|
|
171
|
+
translateWithId: PropTypes__default["default"].func
|
|
172
|
+
};
|
|
173
|
+
|
|
174
|
+
exports.ComboButton = ComboButton;
|
|
@@ -206,8 +206,7 @@ var ComposedModal = /*#__PURE__*/React__default["default"].forwardRef(function C
|
|
|
206
206
|
onBlur: handleBlur,
|
|
207
207
|
onMouseDown: handleMousedown,
|
|
208
208
|
onKeyDown: handleKeyDown,
|
|
209
|
-
className: modalClass
|
|
210
|
-
tabIndex: "-1"
|
|
209
|
+
className: modalClass
|
|
211
210
|
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
212
211
|
className: containerClass,
|
|
213
212
|
role: "dialog",
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp. 2016, 2023
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
import React from 'react';
|
|
8
|
+
export interface TableToolbarProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
9
|
+
/**
|
|
10
|
+
* Pass in the children that will be rendered inside the TableToolbar
|
|
11
|
+
*/
|
|
12
|
+
children: React.ReactNode;
|
|
13
|
+
/**
|
|
14
|
+
* `lg` Change the row height of table
|
|
15
|
+
*/
|
|
16
|
+
size?: 'sm' | 'lg';
|
|
17
|
+
}
|
|
18
|
+
declare const TableToolbar: React.FC<TableToolbarProps>;
|
|
19
|
+
export default TableToolbar;
|
|
@@ -13,8 +13,8 @@ var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelper
|
|
|
13
13
|
var cx = require('classnames');
|
|
14
14
|
var PropTypes = require('prop-types');
|
|
15
15
|
var React = require('react');
|
|
16
|
-
var AriaPropTypes = require('../../prop-types/AriaPropTypes.js');
|
|
17
16
|
var usePrefix = require('../../internal/usePrefix.js');
|
|
17
|
+
var AriaPropTypes = require('../../prop-types/AriaPropTypes.js');
|
|
18
18
|
|
|
19
19
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
20
20
|
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp. 2016, 2023
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import { ForwardRefReturn } from '../../types/common';
|
|
9
|
+
export interface TableToolbarActionProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onClick'> {
|
|
10
|
+
/**
|
|
11
|
+
* Pass in the children that will be rendered inside the TableToolbarAction
|
|
12
|
+
*/
|
|
13
|
+
children?: React.ReactNode;
|
|
14
|
+
/**
|
|
15
|
+
* onClick handler for the TableToolbarAction
|
|
16
|
+
*/
|
|
17
|
+
onClick: (event: React.MouseEvent<HTMLDivElement>) => void;
|
|
18
|
+
}
|
|
19
|
+
export type TableToolbarActionComponent = ForwardRefReturn<HTMLDivElement, TableToolbarActionProps>;
|
|
20
|
+
declare const TableToolbarAction: TableToolbarActionComponent;
|
|
21
|
+
export default TableToolbarAction;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp. 2016, 2023
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
declare const TableToolbarContent: {
|
|
8
|
+
({ className: baseClassName, ...other }: {
|
|
9
|
+
[x: string]: any;
|
|
10
|
+
className: any;
|
|
11
|
+
}): import("react").CElement<{
|
|
12
|
+
className: string | undefined;
|
|
13
|
+
}, import("react").Component<{
|
|
14
|
+
className: string | undefined;
|
|
15
|
+
}, any, any>>;
|
|
16
|
+
displayName: any;
|
|
17
|
+
propTypes: {
|
|
18
|
+
className: import("prop-types").Requireable<string>;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
export default TableToolbarContent;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp. 2016, 2023
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
import React from 'react';
|
|
8
|
+
export interface TableToolbarMenuProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
9
|
+
children: React.ReactNode;
|
|
10
|
+
/**
|
|
11
|
+
* Provide an optional class name for the toolbar menu
|
|
12
|
+
*/
|
|
13
|
+
className?: string;
|
|
14
|
+
/**
|
|
15
|
+
* The description of the menu icon.
|
|
16
|
+
*/
|
|
17
|
+
iconDescription: string;
|
|
18
|
+
/**
|
|
19
|
+
* Optional prop to allow overriding the default menu icon
|
|
20
|
+
*/
|
|
21
|
+
renderIcon?: React.ReactNode;
|
|
22
|
+
}
|
|
23
|
+
declare const TableToolbarMenu: React.FC<TableToolbarMenuProps>;
|
|
24
|
+
export default TableToolbarMenu;
|
|
@@ -10,12 +10,12 @@
|
|
|
10
10
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
11
11
|
|
|
12
12
|
var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelpers.js');
|
|
13
|
+
var iconsReact = require('@carbon/icons-react');
|
|
13
14
|
var cx = require('classnames');
|
|
14
15
|
var PropTypes = require('prop-types');
|
|
15
16
|
var React = require('react');
|
|
16
|
-
var index = require('../OverflowMenu/index.js');
|
|
17
|
-
var iconsReact = require('@carbon/icons-react');
|
|
18
17
|
var usePrefix = require('../../internal/usePrefix.js');
|
|
18
|
+
var index = require('../OverflowMenu/index.js');
|
|
19
19
|
|
|
20
20
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
21
21
|
|
|
@@ -35,7 +35,7 @@ var TableToolbarMenu = function TableToolbarMenu(_ref) {
|
|
|
35
35
|
var prefix = usePrefix.usePrefix();
|
|
36
36
|
var toolbarActionClasses = cx__default["default"](className, "".concat(prefix, "--toolbar-action ").concat(prefix, "--overflow-menu"));
|
|
37
37
|
return /*#__PURE__*/React__default["default"].createElement(index["default"], _rollupPluginBabelHelpers["extends"]({
|
|
38
|
-
|
|
38
|
+
"aria-label": iconDescription,
|
|
39
39
|
renderIcon: renderIcon,
|
|
40
40
|
className: toolbarActionClasses,
|
|
41
41
|
title: iconDescription,
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp. 2016, 2023
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
import PropTypes from 'prop-types';
|
|
8
|
+
export interface DataTableSkeletonProps {
|
|
9
|
+
/**
|
|
10
|
+
* Specify an optional className to add.
|
|
11
|
+
*/
|
|
12
|
+
className?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Specify the number of columns that you want to render in the skeleton state
|
|
15
|
+
*/
|
|
16
|
+
columnCount: number;
|
|
17
|
+
/**
|
|
18
|
+
* Optionally specify whether you want the Skeleton to be rendered as a
|
|
19
|
+
* compact DataTable
|
|
20
|
+
*/
|
|
21
|
+
compact: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Optionally specify the displayed headers
|
|
24
|
+
*/
|
|
25
|
+
headers?: [{
|
|
26
|
+
header: string;
|
|
27
|
+
key: string;
|
|
28
|
+
}] | {
|
|
29
|
+
header: string;
|
|
30
|
+
key: string;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Specify the number of rows that you want to render in the skeleton state
|
|
34
|
+
*/
|
|
35
|
+
rowCount: number;
|
|
36
|
+
/**
|
|
37
|
+
* Specify if the table header should be rendered as part of the skeleton.
|
|
38
|
+
*/
|
|
39
|
+
showHeader: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Specify if the table toolbar should be rendered as part of the skeleton.
|
|
42
|
+
*/
|
|
43
|
+
showToolbar: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Optionally specify whether you want the DataTable to be zebra striped
|
|
46
|
+
*/
|
|
47
|
+
zebra: boolean;
|
|
48
|
+
}
|
|
49
|
+
declare const DataTableSkeleton: {
|
|
50
|
+
({ headers, rowCount, columnCount, zebra, compact, className, showHeader, showToolbar, ...rest }: {
|
|
51
|
+
[x: string]: any;
|
|
52
|
+
headers: any;
|
|
53
|
+
rowCount: any;
|
|
54
|
+
columnCount: any;
|
|
55
|
+
zebra: any;
|
|
56
|
+
compact: any;
|
|
57
|
+
className: any;
|
|
58
|
+
showHeader: any;
|
|
59
|
+
showToolbar: any;
|
|
60
|
+
}): JSX.Element;
|
|
61
|
+
propTypes: {
|
|
62
|
+
/**
|
|
63
|
+
* Specify an optional className to add.
|
|
64
|
+
*/
|
|
65
|
+
className: PropTypes.Requireable<string>;
|
|
66
|
+
/**
|
|
67
|
+
* Specify the number of columns that you want to render in the skeleton state
|
|
68
|
+
*/
|
|
69
|
+
columnCount: PropTypes.Requireable<number>;
|
|
70
|
+
/**
|
|
71
|
+
* Optionally specify whether you want the Skeleton to be rendered as a
|
|
72
|
+
* compact DataTable
|
|
73
|
+
*/
|
|
74
|
+
compact: PropTypes.Requireable<boolean>;
|
|
75
|
+
/**
|
|
76
|
+
* Optionally specify the displayed headers
|
|
77
|
+
*/
|
|
78
|
+
headers: PropTypes.Requireable<NonNullable<any[] | PropTypes.InferProps<{
|
|
79
|
+
key: PropTypes.Requireable<string>;
|
|
80
|
+
}> | null | undefined>>;
|
|
81
|
+
/**
|
|
82
|
+
* Specify the number of rows that you want to render in the skeleton state
|
|
83
|
+
*/
|
|
84
|
+
rowCount: PropTypes.Requireable<number>;
|
|
85
|
+
/**
|
|
86
|
+
* Specify if the table header should be rendered as part of the skeleton.
|
|
87
|
+
*/
|
|
88
|
+
showHeader: PropTypes.Requireable<boolean>;
|
|
89
|
+
/**
|
|
90
|
+
* Specify if the table toolbar should be rendered as part of the skeleton.
|
|
91
|
+
*/
|
|
92
|
+
showToolbar: PropTypes.Requireable<boolean>;
|
|
93
|
+
/**
|
|
94
|
+
* Optionally specify whether you want the DataTable to be zebra striped
|
|
95
|
+
*/
|
|
96
|
+
zebra: PropTypes.Requireable<boolean>;
|
|
97
|
+
};
|
|
98
|
+
defaultProps: {
|
|
99
|
+
rowCount: number;
|
|
100
|
+
columnCount: number;
|
|
101
|
+
zebra: boolean;
|
|
102
|
+
compact: boolean;
|
|
103
|
+
showHeader: boolean;
|
|
104
|
+
showToolbar: boolean;
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
export default DataTableSkeleton;
|
|
@@ -14,8 +14,14 @@ export interface OnChangeData<ItemType> {
|
|
|
14
14
|
}
|
|
15
15
|
export interface DropdownProps<ItemType> extends Omit<ReactAttr<HTMLDivElement>, ExcludedAttributes> {
|
|
16
16
|
/**
|
|
17
|
+
* Specify a label to be read by screen readers on the container node
|
|
17
18
|
* 'aria-label' of the ListBox component.
|
|
18
19
|
*/
|
|
20
|
+
['aria-label']?: string;
|
|
21
|
+
/**
|
|
22
|
+
* @deprecated please use `aria-label` instead.
|
|
23
|
+
* Specify a label to be read by screen readers on the container note.
|
|
24
|
+
*/
|
|
19
25
|
ariaLabel?: string;
|
|
20
26
|
/**
|
|
21
27
|
* Specify the direction of the dropdown. Can be either top or bottom.
|