allaw-ui 1.0.18 → 1.0.19
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/components/atoms/buttons/IconButton.css +17 -0
- package/dist/components/atoms/buttons/IconButton.js +7 -2
- package/dist/components/atoms/inputs/Input.d.ts +1 -0
- package/dist/components/atoms/inputs/Input.js +6 -6
- package/dist/components/molecules/contactCard/ContactCard.css +28 -0
- package/package.json +1 -1
|
@@ -109,3 +109,20 @@
|
|
|
109
109
|
font-size: 18px;
|
|
110
110
|
background: transparent;
|
|
111
111
|
}
|
|
112
|
+
|
|
113
|
+
.icon-button.custom-color {
|
|
114
|
+
background-color: var(--custom-background-color);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.icon-button.custom-color:hover {
|
|
118
|
+
opacity: 0.8;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/* Modifier les sélecteurs hover existants */
|
|
122
|
+
.icon-button.smallFilled:not(.custom-color):hover {
|
|
123
|
+
background: var(--grey-venom, #e6edf5);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.icon-button.largeFilled:not(.custom-color):hover {
|
|
127
|
+
background: var(--grey-venom, #e6edf5);
|
|
128
|
+
}
|
|
@@ -2,8 +2,13 @@ import React from "react";
|
|
|
2
2
|
import "./IconButton.css";
|
|
3
3
|
import "../../../styles/global.css";
|
|
4
4
|
var IconButton = function (_a) {
|
|
5
|
-
var style = _a.style, iconName = _a.iconName,
|
|
6
|
-
|
|
5
|
+
var style = _a.style, iconName = _a.iconName, color = _a.color, onClick = _a.onClick;
|
|
6
|
+
var customStyle = color
|
|
7
|
+
? {
|
|
8
|
+
"--custom-background-color": color,
|
|
9
|
+
}
|
|
10
|
+
: {};
|
|
11
|
+
return (React.createElement("button", { className: "icon-button ".concat(style, " ").concat(color ? "custom-color" : ""), onClick: onClick, style: customStyle },
|
|
7
12
|
React.createElement("i", { className: "icon ".concat(iconName) })));
|
|
8
13
|
};
|
|
9
14
|
IconButton.defaultProps = {
|
|
@@ -14,6 +14,7 @@ export interface InputProps {
|
|
|
14
14
|
onChange?: (value: string) => void;
|
|
15
15
|
value?: string;
|
|
16
16
|
error?: string;
|
|
17
|
+
color?: "bleu-allaw" | "mid-grey" | "dark-grey" | "noir" | "pure-white" | "grey-venom" | "venom-grey-dark";
|
|
17
18
|
}
|
|
18
19
|
export interface InputRef {
|
|
19
20
|
validate: () => boolean;
|
|
@@ -6,11 +6,11 @@ import { commonRegex } from "../../../utils/regex";
|
|
|
6
6
|
import TinyInfo from "../typography/TinyInfo";
|
|
7
7
|
import Paragraph from "../typography/Paragraph";
|
|
8
8
|
var Input = forwardRef(function (_a, ref) {
|
|
9
|
-
var title = _a.title, _b = _a.style, style = _b === void 0 ? "default" : _b, placeholder = _a.placeholder, endIcon = _a.endIcon, _c = _a.isRequired, isRequired = _c === void 0 ? false : _c, validate = _a.validate, onError = _a.onError, onChange = _a.onChange, propValue = _a.value, propError = _a.error;
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
var
|
|
13
|
-
var
|
|
9
|
+
var title = _a.title, _b = _a.style, style = _b === void 0 ? "default" : _b, placeholder = _a.placeholder, endIcon = _a.endIcon, _c = _a.isRequired, isRequired = _c === void 0 ? false : _c, validate = _a.validate, onError = _a.onError, onChange = _a.onChange, propValue = _a.value, propError = _a.error, _d = _a.color, color = _d === void 0 ? "noir" : _d;
|
|
10
|
+
var _e = useState(false), isPasswordVisible = _e[0], setIsPasswordVisible = _e[1];
|
|
11
|
+
var _f = useState(propValue || ""), value = _f[0], setValue = _f[1];
|
|
12
|
+
var _g = useState(propError || ""), error = _g[0], setError = _g[1];
|
|
13
|
+
var _h = useState(false), isTouched = _h[0], setIsTouched = _h[1];
|
|
14
14
|
var inputRef = useRef(null);
|
|
15
15
|
useEffect(function () {
|
|
16
16
|
setValue(propValue || "");
|
|
@@ -71,7 +71,7 @@ var Input = forwardRef(function (_a, ref) {
|
|
|
71
71
|
};
|
|
72
72
|
return (React.createElement("div", { className: "Input Input-".concat(style) },
|
|
73
73
|
React.createElement("div", { className: "Input-title-container" },
|
|
74
|
-
React.createElement(Paragraph, { variant: "semiBold", color:
|
|
74
|
+
React.createElement(Paragraph, { variant: "semiBold", color: color, text: title }),
|
|
75
75
|
isRequired && title && (React.createElement("span", { className: "Input-required" },
|
|
76
76
|
"\u00A0",
|
|
77
77
|
"*"))),
|
|
@@ -325,6 +325,7 @@
|
|
|
325
325
|
|
|
326
326
|
.contact-card.editable .content-container {
|
|
327
327
|
display: flex;
|
|
328
|
+
flex-direction: row;
|
|
328
329
|
align-items: center;
|
|
329
330
|
gap: 24px;
|
|
330
331
|
}
|
|
@@ -392,6 +393,33 @@
|
|
|
392
393
|
gap: 16px;
|
|
393
394
|
}
|
|
394
395
|
|
|
396
|
+
@media (max-width: 800px) {
|
|
397
|
+
.contact-card.editable .telephone-email-items {
|
|
398
|
+
flex-direction: column;
|
|
399
|
+
align-items: flex-start;
|
|
400
|
+
gap: 10px;
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
@media (max-width: 600px) {
|
|
405
|
+
.contact-card.editable .content-container {
|
|
406
|
+
flex-direction: column;
|
|
407
|
+
}
|
|
408
|
+
.contact-card.editable .name-tag-container {
|
|
409
|
+
align-items: flex-start;
|
|
410
|
+
width: 100%;
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
@media (max-width: 450px) {
|
|
415
|
+
.contact-card.editable .action-button-container {
|
|
416
|
+
display: block;
|
|
417
|
+
position: absolute;
|
|
418
|
+
top: 24px;
|
|
419
|
+
right: 24px;
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
|
|
395
423
|
.action-button-container {
|
|
396
424
|
display: flex;
|
|
397
425
|
flex-direction: column;
|