@seniorsistemas/scala-ng 2.1.0 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -5
- package/avatar-summary/README.md +6 -2
- package/avatar-summary/public-api.d.ts +1 -1
- package/avatar-summary/src/avatar-summary/avatar-summary.component.d.ts +1 -1
- package/banner/README.md +13 -9
- package/banner/public-api.d.ts +1 -1
- package/breadcrumb/README.md +15 -8
- package/breadcrumb/public-api.d.ts +3 -3
- package/breadcrumb/src/breadcrumb-router/breadcrumb-route-data.d.ts +1 -0
- package/breadcrumb/src/breadcrumb-router/breadcrumb-router.component.d.ts +7 -1
- package/card/README.md +1 -0
- package/checkbox/README.md +3 -1
- package/date-picker/README.md +1 -0
- package/date-picker/public-api.d.ts +1 -1
- package/drawer/README.md +4 -0
- package/empty-state/README.md +17 -11
- package/empty-state/src/empty-state/empty-state.component.d.ts +1 -1
- package/esm2022/autocomplete/src/autocomplete/autocomplete.component.mjs +3 -3
- package/esm2022/avatar-summary/public-api.mjs +1 -1
- package/esm2022/avatar-summary/src/avatar-summary/avatar-summary.component.mjs +2 -2
- package/esm2022/banner/public-api.mjs +2 -2
- package/esm2022/banner/src/banner/banner.component.mjs +4 -4
- package/esm2022/breadcrumb/public-api.mjs +2 -2
- package/esm2022/breadcrumb/src/breadcrumb/breadcrumb.component.mjs +4 -4
- package/esm2022/breadcrumb/src/breadcrumb-item/breadcrumb-item.component.mjs +6 -3
- package/esm2022/breadcrumb/src/breadcrumb-router/breadcrumb-route-data.mjs +1 -1
- package/esm2022/breadcrumb/src/breadcrumb-router/breadcrumb-router.component.mjs +23 -6
- package/esm2022/breadcrumb/src/breadcrumb-truncator/breadcrumb-truncator.component.mjs +2 -2
- package/esm2022/card/src/card/card.component.mjs +4 -4
- package/esm2022/checkbox/src/checkbox/checkbox.component.mjs +3 -3
- package/esm2022/date-picker/public-api.mjs +2 -2
- package/esm2022/date-picker/src/date-picker/datepicker.component.mjs +4 -4
- package/esm2022/drawer/src/drawer/drawer.component.mjs +3 -3
- package/esm2022/empty-state/src/empty-state/empty-state.component.mjs +4 -4
- package/esm2022/input/src/input/input.component.mjs +3 -4
- package/esm2022/item-strip/public-api.mjs +1 -1
- package/esm2022/item-strip/src/item-strip/item-strip.component.mjs +59 -11
- package/esm2022/item-strip/src/item-strip-item/item-strip-item.component.mjs +97 -9
- package/esm2022/lib/chip/chip.utils.mjs +2 -2
- package/esm2022/lib/overlay/scroll-lock.utils.mjs +1 -1
- package/esm2022/lib/theme/theme.service.mjs +2 -2
- package/esm2022/list/public-api.mjs +1 -1
- package/esm2022/list/src/list/list.component.mjs +3 -3
- package/esm2022/list/src/list/list.models.mjs +1 -1
- package/esm2022/list/src/list-item/list-item.component.mjs +26 -5
- package/esm2022/locale/fallback.mjs +1 -2
- package/esm2022/page-header/src/page-header/page-header.component.mjs +8 -6
- package/esm2022/paginator/src/paginator/paginator.component.mjs +2 -2
- package/esm2022/panel/src/panel/panel.component.mjs +4 -4
- package/esm2022/public-api.mjs +5 -5
- package/esm2022/radio-button/public-api.mjs +2 -2
- package/esm2022/radio-button/src/radio-button/radio-button.component.mjs +3 -3
- package/esm2022/select/src/select/select.component.mjs +5 -5
- package/esm2022/select-button/src/select-button/select-button.component.mjs +4 -4
- package/esm2022/stats-card/src/stats-card/stats-card.component.mjs +5 -28
- package/esm2022/switch/src/switch/switch.component.mjs +3 -3
- package/esm2022/table/public-api.mjs +1 -1
- package/esm2022/table/src/components/actions-cell/table-actions-cell.component.mjs +10 -5
- package/esm2022/table/src/components/fields/rich-field-table/rich-field-table.component.mjs +1 -1
- package/esm2022/table/src/components/selection-cell/table-selection-cell.component.mjs +2 -2
- package/esm2022/table/src/components/toolbar/table-toolbar.component.mjs +3 -3
- package/esm2022/table/src/directives/table-container.directive.mjs +3 -3
- package/esm2022/table/src/table/table.component.mjs +3 -3
- package/esm2022/table/src/table/table.models.mjs +1 -1
- package/esm2022/table/src/utils/table-lazy-event.utils.mjs +1 -1
- package/esm2022/tooltip/src/tooltip/tooltip-focus-origin.service.mjs +32 -0
- package/esm2022/tooltip/src/tooltip-panel/tooltip-panel.component.mjs +5 -3
- package/esm2022/tooltip/src/tooltip-trigger/tooltip-trigger.directive.mjs +77 -23
- package/fesm2022/seniorsistemas-scala-ng-autocomplete.mjs +2 -2
- package/fesm2022/seniorsistemas-scala-ng-autocomplete.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-avatar-summary.mjs +1 -1
- package/fesm2022/seniorsistemas-scala-ng-avatar-summary.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-banner.mjs +53 -53
- package/fesm2022/seniorsistemas-scala-ng-banner.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-breadcrumb.mjs +30 -11
- package/fesm2022/seniorsistemas-scala-ng-breadcrumb.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-card.mjs +3 -3
- package/fesm2022/seniorsistemas-scala-ng-card.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-checkbox.mjs +2 -2
- package/fesm2022/seniorsistemas-scala-ng-checkbox.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-date-picker.mjs +3 -3
- package/fesm2022/seniorsistemas-scala-ng-date-picker.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-drawer.mjs +2 -2
- package/fesm2022/seniorsistemas-scala-ng-drawer.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-empty-state.mjs +3 -3
- package/fesm2022/seniorsistemas-scala-ng-empty-state.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-input.mjs +1 -1
- package/fesm2022/seniorsistemas-scala-ng-input.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-item-strip.mjs +154 -18
- package/fesm2022/seniorsistemas-scala-ng-item-strip.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-list.mjs +27 -6
- package/fesm2022/seniorsistemas-scala-ng-list.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-locale.mjs +0 -1
- package/fesm2022/seniorsistemas-scala-ng-locale.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-page-header.mjs +7 -5
- package/fesm2022/seniorsistemas-scala-ng-page-header.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-paginator.mjs +1 -1
- package/fesm2022/seniorsistemas-scala-ng-paginator.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-panel.mjs +3 -3
- package/fesm2022/seniorsistemas-scala-ng-panel.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-radio-button.mjs +3 -3
- package/fesm2022/seniorsistemas-scala-ng-radio-button.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-select-button.mjs +3 -3
- package/fesm2022/seniorsistemas-scala-ng-select-button.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-select.mjs +4 -4
- package/fesm2022/seniorsistemas-scala-ng-select.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-stats-card.mjs +4 -27
- package/fesm2022/seniorsistemas-scala-ng-stats-card.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-switch.mjs +2 -2
- package/fesm2022/seniorsistemas-scala-ng-switch.mjs.map +1 -1
- package/fesm2022/{seniorsistemas-scala-ng-table-table-actions-cell.component-DZU3DYW8.mjs → seniorsistemas-scala-ng-table-table-actions-cell.component-D6ffnUl1.mjs} +10 -5
- package/fesm2022/seniorsistemas-scala-ng-table-table-actions-cell.component-D6ffnUl1.mjs.map +1 -0
- package/fesm2022/{seniorsistemas-scala-ng-table-table-toolbar.component-DWhF_ejJ.mjs → seniorsistemas-scala-ng-table-table-toolbar.component-2YcqyPlh.mjs} +3 -3
- package/fesm2022/{seniorsistemas-scala-ng-table-table-toolbar.component-DWhF_ejJ.mjs.map → seniorsistemas-scala-ng-table-table-toolbar.component-2YcqyPlh.mjs.map} +1 -1
- package/fesm2022/seniorsistemas-scala-ng-table.mjs +21 -21
- package/fesm2022/seniorsistemas-scala-ng-table.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-tooltip.mjs +109 -24
- package/fesm2022/seniorsistemas-scala-ng-tooltip.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng.mjs +55 -55
- package/fesm2022/seniorsistemas-scala-ng.mjs.map +1 -1
- package/filter-tag/README.md +2 -1
- package/item-strip/README.md +11 -4
- package/item-strip/public-api.d.ts +1 -1
- package/item-strip/src/item-strip/item-strip.component.d.ts +12 -1
- package/item-strip/src/item-strip-item/item-strip-item.component.d.ts +32 -3
- package/list/README.md +17 -0
- package/list/public-api.d.ts +1 -1
- package/list/src/list/list.models.d.ts +19 -0
- package/list/src/list-item/list-item.component.d.ts +15 -2
- package/package.json +1 -7
- package/page-header/README.md +68 -24
- package/page-header/src/page-header/page-header.component.d.ts +5 -3
- package/panel/README.md +5 -1
- package/public-api.d.ts +7 -7
- package/radio-button/README.md +8 -1
- package/radio-button/public-api.d.ts +2 -2
- package/schematics/ng-add/index.js +39 -23
- package/schematics/ng-add/index.js.map +1 -1
- package/select/src/select/select.component.d.ts +3 -3
- package/select-button/README.md +1 -0
- package/selection-chip/README.md +1 -0
- package/stats-card/README.md +35 -29
- package/stats-card/src/stats-card/stats-card.component.d.ts +18 -31
- package/styles/tailwind-tokens.js +103 -1
- package/styles/tokens/radius.scss +0 -2
- package/styles/tokens/spacing.scss +0 -2
- package/styles/tokens/typography.scss +0 -2
- package/styles.scss +2 -0
- package/switch/README.md +7 -1
- package/table/README.md +21 -10
- package/table/public-api.d.ts +4 -4
- package/table/src/table/table.models.d.ts +2 -1
- package/tooltip/README.md +15 -5
- package/tooltip/src/tooltip/tooltip-focus-origin.service.d.ts +16 -0
- package/tooltip/src/tooltip-panel/tooltip-panel.component.d.ts +3 -1
- package/tooltip/src/tooltip-trigger/tooltip-trigger.directive.d.ts +21 -5
- package/avatar-profile/README.md +0 -204
- package/avatar-profile/index.d.ts +0 -5
- package/avatar-profile/package.json +0 -3
- package/avatar-profile/public-api.d.ts +0 -1
- package/avatar-profile/src/avatar-profile/avatar-profile.component.d.ts +0 -21
- package/esm2022/avatar-profile/public-api.mjs +0 -2
- package/esm2022/avatar-profile/seniorsistemas-scala-ng-avatar-profile.mjs +0 -5
- package/esm2022/avatar-profile/src/avatar-profile/avatar-profile.component.mjs +0 -33
- package/fesm2022/seniorsistemas-scala-ng-avatar-profile.mjs +0 -40
- package/fesm2022/seniorsistemas-scala-ng-avatar-profile.mjs.map +0 -1
- package/fesm2022/seniorsistemas-scala-ng-table-table-actions-cell.component-DZU3DYW8.mjs.map +0 -1
|
@@ -23,10 +23,6 @@ export declare class SdsStatsCardComponent {
|
|
|
23
23
|
readonly cardClick: import("@angular/core").OutputEmitterRef<void>;
|
|
24
24
|
protected readonly isHovered: import("@angular/core").WritableSignal<boolean>;
|
|
25
25
|
protected readonly isFocused: import("@angular/core").WritableSignal<boolean>;
|
|
26
|
-
/** The label/value/period `<p>` elements (`sdsTooltipFocusable="false"` keeps them out of the tab order). */
|
|
27
|
-
private readonly labelElement;
|
|
28
|
-
private readonly valueElement;
|
|
29
|
-
private readonly periodElement;
|
|
30
26
|
protected readonly isCompact: import("@angular/core").Signal<boolean>;
|
|
31
27
|
protected readonly hasIcon: import("@angular/core").Signal<boolean>;
|
|
32
28
|
protected readonly hasDelta: import("@angular/core").Signal<boolean>;
|
|
@@ -41,7 +37,7 @@ export declare class SdsStatsCardComponent {
|
|
|
41
37
|
protected readonly containerClasses: import("@angular/core").Signal<{
|
|
42
38
|
"outline-color-border-focused": boolean;
|
|
43
39
|
"outline-color-border-disable"?: undefined;
|
|
44
|
-
"outline-color-border
|
|
40
|
+
"outline-color-border"?: undefined;
|
|
45
41
|
outline: boolean;
|
|
46
42
|
"outline-1": boolean;
|
|
47
43
|
"outline-offset-[-1px]": boolean;
|
|
@@ -67,7 +63,7 @@ export declare class SdsStatsCardComponent {
|
|
|
67
63
|
} | {
|
|
68
64
|
"outline-color-border-disable": boolean;
|
|
69
65
|
"outline-color-border-focused"?: undefined;
|
|
70
|
-
"outline-color-border
|
|
66
|
+
"outline-color-border"?: undefined;
|
|
71
67
|
outline: boolean;
|
|
72
68
|
"outline-1": boolean;
|
|
73
69
|
"outline-offset-[-1px]": boolean;
|
|
@@ -91,7 +87,7 @@ export declare class SdsStatsCardComponent {
|
|
|
91
87
|
"gap-space-1-5"?: undefined;
|
|
92
88
|
"p-space-2"?: undefined;
|
|
93
89
|
} | {
|
|
94
|
-
"outline-color-border
|
|
90
|
+
"outline-color-border": boolean;
|
|
95
91
|
"outline-color-border-focused"?: undefined;
|
|
96
92
|
"outline-color-border-disable"?: undefined;
|
|
97
93
|
outline: boolean;
|
|
@@ -119,7 +115,7 @@ export declare class SdsStatsCardComponent {
|
|
|
119
115
|
} | {
|
|
120
116
|
"outline-color-border-focused": boolean;
|
|
121
117
|
"outline-color-border-disable"?: undefined;
|
|
122
|
-
"outline-color-border
|
|
118
|
+
"outline-color-border"?: undefined;
|
|
123
119
|
outline: boolean;
|
|
124
120
|
"outline-1": boolean;
|
|
125
121
|
"outline-offset-[-1px]": boolean;
|
|
@@ -145,7 +141,7 @@ export declare class SdsStatsCardComponent {
|
|
|
145
141
|
} | {
|
|
146
142
|
"outline-color-border-disable": boolean;
|
|
147
143
|
"outline-color-border-focused"?: undefined;
|
|
148
|
-
"outline-color-border
|
|
144
|
+
"outline-color-border"?: undefined;
|
|
149
145
|
outline: boolean;
|
|
150
146
|
"outline-1": boolean;
|
|
151
147
|
"outline-offset-[-1px]": boolean;
|
|
@@ -169,7 +165,7 @@ export declare class SdsStatsCardComponent {
|
|
|
169
165
|
"gap-space-1-5"?: undefined;
|
|
170
166
|
"p-space-2"?: undefined;
|
|
171
167
|
} | {
|
|
172
|
-
"outline-color-border
|
|
168
|
+
"outline-color-border": boolean;
|
|
173
169
|
"outline-color-border-focused"?: undefined;
|
|
174
170
|
"outline-color-border-disable"?: undefined;
|
|
175
171
|
outline: boolean;
|
|
@@ -197,7 +193,7 @@ export declare class SdsStatsCardComponent {
|
|
|
197
193
|
} | {
|
|
198
194
|
"outline-color-border-focused": boolean;
|
|
199
195
|
"outline-color-border-disable"?: undefined;
|
|
200
|
-
"outline-color-border
|
|
196
|
+
"outline-color-border"?: undefined;
|
|
201
197
|
outline: boolean;
|
|
202
198
|
"outline-1": boolean;
|
|
203
199
|
"outline-offset-[-1px]": boolean;
|
|
@@ -223,7 +219,7 @@ export declare class SdsStatsCardComponent {
|
|
|
223
219
|
} | {
|
|
224
220
|
"outline-color-border-disable": boolean;
|
|
225
221
|
"outline-color-border-focused"?: undefined;
|
|
226
|
-
"outline-color-border
|
|
222
|
+
"outline-color-border"?: undefined;
|
|
227
223
|
outline: boolean;
|
|
228
224
|
"outline-1": boolean;
|
|
229
225
|
"outline-offset-[-1px]": boolean;
|
|
@@ -247,7 +243,7 @@ export declare class SdsStatsCardComponent {
|
|
|
247
243
|
"gap-space-1-5"?: undefined;
|
|
248
244
|
"p-space-2"?: undefined;
|
|
249
245
|
} | {
|
|
250
|
-
"outline-color-border
|
|
246
|
+
"outline-color-border": boolean;
|
|
251
247
|
"outline-color-border-focused"?: undefined;
|
|
252
248
|
"outline-color-border-disable"?: undefined;
|
|
253
249
|
outline: boolean;
|
|
@@ -275,7 +271,7 @@ export declare class SdsStatsCardComponent {
|
|
|
275
271
|
} | {
|
|
276
272
|
"outline-color-border-focused": boolean;
|
|
277
273
|
"outline-color-border-disable"?: undefined;
|
|
278
|
-
"outline-color-border
|
|
274
|
+
"outline-color-border"?: undefined;
|
|
279
275
|
outline: boolean;
|
|
280
276
|
"outline-1": boolean;
|
|
281
277
|
"outline-offset-[-1px]": boolean;
|
|
@@ -301,7 +297,7 @@ export declare class SdsStatsCardComponent {
|
|
|
301
297
|
} | {
|
|
302
298
|
"outline-color-border-disable": boolean;
|
|
303
299
|
"outline-color-border-focused"?: undefined;
|
|
304
|
-
"outline-color-border
|
|
300
|
+
"outline-color-border"?: undefined;
|
|
305
301
|
outline: boolean;
|
|
306
302
|
"outline-1": boolean;
|
|
307
303
|
"outline-offset-[-1px]": boolean;
|
|
@@ -325,7 +321,7 @@ export declare class SdsStatsCardComponent {
|
|
|
325
321
|
"px-space-1-5"?: undefined;
|
|
326
322
|
"py-space-1"?: undefined;
|
|
327
323
|
} | {
|
|
328
|
-
"outline-color-border
|
|
324
|
+
"outline-color-border": boolean;
|
|
329
325
|
"outline-color-border-focused"?: undefined;
|
|
330
326
|
"outline-color-border-disable"?: undefined;
|
|
331
327
|
outline: boolean;
|
|
@@ -353,7 +349,7 @@ export declare class SdsStatsCardComponent {
|
|
|
353
349
|
} | {
|
|
354
350
|
"outline-color-border-focused": boolean;
|
|
355
351
|
"outline-color-border-disable"?: undefined;
|
|
356
|
-
"outline-color-border
|
|
352
|
+
"outline-color-border"?: undefined;
|
|
357
353
|
outline: boolean;
|
|
358
354
|
"outline-1": boolean;
|
|
359
355
|
"outline-offset-[-1px]": boolean;
|
|
@@ -379,7 +375,7 @@ export declare class SdsStatsCardComponent {
|
|
|
379
375
|
} | {
|
|
380
376
|
"outline-color-border-disable": boolean;
|
|
381
377
|
"outline-color-border-focused"?: undefined;
|
|
382
|
-
"outline-color-border
|
|
378
|
+
"outline-color-border"?: undefined;
|
|
383
379
|
outline: boolean;
|
|
384
380
|
"outline-1": boolean;
|
|
385
381
|
"outline-offset-[-1px]": boolean;
|
|
@@ -403,7 +399,7 @@ export declare class SdsStatsCardComponent {
|
|
|
403
399
|
"px-space-1-5"?: undefined;
|
|
404
400
|
"py-space-1"?: undefined;
|
|
405
401
|
} | {
|
|
406
|
-
"outline-color-border
|
|
402
|
+
"outline-color-border": boolean;
|
|
407
403
|
"outline-color-border-focused"?: undefined;
|
|
408
404
|
"outline-color-border-disable"?: undefined;
|
|
409
405
|
outline: boolean;
|
|
@@ -431,7 +427,7 @@ export declare class SdsStatsCardComponent {
|
|
|
431
427
|
} | {
|
|
432
428
|
"outline-color-border-focused": boolean;
|
|
433
429
|
"outline-color-border-disable"?: undefined;
|
|
434
|
-
"outline-color-border
|
|
430
|
+
"outline-color-border"?: undefined;
|
|
435
431
|
outline: boolean;
|
|
436
432
|
"outline-1": boolean;
|
|
437
433
|
"outline-offset-[-1px]": boolean;
|
|
@@ -457,7 +453,7 @@ export declare class SdsStatsCardComponent {
|
|
|
457
453
|
} | {
|
|
458
454
|
"outline-color-border-disable": boolean;
|
|
459
455
|
"outline-color-border-focused"?: undefined;
|
|
460
|
-
"outline-color-border
|
|
456
|
+
"outline-color-border"?: undefined;
|
|
461
457
|
outline: boolean;
|
|
462
458
|
"outline-1": boolean;
|
|
463
459
|
"outline-offset-[-1px]": boolean;
|
|
@@ -481,7 +477,7 @@ export declare class SdsStatsCardComponent {
|
|
|
481
477
|
"px-space-1-5"?: undefined;
|
|
482
478
|
"py-space-1"?: undefined;
|
|
483
479
|
} | {
|
|
484
|
-
"outline-color-border
|
|
480
|
+
"outline-color-border": boolean;
|
|
485
481
|
"outline-color-border-focused"?: undefined;
|
|
486
482
|
"outline-color-border-disable"?: undefined;
|
|
487
483
|
outline: boolean;
|
|
@@ -516,15 +512,6 @@ export declare class SdsStatsCardComponent {
|
|
|
516
512
|
protected deltaTextColorClass(semantic: SdsStatsCardDeltaSemantic): string;
|
|
517
513
|
protected deltaIconTextColorClass(semantic: SdsStatsCardDeltaSemantic): string;
|
|
518
514
|
protected deltaDashBackgroundClass(semantic: SdsStatsCardDeltaSemantic): string;
|
|
519
|
-
/**
|
|
520
|
-
* The container, not the label/value/period `<p>`s, is the real Tab stop, so the tooltip
|
|
521
|
-
* directives' own `(focus)` listener never fires on Tab without this relay — dispatching the
|
|
522
|
-
* event directly on each host triggers its directive without moving real DOM focus off the
|
|
523
|
-
* container. Several can open at once (e.g. a narrow compact card truncating label and value
|
|
524
|
-
* simultaneously); the tooltip's own collision registry keeps the bubbles from overlapping.
|
|
525
|
-
*/
|
|
526
|
-
protected handleContainerFocus(): void;
|
|
527
|
-
protected handleContainerBlur(): void;
|
|
528
515
|
protected handleClick(): void;
|
|
529
516
|
protected handleKeydown(event: KeyboardEvent): void;
|
|
530
517
|
static ɵfac: i0.ɵɵFactoryDeclaration<SdsStatsCardComponent, never>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/** @type {import('tailwindcss').Config['theme']['extend']} */
|
|
2
|
-
/** Auto-generated — do not edit manually. Run: npm run tokens:generate */
|
|
3
2
|
module.exports = {
|
|
4
3
|
colors: {
|
|
5
4
|
"surface-default": "var(--sds-surface-default)",
|
|
@@ -306,6 +305,109 @@ module.exports = {
|
|
|
306
305
|
"color-icon-interactive-secondary": "var(--sds-color-icon-interactive-secondary)",
|
|
307
306
|
"color-icon-neutral": "var(--sds-color-icon-neutral)",
|
|
308
307
|
"color-text-interactive-secondary": "var(--sds-color-text-interactive-secondary)",
|
|
308
|
+
"color-border": "var(--sds-color-border)",
|
|
309
|
+
"color-shadow-input-focused": "var(--sds-color-shadow-input-focused)",
|
|
310
|
+
"color-background-highlight-slate-bold": "var(--sds-color-background-highlight-slate-bold)",
|
|
311
|
+
"color-background-highlight-slate-bold-hovered":
|
|
312
|
+
"var(--sds-color-background-highlight-slate-bold-hovered)",
|
|
313
|
+
"color-background-highlight-slate-bold-pressed":
|
|
314
|
+
"var(--sds-color-background-highlight-slate-bold-pressed)",
|
|
315
|
+
"color-background-highlight-slate-subtle": "var(--sds-color-background-highlight-slate-subtle)",
|
|
316
|
+
"color-background-highlight-slate-subtle-hovered":
|
|
317
|
+
"var(--sds-color-background-highlight-slate-subtle-hovered)",
|
|
318
|
+
"color-background-highlight-slate-subtle-pressed":
|
|
319
|
+
"var(--sds-color-background-highlight-slate-subtle-pressed)",
|
|
320
|
+
"color-text-highlight-slate": "var(--sds-color-text-highlight-slate)",
|
|
321
|
+
"color-text-highlight-slate-bold": "var(--sds-color-text-highlight-slate-bold)",
|
|
322
|
+
"color-icon-highlight-slate": "var(--sds-color-icon-highlight-slate)",
|
|
323
|
+
"color-border-highlight-slate": "var(--sds-color-border-highlight-slate)",
|
|
324
|
+
"color-background-highlight-indigo-bold": "var(--sds-color-background-highlight-indigo-bold)",
|
|
325
|
+
"color-background-highlight-indigo-bold-hovered":
|
|
326
|
+
"var(--sds-color-background-highlight-indigo-bold-hovered)",
|
|
327
|
+
"color-background-highlight-indigo-bold-pressed":
|
|
328
|
+
"var(--sds-color-background-highlight-indigo-bold-pressed)",
|
|
329
|
+
"color-background-highlight-indigo-subtle":
|
|
330
|
+
"var(--sds-color-background-highlight-indigo-subtle)",
|
|
331
|
+
"color-background-highlight-indigo-subtle-hovered":
|
|
332
|
+
"var(--sds-color-background-highlight-indigo-subtle-hovered)",
|
|
333
|
+
"color-background-highlight-indigo-subtle-pressed":
|
|
334
|
+
"var(--sds-color-background-highlight-indigo-subtle-pressed)",
|
|
335
|
+
"color-text-highlight-indigo": "var(--sds-color-text-highlight-indigo)",
|
|
336
|
+
"color-text-highlight-indigo-bold": "var(--sds-color-text-highlight-indigo-bold)",
|
|
337
|
+
"color-icon-highlight-indigo": "var(--sds-color-icon-highlight-indigo)",
|
|
338
|
+
"color-border-highlight-indigo": "var(--sds-color-border-highlight-indigo)",
|
|
339
|
+
"color-background-highlight-cyan-bold": "var(--sds-color-background-highlight-cyan-bold)",
|
|
340
|
+
"color-background-highlight-cyan-bold-hovered":
|
|
341
|
+
"var(--sds-color-background-highlight-cyan-bold-hovered)",
|
|
342
|
+
"color-background-highlight-cyan-bold-pressed":
|
|
343
|
+
"var(--sds-color-background-highlight-cyan-bold-pressed)",
|
|
344
|
+
"color-background-highlight-cyan-subtle": "var(--sds-color-background-highlight-cyan-subtle)",
|
|
345
|
+
"color-background-highlight-cyan-subtle-hovered":
|
|
346
|
+
"var(--sds-color-background-highlight-cyan-subtle-hovered)",
|
|
347
|
+
"color-background-highlight-cyan-subtle-pressed":
|
|
348
|
+
"var(--sds-color-background-highlight-cyan-subtle-pressed)",
|
|
349
|
+
"color-text-highlight-cyan": "var(--sds-color-text-highlight-cyan)",
|
|
350
|
+
"color-text-highlight-cyan-bold": "var(--sds-color-text-highlight-cyan-bold)",
|
|
351
|
+
"color-icon-highlight-cyan": "var(--sds-color-icon-highlight-cyan)",
|
|
352
|
+
"color-border-highlight-cyan": "var(--sds-color-border-highlight-cyan)",
|
|
353
|
+
"color-background-highlight-amber-bold": "var(--sds-color-background-highlight-amber-bold)",
|
|
354
|
+
"color-background-highlight-amber-bold-hovered":
|
|
355
|
+
"var(--sds-color-background-highlight-amber-bold-hovered)",
|
|
356
|
+
"color-background-highlight-amber-bold-pressed":
|
|
357
|
+
"var(--sds-color-background-highlight-amber-bold-pressed)",
|
|
358
|
+
"color-background-highlight-amber-subtle": "var(--sds-color-background-highlight-amber-subtle)",
|
|
359
|
+
"color-background-highlight-amber-subtle-hovered":
|
|
360
|
+
"var(--sds-color-background-highlight-amber-subtle-hovered)",
|
|
361
|
+
"color-background-highlight-amber-subtle-pressed":
|
|
362
|
+
"var(--sds-color-background-highlight-amber-subtle-pressed)",
|
|
363
|
+
"color-text-highlight-amber": "var(--sds-color-text-highlight-amber)",
|
|
364
|
+
"color-text-highlight-amber-bold": "var(--sds-color-text-highlight-amber-bold)",
|
|
365
|
+
"color-icon-highlight-amber": "var(--sds-color-icon-highlight-amber)",
|
|
366
|
+
"color-border-highlight-amber": "var(--sds-color-border-highlight-amber)",
|
|
367
|
+
"color-background-highlight-orange-bold": "var(--sds-color-background-highlight-orange-bold)",
|
|
368
|
+
"color-background-highlight-orange-bold-hovered":
|
|
369
|
+
"var(--sds-color-background-highlight-orange-bold-hovered)",
|
|
370
|
+
"color-background-highlight-orange-bold-pressed":
|
|
371
|
+
"var(--sds-color-background-highlight-orange-bold-pressed)",
|
|
372
|
+
"color-background-highlight-orange-subtle":
|
|
373
|
+
"var(--sds-color-background-highlight-orange-subtle)",
|
|
374
|
+
"color-background-highlight-orange-subtle-hovered":
|
|
375
|
+
"var(--sds-color-background-highlight-orange-subtle-hovered)",
|
|
376
|
+
"color-background-highlight-orange-subtle-pressed":
|
|
377
|
+
"var(--sds-color-background-highlight-orange-subtle-pressed)",
|
|
378
|
+
"color-text-highlight-orange": "var(--sds-color-text-highlight-orange)",
|
|
379
|
+
"color-text-highlight-orange-bold": "var(--sds-color-text-highlight-orange-bold)",
|
|
380
|
+
"color-icon-highlight-orange": "var(--sds-color-icon-highlight-orange)",
|
|
381
|
+
"color-border-highlight-orange": "var(--sds-color-border-highlight-orange)",
|
|
382
|
+
"color-background-highlight-pink-bold": "var(--sds-color-background-highlight-pink-bold)",
|
|
383
|
+
"color-background-highlight-pink-bold-hovered":
|
|
384
|
+
"var(--sds-color-background-highlight-pink-bold-hovered)",
|
|
385
|
+
"color-background-highlight-pink-bold-pressed":
|
|
386
|
+
"var(--sds-color-background-highlight-pink-bold-pressed)",
|
|
387
|
+
"color-background-highlight-pink-subtle": "var(--sds-color-background-highlight-pink-subtle)",
|
|
388
|
+
"color-background-highlight-pink-subtle-hovered":
|
|
389
|
+
"var(--sds-color-background-highlight-pink-subtle-hovered)",
|
|
390
|
+
"color-background-highlight-pink-subtle-pressed":
|
|
391
|
+
"var(--sds-color-background-highlight-pink-subtle-pressed)",
|
|
392
|
+
"color-text-highlight-pink": "var(--sds-color-text-highlight-pink)",
|
|
393
|
+
"color-text-highlight-pink-bold": "var(--sds-color-text-highlight-pink-bold)",
|
|
394
|
+
"color-icon-highlight-pink": "var(--sds-color-icon-highlight-pink)",
|
|
395
|
+
"color-border-highlight-pink": "var(--sds-color-border-highlight-pink)",
|
|
396
|
+
"color-background-highlight-tomato-bold": "var(--sds-color-background-highlight-tomato-bold)",
|
|
397
|
+
"color-background-highlight-tomato-bold-hovered":
|
|
398
|
+
"var(--sds-color-background-highlight-tomato-bold-hovered)",
|
|
399
|
+
"color-background-highlight-tomato-bold-pressed":
|
|
400
|
+
"var(--sds-color-background-highlight-tomato-bold-pressed)",
|
|
401
|
+
"color-background-highlight-tomato-subtle":
|
|
402
|
+
"var(--sds-color-background-highlight-tomato-subtle)",
|
|
403
|
+
"color-background-highlight-tomato-subtle-hovered":
|
|
404
|
+
"var(--sds-color-background-highlight-tomato-subtle-hovered)",
|
|
405
|
+
"color-background-highlight-tomato-subtle-pressed":
|
|
406
|
+
"var(--sds-color-background-highlight-tomato-subtle-pressed)",
|
|
407
|
+
"color-text-highlight-tomato": "var(--sds-color-text-highlight-tomato)",
|
|
408
|
+
"color-text-highlight-tomato-bold": "var(--sds-color-text-highlight-tomato-bold)",
|
|
409
|
+
"color-icon-highlight-tomato": "var(--sds-color-icon-highlight-tomato)",
|
|
410
|
+
"color-border-highlight-tomato": "var(--sds-color-border-highlight-tomato)",
|
|
309
411
|
},
|
|
310
412
|
spacing: {
|
|
311
413
|
"space-3": "var(--sds-space-3)",
|
package/styles.scss
CHANGED
package/switch/README.md
CHANGED
|
@@ -30,7 +30,7 @@ Para detectar erro de validação automaticamente, basta associar um `NgControl`
|
|
|
30
30
|
- **Default**: track com fundo neutro e borda secundária, thumb branco à esquerda.
|
|
31
31
|
- **Hover**: fundo da track levemente diferenciado via tokens `*-hovered`.
|
|
32
32
|
- **Selecionado**: track preenchida com `background-selected-bold` (azul), thumb branco alinhado à direita.
|
|
33
|
-
- **Focus**: `outline` CSS puro (`border-color-border-focused`, 2px, 2px de respiro) na track, ativado via `
|
|
33
|
+
- **Focus**: `outline` CSS puro (`border-color-border-focused`, 2px, 2px de respiro) na track, ativado via `peer-focus-visible` (o `<input>` é `peer` da track) — sem elemento extra no DOM nem signal. Só em foco por teclado (`:focus-visible`), não em clique de mouse. Como o `outline` acompanha automaticamente a borda real do elemento, não precisa de deslocamento diferente para compensar a borda de 1px da track (diferente do `.error-ring`, que ainda é uma `<div>` posicionada manualmente).
|
|
34
34
|
- **Disabled**: track e thumb usam os tokens `*-disable`; input nativo `disabled`. Tanto o input `[disabled]` quanto `setDisabledState()` do formulário desabilitam o campo.
|
|
35
35
|
- **Readonly**: track sem preenchimento (apenas borda `border-color-border-disable`), thumb com `icon-interactive-secondary`; `toggle()` é bloqueado internamente, mas o campo continua focalizável.
|
|
36
36
|
- **Erro**: anel destrutivo (`.error-ring`) sobreposto à borda da track, aplicado automaticamente quando o `FormControl` ou `NgModel` associado está `invalid && touched`. O preenchimento da track continua comunicando o valor — o fill diz o valor, o anel diz a validade.
|
|
@@ -189,6 +189,12 @@ export class ExampleComponent {
|
|
|
189
189
|
|
|
190
190
|
## Patch Notes
|
|
191
191
|
|
|
192
|
+
### [Unreleased] — 2026-10-21
|
|
193
|
+
|
|
194
|
+
#### Fixed
|
|
195
|
+
|
|
196
|
+
- O anel de foco passou de `group-has-[:focus-visible]` para `peer-focus-visible` (o `<input>` é `peer` do track). Remove o aviso "rules skipped due to selector errors … Empty sub-selector" do build de produção (inlining de CSS crítico do Angular) e faz o anel aparecer também em navegadores sem `:has()` (Firefox < 121, Safari < 15.4).
|
|
197
|
+
|
|
192
198
|
### 1.0.0 — 2026-08-27
|
|
193
199
|
|
|
194
200
|
#### Added
|
package/table/README.md
CHANGED
|
@@ -42,7 +42,7 @@ A tabela reage a `headers`/`data` e, quando aplicável, delega a lógica pesada
|
|
|
42
42
|
- **Paginação:** `paginator` exibe `sds-paginator` abaixo da tabela. Em modo local, pagina depois de filtrar/ordenar; em modo lazy, delega inteiramente ao consumidor via `lazyLoad` (`first`/`rows`/`page`).
|
|
43
43
|
- **Estados:** `loading` exibe linhas skeleton no lugar dos dados; `error` exibe o empty state de erro (`loading` tem precedência); ausência de linhas exibe o empty state — "sem resultados" quando há busca/filtro, "padrão" caso contrário —, customizável via `emptyHeading`/`emptyDescription`. Nesses estados o cabeçalho fica oculto, exceto quando a linha de filtro está visível (para o usuário conseguir limpar o filtro).
|
|
44
44
|
- **Fundos:** linhas de dados em aspecto Ghost (transparentes em repouso; zebra, hover, selecionada e foco mantêm a precedência `disabled › selected hover › selected › hover › zebra › repouso`); cabeçalho, linha de filtro e cabeçalho de grupo usam `interactive-secondary`; o container não pinta fundo.
|
|
45
|
-
- **Ações por linha:** até 3 ações visíveis viram botões inline (Button Ghost Small, só ícone, com `aria-label` e tooltip iguais ao `label`; a destrutiva por último). Com mais de 3, ou
|
|
45
|
+
- **Ações por linha:** até 3 ações visíveis, todas com ícone, viram botões inline (Button Ghost Small, só ícone, com `aria-label` e tooltip iguais ao `label`; a destrutiva por último). Com mais de 3, ou se alguma ação visível não tiver `icon`, todas vão para o menu ⋯, onde cada ação aparece com o nome — a troca é automática e avaliada linha a linha. O cabeçalho da coluna mantém "Ações" como texto visualmente oculto e a coluna não é ordenável.
|
|
46
46
|
- **Altura da linha:** a linha assume a altura da célula mais alta (ex.: 55px com uma célula `rich` com texto de apoio); as demais células e os controles de início de linha ficam centralizados na vertical. Tabelas sem `rich` continuam com 40px.
|
|
47
47
|
|
|
48
48
|
## Accessibility
|
|
@@ -53,7 +53,7 @@ A estrutura usa um `<table>` nativo (`<thead>`/`<tbody>`, `<th scope="col">`), h
|
|
|
53
53
|
- **Seleção e expansão:** as células de seleção reutilizam `sds-checkbox`/`sds-radio-button`, e as de expansão reutilizam `sds-button` — cada uma recebe um `label` traduzido (`platform.scala-ng.table_selection_*`, `table_expand_*`/`table_collapse_*`) usado como `aria-label`, já que esses controles não têm texto visível.
|
|
54
54
|
- **Linha de filtro:** reaproveita `sds-input`/`sds-select`, herdando a acessibilidade desses componentes (label, foco, estados).
|
|
55
55
|
- **Empty state:** delega para `sds-empty-state`, que já expõe as mensagens de forma acessível.
|
|
56
|
-
- **Ícones decorativos** (seta de ordenação,
|
|
56
|
+
- **Ícones decorativos** (seta de ordenação, reticências do menu de ações) têm `aria-hidden="true"`.
|
|
57
57
|
|
|
58
58
|
## Best Practices
|
|
59
59
|
|
|
@@ -151,14 +151,14 @@ Os campos próprios de cada tipo nativo estão em [Custom Field Types](#custom-f
|
|
|
151
151
|
|
|
152
152
|
### `ActionButton<T>`
|
|
153
153
|
|
|
154
|
-
| Campo | Tipo | Obrigatório | Descrição
|
|
155
|
-
| ------------- | --------------------- | ----------- |
|
|
156
|
-
| `icon` | `string` |
|
|
157
|
-
| `label` | `string` | ✅ | Nome da ação: `aria-label` e tooltip dos botões na linha e rótulo do item no menu.
|
|
158
|
-
| `destructive` | `boolean` | ❌ | Marca a ação como destrutiva: fica por último e usa o estilo destrutivo.
|
|
159
|
-
| `onClick` | `(row: T) => void` | ✅ | Chamado com a linha ao acionar a ação.
|
|
160
|
-
| `disabled` | `(row: T) => boolean` | ❌ | Desabilita a ação para as linhas em que retorna `true`.
|
|
161
|
-
| `visible` | `(row: T) => boolean` | ❌ | Esconde a ação nas linhas em que retorna `false`.
|
|
154
|
+
| Campo | Tipo | Obrigatório | Descrição |
|
|
155
|
+
| ------------- | --------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
156
|
+
| `icon` | `string` | ❌ | Classe do Font Awesome (ex.: `'fa-solid fa-pen'`). Se alguma ação visível da linha não tiver ícone, todas as ações da linha vão para o menu ⋯, já que os botões inline só têm ícone. |
|
|
157
|
+
| `label` | `string` | ✅ | Nome da ação: `aria-label` e tooltip dos botões na linha e rótulo do item no menu. |
|
|
158
|
+
| `destructive` | `boolean` | ❌ | Marca a ação como destrutiva: fica por último e usa o estilo destrutivo. |
|
|
159
|
+
| `onClick` | `(row: T) => void` | ✅ | Chamado com a linha ao acionar a ação. |
|
|
160
|
+
| `disabled` | `(row: T) => boolean` | ❌ | Desabilita a ação para as linhas em que retorna `true`. |
|
|
161
|
+
| `visible` | `(row: T) => boolean` | ❌ | Esconde a ação nas linhas em que retorna `false`. |
|
|
162
162
|
|
|
163
163
|
### `TableLazyLoadEvent<T>`
|
|
164
164
|
|
|
@@ -363,6 +363,17 @@ Para um exemplo combinando todos os recursos (colunas `avatarSummary`/`string`/`
|
|
|
363
363
|
|
|
364
364
|
## Patch Notes
|
|
365
365
|
|
|
366
|
+
### [Unreleased] — 2026-10-23
|
|
367
|
+
|
|
368
|
+
#### Changed
|
|
369
|
+
|
|
370
|
+
- `ActionButton.icon` passa a ser opcional. Se alguma ação visível da linha não tiver ícone, as ações da linha vão para o menu ⋯ em vez de virar botões inline sem ícone.
|
|
371
|
+
|
|
372
|
+
#### Fixed
|
|
373
|
+
|
|
374
|
+
- Os menus de ações da linha e de "mais ações" da toolbar passam a usar as reticências horizontais (`fa-ellipsis`, ⋯) em vez das verticais (⋮).
|
|
375
|
+
- Borda do container (`sdsTableContainer`) passa a usar o token `border` (`border-color-border`) em vez de `border-bold`.
|
|
376
|
+
|
|
366
377
|
### [1.1.0] — 2026-10-02
|
|
367
378
|
|
|
368
379
|
#### Added
|
package/table/public-api.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
export type { TableToolbarAction, TableToolbarConfig, TableToolbarSelectionConfig, } from "./src/table/table-toolbar.models";
|
|
1
2
|
export { SdsTableComponent } from "./src/table/table.component";
|
|
2
3
|
export type { ActionButton, SelectionMode, TableLazyLoadEvent, TableRowKey, TableRowReorderEvent, } from "./src/table/table.models";
|
|
3
|
-
export type { TableToolbarAction, TableToolbarConfig, TableToolbarSelectionConfig, } from "./src/table/table-toolbar.models";
|
|
4
|
-
export type { BaseTableHeader, KeyOfPrimitive, TableField, TableHeader, TableHeaderFilter, TableHeaderFilterOption, TableHeaderTypeMap, } from "./src/fields/table-header";
|
|
5
|
-
export type { StringTableHeader } from "./src/fields/string-table-header";
|
|
6
|
-
export type { NumberTableHeader } from "./src/fields/number-table-header";
|
|
7
4
|
export type { AvatarSummaryTableHeader } from "./src/fields/avatar-summary-table-header";
|
|
8
5
|
export type { DateTableHeader } from "./src/fields/date-table-header";
|
|
6
|
+
export type { NumberTableHeader } from "./src/fields/number-table-header";
|
|
9
7
|
export type { RichTableHeader, RichTableHeaderAvatar } from "./src/fields/rich-table-header";
|
|
8
|
+
export type { StringTableHeader } from "./src/fields/string-table-header";
|
|
9
|
+
export type { BaseTableHeader, KeyOfPrimitive, TableField, TableHeader, TableHeaderFilter, TableHeaderFilterOption, TableHeaderTypeMap, } from "./src/fields/table-header";
|
|
10
10
|
export type { BaseTableFieldConfig } from "./src/components/fields/base-table-field-config";
|
|
11
11
|
export { TableFieldRegistry } from "./src/registry/table-field-registry";
|
|
@@ -20,7 +20,8 @@ export interface TableRowReorderEvent<T> {
|
|
|
20
20
|
* com mais de 3 ações, ou ações pouco frequentes, elas vão para o menu ⋯.
|
|
21
21
|
*/
|
|
22
22
|
export interface ActionButton<T = unknown> {
|
|
23
|
-
|
|
23
|
+
/** Classe do Font Awesome; sem ícone, as ações da linha vão para o menu ⋯, já que os botões inline só têm ícone. */
|
|
24
|
+
icon?: string;
|
|
24
25
|
/** Nome da ação: vira `aria-label` e tooltip dos botões inline e o rótulo do item no menu. */
|
|
25
26
|
label: string;
|
|
26
27
|
/** Marca a ação como destrutiva: fica por último e usa o estilo destrutivo. */
|
package/tooltip/README.md
CHANGED
|
@@ -28,8 +28,8 @@ O balão é inteiramente controlado pela diretiva — não existe API pra abrir/
|
|
|
28
28
|
|
|
29
29
|
- **Conteúdo vazio**: texto vazio ou só com espaços não abre o tooltip (nem define `aria-describedby`); se o texto ficar vazio com o tooltip aberto, ele fecha. Conteúdo via `TemplateRef` sempre abre.
|
|
30
30
|
|
|
31
|
-
- **Abertura**: hover e toque abrem após `sdsTooltipOpenDelay` (150ms por padrão); foco por teclado abre imediatamente, sem atraso.
|
|
32
|
-
- **Fechamento**: `mouseleave` (com uma pequena tolerância pro cursor "pousar" no próprio balão), `blur` (imediato), `Escape` (imediato, sem mover o foco) e toque fora do trigger/painel.
|
|
31
|
+
- **Abertura**: hover e toque abrem após `sdsTooltipOpenDelay` (150ms por padrão); foco por teclado abre imediatamente, sem atraso. Foco por mouse ou programático (`element.focus()`, ex.: o Drawer focando o primeiro elemento do conteúdo ao abrir ou devolvendo o foco ao gatilho ao fechar) não abre o balão.
|
|
32
|
+
- **Fechamento**: `mouseleave` (com uma pequena tolerância pro cursor "pousar" no próprio balão), clique do mouse no trigger, `blur` (imediato), `Escape` (imediato, sem mover o foco) e toque fora do trigger/painel.
|
|
33
33
|
- **Posicionamento**: `sdsTooltipPosition` aceita `'top' | 'bottom' | 'left' | 'right' | 'auto'`. Em `'auto'`, tenta topo/baixo primeiro e só usa os lados quando o elemento de origem não é inline (evita cobrir texto vizinho em uma linha corrida, ex.: item de breadcrumb truncado); nas demais posições explícitas, tenta o lado pedido e cai pro lado oposto se não houver espaço.
|
|
34
34
|
- **Anticolisão entre balões**: dois Tooltips vizinhos abertos ao mesmo tempo (ex.: um por foco, outro por hover) nunca ficam sobrepostos — cada balão testa as posições candidatas na ordem de preferência e usa a primeira que não colide com outro balão já aberto; ao fechar um balão, os demais reavaliam e podem voltar à posição preferida.
|
|
35
35
|
- **Variante Rica**: quando `sdsTooltipTitle` é informado, o balão exibe o título em negrito seguido do conteúdo como texto de apoio, com largura máxima de 320px. Sem título, é a variante Plana, com largura máxima de 288px.
|
|
@@ -42,10 +42,10 @@ O balão é inteiramente controlado pela diretiva — não existe API pra abrir/
|
|
|
42
42
|
|
|
43
43
|
- **Role**: `role="tooltip"` no painel.
|
|
44
44
|
- **`aria-describedby`**: aplicado ao elemento de origem apontando pro `id` do painel só enquanto o balão está aberto; removido ao fechar.
|
|
45
|
-
- **Teclado**: foco abre imediatamente e `Escape` fecha sem mover o foco do elemento atual — o usuário nunca perde a posição de navegação ao dispensar o balão.
|
|
45
|
+
- **Teclado**: foco por teclado abre imediatamente e `Escape` fecha sem mover o foco do elemento atual — o usuário nunca perde a posição de navegação ao dispensar o balão.
|
|
46
46
|
- **Seta decorativa**: sempre `aria-hidden="true"`, nunca comunica informação por si só.
|
|
47
47
|
- **Sem conteúdo interativo**: o painel nunca recebe foco nem contém elementos focáveis — qualquer ação real (link, botão) deve viver fora do Tooltip, no próprio elemento de origem ou em um componente diferente (ex.: popover).
|
|
48
|
-
- **Elemento de origem desabilitado**:
|
|
48
|
+
- **Elemento de origem desabilitado**: os navegadores atuais disparam `mouseenter` num `<button disabled>` nativo, então o Tooltip aplicado direto no botão abre com o mouse. O botão desabilitado não recebe foco, então pelo teclado (e pelo leitor de tela) o Tooltip não abre; quando a explicação do motivo precisa chegar a todos, aplique o Tooltip a um wrapper focável ao redor do botão (ver exemplo abaixo).
|
|
49
49
|
|
|
50
50
|
## Best Practices
|
|
51
51
|
|
|
@@ -105,6 +105,8 @@ export class MyComponent {}
|
|
|
105
105
|
| `sdsTooltipDisabled` (disabled) | `boolean` | `false` | ❌ | Desativa o Tooltip completamente — nunca abre em nenhuma interação. |
|
|
106
106
|
| `sdsTooltipCheckTruncatedText` (checkTruncatedText) | `boolean` | `false` | ❌ | Quando `true`, só abre se o texto do elemento de origem estiver truncado (overflow) — útil pra células de tabela ou texto com `text-overflow: ellipsis`. |
|
|
107
107
|
| `sdsTooltipFocusable` (focusable) | `boolean` | `true` | ❌ | Quando `false`, não aplica `tabindex="0"` automático a hosts não focáveis — use quando o trigger já vive dentro de outro elemento focável e uma parada de Tab própria seria redundante; o foco desse elemento abre o Tooltip. |
|
|
108
|
+
| `sdsTooltipContext` (context) | `object \| null` | `null` | ❌ | Contexto repassado a um `content` do tipo `TemplateRef`: `$implicit` e variáveis `let-` nomeadas. Permite que um único template monte o balão com os dados de cada elemento. |
|
|
109
|
+
| `sdsTooltipDescribeHost` (describeHost) | `boolean` | `true` | ❌ | Quando `false`, nunca aplica `aria-describedby` ao elemento de origem — use quando ele já expõe o texto do tooltip ao leitor de tela, para não ser lido duas vezes. |
|
|
108
110
|
|
|
109
111
|
### Tipos exportados
|
|
110
112
|
|
|
@@ -179,7 +181,7 @@ export class MyComponent {}
|
|
|
179
181
|
|
|
180
182
|
### Elemento de origem desabilitado
|
|
181
183
|
|
|
182
|
-
|
|
184
|
+
Direto no `<button disabled>`, o Tooltip abre só com o mouse, porque o botão desabilitado não recebe foco. Para que a explicação também chegue a quem navega pelo teclado, aplique a diretiva a um wrapper focável ao redor do botão:
|
|
183
185
|
|
|
184
186
|
```html
|
|
185
187
|
<span
|
|
@@ -204,8 +206,16 @@ Um `<button disabled>` nativo não dispara `mouseenter`/`focus` — aplique a di
|
|
|
204
206
|
|
|
205
207
|
### [Unreleased] — 2026-10-01
|
|
206
208
|
|
|
209
|
+
#### Added
|
|
210
|
+
|
|
211
|
+
- `sdsTooltipContext`: contexto para um `content` do tipo `TemplateRef`, para montar o balão com os dados de cada elemento a partir de um único template.
|
|
212
|
+
- `sdsTooltipDescribeHost`: permite não aplicar `aria-describedby` quando o elemento de origem já expõe o texto do tooltip ao leitor de tela.
|
|
213
|
+
|
|
207
214
|
#### Fixed
|
|
208
215
|
|
|
216
|
+
- O tooltip não apaga mais o `tabindex` que o elemento de origem já declara (ex.: `tabindex="-1"` num título que recebe foco por código). Antes, o atributo era removido e o elemento deixava de poder receber foco.
|
|
217
|
+
- O tooltip não apaga mais o `aria-describedby` que o elemento de origem já tinha (ex.: texto de ajuda de um campo): o id do balão é acrescentado à lista ao abrir e retirado ao fechar. Antes, o atributo era substituído e a descrição original se perdia.
|
|
218
|
+
- O tooltip só abre por foco quando a origem é o teclado: foco programático (ex.: o Drawer focando o conteúdo ao abrir ou devolvendo o foco ao gatilho ao fechar) e foco por clique não abrem mais o balão. Clicar com o mouse no trigger fecha o balão; antes, ele ficava na tela até o elemento perder o foco.
|
|
209
219
|
- Com `sdsTooltipFocusable="false"`, o Tooltip agora abre quando o elemento focável que o contém recebe foco por teclado (antes só abria com o mouse).
|
|
210
220
|
- O tooltip não abre mais com conteúdo vazio ou só com espaços (antes mostrava um balão vazio e apontava `aria-describedby` para ele), e fecha se o conteúdo ficar vazio enquanto está aberto.
|
|
211
221
|
- Quando o texto do tooltip é igual ao `aria-label` do host (ex.: botão de ícone cujo tooltip repete o nome), o host não recebe mais `aria-describedby`: o tooltip serve só de rótulo visual, e o leitor de tela não lê a mesma frase duas vezes.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { FocusOrigin } from "@angular/cdk/a11y";
|
|
2
|
+
import type { Observable } from "rxjs";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* Reference-counted wrapper around `FocusMonitor`. Several tooltips can watch the same focusable
|
|
6
|
+
* ancestor (e.g. a Stats Card container), and `FocusMonitor.stopMonitoring()` completes the stream
|
|
7
|
+
* for every subscriber, so only the last one to release an element may stop monitoring it.
|
|
8
|
+
*/
|
|
9
|
+
export declare class SdsTooltipFocusOriginService {
|
|
10
|
+
private readonly focusMonitor;
|
|
11
|
+
private readonly monitorCounts;
|
|
12
|
+
monitor(element: HTMLElement): Observable<FocusOrigin>;
|
|
13
|
+
release(element: HTMLElement): void;
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SdsTooltipFocusOriginService, never>;
|
|
15
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<SdsTooltipFocusOriginService>;
|
|
16
|
+
}
|
|
@@ -6,6 +6,8 @@ export declare class SdsTooltipPanelComponent {
|
|
|
6
6
|
readonly panelId: string;
|
|
7
7
|
/** Plain text or a template to render. */
|
|
8
8
|
readonly content: import("@angular/core").InputSignal<string | TemplateRef<unknown>>;
|
|
9
|
+
/** Context for a template `content`. */
|
|
10
|
+
readonly context: import("@angular/core").InputSignal<object | null>;
|
|
9
11
|
/** Title of the rich variant; empty renders the plain variant. */
|
|
10
12
|
readonly tooltipTitle: import("@angular/core").InputSignal<string>;
|
|
11
13
|
/** Whether to show the arrow. */
|
|
@@ -28,5 +30,5 @@ export declare class SdsTooltipPanelComponent {
|
|
|
28
30
|
protected readonly arrowLeftPx: import("@angular/core").Signal<number | null>;
|
|
29
31
|
protected readonly arrowTopPx: import("@angular/core").Signal<number | null>;
|
|
30
32
|
static ɵfac: i0.ɵɵFactoryDeclaration<SdsTooltipPanelComponent, never>;
|
|
31
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SdsTooltipPanelComponent, "sds-tooltip-panel", never, { "content": { "alias": "content"; "required": true; "isSignal": true; }; "tooltipTitle": { "alias": "tooltipTitle"; "required": false; "isSignal": true; }; "showArrow": { "alias": "showArrow"; "required": false; "isSignal": true; }; "resolvedPosition": { "alias": "resolvedPosition"; "required": false; "isSignal": true; }; "arrowOffsetPx": { "alias": "arrowOffsetPx"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
33
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SdsTooltipPanelComponent, "sds-tooltip-panel", never, { "content": { "alias": "content"; "required": true; "isSignal": true; }; "context": { "alias": "context"; "required": false; "isSignal": true; }; "tooltipTitle": { "alias": "tooltipTitle"; "required": false; "isSignal": true; }; "showArrow": { "alias": "showArrow"; "required": false; "isSignal": true; }; "resolvedPosition": { "alias": "resolvedPosition"; "required": false; "isSignal": true; }; "arrowOffsetPx": { "alias": "arrowOffsetPx"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
32
34
|
}
|
|
@@ -4,6 +4,8 @@ import * as i0 from "@angular/core";
|
|
|
4
4
|
export declare class SdsTooltipDirective {
|
|
5
5
|
/** Tooltip content: plain text or a `TemplateRef` for custom content. */
|
|
6
6
|
readonly content: import("@angular/core").InputSignal<string | TemplateRef<unknown>>;
|
|
7
|
+
/** Context passed to a `TemplateRef` content (`$implicit` and named `let-` variables). */
|
|
8
|
+
readonly context: import("@angular/core").InputSignal<object | null>;
|
|
7
9
|
/** When set, enables the rich variant (title plus `content` as supporting text, up to 320px). */
|
|
8
10
|
readonly title: import("@angular/core").InputSignal<string>;
|
|
9
11
|
/** Bubble position relative to the trigger; `"auto"` picks the best available side. */
|
|
@@ -21,13 +23,22 @@ export declare class SdsTooltipDirective {
|
|
|
21
23
|
* inside a focusable element, to avoid a nested Tab stop.
|
|
22
24
|
*/
|
|
23
25
|
readonly focusable: import("@angular/core").InputSignal<boolean>;
|
|
26
|
+
/**
|
|
27
|
+
* When `false`, never sets `aria-describedby` on the host. Use when the host already exposes the
|
|
28
|
+
* tooltip text to assistive technology, so it isn't read twice.
|
|
29
|
+
*/
|
|
30
|
+
readonly describeHost: import("@angular/core").InputSignal<boolean>;
|
|
24
31
|
private readonly elementRef;
|
|
25
32
|
private readonly overlay;
|
|
26
33
|
private readonly destroyRef;
|
|
27
34
|
private readonly collisionRegistry;
|
|
28
|
-
|
|
35
|
+
private readonly focusOrigin;
|
|
36
|
+
/** Panel id this directive added to the host's `aria-describedby`, if any. */
|
|
37
|
+
private describedById;
|
|
38
|
+
/** Tabindex the host declares itself; the binding below would otherwise remove it (`null`). */
|
|
39
|
+
private readonly ownTabIndex;
|
|
29
40
|
/** Makes non-focusable hosts reachable by Tab; `computed()` since inputs are unset in the constructor. */
|
|
30
|
-
protected readonly hostTabIndex: import("@angular/core").Signal<0 | null>;
|
|
41
|
+
protected readonly hostTabIndex: import("@angular/core").Signal<string | 0 | null>;
|
|
31
42
|
private readonly isOpen;
|
|
32
43
|
private isHoveringTrigger;
|
|
33
44
|
private isHoveringPanel;
|
|
@@ -43,14 +54,19 @@ export declare class SdsTooltipDirective {
|
|
|
43
54
|
constructor();
|
|
44
55
|
protected handlePointerEnter(): void;
|
|
45
56
|
protected handlePointerLeave(): void;
|
|
46
|
-
|
|
47
|
-
protected
|
|
57
|
+
/** Touch is excluded: a tap's pointerdown would cancel the touch-triggered open. */
|
|
58
|
+
protected handlePointerDown(event: PointerEvent): void;
|
|
59
|
+
private handleFocus;
|
|
60
|
+
private handleBlur;
|
|
48
61
|
protected handleTouchStart(): void;
|
|
49
62
|
private scheduleOpen;
|
|
50
63
|
private scheduleCloseIfIdle;
|
|
51
64
|
private clearOpenTimeout;
|
|
52
65
|
private clearCloseTimeout;
|
|
53
66
|
private open;
|
|
67
|
+
/** Appends to the host's own `aria-describedby` instead of replacing it (e.g. a field's helper text). */
|
|
68
|
+
private addHostDescription;
|
|
69
|
+
private removeHostDescription;
|
|
54
70
|
/** Blank text has nothing to show: an empty bubble (and its `aria-describedby`) would only be noise. */
|
|
55
71
|
private hasNoContent;
|
|
56
72
|
private close;
|
|
@@ -70,5 +86,5 @@ export declare class SdsTooltipDirective {
|
|
|
70
86
|
private attachDocumentEscapeListener;
|
|
71
87
|
private attachOutsideTouchListener;
|
|
72
88
|
static ɵfac: i0.ɵɵFactoryDeclaration<SdsTooltipDirective, never>;
|
|
73
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<SdsTooltipDirective, "[sdsTooltip]", never, { "content": { "alias": "sdsTooltip"; "required": true; "isSignal": true; }; "title": { "alias": "sdsTooltipTitle"; "required": false; "isSignal": true; }; "position": { "alias": "sdsTooltipPosition"; "required": false; "isSignal": true; }; "showArrow": { "alias": "sdsTooltipShowArrow"; "required": false; "isSignal": true; }; "openDelay": { "alias": "sdsTooltipOpenDelay"; "required": false; "isSignal": true; }; "disabled": { "alias": "sdsTooltipDisabled"; "required": false; "isSignal": true; }; "checkTruncatedText": { "alias": "sdsTooltipCheckTruncatedText"; "required": false; "isSignal": true; }; "focusable": { "alias": "sdsTooltipFocusable"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
89
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<SdsTooltipDirective, "[sdsTooltip]", never, { "content": { "alias": "sdsTooltip"; "required": true; "isSignal": true; }; "context": { "alias": "sdsTooltipContext"; "required": false; "isSignal": true; }; "title": { "alias": "sdsTooltipTitle"; "required": false; "isSignal": true; }; "position": { "alias": "sdsTooltipPosition"; "required": false; "isSignal": true; }; "showArrow": { "alias": "sdsTooltipShowArrow"; "required": false; "isSignal": true; }; "openDelay": { "alias": "sdsTooltipOpenDelay"; "required": false; "isSignal": true; }; "disabled": { "alias": "sdsTooltipDisabled"; "required": false; "isSignal": true; }; "checkTruncatedText": { "alias": "sdsTooltipCheckTruncatedText"; "required": false; "isSignal": true; }; "focusable": { "alias": "sdsTooltipFocusable"; "required": false; "isSignal": true; }; "describeHost": { "alias": "sdsTooltipDescribeHost"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
74
90
|
}
|