@wirabyte/ui 1.0.0-beta.0 → 1.1.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 (262) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/README.md +6 -6
  3. package/avatar/avatar.component.d.ts +4 -2
  4. package/avatar/avatar.types.d.ts +3 -0
  5. package/breadcrumb/breadcrumb.component.d.ts +3 -1
  6. package/button/button.styles.d.ts +1 -1
  7. package/chat/chat.component.d.ts +118 -0
  8. package/chat/chat.module.d.ts +8 -0
  9. package/chat/chat.types.d.ts +64 -0
  10. package/chat/index.d.ts +5 -0
  11. package/chat/public-api.d.ts +3 -0
  12. package/config/options.d.ts +13 -0
  13. package/config/theme.service.d.ts +5 -0
  14. package/config/wu-config.service.d.ts +16 -0
  15. package/core/catalog.d.ts +6 -1
  16. package/core/overrides.d.ts +7 -0
  17. package/core/thai/locale.d.ts +47 -0
  18. package/datepicker/datepicker.component.d.ts +3 -2
  19. package/descriptions/descriptions.component.d.ts +56 -0
  20. package/descriptions/descriptions.module.d.ts +8 -0
  21. package/descriptions/index.d.ts +5 -0
  22. package/descriptions/public-api.d.ts +2 -0
  23. package/esm2020/accordion/accordion.component.mjs +4 -4
  24. package/esm2020/alert/alert-dialog.component.mjs +3 -3
  25. package/esm2020/asidemenu/asidemenu.component.mjs +3 -3
  26. package/esm2020/avatar/avatar.component.mjs +10 -5
  27. package/esm2020/avatar/avatar.types.mjs +2 -2
  28. package/esm2020/breadcrumb/breadcrumb.component.mjs +5 -3
  29. package/esm2020/button/button.component.mjs +3 -3
  30. package/esm2020/button/button.styles.mjs +2 -2
  31. package/esm2020/card/card.component.mjs +8 -8
  32. package/esm2020/chat/chat.component.mjs +370 -0
  33. package/esm2020/chat/chat.module.mjs +17 -0
  34. package/esm2020/chat/chat.types.mjs +2 -0
  35. package/esm2020/chat/public-api.mjs +4 -0
  36. package/esm2020/chat/wirabyte-ui-chat.mjs +5 -0
  37. package/esm2020/config/options.mjs +1 -1
  38. package/esm2020/config/theme.service.mjs +35 -3
  39. package/esm2020/config/wu-config.service.mjs +22 -1
  40. package/esm2020/core/catalog.mjs +22 -2
  41. package/esm2020/core/families.mjs +43 -1
  42. package/esm2020/core/overrides.mjs +26 -1
  43. package/esm2020/core/thai/locale.mjs +67 -1
  44. package/esm2020/datepicker/datepicker.component.mjs +5 -4
  45. package/esm2020/descriptions/descriptions.component.mjs +112 -0
  46. package/esm2020/descriptions/descriptions.module.mjs +17 -0
  47. package/esm2020/descriptions/public-api.mjs +3 -0
  48. package/esm2020/descriptions/wirabyte-ui-descriptions.mjs +5 -0
  49. package/esm2020/dialog/dialog.component.mjs +3 -3
  50. package/esm2020/drawer/drawer.component.mjs +3 -3
  51. package/esm2020/emptystate/emptystate.component.mjs +3 -3
  52. package/esm2020/errorpage/errorpage.component.mjs +3 -3
  53. package/esm2020/fieldset/fieldset.component.mjs +4 -4
  54. package/esm2020/metergroup/metergroup.component.mjs +29 -5
  55. package/esm2020/metergroup/metergroup.types.mjs +1 -1
  56. package/esm2020/navbar/navbar.component.mjs +3 -3
  57. package/esm2020/panel/panel.component.mjs +6 -6
  58. package/esm2020/popover/popover.base.mjs +3 -3
  59. package/esm2020/result/result.component.mjs +3 -3
  60. package/esm2020/scheduler/public-api.mjs +4 -0
  61. package/esm2020/scheduler/scheduler.component.mjs +484 -0
  62. package/esm2020/scheduler/scheduler.module.mjs +17 -0
  63. package/esm2020/scheduler/scheduler.types.mjs +2 -0
  64. package/esm2020/scheduler/wirabyte-ui-scheduler.mjs +5 -0
  65. package/esm2020/selectbutton/selectbutton.component.mjs +23 -5
  66. package/esm2020/signaturepad/public-api.mjs +3 -0
  67. package/esm2020/signaturepad/signaturepad.component.mjs +289 -0
  68. package/esm2020/signaturepad/signaturepad.module.mjs +17 -0
  69. package/esm2020/signaturepad/wirabyte-ui-signaturepad.mjs +5 -0
  70. package/esm2020/sitefooter/sitefooter.component.mjs +2 -2
  71. package/esm2020/stat/public-api.mjs +3 -0
  72. package/esm2020/stat/stat.component.mjs +128 -0
  73. package/esm2020/stat/stat.module.mjs +17 -0
  74. package/esm2020/stat/wirabyte-ui-stat.mjs +5 -0
  75. package/esm2020/table/table.celleditor.mjs +4 -4
  76. package/esm2020/tabs/tabs.component.mjs +3 -3
  77. package/esm2020/tag/tag.component.mjs +3 -3
  78. package/esm2020/textarea/textarea.directive.mjs +33 -1
  79. package/esm2020/thai/thai.pipes.mjs +3 -3
  80. package/esm2020/toolbar/toolbar.component.mjs +7 -7
  81. package/fesm2015/wirabyte-ui-accordion.mjs +3 -3
  82. package/fesm2015/wirabyte-ui-accordion.mjs.map +1 -1
  83. package/fesm2015/wirabyte-ui-alert.mjs +2 -2
  84. package/fesm2015/wirabyte-ui-alert.mjs.map +1 -1
  85. package/fesm2015/wirabyte-ui-asidemenu.mjs +2 -2
  86. package/fesm2015/wirabyte-ui-asidemenu.mjs.map +1 -1
  87. package/fesm2015/wirabyte-ui-avatar.mjs +11 -5
  88. package/fesm2015/wirabyte-ui-avatar.mjs.map +1 -1
  89. package/fesm2015/wirabyte-ui-breadcrumb.mjs +4 -2
  90. package/fesm2015/wirabyte-ui-breadcrumb.mjs.map +1 -1
  91. package/fesm2015/wirabyte-ui-button.mjs +3 -3
  92. package/fesm2015/wirabyte-ui-button.mjs.map +1 -1
  93. package/fesm2015/wirabyte-ui-card.mjs +7 -7
  94. package/fesm2015/wirabyte-ui-card.mjs.map +1 -1
  95. package/fesm2015/wirabyte-ui-chat.mjs +399 -0
  96. package/fesm2015/wirabyte-ui-chat.mjs.map +1 -0
  97. package/fesm2015/wirabyte-ui-config.mjs +55 -2
  98. package/fesm2015/wirabyte-ui-config.mjs.map +1 -1
  99. package/fesm2015/wirabyte-ui-core.mjs +147 -2
  100. package/fesm2015/wirabyte-ui-core.mjs.map +1 -1
  101. package/fesm2015/wirabyte-ui-datepicker.mjs +5 -4
  102. package/fesm2015/wirabyte-ui-datepicker.mjs.map +1 -1
  103. package/fesm2015/wirabyte-ui-descriptions.mjs +133 -0
  104. package/fesm2015/wirabyte-ui-descriptions.mjs.map +1 -0
  105. package/fesm2015/wirabyte-ui-dialog.mjs +2 -2
  106. package/fesm2015/wirabyte-ui-dialog.mjs.map +1 -1
  107. package/fesm2015/wirabyte-ui-drawer.mjs +2 -2
  108. package/fesm2015/wirabyte-ui-drawer.mjs.map +1 -1
  109. package/fesm2015/wirabyte-ui-emptystate.mjs +2 -2
  110. package/fesm2015/wirabyte-ui-emptystate.mjs.map +1 -1
  111. package/fesm2015/wirabyte-ui-errorpage.mjs +2 -2
  112. package/fesm2015/wirabyte-ui-errorpage.mjs.map +1 -1
  113. package/fesm2015/wirabyte-ui-fieldset.mjs +3 -3
  114. package/fesm2015/wirabyte-ui-fieldset.mjs.map +1 -1
  115. package/fesm2015/wirabyte-ui-metergroup.mjs +29 -4
  116. package/fesm2015/wirabyte-ui-metergroup.mjs.map +1 -1
  117. package/fesm2015/wirabyte-ui-navbar.mjs +2 -2
  118. package/fesm2015/wirabyte-ui-navbar.mjs.map +1 -1
  119. package/fesm2015/wirabyte-ui-panel.mjs +5 -5
  120. package/fesm2015/wirabyte-ui-panel.mjs.map +1 -1
  121. package/fesm2015/wirabyte-ui-popover.mjs +2 -2
  122. package/fesm2015/wirabyte-ui-popover.mjs.map +1 -1
  123. package/fesm2015/wirabyte-ui-result.mjs +2 -2
  124. package/fesm2015/wirabyte-ui-result.mjs.map +1 -1
  125. package/fesm2015/wirabyte-ui-scheduler.mjs +515 -0
  126. package/fesm2015/wirabyte-ui-scheduler.mjs.map +1 -0
  127. package/fesm2015/wirabyte-ui-selectbutton.mjs +22 -4
  128. package/fesm2015/wirabyte-ui-selectbutton.mjs.map +1 -1
  129. package/fesm2015/wirabyte-ui-signaturepad.mjs +313 -0
  130. package/fesm2015/wirabyte-ui-signaturepad.mjs.map +1 -0
  131. package/fesm2015/wirabyte-ui-sitefooter.mjs +1 -1
  132. package/fesm2015/wirabyte-ui-sitefooter.mjs.map +1 -1
  133. package/fesm2015/wirabyte-ui-stat.mjs +151 -0
  134. package/fesm2015/wirabyte-ui-stat.mjs.map +1 -0
  135. package/fesm2015/wirabyte-ui-table.mjs +3 -3
  136. package/fesm2015/wirabyte-ui-table.mjs.map +1 -1
  137. package/fesm2015/wirabyte-ui-tabs.mjs +2 -2
  138. package/fesm2015/wirabyte-ui-tabs.mjs.map +1 -1
  139. package/fesm2015/wirabyte-ui-tag.mjs +2 -2
  140. package/fesm2015/wirabyte-ui-tag.mjs.map +1 -1
  141. package/fesm2015/wirabyte-ui-textarea.mjs +32 -0
  142. package/fesm2015/wirabyte-ui-textarea.mjs.map +1 -1
  143. package/fesm2015/wirabyte-ui-thai.mjs +2 -2
  144. package/fesm2015/wirabyte-ui-thai.mjs.map +1 -1
  145. package/fesm2015/wirabyte-ui-toolbar.mjs +6 -6
  146. package/fesm2015/wirabyte-ui-toolbar.mjs.map +1 -1
  147. package/fesm2020/wirabyte-ui-accordion.mjs +3 -3
  148. package/fesm2020/wirabyte-ui-accordion.mjs.map +1 -1
  149. package/fesm2020/wirabyte-ui-alert.mjs +2 -2
  150. package/fesm2020/wirabyte-ui-alert.mjs.map +1 -1
  151. package/fesm2020/wirabyte-ui-asidemenu.mjs +2 -2
  152. package/fesm2020/wirabyte-ui-asidemenu.mjs.map +1 -1
  153. package/fesm2020/wirabyte-ui-avatar.mjs +11 -5
  154. package/fesm2020/wirabyte-ui-avatar.mjs.map +1 -1
  155. package/fesm2020/wirabyte-ui-breadcrumb.mjs +4 -2
  156. package/fesm2020/wirabyte-ui-breadcrumb.mjs.map +1 -1
  157. package/fesm2020/wirabyte-ui-button.mjs +3 -3
  158. package/fesm2020/wirabyte-ui-button.mjs.map +1 -1
  159. package/fesm2020/wirabyte-ui-card.mjs +7 -7
  160. package/fesm2020/wirabyte-ui-card.mjs.map +1 -1
  161. package/fesm2020/wirabyte-ui-chat.mjs +391 -0
  162. package/fesm2020/wirabyte-ui-chat.mjs.map +1 -0
  163. package/fesm2020/wirabyte-ui-config.mjs +55 -2
  164. package/fesm2020/wirabyte-ui-config.mjs.map +1 -1
  165. package/fesm2020/wirabyte-ui-core.mjs +155 -2
  166. package/fesm2020/wirabyte-ui-core.mjs.map +1 -1
  167. package/fesm2020/wirabyte-ui-datepicker.mjs +5 -4
  168. package/fesm2020/wirabyte-ui-datepicker.mjs.map +1 -1
  169. package/fesm2020/wirabyte-ui-descriptions.mjs +133 -0
  170. package/fesm2020/wirabyte-ui-descriptions.mjs.map +1 -0
  171. package/fesm2020/wirabyte-ui-dialog.mjs +2 -2
  172. package/fesm2020/wirabyte-ui-dialog.mjs.map +1 -1
  173. package/fesm2020/wirabyte-ui-drawer.mjs +2 -2
  174. package/fesm2020/wirabyte-ui-drawer.mjs.map +1 -1
  175. package/fesm2020/wirabyte-ui-emptystate.mjs +2 -2
  176. package/fesm2020/wirabyte-ui-emptystate.mjs.map +1 -1
  177. package/fesm2020/wirabyte-ui-errorpage.mjs +2 -2
  178. package/fesm2020/wirabyte-ui-errorpage.mjs.map +1 -1
  179. package/fesm2020/wirabyte-ui-fieldset.mjs +3 -3
  180. package/fesm2020/wirabyte-ui-fieldset.mjs.map +1 -1
  181. package/fesm2020/wirabyte-ui-metergroup.mjs +28 -4
  182. package/fesm2020/wirabyte-ui-metergroup.mjs.map +1 -1
  183. package/fesm2020/wirabyte-ui-navbar.mjs +2 -2
  184. package/fesm2020/wirabyte-ui-navbar.mjs.map +1 -1
  185. package/fesm2020/wirabyte-ui-panel.mjs +5 -5
  186. package/fesm2020/wirabyte-ui-panel.mjs.map +1 -1
  187. package/fesm2020/wirabyte-ui-popover.mjs +2 -2
  188. package/fesm2020/wirabyte-ui-popover.mjs.map +1 -1
  189. package/fesm2020/wirabyte-ui-result.mjs +2 -2
  190. package/fesm2020/wirabyte-ui-result.mjs.map +1 -1
  191. package/fesm2020/wirabyte-ui-scheduler.mjs +505 -0
  192. package/fesm2020/wirabyte-ui-scheduler.mjs.map +1 -0
  193. package/fesm2020/wirabyte-ui-selectbutton.mjs +22 -4
  194. package/fesm2020/wirabyte-ui-selectbutton.mjs.map +1 -1
  195. package/fesm2020/wirabyte-ui-signaturepad.mjs +310 -0
  196. package/fesm2020/wirabyte-ui-signaturepad.mjs.map +1 -0
  197. package/fesm2020/wirabyte-ui-sitefooter.mjs +1 -1
  198. package/fesm2020/wirabyte-ui-sitefooter.mjs.map +1 -1
  199. package/fesm2020/wirabyte-ui-stat.mjs +149 -0
  200. package/fesm2020/wirabyte-ui-stat.mjs.map +1 -0
  201. package/fesm2020/wirabyte-ui-table.mjs +3 -3
  202. package/fesm2020/wirabyte-ui-table.mjs.map +1 -1
  203. package/fesm2020/wirabyte-ui-tabs.mjs +2 -2
  204. package/fesm2020/wirabyte-ui-tabs.mjs.map +1 -1
  205. package/fesm2020/wirabyte-ui-tag.mjs +2 -2
  206. package/fesm2020/wirabyte-ui-tag.mjs.map +1 -1
  207. package/fesm2020/wirabyte-ui-textarea.mjs +32 -0
  208. package/fesm2020/wirabyte-ui-textarea.mjs.map +1 -1
  209. package/fesm2020/wirabyte-ui-thai.mjs +2 -2
  210. package/fesm2020/wirabyte-ui-thai.mjs.map +1 -1
  211. package/fesm2020/wirabyte-ui-toolbar.mjs +6 -6
  212. package/fesm2020/wirabyte-ui-toolbar.mjs.map +1 -1
  213. package/metergroup/metergroup.component.d.ts +16 -3
  214. package/metergroup/metergroup.types.d.ts +6 -0
  215. package/package.json +41 -1
  216. package/scheduler/index.d.ts +5 -0
  217. package/scheduler/public-api.d.ts +3 -0
  218. package/scheduler/scheduler.component.d.ts +143 -0
  219. package/scheduler/scheduler.module.d.ts +8 -0
  220. package/scheduler/scheduler.types.d.ts +46 -0
  221. package/schematics/core/catalog.cjs +22 -1
  222. package/schematics/core/families.cjs +42 -0
  223. package/schematics/core/overrides.cjs +25 -0
  224. package/schematics/core/thai/locale.cjs +66 -0
  225. package/schematics/ng-add/index.cjs +3 -1
  226. package/selectbutton/selectbutton.component.d.ts +12 -1
  227. package/signaturepad/index.d.ts +5 -0
  228. package/signaturepad/public-api.d.ts +2 -0
  229. package/signaturepad/signaturepad.component.d.ts +98 -0
  230. package/signaturepad/signaturepad.module.d.ts +8 -0
  231. package/stat/index.d.ts +5 -0
  232. package/stat/public-api.d.ts +2 -0
  233. package/stat/stat.component.d.ts +61 -0
  234. package/stat/stat.module.d.ts +8 -0
  235. package/textarea/textarea.directive.d.ts +3 -0
  236. package/theme/_data.scss +239 -7
  237. package/theme/_index.scss +29 -0
  238. package/themes/arun-blue/theme.css +30 -1
  239. package/themes/arun-green/theme.css +30 -1
  240. package/themes/arun-orange/theme.css +30 -1
  241. package/themes/arun-purple/theme.css +30 -1
  242. package/themes/md-dark-deeppurple/theme.css +30 -1
  243. package/themes/md-dark-indigo/theme.css +30 -1
  244. package/themes/md-light-deeppurple/theme.css +30 -1
  245. package/themes/md-light-indigo/theme.css +30 -1
  246. package/themes/ratri-blue/theme.css +30 -1
  247. package/themes/ratri-green/theme.css +30 -1
  248. package/themes/ratri-orange/theme.css +30 -1
  249. package/themes/ratri-purple/theme.css +30 -1
  250. package/themes/sayan-blue/theme.css +30 -1
  251. package/themes/sayan-green/theme.css +30 -1
  252. package/themes/sayan-orange/theme.css +30 -1
  253. package/themes/sayan-purple/theme.css +30 -1
  254. package/themes/sila-dark-blue/theme.css +30 -1
  255. package/themes/sila-dark-indigo/theme.css +30 -1
  256. package/themes/sila-dark-purple/theme.css +30 -1
  257. package/themes/sila-dark-teal/theme.css +30 -1
  258. package/themes/sila-light-blue/theme.css +30 -1
  259. package/themes/sila-light-indigo/theme.css +30 -1
  260. package/themes/sila-light-purple/theme.css +30 -1
  261. package/themes/sila-light-teal/theme.css +30 -1
  262. package/themes/sila-light-wira/theme.css +30 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,48 @@
