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.
- package/dist/assets/css/components/data-display/grid-system/column/styles.css +6 -0
- package/dist/assets/css/components/data-display/grid-system/styles.css +1 -0
- package/dist/assets/css/components/feedback/popover/styles.css +3 -0
- package/dist/assets/css/components/form/button/styles.css +2 -3
- package/dist/components/feedback/popover/IProps.d.ts +1 -0
- package/dist/components/feedback/popover/index.js +5 -2
- package/dist/components/form/button/IProps.d.ts +1 -0
- package/dist/components/form/button/index.js +10 -8
- package/package.json +1 -1
|
@@ -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: "
|
|
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" },
|
|
@@ -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
|
|
10
|
-
|
|
9
|
+
const _arButtonClassName = ["ar-button"];
|
|
10
|
+
_arButtonClassName.push(...Utils.GetClassName(variant, status, border, size, icon, attributes.className));
|
|
11
11
|
if (!children)
|
|
12
|
-
|
|
12
|
+
_arButtonClassName.push("no-content");
|
|
13
|
+
if (fullWidth)
|
|
14
|
+
_arButtonClassName.push("full-width");
|
|
13
15
|
if (shape)
|
|
14
|
-
|
|
16
|
+
_arButtonClassName.push(`ar-button-shape ${shape}`);
|
|
15
17
|
if (position) {
|
|
16
|
-
|
|
17
|
-
|
|
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:
|
|
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;
|