@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
@@ -4,12 +4,23 @@ declare const AppDateRangePicker: import("react").ForwardRefExoticComponent<{
4
4
  start?: string;
5
5
  /** Range end as an ISO date string (YYYY-MM-DD). */
6
6
  end?: string;
7
+ /** The starting start date of an uncontrolled field. */
8
+ defaultStart?: string;
9
+ /** The starting end date of an uncontrolled field. */
10
+ defaultEnd?: string;
7
11
  onChange?: (range: {
8
12
  start: string;
9
13
  end: string;
10
14
  }) => void;
11
15
  /** The field label, shown above the control and used as its accessible name. */
12
16
  label?: string;
17
+ /** The content of the info-tip beside the label, opened by a button. */
18
+ help?: import('react').ReactNode;
19
+ /**
20
+ * The accessible name of the info-tip button.
21
+ * @default "More information"
22
+ */
23
+ helpLabel?: string;
13
24
  /**
14
25
  * Marks the field required, with the required mark on the label.
15
26
  * @default false
@@ -20,8 +31,13 @@ declare const AppDateRangePicker: import("react").ForwardRefExoticComponent<{
20
31
  * @default false
21
32
  */
22
33
  optional?: boolean;
34
+ /**
35
+ * Replaces the built-in English text, for other languages.
36
+ * @default "(optional)"
37
+ */
38
+ optionalLabel?: string;
23
39
  /** Help text shown under the control. */
24
- hint?: string;
40
+ helperText?: string;
25
41
  /** An error message shown under the control. */
26
42
  error?: string;
27
43
  /** Form field name the start date posts under. */
@@ -39,11 +55,25 @@ declare const AppDateRangePicker: import("react").ForwardRefExoticComponent<{
39
55
  placeholder?: string;
40
56
  /** Disables the control. */
41
57
  disabled?: boolean;
58
+ /**
59
+ * Shows the value but blocks editing. The value still posts.
60
+ * @default false
61
+ */
62
+ readOnly?: boolean;
63
+ /**
64
+ * Shows a busy state and blocks input while data loads.
65
+ * @default false
66
+ */
67
+ loading?: boolean;
42
68
  /** Control height tier, matching AppInput. */
43
69
  size?: 'sm' | 'md' | 'lg';
44
70
  /** First weekday of the calendar, 0 Sunday to 6 Saturday. Unset, it follows the theme's --wui-first-day token, which is 1 (Monday) unless the product sets it. */
45
71
  firstDay?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
46
- /** Quick ranges, listed beside the calendar (above it on a phone); picking one fills the range and closes the calendar. An item is a name (today, yesterday, last7Days, last30Days, thisMonth, lastMonth or thisFinancialYear, resolved against today in IST) or { label, start, end } with ISO dates. */
72
+ /** IANA time zone the quick ranges are resolved in, for example Asia/Kolkata or America/New_York. Unset, it is India Standard Time (Asia/Kolkata). */
73
+ timeZone?: string;
74
+ /** The month number, 1 to 12, the financial year starts in; it sets the thisFinancialYear quick range. Unset, it is 4 (April). */
75
+ financialYearStart?: number;
76
+ /** Quick ranges, listed beside the calendar (above it on a phone); picking one fills the range and closes the calendar. An item is a name (today, yesterday, last7Days, last30Days, thisMonth, lastMonth or thisFinancialYear, resolved against today in the time zone (IST unless timeZone is set)) or { label, start, end } with ISO dates. */
47
77
  presets?: (('today' | 'yesterday' | 'last7Days' | 'last30Days' | 'thisMonth' | 'lastMonth' | 'thisFinancialYear') | {
48
78
  label: string;
49
79
  start: string;
@@ -7,12 +7,13 @@
7
7
  * render as a muted hyphen so a missing fact reads as "no value", not a broken row.
8
8
  *
9
9
  * @param {object} props
10
- * @param {{ label: string, value: import('react').ReactNode, span?: number, key?: string, emphasis?: boolean, icon?: string|import('react').ReactNode, href?: string }[]} props.items
10
+ * @param {{ label: string, value: import('react').ReactNode, span?: number, key?: string, emphasis?: boolean, multiline?: boolean, icon?: string|import('react').ReactNode, href?: string }[]} props.items
11
11
  * @param {1|2|3|4} [props.columns] Validated; default 2.
12
12
  * @param {"sm"|"md"} [props.size]
13
13
  * @param {boolean} [props.bordered]
14
14
  * @param {"grid"|"summary"|"list"} [props.layout] "list": one column, a rule between rows, flush first and last row, 36px icon tile, value on one line with an ellipsis.
15
15
  * @param {import('react').ReactNode} [props.title]
16
+ * @param {import('react').ElementType} [props.linkComponent] Router link (e.g. react-router Link) for in-app destinations; it receives `to` instead of `href`. Absolute, `#` and scheme hrefs stay plain anchors. Keeps the library router-agnostic.
16
17
  * @param {string} [props.className]
17
18
  */
18
19
  export default function AppDescriptions(props: {
@@ -23,6 +24,7 @@ export default function AppDescriptions(props: {
23
24
  span?: number;
24
25
  key?: string;
25
26
  emphasis?: boolean;
27
+ multiline?: boolean;
26
28
  icon?: string | import('react').ReactNode;
27
29
  href?: string;
28
30
  }[];
@@ -48,6 +50,7 @@ export default function AppDescriptions(props: {
48
50
  layout?: "grid" | "summary" | "list";
49
51
  /** Optional heading above the grid. */
50
52
  title?: import('react').ReactNode;
53
+ linkComponent?: import('react').ElementType;
51
54
  /**
52
55
  * Extra classes on the grid container.
53
56
  * @default ""
@@ -30,6 +30,7 @@ import "@webority/ui-elements/elements/drawer";
30
30
  * @param {() => void} [props.onClosed] After the close transition.
31
31
  * @param {boolean} [props.dismissible]
32
32
  * @param {string} [props.closeLabel] Default "Close".
33
+ * @param {string} [props.sheetHeightLabel] Default "Sheet height".
33
34
  * @param {boolean} [props.staticBackdrop]
34
35
  * @param {string} [props.confirmDiscard]
35
36
  * @param {boolean} [props.dirty]
@@ -99,6 +100,11 @@ export default function AppDrawer(props: {
99
100
  * @default "Close"
100
101
  */
101
102
  closeLabel?: string;
103
+ /**
104
+ * The sheet handle's accessible name, for other languages.
105
+ * @default "Sheet height"
106
+ */
107
+ sheetHeightLabel?: string;
102
108
  /**
103
109
  * The backdrop, Escape and a drag down no longer close it; only the close button or open can.
104
110
  * @default false
@@ -13,11 +13,15 @@
13
13
  * @param {string} [props.accept]
14
14
  * @param {number} [props.maxSizeMb]
15
15
  * @param {string} [props.error]
16
- * @param {string} [props.hint]
16
+ * @param {string} [props.helperText]
17
17
  * @param {boolean} [props.disabled]
18
18
  * @param {string} [props.className]
19
19
  * @param {string} [props.fieldClassName]
20
20
  * @param {object} [props.style] Inline style; lands on the control with `className`.
21
+ * @param {string} [props.browseLabel] Default "Click to upload".
22
+ * @param {string} [props.dropLabel] Default "or drag & drop".
23
+ * @param {string} [props.anyTypeText] Default "Any file type".
24
+ * @param {string} [props.maxSizeText] The size cap in the hint; `{size}` is the limit in MB. Default "up to {size} MB".
21
25
  */
22
26
  export default function AppDropZone(props: {
23
27
  onChange: (file: File | File[]) => void;
@@ -40,7 +44,7 @@ export default function AppDropZone(props: {
40
44
  /** Message below the zone; also styles the zone as errored. */
41
45
  error?: string;
42
46
  /** Helper text below the zone; an error, the caller's or a rejected pick's, replaces it while it shows. */
43
- hint?: string;
47
+ helperText?: string;
44
48
  /**
45
49
  * Blocks click and drop.
46
50
  * @default false
@@ -57,4 +61,24 @@ export default function AppDropZone(props: {
57
61
  */
58
62
  fieldClassName?: string;
59
63
  style?: object;
64
+ /**
65
+ * Replaces the built-in English text, for other languages.
66
+ * @default "Click to upload"
67
+ */
68
+ browseLabel?: string;
69
+ /**
70
+ * Replaces the built-in English text, for other languages.
71
+ * @default "or drag & drop"
72
+ */
73
+ dropLabel?: string;
74
+ /**
75
+ * Replaces the built-in English text, for other languages.
76
+ * @default "Any file type"
77
+ */
78
+ anyTypeText?: string;
79
+ /**
80
+ * The size cap in the hint; {size} is the limit in MB. Replaces the built-in English text, for other languages.
81
+ * @default "up to {size} MB"
82
+ */
83
+ maxSizeText?: string;
60
84
  }): import("react").JSX.Element;
@@ -19,7 +19,7 @@
19
19
  * @param {string} [props.label]
20
20
  * @param {"start"|"end"} [props.align]
21
21
  * @param {string} [props.ariaLabel]
22
- * @param {{ key: string, label?: string, icon?: string|import('react').ReactNode, image?: string, to?: string, onClick?: () => void, danger?: boolean, disabled?: boolean, disabledReason?: string, shortcut?: string, divider?: boolean, header?: string, hiddenFrom?: 'sm'|'md'|'lg'|'xl' }[]} [props.items]
22
+ * @param {{ key: string, label?: string, icon?: string|import('react').ReactNode, image?: string, to?: string, onClick?: () => void, tone?: 'danger', disabled?: boolean, disabledReason?: string, shortcut?: string, divider?: boolean, header?: string, hiddenFrom?: 'sm'|'md'|'lg'|'xl' }[]} [props.items]
23
23
  * @param {string} [props.menuClassName]
24
24
  * @param {import('react').ElementType} [props.linkComponent] Component for `to` items (e.g. Link).
25
25
  * @param {import('react').ReactNode} [props.children] Rich menu content — renders inside the
@@ -28,8 +28,8 @@
28
28
  * wins when both are given. The icon toggle and react-bootstrap's open/close, outside-click,
29
29
  * focus and Escape behavior are unchanged either way.
30
30
  * @param {import('react').ReactNode} [props.trigger]
31
- * @param {boolean} [props.show]
32
- * @param {(nextShow: boolean, meta: { source?: string, originalEvent?: Event }) => void} [props.onToggle]
31
+ * @param {boolean} [props.open]
32
+ * @param {(open: boolean, meta: { source?: string, originalEvent?: Event }) => void} [props.onOpenChange]
33
33
  * Called whenever the menu asks to open or close: a toggle click, an outside click, Escape, an item
34
34
  * pick (react-bootstrap's `source`), and the close on a scroll that moves the toggle or a window
35
35
  * resize (`source` "scroll" or "resize"). Fires in both modes.
@@ -65,7 +65,7 @@ export default function AppDropdown(props: {
65
65
  image?: string;
66
66
  to?: string;
67
67
  onClick?: () => void;
68
- danger?: boolean;
68
+ tone?: 'danger';
69
69
  disabled?: boolean;
70
70
  disabledReason?: string;
71
71
  shortcut?: string;
@@ -82,9 +82,9 @@ export default function AppDropdown(props: {
82
82
  children?: import('react').ReactNode;
83
83
  /** A custom trigger drawn inside the toggle button instead of the icon, such as an account chip or a labelled sort button. It wins over icon. The button keeps its open state, keyboard behavior and accessible role. */
84
84
  trigger?: import('react').ReactNode;
85
- /** Controlled open state. Leave it out and the menu manages its own; set it and the caller owns it, updating it from the toggle handler. */
86
- show?: boolean;
87
- onToggle?: (nextShow: boolean, meta: {
85
+ /** Controlled open state. Leave it out and the menu manages its own; set it and the caller owns it, updating it from onOpenChange. */
86
+ open?: boolean;
87
+ onOpenChange?: (open: boolean, meta: {
88
88
  source?: string;
89
89
  originalEvent?: Event;
90
90
  }) => void;
@@ -12,6 +12,13 @@
12
12
  * @param {boolean} [props.icon] Draws the calendar glyph before the date text.
13
13
  * @param {boolean} [props.overdue]
14
14
  * @param {string} [props.overdueLabel]
15
+ * @param {string} [props.notSetLabel] Default "Not set".
16
+ * @param {string} [props.dueTodayLabel] Default "Due today".
17
+ * @param {string} [props.dueTomorrowLabel] Default "Due tomorrow".
18
+ * @param {string} [props.dueInLabel] Default "Due in {days} days". Token: {days}.
19
+ * @param {string} [props.daysLeftLabel] Default "{days} days left". Token: {days}.
20
+ * @param {string} [props.oneDayLeftLabel] Default "1 day left".
21
+ * @param {string} [props.overdueSinceLabel] Default "Overdue since {date}". Token: {date}.
15
22
  * @param {string} [props.className]
16
23
  */
17
24
  export default function AppDueDate(props: {
@@ -36,6 +43,41 @@ export default function AppDueDate(props: {
36
43
  overdue?: boolean;
37
44
  /** Replaces the date text when overdue, for example "Validity ended". */
38
45
  overdueLabel?: string;
46
+ /**
47
+ * Replaces the built-in English text, for other languages.
48
+ * @default "Not set"
49
+ */
50
+ notSetLabel?: string;
51
+ /**
52
+ * Replaces the built-in English text, for other languages.
53
+ * @default "Due today"
54
+ */
55
+ dueTodayLabel?: string;
56
+ /**
57
+ * Replaces the built-in English text, for other languages.
58
+ * @default "Due tomorrow"
59
+ */
60
+ dueTomorrowLabel?: string;
61
+ /**
62
+ * Replaces the built-in English text, for other languages. The token {days} is the number of days left.
63
+ * @default "Due in {days} days"
64
+ */
65
+ dueInLabel?: string;
66
+ /**
67
+ * Replaces the built-in English text, for other languages. The token {days} is the number of days left.
68
+ * @default "{days} days left"
69
+ */
70
+ daysLeftLabel?: string;
71
+ /**
72
+ * Replaces the built-in English text, for other languages.
73
+ * @default "1 day left"
74
+ */
75
+ oneDayLeftLabel?: string;
76
+ /**
77
+ * Replaces the built-in English text, for other languages. The token {date} is the formatted due date.
78
+ * @default "Overdue since {date}"
79
+ */
80
+ overdueSinceLabel?: string;
39
81
  /**
40
82
  * Extra class on the due date element.
41
83
  * @default ""
@@ -8,7 +8,7 @@
8
8
  * look has no tighter scale, so `size="sm"` with `variant="table"` warns in dev.
9
9
  *
10
10
  * `size` picks the type scale: "md" (default) is the page/card empty state; "sm" is
11
- * the tighter widget/tile variant (smaller title + text).
11
+ * the tighter widget/tile variant (smaller title + description).
12
12
  *
13
13
  * @param {object} props
14
14
  * @param {string|import('react').ReactNode} [props.icon]
@@ -17,7 +17,7 @@
17
17
  * @param {"md"|"sm"} [props.size]
18
18
  * @param {"card"|"table"} [props.variant]
19
19
  * @param {import('react').ReactNode} props.title
20
- * @param {import('react').ReactNode} [props.text]
20
+ * @param {import('react').ReactNode} [props.description]
21
21
  * @param {import('react').ReactNode} [props.action]
22
22
  * @param {string} [props.className]
23
23
  * @param {import('react').CSSProperties} [props.style]
@@ -45,7 +45,7 @@ export default function AppEmptyState(props: {
45
45
  /** The headline of the empty state. */
46
46
  title: import('react').ReactNode;
47
47
  /** Body text under the title. */
48
- text?: import('react').ReactNode;
48
+ description?: import('react').ReactNode;
49
49
  /** The next step shown below the text, usually an AppButton. */
50
50
  action?: import('react').ReactNode;
51
51
  /**
@@ -0,0 +1,39 @@
1
+ /**
2
+ * A resettable error boundary for a page or a section of one. It catches a render error below it
3
+ * and shows a fallback, and clears itself when `resetKeys` change. It renders no element of its
4
+ * own. The app's root boundary is `ErrorBoundary` from `@webority/web-core`.
5
+ *
6
+ * The default fallback is `AppRouteError`, with "Try again" (re-renders the children), "Reload the
7
+ * page" and the home link. The error is passed to `onError` for the logs and is never shown.
8
+ *
9
+ * @param {object} props
10
+ * @param {import('react').ReactNode} [props.children]
11
+ * @param {((info: { error: unknown, reset: () => void }) => import('react').ReactNode) | import('react').ReactNode} [props.fallback]
12
+ * A function receives `{ error, reset }`; a node renders as it is. Default: the `AppRouteError` screen.
13
+ * @param {(error: unknown, info: { componentStack: string }) => void} [props.onError] Where the caller logs the error.
14
+ * @param {unknown[]} [props.resetKeys] The boundary resets when any item changes by `Object.is`.
15
+ * @param {() => void} [props.onReset] Called by `reset` before the children render again.
16
+ * @param {string} [props.homeHref] Home link of the default fallback. Default: "/".
17
+ * @param {import('react').ReactNode} [props.brand] Forwarded to the default fallback.
18
+ */
19
+ export default function AppErrorBoundary({ children, fallback, onError, resetKeys, onReset, homeHref, brand }: {
20
+ children?: import('react').ReactNode;
21
+ /** What to show after an error. A function receives { error, reset }. Default: the AppRouteError screen with Try again, Reload the page and a home link. */
22
+ fallback?: ((info: {
23
+ error: unknown;
24
+ reset: () => void;
25
+ }) => import('react').ReactNode) | import('react').ReactNode;
26
+ onError?: (error: unknown, info: {
27
+ componentStack: string;
28
+ }) => void;
29
+ /** The boundary clears itself when any item changes, such as the route path. */
30
+ resetKeys?: unknown[];
31
+ onReset?: () => void;
32
+ /**
33
+ * Where "Go to the home page" leads in the default screen.
34
+ * @default "/"
35
+ */
36
+ homeHref?: string;
37
+ /** Shown above the default screen. */
38
+ brand?: import('react').ReactNode;
39
+ }): import("react").JSX.Element;
@@ -1,11 +1,14 @@
1
1
  export type AttachmentFile = {
2
2
  name: string;
3
3
  url?: string;
4
+ to?: string;
4
5
  sizeBytes?: number;
5
6
  progress?: number;
6
7
  error?: string;
7
8
  };
8
- /** @typedef {{ name: string, url?: string, sizeBytes?: number, progress?: number, error?: string }} AttachmentFile */
9
+ /** @typedef {{ name: string, url?: string, to?: string, sizeBytes?: number, progress?: number, error?: string }} AttachmentFile
10
+ * `to` is an in-app route for the file viewer page, routed through linkComponent; url stays a plain link.
11
+ */
9
12
  /**
10
13
  * Compact attachment field — a browse row that swaps to a preview (image thumbnail or a
11
14
  * file-type icon) plus filename/size once a file is chosen (× to remove). Self-manages the
@@ -30,6 +33,15 @@ export type AttachmentFile = {
30
33
  * @param {boolean} [props.validate]
31
34
  * @param {string} [props.error]
32
35
  * @param {string} [props.id]
36
+ * @param {import('react').ElementType} [props.linkComponent] Router link (e.g. react-router Link) for in-app destinations; it receives `to` instead of `href`. Absolute, `#` and scheme hrefs stay plain anchors. Keeps the library router-agnostic.
37
+ * @param {string} [props.browseLabel] Default "Browse".
38
+ * @param {string} [props.removeLabel] Default "Remove attachment".
39
+ * @param {string} [props.uploadingLabel] Default "Uploading {name}".
40
+ * @param {string} [props.maxSizeText] Default "Up to {size} MB".
41
+ * @param {string} [props.typesAndMaxSizeText] Default "{types}, up to {size} MB". The limits line when both a type list and a size limit exist.
42
+ * @param {string} [props.removeFileLabel] Default "Remove {name}". The remove button's accessible name on a file row.
43
+ * @param {string} [props.optionalLabel] Default "(optional)".
44
+ * @param {string} [props.dropTitle] Replaces the drop row's title. Default: "Add a file", "Add an image", "Add files" or "Add images", chosen from accept and multiple.
33
45
  */
34
46
  export default function AppFileAttachment(props: {
35
47
  /**
@@ -65,4 +77,45 @@ export default function AppFileAttachment(props: {
65
77
  error?: string;
66
78
  /** DOM id of the file input; the label and the drop row point at it. Pass one when rows share a name. */
67
79
  id?: string;
80
+ linkComponent?: import('react').ElementType;
81
+ /**
82
+ * Replaces the built-in English text, for other languages.
83
+ * @default "Browse"
84
+ */
85
+ browseLabel?: string;
86
+ /**
87
+ * Replaces the built-in English text, for other languages.
88
+ * @default "Remove attachment"
89
+ */
90
+ removeLabel?: string;
91
+ /**
92
+ * Replaces the built-in English text, for other languages. Token: {name}, the file name.
93
+ * @default "Uploading {name}"
94
+ */
95
+ uploadingLabel?: string;
96
+ /**
97
+ * Replaces the built-in English text, for other languages. Token: {size}, the size limit in megabytes.
98
+ * @default "Up to {size} MB"
99
+ */
100
+ maxSizeText?: string;
101
+ /**
102
+ * Replaces the built-in English text, for other languages. Tokens: {types}, the accepted types, and {size}, the size limit in megabytes.
103
+ * @default "{types}, up to {size} MB"
104
+ */
105
+ typesAndMaxSizeText?: string;
106
+ /**
107
+ * Replaces the built-in English text, for other languages. Token: {name}, the file name.
108
+ * @default "Remove {name}"
109
+ */
110
+ removeFileLabel?: string;
111
+ /**
112
+ * Replaces the built-in English text, for other languages.
113
+ * @default "(optional)"
114
+ */
115
+ optionalLabel?: string;
116
+ /**
117
+ * Replaces the drop row's title, for other languages. Default text depends on accept and multiple.
118
+ * @default "Add a file, Add an image, Add files or Add images, chosen from accept and multiple"
119
+ */
120
+ dropTitle?: string;
68
121
  }): import("react").JSX.Element;
@@ -3,7 +3,7 @@
3
3
  * file is chosen (hover to change, × to remove). With `multiple`, the dropzone stays put and
4
4
  * picked files stack in a list inside it, below the prompt (image thumbnail or file-type icon +
5
5
  * name/size, each removable). Accepts freshly-picked Files or existing `{ url, name }` values; reports the
6
- * choice via onPick — a File|null in single mode, a File[] in multiple mode.
6
+ * choice via onChange: a File|null in single mode, a File[] in multiple mode.
7
7
  *
8
8
  * Not just images: widen `accept` (e.g. "image/*,application/pdf") and non-image files show a
9
9
  * file-type icon instead of a thumbnail. A single PDF shows its first page instead, drawn by the
@@ -14,18 +14,31 @@
14
14
  * @param {File|{ url: string, name?: string }|Array<File|{ url: string, name?: string }>|null} [props.value]
15
15
  * @param {string} [props.name]
16
16
  * @param {string} [props.id]
17
- * @param {(file: File|null) => void | (files: File[]) => void} props.onPick single → File|null; multiple → File[]
17
+ * @param {(file: File|null) => void | (files: File[]) => void} props.onChange single → File|null; multiple → File[]
18
18
  * @param {boolean} [props.multiple]
19
19
  * @param {"dropzone" | "button"} [props.variant] dropzone (default) | button: a small outline button that opens the file dialog; no previews.
20
20
  * @param {string} [props.buttonLabel] The button form's text.
21
+ * @param {string} [props.browseLabel] Replaces the built-in English text, for other languages. Default "Click to upload".
22
+ * @param {string} [props.dropLabel] Replaces the built-in English text, for other languages. Default "or drag & drop"; follows the browse text in the dropzone.
23
+ * @param {string} [props.maxSizeText] Replaces the built-in English text, for other languages. Default "up to {size} MB", where {size} is the limit in MB; follows the accepted types in the hint.
24
+ * @param {string} [props.optionalLabel] Replaces the built-in English text, for other languages. Default "(optional)".
25
+ * @param {string} [props.changeImageLabel] Replaces the built-in English text, for other languages. Default "Change image".
26
+ * @param {string} [props.changeFileLabel] Replaces the built-in English text, for other languages. Default "Change file".
27
+ * @param {string} [props.maxFilesText] Replaces the built-in English text, for other languages. Default "Up to {count} files.", where {count} is the cap.
28
+ * @param {string} [props.removeFileLabel] Replaces the built-in English text, for other languages. Default "Remove {name}", where {name} is the file name; the label of a file's remove button in multiple mode.
21
29
  * @param {number} [props.maxFiles]
22
30
  * @param {string} [props.accept]
23
31
  * @param {number} [props.maxSizeMb]
24
32
  * @param {boolean} [props.required]
25
33
  * @param {boolean} [props.optional] Ends the label with "(optional)". Required wins when both are set.
26
34
  * @param {string} [props.error]
27
- * @param {string} [props.hint]
35
+ * @param {string} [props.helperText]
28
36
  * @param {boolean} [props.loading]
37
+ * @param {boolean} [props.readOnly] Shows the value but blocks picking, dropping, changing and removing. The control takes aria-readonly.
38
+ * @param {"sm"|"md"|"lg"} [props.size] The control height: sm, md or lg.
39
+ * @param {boolean} [props.disabled] Locks the picker and keeps it out of the form post.
40
+ * @param {import('react').ReactNode} [props.help] The content of the info-tip beside the label.
41
+ * @param {string} [props.helpLabel] The accessible name of the info-tip button.
29
42
  * @param {string} [props.className]
30
43
  * @param {string} [props.fieldClassName]
31
44
  * @param {object} [props.style] Inline style; lands on the control with `className`.
@@ -45,7 +58,7 @@ export default function AppFilePicker(props: {
45
58
  name?: string;
46
59
  /** DOM id for the file input and its labels' for target. */
47
60
  id?: string;
48
- onPick: (file: File | null) => void | ((files: File[]) => void);
61
+ onChange: (file: File | null) => void | ((files: File[]) => void);
49
62
  /**
50
63
  * Lets the person pick several files. They stack in a list inside the dropzone.
51
64
  * @default false
@@ -61,6 +74,46 @@ export default function AppFilePicker(props: {
61
74
  * @default "Add file"
62
75
  */
63
76
  buttonLabel?: string;
77
+ /**
78
+ * Replaces the built-in English text, for other languages.
79
+ * @default "Click to upload"
80
+ */
81
+ browseLabel?: string;
82
+ /**
83
+ * Follows the browse text in the dropzone. Replaces the built-in English text, for other languages.
84
+ * @default "or drag & drop"
85
+ */
86
+ dropLabel?: string;
87
+ /**
88
+ * The size cap in the hint; {size} is the limit in MB. Replaces the built-in English text, for other languages.
89
+ * @default "up to {size} MB"
90
+ */
91
+ maxSizeText?: string;
92
+ /**
93
+ * Replaces the built-in English text, for other languages.
94
+ * @default "(optional)"
95
+ */
96
+ optionalLabel?: string;
97
+ /**
98
+ * Replaces the built-in English text, for other languages.
99
+ * @default "Change image"
100
+ */
101
+ changeImageLabel?: string;
102
+ /**
103
+ * Replaces the built-in English text, for other languages.
104
+ * @default "Change file"
105
+ */
106
+ changeFileLabel?: string;
107
+ /**
108
+ * Replaces the built-in English text, for other languages. {count} is replaced with the cap.
109
+ * @default "Up to {count} files."
110
+ */
111
+ maxFilesText?: string;
112
+ /**
113
+ * Replaces the built-in English text, for other languages. Token: {name}, the file name.
114
+ * @default "Remove {name}"
115
+ */
116
+ removeFileLabel?: string;
64
117
  /** Cap on total files in multiple mode. */
65
118
  maxFiles?: number;
66
119
  /**
@@ -80,12 +133,34 @@ export default function AppFilePicker(props: {
80
133
  /** A message from the page, shown below the control. */
81
134
  error?: string;
82
135
  /** Helper text below the control. An error (the page's or a rejected pick's) replaces it while it shows. */
83
- hint?: string;
136
+ helperText?: string;
84
137
  /**
85
138
  * Spinner over the control and picking blocked, for example while the chosen file uploads.
86
139
  * @default false
87
140
  */
88
141
  loading?: boolean;
142
+ /**
143
+ * Shows the value but blocks picking, dropping, changing and removing.
144
+ * @default false
145
+ */
146
+ readOnly?: boolean;
147
+ /**
148
+ * The control height: sm, md or lg.
149
+ * @default "md"
150
+ */
151
+ size?: "sm" | "md" | "lg";
152
+ /**
153
+ * Locks the picker and keeps it out of the form post.
154
+ * @default false
155
+ */
156
+ disabled?: boolean;
157
+ /** The content of the info-tip beside the label, opened by a button. */
158
+ help?: import('react').ReactNode;
159
+ /**
160
+ * The accessible name of the info-tip button.
161
+ * @default "More information"
162
+ */
163
+ helpLabel?: string;
89
164
  /**
90
165
  * Class to apply to the control element: the preview or dropzone shell.
91
166
  * @default ""
@@ -1,27 +1,30 @@
1
1
  /**
2
2
  * A read-only grid of files: a type tile, the name, then the size and a meta line. A file with an
3
- * `href` is a link to it.
3
+ * `href` is a link to it; a file with `to` is an in-app link, routed through `linkComponent`.
4
4
  *
5
5
  * @param {object} props
6
6
  * @param {string} props.label Accessible name of the list.
7
- * @param {{ key: string|number, name: string, href?: string, sizeBytes?: number,
7
+ * @param {{ key: string|number, name: string, href?: string, to?: string, sizeBytes?: number,
8
8
  * meta?: import('react').ReactNode }[]} [props.files]
9
+ * @param {import('react').ElementType} [props.linkComponent] Router link (e.g. react-router Link) for in-app destinations; it receives `to` instead of `href`. Absolute, `#` and scheme hrefs stay plain anchors. Keeps the library router-agnostic.
9
10
  * @param {string} [props.className]
10
11
  */
11
12
  export default function AppFileTiles(props: {
12
13
  /** Accessible name of the list. */
13
14
  label: string;
14
15
  /**
15
- * The files, each { key, name, href, sizeBytes, meta }. name's extension makes the type tile; href makes the tile a link; sizeBytes is the size in bytes; meta is text after the size.
16
+ * The files, each { key, name, href, to, sizeBytes, meta }. name's extension makes the type tile; href makes the tile a link; to is an in-app route, through linkComponent when one is given, otherwise a plain link; sizeBytes is the size in bytes; meta is text after the size.
16
17
  * @default []
17
18
  */
18
19
  files?: {
19
20
  key: string | number;
20
21
  name: string;
21
22
  href?: string;
23
+ to?: string;
22
24
  sizeBytes?: number;
23
25
  meta?: import('react').ReactNode;
24
26
  }[];
27
+ linkComponent?: import('react').ElementType;
25
28
  /**
26
29
  * Extra class names added to the list.
27
30
  * @default ""