@sixbell-telco/sdk 2.0.1 → 3.0.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.
Files changed (222) hide show
  1. package/CHANGELOG.md +134 -1
  2. package/README.md +360 -87
  3. package/_index.css +0 -3
  4. package/components/accordion/accordion-item/accordion-item.component.d.ts +3 -4
  5. package/components/audio-player/audio-timeline/audio-timeline.component.d.ts +28 -1
  6. package/components/audio-player/src/audio-player.component.d.ts +7 -3
  7. package/components/audio-player/volume-control/volume-control.component.d.ts +28 -1
  8. package/components/button/src/button.component.d.ts +46 -1
  9. package/components/card/card-actions/card-actions.component.d.ts +4 -4
  10. package/components/card/card-body/card-body.component.d.ts +5 -0
  11. package/components/card/card-context.d.ts +8 -0
  12. package/components/card/card-footer/card-footer.component.d.ts +7 -0
  13. package/components/card/card-header/card-header.component.d.ts +5 -0
  14. package/components/card/card-header-aside/card-header-aside.component.d.ts +5 -0
  15. package/components/card/card-section/card-section.component.d.ts +5 -0
  16. package/components/card/card-section-body/card-section-body.component.d.ts +5 -0
  17. package/components/card/card-section-footer/card-section-footer.component.d.ts +5 -0
  18. package/components/card/card-section-group/card-section-group.component.d.ts +16 -0
  19. package/components/card/card-section-header/card-section-header.component.d.ts +5 -0
  20. package/components/card/card-section-header-aside/card-section-header-aside.component.d.ts +5 -0
  21. package/components/card/card-subtitle/card-subtitle.component.d.ts +34 -0
  22. package/components/card/card-title/card-title.component.d.ts +23 -14
  23. package/components/card/public-api.d.ts +12 -1
  24. package/components/card/src/card.component.d.ts +5 -1
  25. package/components/data-table/actions/actions.component.d.ts +67 -0
  26. package/components/data-table/actions/actions.types.d.ts +38 -0
  27. package/components/data-table/data-table-empty-actions/data-table-empty-actions.component.d.ts +5 -0
  28. package/components/data-table/public-api.d.ts +3 -0
  29. package/components/data-table/sortable-header/sortable-header.component.d.ts +2 -0
  30. package/components/data-table/src/data-table.component.d.ts +24 -7
  31. package/components/dialog/src/dialog.component.d.ts +51 -5
  32. package/{directives/typography → components/divider}/index.d.ts +1 -1
  33. package/components/divider/public-api.d.ts +1 -0
  34. package/components/divider/src/divider.component.d.ts +13 -0
  35. package/components/dropdown/dropdown-content/dropdown-content.component.d.ts +2 -1
  36. package/components/dropdown/dropdown-item/dropdown-item.component.d.ts +37 -1
  37. package/components/dropdown/dropdown-item-checkbox/dropdown-item-checkbox.component.d.ts +33 -1
  38. package/components/dropdown/dropdown-item-radio/dropdown-item-radio.component.d.ts +33 -1
  39. package/components/dropdown/dropdown-trigger/dropdown-trigger.component.d.ts +53 -2
  40. package/components/dropdown/src/dropdown.component.d.ts +2 -2
  41. package/components/dropdown-menu/bar/dropdown-menu-bar-content/dropdown-menu-bar-content.component.d.ts +2 -1
  42. package/components/dropdown-menu/bar/dropdown-menu-bar-item/dropdown-menu-bar-item.component.d.ts +33 -1
  43. package/components/dropdown-menu/bar/dropdown-menu-bar-item-checkbox/dropdown-menu-bar-item-checkbox.component.d.ts +33 -1
  44. package/components/dropdown-menu/bar/dropdown-menu-bar-item-radio/dropdown-menu-bar-item-radio.component.d.ts +33 -1
  45. package/components/dropdown-menu/src/directives/dropdown-menu.directive.d.ts +1 -3
  46. package/components/dropdown-menu/src/dropdown-menu-content/dropdown-menu-content.component.d.ts +2 -1
  47. package/components/dropdown-menu/src/dropdown-menu-item/dropdown-menu-item.component.d.ts +33 -1
  48. package/components/dropdown-menu/src/dropdown-menu-sub-content/dropdown-menu-sub-content.component.d.ts +2 -1
  49. package/components/dual-list/src/dual-list.component.d.ts +3 -2
  50. package/components/file-upload/file-dropzone/file-dropzone.component.d.ts +46 -1
  51. package/components/file-upload/file-uploader/file-uploader.component.d.ts +33 -2
  52. package/components/forms/checkbox/src/checkbox.component.d.ts +46 -2
  53. package/components/forms/combobox/src/combobox.component.d.ts +40 -5
  54. package/components/forms/date-picker/src/date-picker.component.d.ts +14 -1
  55. package/components/forms/form-error/src/form-error.component.d.ts +8 -1
  56. package/components/forms/form-group/README.md +114 -0
  57. package/components/forms/form-group/index.d.ts +5 -0
  58. package/components/forms/form-group/public-api.d.ts +1 -0
  59. package/components/forms/form-group/src/form-group.component.d.ts +150 -0
  60. package/components/forms/form-item/README.md +17 -0
  61. package/components/forms/form-item/index.d.ts +5 -0
  62. package/components/forms/form-item/public-api.d.ts +1 -0
  63. package/components/forms/form-item/src/form-item.component.d.ts +5 -0
  64. package/components/forms/input/src/input.component.d.ts +32 -10
  65. package/components/forms/radio/src/radio.component.d.ts +46 -2
  66. package/components/forms/range/src/range.component.d.ts +38 -1
  67. package/components/forms/select/src/select.component.d.ts +40 -5
  68. package/components/forms/switch/src/switch.component.d.ts +46 -2
  69. package/components/forms/textarea/src/textarea.component.d.ts +49 -4
  70. package/components/forms/toggle/src/toggle.component.d.ts +46 -1
  71. package/components/overlay/overlay-content/overlay-content.component.d.ts +2 -1
  72. package/components/overlay/overlay-trigger/overlay-trigger.component.d.ts +37 -5
  73. package/components/overlay/src/overlay.component.d.ts +4 -5
  74. package/components/paginator/components/pagination-item/pagination-item.component.d.ts +46 -1
  75. package/components/paginator/src/paginator.component.d.ts +7 -1
  76. package/components/tab/directives/tab-content/tab-content.directive.d.ts +3 -4
  77. package/components/table/public-api.d.ts +2 -0
  78. package/components/table/src/table.component.d.ts +72 -7
  79. package/components/table/table-action/table-action.component.d.ts +2 -6
  80. package/components/table/table-actions/table-actions.component.d.ts +52 -6
  81. package/components/table/table-actions/table-actions.types.d.ts +28 -0
  82. package/components/table/table-empty-actions/table-empty-actions.component.d.ts +5 -0
  83. package/components/table/table-header-checkbox/table-header-checkbox.component.d.ts +5 -11
  84. package/components/table/table-row-checkbox/table-row-checkbox.component.d.ts +5 -11
  85. package/components/{toast → text}/index.d.ts +1 -1
  86. package/components/text/public-api.d.ts +2 -0
  87. package/components/text/src/text.component.d.ts +38 -0
  88. package/components/tooltip/src/tooltip.component.d.ts +10 -1
  89. package/components/wizard/wizard-marker/wizard-marker.component.d.ts +2 -3
  90. package/directives/auto-focus/src/auto-focus.directive.d.ts +5 -9
  91. package/directives/click-outside/src/click-outside.directive.d.ts +1 -3
  92. package/directives/only-numbers/public-api.d.ts +0 -5
  93. package/directives/only-numbers/src/only-numbers.directive.d.ts +1 -14
  94. package/directives/text/index.d.ts +5 -0
  95. package/directives/text/public-api.d.ts +1 -0
  96. package/directives/text/src/text.directive.d.ts +87 -0
  97. package/fesm2022/sixbell-telco-sdk-components-accordion.mjs +9 -12
  98. package/fesm2022/sixbell-telco-sdk-components-accordion.mjs.map +1 -1
  99. package/fesm2022/sixbell-telco-sdk-components-audio-player.mjs +130 -50
  100. package/fesm2022/sixbell-telco-sdk-components-audio-player.mjs.map +1 -1
  101. package/fesm2022/sixbell-telco-sdk-components-avatar.mjs +10 -11
  102. package/fesm2022/sixbell-telco-sdk-components-avatar.mjs.map +1 -1
  103. package/fesm2022/sixbell-telco-sdk-components-badge.mjs +3 -3
  104. package/fesm2022/sixbell-telco-sdk-components-badge.mjs.map +1 -1
  105. package/fesm2022/sixbell-telco-sdk-components-button.mjs +79 -5
  106. package/fesm2022/sixbell-telco-sdk-components-button.mjs.map +1 -1
  107. package/fesm2022/sixbell-telco-sdk-components-card.mjs +414 -47
  108. package/fesm2022/sixbell-telco-sdk-components-card.mjs.map +1 -1
  109. package/fesm2022/sixbell-telco-sdk-components-data-table-sub-component-toggle.mjs +1 -1
  110. package/fesm2022/sixbell-telco-sdk-components-data-table-sub-component-toggle.mjs.map +1 -1
  111. package/fesm2022/sixbell-telco-sdk-components-data-table.mjs +236 -59
  112. package/fesm2022/sixbell-telco-sdk-components-data-table.mjs.map +1 -1
  113. package/fesm2022/sixbell-telco-sdk-components-dialog.mjs +87 -17
  114. package/fesm2022/sixbell-telco-sdk-components-dialog.mjs.map +1 -1
  115. package/fesm2022/sixbell-telco-sdk-components-divider.mjs +44 -0
  116. package/fesm2022/sixbell-telco-sdk-components-divider.mjs.map +1 -0
  117. package/fesm2022/sixbell-telco-sdk-components-dropdown-menu-bar.mjs +166 -13
  118. package/fesm2022/sixbell-telco-sdk-components-dropdown-menu-bar.mjs.map +1 -1
  119. package/fesm2022/sixbell-telco-sdk-components-dropdown-menu.mjs +69 -21
  120. package/fesm2022/sixbell-telco-sdk-components-dropdown-menu.mjs.map +1 -1
  121. package/fesm2022/sixbell-telco-sdk-components-dropdown.mjs +283 -16
  122. package/fesm2022/sixbell-telco-sdk-components-dropdown.mjs.map +1 -1
  123. package/fesm2022/sixbell-telco-sdk-components-dual-list.mjs +8 -6
  124. package/fesm2022/sixbell-telco-sdk-components-dual-list.mjs.map +1 -1
  125. package/fesm2022/sixbell-telco-sdk-components-file-upload.mjs +148 -9
  126. package/fesm2022/sixbell-telco-sdk-components-file-upload.mjs.map +1 -1
  127. package/fesm2022/sixbell-telco-sdk-components-forms-checkbox.mjs +69 -3
  128. package/fesm2022/sixbell-telco-sdk-components-forms-checkbox.mjs.map +1 -1
  129. package/fesm2022/sixbell-telco-sdk-components-forms-combobox.mjs +96 -19
  130. package/fesm2022/sixbell-telco-sdk-components-forms-combobox.mjs.map +1 -1
  131. package/fesm2022/sixbell-telco-sdk-components-forms-date-picker.mjs +32 -6
  132. package/fesm2022/sixbell-telco-sdk-components-forms-date-picker.mjs.map +1 -1
  133. package/fesm2022/sixbell-telco-sdk-components-forms-form-error.mjs +12 -5
  134. package/fesm2022/sixbell-telco-sdk-components-forms-form-error.mjs.map +1 -1
  135. package/fesm2022/sixbell-telco-sdk-components-forms-form-group.mjs +159 -0
  136. package/fesm2022/sixbell-telco-sdk-components-forms-form-group.mjs.map +1 -0
  137. package/fesm2022/sixbell-telco-sdk-components-forms-form-item.mjs +20 -0
  138. package/fesm2022/sixbell-telco-sdk-components-forms-form-item.mjs.map +1 -0
  139. package/fesm2022/sixbell-telco-sdk-components-forms-input.mjs +48 -14
  140. package/fesm2022/sixbell-telco-sdk-components-forms-input.mjs.map +1 -1
  141. package/fesm2022/sixbell-telco-sdk-components-forms-radio.mjs +69 -3
  142. package/fesm2022/sixbell-telco-sdk-components-forms-radio.mjs.map +1 -1
  143. package/fesm2022/sixbell-telco-sdk-components-forms-range.mjs +57 -4
  144. package/fesm2022/sixbell-telco-sdk-components-forms-range.mjs.map +1 -1
  145. package/fesm2022/sixbell-telco-sdk-components-forms-select.mjs +89 -18
  146. package/fesm2022/sixbell-telco-sdk-components-forms-select.mjs.map +1 -1
  147. package/fesm2022/sixbell-telco-sdk-components-forms-switch.mjs +80 -6
  148. package/fesm2022/sixbell-telco-sdk-components-forms-switch.mjs.map +1 -1
  149. package/fesm2022/sixbell-telco-sdk-components-forms-textarea.mjs +112 -11
  150. package/fesm2022/sixbell-telco-sdk-components-forms-textarea.mjs.map +1 -1
  151. package/fesm2022/sixbell-telco-sdk-components-forms-toggle.mjs +71 -5
  152. package/fesm2022/sixbell-telco-sdk-components-forms-toggle.mjs.map +1 -1
  153. package/fesm2022/sixbell-telco-sdk-components-icon.mjs +2 -2
  154. package/fesm2022/sixbell-telco-sdk-components-icon.mjs.map +1 -1
  155. package/fesm2022/sixbell-telco-sdk-components-link.mjs +3 -3
  156. package/fesm2022/sixbell-telco-sdk-components-link.mjs.map +1 -1
  157. package/fesm2022/sixbell-telco-sdk-components-overlay.mjs +94 -42
  158. package/fesm2022/sixbell-telco-sdk-components-overlay.mjs.map +1 -1
  159. package/fesm2022/sixbell-telco-sdk-components-paginator.mjs +113 -24
  160. package/fesm2022/sixbell-telco-sdk-components-paginator.mjs.map +1 -1
  161. package/fesm2022/sixbell-telco-sdk-components-progress.mjs +3 -3
  162. package/fesm2022/sixbell-telco-sdk-components-progress.mjs.map +1 -1
  163. package/fesm2022/sixbell-telco-sdk-components-tab.mjs +5 -9
  164. package/fesm2022/sixbell-telco-sdk-components-tab.mjs.map +1 -1
  165. package/fesm2022/sixbell-telco-sdk-components-table.mjs +565 -89
  166. package/fesm2022/sixbell-telco-sdk-components-table.mjs.map +1 -1
  167. package/fesm2022/sixbell-telco-sdk-components-text.mjs +308 -0
  168. package/fesm2022/sixbell-telco-sdk-components-text.mjs.map +1 -0
  169. package/fesm2022/sixbell-telco-sdk-components-tooltip.mjs +15 -3
  170. package/fesm2022/sixbell-telco-sdk-components-tooltip.mjs.map +1 -1
  171. package/fesm2022/sixbell-telco-sdk-components-wizard.mjs +15 -15
  172. package/fesm2022/sixbell-telco-sdk-components-wizard.mjs.map +1 -1
  173. package/fesm2022/sixbell-telco-sdk-directives-auto-focus.mjs +16 -19
  174. package/fesm2022/sixbell-telco-sdk-directives-auto-focus.mjs.map +1 -1
  175. package/fesm2022/sixbell-telco-sdk-directives-click-outside.mjs +7 -10
  176. package/fesm2022/sixbell-telco-sdk-directives-click-outside.mjs.map +1 -1
  177. package/fesm2022/sixbell-telco-sdk-directives-only-numbers.mjs +11 -31
  178. package/fesm2022/sixbell-telco-sdk-directives-only-numbers.mjs.map +1 -1
  179. package/fesm2022/sixbell-telco-sdk-directives-text.mjs +160 -0
  180. package/fesm2022/sixbell-telco-sdk-directives-text.mjs.map +1 -0
  181. package/fesm2022/sixbell-telco-sdk-utils-formatting.mjs +490 -0
  182. package/fesm2022/sixbell-telco-sdk-utils-formatting.mjs.map +1 -0
  183. package/fesm2022/sixbell-telco-sdk-utils-theme.mjs +7 -12
  184. package/fesm2022/sixbell-telco-sdk-utils-theme.mjs.map +1 -1
  185. package/fesm2022/sixbell-telco-sdk-utils-translation.mjs +55 -12
  186. package/fesm2022/sixbell-telco-sdk-utils-translation.mjs.map +1 -1
  187. package/package.json +90 -74
  188. package/utils/formatting/README.md +100 -0
  189. package/utils/formatting/index.d.ts +5 -0
  190. package/utils/formatting/public-api.d.ts +9 -0
  191. package/utils/formatting/src/constants/constants.d.ts +18 -0
  192. package/utils/formatting/src/models/formatting.d.ts +33 -0
  193. package/utils/formatting/src/pipes/currency/st-currency.pipe.d.ts +9 -0
  194. package/utils/formatting/src/pipes/date/st-date.pipe.d.ts +9 -0
  195. package/utils/formatting/src/pipes/decimal/st-decimal.pipe.d.ts +9 -0
  196. package/utils/formatting/src/pipes/percent/st-percent.pipe.d.ts +9 -0
  197. package/utils/formatting/src/service/formatting.service.d.ts +13 -0
  198. package/utils/formatting/src/utils/date-format/date-format.d.ts +9 -0
  199. package/utils/formatting/src/utils/number-format/number-format.d.ts +12 -0
  200. package/utils/logger/README.md +8 -19
  201. package/utils/runtime-config/README.md +1 -1
  202. package/utils/theme/README.md +21 -2
  203. package/utils/theme/src/theme-dom/theme-dom.service.d.ts +2 -3
  204. package/utils/translation/README.md +40 -10
  205. package/utils/translation/public-api.d.ts +1 -1
  206. package/utils/translation/src/constants.d.ts +9 -2
  207. package/utils/translation/src/models/translation.d.ts +11 -0
  208. package/utils/translation/src/providers/translation.provider.d.ts +1 -1
  209. package/utils/translation/src/translation-dom/translation-dom.service.d.ts +2 -3
  210. package/utils/translation/src/translation.service.d.ts +6 -1
  211. package/assets/styles/toast.css +0 -63
  212. package/components/card/card-content/card-content.component.d.ts +0 -30
  213. package/components/toast/public-api.d.ts +0 -12
  214. package/components/toast/services/toast.service.d.ts +0 -35
  215. package/components/toast/toast-message/toast-message.component.d.ts +0 -29
  216. package/components/toast/toasts-container/toasts-container.component.d.ts +0 -21
  217. package/directives/typography/public-api.d.ts +0 -1
  218. package/directives/typography/src/typography.directive.d.ts +0 -68
  219. package/fesm2022/sixbell-telco-sdk-components-toast.mjs +0 -185
  220. package/fesm2022/sixbell-telco-sdk-components-toast.mjs.map +0 -1
  221. package/fesm2022/sixbell-telco-sdk-directives-typography.mjs +0 -126
  222. package/fesm2022/sixbell-telco-sdk-directives-typography.mjs.map +0 -1
