@energinet/watt 1.7.1 → 2.0.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 * as i0 from '@angular/core';
2
- import { HostBinding, Input, Directive, ViewEncapsulation, Component } from '@angular/core';
2
+ import { input, booleanAttribute, computed, Directive, ViewEncapsulation, Component } from '@angular/core';
3
3
 
4
4
  //#region License
5
5
  /**
@@ -21,40 +21,89 @@ import { HostBinding, Input, Directive, ViewEncapsulation, Component } from '@an
21
21
  //#endregion
22
22
  /* eslint-disable @angular-eslint/no-input-rename */
23
23
  class VaterUtilityDirective {
24
+ /** Center the element horizontally and vertically. */
25
+ center = input(false, { transform: booleanAttribute });
24
26
  /** Stretch the element to fill the available space in one or both directions. */
25
- fill;
27
+ fill = input();
26
28
  /** Position the element absolute with the provided inset value. */
27
- inset;
28
- center;
29
- get _class() {
30
- return [this.fill, this.inset].filter(Boolean);
31
- }
32
- get _center() {
33
- return this.center === '';
34
- }
29
+ inset = input();
30
+ /** Make the element scrollable. */
31
+ scrollable = input(false, { transform: booleanAttribute });
32
+ // Computed class names
33
+ fillClass = computed(() => this.fill() && `vater-fill-${this.fill()}`);
34
+ insetClass = computed(() => this.inset() && `vater-inset-${this.inset()}`);
35
+ class = computed(() => [this.fillClass(), this.insetClass()].filter(Boolean));
35
36
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: VaterUtilityDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
36
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "19.2.1", type: VaterUtilityDirective, isStandalone: true, selector: "[vater]", inputs: { fill: ["fill", "fill", (value) => `vater-fill-${value}`], inset: ["inset", "inset", (value) => `vater-inset-${value}`], center: "center" }, host: { properties: { "class": "this._class", "class.vater-center": "this._center" } }, ngImport: i0 });
37
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.1", type: VaterUtilityDirective, isStandalone: true, selector: "[vater]", inputs: { center: { classPropertyName: "center", publicName: "center", isSignal: true, isRequired: false, transformFunction: null }, fill: { classPropertyName: "fill", publicName: "fill", isSignal: true, isRequired: false, transformFunction: null }, inset: { classPropertyName: "inset", publicName: "inset", isSignal: true, isRequired: false, transformFunction: null }, scrollable: { classPropertyName: "scrollable", publicName: "scrollable", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "class()", "class.vater-center": "center()", "class.vater-scrollable": "scrollable()" } }, ngImport: i0 });
37
38
  }
38
39
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: VaterUtilityDirective, decorators: [{
39
40
  type: Directive,
40
41
  args: [{
41
42
  selector: '[vater]',
43
+ host: {
44
+ '[class]': 'class()',
45
+ '[class.vater-center]': 'center()',
46
+ '[class.vater-scrollable]': 'scrollable()',
47
+ },
42
48
  }]
43
- }], propDecorators: { fill: [{
44
- type: Input,
45
- args: [{ transform: (value) => `vater-fill-${value}` }]
46
- }], inset: [{
47
- type: Input,
48
- args: [{ transform: (value) => `vater-inset-${value}` }]
49
- }], center: [{
50
- type: Input
51
- }], _class: [{
52
- type: HostBinding,
53
- args: ['class']
54
- }], _center: [{
55
- type: HostBinding,
56
- args: ['class.vater-center']
57
- }] } });
49
+ }] });
50
+
51
+ //#region License
52
+ /**
53
+ * @license
54
+ * Copyright 2020 Energinet DataHub A/S
55
+ *
56
+ * Licensed under the Apache License, Version 2.0 (the "License2");
57
+ * you may not use this file except in compliance with the License.
58
+ * You may obtain a copy of the License at
59
+ *
60
+ * http://www.apache.org/licenses/LICENSE-2.0
61
+ *
62
+ * Unless required by applicable law or agreed to in writing, software
63
+ * distributed under the License is distributed on an "AS IS" BASIS,
64
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
65
+ * See the License for the specific language governing permissions and
66
+ * limitations under the License.
67
+ */
68
+ //#endregion
69
+ class VaterLayoutDirective {
70
+ /** Cross axis alignment of the flex items. */
71
+ align = input();
72
+ /** Direction of the flex items. Defaults to `column`. */
73
+ direction = input('column');
74
+ /** Spacing between the flex items. */
75
+ gap = input();
76
+ /** Main axis alignment of the flex items. */
77
+ justify = input();
78
+ /** Offset to apply along the main axis. */
79
+ offset = input();
80
+ /** Whether the flex items should wrap. */
81
+ wrap = input(false, { transform: booleanAttribute });
82
+ // Computed class names
83
+ alignClass = computed(() => this.align() && `vater-align-${this.align()}`);
84
+ directionClass = computed(() => this.direction() && `vater-${this.direction()}`);
85
+ gapClass = computed(() => this.gap() && `vater-gap-${this.gap()}`);
86
+ justifyClass = computed(() => this.justify() && `vater-justify-${this.justify()}`);
87
+ offsetClass = computed(() => this.offset() && `vater-offset-${this.offset()}`);
88
+ class = computed(() => [
89
+ this.alignClass(),
90
+ this.directionClass(),
91
+ this.gapClass(),
92
+ this.justifyClass(),
93
+ this.offsetClass(),
94
+ ].filter(Boolean));
95
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: VaterLayoutDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
96
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.1", type: VaterLayoutDirective, isStandalone: true, inputs: { align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null }, direction: { classPropertyName: "direction", publicName: "direction", isSignal: true, isRequired: false, transformFunction: null }, gap: { classPropertyName: "gap", publicName: "gap", isSignal: true, isRequired: false, transformFunction: null }, justify: { classPropertyName: "justify", publicName: "justify", isSignal: true, isRequired: false, transformFunction: null }, offset: { classPropertyName: "offset", publicName: "offset", isSignal: true, isRequired: false, transformFunction: null }, wrap: { classPropertyName: "wrap", publicName: "wrap", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "class()", "class.vater-wrap": "wrap()" } }, ngImport: i0 });
97
+ }
98
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: VaterLayoutDirective, decorators: [{
99
+ type: Directive,
100
+ args: [{
101
+ host: {
102
+ '[class]': 'class()',
103
+ '[class.vater-wrap]': 'wrap()',
104
+ },
105
+ }]
106
+ }] });
58
107
 
