@molecule/app-ui-angular 1.13.3 → 1.13.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +444 -290
- package/dist/components/button.component.d.ts +10 -2
- package/dist/components/button.component.d.ts.map +1 -1
- package/dist/components/button.component.js +16 -5
- package/dist/components/button.component.js.map +1 -1
- package/dist/components/checkbox.component.d.ts +2 -2
- package/dist/components/checkbox.component.d.ts.map +1 -1
- package/dist/components/checkbox.component.js +1 -1
- package/dist/components/checkbox.component.js.map +1 -1
- package/dist/components/confirm-dialog.component.d.ts +1 -1
- package/dist/components/confirm-dialog.component.d.ts.map +1 -1
- package/dist/components/confirm-dialog.component.js.map +1 -1
- package/dist/components/form-field.component.d.ts +14 -5
- package/dist/components/form-field.component.d.ts.map +1 -1
- package/dist/components/form-field.component.js +79 -51
- package/dist/components/form-field.component.js.map +1 -1
- package/dist/components/input.component.d.ts +11 -8
- package/dist/components/input.component.d.ts.map +1 -1
- package/dist/components/input.component.js +33 -31
- package/dist/components/input.component.js.map +1 -1
- package/dist/components/layout.component.d.ts +7 -7
- package/dist/components/layout.component.d.ts.map +1 -1
- package/dist/components/layout.component.js +29 -20
- package/dist/components/layout.component.js.map +1 -1
- package/dist/components/molecule/input.component.d.ts +7 -4
- package/dist/components/molecule/input.component.d.ts.map +1 -1
- package/dist/components/molecule/input.component.js +18 -8
- package/dist/components/molecule/input.component.js.map +1 -1
- package/dist/components/molecule/modal.component.d.ts +9 -30
- package/dist/components/molecule/modal.component.d.ts.map +1 -1
- package/dist/components/molecule/modal.component.js +69 -81
- package/dist/components/molecule/modal.component.js.map +1 -1
- package/dist/components/molecule/select.component.d.ts +4 -3
- package/dist/components/molecule/select.component.d.ts.map +1 -1
- package/dist/components/molecule/select.component.js +13 -7
- package/dist/components/molecule/select.component.js.map +1 -1
- package/dist/components/prompt-dialog.component.d.ts +3 -3
- package/dist/components/prompt-dialog.component.d.ts.map +1 -1
- package/dist/components/prompt-dialog.component.js.map +1 -1
- package/dist/components/radio-group.component.d.ts +2 -2
- package/dist/components/radio-group.component.d.ts.map +1 -1
- package/dist/components/radio-group.component.js +2 -0
- package/dist/components/radio-group.component.js.map +1 -1
- package/dist/components/select.component.d.ts +13 -10
- package/dist/components/select.component.d.ts.map +1 -1
- package/dist/components/select.component.js +37 -33
- package/dist/components/select.component.js.map +1 -1
- package/dist/components/spinner.component.d.ts.map +1 -1
- package/dist/components/spinner.component.js +1 -3
- package/dist/components/spinner.component.js.map +1 -1
- package/dist/components/table.component.d.ts +16 -11
- package/dist/components/table.component.d.ts.map +1 -1
- package/dist/components/table.component.js +12 -14
- package/dist/components/table.component.js.map +1 -1
- package/dist/components/tabs.component.d.ts +1 -3
- package/dist/components/tabs.component.d.ts.map +1 -1
- package/dist/components/tabs.component.js +13 -11
- package/dist/components/tabs.component.js.map +1 -1
- package/dist/components/textarea.component.d.ts +14 -16
- package/dist/components/textarea.component.d.ts.map +1 -1
- package/dist/components/textarea.component.js +38 -39
- package/dist/components/textarea.component.js.map +1 -1
- package/dist/components/tooltip.component.js +1 -1
- package/dist/components/tooltip.component.js.map +1 -1
- package/dist/components/user-menu.component.d.ts +1 -1
- package/dist/components/user-menu.component.d.ts.map +1 -1
- package/dist/components/user-menu.component.js.map +1 -1
- package/dist/index.d.ts +1 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -4
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/utilities/form-field-context.d.ts +10 -1
- package/dist/utilities/form-field-context.d.ts.map +1 -1
- package/dist/utilities/form-field-context.js +18 -0
- package/dist/utilities/form-field-context.js.map +1 -1
- package/dist/utilities/rest-attrs.d.ts +4 -1
- package/dist/utilities/rest-attrs.d.ts.map +1 -1
- package/dist/utilities/rest-attrs.js +6 -1
- package/dist/utilities/rest-attrs.js.map +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-field.component.js","sourceRoot":"","sources":["../../src/components/form-field.component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"form-field.component.js","sourceRoot":"","sources":["../../src/components/form-field.component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,SAAS,EACT,UAAU,EACV,MAAM,EAGN,MAAM,EACN,SAAS,GACV,MAAM,eAAe,CAAA;AAEtB,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,iBAAiB,EAEjB,YAAY,GACb,MAAM,uBAAuB,CAAA;AAE9B,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAE9C,OAAO,EAAmB,WAAW,EAAE,MAAM,yBAAyB,CAAA;AACtE,OAAO,EACL,cAAc,EAEd,mBAAmB,GACpB,MAAM,oCAAoC,CAAA;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;;;;;;;IA4C3C,gCAGG;IAAA,YAAW;IAAA,oBACb;;;IAFC,uHAAwE;;IACvE,cAAW;IAAX,kCAAW;;;IAKd,4BAAgD;IAAA,YAAW;IAAA,oBAAI;;;IAAxC,oCAAwB;;IAAC,cAAW;IAAX,kCAAW;;;IAG3D,4BAA8C;IAAA,YAAU;IAAA,oBAAI;;;IAAtC,mCAAuB;;IAAC,cAAU;IAAV,iCAAU;;AArD9D,2DAA2D;AAC3D,MAAM,cAAc,GAAG,8CAA8C,CAAA;AAErE,6EAA6E;AAC7E,MAAM,eAAe,GAAG,2DAA2D,CAAA;AAEnF,iFAAiF;AACjF,MAAM,kBAAkB,GAAG,CAAC,IAAI,EAAE,kBAAkB,EAAE,cAAc,CAAU,CAAA;AAG9E;;;;;;;;GAQG;AAsCH,MAAM,OAAO,SAAS;IACpB,mBAAmB;IACnB,KAAK,CAAS;IACd,kBAAkB;IAClB,IAAI,CAAS;IACb,mEAA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AAK,CAAC,OAAO,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAA;IAChF,CAAC;IAED,qEAAqE;IACrE,IAAI,OAAO;QACT,OAAO,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAA;IAC5E,CAAC;CACF"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { type AfterViewChecked, ElementRef, EventEmitter, TemplateRef } from '@angular/core';
|
|
2
|
-
import type { FocusEventHandler, KeyboardEventHandler, Size, UIClassMap } from '@molecule/app-ui';
|
|
2
|
+
import type { AriaBoolean, FocusEventHandler, KeyboardEventHandler, KitFieldChangeEvent, Size, UIClassMap } from '@molecule/app-ui';
|
|
3
3
|
import { fieldLayout } from '@molecule/app-ui';
|
|
4
4
|
import type { HasElement } from '../utilities/element.js';
|
|
5
5
|
import type { FormFieldContext } from '../utilities/form-field-context.js';
|
|
6
|
+
import { FieldHostAria } from '../utilities/form-field-context.js';
|
|
6
7
|
import { type ResolvedIcon } from '../utilities/render-icon.js';
|
|
7
8
|
import * as i0 from "@angular/core";
|
|
8
9
|
import * as i1 from "@molecule/app-angular";
|
|
@@ -71,7 +72,7 @@ export declare class Input implements AfterViewChecked, HasElement<HTMLInputElem
|
|
|
71
72
|
/** React's `onKeyDown`, which React spreads onto the <input>: its `currentTarget` is that element. */
|
|
72
73
|
onKeyDown?: KeyboardEventHandler;
|
|
73
74
|
/** Fires the raw `input` event (React's text-input onChange). */
|
|
74
|
-
readonly change: EventEmitter<Event>;
|
|
75
|
+
readonly change: EventEmitter<Event & KitFieldChangeEvent>;
|
|
75
76
|
/** Fires with the edited text or an empty string when the clear button is clicked. */
|
|
76
77
|
readonly valueChange: EventEmitter<string>;
|
|
77
78
|
/** Fires the clear button's click event. */
|
|
@@ -95,7 +96,7 @@ export declare class Input implements AfterViewChecked, HasElement<HTMLInputElem
|
|
|
95
96
|
private readonly hasRight;
|
|
96
97
|
/** Attaches or detaches each adornment wrapper exactly when React renders it. */
|
|
97
98
|
constructor();
|
|
98
|
-
/**
|
|
99
|
+
/** Stable fallback for label and feedback associations. */
|
|
99
100
|
private readonly generatedId;
|
|
100
101
|
/**
|
|
101
102
|
* Reactive translation, read in the injection context. Its `t` reads the
|
|
@@ -104,8 +105,11 @@ export declare class Input implements AfterViewChecked, HasElement<HTMLInputElem
|
|
|
104
105
|
*/
|
|
105
106
|
private readonly i18n;
|
|
106
107
|
private movedRest;
|
|
107
|
-
/**
|
|
108
|
-
|
|
108
|
+
/** Additional description ids supplied by the caller. */
|
|
109
|
+
externalDescription?: string | null;
|
|
110
|
+
/** Validation state supplied by the caller when no local or enclosing field error is shown. */
|
|
111
|
+
externalInvalid?: AriaBoolean;
|
|
112
|
+
protected readonly hostAria: FieldHostAria;
|
|
109
113
|
/** The `data-mol-id` a caller bound on the host (React spreads it onto the input). */
|
|
110
114
|
private externalMolId;
|
|
111
115
|
/**
|
|
@@ -120,8 +124,7 @@ export declare class Input implements AfterViewChecked, HasElement<HTMLInputElem
|
|
|
120
124
|
*/
|
|
121
125
|
field(): ReturnType<typeof fieldLayout>;
|
|
122
126
|
/**
|
|
123
|
-
*
|
|
124
|
-
* renumbers generated ids in order of appearance, like React's `useId`).
|
|
127
|
+
* Uses the caller's id, the enclosing field's id, or this instance's fallback.
|
|
125
128
|
* @returns The id value.
|
|
126
129
|
*/
|
|
127
130
|
inputId(): string;
|
|
@@ -228,6 +231,6 @@ export declare class Input implements AfterViewChecked, HasElement<HTMLInputElem
|
|
|
228
231
|
*/
|
|
229
232
|
private isGiven;
|
|
230
233
|
static ɵfac: i0.ɵɵFactoryDeclaration<Input, never>;
|
|
231
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<Input, "div[mol-input]", never, { "type": { "alias": "type"; "required": false; }; "size": { "alias": "size"; "required": false; }; "align": { "alias": "align"; "required": false; }; "label": { "alias": "label"; "required": false; }; "error": { "alias": "error"; "required": false; }; "hint": { "alias": "hint"; "required": false; }; "leftElement": { "alias": "leftElement"; "required": false; }; "rightElement": { "alias": "rightElement"; "required": false; }; "clearable": { "alias": "clearable"; "required": false; }; "clearLabel": { "alias": "clearLabel"; "required": false; }; "className": { "alias": "className"; "required": false; }; "style": { "alias": "style"; "required": false; }; "testId": { "alias": "testId"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "required": { "alias": "required"; "required": false; }; "value": { "alias": "value"; "required": false; }; "defaultValue": { "alias": "defaultValue"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "name": { "alias": "name"; "required": false; }; "id": { "alias": "id"; "required": false; }; "automationId": { "alias": "automationId"; "required": false; }; "dataMolId": { "alias": "data-mol-id"; "required": false; }; "onFocus": { "alias": "onFocus"; "required": false; }; "onBlur": { "alias": "onBlur"; "required": false; }; "onKeyDown": { "alias": "onKeyDown"; "required": false; }; }, { "change": "change"; "valueChange": "valueChange"; "clear": "clear"; }, never, ["[slot=leftElement]", "[slot=rightElement]"], true, [{ directive: typeof i1.MolPlacement; inputs: {}; outputs: {}; }]>;
|
|
234
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<Input, "div[mol-input]", never, { "type": { "alias": "type"; "required": false; }; "size": { "alias": "size"; "required": false; }; "align": { "alias": "align"; "required": false; }; "label": { "alias": "label"; "required": false; }; "error": { "alias": "error"; "required": false; }; "hint": { "alias": "hint"; "required": false; }; "externalDescription": { "alias": "aria-describedby"; "required": false; }; "externalInvalid": { "alias": "aria-invalid"; "required": false; }; "leftElement": { "alias": "leftElement"; "required": false; }; "rightElement": { "alias": "rightElement"; "required": false; }; "clearable": { "alias": "clearable"; "required": false; }; "clearLabel": { "alias": "clearLabel"; "required": false; }; "className": { "alias": "className"; "required": false; }; "style": { "alias": "style"; "required": false; }; "testId": { "alias": "testId"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "required": { "alias": "required"; "required": false; }; "value": { "alias": "value"; "required": false; }; "defaultValue": { "alias": "defaultValue"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "name": { "alias": "name"; "required": false; }; "id": { "alias": "id"; "required": false; }; "automationId": { "alias": "automationId"; "required": false; }; "dataMolId": { "alias": "data-mol-id"; "required": false; }; "onFocus": { "alias": "onFocus"; "required": false; }; "onBlur": { "alias": "onBlur"; "required": false; }; "onKeyDown": { "alias": "onKeyDown"; "required": false; }; }, { "change": "change"; "valueChange": "valueChange"; "clear": "clear"; }, never, ["[slot=leftElement]", "[slot=rightElement]"], true, [{ directive: typeof i1.MolPlacement; inputs: {}; outputs: {}; }]>;
|
|
232
235
|
}
|
|
233
236
|
//# sourceMappingURL=input.component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.component.d.ts","sourceRoot":"","sources":["../../src/components/input.component.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,KAAK,gBAAgB,EAErB,UAAU,EACV,YAAY,EAIZ,WAAW,EAEZ,MAAM,eAAe,CAAA;AAStB,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"input.component.d.ts","sourceRoot":"","sources":["../../src/components/input.component.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,KAAK,gBAAgB,EAErB,UAAU,EACV,YAAY,EAIZ,WAAW,EAEZ,MAAM,eAAe,CAAA;AAStB,OAAO,KAAK,EACV,WAAW,EACX,iBAAiB,EACjB,oBAAoB,EACpB,mBAAmB,EACnB,IAAI,EACJ,UAAU,EACX,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAE,WAAW,EAAmC,MAAM,kBAAkB,CAAA;AAE/E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AACzD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAA;AAC1E,OAAO,EAAgC,aAAa,EAAE,MAAM,oCAAoC,CAAA;AAEhG,OAAO,EAAc,KAAK,YAAY,EAAe,MAAM,6BAA6B,CAAA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 @@
|
|
|
6
6
|
import { NgTemplateOutlet } from '@angular/common';
|
|
7
7
|
import { Component, ElementRef, EventEmitter, inject, Output, signal, TemplateRef, ViewChild, } from '@angular/core';
|
|
8
8
|
import { MolPlacement, setElementPresent, usePlacement, useTranslation, } from '@molecule/app-angular';
|
|
9
|
-
import { fieldLayout, getClassMap } from '@molecule/app-ui';
|
|
10
|
-
import { fieldContext } from '../utilities/form-field-context.js';
|
|
9
|
+
import { fieldLayout, getClassMap, isFieldChangeEvent } from '@molecule/app-ui';
|
|
10
|
+
import { descriptionIds, fieldContext, FieldHostAria } from '../utilities/form-field-context.js';
|
|
11
11
|
import { nextInstanceId } from '../utilities/ids.js';
|
|
12
12
|
import { MolIconSvg, resolveIcon } from '../utilities/render-icon.js';
|
|
13
13
|
import { adoptHostDataMolId, moveRestAttributes, reapplyRestAttributes, } from '../utilities/rest-attrs.js';
|
|
@@ -76,7 +76,7 @@ function Input_Conditional_17_Template(rf, ctx) { if (rf & 1) {
|
|
|
76
76
|
} if (rf & 2) {
|
|
77
77
|
const ctx_r0 = i0.ɵɵnextContext();
|
|
78
78
|
i0.ɵɵclassMap(ctx_r0.cm().formError);
|
|
79
|
-
i0.ɵɵattribute("id", ctx_r0.
|
|
79
|
+
i0.ɵɵattribute("id", ctx_r0.describedBy());
|
|
80
80
|
i0.ɵɵadvance();
|
|
81
81
|
i0.ɵɵtextInterpolate(ctx_r0.error);
|
|
82
82
|
} }
|
|
@@ -87,7 +87,7 @@ function Input_Conditional_18_Template(rf, ctx) { if (rf & 1) {
|
|
|
87
87
|
} if (rf & 2) {
|
|
88
88
|
const ctx_r0 = i0.ɵɵnextContext();
|
|
89
89
|
i0.ɵɵclassMap(ctx_r0.cm().formHint);
|
|
90
|
-
i0.ɵɵattribute("id", ctx_r0.
|
|
90
|
+
i0.ɵɵattribute("id", ctx_r0.describedBy());
|
|
91
91
|
i0.ɵɵadvance();
|
|
92
92
|
i0.ɵɵtextInterpolate(ctx_r0.hint);
|
|
93
93
|
} }
|
|
@@ -188,7 +188,7 @@ export class Input {
|
|
|
188
188
|
constructor() {
|
|
189
189
|
usePlacement((hasContent) => this.syncAdornments(hasContent));
|
|
190
190
|
}
|
|
191
|
-
/**
|
|
191
|
+
/** Stable fallback for label and feedback associations. */
|
|
192
192
|
generatedId = nextInstanceId();
|
|
193
193
|
/**
|
|
194
194
|
* Reactive translation, read in the injection context. Its `t` reads the
|
|
@@ -197,8 +197,11 @@ export class Input {
|
|
|
197
197
|
*/
|
|
198
198
|
i18n = useTranslation();
|
|
199
199
|
movedRest = false;
|
|
200
|
-
/**
|
|
201
|
-
|
|
200
|
+
/** Additional description ids supplied by the caller. */
|
|
201
|
+
externalDescription;
|
|
202
|
+
/** Validation state supplied by the caller when no local or enclosing field error is shown. */
|
|
203
|
+
externalInvalid;
|
|
204
|
+
hostAria = new FieldHostAria();
|
|
202
205
|
/** The `data-mol-id` a caller bound on the host (React spreads it onto the input). */
|
|
203
206
|
externalMolId;
|
|
204
207
|
/**
|
|
@@ -217,23 +220,21 @@ export class Input {
|
|
|
217
220
|
return fieldLayout(this.cm());
|
|
218
221
|
}
|
|
219
222
|
/**
|
|
220
|
-
*
|
|
221
|
-
* renumbers generated ids in order of appearance, like React's `useId`).
|
|
223
|
+
* Uses the caller's id, the enclosing field's id, or this instance's fallback.
|
|
222
224
|
* @returns The id value.
|
|
223
225
|
*/
|
|
224
226
|
inputId() {
|
|
225
|
-
|
|
227
|
+
// A standalone control without label or feedback may be named by an external label.
|
|
228
|
+
const externalId = !this.label && !this.hint && !this.error ? this.name : undefined;
|
|
229
|
+
return this.id || this.fieldContext()?.id || externalId || this.generatedId;
|
|
226
230
|
}
|
|
227
231
|
/**
|
|
228
232
|
* The aria-describedby target (error or hint paragraph).
|
|
229
233
|
* @returns The id or null.
|
|
230
234
|
*/
|
|
231
235
|
describedBy() {
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
if (this.hint)
|
|
235
|
-
return `${this.inputId()}-hint`;
|
|
236
|
-
return null;
|
|
236
|
+
const id = this.fieldContext()?.id === this.inputId() ? this.generatedId : this.inputId();
|
|
237
|
+
return this.error ? `${id}-error` : this.hint ? `${id}-hint` : null;
|
|
237
238
|
}
|
|
238
239
|
/**
|
|
239
240
|
* The nearest enclosing `FormField` context (React's cloned props).
|
|
@@ -248,10 +249,7 @@ export class Input {
|
|
|
248
249
|
* @returns The attribute value, or null.
|
|
249
250
|
*/
|
|
250
251
|
mergedDescribedBy() {
|
|
251
|
-
|
|
252
|
-
if (target)
|
|
253
|
-
return [this.restDescribedBy, target].filter(Boolean).join(' ');
|
|
254
|
-
return this.restDescribedBy ?? this.describedBy();
|
|
252
|
+
return descriptionIds(this.externalDescription ?? this.hostAria.description(), this.fieldContext()?.describedBy, this.describedBy());
|
|
255
253
|
}
|
|
256
254
|
/**
|
|
257
255
|
* Computes the input class list.
|
|
@@ -299,6 +297,8 @@ export class Input {
|
|
|
299
297
|
* @param event - The native input event.
|
|
300
298
|
*/
|
|
301
299
|
handleInput(event) {
|
|
300
|
+
if (!isFieldChangeEvent(event))
|
|
301
|
+
return;
|
|
302
302
|
event.stopPropagation();
|
|
303
303
|
this.change.emit(event);
|
|
304
304
|
const input = this.inputEl?.nativeElement;
|
|
@@ -347,9 +347,7 @@ export class Input {
|
|
|
347
347
|
// after-view-init), so the view queries are set here.
|
|
348
348
|
const left = this.leftSlot?.nativeElement;
|
|
349
349
|
const right = this.rightSlot?.nativeElement;
|
|
350
|
-
const inner = this.rightInner?.nativeElement ??
|
|
351
|
-
(right ? right.querySelector('span') : null) ??
|
|
352
|
-
undefined;
|
|
350
|
+
const inner = this.rightInner?.nativeElement ?? right?.querySelector('span') ?? undefined;
|
|
353
351
|
const hasLeft = this.isGiven(this.leftElement) || hasContent(left);
|
|
354
352
|
const hasRight = this.isGiven(this.rightElement) || hasContent(inner);
|
|
355
353
|
this.hasLeft.set(hasLeft);
|
|
@@ -364,6 +362,7 @@ export class Input {
|
|
|
364
362
|
* value in step with the `value` input.
|
|
365
363
|
*/
|
|
366
364
|
ngDoCheck() {
|
|
365
|
+
this.hostAria.read(this.host.nativeElement);
|
|
367
366
|
// Registering this view against the locale: a switch marks it for check,
|
|
368
367
|
// so this hook runs and the reapply below moves the caller's re-bound
|
|
369
368
|
// rest attribute onto the input. Without the read, zoneless change
|
|
@@ -373,19 +372,18 @@ export class Input {
|
|
|
373
372
|
const host = this.host.nativeElement;
|
|
374
373
|
const input = this.inputEl?.nativeElement ?? host.querySelector('input');
|
|
375
374
|
if (!this.movedRest && input) {
|
|
376
|
-
this.restDescribedBy = host.getAttribute('aria-describedby');
|
|
377
375
|
this.movedRest = true;
|
|
378
376
|
adoptHostDataMolId(host, input, (id) => {
|
|
379
377
|
this.externalMolId = id;
|
|
380
378
|
}, () => this.molId());
|
|
381
|
-
moveRestAttributes(host, input);
|
|
379
|
+
moveRestAttributes(host, input, true);
|
|
382
380
|
}
|
|
383
381
|
// A caller's re-bound rest attribute (`[attr.aria-label]` following a
|
|
384
382
|
// locale switch) lands back on the host; move it onto the input again.
|
|
385
383
|
adoptHostDataMolId(host, input, (id) => {
|
|
386
384
|
this.externalMolId = id;
|
|
387
385
|
}, () => this.molId());
|
|
388
|
-
reapplyRestAttributes(host, input);
|
|
386
|
+
reapplyRestAttributes(host, input, { keepInvalid: true });
|
|
389
387
|
// React's controlled input: the live value always follows the `value` prop
|
|
390
388
|
// after a re-render (the binding sets the attribute; the property is only
|
|
391
389
|
// moved by the browser on an uncontrolled edit).
|
|
@@ -431,7 +429,7 @@ export class Input {
|
|
|
431
429
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.rightInner = _t.first);
|
|
432
430
|
} }, hostVars: 2, hostBindings: function Input_HostBindings(rf, ctx) { if (rf & 2) {
|
|
433
431
|
i0.ɵɵclassMap(ctx.field().root);
|
|
434
|
-
} }, inputs: { type: "type", size: "size", align: "align", label: "label", error: "error", hint: "hint", leftElement: "leftElement", rightElement: "rightElement", clearable: "clearable", clearLabel: "clearLabel", className: "className", style: "style", testId: "testId", disabled: "disabled", required: "required", value: "value", defaultValue: "defaultValue", placeholder: "placeholder", name: "name", id: "id", automationId: "automationId", dataMolId: [0, "data-mol-id", "dataMolId"], onFocus: "onFocus", onBlur: "onBlur", onKeyDown: "onKeyDown" }, outputs: { change: "change", valueChange: "valueChange", clear: "clear" }, features: [i0.ɵɵHostDirectivesFeature([i1.MolPlacement])], ngContentSelectors: _c5, decls: 19, vars: 28, consts: [["leftSlot", ""], ["inputEl", ""], ["rightSlot", ""], ["rightInner", ""], [3, "class"], [3, "ngTemplateOutlet"], [3, "input", "change", "focusin", "focusout", "keydown", "disabled"], ["type", "button", 3, "disabled", "class"], ["type", "button", 3, "click", "disabled"], ["mol-icon", "", 3, "data"]], template: function Input_Template(rf, ctx) { if (rf & 1) {
|
|
432
|
+
} }, inputs: { type: "type", size: "size", align: "align", label: "label", error: "error", hint: "hint", externalDescription: [0, "aria-describedby", "externalDescription"], externalInvalid: [0, "aria-invalid", "externalInvalid"], leftElement: "leftElement", rightElement: "rightElement", clearable: "clearable", clearLabel: "clearLabel", className: "className", style: "style", testId: "testId", disabled: "disabled", required: "required", value: "value", defaultValue: "defaultValue", placeholder: "placeholder", name: "name", id: "id", automationId: "automationId", dataMolId: [0, "data-mol-id", "dataMolId"], onFocus: "onFocus", onBlur: "onBlur", onKeyDown: "onKeyDown" }, outputs: { change: "change", valueChange: "valueChange", clear: "clear" }, features: [i0.ɵɵHostDirectivesFeature([i1.MolPlacement])], ngContentSelectors: _c5, decls: 19, vars: 28, consts: [["leftSlot", ""], ["inputEl", ""], ["rightSlot", ""], ["rightInner", ""], [3, "class"], [3, "ngTemplateOutlet"], [3, "input", "change", "focusin", "focusout", "keydown", "disabled"], ["type", "button", 3, "disabled", "class"], ["type", "button", 3, "click", "disabled"], ["mol-icon", "", 3, "data"]], template: function Input_Template(rf, ctx) { if (rf & 1) {
|
|
435
433
|
i0.ɵɵprojectionDef(_c4);
|
|
436
434
|
i0.ɵɵconditionalCreate(0, Input_Conditional_0_Template, 2, 6, "label", 4);
|
|
437
435
|
i0.ɵɵelementStart(1, "div")(2, "div", null, 0);
|
|
@@ -462,7 +460,7 @@ export class Input {
|
|
|
462
460
|
i0.ɵɵadvance(2);
|
|
463
461
|
i0.ɵɵclassMap(ctx.classes());
|
|
464
462
|
i0.ɵɵproperty("disabled", ctx.disabled);
|
|
465
|
-
i0.ɵɵattribute("type", ctx.type ?? "text")("id", ctx.inputId())("name", ctx.name)("value", ctx.value ?? ctx.defaultValue)("placeholder", ctx.placeholder)("required", ctx.required ? "" : null)("aria-invalid", ctx.error || ctx.fieldContext()?.invalid ?
|
|
463
|
+
i0.ɵɵattribute("type", ctx.type ?? "text")("id", ctx.inputId())("name", ctx.name)("value", ctx.value ?? ctx.defaultValue)("placeholder", ctx.placeholder)("required", ctx.required ? "" : null)("aria-invalid", ctx.error || ctx.fieldContext()?.invalid ? true : ctx.externalInvalid ?? ctx.hostAria.invalid() ?? false)("aria-describedby", ctx.mergedDescribedBy())("style", ctx.hostStyle(), i0.ɵɵsanitizeStyle)("data-testid", ctx.testId)("data-mol-id", ctx.molId());
|
|
466
464
|
i0.ɵɵadvance(2);
|
|
467
465
|
i0.ɵɵclassMap(ctx.cm().inputRightElement);
|
|
468
466
|
i0.ɵɵadvance(2);
|
|
@@ -491,6 +489,8 @@ export class Input {
|
|
|
491
489
|
'label',
|
|
492
490
|
'error',
|
|
493
491
|
'hint',
|
|
492
|
+
'externalDescription: aria-describedby',
|
|
493
|
+
'externalInvalid: aria-invalid',
|
|
494
494
|
'leftElement',
|
|
495
495
|
'rightElement',
|
|
496
496
|
'clearable',
|
|
@@ -538,7 +538,9 @@ export class Input {
|
|
|
538
538
|
[attr.placeholder]="placeholder"
|
|
539
539
|
[disabled]="disabled"
|
|
540
540
|
[attr.required]="required ? '' : null"
|
|
541
|
-
[attr.aria-invalid]="
|
|
541
|
+
[attr.aria-invalid]="
|
|
542
|
+
error || fieldContext()?.invalid ? true : (externalInvalid ?? hostAria.invalid() ?? false)
|
|
543
|
+
"
|
|
542
544
|
[attr.aria-describedby]="mergedDescribedBy()"
|
|
543
545
|
[class]="classes()"
|
|
544
546
|
[attr.style]="hostStyle()"
|
|
@@ -574,10 +576,10 @@ export class Input {
|
|
|
574
576
|
</div>
|
|
575
577
|
</div>
|
|
576
578
|
@if (error) {
|
|
577
|
-
<p [attr.id]="
|
|
579
|
+
<p [attr.id]="describedBy()" [class]="cm().formError">{{ error }}</p>
|
|
578
580
|
}
|
|
579
581
|
@if (hint && !error) {
|
|
580
|
-
<p [attr.id]="
|
|
582
|
+
<p [attr.id]="describedBy()" [class]="cm().formHint">{{ hint }}</p>
|
|
581
583
|
}`,
|
|
582
584
|
}]
|
|
583
585
|
}], () => [], { change: [{
|
|
@@ -599,5 +601,5 @@ export class Input {
|
|
|
599
601
|
type: ViewChild,
|
|
600
602
|
args: ['rightInner']
|
|
601
603
|
}] }); })();
|
|
602
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(Input, { className: "Input", filePath: "components/input.component.ts", lineNumber:
|
|
604
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(Input, { className: "Input", filePath: "components/input.component.ts", lineNumber: 167 }); })();
|
|
603
605
|
//# sourceMappingURL=input.component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.component.js","sourceRoot":"","sources":["../../src/components/input.component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAClD,OAAO,EAEL,SAAS,EACT,UAAU,EACV,YAAY,EACZ,MAAM,EACN,MAAM,EACN,MAAM,EACN,WAAW,EACX,SAAS,GACV,MAAM,eAAe,CAAA;AAEtB,OAAO,EACL,YAAY,EACZ,iBAAiB,EAEjB,YAAY,EACZ,cAAc,GACf,MAAM,uBAAuB,CAAA;
|
|
1
|
+
{"version":3,"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"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { UIClassMap } from '@molecule/app-ui';
|
|
1
|
+
import type { ContainerProps, FlexProps, UIClassMap } from '@molecule/app-ui';
|
|
2
2
|
import { type HasElement } from '../utilities/element.js';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
/**
|
|
@@ -10,12 +10,12 @@ export declare class Container implements HasElement<HTMLDivElement> {
|
|
|
10
10
|
private readonly host;
|
|
11
11
|
/** The element a caller's ref receives: the host `<div>`. */
|
|
12
12
|
readonly element: import("@angular/core").Signal<HTMLDivElement | null>;
|
|
13
|
-
/** Maximum width preset. */
|
|
14
|
-
maxWidth: '
|
|
13
|
+
/** Maximum width preset or CSS length. */
|
|
14
|
+
maxWidth: NonNullable<ContainerProps['maxWidth']>;
|
|
15
15
|
/** Whether the column is centered. */
|
|
16
16
|
centered: boolean;
|
|
17
17
|
/** Horizontal padding (accepted for React parity, not rendered). */
|
|
18
|
-
paddingX?:
|
|
18
|
+
paddingX?: ContainerProps['paddingX'];
|
|
19
19
|
/** Extra classes. */
|
|
20
20
|
className?: string;
|
|
21
21
|
/** Inline style object (React camelCase). */
|
|
@@ -61,11 +61,11 @@ export declare class Flex implements HasElement<HTMLDivElement> {
|
|
|
61
61
|
/** Flex direction. */
|
|
62
62
|
direction: 'row' | 'column' | 'row-reverse' | 'column-reverse';
|
|
63
63
|
/** Main-axis justification. */
|
|
64
|
-
justify?:
|
|
64
|
+
justify?: FlexProps['justify'];
|
|
65
65
|
/** Cross-axis alignment. */
|
|
66
|
-
align?:
|
|
66
|
+
align?: FlexProps['align'];
|
|
67
67
|
/** Wrapping behavior. */
|
|
68
|
-
wrap?:
|
|
68
|
+
wrap?: FlexProps['wrap'];
|
|
69
69
|
/** Gap (preset name, number in px, or any CSS value). */
|
|
70
70
|
gap?: number | string;
|
|
71
71
|
/** Extra classes. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout.component.d.ts","sourceRoot":"","sources":["../../src/components/layout.component.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;
|
|
1
|
+
{"version":3,"file":"layout.component.d.ts","sourceRoot":"","sources":["../../src/components/layout.component.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAyB,cAAc,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAGpG,OAAO,EAAE,KAAK,UAAU,EAAe,MAAM,yBAAyB,CAAA;;AA8BtE;;;;GAIG;AACH,qBAqBa,SAAU,YAAW,UAAU,CAAC,cAAc,CAAC;IAC1D,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAiD;IACtE,6DAA6D;IAC7D,QAAQ,CAAC,OAAO,wDAAyB;IAEzC,0CAA0C;IAC1C,QAAQ,EAAE,WAAW,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC,CAAO;IACxD,sCAAsC;IACtC,QAAQ,UAAO;IACf,oEAAoE;IACpE,QAAQ,CAAC,EAAE,cAAc,CAAC,UAAU,CAAC,CAAA;IACrC,qBAAqB;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,6CAA6C;IAC7C,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC/B,qBAAqB;IACrB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,4DAA4D;IAC5D,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,wFAAwF;IACxF,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB;;;OAGG;IACH,EAAE,IAAI,UAAU;IAIhB;;;OAGG;IACH,OAAO,IAAI,MAAM;IASjB;;;OAGG;IACH,KAAK,IAAI,MAAM,GAAG,SAAS;IAS3B;;;OAGG;IACH,SAAS,IAAI,MAAM,GAAG,IAAI;yCA5Df,SAAS;2CAAT,SAAS;CAiErB;AAED;;;;GAIG;AACH,qBAuBa,IAAK,YAAW,UAAU,CAAC,cAAc,CAAC;IACrD,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G,MAAM,CAAA;IAC7B,4DAA4D;IAC5D,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,wFAAwF;IACxF,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB;;;OAGG;IACH,cAAc,IAAI,MAAM,GAAG,IAAI;IAS/B;;;OAGG;IACH,EAAE,IAAI,UAAU;IAIhB;;;OAGG;IACH,IAAI,WAAW,IAAI,OAAO,CAEzB;IAED;;;OAGG;IACH,OAAO,IAAI,MAAM;IAejB;;;OAGG;IACH,KAAK,IAAI,MAAM,GAAG,SAAS;IAS3B;;;OAGG;IACH,SAAS,IAAI,MAAM,GAAG,IAAI;yCAvFf,MAAM;2CAAN,MAAM;CAoGlB"}
|
|
@@ -13,6 +13,17 @@ const _c0 = ["*"];
|
|
|
13
13
|
const GAP_NAMES = ['none', 'xs', 'sm', 'md', 'lg', 'xl'];
|
|
14
14
|
/** Spacer size names the class map understands. */
|
|
15
15
|
const SPACER_SIZES = ['xs', 'sm', 'md', 'lg', 'xl'];
|
|
16
|
+
/** Container size names the class map understands; anything else is a CSS length. */
|
|
17
|
+
const CONTAINER_SIZES = ['xs', 'sm', 'md', 'lg', 'xl', '2xl', 'full'];
|
|
18
|
+
/**
|
|
19
|
+
* Checks whether a container width value is a named ClassMap token.
|
|
20
|
+
*
|
|
21
|
+
* @param value - The width value to test.
|
|
22
|
+
* @returns True when the value is a named container size.
|
|
23
|
+
*/
|
|
24
|
+
function isContainerSize(value) {
|
|
25
|
+
return typeof value === 'string' && CONTAINER_SIZES.includes(value);
|
|
26
|
+
}
|
|
16
27
|
/** The class-map direction spellings for React's flex directions. */
|
|
17
28
|
const DIRECTION_MAP = {
|
|
18
29
|
row: 'row',
|
|
@@ -29,7 +40,7 @@ export class Container {
|
|
|
29
40
|
host = inject(ElementRef);
|
|
30
41
|
/** The element a caller's ref receives: the host `<div>`. */
|
|
31
42
|
element = hostElement(this.host);
|
|
32
|
-
/** Maximum width preset. */
|
|
43
|
+
/** Maximum width preset or CSS length. */
|
|
33
44
|
maxWidth = 'lg';
|
|
34
45
|
/** Whether the column is centered. */
|
|
35
46
|
centered = true;
|
|
@@ -57,9 +68,8 @@ export class Container {
|
|
|
57
68
|
* @returns The class string.
|
|
58
69
|
*/
|
|
59
70
|
classes() {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
}), this.centered && this.cm().mxAuto, this.className);
|
|
71
|
+
const namedWidth = isContainerSize(this.maxWidth) ? this.maxWidth : undefined;
|
|
72
|
+
return this.cm().cn(this.cm().container(namedWidth ? { size: namedWidth } : undefined), this.centered && this.cm().mxAuto, this.className);
|
|
63
73
|
}
|
|
64
74
|
/**
|
|
65
75
|
* The `data-mol-id` value (`automationId` wins over a rest `data-mol-id`).
|
|
@@ -76,7 +86,9 @@ export class Container {
|
|
|
76
86
|
* @returns The style attribute text.
|
|
77
87
|
*/
|
|
78
88
|
hostStyle() {
|
|
79
|
-
|
|
89
|
+
const customWidth = !isContainerSize(this.maxWidth) && this.maxWidth ? this.maxWidth : undefined;
|
|
90
|
+
const merged = customWidth ? { maxWidth: customWidth, ...this.style } : this.style;
|
|
91
|
+
return styleText(merged);
|
|
80
92
|
}
|
|
81
93
|
static ɵfac = function Container_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || Container)(); };
|
|
82
94
|
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Container, selectors: [["div", "mol-container", ""]], hostVars: 6, hostBindings: function Container_HostBindings(rf, ctx) { if (rf & 2) {
|
|
@@ -112,7 +124,7 @@ export class Container {
|
|
|
112
124
|
template: `<ng-content></ng-content>`,
|
|
113
125
|
}]
|
|
114
126
|
}], null, null); })();
|
|
115
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(Container, { className: "Container", filePath: "components/layout.component.ts", lineNumber:
|
|
127
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(Container, { className: "Container", filePath: "components/layout.component.ts", lineNumber: 68 }); })();
|
|
116
128
|
/**
|
|
117
129
|
* Flex container component.
|
|
118
130
|
*
|
|
@@ -154,9 +166,7 @@ export class Flex {
|
|
|
154
166
|
* @returns The class string.
|
|
155
167
|
*/
|
|
156
168
|
classes() {
|
|
157
|
-
const cmGap =
|
|
158
|
-
? this.gap
|
|
159
|
-
: undefined;
|
|
169
|
+
const cmGap = GAP_NAMES.find((name) => name === this.gap);
|
|
160
170
|
return this.cm().cn(this.cm().flex({
|
|
161
171
|
direction: DIRECTION_MAP[this.direction] || 'row',
|
|
162
172
|
align: this.align,
|
|
@@ -182,7 +192,7 @@ export class Flex {
|
|
|
182
192
|
hostStyle() {
|
|
183
193
|
const gapStyle = typeof this.gap === 'number'
|
|
184
194
|
? { gap: this.gap }
|
|
185
|
-
: typeof this.gap === 'string' && !GAP_NAMES.
|
|
195
|
+
: typeof this.gap === 'string' && !GAP_NAMES.some((name) => name === this.gap)
|
|
186
196
|
? { gap: this.gap }
|
|
187
197
|
: undefined;
|
|
188
198
|
return styleText({ ...this.style, ...gapStyle });
|
|
@@ -223,7 +233,7 @@ export class Flex {
|
|
|
223
233
|
template: `<ng-content></ng-content>`,
|
|
224
234
|
}]
|
|
225
235
|
}], null, null); })();
|
|
226
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(Flex, { className: "Flex", filePath: "components/layout.component.ts", lineNumber:
|
|
236
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(Flex, { className: "Flex", filePath: "components/layout.component.ts", lineNumber: 163 }); })();
|
|
227
237
|
/**
|
|
228
238
|
* Grid container component.
|
|
229
239
|
*
|
|
@@ -266,9 +276,7 @@ export class Grid {
|
|
|
266
276
|
* @returns The class string.
|
|
267
277
|
*/
|
|
268
278
|
classes() {
|
|
269
|
-
const cmGap =
|
|
270
|
-
? this.gap
|
|
271
|
-
: undefined;
|
|
279
|
+
const cmGap = GAP_NAMES.find((name) => name === this.gap);
|
|
272
280
|
return this.cm().cn(this.cm().grid({
|
|
273
281
|
cols: typeof this.columns === 'number' ? this.columns : undefined,
|
|
274
282
|
gap: cmGap,
|
|
@@ -297,7 +305,7 @@ export class Grid {
|
|
|
297
305
|
if (typeof this.rows === 'string')
|
|
298
306
|
own.gridTemplateRows = this.rows;
|
|
299
307
|
if (typeof this.gap === 'number' ||
|
|
300
|
-
(typeof this.gap === 'string' && !GAP_NAMES.
|
|
308
|
+
(typeof this.gap === 'string' && !GAP_NAMES.some((name) => name === this.gap)))
|
|
301
309
|
own.gap = this.gap;
|
|
302
310
|
if (typeof this.columnGap === 'number' || typeof this.columnGap === 'string')
|
|
303
311
|
own.columnGap = this.columnGap;
|
|
@@ -341,7 +349,7 @@ export class Grid {
|
|
|
341
349
|
template: `<ng-content></ng-content>`,
|
|
342
350
|
}]
|
|
343
351
|
}], null, null); })();
|
|
344
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(Grid, { className: "Grid", filePath: "components/layout.component.ts", lineNumber:
|
|
352
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(Grid, { className: "Grid", filePath: "components/layout.component.ts", lineNumber: 272 }); })();
|
|
345
353
|
/**
|
|
346
354
|
* Spacer component.
|
|
347
355
|
*
|
|
@@ -393,16 +401,17 @@ export class Spacer {
|
|
|
393
401
|
* @returns True for preset names.
|
|
394
402
|
*/
|
|
395
403
|
get isNamedSize() {
|
|
396
|
-
return
|
|
404
|
+
return SPACER_SIZES.some((name) => name === this.size);
|
|
397
405
|
}
|
|
398
406
|
/**
|
|
399
407
|
* Computes the spacer class list.
|
|
400
408
|
* @returns The class string.
|
|
401
409
|
*/
|
|
402
410
|
classes() {
|
|
403
|
-
|
|
411
|
+
const namedSize = SPACER_SIZES.find((name) => name === this.size);
|
|
412
|
+
return this.cm().cn(namedSize
|
|
404
413
|
? this.cm().spacer({
|
|
405
|
-
size:
|
|
414
|
+
size: namedSize,
|
|
406
415
|
horizontal: !!this.horizontal,
|
|
407
416
|
})
|
|
408
417
|
: this.horizontal
|
|
@@ -467,5 +476,5 @@ export class Spacer {
|
|
|
467
476
|
template: '',
|
|
468
477
|
}]
|
|
469
478
|
}], null, null); })();
|
|
470
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(Spacer, { className: "Spacer", filePath: "components/layout.component.ts", lineNumber:
|
|
479
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(Spacer, { className: "Spacer", filePath: "components/layout.component.ts", lineNumber: 384 }); })();
|
|
471
480
|
//# sourceMappingURL=layout.component.js.map
|