@lluc_llull/ui-lib 0.35.0 → 0.36.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lluc_llull/ui-lib",
3
- "version": "0.35.0",
3
+ "version": "0.36.1",
4
4
  "description": "Angular UI component library",
5
5
  "author": "lluc_llull",
6
6
  "license": "MIT",
@@ -14,6 +14,7 @@
14
14
  "peerDependencies": {
15
15
  "@angular/common": "^22.0.0",
16
16
  "@angular/core": "^22.0.0",
17
+ "@angular/forms": "^22.0.0",
17
18
  "lucide-angular": "^0.577.0",
18
19
  "swiper": "^12.0.0",
19
20
  "three": "^0.183.0",
@@ -147,6 +148,14 @@
147
148
  "types": "./types/lluc_llull-ui-lib-footers-visual-footer.d.ts",
148
149
  "default": "./fesm2022/lluc_llull-ui-lib-footers-visual-footer.mjs"
149
150
  },
151
+ "./forms": {
152
+ "types": "./types/lluc_llull-ui-lib-forms.d.ts",
153
+ "default": "./fesm2022/lluc_llull-ui-lib-forms.mjs"
154
+ },
155
+ "./forms/contact-form": {
156
+ "types": "./types/lluc_llull-ui-lib-forms-contact-form.d.ts",
157
+ "default": "./fesm2022/lluc_llull-ui-lib-forms-contact-form.mjs"
158
+ },
150
159
  "./headers": {
151
160
  "types": "./types/lluc_llull-ui-lib-headers.d.ts",
152
161
  "default": "./fesm2022/lluc_llull-ui-lib-headers.mjs"
@@ -191,10 +191,6 @@ ul {
191
191
  }
192
192
 
193
193
  .debug-grid-overlay {
194
- display: none;
195
- }
196
-
197
- body.show-grid .debug-grid-overlay {
198
194
  position: fixed !important;
199
195
  inset-block: 0;
200
196
  left: 50%;
@@ -207,14 +203,119 @@ body.show-grid .debug-grid-overlay {
207
203
  grid-template-columns: repeat(12, 1fr);
208
204
  column-gap: 1.5rem;
209
205
  }
210
- body.show-grid .debug-grid-overlay div {
206
+ .debug-grid-overlay div {
211
207
  height: 100%;
212
208
  background-color: rgba(255, 0, 0, 0.13);
213
209
  }
210
+ .debug-grid-overlay {
211
+ visibility: hidden;
212
+ opacity: 0;
213
+ transition: opacity 160ms ease-out, visibility 0s linear 520ms;
214
+ }
215
+ .debug-grid-overlay div {
216
+ transform: scaleY(0);
217
+ transform-origin: top;
218
+ transition: transform 360ms cubic-bezier(0.25, 1, 0.5, 1);
219
+ }
220
+ .debug-grid-overlay div:nth-child(1) {
221
+ transition-delay: 154ms;
222
+ }
223
+ .debug-grid-overlay div:nth-child(2) {
224
+ transition-delay: 140ms;
225
+ }
226
+ .debug-grid-overlay div:nth-child(3) {
227
+ transition-delay: 126ms;
228
+ }
229
+ .debug-grid-overlay div:nth-child(4) {
230
+ transition-delay: 112ms;
231
+ }
232
+ .debug-grid-overlay div:nth-child(5) {
233
+ transition-delay: 98ms;
234
+ }
235
+ .debug-grid-overlay div:nth-child(6) {
236
+ transition-delay: 84ms;
237
+ }
238
+ .debug-grid-overlay div:nth-child(7) {
239
+ transition-delay: 70ms;
240
+ }
241
+ .debug-grid-overlay div:nth-child(8) {
242
+ transition-delay: 56ms;
243
+ }
244
+ .debug-grid-overlay div:nth-child(9) {
245
+ transition-delay: 42ms;
246
+ }
247
+ .debug-grid-overlay div:nth-child(10) {
248
+ transition-delay: 28ms;
249
+ }
250
+ .debug-grid-overlay div:nth-child(11) {
251
+ transition-delay: 14ms;
252
+ }
253
+ .debug-grid-overlay div:nth-child(12) {
254
+ transition-delay: 0ms;
255
+ }
256
+
214
257
  body.show-grid .debug-grid-overlay {
215
- display: grid !important;
258
+ visibility: visible;
259
+ opacity: 1;
260
+ transition: opacity 160ms ease-out, visibility 0s;
261
+ }
262
+ body.show-grid .debug-grid-overlay div:nth-child(1) {
263
+ transform: scaleY(1);
264
+ transition-delay: 0ms;
265
+ }
266
+ body.show-grid .debug-grid-overlay div:nth-child(2) {
267
+ transform: scaleY(1);
268
+ transition-delay: 14ms;
269
+ }
270
+ body.show-grid .debug-grid-overlay div:nth-child(3) {
271
+ transform: scaleY(1);
272
+ transition-delay: 28ms;
273
+ }
274
+ body.show-grid .debug-grid-overlay div:nth-child(4) {
275
+ transform: scaleY(1);
276
+ transition-delay: 42ms;
277
+ }
278
+ body.show-grid .debug-grid-overlay div:nth-child(5) {
279
+ transform: scaleY(1);
280
+ transition-delay: 56ms;
281
+ }
282
+ body.show-grid .debug-grid-overlay div:nth-child(6) {
283
+ transform: scaleY(1);
284
+ transition-delay: 70ms;
285
+ }
286
+ body.show-grid .debug-grid-overlay div:nth-child(7) {
287
+ transform: scaleY(1);
288
+ transition-delay: 84ms;
289
+ }
290
+ body.show-grid .debug-grid-overlay div:nth-child(8) {
291
+ transform: scaleY(1);
292
+ transition-delay: 98ms;
293
+ }
294
+ body.show-grid .debug-grid-overlay div:nth-child(9) {
295
+ transform: scaleY(1);
296
+ transition-delay: 112ms;
297
+ }
298
+ body.show-grid .debug-grid-overlay div:nth-child(10) {
299
+ transform: scaleY(1);
300
+ transition-delay: 126ms;
301
+ }
302
+ body.show-grid .debug-grid-overlay div:nth-child(11) {
303
+ transform: scaleY(1);
304
+ transition-delay: 140ms;
305
+ }
306
+ body.show-grid .debug-grid-overlay div:nth-child(12) {
307
+ transform: scaleY(1);
308
+ transition-delay: 154ms;
216
309
  }
217
310
 
311
+ @media (prefers-reduced-motion: reduce) {
312
+ .debug-grid-overlay,
313
+ .debug-grid-overlay div,
314
+ body.show-grid .debug-grid-overlay {
315
+ transition-duration: 1ms;
316
+ transition-delay: 0ms;
317
+ }
318
+ }
218
319
  .main-grid {
219
320
  display: grid;
220
321
  grid-template-columns: repeat(12, minmax(0, 1fr));
package/styles/main.css CHANGED
@@ -191,10 +191,6 @@ ul {
191
191
  }
192
192
 
193
193
  .debug-grid-overlay {
194
- display: none;
195
- }
196
-
197
- body.show-grid .debug-grid-overlay {
198
194
  position: fixed !important;
199
195
  inset-block: 0;
200
196
  left: 50%;
@@ -207,14 +203,119 @@ body.show-grid .debug-grid-overlay {
207
203
  grid-template-columns: repeat(12, 1fr);
208
204
  column-gap: 1.5rem;
209
205
  }
210
- body.show-grid .debug-grid-overlay div {
206
+ .debug-grid-overlay div {
211
207
  height: 100%;
212
208
  background-color: rgba(255, 0, 0, 0.13);
213
209
  }
210
+ .debug-grid-overlay {
211
+ visibility: hidden;
212
+ opacity: 0;
213
+ transition: opacity 160ms ease-out, visibility 0s linear 520ms;
214
+ }
215
+ .debug-grid-overlay div {
216
+ transform: scaleY(0);
217
+ transform-origin: top;
218
+ transition: transform 360ms cubic-bezier(0.25, 1, 0.5, 1);
219
+ }
220
+ .debug-grid-overlay div:nth-child(1) {
221
+ transition-delay: 154ms;
222
+ }
223
+ .debug-grid-overlay div:nth-child(2) {
224
+ transition-delay: 140ms;
225
+ }
226
+ .debug-grid-overlay div:nth-child(3) {
227
+ transition-delay: 126ms;
228
+ }
229
+ .debug-grid-overlay div:nth-child(4) {
230
+ transition-delay: 112ms;
231
+ }
232
+ .debug-grid-overlay div:nth-child(5) {
233
+ transition-delay: 98ms;
234
+ }
235
+ .debug-grid-overlay div:nth-child(6) {
236
+ transition-delay: 84ms;
237
+ }
238
+ .debug-grid-overlay div:nth-child(7) {
239
+ transition-delay: 70ms;
240
+ }
241
+ .debug-grid-overlay div:nth-child(8) {
242
+ transition-delay: 56ms;
243
+ }
244
+ .debug-grid-overlay div:nth-child(9) {
245
+ transition-delay: 42ms;
246
+ }
247
+ .debug-grid-overlay div:nth-child(10) {
248
+ transition-delay: 28ms;
249
+ }
250
+ .debug-grid-overlay div:nth-child(11) {
251
+ transition-delay: 14ms;
252
+ }
253
+ .debug-grid-overlay div:nth-child(12) {
254
+ transition-delay: 0ms;
255
+ }
256
+
214
257
  body.show-grid .debug-grid-overlay {
215
- display: grid !important;
258
+ visibility: visible;
259
+ opacity: 1;
260
+ transition: opacity 160ms ease-out, visibility 0s;
261
+ }
262
+ body.show-grid .debug-grid-overlay div:nth-child(1) {
263
+ transform: scaleY(1);
264
+ transition-delay: 0ms;
265
+ }
266
+ body.show-grid .debug-grid-overlay div:nth-child(2) {
267
+ transform: scaleY(1);
268
+ transition-delay: 14ms;
269
+ }
270
+ body.show-grid .debug-grid-overlay div:nth-child(3) {
271
+ transform: scaleY(1);
272
+ transition-delay: 28ms;
273
+ }
274
+ body.show-grid .debug-grid-overlay div:nth-child(4) {
275
+ transform: scaleY(1);
276
+ transition-delay: 42ms;
277
+ }
278
+ body.show-grid .debug-grid-overlay div:nth-child(5) {
279
+ transform: scaleY(1);
280
+ transition-delay: 56ms;
281
+ }
282
+ body.show-grid .debug-grid-overlay div:nth-child(6) {
283
+ transform: scaleY(1);
284
+ transition-delay: 70ms;
285
+ }
286
+ body.show-grid .debug-grid-overlay div:nth-child(7) {
287
+ transform: scaleY(1);
288
+ transition-delay: 84ms;
289
+ }
290
+ body.show-grid .debug-grid-overlay div:nth-child(8) {
291
+ transform: scaleY(1);
292
+ transition-delay: 98ms;
293
+ }
294
+ body.show-grid .debug-grid-overlay div:nth-child(9) {
295
+ transform: scaleY(1);
296
+ transition-delay: 112ms;
297
+ }
298
+ body.show-grid .debug-grid-overlay div:nth-child(10) {
299
+ transform: scaleY(1);
300
+ transition-delay: 126ms;
301
+ }
302
+ body.show-grid .debug-grid-overlay div:nth-child(11) {
303
+ transform: scaleY(1);
304
+ transition-delay: 140ms;
305
+ }
306
+ body.show-grid .debug-grid-overlay div:nth-child(12) {
307
+ transform: scaleY(1);
308
+ transition-delay: 154ms;
216
309
  }
217
310
 
311
+ @media (prefers-reduced-motion: reduce) {
312
+ .debug-grid-overlay,
313
+ .debug-grid-overlay div,
314
+ body.show-grid .debug-grid-overlay {
315
+ transition-duration: 1ms;
316
+ transition-delay: 0ms;
317
+ }
318
+ }
218
319
  .main-grid {
219
320
  display: grid;
220
321
  grid-template-columns: repeat(12, minmax(0, 1fr));
@@ -0,0 +1,86 @@
1
+ import * as i0 from "@angular/core";
2
+ import { EventEmitter } from "@angular/core";
3
+ import { FormControl, FormGroup } from "@angular/forms";
4
+ import { UiLibImageI } from "@lluc_llull/ui-lib/interfaces";
5
+ export interface ContactFormTextsI {
6
+ title: string;
7
+ intro: string;
8
+ requiredHint: string;
9
+ name: string;
10
+ surname: string;
11
+ email: string;
12
+ phone: string;
13
+ message: string;
14
+ namePlaceholder: string;
15
+ surnamePlaceholder: string;
16
+ emailPlaceholder: string;
17
+ phonePlaceholder: string;
18
+ messagePlaceholder: string;
19
+ privacyTitle: string;
20
+ privacyResponsible: string;
21
+ privacyPurpose: string;
22
+ privacyLegalBasis: string;
23
+ privacyRecipients: string;
24
+ privacyRetention: string;
25
+ privacyRights: string;
26
+ privacyLinkLead: string;
27
+ privacyLink: string;
28
+ privacyLinkTail: string;
29
+ send: string;
30
+ sending: string;
31
+ success: string;
32
+ error: string;
33
+ deliveryNotConfigured: string;
34
+ requiredError: string;
35
+ emailError: string;
36
+ lengthError: string;
37
+ invalidError: string;
38
+ }
39
+ export interface ContactFormSubmissionI {
40
+ name: string;
41
+ surname: string;
42
+ email: string;
43
+ phone: string;
44
+ message: string;
45
+ website: string;
46
+ }
47
+ type ContactField = 'name' | 'email' | 'message';
48
+ type ContactFormStatus = 'idle' | 'sending' | 'success' | 'error';
49
+ export declare class ContactFormComponent {
50
+ texts: ContactFormTextsI;
51
+ privacyUrl: string;
52
+ img: UiLibImageI | null;
53
+ readonly messageSubmitted: EventEmitter<ContactFormSubmissionI>;
54
+ readonly status: import("@angular/core").WritableSignal<ContactFormStatus>;
55
+ readonly submissionError: import("@angular/core").WritableSignal<string>;
56
+ submitted: boolean;
57
+ readonly form: FormGroup<{
58
+ name: FormControl<string>;
59
+ surname: FormControl<string>;
60
+ email: FormControl<string>;
61
+ phone: FormControl<string>;
62
+ message: FormControl<string>;
63
+ website: FormControl<string>;
64
+ }>;
65
+ getError(field: ContactField): string;
66
+ submit(): void;
67
+ setSubmissionResult(success: boolean, errorMessage?: string): void;
68
+ static ɵfac: i0.ɵɵFactoryDeclaration<ContactFormComponent, never>;
69
+ static ɵcmp: i0.ɵɵComponentDeclaration<ContactFormComponent, "lib-contact-form", never, {
70
+ "texts": {
71
+ "alias": "texts";
72
+ "required": true;
73
+ };
74
+ "privacyUrl": {
75
+ "alias": "privacyUrl";
76
+ "required": false;
77
+ };
78
+ "img": {
79
+ "alias": "img";
80
+ "required": false;
81
+ };
82
+ }, {
83
+ "messageSubmitted": "messageSubmitted";
84
+ }, never, never, true, never>;
85
+ }
86
+ export {};
@@ -0,0 +1,220 @@
1
+ import * as i0 from "@angular/core";
2
+ import { ControlValueAccessor } from "@angular/forms";
3
+ export declare class FormFieldComponent {
4
+ controlId: string;
5
+ label: string;
6
+ required: boolean;
7
+ hint: string;
8
+ error: string;
9
+ get errorId(): string;
10
+ get hintId(): string;
11
+ static ɵfac: i0.ɵɵFactoryDeclaration<FormFieldComponent, never>;
12
+ static ɵcmp: i0.ɵɵComponentDeclaration<FormFieldComponent, "lib-form-field", never, {
13
+ "controlId": {
14
+ "alias": "controlId";
15
+ "required": true;
16
+ };
17
+ "label": {
18
+ "alias": "label";
19
+ "required": false;
20
+ };
21
+ "required": {
22
+ "alias": "required";
23
+ "required": false;
24
+ };
25
+ "hint": {
26
+ "alias": "hint";
27
+ "required": false;
28
+ };
29
+ "error": {
30
+ "alias": "error";
31
+ "required": false;
32
+ };
33
+ }, {}, never, ["*"], true, never>;
34
+ }
35
+ export type UiLibInputType = 'text' | 'email' | 'tel' | 'url' | 'search' | 'password';
36
+ export declare class FormInputComponent implements ControlValueAccessor {
37
+ id: string;
38
+ type: UiLibInputType;
39
+ placeholder: string;
40
+ autocomplete: string;
41
+ describedBy: string;
42
+ maxLength: number | null;
43
+ required: boolean;
44
+ invalid: boolean;
45
+ value: string;
46
+ disabled: boolean;
47
+ private onChange;
48
+ private onTouched;
49
+ writeValue(value: string | null): void;
50
+ registerOnChange(fn: (value: string) => void): void;
51
+ registerOnTouched(fn: () => void): void;
52
+ setDisabledState(disabled: boolean): void;
53
+ handleInput(event: Event): void;
54
+ handleBlur(): void;
55
+ static ɵfac: i0.ɵɵFactoryDeclaration<FormInputComponent, never>;
56
+ static ɵcmp: i0.ɵɵComponentDeclaration<FormInputComponent, "lib-form-input", never, {
57
+ "id": {
58
+ "alias": "id";
59
+ "required": true;
60
+ };
61
+ "type": {
62
+ "alias": "type";
63
+ "required": false;
64
+ };
65
+ "placeholder": {
66
+ "alias": "placeholder";
67
+ "required": false;
68
+ };
69
+ "autocomplete": {
70
+ "alias": "autocomplete";
71
+ "required": false;
72
+ };
73
+ "describedBy": {
74
+ "alias": "describedBy";
75
+ "required": false;
76
+ };
77
+ "maxLength": {
78
+ "alias": "maxLength";
79
+ "required": false;
80
+ };
81
+ "required": {
82
+ "alias": "required";
83
+ "required": false;
84
+ };
85
+ "invalid": {
86
+ "alias": "invalid";
87
+ "required": false;
88
+ };
89
+ }, {}, never, never, true, never>;
90
+ }
91
+ export interface UiLibSelectOptionI {
92
+ label: string;
93
+ value: string;
94
+ disabled?: boolean;
95
+ }
96
+ export declare class FormSelectComponent implements ControlValueAccessor {
97
+ id: string;
98
+ options: UiLibSelectOptionI[];
99
+ placeholder: string;
100
+ describedBy: string;
101
+ required: boolean;
102
+ invalid: boolean;
103
+ value: string;
104
+ disabled: boolean;
105
+ private onChange;
106
+ private onTouched;
107
+ writeValue(value: string | null): void;
108
+ registerOnChange(fn: (value: string) => void): void;
109
+ registerOnTouched(fn: () => void): void;
110
+ setDisabledState(disabled: boolean): void;
111
+ handleChange(event: Event): void;
112
+ handleBlur(): void;
113
+ static ɵfac: i0.ɵɵFactoryDeclaration<FormSelectComponent, never>;
114
+ static ɵcmp: i0.ɵɵComponentDeclaration<FormSelectComponent, "lib-form-select", never, {
115
+ "id": {
116
+ "alias": "id";
117
+ "required": true;
118
+ };
119
+ "options": {
120
+ "alias": "options";
121
+ "required": false;
122
+ };
123
+ "placeholder": {
124
+ "alias": "placeholder";
125
+ "required": false;
126
+ };
127
+ "describedBy": {
128
+ "alias": "describedBy";
129
+ "required": false;
130
+ };
131
+ "required": {
132
+ "alias": "required";
133
+ "required": false;
134
+ };
135
+ "invalid": {
136
+ "alias": "invalid";
137
+ "required": false;
138
+ };
139
+ }, {}, never, never, true, never>;
140
+ }
141
+ export declare class FormTextareaComponent implements ControlValueAccessor {
142
+ id: string;
143
+ placeholder: string;
144
+ describedBy: string;
145
+ rows: number;
146
+ maxLength: number | null;
147
+ required: boolean;
148
+ invalid: boolean;
149
+ showCounter: boolean;
150
+ value: string;
151
+ disabled: boolean;
152
+ private onChange;
153
+ private onTouched;
154
+ writeValue(value: string | null): void;
155
+ registerOnChange(fn: (value: string) => void): void;
156
+ registerOnTouched(fn: () => void): void;
157
+ setDisabledState(disabled: boolean): void;
158
+ handleInput(event: Event): void;
159
+ handleBlur(): void;
160
+ static ɵfac: i0.ɵɵFactoryDeclaration<FormTextareaComponent, never>;
161
+ static ɵcmp: i0.ɵɵComponentDeclaration<FormTextareaComponent, "lib-form-textarea", never, {
162
+ "id": {
163
+ "alias": "id";
164
+ "required": true;
165
+ };
166
+ "placeholder": {
167
+ "alias": "placeholder";
168
+ "required": false;
169
+ };
170
+ "describedBy": {
171
+ "alias": "describedBy";
172
+ "required": false;
173
+ };
174
+ "rows": {
175
+ "alias": "rows";
176
+ "required": false;
177
+ };
178
+ "maxLength": {
179
+ "alias": "maxLength";
180
+ "required": false;
181
+ };
182
+ "required": {
183
+ "alias": "required";
184
+ "required": false;
185
+ };
186
+ "invalid": {
187
+ "alias": "invalid";
188
+ "required": false;
189
+ };
190
+ "showCounter": {
191
+ "alias": "showCounter";
192
+ "required": false;
193
+ };
194
+ }, {}, never, never, true, never>;
195
+ }
196
+ export declare class FormToggleComponent implements ControlValueAccessor {
197
+ id: string;
198
+ describedBy: string;
199
+ checked: boolean;
200
+ disabled: boolean;
201
+ private onChange;
202
+ private onTouched;
203
+ writeValue(value: boolean | null): void;
204
+ registerOnChange(fn: (value: boolean) => void): void;
205
+ registerOnTouched(fn: () => void): void;
206
+ setDisabledState(disabled: boolean): void;
207
+ handleChange(event: Event): void;
208
+ handleBlur(): void;
209
+ static ɵfac: i0.ɵɵFactoryDeclaration<FormToggleComponent, never>;
210
+ static ɵcmp: i0.ɵɵComponentDeclaration<FormToggleComponent, "lib-form-toggle", never, {
211
+ "id": {
212
+ "alias": "id";
213
+ "required": true;
214
+ };
215
+ "describedBy": {
216
+ "alias": "describedBy";
217
+ "required": false;
218
+ };
219
+ }, {}, never, ["*"], true, never>;
220
+ }
@@ -5,6 +5,7 @@ type ComponentMapperFn = (props: any, cdn?: string) => any;
5
5
  export declare const map404: ComponentMapperFn;
6
6
  export declare const mapCategoryProgress: ComponentMapperFn;
7
7
  export declare const mapContactMinimal: ComponentMapperFn;
8
+ export declare const mapContactForm: ComponentMapperFn;
8
9
  export declare const mapHeaderClear: ComponentMapperFn;
9
10
  export declare const mapHeroSection: ComponentMapperFn;
10
11
  export declare const mapLangModal: (langs: any[], currentLang?: string) => UiLibLangItemI[];