@design-system-rte/angular 0.5.3 → 0.7.0

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.
@@ -102,7 +102,131 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
102
102
  args: ["class"]
103
103
  }] } });
104
104
 
105
- const togglableIcons = {
105
+ // This file is auto-generated. Do not edit manually.
106
+ const RegularIcons = {
107
+ add: "add",
108
+ "alt-route": "alt_route",
109
+ apps: "apps",
110
+ "arrow-alt-down": "arrow_alt_down",
111
+ "arrow-alt-down-left": "arrow_alt_down_left",
112
+ "arrow-alt-down-right": "arrow_alt_down_right",
113
+ "arrow-alt-left": "arrow_alt_left",
114
+ "arrow-alt-right": "arrow_alt_right",
115
+ "arrow-alt-up": "arrow_alt_up",
116
+ "arrow-alt-up-left": "arrow_alt_up_left",
117
+ "arrow-alt-up-right": "arrow_alt_up_right",
118
+ "arrow-angle-down-left": "arrow_angle_down_left",
119
+ "arrow-angle-down-right": "arrow_angle_down_right",
120
+ "arrow-angle-up-left": "arrow_angle_up_left",
121
+ "arrow-angle-up-right": "arrow_angle_up_right",
122
+ "arrow-chevron-down": "arrow_chevron_down",
123
+ "arrow-chevron-left": "arrow_chevron_left",
124
+ "arrow-chevron-right": "arrow_chevron_right",
125
+ "arrow-chevron-up": "arrow_chevron_up",
126
+ "arrow-double-down": "arrow_double_down",
127
+ "arrow-double-left": "arrow_double_left",
128
+ "arrow-double-right": "arrow_double_right",
129
+ "arrow-double-up": "arrow_double_up",
130
+ "arrow-down": "arrow_down",
131
+ "arrow-down-left": "arrow_down_left",
132
+ "arrow-down-right": "arrow_down_right",
133
+ "arrow-drop-down": "arrow_drop_down",
134
+ "arrow-drop-up": "arrow_drop_up",
135
+ "arrow-left": "arrow_left",
136
+ "arrow-right": "arrow_right",
137
+ "arrow-up": "arrow_up",
138
+ "arrow-up-left": "arrow_up_left",
139
+ "arrow-up-right": "arrow_up_right",
140
+ asterisk: "asterisk",
141
+ "attach-file": "attach_file",
142
+ "battery-alt-empty": "battery_alt_empty",
143
+ "battery-alt-full": "battery_alt_full",
144
+ "battery-charging": "battery_charging",
145
+ "battery-empty": "battery_empty",
146
+ "battery-full": "battery_full",
147
+ bluetooth: "bluetooth",
148
+ "bluetooth-off": "bluetooth_off",
149
+ "chart-bar": "chart_bar",
150
+ "chart-bar-stacked": "chart_bar_stacked",
151
+ check: "check",
152
+ "check-indeterminate": "check_indeterminate",
153
+ "check-small": "check_small",
154
+ "checkbox-empty": "checkbox_empty",
155
+ close: "close",
156
+ compare: "compare",
157
+ "copy-all": "copy_all",
158
+ "crisis-alert": "crisis_alert",
159
+ cut: "cut",
160
+ download: "download",
161
+ "download-done": "download_done",
162
+ "drag-handle": "drag_handle",
163
+ "drag-indicator": "drag_indicator",
164
+ exclamation: "exclamation",
165
+ "explore-travel": "explore_travel",
166
+ "external-link": "external_link",
167
+ filter: "filter",
168
+ "filter-off": "filter_off",
169
+ "first-page": "first_page",
170
+ forward: "forward",
171
+ fullscreen: "fullscreen",
172
+ "fullscreen-exit": "fullscreen_exit",
173
+ history: "history",
174
+ "hourglass-empty": "hourglass_empty",
175
+ "info-i": "info_i",
176
+ language: "language",
177
+ "last-page": "last_page",
178
+ link: "link",
179
+ "link-off": "link_off",
180
+ list: "list",
181
+ "location-disabled": "location_disabled",
182
+ login: "login",
183
+ logout: "logout",
184
+ menu: "menu",
185
+ "menu-open": "menu_open",
186
+ monitoring: "monitoring",
187
+ "more-down": "more_down",
188
+ "more-horiz": "more_horiz",
189
+ "more-up": "more_up",
190
+ "more-vert": "more_vert",
191
+ ohm: "ohm",
192
+ "open-in-full": "open_in_full",
193
+ paste: "paste",
194
+ "play-pause": "play_pause",
195
+ "power-input": "power_input",
196
+ "power-plug": "power_plug",
197
+ "power-settings": "power_settings",
198
+ "priority-high": "priority_high",
199
+ public: "public",
200
+ publish: "publish",
201
+ "question-mark": "question_mark",
202
+ radar: "radar",
203
+ "radio-button-empty": "radio_button_empty",
204
+ redo: "redo",
205
+ reload: "reload",
206
+ remove: "remove",
207
+ reply: "reply",
208
+ "reply-all": "reply_all",
209
+ route: "route",
210
+ search: "search",
211
+ "side-navigation": "side_navigation",
212
+ sort: "sort",
213
+ "support-agent": "support_agent",
214
+ timeline: "timeline",
215
+ "trending-down": "trending_down",
216
+ "trending-flat": "trending_flat",
217
+ "trending-up": "trending_up",
218
+ tune: "tune",
219
+ undo: "undo",
220
+ upload: "upload",
221
+ water: "water",
222
+ "water-alt": "water_alt",
223
+ wifi: "wifi",
224
+ "wifi-off": "wifi_off",
225
+ windmill: "windmill",
226
+ "zoom-in": "zoom_in",
227
+ "zoom-out": "zoom_out",
228
+ };
229
+ const TogglableIcons = {
106
230
  "add-circle": ["add_circle_outlined", "add_circle_filled"],
107
231
  "admin-panel-settings": ["admin_panel_settings_outlined", "admin_panel_settings_filled"],
108
232
  analytics: ["analytics_outlined", "analytics_filled"],
@@ -132,6 +256,7 @@ const togglableIcons = {
132
256
  "calendar-month": ["calendar_month_outlined", "calendar_month_filled"],
133
257
  "calendar-today": ["calendar_today_outlined", "calendar_today_filled"],
134
258
  call: ["call_outlined", "call_filled"],
259
+ cancel: ["cancel_outlined", "cancel_filled"],
135
260
  category: ["category_outlined", "category_filled"],
136
261
  "chart-add": ["chart_add_outlined", "chart_add_filled"],
137
262
  "chart-area": ["chart_area_outlined", "chart_area_filled"],
@@ -201,8 +326,8 @@ const togglableIcons = {
201
326
  "keep-off": ["keep_off_outlined", "keep_off_filled"],
202
327
  label: ["label_outlined", "label_filled"],
203
328
  laptop: ["laptop_outlined", "laptop_filled"],
204
- "left-panel-open": ["left_panel_open_outlined", "left_panel_open_filled"],
205
329
  "left-panel-close": ["left_panel_close_outlined", "left_panel_close_filled"],
330
+ "left-panel-open": ["left_panel_open_outlined", "left_panel_open_filled"],
206
331
  "light-off": ["light_off_outlined", "light_off_filled"],
207
332
  "lightbulb-alt": ["lightbulb_alt_outlined", "lightbulb_alt_filled"],
208
333
  "lightbulb-circle": ["lightbulb_circle_outlined", "lightbulb_circle_filled"],
@@ -279,130 +404,9 @@ const togglableIcons = {
279
404
  warning: ["warning_outlined", "warning_filled"],
280
405
  waterdrop: ["waterdrop_outlined", "waterdrop_filled"],
281
406
  };
282
- const regularIcons = {
283
- add: "add",
284
- "alt-route": "alt_route",
285
- apps: "apps",
286
- "arrow-alt-down": "arrow_alt_down",
287
- "arrow-alt-down-left": "arrow_alt_down_left",
288
- "arrow-alt-down-right": "arrow_alt_down_right",
289
- "arrow-alt-left": "arrow_alt_left",
290
- "arrow-alt-right": "arrow_alt_right",
291
- "arrow-alt-up": "arrow_alt_up",
292
- "arrow-alt-up-left": "arrow_alt_up_left",
293
- "arrow-alt-up-right": "arrow_alt_up_right",
294
- "arrow-angle-down-left": "arrow_angle_down_left",
295
- "arrow-angle-down-right": "arrow_angle_down_right",
296
- "arrow-angle-up-left": "arrow_angle_up_left",
297
- "arrow-angle-up-right": "arrow_angle_up_right",
298
- "arrow-chevron-down": "arrow_chevron_down",
299
- "arrow-chevron-left": "arrow_chevron_left",
300
- "arrow-chevron-right": "arrow_chevron_right",
301
- "arrow-chevron-up": "arrow_chevron_up",
302
- "arrow-double-down": "arrow_double_down",
303
- "arrow-double-left": "arrow_double_left",
304
- "arrow-double-right": "arrow_double_right",
305
- "arrow-double-up": "arrow_double_up",
306
- "arrow-down": "arrow_down",
307
- "arrow-down-left": "arrow_down_left",
308
- "arrow-down-right": "arrow_down_right",
309
- "arrow-drop-down": "arrow_drop_down",
310
- "arrow-drop-up": "arrow_drop_up",
311
- "arrow-left": "arrow_left",
312
- "arrow-right": "arrow_right",
313
- "arrow-up": "arrow_up",
314
- "arrow-up-left": "arrow_up_left",
315
- "arrow-up-right": "arrow_up_right",
316
- asterisk: "asterisk",
317
- "attach-file": "attach_file",
318
- "battery-alt-empty": "battery_alt_empty",
319
- "battery-alt-full": "battery_alt_full",
320
- "battery-charging": "battery_charging",
321
- "battery-empty": "battery_empty",
322
- "battery-full": "battery_full",
323
- bluetooth: "bluetooth",
324
- "bluetooth-off": "bluetooth_off",
325
- "chart-bar": "chart_bar",
326
- "chart-bar-stacked": "chart_bar_stacked",
327
- check: "check",
328
- "check-indeterminate": "check_indeterminate",
329
- "check-small": "check_small",
330
- "checkbox-empty": "checkbox_empty",
331
- close: "close",
332
- compare: "compare",
333
- "copy-all": "copy_all",
334
- "crisis-alert": "crisis_alert",
335
- cut: "cut",
336
- download: "download",
337
- "download-done": "download_done",
338
- "drag-handle": "drag_handle",
339
- "drag-indicator": "drag_indicator",
340
- exclamation: "exclamation",
341
- "explore-travel": "explore_travel",
342
- "external-link": "external_link",
343
- filter: "filter",
344
- "filter-off": "filter_off",
345
- "first-page": "first_page",
346
- forward: "forward",
347
- fullscreen: "fullscreen",
348
- "fullscreen-exit": "fullscreen_exit",
349
- history: "history",
350
- "hourglass-empty": "hourglass_empty",
351
- "info-i": "info_i",
352
- language: "language",
353
- "last-page": "last_page",
354
- link: "link",
355
- "link-off": "link_off",
356
- list: "list",
357
- "location-disabled": "location_disabled",
358
- login: "login",
359
- logout: "logout",
360
- menu: "menu",
361
- "menu-open": "menu_open",
362
- monitoring: "monitoring",
363
- "more-down": "more_down",
364
- "more-horiz": "more_horiz",
365
- "more-up": "more_up",
366
- "more-vert": "more_vert",
367
- ohm: "ohm",
368
- "open-in-full": "open_in_full",
369
- paste: "paste",
370
- "play-pause": "play_pause",
371
- "power-input": "power_input",
372
- "power-plug": "power_plug",
373
- "power-settings": "power_settings",
374
- "priority-high": "priority_high",
375
- public: "public",
376
- publish: "publish",
377
- "question-mark": "question_mark",
378
- radar: "radar",
379
- "radio-button-empty": "radio_button_empty",
380
- redo: "redo",
381
- reload: "reload",
382
- remove: "remove",
383
- reply: "reply",
384
- "reply-all": "reply_all",
385
- route: "route",
386
- search: "search",
387
- "side-navigation": "side_navigation",
388
- sort: "sort",
389
- "support-agent": "support_agent",
390
- timeline: "timeline",
391
- "trending-down": "trending_down",
392
- "trending-flat": "trending_flat",
393
- "trending-up": "trending_up",
394
- tune: "tune",
395
- undo: "undo",
396
- upload: "upload",
397
- water: "water",
398
- "water-alt": "water_alt",
399
- wifi: "wifi",
400
- "wifi-off": "wifi_off",
401
- windmill: "windmill",
402
- "zoom-out": "zoom_out",
403
- "zoom-in": "zoom_in",
404
- };
405
- const isValidIconName = (name) => isValidIconName$1(name, regularIcons, togglableIcons);
407
+ function isValidIconName(iconName) {
408
+ return isValidIconName$1(iconName, RegularIcons, TogglableIcons);
409
+ }
406
410
 
407
411
  class IconService {
408
412
  constructor() {
@@ -412,14 +416,14 @@ class IconService {
412
416
  if (!this.http) {
413
417
  throw new Error("HttpClient is not available");
414
418
  }
415
- const toggableIcon = togglableIcons[name];
416
- if (toggableIcon) {
417
- const [outlinedIconName, filledIconName] = toggableIcon;
419
+ const togglableIcon = TogglableIcons[name];
420
+ if (togglableIcon) {
421
+ const [outlinedIconName, filledIconName] = togglableIcon;
418
422
  const iconName = appearance === "filled" ? filledIconName : outlinedIconName;
419
423
  return this.http.get(`assets/icons/${iconName}.svg`, { responseType: "text" });
420
424
  }
421
425
  else {
422
- const iconName = regularIcons[name];
426
+ const iconName = RegularIcons[name];
423
427
  if (!iconName) {
424
428
  throw new Error(`Icon ${name} not found`);
425
429
  }
@@ -823,9 +827,108 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
823
827
  args: [{ selector: "rte-icon-button-toggle", imports: [CommonModule, IconButtonComponent], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<rte-icon-button \n [size]=\"size()\" \n [name]=\"name()\" \n [compactSpacing]=\"compactSpacing()\"\n [disabled]=\"disabled()\"\n [ariaLabel]=\"ariaLabel()\"\n [ariaLabelledBy]=\"ariaLabelledBy()\"\n [type]=\"type()\"\n [variant]=\"variant()\"\n [appearance]=\"selected() ? 'filled' : 'outlined'\"\n (click)=\"onClick($event)\"\n/>" }]
824
828
  }] });
825
829
 
830
+ class TextInputComponent {
831
+ constructor() {
832
+ this.label = input("");
833
+ this.labelPosition = input("top");
834
+ this.required = input(false);
835
+ this.showCounter = input(false);
836
+ this.value = input("");
837
+ this.internalValue = signal(this.value());
838
+ this.leftIcon = input(null);
839
+ this.showRightIcon = input(true);
840
+ this.rightIconAction = input("clean");
841
+ this.showLabelRequirement = input(false);
842
+ this.assistiveAppearance = input("description");
843
+ this.showAssistiveIcon = input(false);
844
+ this.assistiveTextLabel = input("");
845
+ this.error = input(false);
846
+ this.maxLength = input(150);
847
+ this.disabled = input(false);
848
+ this.readOnly = input(false);
849
+ this.width = input("300px");
850
+ this.ariaLabel = input("");
851
+ this.ariaRequired = input(false);
852
+ this.ariaLabelledby = input("");
853
+ this.valueChange = output();
854
+ this.rightIconClick = output();
855
+ this.characterCount = signal(this.internalValue().length);
856
+ this.isHiddenInput = signal(this.showRightIcon() && this.rightIconAction() === "visibilityOn");
857
+ this.displayedLeftIcon = computed(() => (this.error() ? "error" : this.leftIcon()));
858
+ this.displayCounter = computed(() => this.showCounter() && typeof this.maxLength() === "number");
859
+ this.rightIconName = computed(() => {
860
+ if (["visibilityOn", "visibilityOff"].includes(this.rightIconAction())) {
861
+ return this.isHiddenInput() ? "visibility-show" : "visibility-hide";
862
+ }
863
+ else if (this.rightIconAction() === "clean") {
864
+ return "close";
865
+ }
866
+ return "";
867
+ });
868
+ this.rightIconAriaLabel = computed(() => {
869
+ if (["visibilityOn", "visibilityOff"].includes(this.rightIconAction())) {
870
+ return this.isHiddenInput() ? "show text" : "hide text";
871
+ }
872
+ else if (this.rightIconAction() === "clean") {
873
+ return "clear";
874
+ }
875
+ return "";
876
+ });
877
+ this.shouldShowRightIcon = computed(() => {
878
+ if (this.readOnly() || this.disabled()) {
879
+ return false;
880
+ }
881
+ if (this.rightIconAction() === "clean") {
882
+ return !!this.internalValue()?.length && this.showRightIcon();
883
+ }
884
+ return this.showRightIcon() && !!this.rightIconAction();
885
+ });
886
+ this.lastParentValue = this.value();
887
+ effect(() => {
888
+ const parentValue = this.value();
889
+ if (parentValue !== this.lastParentValue) {
890
+ this.lastParentValue = parentValue;
891
+ this.internalValue.set(parentValue);
892
+ }
893
+ }, { allowSignalWrites: true });
894
+ }
895
+ handleChange(event) {
896
+ const input = event.target;
897
+ this.internalValue.set(input.value);
898
+ this.valueChange.emit(input.value);
899
+ if (this.maxLength()) {
900
+ this.characterCount.set(input.value.length);
901
+ }
902
+ this.valueChange.emit(input.value);
903
+ }
904
+ onRightIconClickHandler() {
905
+ this.rightIconClick.emit();
906
+ this.triggerRightIconAction();
907
+ }
908
+ toggleInputVisibility() {
909
+ this.isHiddenInput.set(!this.isHiddenInput());
910
+ }
911
+ triggerRightIconAction() {
912
+ if (this.rightIconAction() === "clean") {
913
+ this.internalValue.set("");
914
+ this.valueChange.emit("");
915
+ this.characterCount.set(0);
916
+ }
917
+ if (["visibilityOn", "visibilityOff"].includes(this.rightIconAction())) {
918
+ this.toggleInputVisibility();
919
+ }
920
+ }
921
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: TextInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
922
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "17.3.12", type: TextInputComponent, isStandalone: true, selector: "rte-text-input", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, labelPosition: { classPropertyName: "labelPosition", publicName: "labelPosition", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, showCounter: { classPropertyName: "showCounter", publicName: "showCounter", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, leftIcon: { classPropertyName: "leftIcon", publicName: "leftIcon", isSignal: true, isRequired: false, transformFunction: null }, showRightIcon: { classPropertyName: "showRightIcon", publicName: "showRightIcon", isSignal: true, isRequired: false, transformFunction: null }, rightIconAction: { classPropertyName: "rightIconAction", publicName: "rightIconAction", isSignal: true, isRequired: false, transformFunction: null }, showLabelRequirement: { classPropertyName: "showLabelRequirement", publicName: "showLabelRequirement", isSignal: true, isRequired: false, transformFunction: null }, assistiveAppearance: { classPropertyName: "assistiveAppearance", publicName: "assistiveAppearance", isSignal: true, isRequired: false, transformFunction: null }, showAssistiveIcon: { classPropertyName: "showAssistiveIcon", publicName: "showAssistiveIcon", isSignal: true, isRequired: false, transformFunction: null }, assistiveTextLabel: { classPropertyName: "assistiveTextLabel", publicName: "assistiveTextLabel", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null }, maxLength: { classPropertyName: "maxLength", publicName: "maxLength", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readOnly: { classPropertyName: "readOnly", publicName: "readOnly", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaRequired: { classPropertyName: "ariaRequired", publicName: "ariaRequired", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "ariaLabelledby", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", rightIconClick: "rightIconClick" }, ngImport: i0, template: "<div\n class=\"container {{labelPosition()}}\"\n [ngClass]=\"{'error': error()}\"\n [style.width]=\"width()\"\n>\n <ng-container *ngIf=\"label()\">\n <div class=\"text\">\n <div class=\"label-container\">\n <label class=\"input-label\" id=\"inputLabel\">\n {{ label() }}\n </label>\n <ng-container *ngIf=\"required()\">\n <ng-container *ngIf=\"showLabelRequirement(); else requiredIcon\">\n <span class=\"required-text\">(obligatoire)</span>\n </ng-container>\n <ng-template #requiredIcon>\n <span class=\"required-icon-container\">\n <rte-icon name=\"asterisk\" [size]=\"8\" />\n </span>\n </ng-template>\n </ng-container>\n <ng-container *ngIf=\"!required() && showLabelRequirement()\">\n <span class=\"required-text\">(optionnel)</span>\n </ng-container>\n </div>\n <ng-container *ngIf=\"displayCounter() && labelPosition() === 'top'\">\n <p class=\"input-counter\" data-testid=\"input-counter\">\n {{ characterCount() }}/{{ maxLength() }}\n </p>\n </ng-container>\n </div>\n </ng-container>\n\n <div class=\"input-container\">\n <div\n class=\"input {{labelPosition()}}\"\n [ngClass]=\"{'disabled': disabled(), 'read-only': readOnly()}\"\n >\n <div class=\"input-bar\" [ngClass]=\"{'with-left-icon': displayedLeftIcon(), 'with-right-icon': rightIconAction()}\">\n <ng-container *ngIf=\"displayedLeftIcon()\">\n <rte-icon\n appearance=\"outlined\"\n class=\"left-icon\"\n aria-hidden=\"true\"\n [name]=\"displayedLeftIcon()!\"\n />\n </ng-container>\n\n <input\n #inputRef\n class=\"input-field\"\n [ngClass]=\"{'error': error()}\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledby()\"\n [attr.aria-required]=\"ariaRequired()\"\n [type]=\"isHiddenInput() ? 'password' : 'text'\"\n [maxLength]=\"maxLength()\"\n [disabled]=\"disabled()\"\n [readOnly]=\"readOnly()\"\n [value]=\"internalValue()\"\n (input)=\"handleChange($event)\"\n />\n\n <ng-container *ngIf=\"shouldShowRightIcon()\">\n <rte-icon-button\n appearance=\"outlined\"\n variant=\"transparent\"\n class=\"right-icon\"\n data-testid=\"right-icon\"\n [name]=\"rightIconName() || 'close'\"\n [ariaLabel]=\"rightIconAriaLabel()\"\n (click)=\"onRightIconClickHandler()\"\n />\n </ng-container>\n </div>\n </div>\n\n <ng-container *ngIf=\"assistiveTextLabel()\">\n <div class=\"assistive-text\">\n <ng-container *ngIf=\"showAssistiveIcon() && assistiveAppearance() === 'error'\">\n <rte-icon name=\"error\" appearance=\"outlined\" class=\"assistive-icon-error\" [size]=\"12\" />\n </ng-container>\n <ng-container *ngIf=\"showAssistiveIcon() && assistiveAppearance() === 'success'\">\n <rte-icon name=\"check\" appearance=\"outlined\" class=\"assistive-icon-success\" [size]=\"12\" />\n </ng-container>\n <ng-container *ngIf=\"assistiveAppearance() === 'link'; else assistiveLabel\">\n <rte-link [label]=\"assistiveTextLabel()\" />\n </ng-container>\n <ng-template #assistiveLabel>\n <p class=\"assistive-label\" [ngClass]=\"assistiveAppearance()\">\n {{ assistiveTextLabel() }}\n </p>\n </ng-template>\n </div>\n </ng-container>\n </div>\n\n <ng-container *ngIf=\"displayCounter() && labelPosition() === 'side'\">\n <p class=\"input-counter\" data-testid=\"input-counter\">\n {{ characterCount() }}/{{ maxLength() }}\n </p>\n </ng-container>\n</div>", styles: ["@import\"https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:wght,FILL,GRAD@400,0,0&display=swap\";@import\"https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,200..1000;1,200..1000&display=swap\";.container{display:flex;width:300px;padding:0;flex-direction:column;justify-content:center;align-items:flex-start;gap:0px}.container.side{align-items:center;flex-direction:row}.container.side .text{width:auto;align-items:center}.container.side .input-counter{padding:0 8px}.container.error .input-container .input .input-bar .left-icon{color:var(--content-danger)}.container .text{width:100%;display:flex;flex-direction:row;align-items:flex-end;justify-content:space-between;padding:2px 8px;box-sizing:border-box}.container .text .label-container{display:flex;align-items:flex-start}.container .text .label-container .input-label{color:var(--content-secondary);font-family:Arial;font-size:14px;font-weight:400;line-height:20px;letter-spacing:0px}.container .text .label-container .required-text{color:var(--content-tertiary);align-self:center;font-feature-settings:\"liga\" off,\"clig\" off;font-style:normal;font-family:Arial;font-weight:400;font-size:12px;line-height:16px;letter-spacing:0px;margin-block:0px;margin-inline:4px}.container .text .label-container .required-icon-container{color:var(--content-danger);display:flex;align-items:center;justify-content:center;margin-inline:4px}.container .input-container{display:flex;flex-direction:column;height:32px;width:100%;min-width:48px;min-height:32px;max-height:32px;align-self:stretch}.container .input-container .input .input-bar{position:relative;display:flex;align-items:center}.container .input-container .input .input-bar.with-left-icon .input-field{padding-left:32px}.container .input-container .input .input-bar.with-right-icon .input-field{padding-right:32px}.container .input-container .input .input-bar .left-icon{position:absolute;left:8px;color:var(--content-secondary)}.container .input-container .input .input-bar .right-icon{position:absolute;right:8px;display:flex;align-items:center;justify-content:center;color:var(--content-secondary)}.container .input-container .input .input-bar .right-icon ::ng-deep .rte-icon-button{color:var(--content-secondary);height:24px;width:24px;padding:0 2px}.container .input-container .input .input-bar .right-icon ::ng-deep .rte-icon-button:focus{outline:none}.container .input-container .input .input-bar .right-icon ::ng-deep .rte-icon-button:focus-visible{outline:1px solid var(--border-brand-focused);border-radius:8px}.container .input-container .input .input-bar .right-icon ::ng-deep .rte-icon-button:focus-visible:after{display:none}.container .input-container .input .input-bar .input-field{box-sizing:border-box;appearance:none;width:100%;height:32px;min-width:48px;max-height:32px;border-radius:4px;border:1px solid var(--border-secondary);padding:4px 16px;background:linear-gradient(0deg,var(--elevation-surface-inner-shadow) 0%,var(--elevation-surface-inner-shadow) 100%),var(--background-default);transition:border .2s,outline .2s;color:var(--content-primary);box-shadow:inset 0 1px 4px 0 var(--elevation-shadow-key)}.container .input-container .input .input-bar .input-field:hover{outline:1px solid var(--border-primary);border-color:var(--border-primary)}.container .input-container .input .input-bar .input-field:focus{outline:1px solid var(--border-brand-default);border-color:var(--border-brand-default)}.container .input-container .input .input-bar .input-field:active{outline:1px solid var(--border-brand-default);border-color:var(--border-brand-default)}.container .input-container .input .input-bar .input-field:disabled,.container .input-container .input .input-bar .input-field:read-only{outline:1px solid var(--border-brand-disabled);border-color:var(--border-disabled);background:linear-gradient(0deg,var(--elevation-surface-inner-shadow) 0%,var(--elevation-surface-inner-shadow) 100%),var(--background-disabled);cursor:not-allowed}.container .input-container .input .input-bar .input-field.error{outline:1px solid var(--border-danger);border-color:var(--border-danger)}.container .input-container .assistive-text{display:flex;align-items:center;gap:4px;padding:4px 8px}.container .input-container .assistive-text .assistive-icon-error{color:var(--content-danger)}.container .input-container .assistive-text .assistive-icon-success{color:var(--content-success)}.container .input-container .assistive-text .assistive-label{transition:color .2s}.container .input-container .assistive-text .assistive-label.error{color:var(--content-danger);font-feature-settings:\"liga\" off,\"clig\" off;font-style:normal;font-family:Arial;font-weight:700;font-size:12px;line-height:16px;letter-spacing:0px;margin:0}.container .input-container .assistive-text .assistive-label.success{color:var(--content-success);font-feature-settings:\"liga\" off,\"clig\" off;font-style:normal;font-family:Arial;font-weight:700;font-size:12px;line-height:16px;letter-spacing:0px;margin:0}.container .input-container .assistive-text .assistive-label.description{color:var(--content-tertiary);font-feature-settings:\"liga\" off,\"clig\" off;font-style:normal;font-family:Arial;font-weight:400;font-size:12px;line-height:16px;letter-spacing:0px;margin:0}.input-counter{color:var(--content-tertiary);font-family:Arial;font-size:12px;font-weight:400;line-height:16px;letter-spacing:0px;margin-block:0px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: IconComponent, selector: "rte-icon", inputs: ["name", "size", "color", "classes", "appearance"] }, { kind: "component", type: IconButtonComponent, selector: "rte-icon-button", inputs: ["disabled", "name", "size", "variant", "type", "appearance", "compactSpacing", "ariaLabel", "ariaLabelledBy"], outputs: ["click"] }, { kind: "component", type: LinkComponent, selector: "rte-link", inputs: ["label", "href", "subtle", "externalLink"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
923
+ }
924
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: TextInputComponent, decorators: [{
925
+ type: Component,
926
+ args: [{ selector: "rte-text-input", imports: [CommonModule, IconComponent, IconButtonComponent, LinkComponent], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n class=\"container {{labelPosition()}}\"\n [ngClass]=\"{'error': error()}\"\n [style.width]=\"width()\"\n>\n <ng-container *ngIf=\"label()\">\n <div class=\"text\">\n <div class=\"label-container\">\n <label class=\"input-label\" id=\"inputLabel\">\n {{ label() }}\n </label>\n <ng-container *ngIf=\"required()\">\n <ng-container *ngIf=\"showLabelRequirement(); else requiredIcon\">\n <span class=\"required-text\">(obligatoire)</span>\n </ng-container>\n <ng-template #requiredIcon>\n <span class=\"required-icon-container\">\n <rte-icon name=\"asterisk\" [size]=\"8\" />\n </span>\n </ng-template>\n </ng-container>\n <ng-container *ngIf=\"!required() && showLabelRequirement()\">\n <span class=\"required-text\">(optionnel)</span>\n </ng-container>\n </div>\n <ng-container *ngIf=\"displayCounter() && labelPosition() === 'top'\">\n <p class=\"input-counter\" data-testid=\"input-counter\">\n {{ characterCount() }}/{{ maxLength() }}\n </p>\n </ng-container>\n </div>\n </ng-container>\n\n <div class=\"input-container\">\n <div\n class=\"input {{labelPosition()}}\"\n [ngClass]=\"{'disabled': disabled(), 'read-only': readOnly()}\"\n >\n <div class=\"input-bar\" [ngClass]=\"{'with-left-icon': displayedLeftIcon(), 'with-right-icon': rightIconAction()}\">\n <ng-container *ngIf=\"displayedLeftIcon()\">\n <rte-icon\n appearance=\"outlined\"\n class=\"left-icon\"\n aria-hidden=\"true\"\n [name]=\"displayedLeftIcon()!\"\n />\n </ng-container>\n\n <input\n #inputRef\n class=\"input-field\"\n [ngClass]=\"{'error': error()}\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledby()\"\n [attr.aria-required]=\"ariaRequired()\"\n [type]=\"isHiddenInput() ? 'password' : 'text'\"\n [maxLength]=\"maxLength()\"\n [disabled]=\"disabled()\"\n [readOnly]=\"readOnly()\"\n [value]=\"internalValue()\"\n (input)=\"handleChange($event)\"\n />\n\n <ng-container *ngIf=\"shouldShowRightIcon()\">\n <rte-icon-button\n appearance=\"outlined\"\n variant=\"transparent\"\n class=\"right-icon\"\n data-testid=\"right-icon\"\n [name]=\"rightIconName() || 'close'\"\n [ariaLabel]=\"rightIconAriaLabel()\"\n (click)=\"onRightIconClickHandler()\"\n />\n </ng-container>\n </div>\n </div>\n\n <ng-container *ngIf=\"assistiveTextLabel()\">\n <div class=\"assistive-text\">\n <ng-container *ngIf=\"showAssistiveIcon() && assistiveAppearance() === 'error'\">\n <rte-icon name=\"error\" appearance=\"outlined\" class=\"assistive-icon-error\" [size]=\"12\" />\n </ng-container>\n <ng-container *ngIf=\"showAssistiveIcon() && assistiveAppearance() === 'success'\">\n <rte-icon name=\"check\" appearance=\"outlined\" class=\"assistive-icon-success\" [size]=\"12\" />\n </ng-container>\n <ng-container *ngIf=\"assistiveAppearance() === 'link'; else assistiveLabel\">\n <rte-link [label]=\"assistiveTextLabel()\" />\n </ng-container>\n <ng-template #assistiveLabel>\n <p class=\"assistive-label\" [ngClass]=\"assistiveAppearance()\">\n {{ assistiveTextLabel() }}\n </p>\n </ng-template>\n </div>\n </ng-container>\n </div>\n\n <ng-container *ngIf=\"displayCounter() && labelPosition() === 'side'\">\n <p class=\"input-counter\" data-testid=\"input-counter\">\n {{ characterCount() }}/{{ maxLength() }}\n </p>\n </ng-container>\n</div>", styles: ["@import\"https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:wght,FILL,GRAD@400,0,0&display=swap\";@import\"https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,200..1000;1,200..1000&display=swap\";.container{display:flex;width:300px;padding:0;flex-direction:column;justify-content:center;align-items:flex-start;gap:0px}.container.side{align-items:center;flex-direction:row}.container.side .text{width:auto;align-items:center}.container.side .input-counter{padding:0 8px}.container.error .input-container .input .input-bar .left-icon{color:var(--content-danger)}.container .text{width:100%;display:flex;flex-direction:row;align-items:flex-end;justify-content:space-between;padding:2px 8px;box-sizing:border-box}.container .text .label-container{display:flex;align-items:flex-start}.container .text .label-container .input-label{color:var(--content-secondary);font-family:Arial;font-size:14px;font-weight:400;line-height:20px;letter-spacing:0px}.container .text .label-container .required-text{color:var(--content-tertiary);align-self:center;font-feature-settings:\"liga\" off,\"clig\" off;font-style:normal;font-family:Arial;font-weight:400;font-size:12px;line-height:16px;letter-spacing:0px;margin-block:0px;margin-inline:4px}.container .text .label-container .required-icon-container{color:var(--content-danger);display:flex;align-items:center;justify-content:center;margin-inline:4px}.container .input-container{display:flex;flex-direction:column;height:32px;width:100%;min-width:48px;min-height:32px;max-height:32px;align-self:stretch}.container .input-container .input .input-bar{position:relative;display:flex;align-items:center}.container .input-container .input .input-bar.with-left-icon .input-field{padding-left:32px}.container .input-container .input .input-bar.with-right-icon .input-field{padding-right:32px}.container .input-container .input .input-bar .left-icon{position:absolute;left:8px;color:var(--content-secondary)}.container .input-container .input .input-bar .right-icon{position:absolute;right:8px;display:flex;align-items:center;justify-content:center;color:var(--content-secondary)}.container .input-container .input .input-bar .right-icon ::ng-deep .rte-icon-button{color:var(--content-secondary);height:24px;width:24px;padding:0 2px}.container .input-container .input .input-bar .right-icon ::ng-deep .rte-icon-button:focus{outline:none}.container .input-container .input .input-bar .right-icon ::ng-deep .rte-icon-button:focus-visible{outline:1px solid var(--border-brand-focused);border-radius:8px}.container .input-container .input .input-bar .right-icon ::ng-deep .rte-icon-button:focus-visible:after{display:none}.container .input-container .input .input-bar .input-field{box-sizing:border-box;appearance:none;width:100%;height:32px;min-width:48px;max-height:32px;border-radius:4px;border:1px solid var(--border-secondary);padding:4px 16px;background:linear-gradient(0deg,var(--elevation-surface-inner-shadow) 0%,var(--elevation-surface-inner-shadow) 100%),var(--background-default);transition:border .2s,outline .2s;color:var(--content-primary);box-shadow:inset 0 1px 4px 0 var(--elevation-shadow-key)}.container .input-container .input .input-bar .input-field:hover{outline:1px solid var(--border-primary);border-color:var(--border-primary)}.container .input-container .input .input-bar .input-field:focus{outline:1px solid var(--border-brand-default);border-color:var(--border-brand-default)}.container .input-container .input .input-bar .input-field:active{outline:1px solid var(--border-brand-default);border-color:var(--border-brand-default)}.container .input-container .input .input-bar .input-field:disabled,.container .input-container .input .input-bar .input-field:read-only{outline:1px solid var(--border-brand-disabled);border-color:var(--border-disabled);background:linear-gradient(0deg,var(--elevation-surface-inner-shadow) 0%,var(--elevation-surface-inner-shadow) 100%),var(--background-disabled);cursor:not-allowed}.container .input-container .input .input-bar .input-field.error{outline:1px solid var(--border-danger);border-color:var(--border-danger)}.container .input-container .assistive-text{display:flex;align-items:center;gap:4px;padding:4px 8px}.container .input-container .assistive-text .assistive-icon-error{color:var(--content-danger)}.container .input-container .assistive-text .assistive-icon-success{color:var(--content-success)}.container .input-container .assistive-text .assistive-label{transition:color .2s}.container .input-container .assistive-text .assistive-label.error{color:var(--content-danger);font-feature-settings:\"liga\" off,\"clig\" off;font-style:normal;font-family:Arial;font-weight:700;font-size:12px;line-height:16px;letter-spacing:0px;margin:0}.container .input-container .assistive-text .assistive-label.success{color:var(--content-success);font-feature-settings:\"liga\" off,\"clig\" off;font-style:normal;font-family:Arial;font-weight:700;font-size:12px;line-height:16px;letter-spacing:0px;margin:0}.container .input-container .assistive-text .assistive-label.description{color:var(--content-tertiary);font-feature-settings:\"liga\" off,\"clig\" off;font-style:normal;font-family:Arial;font-weight:400;font-size:12px;line-height:16px;letter-spacing:0px;margin:0}.input-counter{color:var(--content-tertiary);font-family:Arial;font-size:12px;font-weight:400;line-height:16px;letter-spacing:0px;margin-block:0px}\n"] }]
927
+ }], ctorParameters: () => [] });
928
+
826
929
  /**
827
930
  * Generated bundle index. Do not edit.
828
931
  */
829
932
 
830
- export { ButtonComponent, CheckboxComponent, CheckboxGroupComponent, ColDirective, GridDirective, IconButtonComponent, IconButtonToggleComponent, IconComponent, LinkComponent, RadioButtonComponent, RadioButtonGroupComponent, SplitButtonComponent, TooltipDirective };
933
+ export { ButtonComponent, CheckboxComponent, CheckboxGroupComponent, ColDirective, GridDirective, IconButtonComponent, IconButtonToggleComponent, IconComponent, LinkComponent, RadioButtonComponent, RadioButtonGroupComponent, SplitButtonComponent, TextInputComponent, TooltipDirective };
831
934
  //# sourceMappingURL=design-system-rte-angular.mjs.map