@@ -1,18 +1,21 @@
1
1
  import * as i1 from '@angular/common';
2
2
  import { CommonModule } from '@angular/common';
3
3
  import * as i0 from '@angular/core';
4
- import { input, signal, Host, ChangeDetectionStrategy, Component, output, computed, contentChild, contentChildren, effect } from '@angular/core';
5
- import { TranslatePipe } from '@ngx-translate/core';
4
+ import { input, signal, inject, computed, ChangeDetectionStrategy, Component, output, contentChild, contentChildren, effect } from '@angular/core';
5
+ import { heroDocumentText, heroMagnifyingGlass } from '@ng-icons/heroicons/outline';
6
6
  import { SelectComponent } from '@sixbell-telco/sdk/components/forms/select';
7
7
  import { IconComponent } from '@sixbell-telco/sdk/components/icon';
8
- import { matInfoOutline } from '@sixbell-telco/sdk/components/icon/material/outline';
9
8
  import { PaginatorComponent } from '@sixbell-telco/sdk/components/paginator';
10
- import { TypographyDirective } from '@sixbell-telco/sdk/directives/typography';
9
+ import { TextDirective } from '@sixbell-telco/sdk/directives/text';
11
10
  import { cn } from '@sixbell-telco/sdk/utils/cn';
11
+ import { TranslateService, TranslatePipe } from '@sixbell-telco/sdk/utils/translation';
12
12
  import { cva } from 'class-variance-authority';
13
13
  import { CheckboxComponent } from '@sixbell-telco/sdk/components/forms/checkbox';
14
+ import { TranslatePipe as TranslatePipe$1 } from '@ngx-translate/core';
14
15
  import { ButtonComponent } from '@sixbell-telco/sdk/components/button';
15
16
  import { TooltipComponent } from '@sixbell-telco/sdk/components/tooltip';
17
+ import { DropdownMenuComponent, DropdownMenuTriggerComponent, DropdownMenuContentComponent, DropdownMenuItemComponent } from '@sixbell-telco/sdk/components/dropdown-menu';
18
+ import { matMoreVert } from '@sixbell-telco/sdk/components/icon/material/baseline';
16
19
 
17
20
  /**
18
21
  * Header checkbox component for the table.
@@ -30,19 +33,12 @@ import { TooltipComponent } from '@sixbell-telco/sdk/components/tooltip';
30
33
  * ```
31
34
  */
