@economic/taco 1.37.0 → 1.38.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. package/dist/components/Checkbox/Checkbox.d.ts +0 -1
  2. package/dist/components/Input/util.d.ts +1 -1
  3. package/dist/components/Table2/hooks/useColumnDefinitions.d.ts +1 -1
  4. package/dist/components/Table2/types.d.ts +1 -1
  5. package/dist/components/Tabs/Tabs.d.ts +0 -1
  6. package/dist/esm/index.css +0 -20
  7. package/dist/esm/packages/taco/src/components/Button/Button.js +0 -2
  8. package/dist/esm/packages/taco/src/components/Button/Button.js.map +1 -1
  9. package/dist/esm/packages/taco/src/components/Button/util.js +7 -7
  10. package/dist/esm/packages/taco/src/components/Button/util.js.map +1 -1
  11. package/dist/esm/packages/taco/src/components/Checkbox/Checkbox.js +7 -8
  12. package/dist/esm/packages/taco/src/components/Checkbox/Checkbox.js.map +1 -1
  13. package/dist/esm/packages/taco/src/components/Datepicker/Datepicker.js +5 -8
  14. package/dist/esm/packages/taco/src/components/Datepicker/Datepicker.js.map +1 -1
  15. package/dist/esm/packages/taco/src/components/Drawer/components/Content.js +6 -5
  16. package/dist/esm/packages/taco/src/components/Drawer/components/Content.js.map +1 -1
  17. package/dist/esm/packages/taco/src/components/Field/Field.js +1 -1
  18. package/dist/esm/packages/taco/src/components/Field/Field.js.map +1 -1
  19. package/dist/esm/packages/taco/src/components/Header/components/Button.js +1 -1
  20. package/dist/esm/packages/taco/src/components/Header/components/Button.js.map +1 -1
  21. package/dist/esm/packages/taco/src/components/Header/components/Link.js +2 -2
  22. package/dist/esm/packages/taco/src/components/Header/components/Link.js.map +1 -1
  23. package/dist/esm/packages/taco/src/components/IconButton/IconButton.js +1 -3
  24. package/dist/esm/packages/taco/src/components/IconButton/IconButton.js.map +1 -1
  25. package/dist/esm/packages/taco/src/components/Input/Input.js +1 -1
  26. package/dist/esm/packages/taco/src/components/Input/Input.js.map +1 -1
  27. package/dist/esm/packages/taco/src/components/Input/util.js +11 -11
  28. package/dist/esm/packages/taco/src/components/Input/util.js.map +1 -1
  29. package/dist/esm/packages/taco/src/components/RadioGroup/RadioGroup.js +6 -4
  30. package/dist/esm/packages/taco/src/components/RadioGroup/RadioGroup.js.map +1 -1
  31. package/dist/esm/packages/taco/src/components/Select2/components/Create.js +14 -6
  32. package/dist/esm/packages/taco/src/components/Select2/components/Create.js.map +1 -1
  33. package/dist/esm/packages/taco/src/components/Select2/components/Option.js +1 -2
  34. package/dist/esm/packages/taco/src/components/Select2/components/Option.js.map +1 -1
  35. package/dist/esm/packages/taco/src/components/Switch/Switch.js +3 -3
  36. package/dist/esm/packages/taco/src/components/Switch/Switch.js.map +1 -1
  37. package/dist/esm/packages/taco/src/components/Table2/components/column/Header.js +4 -2
  38. package/dist/esm/packages/taco/src/components/Table2/components/column/Header.js.map +1 -1
  39. package/dist/esm/packages/taco/src/components/Table2/hooks/useColumnDefinitions.js +4 -3
  40. package/dist/esm/packages/taco/src/components/Table2/hooks/useColumnDefinitions.js.map +1 -1
  41. package/dist/esm/packages/taco/src/components/Table2/hooks/useGridTemplate.js +3 -1
  42. package/dist/esm/packages/taco/src/components/Table2/hooks/useGridTemplate.js.map +1 -1
  43. package/dist/esm/packages/taco/src/components/Table2/types.js.map +1 -1
  44. package/dist/esm/packages/taco/src/components/Tabs/Tabs.js +21 -8
  45. package/dist/esm/packages/taco/src/components/Tabs/Tabs.js.map +1 -1
  46. package/dist/index.css +0 -20
  47. package/dist/taco.cjs.development.js +96 -77
  48. package/dist/taco.cjs.development.js.map +1 -1
  49. package/dist/taco.cjs.production.min.js +1 -1
  50. package/dist/taco.cjs.production.min.js.map +1 -1
  51. package/package.json +2 -2
  52. package/plugins/tailwindcss-aria-attributes.js +20 -36
  53. package/tailwind.config.js +6 -2
  54. package/types.json +7 -4
@@ -3786,25 +3786,25 @@ const Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(props, ref) {
3786
3786
  });
