@webority/ui-react 0.128.0 → 0.130.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 (233) hide show
  1. package/README.md +1 -1
  2. package/dist/canvas-kit/kit.js +29757 -25503
  3. package/dist/canvas-kit/manifest.json +3343 -275
  4. package/dist/canvas-kit/release.json +6 -6
  5. package/dist/components/AppAccountSwitcher.js +1 -0
  6. package/dist/components/AppActionIcon.js +1 -1
  7. package/dist/components/AppAlert.js +1 -1
  8. package/dist/components/AppAsyncBlock.js +1 -1
  9. package/dist/components/AppAuthLayout.js +1 -0
  10. package/dist/components/AppAutocomplete.js +1 -1
  11. package/dist/components/AppAvatar.js +1 -1
  12. package/dist/components/AppAvatarGroup.js +1 -1
  13. package/dist/components/AppBadge.js +1 -1
  14. package/dist/components/AppBanner.js +1 -1
  15. package/dist/components/AppButton.js +1 -1
  16. package/dist/components/AppCalendar.js +1 -1
  17. package/dist/components/AppCard.js +1 -1
  18. package/dist/components/AppCell.js +1 -0
  19. package/dist/components/AppChart.js +1 -1
  20. package/dist/components/AppChartCard.js +1 -1
  21. package/dist/components/AppCheckbox.js +1 -1
  22. package/dist/components/AppChip.js +1 -1
  23. package/dist/components/AppChoiceCard.js +1 -1
  24. package/dist/components/AppChoiceChip.js +1 -1
  25. package/dist/components/AppColorField.js +1 -1
  26. package/dist/components/AppCommandPalette.js +1 -1
  27. package/dist/components/AppCommentThread.js +1 -1
  28. package/dist/components/AppCompareTable.js +1 -1
  29. package/dist/components/AppConfirmDialog.js +1 -1
  30. package/dist/components/AppConfirmProvider.js +1 -1
  31. package/dist/components/AppConsentBanner.js +1 -1
  32. package/dist/components/AppContextMenu.js +1 -1
  33. package/dist/components/AppCopyButton.js +1 -1
  34. package/dist/components/AppCountrySelect.js +1 -1
  35. package/dist/components/AppDataTable.js +1 -1
  36. package/dist/components/AppDatePicker.js +1 -1
  37. package/dist/components/AppDateRangePicker.js +1 -1
  38. package/dist/components/AppDescriptions.js +1 -1
  39. package/dist/components/AppDrawer.js +1 -1
  40. package/dist/components/AppDropZone.js +1 -1
  41. package/dist/components/AppDropdown.js +1 -1
  42. package/dist/components/AppDueDate.js +1 -1
  43. package/dist/components/AppEmptyState.js +1 -1
  44. package/dist/components/AppErrorBoundary.js +1 -0
  45. package/dist/components/AppFileAttachment.js +1 -1
  46. package/dist/components/AppFilePicker.js +1 -1
  47. package/dist/components/AppFileTiles.js +1 -1
  48. package/dist/components/AppFilterBar.js +1 -1
  49. package/dist/components/AppFloatingButton.js +1 -0
  50. package/dist/components/AppImagePicker.js +1 -1
  51. package/dist/components/AppInfoTip.js +1 -1
  52. package/dist/components/AppInlineEdit.js +1 -1
  53. package/dist/components/AppInput.js +1 -1
  54. package/dist/components/AppKanban.js +1 -1
  55. package/dist/components/AppKpiTile.js +1 -1
  56. package/dist/components/AppLeadPopup.js +1 -0
  57. package/dist/components/AppLink.js +1 -1
  58. package/dist/components/AppMarkdown.js +1 -1
  59. package/dist/components/AppMentionInput.js +1 -1
  60. package/dist/components/AppMeter.js +1 -1
  61. package/dist/components/AppMetricStrip.js +1 -1
  62. package/dist/components/AppModal.js +1 -1
  63. package/dist/components/AppMultiSelect.js +1 -1
  64. package/dist/components/AppNavList.js +1 -1
  65. package/dist/components/AppNotificationCenter.js +1 -1
  66. package/dist/components/AppNumberInput.js +1 -1
  67. package/dist/components/AppOnboardingChecklist.js +1 -1
  68. package/dist/components/AppOtpInput.js +1 -1
  69. package/dist/components/AppPageHeader.js +1 -1
  70. package/dist/components/AppPhoneNumberInput.js +1 -1
  71. package/dist/components/AppPopover.js +1 -1
  72. package/dist/components/AppProgress.js +1 -1
  73. package/dist/components/AppRadio.js +1 -1
  74. package/dist/components/AppRadioGroup.js +1 -1
  75. package/dist/components/AppRating.js +1 -1
  76. package/dist/components/AppRepeater.js +1 -1
  77. package/dist/components/AppResourceCard.js +1 -1
  78. package/dist/components/AppRichText.js +1 -1
  79. package/dist/components/AppRouteError.js +1 -1
  80. package/dist/components/AppScoreScale.js +1 -1
  81. package/dist/components/AppSearch.js +1 -1
  82. package/dist/components/AppSectionHero.js +1 -1
  83. package/dist/components/AppSectionLeadCapture.js +1 -1
  84. package/dist/components/AppSectionLogos.js +1 -1
  85. package/dist/components/AppSegmented.js +1 -1
  86. package/dist/components/AppSelect.js +1 -1
  87. package/dist/components/AppShell.js +1 -1
  88. package/dist/components/AppSlider.js +1 -1
  89. package/dist/components/AppSortableList.js +1 -1
  90. package/dist/components/AppSparkline.js +1 -1
  91. package/dist/components/AppSplash.js +1 -1
  92. package/dist/components/AppSplitButton.js +1 -1
  93. package/dist/components/AppSplitView.js +1 -1
  94. package/dist/components/AppStatusBadge.js +1 -1
  95. package/dist/components/AppStepper.js +1 -1
  96. package/dist/components/AppSwitch.js +1 -1
  97. package/dist/components/AppTablePagination.js +1 -1
  98. package/dist/components/AppTableToolbar.js +1 -1
  99. package/dist/components/AppTabs.js +1 -1
  100. package/dist/components/AppTagInput.js +1 -1
  101. package/dist/components/AppTextarea.js +1 -1
  102. package/dist/components/AppTimePicker.js +1 -1
  103. package/dist/components/AppTimeline.js +1 -1
  104. package/dist/components/AppToast.js +1 -1
  105. package/dist/components/AppToolbar.js +1 -1
  106. package/dist/components/AppTooltip.js +1 -1
  107. package/dist/components/AppUpdateBar.js +1 -1
  108. package/dist/components/AppWhatsNew.js +1 -1
  109. package/dist/components/AppWizard.js +1 -1
  110. package/dist/components/AppWorkspaceSwitcher.js +1 -1
  111. package/dist/components/iconCatalogNames.g.js +1 -1
  112. package/dist/components/iconGlyphs.g.js +1 -1
  113. package/dist/components/iconVariants.g.js +1 -1
  114. package/dist/components/useWuiControl.js +1 -1
  115. package/dist/guidance.json +273 -47
  116. package/dist/lib/CheckField.js +1 -1
  117. package/dist/lib/DiscardPrompt.js +1 -1
  118. package/dist/lib/FileItemRow.js +1 -1
  119. package/dist/lib/buttonClass.js +1 -0
  120. package/dist/lib/fieldState.js +1 -0
  121. package/dist/lib/fillLabel.js +1 -0
  122. package/dist/lib/labelWithHelp.js +1 -0
  123. package/dist/lib/linkTarget.js +1 -0
  124. package/dist/lib/sectionShell.js +1 -1
  125. package/dist/lib/vocabulary.js +1 -0
  126. package/dist/markdown-core/dist/links.js +1 -1
  127. package/dist/types/components/AppAccountSwitcher.d.ts +41 -0
  128. package/dist/types/components/AppActionIcon.d.ts +3 -12
  129. package/dist/types/components/AppAsyncBlock.d.ts +24 -0
  130. package/dist/types/components/AppAuthLayout.d.ts +45 -0
  131. package/dist/types/components/AppAutocomplete.d.ts +23 -3
  132. package/dist/types/components/AppAvatar.d.ts +6 -0
  133. package/dist/types/components/AppAvatarGroup.d.ts +6 -0
  134. package/dist/types/components/AppBanner.d.ts +8 -2
  135. package/dist/types/components/AppButton.d.ts +9 -4
  136. package/dist/types/components/AppCalendar.d.ts +3 -1
  137. package/dist/types/components/AppCard.d.ts +16 -4
  138. package/dist/types/components/AppCell.d.ts +36 -0
  139. package/dist/types/components/AppChart.d.ts +14 -0
  140. package/dist/types/components/AppChartCard.d.ts +60 -0
  141. package/dist/types/components/AppCheckbox.d.ts +23 -1
  142. package/dist/types/components/AppChoiceCard.d.ts +21 -0
  143. package/dist/types/components/AppChoiceChip.d.ts +21 -0
  144. package/dist/types/components/AppColorField.d.ts +45 -6
  145. package/dist/types/components/AppCommandPalette.d.ts +6 -0
  146. package/dist/types/components/AppCommentThread.d.ts +102 -3
  147. package/dist/types/components/AppCompareTable.d.ts +24 -0
  148. package/dist/types/components/AppConfirmDialog.d.ts +10 -10
  149. package/dist/types/components/AppConfirmProvider.d.ts +5 -6
  150. package/dist/types/components/AppConsentBanner.d.ts +3 -3
  151. package/dist/types/components/AppContextMenu.d.ts +2 -2
  152. package/dist/types/components/AppCopyButton.d.ts +8 -2
  153. package/dist/types/components/AppCountrySelect.d.ts +6 -1
  154. package/dist/types/components/AppDataTable.d.ts +1 -1
  155. package/dist/types/components/AppDatePicker.d.ts +26 -2
  156. package/dist/types/components/AppDateRangePicker.d.ts +32 -2
  157. package/dist/types/components/AppDescriptions.d.ts +4 -1
  158. package/dist/types/components/AppDrawer.d.ts +6 -0
  159. package/dist/types/components/AppDropZone.d.ts +26 -2
  160. package/dist/types/components/AppDropdown.d.ts +7 -7
  161. package/dist/types/components/AppDueDate.d.ts +42 -0
  162. package/dist/types/components/AppEmptyState.d.ts +3 -3
  163. package/dist/types/components/AppErrorBoundary.d.ts +39 -0
  164. package/dist/types/components/AppFileAttachment.d.ts +54 -1
  165. package/dist/types/components/AppFilePicker.d.ts +80 -5
  166. package/dist/types/components/AppFileTiles.d.ts +6 -3
  167. package/dist/types/components/AppFilterBar.d.ts +73 -0
  168. package/dist/types/components/AppFloatingButton.d.ts +70 -0
  169. package/dist/types/components/AppImagePicker.d.ts +64 -4
  170. package/dist/types/components/AppInlineEdit.d.ts +6 -0
  171. package/dist/types/components/AppInput.d.ts +38 -3
  172. package/dist/types/components/AppKanban.d.ts +32 -0
  173. package/dist/types/components/AppLeadPopup.d.ts +122 -0
  174. package/dist/types/components/AppLink.d.ts +3 -0
  175. package/dist/types/components/AppMentionInput.d.ts +18 -1
  176. package/dist/types/components/AppMetricStrip.d.ts +2 -0
  177. package/dist/types/components/AppModal.d.ts +9 -3
  178. package/dist/types/components/AppMultiSelect.d.ts +20 -3
  179. package/dist/types/components/AppNotificationCenter.d.ts +2 -0
  180. package/dist/types/components/AppNumberInput.d.ts +25 -3
  181. package/dist/types/components/AppOnboardingChecklist.d.ts +3 -3
  182. package/dist/types/components/AppOtpInput.d.ts +31 -2
  183. package/dist/types/components/AppPhoneNumberInput.d.ts +25 -1
  184. package/dist/types/components/AppPopover.d.ts +5 -5
  185. package/dist/types/components/AppRadio.d.ts +23 -1
  186. package/dist/types/components/AppRadioGroup.d.ts +26 -2
  187. package/dist/types/components/AppRating.d.ts +42 -3
  188. package/dist/types/components/AppRepeater.d.ts +3 -3
  189. package/dist/types/components/AppResourceCard.d.ts +2 -2
  190. package/dist/types/components/AppRichText.d.ts +10 -3
  191. package/dist/types/components/AppRouteError.d.ts +54 -0
  192. package/dist/types/components/AppScoreScale.d.ts +9 -3
  193. package/dist/types/components/AppSearch.d.ts +17 -2
  194. package/dist/types/components/AppSectionLeadCapture.d.ts +50 -2
  195. package/dist/types/components/AppSectionLogos.d.ts +2 -0
  196. package/dist/types/components/AppSegmented.d.ts +27 -3
  197. package/dist/types/components/AppSelect.d.ts +23 -3
  198. package/dist/types/components/AppShell.d.ts +151 -4
  199. package/dist/types/components/AppSlider.d.ts +29 -1
  200. package/dist/types/components/AppSortableList.d.ts +5 -0
  201. package/dist/types/components/AppSparkline.d.ts +24 -0
  202. package/dist/types/components/AppSplash.d.ts +2 -2
  203. package/dist/types/components/AppSplitButton.d.ts +10 -4
  204. package/dist/types/components/AppSplitView.d.ts +68 -0
  205. package/dist/types/components/AppStepper.d.ts +6 -0
  206. package/dist/types/components/AppSwitch.d.ts +24 -2
  207. package/dist/types/components/AppTablePagination.d.ts +44 -2
  208. package/dist/types/components/AppTableToolbar.d.ts +30 -0
  209. package/dist/types/components/AppTagInput.d.ts +20 -3
  210. package/dist/types/components/AppTextarea.d.ts +21 -1
  211. package/dist/types/components/AppTimePicker.d.ts +19 -2
  212. package/dist/types/components/AppTimeline.d.ts +8 -0
  213. package/dist/types/components/AppToast.d.ts +6 -0
  214. package/dist/types/components/AppToolbar.d.ts +3 -3
  215. package/dist/types/components/AppTooltip.d.ts +7 -4
  216. package/dist/types/components/AppUpdateBar.d.ts +20 -2
  217. package/dist/types/components/AppWhatsNew.d.ts +2 -0
  218. package/dist/types/components/AppWorkspaceSwitcher.d.ts +18 -0
  219. package/dist/types/components/iconGlyphs.g.d.ts +1 -0
  220. package/dist/types/components/iconVariants.g.d.ts +5 -0
  221. package/dist/types/components/useWuiControl.d.ts +3 -1
  222. package/dist/types/index.d.ts +6 -0
  223. package/dist/types/lib/FileItemRow.d.ts +9 -2
  224. package/dist/types/lib/buttonClass.d.ts +9 -0
  225. package/dist/types/lib/fieldState.d.ts +3 -0
  226. package/dist/types/lib/fillLabel.d.ts +1 -0
  227. package/dist/types/lib/labelWithHelp.d.ts +10 -0
  228. package/dist/types/lib/linkTarget.d.ts +30 -0
  229. package/dist/types/lib/sectionShell.d.ts +0 -1
  230. package/dist/types/lib/vocabulary.d.ts +3 -0
  231. package/dist/ui-react.js +1 -1
  232. package/dist/web-core/dist/query/listQuery.js +1 -0
  233. package/package.json +8 -7
