@design-system-rte/angular 0.6.0 → 0.7.1

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.
@@ -1,5 +1,5 @@
1
1
  import { CommonModule } from "@angular/common";
2
- import { ChangeDetectionStrategy, Component, computed, input, output } from "@angular/core";
2
+ import { ChangeDetectionStrategy, Component, computed, input, output, signal } from "@angular/core";
3
3
  import { buttonIconSize } from "@design-system-rte/core/components/button/common/common-button.constants";
4
4
  import { IconButtonComponent } from "../icon-button/icon-button.component";
5
5
  import * as i0 from "@angular/core";
@@ -11,21 +11,33 @@ export class IconButtonToggleComponent {
11
11
  this.variant = input("primary");
12
12
  this.type = input("button");
13
13
  this.compactSpacing = input(false);
14
- this.ariaLabel = input(undefined);
15
- this.ariaLabelledBy = input(undefined);
16
- this.selected = input(false);
14
+ this.ariaLabel = input();
15
+ this.ariaLabelledBy = input();
16
+ this.selected = input();
17
+ this.internalSelected = signal(false);
18
+ this.defaultSelected = input(false);
19
+ this.isControlled = computed(() => this.selected() !== undefined);
17
20
  this.click = output();
21
+ this.isSelected = computed(() => {
22
+ return this.isControlled() ? this.selected() : this.internalSelected();
23
+ });
18
24
  this.buttonIconSize = computed(() => buttonIconSize[this.size()]);
19
25
  }
26
+ toggleInternalSelectedState() {
27
+ this.internalSelected.set(!this.internalSelected());
28
+ }
20
29
  onClick(event) {
21
30
  event.stopPropagation();
22
- this.click.emit();
31
+ this.click.emit(event);
32
+ if (!this.isControlled()) {
33
+ this.toggleInternalSelectedState();
34
+ }
23
35
  }
24
36
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: IconButtonToggleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
25
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "17.3.12", type: IconButtonToggleComponent, isStandalone: true, selector: "rte-icon-button-toggle", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: true, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, compactSpacing: { classPropertyName: "compactSpacing", publicName: "compactSpacing", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledBy: { classPropertyName: "ariaLabelledBy", publicName: "ariaLabelledBy", isSignal: true, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { click: "click" }, ngImport: i0, 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/>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: IconButtonComponent, selector: "rte-icon-button", inputs: ["disabled", "name", "size", "variant", "type", "appearance", "compactSpacing", "ariaLabel", "ariaLabelledBy"], outputs: ["click"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
37
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "17.3.12", type: IconButtonToggleComponent, isStandalone: true, selector: "rte-icon-button-toggle", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: true, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, compactSpacing: { classPropertyName: "compactSpacing", publicName: "compactSpacing", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledBy: { classPropertyName: "ariaLabelledBy", publicName: "ariaLabelledBy", isSignal: true, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null }, defaultSelected: { classPropertyName: "defaultSelected", publicName: "defaultSelected", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { click: "click" }, ngImport: i0, 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]=\"isSelected() ? 'filled' : 'outlined'\"\n (click)=\"onClick($event)\"\n/>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: IconButtonComponent, selector: "rte-icon-button", inputs: ["disabled", "name", "size", "variant", "type", "appearance", "compactSpacing", "ariaLabel", "ariaLabelledBy"], outputs: ["click"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
26
38
  }
27
39
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: IconButtonToggleComponent, decorators: [{
28
40
  type: Component,
29
- 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/>" }]
41
+ 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]=\"isSelected() ? 'filled' : 'outlined'\"\n (click)=\"onClick($event)\"\n/>" }]
30
42
  }] });
