revdev-components 0.7.0 → 0.9.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.
@@ -0,0 +1,17 @@
1
+ import React from "react";
2
+ import { BackSidebarProps } from "src/back-sidebar";
3
+ interface Props {
4
+ loading?: boolean;
5
+ shortMode?: boolean;
6
+ header?: React.ReactNode;
7
+ sidebar?: React.ReactNode;
8
+ children?: React.ReactNode;
9
+ className?: string;
10
+ headerClassName?: string;
11
+ sidebarClassName?: string;
12
+ contentClassName?: string;
13
+ loadingClassName?: string;
14
+ sidebarProps: BackSidebarProps;
15
+ }
16
+ export declare const BackLayout: React.FC<Props>;
17
+ export {};
@@ -0,0 +1,2 @@
1
+ import { BackSidebarSubOption } from "./interfaces";
2
+ export declare function useIsOptionActive(activePath: string, options: BackSidebarSubOption[]): boolean;
@@ -0,0 +1,11 @@
1
+ import React from "react";
2
+ import { BackSidebarOption } from "./interfaces";
3
+ export * from "./interfaces";
4
+ export interface BackSidebarProps {
5
+ className?: string;
6
+ options: BackSidebarOption[];
7
+ top?: React.ReactNode;
8
+ shortMode?: boolean;
9
+ activePath?: string;
10
+ }
11
+ export declare const BackSidebar: React.FC<BackSidebarProps>;
@@ -0,0 +1,12 @@
1
+ import { PagePath } from "page-path";
2
+ import { RegularIconName } from "src/icon";
3
+ export interface BackSidebarSubOption {
4
+ label: string;
5
+ icon?: RegularIconName;
6
+ path: PagePath;
7
+ }
8
+ export interface BackSidebarOption {
9
+ label: string;
10
+ icon?: RegularIconName;
11
+ options?: BackSidebarSubOption[];
12
+ }
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ import { BackSidebarOption } from "../interfaces";
3
+ interface Props {
4
+ option: BackSidebarOption;
5
+ activePath?: string;
6
+ }
7
+ export declare const BackSidebarMenuItem: React.FC<Props>;
8
+ export {};
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ import { BackSidebarOption } from "../interfaces";
3
+ interface Props {
4
+ option: BackSidebarOption;
5
+ activePath?: string;
6
+ }
7
+ export declare const BackSidebarShortMenuItem: React.FC<Props>;
8
+ export {};
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ import { BackSidebarSubOption } from "../interfaces";
3
+ interface Props {
4
+ option: BackSidebarSubOption;
5
+ activePath?: string;
6
+ }
7
+ export declare const BackSidebarSubMenuItem: React.FC<Props>;
8
+ export {};
@@ -5,4 +5,5 @@ export * from "./line";
5
5
  export * from "./input-number";
6
6
  export * from "./radio-button";
7
7
  export * from "./range-picker";
8
+ export * from "./select";
8
9
  export * from "./text-area";
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ import { SelectProps } from "antd";
3
+ import { FormLineProps } from "../line";
4
+ interface Props extends FormLineProps, Omit<SelectProps, "name"> {
5
+ }
6
+ export declare const SelectField: React.FC<Props>;
7
+ export {};
package/build/index.d.ts CHANGED
@@ -6,3 +6,6 @@ export * from "./hooks";
6
6
  export * from "./form-controls";
7
7
  export * from "./dialog";
8
8
  export * from "./flat-button";
9
+ export * from "./link";
10
+ export * from "./back-sidebar";
11
+ export * from "./back-layout";
package/build/index.js CHANGED
@@ -3,6 +3,7 @@
3
3
  var React = require('react');
4
4
  var classNames = require('classnames');
5
5
  var antd = require('antd');
6
+ var Link = require('next/link');
6
7
 
7
8
  function _interopNamespaceDefault(e) {
8
9
  var n = Object.create(null);
@@ -1519,13 +1520,13 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
1519
1520
  return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
1520
1521
  };
1521
1522
 
1522
- var s$a = {"root":"index-module_root__-LDR1"};
1523
+ var s$h = {"root":"index-module_root__-LDR1"};
1523
1524
 
