revdev-components 0.16.0 → 0.18.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.
package/build/index.js CHANGED
@@ -4868,8 +4868,18 @@ var FlatButton = function (_a) {
4868
4868
  var s$6 = {"root":"index-module_root__r-dVh"};
4869
4869
 
4870
4870
  var AppLink = function (_a) {
4871
- var href = _a.href, className = _a.className, children = _a.children, rest = __rest(_a, ["href", "className", "children"]);
4872
- return (React.createElement(Link, __assign({ href: href, className: classNames(s$6.root, className) }, rest), children));
4871
+ var _b;
4872
+ var propHref = _a.href, as = _a.as, className = _a.className, children = _a.children, shallow = _a.shallow, title = _a.title, route = _a.route, params = _a.params, noneDecoration = _a.noneDecoration, showUnderline = _a.showUnderline, aRef = _a.aRef, rest = __rest(_a, ["href", "as", "className", "children", "shallow", "title", "route", "params", "noneDecoration", "showUnderline", "aRef"]);
4873
+ var href = propHref;
4874
+ if (!href) {
4875
+ if (route) {
4876
+ href = route.build(params || {});
4877
+ }
4878
+ }
4879
+ return (React.createElement(Link, __assign({ href: href, as: as, shallow: shallow, title: title, className: classNames(s$6.root, className, (_b = {},
4880
+ _b[s$6.none__decoration] = noneDecoration,
4881
+ _b[s$6.show__underline] = showUnderline,
4882
+ _b)), ref: aRef }, rest), children));
4873
4883
  };
4874
4884
 
4875
4885
  var s$5 = {"root":"index-module_root__gpEkZ"};
@@ -1,5 +1,16 @@
1
1
  import React from "react";
2
- interface Props extends React.AnchorHTMLAttributes<HTMLAnchorElement> {
2
+ import { PagePath } from "page-path";
3
+ interface Props<TQuery = any> extends React.AnchorHTMLAttributes<HTMLAnchorElement> {
4
+ as?: string;
5
+ shallow?: boolean;
6
+ className?: string;
7
+ style?: React.CSSProperties;
8
+ noneDecoration?: boolean;
9
+ showUnderline?: boolean;
10
+ title?: string;
11
+ route?: PagePath<TQuery>;
12
+ params?: TQuery;
13
+ aRef?: React.RefObject<any>;
3
14
  }
4
15
  export declare const AppLink: React.FC<Props>;
5
16
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "revdev-components",
3
- "version": "0.16.0",
3
+ "version": "0.18.0",
4
4
  "main": "build/index.js",
5
5
  "module": "build/index.esm.js",
6
6
  "scripts": {