59
108
  //#region License
60
109
  /**
@@ -75,88 +124,29 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
75
124
  */
76
125
  //#endregion
77
126
  class VaterFlexComponent {
78
- direction = 'column';
79
- grow = '1';
80
- shrink = '1';
81
- basis = 'auto';
82
- gap;
83
- justify;
84
- wrap = 'nowrap';
85
- scrollable;
86
- offset;
87
- get _offset() {
88
- if (!this.offset)
89
- return undefined;
90
- switch (this.direction) {
91
- case 'column':
92
- return `var(--watt-space-${this.offset}) 0`;
93
- case 'row':
94
- return `0 var(--watt-space-${this.offset})`;
95
- }
96
- }
97
- get _gap() {
98
- return this.gap ? `var(--watt-space-${this.gap})` : undefined;
99
- }
100
- get _overflow() {
101
- return this.scrollable === '' ? 'auto' : undefined;
102
- }
127
+ /**
128
+ * When set, sizes the flex items according to their width or height properties.
129
+ * @see https://drafts.csswg.org/css-flexbox-1/#flex-common
130
+ * @remarks
131
+ * Prefer setting `fill` on flex items over using `autoSize`.
132
+ */
133
+ autoSize = input(false, { transform: booleanAttribute });
103
134
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: VaterFlexComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
104
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.1", type: VaterFlexComponent, isStandalone: true, selector: "vater-flex, [vater-flex]", inputs: { direction: "direction", grow: "grow", shrink: "shrink", basis: "basis", gap: "gap", justify: "justify", wrap: "wrap", scrollable: "scrollable", offset: "offset" }, host: { properties: { "style.flex-direction": "this.direction", "style.--grow": "this.grow", "style.--shrink": "this.shrink", "style.--basis": "this.basis", "style.justify-content": "this.justify", "style.flex-wrap": "this.wrap", "style.padding": "this._offset", "style.gap": "this._gap", "style.overflow": "this._overflow" } }, hostDirectives: [{ directive: VaterUtilityDirective, inputs: ["center", "center", "fill", "fill", "inset", "inset"] }], ngImport: i0, template: `<ng-content />`, isInline: true, styles: ["vater-flex,[vater-flex]{display:flex;line-height:normal}vater-flex>*,[vater-flex]>*{flex:var(--grow) var(--shrink) var(--basis)}\n"], encapsulation: i0.ViewEncapsulation.None });
135
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.1", type: VaterFlexComponent, isStandalone: true, selector: "vater-flex, [vater-flex]", inputs: { autoSize: { classPropertyName: "autoSize", publicName: "autoSize", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.vater-flex-auto": "autoSize()" } }, hostDirectives: [{ directive: VaterLayoutDirective, inputs: ["align", "align", "direction", "direction", "justify", "justify", "wrap", "wrap", "gap", "gap", "offset", "offset"] }, { directive: VaterUtilityDirective, inputs: ["center", "center", "fill", "fill", "inset", "inset", "scrollable", "scrollable"] }], ngImport: i0, template: `<ng-content />`, isInline: true, styles: ["vater-flex,[vater-flex]{display:flex;line-height:normal}\n"], encapsulation: i0.ViewEncapsulation.None });
105
136
  }