1524
1525
  // https://www.svgrepo.com/
1525
1526
  function useBasicIcon(_a, icons) {
1526
1527
  var className = _a.className, name = _a.name, props = __rest(_a, ["className", "name"]);
1527
1528
  var svgAttrs = React.useMemo(function () {
1528
- return __assign({ className: classNames(s$a.root, className), fill: "currentColor" }, props);
1529
+ return __assign({ className: classNames(s$h.root, className), fill: "currentColor" }, props);
1529
1530
  }, [className, props]);
1530
1531
  var Icon = icons[name];
1531
1532
  return Icon ? React.createElement(Icon, __assign({}, svgAttrs)) : undefined;
@@ -4612,7 +4613,7 @@ var SocialIcon = function (props) {
4612
4613
  return useBasicIcon(props, icons);
4613
4614
  };
4614
4615
 
4615
- var s$9 = {"root":"index-module_root__gtTIa","action":"index-module_action__pOSde"};
4616
+ var s$g = {"root":"index-module_root__gtTIa","action":"index-module_action__pOSde"};
4616
4617
 
4617
4618
  function useForm(form) {
4618
4619
  var newForm = antd.Form.useForm()[0];
@@ -4649,10 +4650,10 @@ var AppForm = function (_a) {
4649
4650
  React.useEffect(function () {
4650
4651
  onValid === null || onValid === void 0 ? void 0 : onValid(valid);
4651
4652
  }, [onValid, valid]);
4652
- return (React.createElement(antd.Form, { form: form, onFinish: onFinish, className: classNames(s$9.root, className), layout: "vertical", onValuesChange: handleValuesChange, onFieldsChange: handleFieldsChange, initialValues: initialValues }, typeof children === "function" ? children({ valid: valid }) : children));
4653
+ return (React.createElement(antd.Form, { form: form, onFinish: onFinish, className: classNames(s$g.root, className), layout: "vertical", onValuesChange: handleValuesChange, onFieldsChange: handleFieldsChange, initialValues: initialValues }, typeof children === "function" ? children({ valid: valid }) : children));
4653
4654
  };
4654
4655
 
4655
- var s$8 = {"root":"index-module_root__2S1Jp"};
4656
+ var s$f = {"root":"index-module_root__2S1Jp"};
4656
4657
 
4657
4658
  function useLineProps(_a) {
4658
4659
  var lineClassName = _a.lineClassName, name = _a.name, label = _a.label, rules = _a.rules, valuePropName = _a.valuePropName, noStyle = _a.noStyle, rest = __rest(_a, ["lineClassName", "name", "label", "rules", "valuePropName", "noStyle"]);
@@ -4666,7 +4667,7 @@ var FormLine = function (_a) {
4666
4667
  }
4667
4668
  return [];
4668
4669
  }, [validateRules]);
4669
- return React.createElement(antd.Form.Item, __assign({ className: classNames(s$8.root, className), rules: rules }, props));
4670
+ return React.createElement(antd.Form.Item, __assign({ className: classNames(s$f.root, className), rules: rules }, props));
4670
4671
  };
4671
4672
 
4672
4673
  var DatePickerField = function (props) {
@@ -4687,12 +4688,12 @@ var InputField = function (props) {
4687
4688
  React.createElement(antd.Input, __assign({}, controlProps))));
4688
4689
  };
4689
4690
 
4690
- var s$7 = {"input":"index-module_input__LxXnu"};
4691
+ var s$e = {"input":"index-module_input__LxXnu"};
4691
4692
 
4692
4693
  var InputNumberField = function (props) {
4693
4694
  var _a = useLineProps(props), lineProps = _a[0], _b = _a[1], className = _b.className, controlProps = __rest(_b, ["className"]);
4694
4695
  return (React.createElement(FormLine, __assign({}, lineProps),
4695
- React.createElement(antd.InputNumber, __assign({ className: classNames(s$7.input, className) }, controlProps))));
4696
+ React.createElement(antd.InputNumber, __assign({ className: classNames(s$e.input, className) }, controlProps))));
4696
4697
  };
4697
4698
 