@@ -1 +1 @@
1
- import{useCallback as e,useEffect as t,useInsertionEffect as n,useRef as r}from"react";function i({ref:i,value:c,onChange:l,readValue:u,writeValue:d,events:f=a,on:p}={}){let m=r(null),h=u??o,g=d??s,_=(f||a).join(`\0`),v=Object.keys(p??{}).join(`\0`),y=r(null);y.current===null&&(y.current={ref:i,value:c,onChange:l,read:h,write:g,eventKey:_,on:p}),n(()=>{y.current={ref:i,value:c,onChange:l,read:h,write:g,eventKey:_,on:p}});let b=r(null),x=e(()=>{let e=b.current;if(e){for(let t of e.names)e.el.removeEventListener(t,e.handler);for(let t of e.extraNames)e.el.removeEventListener(t,e.extraHandler);b.current=null}},[]),S=e(e=>{let t=y.current.eventKey?y.current.eventKey.split(`\0`):a,n=Object.keys(y.current.on??{}),r={el:e,names:t,extraNames:n,last:void 0};r.handler=()=>{let t=y.current.read(e);Object.is(t,r.last)||(r.last=t,y.current.onChange?.(t))},r.extraHandler=e=>y.current.on?.[e.type]?.(e);for(let n of t)e.addEventListener(n,r.handler);for(let t of n)e.addEventListener(t,r.extraHandler);b.current=r},[]),C=e(e=>{m.current=e;let t=y.current.ref;typeof t==`function`?t(e):t&&(t.current=e),x(),e&&(S(e),y.current.value!==void 0&&y.current.write(e,y.current.value))},[x,S]);return t(()=>{let e=m.current;if(!e||c===void 0)return;g(e,c);let t=b.current;t&&!Object.is(c,t.last)&&(t.last=void 0)},[c,g]),t(()=>{let e=m.current,t=b.current;e&&t&&(t.names.join(`\0`)!==(_||a.join(`\0`))||t.extraNames.join(`\0`)!==v)&&(x(),S(e))},[_,v,x,S]),{setRef:C,innerRef:m}}var a=[`change`];function o(e){return e.value}function s(e,t){let n=t??``;String(e.value??``)!==String(n)&&(e.value=n)}function c(e,t){let n=e||[],r=t||[];return n.length===r.length&&n.every((e,t)=>{let n=r[t];if(e===n)return!0;if(e==null||n==null||typeof e!=`object`||typeof n!=`object`)return Object.is(e,n);let i=Object.keys(e);return i.length===Object.keys(n).length&&i.every(t=>Object.is(e[t],n[t]))})}function l(e){return e.values}function u(e,t){let n=t||[],r=e.values||[];n.length===r.length&&n.every((e,t)=>e===r[t])||(e.values=n)}function d(e){return{start:e.start,end:e.end}}function f(e,t){if(t===void 0)return;let n=Number.parseFloat(t);Number.isFinite(n)&&e.value!==n&&(e.value=n)}export{i as default,c as optionsEqual,d as readRange,l as readValues,f as writeNumberValue,u as writeValues};
1
+ import{useCallback as e,useEffect as t,useInsertionEffect as n,useRef as r}from"react";function i({ref:i,value:c,defaultValue:l,onChange:u,readValue:d,writeValue:f,events:p=a,on:m}={}){let h=r(null),g=d??o,_=f??s,v=(p||a).join(`\0`),y=Object.keys(m??{}).join(`\0`),b=r(null);b.current===null&&(b.current={ref:i,value:c,defaultValue:l,onChange:u,read:g,write:_,eventKey:v,on:m}),n(()=>{b.current={ref:i,value:c,defaultValue:l,onChange:u,read:g,write:_,eventKey:v,on:m}});let x=r(null),S=e(()=>{let e=x.current;if(e){for(let t of e.names)e.el.removeEventListener(t,e.handler);for(let t of e.extraNames)e.el.removeEventListener(t,e.extraHandler);x.current=null}},[]),C=e(e=>{let t=b.current.eventKey?b.current.eventKey.split(`\0`):a,n=Object.keys(b.current.on??{}),r={el:e,names:t,extraNames:n,last:void 0};r.handler=()=>{let t=b.current.read(e);Object.is(t,r.last)||(r.last=t,b.current.onChange?.(t))},r.extraHandler=e=>b.current.on?.[e.type]?.(e);for(let n of t)e.addEventListener(n,r.handler);for(let t of n)e.addEventListener(t,r.extraHandler);x.current=r},[]),w=e(e=>{h.current=e;let t=b.current.ref;typeof t==`function`?t(e):t&&(t.current=e),S(),e&&(C(e),b.current.value===void 0?b.current.defaultValue!==void 0&&b.current.write(e,b.current.defaultValue):b.current.write(e,b.current.value))},[S,C]);return t(()=>{let e=h.current;if(!e||c===void 0)return;_(e,c);let t=x.current;t&&!Object.is(c,t.last)&&(t.last=void 0)},[c,_]),t(()=>{let e=h.current,t=x.current;e&&t&&(t.names.join(`\0`)!==(v||a.join(`\0`))||t.extraNames.join(`\0`)!==y)&&(S(),C(e))},[v,y,S,C]),{setRef:w,innerRef:h}}var a=[`change`];function o(e){return e.value}function s(e,t){let n=t??``;String(e.value??``)!==String(n)&&(e.value=n)}function c(e,t){let n=e||[],r=t||[];return n.length===r.length&&n.every((e,t)=>{let n=r[t];if(e===n)return!0;if(e==null||n==null||typeof e!=`object`||typeof n!=`object`)return Object.is(e,n);let i=Object.keys(e);return i.length===Object.keys(n).length&&i.every(t=>Object.is(e[t],n[t]))})}function l(e){return e.values}function u(e,t){let n=t||[],r=e.values||[];n.length===r.length&&n.every((e,t)=>e===r[t])||(e.values=n)}function d(e){return{start:e.start,end:e.end}}function f(e,t){if(t===void 0)return;let n=Number.parseFloat(t);Number.isFinite(n)&&e.value!==n&&(e.value=n)}export{i as default,c as optionsEqual,d as readRange,l as readValues,f as writeNumberValue,u as writeValues};
@@ -2,7 +2,7 @@
2
2
  "format": "webority-guidance/1",
