@wirabyte/ui 3.0.0-beta.0 → 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 (257) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/README.md +6 -6
  3. package/fesm2022/wirabyte-ui-accordion.mjs +4 -4
  4. package/fesm2022/wirabyte-ui-accordion.mjs.map +1 -1
  5. package/fesm2022/wirabyte-ui-alert.mjs +2 -2
  6. package/fesm2022/wirabyte-ui-alert.mjs.map +1 -1
  7. package/fesm2022/wirabyte-ui-avatar.mjs +13 -6
  8. package/fesm2022/wirabyte-ui-avatar.mjs.map +1 -1
  9. package/fesm2022/wirabyte-ui-breadcrumb.mjs +4 -2
  10. package/fesm2022/wirabyte-ui-breadcrumb.mjs.map +1 -1
  11. package/fesm2022/wirabyte-ui-button.mjs +3 -3
  12. package/fesm2022/wirabyte-ui-button.mjs.map +1 -1
  13. package/fesm2022/wirabyte-ui-card.mjs +8 -8
  14. package/fesm2022/wirabyte-ui-card.mjs.map +1 -1
  15. package/fesm2022/wirabyte-ui-chat.mjs +391 -0
  16. package/fesm2022/wirabyte-ui-chat.mjs.map +1 -0
  17. package/fesm2022/wirabyte-ui-config.mjs +42 -2
  18. package/fesm2022/wirabyte-ui-config.mjs.map +1 -1
  19. package/fesm2022/wirabyte-ui-core.mjs +155 -2
  20. package/fesm2022/wirabyte-ui-core.mjs.map +1 -1
  21. package/fesm2022/wirabyte-ui-datepicker.mjs +2 -2
  22. package/fesm2022/wirabyte-ui-datepicker.mjs.map +1 -1
  23. package/fesm2022/wirabyte-ui-descriptions.mjs +133 -0
  24. package/fesm2022/wirabyte-ui-descriptions.mjs.map +1 -0
  25. package/fesm2022/wirabyte-ui-dialog.mjs +2 -2
  26. package/fesm2022/wirabyte-ui-dialog.mjs.map +1 -1
  27. package/fesm2022/wirabyte-ui-drawer.mjs +2 -2
  28. package/fesm2022/wirabyte-ui-drawer.mjs.map +1 -1
  29. package/fesm2022/wirabyte-ui-emptystate.mjs +2 -2
  30. package/fesm2022/wirabyte-ui-emptystate.mjs.map +1 -1
  31. package/fesm2022/wirabyte-ui-errorpage.mjs +2 -2
  32. package/fesm2022/wirabyte-ui-errorpage.mjs.map +1 -1
  33. package/fesm2022/wirabyte-ui-fieldset.mjs +4 -4
  34. package/fesm2022/wirabyte-ui-fieldset.mjs.map +1 -1
  35. package/fesm2022/wirabyte-ui-metergroup.mjs +19 -5
  36. package/fesm2022/wirabyte-ui-metergroup.mjs.map +1 -1
  37. package/fesm2022/wirabyte-ui-navbar.mjs +2 -2
  38. package/fesm2022/wirabyte-ui-navbar.mjs.map +1 -1
  39. package/fesm2022/wirabyte-ui-panel.mjs +6 -6
  40. package/fesm2022/wirabyte-ui-panel.mjs.map +1 -1
  41. package/fesm2022/wirabyte-ui-popover.mjs +2 -2
  42. package/fesm2022/wirabyte-ui-popover.mjs.map +1 -1
  43. package/fesm2022/wirabyte-ui-result.mjs +2 -2
  44. package/fesm2022/wirabyte-ui-result.mjs.map +1 -1
  45. package/fesm2022/wirabyte-ui-scheduler.mjs +504 -0
  46. package/fesm2022/wirabyte-ui-scheduler.mjs.map +1 -0
  47. package/fesm2022/wirabyte-ui-selectbutton.mjs +25 -4
  48. package/fesm2022/wirabyte-ui-selectbutton.mjs.map +1 -1
  49. package/fesm2022/wirabyte-ui-signaturepad.mjs +310 -0
  50. package/fesm2022/wirabyte-ui-signaturepad.mjs.map +1 -0
  51. package/fesm2022/wirabyte-ui-stat.mjs +149 -0
  52. package/fesm2022/wirabyte-ui-stat.mjs.map +1 -0
  53. package/fesm2022/wirabyte-ui-table.mjs +3 -3
  54. package/fesm2022/wirabyte-ui-table.mjs.map +1 -1
  55. package/fesm2022/wirabyte-ui-tabs.mjs +3 -3
  56. package/fesm2022/wirabyte-ui-tabs.mjs.map +1 -1
  57. package/fesm2022/wirabyte-ui-tag.mjs +2 -2
  58. package/fesm2022/wirabyte-ui-tag.mjs.map +1 -1
  59. package/fesm2022/wirabyte-ui-textarea.mjs +18 -0
  60. package/fesm2022/wirabyte-ui-textarea.mjs.map +1 -1
  61. package/fesm2022/wirabyte-ui-thai.mjs +1 -1
  62. package/fesm2022/wirabyte-ui-thai.mjs.map +1 -1
  63. package/fesm2022/wirabyte-ui-toolbar.mjs +6 -6
  64. package/fesm2022/wirabyte-ui-toolbar.mjs.map +1 -1
  65. package/package.json +21 -1
  66. package/schematics/core/catalog.cjs +22 -1
  67. package/schematics/core/families.cjs +42 -0
  68. package/schematics/core/overrides.cjs +25 -0
  69. package/schematics/core/thai/locale.cjs +66 -0
  70. package/schematics/ng-add/index.cjs +3 -1
  71. package/theme/_data.scss +239 -7
  72. package/theme/_index.scss +29 -0
  73. package/themes/glass/amber.css +36 -7
  74. package/themes/glass/blue.css +36 -7
  75. package/themes/glass/cyan.css +36 -7
  76. package/themes/glass/emerald.css +36 -7
  77. package/themes/glass/fuchsia.css +36 -7
  78. package/themes/glass/green.css +36 -7
  79. package/themes/glass/indigo.css +36 -7
  80. package/themes/glass/lime.css +36 -7
  81. package/themes/glass/orange.css +36 -7
  82. package/themes/glass/pink.css +36 -7
  83. package/themes/glass/purple.css +36 -7
  84. package/themes/glass/red.css +36 -7
  85. package/themes/glass/rose.css +36 -7
  86. package/themes/glass/sky.css +36 -7
  87. package/themes/glass/teal.css +36 -7
  88. package/themes/glass/theme.css +36 -7
  89. package/themes/glass/violet.css +36 -7
  90. package/themes/glass/wira.css +36 -7
  91. package/themes/glass/yellow.css +36 -7
  92. package/themes/lanna/amber.css +36 -7
  93. package/themes/lanna/blue.css +36 -7
  94. package/themes/lanna/cyan.css +36 -7
  95. package/themes/lanna/emerald.css +36 -7
  96. package/themes/lanna/fuchsia.css +36 -7
  97. package/themes/lanna/green.css +36 -7
  98. package/themes/lanna/indigo.css +36 -7
  99. package/themes/lanna/lime.css +36 -7
  100. package/themes/lanna/orange.css +36 -7
  101. package/themes/lanna/pink.css +36 -7
  102. package/themes/lanna/purple.css +36 -7
  103. package/themes/lanna/red.css +36 -7
  104. package/themes/lanna/rose.css +36 -7
  105. package/themes/lanna/sky.css +36 -7
  106. package/themes/lanna/teal.css +36 -7
  107. package/themes/lanna/theme.css +36 -7
  108. package/themes/lanna/violet.css +36 -7
  109. package/themes/lanna/wira.css +36 -7
  110. package/themes/lanna/yellow.css +36 -7
  111. package/themes/mali/amber.css +30 -1
  112. package/themes/mali/blue.css +30 -1
  113. package/themes/mali/cyan.css +30 -1
  114. package/themes/mali/emerald.css +30 -1
  115. package/themes/mali/fuchsia.css +30 -1
  116. package/themes/mali/green.css +30 -1
  117. package/themes/mali/indigo.css +30 -1
  118. package/themes/mali/lime.css +30 -1
  119. package/themes/mali/orange.css +30 -1
  120. package/themes/mali/pink.css +30 -1
  121. package/themes/mali/purple.css +30 -1
  122. package/themes/mali/red.css +30 -1
  123. package/themes/mali/rose.css +30 -1
  124. package/themes/mali/sky.css +30 -1
  125. package/themes/mali/teal.css +30 -1
  126. package/themes/mali/theme.css +30 -1
  127. package/themes/mali/violet.css +30 -1
  128. package/themes/mali/wira.css +30 -1
  129. package/themes/mali/yellow.css +30 -1
  130. package/themes/material/amber.css +30 -1
  131. package/themes/material/blue.css +30 -1
  132. package/themes/material/cyan.css +30 -1
  133. package/themes/material/emerald.css +30 -1
  134. package/themes/material/fuchsia.css +30 -1
  135. package/themes/material/green.css +30 -1
  136. package/themes/material/indigo.css +30 -1
  137. package/themes/material/lime.css +30 -1
  138. package/themes/material/orange.css +30 -1
  139. package/themes/material/pink.css +30 -1
  140. package/themes/material/purple.css +30 -1
  141. package/themes/material/red.css +30 -1
  142. package/themes/material/rose.css +30 -1
  143. package/themes/material/sky.css +30 -1
  144. package/themes/material/teal.css +30 -1
  145. package/themes/material/theme.css +30 -1
  146. package/themes/material/violet.css +30 -1
  147. package/themes/material/wira.css +30 -1
  148. package/themes/material/yellow.css +30 -1
  149. package/themes/nakhon/amber.css +36 -7
  150. package/themes/nakhon/blue.css +36 -7
  151. package/themes/nakhon/cyan.css +36 -7
  152. package/themes/nakhon/emerald.css +36 -7
  153. package/themes/nakhon/fuchsia.css +36 -7
  154. package/themes/nakhon/green.css +36 -7
  155. package/themes/nakhon/indigo.css +36 -7
  156. package/themes/nakhon/lime.css +36 -7
  157. package/themes/nakhon/orange.css +36 -7
  158. package/themes/nakhon/pink.css +36 -7
  159. package/themes/nakhon/purple.css +36 -7
  160. package/themes/nakhon/red.css +36 -7
  161. package/themes/nakhon/rose.css +36 -7
  162. package/themes/nakhon/sky.css +36 -7
  163. package/themes/nakhon/teal.css +36 -7
  164. package/themes/nakhon/theme.css +36 -7
  165. package/themes/nakhon/violet.css +36 -7
  166. package/themes/nakhon/wira.css +36 -7
  167. package/themes/nakhon/yellow.css +36 -7
  168. package/themes/phet/amber.css +30 -1
  169. package/themes/phet/blue.css +30 -1
  170. package/themes/phet/cyan.css +30 -1
  171. package/themes/phet/emerald.css +30 -1
  172. package/themes/phet/fuchsia.css +30 -1
  173. package/themes/phet/green.css +30 -1
  174. package/themes/phet/indigo.css +30 -1
  175. package/themes/phet/lime.css +30 -1
  176. package/themes/phet/orange.css +30 -1
  177. package/themes/phet/pink.css +30 -1
  178. package/themes/phet/purple.css +30 -1
  179. package/themes/phet/red.css +30 -1
  180. package/themes/phet/rose.css +30 -1
  181. package/themes/phet/sky.css +30 -1
  182. package/themes/phet/teal.css +30 -1
  183. package/themes/phet/theme.css +30 -1
  184. package/themes/phet/violet.css +30 -1
  185. package/themes/phet/wira.css +30 -1
  186. package/themes/phet/yellow.css +30 -1
  187. package/themes/siam/amber.css +36 -7
  188. package/themes/siam/blue.css +36 -7
  189. package/themes/siam/cyan.css +36 -7
  190. package/themes/siam/emerald.css +36 -7
  191. package/themes/siam/fuchsia.css +36 -7
  192. package/themes/siam/green.css +36 -7
  193. package/themes/siam/indigo.css +36 -7
  194. package/themes/siam/lime.css +36 -7
  195. package/themes/siam/orange.css +36 -7
  196. package/themes/siam/pink.css +36 -7
  197. package/themes/siam/purple.css +36 -7
  198. package/themes/siam/red.css +36 -7
  199. package/themes/siam/rose.css +36 -7
  200. package/themes/siam/sky.css +36 -7
  201. package/themes/siam/teal.css +36 -7
  202. package/themes/siam/theme.css +36 -7
  203. package/themes/siam/violet.css +36 -7
  204. package/themes/siam/wira.css +36 -7
  205. package/themes/siam/yellow.css +36 -7
  206. package/themes/sila/amber.css +30 -1
  207. package/themes/sila/blue.css +30 -1
  208. package/themes/sila/cyan.css +30 -1
  209. package/themes/sila/emerald.css +30 -1
  210. package/themes/sila/fuchsia.css +30 -1
  211. package/themes/sila/green.css +30 -1
  212. package/themes/sila/indigo.css +30 -1
  213. package/themes/sila/lime.css +30 -1
  214. package/themes/sila/orange.css +30 -1
  215. package/themes/sila/pink.css +30 -1
  216. package/themes/sila/purple.css +30 -1
  217. package/themes/sila/red.css +30 -1
  218. package/themes/sila/rose.css +30 -1
  219. package/themes/sila/sky.css +30 -1
  220. package/themes/sila/teal.css +30 -1
  221. package/themes/sila/theme.css +30 -1
  222. package/themes/sila/violet.css +30 -1
  223. package/themes/sila/wira.css +30 -1
  224. package/themes/sila/yellow.css +30 -1
  225. package/themes/wira/amber.css +45 -16
  226. package/themes/wira/blue.css +45 -16
  227. package/themes/wira/cyan.css +45 -16
  228. package/themes/wira/emerald.css +45 -16
  229. package/themes/wira/fuchsia.css +45 -16
  230. package/themes/wira/green.css +45 -16
  231. package/themes/wira/indigo.css +45 -16
  232. package/themes/wira/lime.css +45 -16
  233. package/themes/wira/orange.css +45 -16
  234. package/themes/wira/pink.css +45 -16
  235. package/themes/wira/purple.css +45 -16
  236. package/themes/wira/red.css +45 -16
  237. package/themes/wira/rose.css +45 -16
  238. package/themes/wira/sky.css +45 -16
  239. package/themes/wira/teal.css +45 -16
  240. package/themes/wira/theme.css +45 -16
  241. package/themes/wira/violet.css +45 -16
  242. package/themes/wira/wira.css +45 -16
  243. package/themes/wira/yellow.css +45 -16
  244. package/types/wirabyte-ui-avatar.d.ts +8 -3
  245. package/types/wirabyte-ui-breadcrumb.d.ts +3 -1
  246. package/types/wirabyte-ui-button.d.ts +1 -1
  247. package/types/wirabyte-ui-chat.d.ts +192 -0
  248. package/types/wirabyte-ui-config.d.ts +17 -0
  249. package/types/wirabyte-ui-core.d.ts +62 -3
  250. package/types/wirabyte-ui-datepicker.d.ts +1 -1
  251. package/types/wirabyte-ui-descriptions.d.ts +67 -0
  252. package/types/wirabyte-ui-metergroup.d.ts +17 -2
  253. package/types/wirabyte-ui-scheduler.d.ts +199 -0
  254. package/types/wirabyte-ui-selectbutton.d.ts +12 -1
  255. package/types/wirabyte-ui-signaturepad.d.ts +108 -0
  256. package/types/wirabyte-ui-stat.d.ts +72 -0
  257. package/types/wirabyte-ui-textarea.d.ts +2 -0
