ar-design 0.2.30 → 0.2.31

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.
@@ -11,6 +11,8 @@
11
11
  box-sizing: border-box;
12
12
  }
13
13
  .ar-layout > aside.ar-aside.left {
14
+ position: sticky;
15
+ top: 0;
14
16
  display: flex;
15
17
  flex-direction: column;
16
18
  border-right: solid 1px var(--gray-200);
@@ -19,6 +21,11 @@
19
21
  display: flex;
20
22
  align-items: center;
21
23
  }
24
+ .ar-layout > aside.ar-aside.left > footer {
25
+ position: fixed;
26
+ bottom: 1rem;
27
+ }
28
+
22
29
  .ar-layout > aside.ar-aside.right {
23
30
  }
24
31
 
@@ -11,8 +11,8 @@ const Checkbox = forwardRef(({ label, size = "normal", status, border = { radius
11
11
  _checkboxClassName.push(...Utils.GetClassName("filled", checked ? status : "light", border, size, undefined, attributes.className));
12
12
  // useEffects
13
13
  useEffect(() => {
14
- setChecked(attributes.checked ?? false);
15
- }, [attributes.checked]);
14
+ setChecked(attributes.checked ?? attributes.defaultChecked ?? false);
15
+ }, [attributes.checked, attributes.defaultChecked]);
16
16
  return (React.createElement("div", { className: "ar-checkbox-wrapper" },
17
17
  React.createElement("label", null,
18
18
  React.createElement("input", { ref: ref, type: "checkbox", ...attributes, size: 0, onChange: (event) => {
@@ -8,6 +8,7 @@ export interface IHeaderProps {
8
8
  export interface ILSiderProps {
9
9
  image?: React.ReactElement<SVGElement | HTMLImageElement>;
10
10
  text?: string | React.JSX.Element;
11
+ footer?: string;
11
12
  }
12
13
  export interface IMainProps extends IChildren {
13
14
  }
@@ -2,7 +2,8 @@
2
2
  import React from "react";
3
3
  import { useLayout } from "../../libs/core/application/hooks";
4
4
  import Title from "../data-display/typography/title/Title";
5
- const LSider = ({ image, text }) => {
5
+ import Paragraph from "../data-display/typography/paragraph/Paragraph";
6
+ const LSider = ({ image, text, footer }) => {
6
7
  // hooks
7
8
  const { config } = useLayout();
8
9
  const sider = config.layout.sider.left;
@@ -12,7 +13,9 @@ const LSider = ({ image, text }) => {
12
13
  React.createElement("div", { className: "logo" },
13
14
  image,
14
15
  React.createElement(Title, { Level: "h4", align: "center" }, text)),
15
- React.createElement("div", null, sider.element)));
16
+ React.createElement("div", null, sider.element),
17
+ footer && (React.createElement("footer", null,
18
+ React.createElement(Paragraph, { size: "small" }, footer)))));
16
19
  };
17
20
  LSider.displayName = "Layout.LSider";
18
21
  export default LSider;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ar-design",
3
- "version": "0.2.30",
3
+ "version": "0.2.31",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",