revdev-components 0.73.0 → 0.75.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.
@@ -3,13 +3,18 @@ import { RegularIconName } from "src/icon/regular";
3
3
  interface BaseHeaderActionProps {
4
4
  icon: RegularIconName;
5
5
  label?: string;
6
- onClick: () => void;
7
6
  tooltip?: string;
8
7
  }
8
+ interface ClickHeaderActionProps extends BaseHeaderActionProps {
9
+ onClick: () => void;
10
+ }
11
+ interface LinkHeaderActionProps extends BaseHeaderActionProps {
12
+ href: string;
13
+ }
9
14
  interface ContentHeaderActionProps {
10
15
  content: React.ReactNode;
11
16
  }
12
- export type HeaderActionProps = BaseHeaderActionProps | ContentHeaderActionProps;
17
+ export type HeaderActionProps = ClickHeaderActionProps | LinkHeaderActionProps | ContentHeaderActionProps;
13
18
  export interface HeaderActionPanelProps {
14
19
  className?: string;
15
20
  actions?: HeaderActionProps[];
package/build/index.js CHANGED
@@ -5201,18 +5201,25 @@ var FrontLayout = function (_a) {
5201
5201
  React.createElement(FrontFooter, __assign({}, footer)))));
5202
5202
  };
5203
5203
 
5204
- var s$3 = {"root":"index-module_root__OWeNb"};
5204
+ var s$3 = {"root":"index-module_root__OWeNb","link":"index-module_link__H8HcA","button":"index-module_button__UVt6a"};
5205
5205
 
5206
5206
  var HeaderActionPanel = function (_a) {
5207
5207
  var className = _a.className, actions = _a.actions;
5208
5208
  return (actions === null || actions === void 0 ? void 0 : actions.length) ? (React.createElement("div", { className: classNames(s$3.root, className) }, actions.map(function (action, i) {
5209
- var content = action === null || action === void 0 ? void 0 : action.content;
5210
- if (content) {
5211
- return React.createElement(React.Fragment, { key: i }, content);
5209
+ var content = action;
5210
+ var button = action;
5211
+ var link = action;
5212
+ if (content === null || content === void 0 ? void 0 : content.content) {
5213
+ return React.createElement(React.Fragment, { key: i }, content === null || content === void 0 ? void 0 : content.content);
5212
5214
  }
5213
- else {
5214
- var _a = action, icon = _a.icon, onClick = _a.onClick, label = _a.label, tooltip = _a.tooltip;
5215
- return (React.createElement(IconDivision, { key: i, icon: icon, onClick: onClick, tooltip: tooltip }, label));
5215
+ else if (!!(button === null || button === void 0 ? void 0 : button.onClick)) {
5216
+ var icon = button.icon, label = button.label, tooltip = button.tooltip;
5217
+ return (React.createElement(IconDivision, { key: i, icon: icon, onClick: button === null || button === void 0 ? void 0 : button.onClick, tooltip: tooltip, className: s$3.button }, label));
5218
+ }
5219
+ else if (!!(link === null || link === void 0 ? void 0 : link.href)) {
5220
+ var icon = button.icon, label = button.label, tooltip = button.tooltip;
5221
+ return (React.createElement(AppLink, { key: i, href: link.href, className: s$3.link },
5222
+ React.createElement(IconDivision, { icon: icon, tooltip: tooltip }, label)));
5216
5223
  }
5217
5224
  }))) : null;
5218
5225
  };
package/build/styles.css CHANGED
@@ -526,7 +526,6 @@ body {
526
526
  display: flex;
527
527
  flex-direction: row;
528
528
  align-items: center;
529
- color: var(--passiveColor);
530
529
  gap: 8px;
531
530
  }
532
531
  @media all and (max-width: 700px) {
@@ -534,6 +533,20 @@ body {
534
533
  margin: 0;
535
534
  }
536
535
  }
536
+
537
+ .index-module_link__H8HcA {
538
+ color: var(--passiveColor) !important;
539
+ }
540
+ .index-module_link__H8HcA:hover {
541
+ color: var(--color) !important;
542
+ }
543
+
544
+ .index-module_button__UVt6a {
545
+ color: var(--passiveColor);
546
+ }
547
+ .index-module_button__UVt6a:hover {
548
+ color: var(--color);
549
+ }
537
550
  .index-module_root__t3gxi {
538
551
  --linkColor: var(--passiveColor);
539
552
  display: flex;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "revdev-components",
3
- "version": "0.73.0",
3
+ "version": "0.75.0",
4
4
  "main": "build/index.js",
5
5
  "module": "build/index.esm.js",
6
6
  "scripts": {