3
3
  "package": {
4
4
  "name": "@webority/ui-react",
5
- "version": "0.128.0"
5
+ "version": "0.130.0"
6
6
  },
7
7
  "components": [
8
8
  {
@@ -76,6 +76,78 @@
76
76
  ]
77
77
  }
78
78
  },
79
+ {
80
+ "name": "AppAccountSwitcher",
81
+ "usage": {
82
+ "when": [
83
+ "A person signed in to more than one account, company or organisation, and needs to see which one is current.",
84
+ "The switcher sits in the user menu's section slot of AppShell."
85
+ ],
86
+ "whenNot": [
87
+ {
88
+ "text": "You are switching the workspace or tenant in the chrome.",
89
+ "instead": "AppWorkspaceSwitcher"
90
+ },
91
+ {
92
+ "text": "You need a flat list of actions behind a trigger.",
93
+ "instead": "AppDropdown"
94
+ },
95
+ {
96
+ "text": "You are picking a value into a form field.",
97
+ "instead": "AppSelect"
98
+ }
99
+ ],
100
+ "do": [
101
+ {
102
+ "note": "The current account is ticked, and each other account is one row to switch to.",
103
+ "example": [
104
+ {
105
+ "component": "AppAccountSwitcher",
106
+ "props": {
107
+ "accounts": [
108
+ {
109
+ "id": "acme",
110
+ "name": "Acme Corp",
111
+ "description": "Owner"
112
+ },
113
+ {
114
+ "id": "globex",
115
+ "name": "Globex Ltd",
116
+ "badge": "Trial"
117
+ }
118
+ ],
119
+ "currentId": "acme"
120
+ }
121
+ }
122
+ ]
123
+ }
124
+ ],
125
+ "dont": [
126
+ {
127
+ "note": "A list of one account. There is nothing to switch to, so the section does not earn its place.",
128
+ "example": [
129
+ {
130
+ "component": "AppAccountSwitcher",
131
+ "props": {
132
+ "accounts": [
133
+ {
134
+ "id": "acme",
135
+ "name": "Acme Corp"
136
+ }
137
+ ],
138
+ "currentId": "acme"
139
+ }
140
+ }
141
+ ]
142
+ }
143
+ ],
144
+ "a11y": [
145
+ "The list is a group named by label.",
146
+ "The current account carries aria-current and a tick, so the state is not shown by colour alone.",
147
+ "A row with an href is a link; a row without one is a button."
148
+ ]
149
+ }
150
+ },
79
151
  {
80
152
  "name": "AppActionIcon",
81
153
  "usage": {
@@ -165,7 +237,7 @@
165
237
  "props": {
166
238
  "icon": "trash-2",
167
239
  "label": "Delete",
168
- "danger": true
240
+ "tone": "danger"
169
241
  }
170
242
  }
171
243
  ]
