allaw-ui 3.7.5 → 3.7.7

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.
@@ -239,12 +239,28 @@
239
239
 
240
240
  /* Nouveaux styles pour les fonctionnalités ajoutées */
241
241
 
242
- /* Style prefilled */
242
+ /* Style prefilled - champ rempli */
243
243
  .Input-prefilled {
244
244
  background-color: rgba(37, 206, 235, 0.25) !important;
245
245
  border-color: var(--bleu-allaw, #25ceeb) !important;
246
246
  }
247
247
 
248
+ /* Style prefilled - champ vide */
249
+ .Input-prefilled-empty {
250
+ background-color: rgba(225, 81, 81, 0.25) !important;
251
+ border-color: var(--actions-error, #e15151) !important;
252
+ }
253
+
254
+ .Input-prefilled-empty:hover {
255
+ border-color: var(--actions-error, #e15151) !important;
256
+ background-color: rgba(225, 81, 81, 0.35) !important;
257
+ }
258
+
259
+ .Input-prefilled-empty:focus-within {
260
+ border-color: var(--actions-error, #e15151) !important;
261
+ background-color: rgba(225, 81, 81, 0.15) !important;
262
+ }
263
+
248
264
  /* Bouton clear */
249
265
  .Input-clear-button {
250
266
  position: absolute;
@@ -101,7 +101,11 @@ var Input = forwardRef(function (_a, ref) {
101
101
  "*"))),
102
102
  React.createElement("div", { className: "Input-wrapper" },
103
103
  React.createElement("div", { className: "Input-container" },
104
- React.createElement("div", { className: "Input-input ".concat(isPrefilled ? "Input-prefilled" : "") },
104
+ React.createElement("div", { className: "Input-input ".concat(isPrefilled
105
+ ? value.trim()
106
+ ? "Input-prefilled"
107
+ : "Input-prefilled-empty"
108
+ : "") },
105
109
  React.createElement("input", __assign({ ref: inputRef, type: style === "password" && !isPasswordVisible ? "password" : type, placeholder: placeholder, className: "Input-placeholder ".concat(disableZoom ? "Input-no-zoom" : ""), value: value, onChange: function (e) {
106
110
  handleChange(e);
107
111
  rowChange && rowChange(e);
@@ -79,5 +79,7 @@ export const WithValidation: any;
79
79
  export const PasswordWithError: any;
80
80
  export const WithClearButton: any;
81
81
  export const PrefilledInput: any;
82
+ export const PrefilledEmptyInput: any;
83
+ export const PrefilledWithSpacesInput: any;
82
84
  export const WithAutofillDisabled: any;
83
85
  import Input from "./Input";
@@ -139,6 +139,26 @@ PrefilledInput.args = {
139
139
  showClearButton: true,
140
140
  style: "default",
141
141
  };
142
+ export var PrefilledEmptyInput = Template.bind({});
143
+ PrefilledEmptyInput.args = {
144
+ name: "prefilledEmptyInput",
145
+ title: "Nom de famille",
146
+ placeholder: "Entrez votre nom",
147
+ value: "",
148
+ isPrefilled: true,
149
+ showClearButton: true,
150
+ style: "default",
151
+ };
152
+ export var PrefilledWithSpacesInput = Template.bind({});
153
+ PrefilledWithSpacesInput.args = {
154
+ name: "prefilledSpacesInput",
155
+ title: "Champ avec espaces",
156
+ placeholder: "Entrez du texte",
157
+ value: " ",
158
+ isPrefilled: true,
159
+ showClearButton: true,
160
+ style: "default",
161
+ };
142
162
  export var WithAutofillDisabled = Template.bind({});
143
163
  WithAutofillDisabled.args = {
144
164
  name: "autofillDisabledInput",
@@ -10,7 +10,8 @@ export interface ContactCardProps {
10
10
  gender: "male" | "female";
11
11
  actionsButton?: ReactNode;
12
12
  actionIconName?: string;
13
- clientLabel?: string;
13
+ clientOfStudy?: boolean;
14
+ officeName?: "du cabinet" | "de l'étude";
14
15
  }
15
16
  declare const ContactCard: React.FC<ContactCardProps>;
16
17
  export default ContactCard;
@@ -3,10 +3,10 @@ import styles from "./contactCard.module.css";
3
3
  import OtherStatusTag from "../../atoms/tags/OtherStatusTag";
4
4
  import Link from "next/link";
5
5
  var ContactCard = function (_a) {
6
- var name = _a.name, status = _a.status, phone = _a.phone, email = _a.email, onClick = _a.onClick, actionsButton = _a.actionsButton, clientLabel = _a.clientLabel;
6
+ var name = _a.name, status = _a.status, phone = _a.phone, email = _a.email, onClick = _a.onClick, actionsButton = _a.actionsButton, _b = _a.clientOfStudy, clientOfStudy = _b === void 0 ? false : _b, _c = _a.officeName, officeName = _c === void 0 ? "du cabinet" : _c;
7
7
  var isPhoneEmpty = !phone || phone.trim() === "";
8
8
  var isEmailEmpty = !email || email.trim() === "";
9
- var displayClientLabel = clientLabel || "Client de l'\u00E9tude";
9
+ var displayClientLabel = clientOfStudy ? "Client ".concat(officeName) : "Non client";
10
10
  return (React.createElement("div", { className: styles.contactCard, onClick: function () { return onClick && onClick(); }, style: { cursor: onClick ? "pointer" : "default" } },
11
11
  React.createElement("div", { className: styles.contentContainer },
12
12
  React.createElement("div", { className: styles.nameTagContainer },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "allaw-ui",
3
- "version": "3.7.5",
3
+ "version": "3.7.7",
4
4
  "description": "Composants UI pour l'application Allaw",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",