2
2
 
3
3
  รุ่นของ `@wirabyte/ui` แยก major ตามช่วง Angular: `1.x` = 15–17, `2.x` = 18–20, `3.x` = 21 ขึ้นไป ทุก major ออกจาก source ชุดเดียวกัน หัวข้อด้านล่างจึงใช้กับทุก major ยกเว้นที่ระบุไว้ ส่วน `@wirabyte/icons` ออกพร้อมกันแต่ใช้เลขของตัวเอง
4
4
 
5
+ ## 1.1.0 · 2.1.0 · 3.1.0
6
+
7
+ **ของใหม่**
8
+
9
+ - นาฬิกากลางของแอป: `provideWiraUI({ now: () => serverTime.now() })` ให้ทุก component ใช้เวลานี้เป็น "ตอนนี้" แทนนาฬิกาเครื่องผู้ใช้ ได้แก่ วันนี้และเดือนแรกที่แสดงใน DatePicker, วันนี้และเส้นเวลาปัจจุบันใน Scheduler, pipe `wuTimeAgo`, ป้ายวันในแชท และปีใน SiteFooter เปลี่ยนภายหลังได้ที่ `WuConfig.clock` และอ่านด้วย `WuConfig.now()` ส่วนตัวจับเวลา (หน่วงการค้นหา อายุของ toast) ยังใช้นาฬิกาเครื่อง (WUI-024)
10
+
11
+ **แก้บั๊ก**
12
+
13
+ - Textarea ที่ใช้ `autoResize` ไม่ทำให้เบราว์เซอร์แจ้ง error "ResizeObserver loop completed with undelivered notifications" แล้ว เดิมเกิดเมื่อเปิด dialog หรือ panel ที่ช่องมีข้อความอยู่ก่อน และแอปที่ส่ง error ของหน้าเว็บเข้า `ErrorHandler` จะเห็นเป็น `ERROR` ใน console (WUI-022) ตอนนี้ช่องยังขยายตามข้อความตั้งแต่เฟรมแรกที่แสดงเหมือนเดิม
14
+ - Aside Menu บนมือถือ: ปุ่มปิดอยู่มุมบนด้านท้ายแถวเดียวกับโลโก้ และส่วน start กว้างเต็มหัวเมนู เดิมเมื่อ start สูง (โลโก้ นาฬิกา การ์ดผู้ใช้) ปุ่มไปอยู่กึ่งกลางความสูงและกินความกว้างทุกแถว ควรเว้นท้ายแถวแรกของ start ไว้ให้ปุ่ม (WUI-023)
15
+
16
+ ## 1.0.0 · 2.0.0 · 3.0.0 · @wirabyte/icons 1.0.0
17
+
18
+ รุ่นจริงรุ่นแรก ติดตั้งได้ด้วย `ng add @wirabyte/ui` (Angular 21 ขึ้นไป), `@wirabyte/ui@2` (18–20) หรือ `@wirabyte/ui@1` (15–17) โดยไม่ต้องระบุ tag แล้ว รวมทุกข้อที่พบจากการใช้จริงกับแอปแรก (รหัส WUI-001 ถึง WUI-021)
19
+
20
+ **แก้บั๊ก**
21
+
22
+ - Card, Panel, Accordion, Fieldset, Tabs, SelectButton, Toolbar, Popover และ cell editor ของ Table ไม่ดึง template `#header` / `#content` / `#footer` ของ component ที่อยู่ข้างในไปใช้อีก เช่น ตารางหรือ timeline ในการ์ด
23
+ - Textarea ที่ใช้ `autoResize` วัดขนาดใหม่เมื่อเริ่มแสดง จึงไม่สูง 0px ใน dialog หรือ panel ที่เปิดทีหลัง
24
+ - Datepicker ใช้ปฏิทินตามภาษาของแอปเหมือน pipe `wuDate`: ภาษาไทยใช้ `calendar` ที่ตั้งไว้ ภาษาอื่นใช้ ค.ศ. (`WuConfig.calendarFor()`)
25
+ - ปุ่ม icon-only ที่มี `badge` แสดงป้ายลอยที่มุมปุ่ม ปุ่มไม่ขยายตาม
26
+ - Navbar ไม่ล้นจอบนมือถือ: ปุ่มด้านขวาคงขนาด ชื่อหรือ brand ที่ยาวตัดด้วย …
27
+
28
+ **ธีม**
29
+
30
+ - `$tokens` / `$dark-tokens` (SCSS) และ `tokens` (TypeScript) ตั้งค่า token ใดก็ได้ด้วยชื่อ ชื่อที่สะกดผิดจะแจ้ง error
31
+ - token ฟอนต์หัวข้อ `$heading-font-family` / `semantic.headingFontFamily` ใช้กับหัวข้อของ card, dialog, drawer, panel และอื่น ๆ
32
+ - `provideWiraUI({ fonts })`: ค่าเริ่มต้น `'google'` โหลดฟอนต์ของธีมจาก Google Fonts ให้ ถ้าหน้าเว็บยังไม่ได้โหลด ตั้ง `'none'` สำหรับแอปที่ใช้ฟอนต์ของตัวเอง ส่วน `ng add --font=none` จะเขียนค่านี้ให้
33
+ - preset `wira` หน้าตาใหม่: มุมโค้ง 10, เงา soft, หัวตารางโปร่ง, เมนูที่เลือกเป็นสีอ่อน
34
+ - tag แบบ soft ใช้สีโปร่งของสีหลัก จึงเห็นชัดบนพื้นเทา และ breadcrumb มี `variant="plain"`
35
+
36
+ **ของใหม่**
37
+
38
+ - `wu-chat`: แชทพร้อม bubble, จัดกลุ่มตามผู้ส่ง, คั่นวัน, ไฟล์และรูป, สถานะอ่านแล้ว, ตัวบอกกำลังพิมพ์ และช่องพิมพ์ที่วางรูปได้
39
+ - `wu-scheduler`: ปฏิทินนัดหมายแบบวัน สัปดาห์ เดือน ลากเลื่อนนัดได้ และแสดงปี พ.ศ. ตามภาษา
40
+ - `wu-signature-pad`: ช่องเซ็นลายเซ็นสำหรับฟอร์ม ค่าที่ได้เป็นรูป PNG
41
+ - `wu-stat`: การ์ดตัวเลข KPI พร้อมไอคอน, แนวโน้ม และสีตามความหมาย
42
+ - `wu-descriptions`: รายการ label / value หลายคอลัมน์ ยุบเหลือคอลัมน์เดียวเมื่อกรอบแคบ
43
+ - SelectButton `variant="chips"` (ตัวกรองแบบ chip) และ `variant="cards"` (การ์ดตัวเลือก), Avatar `severity`, MeterGroup `showValue` และ legend ที่คลิกได้ (`clickable`, `(onItemClick)`)
44
+
45
+ **เอกสาร:** วิธีวาง global CSS ใน `@layer reset` และ override ใน `@layer wiraui.overrides`, การโหลดฟอนต์เมื่อติดตั้งแบบ manual และ footer ของ card
46
+
5
47
  ## 1.0.0-beta.0 · 2.0.0-beta.0 · 3.0.0-beta.0 · @wirabyte/icons 1.0.0-beta.0