@@ -350,6 +422,36 @@
350
422
  ]
351
423
  }
352
424
  },
425
+ {
426
+ "name": "AppAuthLayout",
427
+ "usage": {
428
+ "when": [
429
+ "A sign-in, sign-up, forgot-password or verification page.",
430
+ "Any signed-out page that is one form on its own."
431
+ ],
432
+ "whenNot": [
433
+ {
434
+ "text": "A short outcome after an action (confirmed, not found, no access).",
435
+ "instead": "AppResult"
436
+ },
437
+ {
438
+ "text": "The boot screen while the session loads.",
439
+ "instead": "AppSplash"
440
+ },
441
+ {
442
+ "text": "A form inside a signed-in page.",
443
+ "instead": "AppCard"
444
+ }
445
+ ],
446
+ "do": [],
447
+ "dont": [],
448
+ "a11y": [
449
+ "The layout draws no heading: put the one h1 of the page in the children.",
450
+ "The aside is an aside landmark and is hidden below the lg breakpoint, so nothing in it may be the only way to do something.",
451
+ "The logo is an image the caller labels with alt text; use an empty alt if the heading already names the product."
452
+ ]
453
+ }
454
+ },
353
455
  {
354
456
  "name": "AppAutocomplete",
355
457
  "usage": {
@@ -428,7 +530,7 @@
428
530
  }
429
531
  ],