@@ -117,7 +117,7 @@ declare class WuButtonModule {
117
117
  }
118
118
 
119
119
  /** Generated by tools/sync-sources.mjs from packages/styles/button.css. */
120
- declare const WU_BUTTON_CSS = "/* wu-button. One stylesheet for wiraui v1, v2 and v3: the preset's tokens decide the look\n (classic metrics in v1, styled in v2/v3, WiraUI's own in v3). */\n@layer wiraui.components {\n wu-button {\n display: inline-flex;\n vertical-align: middle;\n }\n wu-button.wu-button-fluid {\n display: flex;\n width: 100%;\n }\n\n .wu-btn {\n /* --_bg/--_bd/--_fg: solid colours; --_tone: colour of outlined and text buttons. */\n --_bg: var(--wu-primary-color);\n --_fg: var(--wu-primary-contrast);\n --_bd: var(--wu-primary-color);\n --_hover: var(--wu-primary-hover);\n --_active: var(--wu-primary-active);\n --_tone: var(--wu-primary-color);\n position: relative;\n overflow: hidden;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: var(--wu-button-gap);\n margin: 0;\n font-family: var(--wu-font-family);\n font-size: var(--wu-font-size);\n font-weight: var(--wu-button-font-weight);\n line-height: var(--wu-control-line-height);\n text-transform: var(--wu-button-text-transform);\n letter-spacing: var(--wu-button-letter-spacing);\n padding: var(--wu-button-padding-y) var(--wu-button-padding-x);\n border-radius: var(--wu-button-radius);\n border: 1px solid var(--_bd);\n background: var(--_bg);\n color: var(--_fg);\n /* none, except the glass material: a sheen of light inside and a soft lift. */\n box-shadow: var(--wu-button-shadow);\n -webkit-backdrop-filter: var(--wu-button-backdrop);\n backdrop-filter: var(--wu-button-backdrop);\n cursor: pointer;\n white-space: nowrap;\n user-select: none;\n text-decoration: none;\n transition:\n background-color var(--wu-transition),\n border-color var(--wu-transition),\n color var(--wu-transition),\n box-shadow var(--wu-transition),\n outline-color var(--wu-transition);\n }\n .wu-btn:not(:disabled):hover {\n background: var(--_hover);\n border-color: var(--_hover);\n }\n .wu-btn:not(:disabled):active {\n background: var(--_active);\n border-color: var(--_active);\n }\n .wu-btn:focus-visible {\n outline: var(--wu-control-focus-outline);\n outline-offset: var(--wu-control-focus-offset);\n box-shadow: var(--wu-control-focus-shadow);\n }\n .wu-btn:disabled {\n opacity: var(--wu-disabled-opacity);\n cursor: default;\n }\n /* Disabled (and not busy with its action): a faint gray button whatever its colour, read at a glance as\n \"not yet\", where a faded colour still looks pressable. A loading button keeps its colour. */\n .wu-btn:disabled:not([aria-busy='true']) {\n --_bg: var(--wu-button-disabled-bg);\n --_bd: var(--wu-button-disabled-bg);\n --_fg: var(--wu-button-disabled-color);\n --_tone: var(--wu-button-disabled-color);\n opacity: 1;\n box-shadow: none;\n }\n .wu-button-fluid .wu-btn {\n width: 100%;\n }\n\n /* severities */\n .wu-btn-secondary {\n --_bg: var(--wu-button-secondary-bg);\n --_fg: var(--wu-button-secondary-color);\n --_bd: var(--wu-button-secondary-border);\n --_hover: var(--wu-button-secondary-hover-bg);\n --_active: var(--wu-button-secondary-active-bg);\n --_tone: var(--wu-button-secondary-tone);\n }\n .wu-btn-success { --_bg: var(--wu-success-color); --_bd: var(--wu-success-color); --_fg: var(--wu-success-contrast); --_hover: var(--wu-success-hover); --_active: var(--wu-success-active); --_tone: var(--wu-success-color); }\n .wu-btn-info { --_bg: var(--wu-info-color); --_bd: var(--wu-info-color); --_fg: var(--wu-info-contrast); --_hover: var(--wu-info-hover); --_active: var(--wu-info-active); --_tone: var(--wu-info-color); }\n .wu-btn-warn { --_bg: var(--wu-warn-color); --_bd: var(--wu-warn-color); --_fg: var(--wu-warn-contrast); --_hover: var(--wu-warn-hover); --_active: var(--wu-warn-active); --_tone: var(--wu-warn-color); }\n .wu-btn-danger { --_bg: var(--wu-danger-color); --_bd: var(--wu-danger-color); --_fg: var(--wu-danger-contrast); --_hover: var(--wu-danger-hover); --_active: var(--wu-danger-active); --_tone: var(--wu-danger-color); }\n .wu-btn-help { --_bg: var(--wu-help-color); --_bd: var(--wu-help-color); --_fg: var(--wu-help-contrast); --_hover: var(--wu-help-hover); --_active: var(--wu-help-active); --_tone: var(--wu-help-color); }\n /* Contrast gets stronger on hover and press, like every other colour (it used to fade, which read as \"cancel\"). */\n .wu-btn-contrast { --_bg: var(--wu-text); --_bd: var(--wu-text); --_fg: var(--wu-card-bg); --_hover: var(--wu-button-contrast-hover-bg); --_active: var(--wu-button-contrast-active-bg); --_tone: var(--wu-text); }\n\n /* variants */\n .wu-btn-outlined,\n .wu-btn-text {\n color: var(--_tone);\n background: transparent;\n }\n .wu-btn-outlined {\n border-color: color-mix(in srgb, var(--_tone) var(--wu-button-outlined-border-mix), transparent);\n }\n .wu-btn-text {\n border-color: transparent;\n box-shadow: none;\n -webkit-backdrop-filter: none;\n backdrop-filter: none;\n }\n .wu-btn-outlined:not(:disabled):hover,\n .wu-btn-text:not(:disabled):hover {\n background: color-mix(in srgb, var(--_tone) var(--wu-button-tint), transparent);\n }\n .wu-btn-outlined:not(:disabled):active,\n .wu-btn-text:not(:disabled):active {\n background: color-mix(in srgb, var(--_tone) calc(var(--wu-button-tint) * 2), transparent);\n }\n .wu-btn-outlined:not(:disabled):hover,\n .wu-btn-outlined:not(:disabled):active {\n border-color: color-mix(in srgb, var(--_tone) var(--wu-button-outlined-border-mix), transparent);\n }\n .wu-btn-text:not(:disabled):hover,\n .wu-btn-text:not(:disabled):active {\n border-color: transparent;\n }\n .wu-btn-raised {\n box-shadow: var(--wu-shadow-md);\n }\n\n /* sizes and shapes */\n .wu-btn-sm,\n .wu-btn.p-button-sm {\n font-size: calc(var(--wu-font-size) * 0.875);\n padding: calc(var(--wu-button-padding-y) * var(--wu-size-sm-scale)) calc(var(--wu-button-padding-x) * var(--wu-size-sm-scale));\n }\n .wu-btn-lg,\n .wu-btn.p-button-lg {\n font-size: calc(var(--wu-font-size) * var(--wu-size-lg-scale));\n padding: calc(var(--wu-button-padding-y) * var(--wu-size-lg-scale)) calc(var(--wu-button-padding-x) * var(--wu-size-lg-scale));\n }\n .wu-btn-rounded {\n border-radius: var(--wu-radius-full);\n }\n .wu-btn-icon-only {\n padding: var(--wu-button-padding-y);\n aspect-ratio: 1;\n }\n .wu-btn-sm.wu-btn-icon-only,\n .wu-btn.p-button-sm.wu-btn-icon-only {\n padding: calc(var(--wu-button-padding-y) * var(--wu-size-sm-scale));\n }\n .wu-btn-lg.wu-btn-icon-only,\n .wu-btn.p-button-lg.wu-btn-icon-only {\n padding: calc(var(--wu-button-padding-y) * var(--wu-size-lg-scale));\n }\n\n /* parts */\n .wu-btn-icon {\n line-height: 1;\n }\n .wu-btn-spinner {\n width: 1em;\n height: 1em;\n border-radius: 50%;\n border: 2px solid currentColor;\n border-right-color: transparent;\n animation: wu-btn-spin 0.8s linear infinite;\n }\n /* A pill that fits two digits comfortably and keeps them centred whatever the font's line height. */\n .wu-btn-badge {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n min-width: 1.75em;\n height: 1.75em;\n padding: 0 0.45em;\n border-radius: var(--wu-radius-full);\n background: var(--_fg);\n color: var(--_bg);\n font-size: 0.75em;\n font-weight: 700;\n font-variant-numeric: tabular-nums;\n line-height: 1;\n letter-spacing: normal;\n }\n .wu-btn-outlined .wu-btn-badge,\n .wu-btn-text .wu-btn-badge {\n background: var(--_tone);\n color: var(--wu-card-bg);\n }\n /* link: a button that reads as a link. */\n .wu-btn.wu-btn-link {\n border-color: transparent;\n background: transparent;\n color: var(--_tone);\n box-shadow: none;\n -webkit-backdrop-filter: none;\n backdrop-filter: none;\n }\n .wu-btn.wu-btn-link:not(:disabled):hover,\n .wu-btn.wu-btn-link:not(:disabled):active {\n border-color: transparent;\n background: transparent;\n text-decoration: underline;\n }\n .wu-btn-badge:is(.wu-btn-badge-success, .wu-btn-badge-info, .wu-btn-badge-warn, .wu-btn-badge-danger, .wu-btn-badge-secondary, .wu-btn-badge-help, .wu-btn-badge-contrast) {\n background: var(--_badge-bg);\n color: var(--_badge-fg);\n }\n .wu-btn-badge-success { --_badge-bg: var(--wu-success-color); --_badge-fg: var(--wu-success-contrast); }\n .wu-btn-badge-info { --_badge-bg: var(--wu-info-color); --_badge-fg: var(--wu-info-contrast); }\n .wu-btn-badge-warn { --_badge-bg: var(--wu-warn-color); --_badge-fg: var(--wu-warn-contrast); }\n .wu-btn-badge-danger { --_badge-bg: var(--wu-danger-color); --_badge-fg: var(--wu-danger-contrast); }\n .wu-btn-badge-secondary { --_badge-bg: var(--wu-button-secondary-bg); --_badge-fg: var(--wu-button-secondary-color); }\n .wu-btn-badge-help { --_badge-bg: var(--wu-help-color); --_badge-fg: var(--wu-help-contrast); }\n .wu-btn-badge-contrast { --_badge-bg: var(--wu-text); --_badge-fg: var(--wu-card-bg); }\n .wu-ripple-ink {\n position: absolute;\n border-radius: 50%;\n background: currentColor;\n opacity: 0.28;\n transform: scale(0);\n animation: wu-ripple 560ms ease-out forwards;\n pointer-events: none;\n }\n\n @keyframes wu-btn-spin {\n to {\n transform: rotate(1turn);\n }\n }\n @keyframes wu-ripple {\n to {\n transform: scale(2.6);\n opacity: 0;\n }\n }\n @media (prefers-reduced-motion: reduce) {\n .wu-btn,\n .wu-btn-spinner,\n .wu-ripple-ink {\n transition: none;\n animation-duration: 0.01ms;\n }\n }\n /* Touch screens: small and icon-only buttons are at least 24 \u00D7 24 px (WCAG 2.5.8). The button clips its own\n content (ripple), so it grows a little instead of taking a wider invisible hit area. */\n @media (pointer: coarse) {\n .wu-btn {\n min-width: 24px;\n min-height: 24px;\n }\n }\n}\n";
120
+ declare const WU_BUTTON_CSS = "/* wu-button. One stylesheet for wiraui v1, v2 and v3: the preset's tokens decide the look\n (classic metrics in v1, styled in v2/v3, WiraUI's own in v3). */\n@layer wiraui.components {\n wu-button {\n display: inline-flex;\n vertical-align: middle;\n }\n wu-button.wu-button-fluid {\n display: flex;\n width: 100%;\n }\n\n .wu-btn {\n /* --_bg/--_bd/--_fg: solid colours; --_tone: colour of outlined and text buttons. */\n --_bg: var(--wu-primary-color);\n --_fg: var(--wu-primary-contrast);\n --_bd: var(--wu-primary-color);\n --_hover: var(--wu-primary-hover);\n --_active: var(--wu-primary-active);\n --_tone: var(--wu-primary-color);\n position: relative;\n overflow: hidden;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: var(--wu-button-gap);\n margin: 0;\n font-family: var(--wu-font-family);\n font-size: var(--wu-font-size);\n font-weight: var(--wu-button-font-weight);\n line-height: var(--wu-control-line-height);\n text-transform: var(--wu-button-text-transform);\n letter-spacing: var(--wu-button-letter-spacing);\n padding: var(--wu-button-padding-y) var(--wu-button-padding-x);\n border-radius: var(--wu-button-radius);\n border: 1px solid var(--_bd);\n background: var(--_bg);\n color: var(--_fg);\n /* none, except the glass material: a sheen of light inside and a soft lift. */\n box-shadow: var(--wu-button-shadow);\n -webkit-backdrop-filter: var(--wu-button-backdrop);\n backdrop-filter: var(--wu-button-backdrop);\n cursor: pointer;\n white-space: nowrap;\n user-select: none;\n text-decoration: none;\n transition:\n background-color var(--wu-transition),\n border-color var(--wu-transition),\n color var(--wu-transition),\n box-shadow var(--wu-transition),\n outline-color var(--wu-transition);\n }\n .wu-btn:not(:disabled):hover {\n background: var(--_hover);\n border-color: var(--_hover);\n }\n .wu-btn:not(:disabled):active {\n background: var(--_active);\n border-color: var(--_active);\n }\n .wu-btn:focus-visible {\n outline: var(--wu-control-focus-outline);\n outline-offset: var(--wu-control-focus-offset);\n box-shadow: var(--wu-control-focus-shadow);\n }\n .wu-btn:disabled {\n opacity: var(--wu-disabled-opacity);\n cursor: default;\n }\n /* Disabled (and not busy with its action): a faint gray button whatever its colour, read at a glance as\n \"not yet\", where a faded colour still looks pressable. A loading button keeps its colour. */\n .wu-btn:disabled:not([aria-busy='true']) {\n --_bg: var(--wu-button-disabled-bg);\n --_bd: var(--wu-button-disabled-bg);\n --_fg: var(--wu-button-disabled-color);\n --_tone: var(--wu-button-disabled-color);\n opacity: 1;\n box-shadow: none;\n }\n .wu-button-fluid .wu-btn {\n width: 100%;\n }\n\n /* severities */\n .wu-btn-secondary {\n --_bg: var(--wu-button-secondary-bg);\n --_fg: var(--wu-button-secondary-color);\n --_bd: var(--wu-button-secondary-border);\n --_hover: var(--wu-button-secondary-hover-bg);\n --_active: var(--wu-button-secondary-active-bg);\n --_tone: var(--wu-button-secondary-tone);\n }\n .wu-btn-success { --_bg: var(--wu-success-color); --_bd: var(--wu-success-color); --_fg: var(--wu-success-contrast); --_hover: var(--wu-success-hover); --_active: var(--wu-success-active); --_tone: var(--wu-success-color); }\n .wu-btn-info { --_bg: var(--wu-info-color); --_bd: var(--wu-info-color); --_fg: var(--wu-info-contrast); --_hover: var(--wu-info-hover); --_active: var(--wu-info-active); --_tone: var(--wu-info-color); }\n .wu-btn-warn { --_bg: var(--wu-warn-color); --_bd: var(--wu-warn-color); --_fg: var(--wu-warn-contrast); --_hover: var(--wu-warn-hover); --_active: var(--wu-warn-active); --_tone: var(--wu-warn-color); }\n .wu-btn-danger { --_bg: var(--wu-danger-color); --_bd: var(--wu-danger-color); --_fg: var(--wu-danger-contrast); --_hover: var(--wu-danger-hover); --_active: var(--wu-danger-active); --_tone: var(--wu-danger-color); }\n .wu-btn-help { --_bg: var(--wu-help-color); --_bd: var(--wu-help-color); --_fg: var(--wu-help-contrast); --_hover: var(--wu-help-hover); --_active: var(--wu-help-active); --_tone: var(--wu-help-color); }\n /* Contrast gets stronger on hover and press, like every other colour (it used to fade, which read as \"cancel\"). */\n .wu-btn-contrast { --_bg: var(--wu-text); --_bd: var(--wu-text); --_fg: var(--wu-card-bg); --_hover: var(--wu-button-contrast-hover-bg); --_active: var(--wu-button-contrast-active-bg); --_tone: var(--wu-text); }\n\n /* variants */\n .wu-btn-outlined,\n .wu-btn-text {\n color: var(--_tone);\n background: transparent;\n }\n .wu-btn-outlined {\n border-color: color-mix(in srgb, var(--_tone) var(--wu-button-outlined-border-mix), transparent);\n }\n .wu-btn-text {\n border-color: transparent;\n box-shadow: none;\n -webkit-backdrop-filter: none;\n backdrop-filter: none;\n }\n .wu-btn-outlined:not(:disabled):hover,\n .wu-btn-text:not(:disabled):hover {\n background: color-mix(in srgb, var(--_tone) var(--wu-button-tint), transparent);\n }\n .wu-btn-outlined:not(:disabled):active,\n .wu-btn-text:not(:disabled):active {\n background: color-mix(in srgb, var(--_tone) calc(var(--wu-button-tint) * 2), transparent);\n }\n .wu-btn-outlined:not(:disabled):hover,\n .wu-btn-outlined:not(:disabled):active {\n border-color: color-mix(in srgb, var(--_tone) var(--wu-button-outlined-border-mix), transparent);\n }\n .wu-btn-text:not(:disabled):hover,\n .wu-btn-text:not(:disabled):active {\n border-color: transparent;\n }\n .wu-btn-raised {\n box-shadow: var(--wu-shadow-md);\n }\n\n /* sizes and shapes */\n .wu-btn-sm,\n .wu-btn.p-button-sm {\n font-size: calc(var(--wu-font-size) * 0.875);\n padding: calc(var(--wu-button-padding-y) * var(--wu-size-sm-scale)) calc(var(--wu-button-padding-x) * var(--wu-size-sm-scale));\n }\n .wu-btn-lg,\n .wu-btn.p-button-lg {\n font-size: calc(var(--wu-font-size) * var(--wu-size-lg-scale));\n padding: calc(var(--wu-button-padding-y) * var(--wu-size-lg-scale)) calc(var(--wu-button-padding-x) * var(--wu-size-lg-scale));\n }\n .wu-btn-rounded {\n border-radius: var(--wu-radius-full);\n }\n .wu-btn-icon-only {\n padding: var(--wu-button-padding-y);\n aspect-ratio: 1;\n }\n .wu-btn-sm.wu-btn-icon-only,\n .wu-btn.p-button-sm.wu-btn-icon-only {\n padding: calc(var(--wu-button-padding-y) * var(--wu-size-sm-scale));\n }\n .wu-btn-lg.wu-btn-icon-only,\n .wu-btn.p-button-lg.wu-btn-icon-only {\n padding: calc(var(--wu-button-padding-y) * var(--wu-size-lg-scale));\n }\n\n /* parts */\n .wu-btn-icon {\n line-height: 1;\n }\n .wu-btn-spinner {\n width: 1em;\n height: 1em;\n border-radius: 50%;\n border: 2px solid currentColor;\n border-right-color: transparent;\n animation: wu-btn-spin 0.8s linear infinite;\n }\n /* A pill that fits two digits comfortably and keeps them centred whatever the font's line height. */\n .wu-btn-badge {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n min-width: 1.75em;\n height: 1.75em;\n padding: 0 0.45em;\n border-radius: var(--wu-radius-full);\n background: var(--_fg);\n color: var(--_bg);\n font-size: 0.75em;\n font-weight: 700;\n font-variant-numeric: tabular-nums;\n line-height: 1;\n letter-spacing: normal;\n }\n .wu-btn-outlined .wu-btn-badge,\n .wu-btn-text .wu-btn-badge {\n background: var(--_tone);\n color: var(--wu-card-bg);\n }\n /* An icon-only button wears its badge on the top corner, the way a notification bell does, instead of growing to\n fit it. The badge reaches past the edge, so this button does not clip its content (a ripple there spills a little). */\n .wu-btn-icon-only:has(> .wu-btn-badge) {\n overflow: visible;\n }\n .wu-btn-icon-only > .wu-btn-badge {\n position: absolute;\n top: 0;\n inset-inline-end: 0;\n min-width: 1.6em;\n height: 1.6em;\n padding: 0 0.35em;\n font-size: 0.68em;\n transform: translate(40%, -40%);\n box-shadow: 0 0 0 2px var(--wu-card-bg);\n pointer-events: none;\n }\n /* link: a button that reads as a link. */\n .wu-btn.wu-btn-link {\n border-color: transparent;\n background: transparent;\n color: var(--_tone);\n box-shadow: none;\n -webkit-backdrop-filter: none;\n backdrop-filter: none;\n }\n .wu-btn.wu-btn-link:not(:disabled):hover,\n .wu-btn.wu-btn-link:not(:disabled):active {\n border-color: transparent;\n background: transparent;\n text-decoration: underline;\n }\n .wu-btn-badge:is(.wu-btn-badge-success, .wu-btn-badge-info, .wu-btn-badge-warn, .wu-btn-badge-danger, .wu-btn-badge-secondary, .wu-btn-badge-help, .wu-btn-badge-contrast) {\n background: var(--_badge-bg);\n color: var(--_badge-fg);\n }\n .wu-btn-badge-success { --_badge-bg: var(--wu-success-color); --_badge-fg: var(--wu-success-contrast); }\n .wu-btn-badge-info { --_badge-bg: var(--wu-info-color); --_badge-fg: var(--wu-info-contrast); }\n .wu-btn-badge-warn { --_badge-bg: var(--wu-warn-color); --_badge-fg: var(--wu-warn-contrast); }\n .wu-btn-badge-danger { --_badge-bg: var(--wu-danger-color); --_badge-fg: var(--wu-danger-contrast); }\n .wu-btn-badge-secondary { --_badge-bg: var(--wu-button-secondary-bg); --_badge-fg: var(--wu-button-secondary-color); }\n .wu-btn-badge-help { --_badge-bg: var(--wu-help-color); --_badge-fg: var(--wu-help-contrast); }\n .wu-btn-badge-contrast { --_badge-bg: var(--wu-text); --_badge-fg: var(--wu-card-bg); }\n .wu-ripple-ink {\n position: absolute;\n border-radius: 50%;\n background: currentColor;\n opacity: 0.28;\n transform: scale(0);\n animation: wu-ripple 560ms ease-out forwards;\n pointer-events: none;\n }\n\n @keyframes wu-btn-spin {\n to {\n transform: rotate(1turn);\n }\n }\n @keyframes wu-ripple {\n to {\n transform: scale(2.6);\n opacity: 0;\n }\n }\n @media (prefers-reduced-motion: reduce) {\n .wu-btn,\n .wu-btn-spinner,\n .wu-ripple-ink {\n transition: none;\n animation-duration: 0.01ms;\n }\n }\n /* Touch screens: small and icon-only buttons are at least 24 \u00D7 24 px (WCAG 2.5.8). The button clips its own\n content (ripple), so it grows a little instead of taking a wider invisible hit area. */\n @media (pointer: coarse) {\n .wu-btn {\n min-width: 24px;\n min-height: 24px;\n }\n }\n}\n";
121
121
 