106
137
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: VaterFlexComponent, decorators: [{
107
138
  type: Component,
108
139
  args: [{ selector: 'vater-flex, [vater-flex]', encapsulation: ViewEncapsulation.None, hostDirectives: [
140
+ {
141
+ directive: VaterLayoutDirective,
142
+ inputs: ['align', 'direction', 'justify', 'wrap', 'gap', 'offset'],
143
+ },
109
144
  {
110
145
  directive: VaterUtilityDirective,
111
- inputs: ['center', 'fill', 'inset'],
146
+ inputs: ['center', 'fill', 'inset', 'scrollable'],
112
147
  },
113
- ], template: `<ng-content />`, styles: ["vater-flex,[vater-flex]{display:flex;line-height:normal}vater-flex>*,[vater-flex]>*{flex:var(--grow) var(--shrink) var(--basis)}\n"] }]
114
- }], propDecorators: { direction: [{
115
- type: Input
116
- }, {
117
- type: HostBinding,
118
- args: ['style.flex-direction']
119
- }], grow: [{
120
- type: Input
121
- }, {
122
- type: HostBinding,
123
- args: ['style.--grow']
124
- }], shrink: [{
125
- type: Input
126
- }, {
127
- type: HostBinding,
128
- args: ['style.--shrink']
129
- }], basis: [{
130
- type: Input
131
- }, {
132
- type: HostBinding,
133
- args: ['style.--basis']
134
- }], gap: [{
135
- type: Input
136
- }], justify: [{
137
- type: Input
138
- }, {
139
- type: HostBinding,
140
- args: ['style.justify-content']
141
- }], wrap: [{
142
- type: Input
143
- }, {
144
- type: HostBinding,
145
- args: ['style.flex-wrap']
146
- }], scrollable: [{
147
- type: Input
148
- }], offset: [{
149
- type: Input
150
- }], _offset: [{
151
- type: HostBinding,
152
- args: ['style.padding']
153
- }], _gap: [{
154
- type: HostBinding,
155
- args: ['style.gap']
156
- }], _overflow: [{
157
- type: HostBinding,
158
- args: ['style.overflow']
159
- }] } });
148
+ ], host: { '[class.vater-flex-auto]': 'autoSize()' }, template: `<ng-content />`, styles: ["vater-flex,[vater-flex]{display:flex;line-height:normal}\n"] }]
149
+ }] });
160
150
 
161
151
  //#region License
162
152
  /**
@@ -178,11 +168,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
178
168
  //#endregion
179
169
  class VaterSpacerComponent {
180
170
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: VaterSpacerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
181
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.1", type: VaterSpacerComponent, isStandalone: true, selector: "vater-spacer, [vater-spacer]", ngImport: i0, template: `<ng-content />`, isInline: true, styles: ["vater-spacer,[vater-spacer]{flex:1;align-self:stretch}\n"], encapsulation: i0.ViewEncapsulation.None });
171
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.1", type: VaterSpacerComponent, isStandalone: true, selector: "vater-spacer, [vater-spacer]", ngImport: i0, template: '<ng-content />', isInline: true, styles: ["vater-spacer,[vater-spacer]{flex:1;align-self:stretch}\n"], encapsulation: i0.ViewEncapsulation.None });
182
172
  }
183
173
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: VaterSpacerComponent, decorators: [{
184
174
  type: Component,
185
- args: [{ selector: 'vater-spacer, [vater-spacer]', encapsulation: ViewEncapsulation.None, template: `<ng-content />`, styles: ["vater-spacer,[vater-spacer]{flex:1;align-self:stretch}\n"] }]
175
+ args: [{ selector: 'vater-spacer, [vater-spacer]', encapsulation: ViewEncapsulation.None, template: '<ng-content />', styles: ["vater-spacer,[vater-spacer]{flex:1;align-self:stretch}\n"] }]
186
176
  }] });
187
177
 
188
178
  //#region License
@@ -204,61 +194,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
204
194
  */
205
195
  //#endregion
206
196
  class VaterStackComponent {
207
- align = 'center';
208
- direction = 'column';
209
- gap;
210
- justify;
211
- offset;
212
- get _offset() {
213
- if (!this.offset)
214
- return undefined;
215
- switch (this.direction) {
216
- case 'column':
217
- return `var(--watt-space-${this.offset}) 0`;
218
- case 'row':
219
- return `0 var(--watt-space-${this.offset})`;
220
- }
221
- }
222
- get _gap() {
223
- return this.gap ? `var(--watt-space-${this.gap})` : undefined;
224
- }
225
197
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: VaterStackComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
226
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.1", type: VaterStackComponent, isStandalone: true, selector: "vater-stack, [vater-stack]", inputs: { align: "align", direction: "direction", gap: "gap", justify: "justify", offset: "offset" }, host: { properties: { "style.align-items": "this.align", "style.flex-direction": "this.direction", "style.justify-content": "this.justify", "style.padding": "this._offset", "style.gap": "this._gap" } }, hostDirectives: [{ directive: VaterUtilityDirective, inputs: ["center", "center", "fill", "fill", "inset", "inset"] }], ngImport: i0, template: `<ng-content />`, isInline: true, styles: ["vater-stack,[vater-stack]{display:flex;line-height:normal}\n"], encapsulation: i0.ViewEncapsulation.None });
198
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.1", type: VaterStackComponent, isStandalone: true, selector: "vater-stack, [vater-stack]", hostDirectives: [{ directive: VaterLayoutDirective, inputs: ["align", "align", "direction", "direction", "justify", "justify", "wrap", "wrap", "gap", "gap", "offset", "offset"] }, { directive: VaterUtilityDirective, inputs: ["center", "center", "fill", "fill", "inset", "inset", "scrollable", "scrollable"] }], ngImport: i0, template: `<ng-content />`, isInline: true, styles: ["vater-stack,[vater-stack]{display:flex;line-height:normal}\n"], encapsulation: i0.ViewEncapsulation.None });
227
199
  }