430
532
  "placeholder": "Type a city…",
431
- "hint": "Client-side filter over a static list."
533
+ "helperText": "Client-side filter over a static list."
432
534
  }
433
535
  }
434
536
  ]
@@ -498,7 +600,7 @@
498
600
  "name": "city-remote",
499
601
  "placeholder": "Type to search…",
500
602
  "minChars": 1,
501
- "hint": "Debounced search with a loading spinner."
603
+ "helperText": "Debounced search with a loading spinner."
502
604
  }
503
605
  }
504
606
  ]
@@ -913,14 +1015,14 @@
913
1015
  {
914
1016
  "component": "AppButton",
915
1017
  "props": {
916
- "variant": "primary"
1018
+ "tone": "primary"
917
1019
  },
918
1020
  "children": "Publish"
919
1021
  },
920
1022
  {
921
1023
  "component": "AppButton",
922
1024
  "props": {
923
- "variant": "secondary"
1025
+ "variant": "soft"
924
1026
  },
925
1027
  "children": "Save draft"
926
1028
  }
@@ -932,7 +1034,7 @@
932
1034
  {
933
1035
  "component": "AppButton",
934
1036
  "props": {
935
- "variant": "danger"
1037
+ "tone": "danger"
936
1038
  },
937
1039
  "children": "Delete project"
938
1040
  }
@@ -964,14 +1066,14 @@
964
1066
  {
965
1067
  "component": "AppButton",
966
1068
  "props": {
967
- "variant": "primary"
1069
+ "tone": "primary"
968
1070
  },
969
1071
  "children": "Publish"
970
1072
  },
971
1073
  {
972
1074
  "component": "AppButton",
973
1075
  "props": {
974
- "variant": "primary"
1076
+ "tone": "primary"
975
1077
  },
976
1078
  "children": "Save draft"
977
1079
  }
@@ -983,7 +1085,7 @@
983
1085
  {
984
1086
  "component": "AppButton",
985
1087
  "props": {
986
- "variant": "primary"
1088
+ "tone": "primary"
987
1089
  },
988
1090
  "children": "Submit"
989
1091
  }
@@ -1251,6 +1353,31 @@
1251
1353
  ]
1252
1354
  }
1253
1355
  },
1356
+ {
1357
+ "name": "AppCell",
1358
+ "usage": {
1359
+ "when": [
1360
+ "A table cell with a main value and a quieter detail line under it.",
1361
+ "A figure column that should right-align with tabular digits."
1362
+ ],
1363
+ "whenNot": [
1364
+ {
1365
+ "text": "A cell that is only one value.",
1366
+ "instead": "Plain cell text"
1367
+ },
1368
+ {
1369
+ "text": "An amount in rupees from paise.",
1370
+ "instead": "formatINR, or app-money in Razor"
1371
+ }
1372
+ ],
1373
+ "do": [],
1374
+ "dont": [],
1375
+ "a11y": [
1376
+ "The link is a real anchor named by the primary text.",
1377
+ "Both lines are plain text and read in order."
1378
+ ]
1379
+ }
1380
+ },
1254
1381
  {
1255
1382
  "name": "AppChart",
1256
1383
  "usage": {
@@ -1935,7 +2062,7 @@
1935
2062
  "props": {
1936
2063
  "label": "Accent colour",
1937
2064
  "value": "#4F46E5",
1938
- "hint": "Used for buttons and links."
2065
+ "helperText": "Used for buttons and links."
1939
2066
  }
1940
2067
  }
1941
2068
  ]
@@ -2241,12 +2368,12 @@
2241
2368
  ],
2242
2369
  "do": [
2243
2370
  {
2244
- "note": "danger + a verb-labelled button (\"Delete\") makes the weight and the outcome of the action clear.",
2371
+ "note": "The danger tone + a verb-labelled button (\"Delete\") makes the weight and the outcome of the action clear.",
2245
2372
  "example": [
2246
2373
  {
2247
2374
  "component": "AppButton",
2248
2375
  "props": {
2249
- "variant": "danger"
2376
+ "tone": "danger"
2250
2377
  },
2251
2378
  "children": "Delete project"
2252
2379
  }
@@ -2258,7 +2385,7 @@
2258
2385
  {
2259
2386
  "component": "AppButton",
2260
2387
  "props": {
2261
- "variant": "danger"
2388
+ "tone": "danger"
2262
2389
  },
2263
2390
  "children": "Delete workspace"
2264
2391
  }
@@ -2271,9 +2398,6 @@
2271
2398
  "example": [
2272
2399
  {
2273
2400
  "component": "AppButton",
2274
- "props": {
2275
- "variant": "primary"
2276
- },
2277
2401
  "children": "OK"
2278
2402
  }
2279
2403
  ]
@@ -2294,7 +2418,7 @@
2294
2418
  "A custom image is hidden from assistive technology with an empty alt, so the title and message carry the meaning.",
2295
2419
  "The confirm-phrase field is named \"Type <phrase> to confirm\", and Confirm stays disabled until the phrase matches.",
2296
2420
  "While loading, Cancel is disabled and the backdrop and Escape no longer close the dialog.",
2297
- "Children draw left-aligned between the message and the confirm-phrase field, so a field placed there keeps its own label."
2421
+ "Children draw left-aligned between the description and the confirm-phrase field, so a field placed there keeps its own label."
2298
2422
  ]
2299
2423
  }
2300
2424
  },