4698
4699
  var RadioButtonField = function (props) {
@@ -4701,13 +4702,19 @@ var RadioButtonField = function (props) {
4701
4702
  React.createElement(antd.Radio.Group, __assign({ buttonStyle: buttonStyle }, controlProps))));
4702
4703
  };
4703
4704
 
4704
- var s$6 = {"popup":"index-module_popup__5L587"};
4705
+ var s$d = {"popup":"index-module_popup__5L587"};
4705
4706
 
4706
4707
  var RangePicker = antd.DatePicker.RangePicker;
4707
4708
  var RangePickerField = function (props) {
4708
4709
  var _a = useLineProps(props), lineProps = _a[0], _b = _a[1], oneMonth = _b.oneMonth, controlProps = __rest(_b, ["oneMonth"]);
4709
4710
  return (React.createElement(FormLine, __assign({}, lineProps),
4710
- React.createElement(RangePicker, __assign({}, controlProps, { popupClassName: oneMonth ? s$6.popup : undefined }))));
4711
+ React.createElement(RangePicker, __assign({}, controlProps, { popupClassName: oneMonth ? s$d.popup : undefined }))));
4712
+ };
4713
+
4714
+ var SelectField = function (props) {
4715
+ var _a = useLineProps(props), lineProps = _a[0], controlProps = _a[1];
4716
+ return (React.createElement(FormLine, __assign({}, lineProps),
4717
+ React.createElement(antd.Select, __assign({}, controlProps))));
4711
4718
  };
4712
4719
 
4713
4720
  var TextArea = antd.Input.TextArea;
@@ -4757,29 +4764,29 @@ function usePrevious(value) {
4757
4764
  return ref === null || ref === void 0 ? void 0 : ref.current;
4758
4765
  }
4759
4766
 
4760
- var s$5 = {"root":"index-module_root__f8fnA"};
4767
+ var s$c = {"root":"index-module_root__f8fnA"};
4761
4768
 
4762
4769
  var DivisionRow = function (_a) {
4763
4770
  var children = _a.children, className = _a.className;
4764
- return React.createElement("div", { className: classNames(s$5.root, className) }, children);
4771
+ return React.createElement("div", { className: classNames(s$c.root, className) }, children);
4765
4772
  };
4766
4773
 
4767
- var s$4 = {"root":"index-module_root__xH-TN"};
4774
+ var s$b = {"root":"index-module_root__xH-TN"};
4768
4775
 
4769
4776
  var FormButton = function (_a) {
4770
4777
  var className = _a.className, _b = _a.submitText, submitText = _b === void 0 ? "Save" : _b;
4771
- return (React.createElement("div", { className: classNames(s$4.root, className) },
4778
+ return (React.createElement("div", { className: classNames(s$b.root, className) },
4772
4779
  React.createElement(antd.Button, { htmlType: "submit", type: "primary" }, submitText)));
4773
4780
  };
4774
4781
 
4775
- var s$3 = {"root":"index-module_root__Xj8zb"};
4782
+ var s$a = {"root":"index-module_root__Xj8zb"};
4776
4783
 
4777
4784
  var FormError = function (_a) {
4778
4785
  var children = _a.children, className = _a.className;
4779
- return children ? React.createElement("div", { className: classNames(s$3.root, className) }, children) : null;
4786
+ return children ? React.createElement("div", { className: classNames(s$a.root, className) }, children) : null;
4780
4787
  };
4781
4788
 
4782
- var s$2 = {"root":"index-module_root__C7wx2","content":"index-module_content__RsiJT","close":"index-module_close__lBc6p"};
4789
+ var s$9 = {"root":"index-module_root__C7wx2","content":"index-module_content__RsiJT","close":"index-module_close__lBc6p"};
4783
4790
 
4784
4791
  var InfoDialog = function (_a) {
4785
4792
  var children = _a.children, className = _a.className, width = _a.width, hideClose = _a.hideClose, onClose = _a.onClose, _b = _a.open, open = _b === void 0 ? true : _b, contentClassName = _a.contentClassName, _c = _a.maskClosable, maskClosable = _c === void 0 ? false : _c;
@@ -4791,22 +4798,22 @@ var InfoDialog = function (_a) {
4791
4798
  }
4792
4799
  return result;
4793
4800
  }, [width]);
4794
- return (React.createElement(antd.Modal, { open: open, onCancel: onClose, style: style, className: classNames(s$2.root, className), maskClosable: maskClosable, footer: null },
4795
- React.createElement("div", { className: classNames(s$2.content, contentClassName) },
4801
+ return (React.createElement(antd.Modal, { open: open, onCancel: onClose, style: style, className: classNames(s$9.root, className), maskClosable: maskClosable, footer: null },
4802
+ React.createElement("div", { className: classNames(s$9.content, contentClassName) },
4796
4803
  children,
4797
- hideClose ? null : React.createElement(RegularIcon, { name: "cross", className: s$2.close, onClick: onClose }))));
4804
+ hideClose ? null : React.createElement(RegularIcon, { name: "cross", className: s$9.close, onClick: onClose }))));
4798
4805
  };
