@economic/taco 1.1.5-alpha.108 → 1.1.5-alpha.127

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (130) hide show
  1. package/dist/components/Accordion/Accordion.stories.d.ts +26 -0
  2. package/dist/components/Backdrop/Backdrop.stories.d.ts +7 -0
  3. package/dist/components/Badge/Badge.stories.d.ts +15 -0
  4. package/dist/components/Banner/Banner.stories.d.ts +23 -0
  5. package/dist/components/Button/Button.stories.d.ts +69 -0
  6. package/dist/components/Calendar/Calendar.d.ts +3 -1
  7. package/dist/components/Calendar/Calendar.stories.d.ts +13 -0
  8. package/dist/components/Card/Card.stories.d.ts +12 -0
  9. package/dist/components/Datepicker/Datepicker.stories.d.ts +43 -0
  10. package/dist/components/Dialog/Dialog.d.ts +1 -1
  11. package/dist/components/Dialog/Dialog.stories.d.ts +54 -0
  12. package/dist/components/Field/Field.stories.d.ts +14 -0
  13. package/dist/components/Form/Form.stories.d.ts +14 -0
  14. package/dist/components/Group/Group.d.ts +11 -1
  15. package/dist/components/Group/Group.stories.d.ts +23 -0
  16. package/dist/components/Hanger/Hanger.stories.d.ts +11 -0
  17. package/dist/components/HoverCard/HoverCard.stories.d.ts +28 -0
  18. package/dist/components/Icon/Icon.stories.d.ts +24 -0
  19. package/dist/components/Icon/components/ChevronLeftSolid.d.ts +3 -0
  20. package/dist/components/Icon/components/ChevronRightSolid.d.ts +3 -0
  21. package/dist/components/Icon/components/index.d.ts +1 -1
  22. package/dist/components/IconButton/IconButton.stories.d.ts +45 -0
  23. package/dist/components/Input/Input.d.ts +1 -1
  24. package/dist/components/Input/Input.stories.d.ts +43 -0
  25. package/dist/components/Listbox/Listbox.stories.d.ts +44 -0
  26. package/dist/components/Menu/Menu.d.ts +2 -2
  27. package/dist/components/Menu/Menu.stories.d.ts +93 -0
  28. package/dist/components/Menu/components/Item.d.ts +1 -1
  29. package/dist/components/Menu/components/Link.d.ts +1 -1
  30. package/dist/components/Navigation/Navigation.stories.d.ts +7 -0
  31. package/dist/components/Pagination/Pagination.stories.d.ts +28 -0
  32. package/dist/components/Popover/Popover.stories.d.ts +14 -0
  33. package/dist/components/Progress/Progress.stories.d.ts +8 -0
  34. package/dist/components/RadioGroup/RadioGroup.stories.d.ts +49 -0
  35. package/dist/components/SearchInput/SearchInput.stories.d.ts +41 -0
  36. package/dist/components/Select/Select.stories.d.ts +35 -0
  37. package/dist/components/Spinner/Spinner.stories.d.ts +15 -0
  38. package/dist/components/Table/Table.stories.d.ts +32 -0
  39. package/dist/components/Table/util/rowIndexPath.d.ts +2 -2
  40. package/dist/components/Tabs/Tabs.stories.d.ts +19 -0
  41. package/dist/components/Textarea/Textarea.stories.d.ts +40 -0
  42. package/dist/components/Toast/Toast.d.ts +2 -2
  43. package/dist/components/Toast/Toast.stories.d.ts +12 -0
  44. package/dist/components/Toast/Toaster.d.ts +2 -2
  45. package/dist/components/Tooltip/Tooltip.stories.d.ts +25 -0
  46. package/dist/components/Tour/Tour.stories.d.ts +11 -0
  47. package/dist/css/Typography.stories.d.ts +6 -0
  48. package/dist/esm/components/Badge/Badge.js +1 -1
  49. package/dist/esm/components/Badge/Badge.js.map +1 -1
  50. package/dist/esm/components/Calendar/Calendar.js +4 -11
  51. package/dist/esm/components/Calendar/Calendar.js.map +1 -1
  52. package/dist/esm/components/Checkbox/Checkbox.js.map +1 -1
  53. package/dist/esm/components/Combobox/Combobox.js.map +1 -1
  54. package/dist/esm/components/Combobox/useCombobox.js +12 -13
  55. package/dist/esm/components/Combobox/useCombobox.js.map +1 -1
  56. package/dist/esm/components/Datepicker/Datepicker.js.map +1 -1
  57. package/dist/esm/components/Dialog/Dialog.js +39 -58
  58. package/dist/esm/components/Dialog/Dialog.js.map +1 -1
  59. package/dist/esm/components/Dialog/components/Content.js.map +1 -1
  60. package/dist/esm/components/Dialog/components/Drawer.js.map +1 -1
  61. package/dist/esm/components/Field/Field.js +10 -12
  62. package/dist/esm/components/Field/Field.js.map +1 -1
  63. package/dist/esm/components/Form/Form.js +6 -8
  64. package/dist/esm/components/Form/Form.js.map +1 -1
  65. package/dist/esm/components/Group/Group.js +9 -8
  66. package/dist/esm/components/Group/Group.js.map +1 -1
  67. package/dist/esm/components/Hanger/Hanger.js +27 -35
  68. package/dist/esm/components/Hanger/Hanger.js.map +1 -1
  69. package/dist/esm/components/HoverCard/HoverCard.js +8 -9
  70. package/dist/esm/components/HoverCard/HoverCard.js.map +1 -1
  71. package/dist/esm/components/Icon/components/ChevronLeftSolid.js +20 -0
  72. package/dist/esm/components/Icon/components/ChevronLeftSolid.js.map +1 -0
  73. package/dist/esm/components/Icon/components/ChevronRightSolid.js +20 -0
  74. package/dist/esm/components/Icon/components/ChevronRightSolid.js.map +1 -0
  75. package/dist/esm/components/Icon/components/index.js +4 -0
  76. package/dist/esm/components/Icon/components/index.js.map +1 -1
  77. package/dist/esm/components/Listbox/ScrollableList.js +2 -2
  78. package/dist/esm/components/Listbox/ScrollableList.js.map +1 -1
  79. package/dist/esm/components/Listbox/useListbox.js +3 -2
  80. package/dist/esm/components/Listbox/useListbox.js.map +1 -1
  81. package/dist/esm/components/Listbox/useMultiListbox.js +7 -7
  82. package/dist/esm/components/Listbox/useMultiListbox.js.map +1 -1
  83. package/dist/esm/components/Menu/components/Content.js.map +1 -1
  84. package/dist/esm/components/Menu/components/RadioGroup.js.map +1 -1
  85. package/dist/esm/components/Navigation/Navigation.js +2 -1
  86. package/dist/esm/components/Navigation/Navigation.js.map +1 -1
  87. package/dist/esm/components/Pagination/PageNumbers.js.map +1 -1
  88. package/dist/esm/components/Pagination/usePaginationShortcuts.js +4 -5
  89. package/dist/esm/components/Pagination/usePaginationShortcuts.js.map +1 -1
  90. package/dist/esm/components/Popover/Primitives.js.map +1 -1
  91. package/dist/esm/components/RadioGroup/RadioGroup.js.map +1 -1
  92. package/dist/esm/components/SearchInput/SearchInput.js +1 -2
  93. package/dist/esm/components/SearchInput/SearchInput.js.map +1 -1
  94. package/dist/esm/components/Select/useSelect.js +6 -7
  95. package/dist/esm/components/Select/useSelect.js.map +1 -1
  96. package/dist/esm/components/Spinner/Spinner.js.map +1 -1
  97. package/dist/esm/components/Table/components/BaseTable.js.map +1 -1
  98. package/dist/esm/components/Table/components/WindowedTable.js.map +1 -1
  99. package/dist/esm/components/Table/hooks/plugins/useRowActions.js +2 -3
  100. package/dist/esm/components/Table/hooks/plugins/useRowActions.js.map +1 -1
  101. package/dist/esm/components/Table/hooks/useTable.js +5 -1
  102. package/dist/esm/components/Table/hooks/useTable.js.map +1 -1
  103. package/dist/esm/components/Table/hooks/useTableKeyboardNavigation.js +18 -13
  104. package/dist/esm/components/Table/hooks/useTableKeyboardNavigation.js.map +1 -1
  105. package/dist/esm/components/Table/util/rowIndexPath.js.map +1 -1
  106. package/dist/esm/components/Tabs/Tabs.js.map +1 -1
  107. package/dist/esm/components/Toast/Toast.js +6 -1
  108. package/dist/esm/components/Toast/Toast.js.map +1 -1
  109. package/dist/esm/components/Toast/Toaster.js.map +1 -1
  110. package/dist/esm/components/Toast/util.js.map +1 -1
  111. package/dist/esm/components/Tooltip/Tooltip.js.map +1 -1
  112. package/dist/esm/components/Tour/Tour.js +1 -2
  113. package/dist/esm/components/Tour/Tour.js.map +1 -1
  114. package/dist/esm/index.css +623 -635
  115. package/dist/esm/index.js +1 -1
  116. package/dist/esm/primitives/Button.js.map +1 -1
  117. package/dist/esm/utils/hooks/useListKeyboardNavigation.js +10 -11
  118. package/dist/esm/utils/hooks/useListKeyboardNavigation.js.map +1 -1
  119. package/dist/esm/utils/input.js +1 -1
  120. package/dist/esm/utils/input.js.map +1 -1
  121. package/dist/index.css +623 -635
  122. package/dist/primitives/Button.d.ts +2 -1
  123. package/dist/taco.cjs.development.js +201 -164
  124. package/dist/taco.cjs.development.js.map +1 -1
  125. package/dist/taco.cjs.production.min.js +1 -1
  126. package/dist/taco.cjs.production.min.js.map +1 -1
  127. package/dist/utils/hooks/useListKeyboardNavigation.d.ts +1 -1
  128. package/dist/utils/tailwind.d.ts +1 -1
  129. package/package.json +5 -6
  130. package/types.json +18 -4