@@ -2320,7 +2444,7 @@
2320
2444
  "do": [],
2321
2445
  "dont": [],
2322
2446
  "a11y": [
2323
- "The panel is a dialog named by its heading.",
2447
+ "The panel is a dialog named by its title.",
2324
2448
  "There is no close button by design, so the only way out is a choice: Accept all, Reject all, or Save preferences in settings mode.",
2325
2449
  "Escape does not dismiss it, for the same reason as the missing close button."
2326
2450
  ]
@@ -2942,7 +3066,7 @@
2942
3066
  "key": "delete",
2943
3067
  "label": "Delete",
2944
3068
  "icon": "trash-2",
2945
- "danger": true
3069
+ "tone": "danger"
2946
3070
  }
2947
3071
  ]
2948
3072
  }
@@ -3118,11 +3242,10 @@
3118
3242
  "props": {
3119
3243
  "icon": "users",
3120
3244
  "title": "No team members yet",
3121
- "text": "Invite a colleague to collaborate on this project.",
3245
+ "description": "Invite a colleague to collaborate on this project.",
3122
3246
  "action": {
3123
3247
  "component": "AppButton",
3124
3248
  "props": {
3125
- "variant": "primary",
3126
3249
  "leftIcon": "plus"
3127
3250
  },
3128
3251
  "children": "Invite member"
@@ -3139,7 +3262,7 @@
3139
3262
  "props": {
3140
3263
  "icon": "search",
3141
3264
  "title": "No results for “risk”",
3142
- "text": "Try a broader keyword or clear the filters."
3265
+ "description": "Try a broader keyword or clear the filters."
3143
3266
  }
3144
3267
  }
3145
3268
  ]
@@ -3166,7 +3289,7 @@
3166
3289
  "props": {
3167
3290
  "icon": "search",
3168
3291
  "title": "No results",
3169
- "text": "No results found. No results found. No results found."
3292
+ "description": "No results found. No results found. No results found."
3170
3293
  }
3171
3294
  }
3172
3295
  ]
@@ -3179,6 +3302,55 @@
3179
3302
  ]
3180
3303
  }
3181
3304
  },
3305
+ {
3306
+ "name": "AppErrorBoundary",
3307
+ "usage": {
3308
+ "when": [
3309
+ "One page or section may throw while the rest of the app still works.",
3310
+ "A failed section should offer Try again without a full page load."
3311
+ ],
3312
+ "whenNot": [
3313
+ {
3314
+ "text": "The root of the app, where a stale build must reload the page once and the error is logged.",
3315
+ "instead": "ErrorBoundary from @webority/web-core"
3316
+ },
3317
+ {
3318
+ "text": "A router errorElement for a failed route or loader.",
3319
+ "instead": "AppRouteError"
3320
+ },
3321
+ {
3322
+ "text": "A section whose data request failed but nothing threw.",
3323
+ "instead": "AppAsyncBlock"
3324
+ }
3325
+ ],
3326
+ "do": [
3327
+ {
3328
+ "note": "Pass resetKeys so moving to another page clears the error.",
3329
+ "example": [
3330
+ {
3331
+ "component": "AppErrorBoundary",
3332
+ "props": {}
3333
+ }
3334
+ ]
3335
+ }
3336
+ ],
3337
+ "dont": [
3338
+ {
3339
+ "note": "Do not print the caught error in the fallback; it can leak internal details.",
3340
+ "example": [
3341
+ {
3342
+ "component": "p",
3343
+ "children": "TypeError: Cannot read properties of undefined (reading 'map')"
3344
+ }
3345
+ ]
3346
+ }
3347
+ ],
3348
+ "a11y": [
3349
+ "The default screen has a real heading and native buttons and a link.",
3350
+ "The caught error is never shown, only a plain sentence."
3351
+ ]
3352
+ }
3353
+ },
3182
3354
  {
3183
3355
  "name": "AppErrorSummary",
3184
3356
  "usage": {
@@ -3459,6 +3631,30 @@
3459
3631
  ]
3460
3632
  }
3461
3633
  },
3634
+ {
3635
+ "name": "AppFloatingButton",
3636
+ "usage": {
3637
+ "when": [
3638
+ "A persistent corner action on a page, such as chat, help or report an issue."
3639
+ ],
3640
+ "whenNot": [
3641
+ {
3642
+ "text": "A toolbar action beside other icon actions.",
3643
+ "instead": "AppActionIcon."
3644
+ },
3645
+ {
3646
+ "text": "A labelled primary action that needs visible text.",
3647
+ "instead": "AppButton."
3648
+ }
3649
+ ],
3650
+ "do": [],
3651
+ "dont": [],
3652
+ "a11y": [
3653
+ "The label is the accessible name and the tooltip.",
3654
+ "aria-haspopup and aria-expanded pass through to the button."
3655
+ ]
3656
+ }
3657
+ },
3462
3658
  {
3463
3659
  "name": "AppFloatingDock",
3464
3660
  "usage": {
@@ -3773,7 +3969,7 @@
3773
3969
  "kind": "avatar",
3774
3970
  "fallback": "NS",
3775
3971
  "label": "Profile photo",
3776
- "hint": "Your face, looking at the camera."
3972
+ "helperText": "Your face, looking at the camera."
3777
3973
  }
3778
3974
  }
3779
3975
  ]
@@ -4225,6 +4421,35 @@
4225
4421
  ]
4226
4422
  }
4227
4423
  },