6
48
 
7
49
  รุ่นแรกที่ออกให้ทดลองใช้ เอกสารอยู่ที่ https://ui.wirabyte.com
package/README.md CHANGED
@@ -35,13 +35,13 @@
35
35
 
36
36
  ## 📦 Install
37
37
 
38
- This is a beta, so name the tag for your app's Angular version:
38
+ Pick the major for your app's Angular version:
39
39
 
40
40
  | Angular | Command | Package | Status |
41
41
  |---|---|---|---|
42
- | 21 and newer | `ng add @wirabyte/ui@beta` | `@wirabyte/ui@3` | active (latest) |
43
- | 18 – 20 | `ng add @wirabyte/ui@v2-beta` | `@wirabyte/ui@2` | active |
44
- | 15 – 17 | `ng add @wirabyte/ui@v1-beta` | `@wirabyte/ui@1` | maintenance |
42
+ | 21 and newer | `ng add @wirabyte/ui` | `@wirabyte/ui@3` | active (latest) |
43
+ | 18 – 20 | `ng add @wirabyte/ui@2` | `@wirabyte/ui@2` | active |
44
+ | 15 – 17 | `ng add @wirabyte/ui@1` | `@wirabyte/ui@1` | maintenance |
45
45
 
46
46
  `ng add` sets up the theme, fonts and icons, and asks only what it must. Then use the components:
47
47
 
@@ -54,10 +54,10 @@ This is a beta, so name the tag for your app's Angular version:
54
54
 
55
55
  - **Use the major for your Angular range.** Each major is locked to its range and refuses to install on any other.
56
56
  - **Change Angular ranges in one command,** so Angular and WiraUI move together:
57
- `ng update @angular/core@18 @angular/cli@18 @wirabyte/ui@v2-beta`
57
+ `ng update @angular/core@18 @angular/cli@18 @wirabyte/ui@2`
58
58
  - **Theme through the theme files,** not by overriding component CSS, so your look carries over to new releases.
59
59
  - **Bring an existing app over gradually.** WiraUI runs next to your current UI library, so you can move one page at a time.
60
- - **Remember it is a beta.** APIs may still change between betas, so pin the exact version in production.
60
+ - **Update within a major freely.** Minor and patch releases keep the API; a new major means a new Angular range.
61
61
 
62
62
  ## 📚 Learn more
63
63
 
@@ -1,5 +1,5 @@
1
1
  import { EventEmitter } from '@angular/core';
2
- import { WuAvatarShape, WuAvatarSize } from './avatar.types';
2
+ import { WuAvatarSeverity, WuAvatarShape, WuAvatarSize } from './avatar.types';
3
3
  import * as i0 from "@angular/core";