3787
3787
 
3788
3788
  const getButtonClasses = () => {
3789
- return 'flex-shrink-0 min-h-[theme(spacing.8)] min-w-[theme(spacing.8)] gap-1 h-max leading-5 inline-flex items-center justify-center';
3789
+ return 'flex-shrink-0 min-h-[theme(spacing.8)] min-w-[theme(spacing.8)] gap-1 h-max leading-5 inline-flex items-center justify-center focus-visible:yt-focus disabled:cursor-not-allowed';
3790
3790
  };
3791
3791
  const getAppearanceClasses = (value, icon = false) => {
3792
3792
  switch (value) {
3793
3793
  case 'primary':
3794
- return `wcag-blue-500 focus:bg-blue-500 focus:text-white focus:yt-focus active:bg-blue-700 active:text-white hover:bg-blue-300 hover:text-white hover:focus:bg-blue-300 hover:focus:border-blue-300 hover:focus:text-white disabled:hover:wcag-blue-500 disabled:hover:hover:border-blue-500`;
3794
+ return `wcag-blue-500 enabled:hover:wcag-blue-700 enabled:hover:active:wcag-blue-500 disabled:bg-blue-500/50`;
3795
3795
  case 'danger':
3796
- return `wcag-red-500 focus:bg-red-500 focus:text-white focus:yt-focus-red active:bg-red-700 active:text-white hover:bg-red-300 hover:text-white hover:focus:bg-red-300 hover:focus:text-white disabled:hover:wcag-red-500`;
3796
+ return `wcag-red-500 enabled:hover:wcag-red-700 enabled:hover:active:wcag-red-500 disabled:bg-red-500/50`;
3797
3797
  case 'ghost':
3798
- return `bg-white shadow-[inset_0_0_0_1px_theme(colors.blue.500)] text-blue-500 focus:bg-transparent focus:text-blue-500 active:bg-blue-100 focus:!shadow-[inset_0_0_0_1px_theme(colors.blue.500),0_0_0_2px_rgba(0,99,255,0.25)] active:text-blue-700 hover:bg-blue-100 hover:shadow-[inset_0_0_0_1px_theme(colors.blue.300)] hover:text-blue-300 hover:focus:bg-blue-100 hover:focus:!shadow-[inset_0_0_0_1px_theme(colors.blue.300),0_0_0_2px_rgba(0,99,255,0.25)] hover:focus:text-blue-300`;
3798
+ return `bg-white border border-blue-500 text-blue-500 enabled:hover:bg-blue-100 enabled:hover:text-blue-700 disabled:border-blue-500/50 disabled:text-blue-500/50`;
3799
3799
  case 'discrete':
3800
3800
  {
3801
3801
  if (icon) {
3802
- return `bg-transparent text-black border-transparent focus:text-black focus:yt-focus active:text-black hover:text-grey-700 hover:focus:text-grey-700 disabled:hover:text-black `;
3802
+ return `bg-transparent text-black enabled:hover:bg-grey-200/80 disabled:text-black/30`;
3803
3803
  }
3804
- return `yt-transparent focus:text-blue-500 focus:yt-focus active:text-blue-700 hover:text-blue-300 hover:focus:text-blue-300 disabled:hover:yt-transparent`;
3804
+ return `bg-transparent text-blue-500 enabled:hover:text-blue-700 disabled:text-blue-500/50`;
3805
3805
  }
3806
3806
  default:
3807
- return `wcag-grey-200 focus:bg-grey-200 focus:yt-focus active:bg-grey-300 active:text-black hover:bg-grey-100 hover:text-grey-700 hover:focus:bg-grey-100 hover:focus:text-grey-700 disabled:hover:wcag-grey-200`;
3807
+ return `wcag-grey-200 enabled:hover:wcag-grey-300 disabled:bg-grey-200/50 disabled:text-black/30`;
3808
3808
  }
3809
3809
  };