4424
+ {
4425
+ "name": "AppLeadPopup",
4426
+ "usage": {
4427
+ "when": [
4428
+ "A public page asks a visitor for their details in a modal, opened by an exit, a delay, a scroll or a page count.",
4429
+ "A campaign page needs a short lead form that is not a section of the page."
4430
+ ],
4431
+ "whenNot": [
4432
+ {
4433
+ "text": "The lead form is a section of the page's content.",
4434
+ "instead": "AppSectionLeadCapture"
4435
+ },
4436
+ {
4437
+ "text": "The popup is a yes or no question, not a form.",
4438
+ "instead": "AppConfirmDialog"
4439
+ },
4440
+ {
4441
+ "text": "The page is inside the signed-in app.",
4442
+ "instead": "AppModal"
4443
+ }
4444
+ ],
4445
+ "do": [],
4446
+ "dont": [],
4447
+ "a11y": [
4448
+ "The dialog is modal with a heading as its accessible name; Escape and the close button both dismiss it.",
4449
+ "Each field has a visible label and an error message linked by aria-describedby; the first invalid field takes focus."
4450
+ ]
4451
+ }
4452
+ },
4228
4453
  {
4229
4454
  "name": "AppLightbox",
4230
4455
  "usage": {
@@ -4508,7 +4733,7 @@
4508
4733
  {
4509
4734
  "component": "AppButton",
4510
4735
  "props": {
4511
- "variant": "secondary"
4736
+ "variant": "soft"
4512
4737
  },
4513
4738
  "children": "Cancel"
4514
4739
  },
@@ -4641,7 +4866,7 @@
4641
4866
  "earthing"
4642
4867
  ],
4643
4868
  "placeholder": "Add skills…",
4644
- "hint": "2 selected"
4869
+ "helperText": "2 selected"
4645
4870
  }
4646
4871
  }
4647
4872
  ]
@@ -4910,7 +5135,7 @@
4910
5135
  "a11y": [
4911
5136
  "The steppers are labelled Decrease and Increase and stay out of the tab order; keyboard users step with ArrowUp and ArrowDown on the input.",
4912
5137
  "ArrowUp and ArrowDown step the value by step, within min and max.",
4913
- "aria-invalid is set from error, and aria-describedby points at the error or the hint."
5138
+ "aria-invalid is set from error, and aria-describedby points at the error or the helper text."
4914
5139
  ]
4915
5140
  }
4916
5141
  },
@@ -5037,8 +5262,8 @@
5037
5262
  "One input, with the segment boxes drawn underneath, so a screen reader announces one labelled field instead of six unlabelled boxes.",
5038
5263
  "OS autofill delivers the whole code to the one field, so an SMS code is never split across boxes.",
5039
5264
  "A string label is the accessible name of the control, because a label element cannot point at the custom element.",
5040
- "An error marks the field invalid and is linked to it as the description, which takes precedence over the hint.",
5041
- "A hint is linked to the field as its description when no error is shown."
5265
+ "An error marks the field invalid and is linked to it as the description, which takes precedence over the helper text.",
5266
+ "Helper text is linked to the field as its description when no error is shown."
5042
5267
  ]
5043
5268
  }
5044
5269
  },
@@ -5322,7 +5547,7 @@
5322
5547
  "trigger": {
5323
5548
  "component": "AppButton",
5324
5549
  "props": {
5325
- "variant": "secondary",
5550
+ "variant": "soft",
5326
5551
  "size": "sm"
5327
5552
  },
5328
5553
  "children": "Edit"
@@ -5359,7 +5584,6 @@
5359
5584
  {
5360
5585
  "component": "AppButton",
5361
5586
  "props": {
5362
- "variant": "primary",
5363
5587
  "size": "sm"
5364
5588
  },
5365
5589
  "children": "Save"
@@ -5423,7 +5647,6 @@
5423
5647
  "cta": {
5424
5648
  "component": "AppButton",
5425
5649
  "props": {
5426
- "variant": "primary",
5427
5650
  "block": true
5428
5651
  },
5429
5652
  "children": "Choose Pro"
@@ -5450,7 +5673,6 @@
5450
5673
  "cta": {
5451
5674
  "component": "AppButton",
5452
5675
  "props": {
5453
- "variant": "primary",
5454
5676
  "block": true
5455
5677
  },
5456
5678
  "children": "Click here"
@@ -6131,7 +6353,7 @@
6131
6353
  "props": {
6132
6354
  "icon": "download",
6133
6355
  "title": "Zone survey template",
6134
- "text": "XLSX: fill on site, import here",
6356
+ "description": "XLSX: fill on site, import here",
6135
6357
  "href": "#t"
6136
6358
  }
6137
6359
  }
@@ -6147,7 +6369,7 @@
6147
6369
  "props": {
6148
6370
  "icon": "circle",
6149
6371
  "title": "Click here",
6150
- "text": "Click here to learn more",
6372
+ "description": "Click here to learn more",
6151
6373
  "href": "#t"
6152
6374
  }
6153
6375
  }
@@ -6224,7 +6446,7 @@
6224
6446
  "props": {
6225
6447
  "label": "Terms",
6226
6448
  "name": "terms-good",
6227
- "hint": "Shown on the quote."
6449
+ "helperText": "Shown on the quote."
6228
6450
  }
6229
6451
  }
6230
6452
  ]
@@ -6246,7 +6468,7 @@
6246
6468
  ],
6247
6469
  "a11y": [
6248
6470
  "The editor is a group named by ariaLabel, or by the label when it is a string.",
6249
- "The label is tied to the editor by id. A hint or an error is linked through aria-describedby, and an error also sets aria-invalid.",
6471
+ "The label is tied to the editor by id. Helper text or an error is linked through aria-describedby, and an error also sets aria-invalid.",
6250
6472
  "Required, disabled and read-only are passed to the editor as attributes, and a failed editor load shows a status message."
6251
6473
  ]
6252
6474
  }
@@ -6281,7 +6503,7 @@
6281
6503
  "usage": {
6282
6504
  "when": [
6283
6505
  "A route failed to render, or its loader threw.",
6284
- "The root error boundary caught an error and the whole app needs a fallback screen.",
6506
+ "The root error boundary, or AppErrorBoundary, caught an error and needs a fallback screen.",
6285
6507
  "No route matches the address."
6286
6508
  ],
6287
6509
  "whenNot": [
@@ -6289,6 +6511,10 @@
6289
6511
  "text": "One section of a working page failed to load its data.",
6290
6512
  "instead": "AppAsyncBlock"
6291
6513
  },
6514
+ {
6515
+ "text": "A page or section may throw and should recover in place, without a router or a full reload.",
6516
+ "instead": "AppErrorBoundary"
6517
+ },
6292
6518
  {
6293
6519
  "text": "A finished action needs a success or failure screen.",
6294
6520
  "instead": "AppResult"
@@ -8044,7 +8270,7 @@
8044
8270
  "a11y": [
8045
8271
  "The control is a native checkbox input, so Space toggles it and it posts with a form.",
8046
8272
  "label draws a real label tied to the input by id, using a generated id when none is given.",
8047
- "An error sets aria-invalid to true and is linked to the input with aria-describedby; a hint is linked the same way while no error shows."
8273
+ "An error sets aria-invalid to true and is linked to the input with aria-describedby; helper text is linked the same way while no error shows."
8048
8274
  ]
8049
8275
  }
8050
8276
  },
