@gestio/gds 0.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.
Files changed (71) hide show
  1. package/README.md +72 -0
  2. package/bundles/gestio-gds.umd.js +962 -0
  3. package/bundles/gestio-gds.umd.js.map +1 -0
  4. package/bundles/gestio-gds.umd.min.js +16 -0
  5. package/bundles/gestio-gds.umd.min.js.map +1 -0
  6. package/esm2015/gestio-gds.js +5 -0
  7. package/esm2015/lib/gds-button/gds-button.component.js +20 -0
  8. package/esm2015/lib/gds-button/gds-button.module.js +15 -0
  9. package/esm2015/lib/gds-input/gds-input.component.js +68 -0
  10. package/esm2015/lib/gds-input/gds-input.module.js +15 -0
  11. package/esm2015/lib/gds-label/gds-label.component.js +36 -0
  12. package/esm2015/lib/gds-label/gds-label.module.js +15 -0
  13. package/esm2015/lib/gds-selectbox/gds-selectbox.component.js +175 -0
  14. package/esm2015/lib/gds-selectbox/gds-selectbox.module.js +16 -0
  15. package/esm2015/lib/gds-textbox/gds-textbox.component.js +94 -0
  16. package/esm2015/lib/gds-textbox/gds-textbox.module.js +16 -0
  17. package/esm2015/lib/gds.component.js +19 -0
  18. package/esm2015/lib/gds.module.js +27 -0
  19. package/esm2015/lib/tokens/colors.js +201 -0
  20. package/esm2015/lib/tokens/typography.js +31 -0
  21. package/esm2015/public-api.js +18 -0
  22. package/esm5/gestio-gds.js +5 -0
  23. package/esm5/lib/gds-button/gds-button.component.js +21 -0
  24. package/esm5/lib/gds-button/gds-button.module.js +18 -0
  25. package/esm5/lib/gds-input/gds-input.component.js +69 -0
  26. package/esm5/lib/gds-input/gds-input.module.js +18 -0
  27. package/esm5/lib/gds-label/gds-label.component.js +37 -0
  28. package/esm5/lib/gds-label/gds-label.module.js +18 -0
  29. package/esm5/lib/gds-selectbox/gds-selectbox.component.js +180 -0
  30. package/esm5/lib/gds-selectbox/gds-selectbox.module.js +19 -0
  31. package/esm5/lib/gds-textbox/gds-textbox.component.js +96 -0
  32. package/esm5/lib/gds-textbox/gds-textbox.module.js +19 -0
  33. package/esm5/lib/gds.component.js +17 -0
  34. package/esm5/lib/gds.module.js +30 -0
  35. package/esm5/lib/tokens/colors.js +185 -0
  36. package/esm5/lib/tokens/typography.js +31 -0
  37. package/esm5/public-api.js +18 -0
  38. package/fesm2015/gestio-gds.js +704 -0
  39. package/fesm2015/gestio-gds.js.map +1 -0
  40. package/fesm5/gestio-gds.js +713 -0
  41. package/fesm5/gestio-gds.js.map +1 -0
  42. package/gestio-gds.d.ts +4 -0
  43. package/gestio-gds.metadata.json +1 -0
  44. package/lib/gds-button/gds-button.component.d.ts +6 -0
  45. package/lib/gds-button/gds-button.module.d.ts +2 -0
  46. package/lib/gds-input/gds-input.component.d.ts +17 -0
  47. package/lib/gds-input/gds-input.module.d.ts +2 -0
  48. package/lib/gds-label/gds-label.component.d.ts +8 -0
  49. package/lib/gds-label/gds-label.module.d.ts +2 -0
  50. package/lib/gds-selectbox/gds-selectbox.component.d.ts +40 -0
  51. package/lib/gds-selectbox/gds-selectbox.module.d.ts +2 -0
  52. package/lib/gds-textbox/gds-textbox.component.d.ts +23 -0
  53. package/lib/gds-textbox/gds-textbox.module.d.ts +2 -0
  54. package/lib/gds.component.d.ts +5 -0
  55. package/lib/gds.module.d.ts +2 -0
  56. package/lib/tokens/colors.d.ts +17 -0
  57. package/lib/tokens/typography.d.ts +21 -0
  58. package/package.json +21 -0
  59. package/public-api.d.ts +14 -0
  60. package/src/lib/styles/tokens/colors.css +170 -0
  61. package/src/lib/styles/tokens/elevation.css +13 -0
  62. package/src/lib/styles/tokens/index.css +6 -0
  63. package/src/lib/styles/tokens/radius.css +0 -0
  64. package/src/lib/styles/tokens/semantic/colors.css +35 -0
  65. package/src/lib/styles/tokens/spacing.css +0 -0
  66. package/src/lib/styles/tokens/typography.css +115 -0
  67. package/src/lib/styles/utilities/line-counter.scss +29 -0
  68. package/src/lib/styles.scss +5 -0
  69. package/src/lib/tokens/colors.ts +216 -0
  70. package/src/lib/tokens/elevation.ts +13 -0
  71. package/src/lib/tokens/typography.ts +33 -0