4799
4806
 
4800
- var s$1 = {"root":"index-module_root__BQI-i","header":"index-module_header__OUCQj","close":"index-module_close__-FN6K","content":"index-module_content__BpXha","footer":"index-module_footer__xqKte"};
4807
+ var s$8 = {"root":"index-module_root__BQI-i","header":"index-module_header__OUCQj","close":"index-module_close__-FN6K","content":"index-module_content__BpXha","footer":"index-module_footer__xqKte"};
4801
4808
 
4802
4809
  var RegularDialog = function (_a) {
4803
4810
  var titlePrefix = _a.titlePrefix, title = _a.title, children = _a.children, _b = _a.hideFooter, hideFooter = _b === void 0 ? false : _b, className = _a.className, width = _a.width, okText = _a.okText, cancelText = _a.cancelText, footerClassName = _a.footerClassName, contentClassName = _a.contentClassName, hideOk = _a.hideOk, onOk = _a.onOk, onClose = _a.onClose, _c = _a.open, open = _c === void 0 ? true : _c;
4804
4811
  var close = React.useMemo(function () {
4805
- return React.createElement(RegularIcon, { name: "cross", className: s$1.close, onClick: onClose });
4812
+ return React.createElement(RegularIcon, { name: "cross", className: s$8.close, onClick: onClose });
4806
4813
  }, [onClose]);
4807
4814
  var titleContent = React.useMemo(function () {
4808
4815
  if (typeof title === "string") {
4809
- return (React.createElement("div", { className: s$1.header },
4816
+ return (React.createElement("div", { className: s$8.header },
4810
4817
  React.createElement("div", null, ((titlePrefix || "") + " " || "") + title),
4811
4818
  close));
4812
4819
  }
@@ -4814,7 +4821,7 @@ var RegularDialog = function (_a) {
4814
4821
  return title(close);
4815
4822
  }
4816
4823
  return null;
4817
- }, [s$1, title, titlePrefix, close]);
4824
+ }, [s$8, title, titlePrefix, close]);
4818
4825
  var style = React.useMemo(function () {
4819
4826
  var result = {};
4820
4827
  if (width) {
@@ -4828,15 +4835,15 @@ var RegularDialog = function (_a) {
4828
4835
  onOk();
4829
4836
  }
4830
4837
  }, [onOk]);
4831
- return (React.createElement(antd.Modal, { open: open, onCancel: onClose, style: style, className: classNames(s$1.root, className), maskClosable: false, footer: null },
4838
+ return (React.createElement(antd.Modal, { open: open, onCancel: onClose, style: style, className: classNames(s$8.root, className), maskClosable: false, footer: null },
4832
4839
  titleContent,
4833
- React.createElement("div", { className: classNames(s$1.content, contentClassName) }, children),
4834
- hideFooter ? null : (React.createElement("div", { className: classNames(s$1.footer, footerClassName) },
4840
+ React.createElement("div", { className: classNames(s$8.content, contentClassName) }, children),
4841
+ hideFooter ? null : (React.createElement("div", { className: classNames(s$8.footer, footerClassName) },
4835
4842
  React.createElement(antd.Button, { onClick: onClose }, cancelText || "Cancel"),
4836
4843
  hideOk ? null : (React.createElement(antd.Button, { type: "primary", onClick: handleOk }, okText || "OK"))))));
4837
4844
  };
4838
4845
 
4839
- var s = {"root":"index-module_root__9mhio"};
4846
+ var s$7 = {"root":"index-module_root__9mhio"};
4840
4847
 
4841
4848
  function isRegular(icon) {
4842
4849
  return RegularIconNameList.includes(icon);
@@ -4846,13 +4853,126 @@ function isSocial(icon) {
4846
4853
  }
4847
4854
  var FlatButton = function (_a) {
4848
4855
  var children = _a.children, className = _a.className, icon = _a.icon, onClick = _a.onClick;
4849
- return (React.createElement("div", { className: classNames(s.root, className), onClick: onClick },
4856
+ return (React.createElement("div", { className: classNames(s$7.root, className), onClick: onClick },
4850
4857
  isRegular(icon) ? React.createElement(RegularIcon, { name: icon }) : null,
4851
4858
  isSocial(icon) ? React.createElement(SocialIcon, { name: icon }) : null,
4852
4859
  children ? React.createElement("span", null, children) : null));
4853
4860
  };
4854
4861
 
4862
+ var s$6 = {"root":"index-module_root__r-dVh"};
4863
+
4864
+ var AppLink = function (_a) {
4865
+ var href = _a.href, className = _a.className, children = _a.children, rest = __rest(_a, ["href", "className", "children"]);
4866
+ return (React.createElement(Link, __assign({ href: href, className: classNames(s$6.root, className) }, rest), children));
4867
+ };
4868
+
4869
+ var s$5 = {"root":"index-module_root__gpEkZ"};
4870
+
4871
+ var AppLinkButton = function (_a) {
4872
+ var className = _a.className, children = _a.children, rest = __rest(_a, ["className", "children"]);
4873
+ return (React.createElement("div", __assign({ className: classNames(s$5.root, className) }, rest), children));
4874
+ };
4875
+
4876
+ var s$4 = {"root":"index-module_root__DRIJ9","title":"index-module_title__IrIK1","title__active":"index-module_title__active__tmRVg","title__label":"index-module_title__label__KtjaK","list":"index-module_list__lL8Kc","list__open":"index-module_list__open__WhqVg"};
4877
+
4878
+ var s$3 = {"root":"index-module_root__En9mt","root__active":"index-module_root__active__32aMB"};
4879
+
4880
+ var BackSidebarSubMenuItem = function (_a) {
4881
+ var _b;
4882
+ var _c = _a.activePath, activePath = _c === void 0 ? "" : _c, option = _a.option;
4883
+ var icon = option.icon, label = option.label, path = option.path;
4884
+ var isActive = path.isActive(activePath);
4885
+ return (React.createElement(AppLink, { className: classNames(s$3.root, (_b = {}, _b[s$3.root__active] = isActive, _b)), href: path.build() },
4886
+ icon && React.createElement(RegularIcon, { name: icon }),
4887
+ React.createElement("span", null, label)));
4888
+ };
4889
+
4890
+ function useIsOptionActive(activePath, options) {
4891
+ if (activePath === void 0) { activePath = ""; }
4892
+ return React.useMemo(function () {
4893
+ return !!options.find(function (x) {
4894
+ return x.path.isActive(activePath);
4895
+ });
4896
+ }, [activePath, options]);
4897
+ }
4898
+
4899
+ var BackSidebarMenuItem = function (_a) {
4900
+ var _b, _c;
4901
+ var option = _a.option, activePath = _a.activePath;
4902
+ var icon = option.icon, label = option.label, _d = option.options, options = _d === void 0 ? [] : _d;
4903
+ var isActive = useIsOptionActive(activePath, options);
4904
+ var _e = React.useState(isActive), open = _e[0], setOpen = _e[1];
4905
+ React.useEffect(function () {
4906
+ if (isActive) {
4907
+ setOpen(true);
4908
+ }
4909
+ }, [isActive]);
4910
+ var handleClick = React.useCallback(function () {
4911
+ setOpen(!open);
4912
+ }, [open]);
4913
+ return (React.createElement("div", { className: s$4.root },
4914
+ React.createElement("div", { className: classNames(s$4.title, (_b = {}, _b[s$4.title__active] = isActive, _b)), onClick: handleClick },
4915
+ icon && React.createElement(RegularIcon, { name: icon }),
4916
+ React.createElement("span", { className: s$4.title__label }, label),
4917
+ React.createElement(RegularIcon, { name: open ? "keyboard-arrow-down" : "keyboard-arrow-right" })),
4918
+ React.createElement("div", { className: classNames(s$4.list, (_c = {}, _c[s$4.list__open] = open, _c)) }, options.map(function (x, i) {
4919
+ return React.createElement(BackSidebarSubMenuItem, { key: i, option: x });
4920
+ }))));
4921
+ };
4922
+
4923
+ var s$2 = {"root":"index-module_root__v-d7O","list":"index-module_list__v1Yma","master":"index-module_master__Jhlca","master__active":"index-module_master__active__KPHU1"};
4924
+
4925
+ var BackSidebarShortMenuItem = function (_a) {
4926
+ var _b;
4927
+ var option = _a.option, activePath = _a.activePath;
4928
+ var icon = option.icon, _c = option.options, options = _c === void 0 ? [] : _c;
4929
+ var isActive = useIsOptionActive(activePath, options);
4930
+ var _d = React.useState(isActive), open = _d[0], setOpen = _d[1];
4931
+ React.useEffect(function () {
4932
+ if (isActive) {
4933
+ setOpen(true);
4934
+ }
4935
+ }, [isActive]);
4936
+ var handleClick = React.useCallback(function () {
4937
+ setOpen(!open);
4938
+ }, [open]);
4939
+ return (React.createElement("div", { className: s$2.root },
4940
+ React.createElement("div", { className: classNames(s$2.master, (_b = {}, _b[s$2.master__active] = isActive, _b)), onClick: handleClick }, icon && React.createElement(RegularIcon, { name: icon })),
4941
+ React.createElement("div", { className: classNames(s$2.list) }, options.map(function (x, i) {
4942
+ return React.createElement(BackSidebarSubMenuItem, { key: i, option: x });
4943
+ }))));
4944
+ };
4945
+
4946
+ var s$1 = {"root":"index-module_root__oQRmx"};
4947
+
4948
+ // https://www.einfosoft.com/templates/admin/spice/source/edit_booking.html#
4949
+ var BackSidebar = function (_a) {
4950
+ var className = _a.className, options = _a.options, top = _a.top, shortMode = _a.shortMode, activePath = _a.activePath;
4951
+ return (React.createElement("div", { className: classNames(s$1.root, className) },
4952
+ top ? React.createElement("div", { className: classNames(s$1.top) }, top) : null,
4953
+ React.createElement("div", { className: s$1.menu }, options.map(function (option, i) {
4954
+ return shortMode ? (React.createElement(BackSidebarShortMenuItem, { key: i, option: option, activePath: activePath })) : (React.createElement(BackSidebarMenuItem, { key: i, option: option, activePath: activePath }));
4955
+ }))));
4956
+ };
4957
+
4958
+ var s = {"root":"index-module_root__BkOp7","root__short":"index-module_root__short__maBe-","header":"index-module_header__34B0-","sidebar":"index-module_sidebar__xjW3v","content":"index-module_content__cMuen","loading":"index-module_loading__KxkST"};
4959
+
4960
+ var BackLayout = function (_a) {
4961
+ var _b;
4962
+ var className = _a.className, loading = _a.loading, shortMode = _a.shortMode, header = _a.header, children = _a.children, headerClassName = _a.headerClassName, sidebarClassName = _a.sidebarClassName, contentClassName = _a.contentClassName, loadingClassName = _a.loadingClassName, sidebarProps = _a.sidebarProps;
4963
+ return (React.createElement("div", { className: classNames(s.root, className, (_b = {}, _b[s.root__short] = shortMode, _b)) },
4964
+ React.createElement("div", { className: classNames(s.header, headerClassName) }, header),
4965
+ React.createElement("div", { className: classNames(s.sidebar, sidebarClassName) },
4966
+ React.createElement(BackSidebar, __assign({}, sidebarProps))),
4967
+ loading ? (React.createElement("div", { className: classNames(s.loading, loadingClassName) },
4968
+ React.createElement(antd.Spin, { size: "large" }))) : (React.createElement("div", { className: classNames(s.content, contentClassName) }, children))));
4969
+ };
4970
+
4855
4971
  exports.AppForm = AppForm;
4972
+ exports.AppLink = AppLink;
4973
+ exports.AppLinkButton = AppLinkButton;
4974
+ exports.BackLayout = BackLayout;
4975
+ exports.BackSidebar = BackSidebar;
4856
4976
  exports.DatePickerField = DatePickerField;
4857
4977
  exports.DivisionRow = DivisionRow;
4858
4978
  exports.FlagIcon = FlagIcon;
@@ -4870,6 +4990,7 @@ exports.RangePickerField = RangePickerField;
4870
4990
  exports.RegularDialog = RegularDialog;
4871
4991
  exports.RegularIcon = RegularIcon;
4872
4992
  exports.RegularIconNameList = RegularIconNameList;
4993
+ exports.SelectField = SelectField;
4873
4994
  exports.SocialIcon = SocialIcon;
4874
4995
  exports.SocialIconNameList = SocialIconNameList;
4875
4996
  exports.TextAreaField = TextAreaField;
@@ -0,0 +1,5 @@
1
+ import React from "react";
2
+ interface Props extends React.AnchorHTMLAttributes<HTMLDivElement> {
3
+ }
4
+ export declare const AppLinkButton: React.FC<Props>;
5
+ export {};
@@ -0,0 +1,2 @@
1
+ export * from "./link";
2
+ export * from "./button";
@@ -0,0 +1,5 @@
1
+ import React from "react";
2
+ interface Props extends React.AnchorHTMLAttributes<HTMLAnchorElement> {
3
+ }
4
+ export declare const AppLink: React.FC<Props>;
5
+ export {};
package/build/styles.css CHANGED
@@ -112,4 +112,149 @@
112
112
  }
113
113
  .index-module_root__9mhio:hover {
114
114
  background-color: rgb(221, 221, 221);
115
+ }
116
+ .index-module_root__r-dVh {
117
+ color: var(--linkColor) !important;
118
+ text-decoration: none;
119
+ cursor: pointer;
120
+ }
121
+ .index-module_root__r-dVh:hover {
122
+ color: var(--linkColor);
123
+ text-decoration: underline;
124
+ }
125
+ .index-module_root__gpEkZ {
126
+ display: inline;
127
+ color: var(--linkColor) !important;
128
+ text-decoration: none;
129
+ cursor: pointer;
130
+ }
131
+ .index-module_root__gpEkZ:hover {
132
+ color: var(--linkColor);
133
+ text-decoration: underline;
134
+ }
135
+ .index-module_root__DRIJ9 {
136
+ overflow: hidden;
137
+ }
138
+
139
+ .index-module_title__IrIK1 {
140
+ height: 46px;
141
+ display: flex;
142
+ flex-direction: row;
143
+ gap: 10px;
144
+ align-items: center;
145
+ padding: 0 15px;
146
+ cursor: pointer;
147
+ font-weight: 500;
148
+ }
149
+ .index-module_title__active__tmRVg, .index-module_title__IrIK1:hover {
150
+ background-color: var(--backSidebarHoverItemBackgroundColor);
151
+ color: var(--backSidebarActiveColor);
152
+ }
153
+ .index-module_title__label__KtjaK {
154
+ flex: 1;
155
+ }
156
+
157
+ .index-module_list__lL8Kc {
158
+ display: none;
159
+ }
160
+ .index-module_list__open__WhqVg {
161
+ display: block;
162
+ }
163
+ .index-module_root__En9mt {
164
+ height: 46px;
165
+ display: flex;
166
+ flex-direction: row;
167
+ gap: 10px;
168
+ align-items: center;
169
+ padding: 0 15px;
170
+ cursor: pointer;
171
+ font-weight: 500;
172
+ padding-left: 30px;
173
+ background-color: var(--backSidebarSubItemBackgroundColor);
174
+ }
175
+ .index-module_root__En9mt:hover > svg,
176
+ .index-module_root__En9mt:hover span {
177
+ color: var(--backSidebarActiveColor) !important;
178
+ text-decoration: none !important;
179
+ }
180
+ .index-module_root__active__32aMB > svg,
181
+ .index-module_root__active__32aMB span {
182
+ color: var(--backSidebarActiveColor) !important;
183
+ }
184
+ .index-module_root__En9mt > svg,
185
+ .index-module_root__En9mt span {
186
+ color: var(--backSidebarColor) !important;
187
+ }
188
+ .index-module_root__v-d7O {
189
+ position: relative;
190
+ }
191
+ .index-module_root__v-d7O:hover .index-module_list__v1Yma {
192
+ display: block;
193
+ }
194
+
195
+ .index-module_master__Jhlca {
196
+ height: 46px;
197
+ display: flex;
198
+ flex-direction: row;
199
+ gap: 10px;
200
+ align-items: center;
201
+ padding: 0 15px;
202
+ cursor: pointer;
203
+ font-weight: 500;
204
+ }
205
+ .index-module_master__active__KPHU1, .index-module_master__Jhlca:hover {
206
+ background-color: var(--backSidebarHoverItemBackgroundColor);
207
+ color: var(--backSidebarActiveColor);
208
+ }
209
+
210
+ .index-module_list__v1Yma {
211
+ display: none;
212
+ position: absolute;
213
+ top: 0;
214
+ left: 100%;
215
+ z-index: 10;
216
+ }
217
+ .index-module_root__oQRmx {
218
+ padding: 10px 0;
219
+ display: flex;
220
+ flex-direction: column;
221
+ gap: 20px;
222
+ color: var(--backSidebarColor);
223
+ background-color: var(--backSidebarBackgroundColor);
224
+ }
225
+ .index-module_root__BkOp7 {
226
+ background-color: var(--backLayoutBackgroundColor);
227
+ display: grid;
228
+ grid-template: "sidebar header" var(--backHeaderHeight) "sidebar content" 1fr/250px 1fr;
229
+ height: 100vh;
230
+ transition: grid-template 0.5s;
231
+ gap: 0;
232
+ }
233
+ .index-module_root__short__maBe- {
234
+ grid-template: "sidebar header" var(--backHeaderHeight) "sidebar content" 1fr/50px 1fr;
235
+ }
236
+
237
+ .index-module_header__34B0- {
238
+ grid-area: header;
239
+ background-color: var(--backLayoutHeaderBackgroundColor);
240
+ border-bottom: 1px solid var(--backLayoutBorderColor);
241
+ box-shadow: var(--backHeaderBoxShadow);
242
+ }
243
+
244
+ .index-module_sidebar__xjW3v {
245
+ grid-area: sidebar;
246
+ background-color: var(--backSidebarBackgroundColor);
247
+ color: var(--backSidebarColor);
248
+ }
249
+
250
+ .index-module_content__cMuen {
251
+ grid-area: content;
252
+ overflow: auto;
253
+ }
254
+
255
+ .index-module_loading__KxkST {
256
+ grid-area: content;
257
+ display: flex;
258
+ justify-content: center;
259
+ align-items: center;
115
260
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "revdev-components",
3
- "version": "0.7.0",
3
+ "version": "0.9.0",
4
4
  "main": "build/index.js",
5
5
  "module": "build/index.esm.js",
6
6
  "scripts": {
@@ -26,7 +26,8 @@
26
26
  "lodash.debounce": ">=4",
27
27
  "next": ">=13",
28
28
  "react": ">=18",
29
- "react-dom": ">=18"
29
+ "react-dom": ">=18",
30
+ "page-path": ">=0.7"
30
31
  },
31
32
  "devDependencies": {
32
33
  "@chromatic-com/storybook": "^3.2.2",
@@ -47,6 +48,7 @@
47
48
  "classnames": "^2.5.1",
48
49
  "eslint-config-varp": "^1.10.0",
49
50
  "next": "14.2.16",
51
+ "page-path": "^0.7.0",
50
52
  "postcss": "^8",
51
53
  "rollup": "^4.24.4",
52
54
  "rollup-obfuscator": "^4.1.1",