@@ -8268,7 +8494,7 @@
8268
8494
  "component": "AppButton",
8269
8495
  "props": {
8270
8496
  "size": "sm",
8271
- "variant": "danger",
8497
+ "tone": "danger",
8272
8498
  "leftIcon": "trash-2"
8273
8499
  },
8274
8500
  "children": "Delete"
@@ -8600,13 +8826,13 @@
8600
8826
  ],
8601
8827
  "do": [
8602
8828
  {
8603
- "note": "A hint that names the commit keys (Enter and comma) tells the user how to add a tag without trial and error.",
8829
+ "note": "Helper text that names the commit keys (Enter and comma) tells the user how to add a tag without trial and error.",
8604
8830
  "example": [
8605
8831
  {
8606
8832
  "component": "AppTagInput",
8607
8833
  "props": {
8608
8834
  "label": "Keywords",
8609
- "hint": "Press Enter or comma to add a tag",
8835
+ "helperText": "Press Enter or comma to add a tag",
8610
8836
  "values": [
8611
8837
  "react",
8612
8838
  "javascript"
@@ -8630,7 +8856,7 @@
8630
8856
  ],
8631
8857
  "dont": [
8632
8858
  {
8633
- "note": "No hint at all: a first-time user may not discover that Enter or comma commits a tag.",
8859
+ "note": "No helper text at all: a first-time user may not discover that Enter or comma commits a tag.",
8634
8860
  "example": [
8635
8861
  {
8636
8862
  "component": "AppTagInput",
@@ -8668,7 +8894,7 @@
8668
8894
  ],
8669
8895
  "a11y": [
8670
8896
  "The label is tied to the field with a for and id pair, and a generated id is used when none is given.",
8671
- "An error sets aria-invalid and points aria-describedby at the error text; with no error it points at the hint.",
8897
+ "An error sets aria-invalid and points aria-describedby at the error text; with no error it points at the helper text.",
8672
8898
  "When there is no ariaLabel, a string label becomes the input's accessible name.",
8673
8899
  "The info tip beside the label is named by helpLabel."
8674
8900
  ]
@@ -8705,7 +8931,7 @@
8705
8931
  "props": {
8706
8932
  "label": "Scope of work",
8707
8933
  "name": "scope",
8708
- "hint": "What the assessment covers."
8934
+ "helperText": "What the assessment covers."
8709
8935
  }
8710
8936
  }
8711
8937
  ]
@@ -8840,7 +9066,7 @@
8840
9066
  "dont": [],
8841
9067
  "a11y": [
8842
9068
  "The trigger is named by ariaLabel, or by a text label when there is none.",
8843
- "An error sets aria-invalid and points aria-describedby at the error text, or at the hint when there is no error.",
9069
+ "An error sets aria-invalid and points aria-describedby at the error text, or at the helper text when there is no error.",
8844
9070
  "The field carries the required attribute as well as the visible required mark.",
8845
9071
  "The info tip beside the label is named by helpLabel."
8846
9072
  ]
@@ -1 +1 @@
1
- import e from"./FieldMessage.js";import{forwardRef as t,useId as n}from"react";import{jsx as r,jsxs as i}from"react/jsx-runtime";var a=t(function({label:t,id:a,name:o,error:s,hint:c,className:l=``,rest:u={},inputType:d,wrapperClass:f,rootProps:p},m){let h=n(),g=a||h,_=s?`${g}-error`:void 0,v=c?`${g}-hint`:void 0;return/* @__PURE__ */ i(`div`,{className:`${f}${l?` ${l}`:``}`,...p,children:[/* @__PURE__ */ r(`input`,{type:d,className:`form-check-input`,id:g,name:o,ref:m,"aria-invalid":s?`true`:`false`,"aria-describedby":_||v,...u}),t!=null&&/* @__PURE__ */ r(`label`,{className:`form-check-label`,htmlFor:g,children:t}),/* @__PURE__ */ r(e,{error:s,hint:c,errorId:_,hintId:v})]})});export{a as default};
1
+ import e from"./FieldMessage.js";import{FIELD_BUSY_CLASS as t}from"./fieldState.js";import{forwardRef as n,useId as r}from"react";import{jsx as i,jsxs as a}from"react/jsx-runtime";var o=()=>{},s=n(function({label:n,id:s,name:c,error:l,hint:u,className:d=``,rest:f={},inputType:p,wrapperClass:m,rootProps:h,readOnly:g=!1,loading:_=!1,size:v=`md`},y){let b=r(),x=s||b,S=l?`${x}-error`:void 0,C=u?`${x}-hint`:void 0,w=v===`sm`?` form-check-sm`:v===`lg`?` form-check-lg`:``,{onClick:T,...E}=f;return(g||_)&&E.checked!==void 0&&E.onChange===void 0&&(E.onChange=o),/* @__PURE__ */ a(`div`,{className:`${m}${w}${d?` ${d}`:``}`,...h,children:[/* @__PURE__ */ i(`input`,{type:p,className:_?`form-check-input ${t}`:`form-check-input`,id:x,name:c,ref:y,"aria-invalid":l?`true`:`false`,"aria-describedby":S||C,"aria-readonly":g||void 0,"aria-busy":_||void 0,onClick:e=>{g||_?e.preventDefault():T?.(e)},...E}),n!=null&&/* @__PURE__ */ i(`label`,{className:`form-check-label`,htmlFor:x,children:n}),/* @__PURE__ */ i(e,{error:l,hint:u,errorId:S,hintId:C})]})});export{s as default};