@tectra-ng/ui 0.4.2 → 0.4.3

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 (110) hide show
  1. package/README.md +1 -1
  2. package/amount/README.md +2 -2
  3. package/analog-clock/README.md +3 -2
  4. package/button-group/README.md +34 -2
  5. package/chips-input/README.md +10 -0
  6. package/data-view/README.md +3 -0
  7. package/fesm2022/tectra-ng-ui-amount.mjs +11 -9
  8. package/fesm2022/tectra-ng-ui-amount.mjs.map +1 -1
  9. package/fesm2022/tectra-ng-ui-analog-clock.mjs +12 -6
  10. package/fesm2022/tectra-ng-ui-analog-clock.mjs.map +1 -1
  11. package/fesm2022/tectra-ng-ui-button-group.mjs +139 -6
  12. package/fesm2022/tectra-ng-ui-button-group.mjs.map +1 -1
  13. package/fesm2022/tectra-ng-ui-chips-input.mjs +36 -6
  14. package/fesm2022/tectra-ng-ui-chips-input.mjs.map +1 -1
  15. package/fesm2022/tectra-ng-ui-country-select.mjs +2 -2
  16. package/fesm2022/tectra-ng-ui-country-select.mjs.map +1 -1
  17. package/fesm2022/tectra-ng-ui-data-view.mjs +11 -3
  18. package/fesm2022/tectra-ng-ui-data-view.mjs.map +1 -1
  19. package/fesm2022/tectra-ng-ui-datepicker.mjs +2 -2
  20. package/fesm2022/tectra-ng-ui-datepicker.mjs.map +1 -1
  21. package/fesm2022/tectra-ng-ui-export.mjs +14 -19
  22. package/fesm2022/tectra-ng-ui-export.mjs.map +1 -1
  23. package/fesm2022/tectra-ng-ui-input-otp.mjs +6 -2
  24. package/fesm2022/tectra-ng-ui-input-otp.mjs.map +1 -1
  25. package/fesm2022/tectra-ng-ui-knob.mjs +12 -4
  26. package/fesm2022/tectra-ng-ui-knob.mjs.map +1 -1
  27. package/fesm2022/tectra-ng-ui-message.mjs +1 -1
  28. package/fesm2022/tectra-ng-ui-message.mjs.map +1 -1
  29. package/fesm2022/tectra-ng-ui-paginator.mjs +3 -20
  30. package/fesm2022/tectra-ng-ui-paginator.mjs.map +1 -1
  31. package/fesm2022/tectra-ng-ui-panel-menu.mjs +19 -2
  32. package/fesm2022/tectra-ng-ui-panel-menu.mjs.map +1 -1
  33. package/fesm2022/tectra-ng-ui-panel.mjs +2 -2
  34. package/fesm2022/tectra-ng-ui-panel.mjs.map +1 -1
  35. package/fesm2022/tectra-ng-ui-pill.mjs +3 -2
  36. package/fesm2022/tectra-ng-ui-pill.mjs.map +1 -1
  37. package/fesm2022/tectra-ng-ui-scroll-panel.mjs +4 -4
  38. package/fesm2022/tectra-ng-ui-scroll-panel.mjs.map +1 -1
  39. package/fesm2022/tectra-ng-ui-select-button.mjs +748 -0
  40. package/fesm2022/tectra-ng-ui-select-button.mjs.map +1 -0
  41. package/fesm2022/tectra-ng-ui-speed-dial.mjs +91 -60
  42. package/fesm2022/tectra-ng-ui-speed-dial.mjs.map +1 -1
  43. package/fesm2022/tectra-ng-ui-split-button.mjs +16 -5
  44. package/fesm2022/tectra-ng-ui-split-button.mjs.map +1 -1
  45. package/fesm2022/tectra-ng-ui-stat-tiles.mjs +8 -5
  46. package/fesm2022/tectra-ng-ui-stat-tiles.mjs.map +1 -1
  47. package/fesm2022/tectra-ng-ui-stepper.mjs +72 -29
  48. package/fesm2022/tectra-ng-ui-stepper.mjs.map +1 -1
  49. package/fesm2022/tectra-ng-ui-table.mjs +78 -141
  50. package/fesm2022/tectra-ng-ui-table.mjs.map +1 -1
  51. package/fesm2022/tectra-ng-ui-toggle-button.mjs +2 -2
  52. package/fesm2022/tectra-ng-ui-toggle-button.mjs.map +1 -1
  53. package/fesm2022/tectra-ng-ui-tree-select.mjs +17 -3
  54. package/fesm2022/tectra-ng-ui-tree-select.mjs.map +1 -1
  55. package/fesm2022/tectra-ng-ui-tree-table.mjs +4 -4
  56. package/fesm2022/tectra-ng-ui-tree-table.mjs.map +1 -1
  57. package/fesm2022/tectra-ng-ui-truncate-text.mjs +2 -2
  58. package/fesm2022/tectra-ng-ui-truncate-text.mjs.map +1 -1
  59. package/fesm2022/tectra-ng-ui.mjs +1 -1
  60. package/field/README.md +2 -2
  61. package/input-otp/README.md +1 -1
  62. package/knob/README.md +1 -1
  63. package/message/README.md +2 -2
  64. package/package.json +8 -4
  65. package/paginator/README.md +1 -1
  66. package/panel-menu/README.md +1 -1
  67. package/pill/README.md +1 -1
  68. package/select-button/README.md +70 -0
  69. package/speed-dial/README.md +2 -1
  70. package/stat-tiles/README.md +3 -3
  71. package/stepper/README.md +3 -2
  72. package/table/README.md +10 -7
  73. package/tabs/README.md +1 -1
  74. package/tree-select/README.md +1 -1
  75. package/tree-table/README.md +1 -1
  76. package/truncate-text/README.md +1 -1
  77. package/types/tectra-ng-ui-amount.d.ts +6 -3
  78. package/types/tectra-ng-ui-amount.d.ts.map +1 -1
  79. package/types/tectra-ng-ui-analog-clock.d.ts +9 -4
  80. package/types/tectra-ng-ui-analog-clock.d.ts.map +1 -1
  81. package/types/tectra-ng-ui-button-group.d.ts +58 -5
  82. package/types/tectra-ng-ui-button-group.d.ts.map +1 -1
  83. package/types/tectra-ng-ui-chips-input.d.ts +14 -1
  84. package/types/tectra-ng-ui-chips-input.d.ts.map +1 -1
  85. package/types/tectra-ng-ui-field.d.ts +2 -2
  86. package/types/tectra-ng-ui-input-otp.d.ts +1 -1
  87. package/types/tectra-ng-ui-input-otp.d.ts.map +1 -1
  88. package/types/tectra-ng-ui-knob.d.ts +2 -1
  89. package/types/tectra-ng-ui-knob.d.ts.map +1 -1
  90. package/types/tectra-ng-ui-message.d.ts +2 -2
  91. package/types/tectra-ng-ui-paginator.d.ts +2 -21
  92. package/types/tectra-ng-ui-paginator.d.ts.map +1 -1
  93. package/types/tectra-ng-ui-panel-menu.d.ts +9 -9
  94. package/types/tectra-ng-ui-panel-menu.d.ts.map +1 -1
  95. package/types/tectra-ng-ui-pill.d.ts +7 -3
  96. package/types/tectra-ng-ui-pill.d.ts.map +1 -1
  97. package/types/tectra-ng-ui-select-button.d.ts +256 -0
  98. package/types/tectra-ng-ui-select-button.d.ts.map +1 -0
  99. package/types/tectra-ng-ui-speed-dial.d.ts.map +1 -1
  100. package/types/tectra-ng-ui-stat-tiles.d.ts +4 -3
  101. package/types/tectra-ng-ui-stat-tiles.d.ts.map +1 -1
  102. package/types/tectra-ng-ui-stepper.d.ts +25 -10
  103. package/types/tectra-ng-ui-stepper.d.ts.map +1 -1
  104. package/types/tectra-ng-ui-table.d.ts +39 -42
  105. package/types/tectra-ng-ui-table.d.ts.map +1 -1
  106. package/types/tectra-ng-ui-tabs.d.ts +1 -1
  107. package/types/tectra-ng-ui-tree-select.d.ts +3 -1
  108. package/types/tectra-ng-ui-tree-select.d.ts.map +1 -1
  109. package/types/tectra-ng-ui-truncate-text.d.ts +1 -1
  110. package/types/tectra-ng-ui.d.ts +1 -1