31
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaWNvbi1idXR0b24tdG9nZ2xlLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2RzLXJ0ZS1saWIvc3JjL2xpYi9jb21wb25lbnRzL2ljb24tYnV0dG9uLXRvZ2dsZS9pY29uLWJ1dHRvbi10b2dnbGUuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvZHMtcnRlLWxpYi9zcmMvbGliL2NvbXBvbmVudHMvaWNvbi1idXR0b24tdG9nZ2xlL2ljb24tYnV0dG9uLXRvZ2dsZS5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFDL0MsT0FBTyxFQUFFLHVCQUF1QixFQUFFLFNBQVMsRUFBRSxRQUFRLEVBQUUsS0FBSyxFQUFFLE1BQU0sRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUc1RixPQUFPLE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2YXJpYW50XT1cInZhcmlhbnQoKVwiXG4gIFthcHBlYXJhbmNlXT1cImlzU2VsZWN0ZWQoKSA/ICdmaWxsZWQnIDogJ291dGxpbmVkJ1wiXG4gIChjbGljayk9XCJvbkNsaWNrKCRldmVudClcIlxuLz4iXX0=
@@ -0,0 +1,106 @@
1
+ import { CommonModule } from "@angular/common";
2
+ import { ChangeDetectionStrategy, Component, input, output, signal, computed, effect } from "@angular/core";
3
+ import { IconComponent } from "../icon/icon.component";
4
+ import { IconButtonComponent } from "../icon-button/icon-button.component";
5
+ import { LinkComponent } from "../link/link.component";
6
+ import * as i0 from "@angular/core";
7
+ import * as i1 from "@angular/common";
8
+ export class TextInputComponent {
9
+ constructor() {
10
+ this.label = input("");
11
+ this.labelPosition = input("top");
12
+ this.required = input(false);
13
+ this.showCounter = input(false);
14
+ this.value = input("");
15
+ this.internalValue = signal(this.value());
16
+ this.leftIcon = input(null);
17
+ this.showRightIcon = input(true);
18
+ this.rightIconAction = input("clean");
19
+ this.showLabelRequirement = input(false);
20
+ this.assistiveAppearance = input("description");
21
+ this.showAssistiveIcon = input(false);
22
+ this.assistiveTextLabel = input("");
23
+ this.error = input(false);
24
+ this.maxLength = input(150);
25
+ this.disabled = input(false);
26
+ this.readOnly = input(false);
27
+ this.width = input("300px");
28
+ this.ariaLabel = input("");
29
+ this.ariaRequired = input(false);
30
+ this.ariaLabelledby = input("");
31
+ this.valueChange = output();
32
+ this.rightIconClick = output();
33
+ this.characterCount = signal(this.internalValue().length);
34
+ this.isHiddenInput = signal(this.showRightIcon() && this.rightIconAction() === "visibilityOn");
35
+ this.displayedLeftIcon = computed(() => (this.error() ? "error" : this.leftIcon()));
36
+ this.displayCounter = computed(() => this.showCounter() && typeof this.maxLength() === "number");
37
+ this.rightIconName = computed(() => {
38
+ if (["visibilityOn", "visibilityOff"].includes(this.rightIconAction())) {
39
+ return this.isHiddenInput() ? "visibility-show" : "visibility-hide";
40
+ }
41
+ else if (this.rightIconAction() === "clean") {
42
+ return "close";
43
+ }
44
+ return "";
45
+ });
46
+ this.rightIconAriaLabel = computed(() => {
47
+ if (["visibilityOn", "visibilityOff"].includes(this.rightIconAction())) {
48
+ return this.isHiddenInput() ? "show text" : "hide text";
49
+ }
50
+ else if (this.rightIconAction() === "clean") {
51
+ return "clear";
52
+ }
53
+ return "";
54
+ });
55
+ this.shouldShowRightIcon = computed(() => {
56
+ if (this.readOnly() || this.disabled()) {
57
+ return false;
58
+ }
59
+ if (this.rightIconAction() === "clean") {
60
+ return !!this.internalValue()?.length && this.showRightIcon();
61
+ }
62
+ return this.showRightIcon() && !!this.rightIconAction();
63
+ });
64
+ this.lastParentValue = this.value();
65
+ effect(() => {
66
+ const parentValue = this.value();
67
+ if (parentValue !== this.lastParentValue) {
68
+ this.lastParentValue = parentValue;
69
+ this.internalValue.set(parentValue);
70
+ }
71
+ }, { allowSignalWrites: true });
72
+ }
73
+ handleChange(event) {
74
+ const input = event.target;
75
+ this.internalValue.set(input.value);
76
+ this.valueChange.emit(input.value);
77
+ if (this.maxLength()) {
78
+ this.characterCount.set(input.value.length);
79
+ }
80
+ this.valueChange.emit(input.value);
81
+ }
82
+ onRightIconClickHandler() {
83
+ this.rightIconClick.emit();
84
+ this.triggerRightIconAction();
85
+ }
86
+ toggleInputVisibility() {
87
+ this.isHiddenInput.set(!this.isHiddenInput());
88
+ }
89
+ triggerRightIconAction() {
90
+ if (this.rightIconAction() === "clean") {
91
+ this.internalValue.set("");
92
+ this.valueChange.emit("");
93
+ this.characterCount.set(0);
94
+ }
95
+ if (["visibilityOn", "visibilityOff"].includes(this.rightIconAction())) {
96
+ this.toggleInputVisibility();
97
+ }
98
+ }
99
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: TextInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
100
+ 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 }); }
101
+ }
102
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: TextInputComponent, decorators: [{
103
+ type: Component,
104
+ 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"] }]
105
+ }], ctorParameters: () => [] });
106
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGV4dC1pbnB1dC5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9kcy1ydGUtbGliL3NyYy9saWIvY29tcG9uZW50cy90ZXh0LWlucHV0L3RleHQtaW5wdXQuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvZHMtcnRlLWxpYi9zcmMvbGliL2NvbXBvbmVudHMvdGV4dC1pbnB1dC90ZXh0LWlucHV0LmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQUMvQyxPQUFPLEVBQUUsdUJBQXVCLEVBQUUsU0FBUyxFQUFFLEtBQUssRUFBRSxNQUFNLEVBQUUsTUFBTSxFQUFFLFFBQVEsRUFBRSxNQUFNLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFFNUcsT0FBTyxFQUFFLGFBQWEsRUFBRSxNQUFNLHdCQUF3QixDQUFDO0FBRXZELE9BQU8sRUFBRSxtQkFBbUIsRUFBRSxNQUFNLHNDQUFzQyxDQUFDO0FBQzNFLE9BQU8sRUFBRSxhQUFhLEVBQUUsTUFBTSx3QkFBd0IsQ0FBQzs7O0FBVXZELE1BQU0sT0FBTyxrQkFBa0I7SUE4RDdCO1FBN0RTLFVBQUssR0FBRyxLQUFLLENBQVMsRUFBRSxDQUFDLENBQUM7UUFDMUIsa0JBQWEsR0FBRyxLQUFLLENBQWlCLEtBQUssQ0FBQyxDQUFDO1FBQzdDLGFBQVEsR0FBRyxLQUFLLENBQVUsS0FBSyxDQUFDLENBQUM7UUFDakMsZ0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4gICAgPHAgY2xhc3M9XCJpbnB1dC1jb3VudGVyXCIgZGF0YS10ZXN0aWQ9XCJpbnB1dC1jb3VudGVyXCI+XG4gICAgICB7eyBjaGFyYWN0ZXJDb3VudCgpIH19L3t7IG1heExlbmd0aCgpIH19XG4gICAgPC9wPlxuICA8L25nLWNvbnRhaW5lcj5cbjwvZGl2PiJdfQ==
@@ -11,4 +11,5 @@ export * from "./lib/components/tooltip/tooltip.directive";
11
11
  export * from "./lib/components/split-button/split-button.component";
