ar-design 0.2.59 → 0.2.60

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,6 @@
1
+ .row > [class^="col"].right,
2
+ .row > [class*="col"].right {
3
+ position: relative;
4
+ display: flex;
5
+ justify-content: right;
6
+ }
@@ -2,6 +2,7 @@
2
2
  @import url("./row/styles.css");
3
3
 
4
4
  /* Column Css */
5
+ @import url("./column/styles.css");
5
6
  @import url("./column/x-large.css");
6
7
  @import url("./column/large.css");
7
8
  @import url("./column/medium.css");
@@ -2,6 +2,9 @@
2
2
  position: relative;
3
3
  width: max-content;
4
4
  }
5
+ .ar-popover-wrapper.full-width {
6
+ width: 100%;
7
+ }
5
8
 
6
9
  .ar-popover {
7
10
  visibility: hidden;
@@ -10,9 +10,8 @@
10
10
  .ar-button.disabled {
11
11
  cursor: no-drop;
12
12
  }
13
-
14
- .ar-button.max-width {
15
- width: 100%;
13
+ .ar-button.full-width {
14
+ min-width: 100%;
16
15
  }
17
16
 
18
17
  .ar-button > .text {
@@ -5,6 +5,7 @@ interface IProps extends IChildren {
5
5
  content?: React.JSX.Element;
6
6
  onConfirm?: (confirm: boolean) => void;
7
7
  windowBlur?: boolean;
8
+ fullWidth?: boolean;
8
9
  config?: {
9
10
  buttons: {
10
11
  okButton: string;
@@ -5,11 +5,14 @@ import Button from "../../form/button";
5
5
  import Typography from "../../data-display/typography";
6
6
  import ReactDOM from "react-dom";
7
7
  const { Title } = Typography;
8
- const Popover = ({ children, title, message, content, onConfirm, windowBlur, config }) => {
8
+ const Popover = ({ children, title, message, content, onConfirm, windowBlur, fullWidth, config }) => {
9
9
  // refs
10
10
  const _arPopoverWrapper = useRef(null);
11
11
  const _arPopover = useRef(null);
12
12
  const _arPopoverElement = useRef(null);
13
+ const _arPopoverClassName = ["ar-popover-wrapper"];
14
+ if (fullWidth)
15
+ _arPopoverClassName.push("full-width");
13
16
  // states
14
17
  const [open, setOpen] = useState(false);
15
18
  // methods
@@ -57,7 +60,7 @@ const Popover = ({ children, title, message, content, onConfirm, windowBlur, con
57
60
  document.removeEventListener("keydown", handleKeys);
58
61
  };
59
62
  }, [open]);
60
- return (React.createElement("div", { ref: _arPopoverWrapper, className: "ar-popover-wrapper", role: "dialog" },
63
+ return (React.createElement("div", { ref: _arPopoverWrapper, className: _arPopoverClassName.map((c) => c).join(" "), role: "dialog" },
61
64
  open &&
62
65
  ReactDOM.createPortal(React.createElement("div", { ref: _arPopover, className: "ar-popover" },
63
66
  title && (React.createElement("div", { className: "title" },
@@ -24,5 +24,6 @@ interface IProps extends Omit<IGlobalProps, "children" | "disabled">, ISizes, Re
24
24
  type: "fixed" | "absolute";
25
25
  inset: ("top" | "right" | "bottom" | "left")[];
26
26
  };
27
+ fullWidth?: boolean;
27
28
  }
28
29
  export default IProps;
@@ -3,20 +3,22 @@ import React, { useRef } from "react";
3
3
  import "../../../assets/css/components/form/button/styles.css";
4
4
  import Utils from "../../../libs/infrastructure/shared/Utils";
5
5
  import Tooltip from "../../feedback/tooltip";
6
- const Button = ({ children, variant = "filled", shape, status = "primary", border, size = "normal", tooltip, position, icon, upperCase, ...attributes }) => {
6
+ const Button = ({ children, variant = "filled", shape, status = "primary", border, size = "normal", tooltip, position, fullWidth, icon, upperCase, ...attributes }) => {
7
7
  // refs
8
8
  const _button = useRef(null);
9
- const _buttonClassName = ["ar-button"];
10
- _buttonClassName.push(...Utils.GetClassName(variant, status, border, size, icon, attributes.className));
9
+ const _arButtonClassName = ["ar-button"];
10
+ _arButtonClassName.push(...Utils.GetClassName(variant, status, border, size, icon, attributes.className));
11
11
  if (!children)
12
- _buttonClassName.push("no-content");
12
+ _arButtonClassName.push("no-content");
13
+ if (fullWidth)
14
+ _arButtonClassName.push("full-width");
13
15
  if (shape)
14
- _buttonClassName.push(`ar-button-shape ${shape}`);
16
+ _arButtonClassName.push(`ar-button-shape ${shape}`);
15
17
  if (position) {
16
- _buttonClassName.push(position.type);
17
- _buttonClassName.push(position.inset.map((_inset) => _inset).join(" "));
18
+ _arButtonClassName.push(position.type);
19
+ _arButtonClassName.push(position.inset.map((_inset) => _inset).join(" "));
18
20
  }
19
- const buttonElement = (React.createElement("button", { ref: _button, ...attributes, className: _buttonClassName.map((c) => c).join(" "), onClick: (event) => {
21
+ const buttonElement = (React.createElement("button", { ref: _button, ...attributes, className: _arButtonClassName.map((c) => c).join(" "), onClick: (event) => {
20
22
  // Disabled gelmesi durumunda işlem yapmasına izin verme...
21
23
  if (attributes.disabled)
22
24
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ar-design",
3
- "version": "0.2.59",
3
+ "version": "0.2.60",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",