32
35
  class TableHeaderCheckboxComponent {
33
- table;
34
36
  /**
35
37
  * Defines the variant styling of the checkbox.
36
38
  *
37
39
  * @defaultValue 'primary'
38
40
  */
39
41
  checkboxVariant = input('primary');
40
- /**
41
- * Defines the size of the checkbox.
42
- *
43
- * @defaultValue 'md'
44
- */
45
- checkboxSize = input('sm');
46
42
  /**
47
43
  * Signal that tracks the checked state of the header checkbox.
48
44
  *
@@ -54,9 +50,23 @@ class TableHeaderCheckboxComponent {
54
50
  *
55
51
  * @param table - Reference to the parent {@link TableComponent} to access table-level operations.
56
52
  */
57
- constructor(table) {
58
- this.table = table;
59
- }
53
+ table = inject(TableComponent, { host: true });
54
+ checkboxSize = computed(() => {
55
+ switch (this.table.size()) {
56
+ case 'xs':
57
+ return 'xs';
58
+ case 'sm':
59
+ return 'sm';
60
+ case 'md':
61
+ return 'md';
62
+ case 'lg':
63
+ return 'lg';
64
+ case 'xl':
65
+ return 'lg';
66
+ default:
67
+ return 'sm';
68
+ }
69
+ });
60
70
  /**
61
71
  * Handles the event when the header checkbox is toggled.
62
72
  *
@@ -67,15 +77,13 @@ class TableHeaderCheckboxComponent {
67
77
  handleSelectAll(value) {
68
78
  this.table.handleToggleAll(value);
69
79
  }
70
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: TableHeaderCheckboxComponent, deps: [{ token: TableComponent, host: true }], target: i0.ɵɵFactoryTarget.Component });
71
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.0", type: TableHeaderCheckboxComponent, isStandalone: true, selector: "tr[header-checkbox]", inputs: { checkboxVariant: { classPropertyName: "checkboxVariant", publicName: "checkboxVariant", isSignal: true, isRequired: false, transformFunction: null }, checkboxSize: { classPropertyName: "checkboxSize", publicName: "checkboxSize", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<th class=\"w-6\">\n\t<st-checkbox [(value)]=\"checked\" (valueUpdated)=\"handleSelectAll($event)\" [variant]=\"checkboxVariant()\" [size]=\"checkboxSize()\" />\n</th>\n<ng-content></ng-content>\n", dependencies: [{ kind: "component", type: CheckboxComponent, selector: "st-checkbox", inputs: ["variant", "size", "label", "name", "value", "disabled"], outputs: ["valueChange", "valueUpdated", "disabledChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
80
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: TableHeaderCheckboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
81
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.0", type: TableHeaderCheckboxComponent, isStandalone: true, selector: "tr[header-checkbox]", inputs: { checkboxVariant: { classPropertyName: "checkboxVariant", publicName: "checkboxVariant", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<th class=\"w-6\">\n\t<st-checkbox [(value)]=\"checked\" (valueUpdated)=\"handleSelectAll($event)\" [variant]=\"checkboxVariant()\" [size]=\"checkboxSize()\" />\n</th>\n<ng-content></ng-content>\n", dependencies: [{ kind: "component", type: CheckboxComponent, selector: "st-checkbox", inputs: ["variant", "size", "label", "name", "value", "parentForm", "formControlName", "stopPropagation", "disabled"], outputs: ["valueChange", "valueUpdated", "clicked", "keyDownEnter", "keyDownSpace", "triggered", "disabledChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
72
82
  }
73
83
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: TableHeaderCheckboxComponent, decorators: [{
74
84
  type: Component,
75
85
  args: [{ selector: 'tr[header-checkbox]', imports: [CheckboxComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<th class=\"w-6\">\n\t<st-checkbox [(value)]=\"checked\" (valueUpdated)=\"handleSelectAll($event)\" [variant]=\"checkboxVariant()\" [size]=\"checkboxSize()\" />\n</th>\n<ng-content></ng-content>\n" }]
76
- }], ctorParameters: () => [{ type: TableComponent, decorators: [{
77
- type: Host
78
- }] }] });
86
+ }] });
79
87
 
80
88
  /**
81
89
  * Row checkbox component for table row selection.
@@ -90,19 +98,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImpor
90
98
  * ```
91
99
  */
92
100
  class TableRowCheckboxComponent {
93
- table;
94
101
  /**
95
102
  * Defines the variant styling of the checkbox.
96
103
  *
97
104
  * @defaultValue 'primary'
98
105
  */
99
106
  checkboxVariant = input('primary');
100
- /**
101
- * Defines the size of the checkbox.
102
- *
103
- * @defaultValue 'md'
104
- */
105
- checkboxSize = input('md');
106
107
  /**
107
108
  * Unique identifier for the table row.
108
109
  *
@@ -121,9 +122,23 @@ class TableRowCheckboxComponent {
121
122
  * @param table - Reference to the parent {@link TableComponent} to access
122
123
  * table-level operations for row selection.
123
124
  */
124
- constructor(table) {
125
- this.table = table;
126
- }
125
+ table = inject(TableComponent, { host: true });
126
+ checkboxSize = computed(() => {
127
+ switch (this.table.size()) {
128
+ case 'xs':
129
+ return 'xs';
130
+ case 'sm':
131
+ return 'sm';
132
+ case 'md':
133
+ return 'md';
134
+ case 'lg':
135
+ return 'lg';
136
+ case 'xl':
137
+ return 'lg';
138
+ default:
139
+ return 'sm';
140
+ }
141
+ });
127
142
  /**
128
143
  * Handles the selection event of the row checkbox.
129
144
  *
@@ -135,16 +150,344 @@ class TableRowCheckboxComponent {
135
150
  handleSelect(value) {
136
151
  this.table.handleToggleCheckbox(value, this.identifier());
137
152
  }
138
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: TableRowCheckboxComponent, deps: [{ token: TableComponent, host: true }], target: i0.ɵɵFactoryTarget.Component });
139
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.0", type: TableRowCheckboxComponent, isStandalone: true, selector: "tr[row-checkbox]", inputs: { checkboxVariant: { classPropertyName: "checkboxVariant", publicName: "checkboxVariant", isSignal: true, isRequired: false, transformFunction: null }, checkboxSize: { classPropertyName: "checkboxSize", publicName: "checkboxSize", isSignal: true, isRequired: false, transformFunction: null }, identifier: { classPropertyName: "identifier", publicName: "identifier", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<td>\n\t<st-checkbox [(value)]=\"checked\" (valueUpdated)=\"handleSelect($event)\" [variant]=\"checkboxVariant()\" [size]=\"checkboxSize()\"></st-checkbox>\n</td>\n<ng-content></ng-content>\n", dependencies: [{ kind: "component", type: CheckboxComponent, selector: "st-checkbox", inputs: ["variant", "size", "label", "name", "value", "disabled"], outputs: ["valueChange", "valueUpdated", "disabledChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
153
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: TableRowCheckboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
154
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.0", type: TableRowCheckboxComponent, isStandalone: true, selector: "tr[row-checkbox]", inputs: { checkboxVariant: { classPropertyName: "checkboxVariant", publicName: "checkboxVariant", isSignal: true, isRequired: false, transformFunction: null }, identifier: { classPropertyName: "identifier", publicName: "identifier", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<td>\n\t<st-checkbox [(value)]=\"checked\" (valueUpdated)=\"handleSelect($event)\" [variant]=\"checkboxVariant()\" [size]=\"checkboxSize()\"></st-checkbox>\n</td>\n<ng-content></ng-content>\n", dependencies: [{ kind: "component", type: CheckboxComponent, selector: "st-checkbox", inputs: ["variant", "size", "label", "name", "value", "parentForm", "formControlName", "stopPropagation", "disabled"], outputs: ["valueChange", "valueUpdated", "clicked", "keyDownEnter", "keyDownSpace", "triggered", "disabledChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
140
155
  }
141
156
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: TableRowCheckboxComponent, decorators: [{
142
157
  type: Component,
143
158
  args: [{ selector: 'tr[row-checkbox]', imports: [CheckboxComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<td>\n\t<st-checkbox [(value)]=\"checked\" (valueUpdated)=\"handleSelect($event)\" [variant]=\"checkboxVariant()\" [size]=\"checkboxSize()\"></st-checkbox>\n</td>\n<ng-content></ng-content>\n" }]
144
- }], ctorParameters: () => [{ type: TableComponent, decorators: [{
145
- type: Host
146
- }] }] });
159
+ }] });
147
160
 
161
+ const TABLE_HEADER_TYPOGRAPHY_CLASS_BY_PRESET = {
162
+ '6': [
163
+ '[&_thead_th]:text-[15.75px]',
164
+ '[&_thead_th]:leading-normal',
165
+ '[&_thead_th]:tracking-normal',
166
+ '[&_thead_th]:font-heading',
167
+ '[&_thead_th]:font-semibold',
168
+ '[&_thead_th]:align-middle',
169
+ '[&_thead_td]:text-[15.75px]',
170
+ '[&_thead_td]:leading-normal',
171
+ '[&_thead_td]:tracking-normal',
172
+ '[&_thead_td]:font-heading',
173
+ '[&_thead_td]:font-semibold',
174
+ '[&_thead_td]:align-middle',
175
+ ],
176
+ '7': [
177
+ '[&_thead_th]:text-[14px]',
178
+ '[&_thead_th]:leading-normal',
179
+ '[&_thead_th]:tracking-tight',
180
+ '[&_thead_th]:font-heading',
181
+ '[&_thead_th]:font-semibold',
182
+ '[&_thead_th]:align-middle',
183
+ '[&_thead_td]:text-[14px]',
184
+ '[&_thead_td]:leading-normal',
185
+ '[&_thead_td]:tracking-tight',
186
+ '[&_thead_td]:font-heading',
187
+ '[&_thead_td]:font-semibold',
188
+ '[&_thead_td]:align-middle',
189
+ ],
190
+ '8': [
191
+ '[&_thead_th]:text-[12.44px]',
192
+ '[&_thead_th]:leading-normal',
193
+ '[&_thead_th]:tracking-tight',
194
+ '[&_thead_th]:font-heading',
195
+ '[&_thead_th]:font-semibold',
196
+ '[&_thead_th]:align-middle',
197
+ '[&_thead_td]:text-[12.44px]',
198
+ '[&_thead_td]:leading-normal',
199
+ '[&_thead_td]:tracking-tight',
200
+ '[&_thead_td]:font-heading',
201
+ '[&_thead_td]:font-semibold',
202
+ '[&_thead_td]:align-middle',
203
+ ],
204
+ '9': [
205
+ '[&_thead_th]:text-[11.06px]',
206
+ '[&_thead_th]:leading-normal',
207
+ '[&_thead_th]:tracking-tight',
208
+ '[&_thead_th]:font-heading',
209
+ '[&_thead_th]:font-semibold',
210
+ '[&_thead_th]:align-middle',
211
+ '[&_thead_td]:text-[11.06px]',
212
+ '[&_thead_td]:leading-normal',
213
+ '[&_thead_td]:tracking-tight',
214
+ '[&_thead_td]:font-heading',
215
+ '[&_thead_td]:font-semibold',
216
+ '[&_thead_td]:align-middle',
217
+ ],
218
+ '10': [
219
+ '[&_thead_th]:text-[9.83px]',
220
+ '[&_thead_th]:leading-normal',
221
+ '[&_thead_th]:tracking-normal',
222
+ '[&_thead_th]:font-heading',
223
+ '[&_thead_th]:font-semibold',
224
+ '[&_thead_th]:align-middle',
225
+ '[&_thead_td]:text-[9.83px]',
226
+ '[&_thead_td]:leading-normal',
227
+ '[&_thead_td]:tracking-normal',
228
+ '[&_thead_td]:font-heading',
229
+ '[&_thead_td]:font-semibold',
230
+ '[&_thead_td]:align-middle',
231
+ ],
232
+ };
233
+ const TABLE_BODY_TYPOGRAPHY_CLASS_BY_PRESET = {
234
+ '6': [
235
+ '[&_tbody_td]:text-[15.75px]',
236
+ '[&_tbody_td]:leading-normal',
237
+ '[&_tbody_td]:tracking-normal',
238
+ '[&_tbody_td]:font-body',
239
+ '[&_tbody_td]:font-normal',
240
+ '[&_tbody_td]:align-middle',
241
+ '[&_tbody_th]:text-[15.75px]',
242
+ '[&_tbody_th]:leading-normal',
243
+ '[&_tbody_th]:tracking-normal',
244
+ '[&_tbody_th]:font-body',
245
+ '[&_tbody_th]:font-normal',
246
+ '[&_tbody_th]:align-middle',
247
+ ],
248
+ '7': [
249
+ '[&_tbody_td]:text-[14px]',
250
+ '[&_tbody_td]:leading-normal',
251
+ '[&_tbody_td]:tracking-tight',
252
+ '[&_tbody_td]:font-body',
253
+ '[&_tbody_td]:font-normal',
254
+ '[&_tbody_td]:align-middle',
255
+ '[&_tbody_th]:text-[14px]',
256
+ '[&_tbody_th]:leading-normal',
257
+ '[&_tbody_th]:tracking-tight',
258
+ '[&_tbody_th]:font-body',
259
+ '[&_tbody_th]:font-normal',
260
+ '[&_tbody_th]:align-middle',
261
+ ],
262
+ '8': [
263
+ '[&_tbody_td]:text-[12.44px]',
264
+ '[&_tbody_td]:leading-normal',
265
+ '[&_tbody_td]:tracking-tight',
266
+ '[&_tbody_td]:font-body',
267
+ '[&_tbody_td]:font-normal',
268
+ '[&_tbody_td]:align-middle',
269
+ '[&_tbody_th]:text-[12.44px]',
270
+ '[&_tbody_th]:leading-normal',
271
+ '[&_tbody_th]:tracking-tight',
272
+ '[&_tbody_th]:font-body',
273
+ '[&_tbody_th]:font-normal',
274
+ '[&_tbody_th]:align-middle',
275
+ ],
276
+ '9': [
277
+ '[&_tbody_td]:text-[11.06px]',
278
+ '[&_tbody_td]:leading-normal',
279
+ '[&_tbody_td]:tracking-tight',
280
+ '[&_tbody_td]:font-body',
281
+ '[&_tbody_td]:font-normal',
282
+ '[&_tbody_td]:align-middle',
283
+ '[&_tbody_th]:text-[11.06px]',
284
+ '[&_tbody_th]:leading-normal',
285
+ '[&_tbody_th]:tracking-tight',
286
+ '[&_tbody_th]:font-body',
287
+ '[&_tbody_th]:font-normal',
288
+ '[&_tbody_th]:align-middle',
289
+ ],
290
+ '10': [
291
+ '[&_tbody_td]:text-[9.83px]',
292
+ '[&_tbody_td]:leading-normal',
293
+ '[&_tbody_td]:tracking-normal',
294
+ '[&_tbody_td]:font-body',
295
+ '[&_tbody_td]:font-normal',
296
+ '[&_tbody_td]:align-middle',
297
+ '[&_tbody_th]:text-[9.83px]',
298
+ '[&_tbody_th]:leading-normal',
299
+ '[&_tbody_th]:tracking-normal',
300
+ '[&_tbody_th]:font-body',
301
+ '[&_tbody_th]:font-normal',
302
+ '[&_tbody_th]:align-middle',
303
+ ],
304
+ };
305
+ const TABLE_FOOTER_TYPOGRAPHY_CLASS_BY_PRESET = {
306
+ '6': [
307
+ '[&_tfoot_td]:text-[15.75px]',
308
+ '[&_tfoot_td]:leading-normal',
309
+ '[&_tfoot_td]:tracking-normal',
310
+ '[&_tfoot_td]:font-body',
311
+ '[&_tfoot_td]:font-normal',
312
+ '[&_tfoot_td]:align-middle',
313
+ '[&_tfoot_th]:text-[15.75px]',
314
+ '[&_tfoot_th]:leading-normal',
315
+ '[&_tfoot_th]:tracking-normal',
316
+ '[&_tfoot_th]:font-body',
317
+ '[&_tfoot_th]:font-normal',
318
+ '[&_tfoot_th]:align-middle',
319
+ ],
320
+ '7': [
321
+ '[&_tfoot_td]:text-[14px]',
322
+ '[&_tfoot_td]:leading-normal',
323
+ '[&_tfoot_td]:tracking-tight',
324
+ '[&_tfoot_td]:font-body',
325
+ '[&_tfoot_td]:font-normal',
326
+ '[&_tfoot_td]:align-middle',
327
+ '[&_tfoot_th]:text-[14px]',
328
+ '[&_tfoot_th]:leading-normal',
329
+ '[&_tfoot_th]:tracking-tight',
330
+ '[&_tfoot_th]:font-body',
331
+ '[&_tfoot_th]:font-normal',
332
+ '[&_tfoot_th]:align-middle',
333
+ ],
334
+ '8': [
335
+ '[&_tfoot_td]:text-[12.44px]',
336
+ '[&_tfoot_td]:leading-normal',
337
+ '[&_tfoot_td]:tracking-tight',
338
+ '[&_tfoot_td]:font-body',
339
+ '[&_tfoot_td]:font-normal',
340
+ '[&_tfoot_td]:align-middle',
341
+ '[&_tfoot_th]:text-[12.44px]',
342
+ '[&_tfoot_th]:leading-normal',
343
+ '[&_tfoot_th]:tracking-tight',
344
+ '[&_tfoot_th]:font-body',
345
+ '[&_tfoot_th]:font-normal',
346
+ '[&_tfoot_th]:align-middle',
347
+ ],
348
+ '9': [
349
+ '[&_tfoot_td]:text-[11.06px]',
350
+ '[&_tfoot_td]:leading-normal',
351
+ '[&_tfoot_td]:tracking-tight',
352
+ '[&_tfoot_td]:font-body',
353
+ '[&_tfoot_td]:font-normal',
354
+ '[&_tfoot_td]:align-middle',
355
+ '[&_tfoot_th]:text-[11.06px]',
356
+ '[&_tfoot_th]:leading-normal',
357
+ '[&_tfoot_th]:tracking-tight',
358
+ '[&_tfoot_th]:font-body',
359
+ '[&_tfoot_th]:font-normal',
360
+ '[&_tfoot_th]:align-middle',
361
+ ],
362
+ '10': [
363
+ '[&_tfoot_td]:text-[9.83px]',
364
+ '[&_tfoot_td]:leading-normal',
365
+ '[&_tfoot_td]:tracking-normal',
366
+ '[&_tfoot_td]:font-body',
367
+ '[&_tfoot_td]:font-normal',
368
+ '[&_tfoot_td]:align-middle',
369
+ '[&_tfoot_th]:text-[9.83px]',
370
+ '[&_tfoot_th]:leading-normal',
371
+ '[&_tfoot_th]:tracking-normal',
372
+ '[&_tfoot_th]:font-body',
373
+ '[&_tfoot_th]:font-normal',
374
+ '[&_tfoot_th]:align-middle',
375
+ ],
376
+ };
377
+ const TABLE_SIZE_TOKENS = {
378
+ xs: {
379
+ headerPreset: '9',
380
+ bodyPreset: '9',
381
+ footerPreset: '10',
382
+ selectSize: 'xs',
383
+ paginatorSize: 'xs',
384
+ checkboxSize: 'xs',
385
+ actionSize: 'xs',
386
+ sortableButtonSize: 'xs',
387
+ sortableIconSize: 'xs',
388
+ },
389
+ sm: {
390
+ headerPreset: '8',
391
+ bodyPreset: '8',
392
+ footerPreset: '9',
393
+ selectSize: 'sm',
394
+ paginatorSize: 'sm',
395
+ checkboxSize: 'sm',
396
+ actionSize: 'xs',
397
+ sortableButtonSize: 'xs',
398
+ sortableIconSize: 'xs',
399
+ },
400
+ md: {
401
+ headerPreset: '7',
402
+ bodyPreset: '7',
403
+ footerPreset: '8',
404
+ selectSize: 'sm',
405
+ paginatorSize: 'sm',
406
+ checkboxSize: 'md',
407
+ actionSize: 'sm',
408
+ sortableButtonSize: 'sm',
409
+ sortableIconSize: 'sm',
410
+ },
411
+ lg: {
412
+ headerPreset: '7',
413
+ bodyPreset: '7',
414
+ footerPreset: '8',
415
+ selectSize: 'md',
416
+ paginatorSize: 'md',
417
+ checkboxSize: 'lg',
418
+ actionSize: 'md',
419
+ sortableButtonSize: 'md',
420
+ sortableIconSize: 'sm',
421
+ },
422
+ xl: {
423
+ headerPreset: '6',
424
+ bodyPreset: '6',
425
+ footerPreset: '7',
426
+ selectSize: 'lg',
427
+ paginatorSize: 'lg',
428
+ checkboxSize: 'lg',
429
+ actionSize: 'lg',
430
+ sortableButtonSize: 'lg',
431
+ sortableIconSize: 'md',
432
+ },
433
+ };
434
+ const TABLE_FOOTER_LAYOUT_BY_SIZE = {
435
+ xs: {
436
+ wrapper: ['gap-2', 'pb-1'],
437
+ divider: ['px-3'],
438
+ content: ['gap-2', 'px-3', '@2xl:gap-2'],
439
+ },
440
+ sm: {
441
+ wrapper: ['gap-3', 'pb-2'],
442
+ divider: ['px-3'],
443
+ content: ['gap-2', 'px-3', '@2xl:gap-2'],
444
+ },
445
+ md: {
446
+ wrapper: ['gap-4', 'pb-3'],
447
+ divider: ['px-4'],
448
+ content: ['gap-4', 'px-4', '@2xl:gap-2'],
449
+ },
450
+ lg: {
451
+ wrapper: ['gap-4', 'pb-3'],
452
+ divider: ['px-4'],
453
+ content: ['gap-4', 'px-4', '@2xl:gap-2'],
454
+ },
455
+ xl: {
456
+ wrapper: ['gap-4', 'pb-3'],
457
+ divider: ['px-4'],
458
+ content: ['gap-4', 'px-4', '@2xl:gap-2'],
459
+ },
460
+ };
461
+ function resolveTableSize(size) {
462
+ switch (size) {
463
+ case 'xs':
464
+ case 'sm':
465
+ case 'md':
466
+ case 'lg':
467
+ case 'xl':
468
+ return size;
469
+ default:
470
+ return 'sm';
471
+ }
472
+ }
473
+ function getTableSizeTokens(size) {
474
+ return TABLE_SIZE_TOKENS[resolveTableSize(size)];
475
+ }
476
+ function getTableFooterLayoutTokens(size) {
477
+ return TABLE_FOOTER_LAYOUT_BY_SIZE[resolveTableSize(size)];
478
+ }
479
+ function getTableHierarchyTypographyClasses(size) {
480
+ const tokens = TABLE_SIZE_TOKENS[size];
481
+ const headerPreset = tokens.headerPreset;
482
+ const bodyPreset = tokens.bodyPreset;
483
+ const footerPreset = tokens.footerPreset;
484
+ return [
485
+ ...TABLE_HEADER_TYPOGRAPHY_CLASS_BY_PRESET[headerPreset],
486
+ ...TABLE_BODY_TYPOGRAPHY_CLASS_BY_PRESET[bodyPreset],
487
+ ...TABLE_FOOTER_TYPOGRAPHY_CLASS_BY_PRESET[footerPreset],
488
+ '[&_thead_th]:align-middle',
489
+ ];
490
+ }
148
491
  /** Type definition for pagination display variants */
149
492
  /**
150
493
  * @internal
@@ -156,21 +499,17 @@ const tableContent = cva([
156
499
  'border-separate',
157
500
  'border-spacing-0',
158
501
  'text-pretty',
159
- '[&_tbody]:font-body',
160
- '[&_thead]:font-heading',
161
- '[&_thead]:leading-normal',
162
- '[&_tbody]:leading-tight',
163
502
  '[&_th]:bg-neutral [&_th]:text-neutral-content',
164
503
  '[&_th]:px-4',
165
504
  '[&_td]:px-4',
166
505
  ], {
167
506
  variants: {
168
507
  size: {
169
- xs: ['table-xs'],
170
- sm: ['table-sm'],
171
- md: ['table-md'],
172
- lg: ['table-lg'],
173
- xl: ['table-xl'],
508
+ xs: ['table-xs', ...getTableHierarchyTypographyClasses('xs')],
509
+ sm: ['table-sm', ...getTableHierarchyTypographyClasses('sm')],
510
+ md: ['table-md', ...getTableHierarchyTypographyClasses('md')],
511
+ lg: ['table-lg', ...getTableHierarchyTypographyClasses('lg')],
512
+ xl: ['table-xl', ...getTableHierarchyTypographyClasses('xl')],
174
513
  },
175
514
  },
176
515
  compoundVariants: [],
@@ -187,10 +526,10 @@ const tableContainer = cva(['rounded-t-box', 'overflow-y-clip'], {
187
526
  containerHeight: {
188
527
  auto: ['h-auto'],
189
528
  full: ['h-full'],
190
- sm: ['min-h-72 h-72 overscroll-contain overflow-y-auto'],
191
- md: ['min-h-80 h-80 overscroll-contain overflow-y-auto'],
192
- lg: ['min-h-96 h-lg overscroll-contain overflow-y-auto'],
193
- xl: ['min-h-[36rem] h-[36rem] overscroll-contain overflow-y-auto'],
529
+ sm: ['h-72 min-h-72 overflow-y-auto overscroll-contain'],
530
+ md: ['h-80 min-h-80 overflow-y-auto overscroll-contain'],
531
+ lg: ['h-lg min-h-96 overflow-y-auto overscroll-contain'],
532
+ xl: ['h-[36rem] min-h-[36rem] overflow-y-auto overscroll-contain'],
194
533
  },
195
534
  },
196
535
  compoundVariants: [],
@@ -226,6 +565,7 @@ const tableComponent = ({ size, containerHeight } = {}) => cn(tableContent({ siz
226
565
  * ```
227
566
  */
228
567
  class TableComponent {
568
+ translationService = inject(TranslateService);
229
569
  /**
230
570
  * Table size variant
231
571
  * @defaultValue 'sm'
@@ -256,8 +596,16 @@ class TableComponent {
256
596
  * @defaultValue 'default'
257
597
  */
258
598
  paginatorType = input('default');
259
- /** @internal Info icon reference */
260
- infoIcon = matInfoOutline;
599
+ /**
600
+ * Empty state icon for no data state
601
+ * @defaultValue heroDocumentText
602
+ */
603
+ noDataIcon = input(heroDocumentText);
604
+ /**
605
+ * Empty state icon for no results state
606
+ * @defaultValue heroMagnifyingGlass
607
+ */
608
+ noResultsIcon = input(heroMagnifyingGlass);
261
609
  /**
262
610
  * Array of data items to display
263
611
  * @defaultValue []
@@ -287,6 +635,17 @@ class TableComponent {
287
635
  pageChanged = output();
288
636
  /** Event emitted when page size changes */
289
637
  pageSizeChanged = output();
638
+ ENTRIES = [5, 10, 20, 50, 100];
639
+ entriesPerPageOptions = computed(() => {
640
+ return this.ENTRIES.map((n) => {
641
+ const translatedText = this.translationService.instant('sdk.table.perPage', { count: n });
642
+ const fallbackText = `${n} / page`;
643
+ return {
644
+ value: n,
645
+ text: translatedText && translatedText !== 'sdk.table.perPage' ? translatedText : fallbackText,
646
+ };
647
+ });
648
+ });
290
649
  /**
291
650
  * Show items per page selector
292
651
  * @defaultValue true
@@ -307,6 +666,11 @@ class TableComponent {
307
666
  * @defaultValue true
308
667
  */
309
668
  showFooter = input(true);
669
+ /**
670
+ * Function to determine if any filters are currently active
671
+ * This allows the parent component to define what constitutes an "active filter"
672
+ */
673
+ hasActiveFiltersCallback = input();
310
674
  /**
311
675
  * Controls whether table headers should overflow with horizontal scrolling (true)
312
676
  * or wrap text normally (false)
@@ -322,6 +686,31 @@ class TableComponent {
322
686
  const totalItems = this.totalItems();
323
687
  return Math.ceil(totalItems / itemsPerPage);
324
688
  });
689
+ /**
690
+ * Computed boolean indicating if any filters are currently active
691
+ */
692
+ hasActiveFilters = computed(() => {
693
+ const callback = this.hasActiveFiltersCallback();
694
+ if (callback) {
695
+ return callback();
696
+ }
697
+ const pagination = this.pagination();
698
+ return !!pagination.search?.trim();
699
+ });
700
+ /**
701
+ * Computed boolean indicating if we should show "no results" vs "no data"
702
+ */
703
+ hasNoResults = computed(() => {
704
+ const hasItems = this.totalItems() > 0 || this.data().length > 0;
705
+ return !hasItems && this.hasActiveFilters();
706
+ });
707
+ /**
708
+ * Computed boolean indicating if we should show "no data" state
709
+ */
710
+ hasNoData = computed(() => {
711
+ const hasItems = this.totalItems() > 0 || this.data().length > 0;
712
+ return !hasItems && !this.hasActiveFilters();
713
+ });
325
714
  /**
326
715
  * Computed display range for current page entries
327
716
  * @example "1-10" of 100 entries
@@ -345,7 +734,21 @@ class TableComponent {
345
734
  */
346
735
  handlePageSizeChange(size) {
347
736
  this.handleToggleAll(false);
348
- this.pageSizeChanged.emit(size);
737
+ let resolved;
738
+ if (typeof size === 'number') {
739
+ resolved = size;
740
+ }
741
+ else if (size && typeof size === 'object' && 'value' in size) {
742
+ const v = size['value'];
743
+ const safeStringify = (x) => (['string', 'number', 'boolean'].includes(typeof x) ? String(x) : '0');
744
+ resolved = typeof v === 'number' ? v : Number(safeStringify(v));
745
+ }
746
+ else {
747
+ const safeStringify = (x) => (['string', 'number', 'boolean'].includes(typeof x) ? String(x) : '0');
748
+ resolved = Number(safeStringify(size)) || undefined;
749
+ }
750
+ const pageSize = Number(resolved || 1);
751
+ this.pageSizeChanged.emit(pageSize);
349
752
  }
350
753
  /**
351
754
  * @internal
@@ -364,36 +767,30 @@ class TableComponent {
364
767
  */
365
768
  tableContainerClass = computed(() => cn(tableContainer({
366
769
  containerHeight: this.height(),
367
- }), { 'overflow-x-auto': this.allowHeaderOverflow(), '[&_thead]:whitespace-normal': !this.allowHeaderOverflow() }));
770
+ }), { 'overflow-x-auto': this.allowHeaderOverflow(), '[&_thead]:whitespace-normal': !this.allowHeaderOverflow() }, 'w-full flex-grow'));
368
771
  /**
369
772
  * @internal
370
773
  * Computes outer container classes based on size
371
774
  */