12
12
  export * from "./lib/components/icon-button/icon-button.component";
13
13
  export * from "./lib/components/icon-button-toggle/icon-button-toggle.component";
14
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3Byb2plY3RzL2RzLXJ0ZS1saWIvc3JjL3B1YmxpYy1hcGkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYywwQ0FBMEMsQ0FBQztBQUN6RCxjQUFjLHNDQUFzQyxDQUFDO0FBQ3JELGNBQWMseUNBQXlDLENBQUM7QUFDeEQsY0FBYyxzQ0FBc0MsQ0FBQztBQUNyRCxjQUFjLHNEQUFzRCxDQUFDO0FBQ3JFLGNBQWMsa0VBQWtFLENBQUM7QUFDakYsY0FBYyw4Q0FBOEMsQ0FBQztBQUM3RCxjQUFjLDBEQUEwRCxDQUFDO0FBQ3pFLGNBQWMsc0NBQXNDLENBQUM7QUFDckQsY0FBYyw0Q0FBNEMsQ0FBQztBQUMzRCxjQUFjLHNEQUFzRCxDQUFDO0FBQ3JFLGNBQWMsb0RBQW9ELENBQUM7QUFDbkUsY0FBYyxrRUFBa0UsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gXCIuL2xpYi9jb21wb25lbnRzL2J1dHRvbi9idXR0b24uY29tcG9uZW50XCI7XG5leHBvcnQgK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WRpby1idXR0b24uY29tcG9uZW50XCI7XG5leHBvcnQgKiBmcm9tIFwiLi9saWIvY29tcG9uZW50cy9yYWRpby1idXR0b24tZ3JvdXAvcmFkaW8tYnV0dG9uLWdyb3VwLmNvbXBvbmVudFwiO1xuZXhwb3J0ICogZnJvbSBcIi4vbGliL2NvbXBvbmVudHMvY2hlY2tib3gvY2hlY2tib3guY29tcG9uZW50XCI7XG5leHBvcnQgKiBmcm9tIFwiLi9saWIvY29tcG9uZW50cy9jaGVja2JveC1ncm91cC9jaGVja2JveC1ncm91cC5jb21wb25lbnRcIjtcbmV4cG9ydCAqIGZyb20gXCIuL2xpYi9jb21wb25lbnRzL2ljb24vaWNvbi5jb21wb25lbnRcIjtcbmV4cG9ydCAqIGZyb20gXCIuL2xpYi9jb21wb25lbnRzL3Rvb2x0aXAvdG9vbHRpcC5kaXJlY3RpdmVcIjtcbmV4cG9ydCAqIGZyb20gXCIuL2xpYi9jb21wb25lbnRzL3NwbGl0LWJ1dHRvbi9zcGxpdC1idXR0b24uY29tcG9uZW50XCI7XG5leHBvcnQgKiBmcm9tIFwiLi9saWIvY29tcG9uZW50cy9pY29uLWJ1dHRvbi9pY29uLWJ1dHRvbi5jb21wb25lbnRcIjtcbmV4cG9ydCAqIGZyb20gXCIuL2xpYi9jb21wb25lbnRzL2ljb24tYnV0dG9uLXRvZ2dsZS9pY29uLWJ1dHRvbi10b2dnbGUuY29tcG9uZW50XCI7XG5leHBvcnQgKiBmcm9tIFwiLi9saWIvY29tcG9uZW50cy90ZXh0LWlucHV0L3RleHQtaW5wdXQuY29tcG9uZW50XCI7XG4iXX0=
@@ -809,27 +809,138 @@ class IconButtonToggleComponent {
809
809
  this.variant = input("primary");
810
810
  this.type = input("button");
811
811
  this.compactSpacing = input(false);
812
- this.ariaLabel = input(undefined);
813
- this.ariaLabelledBy = input(undefined);
814
- this.selected = input(false);
812
+ this.ariaLabel = input();
813
+ this.ariaLabelledBy = input();
814
+ this.selected = input();
815
+ this.internalSelected = signal(false);
816
+ this.defaultSelected = input(false);
817
+ this.isControlled = computed(() => this.selected() !== undefined);
815
818
  this.click = output();
819
+ this.isSelected = computed(() => {
820
+ return this.isControlled() ? this.selected() : this.internalSelected();
821
+ });
816
822
  this.buttonIconSize = computed(() => buttonIconSize[this.size()]);
817
823
  }