@@ -765,25 +765,20 @@ async function writePdf(table, options, font, context = {
765
765
  const headerRow = options.header === false || !table.columns.length ? null : wrapRow(table.columns.map((column) => column.title), bold, true, false);
766
766
  const bodyRows = texts.map((values, index) => wrapRow(values, regular, false, !!options.striped && index % 2 === 1));
767
767
  const heading = [];
768
- if (options.title) heading.push({
769
- text: options.title,
770
- font: bold,
771
- size: size * 1.6,
772
- color: text
773
- });
774
- if (options.subtitle) heading.push({
775
- text: options.subtitle,
776
- font: regular,
777
- size: size * 1.1,
778
- color: muted
779
- });
768
+ const addHeading = (value, strong, headingSize, color) => {
769
+ const headingFont = strong ? bold : regular;
770
+ for (const line of wrapText(value, available, (part) => headingFont.width(part, headingSize))) heading.push({
771
+ text: line,
772
+ font: headingFont,
773
+ size: headingSize,
774
+ color,
775
+ strong
776
+ });
777
+ };
778
+ if (options.title) addHeading(options.title, true, size * 1.6, text);
779
+ if (options.subtitle) addHeading(options.subtitle, false, size * 1.1, muted);
780
780
  const stamp = dateLine(options, context, date);
781
- if (stamp) heading.push({
782
- text: stamp,
783
- font: regular,
784
- size: size * .9,
785
- color: muted
786
- });
781
+ if (stamp) addHeading(stamp, false, size * .9, muted);
787
782
  const pages = [];
788
783
  let ops = [];
789
784
  let y = page.height - top;
@@ -821,7 +816,7 @@ async function writePdf(table, options, font, context = {
821
816
  if (first) {
822
817
  heading.forEach((line) => {
823
818
  y -= line.size * 1.25;
824
- drawText(line.text, left, y, line.font, line.size, line.color, line.font === bold);
819
+ drawText(line.text, left, y, line.font, line.size, line.color, line.strong);
825
820
  });
826
821
  if (heading.length) y -= size * 1.2;
827
822
  }