ar-design 0.1.16 → 0.1.17

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,7 +11,7 @@
11
11
  }
12
12
  .ar-layout > main > aside.ar-aside {
13
13
  position: sticky;
14
- top: 4rem;
14
+ top: 5.75rem;
15
15
  height: 100%;
16
16
  margin: 2rem 0;
17
17
  }
@@ -1,14 +1,14 @@
1
1
  "use client";
2
- import React, { forwardRef, useRef } from "react";
2
+ import React, { forwardRef } from "react";
3
3
  import "../../../assets/css/components/form/input/input.css";
4
4
  import Button from "../button";
5
- const Input = forwardRef(({ variant = "outlined", status = "light", icon, border, button, addon, ...attributes }, ref) => {
6
- // refs
7
- let _wrapperClassName = useRef("ar-input-wrapper").current;
8
- let _addonBeforeClassName = useRef("addon-before").current;
9
- let _addonAfterClassName = useRef("addon-after").current;
10
- let _inputWrapperClassName = useRef("ar-input").current;
11
- let _inputClassName = useRef("").current;
5
+ const Input = forwardRef(({ variant = "outlined", status = "light", icon, border = { radius: "sm" }, button, addon, ...attributes }, ref) => {
6
+ // variables
7
+ let _wrapperClassName = "ar-input-wrapper";
8
+ let _addonBeforeClassName = "addon-before";
9
+ let _addonAfterClassName = "addon-after";
10
+ let _inputWrapperClassName = "ar-input";
11
+ let _inputClassName = "";
12
12
  // input wrapper className
13
13
  if (icon && icon.element) {
14
14
  _inputWrapperClassName += ` icon`;
@@ -20,7 +20,7 @@ const Input = forwardRef(({ variant = "outlined", status = "light", icon, border
20
20
  if (status)
21
21
  _inputClassName += ` ${status}`;
22
22
  // border radius
23
- _inputClassName += ` border-radius-${border?.radius || "sm"}`;
23
+ _inputClassName += ` border-radius-${border.radius}`;
24
24
  // addon className
25
25
  if (addon) {
26
26
  _wrapperClassName += ` addon`;
@@ -58,7 +58,7 @@ const Input = forwardRef(({ variant = "outlined", status = "light", icon, border
58
58
  })();
59
59
  } })),
60
60
  addon?.after && React.createElement("span", { className: _addonAfterClassName }, addon?.after),
61
- button && (React.createElement(Button, { ...button, color: status, border: { radius: border?.radius || "sm" }, disabled: attributes.disabled }))));
61
+ button && (React.createElement(Button, { ...button, status: status, border: { radius: border.radius }, disabled: attributes.disabled }))));
62
62
  });
63
63
  Input.displayName = "Input";
64
64
  export default Input;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ar-design",
3
- "version": "0.1.16",
3
+ "version": "0.1.17",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",