824
+ toggleInternalSelectedState() {
825
+ this.internalSelected.set(!this.internalSelected());
826
+ }
818
827
  onClick(event) {
819
828
  event.stopPropagation();
820
- this.click.emit();
829
+ this.click.emit(event);
830
+ if (!this.isControlled()) {
831
+ this.toggleInternalSelectedState();
832
+ }
821
833
  }
822
834
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: IconButtonToggleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
823
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "17.3.12", type: IconButtonToggleComponent, isStandalone: true, selector: "rte-icon-button-toggle", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: true, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, compactSpacing: { classPropertyName: "compactSpacing", publicName: "compactSpacing", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledBy: { classPropertyName: "ariaLabelledBy", publicName: "ariaLabelledBy", isSignal: true, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { click: "click" }, ngImport: i0, 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/>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: IconButtonComponent, selector: "rte-icon-button", inputs: ["disabled", "name", "size", "variant", "type", "appearance", "compactSpacing", "ariaLabel", "ariaLabelledBy"], outputs: ["click"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
835
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "17.3.12", type: IconButtonToggleComponent, isStandalone: true, selector: "rte-icon-button-toggle", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: true, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, compactSpacing: { classPropertyName: "compactSpacing", publicName: "compactSpacing", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledBy: { classPropertyName: "ariaLabelledBy", publicName: "ariaLabelledBy", isSignal: true, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null }, defaultSelected: { classPropertyName: "defaultSelected", publicName: "defaultSelected", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { click: "click" }, ngImport: i0, 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]=\"isSelected() ? 'filled' : 'outlined'\"\n (click)=\"onClick($event)\"\n/>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: IconButtonComponent, selector: "rte-icon-button", inputs: ["disabled", "name", "size", "variant", "type", "appearance", "compactSpacing", "ariaLabel", "ariaLabelledBy"], outputs: ["click"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
824
836
  }
825
837
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: IconButtonToggleComponent, decorators: [{
826
838
  type: Component,
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/>" }]
839
+ 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]=\"isSelected() ? 'filled' : 'outlined'\"\n (click)=\"onClick($event)\"\n/>" }]
828
840
  }] });
829
841
 