3810
3810
  const createButtonWithTooltip = (props, className, ref) => {
@@ -3865,9 +3865,7 @@ const Base = /*#__PURE__*/React.forwardRef(function IconButtonBase(props, ref) {
3865
3865
  } = props;
3866
3866
  const className = cn('w-8', getButtonClasses(), getAppearanceClasses(otherProps.appearance, true), {
3867
3867
  'rounded-full': rounded,
3868
- rounded: !rounded,
3869
- 'cursor-not-allowed opacity-50': props.disabled,
3870
- 'focus:yt-focus active:focus:yt-focus': !props.disabled
3868
+ rounded: !rounded
3871
3869
  }, props.className);
3872
3870
  if (!icon) {
3873
3871
  return null;
@@ -4146,8 +4144,6 @@ const Base$1 = /*#__PURE__*/React.forwardRef(function ButtonBase(props, ref) {
4146
4144
  ...otherProps
4147
4145
  } = props;
4148
4146
  const className = cn(getButtonClasses(), getAppearanceClasses(appearance), 'rounded px-3', {
4149
- 'cursor-not-allowed opacity-50': props.disabled,
4150
- 'focus:yt-focus active:focus:yt-focus': !props.disabled,
4151
4147
  'w-full': fluid
4152
4148
  }, props.className);
4153
4149
  return createButtonWithTooltip({
@@ -4355,7 +4351,6 @@ const useId = nativeId => {
4355
4351
  const Checkbox = /*#__PURE__*/React.forwardRef(function Checkbox(props, ref) {
4356
4352
  const {
4357
4353
  checked,
4358
- highlighted,
4359
4354
  indeterminate,
4360
4355
  invalid,
4361
4356
  label,
@@ -4363,14 +4358,14 @@ const Checkbox = /*#__PURE__*/React.forwardRef(function Checkbox(props, ref) {
4363
4358
  ...otherProps
4364
4359
  } = props;
4365
4360
  const id = useId(props.id);
4366
- const className = cn('bg-white h-5 w-5 border rounded text-sm flex-shrink-0 mt-[0.1rem] focus:yt-focus',
4367
- //hover:shadow-[0_0_0_1px_rgba(235,235,235,1)]
4368
- {
4369
- 'border-grey-300 text-blue-500 hover:text-blue-300 focus:border-blue-500 focus:hover:border-blue-300': !props.disabled && !invalid,
4370
- 'border-grey-200 text-blue-300 cursor-not-allowed': props.disabled,
4371
- 'bg-[rgba(255,255,0,0.2)] disabled:bg-[rgba(255,255,0,0.075)]': highlighted,
4372
- 'border-red-500 text-red-500 hover:text-red-300 hover:border-red-300 focus:border-red-500 focus:hover:border-red-300': invalid && !props.disabled,
4361
+ const className = cn('bg-white h-5 w-5 border rounded text-sm flex-shrink-0 mt-[0.1rem] focus-visible:yt-focus disabled:cursor-not-allowed text-white', {
4373
4362
  'self-start': !!label
4363
+ }, invalid ? {
4364
+ 'border-red-500 hover:border-red-700 aria-checked:border-red-500 aria-checked-mixed:border-red-500 aria-checked:bg-red-500 aria-checked-mixed:bg-red-500 aria-checked:hover:border-red-700 aria-checked-mixed:hover:border-red-700 aria-checked:hover:bg-red-700 aria-checked-mixed:hover:bg-red-700': !props.disabled,
4365
+ 'border-red-500/50 aria-checked:wcag-red-500/50 aria-checked-mixed:wcag-red-500/50': props.disabled
4366
+ } : {
4367
+ 'border-grey-500 hover:border-grey-700 aria-checked:border-blue-500 aria-checked-mixed:border-blue-500 aria-checked:bg-blue-500 aria-checked-mixed:bg-blue-500 aria-checked:hover:border-blue-700 aria-checked-mixed:hover:border-blue-700 aria-checked:hover:bg-blue-700 aria-checked-mixed:hover:bg-blue-700': !props.disabled,
4368
+ 'border-grey-500/50 aria-checked:bg-blue-500/50 aria-checked-mixed:bg-blue-500/50': props.disabled
4374
4369
  }, props.className);
4375
4370
  let handleChange;
4376
4371
  if (onChange) {
@@ -4421,28 +4416,28 @@ const getInputClasses = props => {
4421
4416
  const disabled = props.disabled || !!props['aria-disabled'];
4422
4417
  const readOnly = props.readOnly || !!props['aria-readonly'];
4423
4418
  const invalid = props.invalid || !!props['aria-invalid'];
4424
- return cn('peer text-black text-sm border font-normal not-italic no-underline rounded flex items-center leading-6 px-2 relative w-full text-ellipsis transition-colors transition-opacity ease-in min-h-[theme(spacing.8)]', {
4419
+ return cn('peer text-black text-sm border font-normal not-italic no-underline rounded flex items-center leading-6 px-2 relative w-full text-ellipsis transition-colors transition-opacity ease-in min-h-[theme(spacing.8)] focus-visible:yt-focus', {
4425
4420
  'bg-white': !props.highlighted && !readOnly,
4426
4421
  // default
4427
- 'border-grey-300 focus:border-blue-300 focus:yt-focus': !invalid,
4428
- 'hover:shadow-[0_0_0.1rem_theme(colors.grey.500)] active:border-blue-700': !invalid && !disabled,
4422
+ 'border-grey-300 enabled:hover:border-grey-500 disabled:border-grey-200': !invalid,
4429
4423
  // disabled
4430
- 'border-grey-200 text-opacity-25 cursor-not-allowed placeholder:text-grey-700': disabled,
4424
+ 'text-opacity-25 cursor-not-allowed placeholder:text-grey-700': disabled,
4431
4425
  // highlighted
4432
- 'bg-[rgba(255,255,0,0.075)]': props.highlighted && disabled,
4433
- 'bg-[rgba(255,255,0,0.2)]': props.highlighted && !disabled,
4426
+ 'bg-yellow-100/50': props.highlighted && disabled,
4427
+ 'bg-yellow-100': props.highlighted && !disabled,
4434
4428
  // invalid
4435
- 'border-red focus:border-red-300 focus:yt-focus-red active:border-red-700': invalid,
4436
- 'hover:shadow-[0_0_0.15rem_theme(colors.red.500)]': invalid && !disabled,
4429
+ 'border-red-500 enabled:hover:border-red-700 disabled:border-red-500/50': invalid,
4437
4430
  // readOnly
4438
4431
  'cursor-not-allowed text-black bg-grey-200': readOnly
4439
4432
  });
4440
4433
  };
4441
- const getButtonStateClasses = invalid => {
4434
+ const getButtonStateClasses = (invalid, disabled = false) => {
4442
4435
  if (invalid) {
4443
- return 'border !border-red-500 group-peer-focus:!border-red-300 focus:yt-focus-red group-focus:group-active:!border-red-300 transition-colors ease-in';
4436
+ return cn('border border-red-500 group-peer-hover:enabled:border-red-700 transition-colors ease-in', {
4437
+ 'border-red-500/30': disabled
4438
+ });
4444
4439
  }
4445
- return 'border border-grey-300 focus:!border-blue-300 group-peer-focus:!border-blue-300 group-peer-focus:group-peer-active:!border-blue-700 transition-colors transition-opacity ease-in';
4440
+ return 'border border-grey-300 group-peer-hover:enabled:border-grey-500 transition-colors transition-opacity ease-in';
4446
4441
  };
4447
4442
 
4448
4443
  const debounce = (fn, delay) => {
@@ -4587,7 +4582,7 @@ const Input = /*#__PURE__*/React.forwardRef(function LegacyInput(props, ref) {
4587
4582
  let postfix;
4588
4583
  if (button) {
4589
4584
  const disabled = button.props.disabled || attributes.disabled;
4590
- const buttonClassName = cn('items-center focus:z-10 flex justify-center rounded-l-none rounded-r h-full focus:rounded focus:outline-none', getButtonStateClasses(attributes.invalid), button.props.className);
4585
+ const buttonClassName = cn('items-center focus:z-10 flex justify-center rounded-l-none rounded-r h-full focus:rounded focus:outline-none', getButtonStateClasses(attributes.invalid, disabled), button.props.className);
4591
4586
  postfix = /*#__PURE__*/React.cloneElement(button, {
4592
4587
  className: buttonClassName,
4593
4588
  disabled
@@ -5611,14 +5606,11 @@ const Datepicker = /*#__PURE__*/React.forwardRef(function Datepicker(props, ref)
5611
5606
  "data-taco": "datepicker",
5612
5607
  style: style
5613
5608
  }, /*#__PURE__*/React.createElement(Input, Object.assign({}, input, {
5614
- button: /*#__PURE__*/React.createElement(Tooltip, {
5615
- title: texts.datepicker.calendar
5616
- }, /*#__PURE__*/React.createElement(IconButton, {
5609
+ button: /*#__PURE__*/React.createElement(IconButton, {
5617
5610
  "aria-label": texts.datepicker.expand,
5618
5611
  disabled: input.disabled || input.readOnly,
5619
5612
  icon: "calendar",
5620
5613
  tabIndex: -1,
5621
- className: " border-grey-300 group-peer-focus:!border-blue-300 group-peer-focus:group-peer-active:!border-blue-700 flex h-full items-center justify-center rounded-l-none rounded-r border transition-colors transition-opacity ease-in focus:z-10 focus:rounded focus:!border-blue-300 focus:outline-none",
5622
5614
  popover: props => /*#__PURE__*/React.createElement(Popover, Object.assign({}, props), /*#__PURE__*/React.createElement(Popover.Content, null, ({
5623
5615
  close
5624
5616
  }) => /*#__PURE__*/React.createElement("div", {
@@ -5644,14 +5636,15 @@ const Datepicker = /*#__PURE__*/React.forwardRef(function Datepicker(props, ref)
5644
5636
  }
5645
5637
  }, shortcut.text)))), handleReset && /*#__PURE__*/React.createElement("button", {
5646
5638
  type: "button",
5647
- className: "my-4 mx-auto mt-auto inline-flex cursor-pointer border-none bg-transparent text-xs text-blue-500 hover:text-blue-300",
5639
+ className: "mx-auto my-4 mt-auto inline-flex cursor-pointer border-none bg-transparent text-xs text-blue-500 hover:text-blue-300",
5648
5640
  onClick: event => {
5649
5641
  event.persist();
5650
5642
  handleReset(event);
5651
5643
  close();
5652
5644
  }
5653
- }, texts.datepicker.clear)))))
5654
- }))
5645
+ }, texts.datepicker.clear))))),
5646
+ tooltip: texts.datepicker.calendar
5647
+ })
5655
5648
  })));
5656
5649
  });
5657
5650
  Datepicker.displayName = 'Datepicker';
@@ -6146,15 +6139,16 @@ const InnerContent = /*#__PURE__*/React__default.forwardRef(function InnerConten
6146
6139
  children,
6147
6140
  ...otherProps
6148
6141
  } = props;
6149
- const cName = cn('grow-1 p-4', className);
6142
+ const cName = cn('grow flex flex-col', {
6143
+ 'overflow-y-hidden': isScrollable,
6144
+ 'p-4': !isScrollable
6145
+ }, className);
6150
6146
  return /*#__PURE__*/React__default.createElement("div", Object.assign({}, otherProps, {
6151
6147
  className: cName,
6152
6148
  ref: ref
6153
6149
  }), isScrollable ? /*#__PURE__*/React__default.createElement(ScrollArea, {
6154
- className: "w-full gap-y-0.5"
6155
- }, children) : {
6156
- children
6157
- });
6150
+ className: "w-full gap-y-0.5 p-4"
6151
+ }, children) : children);
6158
6152
  });
6159
6153
  const Portal = props => {
6160
6154
  const {
@@ -6447,7 +6441,7 @@ const Field = /*#__PURE__*/React.forwardRef(function Field(props, ref) {
6447
6441
  'text-grey-700': !invalid,
6448
6442
  'text-red-500': invalid,
6449
6443
  'opacity-50': disabled
6450
- }, props.className);
6444
+ });
6451
6445
  return /*#__PURE__*/React.createElement("label", Object.assign({}, otherProps, {
6452
6446
  className: className,
6453
6447
  "data-taco": "label",
@@ -7245,10 +7239,12 @@ const RadioGroupItem = /*#__PURE__*/React.forwardRef(function RadioGroupItem(pro
7245
7239
  ...otherProps
7246
7240
  } = props;
7247
7241
  const isDisabled = context.disabled || props.disabled;
7248
- const className = cn('flex flex-shrink-0 self-start items-center justify-center h-4 w-4 mt-[0.2rem] rounded-full bg-white border-2', {
7249
- 'border-grey-300 hover:border-4 focus:yt-focus aria-checked:bg-blue-500 aria-checked:border-blue-500 hover:aria-checked:border-blue-300': !isDisabled && !context.invalid,
7250
- 'border-grey-200 cursor-not-allowed aria-checked:bg-blue-300 aria-checked:border-blue-300 ': isDisabled,
7251
- 'border-red-500 hover:border-4 text-red-500 focus:border-red-500 focus:yt-focus-red aria-checked:bg-red-500 aria-checked:border-red': context.invalid && !isDisabled
7242
+ const className = cn('flex flex-shrink-0 self-start items-center justify-center h-4 w-4 mt-[0.2rem] rounded-full bg-white border-2 focus-visible:yt-focus disabled:cursor-not-allowed hover:border-4', context.invalid ? {
7243
+ 'border-red-500 hover:border-red-700 aria-checked:bg-red-500 aria-checked:border-red-500 hover:aria-checked:border-red-700': !isDisabled,
7244
+ 'border-red-500/50 aria-checked:bg-red-500/50 aria-checked:border-red-500/50': isDisabled
7245
+ } : {
7246
+ 'border-grey-500 hover:border-grey-700 aria-checked:bg-blue-500 aria-checked:border-blue-500 hover:aria-checked:border-blue-700': !isDisabled,
7247
+ 'border-grey-500/50 aria-checked:bg-blue-500/50 aria-checked:border-blue-500/50': isDisabled
7252
7248
  });
7253
7249
  const labelClassName = cn('flex items-center gap-2', {
7254
7250
  'cursor-pointer': !isDisabled,
@@ -9170,10 +9166,9 @@ const Option$1 = /*#__PURE__*/React__default.forwardRef(function Select2Option(p
9170
9166
  }, /*#__PURE__*/React__default.createElement("span", null, children), description ? /*#__PURE__*/React__default.createElement("span", {
9171
9167
  className: "text-grey-700 -mt-1.5 mb-1.5 text-xs"
9172
9168
  }, description) : null)), popover ? /*#__PURE__*/React__default.createElement(IconButton, {
9173
- rounded: true,
9174
9169
  icon: "ellipsis-vertical",
9175
9170
  appearance: "discrete",
9176
- className: cn('group-aria-current:visible invisible ml-auto -mr-2 focus:!shadow-none group-hover:visible', {
9171
+ className: cn('group-aria-current:visible invisible -mr-1 ml-auto !h-5 min-h-[theme(spacing.6)] !w-5 min-w-[theme(spacing.6)] hover:!bg-black/[.08] focus:!shadow-none group-hover:visible', {
9177
9172
  '!visible': isMobileDevice((_window = window) === null || _window === void 0 ? void 0 : _window.navigator)
9178
9173
  }),
9179
9174
  onClick: event => {
@@ -9639,15 +9634,22 @@ const filterOption = (child, searchQuery) => {
9639
9634
  };
9640
9635
 
9641
9636
  const getNextColor = options => {
9642
- const occurences = options.reduce((occurences, option) => {
9637
+ let occurrences = {};
9638
+ AVAILABLE_COLORS.filter(color => color !== 'transparent').forEach(color => {
9639
+ occurrences = {
9640
+ ...occurrences,
9641
+ [color]: 0
9642
+ };
9643
+ });
9644
+ options.reduce((occurrences, option) => {
9643
9645
  if (option.props.color) {
9644
- occurences[option.props.color] = occurences[option.props.color] ? occurences[option.props.color] + 1 : 1;
9646
+ occurrences[option.props.color] = occurrences[option.props.color] ? occurrences[option.props.color] + 1 : 1;
9645
9647
  }
9646
- return occurences;
9647
- }, {});
9648
- const colors = Object.keys(occurences);
9648
+ return occurrences;
9649
+ }, occurrences);
9650
+ const colors = Object.keys(occurrences);
9649
9651
  if (colors.length) {
9650
- return colors.sort((a, b) => occurences[a] - occurences[b])[0];
9652
+ return colors.sort((a, b) => occurrences[a] - occurrences[b])[0];
9651
9653
  }
9652
9654
  return undefined;
9653
9655
  };
@@ -9977,10 +9979,10 @@ const Switch = /*#__PURE__*/React.forwardRef(function Switch(props, ref) {
9977
9979
  ...otherProps
9978
9980
  } = props;
9979
9981
  const id = useId(props.id);
9980
- const className = cn('group h-5 w-9 flex flex-shrink-0 rounded-full inline-flex', {
9982
+ const className = cn('group h-5 w-9 flex flex-shrink-0 rounded-full inline-flex focus-visible:yt-focus', {
9981
9983
  'mr-2': !!label,
9982
- 'bg-grey-500 hover:bg-grey-300 aria-checked:bg-blue-500 aria-checked:hover:bg-blue-300 focus:yt-focus': !props.disabled,
9983
- 'bg-grey-100 cursor-not-allowed aria-checked:bg-blue-300': props.disabled
9984
+ 'bg-grey-500 hover:bg-grey-700 aria-checked:bg-blue-500 aria-checked:hover:bg-blue-700': !props.disabled,
9985
+ 'bg-grey-500/50 aria-checked:bg-blue-500/50 cursor-not-allowed': props.disabled
9984
9986
  }, props.className);
9985
9987
  let labelledByProps = null;
9986
9988
  if (label) {
@@ -12959,7 +12961,9 @@ const Header$1 = function Header(props) {
12959
12961
  const nextSizes = {
12960
12962
  ...sizes
12961
12963
  };
12962
- if (size) {
12964
+ if (size === 'grow') {
12965
+ nextSizes[header.id] = '1fr';
12966
+ } else if (typeof size === 'number') {
12963
12967
  nextSizes[header.id] = !isInternalFrozenColumn(header.id) && size < MIN_COLUMN_SIZE ? MIN_COLUMN_SIZE : size;
12964
12968
  } else {
12965
12969
  delete nextSizes[header.id];
@@ -13063,7 +13067,7 @@ const HeaderMenu = ({
13063
13067
  '!flex': open
13064
13068
  });
13065
13069
  const menuItems = [];
13066
- if (table.options.enableHiding) {
13070
+ if (table.options.enableHiding && header.column.getCanHide()) {
13067
13071
  // we do this in the next tick, otherwise the menu closes and react throws a "state update on unmounted component" error
13068
13072
  const handleClick = () => setTimeout(() => header.column.toggleVisibility(), 1);
13069
13073
  menuItems.push( /*#__PURE__*/React__default.createElement(Menu$1.Item, {
@@ -13174,8 +13178,9 @@ function useColumnDefinitions(children, options, tableRef) {
13174
13178
  React__default.Children.toArray(children).filter(child => !!child).forEach(child => {
13175
13179
  if ( /*#__PURE__*/React__default.isValidElement(child)) {
13176
13180
  var _child$props$minWidth;
13177
- if (child.props.defaultWidth) {
13178
- defaultColumnSizing[child.props.accessor] = child.props.defaultWidth;
13181
+ const defaultWidth = child.props.defaultWidth === 'grow' ? '1fr' : child.props.defaultWidth;
13182
+ if (defaultWidth) {
13183
+ defaultColumnSizing[child.props.accessor] = defaultWidth;
13179
13184
  }
13180
13185
  if (child.props.defaultHidden && options.enableColumnHiding) {
13181
13186
  defaultColumnVisibility[child.props.accessor] = false;
@@ -13211,7 +13216,7 @@ function useColumnDefinitions(children, options, tableRef) {
13211
13216
  className: child.props.className,
13212
13217
  control: child.props.control,
13213
13218
  dataType: child.props.dataType,
13214
- defaultWidth: child.props.defaultWidth,
13219
+ defaultWidth,
13215
13220
  disableReordering: child.props.disableReordering,
13216
13221
  menu: child.props.menu,
13217
13222
  tooltip: child.props.tooltip
@@ -13632,7 +13637,9 @@ const useGridTemplate = table => {
13632
13637
  } else if (isInternalColumn(column.id)) {
13633
13638
  size = `${column.getSize()}px`;
13634
13639
  } else if (width) {
13635
- if (isLastColumn) {
13640
+ if (width === '1fr') {
13641
+ size = 'minmax(max-content, 1fr)';
13642
+ } else if (isLastColumn) {
13636
13643
  size = `minmax(${width}px, auto)`;
13637
13644
  } else if (column.columnDef.minSize && width < column.columnDef.minSize) {
13638
13645
  // react-table is supposed to handle minSize itself but it is really buggy
@@ -14965,7 +14972,7 @@ const Tabs = /*#__PURE__*/React.forwardRef(function Tabs(props, ref) {
14965
14972
  orientation = 'horizontal',
14966
14973
  ...otherProps
14967
14974
  } = props;
14968
- const className = cn('yt-tabs', `yt-tabs--${orientation}`, {
14975
+ const className = cn({
14969
14976
  'flex w-full': orientation === 'vertical'
14970
14977
  }, props.className);
14971
14978
  return /*#__PURE__*/React.createElement(TabsPrimitive.Root, Object.assign({}, otherProps, {
@@ -14980,7 +14987,7 @@ const Tabs = /*#__PURE__*/React.forwardRef(function Tabs(props, ref) {
14980
14987
  }), children);
14981
14988
  });
14982
14989
  const TabList = /*#__PURE__*/React.forwardRef(function Tab(props, ref) {
14983
- const className = cn('yt-tab__list border-b border-grey-300 flex flex-row m-0 mb-4', props.className);
14990
+ const className = cn('border-grey-300 flex flex-row m-0 mb-4', 'aria-orientation-horizontal:border-b', 'aria-orientation-vertical:border-r aria-orientation-vertical:m-0 aria-orientation-vertical:mr-4 aria-orientation-vertical:flex-col ', props.className);
14984
14991
  return /*#__PURE__*/React.createElement(TabsPrimitive.List, Object.assign({}, props, {
14985
14992
  className: className,
14986
14993
  ref: ref
@@ -14988,19 +14995,31 @@ const TabList = /*#__PURE__*/React.forwardRef(function Tab(props, ref) {
14988
14995
  });
14989
14996
  const TabTrigger = /*#__PURE__*/React.forwardRef(function Tab(props, ref) {
14990
14997
  const {
14998
+ children,
14991
14999
  id,
14992
15000
  disabled,
14993
15001
  ...otherProps
14994
15002
  } = props;
14995
- const className = cn('yt-tab bg-transparent border-b-2 border-transparent text-grey-700 m-0 py-2 px-4', disabled ? 'cursor-not-allowed !text-grey-500' : 'cursor-pointer rounded-t hover:border-grey-300 aria-selected:border-blue-500 aria-selected:text-black aria-selected:hover:border-blue-300 hover:text-black active:yt-focus active:border-blue-500 focus:yt-focus focus:border-blue-500', props.className);
15003
+ const triggerClassName = cn('group relative p-0.5 outline-none disabled:cursor-not-allowed disabled:text-black/50',
15004
+ // horizontal
15005
+ '[[aria-orientation="horizontal"]_&]:pb-1',
15006
+ // horizontal
15007
+ '[[aria-orientation="vertical"]_&]:pr-1');
15008
+ const buttonClassName = cn(getButtonClasses(), 'group-focus-visible:yt-focus-inset group-enabled:group-hover:wcag-grey-200 pointer-events-none rounded px-3');
15009
+ const activeClassName = cn('pointer-events-none absolute hidden bg-blue-500 group-aria-selected:flex',
15010
+ // horizontal
15011
+ '[[aria-orientation="horizontal"]_&]:rounded-t-sm [[aria-orientation="horizontal"]_&]:bottom-0 [[aria-orientation="horizontal"]_&]:left-0 [[aria-orientation="horizontal"]_&]:right-0 [[aria-orientation="horizontal"]_&]:-mb-px [[aria-orientation="horizontal"]_&]:h-0.5',
15012
+ // vertical
15013
+ '[[aria-orientation="vertical"]_&]:rounded-l-sm [[aria-orientation="vertical"]_&]:right-0 [[aria-orientation="vertical"]_&]:top-0 [[aria-orientation="vertical"]_&]:bottom-0 [[aria-orientation="vertical"]_&]:-mr-px [[aria-orientation="vertical"]_&]:w-0.5');
14996
15014
  return /*#__PURE__*/React.createElement(TabsPrimitive.Trigger, Object.assign({}, otherProps, {
14997
- className: className,
15015
+ className: triggerClassName,
14998
15016
  disabled: disabled,
14999
15017
  ref: ref,
15000
- style: {
15001
- transition: 'border 0.2s ease-in'
15002
- },
15003
15018
  value: id
15019
+ }), /*#__PURE__*/React.createElement("span", {
15020
+ className: buttonClassName
15021
+ }, children), /*#__PURE__*/React.createElement("span", {
15022
+ className: activeClassName
15004
15023
  }));
15005
15024
  });
15006
15025
  const TabContent = /*#__PURE__*/React.forwardRef(function Tab(props, ref) {
@@ -15008,7 +15027,7 @@ const TabContent = /*#__PURE__*/React.forwardRef(function Tab(props, ref) {
15008
15027
  id,
15009
15028
  ...otherProps
15010
15029
  } = props;
15011
- const className = cn('yt-tab__panel outline-none', props.className);
15030
+ const className = cn('[&[data-orientation="vertical"]]:grow outline-none', props.className);
15012
15031
  return /*#__PURE__*/React.createElement(TabsPrimitive.Content, Object.assign({}, otherProps, {
15013
15032
  className: className,
15014
15033
  ref: ref,
@@ -15189,7 +15208,7 @@ const Button$3 = /*#__PURE__*/React__default.forwardRef(function Button(props, r
15189
15208
  ref: ref
15190
15209
  }));
15191
15210
  });
15192
- const getButtonClasses$1 = (rounded = true) => cn('!h-9 !w-9 flex-shrink-0 flex-grow-0 cursor-pointer relative', 'focus:!outline-none focus:!shadow-none focus-visible:!yt-focus-dark ', 'bg-transparent hover:bg-white/[.08] focus:bg-white/[.08] aria-current-page:bg-white/[.08]', '!text-white hover:text-white focus:text-white', {
15211
+ const getButtonClasses$1 = (rounded = true) => cn('!h-9 !w-9 flex-shrink-0 flex-grow-0 cursor-pointer relative', 'focus:!outline-none focus:!shadow-none focus-visible:!yt-focus-dark ', 'bg-transparent enabled:hover:bg-white/[.08] focus:bg-white/[.08] aria-current-page:bg-white/[.08]', 'text-white', {
15193
15212
  '!rounded-full': rounded
15194
15213
  });
15195
15214
 
@@ -15215,7 +15234,7 @@ const Link$1 = /*#__PURE__*/React__default.forwardRef(function Link(props, ref)
15215
15234
  }) : null, children, isNew ? /*#__PURE__*/React__default.createElement(Badge, {
15216
15235
  color: "blue",
15217
15236
  small: true,
15218
- className: "absolute top-0 right-0 -mt-1.5 -mr-2.5 !h-3 !px-0.5 text-[0.55rem] font-normal"
15237
+ className: "absolute right-0 top-0 -mr-2.5 -mt-1.5 !h-3 !px-0.5 text-[0.55rem] font-normal"
15219
15238
  }, texts.header.new) : null);
15220
15239
  if (tooltip) {
15221
15240
  return /*#__PURE__*/React__default.createElement(Tooltip, {
@@ -15224,7 +15243,7 @@ const Link$1 = /*#__PURE__*/React__default.forwardRef(function Link(props, ref)
15224
15243
  }
15225
15244
  return link;
15226
15245
  });
15227
- const getLinkClasses = (icon = undefined) => cn('flex h-8 flex-shrink-0 flex-grow-0 cursor-pointer items-center justify-center ', 'focus:!shadow-none focus:!outline-none focus-visible:!yt-focus-dark', 'bg-transparent hover:bg-white/[.08] focus:bg-white/[.08] aria-current-page:bg-white/[.08]', '!text-white hover:text-white focus:text-white', {
15246
+ const getLinkClasses = (icon = undefined) => cn('flex h-8 flex-shrink-0 flex-grow-0 cursor-pointer items-center justify-center ', 'focus:!shadow-none focus:!outline-none focus-visible:!yt-focus-dark', 'bg-transparent hover:bg-white/[.08] focus:bg-white/[.08] aria-current-page:bg-white/[.08]', 'text-white hover:text-white focus:text-white', {
15228
15247
  '!rounded-full !h-9 !w-9': icon,
15229
15248
  'whitespace-nowrap px-3 rounded text-sm hidden lg:flex': !icon
15230
15249
  });