372
- containerClass = computed(() => cn('flex flex-col gap-3 rounded-box border border-solid border-neutral pb-3', {
775
+ containerClass = computed(() => cn('rounded-box border-neutral @container flex min-w-0 flex-col gap-3 overflow-x-auto border border-solid', {
373
776
  'gap-3 pb-3': this.size() === 'xs' || this.size() === 'sm' || this.size() === 'md',
374
777
  'gap-4 pb-4': this.size() === 'lg',
375
778
  'gap-5 pb-5': this.size() === 'xl',
376
779
  }));
780
+ sizeTokens = computed(() => getTableSizeTokens(this.size()));
781
+ footerLayoutTokens = computed(() => getTableFooterLayoutTokens(this.size()));
377
782
  /**
378
783
  * @internal
379
784
  * Computes typography variant for paginator text based on table size
380
785
  */
381
786
  paginatorTextSize = computed(() => {
382
- switch (this.size()) {
383
- case 'xs':
384
- return 'body-xxs';
385
- case 'sm':
386
- return 'body-xs';
387
- case 'md':
388
- return 'body-sm';
389
- case 'lg':
390
- return 'body';
391
- case 'xl':
392
- return 'body';
393
- default:
394
- return 'body-xs';
395
- }
787
+ return this.size() === 'sm' ? '8' : this.sizeTokens().footerPreset;
396
788
  });
789
+ footerSelectSize = computed(() => this.sizeTokens().selectSize);
790
+ footerPaginatorSize = computed(() => this.sizeTokens().paginatorSize);
791
+ footerWrapperClass = computed(() => cn('@container flex w-full flex-col overflow-x-auto', this.footerLayoutTokens().wrapper));
792
+ footerDividerClass = computed(() => cn('divider divider-neutral my-0 h-[0.0625rem] before:h-[0.0625rem] after:h-[0.0625rem]', this.footerLayoutTokens().divider));
793
+ footerContentClass = computed(() => cn('flex flex-col items-center @2xl:flex-row @2xl:justify-between @4xl:grid @4xl:grid-cols-[auto_1fr_auto] @4xl:items-center', this.footerLayoutTokens().content));
397
794
  /** @internal Reference to header checkbox component */
398
795
  header = contentChild(TableHeaderCheckboxComponent, { descendants: true });
399
796
  /** @internal List of row checkbox components */
@@ -444,11 +841,11 @@ class TableComponent {
444
841
  this.header()?.checked.set(false);
445
842
  }
446
843
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: TableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
447
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.0", type: TableComponent, isStandalone: true, selector: "st-table", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, pinRows: { classPropertyName: "pinRows", publicName: "pinRows", isSignal: true, isRequired: false, transformFunction: null }, pinColumns: { classPropertyName: "pinColumns", publicName: "pinColumns", isSignal: true, isRequired: false, transformFunction: null }, zebra: { classPropertyName: "zebra", publicName: "zebra", isSignal: true, isRequired: false, transformFunction: null }, paginatorType: { classPropertyName: "paginatorType", publicName: "paginatorType", isSignal: true, isRequired: false, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, totalItems: { classPropertyName: "totalItems", publicName: "totalItems", isSignal: true, isRequired: false, transformFunction: null }, pagination: { classPropertyName: "pagination", publicName: "pagination", isSignal: true, isRequired: false, transformFunction: null }, maxSize: { classPropertyName: "maxSize", publicName: "maxSize", isSignal: true, isRequired: false, transformFunction: null }, showItemsPerPage: { classPropertyName: "showItemsPerPage", publicName: "showItemsPerPage", isSignal: true, isRequired: false, transformFunction: null }, showEntries: { classPropertyName: "showEntries", publicName: "showEntries", isSignal: true, isRequired: false, transformFunction: null }, showPagination: { classPropertyName: "showPagination", publicName: "showPagination", isSignal: true, isRequired: false, transformFunction: null }, showFooter: { classPropertyName: "showFooter", publicName: "showFooter", isSignal: true, isRequired: false, transformFunction: null }, allowHeaderOverflow: { classPropertyName: "allowHeaderOverflow", publicName: "allowHeaderOverflow", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pageChanged: "pageChanged", pageSizeChanged: "pageSizeChanged", checkedItems: "checkedItems" }, queries: [{ propertyName: "header", first: true, predicate: TableHeaderCheckboxComponent, descendants: true, isSignal: true }, { propertyName: "rows", predicate: TableRowCheckboxComponent, descendants: true, isSignal: true }], ngImport: i0, template: "@let total = totalItems();\n@let dataVar = data();\n@let containerClassVar = containerClass();\n@let tableContainerClassVar = tableContainerClass();\n@let tableClassVar = tableClass();\n@let paginatorTextSizeVar = paginatorTextSize();\n@let showItemsPerPageVar = showItemsPerPage();\n@let paginationVar = pagination();\n@let showPaginationVar = showPagination();\n@let paginatorTypeVar = paginatorType();\n@let maxSizeVar = maxSize();\n@let showEntriesVar = showEntries();\n@let heightVar = height();\n@let showshowFooterVar = showFooter();\n@let totalPagesVar = totalPages();\n\n@if (total > 0 || dataVar.length > 0) {\n\t<div [class]=\"containerClassVar\">\n\t\t<!-- Table -->\n\t\t<div [class]=\"tableContainerClassVar\">\n\t\t\t<table [class]=\"tableClassVar\">\n\t\t\t\t<ng-content select=\"thead\"></ng-content>\n\t\t\t\t<ng-content select=\"tbody\"></ng-content>\n\t\t\t</table>\n\t\t</div>\n\t\t@if (total > 0) {\n\t\t\t@if (heightVar !== 'auto') {\n\t\t\t\t<!-- gradient -->\n\t\t\t\t<div\n\t\t\t\t\tclass=\"after:from-base-200 relative after:absolute after:inset-x-0 after:right-0 after:bottom-0 after:left-0 after:block after:h-6 after:bg-gradient-to-t after:to-transparent after:bg-top after:content-['']\"\n\t\t\t\t></div>\n\t\t\t}\n\n\t\t\t<!-- Footer -->\n\t\t\t@if (showshowFooterVar) {\n\t\t\t\t<div class=\"flex flex-col gap-3\">\n\t\t\t\t\t<!-- Divider -->\n\t\t\t\t\t<div class=\"divider divider-neutral my-0 h-[0.0625rem] px-4 before:h-[0.0625rem] after:h-[0.0625rem]\"></div>\n\n\t\t\t\t\t<!-- Paginator -->\n\t\t\t\t\t<div class=\"gap grid min-h-[30px] grid-cols-[1fr_3fr_1fr] items-center px-4\">\n\t\t\t\t\t\t<!-- Pagination info -->\n\t\t\t\t\t\t<div class=\"flex items-center justify-self-start\">\n\t\t\t\t\t\t\t@if (showItemsPerPageVar) {\n\t\t\t\t\t\t\t\t<st-select\n\t\t\t\t\t\t\t\t\t[options]=\"[5, 10, 20, 50, 100]\"\n\t\t\t\t\t\t\t\t\t[value]=\"paginationVar.itemsPerPage\"\n\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t(valueUpdated)=\"handlePageSizeChange($event)\"\n\t\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\t\t[allowClear]=\"false\"\n\t\t\t\t\t\t\t\t></st-select>\n\t\t\t\t\t\t\t\t<div class=\"ml-2\">\n\t\t\t\t\t\t\t\t\t<span typography [tyVariant]=\"paginatorTextSizeVar\" [tyColor]=\"'inherit'\">{{ 'sdk.table.entriesByPage' | translate }}</span>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<div class=\"justify-self-center\">\n\t\t\t\t\t\t\t@if (showPaginationVar) {\n\t\t\t\t\t\t\t\t@if (paginatorTypeVar === 'default') {\n\t\t\t\t\t\t\t\t\t<st-paginator\n\t\t\t\t\t\t\t\t\t\t[paginatorId]=\"paginationVar.id\"\n\t\t\t\t\t\t\t\t\t\t[pages]=\"totalPagesVar\"\n\t\t\t\t\t\t\t\t\t\t[currentPage]=\"paginationVar.currentPage\"\n\t\t\t\t\t\t\t\t\t\t[maxSize]=\"maxSizeVar\"\n\t\t\t\t\t\t\t\t\t\t(pageChanged)=\"handlePageChange($event)\"\n\t\t\t\t\t\t\t\t\t></st-paginator>\n\t\t\t\t\t\t\t\t} @else if (paginatorTypeVar === 'dots') {\n\t\t\t\t\t\t\t\t\t<st-paginator\n\t\t\t\t\t\t\t\t\t\t[paginatorId]=\"paginationVar.id\"\n\t\t\t\t\t\t\t\t\t\t[pages]=\"totalPagesVar\"\n\t\t\t\t\t\t\t\t\t\t[currentPage]=\"paginationVar.currentPage\"\n\t\t\t\t\t\t\t\t\t\t(pageChanged)=\"handlePageChange($event)\"\n\t\t\t\t\t\t\t\t\t\ttype=\"dots\"\n\t\t\t\t\t\t\t\t\t></st-paginator>\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<div class=\"flex items-center justify-self-end\">\n\t\t\t\t\t\t\t@if (showEntriesVar) {\n\t\t\t\t\t\t\t\t@if (!showItemsPerPageVar && !showPaginationVar) {\n\t\t\t\t\t\t\t\t\t<span typography [tyVariant]=\"paginatorTextSizeVar\" [tyColor]=\"'inherit'\">\n\t\t\t\t\t\t\t\t\t\t{{ 'sdk.table.totalEntries' | translate: { total: total } }}\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t} @else {\n\t\t\t\t\t\t\t\t\t<span typography [tyVariant]=\"paginatorTextSizeVar\" [tyColor]=\"'inherit'\">\n\t\t\t\t\t\t\t\t\t\t{{ 'sdk.table.entriesRange' | translate: { range: paginationRange(), total: total } }}\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t}\n\t\t}\n\t</div>\n} @else {\n\t<div class=\"rounded-box border-neutral grid h-full place-content-center gap-4 border border-solid p-6\">\n\t\t<div>\n\t\t\t<div class=\"text-info grid place-content-center\">\n\t\t\t\t<st-icon [icon]=\"infoIcon\" size=\"lg\" color=\"inherit\" size=\"lg\"></st-icon>\n\t\t\t</div>\n\t\t\t<span typography [tyVariant]=\"paginatorTextSizeVar\" [tyColor]=\"'inherit'\">{{ 'sdk.table.emptyListMessage' | translate }}</span>\n\t\t</div>\n\t</div>\n}\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: PaginatorComponent, selector: "st-paginator", inputs: ["paginatorId", "maxSize", "type", "pages", "currentPage"], outputs: ["pageChanged", "currentPageChange"] }, { kind: "directive", type: TypographyDirective, selector: "[typography]", inputs: ["tyVariant", "tyColor", "tyFontWeight", "tyTextOverflow"] }, { kind: "component", type: SelectComponent, selector: "st-select", inputs: ["variant", "size", "ghost", "name", "placeholder", "label", "value", "options", "displayKey", "valueKey", "allowClear", "parentForm", "formControlName", "disabled"], outputs: ["valueChange", "disabledChange", "blurred", "valueUpdated"] }, { kind: "component", type: IconComponent, selector: "st-icon", inputs: ["color", "size", "icon"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
844
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.0", type: TableComponent, isStandalone: true, selector: "st-table", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, pinRows: { classPropertyName: "pinRows", publicName: "pinRows", isSignal: true, isRequired: false, transformFunction: null }, pinColumns: { classPropertyName: "pinColumns", publicName: "pinColumns", isSignal: true, isRequired: false, transformFunction: null }, zebra: { classPropertyName: "zebra", publicName: "zebra", isSignal: true, isRequired: false, transformFunction: null }, paginatorType: { classPropertyName: "paginatorType", publicName: "paginatorType", isSignal: true, isRequired: false, transformFunction: null }, noDataIcon: { classPropertyName: "noDataIcon", publicName: "noDataIcon", isSignal: true, isRequired: false, transformFunction: null }, noResultsIcon: { classPropertyName: "noResultsIcon", publicName: "noResultsIcon", isSignal: true, isRequired: false, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, totalItems: { classPropertyName: "totalItems", publicName: "totalItems", isSignal: true, isRequired: false, transformFunction: null }, pagination: { classPropertyName: "pagination", publicName: "pagination", isSignal: true, isRequired: false, transformFunction: null }, maxSize: { classPropertyName: "maxSize", publicName: "maxSize", isSignal: true, isRequired: false, transformFunction: null }, showItemsPerPage: { classPropertyName: "showItemsPerPage", publicName: "showItemsPerPage", isSignal: true, isRequired: false, transformFunction: null }, showEntries: { classPropertyName: "showEntries", publicName: "showEntries", isSignal: true, isRequired: false, transformFunction: null }, showPagination: { classPropertyName: "showPagination", publicName: "showPagination", isSignal: true, isRequired: false, transformFunction: null }, showFooter: { classPropertyName: "showFooter", publicName: "showFooter", isSignal: true, isRequired: false, transformFunction: null }, hasActiveFiltersCallback: { classPropertyName: "hasActiveFiltersCallback", publicName: "hasActiveFiltersCallback", isSignal: true, isRequired: false, transformFunction: null }, allowHeaderOverflow: { classPropertyName: "allowHeaderOverflow", publicName: "allowHeaderOverflow", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pageChanged: "pageChanged", pageSizeChanged: "pageSizeChanged", checkedItems: "checkedItems" }, queries: [{ propertyName: "header", first: true, predicate: TableHeaderCheckboxComponent, descendants: true, isSignal: true }, { propertyName: "rows", predicate: TableRowCheckboxComponent, descendants: true, isSignal: true }], ngImport: i0, template: "@let total = totalItems();\n@let containerClassVar = containerClass();\n@let tableContainerClassVar = tableContainerClass();\n@let tableClassVar = tableClass();\n@let paginatorTextSizeVar = paginatorTextSize();\n@let footerSelectSizeVar = footerSelectSize();\n@let footerPaginatorSizeVar = footerPaginatorSize();\n@let footerWrapperClassVar = footerWrapperClass();\n@let footerDividerClassVar = footerDividerClass();\n@let footerContentClassVar = footerContentClass();\n@let showItemsPerPageVar = showItemsPerPage();\n@let paginationVar = pagination();\n@let showPaginationVar = showPagination();\n@let paginatorTypeVar = paginatorType();\n@let maxSizeVar = maxSize();\n@let showEntriesVar = showEntries();\n@let showFooterVar = showFooter();\n@let totalPagesVar = totalPages();\n\n<div [class]=\"containerClassVar\">\n\t<div [class]=\"tableContainerClassVar\">\n\t\t<div class=\"w-full flex-grow overflow-x-auto\">\n\t\t\t@if (hasNoData()) {\n\t\t\t\t<div class=\"flex flex-col items-center justify-center gap-1.5 py-12 text-center\">\n\t\t\t\t\t<div class=\"text-base-content/40\">\n\t\t\t\t\t\t<st-icon [icon]=\"noDataIcon()\" size=\"lg\" color=\"base-content\" class=\"mx-auto opacity-40\"></st-icon>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"flex flex-col items-center justify-center gap-0.5\">\n\t\t\t\t\t\t<h3 stText=\"6\" class=\"text-base-content/60\">{{ 'sdk.table.noData.title' | translate }}</h3>\n\t\t\t\t\t\t<p stText=\"8\" class=\"text-base-content/40\">{{ 'sdk.table.noData.message' | translate }}</p>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t} @else if (hasNoResults()) {\n\t\t\t\t<div class=\"flex flex-col items-center justify-center gap-1.5 py-12 text-center\">\n\t\t\t\t\t<div class=\"text-base-content/40\">\n\t\t\t\t\t\t<st-icon [icon]=\"noResultsIcon()\" size=\"xl\" color=\"base-content\" class=\"mx-auto opacity-40\"></st-icon>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"flex flex-col items-center justify-center gap-0.5\">\n\t\t\t\t\t\t<h3 stText=\"6\" class=\"text-base-content/60\">{{ 'sdk.table.noResults.title' | translate }}</h3>\n\t\t\t\t\t\t<p stText=\"8\" class=\"text-base-content/40\">{{ 'sdk.table.noResults.message' | translate }}</p>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"mt-3\">\n\t\t\t\t\t\t<ng-content select=\"st-table-empty-actions\"></ng-content>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t} @else {\n\t\t\t\t<table [class]=\"tableClassVar\">\n\t\t\t\t\t<ng-content select=\"thead\"></ng-content>\n\t\t\t\t\t<ng-content select=\"tbody\"></ng-content>\n\t\t\t\t\t<ng-content select=\"tfoot\"></ng-content>\n\t\t\t\t</table>\n\t\t\t}\n\t\t</div>\n\t</div>\n\t@if (total > 0) {\n\t\t@if (showFooterVar) {\n\t\t\t<div [class]=\"footerWrapperClassVar\">\n\t\t\t\t<div [class]=\"footerDividerClassVar\"></div>\n\t\t\t\t<div [class]=\"footerContentClassVar\">\n\t\t\t\t\t<div class=\"flex items-center justify-end\">\n\t\t\t\t\t\t@if (showEntriesVar) {\n\t\t\t\t\t\t\t@if (!showItemsPerPageVar && !showPaginationVar) {\n\t\t\t\t\t\t\t\t<span [stText]=\"paginatorTextSizeVar\">\n\t\t\t\t\t\t\t\t\t{{ 'sdk.table.totalEntries' | translate: { total: total } }}\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t} @else {\n\t\t\t\t\t\t\t\t<span [stText]=\"paginatorTextSizeVar\">\n\t\t\t\t\t\t\t\t\t{{ 'sdk.table.entriesRange' | translate: { range: paginationRange(), total: total } }}\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"flex justify-center\">\n\t\t\t\t\t\t@if (showPaginationVar) {\n\t\t\t\t\t\t\t@if (paginatorTypeVar === 'default') {\n\t\t\t\t\t\t\t\t<st-paginator\n\t\t\t\t\t\t\t\t\t[paginatorId]=\"paginationVar.id\"\n\t\t\t\t\t\t\t\t\t[pages]=\"totalPagesVar\"\n\t\t\t\t\t\t\t\t\t[currentPage]=\"paginationVar.currentPage\"\n\t\t\t\t\t\t\t\t\t[size]=\"footerPaginatorSizeVar\"\n\t\t\t\t\t\t\t\t\t[maxSize]=\"maxSizeVar\"\n\t\t\t\t\t\t\t\t\t(pageChanged)=\"handlePageChange($event)\"\n\t\t\t\t\t\t\t\t></st-paginator>\n\t\t\t\t\t\t\t} @else if (paginatorTypeVar === 'dots') {\n\t\t\t\t\t\t\t\t<st-paginator\n\t\t\t\t\t\t\t\t\t[paginatorId]=\"paginationVar.id\"\n\t\t\t\t\t\t\t\t\t[pages]=\"totalPagesVar\"\n\t\t\t\t\t\t\t\t\t[currentPage]=\"paginationVar.currentPage\"\n\t\t\t\t\t\t\t\t\t[size]=\"footerPaginatorSizeVar\"\n\t\t\t\t\t\t\t\t\t(pageChanged)=\"handlePageChange($event)\"\n\t\t\t\t\t\t\t\t\ttype=\"dots\"\n\t\t\t\t\t\t\t\t></st-paginator>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"flex items-center justify-end\">\n\t\t\t\t\t\t@if (showItemsPerPageVar) {\n\t\t\t\t\t\t\t<span class=\"sr-only\">{{ 'sdk.table.entriesByPage' | translate }}</span>\n\t\t\t\t\t\t\t<st-select\n\t\t\t\t\t\t\t\t[options]=\"entriesPerPageOptions()\"\n\t\t\t\t\t\t\t\t[value]=\"paginationVar.itemsPerPage\"\n\t\t\t\t\t\t\t\tvalueKey=\"value\"\n\t\t\t\t\t\t\t\tdisplayKey=\"text\"\n\t\t\t\t\t\t\t\t[size]=\"footerSelectSizeVar\"\n\t\t\t\t\t\t\t\t(valueUpdated)=\"handlePageSizeChange($event)\"\n\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\t[allowClear]=\"false\"\n\t\t\t\t\t\t\t></st-select>\n\t\t\t\t\t\t}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t}\n\t}\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: PaginatorComponent, selector: "st-paginator", inputs: ["paginatorId", "maxSize", "type", "pages", "size", "currentPage"], outputs: ["pageChanged", "currentPageChange"] }, { kind: "directive", type: TextDirective, selector: "[stText]", inputs: ["stText", "stTextWeight", "stTextColor", "stTextOverflow", "stTextLineClamp", "stTextClass"] }, { kind: "component", type: SelectComponent, selector: "st-select", inputs: ["variant", "size", "showOptional", "optionalText", "ghost", "name", "placeholder", "label", "value", "options", "displayKey", "valueKey", "allowClear", "parentForm", "formControlName", "disabled", "stopPropagation"], outputs: ["valueChange", "disabledChange", "blurred", "valueUpdated", "clicked", "keyDownEnter", "keyDownSpace", "triggered"] }, { kind: "component", type: IconComponent, selector: "st-icon", inputs: ["color", "size", "icon"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
448
845
  }
449
846
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: TableComponent, decorators: [{
450
847
  type: Component,
451
- args: [{ selector: 'st-table', imports: [CommonModule, PaginatorComponent, TypographyDirective, SelectComponent, IconComponent, TranslatePipe], changeDetection: ChangeDetectionStrategy.OnPush, template: "@let total = totalItems();\n@let dataVar = data();\n@let containerClassVar = containerClass();\n@let tableContainerClassVar = tableContainerClass();\n@let tableClassVar = tableClass();\n@let paginatorTextSizeVar = paginatorTextSize();\n@let showItemsPerPageVar = showItemsPerPage();\n@let paginationVar = pagination();\n@let showPaginationVar = showPagination();\n@let paginatorTypeVar = paginatorType();\n@let maxSizeVar = maxSize();\n@let showEntriesVar = showEntries();\n@let heightVar = height();\n@let showshowFooterVar = showFooter();\n@let totalPagesVar = totalPages();\n\n@if (total > 0 || dataVar.length > 0) {\n\t<div [class]=\"containerClassVar\">\n\t\t<!-- Table -->\n\t\t<div [class]=\"tableContainerClassVar\">\n\t\t\t<table [class]=\"tableClassVar\">\n\t\t\t\t<ng-content select=\"thead\"></ng-content>\n\t\t\t\t<ng-content select=\"tbody\"></ng-content>\n\t\t\t</table>\n\t\t</div>\n\t\t@if (total > 0) {\n\t\t\t@if (heightVar !== 'auto') {\n\t\t\t\t<!-- gradient -->\n\t\t\t\t<div\n\t\t\t\t\tclass=\"after:from-base-200 relative after:absolute after:inset-x-0 after:right-0 after:bottom-0 after:left-0 after:block after:h-6 after:bg-gradient-to-t after:to-transparent after:bg-top after:content-['']\"\n\t\t\t\t></div>\n\t\t\t}\n\n\t\t\t<!-- Footer -->\n\t\t\t@if (showshowFooterVar) {\n\t\t\t\t<div class=\"flex flex-col gap-3\">\n\t\t\t\t\t<!-- Divider -->\n\t\t\t\t\t<div class=\"divider divider-neutral my-0 h-[0.0625rem] px-4 before:h-[0.0625rem] after:h-[0.0625rem]\"></div>\n\n\t\t\t\t\t<!-- Paginator -->\n\t\t\t\t\t<div class=\"gap grid min-h-[30px] grid-cols-[1fr_3fr_1fr] items-center px-4\">\n\t\t\t\t\t\t<!-- Pagination info -->\n\t\t\t\t\t\t<div class=\"flex items-center justify-self-start\">\n\t\t\t\t\t\t\t@if (showItemsPerPageVar) {\n\t\t\t\t\t\t\t\t<st-select\n\t\t\t\t\t\t\t\t\t[options]=\"[5, 10, 20, 50, 100]\"\n\t\t\t\t\t\t\t\t\t[value]=\"paginationVar.itemsPerPage\"\n\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t(valueUpdated)=\"handlePageSizeChange($event)\"\n\t\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\t\t[allowClear]=\"false\"\n\t\t\t\t\t\t\t\t></st-select>\n\t\t\t\t\t\t\t\t<div class=\"ml-2\">\n\t\t\t\t\t\t\t\t\t<span typography [tyVariant]=\"paginatorTextSizeVar\" [tyColor]=\"'inherit'\">{{ 'sdk.table.entriesByPage' | translate }}</span>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<div class=\"justify-self-center\">\n\t\t\t\t\t\t\t@if (showPaginationVar) {\n\t\t\t\t\t\t\t\t@if (paginatorTypeVar === 'default') {\n\t\t\t\t\t\t\t\t\t<st-paginator\n\t\t\t\t\t\t\t\t\t\t[paginatorId]=\"paginationVar.id\"\n\t\t\t\t\t\t\t\t\t\t[pages]=\"totalPagesVar\"\n\t\t\t\t\t\t\t\t\t\t[currentPage]=\"paginationVar.currentPage\"\n\t\t\t\t\t\t\t\t\t\t[maxSize]=\"maxSizeVar\"\n\t\t\t\t\t\t\t\t\t\t(pageChanged)=\"handlePageChange($event)\"\n\t\t\t\t\t\t\t\t\t></st-paginator>\n\t\t\t\t\t\t\t\t} @else if (paginatorTypeVar === 'dots') {\n\t\t\t\t\t\t\t\t\t<st-paginator\n\t\t\t\t\t\t\t\t\t\t[paginatorId]=\"paginationVar.id\"\n\t\t\t\t\t\t\t\t\t\t[pages]=\"totalPagesVar\"\n\t\t\t\t\t\t\t\t\t\t[currentPage]=\"paginationVar.currentPage\"\n\t\t\t\t\t\t\t\t\t\t(pageChanged)=\"handlePageChange($event)\"\n\t\t\t\t\t\t\t\t\t\ttype=\"dots\"\n\t\t\t\t\t\t\t\t\t></st-paginator>\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<div class=\"flex items-center justify-self-end\">\n\t\t\t\t\t\t\t@if (showEntriesVar) {\n\t\t\t\t\t\t\t\t@if (!showItemsPerPageVar && !showPaginationVar) {\n\t\t\t\t\t\t\t\t\t<span typography [tyVariant]=\"paginatorTextSizeVar\" [tyColor]=\"'inherit'\">\n\t\t\t\t\t\t\t\t\t\t{{ 'sdk.table.totalEntries' | translate: { total: total } }}\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t} @else {\n\t\t\t\t\t\t\t\t\t<span typography [tyVariant]=\"paginatorTextSizeVar\" [tyColor]=\"'inherit'\">\n\t\t\t\t\t\t\t\t\t\t{{ 'sdk.table.entriesRange' | translate: { range: paginationRange(), total: total } }}\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t}\n\t\t}\n\t</div>\n} @else {\n\t<div class=\"rounded-box border-neutral grid h-full place-content-center gap-4 border border-solid p-6\">\n\t\t<div>\n\t\t\t<div class=\"text-info grid place-content-center\">\n\t\t\t\t<st-icon [icon]=\"infoIcon\" size=\"lg\" color=\"inherit\" size=\"lg\"></st-icon>\n\t\t\t</div>\n\t\t\t<span typography [tyVariant]=\"paginatorTextSizeVar\" [tyColor]=\"'inherit'\">{{ 'sdk.table.emptyListMessage' | translate }}</span>\n\t\t</div>\n\t</div>\n}\n" }]
848
+ args: [{ selector: 'st-table', imports: [CommonModule, PaginatorComponent, TextDirective, SelectComponent, IconComponent, TranslatePipe], changeDetection: ChangeDetectionStrategy.OnPush, template: "@let total = totalItems();\n@let containerClassVar = containerClass();\n@let tableContainerClassVar = tableContainerClass();\n@let tableClassVar = tableClass();\n@let paginatorTextSizeVar = paginatorTextSize();\n@let footerSelectSizeVar = footerSelectSize();\n@let footerPaginatorSizeVar = footerPaginatorSize();\n@let footerWrapperClassVar = footerWrapperClass();\n@let footerDividerClassVar = footerDividerClass();\n@let footerContentClassVar = footerContentClass();\n@let showItemsPerPageVar = showItemsPerPage();\n@let paginationVar = pagination();\n@let showPaginationVar = showPagination();\n@let paginatorTypeVar = paginatorType();\n@let maxSizeVar = maxSize();\n@let showEntriesVar = showEntries();\n@let showFooterVar = showFooter();\n@let totalPagesVar = totalPages();\n\n<div [class]=\"containerClassVar\">\n\t<div [class]=\"tableContainerClassVar\">\n\t\t<div class=\"w-full flex-grow overflow-x-auto\">\n\t\t\t@if (hasNoData()) {\n\t\t\t\t<div class=\"flex flex-col items-center justify-center gap-1.5 py-12 text-center\">\n\t\t\t\t\t<div class=\"text-base-content/40\">\n\t\t\t\t\t\t<st-icon [icon]=\"noDataIcon()\" size=\"lg\" color=\"base-content\" class=\"mx-auto opacity-40\"></st-icon>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"flex flex-col items-center justify-center gap-0.5\">\n\t\t\t\t\t\t<h3 stText=\"6\" class=\"text-base-content/60\">{{ 'sdk.table.noData.title' | translate }}</h3>\n\t\t\t\t\t\t<p stText=\"8\" class=\"text-base-content/40\">{{ 'sdk.table.noData.message' | translate }}</p>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t} @else if (hasNoResults()) {\n\t\t\t\t<div class=\"flex flex-col items-center justify-center gap-1.5 py-12 text-center\">\n\t\t\t\t\t<div class=\"text-base-content/40\">\n\t\t\t\t\t\t<st-icon [icon]=\"noResultsIcon()\" size=\"xl\" color=\"base-content\" class=\"mx-auto opacity-40\"></st-icon>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"flex flex-col items-center justify-center gap-0.5\">\n\t\t\t\t\t\t<h3 stText=\"6\" class=\"text-base-content/60\">{{ 'sdk.table.noResults.title' | translate }}</h3>\n\t\t\t\t\t\t<p stText=\"8\" class=\"text-base-content/40\">{{ 'sdk.table.noResults.message' | translate }}</p>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"mt-3\">\n\t\t\t\t\t\t<ng-content select=\"st-table-empty-actions\"></ng-content>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t} @else {\n\t\t\t\t<table [class]=\"tableClassVar\">\n\t\t\t\t\t<ng-content select=\"thead\"></ng-content>\n\t\t\t\t\t<ng-content select=\"tbody\"></ng-content>\n\t\t\t\t\t<ng-content select=\"tfoot\"></ng-content>\n\t\t\t\t</table>\n\t\t\t}\n\t\t</div>\n\t</div>\n\t@if (total > 0) {\n\t\t@if (showFooterVar) {\n\t\t\t<div [class]=\"footerWrapperClassVar\">\n\t\t\t\t<div [class]=\"footerDividerClassVar\"></div>\n\t\t\t\t<div [class]=\"footerContentClassVar\">\n\t\t\t\t\t<div class=\"flex items-center justify-end\">\n\t\t\t\t\t\t@if (showEntriesVar) {\n\t\t\t\t\t\t\t@if (!showItemsPerPageVar && !showPaginationVar) {\n\t\t\t\t\t\t\t\t<span [stText]=\"paginatorTextSizeVar\">\n\t\t\t\t\t\t\t\t\t{{ 'sdk.table.totalEntries' | translate: { total: total } }}\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t} @else {\n\t\t\t\t\t\t\t\t<span [stText]=\"paginatorTextSizeVar\">\n\t\t\t\t\t\t\t\t\t{{ 'sdk.table.entriesRange' | translate: { range: paginationRange(), total: total } }}\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"flex justify-center\">\n\t\t\t\t\t\t@if (showPaginationVar) {\n\t\t\t\t\t\t\t@if (paginatorTypeVar === 'default') {\n\t\t\t\t\t\t\t\t<st-paginator\n\t\t\t\t\t\t\t\t\t[paginatorId]=\"paginationVar.id\"\n\t\t\t\t\t\t\t\t\t[pages]=\"totalPagesVar\"\n\t\t\t\t\t\t\t\t\t[currentPage]=\"paginationVar.currentPage\"\n\t\t\t\t\t\t\t\t\t[size]=\"footerPaginatorSizeVar\"\n\t\t\t\t\t\t\t\t\t[maxSize]=\"maxSizeVar\"\n\t\t\t\t\t\t\t\t\t(pageChanged)=\"handlePageChange($event)\"\n\t\t\t\t\t\t\t\t></st-paginator>\n\t\t\t\t\t\t\t} @else if (paginatorTypeVar === 'dots') {\n\t\t\t\t\t\t\t\t<st-paginator\n\t\t\t\t\t\t\t\t\t[paginatorId]=\"paginationVar.id\"\n\t\t\t\t\t\t\t\t\t[pages]=\"totalPagesVar\"\n\t\t\t\t\t\t\t\t\t[currentPage]=\"paginationVar.currentPage\"\n\t\t\t\t\t\t\t\t\t[size]=\"footerPaginatorSizeVar\"\n\t\t\t\t\t\t\t\t\t(pageChanged)=\"handlePageChange($event)\"\n\t\t\t\t\t\t\t\t\ttype=\"dots\"\n\t\t\t\t\t\t\t\t></st-paginator>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"flex items-center justify-end\">\n\t\t\t\t\t\t@if (showItemsPerPageVar) {\n\t\t\t\t\t\t\t<span class=\"sr-only\">{{ 'sdk.table.entriesByPage' | translate }}</span>\n\t\t\t\t\t\t\t<st-select\n\t\t\t\t\t\t\t\t[options]=\"entriesPerPageOptions()\"\n\t\t\t\t\t\t\t\t[value]=\"paginationVar.itemsPerPage\"\n\t\t\t\t\t\t\t\tvalueKey=\"value\"\n\t\t\t\t\t\t\t\tdisplayKey=\"text\"\n\t\t\t\t\t\t\t\t[size]=\"footerSelectSizeVar\"\n\t\t\t\t\t\t\t\t(valueUpdated)=\"handlePageSizeChange($event)\"\n\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\t[allowClear]=\"false\"\n\t\t\t\t\t\t\t></st-select>\n\t\t\t\t\t\t}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t}\n\t}\n</div>\n" }]
452
849
  }] });
453
850
 
454
851
  /**
@@ -486,61 +883,140 @@ class TableActionComponent {
486
883
  size = input('md');
487
884
  /**
488
885
  * Computes CSS classes for the table action text size based on the current size setting.
489
- *
490
- * @returns A string of CSS classes determined by the component's size:
491
- * - 'xs' size: applies 'text-[0.6875rem]' class
492
- * - 'sm' size: applies 'text-xs' class
493
- * - 'md' size: applies 'text-sm' class
494
- * - 'lg' or 'xl' size: applies 'text-lg' class
495
886
  */
496
887
  tableActionClass = computed(() => {
497
888
  return cn({
498
- 'text-[0.6875rem]': this.size() === 'xs',
499
- 'text-xs': this.size() === 'sm',
500
- 'text-sm': this.size() === 'md',
501
- 'text-lg': this.size() === 'lg' || this.size() === 'xl',
889
+ 'text-[9.83px] leading-normal tracking-normal': this.size() === 'xs',
890
+ 'text-[11.06px] leading-normal tracking-tight': this.size() === 'sm',
891
+ 'text-[12.44px] leading-normal tracking-tight': this.size() === 'md',
892
+ 'text-[14px] leading-normal tracking-tight': this.size() === 'lg',
893
+ 'text-[15.75px] leading-normal tracking-normal': this.size() === 'xl',
502
894
  });
503
895
  });
896
+ textPreset = computed(() => {
897
+ switch (this.size()) {
898
+ case 'xs':
899
+ return '10';
900
+ case 'sm':
901
+ return '9';
902
+ case 'md':
903
+ return '8';
904
+ case 'lg':
905
+ return '7';
906
+ case 'xl':
907
+ return '6';
908
+ default:
909
+ return '8';
910
+ }
911
+ });
504
912
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: TableActionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
505
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.0", type: TableActionComponent, isStandalone: true, selector: "st-table-action", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, tooltip: { classPropertyName: "tooltip", publicName: "tooltip", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@let tooltipVar = tooltip();\n@let variantVar = variant();\n@let iconVar = icon();\n@let sizeVar = size();\n\n<!-- Define the button template with content projection -->\n<ng-template #buttonTemplate>\n\t<st-button [class]=\"tableActionClass()\" [variant]=\"variantVar\" [icon]=\"iconVar\" [link]=\"true\" [size]=\"sizeVar\">\n\t\t<ng-content></ng-content>\n\t</st-button>\n</ng-template>\n\n<!-- Conditional rendering -->\n@if (tooltipVar) {\n\t<st-tooltip variant=\"secondary\" [label]=\"tooltipVar | translate\" position=\"top\">\n\t\t<ng-container *ngTemplateOutlet=\"buttonTemplate\"></ng-container>\n\t</st-tooltip>\n} @else {\n\t<ng-container *ngTemplateOutlet=\"buttonTemplate\"></ng-container>\n}\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: TooltipComponent, selector: "st-tooltip", inputs: ["variant", "position", "label"] }, { kind: "component", type: ButtonComponent, selector: "st-button", inputs: ["variant", "ghost", "outline", "link", "soft", "dash", "wide", "circle", "square", "glass", "block", "loader", "size", "shadow", "focusable", "icon", "iconPosition", "type", "disabled"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
913
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.0", type: TableActionComponent, isStandalone: true, selector: "st-table-action", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, tooltip: { classPropertyName: "tooltip", publicName: "tooltip", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@let tooltipVar = tooltip();\n@let variantVar = variant();\n@let iconVar = icon();\n@let sizeVar = size();\n@let textPresetVar = textPreset();\n\n<!-- Define the button template with content projection -->\n<ng-template #buttonTemplate>\n\t<st-button [class]=\"tableActionClass()\" [variant]=\"variantVar\" [icon]=\"iconVar\" [link]=\"true\" [size]=\"sizeVar\">\n\t\t<span [stText]=\"textPresetVar\">\n\t\t\t<ng-content></ng-content>\n\t\t</span>\n\t</st-button>\n</ng-template>\n\n<!-- Conditional rendering -->\n@if (tooltipVar) {\n\t<st-tooltip variant=\"secondary\" [label]=\"tooltipVar | translate\" position=\"top\">\n\t\t<ng-container *ngTemplateOutlet=\"buttonTemplate\"></ng-container>\n\t</st-tooltip>\n} @else {\n\t<ng-container *ngTemplateOutlet=\"buttonTemplate\"></ng-container>\n}\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: TooltipComponent, selector: "st-tooltip", inputs: ["variant", "position", "label", "icon", "iconPosition"] }, { kind: "component", type: ButtonComponent, selector: "st-button", inputs: ["variant", "ghost", "outline", "link", "soft", "dash", "wide", "circle", "square", "glass", "block", "loader", "size", "shadow", "focusable", "icon", "iconPosition", "type", "disabled", "stopPropagation"], outputs: ["clicked", "pointerDown", "keyDownEnter", "keyDownSpace", "triggered"] }, { kind: "pipe", type: TranslatePipe$1, name: "translate" }, { kind: "directive", type: TextDirective, selector: "[stText]", inputs: ["stText", "stTextWeight", "stTextColor", "stTextOverflow", "stTextLineClamp", "stTextClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
506
914
  }