@@ -14,7 +14,6 @@ var uuid = require('uuid');
14
14
  var framerMotion = require('framer-motion');
15
15
  var CheckboxPrimitive = require('@radix-ui/react-checkbox');
16
16
  var PopoverPrimitive = require('@radix-ui/react-popover');
17
- var keycode = _interopDefault(require('keycode'));
18
17
  var debounce = _interopDefault(require('lodash/debounce'));
19
18
  var dateFns = require('date-fns');
20
19
  var DialogPrimitive = require('@radix-ui/react-dialog');
@@ -517,6 +516,22 @@ function IconChevronLeftDouble(props, svgRef) {
517
516
 
518
517
  var ChevronLeftDouble = /*#__PURE__*/React.forwardRef(IconChevronLeftDouble);
519
518
 
519
+ function IconChevronLeftSolid(props, svgRef) {
520
+ return React.createElement("svg", Object.assign({
521
+ fill: "none",
522
+ xmlns: "http://www.w3.org/2000/svg",
523
+ viewBox: "0 0 24 24",
524
+ ref: svgRef
525
+ }, props), React.createElement("path", {
526
+ fillRule: "evenodd",
527
+ clipRule: "evenodd",
528
+ d: "M15.5 6.207a.5.5 0 00-.854-.353l-5.792 5.792a.5.5 0 000 .708l5.792 5.792a.5.5 0 00.854-.353V6.207z",
529
+ fill: "currentColor"
530
+ }));
531
+ }
532
+
533
+ var ChevronLeftSolid = /*#__PURE__*/React.forwardRef(IconChevronLeftSolid);
534
+
520
535
  function IconChevronLeft(props, svgRef) {
521
536
  return React.createElement("svg", Object.assign({
522
537
  xmlns: "http://www.w3.org/2000/svg",
@@ -545,6 +560,22 @@ function IconChevronRightDouble(props, svgRef) {
545
560
 
546
561
  var ChevronRightDouble = /*#__PURE__*/React.forwardRef(IconChevronRightDouble);
547
562
 
563
+ function IconChevronRightSolid(props, svgRef) {
564
+ return React.createElement("svg", Object.assign({
565
+ fill: "none",
566
+ xmlns: "http://www.w3.org/2000/svg",
567
+ viewBox: "0 0 24 24",
568
+ ref: svgRef
569
+ }, props), React.createElement("path", {
570
+ fillRule: "evenodd",
571
+ clipRule: "evenodd",
572
+ d: "M8.5 17.793a.5.5 0 00.854.353l5.792-5.792a.5.5 0 000-.708L9.354 5.854a.5.5 0 00-.854.353v11.586z",
573
+ fill: "currentColor"
574
+ }));
575
+ }
576
+
577
+ var ChevronRightSolid = /*#__PURE__*/React.forwardRef(IconChevronRightSolid);
578
+
548
579
  function IconChevronRight(props, svgRef) {
549
580
  return React.createElement("svg", Object.assign({
550
581
  xmlns: "http://www.w3.org/2000/svg",
@@ -3025,8 +3056,10 @@ const icons = {
3025
3056
  'chevron-down-solid': ChevronDownSolid,
3026
3057
  'chevron-down': ChevronDown,
3027
3058
  'chevron-left-double': ChevronLeftDouble,
3059
+ 'chevron-left-solid': ChevronLeftSolid,
3028
3060
  'chevron-left': ChevronLeft,
3029
3061
  'chevron-right-double': ChevronRightDouble,
3062
+ 'chevron-right-solid': ChevronRightSolid,
3030
3063
  'chevron-right': ChevronRight,
3031
3064
  'chevron-up-double': ChevronUpDouble,
3032
3065
  'chevron-up-solid': ChevronUpSolid,
@@ -3203,17 +3236,17 @@ const icons = {
3203
3236
  zoom: Zoom
3204
3237
  };
3205
3238
 
3206
- var _excluded = ["name"];
3207
- var Icon = /*#__PURE__*/React__default.forwardRef(function Icon(props, ref) {
3239
+ const Icon = /*#__PURE__*/React__default.forwardRef(function Icon(props, ref) {
3208
3240
  var _props$className;
3209
3241
 
3210
- var name = props.name,
3211
- otherProps = _objectWithoutPropertiesLoose(props, _excluded);
3212
-
3213
- var Component = icons[name];
3242
+ const {
3243
+ name,
3244
+ ...otherProps
3245
+ } = props;
3246
+ const Component = icons[name];
3214
3247
  /* 24x24 _at the base body font_ - must be em so that they scale with font size - tailwind spacing uses rem */
3215
3248
 
3216
- var className = cn('inline-flex h-[1.715em] w-[1.715em] flex-shrink-0', props.className, {
3249
+ const className = cn('inline-flex h-[1.715em] w-[1.715em] flex-shrink-0', props.className, {
3217
3250
  'p-[3px]': (_props$className = props.className) === null || _props$className === void 0 ? void 0 : _props$className.includes('rounded-full')
3218
3251
  });
3219
3252
  return Component ? React__default.createElement(Component, Object.assign({}, otherProps, {
@@ -3225,7 +3258,7 @@ var Icon = /*#__PURE__*/React__default.forwardRef(function Icon(props, ref) {
3225
3258
  })) : null;
3226
3259
  });
3227
3260
 
3228
- var _excluded$1 = ["id"],
3261
+ var _excluded = ["id"],
3229
3262
  _excluded2 = ["id", "defaultId", "onChange", "as"];
3230
3263
  var AccordionContext = /*#__PURE__*/React__default.createContext({
3231
3264
  as: 'h2'
@@ -3263,7 +3296,7 @@ var Content = /*#__PURE__*/React__default.forwardRef(function AccordionContent(p
3263
3296
 
3264
3297
  var Item = function Item(props) {
3265
3298
  var id = props.id,
3266
- otherProps = _objectWithoutPropertiesLoose(props, _excluded$1);
3299
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded);
3267
3300
 
3268
3301
  return React__default.createElement(AccordionPrimitive.Item, Object.assign({}, otherProps, {
3269
3302
  value: id
@@ -3364,7 +3397,7 @@ const getOutlineClasses = state => {
3364
3397
  }
3365
3398
  };
3366
3399
 
3367
- var _excluded$2 = ["children", "compact", "outline", "state"];
3400
+ var _excluded$1 = ["children", "compact", "outline", "state"];
3368
3401
  var Badge = /*#__PURE__*/React.forwardRef(function Badge(props, ref) {
3369
3402
  var _cn;
3370
3403
 
@@ -3374,9 +3407,9 @@ var Badge = /*#__PURE__*/React.forwardRef(function Badge(props, ref) {
3374
3407
  _props$outline = props.outline,
3375
3408
  outline = _props$outline === void 0 ? false : _props$outline,
3376
3409
  state = props.state,
3377
- otherProps = _objectWithoutPropertiesLoose(props, _excluded$2);
3410
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded$1);
3378
3411
 
3379
- var className = cn('rounded-full border font-bold text-xs uppercase overflow-hidden whitespace-nowrap inline-flex items-center justify-center h-5', (_cn = {}, _cn[getOutlineClasses(state)] = outline, _cn["border-transparent " + getStateClasses(state)] = !outline, _cn['h-2 w-2 min-w-0'] = compact, _cn['h-5 py-0 px-1.5'] = !compact, _cn), props.className);
3412
+ var className = cn('rounded-full border font-bold text-xs uppercase overflow-hidden whitespace-nowrap inline-flex items-center justify-center', (_cn = {}, _cn[getOutlineClasses(state)] = outline, _cn["border-transparent " + getStateClasses(state)] = !outline, _cn['h-2 w-2 min-w-0'] = compact, _cn['h-5 py-0 px-1.5'] = !compact, _cn), props.className);
3380
3413
  return React.createElement("span", Object.assign({}, otherProps, {
3381
3414
  "aria-atomic": "true",
3382
3415
  "aria-live": "polite",
@@ -3577,10 +3610,10 @@ var Banner = /*#__PURE__*/React.forwardRef(function Banner(props, ref) {
3577
3610
  }) : null);
3578
3611
  });
3579
3612
 
3580
- var _excluded$3 = ["fluid"];
3613
+ var _excluded$2 = ["fluid"];
3581
3614
  var Button$1 = /*#__PURE__*/React.forwardRef(function Button(props, ref) {
3582
3615
  var fluid = props.fluid,
3583
- otherProps = _objectWithoutPropertiesLoose(props, _excluded$3);
3616
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded$2);
3584
3617
 
3585
3618
  var className = cn(getButtonClasses(), getAppearanceClasses(otherProps.appearance), 'rounded px-3', {
3586
3619
  'cursor-not-allowed opacity-50': props.disabled,
@@ -3756,6 +3789,11 @@ const Toast = ({
3756
3789
  });
3757
3790
  const timer = useTimer(autoClose, handleClose);
3758
3791
  const controls = framerMotion.useAnimation();
3792
+
3793
+ if (!content) {
3794
+ console.warn(`Toast requires 'content' property, which can't be empty string, null or undefined. Current content value is set to ${content === '' ? 'empty string' : content}.`);
3795
+ }
3796
+
3759
3797
  React__default.useEffect(() => {
3760
3798
  if (autoClose) {
3761
3799
  timer.start();
@@ -3791,7 +3829,7 @@ const Toast = ({
3791
3829
  "data-taco": "toast",
3792
3830
  onMouseEnter: timer.pause,
3793
3831
  onMouseLeave: timer.resume
3794
- }), getBadgeIcon(type), content && React__default.createElement("div", {
3832
+ }), getBadgeIcon(type), React__default.createElement("div", {
3795
3833
  className: "flex-grow"
3796
3834
  }, content), React__default.createElement(IconButton, {
3797
3835
  appearance: "discrete",
@@ -4058,14 +4096,7 @@ const Provider = props => {
4058
4096
  const useTaco = () => React.useContext(Context);
4059
4097
  const useLocalization = () => useTaco().localization;
4060
4098
 
4061
- var _excluded$4 = ["onChange", "value"];
4062
-
4063
- var renderDay = function renderDay(day, modifiers) {
4064
- return modifiers.disabled ? React.createElement("span", {
4065
- className: "dot"
4066
- }) : day.getDate();
4067
- };
4068
-
4099
+ var _excluded$3 = ["onChange", "value", "disabledDays"];
4069
4100
  var thisYear = /*#__PURE__*/new Date().getFullYear();
4070
4101
  var years = [];
4071
4102
 
@@ -4137,7 +4168,8 @@ var Navbar = /*#__PURE__*/React.memo(function (_ref) {
4137
4168
  var Calendar$1 = /*#__PURE__*/React.forwardRef(function Calendar(props, ref) {
4138
4169
  var handleChange = props.onChange,
4139
4170
  value = props.value,
4140
- otherProps = _objectWithoutPropertiesLoose(props, _excluded$4);
4171
+ disabledDays = props.disabledDays,
4172
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded$3);
4141
4173
 
4142
4174
  var _useLocalization2 = useLocalization(),
4143
4175
  locale = _useLocalization2.locale,
@@ -4194,14 +4226,13 @@ var Calendar$1 = /*#__PURE__*/React.forwardRef(function Calendar(props, ref) {
4194
4226
  return null;
4195
4227
  },
4196
4228
  todayButton: texts.calendar.actions.today,
4197
- showOutsideDays: true,
4198
- renderDay: renderDay,
4199
4229
  numberOfMonths: 1,
4200
- ref: ref
4230
+ ref: ref,
4231
+ disabledDays: disabledDays
4201
4232
  })));
4202
4233
  });
4203
4234
 
4204
- var _excluded$5 = ["checked", "highlighted", "indeterminate", "invalid", "label", "onChange"];
4235
+ var _excluded$4 = ["checked", "highlighted", "indeterminate", "invalid", "label", "onChange"];
4205
4236
  var Checkbox = /*#__PURE__*/React.forwardRef(function Checkbox(props, ref) {
4206
4237
  var checked = props.checked,
4207
4238
  highlighted = props.highlighted,
@@ -4209,7 +4240,7 @@ var Checkbox = /*#__PURE__*/React.forwardRef(function Checkbox(props, ref) {
4209
4240
  invalid = props.invalid,
4210
4241
  label = props.label,
4211
4242
  onChange = props.onChange,
4212
- otherProps = _objectWithoutPropertiesLoose(props, _excluded$5);
4243
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded$4);
4213
4244
 
4214
4245
  var className = cn('bg-white h-5 w-5 border rounded text-sm flex-shrink-0 self-start mt-[0.1rem] focus:yt-focus', //hover:shadow-[0_0_0_1px_rgba(235,235,235,1)]
4215
4246
  props.className, {
@@ -4360,25 +4391,25 @@ const Input = /*#__PURE__*/React.forwardRef(function Input(props, ref) {
4360
4391
  return input;
4361
4392
  });
4362
4393
 
4363
- var getNextIndexFromKeycode = function getNextIndexFromKeycode(keyCode, length, index, direction) {
4394
+ var getNextIndexFromKey = function getNextIndexFromKey(key, length, index, direction) {
4364
4395
  if (direction === void 0) {
4365
4396
  direction = 'vertical';
4366
4397
  }
4367
4398
 
4368
- var previousKey = direction === 'horizontal' ? 'left' : 'up';
4369
- var nextKey = direction === 'horizontal' ? 'right' : 'down';
4399
+ var previousKey = direction === 'horizontal' ? 'ArrowLeft' : 'ArrowUp';
4400
+ var nextKey = direction === 'horizontal' ? 'ArrowRight' : 'ArrowDown';
4370
4401
 
4371
- switch (keyCode) {
4372
- case keycode(previousKey):
4402
+ switch (key) {
4403
+ case previousKey:
4373
4404
  return index !== undefined ? index - 1 < 0 ? 0 : index - 1 : index;
4374
4405
 
4375
- case keycode(nextKey):
4406
+ case nextKey:
4376
4407
  return index !== undefined ? index + 1 >= length ? index : index + 1 : index;
4377
4408
 
4378
- case keycode('home'):
4409
+ case 'Home':
4379
4410
  return 0;
4380
4411
 
4381
- case keycode('end'):
4412
+ case 'End':
4382
4413
  return length - 1;
4383
4414
 
4384
4415
  default:
@@ -4401,7 +4432,7 @@ var useListKeyboardNavigation = function useListKeyboardNavigation(length, optio
4401
4432
  setIndex = _React$useState[1];
4402
4433
 
4403
4434
  var getNextIndex = function getNextIndex(event) {
4404
- var nextIndex = getNextIndexFromKeycode(event.keyCode, length, index, options.direction);
4435
+ var nextIndex = getNextIndexFromKey(event.key, length, index, options.direction);
4405
4436
 
4406
4437
  if (nextIndex !== undefined) {
4407
4438
  event.preventDefault();
@@ -4452,7 +4483,7 @@ var useListScrollTo = function useListScrollTo(internalRef, itemRefs) {
4452
4483
  const getId = (id, value) => `${id}_${value}`;
4453
4484
 
4454
4485
  const getNextEnabledItem = (event, data, index) => {
4455
- const nextIndex = getNextIndexFromKeycode(event.keyCode, data.length, index);
4486
+ const nextIndex = getNextIndexFromKey(event.key, data.length, index);
4456
4487
 
4457
4488
  if (nextIndex) {
4458
4489
  if (nextIndex === index) {
@@ -4635,7 +4666,7 @@ const createCustomKeyboardEvent = event => {
4635
4666
  } else {
4636
4667
  customKeyboardEvent = document.createEvent('Event');
4637
4668
  customKeyboardEvent.initEvent(event.type, true, true);
4638
- customKeyboardEvent.keyCode = event.keyCode;
4669
+ customKeyboardEvent.key = event.key;
4639
4670
  customKeyboardEvent.charCode = event.charCode;
4640
4671
  }
4641
4672
 
@@ -4946,13 +4977,13 @@ const useCombobox = ({
4946
4977
  const handleInputKeyDown = event => {
4947
4978
  event.persist();
4948
4979
 
4949
- switch (event.keyCode) {
4950
- case keycode('backspace'):
4980
+ switch (event.key) {
4981
+ case 'Backspace':
4951
4982
  {
4952
4983
  return;
4953
4984
  }
4954
4985
 
4955
- case keycode('escape'):
4986
+ case 'Escape':
4956
4987
  {
4957
4988
  event.preventDefault();
4958
4989
  setInputValue(convertToInputValue(value));
@@ -4960,10 +4991,10 @@ const useCombobox = ({
4960
4991
  return;
4961
4992
  }
4962
4993
 
4963
- case keycode('tab'):
4964
- case keycode('enter'):
4994
+ case 'Tab':
4995
+ case 'Enter':
4965
4996
  {
4966
- if (event.keyCode !== keycode('tab')) {
4997
+ if (event.key !== 'Tab') {
4967
4998
  event.preventDefault();
4968
4999
  }
4969
5000
 
@@ -4972,7 +5003,7 @@ const useCombobox = ({
4972
5003
  return;
4973
5004
  }
4974
5005
 
4975
- case keycode('down'):
5006
+ case 'ArrowDown':
4976
5007
  if (open) {
4977
5008
  event.preventDefault();
4978
5009
  } else {
@@ -4983,9 +5014,9 @@ const useCombobox = ({
4983
5014
 
4984
5015
  break;
4985
5016
 
4986
- case keycode('up'):
4987
- case keycode('home'):
4988
- case keycode('end'):
5017
+ case 'ArrowUp':
5018
+ case 'Home':
5019
+ case 'End':
4989
5020
  {
4990
5021
  if (open) {
4991
5022
  event.preventDefault();
@@ -5001,9 +5032,9 @@ const useCombobox = ({
5001
5032
  }
5002
5033
 
5003
5034
  if (inline && !open) {
5004
- if (event.keyCode === keycode('up') || event.keyCode === keycode('down')) {
5035
+ if (event.key === 'ArrowUp' || event.key === 'ArrowDown') {
5005
5036
  event.preventDefault();
5006
- const initialIndex = event.keyCode === keycode('up') ? data.length - 1 : 0;
5037
+ const initialIndex = event.key === 'ArrowUp' ? data.length - 1 : 0;
5007
5038
  setCurrentIndex(currentIndex !== undefined ? currentIndex : initialIndex);
5008
5039
  setOpen(true);
5009
5040
  }
@@ -5121,12 +5152,12 @@ var useBoundingClientRectListener = function useBoundingClientRectListener(ref)
5121
5152
  return dimensions;
5122
5153
  };
5123
5154
 
5124
- var _excluded$6 = ["className", "dialog", "style"];
5155
+ var _excluded$5 = ["className", "dialog", "style"];
5125
5156
  var Combobox = /*#__PURE__*/React.forwardRef(function Combobox(props, ref) {
5126
5157
  var externalClassName = props.className,
5127
5158
  dialog = props.dialog,
5128
5159
  style = props.style,
5129
- otherProps = _objectWithoutPropertiesLoose(props, _excluded$6);
5160
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded$5);
5130
5161
 
5131
5162
  var _useCombobox = useCombobox(otherProps, ref),
5132
5163
  combobox = _useCombobox.combobox,
@@ -5495,14 +5526,14 @@ Popover.Trigger = Trigger$1;
5495
5526
  Popover.Content = Content$1;
5496
5527
  Popover.Close = Close$1;
5497
5528
 
5498
- var _excluded$7 = ["className", "onReset", "style", "shortcuts", "shortcutsText"];
5529
+ var _excluded$6 = ["className", "onReset", "style", "shortcuts", "shortcutsText"];
5499
5530
  var Datepicker = /*#__PURE__*/React.forwardRef(function Datepicker(props, ref) {
5500
5531
  var externalClassName = props.className,
5501
5532
  handleReset = props.onReset,
5502
5533
  style = props.style,
5503
5534
  shortcuts = props.shortcuts,
5504
5535
  shortcutsText = props.shortcutsText,
5505
- otherProps = _objectWithoutPropertiesLoose(props, _excluded$7);
5536
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded$6);
5506
5537
 
5507
5538
  var _useDatepicker = useDatepicker(otherProps, ref),
5508
5539
  calendar = _useDatepicker.calendar,
@@ -5797,7 +5828,7 @@ const Extra = /*#__PURE__*/React.forwardRef(function DialogExtra(props, ref) {
5797
5828
  });
5798
5829
  Extra.displayName = 'DialogExtra';
5799
5830
 
5800
- var _excluded$8 = ["children", "closeOnEscape", "defaultOpen", "draggable", "onChange", "onClose", "open", "showCloseButton", "size", "trigger"];
5831
+ var _excluded$7 = ["children", "closeOnEscape", "defaultOpen", "draggable", "onChange", "onClose", "open", "showCloseButton", "size", "trigger"];
5801
5832
 
5802
5833
  var useSeparatedChildren = function useSeparatedChildren(initialChildren) {
5803
5834
  return React.useMemo(function () {
@@ -5834,7 +5865,7 @@ var Dialog = /*#__PURE__*/React.forwardRef(function Dialog(props, ref) {
5834
5865
  _props$size = props.size,
5835
5866
  size = _props$size === void 0 ? 'sm' : _props$size,
5836
5867
  trigger = props.trigger,
5837
- otherProps = _objectWithoutPropertiesLoose(props, _excluded$8);
5868
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded$7);
5838
5869
 
5839
5870
  var _useSeparatedChildren = useSeparatedChildren(initialChildren),
5840
5871
  children = _useSeparatedChildren[0],
@@ -5884,19 +5915,18 @@ Dialog.Extra = Extra;
5884
5915
  Dialog.Drawer = Drawer;
5885
5916
  Dialog.Close = Close$2;
5886
5917
 
5887
- var _excluded$9 = ["disabled", "children", "invalid", "message"];
5888
- var Field = /*#__PURE__*/React.forwardRef(function Field(props, ref) {
5889
- var disabled = props.disabled,
5890
- children = props.children,
5891
- _props$invalid = props.invalid,
5892
- invalid = _props$invalid === void 0 ? false : _props$invalid,
5893
- message = props.message,
5894
- otherProps = _objectWithoutPropertiesLoose(props, _excluded$9);
5895
-
5896
- var className = cn('flex flex-col font-bold text-xs leading-loose pb-4 min-h-[theme(spacing.18)]', {
5918
+ const Field = /*#__PURE__*/React.forwardRef(function Field(props, ref) {
5919
+ const {
5920
+ disabled,
5921
+ children,
5922
+ invalid = false,
5923
+ message,
5924
+ ...otherProps
5925
+ } = props;
5926
+ const className = cn('flex flex-col font-bold text-xs leading-loose pb-4 min-h-[theme(spacing.18)]', {
5897
5927
  'text-grey-dark': disabled
5898
5928
  }, props.className);
5899
- var messageClassName = cn('h-4 text-xs text-left leading-normal font-normal truncate -mb-4', {
5929
+ const messageClassName = cn('h-4 text-xs text-left leading-normal font-normal truncate -mb-4', {
5900
5930
  'text-grey-darkest': !invalid,
5901
5931
  'text-red': invalid,
5902
5932
  'opacity-50': disabled
@@ -5911,13 +5941,12 @@ var Field = /*#__PURE__*/React.forwardRef(function Field(props, ref) {
5911
5941
  }, message));
5912
5942
  });
5913
5943
 
5914
- var _excluded$a = ["horizontal"];
5915
- var Form = /*#__PURE__*/React.forwardRef(function Form(props, ref) {
5916
- var _props$horizontal = props.horizontal,
5917
- horizontal = _props$horizontal === void 0 ? false : _props$horizontal,
5918
- otherProps = _objectWithoutPropertiesLoose(props, _excluded$a);
5919
-
5920
- var className = cn('yt-form', {
5944
+ const Form = /*#__PURE__*/React.forwardRef(function Form(props, ref) {
5945
+ const {
5946
+ horizontal = false,
5947
+ ...otherProps
5948
+ } = props;
5949
+ const className = cn('yt-form', {
5921
5950
  'yt-form--horizontal flex flex-wrap': horizontal
5922
5951
  }, props.className);
5923
5952
  return React.createElement("form", Object.assign({}, otherProps, {
@@ -5927,13 +5956,15 @@ var Form = /*#__PURE__*/React.forwardRef(function Form(props, ref) {
5927
5956
  }));
5928
5957
  });
5929
5958
 
5930
- var _excluded$b = ["as"];
5931
- var Group = /*#__PURE__*/React.forwardRef(function Group(props, ref) {
5932
- var _props$as = props.as,
5933
- Tag = _props$as === void 0 ? 'span' : _props$as,
5934
- otherProps = _objectWithoutPropertiesLoose(props, _excluded$b);
5935
-
5936
- var className = cn('flex ', props.className);
5959
+ const Group = /*#__PURE__*/React.forwardRef(function Group(props, ref) {
5960
+ const {
5961
+ as: Tag = 'span',
5962
+ orientation = 'horizontal',
5963
+ ...otherProps
5964
+ } = props;
5965
+ const className = cn('flex ', 'gap-2', {
5966
+ 'flex-col ': orientation === 'vertical'
5967
+ }, props.className);
5937
5968
  return React.createElement(Tag, Object.assign({}, otherProps, {
5938
5969
  className: className,
5939
5970
  "data-taco": "group",
@@ -5941,19 +5972,18 @@ var Group = /*#__PURE__*/React.forwardRef(function Group(props, ref) {
5941
5972
  }));
5942
5973
  });
5943
5974
 
5944
- var _excluded$c = ["anchor", "children", "defaultOpen"];
5945
- var HangerContext = /*#__PURE__*/React.createContext({
5975
+ const HangerContext = /*#__PURE__*/React.createContext({
5946
5976
  props: {},
5947
5977
  ref: null
5948
5978
  });
5949
- var Anchor = /*#__PURE__*/React.forwardRef(function HangerAnchor(props, ref) {
5979
+ const Anchor = /*#__PURE__*/React.forwardRef(function HangerAnchor(props, ref) {
5950
5980
  var _props$children;
5951
5981
 
5952
- var context = React.useContext(HangerContext);
5953
- var children = props.children;
5982
+ const context = React.useContext(HangerContext);
5983
+ let children = props.children;
5954
5984
 
5955
5985
  if (React.isValidElement(props.children) && typeof ((_props$children = props.children) === null || _props$children === void 0 ? void 0 : _props$children.type) === 'function') {
5956
- console.warn("Hanger.Anchor requires its child to forwardRef so that it can attach to the dom element. Did you mean to wrap '" + props.children.type.name + "' in React.forwardRef()? Taco has wrapped '" + props.children.type.name + "' in a 'span' to maintain functionality, but this may cause unintended behaviour");
5986
+ console.warn(`Hanger.Anchor requires its child to forwardRef so that it can attach to the dom element. Did you mean to wrap '${props.children.type.name}' in React.forwardRef()? Taco has wrapped '${props.children.type.name}' in a 'span' to maintain functionality, but this may cause unintended behaviour`);
5957
5987
  children = React.createElement("span", null, props.children);
5958
5988
  }
5959
5989
 
@@ -5963,22 +5993,21 @@ var Anchor = /*#__PURE__*/React.forwardRef(function HangerAnchor(props, ref) {
5963
5993
  asChild: true
5964
5994
  }));
5965
5995
  });
5966
- var Title$1 = /*#__PURE__*/React.forwardRef(function DialogTitle(props, ref) {
5967
- var className = cn('mb-1 text-base font-bold flex w-full', props.className);
5996
+ const Title$1 = /*#__PURE__*/React.forwardRef(function DialogTitle(props, ref) {
5997
+ const className = cn('mb-1 text-base font-bold flex w-full', props.className);
5968
5998
  return React.createElement("span", Object.assign({}, props, {
5969
5999
  className: className,
5970
6000
  ref: ref
5971
6001
  }));
5972
6002
  });
5973
- var Content$3 = /*#__PURE__*/React.forwardRef(function HangerContent(props, ref) {
5974
- var context = React.useContext(HangerContext);
5975
-
5976
- var _useLocalization = useLocalization(),
5977
- texts = _useLocalization.texts;
5978
-
5979
- var className = cn('wcag-blue border border-transparent rounded p-3 pr-12 yt-shadow z-[996] focus:border-transparent max-w-sm', props.className);
6003
+ const Content$3 = /*#__PURE__*/React.forwardRef(function HangerContent(props, ref) {
6004
+ const context = React.useContext(HangerContext);
6005
+ const {
6006
+ texts
6007
+ } = useLocalization();
6008
+ const className = cn('wcag-blue border border-transparent rounded p-3 pr-12 yt-shadow z-[996] focus:border-transparent max-w-sm', props.className);
5980
6009
 
5981
- var handleInteractOutside = function handleInteractOutside(event) {
6010
+ const handleInteractOutside = event => {
5982
6011
  event.preventDefault();
5983
6012
  };
5984
6013
 
@@ -6000,25 +6029,20 @@ var Content$3 = /*#__PURE__*/React.forwardRef(function HangerContent(props, ref)
6000
6029
  onClick: context.props.onClose
6001
6030
  })));
6002
6031
  });
6003
- var Hanger = /*#__PURE__*/React.forwardRef(function Hanger(props, ref) {
6004
- var anchor = props.anchor,
6005
- children = props.children,
6006
- _props$defaultOpen = props.defaultOpen,
6007
- defaultOpen = _props$defaultOpen === void 0 ? true : _props$defaultOpen,
6008
- otherProps = _objectWithoutPropertiesLoose(props, _excluded$c);
6009
-
6010
- var context = React.useMemo(function () {
6011
- return {
6012
- props: otherProps,
6013
- ref: ref
6014
- };
6015
- }, [otherProps]); // we do this to ensure hangers are mounted after their containers, e.g. if the container is another portal
6016
-
6017
- var _React$useState = React.useState(false),
6018
- open = _React$useState[0],
6019
- setOpen = _React$useState[1];
6032
+ const Hanger = /*#__PURE__*/React.forwardRef(function Hanger(props, ref) {
6033
+ const {
6034
+ anchor,
6035
+ children,
6036
+ defaultOpen = true,
6037
+ ...otherProps
6038
+ } = props;
6039
+ const context = React.useMemo(() => ({
6040
+ props: otherProps,
6041
+ ref
6042
+ }), [otherProps]); // we do this to ensure hangers are mounted after their containers, e.g. if the container is another portal
6020
6043
 
6021
- React.useEffect(function () {
6044
+ const [open, setOpen] = React.useState(false);
6045
+ React.useEffect(() => {
6022
6046
  if (defaultOpen) {
6023
6047
  setOpen(defaultOpen);
6024
6048
  }
@@ -6034,25 +6058,25 @@ Hanger.Anchor = Anchor;
6034
6058
  Hanger.Content = Content$3;
6035
6059
  Hanger.Title = Title$1;
6036
6060
 
6037
- var _excluded$d = ["placement"];
6038
- var Trigger$3 = /*#__PURE__*/React.forwardRef(function HoverCardTrigger(props, ref) {
6061
+ const Trigger$3 = /*#__PURE__*/React.forwardRef(function HoverCardTrigger(props, ref) {
6039
6062
  return React.createElement(HoverCardPrimitive.Trigger, Object.assign({}, props, {
6040
6063
  asChild: true,
6041
6064
  ref: ref
6042
6065
  }));
6043
6066
  });
6044
- var Content$4 = /*#__PURE__*/React.forwardRef(function HoverCardContent(externalProps, ref) {
6045
- var placement = externalProps.placement,
6046
- props = _objectWithoutPropertiesLoose(externalProps, _excluded$d);
6047
-
6048
- var className = cn('bg-white rounded p-3 yt-shadow', props.className);
6067
+ const Content$4 = /*#__PURE__*/React.forwardRef(function HoverCardContent(externalProps, ref) {
6068
+ const {
6069
+ placement,
6070
+ ...props
6071
+ } = externalProps;
6072
+ const className = cn('bg-white rounded p-3 yt-shadow', props.className);
6049
6073
  return React.createElement(HoverCardPrimitive.Content, Object.assign({}, props, {
6050
6074
  className: className,
6051
6075
  ref: ref,
6052
6076
  side: placement
6053
6077
  }));
6054
6078
  });
6055
- var HoverCard = function HoverCard(props) {
6079
+ const HoverCard = props => {
6056
6080
  return React.createElement(HoverCardPrimitive.Root, Object.assign({}, props, {
6057
6081
  openDelay: 300
6058
6082
  }));
@@ -6077,7 +6101,7 @@ const SearchInput = /*#__PURE__*/React.forwardRef(function SearchInput({
6077
6101
  const handleKeyDown = event => {
6078
6102
  var _props$onKeyDown;
6079
6103
 
6080
- const isEnterKeyPressed = event.keyCode === keycode('enter');
6104
+ const isEnterKeyPressed = event.key === 'Enter';
6081
6105
 
6082
6106
  if (isEnterKeyPressed) {
6083
6107
  handleClick();
@@ -6180,9 +6204,10 @@ const useListbox = ({
6180
6204
  }, [data]);
6181
6205
 
6182
6206
  const handleListboxKeyDown = event => {
6183
- const charKey = String.fromCharCode(event.keyCode);
6207
+ const charKey = event.key; // event.key always returns the whole string (String.fromCharCode(event.keyCode) does not)
6208
+ // We need to filter out only alphabetical or numeric letters, that's why that condition has been changed
6184
6209
 
6185
- if (charKey.match(/(\w)/g)) {
6210
+ if (charKey.length === 1 && /(\w)/g.test(charKey)) {
6186
6211
  const nextIndex = getNextIndex(charKey);
6187
6212
 
6188
6213
  if (nextIndex > -1 && nextIndex !== currentIndex) {
@@ -6355,9 +6380,10 @@ const useMultiListbox = ({
6355
6380
  };
6356
6381
 
6357
6382
  const handleListboxKeyDown = (event, index) => {
6358
- const charKey = String.fromCharCode(event.keyCode);
6383
+ const charKey = event.key; // event.key always returns the whole string (String.fromCharCode(event.keyCode) does not)
6384
+ // We need to filter out only alphabetical or numeric letters, that's why that condition has been changed
6359
6385
 
6360
- if (charKey.match(/(\w)/g)) {
6386
+ if (charKey.length === 1 && /(\w)/g.test(charKey)) {
6361
6387
  const nextIndex = getNextIndex(charKey);
6362
6388
 
6363
6389
  if (nextIndex > -1 && nextIndex !== currentIndex) {
@@ -6367,22 +6393,22 @@ const useMultiListbox = ({
6367
6393
  return;
6368
6394
  }
6369
6395
 
6370
- switch (event.keyCode) {
6371
- case keycode('space'):
6396
+ switch (event.key) {
6397
+ case ' ':
6372
6398
  {
6373
6399
  event.preventDefault();
6374
6400
  setInputValueByIndex(index);
6375
6401
  break;
6376
6402
  }
6377
6403
 
6378
- case keycode('enter'):
6404
+ case 'Enter':
6379
6405
  {
6380
6406
  setInputValueByIndex(index);
6381
6407
  break;
6382
6408
  }
6383
6409
  }
6384
6410
 
6385
- setCurrentIndex(index);
6411
+ setCurrentIndex(index !== undefined ? index : 0);
6386
6412
 
6387
6413
  if (onKeyDown) {
6388
6414
  event.persist();
@@ -7043,7 +7069,8 @@ const MenuGroup = /*#__PURE__*/React__default.forwardRef(function MenuGroup(prop
7043
7069
  const Menu$2 = /*#__PURE__*/React__default.forwardRef(function Menu(props, ref) {
7044
7070
  const scrollableAreas = React__default.useMemo(() => {
7045
7071
  const scrollableAreas = [];
7046
- React__default.Children.toArray(props.children).filter(child => !!child).map(child => {
7072
+ const children = React__default.Children.toArray(props.children).filter(child => !!child);
7073
+ children.forEach(child => {
7047
7074
  if (child.props.fixed) {
7048
7075
  scrollableAreas.push(child);
7049
7076
  } else {
@@ -7180,15 +7207,15 @@ const useSelect = ({
7180
7207
  }, []); // event handlers
7181
7208
 
7182
7209
  const handleButtonKeyDown = event => {
7183
- if (event.keyCode === keycode('up') || event.keyCode === keycode('down')) {
7210
+ if (event.key === 'ArrowUp' || event.key === 'ArrowDown') {
7184
7211
  event.preventDefault();
7185
7212
  setOpen(true);
7186
7213
  }
7187
7214
  };
7188
7215
 
7189
7216
  const handleListboxKeyDown = event => {
7190
- switch (event.keyCode) {
7191
- case keycode('escape'):
7217
+ switch (event.key) {
7218
+ case 'Escape':
7192
7219
  {
7193
7220
  event.preventDefault();
7194
7221
 
@@ -7200,10 +7227,10 @@ const useSelect = ({
7200
7227
  break;
7201
7228
  }
7202
7229
 
7203
- case keycode('tab'):
7204
- case keycode('enter'):
7230
+ case 'Tab':
7231
+ case 'Enter':
7205
7232
  {
7206
- if (event.keyCode !== keycode('tab')) {
7233
+ if (event.key !== 'Tab') {
7207
7234
  event.preventDefault();
7208
7235
  }
7209
7236
 
@@ -7422,25 +7449,25 @@ const usePaginationShortcuts = ({
7422
7449
  dangerouslyHijackGlobalKeyboardNavigation: useGlobalKeyboardNavigation
7423
7450
  }) => {
7424
7451
  const onKeyDown = event => {
7425
- if (setPageIndex && event.keyCode === keycode('home')) {
7452
+ if (setPageIndex && event.key === 'Home') {
7426
7453
  event.preventDefault();
7427
7454
  setPageIndex(0);
7428
7455
  return;
7429
7456
  }
7430
7457
 
7431
- if (setPageIndex && event.keyCode === keycode('end')) {
7458
+ if (setPageIndex && event.key === 'End') {
7432
7459
  event.preventDefault();
7433
7460
  setPageIndex(maxPageIndex);
7434
7461
  return;
7435
7462
  }
7436
7463
 
7437
- if (setPageIndex && event.keyCode === keycode('page up')) {
7464
+ if (setPageIndex && event.key === 'PageUp') {
7438
7465
  event.preventDefault();
7439
7466
  setPageIndex(Math.max(0, pageIndex - 1));
7440
7467
  return;
7441
7468
  }
7442
7469
 
7443
- if (setPageIndex && event.keyCode === keycode('page down')) {
7470
+ if (setPageIndex && event.key === 'PageDown') {
7444
7471
  event.preventDefault();
7445
7472
  setPageIndex(Math.min(maxPageIndex, pageIndex + 1));
7446
7473
  return;
@@ -7870,7 +7897,7 @@ const getActions = (actions, row = undefined) => {
7870
7897
  const secondary = [];
7871
7898
 
7872
7899
  if (actions) {
7873
- let visibleActions = actions.filter(x => !!x);
7900
+ let visibleActions = actions.filter(x => !!x && typeof x !== 'boolean');
7874
7901
 
7875
7902
  if (row) {
7876
7903
  visibleActions = visibleActions.filter(action => {
@@ -7940,7 +7967,7 @@ const EditModeActions = () => {
7940
7967
  const listener = event => {
7941
7968
  var _event$target, _event$target$form;
7942
7969
 
7943
- if (event.keyCode === keycode('escape') && (_event$target = event.target) !== null && _event$target !== void 0 && (_event$target$form = _event$target.form) !== null && _event$target$form !== void 0 && _event$target$form.reset) {
7970
+ if (event.key === 'Escape' && (_event$target = event.target) !== null && _event$target !== void 0 && (_event$target$form = _event$target.form) !== null && _event$target$form !== void 0 && _event$target$form.reset) {
7944
7971
  event.preventDefault();
7945
7972
  event.target.form.reset();
7946
7973
  }
@@ -8193,7 +8220,13 @@ const useTableKeyboardNavigation = (props, rows, rowProps, ref) => {
8193
8220
  const [activeIndex, setActiveIndex] = reactUseControllableState.useControllableState({
8194
8221
  prop: props.activeIndex,
8195
8222
  defaultProp: props.defaultActiveIndex !== undefined ? props.defaultActiveIndex : useGlobalKeyboardNavigation ? 0 : undefined,
8196
- onChange: props.onChangeActiveIndex
8223
+ onChange: index => {
8224
+ if (index !== undefined) {
8225
+ var _props$onChangeActive;
8226
+
8227
+ (_props$onChangeActive = props.onChangeActiveIndex) === null || _props$onChangeActive === void 0 ? void 0 : _props$onChangeActive.call(props, index);
8228
+ }
8229
+ }
8197
8230
  });
8198
8231
 
8199
8232
  const onKeyDown = event => {
@@ -8216,24 +8249,24 @@ const useTableKeyboardNavigation = (props, rows, rowProps, ref) => {
8216
8249
  if (currentRow) {
8217
8250
  const sanitizedRow = sanitizeRowProps(currentRow, rowProps.rowExpansionRenderer);
8218
8251
 
8219
- if (rowProps.onRowClick && event.keyCode === keycode('enter')) {
8252
+ if (rowProps.onRowClick && event.key === 'Enter') {
8220
8253
  event.preventDefault();
8221
8254
  rowProps.onRowClick(sanitizedRow);
8222
8255
  return;
8223
8256
  }
8224
8257
 
8225
- if (currentRow.toggleRowSelected && event.keyCode === keycode('space')) {
8258
+ if (currentRow.toggleRowSelected && event.key === ' ') {
8226
8259
  event.preventDefault();
8227
8260
  currentRow.toggleRowSelected();
8228
8261
  return;
8229
8262
  }
8230
8263
 
8231
8264
  if (currentRow.toggleRowExpanded) {
8232
- if (currentRow.isExpanded && event.keyCode === keycode('left')) {
8265
+ if (currentRow.isExpanded && event.key === 'ArrowLeft') {
8233
8266
  event.preventDefault();
8234
8267
  currentRow.toggleRowExpanded();
8235
8268
  return;
8236
- } else if (!currentRow.isExpanded && event.keyCode === keycode('right')) {
8269
+ } else if (!currentRow.isExpanded && event.key === 'ArrowRight') {
8237
8270
  event.preventDefault();
8238
8271
  currentRow.toggleRowExpanded();
8239
8272
  return;
@@ -8243,7 +8276,7 @@ const useTableKeyboardNavigation = (props, rows, rowProps, ref) => {
8243
8276
 
8244
8277
  if (currentRow.toggleRowEditing) {
8245
8278
  if (currentRow.canEdit && !currentRow.isEditing) {
8246
- if (rowProps.onRowCreate && event.shiftKey && event.keyCode === keycode('n')) {
8279
+ if (rowProps.onRowCreate && event.shiftKey && event.key === 'n') {
8247
8280
  event.preventDefault();
8248
8281
 
8249
8282
  if (!currentRow.isExpanded) {
@@ -8254,7 +8287,7 @@ const useTableKeyboardNavigation = (props, rows, rowProps, ref) => {
8254
8287
  return;
8255
8288
  }
8256
8289
 
8257
- if (event.keyCode === keycode('e')) {
8290
+ if (event.key === 'e') {
8258
8291
  event.preventDefault();
8259
8292
  currentRow.toggleRowEditing();
8260
8293
  return;
@@ -8262,19 +8295,19 @@ const useTableKeyboardNavigation = (props, rows, rowProps, ref) => {
8262
8295
  }
8263
8296
  }
8264
8297
 
8265
- if (rowProps.onRowEdit && event.keyCode === keycode('e') && !isModifierKeyPressed) {
8298
+ if (rowProps.onRowEdit && event.key === 'e' && !isModifierKeyPressed) {
8266
8299
  event.preventDefault();
8267
8300
  rowProps.onRowEdit(sanitizedRow, event);
8268
8301
  return;
8269
8302
  }
8270
8303
 
8271
- if (rowProps.onRowCopy && event.keyCode === keycode('c') && !isModifierKeyPressed) {
8304
+ if (rowProps.onRowCopy && event.key === 'c' && !isModifierKeyPressed) {
8272
8305
  event.preventDefault();
8273
8306
  rowProps.onRowCopy(sanitizedRow, event);
8274
8307
  return;
8275
8308
  }
8276
8309
 
8277
- if (rowProps.onRowDelete && event.keyCode === keycode('delete') && !isModifierKeyPressed) {
8310
+ if (rowProps.onRowDelete && event.key === 'Delete' && !isModifierKeyPressed) {
8278
8311
  event.preventDefault();
8279
8312
  rowProps.onRowDelete(sanitizedRow, event);
8280
8313
  return;
@@ -8282,7 +8315,7 @@ const useTableKeyboardNavigation = (props, rows, rowProps, ref) => {
8282
8315
  }
8283
8316
  }
8284
8317
 
8285
- const nextIndex = getNextIndexFromKeycode(event.keyCode, rows.length, activeIndex);
8318
+ const nextIndex = getNextIndexFromKey(event.key, rows.length, activeIndex);
8286
8319
 
8287
8320
  if (nextIndex !== undefined) {
8288
8321
  event.preventDefault();
@@ -8509,7 +8542,7 @@ const useTable = (props, ref) => {
8509
8542
  const {
8510
8543
  children,
8511
8544
  data,
8512
- dangerouslyHijackGlobalKeyboardNavigation: _1,
8545
+ dangerouslyHijackGlobalKeyboardNavigation: _,
8513
8546
  onRowClick,
8514
8547
  onRowDrag,
8515
8548
  onSelectedRows,
@@ -8522,6 +8555,10 @@ const useTable = (props, ref) => {
8522
8555
  manualSorting,
8523
8556
  onSort,
8524
8557
  sortRules,
8558
+ //index
8559
+ activeIndex: _1,
8560
+ defaultActiveIndex: _2,
8561
+ onChangeActiveIndex: _3,
8525
8562
  // pagination
8526
8563
  disablePagination = true,
8527
8564
  length,
@@ -9337,7 +9374,7 @@ const Tooltip$1 = ({
9337
9374
  React.useEffect(() => {
9338
9375
  const onWindowKeyDown = event => {
9339
9376
  if (!disableTourSkipOnEsc) {
9340
- if (event.keyCode === keycode('esc') && skipButtonRef.current !== null) {
9377
+ if (event.key === 'Escape' && skipButtonRef.current !== null) {
9341
9378
  event.preventDefault();
9342
9379
  skipButtonRef.current.click();
9343
9380
  return;
@@ -9477,10 +9514,10 @@ var useOnClickOutside = function useOnClickOutside(ref, callback) {
9477
9514
  }, [ref, callback]);
9478
9515
  };
9479
9516
 
9480
- var _excluded$e = ["noPadding"];
9517
+ var _excluded$8 = ["noPadding"];
9481
9518
  var Content$6 = /*#__PURE__*/React.forwardRef(function CardContent(externalProps, ref) {
9482
9519
  var noPadding = externalProps.noPadding,
9483
- props = _objectWithoutPropertiesLoose(externalProps, _excluded$e);
9520
+ props = _objectWithoutPropertiesLoose(externalProps, _excluded$8);
9484
9521
 
9485
9522
  var className = cn('flex-grow overflow-auto', {
9486
9523
  'mx-4 mb-4': !noPadding
@@ -9561,7 +9598,7 @@ exports.defaultLocalisationTexts = defaultLocalisationTexts;
9561
9598
  exports.findByValue = findByValue$1;
9562
9599
  exports.format = format;
9563
9600
  exports.getByRowIndexPath = getByRowIndexPath;
9564
- exports.getNextIndexFromKeycode = getNextIndexFromKeycode;
9601
+ exports.getNextIndexFromKey = getNextIndexFromKey;
9565
9602
  exports.getParentRowIndexPath = getParentRowIndexPath;
9566
9603
  exports.getRadioGroupItemValueAsString = getRadioGroupItemValueAsString;
9567
9604
  exports.icons = icons;