@ngx-smz/ui-kit 21.10.0-next.11 → 21.10.0-next.13

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": "@ngx-smz/ui-kit",
3
- "version": "21.10.0-next.11",
3
+ "version": "21.10.0-next.13",
4
4
  "peerDependencies": {
5
5
  "@angular/cdk": ">=21.0.0 <22.0.0",
6
6
  "@angular/common": ">=21.0.0 <22.0.0",
@@ -1,12 +1,12 @@
1
- const path = require('path');
2
-
3
- /**
4
- * Globs que o Tailwind do app consumidor deve escanear para gerar as classes usadas
5
- * pelos componentes do ui-kit. O Tailwind v3 ignora `content` vindo de presets,
6
- * entao o app precisa incluir isso no proprio tailwind.config:
7
- *
8
- * content: [ 'src/**\/*.{html,ts}', ...require('@ngx-smz/ui-kit/tailwind.content') ]
9
- */
10
- module.exports = [
11
- path.join(__dirname, 'fesm2022', '**', '*.mjs').replace(/\\/g, '/'),
12
- ];
1
+ const path = require('path');
2
+
3
+ /**
4
+ * Globs que o Tailwind do app consumidor deve escanear para gerar as classes usadas
5
+ * pelos componentes do ui-kit. O Tailwind v3 ignora `content` vindo de presets,
6
+ * entao o app precisa incluir isso no proprio tailwind.config:
7
+ *
8
+ * content: [ 'src/**\/*.{html,ts}', ...require('@ngx-smz/ui-kit/tailwind.content') ]
9
+ */
10
+ module.exports = [
11
+ path.join(__dirname, 'fesm2022', '**', '*.mjs').replace(/\\/g, '/'),
12
+ ];
@@ -1,89 +1,89 @@
1
- /*
2
- * Tema padrao do @ngx-smz/ui-kit.
3
- * Cores sao canais RGB separados por espaco ("37 99 235") para o Tailwind aplicar opacidade (bg-primary/10).
4
- * Para criar um tema, copie este arquivo e altere os valores. Para desplugar, remova o import.
5
- */
6
- :root {
7
- --smz-color-primary: 37 99 235;
8
- --smz-color-primary-hover: 29 78 216;
9
- --smz-color-primary-active: 30 64 175;
10
- --smz-color-on-primary: 255 255 255;
11
-
12
- --smz-color-danger: 220 38 38;
13
- --smz-color-danger-hover: 185 28 28;
14
- --smz-color-danger-active: 153 27 27;
15
- --smz-color-on-danger: 255 255 255;
16
-
17
- --smz-color-success: 22 163 74;
18
- --smz-color-success-hover: 21 128 61;
19
- --smz-color-success-active: 22 101 52;
20
- --smz-color-on-success: 255 255 255;
21
-
22
- --smz-color-warning: 245 158 11;
23
- --smz-color-warning-hover: 217 119 6;
24
- --smz-color-warning-active: 180 83 9;
25
- --smz-color-on-warning: 31 41 55;
26
-
27
- --smz-color-surface-0: 248 250 252;
28
- --smz-color-surface-1: 255 255 255;
29
- --smz-color-surface-2: 255 255 255;
30
- --smz-color-surface-3: 241 245 249;
31
-
32
- --smz-color-fg: 15 23 42;
33
- --smz-color-fg-muted: 71 85 105;
34
- --smz-color-fg-subtle: 148 163 184;
35
-
36
- --smz-color-line: 226 232 240;
37
- --smz-color-line-strong: 203 213 225;
38
- --smz-color-focus: 37 99 235;
39
-
40
- --smz-font-sans: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
41
- --smz-font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
42
- --smz-text-xs: 0.75rem;
43
- --smz-text-sm: 0.8125rem;
44
- --smz-text-md: 0.875rem;
45
- --smz-text-lg: 1rem;
46
- --smz-text-xl: 1.125rem;
47
- --smz-leading: 1.5;
48
-
49
- --smz-control-h-sm: 2rem;
50
- --smz-control-h: 2.5rem;
51
- --smz-control-h-lg: 3rem;
52
- --smz-control-px-sm: 0.75rem;
53
- --smz-control-px: 1rem;
54
- --smz-control-px-lg: 1.5rem;
55
- /* Padding horizontal de campos de formulario (padrao: o mesmo dos controles); ajuste so os campos com este token. */
56
- --smz-input-px-sm: var(--smz-control-px-sm);
57
- --smz-input-px: var(--smz-control-px);
58
-
59
- --smz-radius-control: 0.5rem;
60
- --smz-radius-card: 0.75rem;
61
- --smz-radius-overlay: 0.75rem;
62
-
63
- --smz-shadow-card: 0 1px 2px rgb(0 0 0 / 0.06), 0 1px 3px rgb(0 0 0 / 0.1);
64
- --smz-shadow-overlay: 0 8px 24px rgb(0 0 0 / 0.12), 0 2px 6px rgb(0 0 0 / 0.08);
65
-
66
- --smz-duration: 150ms;
67
- }
68
-
69
- :root[data-smz-mode='dark'],
70
- :root.app-dark,
71
- :root.dark {
72
- --smz-color-primary: 96 165 250;
73
- --smz-color-primary-hover: 147 197 253;
74
- --smz-color-primary-active: 191 219 254;
75
- --smz-color-on-primary: 15 23 42;
76
-
77
- --smz-color-surface-0: 2 6 23;
78
- --smz-color-surface-1: 15 23 42;
79
- --smz-color-surface-2: 30 41 59;
80
- --smz-color-surface-3: 51 65 85;
81
-
82
- --smz-color-fg: 241 245 249;
83
- --smz-color-fg-muted: 203 213 225;
84
- --smz-color-fg-subtle: 148 163 184;
85
-
86
- --smz-color-line: 51 65 85;
87
- --smz-color-line-strong: 71 85 105;
88
- --smz-color-focus: 96 165 250;
89
- }
1
+ /*
2
+ * Tema padrao do @ngx-smz/ui-kit.
3
+ * Cores sao canais RGB separados por espaco ("37 99 235") para o Tailwind aplicar opacidade (bg-primary/10).
4
+ * Para criar um tema, copie este arquivo e altere os valores. Para desplugar, remova o import.
5
+ */
6
+ :root {
7
+ --smz-color-primary: 37 99 235;
8
+ --smz-color-primary-hover: 29 78 216;
9
+ --smz-color-primary-active: 30 64 175;
10
+ --smz-color-on-primary: 255 255 255;
11
+
12
+ --smz-color-danger: 220 38 38;
13
+ --smz-color-danger-hover: 185 28 28;
14
+ --smz-color-danger-active: 153 27 27;
15
+ --smz-color-on-danger: 255 255 255;
16
+
17
+ --smz-color-success: 22 163 74;
18
+ --smz-color-success-hover: 21 128 61;
19
+ --smz-color-success-active: 22 101 52;
20
+ --smz-color-on-success: 255 255 255;
21
+
22
+ --smz-color-warning: 245 158 11;
23
+ --smz-color-warning-hover: 217 119 6;
24
+ --smz-color-warning-active: 180 83 9;
25
+ --smz-color-on-warning: 31 41 55;
26
+
27
+ --smz-color-surface-0: 248 250 252;
28
+ --smz-color-surface-1: 255 255 255;
29
+ --smz-color-surface-2: 255 255 255;
30
+ --smz-color-surface-3: 241 245 249;
31
+
32
+ --smz-color-fg: 15 23 42;
33
+ --smz-color-fg-muted: 71 85 105;
34
+ --smz-color-fg-subtle: 148 163 184;
35
+
36
+ --smz-color-line: 226 232 240;
37
+ --smz-color-line-strong: 203 213 225;
38
+ --smz-color-focus: 37 99 235;
39
+
40
+ --smz-font-sans: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
41
+ --smz-font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
42
+ --smz-text-xs: 0.75rem;
43
+ --smz-text-sm: 0.8125rem;
44
+ --smz-text-md: 0.875rem;
45
+ --smz-text-lg: 1rem;
46
+ --smz-text-xl: 1.125rem;
47
+ --smz-leading: 1.5;
48
+
49
+ --smz-control-h-sm: 2rem;
50
+ --smz-control-h: 2.5rem;
51
+ --smz-control-h-lg: 3rem;
52
+ --smz-control-px-sm: 0.75rem;
53
+ --smz-control-px: 1rem;
54
+ --smz-control-px-lg: 1.5rem;
55
+ /* Padding horizontal de campos de formulario (padrao: o mesmo dos controles); ajuste so os campos com este token. */
56
+ --smz-input-px-sm: var(--smz-control-px-sm);
57
+ --smz-input-px: var(--smz-control-px);
58
+
59
+ --smz-radius-control: 0.5rem;
60
+ --smz-radius-card: 0.75rem;
61
+ --smz-radius-overlay: 0.75rem;
62
+
63
+ --smz-shadow-card: 0 1px 2px rgb(0 0 0 / 0.06), 0 1px 3px rgb(0 0 0 / 0.1);
64
+ --smz-shadow-overlay: 0 8px 24px rgb(0 0 0 / 0.12), 0 2px 6px rgb(0 0 0 / 0.08);
65
+
66
+ --smz-duration: 150ms;
67
+ }
68
+
69
+ :root[data-smz-mode='dark'],
70
+ :root.app-dark,
71
+ :root.dark {
72
+ --smz-color-primary: 96 165 250;
73
+ --smz-color-primary-hover: 147 197 253;
74
+ --smz-color-primary-active: 191 219 254;
75
+ --smz-color-on-primary: 15 23 42;
76
+
77
+ --smz-color-surface-0: 2 6 23;
78
+ --smz-color-surface-1: 15 23 42;
79
+ --smz-color-surface-2: 30 41 59;
80
+ --smz-color-surface-3: 51 65 85;
81
+
82
+ --smz-color-fg: 241 245 249;
83
+ --smz-color-fg-muted: 203 213 225;
84
+ --smz-color-fg-subtle: 148 163 184;
85
+
86
+ --smz-color-line: 51 65 85;
87
+ --smz-color-line-strong: 71 85 105;
88
+ --smz-color-focus: 96 165 250;
89
+ }
@@ -2256,7 +2256,7 @@ declare class SmzPanelComponent {
2256
2256
  * O que alterna o painel: `icon` (padrao; so o botao) ou `header` (o cabecalho inteiro, exceto elementos
2257
2257
  * interativos dentro dele, como botoes do template `icons`). Equivale ao `toggler` do `p-panel`.
2258
2258
  */
2259
- readonly toggler: _angular_core.InputSignal<"icon" | "header">;
2259
+ readonly toggler: _angular_core.InputSignal<"header" | "icon">;
2260
2260
  /** Antes de alternar (cancelavel nao: apenas notifica). */
2261
2261
  readonly beforeToggle: _angular_core.OutputEmitterRef<{
2262
2262
  originalEvent: Event;
@@ -2391,6 +2391,12 @@ declare class SmzTreeTableComponent {
2391
2391
  readonly rowsPerPageOptions: _angular_core.InputSignal<number[]>;
2392
2392
  readonly sortField: _angular_core.ModelSignal<string>;
2393
2393
  readonly sortOrder: _angular_core.ModelSignal<1 | -1>;
2394
+ /**
2395
+ * Clicar na linha de um no com filhos expande/recolhe (e emite `nodeExpand`/`nodeCollapse`). Cliques em controles
2396
+ * interativos da linha (button, a, input, select, textarea, `[role=button]`, `[role=checkbox]`, `[data-no-row-toggle]`)
2397
+ * nao alternam. Enter/Espaco na linha focada tambem alternam.
2398
+ */
2399
+ readonly expandOnRowClick: _angular_core.InputSignalWithTransform<boolean, unknown>;
2394
2400
  /** Destaca a linha sob o cursor (padrao: ligado). */
2395
2401
  readonly rowHover: _angular_core.InputSignalWithTransform<boolean, unknown>;
2396
2402
  readonly showCurrentPageReport: _angular_core.InputSignalWithTransform<boolean, unknown>;
@@ -2449,13 +2455,17 @@ declare class SmzTreeTableComponent {
2449
2455
  private countNodes;
2450
2456
  private findParent;
2451
2457
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<SmzTreeTableComponent, never>;
2452
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<SmzTreeTableComponent, "ui-tree-table", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "columns": { "alias": "columns"; "required": false; "isSignal": true; }; "selectionMode": { "alias": "selectionMode"; "required": false; "isSignal": true; }; "selection": { "alias": "selection"; "required": false; "isSignal": true; }; "propagateSelectionUp": { "alias": "propagateSelectionUp"; "required": false; "isSignal": true; }; "propagateSelectionDown": { "alias": "propagateSelectionDown"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "scrollable": { "alias": "scrollable"; "required": false; "isSignal": true; }; "scrollHeight": { "alias": "scrollHeight"; "required": false; "isSignal": true; }; "emptyMessage": { "alias": "emptyMessage"; "required": false; "isSignal": true; }; "tableStyleClass": { "alias": "tableStyleClass"; "required": false; "isSignal": true; }; "paginator": { "alias": "paginator"; "required": false; "isSignal": true; }; "rows": { "alias": "rows"; "required": false; "isSignal": true; }; "first": { "alias": "first"; "required": false; "isSignal": true; }; "rowsPerPageOptions": { "alias": "rowsPerPageOptions"; "required": false; "isSignal": true; }; "sortField": { "alias": "sortField"; "required": false; "isSignal": true; }; "sortOrder": { "alias": "sortOrder"; "required": false; "isSignal": true; }; "rowHover": { "alias": "rowHover"; "required": false; "isSignal": true; }; "showCurrentPageReport": { "alias": "showCurrentPageReport"; "required": false; "isSignal": true; }; "currentPageReportTemplate": { "alias": "currentPageReportTemplate"; "required": false; "isSignal": true; }; "globalFilterFields": { "alias": "globalFilterFields"; "required": false; "isSignal": true; }; "filterMode": { "alias": "filterMode"; "required": false; "isSignal": true; }; }, { "selection": "selectionChange"; "rows": "rowsChange"; "first": "firstChange"; "sortField": "sortFieldChange"; "sortOrder": "sortOrderChange"; "nodeSelect": "nodeSelect"; "nodeUnselect": "nodeUnselect"; "nodeExpand": "nodeExpand"; "nodeCollapse": "nodeCollapse"; "sorted": "sorted"; "page": "page"; }, ["templates"], never, true, never>;
2458
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<SmzTreeTableComponent, "ui-tree-table", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "columns": { "alias": "columns"; "required": false; "isSignal": true; }; "selectionMode": { "alias": "selectionMode"; "required": false; "isSignal": true; }; "selection": { "alias": "selection"; "required": false; "isSignal": true; }; "propagateSelectionUp": { "alias": "propagateSelectionUp"; "required": false; "isSignal": true; }; "propagateSelectionDown": { "alias": "propagateSelectionDown"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "scrollable": { "alias": "scrollable"; "required": false; "isSignal": true; }; "scrollHeight": { "alias": "scrollHeight"; "required": false; "isSignal": true; }; "emptyMessage": { "alias": "emptyMessage"; "required": false; "isSignal": true; }; "tableStyleClass": { "alias": "tableStyleClass"; "required": false; "isSignal": true; }; "paginator": { "alias": "paginator"; "required": false; "isSignal": true; }; "rows": { "alias": "rows"; "required": false; "isSignal": true; }; "first": { "alias": "first"; "required": false; "isSignal": true; }; "rowsPerPageOptions": { "alias": "rowsPerPageOptions"; "required": false; "isSignal": true; }; "sortField": { "alias": "sortField"; "required": false; "isSignal": true; }; "sortOrder": { "alias": "sortOrder"; "required": false; "isSignal": true; }; "expandOnRowClick": { "alias": "expandOnRowClick"; "required": false; "isSignal": true; }; "rowHover": { "alias": "rowHover"; "required": false; "isSignal": true; }; "showCurrentPageReport": { "alias": "showCurrentPageReport"; "required": false; "isSignal": true; }; "currentPageReportTemplate": { "alias": "currentPageReportTemplate"; "required": false; "isSignal": true; }; "globalFilterFields": { "alias": "globalFilterFields"; "required": false; "isSignal": true; }; "filterMode": { "alias": "filterMode"; "required": false; "isSignal": true; }; }, { "selection": "selectionChange"; "rows": "rowsChange"; "first": "firstChange"; "sortField": "sortFieldChange"; "sortOrder": "sortOrderChange"; "nodeSelect": "nodeSelect"; "nodeUnselect": "nodeUnselect"; "nodeExpand": "nodeExpand"; "nodeCollapse": "nodeCollapse"; "sorted": "sorted"; "page": "page"; }, ["templates"], never, true, never>;
2453
2459
  }
2454
2460
  /** Linha do corpo: `<tr [smzTtRow]="rowNode">`. Cuida de estilo, aria e selecao por clique. */
2455
2461
  declare class SmzTreeTableRowDirective {
2456
2462
  protected readonly table: SmzTreeTableComponent;
2457
2463
  readonly rowNode: _angular_core.InputSignal<SmzTreeTableRowNode<any>>;
2464
+ /** A linha alterna o no (expandOnRowClick ligado e o no tem filhos). */
2465
+ protected readonly togglesOnRow: _angular_core.Signal<boolean>;
2458
2466
  protected readonly classes: _angular_core.Signal<string>;
2467
+ protected onClick(event: Event): void;
2468
+ protected onKey(event: Event): void;
2459
2469
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<SmzTreeTableRowDirective, never>;
2460
2470
  static ɵdir: _angular_core.ɵɵDirectiveDeclaration<SmzTreeTableRowDirective, "tr[smzTtRow]", never, { "rowNode": { "alias": "smzTtRow"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
2461
2471
  }
@@ -2463,9 +2473,15 @@ declare class SmzTreeTableRowDirective {
2463
2473
  declare class SmzTreeTableTogglerComponent {
2464
2474
  protected readonly table: SmzTreeTableComponent;
2465
2475
  readonly rowNode: _angular_core.InputSignal<SmzTreeTableRowNode<any>>;
2476
+ /**
2477
+ * Tamanho do alvo clicavel: `sm` 24px (denso), `md` 32px (padrao, minimo recomendado) e `lg` 40px. A margem negativa mantem
2478
+ * o espaco ocupado na linha (24px): so a area de clique cresce, sem mudar a altura da linha nem o visual da seta.
2479
+ */
2480
+ readonly size: _angular_core.InputSignal<"sm" | "md" | "lg">;
2481
+ protected readonly sizeClass: _angular_core.Signal<string>;
2466
2482
  protected hasChildren(): boolean;
2467
2483
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<SmzTreeTableTogglerComponent, never>;
2468
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<SmzTreeTableTogglerComponent, "ui-tree-table-toggler", never, { "rowNode": { "alias": "rowNode"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
2484
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<SmzTreeTableTogglerComponent, "ui-tree-table-toggler", never, { "rowNode": { "alias": "rowNode"; "required": true; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
2469
2485
  }
2470
2486
  /** Checkbox de selecao da linha (modo `checkbox`): `<ui-tree-table-checkbox [value]="rowNode" />`. */
2471
2487
  declare class SmzTreeTableCheckboxComponent {
@@ -2488,7 +2504,7 @@ declare class SmzTreeTableSortableColumnDirective {
2488
2504
  /** Coluna ordenada agora (inclui o `sortField`/`sortOrder` iniciais da tabela, sem precisar de clique). */
2489
2505
  protected readonly sorted: _angular_core.Signal<boolean>;
2490
2506
  protected readonly classes: _angular_core.Signal<string>;
2491
- protected readonly ariaSort: _angular_core.Signal<"none" | "ascending" | "descending">;
2507
+ protected readonly ariaSort: _angular_core.Signal<"ascending" | "descending" | "none">;
2492
2508
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<SmzTreeTableSortableColumnDirective, never>;
2493
2509
  static ɵdir: _angular_core.ɵɵDirectiveDeclaration<SmzTreeTableSortableColumnDirective, "th[smzTtSortableColumn]", never, { "field": { "alias": "smzTtSortableColumn"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
2494
2510
  }