507
915
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: TableActionComponent, decorators: [{
508
916
  type: Component,
509
- args: [{ selector: 'st-table-action', imports: [CommonModule, TooltipComponent, ButtonComponent, TranslatePipe], changeDetection: ChangeDetectionStrategy.OnPush, template: "@let tooltipVar = tooltip();\n@let variantVar = variant();\n@let iconVar = icon();\n@let sizeVar = size();\n\n<!-- Define the button template with content projection -->\n<ng-template #buttonTemplate>\n\t<st-button [class]=\"tableActionClass()\" [variant]=\"variantVar\" [icon]=\"iconVar\" [link]=\"true\" [size]=\"sizeVar\">\n\t\t<ng-content></ng-content>\n\t</st-button>\n</ng-template>\n\n<!-- Conditional rendering -->\n@if (tooltipVar) {\n\t<st-tooltip variant=\"secondary\" [label]=\"tooltipVar | translate\" position=\"top\">\n\t\t<ng-container *ngTemplateOutlet=\"buttonTemplate\"></ng-container>\n\t</st-tooltip>\n} @else {\n\t<ng-container *ngTemplateOutlet=\"buttonTemplate\"></ng-container>\n}\n" }]
917
+ args: [{ selector: 'st-table-action', imports: [CommonModule, TooltipComponent, ButtonComponent, TranslatePipe$1, TextDirective], changeDetection: ChangeDetectionStrategy.OnPush, template: "@let tooltipVar = tooltip();\n@let variantVar = variant();\n@let iconVar = icon();\n@let sizeVar = size();\n@let textPresetVar = textPreset();\n\n<!-- Define the button template with content projection -->\n<ng-template #buttonTemplate>\n\t<st-button [class]=\"tableActionClass()\" [variant]=\"variantVar\" [icon]=\"iconVar\" [link]=\"true\" [size]=\"sizeVar\">\n\t\t<span [stText]=\"textPresetVar\">\n\t\t\t<ng-content></ng-content>\n\t\t</span>\n\t</st-button>\n</ng-template>\n\n<!-- Conditional rendering -->\n@if (tooltipVar) {\n\t<st-tooltip variant=\"secondary\" [label]=\"tooltipVar | translate\" position=\"top\">\n\t\t<ng-container *ngTemplateOutlet=\"buttonTemplate\"></ng-container>\n\t</st-tooltip>\n} @else {\n\t<ng-container *ngTemplateOutlet=\"buttonTemplate\"></ng-container>\n}\n" }]
510
918
  }] });