4
4
  /**
5
5
  * Picture, initials or icon: `<wu-avatar image="…" label="สม" shape="circle">`.
@@ -12,6 +12,8 @@ export declare class WuAvatar {
12
12
  image?: string;
13
13
  size: WuAvatarSize;
14
14
  shape: WuAvatarShape;
15
+ /** A soft tile of that colour behind the icon or letters: KPI icons, status markers. */
16
+ severity?: WuAvatarSeverity | null;
15
17
  ariaLabel?: string;
16
18
  readonly onImageError: EventEmitter<Event>;
17
19
  /** The image URL that failed; a different URL gets a fresh chance to load. */
@@ -29,7 +31,7 @@ export declare class WuAvatar {
29
31
  get baseClasses(): string;
30
32
  imageError(event: Event): void;
31
33
  static ɵfac: i0.ɵɵFactoryDeclaration<WuAvatar, never>;
32
- static ɵcmp: i0.ɵɵComponentDeclaration<WuAvatar, "wu-avatar", never, { "label": "label"; "icon": "icon"; "image": "image"; "size": "size"; "shape": "shape"; "ariaLabel": "ariaLabel"; "styleClass": "styleClass"; "style": "style"; }, { "onImageError": "onImageError"; }, never, ["*"], true, never>;
34
+ static ɵcmp: i0.ɵɵComponentDeclaration<WuAvatar, "wu-avatar", never, { "label": "label"; "icon": "icon"; "image": "image"; "size": "size"; "shape": "shape"; "severity": "severity"; "ariaLabel": "ariaLabel"; "styleClass": "styleClass"; "style": "style"; }, { "onImageError": "onImageError"; }, never, ["*"], true, never>;
33
35
  }
34
36
  /** Overlapping row of avatars: `<wu-avatar-group><wu-avatar …></wu-avatar>…</wu-avatar-group>`. */