842
+ class TextInputComponent {
843
+ constructor() {
844
+ this.label = input("");
845
+ this.labelPosition = input("top");
846
+ this.required = input(false);
847
+ this.showCounter = input(false);
848
+ this.value = input("");
849
+ this.internalValue = signal(this.value());
850
+ this.leftIcon = input(null);
851
+ this.showRightIcon = input(true);
852
+ this.rightIconAction = input("clean");
853
+ this.showLabelRequirement = input(false);
854
+ this.assistiveAppearance = input("description");
855
+ this.showAssistiveIcon = input(false);
856
+ this.assistiveTextLabel = input("");
857
+ this.error = input(false);
858
+ this.maxLength = input(150);
859
+ this.disabled = input(false);
860
+ this.readOnly = input(false);
861
+ this.width = input("300px");
862
+ this.ariaLabel = input("");
863
+ this.ariaRequired = input(false);
864
+ this.ariaLabelledby = input("");
865
+ this.valueChange = output();
866
+ this.rightIconClick = output();
867
+ this.characterCount = signal(this.internalValue().length);
868
+ this.isHiddenInput = signal(this.showRightIcon() && this.rightIconAction() === "visibilityOn");
869
+ this.displayedLeftIcon = computed(() => (this.error() ? "error" : this.leftIcon()));
870
+ this.displayCounter = computed(() => this.showCounter() && typeof this.maxLength() === "number");
871
+ this.rightIconName = computed(() => {
872
+ if (["visibilityOn", "visibilityOff"].includes(this.rightIconAction())) {
873
+ return this.isHiddenInput() ? "visibility-show" : "visibility-hide";
874
+ }
875
+ else if (this.rightIconAction() === "clean") {
876
+ return "close";
877
+ }
878
+ return "";
879
+ });
880
+ this.rightIconAriaLabel = computed(() => {
881
+ if (["visibilityOn", "visibilityOff"].includes(this.rightIconAction())) {
882
+ return this.isHiddenInput() ? "show text" : "hide text";
883
+ }
884
+ else if (this.rightIconAction() === "clean") {
885
+ return "clear";
886
+ }
887
+ return "";
888
+ });
889
+ this.shouldShowRightIcon = computed(() => {
890
+ if (this.readOnly() || this.disabled()) {
891
+ return false;
892
+ }
893
+ if (this.rightIconAction() === "clean") {
894
+ return !!this.internalValue()?.length && this.showRightIcon();
895
+ }
896
+ return this.showRightIcon() && !!this.rightIconAction();
897
+ });
898
+ this.lastParentValue = this.value();
899
+ effect(() => {
900
+ const parentValue = this.value();
901
+ if (parentValue !== this.lastParentValue) {
902
+ this.lastParentValue = parentValue;
903
+ this.internalValue.set(parentValue);
904
+ }
905
+ }, { allowSignalWrites: true });
906
+ }
907
+ handleChange(event) {
908
+ const input = event.target;
909
+ this.internalValue.set(input.value);
910
+ this.valueChange.emit(input.value);
911
+ if (this.maxLength()) {
912
+ this.characterCount.set(input.value.length);
913
+ }
914
+ this.valueChange.emit(input.value);
915
+ }
916
+ onRightIconClickHandler() {
917
+ this.rightIconClick.emit();
918
+ this.triggerRightIconAction();
919
+ }
920
+ toggleInputVisibility() {
921
+ this.isHiddenInput.set(!this.isHiddenInput());
922
+ }
923
+ triggerRightIconAction() {
924
+ if (this.rightIconAction() === "clean") {
925
+ this.internalValue.set("");
926
+ this.valueChange.emit("");
927
+ this.characterCount.set(0);
928
+ }
929
+ if (["visibilityOn", "visibilityOff"].includes(this.rightIconAction())) {
930
+ this.toggleInputVisibility();
931
+ }
932
+ }
933
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: TextInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
934
+ 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 }); }
935
+ }
936
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: TextInputComponent, decorators: [{
937
+ type: Component,
938
+ 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"] }]
939
+ }], ctorParameters: () => [] });
940
+
830
941
  /**
831
942
  * Generated bundle index. Do not edit.
832
943
  */
833
944
 
834
- export { ButtonComponent, CheckboxComponent, CheckboxGroupComponent, ColDirective, GridDirective, IconButtonComponent, IconButtonToggleComponent, IconComponent, LinkComponent, RadioButtonComponent, RadioButtonGroupComponent, SplitButtonComponent, TooltipDirective };
945
+ export { ButtonComponent, CheckboxComponent, CheckboxGroupComponent, ColDirective, GridDirective, IconButtonComponent, IconButtonToggleComponent, IconComponent, LinkComponent, RadioButtonComponent, RadioButtonGroupComponent, SplitButtonComponent, TextInputComponent, TooltipDirective };
835
946
  //# sourceMappingURL=design-system-rte-angular.mjs.map