122
122
  /**
123
123
  * Classes for a plain `<button>` drawn like wu-button, from a style class written for the classic button names:
@@ -0,0 +1,192 @@
1
+ import * as i0 from '@angular/core';
2
+ import { AfterViewChecked, OnDestroy, EventEmitter, QueryList, TemplateRef } from '@angular/core';
3
+ import { WuTemplate } from '@wirabyte/ui/config';
4
+ import { WuChatMessages } from '@wirabyte/ui/core';
5
+
6
+ /** Who wrote a message. */
7
+ interface WuChatUser {
8
+ id: string | number;
9
+ name: string;
10
+ /** A picture URL; without one the initials are shown. */
11
+ avatar?: string;
12
+ /** A small tag after the name, e.g. the company or `'Staff'`. */
13
+ badge?: string;
14
+ }
15
+ /** A file or picture sent with a message. */
16
+ interface WuChatAttachment {
17
+ name: string;
18
+ /** Where it opens or downloads. Without it, clicks only emit `(onAttachmentClick)`. */
19
+ url?: string;
20
+ /** `'image'` shows a picture (`url`, or `thumbnail`), anything else a file card. Default: read from `name`. */
21
+ type?: 'image' | 'file';
22
+ thumbnail?: string;
23
+ /** Bytes, shown as kB / MB. */
24
+ size?: number;
25
+ }
26
+ interface WuChatMessage {
27
+ id?: string | number;
28
+ text?: string;
29
+ sender?: WuChatUser;
30
+ /** Written by the person using the app: drawn on the right. Default: `sender.id === currentUserId`. */
31
+ mine?: boolean;
32
+ time: Date | string | number;
33
+ attachments?: WuChatAttachment[];
34
+ /** `'sending'` dims it; `'failed'` offers to send again (`(onRetry)`). */
35
+ status?: 'sending' | 'sent' | 'failed';
36
+ /** On your own messages: `true` shows "Read", a number "Read by N". */
37
+ read?: boolean | number;
38
+ /** A line from the system ("ปิดงานแล้ว") in the middle, not a bubble. */
39
+ system?: boolean;
40
+ }
41
+ /** `(onSend)`: the text (trimmed, may be empty when only files go) and the files picked or pasted. */
42
+ interface WuChatSendEvent {
43
+ text: string;
44
+ files: File[];
45
+ }
46
+ interface WuChatAttachmentClickEvent {
47
+ originalEvent: Event;
48
+ attachment: WuChatAttachment;
49
+ message: WuChatMessage;
50
+ }
51
+ /** A row the template draws: a day separator, a system line, or a message with its place in a group. */
52
+ type ɵWuChatRow = {
53
+ kind: 'day';
54
+ key: string;
55
+ label: string;
56
+ } | {
57
+ kind: 'system';
58
+ key: string;
59
+ message: WuChatMessage;
60
+ time: string;
61
+ } | {
62
+ kind: 'message';
63
+ key: string;
64
+ message: WuChatMessage;
65
+ mine: boolean;
66
+ first: boolean;
67
+ last: boolean;
68
+ time: string;
69
+ };
70
+
71
+ /** A file waiting in the composer, with a preview URL when it is a picture. */
72
+ interface Pending {
73
+ file: File;
74
+ preview: string | null;
75
+ }
76
+ /**
77
+ * A conversation: `<wu-chat [messages]="messages" [currentUserId]="me.id" (onSend)="send($event)">`. Bubbles on the
78
+ * left for others and on the right for you, grouped by sender and time, day separators (วันนี้, เมื่อวาน, then the date
79
+ * in the app's calendar), pictures and file cards, read marks, who is typing, and a message box that grows with the
80
+ * text: Enter sends, Shift+Enter starts a new line, pasted pictures are attached. New messages scroll into view unless
81
+ * the reader has scrolled up to read older ones. The component only shows and emits; sending is the app's job.
82
+ */
83
+ declare class WuChat implements AfterViewChecked, OnDestroy {
84
+ set messages(v: WuChatMessage[] | null | undefined);
85
+ get messages(): WuChatMessage[];
86
+ /** Your user id: messages whose `sender.id` matches are drawn on the right. `mine` on a message wins. */
87
+ currentUserId?: string | number | null;
88
+ /** Names of the people typing right now. */
89
+ typing?: string[] | string | null;
90
+ /** No message box: a closed conversation. `readonlyMessage` replaces the default line. */
91
+ set readonly(v: unknown);
92
+ get readonly(): boolean;
93
+ readonlyMessage?: string | null;
94
+ placeholder?: string | null;
95
+ /** A spinner instead of the messages while they load. */
96
+ set loading(v: unknown);
97
+ get loading(): boolean;
98
+ /** The send button shows a spinner and the box waits. */
99
+ set sending(v: unknown);
100
+ get sending(): boolean;
101
+ /** `false` hides the attach button (pasting files then does nothing either). */
102
+ set attach(v: unknown);
103
+ get attach(): boolean;
104
+ /** File types the attach button offers: `'image/*,.pdf'`. */
105
+ accept?: string | null;
106
+ /** Largest file in bytes; bigger ones are left out and emitted in `(onFileRejected)`. */
107
+ maxFileSize?: number | null;
108
+ /** Messages from the same sender within this many minutes join one group (one name, one avatar). Default 5. */
109
+ groupMinutes: number;
110
+ /** A button above the oldest message that emits `(onLoadMore)`. */
111
+ set hasMore(v: unknown);
112
+ get hasMore(): boolean;
113
+ /** `false` leaves out the avatars beside other people's messages. */
114
+ set showAvatars(v: unknown);
115
+ get showAvatars(): boolean;
116
+ /** Height of the whole chat. Default: the theme's (`--wu-chat-height`). `'100%'` fills a sized parent. */
117
+ height?: string | number | null;
118
+ ariaLabel?: string | null;
119
+ styleClass?: string | null;
120
+ style?: Record<string, any> | string | null;
121
+ readonly onSend: EventEmitter<WuChatSendEvent>;
122
+ /** While the reader types, at most every 2 seconds: send "is typing" to the others. */
123
+ readonly onTyping: EventEmitter<void>;
124
+ readonly onAttachmentClick: EventEmitter<WuChatAttachmentClickEvent>;
125
+ readonly onRetry: EventEmitter<WuChatMessage>;
126
+ readonly onLoadMore: EventEmitter<void>;
127
+ readonly onFileRejected: EventEmitter<File>;
128
+ protected templates?: QueryList<WuTemplate>;
129
+ protected messageRef?: unknown;
130
+ private scroller?;
131
+ private box?;
132
+ private fileInput?;
133
+ draft: string;
134
+ pending: Pending[];
135
+ private _messages;
136
+ private rows;
137
+ private _readonly;
138
+ private _loading;
139
+ private _sending;
140
+ private _attach;
141
+ private _hasMore;
142
+ private _avatars;
143
+ private atBottom;
144
+ private scrollPending;
145
+ private lastTyping;
146
+ private readonly cdr;
147
+ private readonly config;
148
+ private readonly i18n;
149
+ private readonly translated;
150
+ constructor();
151
+ ngAfterViewChecked(): void;
152
+ ngOnDestroy(): void;
153
+ get t(): WuChatMessages | undefined;
154
+ /** `<ng-template #message let-message>`: the inside of a bubble. */
155
+ get messageTemplate(): TemplateRef<unknown> | null;
156
+ get rootClass(): string;
157
+ get rootStyle(): Record<string, any>;
158
+ get view(): ɵWuChatRow[];
159
+ get typingText(): string;
160
+ get canSend(): boolean;
161
+ trackRow(_: number, row: ɵWuChatRow): string;
162
+ initials(name: string | undefined): string;
163
+ isImage(a: WuChatAttachment): boolean;
164
+ sizeText(bytes: number | undefined): string;
165
+ readText(m: WuChatMessage): string;
166
+ onScroll(): void;
167
+ onKeydown(event: KeyboardEvent): void;
168
+ onInput(): void;
169
+ onPaste(event: ClipboardEvent): void;
170
+ openFiles(): void;
171
+ onFilesChosen(event: Event): void;
172
+ removePending(index: number): void;
173
+ send(): void;
174
+ attachmentClick(event: Event, attachment: WuChatAttachment, message: WuChatMessage): void;
175
+ private isMine;
176
+ private add;
177
+ /** The box grows with its text up to a few lines, then scrolls. */
178
+ private grow;
179
+ private build;
180
+ static ɵfac: i0.ɵɵFactoryDeclaration<WuChat, never>;
181
+ static ɵcmp: i0.ɵɵComponentDeclaration<WuChat, "wu-chat", never, { "messages": { "alias": "messages"; "required": false; }; "currentUserId": { "alias": "currentUserId"; "required": false; }; "typing": { "alias": "typing"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "readonlyMessage": { "alias": "readonlyMessage"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "sending": { "alias": "sending"; "required": false; }; "attach": { "alias": "attach"; "required": false; }; "accept": { "alias": "accept"; "required": false; }; "maxFileSize": { "alias": "maxFileSize"; "required": false; }; "groupMinutes": { "alias": "groupMinutes"; "required": false; }; "hasMore": { "alias": "hasMore"; "required": false; }; "showAvatars": { "alias": "showAvatars"; "required": false; }; "height": { "alias": "height"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "styleClass": { "alias": "styleClass"; "required": false; }; "style": { "alias": "style"; "required": false; }; }, { "onSend": "onSend"; "onTyping": "onTyping"; "onAttachmentClick": "onAttachmentClick"; "onRetry": "onRetry"; "onLoadMore": "onLoadMore"; "onFileRejected": "onFileRejected"; }, ["messageRef", "templates"], never, true, never>;
182
+ }
183
+
184
+ /** For NgModule apps. Standalone apps can import `WuChat` directly. */
185
+ declare class WuChatModule {
186
+ static ɵfac: i0.ɵɵFactoryDeclaration<WuChatModule, never>;
187
+ static ɵmod: i0.ɵɵNgModuleDeclaration<WuChatModule, never, [typeof WuChat], [typeof WuChat]>;
188
+ static ɵinj: i0.ɵɵInjectorDeclaration<WuChatModule>;
189
+ }
190
+
191
+ export { WuChat, WuChatModule };
192
+ export type { WuChatAttachment, WuChatAttachmentClickEvent, WuChatMessage, WuChatSendEvent, WuChatUser, ɵWuChatRow };
@@ -48,6 +48,12 @@ interface WiraUIOptions {
48
48
  scale?: WuScale;
49
49
  /** Waits before searching for the whole app: `{ autoComplete: 300, filter: 300 }`. Default 0 (no wait). */
50
50
  delays?: WuDelays;
51
+ /**
52
+ * Where the theme's fonts come from. `'google'` (the default) adds the Google Fonts stylesheet for the body and
53
+ * heading fonts the theme ends up with (Kanit, Sarabun, Anuphan …) unless the page already links it, so a theme set
54
+ * up by hand shows its font too. `'none'` leaves fonts to the app: self-hosted files, or no access to Google.
55
+ */
56
+ fonts?: 'google' | 'none';
51
57
  }
52
58
  declare const WU_OPTIONS: InjectionToken<WiraUIOptions>;
53
59
 
@@ -109,6 +115,11 @@ declare class WuThemeService {
109
115
  private cssOptions;
110
116
  private writePreset;
111
117
  private writeOverrides;
118
+ /**
119
+ * Links the Google Fonts stylesheet for the body and heading fonts the tokens ended up with, from whichever source
120
+ * (SCSS, CSS or TypeScript), unless the page already links that family. `fonts: 'none'` turns it off.
121
+ */
122
+ private loadFonts;
112
123
  private style;
113
124
  /** A preset and a SCSS/CSS theme file both define every token; one of them is redundant. */
114
125
  private warnIfStylesheetToo;
@@ -128,6 +139,12 @@ declare class WuConfig {
128
139
  readonly translationChange: Subject<WuLocale>;
129
140
  setTranslation(partial: Partial<WuLocale>): void;
130
141
  getTranslation<K extends keyof WuLocale>(key: K): WuLocale[K];
142
+ /**
143
+ * The calendar dates use in `language` (default: the UI language): `calendar` while the app is in Thai, Gregorian in
144
+ * any other language, so switching the app to English also turns พ.ศ. into ค.ศ. The date pipes and the datepicker
145
+ * read this; a component's own `calendar` input still wins.
146
+ */
147
+ calendarFor(language?: string): CalendarSystem;
131
148
  static ɵfac: i0.ɵɵFactoryDeclaration<WuConfig, never>;
132
149
  static ɵprov: i0.ɵɵInjectableDeclaration<WuConfig>;
133
150
  }
@@ -107,6 +107,11 @@ declare const SURFACES: {
107
107
  };
108
108
  type SurfaceId = keyof typeof SURFACES;
109
109
  declare const FONTS: readonly ["Kanit", "Sarabun", "Prompt", "Noto Sans Thai", "IBM Plex Sans Thai", "Anuphan", "Inter", "Roboto"];
110
+ /**
111
+ * The Google Fonts stylesheet for the first family of a CSS `font-family` value (`"'Kanit', sans-serif"`), or `null` when
112
+ * it is not a family the themes know.
113
+ */
114
+ declare function googleFontHref(fontFamily: string): string | null;
110
115
  /** Density multiplies every padding a preset defines (1 = the preset's own spacing). */
111
116
  declare const DENSITY: Record<'compact' | 'normal' | 'comfortable', number>;
112
117
  type DensityId = keyof typeof DENSITY;
@@ -316,7 +321,7 @@ declare const PRESETS: {
316
321
  lineHeight: number;
317
322
  radius: number;
318
323
  density: "normal";
319
- shadow: "subtle";
324
+ shadow: "soft";
320
325
  ripple: false;
321
326
  focusRing: "ring";
322
327
  transition: number;
@@ -642,6 +647,8 @@ interface SemanticOverrides {
642
647
  /** Text colour on primary buttons, e.g. `'#ffffff'`. */
643
648
  primaryContrast?: string;
644
649
  fontFamily?: string;
650
+ /** Font of titles (card, dialog, drawer, panel …), e.g. `'Kanit'`. Default: `fontFamily`. */
651
+ headingFontFamily?: string;
645
652
  fontSize?: Size;
646
653
  lineHeight?: Size;
647
654
  radius?: Size;
@@ -680,6 +687,11 @@ interface ComponentOverrides {
680
687
  interface ThemeOverrideSet {
681
688
  semantic?: SemanticOverrides;
682
689
  components?: ComponentOverrides;
690
+ /**
691
+ * Any token by name, without `--wu-`: `{ 'table-header-bg': 'transparent', 'aside-menu-item-active-bg': '…' }`.
692
+ * At the top level a value applies in light and dark mode alike; under `dark` it is for dark mode only.
693
+ */
694
+ tokens?: Record<string, string | number>;
683
695
  }
684
696
  /** Partial theme changes applied on top of the main theme (SCSS/CSS file or a preset). */
685
697
  interface ThemeOverrides extends ThemeOverrideSet {
@@ -1065,6 +1077,53 @@ interface WuLocale {
1065
1077
  validation: WuValidationMessages;
1066
1078
  /** Rich-text editor: toolbar labels, menus and dialogs. `{0}` / `{1}` are filled in (a level, a size, a count). */
1067
1079
  editor: WuEditorMessages;
1080
+ /** wu-chat: the message box and its buttons, who is typing (`{name}`, `{count}`), read marks and day separators. */
1081
+ chat?: WuChatMessages;
1082
+ /** wu-signature-pad */
1083
+ signaturePad?: {
1084
+ label: string;
1085
+ hint: string;
1086
+ clear: string;
1087
+ undo: string;
1088
+ };
1089
+ /** wu-scheduler: the toolbar, the views and the "+{count} more" link of a full day. */
1090
+ scheduler?: {
1091
+ today: string;
1092
+ previous: string;
1093
+ next: string;
1094
+ day: string;
1095
+ week: string;
1096
+ month: string;
1097
+ allDay: string;
1098
+ more: string;
1099
+ noEvents: string;
1100
+ };
1101
+ /** wu-stat: how a screen reader says the trend. */
1102
+ stat?: {
1103
+ up: string;
1104
+ down: string;
1105
+ same: string;
1106
+ };
1107
+ }
1108
+ interface WuChatMessages {
1109
+ placeholder: string;
1110
+ send: string;
1111
+ attach: string;
1112
+ removeFile: string;
1113
+ typing: string;
1114
+ typingMany: string;
1115
+ read: string;
1116
+ readBy: string;
1117
+ today: string;
1118
+ yesterday: string;
1119
+ closed: string;
1120
+ emptyTitle: string;
1121
+ emptyDescription: string;
1122
+ loadMore: string;
1123
+ failed: string;
1124
+ retry: string;
1125
+ newMessages: string;
1126
+ messages: string;
1068
1127
  }
1069
1128
  interface WuEditorMessages {
1070
1129
  toolbar: string;
@@ -4292,5 +4351,5 @@ declare function chartMovesValues(type: ChartType): boolean;
4292
4351
  */
4293
4352
  declare function chartSwapTypes(type: ChartType, series: ChartSeries[] | null | undefined, labels?: unknown[] | null): ChartType[];
4294
4353
 
4295
- export { Arun, BUDDHIST_OFFSET, CHART_PALETTE, CHART_VARIANTS, CLASSIC_THEMES, COMPONENT_TOKENS, CONFIG_MARKER, CORE_VERSION, DENSITY, DatePickerState, EDITOR_COLORS, EDITOR_FONT_SIZES, EDITOR_HIGHLIGHTS, EDITOR_TOOLBARS, EDITOR_TOOLS, EN_LOCALE, EXCEL_MIME, EditorHistory, FAMILIES, FAMILY_GENERATION, FLOW_DEFAULT_VIEWPORT, FLOW_EDGE_TYPES, FLOW_MARKER_REF, FLOW_MARKER_VIEWBOX, FLOW_TEXT_KEYS, FOCUS_STYLES, FONTS, FlowHistory, Glass, KNOB_MAX_RADIANS, KNOB_MIN_RADIANS, LANGUAGE_NAMES, LAYER_ORDER, LL, LOCALES, Lanna, ListState, MAX_CANVAS_AREA, Mali, Material, MaterialClassic, Nakhon, PALETTE_BASES, PRESETS, PRESET_IDS, PRESET_LIST, PRESET_NAMES, PRIMARY_SWATCHES, Phet, Ratri, SCALAR_FIELDS, SEMANTIC_DEFAULTS, SEMANTIC_KEYS, SHADES, SHADE_MIX, SHADOWS, STYLED_INPUTS, SURFACES, SURFACE_DARK_REF, Sayan, Siam, Sila, SilaClassic, TH_LOCALE, TINT, VERSION_CATALOG, Wira, WiraKawaii, absolutePosition, absolutePositions, acceptsFile, acceptsNumberInput, acceptsNumberText, addDays, addEdge, addMonths, alignmentGuides, apcaContrast, applyEdgeChanges, applyMatrix, applyNodeChanges, arcLine, arcPath, areaPath, arrowStep, autoPanVelocity, backgroundPattern, bahtText, bandPath, bands, barPath, base64ToFile, bestOn, boxSelection, boxStats, boxToRect, buildExcel, buildExcelSync, calendarWeeks, caretAfter, carouselClampPage, carouselFirst, carouselIsCircular, carouselLayout, carouselPageCount, carouselRepage, carouselStep, changeCount, chartHit, chartModel, chartMovesValues, chartSeriesFrom, chartSwapTypes, chartVariants, checkFile, clampCrop, clampDate, clampNumber, clampPosition, clampTimeField, clampView, clampZoom, classicDateFormat, clickSelection, collectMarkers, compareDays, compareValues, compatAliases, componentValue, computeNodeZ, computeTokens, connectionBetween, constrainViewport, contrast, countCrossings, crc32, cropArea, cropHeight, cropSizeRange, cropWidth, cropperToolbarGroups, cubicPoint, datePattern, dayNumber, daysInMonth, decimalSeparator, defaults, defineOverrides, definePreset, densityTokens, diff, diffItems, displayYear, dockScale, dragPositions, dragRoots, easeInOutCubic, edgeZIndex, editableNumber, editorCounts, editorHtmlToText, editorToolOptions, editorToolbarGroups, emptyTokens, estimateTextWidth, excelColor, excelColumnName, excelDateNumber, excelParseRange, excelParseRef, excelParts, excelRef, excelSheetFromRows, excelSheetNames, exifTransform, expandParentBox, expandRect, fillMask, filterColumns, filterGlobal, filterItems, filterListItems, filterTree, findHandle, firstIndex, fitArc, flattenMessages, flowClamp, flowDeepEqual, flowEdgeId, flowEdgeName, flowFormat, flowFromJSON, flowHistoryKey, flowNodeName, flowText, flowToJSON, flowToScreen, flowToSvg, fmt, focusTokens, fontTokens, formatChartValue, formatColor, formatDate, formatFileSize, formatMask, formatNumber, formatThaiId, formatThaiPhone, fractionDigits, from12Hour, fromBuddhistYear, fromThaiDigits, generatePalette, getBezierPath, getBoundsOfRects, getConnectedEdges, getDescendants, getEdgeCenter, getEdgeEnds, getEdgePath, getEdgePathWithRoom, getElementsToRemove, getIncomers, getIntersectingNodes, getNodesBounds, getNodesInside, getOutgoers, getSimpleBezierPath, getSmoothStepPath, getStepPath, getStepPoints, getStraightPath, getViewportForBounds, getVisibleNodeIds, growCrop, handleConnectionCount, handleIsFull, handlePoint, handlesCompatible, hasSize, hexToRgb, hsbToHex, hsbToRgb, httpErrorActions, httpErrorCode, httpErrorKind, httpErrorTextKey, imageCompareAt, imageCompareClamp, imageCompareKey, inListOrder, indexOfValue, initialCrop, interpolate, interpolateViewport, isDaySelectable, isEdge, isEdgeVisible, isEmptyEditorHtml, isFlowPosition, isHex, isImageFile, isMonthSelectable, isNode, isPalette, isPresetId, isThaiPhone, isThemeName, isThemePreset, isTypingTarget, isValidDate, isValidThaiId, isYearSelectable, keyMatches, knobClamp, knobPaths, knobSnap, knobText, knobValueAt, lastFilled, lastIndex, layoutFlow, layoutHandlePositions, layoutTree, linePath, listFilterFields, listIndexes, listSame, luminance, markerId, markerLength, markerShape, maskComplete, maskEmpty, matchLanguage, matchValue, materialTokens, menuFirst, menuFocusable, menuHasSubmenu, menuItemAt, menuKey, menuKeyPath, menuLast, menuStep, menuTypeahead, menuVisible, mergeExcelStyles, mergeTokens, minimapLayout, minimapMaskPath, minimapToFlow, mix, monotonePath, moveBottom, moveCrop, moveDay, moveDown, moveItemsTo, moveTop, moveUp, multiKeyHeld, nearestHandle, niceScale, niceStep, nodeDepth, nodeLookup, nodeRect, nodeSize, normalize, normalizeAngle, normalizeCrop, normalizeExtent, normalizeMarker, normalizeViewport, oppositePosition, optionField, orgChartIsLeaf, orgChartIsOpen, orgChartIsSelected, orgChartKey, orgChartToggleSelection, orgChartVisible, orientationMatrix, otpAccepts, otpCleanPaste, otpFill, otpTokens, otpValue, outputSize, overlapArea, overridesToTokens, padToRatio, paddingPx, pageInfo, pageLinks, pageReport, palette, panBy, panCrop, parentGrowth, parseAspectRatio, parseColor, parseDate, parseImport, parseLooseDate, parseMask, parseNumber, parseTypedDate, pastThreshold, pickLanguage, placeInOrder, pointInRect, polar, polylineMidpoint, positionVector, presetExportName, presetToTokens, presetsFor, primaryPaletteOf, primaryTokens, radiusTokens, rangeKeyValue, readExifOrientation, readTimeField, reconnectEdge, rectCenter, rectContains, rectFromPoints, rectToBox, rectsIntersect, relaxLabels, remapCrop, remapPoint, resizeBox, resizeCrop, rgbToHex, rgbToHsb, rotateOrientation, rotatedSize, roundChannel, roundCrop, roundedPolylinePath, safeEditorImage, safeEditorUrl, sameCrop, sameDay, sameFile, sameHandle, sameNode, sameValue, sameViewport, scaleLinear, screenToFlow, searchText, selectItems, selectionChanges, semanticTokens, shadowTokens, sidePoint, simplifyPolyline, snapPosition, sortNodesParentsFirst, sortRows, splitDates, splitterBasis, splitterPercent, splitterReadState, splitterResize, splitterSizes, squarify, startOfDay, stepIndex, stepNumber, surfacePalette, surfaceTokens, terminalCommandName, terminalHistoryAdd, terminalHistoryMove, terminalIsClear, thaiIdCheckDigit, thaiNumberText, themeConfig, themePreset, timeAgo, timeFieldRange, timeFormat, timeTicks, to12Hour, toBuddhistYear, toCSS, toDate, toDateValue, toJSON, toSCSS, toTSOverrides, toTSPreset, toThaiDigits, toggleTreeCheck, tokensToCss, tokensToStyle, transferItems, transitionTokens, translateKey, treeCheckStates, treeParents, typeaheadIndex, typedBefore, unmaskedValue, updateEdge, validConnection, validationMessage, viewRect, viewWindow, viewportForCenter, walkTree, weekdayOrder, wheelDeltaPx, wheelZoomFactor, wrapStep, yearPage, zipFiles, zipFilesSync, zoomAt, zoomCrop };
4296
- export type { CalendarDay, CalendarSystem, CarouselResponsiveOptions, ChartAnnotations, ChartAxisScale, ChartBand, ChartBar, ChartBoxStats, ChartCell, ChartColorRange, ChartCurve, ChartDot, ChartFormatOptions, ChartHoverBand, ChartLegendItem, ChartLine, ChartMark, ChartModel, ChartModelOptions, ChartNode, ChartPoint, ChartPointAnnotation, ChartRadar, ChartRange, ChartReferenceLine, ChartRing, ChartSeries, ChartSeriesType, ChartShape, ChartSlice, ChartText, ChartTip, ChartType, ChartValueFormat, ChartXAnnotation, ChartXY, ColorFormat, ColorHsb, ColorRgb, ComponentId, ComponentOverrides, ComponentTokenSpec, ComponentValues, CropDimensions, CropHandle, CropLimits, CropMatrix, CropOrientation, CropOutputOptions, CropView, CropperPosition, CropperTool, CropperToolName, CropperToolbar, CssOptions, DarkMode, DateFormatOptions, DateLimits, DatePickerOptions, DatePickerValue, DatePickerView, DateSelectionMode, DayCell, DensityId, EditorOption, EditorSnapshot, EditorTool, EditorToolOptions, EditorToolbar, EditorToolbarPreset, ExcelBorder, ExcelBorderLine, ExcelBorderStyle, ExcelBorders, ExcelCell, ExcelCellInput, ExcelColumn, ExcelRow, ExcelSheet, ExcelStyle, ExcelTableCellContext, ExcelTableColumn, ExcelTableLayout, ExcelTableOptions, ExcelTotal, ExcelValue, ExcelWorkbook, ExportOptions, FamilyId, FamilyTokens, FileLike, FileProblem, FilterMatchMode, FilterMeta, FilterRule, FlowAddChange, FlowAlignment, FlowBackgroundPattern, FlowBackgroundVariant, FlowBezierParams, FlowBoundsOptions, FlowBox, FlowBoxSelectOptions, FlowConnectHandle, FlowConnectRules, FlowConnection, FlowConnectionMode, FlowCoordinateExtent, FlowDimensions, FlowDragItem, FlowDragOptions, FlowDragResult, FlowEdge, FlowEdgeChange, FlowEdgeEndNode, FlowEdgeEnds, FlowEdgeMarker, FlowEdgeType, FlowFromJSONOptions, FlowGuide, FlowHandleBounds, FlowHandleRef, FlowHandleType, FlowHistoryOptions, FlowInsideOptions, FlowJSON, FlowLayoutCommon, FlowLayoutDirection, FlowLayoutOptions, FlowMarker, FlowMarkerType, FlowMinimapLayout, FlowNode, FlowNodeChange, FlowNodeDimensionChange, FlowNodeHandles, FlowNodePositionChange, FlowPadding, FlowPathOptions, FlowPathParams, FlowPathResult, FlowPosition, FlowRect, FlowRemoveChange, FlowReplaceChange, FlowResizeDirection, FlowResizeLimits, FlowResolvedMarker, FlowSelectChange, FlowSizeLookup, FlowSmoothStepParams, FlowSnapshot, FlowStyle, FlowSvgOptions, FlowTextKey, FlowTexts, FlowTreeLayoutOptions, FlowViewport, FlowXY, FlowZOptions, FocusRing, Generation, HourFormat, I18nMessages, ListSame, LooseDateOptions, MajorVersion, MaskBuffer, MaskDefinitions, MaskSlot, MaterialMode, MenuItemLike, MonthCell, NamedTheme, NiceScale, NumberFormatOptions, NumberTypingRules, OrgChartEntry, OrgChartMove, OrgChartSelectionMode, PageState, Palette, PickResult, PresetDefinition, PresetId, ScalarField, Scheme, SelectFields, SelectItem, SelectMatchMode, SemanticKey, SemanticOverrides, Shade, ShadowId, SortMeta, SurfaceId, SwatchId, ThaiDateFormat, ThemeConfig, ThemeDiff, ThemeOverrideSet, ThemeOverrides, ThemePreset, ThemeTokens, TimeUnit, TokenMap, TreeCheckState, TreeFilterMode, TreeNode, TypedTimeField, ValidationErrorsLike, WuEditorMessages, WuEmptyStateType, WuErrorAction, WuErrorKind, WuLocale, WuResultStatus, WuValidationMessages, YearCell, ZipEntry };
4354
+ export { Arun, BUDDHIST_OFFSET, CHART_PALETTE, CHART_VARIANTS, CLASSIC_THEMES, COMPONENT_TOKENS, CONFIG_MARKER, CORE_VERSION, DENSITY, DatePickerState, EDITOR_COLORS, EDITOR_FONT_SIZES, EDITOR_HIGHLIGHTS, EDITOR_TOOLBARS, EDITOR_TOOLS, EN_LOCALE, EXCEL_MIME, EditorHistory, FAMILIES, FAMILY_GENERATION, FLOW_DEFAULT_VIEWPORT, FLOW_EDGE_TYPES, FLOW_MARKER_REF, FLOW_MARKER_VIEWBOX, FLOW_TEXT_KEYS, FOCUS_STYLES, FONTS, FlowHistory, Glass, KNOB_MAX_RADIANS, KNOB_MIN_RADIANS, LANGUAGE_NAMES, LAYER_ORDER, LL, LOCALES, Lanna, ListState, MAX_CANVAS_AREA, Mali, Material, MaterialClassic, Nakhon, PALETTE_BASES, PRESETS, PRESET_IDS, PRESET_LIST, PRESET_NAMES, PRIMARY_SWATCHES, Phet, Ratri, SCALAR_FIELDS, SEMANTIC_DEFAULTS, SEMANTIC_KEYS, SHADES, SHADE_MIX, SHADOWS, STYLED_INPUTS, SURFACES, SURFACE_DARK_REF, Sayan, Siam, Sila, SilaClassic, TH_LOCALE, TINT, VERSION_CATALOG, Wira, WiraKawaii, absolutePosition, absolutePositions, acceptsFile, acceptsNumberInput, acceptsNumberText, addDays, addEdge, addMonths, alignmentGuides, apcaContrast, applyEdgeChanges, applyMatrix, applyNodeChanges, arcLine, arcPath, areaPath, arrowStep, autoPanVelocity, backgroundPattern, bahtText, bandPath, bands, barPath, base64ToFile, bestOn, boxSelection, boxStats, boxToRect, buildExcel, buildExcelSync, calendarWeeks, caretAfter, carouselClampPage, carouselFirst, carouselIsCircular, carouselLayout, carouselPageCount, carouselRepage, carouselStep, changeCount, chartHit, chartModel, chartMovesValues, chartSeriesFrom, chartSwapTypes, chartVariants, checkFile, clampCrop, clampDate, clampNumber, clampPosition, clampTimeField, clampView, clampZoom, classicDateFormat, clickSelection, collectMarkers, compareDays, compareValues, compatAliases, componentValue, computeNodeZ, computeTokens, connectionBetween, constrainViewport, contrast, countCrossings, crc32, cropArea, cropHeight, cropSizeRange, cropWidth, cropperToolbarGroups, cubicPoint, datePattern, dayNumber, daysInMonth, decimalSeparator, defaults, defineOverrides, definePreset, densityTokens, diff, diffItems, displayYear, dockScale, dragPositions, dragRoots, easeInOutCubic, edgeZIndex, editableNumber, editorCounts, editorHtmlToText, editorToolOptions, editorToolbarGroups, emptyTokens, estimateTextWidth, excelColor, excelColumnName, excelDateNumber, excelParseRange, excelParseRef, excelParts, excelRef, excelSheetFromRows, excelSheetNames, exifTransform, expandParentBox, expandRect, fillMask, filterColumns, filterGlobal, filterItems, filterListItems, filterTree, findHandle, firstIndex, fitArc, flattenMessages, flowClamp, flowDeepEqual, flowEdgeId, flowEdgeName, flowFormat, flowFromJSON, flowHistoryKey, flowNodeName, flowText, flowToJSON, flowToScreen, flowToSvg, fmt, focusTokens, fontTokens, formatChartValue, formatColor, formatDate, formatFileSize, formatMask, formatNumber, formatThaiId, formatThaiPhone, fractionDigits, from12Hour, fromBuddhistYear, fromThaiDigits, generatePalette, getBezierPath, getBoundsOfRects, getConnectedEdges, getDescendants, getEdgeCenter, getEdgeEnds, getEdgePath, getEdgePathWithRoom, getElementsToRemove, getIncomers, getIntersectingNodes, getNodesBounds, getNodesInside, getOutgoers, getSimpleBezierPath, getSmoothStepPath, getStepPath, getStepPoints, getStraightPath, getViewportForBounds, getVisibleNodeIds, googleFontHref, growCrop, handleConnectionCount, handleIsFull, handlePoint, handlesCompatible, hasSize, hexToRgb, hsbToHex, hsbToRgb, httpErrorActions, httpErrorCode, httpErrorKind, httpErrorTextKey, imageCompareAt, imageCompareClamp, imageCompareKey, inListOrder, indexOfValue, initialCrop, interpolate, interpolateViewport, isDaySelectable, isEdge, isEdgeVisible, isEmptyEditorHtml, isFlowPosition, isHex, isImageFile, isMonthSelectable, isNode, isPalette, isPresetId, isThaiPhone, isThemeName, isThemePreset, isTypingTarget, isValidDate, isValidThaiId, isYearSelectable, keyMatches, knobClamp, knobPaths, knobSnap, knobText, knobValueAt, lastFilled, lastIndex, layoutFlow, layoutHandlePositions, layoutTree, linePath, listFilterFields, listIndexes, listSame, luminance, markerId, markerLength, markerShape, maskComplete, maskEmpty, matchLanguage, matchValue, materialTokens, menuFirst, menuFocusable, menuHasSubmenu, menuItemAt, menuKey, menuKeyPath, menuLast, menuStep, menuTypeahead, menuVisible, mergeExcelStyles, mergeTokens, minimapLayout, minimapMaskPath, minimapToFlow, mix, monotonePath, moveBottom, moveCrop, moveDay, moveDown, moveItemsTo, moveTop, moveUp, multiKeyHeld, nearestHandle, niceScale, niceStep, nodeDepth, nodeLookup, nodeRect, nodeSize, normalize, normalizeAngle, normalizeCrop, normalizeExtent, normalizeMarker, normalizeViewport, oppositePosition, optionField, orgChartIsLeaf, orgChartIsOpen, orgChartIsSelected, orgChartKey, orgChartToggleSelection, orgChartVisible, orientationMatrix, otpAccepts, otpCleanPaste, otpFill, otpTokens, otpValue, outputSize, overlapArea, overridesToTokens, padToRatio, paddingPx, pageInfo, pageLinks, pageReport, palette, panBy, panCrop, parentGrowth, parseAspectRatio, parseColor, parseDate, parseImport, parseLooseDate, parseMask, parseNumber, parseTypedDate, pastThreshold, pickLanguage, placeInOrder, pointInRect, polar, polylineMidpoint, positionVector, presetExportName, presetToTokens, presetsFor, primaryPaletteOf, primaryTokens, radiusTokens, rangeKeyValue, readExifOrientation, readTimeField, reconnectEdge, rectCenter, rectContains, rectFromPoints, rectToBox, rectsIntersect, relaxLabels, remapCrop, remapPoint, resizeBox, resizeCrop, rgbToHex, rgbToHsb, rotateOrientation, rotatedSize, roundChannel, roundCrop, roundedPolylinePath, safeEditorImage, safeEditorUrl, sameCrop, sameDay, sameFile, sameHandle, sameNode, sameValue, sameViewport, scaleLinear, screenToFlow, searchText, selectItems, selectionChanges, semanticTokens, shadowTokens, sidePoint, simplifyPolyline, snapPosition, sortNodesParentsFirst, sortRows, splitDates, splitterBasis, splitterPercent, splitterReadState, splitterResize, splitterSizes, squarify, startOfDay, stepIndex, stepNumber, surfacePalette, surfaceTokens, terminalCommandName, terminalHistoryAdd, terminalHistoryMove, terminalIsClear, thaiIdCheckDigit, thaiNumberText, themeConfig, themePreset, timeAgo, timeFieldRange, timeFormat, timeTicks, to12Hour, toBuddhistYear, toCSS, toDate, toDateValue, toJSON, toSCSS, toTSOverrides, toTSPreset, toThaiDigits, toggleTreeCheck, tokensToCss, tokensToStyle, transferItems, transitionTokens, translateKey, treeCheckStates, treeParents, typeaheadIndex, typedBefore, unmaskedValue, updateEdge, validConnection, validationMessage, viewRect, viewWindow, viewportForCenter, walkTree, weekdayOrder, wheelDeltaPx, wheelZoomFactor, wrapStep, yearPage, zipFiles, zipFilesSync, zoomAt, zoomCrop };
4355
+ export type { CalendarDay, CalendarSystem, CarouselResponsiveOptions, ChartAnnotations, ChartAxisScale, ChartBand, ChartBar, ChartBoxStats, ChartCell, ChartColorRange, ChartCurve, ChartDot, ChartFormatOptions, ChartHoverBand, ChartLegendItem, ChartLine, ChartMark, ChartModel, ChartModelOptions, ChartNode, ChartPoint, ChartPointAnnotation, ChartRadar, ChartRange, ChartReferenceLine, ChartRing, ChartSeries, ChartSeriesType, ChartShape, ChartSlice, ChartText, ChartTip, ChartType, ChartValueFormat, ChartXAnnotation, ChartXY, ColorFormat, ColorHsb, ColorRgb, ComponentId, ComponentOverrides, ComponentTokenSpec, ComponentValues, CropDimensions, CropHandle, CropLimits, CropMatrix, CropOrientation, CropOutputOptions, CropView, CropperPosition, CropperTool, CropperToolName, CropperToolbar, CssOptions, DarkMode, DateFormatOptions, DateLimits, DatePickerOptions, DatePickerValue, DatePickerView, DateSelectionMode, DayCell, DensityId, EditorOption, EditorSnapshot, EditorTool, EditorToolOptions, EditorToolbar, EditorToolbarPreset, ExcelBorder, ExcelBorderLine, ExcelBorderStyle, ExcelBorders, ExcelCell, ExcelCellInput, ExcelColumn, ExcelRow, ExcelSheet, ExcelStyle, ExcelTableCellContext, ExcelTableColumn, ExcelTableLayout, ExcelTableOptions, ExcelTotal, ExcelValue, ExcelWorkbook, ExportOptions, FamilyId, FamilyTokens, FileLike, FileProblem, FilterMatchMode, FilterMeta, FilterRule, FlowAddChange, FlowAlignment, FlowBackgroundPattern, FlowBackgroundVariant, FlowBezierParams, FlowBoundsOptions, FlowBox, FlowBoxSelectOptions, FlowConnectHandle, FlowConnectRules, FlowConnection, FlowConnectionMode, FlowCoordinateExtent, FlowDimensions, FlowDragItem, FlowDragOptions, FlowDragResult, FlowEdge, FlowEdgeChange, FlowEdgeEndNode, FlowEdgeEnds, FlowEdgeMarker, FlowEdgeType, FlowFromJSONOptions, FlowGuide, FlowHandleBounds, FlowHandleRef, FlowHandleType, FlowHistoryOptions, FlowInsideOptions, FlowJSON, FlowLayoutCommon, FlowLayoutDirection, FlowLayoutOptions, FlowMarker, FlowMarkerType, FlowMinimapLayout, FlowNode, FlowNodeChange, FlowNodeDimensionChange, FlowNodeHandles, FlowNodePositionChange, FlowPadding, FlowPathOptions, FlowPathParams, FlowPathResult, FlowPosition, FlowRect, FlowRemoveChange, FlowReplaceChange, FlowResizeDirection, FlowResizeLimits, FlowResolvedMarker, FlowSelectChange, FlowSizeLookup, FlowSmoothStepParams, FlowSnapshot, FlowStyle, FlowSvgOptions, FlowTextKey, FlowTexts, FlowTreeLayoutOptions, FlowViewport, FlowXY, FlowZOptions, FocusRing, Generation, HourFormat, I18nMessages, ListSame, LooseDateOptions, MajorVersion, MaskBuffer, MaskDefinitions, MaskSlot, MaterialMode, MenuItemLike, MonthCell, NamedTheme, NiceScale, NumberFormatOptions, NumberTypingRules, OrgChartEntry, OrgChartMove, OrgChartSelectionMode, PageState, Palette, PickResult, PresetDefinition, PresetId, ScalarField, Scheme, SelectFields, SelectItem, SelectMatchMode, SemanticKey, SemanticOverrides, Shade, ShadowId, SortMeta, SurfaceId, SwatchId, ThaiDateFormat, ThemeConfig, ThemeDiff, ThemeOverrideSet, ThemeOverrides, ThemePreset, ThemeTokens, TimeUnit, TokenMap, TreeCheckState, TreeFilterMode, TreeNode, TypedTimeField, ValidationErrorsLike, WuChatMessages, WuEditorMessages, WuEmptyStateType, WuErrorAction, WuErrorKind, WuLocale, WuResultStatus, WuValidationMessages, YearCell, ZipEntry };
@@ -41,7 +41,7 @@ declare class WuDatePicker implements ControlValueAccessor, OnChanges, OnInit, O
41
41
  readonly selectOtherMonths: _angular_core.InputSignalWithTransform<boolean, unknown>;
42
42
  /** `dd/mm/yy` style: d dd (day), m mm (month), M MM (month name), y yy (2- / 4-digit year), D DD (day name). Default: the locale's. */
43
43
  readonly dateFormat: _angular_core.InputSignal<string | undefined>;
44
- /** `'buddhist'` shows years as พ.ศ.; the model stays an ordinary Date. Default: `WuConfig.calendar` (พ.ศ.). */
44
+ /** `'buddhist'` shows years as พ.ศ.; the model stays an ordinary Date. Default: `WuConfig.calendar` (พ.ศ.) while the app is in Thai, ค.ศ. in other languages. */
45
45
  readonly calendar: _angular_core.InputSignal<CalendarSystem | undefined>;
46
46
  /** `true` is `calendar="buddhist"`, `false` is `calendar="gregorian"`. Both spellings work. */
47
47
  readonly isBudhistYear: _angular_core.InputSignalWithTransform<boolean | null, unknown>;
@@ -0,0 +1,67 @@
1
+ import * as i0 from '@angular/core';
2
+ import { QueryList, TemplateRef } from '@angular/core';
3
+
4
+ /** One row of `[items]`: `{ label: 'สถานะ', value: 'กำลังดำเนินการ', span: 2 }`. */
5
+ interface WuDescriptionsEntry {
6
+ label: string;
7
+ value?: string | number | null;
8
+ /** How many columns the item takes. Default 1. */
9
+ span?: number;
10
+ }
11
+ /**
12
+ * One label and its value inside `wu-descriptions`: `<wu-descriptions-item label="สถานะ"><wu-tag …></wu-tag></wu-descriptions-item>`.
13
+ * Whatever is inside the tag is the value.
14
+ */
15
+ declare class WuDescriptionsItem {
16
+ label?: string | null;
17
+ /** How many columns the item takes. Default 1. */
18
+ set span(v: unknown);
19
+ get span(): number;
20
+ content: TemplateRef<unknown>;
21
+ private _span;
22
+ static ɵfac: i0.ɵɵFactoryDeclaration<WuDescriptionsItem, never>;
23
+ static ɵcmp: i0.ɵɵComponentDeclaration<WuDescriptionsItem, "wu-descriptions-item, wu-descriptionsItem", never, { "label": { "alias": "label"; "required": false; }; "span": { "alias": "span"; "required": false; }; }, {}, never, ["*"], true, never>;
24
+ }
25
+ /**
26
+ * Facts as label and value pairs, in columns: `<wu-descriptions [columns]="2" title="ข้อมูล Ticket">` with
27
+ * `<wu-descriptions-item label="…">` inside, or `[items]="[{ label, value }]"`. `layout="vertical"` puts each label
28
+ * above its value; `bordered` draws a table of cells. The columns fold into one when its box is too narrow for them.
29
+ */
30
+ declare class WuDescriptions {
31
+ /** A heading over the list. */
32
+ title?: string | null;
33
+ items?: WuDescriptionsEntry[] | null;
34
+ /** Columns on a wide box. Default 1. */
35
+ set columns(v: unknown);
36
+ get columns(): number;
37
+ /** `'horizontal'` (default): label beside value. `'vertical'`: label above value. */
38
+ layout: 'horizontal' | 'vertical' | null | undefined;
39
+ /** Cells with borders and a tinted label column. */
40
+ set bordered(v: unknown);
41
+ get bordered(): boolean;
42
+ /** `'small'` tightens the spacing. */
43
+ size: 'small' | 'normal' | null | undefined;
44
+ styleClass?: string | null;
45
+ style?: Record<string, any> | string | null;
46
+ protected children?: QueryList<WuDescriptionsItem>;
47
+ private _columns;
48
+ private _bordered;
49
+ private readonly config;
50
+ constructor();
51
+ get rootClass(): string;
52
+ get rootStyle(): Record<string, any>;
53
+ spanOf(span: number | undefined): string;
54
+ valueText(v: unknown): string;
55
+ static ɵfac: i0.ɵɵFactoryDeclaration<WuDescriptions, never>;
56
+ static ɵcmp: i0.ɵɵComponentDeclaration<WuDescriptions, "wu-descriptions", never, { "title": { "alias": "title"; "required": false; }; "items": { "alias": "items"; "required": false; }; "columns": { "alias": "columns"; "required": false; }; "layout": { "alias": "layout"; "required": false; }; "bordered": { "alias": "bordered"; "required": false; }; "size": { "alias": "size"; "required": false; }; "styleClass": { "alias": "styleClass"; "required": false; }; "style": { "alias": "style"; "required": false; }; }, {}, ["children"], never, true, never>;
57
+ }
58
+
59
+ /** For NgModule apps. Standalone apps can import `WuDescriptions` and `WuDescriptionsItem` directly. */
60
+ declare class WuDescriptionsModule {
61
+ static ɵfac: i0.ɵɵFactoryDeclaration<WuDescriptionsModule, never>;
62
+ static ɵmod: i0.ɵɵNgModuleDeclaration<WuDescriptionsModule, never, [typeof WuDescriptions, typeof WuDescriptionsItem], [typeof WuDescriptions, typeof WuDescriptionsItem]>;
63
+ static ɵinj: i0.ɵɵInjectorDeclaration<WuDescriptionsModule>;
64
+ }
65
+
66
+ export { WuDescriptions, WuDescriptionsItem, WuDescriptionsModule };
67
+ export type { WuDescriptionsEntry };
@@ -10,6 +10,12 @@ interface WuMeterItem {
10
10
  /** Icon class shown in the legend instead of the colour dot. */
11
11
  icon?: string;
12
12
  }
13
+ /** `(onItemClick)` of a clickable legend: the item, its place in `value`, and the click. */
14
+ interface WuMeterItemClickEvent {
15
+ originalEvent: Event;
16
+ item: WuMeterItem;
17
+ index: number;
18
+ }
13
19
  type WuMeterOrientation = 'horizontal' | 'vertical';
14
20
  type WuMeterLabelPosition = 'start' | 'end';
15
21
  /** Context of the `label`, `start` and `end` templates. */
@@ -59,6 +65,11 @@ declare class WuMeterGroup {
59
65
  readonly labelPosition: _angular_core.InputSignal<WuMeterLabelPosition>;
60
66
  /** Legend items in a row or a column. */
61
67
  readonly labelOrientation: _angular_core.InputSignal<WuMeterOrientation>;
68
+ /** Each legend item shows its value too: `เปิด 12 (24%)`. */
69
+ readonly showValue: _angular_core.InputSignalWithTransform<boolean, unknown>;
70
+ /** Legend items become buttons that emit `(onItemClick)`, e.g. to open the list for that status. */
71
+ readonly clickable: _angular_core.InputSignalWithTransform<boolean, unknown>;
72
+ readonly onItemClick: _angular_core.OutputEmitterRef<WuMeterItemClickEvent>;
62
73
  readonly styleClass: _angular_core.InputSignal<string | undefined>;
63
74
  /** Inline styles for the root element, as an object: `[style]="{ width: '20rem' }"`. */
64
75
  readonly style: _angular_core.InputSignal<string | Record<string, any> | null | undefined>;
@@ -90,10 +101,14 @@ declare class WuMeterGroup {
90
101
  readonly groupContext: _angular_core.Signal<WuMeterGroupContext>;
91
102
  readonly classes: _angular_core.Signal<string>;
92
103
  readonly labelClasses: _angular_core.Signal<string>;
104
+ private readonly config;
93
105
  constructor();
106
+ /** The legend text of one item. */
107
+ labelText(item: WuMeterItem, percent: number): string;
108
+ itemClick(event: Event, item: WuMeterItem, index: number): void;
94
109
  meterContext(index: number): WuMeterContext;
95
110
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<WuMeterGroup, never>;
96
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<WuMeterGroup, "wu-metergroup, wu-meterGroup, wu-meter-group", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; "reverse": { "alias": "reverse"; "required": false; "isSignal": true; }; "labelPosition": { "alias": "labelPosition"; "required": false; "isSignal": true; }; "labelOrientation": { "alias": "labelOrientation"; "required": false; "isSignal": true; }; "styleClass": { "alias": "styleClass"; "required": false; "isSignal": true; }; "style": { "alias": "style"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; }, {}, ["labelRef", "meterRef", "startRef", "endRef", "iconRef", "templates"], never, true, never>;
111
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<WuMeterGroup, "wu-metergroup, wu-meterGroup, wu-meter-group", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; "reverse": { "alias": "reverse"; "required": false; "isSignal": true; }; "labelPosition": { "alias": "labelPosition"; "required": false; "isSignal": true; }; "labelOrientation": { "alias": "labelOrientation"; "required": false; "isSignal": true; }; "showValue": { "alias": "showValue"; "required": false; "isSignal": true; }; "clickable": { "alias": "clickable"; "required": false; "isSignal": true; }; "styleClass": { "alias": "styleClass"; "required": false; "isSignal": true; }; "style": { "alias": "style"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; }, { "onItemClick": "onItemClick"; }, ["labelRef", "meterRef", "startRef", "endRef", "iconRef", "templates"], never, true, never>;
97
112
  }
98
113
 
99
114
  /** For NgModule apps. Standalone apps can import `WuMeterGroup` directly. */
@@ -104,4 +119,4 @@ declare class WuMeterGroupModule {
104
119
  }
105
120
 
106
121
  export { WuMeterGroup, WuMeterGroupModule, ɵmeterColor, ɵmeterParts, ɵmeterShare };
107
- export type { WuMeterContext, WuMeterGroupContext, WuMeterItem, WuMeterLabelPosition, WuMeterOrientation };
122
+ export type { WuMeterContext, WuMeterGroupContext, WuMeterItem, WuMeterItemClickEvent, WuMeterLabelPosition, WuMeterOrientation };