@@ -0,0 +1,704 @@
1
+ import { __decorate } from 'tslib';
2
+ import { Input, Component, NgModule, EventEmitter, Output, ChangeDetectionStrategy, forwardRef, ElementRef, ChangeDetectorRef, HostListener } from '@angular/core';
3
+ import { CommonModule } from '@angular/common';
4
+ import { NG_VALUE_ACCESSOR } from '@angular/forms';
5
+
6
+ let GdsButtonComponent = class GdsButtonComponent {
7
+ constructor() {
8
+ this.variant = 'primary';
9
+ }
10
+ ngOnInit() { }
11
+ };
12
+ __decorate([
13
+ Input()
14
+ ], GdsButtonComponent.prototype, "variant", void 0);
15
+ GdsButtonComponent = __decorate([
16
+ Component({
17
+ selector: 'gds-button',
18
+ template: "<button class=\"gds-button\" [ngClass]=\"variant\">\n <ng-content></ng-content>\n</button>\n",
19
+ styles: ["", ".gds-button{padding:10px 16px;border-radius:8px;border:none;font-family:var(--gds-font-primary,Inter);font-weight:600;cursor:pointer}.gds-button.primary{background:var(--gds-primary);color:#fff}.gds-button.secondary{background:var(--gds-secondary);color:#fff}.gds-button.tertiary{background:var(--gds-tertiary);color:#fff}"]
20
+ })
21
+ ], GdsButtonComponent);
22
+
23
+ let GdsButtonModule = class GdsButtonModule {
24
+ };
25
+ GdsButtonModule = __decorate([
26
+ NgModule({
27
+ declarations: [GdsButtonComponent],
28
+ imports: [CommonModule],
29
+ exports: [GdsButtonComponent],
30
+ })
31
+ ], GdsButtonModule);
32
+
33
+ let GdsInputComponent = class GdsInputComponent {
34
+ constructor() {
35
+ this.id = '';
36
+ this.placeholder = '';
37
+ this.type = 'text';
38
+ this.size = 'md';
39
+ this.disabled = false;
40
+ this.invalid = false;
41
+ this.value = '';
42
+ this.input = new EventEmitter();
43
+ this.focus = new EventEmitter();
44
+ this.blur = new EventEmitter();
45
+ this.isFocused = false;
46
+ }
47
+ onInput(event) {
48
+ this.input.emit(event);
49
+ }
50
+ onFocus() {
51
+ this.isFocused = true;
52
+ this.focus.emit();
53
+ }
54
+ onBlur() {
55
+ this.isFocused = false;
56
+ this.blur.emit();
57
+ }
58
+ };
59
+ __decorate([
60
+ Input()
61
+ ], GdsInputComponent.prototype, "id", void 0);
62
+ __decorate([
63
+ Input()
64
+ ], GdsInputComponent.prototype, "placeholder", void 0);
65
+ __decorate([
66
+ Input()
67
+ ], GdsInputComponent.prototype, "type", void 0);
68
+ __decorate([
69
+ Input()
70
+ ], GdsInputComponent.prototype, "size", void 0);
71
+ __decorate([
72
+ Input()
73
+ ], GdsInputComponent.prototype, "disabled", void 0);
74
+ __decorate([
75
+ Input()
76
+ ], GdsInputComponent.prototype, "invalid", void 0);
77
+ __decorate([
78
+ Input()
79
+ ], GdsInputComponent.prototype, "value", void 0);
80
+ __decorate([
81
+ Output()
82
+ ], GdsInputComponent.prototype, "input", void 0);
83
+ __decorate([
84
+ Output()
85
+ ], GdsInputComponent.prototype, "focus", void 0);
86
+ __decorate([
87
+ Output()
88
+ ], GdsInputComponent.prototype, "blur", void 0);
89
+ GdsInputComponent = __decorate([
90
+ Component({
91
+ selector: 'gds-input',
92
+ template: "<div\n class=\"gds-input-container\"\n [class.gds-input--invalid]=\"invalid\"\n [class.gds-input--disabled]=\"disabled\"\n [class.gds-input--focused]=\"isFocused\"\n [class.gds-input--sm]=\"size === 'sm'\"\n [class.gds-input--md]=\"size === 'md'\"\n [class.gds-input--lg]=\"size === 'lg'\"\n>\n <input\n [id]=\"id\"\n [type]=\"type\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n [value]=\"value\"\n class=\"gds-input\"\n [attr.aria-invalid]=\"invalid\"\n (input)=\"onInput($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n />\n</div>\n",
93
+ changeDetection: ChangeDetectionStrategy.OnPush,
94
+ styles: [".gds-input-container{display:flex;flex-direction:column;width:100%}.gds-input-container.gds-input--invalid .gds-input{border-color:var(--danger)}.gds-input-container.gds-input--invalid .gds-input:focus{border-color:var(--danger);box-shadow:0 0 0 3px rgba(216,44,13,.1)}.gds-input-container.gds-input--disabled .gds-input{opacity:.6;cursor:not-allowed;background-color:var(--bg-disabled)}.gds-input-container.gds-input--focused .gds-input{border-color:var(--primary);box-shadow:0 0 0 3px rgba(28,103,244,.1)}.gds-input-container.gds-input--focused.gds-input--invalid .gds-input{border-color:var(--danger);box-shadow:0 0 0 3px rgba(216,44,13,.1)}.gds-input-container.gds-input--sm .gds-input{height:32px;padding:0 12px;font-size:14px}.gds-input-container.gds-input--md .gds-input{height:40px;padding:0 12px;font-size:14px}.gds-input-container.gds-input--lg .gds-input{height:48px;padding:0 12px;font-size:14px}.gds-input{width:100%;border:1px solid var(--gds-neutral-300);border-radius:6px;height:40px;padding:0 12px;font-size:14px;line-height:1;color:var(--text-foreground);background-color:var(--bg-surface);transition:.2s;box-sizing:border-box;font-family:inherit}.gds-input::-moz-placeholder{color:var(--text-foreground);opacity:.5}.gds-input::placeholder{color:var(--text-foreground);opacity:.5}.gds-input:hover:not(:disabled){border-color:var(--gds-neutral-400)}.gds-input:focus{outline:0;border-color:var(--primary);box-shadow:0 0 0 3px rgba(28,103,244,.1)}.gds-input:disabled{opacity:.6;cursor:not-allowed;background-color:var(--bg-disabled)}"]
95
+ })
96
+ ], GdsInputComponent);
97
+
98
+ let GdsInputModule = class GdsInputModule {
99
+ };
100
+ GdsInputModule = __decorate([
101
+ NgModule({
102
+ declarations: [GdsInputComponent],
103
+ imports: [CommonModule],
104
+ exports: [GdsInputComponent],
105
+ })
106
+ ], GdsInputModule);
107
+
108
+ let GdsLabelComponent = class GdsLabelComponent {
109
+ constructor() {
110
+ this.required = false;
111
+ this.error = false;
112
+ this.disabled = false;
113
+ this.size = 'md';
114
+ }
115
+ ngOnInit() { }
116
+ };
117
+ __decorate([
118
+ Input()
119
+ ], GdsLabelComponent.prototype, "for", void 0);
120
+ __decorate([
121
+ Input()
122
+ ], GdsLabelComponent.prototype, "required", void 0);
123
+ __decorate([
124
+ Input()
125
+ ], GdsLabelComponent.prototype, "error", void 0);
126
+ __decorate([
127
+ Input()
128
+ ], GdsLabelComponent.prototype, "disabled", void 0);
129
+ __decorate([
130
+ Input()
131
+ ], GdsLabelComponent.prototype, "size", void 0);
132
+ GdsLabelComponent = __decorate([
133
+ Component({
134
+ selector: 'gds-label',
135
+ template: "<label\n class=\"gds-label\"\n [class.gds-label--disabled]=\"disabled\"\n [class.gds-label--sm]=\"size === 'sm'\"\n [class.gds-label--md]=\"size === 'md'\"\n [class.gds-label--lg]=\"size === 'lg'\"\n [class.gds-label--error]=\"error || required\"\n [attr.for]=\"for\"\n>\n <ng-content></ng-content>\n\n <span *ngIf=\"required\" class=\"gds-label__required\">*</span>\n</label>\n",
136
+ changeDetection: ChangeDetectionStrategy.OnPush,
137
+ styles: [".gds-label{display:inline-flex;align-items:center;gap:4px;font-weight:var(--font-weight-medium);font-size:.875rem;line-height:calc(1.25 / .875);color:var(--gds-neutral-400);cursor:pointer}.gds-label__required{color:var(--gds-red-500);font-size:.875em}.gds-label--error{color:var(--gds-red-500)}.gds-label--disabled{opacity:.6;cursor:not-allowed}.gds-label--sm{font-size:.75rem;line-height:calc(1.25 / .75)}.gds-label--md{font-size:.875rem;line-height:calc(1.25 / .875)}.gds-label--lg{font-size:1rem;line-height:1.25}"]
138
+ })
139
+ ], GdsLabelComponent);
140
+
141
+ let GdsLabelModule = class GdsLabelModule {
142
+ };
143
+ GdsLabelModule = __decorate([
144
+ NgModule({
145
+ declarations: [GdsLabelComponent],
146
+ imports: [CommonModule],
147
+ exports: [GdsLabelComponent],
148
+ })
149
+ ], GdsLabelModule);
150
+
151
+ var GdsTextboxComponent_1;
152
+ let GdsTextboxComponent = GdsTextboxComponent_1 = class GdsTextboxComponent {
153
+ constructor() {
154
+ this.label = '';
155
+ this.placeholder = '';
156
+ this.required = false;
157
+ this.disabled = false;
158
+ this.error = false;
159
+ this.errorMessage = '';
160
+ this.helperText = '';
161
+ this.type = 'text';
162
+ this.id = `gds-textbox-${Math.random().toString(36).substr(2, 9)}`;
163
+ this.size = 'md';
164
+ this.value = '';
165
+ this.isFocused = false;
166
+ this.onChange = (value) => { };
167
+ this.onTouched = () => { };
168
+ }
169
+ onInput(event) {
170
+ const target = event.target;
171
+ this.value = target.value;
172
+ this.onChange(this.value);
173
+ }
174
+ onFocus() {
175
+ this.isFocused = true;
176
+ }
177
+ onBlur() {
178
+ this.isFocused = false;
179
+ this.onTouched();
180
+ }
181
+ // ControlValueAccessor implementation
182
+ writeValue(value) {
183
+ this.value = value || '';
184
+ }
185
+ registerOnChange(fn) {
186
+ this.onChange = fn;
187
+ }
188
+ registerOnTouched(fn) {
189
+ this.onTouched = fn;
190
+ }
191
+ setDisabledState(isDisabled) {
192
+ this.disabled = isDisabled;
193
+ }
194
+ };
195
+ __decorate([
196
+ Input()
197
+ ], GdsTextboxComponent.prototype, "label", void 0);
198
+ __decorate([
199
+ Input()
200
+ ], GdsTextboxComponent.prototype, "placeholder", void 0);
201
+ __decorate([
202
+ Input()
203
+ ], GdsTextboxComponent.prototype, "required", void 0);
204
+ __decorate([
205
+ Input()
206
+ ], GdsTextboxComponent.prototype, "disabled", void 0);
207
+ __decorate([
208
+ Input()
209
+ ], GdsTextboxComponent.prototype, "error", void 0);
210
+ __decorate([
211
+ Input()
212
+ ], GdsTextboxComponent.prototype, "errorMessage", void 0);
213
+ __decorate([
214
+ Input()
215
+ ], GdsTextboxComponent.prototype, "helperText", void 0);
216
+ __decorate([
217
+ Input()
218
+ ], GdsTextboxComponent.prototype, "type", void 0);
219
+ __decorate([
220
+ Input()
221
+ ], GdsTextboxComponent.prototype, "id", void 0);
222
+ __decorate([
223
+ Input()
224
+ ], GdsTextboxComponent.prototype, "size", void 0);
225
+ GdsTextboxComponent = GdsTextboxComponent_1 = __decorate([
226
+ Component({
227
+ selector: 'gds-textbox',
228
+ template: "<div class=\"gds-textbox\">\n <!-- Label -->\n <gds-label\n [for]=\"id\"\n [size]=\"size\"\n [required]=\"required\"\n [disabled]=\"disabled\"\n [error]=\"error\"\n *ngIf=\"label\"\n >\n {{ label }}\n </gds-label>\n\n <!-- Input Field -->\n <gds-input\n [id]=\"id\"\n [type]=\"type\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n [invalid]=\"error\"\n [size]=\"size\"\n [value]=\"value\"\n (input)=\"onInput($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n ></gds-input>\n\n <div\n *ngIf=\"helperText || errorMessage\"\n [id]=\"id + '-description'\"\n class=\"gds-textbox__description\"\n [class.gds-textbox__description--error]=\"error && errorMessage\"\n >\n {{ error && errorMessage ? errorMessage : helperText }}\n </div>\n</div>\n",
229
+ changeDetection: ChangeDetectionStrategy.OnPush,
230
+ providers: [
231
+ {
232
+ provide: NG_VALUE_ACCESSOR,
233
+ useExisting: forwardRef(() => GdsTextboxComponent_1),
234
+ multi: true,
235
+ },
236
+ ],
237
+ styles: [".gds-textbox{display:flex;flex-direction:column;width:100%;gap:4px}.gds-textbox__description{font-size:.75rem;color:var(--gds-neutral-400)}.gds-textbox__description--error{color:var(--gds-red-500)}.gds-textbox__error-icon{margin-right:4px;color:var(--gds-red-500)}"]
238
+ })
239
+ ], GdsTextboxComponent);
240
+
241
+ let GdsTextboxModule = class GdsTextboxModule {
242
+ };
243
+ GdsTextboxModule = __decorate([
244
+ NgModule({
245
+ declarations: [GdsTextboxComponent],
246
+ imports: [CommonModule, GdsLabelModule, GdsInputModule],
247
+ exports: [GdsTextboxComponent],
248
+ })
249
+ ], GdsTextboxModule);
250
+
251
+ var GdsSelectboxComponent_1;
252
+ let GdsSelectboxComponent = GdsSelectboxComponent_1 = class GdsSelectboxComponent {
253
+ constructor(elementRef, cdr) {
254
+ this.elementRef = elementRef;
255
+ this.cdr = cdr;
256
+ this.label = '';
257
+ this.placeholder = 'Selecione...';
258
+ this.required = false;
259
+ this.disabled = false;
260
+ this.error = false;
261
+ this.errorMessage = '';
262
+ this.helperText = '';
263
+ this.id = `gds-selectbox-${Math.random().toString(36).substr(2, 9)}`;
264
+ this.size = 'md';
265
+ this.options = [];
266
+ this.searchTerm = '';
267
+ this.selectedValue = null;
268
+ this.isOpen = false;
269
+ this.isFocused = false;
270
+ this.filteredOptions = [];
271
+ this.onChange = (value) => { };
272
+ this.onTouched = () => { };
273
+ }
274
+ ngOnInit() {
275
+ this.filteredOptions = [...this.options];
276
+ }
277
+ onSearchInput(event) {
278
+ const target = event.target;
279
+ this.searchTerm = target.value;
280
+ this.filterOptions();
281
+ }
282
+ filterOptions() {
283
+ if (!this.searchTerm) {
284
+ this.filteredOptions = [...this.options];
285
+ }
286
+ else {
287
+ const term = this.searchTerm.toLowerCase();
288
+ this.filteredOptions = this.options.filter((option) => option.display.toLowerCase().includes(term));
289
+ }
290
+ this.cdr.markForCheck();
291
+ }
292
+ toggleDropdown() {
293
+ if (!this.disabled) {
294
+ this.isOpen = !this.isOpen;
295
+ if (this.isOpen) {
296
+ this.filterOptions();
297
+ }
298
+ this.cdr.markForCheck();
299
+ }
300
+ }
301
+ clearSelection() {
302
+ this.selectedValue = null;
303
+ this.searchTerm = '';
304
+ this.isOpen = false;
305
+ this.onChange(null);
306
+ this.cdr.markForCheck();
307
+ }
308
+ selectOption(option) {
309
+ this.selectedValue = option.value;
310
+ this.searchTerm = option.display;
311
+ this.isOpen = false;
312
+ this.onChange(this.selectedValue);
313
+ this.cdr.markForCheck();
314
+ }
315
+ onFocus() {
316
+ this.isFocused = true;
317
+ this.isOpen = true;
318
+ this.cdr.markForCheck();
319
+ }
320
+ onBlur() {
321
+ setTimeout(() => {
322
+ this.isFocused = false;
323
+ this.isOpen = false;
324
+ this.onTouched();
325
+ // Restaura o display da opção selecionada se o searchTerm não corresponder
326
+ if (this.selectedValue !== null) {
327
+ const selected = this.options.find((opt) => opt.value === this.selectedValue);
328
+ if (selected) {
329
+ this.searchTerm = selected.display;
330
+ }
331
+ }
332
+ else {
333
+ this.searchTerm = '';
334
+ }
335
+ this.cdr.markForCheck();
336
+ }, 200);
337
+ }
338
+ onClickOutside(event) {
339
+ if (!this.elementRef.nativeElement.contains(event.target)) {
340
+ this.isOpen = false;
341
+ this.cdr.markForCheck();
342
+ }
343
+ }
344
+ // ControlValueAccessor implementation
345
+ writeValue(value) {
346
+ this.selectedValue = value;
347
+ if (value !== null && value !== undefined) {
348
+ const selected = this.options.find((opt) => opt.value === value);
349
+ if (selected) {
350
+ this.searchTerm = selected.display;
351
+ }
352
+ }
353
+ else {
354
+ this.searchTerm = '';
355
+ }
356
+ this.cdr.markForCheck();
357
+ }
358
+ registerOnChange(fn) {
359
+ this.onChange = fn;
360
+ }
361
+ registerOnTouched(fn) {
362
+ this.onTouched = fn;
363
+ }
364
+ setDisabledState(isDisabled) {
365
+ this.disabled = isDisabled;
366
+ this.cdr.markForCheck();
367
+ }
368
+ };
369
+ GdsSelectboxComponent.ctorParameters = () => [
370
+ { type: ElementRef },
371
+ { type: ChangeDetectorRef }
372
+ ];
373
+ __decorate([
374
+ Input()
375
+ ], GdsSelectboxComponent.prototype, "label", void 0);
376
+ __decorate([
377
+ Input()
378
+ ], GdsSelectboxComponent.prototype, "placeholder", void 0);
379
+ __decorate([
380
+ Input()
381
+ ], GdsSelectboxComponent.prototype, "required", void 0);
382
+ __decorate([
383
+ Input()
384
+ ], GdsSelectboxComponent.prototype, "disabled", void 0);
385
+ __decorate([
386
+ Input()
387
+ ], GdsSelectboxComponent.prototype, "error", void 0);
388
+ __decorate([
389
+ Input()
390
+ ], GdsSelectboxComponent.prototype, "errorMessage", void 0);
391
+ __decorate([
392
+ Input()
393
+ ], GdsSelectboxComponent.prototype, "helperText", void 0);
394
+ __decorate([
395
+ Input()
396
+ ], GdsSelectboxComponent.prototype, "id", void 0);
397
+ __decorate([
398
+ Input()
399
+ ], GdsSelectboxComponent.prototype, "size", void 0);
400
+ __decorate([
401
+ Input()
402
+ ], GdsSelectboxComponent.prototype, "options", void 0);
403
+ __decorate([
404
+ HostListener('document:click', ['$event'])
405
+ ], GdsSelectboxComponent.prototype, "onClickOutside", null);
406
+ GdsSelectboxComponent = GdsSelectboxComponent_1 = __decorate([
407
+ Component({
408
+ selector: 'gds-selectbox',
409
+ template: "<div class=\"gds-selectbox\">\n <!-- Label -->\n <gds-label\n [for]=\"id\"\n [size]=\"size\"\n [required]=\"required\"\n [disabled]=\"disabled\"\n [error]=\"error\"\n *ngIf=\"label\"\n >\n {{ label }}\n </gds-label>\n\n <!-- Select Input -->\n <div\n class=\"gds-selectbox__control\"\n [class.gds-selectbox__control--open]=\"isOpen\"\n [class.gds-selectbox__control--error]=\"error\"\n [class.gds-selectbox__control--disabled]=\"disabled\"\n [class.gds-selectbox__control--sm]=\"size === 'sm'\"\n [class.gds-selectbox__control--md]=\"size === 'md'\"\n [class.gds-selectbox__control--lg]=\"size === 'lg'\"\n >\n <input\n [id]=\"id\"\n type=\"text\"\n class=\"gds-selectbox__input\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n [value]=\"searchTerm\"\n (input)=\"onSearchInput($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n autocomplete=\"off\"\n />\n <button\n type=\"button\"\n class=\"gds-selectbox__clear\"\n *ngIf=\"selectedValue !== null && !disabled\"\n (click)=\"clearSelection()\"\n tabindex=\"-1\"\n title=\"Limpar sele\u00E7\u00E3o\"\n >\n <svg\n class=\"gds-selectbox__clear-icon\"\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <circle cx=\"8\" cy=\"8\" r=\"7\" stroke=\"currentColor\" stroke-width=\"1.5\" />\n <path\n d=\"M10.5 5.5L5.5 10.5M5.5 5.5L10.5 10.5\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n />\n </svg>\n </button>\n <button\n type=\"button\"\n class=\"gds-selectbox__toggle\"\n [disabled]=\"disabled\"\n (click)=\"toggleDropdown()\"\n tabindex=\"-1\"\n >\n <svg\n class=\"gds-selectbox__icon\"\n [class.gds-selectbox__icon--open]=\"isOpen\"\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M5 7.5L10 12.5L15 7.5\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n </button>\n </div>\n\n <!-- Dropdown -->\n <div class=\"gds-selectbox__dropdown\" *ngIf=\"isOpen\">\n <div class=\"gds-selectbox__options\">\n <div\n *ngFor=\"let option of filteredOptions\"\n class=\"gds-selectbox__option\"\n [class.gds-selectbox__option--selected]=\"option.value === selectedValue\"\n (click)=\"selectOption(option)\"\n >\n {{ option.display }}\n </div>\n <div\n *ngIf=\"filteredOptions.length === 0\"\n class=\"gds-selectbox__option gds-selectbox__option--empty\"\n >\n Nenhum resultado encontrado\n </div>\n </div>\n </div>\n\n <!-- Helper Text / Error Message -->\n <div\n *ngIf=\"helperText || errorMessage\"\n [id]=\"id + '-description'\"\n class=\"gds-selectbox__description\"\n [class.gds-selectbox__description--error]=\"error && errorMessage\"\n >\n {{ error && errorMessage ? errorMessage : helperText }}\n </div>\n</div>\n",
410
+ changeDetection: ChangeDetectionStrategy.OnPush,
411
+ providers: [
412
+ {
413
+ provide: NG_VALUE_ACCESSOR,
414
+ useExisting: forwardRef(() => GdsSelectboxComponent_1),
415
+ multi: true,
416
+ },
417
+ ],
418
+ styles: [".gds-selectbox{position:relative;width:100%;display:flex;flex-direction:column;gap:4px}.gds-selectbox__control{position:relative;display:flex;align-items:center;background-color:var(--bg-surface);border:1px solid var(--gds-neutral-300);border-radius:6px;transition:.2s}.gds-selectbox__control:hover:not(.gds-selectbox__control--disabled){border-color:var(--gds-neutral-400)}.gds-selectbox__control--open,.gds-selectbox__control:focus-within{border-color:var(--primary);box-shadow:0 0 0 3px rgba(28,103,244,.1)}.gds-selectbox__control--error{border-color:var(--danger)}.gds-selectbox__control--error:focus-within{box-shadow:0 0 0 3px rgba(216,44,13,.1)}.gds-selectbox__control--disabled{background-color:var(--bg-disabled);cursor:not-allowed;opacity:.6}.gds-selectbox__control--sm{height:32px}.gds-selectbox__control--md{height:40px}.gds-selectbox__control--lg{height:48px}.gds-selectbox__input{flex:1;border:none;outline:0;background:0 0;padding:0 12px;font-size:14px;color:var(--text-foreground);font-family:inherit}.gds-selectbox__input::-moz-placeholder{color:var(--text-foreground)}.gds-selectbox__input::placeholder{color:var(--text-foreground)}.gds-selectbox__input:disabled{cursor:not-allowed}.gds-selectbox__clear{display:flex;align-items:center;justify-content:center;padding:0 4px;border:none;background:0 0;cursor:pointer;color:var(--text-foreground);opacity:.7;transition:color .2s}.gds-selectbox__clear:hover{opacity:1}.gds-selectbox__clear-icon{width:16px;height:16px}.gds-selectbox__toggle{display:flex;align-items:center;justify-content:center;padding:0 8px;border:none;background:0 0;cursor:pointer;color:var(--text-foreground);transition:color .2s}.gds-selectbox__toggle:hover:not(:disabled){color:var(--text-foreground)}.gds-selectbox__toggle:disabled{cursor:not-allowed}.gds-selectbox__icon{transition:transform .2s}.gds-selectbox__icon--open{transform:rotate(180deg)}.gds-selectbox__dropdown{position:absolute;top:calc(100% + 4px);left:0;right:0;z-index:1000;background-color:var(--bg-surface);border:1px solid var(--gds-neutral-300);border-radius:6px;box-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -1px rgba(0,0,0,.06);max-height:300px;overflow:hidden}.gds-selectbox__options{max-height:300px;overflow-y:auto}.gds-selectbox__option{padding:10px 12px;cursor:pointer;font-size:14px;color:var(--text-foreground);transition:background-color .15s}.gds-selectbox__option:hover{background-color:var(--bg-muted)}.gds-selectbox__option--selected{background-color:var(--gds-brand-100);color:var(--primary);font-weight:500}.gds-selectbox__option--selected:hover{background-color:var(--gds-brand-200)}.gds-selectbox__option--empty{color:var(--text-muted);cursor:default;font-style:italic}.gds-selectbox__option--empty:hover{background-color:transparent}.gds-selectbox__description{margin-top:6px;font-size:12px;color:var(--text-muted)}.gds-selectbox__description--error{color:var(--danger)}"]
419
+ })
420
+ ], GdsSelectboxComponent);
421
+
422
+ let GdsSelectboxModule = class GdsSelectboxModule {
423
+ };
424
+ GdsSelectboxModule = __decorate([
425
+ NgModule({
426
+ declarations: [GdsSelectboxComponent],
427
+ imports: [CommonModule, GdsLabelModule],
428
+ exports: [GdsSelectboxComponent],
429
+ })
430
+ ], GdsSelectboxModule);
431
+
432
+ let GdsComponent = class GdsComponent {
433
+ constructor() { }
434
+ ngOnInit() {
435
+ }
436
+ };
437
+ GdsComponent = __decorate([
438
+ Component({
439
+ selector: 'lib-gds',
440
+ template: `
441
+ <p>
442
+ gds works!
443
+ </p>
444
+ `
445
+ })
446
+ ], GdsComponent);
447
+
448
+ let GdsModule = class GdsModule {
449
+ };
450
+ GdsModule = __decorate([
451
+ NgModule({
452
+ declarations: [GdsComponent],
453
+ imports: [
454
+ CommonModule,
455
+ GdsButtonModule,
456
+ GdsInputModule,
457
+ GdsLabelModule,
458
+ GdsTextboxModule,
459
+ GdsSelectboxModule,
460
+ ],
461
+ exports: [GdsComponent],
462
+ })
463
+ ], GdsModule);
464
+
465
+ // BASE COLORS
466
+ const BASE_COLORS = ['gestio-dark', 'gestio-light'];
467
+ // PRIMARY COLORS
468
+ const PRIMARY_COLORS = [
469
+ 'primary',
470
+ 'gestio-primary',
471
+ 'gestio-primary-hover',
472
+ ];
473
+ // SECONDARY COLORS
474
+ const SECONDARY_COLORS = ['gestio-secondary'];
475
+ // TERTIARY COLORS
476
+ const TERTIARY_COLORS = ['gestio-tertiary'];
477
+ // BRAND COLORS
478
+ const BRAND_COLORS = [
479
+ 'gestio-brand-25',
480
+ 'gestio-brand-50',
481
+ 'gestio-brand-100',
482
+ 'gestio-brand-200',
483
+ 'gestio-brand-300',
484
+ 'gestio-brand-400',
485
+ 'gestio-brand-500',
486
+ 'gestio-brand-600',
487
+ 'gestio-brand-700',
488
+ 'gestio-brand-800',
489
+ 'gestio-brand-900',
490
+ ];
491
+ // NEUTRAL COLORS
492
+ const NEUTRAL_COLORS = [
493
+ 'gestio-neutral-25',
494
+ 'gestio-neutral-50',
495
+ 'gestio-neutral-100',
496
+ 'gestio-neutral-200',
497
+ 'gestio-neutral-300',
498
+ 'gestio-neutral-400',
499
+ 'gestio-neutral-500',
500
+ 'gestio-neutral-600',
501
+ 'gestio-neutral-700',
502
+ 'gestio-neutral-800',
503
+ 'gestio-neutral-900',
504
+ 'gestio-neutral-1000',
505
+ ];
506
+ // GREEN COLORS
507
+ const GREEN_COLORS = [
508
+ 'gestio-green-25',
509
+ 'gestio-green-50',
510
+ 'gestio-green-100',
511
+ 'gestio-green-200',
512
+ 'gestio-green-300',
513
+ 'gestio-green-400',
514
+ 'gestio-green-500',
515
+ 'gestio-green-600',
516
+ 'gestio-green-700',
517
+ 'gestio-green-800',
518
+ 'gestio-green-900',
519
+ ];
520
+ // RED COLORS
521
+ const RED_COLORS = [
522
+ 'gestio-red-25',
523
+ 'gestio-red-50',
524
+ 'gestio-red-100',
525
+ 'gestio-red-200',
526
+ 'gestio-red-300',
527
+ 'gestio-red-400',
528
+ 'gestio-red-500',
529
+ 'gestio-red-600',
530
+ 'gestio-red-700',
531
+ 'gestio-red-800',
532
+ 'gestio-red-900',
533
+ ];
534
+ // BLUE COLORS
535
+ const BLUE_COLORS = [
536
+ 'gestio-blue-25',
537
+ 'gestio-blue-50',
538
+ 'gestio-blue-100',
539
+ 'gestio-blue-200',
540
+ 'gestio-blue-300',
541
+ 'gestio-blue-400',
542
+ 'gestio-blue-500',
543
+ 'gestio-blue-600',
544
+ 'gestio-blue-700',
545
+ 'gestio-blue-800',
546
+ 'gestio-blue-900',
547
+ ];
548
+ // AMBER COLORS
549
+ const AMBER_COLORS = [
550
+ 'gestio-amber-25',
551
+ 'gestio-amber-50',
552
+ 'gestio-amber-100',
553
+ 'gestio-amber-200',
554
+ 'gestio-amber-300',
555
+ 'gestio-amber-400',
556
+ 'gestio-amber-500',
557
+ 'gestio-amber-600',
558
+ 'gestio-amber-700',
559
+ 'gestio-amber-800',
560
+ 'gestio-amber-900',
561
+ ];
562
+ // TEAL COLORS
563
+ const TEAL_COLORS = [
564
+ 'gestio-teal-25',
565
+ 'gestio-teal-50',
566
+ 'gestio-teal-100',
567
+ 'gestio-teal-200',
568
+ 'gestio-teal-300',
569
+ 'gestio-teal-400',
570
+ 'gestio-teal-500',
571
+ 'gestio-teal-600',
572
+ 'gestio-teal-700',
573
+ 'gestio-teal-800',
574
+ 'gestio-teal-900',
575
+ ];
576
+ // PURPLE COLORS
577
+ const PURPLE_COLORS = [
578
+ 'gestio-purple-25',
579
+ 'gestio-purple-50',
580
+ 'gestio-purple-100',
581
+ 'gestio-purple-200',
582
+ 'gestio-purple-300',
583
+ 'gestio-purple-400',
584
+ 'gestio-purple-500',
585
+ 'gestio-purple-600',
586
+ 'gestio-purple-700',
587
+ 'gestio-purple-800',
588
+ 'gestio-purple-900',
589
+ ];
590
+ // EMERALD COLORS
591
+ const EMERALD_COLORS = [
592
+ 'gestio-emerald-25',
593
+ 'gestio-emerald-50',
594
+ 'gestio-emerald-100',
595
+ 'gestio-emerald-200',
596
+ 'gestio-emerald-300',
597
+ 'gestio-emerald-400',
598
+ 'gestio-emerald-500',
599
+ 'gestio-emerald-600',
600
+ 'gestio-emerald-700',
601
+ 'gestio-emerald-800',
602
+ 'gestio-emerald-900',
603
+ ];
604
+ // MAGENTA COLORS
605
+ const MAGENTA_COLORS = [
606
+ 'gestio-magenta-25',
607
+ 'gestio-magenta-50',
608
+ 'gestio-magenta-100',
609
+ 'gestio-magenta-200',
610
+ 'gestio-magenta-300',
611
+ 'gestio-magenta-400',
612
+ 'gestio-magenta-500',
613
+ 'gestio-magenta-600',
614
+ 'gestio-magenta-700',
615
+ 'gestio-magenta-800',
616
+ 'gestio-magenta-900',
617
+ ];
618
+ // YELLOW COLORS
619
+ const YELLOW_COLORS = [
620
+ 'gestio-yellow-25',
621
+ 'gestio-yellow-50',
622
+ 'gestio-yellow-100',
623
+ 'gestio-yellow-200',
624
+ 'gestio-yellow-300',
625
+ 'gestio-yellow-400',
626
+ 'gestio-yellow-500',
627
+ 'gestio-yellow-600',
628
+ 'gestio-yellow-700',
629
+ 'gestio-yellow-800',
630
+ 'gestio-yellow-900',
631
+ ];
632
+ // LIME COLORS
633
+ const LIME_COLORS = [
634
+ 'gestio-lime-25',
635
+ 'gestio-lime-50',
636
+ 'gestio-lime-100',
637
+ 'gestio-lime-200',
638
+ 'gestio-lime-300',
639
+ 'gestio-lime-400',
640
+ 'gestio-lime-500',
641
+ 'gestio-lime-600',
642
+ 'gestio-lime-700',
643
+ 'gestio-lime-800',
644
+ 'gestio-lime-900',
645
+ ];
646
+ // ALL COLORS
647
+ const ALL_COLORS = [
648
+ ...BASE_COLORS,
649
+ ...PRIMARY_COLORS,
650
+ ...SECONDARY_COLORS,
651
+ ...TERTIARY_COLORS,
652
+ ...BRAND_COLORS,
653
+ ...NEUTRAL_COLORS,
654
+ ...GREEN_COLORS,
655
+ ...RED_COLORS,
656
+ ...BLUE_COLORS,
657
+ ...AMBER_COLORS,
658
+ ...TEAL_COLORS,
659
+ ...PURPLE_COLORS,
660
+ ...EMERALD_COLORS,
661
+ ...MAGENTA_COLORS,
662
+ ...YELLOW_COLORS,
663
+ ...LIME_COLORS,
664
+ ];
665
+
666
+ const TYPOGRAPHY_TOKENS = [
667
+ 'gds-heading-3xl',
668
+ 'gds-heading-2xl',
669
+ 'gds-heading-xl',
670
+ 'gds-heading-lg',
671
+ 'gds-heading-md',
672
+ 'gds-heading-sm',
673
+ 'gds-heading-xs',
674
+ 'gds-subheading',
675
+ ];
676
+ const TYPOGRAPHY_DESCRIPTIONS = {
677
+ 'gds-heading-3xl': 'Largest heading for hero sections and major page titles',
678
+ 'gds-heading-2xl': 'Secondary large heading for section dividers',
679
+ 'gds-heading-xl': 'Large heading for important content blocks',
680
+ 'gds-heading-lg': 'Medium heading for subsections',
681
+ 'gds-heading-md': 'Standard heading for content areas',
682
+ 'gds-heading-sm': 'Small heading for cards and components',
683
+ 'gds-heading-xs': 'Smallest heading for micro components',
684
+ 'gds-subheading': 'Supporting text for headings and descriptions',
685
+ };
686
+ const TYPOGRAPHY_EXAMPLES = {
687
+ 'gds-heading-3xl': 'Design System',
688
+ 'gds-heading-2xl': 'Foundation',
689
+ 'gds-heading-xl': 'Typography',
690
+ 'gds-heading-lg': 'Heading Large',
691
+ 'gds-heading-md': 'Heading Medium',
692
+ 'gds-heading-sm': 'Heading Small',
693
+ 'gds-heading-xs': 'Heading XS',
694
+ 'gds-subheading': 'Supporting text that provides additional context and helps establish hierarchy',
695
+ };
696
+
697
+ // Components / Modules
698
+
699
+ /**
700
+ * Generated bundle index. Do not edit.
701
+ */
702
+
703
+ export { ALL_COLORS, AMBER_COLORS, BASE_COLORS, BLUE_COLORS, BRAND_COLORS, EMERALD_COLORS, GREEN_COLORS, GdsButtonComponent, GdsButtonModule, GdsComponent, GdsInputComponent, GdsInputModule, GdsLabelComponent, GdsLabelModule, GdsModule, GdsSelectboxComponent, GdsSelectboxModule, GdsTextboxComponent, GdsTextboxModule, LIME_COLORS, MAGENTA_COLORS, NEUTRAL_COLORS, PRIMARY_COLORS, PURPLE_COLORS, RED_COLORS, SECONDARY_COLORS, TEAL_COLORS, TERTIARY_COLORS, TYPOGRAPHY_DESCRIPTIONS, TYPOGRAPHY_EXAMPLES, TYPOGRAPHY_TOKENS, YELLOW_COLORS };
704
+ //# sourceMappingURL=gestio-gds.js.map