35
37
  export declare class WuAvatarGroup {
@@ -1,2 +1,5 @@
1
1
  export type WuAvatarSize = 'normal' | 'large' | 'xlarge';
2
2
  export type WuAvatarShape = 'square' | 'circle';
3
+ /** A soft tile of that colour behind the icon or letters, as tags look. */
4
+ export type WuAvatarSeverity = 'primary' | 'secondary' | 'success' | 'info' | 'warn' | 'danger' | 'help' | 'contrast';
5
+ export declare const ɵWU_AVATAR_SEVERITIES: readonly WuAvatarSeverity[];
@@ -17,6 +17,8 @@ export declare class WuBreadcrumb implements OnDestroy {
17
17
  home?: WuMenuItem | null;
18
18
  homeAriaLabel?: string;
19
19
  ariaLabel?: string;
20
+ /** `'plain'`: just the trail, with no box, padding or border, for above a page title. Default: the theme's box. */
21
+ variant?: 'default' | 'plain' | null;
20
22
  styleClass?: string | null;
21
23
  style?: Record<string, any> | string | null;
22
24
  readonly onItemClick: EventEmitter<WuBreadcrumbItemClickEvent>;
@@ -37,5 +39,5 @@ export declare class WuBreadcrumb implements OnDestroy {
37
39
  hrefOf(item: WuMenuItem): string | null;
38
40
  itemClick(event: MouseEvent, item: WuMenuItem): void;
39
41
  static ɵfac: i0.ɵɵFactoryDeclaration<WuBreadcrumb, never>;
40
- static ɵcmp: i0.ɵɵComponentDeclaration<WuBreadcrumb, "wu-breadcrumb", never, { "model": "model"; "home": "home"; "homeAriaLabel": "homeAriaLabel"; "ariaLabel": "ariaLabel"; "styleClass": "styleClass"; "style": "style"; }, { "onItemClick": "onItemClick"; }, ["itemRef", "separatorRef", "templates"], never, true, never>;
42
+ static ɵcmp: i0.ɵɵComponentDeclaration<WuBreadcrumb, "wu-breadcrumb", never, { "model": "model"; "home": "home"; "homeAriaLabel": "homeAriaLabel"; "ariaLabel": "ariaLabel"; "variant": "variant"; "styleClass": "styleClass"; "style": "style"; }, { "onItemClick": "onItemClick"; }, ["itemRef", "separatorRef", "templates"], never, true, never>;
41
43
  }
@@ -1,2 +1,2 @@
1
1
  /** Generated by tools/sync-sources.mjs from packages/styles/button.css. */
2
- export 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";
2
+ export 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";
@@ -0,0 +1,118 @@
1
+ import { AfterViewChecked, EventEmitter, OnDestroy, QueryList, TemplateRef } from '@angular/core';
2
+ import { WuTemplate } from '@wirabyte/ui/config';
3
+ import { WuChatMessages } from '@wirabyte/ui/core';
4
+ import { WuChatAttachment, WuChatAttachmentClickEvent, WuChatMessage, WuChatSendEvent, ɵWuChatRow } from './chat.types';
5
+ import * as i0 from "@angular/core";
6
+ /** A file waiting in the composer, with a preview URL when it is a picture. */
7
+ interface Pending {
8
+ file: File;
9
+ preview: string | null;
10
+ }
11
+ /**
12
+ * A conversation: `<wu-chat [messages]="messages" [currentUserId]="me.id" (onSend)="send($event)">`. Bubbles on the
13
+ * left for others and on the right for you, grouped by sender and time, day separators (วันนี้, เมื่อวาน, then the date
14
+ * in the app's calendar), pictures and file cards, read marks, who is typing, and a message box that grows with the
15
+ * text: Enter sends, Shift+Enter starts a new line, pasted pictures are attached. New messages scroll into view unless
16
+ * the reader has scrolled up to read older ones. The component only shows and emits; sending is the app's job.
17
+ */
18
+ export declare class WuChat implements AfterViewChecked, OnDestroy {
19
+ set messages(v: WuChatMessage[] | null | undefined);
20
+ get messages(): WuChatMessage[];
21
+ /** Your user id: messages whose `sender.id` matches are drawn on the right. `mine` on a message wins. */
22
+ currentUserId?: string | number | null;
23
+ /** Names of the people typing right now. */
24
+ typing?: string[] | string | null;
25
+ /** No message box: a closed conversation. `readonlyMessage` replaces the default line. */
26
+ set readonly(v: unknown);
27
+ get readonly(): boolean;
28
+ readonlyMessage?: string | null;
29
+ placeholder?: string | null;
30
+ /** A spinner instead of the messages while they load. */
31
+ set loading(v: unknown);
32
+ get loading(): boolean;
33
+ /** The send button shows a spinner and the box waits. */
34
+ set sending(v: unknown);
35
+ get sending(): boolean;
36
+ /** `false` hides the attach button (pasting files then does nothing either). */
37
+ set attach(v: unknown);
38
+ get attach(): boolean;
39
+ /** File types the attach button offers: `'image/*,.pdf'`. */
40
+ accept?: string | null;
41
+ /** Largest file in bytes; bigger ones are left out and emitted in `(onFileRejected)`. */
42
+ maxFileSize?: number | null;
43
+ /** Messages from the same sender within this many minutes join one group (one name, one avatar). Default 5. */
44
+ groupMinutes: number;
45
+ /** A button above the oldest message that emits `(onLoadMore)`. */
46
+ set hasMore(v: unknown);
47
+ get hasMore(): boolean;
48
+ /** `false` leaves out the avatars beside other people's messages. */
49
+ set showAvatars(v: unknown);
50
+ get showAvatars(): boolean;
51
+ /** Height of the whole chat. Default: the theme's (`--wu-chat-height`). `'100%'` fills a sized parent. */
52
+ height?: string | number | null;
53
+ ariaLabel?: string | null;
54
+ styleClass?: string | null;
55
+ style?: Record<string, any> | string | null;
56
+ readonly onSend: EventEmitter<WuChatSendEvent>;
57
+ /** While the reader types, at most every 2 seconds: send "is typing" to the others. */
58
+ readonly onTyping: EventEmitter<void>;
59
+ readonly onAttachmentClick: EventEmitter<WuChatAttachmentClickEvent>;
60
+ readonly onRetry: EventEmitter<WuChatMessage>;
61
+ readonly onLoadMore: EventEmitter<void>;
62
+ readonly onFileRejected: EventEmitter<File>;
63
+ protected templates?: QueryList<WuTemplate>;
64
+ protected messageRef?: unknown;
65
+ private scroller?;
66
+ private box?;
67
+ private fileInput?;
68
+ draft: string;
69
+ pending: Pending[];
70
+ private _messages;
71
+ private rows;
72
+ private _readonly;
73
+ private _loading;
74
+ private _sending;
75
+ private _attach;
76
+ private _hasMore;
77
+ private _avatars;
78
+ private atBottom;
79
+ private scrollPending;
80
+ private lastTyping;
81
+ private readonly cdr;
82
+ private readonly config;
83
+ private readonly i18n;
84
+ private readonly translated;
85
+ constructor();
86
+ ngAfterViewChecked(): void;
87
+ ngOnDestroy(): void;
88
+ get t(): WuChatMessages | undefined;
89
+ /** `<ng-template #message let-message>`: the inside of a bubble. */
90
+ get messageTemplate(): TemplateRef<unknown> | null;
91
+ get rootClass(): string;
92
+ get rootStyle(): Record<string, any>;
93
+ get view(): ɵWuChatRow[];
94
+ get typingText(): string;
95
+ get canSend(): boolean;
96
+ trackRow(_: number, row: ɵWuChatRow): string;
97
+ initials(name: string | undefined): string;
98
+ isImage(a: WuChatAttachment): boolean;
99
+ sizeText(bytes: number | undefined): string;
100
+ readText(m: WuChatMessage): string;
101
+ onScroll(): void;
102
+ onKeydown(event: KeyboardEvent): void;
103
+ onInput(): void;
104
+ onPaste(event: ClipboardEvent): void;
105
+ openFiles(): void;
106
+ onFilesChosen(event: Event): void;
107
+ removePending(index: number): void;
108
+ send(): void;
109
+ attachmentClick(event: Event, attachment: WuChatAttachment, message: WuChatMessage): void;
110
+ private isMine;
111
+ private add;
112
+ /** The box grows with its text up to a few lines, then scrolls. */
113
+ private grow;
114
+ private build;
115
+ static ɵfac: i0.ɵɵFactoryDeclaration<WuChat, never>;
116
+ static ɵcmp: i0.ɵɵComponentDeclaration<WuChat, "wu-chat", never, { "messages": "messages"; "currentUserId": "currentUserId"; "typing": "typing"; "readonly": "readonly"; "readonlyMessage": "readonlyMessage"; "placeholder": "placeholder"; "loading": "loading"; "sending": "sending"; "attach": "attach"; "accept": "accept"; "maxFileSize": "maxFileSize"; "groupMinutes": "groupMinutes"; "hasMore": "hasMore"; "showAvatars": "showAvatars"; "height": "height"; "ariaLabel": "ariaLabel"; "styleClass": "styleClass"; "style": "style"; }, { "onSend": "onSend"; "onTyping": "onTyping"; "onAttachmentClick": "onAttachmentClick"; "onRetry": "onRetry"; "onLoadMore": "onLoadMore"; "onFileRejected": "onFileRejected"; }, ["messageRef", "templates"], never, true, never>;
117
+ }
118
+ export {};
@@ -0,0 +1,8 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./chat.component";
3
+ /** For NgModule apps. Standalone apps can import `WuChat` directly. */
4
+ export declare class WuChatModule {
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<WuChatModule, never>;
6
+ static ɵmod: i0.ɵɵNgModuleDeclaration<WuChatModule, never, [typeof i1.WuChat], [typeof i1.WuChat]>;
7
+ static ɵinj: i0.ɵɵInjectorDeclaration<WuChatModule>;
8
+ }
@@ -0,0 +1,64 @@
1
+ /** Who wrote a message. */
2
+ export interface WuChatUser {
3
+ id: string | number;
4
+ name: string;
5
+ /** A picture URL; without one the initials are shown. */
6
+ avatar?: string;
7
+ /** A small tag after the name, e.g. the company or `'Staff'`. */
8
+ badge?: string;
9
+ }
10
+ /** A file or picture sent with a message. */
11
+ export interface WuChatAttachment {
12
+ name: string;
13
+ /** Where it opens or downloads. Without it, clicks only emit `(onAttachmentClick)`. */
14
+ url?: string;
15
+ /** `'image'` shows a picture (`url`, or `thumbnail`), anything else a file card. Default: read from `name`. */
16
+ type?: 'image' | 'file';
17
+ thumbnail?: string;
18
+ /** Bytes, shown as kB / MB. */
19
+ size?: number;
20
+ }
21
+ export interface WuChatMessage {
22
+ id?: string | number;
23
+ text?: string;
24
+ sender?: WuChatUser;
25
+ /** Written by the person using the app: drawn on the right. Default: `sender.id === currentUserId`. */
26
+ mine?: boolean;
27
+ time: Date | string | number;
28
+ attachments?: WuChatAttachment[];
29
+ /** `'sending'` dims it; `'failed'` offers to send again (`(onRetry)`). */
30
+ status?: 'sending' | 'sent' | 'failed';
31
+ /** On your own messages: `true` shows "Read", a number "Read by N". */
32
+ read?: boolean | number;
33
+ /** A line from the system ("ปิดงานแล้ว") in the middle, not a bubble. */
34
+ system?: boolean;
35
+ }
36
+ /** `(onSend)`: the text (trimmed, may be empty when only files go) and the files picked or pasted. */
37
+ export interface WuChatSendEvent {
38
+ text: string;
39
+ files: File[];
40
+ }
41
+ export interface WuChatAttachmentClickEvent {
42
+ originalEvent: Event;
43
+ attachment: WuChatAttachment;
44
+ message: WuChatMessage;
45
+ }
46
+ /** A row the template draws: a day separator, a system line, or a message with its place in a group. */
47
+ export type ɵWuChatRow = {
48
+ kind: 'day';
49
+ key: string;
50
+ label: string;
51
+ } | {
52
+ kind: 'system';
53
+ key: string;
54
+ message: WuChatMessage;
55
+ time: string;
56
+ } | {
57
+ kind: 'message';
58
+ key: string;
59
+ message: WuChatMessage;
60
+ mine: boolean;
61
+ first: boolean;
62
+ last: boolean;
63
+ time: string;
64
+ };
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ /// <amd-module name="@wirabyte/ui/chat" />
5
+ export * from './public-api';
@@ -0,0 +1,3 @@
1
+ export * from './chat.component';
2
+ export * from './chat.module';
3
+ export * from './chat.types';
@@ -44,5 +44,18 @@ export interface WiraUIOptions {
44
44
  scale?: WuScale;
45
45
  /** Waits before searching for the whole app: `{ autoComplete: 300, filter: 300 }`. Default 0 (no wait). */
46
46
  delays?: WuDelays;
47
+ /**
48
+ * The clock every component treats as "now": today in the datepicker and the scheduler, the scheduler's current-time
49
+ * line, `wuTimeAgo`, the chat's day labels, the year in the site footer. Default: the device clock. Give the
50
+ * server's time when the device clock cannot be trusted: `now: () => serverTime.now()`. Change it later through
51
+ * `WuConfig.clock`. Timers (debounces, toast life) keep measuring with the device clock.
52
+ */
53
+ now?: () => Date;
54
+ /**
55
+ * Where the theme's fonts come from. `'google'` (the default) adds the Google Fonts stylesheet for the body and
56
+ * heading fonts the theme ends up with (Kanit, Sarabun, Anuphan …) unless the page already links it, so a theme set
57
+ * up by hand shows its font too. `'none'` leaves fonts to the app: self-hosted files, or no access to Google.
58
+ */
59
+ fonts?: 'google' | 'none';
47
60
  }
48
61
  export declare const WU_OPTIONS: InjectionToken<WiraUIOptions>;
@@ -38,6 +38,11 @@ export declare class WuThemeService {
38
38
  private cssOptions;
39
39
  private writePreset;
40
40
  private writeOverrides;
41
+ /**
42
+ * Links the Google Fonts stylesheet for the body and heading fonts the tokens ended up with, from whichever source
43
+ * (SCSS, CSS or TypeScript), unless the page already links that family. `fonts: 'none'` turns it off.
44
+ */
45
+ private loadFonts;
41
46
  private style;
42
47
  /** A preset and a SCSS/CSS theme file both define every token; one of them is redundant. */
43
48
  private warnIfStylesheetToo;
@@ -10,10 +10,26 @@ export declare class WuConfig {
10
10
  translation: WuLocale;
11
11
  /** Waits before searching, in ms (`provideWiraUI({ delays })`); 0 = no wait. */
12
12
  delays: Required<WuDelays>;
13
+ /**
14
+ * Where "now" comes from (`provideWiraUI({ now })`; default: the device clock). Assign another function at run
15
+ * time, say once the server time is known: components read it each time they need the time.
16
+ */
17
+ clock: () => Date;
18
+ /**
19
+ * Now, by `clock`: what the datepicker, scheduler, chat, footer and `wuTimeAgo` call "now" and "today". A clock
20
+ * that returns no valid date falls back to the device clock. Always a new Date, so callers may change it.
21
+ */
22
+ now(): Date;
13
23
  /** Emits after `setTranslation()` so components can refresh their labels. */
14
24
  readonly translationChange: Subject<WuLocale>;
15
25
  setTranslation(partial: Partial<WuLocale>): void;
16
26
  getTranslation<K extends keyof WuLocale>(key: K): WuLocale[K];
27
+ /**
28
+ * The calendar dates use in `language` (default: the UI language): `calendar` while the app is in Thai, Gregorian in
29
+ * any other language, so switching the app to English also turns พ.ศ. into ค.ศ. The date pipes and the datepicker
30
+ * read this; a component's own `calendar` input still wins.
31
+ */
32
+ calendarFor(language?: string): CalendarSystem;
17
33
  static ɵfac: i0.ɵɵFactoryDeclaration<WuConfig, never>;
18
34
  static ɵprov: i0.ɵɵInjectableDeclaration<WuConfig>;
19
35
  }
package/core/catalog.d.ts CHANGED
@@ -75,6 +75,11 @@ export declare const SURFACES: {
75
75
  };
76
76
  export type SurfaceId = keyof typeof SURFACES;
77
77
  export declare const FONTS: readonly ["Kanit", "Sarabun", "Prompt", "Noto Sans Thai", "IBM Plex Sans Thai", "Anuphan", "Inter", "Roboto"];
78
+ /**
79
+ * The Google Fonts stylesheet for the first family of a CSS `font-family` value (`"'Kanit', sans-serif"`), or `null` when
80
+ * it is not a family the themes know.
81
+ */
82
+ export declare function googleFontHref(fontFamily: string): string | null;
78
83
  /** Density multiplies every padding a preset defines (1 = the preset's own spacing). */
79
84
  export declare const DENSITY: Record<'compact' | 'normal' | 'comfortable', number>;
80
85
  export type DensityId = keyof typeof DENSITY;
@@ -284,7 +289,7 @@ export declare const PRESETS: {
284
289
  lineHeight: number;
285
290
  radius: number;
286
291
  density: "normal";
287
- shadow: "subtle";
292
+ shadow: "soft";
288
293
  ripple: false;
289
294
  focusRing: "ring";
290
295
  transition: number;
@@ -15,6 +15,8 @@ export interface SemanticOverrides {
15
15
  /** Text colour on primary buttons, e.g. `'#ffffff'`. */
16
16
  primaryContrast?: string;
17
17
  fontFamily?: string;
18
+ /** Font of titles (card, dialog, drawer, panel …), e.g. `'Kanit'`. Default: `fontFamily`. */
19
+ headingFontFamily?: string;
18
20
  fontSize?: Size;
19
21
  lineHeight?: Size;
20
22
  radius?: Size;
@@ -53,6 +55,11 @@ export interface ComponentOverrides {
53
55
  export interface ThemeOverrideSet {
54
56
  semantic?: SemanticOverrides;
55
57
  components?: ComponentOverrides;
58
+ /**
59
+ * Any token by name, without `--wu-`: `{ 'table-header-bg': 'transparent', 'aside-menu-item-active-bg': '…' }`.
60
+ * At the top level a value applies in light and dark mode alike; under `dark` it is for dark mode only.
61
+ */
62
+ tokens?: Record<string, string | number>;
56
63
  }
57
64
  /** Partial theme changes applied on top of the main theme (SCSS/CSS file or a preset). */
58
65
  export interface ThemeOverrides extends ThemeOverrideSet {
@@ -244,6 +244,53 @@ export interface WuLocale {
244
244
  validation: WuValidationMessages;
245
245
  /** Rich-text editor: toolbar labels, menus and dialogs. `{0}` / `{1}` are filled in (a level, a size, a count). */
246
246
  editor: WuEditorMessages;
247
+ /** wu-chat: the message box and its buttons, who is typing (`{name}`, `{count}`), read marks and day separators. */
248
+ chat?: WuChatMessages;
249
+ /** wu-signature-pad */
250
+ signaturePad?: {
251
+ label: string;
252
+ hint: string;
253
+ clear: string;
254
+ undo: string;
255
+ };
256
+ /** wu-scheduler: the toolbar, the views and the "+{count} more" link of a full day. */
257
+ scheduler?: {
258
+ today: string;
259
+ previous: string;
260
+ next: string;
261
+ day: string;
262
+ week: string;
263
+ month: string;
264
+ allDay: string;
265
+ more: string;
266
+ noEvents: string;
267
+ };
268
+ /** wu-stat: how a screen reader says the trend. */
269
+ stat?: {
270
+ up: string;
271
+ down: string;
272
+ same: string;
273
+ };
274
+ }
275
+ export interface WuChatMessages {
276
+ placeholder: string;
277
+ send: string;
278
+ attach: string;
279
+ removeFile: string;
280
+ typing: string;
281
+ typingMany: string;
282
+ read: string;
283
+ readBy: string;
284
+ today: string;
285
+ yesterday: string;
286
+ closed: string;
287
+ emptyTitle: string;
288
+ emptyDescription: string;
289
+ loadMore: string;
290
+ failed: string;
291
+ retry: string;
292
+ newMessages: string;
293
+ messages: string;
247
294
  }
248
295
  export interface WuEditorMessages {
249
296
  toolbar: string;
@@ -31,7 +31,7 @@ export declare class WuDatePicker implements ControlValueAccessor, OnChanges, On
31
31
  set selectOtherMonths(v: unknown);
32
32
  /** `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. */
33
33
  dateFormat?: string;
34
- /** `'buddhist'` shows years as พ.ศ.; the model stays an ordinary Date. Default: `WuConfig.calendar` (พ.ศ.). */
34
+ /** `'buddhist'` shows years as พ.ศ.; the model stays an ordinary Date. Default: `WuConfig.calendar` (พ.ศ.) while the app is in Thai, ค.ศ. in other languages. */
35
35
  calendar?: CalendarSystem;
36
36
  /** `true` is `calendar="buddhist"`, `false` is `calendar="gregorian"`. Both spellings work. */
37
37
  set isBudhistYear(v: unknown);
@@ -128,6 +128,8 @@ export declare class WuDatePicker implements ControlValueAccessor, OnChanges, On
128
128
  private rootRef;
129
129
  private inputRef?;
130
130
  private panelRef?;
131
+ private readonly config;
132
+ /** Today and the first month shown come from the app's clock (`provideWiraUI({ now })`), not the device's. */
131
133
  readonly state: DatePickerState;
132
134
  open: boolean;
133
135
  focused: boolean;
@@ -182,7 +184,6 @@ export declare class WuDatePicker implements ControlValueAccessor, OnChanges, On
182
184
  private popup;
183
185
  private repeat;
184
186
  private readonly autoId;
185
- private readonly config;
186
187
  private readonly cdr;
187
188
  private readonly host;
188
189
  private readonly doc;
@@ -0,0 +1,56 @@
1
+ import { QueryList, TemplateRef } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ /** One row of `[items]`: `{ label: 'สถานะ', value: 'กำลังดำเนินการ', span: 2 }`. */
4
+ export interface WuDescriptionsEntry {
5
+ label: string;
6
+ value?: string | number | null;
7
+ /** How many columns the item takes. Default 1. */
8
+ span?: number;
9
+ }
10
+ /**
11
+ * One label and its value inside `wu-descriptions`: `<wu-descriptions-item label="สถานะ"><wu-tag …></wu-tag></wu-descriptions-item>`.
12
+ * Whatever is inside the tag is the value.
13
+ */
14
+ export declare class WuDescriptionsItem {
15
+ label?: string | null;
16
+ /** How many columns the item takes. Default 1. */
17
+ set span(v: unknown);
18
+ get span(): number;
19
+ content: TemplateRef<unknown>;
20
+ private _span;
21
+ static ɵfac: i0.ɵɵFactoryDeclaration<WuDescriptionsItem, never>;
22
+ static ɵcmp: i0.ɵɵComponentDeclaration<WuDescriptionsItem, "wu-descriptions-item, wu-descriptionsItem", never, { "label": "label"; "span": "span"; }, {}, never, ["*"], true, never>;
23
+ }
24
+ /**
25
+ * Facts as label and value pairs, in columns: `<wu-descriptions [columns]="2" title="ข้อมูล Ticket">` with
26
+ * `<wu-descriptions-item label="…">` inside, or `[items]="[{ label, value }]"`. `layout="vertical"` puts each label
27
+ * above its value; `bordered` draws a table of cells. The columns fold into one when its box is too narrow for them.
28
+ */
29
+ export declare class WuDescriptions {
30
+ /** A heading over the list. */
31
+ title?: string | null;
32
+ items?: WuDescriptionsEntry[] | null;
33
+ /** Columns on a wide box. Default 1. */
34
+ set columns(v: unknown);
35
+ get columns(): number;
36
+ /** `'horizontal'` (default): label beside value. `'vertical'`: label above value. */
37
+ layout: 'horizontal' | 'vertical' | null | undefined;
38
+ /** Cells with borders and a tinted label column. */
39
+ set bordered(v: unknown);
40
+ get bordered(): boolean;
41
+ /** `'small'` tightens the spacing. */
42
+ size: 'small' | 'normal' | null | undefined;
43
+ styleClass?: string | null;
44
+ style?: Record<string, any> | string | null;
45
+ protected children?: QueryList<WuDescriptionsItem>;
46
+ private _columns;
47
+ private _bordered;
48
+ private readonly config;
49
+ constructor();
50
+ get rootClass(): string;
51
+ get rootStyle(): Record<string, any>;
52
+ spanOf(span: number | undefined): string;
53
+ valueText(v: unknown): string;
54
+ static ɵfac: i0.ɵɵFactoryDeclaration<WuDescriptions, never>;
55
+ static ɵcmp: i0.ɵɵComponentDeclaration<WuDescriptions, "wu-descriptions", never, { "title": "title"; "items": "items"; "columns": "columns"; "layout": "layout"; "bordered": "bordered"; "size": "size"; "styleClass": "styleClass"; "style": "style"; }, {}, ["children"], never, true, never>;
56
+ }