511
919
 
512
920
  /**
513
921
  * Component to render a container for table actions.
514
922
  *
515
923
  * @remarks
516
- * This component is a simple container for action buttons or other interactive elements
517
- * within a table. It provides basic styling and layout.
924
+ * Supports three modes of operation:
925
+ * 1. **ng-content (backward compatible)**: When no `actions` input is provided, renders projected content.
926
+ * 2. **Inline mode**: When `actions` is provided and `mode` is `'inline'`, renders action buttons in a row.
927
+ * 3. **Dropdown mode**: When `actions` is provided and `mode` is `'dropdown'`, renders a kebab menu.
518
928
  *
519
929
  * @example
520
930
  * ```html
931
+ * <!-- ng-content mode (backward compatible) -->
521
932
  * <st-table-actions>
522
- * <button>Action 1</button>
523
- * <button>Action 2</button>
933
+ * <st-table-action [icon]="editIcon" tooltip="Edit" />
524
934
  * </st-table-actions>
935
+ *
936
+ * <!-- Data-driven inline mode -->
937
+ * <st-table-actions [actions]="myActions" (actionTriggered)="onAction($event)" />
938
+ *
939
+ * <!-- Data-driven dropdown mode -->
940
+ * <st-table-actions [actions]="myActions" mode="dropdown" (actionTriggered)="onAction($event)" />
525
941
  * ```
526
942
  */
