@crystaldesign/diva-navigator 25.5.0-beta.34 → 25.5.0-beta.35

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.
@@ -83,7 +83,6 @@ var css_248z$m = ".button-UoHey {\n position: relative;\n cursor: pointer;\n
83
83
  styleInject(css_248z$m);
84
84
 
85
85
  var Button = function Button(_ref) {
86
- var _b$action2;
87
86
  var b = _ref.b,
88
87
  scrollerDiv = _ref.scrollerDiv;
89
88
  var _useTranslation = useTranslation(),
@@ -105,8 +104,14 @@ var Button = function Button(_ref) {
105
104
  });
106
105
  }
107
106
  }, [currentComponent]);
107
+ var isSelected = function isSelected() {
108
+ var _b$action2;
109
+ var type = !!(currentComponent !== null && currentComponent !== void 0 && currentComponent.type) ? currentComponent.type : undefined;
110
+ var buttonActionType = (_b$action2 = b.action) === null || _b$action2 === void 0 ? void 0 : _b$action2.type;
111
+ return type === buttonActionType || type === 'DIVA_WEBPLANNER' && buttonActionType === 'SELLER'; // exception for webplanner
112
+ };
108
113
  return /*#__PURE__*/jsxs("div", {
109
- className: classNames(button$2, !!(currentComponent !== null && currentComponent !== void 0 && currentComponent.type) && (currentComponent === null || currentComponent === void 0 ? void 0 : currentComponent.type) === ((_b$action2 = b.action) === null || _b$action2 === void 0 ? void 0 : _b$action2.type) ? selected$4 : undefined),
114
+ className: classNames(button$2, isSelected() ? selected$4 : undefined),
110
115
  ref: ref,
111
116
  "data-test-id": b.text,
112
117
  children: [t(b.text, b.text), /*#__PURE__*/jsx("a", {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/Header/Buttons/Button/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AACjD,OAAO,EAA+B,MAAM,IAAI,UAAU,EAAa,MAAM,0BAA0B,CAAC;AAIxG,KAAK,KAAK,GAAG;IAAE,CAAC,EAAE,UAAU,CAAC;IAAC,WAAW,EAAE,WAAW,GAAG,SAAS,CAAA;CAAE,CAAC;AAErE,QAAA,MAAM,MAAM,uBAAwB,KAAK,sBAiCxC,CAAC;AAEF,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/Header/Buttons/Button/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AACjD,OAAO,EAA+B,MAAM,IAAI,UAAU,EAAa,MAAM,0BAA0B,CAAC;AAIxG,KAAK,KAAK,GAAG;IAAE,CAAC,EAAE,UAAU,CAAC;IAAC,WAAW,EAAE,WAAW,GAAG,SAAS,CAAA;CAAE,CAAC;AAErE,QAAA,MAAM,MAAM,uBAAwB,KAAK,sBAmCxC,CAAC;AAEF,eAAe,MAAM,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crystaldesign/diva-navigator",
3
- "version": "25.5.0-beta.34",
3
+ "version": "25.5.0-beta.35",
4
4
  "license": "MIT",
5
5
  "devDependencies": {
6
6
  "@testing-library/jest-dom": "^6.5.0",
@@ -24,5 +24,5 @@
24
24
  },
25
25
  "module": "build/esm/index.js",
26
26
  "types": "./build/types/navigator/src/index.d.ts",
27
- "gitHead": "e52db959c4f8b707e0da8dddd196ce9817497633"
27
+ "gitHead": "901d3a06c739c69b1b8f77789217d3d17fa27e7c"
28
28
  }