@royaloperahouse/harmonic 1.0.7-b → 1.0.8-a

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.
@@ -7433,10 +7433,12 @@ var HotFilters = function HotFilters(_ref) {
7433
7433
  var _templateObject$P, _templateObject2$C, _templateObject3$p;
7434
7434
  var ScrollContainer = /*#__PURE__*/styled.div(_templateObject$P || (_templateObject$P = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n overflow-x: scroll;\n\n scrollbar-width: none;\n -ms-overflow-style: none;\n\n ::-webkit-scrollbar {\n display: none;\n }\n\n @media ", " {\n overflow-x: visible;\n }\n"])), devices.mobile);
7435
7435
  var TabsContainerWrapper = /*#__PURE__*/styled.div(_templateObject2$C || (_templateObject2$C = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: row;\n width: fit-content;\n min-width: 400px;\n justify-content: space-between;\n gap: 16px;\n font-family: var(--font-family-sans);\n\n @media ", " {\n width: 100%;\n min-width: 0;\n flex-wrap: wrap;\n justify-content: flex-start;\n gap: 10px;\n }\n"])), devices.mobile);
7436
- var StyledTab = /*#__PURE__*/styled(PrimaryButton)(_templateObject3$p || (_templateObject3$p = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n border: 1px solid var(--color-base-black);\n min-width: fit-content;\n\n :hover {\n color: var(--color-base-white);\n }\n\n @media ", " {\n width: auto !important;\n min-width: fit-content;\n flex: 0 0 auto;\n }\n"])), devices.mobile);
7436
+ var StyledTab = /*#__PURE__*/styled(PrimaryButton)(_templateObject3$p || (_templateObject3$p = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n border: 1px solid var(--color-base-black);\n min-width: fit-content;\n\n &:focus-visible {\n outline: 2px solid var(--color-base-black);\n outline-offset: 2px;\n }\n\n @media (hover: hover) and (pointer: fine) {\n &:hover {\n color: var(--color-base-white);\n }\n }\n\n @media ", " {\n width: auto !important;\n min-width: fit-content;\n flex: 0 0 auto;\n }\n"])), devices.mobile);
7437
7437
 
7438
- var _excluded$j = ["text", "id", "isSelected"];
7438
+ var _excluded$j = ["text", "id", "isSelected", "allowedSelectedWith"];
7439
7439
  /**
7440
+ * A controlled filter button group that supports single- and multi-select strategies.
7441
+ * The consumer owns the selection state and receives the complete clicked item.
7440
7442
  * A horizontally scrollable tabs filter component used to display
7441
7443
  * selectable strategy tabs with configurable styling and selection behavior.
7442
7444
  *
@@ -7506,11 +7508,17 @@ var CustomStrategyTabsFilter = function CustomStrategyTabsFilter(_ref) {
7506
7508
  var _customViewConfig$bac, _customViewConfig$bac2, _customViewConfig$tex, _customViewConfig$tex2;
7507
7509
  var items = _ref.items,
7508
7510
  className = _ref.className,
7511
+ ariaLabel = _ref.ariaLabel,
7509
7512
  onClick = _ref.onClick,
7510
7513
  customViewConfig = _ref.customViewConfig;
7511
7514
  var handleClick = React__default.useCallback(function (item) {
7512
7515
  onClick(item);
7513
7516
  }, [onClick]);
7517
+ var handleKeyDown = React__default.useCallback(function (event, item) {
7518
+ if (event.key !== ' ' && event.key !== 'Spacebar') return;
7519
+ event.preventDefault();
7520
+ if (!event.repeat) handleClick(item);
7521
+ }, [handleClick]);
7514
7522
  // in case of any partially passed configuration, config defaults non defined
7515
7523
  var config = {
7516
7524
  selectIcon: (customViewConfig == null ? void 0 : customViewConfig.selectIcon) || 'Confirm',
@@ -7526,7 +7534,9 @@ var CustomStrategyTabsFilter = function CustomStrategyTabsFilter(_ref) {
7526
7534
  pressedColor: (customViewConfig == null ? void 0 : customViewConfig.pressedColor) || 'black-pressed'
7527
7535
  };
7528
7536
  return /*#__PURE__*/React__default.createElement(ScrollContainer, {
7529
- className: className
7537
+ "aria-label": ariaLabel,
7538
+ className: className,
7539
+ role: "group"
7530
7540
  }, /*#__PURE__*/React__default.createElement(TabsContainerWrapper, null, items.map(function (item) {
7531
7541
  var text = item.text,
7532
7542
  id = item.id,
@@ -7537,6 +7547,9 @@ var CustomStrategyTabsFilter = function CustomStrategyTabsFilter(_ref) {
7537
7547
  onClick: function onClick() {
7538
7548
  return handleClick(item);
7539
7549
  },
7550
+ onKeyDown: function onKeyDown(event) {
7551
+ return handleKeyDown(event, item);
7552
+ },
7540
7553
  iconName: isSelected ? config.selectIcon : undefined,
7541
7554
  backgroundColor: isSelected ? config.backgroundColor.select : config.backgroundColor.unselect,
7542
7555
  textColor: isSelected ? config.textColor.select : config.textColor.unselect,