527
943
  class TableActionsComponent {
944
+ /**
945
+ * Array of action configurations. When provided, renders actions data-driven.
946
+ * When empty or not provided, falls back to ng-content projection.
947
+ */
948
+ actions = input([]);
949
+ /**
950
+ * Rendering mode for the actions.
951
+ * - `'inline'`: Renders action buttons in a row (default).
952
+ * - `'dropdown'`: Renders a kebab menu that opens a dropdown with action items.
953
+ * @defaultValue 'inline'
954
+ */
955
+ mode = input('inline');
956
+ /**
957
+ * Size for action buttons and the dropdown trigger.
958
+ * @defaultValue 'md'
959
+ */
960
+ size = input('md');
961
+ /**
962
+ * Icon for the dropdown trigger button.
963
+ * @defaultValue matMoreVert (Material vertical dots icon)
964
+ */
965
+ triggerIcon = input(matMoreVert);
966
+ /**
967
+ * Emitted when a data-driven action is triggered/clicked.
968
+ * Emits the full `TableActionConfig` of the triggered action.
969
+ */
970
+ actionTriggered = output();
971
+ /**
972
+ * @internal
973
+ * Computed class string for the table actions container (inline mode and ng-content fallback).
974
+ */
975
+ componentClass = computed(() => cn('inline-flex grow-0 items-center justify-center gap-2 align-top'));
976
+ /**
977
+ * @internal
978
+ * Whether the component should use data-driven rendering.
979
+ */
980
+ hasActions = computed(() => (this.actions()?.length ?? 0) > 0);
528
981
  /**
529
982
  * @internal
530
- * Computed class string for the table actions container.
983
+ * Handle action click for data-driven mode.
531
984
  */
532
- componentClass = computed(() => cn('inline-flex items-center gap-2 grow-0 align-top justify-cente'));
985
+ onActionClick(action) {
986
+ if (!action.disabled) {
987
+ this.actionTriggered.emit(action);
988
+ }
989
+ }
533
990
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: TableActionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
534
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.0", type: TableActionsComponent, isStandalone: true, selector: "st-table-actions", ngImport: i0, template: "<div [class]=\"componentClass()\">\n\t<ng-content></ng-content>\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
991
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.0", type: TableActionsComponent, isStandalone: true, selector: "st-table-actions", inputs: { actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, triggerIcon: { classPropertyName: "triggerIcon", publicName: "triggerIcon", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { actionTriggered: "actionTriggered" }, ngImport: i0, template: "@if (hasActions()) {\n\t@if (mode() === 'inline') {\n\t\t<div [class]=\"componentClass()\">\n\t\t\t@for (action of actions(); track action.id) {\n\t\t\t\t<st-table-action\n\t\t\t\t\t[variant]=\"action.variant ?? 'primary'\"\n\t\t\t\t\t[icon]=\"action.icon\"\n\t\t\t\t\t[tooltip]=\"action.tooltip\"\n\t\t\t\t\t[size]=\"size()\"\n\t\t\t\t\t(click)=\"onActionClick(action)\"\n\t\t\t\t/>\n\t\t\t}\n\t\t</div>\n\t} @else {\n\t\t<st-dropdown-menu>\n\t\t\t<st-dropdown-menu-trigger [menuTriggerFor]=\"content.template\">\n\t\t\t\t<st-button [icon]=\"triggerIcon()\" [ghost]=\"true\" [size]=\"size()\" variant=\"base\" />\n\t\t\t</st-dropdown-menu-trigger>\n\t\t\t<st-dropdown-menu-content #content [size]=\"size()\">\n\t\t\t\t@for (action of actions(); track action.id) {\n\t\t\t\t\t<st-dropdown-menu-item [disabled]=\"action.disabled ?? false\" (triggered)=\"onActionClick(action)\">\n\t\t\t\t\t\t<span class=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t@if (action.icon) {\n\t\t\t\t\t\t\t\t<st-icon [icon]=\"action.icon\" size=\"auto\" />\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t@if (action.label) {\n\t\t\t\t\t\t\t\t{{ action.label | translate }}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</st-dropdown-menu-item>\n\t\t\t\t}\n\t\t\t</st-dropdown-menu-content>\n\t\t</st-dropdown-menu>\n\t}\n} @else {\n\t<div [class]=\"componentClass()\">\n\t\t<ng-content></ng-content>\n\t</div>\n}\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: TranslatePipe$1, name: "translate" }, { kind: "component", type: TableActionComponent, selector: "st-table-action", inputs: ["variant", "tooltip", "icon", "size"] }, { kind: "component", type: ButtonComponent, selector: "st-button", inputs: ["variant", "ghost", "outline", "link", "soft", "dash", "wide", "circle", "square", "glass", "block", "loader", "size", "shadow", "focusable", "icon", "iconPosition", "type", "disabled", "stopPropagation"], outputs: ["clicked", "pointerDown", "keyDownEnter", "keyDownSpace", "triggered"] }, { kind: "component", type: IconComponent, selector: "st-icon", inputs: ["color", "size", "icon"] }, { kind: "component", type: DropdownMenuComponent, selector: "st-dropdown-menu" }, { kind: "component", type: DropdownMenuTriggerComponent, selector: "st-dropdown-menu-trigger" }, { kind: "component", type: DropdownMenuContentComponent, selector: "st-dropdown-menu-content", inputs: ["class", "size"], outputs: ["closed"], exportAs: ["menuContent"] }, { kind: "component", type: DropdownMenuItemComponent, selector: "st-dropdown-menu-item", inputs: ["disabled", "active", "shortcut", "class", "stopPropagation"], outputs: ["triggered", "clicked", "keyDownEnter", "keyDownSpace"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
535
992
  }
536
993
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: TableActionsComponent, decorators: [{
537
994
  type: Component,
538
- args: [{ selector: 'st-table-actions', imports: [CommonModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [class]=\"componentClass()\">\n\t<ng-content></ng-content>\n</div>\n" }]
995
+ args: [{ selector: 'st-table-actions', imports: [
996
+ CommonModule,
997
+ TranslatePipe$1,
998
+ TableActionComponent,
999
+ ButtonComponent,
1000
+ IconComponent,
1001
+ DropdownMenuComponent,
1002
+ DropdownMenuTriggerComponent,
1003
+ DropdownMenuContentComponent,
1004
+ DropdownMenuItemComponent,
1005
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (hasActions()) {\n\t@if (mode() === 'inline') {\n\t\t<div [class]=\"componentClass()\">\n\t\t\t@for (action of actions(); track action.id) {\n\t\t\t\t<st-table-action\n\t\t\t\t\t[variant]=\"action.variant ?? 'primary'\"\n\t\t\t\t\t[icon]=\"action.icon\"\n\t\t\t\t\t[tooltip]=\"action.tooltip\"\n\t\t\t\t\t[size]=\"size()\"\n\t\t\t\t\t(click)=\"onActionClick(action)\"\n\t\t\t\t/>\n\t\t\t}\n\t\t</div>\n\t} @else {\n\t\t<st-dropdown-menu>\n\t\t\t<st-dropdown-menu-trigger [menuTriggerFor]=\"content.template\">\n\t\t\t\t<st-button [icon]=\"triggerIcon()\" [ghost]=\"true\" [size]=\"size()\" variant=\"base\" />\n\t\t\t</st-dropdown-menu-trigger>\n\t\t\t<st-dropdown-menu-content #content [size]=\"size()\">\n\t\t\t\t@for (action of actions(); track action.id) {\n\t\t\t\t\t<st-dropdown-menu-item [disabled]=\"action.disabled ?? false\" (triggered)=\"onActionClick(action)\">\n\t\t\t\t\t\t<span class=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t@if (action.icon) {\n\t\t\t\t\t\t\t\t<st-icon [icon]=\"action.icon\" size=\"auto\" />\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t@if (action.label) {\n\t\t\t\t\t\t\t\t{{ action.label | translate }}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</st-dropdown-menu-item>\n\t\t\t\t}\n\t\t\t</st-dropdown-menu-content>\n\t\t</st-dropdown-menu>\n\t}\n} @else {\n\t<div [class]=\"componentClass()\">\n\t\t<ng-content></ng-content>\n\t</div>\n}\n" }]
1006
+ }] });
1007
+
1008
+ class TableEmptyActionsComponent {
1009
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: TableEmptyActionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1010
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.0", type: TableEmptyActionsComponent, isStandalone: true, selector: "st-table-empty-actions", ngImport: i0, template: "<ng-content></ng-content>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1011
+ }
1012
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: TableEmptyActionsComponent, decorators: [{
1013
+ type: Component,
1014
+ args: [{ selector: 'st-table-empty-actions', standalone: true, imports: [CommonModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>\n" }]
539
1015
  }] });
540
1016
 
541
1017
  /**
542
1018
  * Generated bundle index. Do not edit.
543
1019
  */
544
1020
 
545
- export { TableActionComponent, TableActionsComponent, TableComponent, TableHeaderCheckboxComponent, TableRowCheckboxComponent, tableComponent, tableContainer, tableContent };
1021
+ export { TableActionComponent, TableActionsComponent, TableComponent, TableEmptyActionsComponent, TableHeaderCheckboxComponent, TableRowCheckboxComponent, getTableFooterLayoutTokens, getTableHierarchyTypographyClasses, getTableSizeTokens, resolveTableSize, tableComponent, tableContainer, tableContent };
546
1022
  //# sourceMappingURL=sixbell-telco-sdk-components-table.mjs.map