228
200
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: VaterStackComponent, decorators: [{
229
201
  type: Component,
230
202
  args: [{ selector: 'vater-stack, [vater-stack]', encapsulation: ViewEncapsulation.None, hostDirectives: [
203
+ {
204
+ directive: VaterLayoutDirective,
205
+ inputs: ['align', 'direction', 'justify', 'wrap', 'gap', 'offset'],
206
+ },
231
207
  {
232
208
  directive: VaterUtilityDirective,
233
- inputs: ['center', 'fill', 'inset'],
209
+ inputs: ['center', 'fill', 'inset', 'scrollable'],
234
210
  },
235
211
  ], template: `<ng-content />`, styles: ["vater-stack,[vater-stack]{display:flex;line-height:normal}\n"] }]
236
- }], propDecorators: { align: [{
237
- type: Input
238
- }, {
239
- type: HostBinding,
240
- args: ['style.align-items']
241
- }], direction: [{
242
- type: Input
243
- }, {
244
- type: HostBinding,
245
- args: ['style.flex-direction']
246
- }], gap: [{
247
- type: Input
248
- }], justify: [{
249
- type: Input
250
- }, {
251
- type: HostBinding,
252
- args: ['style.justify-content']
253
- }], offset: [{
254
- type: Input
255
- }], _offset: [{
256
- type: HostBinding,
257
- args: ['style.padding']
258
- }], _gap: [{
259
- type: HostBinding,
260
- args: ['style.gap']
261
- }] } });
212
+ }] });
262
213
 
263
214
  //#region License
264
215
  /**
@@ -283,5 +234,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
283
234
  * Generated bundle index. Do not edit.
284
235
  */
285
236
 
286
- export { VaterFlexComponent, VaterSpacerComponent, VaterStackComponent, VaterUtilityDirective };
237
+ export { VaterFlexComponent, VaterLayoutDirective, VaterSpacerComponent, VaterStackComponent, VaterUtilityDirective };
287
238
  //# sourceMappingURL=energinet-watt-vater.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"energinet-watt-vater.mjs","sources":["../../../libs/watt/package/vater/vater-utility.directive.ts","../../../libs/watt/package/vater/vater-flex.component.ts","../../../libs/watt/package/vater/vater-spacer.component.ts","../../../libs/watt/package/vater/vater-stack.component.ts","../../../libs/watt/package/vater/index.ts","../../../libs/watt/package/vater/energinet-watt-vater.ts"],"sourcesContent":["//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { Directive, HostBinding, Input } from '@angular/core';\n\nexport type Fill = 'horizontal' | 'vertical' | 'both';\nexport type Inset = '0' | 'xs' | 's' | 'm' | 'ml' | 'l' | 'xl';\n\n/* eslint-disable @angular-eslint/no-input-rename */\n@Directive({\n selector: '[vater]',\n})\nexport class VaterUtilityDirective {\n /** Stretch the element to fill the available space in one or both directions. */\n @Input({ transform: (value: Fill) => `vater-fill-${value}` })\n fill?: Fill;\n\n /** Position the element absolute with the provided inset value. */\n @Input({ transform: (value: Inset) => `vater-inset-${value}` })\n inset?: Inset;\n\n @Input()\n center?: string;\n\n @HostBinding('class')\n get _class() {\n return [this.fill, this.inset].filter(Boolean);\n }\n\n @HostBinding('class.vater-center')\n get _center() {\n return this.center === '';\n }\n}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { Component, HostBinding, Input, ViewEncapsulation } from '@angular/core';\nimport { Direction, Spacing, Justify, Wrap } from './types';\nimport { VaterUtilityDirective } from './vater-utility.directive';\n\n@Component({\n selector: 'vater-flex, [vater-flex]',\n encapsulation: ViewEncapsulation.None,\n hostDirectives: [\n {\n directive: VaterUtilityDirective,\n inputs: ['center', 'fill', 'inset'],\n },\n ],\n styles: [\n `\n vater-flex,\n [vater-flex] {\n display: flex;\n line-height: normal;\n }\n\n vater-flex > *,\n [vater-flex] > * {\n flex: var(--grow) var(--shrink) var(--basis);\n }\n `,\n ],\n template: `<ng-content />`,\n})\nexport class VaterFlexComponent {\n @Input()\n @HostBinding('style.flex-direction')\n direction: Direction = 'column';\n\n @Input()\n @HostBinding('style.--grow')\n grow = '1';\n\n @Input()\n @HostBinding('style.--shrink')\n shrink = '1';\n\n @Input()\n @HostBinding('style.--basis')\n basis = 'auto';\n\n @Input()\n gap?: Spacing;\n\n @Input()\n @HostBinding('style.justify-content')\n justify?: Justify;\n\n @Input()\n @HostBinding('style.flex-wrap')\n wrap?: Wrap = 'nowrap';\n\n @Input()\n scrollable?: string;\n\n @Input()\n offset?: Spacing;\n\n @HostBinding('style.padding')\n get _offset() {\n if (!this.offset) return undefined;\n switch (this.direction) {\n case 'column':\n return `var(--watt-space-${this.offset}) 0`;\n case 'row':\n return `0 var(--watt-space-${this.offset})`;\n }\n }\n\n @HostBinding('style.gap')\n get _gap() {\n return this.gap ? `var(--watt-space-${this.gap})` : undefined;\n }\n\n @HostBinding('style.overflow')\n get _overflow() {\n return this.scrollable === '' ? 'auto' : undefined;\n }\n}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { Component, ViewEncapsulation } from '@angular/core';\n\n@Component({\n selector: 'vater-spacer, [vater-spacer]',\n encapsulation: ViewEncapsulation.None,\n styles: [\n `\n vater-spacer,\n [vater-spacer] {\n flex: 1;\n align-self: stretch;\n }\n `,\n ],\n template: `<ng-content />`,\n})\nexport class VaterSpacerComponent {}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { Component, HostBinding, Input, ViewEncapsulation } from '@angular/core';\n\nimport { Align, Direction, Spacing, Justify } from './types';\nimport { VaterUtilityDirective } from './vater-utility.directive';\n\n@Component({\n selector: 'vater-stack, [vater-stack]',\n encapsulation: ViewEncapsulation.None,\n hostDirectives: [\n {\n directive: VaterUtilityDirective,\n inputs: ['center', 'fill', 'inset'],\n },\n ],\n styles: [\n `\n vater-stack,\n [vater-stack] {\n display: flex;\n line-height: normal;\n }\n `,\n ],\n template: `<ng-content />`,\n})\nexport class VaterStackComponent {\n @Input()\n @HostBinding('style.align-items')\n align: Align = 'center';\n\n @Input()\n @HostBinding('style.flex-direction')\n direction: Direction = 'column';\n\n @Input()\n gap?: Spacing;\n\n @Input()\n @HostBinding('style.justify-content')\n justify?: Justify;\n\n @Input()\n offset?: Spacing;\n\n @HostBinding('style.padding')\n get _offset() {\n if (!this.offset) return undefined;\n switch (this.direction) {\n case 'column':\n return `var(--watt-space-${this.offset}) 0`;\n case 'row':\n return `0 var(--watt-space-${this.offset})`;\n }\n }\n\n @HostBinding('style.gap')\n get _gap() {\n return this.gap ? `var(--watt-space-${this.gap})` : undefined;\n }\n}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nexport { VaterFlexComponent } from './vater-flex.component';\nexport { VaterSpacerComponent } from './vater-spacer.component';\nexport { VaterStackComponent } from './vater-stack.component';\nexport { VaterUtilityDirective } from './vater-utility.directive';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;AACH;AAMA;MAIa,qBAAqB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CAAA,SAAA,EAAA,CAAA;AAAnB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,mBAAmB,+fAFpB,CAAgB,cAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,8DAAA,CAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;2FAEf,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBApB/B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,4BAA4B,EACvB,aAAA,EAAA,iBAAiB,CAAC,IAAI,EACrB,cAAA,EAAA;AACd,wBAAA;AACE,4BAAA,SAAS,EAAE,qBAAqB;AAChC,4BAAA,MAAM,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC;AACpC,yBAAA;AACF,qBAAA,EAAA,QAAA,EAUS,CAAgB,cAAA,CAAA,EAAA,MAAA,EAAA,CAAA,8DAAA,CAAA,EAAA;8BAK1B,KAAK,EAAA,CAAA;sBAFJ;;sBACA,WAAW;uBAAC,mBAAmB;gBAKhC,SAAS,EAAA,CAAA;sBAFR;;sBACA,WAAW;uBAAC,sBAAsB;gBAInC,GAAG,EAAA,CAAA;sBADF;gBAKD,OAAO,EAAA,CAAA;sBAFN;;sBACA,WAAW;uBAAC,uBAAuB;gBAIpC,MAAM,EAAA,CAAA;sBADL;gBAIG,OAAO,EAAA,CAAA;sBADV,WAAW;uBAAC,eAAe;gBAYxB,IAAI,EAAA,CAAA;sBADP,WAAW;uBAAC,WAAW;;;ACzE1B;AACA;;;;;;;;;;;;;;;AAeG;AACH;;ACjBA;;AAEG;;;;"}
