allaw-ui 3.7.4 → 3.7.6

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,10 +239,26 @@
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
- background-color: rgba(255, 200, 87, 0.15) !important;
245
- border-color: var(--actions-warning, #ffc857) !important;
244
+ background-color: rgba(37, 206, 235, 0.25) !important;
245
+ border-color: var(--bleu-allaw, #25ceeb) !important;
246
+ }
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;
246
262
  }
247
263
 
248
264
  /* Bouton clear */
@@ -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",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "allaw-ui",
3
- "version": "3.7.4",
3
+ "version": "3.7.6",
4
4
  "description": "Composants UI pour l'application Allaw",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",