1
+ {"version":3,"file":"energinet-watt-vater.mjs","sources":["../../../libs/watt/package/vater/vater-utility.directive.ts","../../../libs/watt/package/vater/vater-layout.directive.ts","../../../libs/watt/package/vater/vater-flex.component.ts","../../../libs/watt/package/vater/vater-spacer.component.ts","../../../libs/watt/package/vater/vater-stack.component.ts","../../../libs/watt/package/vater/index.ts","../../../libs/watt/package/vater/energinet-watt-vater.ts"],"sourcesContent":["//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { booleanAttribute, computed, Directive, input } from '@angular/core';\nimport { Fill, Inset } from './types';\n\n/* eslint-disable @angular-eslint/no-input-rename */\n@Directive({\n selector: '[vater]',\n host: {\n '[class]': 'class()',\n '[class.vater-center]': 'center()',\n '[class.vater-scrollable]': 'scrollable()',\n },\n})\nexport class VaterUtilityDirective {\n /** Center the element horizontally and vertically. */\n center = input(false, { transform: booleanAttribute });\n\n /** Stretch the element to fill the available space in one or both directions. */\n fill = input<Fill>();\n\n /** Position the element absolute with the provided inset value. */\n inset = input<Inset>();\n\n /** Make the element scrollable. */\n scrollable = input(false, { transform: booleanAttribute });\n\n // Computed class names\n protected fillClass = computed(() => this.fill() && `vater-fill-${this.fill()}`);\n protected insetClass = computed(() => this.inset() && `vater-inset-${this.inset()}`);\n protected class = computed(() => [this.fillClass(), this.insetClass()].filter(Boolean));\n}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { booleanAttribute, computed, Directive, input } from '@angular/core';\nimport { Align, Direction, Justify, Spacing } from './types';\n\n@Directive({\n host: {\n '[class]': 'class()',\n '[class.vater-wrap]': 'wrap()',\n },\n})\nexport class VaterLayoutDirective {\n /** Cross axis alignment of the flex items. */\n align = input<Align>();\n\n /** Direction of the flex items. Defaults to `column`. */\n direction = input<Direction>('column');\n\n /** Spacing between the flex items. */\n gap = input<Spacing>();\n\n /** Main axis alignment of the flex items. */\n justify = input<Justify>();\n\n /** Offset to apply along the main axis. */\n offset = input<Spacing>();\n\n /** Whether the flex items should wrap. */\n wrap = input(false, { transform: booleanAttribute });\n\n // Computed class names\n protected alignClass = computed(() => this.align() && `vater-align-${this.align()}`);\n protected directionClass = computed(() => this.direction() && `vater-${this.direction()}`);\n protected gapClass = computed(() => this.gap() && `vater-gap-${this.gap()}`);\n protected justifyClass = computed(() => this.justify() && `vater-justify-${this.justify()}`);\n protected offsetClass = computed(() => this.offset() && `vater-offset-${this.offset()}`);\n protected class = computed(() =>\n [\n this.alignClass(),\n this.directionClass(),\n this.gapClass(),\n this.justifyClass(),\n this.offsetClass(),\n ].filter(Boolean)\n );\n}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { booleanAttribute, Component, input, ViewEncapsulation } from '@angular/core';\nimport { VaterUtilityDirective } from './vater-utility.directive';\nimport { VaterLayoutDirective } from './vater-layout.directive';\n\n@Component({\n selector: 'vater-flex, [vater-flex]',\n encapsulation: ViewEncapsulation.None,\n hostDirectives: [\n {\n directive: VaterLayoutDirective,\n inputs: ['align', 'direction', 'justify', 'wrap', 'gap', 'offset'],\n },\n {\n directive: VaterUtilityDirective,\n inputs: ['center', 'fill', 'inset', 'scrollable'],\n },\n ],\n host: { '[class.vater-flex-auto]': 'autoSize()' },\n styles: `\n vater-flex,\n [vater-flex] {\n display: flex;\n line-height: normal;\n }\n `,\n template: `<ng-content />`,\n})\nexport class VaterFlexComponent {\n /**\n * When set, sizes the flex items according to their width or height properties.\n * @see https://drafts.csswg.org/css-flexbox-1/#flex-common\n * @remarks\n * Prefer setting `fill` on flex items over using `autoSize`.\n */\n autoSize = input(false, { transform: booleanAttribute });\n}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { Component, ViewEncapsulation } from '@angular/core';\n\n@Component({\n selector: 'vater-spacer, [vater-spacer]',\n encapsulation: ViewEncapsulation.None,\n styles: `\n vater-spacer,\n [vater-spacer] {\n flex: 1;\n align-self: stretch;\n }\n `,\n template: '<ng-content />',\n})\nexport class VaterSpacerComponent {}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { Component, ViewEncapsulation } from '@angular/core';\nimport { VaterUtilityDirective } from './vater-utility.directive';\nimport { VaterLayoutDirective } from './vater-layout.directive';\n\n@Component({\n selector: 'vater-stack, [vater-stack]',\n encapsulation: ViewEncapsulation.None,\n hostDirectives: [\n {\n directive: VaterLayoutDirective,\n inputs: ['align', 'direction', 'justify', 'wrap', 'gap', 'offset'],\n },\n {\n directive: VaterUtilityDirective,\n inputs: ['center', 'fill', 'inset', 'scrollable'],\n },\n ],\n styles: `\n vater-stack,\n [vater-stack] {\n display: flex;\n line-height: normal;\n }\n `,\n template: `<ng-content />`,\n})\nexport class VaterStackComponent {}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nexport { VaterFlexComponent } from './vater-flex.component';\nexport { VaterSpacerComponent } from './vater-spacer.component';\nexport { VaterStackComponent } from './vater-stack.component';\nexport { VaterLayoutDirective } from './vater-layout.directive';\nexport { VaterUtilityDirective } from './vater-utility.directive';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;AACH;AAIA;MASa,qBAAqB,CAAA;;IAEhC,MAAM,GAAG,KAAK,CAAC,KAAK,EAAE,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC;;IAGtD,IAAI,GAAG,KAAK,EAAQ;;IAGpB,KAAK,GAAG,KAAK,EAAS;;IAGtB,UAAU,GAAG,KAAK,CAAC,KAAK,EAAE,EAAE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AAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,mBAAmB,6YAFpB,CAAgB,cAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,8DAAA,CAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;2FAEf,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAtB/B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,4BAA4B,EACvB,aAAA,EAAA,iBAAiB,CAAC,IAAI,EACrB,cAAA,EAAA;AACd,wBAAA;AACE,4BAAA,SAAS,EAAE,oBAAoB;AAC/B,4BAAA,MAAM,EAAE,CAAC,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,CAAC;AACnE,yBAAA;AACD,wBAAA;AACE,4BAAA,SAAS,EAAE,qBAAqB;4BAChC,MAAM,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,CAAC;AAClD,yBAAA;AACF,qBAAA,EAAA,QAAA,EAQS,CAAgB,cAAA,CAAA,EAAA,MAAA,EAAA,CAAA,8DAAA,CAAA,EAAA;;;AC1C5B;AACA;;;;;;;;;;;;;;;AAeG;AACH;;ACjBA;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@energinet/watt",
4
- "version": "1.7.1",
4
+ "version": "2.0.1",
5
5
  "license": "Apache-2.0",
6
6
  "exports": {
7
7
  ".": {
package/vater/index.d.ts CHANGED
@@ -17,4 +17,5 @@
17
17
  export { VaterFlexComponent } from './vater-flex.component';
18
18
  export { VaterSpacerComponent } from './vater-spacer.component';
19
19
  export { VaterStackComponent } from './vater-stack.component';
20
+ export { VaterLayoutDirective } from './vater-layout.directive';
20
21
  export { VaterUtilityDirective } from './vater-utility.directive';
package/vater/types.d.ts CHANGED
@@ -14,8 +14,9 @@
14
14
  * See the License for the specific language governing permissions and
15
15
  * limitations under the License.
16
16
  */
17
- export type Direction = 'row' | 'column';
18
- export type Justify = 'flex-start' | 'flex-end' | 'center' | 'space-between' | 'space-around' | 'space-evenly';
19
- export type Align = 'stretch' | 'flex-start' | 'flex-end' | 'center' | 'baseline';
20
- export type Wrap = 'nowrap' | 'wrap' | 'wrap-reverse';
21
17
  export type Spacing = 'xs' | 's' | 'm' | 'ml' | 'l' | 'xl';
18
+ export type Fill = 'horizontal' | 'vertical' | 'both';
19
+ export type Inset = '0' | Spacing;
20
+ export type Align = 'stretch' | 'start' | 'end' | 'center' | 'baseline';
21
+ export type Direction = 'row' | 'column';
22
+ export type Justify = 'start' | 'end' | 'center' | 'space-between' | 'space-around' | 'space-evenly';
@@ -1,19 +1,14 @@
1
- import { Direction, Spacing, Justify, Wrap } from './types';
2
1
  import * as i0 from "@angular/core";
3
- import * as i1 from "./vater-utility.directive";
2
+ import * as i1 from "./vater-layout.directive";
3
+ import * as i2 from "./vater-utility.directive";
4
4
  export declare class VaterFlexComponent {
5
- direction: Direction;
6
- grow: string;
7
- shrink: string;
8
- basis: string;
9
- gap?: Spacing;
10
- justify?: Justify;
11
- wrap?: Wrap;
12
- scrollable?: string;
13
- offset?: Spacing;
14
- get _offset(): string | undefined;
15
- get _gap(): string | undefined;
16
- get _overflow(): "auto" | undefined;
5
+ /**
6
+ * When set, sizes the flex items according to their width or height properties.
7
+ * @see https://drafts.csswg.org/css-flexbox-1/#flex-common
8
+ * @remarks
9
+ * Prefer setting `fill` on flex items over using `autoSize`.
10
+ */
11
+ autoSize: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
17
12
  static ɵfac: i0.ɵɵFactoryDeclaration<VaterFlexComponent, never>;
18
- static ɵcmp: i0.ɵɵComponentDeclaration<VaterFlexComponent, "vater-flex, [vater-flex]", never, { "direction": { "alias": "direction"; "required": false; }; "grow": { "alias": "grow"; "required": false; }; "shrink": { "alias": "shrink"; "required": false; }; "basis": { "alias": "basis"; "required": false; }; "gap": { "alias": "gap"; "required": false; }; "justify": { "alias": "justify"; "required": false; }; "wrap": { "alias": "wrap"; "required": false; }; "scrollable": { "alias": "scrollable"; "required": false; }; "offset": { "alias": "offset"; "required": false; }; }, {}, never, ["*"], true, [{ directive: typeof i1.VaterUtilityDirective; inputs: { "center": "center"; "fill": "fill"; "inset": "inset"; }; outputs: {}; }]>;
13
+ static ɵcmp: i0.ɵɵComponentDeclaration<VaterFlexComponent, "vater-flex, [vater-flex]", never, { "autoSize": { "alias": "autoSize"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, [{ directive: typeof i1.VaterLayoutDirective; inputs: { "align": "align"; "direction": "direction"; "justify": "justify"; "wrap": "wrap"; "gap": "gap"; "offset": "offset"; }; outputs: {}; }, { directive: typeof i2.VaterUtilityDirective; inputs: { "center": "center"; "fill": "fill"; "inset": "inset"; "scrollable": "scrollable"; }; outputs: {}; }]>;
19
14
  }
@@ -0,0 +1,24 @@
1
+ import { Align, Direction, Justify, Spacing } from './types';
2
+ import * as i0 from "@angular/core";
3
+ export declare class VaterLayoutDirective {
4
+ /** Cross axis alignment of the flex items. */
5
+ align: import("@angular/core").InputSignal<Align | undefined>;
6
+ /** Direction of the flex items. Defaults to `column`. */
7
+ direction: import("@angular/core").InputSignal<Direction>;
8
+ /** Spacing between the flex items. */
9
+ gap: import("@angular/core").InputSignal<Spacing | undefined>;
10
+ /** Main axis alignment of the flex items. */
11
+ justify: import("@angular/core").InputSignal<Justify | undefined>;
12
+ /** Offset to apply along the main axis. */
13
+ offset: import("@angular/core").InputSignal<Spacing | undefined>;
14
+ /** Whether the flex items should wrap. */
15
+ wrap: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
16
+ protected alignClass: import("@angular/core").Signal<string | undefined>;
17
+ protected directionClass: import("@angular/core").Signal<string>;
18
+ protected gapClass: import("@angular/core").Signal<string | undefined>;
19
+ protected justifyClass: import("@angular/core").Signal<string | undefined>;
20
+ protected offsetClass: import("@angular/core").Signal<string | undefined>;
21
+ protected class: import("@angular/core").Signal<(string | undefined)[]>;
22
+ static ɵfac: i0.ɵɵFactoryDeclaration<VaterLayoutDirective, never>;
23
+ static ɵdir: i0.ɵɵDirectiveDeclaration<VaterLayoutDirective, never, never, { "align": { "alias": "align"; "required": false; "isSignal": true; }; "direction": { "alias": "direction"; "required": false; "isSignal": true; }; "gap": { "alias": "gap"; "required": false; "isSignal": true; }; "justify": { "alias": "justify"; "required": false; "isSignal": true; }; "offset": { "alias": "offset"; "required": false; "isSignal": true; }; "wrap": { "alias": "wrap"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
24
+ }
@@ -1,14 +1,7 @@
1
- import { Align, Direction, Spacing, Justify } from './types';
2
1
  import * as i0 from "@angular/core";
3
- import * as i1 from "./vater-utility.directive";
2
+ import * as i1 from "./vater-layout.directive";
3
+ import * as i2 from "./vater-utility.directive";
4
4
  export declare class VaterStackComponent {
5
- align: Align;
6
- direction: Direction;
7
- gap?: Spacing;
8
- justify?: Justify;
9
- offset?: Spacing;
10
- get _offset(): string | undefined;
11
- get _gap(): string | undefined;
12
5
  static ɵfac: i0.ɵɵFactoryDeclaration<VaterStackComponent, never>;
13
- static ɵcmp: i0.ɵɵComponentDeclaration<VaterStackComponent, "vater-stack, [vater-stack]", never, { "align": { "alias": "align"; "required": false; }; "direction": { "alias": "direction"; "required": false; }; "gap": { "alias": "gap"; "required": false; }; "justify": { "alias": "justify"; "required": false; }; "offset": { "alias": "offset"; "required": false; }; }, {}, never, ["*"], true, [{ directive: typeof i1.VaterUtilityDirective; inputs: { "center": "center"; "fill": "fill"; "inset": "inset"; }; outputs: {}; }]>;
6
+ static ɵcmp: i0.ɵɵComponentDeclaration<VaterStackComponent, "vater-stack, [vater-stack]", never, {}, {}, never, ["*"], true, [{ directive: typeof i1.VaterLayoutDirective; inputs: { "align": "align"; "direction": "direction"; "justify": "justify"; "wrap": "wrap"; "gap": "gap"; "offset": "offset"; }; outputs: {}; }, { directive: typeof i2.VaterUtilityDirective; inputs: { "center": "center"; "fill": "fill"; "inset": "inset"; "scrollable": "scrollable"; }; outputs: {}; }]>;
14
7
  }
@@ -1,16 +1,17 @@
1
+ import { Fill, Inset } from './types';
1
2
  import * as i0 from "@angular/core";
2
- export type Fill = 'horizontal' | 'vertical' | 'both';
3
- export type Inset = '0' | 'xs' | 's' | 'm' | 'ml' | 'l' | 'xl';
4
3
  export declare class VaterUtilityDirective {
4
+ /** Center the element horizontally and vertically. */
5
+ center: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
5
6
  /** Stretch the element to fill the available space in one or both directions. */
6
- fill?: Fill;
7
+ fill: import("@angular/core").InputSignal<Fill | undefined>;
7
8
  /** Position the element absolute with the provided inset value. */
8
- inset?: Inset;
9
- center?: string;
10
- get _class(): (Fill | Inset | undefined)[];
11
- get _center(): boolean;
9
+ inset: import("@angular/core").InputSignal<Inset | undefined>;
10
+ /** Make the element scrollable. */
11
+ scrollable: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
12
+ protected fillClass: import("@angular/core").Signal<string | undefined>;
13
+ protected insetClass: import("@angular/core").Signal<string | undefined>;
14
+ protected class: import("@angular/core").Signal<(string | undefined)[]>;
12
15
  static ɵfac: i0.ɵɵFactoryDeclaration<VaterUtilityDirective, never>;
13
- static ɵdir: i0.ɵɵDirectiveDeclaration<VaterUtilityDirective, "[vater]", never, { "fill": { "alias": "fill"; "required": false; }; "inset": { "alias": "inset"; "required": false; }; "center": { "alias": "center"; "required": false; }; }, {}, never, never, true, never>;
14
- static ngAcceptInputType_fill: Fill;
15
- static ngAcceptInputType_inset: Inset;
16
+ static ɵdir: i0.ɵɵDirectiveDeclaration<VaterUtilityDirective, "[vater]", never, { "center": { "alias": "center"; "required": false; "isSignal": true; }; "fill": { "alias": "fill"; "required": false; "isSignal": true; }; "inset": { "alias": "inset"; "required": false; "isSignal": true; }; "scrollable": { "alias": "scrollable"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
16
17
  }