@webority/ui-react 0.127.0 → 0.129.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 (186) hide show
  1. package/dist/canvas-kit/kit.js +28735 -24316
  2. package/dist/canvas-kit/manifest.json +3223 -163
  3. package/dist/canvas-kit/release.json +6 -6
  4. package/dist/components/AppAccountSwitcher.js +1 -0
  5. package/dist/components/AppAsyncBlock.js +1 -1
  6. package/dist/components/AppAuthLayout.js +1 -0
  7. package/dist/components/AppAutocomplete.js +1 -1
  8. package/dist/components/AppAvatar.js +1 -1
  9. package/dist/components/AppAvatarGroup.js +1 -1
  10. package/dist/components/AppBanner.js +1 -1
  11. package/dist/components/AppButton.js +1 -1
  12. package/dist/components/AppCalendar.js +1 -1
  13. package/dist/components/AppCard.js +1 -1
  14. package/dist/components/AppCell.js +1 -0
  15. package/dist/components/AppChart.js +1 -1
  16. package/dist/components/AppChartCard.js +1 -1
  17. package/dist/components/AppCheckbox.js +1 -1
  18. package/dist/components/AppChoiceCard.js +1 -1
  19. package/dist/components/AppChoiceChip.js +1 -1
  20. package/dist/components/AppColorField.js +1 -1
  21. package/dist/components/AppCommandPalette.js +1 -1
  22. package/dist/components/AppCommentThread.js +1 -1
  23. package/dist/components/AppCompareTable.js +1 -1
  24. package/dist/components/AppConfirmDialog.js +1 -1
  25. package/dist/components/AppCopyButton.js +1 -1
  26. package/dist/components/AppCountrySelect.js +1 -1
  27. package/dist/components/AppDataTable.js +1 -1
  28. package/dist/components/AppDatePicker.js +1 -1
  29. package/dist/components/AppDateRangePicker.js +1 -1
  30. package/dist/components/AppDescriptions.js +1 -1
  31. package/dist/components/AppDrawer.js +1 -1
  32. package/dist/components/AppDropZone.js +1 -1
  33. package/dist/components/AppDueDate.js +1 -1
  34. package/dist/components/AppErrorBoundary.js +1 -0
  35. package/dist/components/AppFileAttachment.js +1 -1
  36. package/dist/components/AppFilePicker.js +1 -1
  37. package/dist/components/AppFileTiles.js +1 -1
  38. package/dist/components/AppFilterBar.js +1 -1
  39. package/dist/components/AppFloatingButton.js +1 -0
  40. package/dist/components/AppImagePicker.js +1 -1
  41. package/dist/components/AppInlineEdit.js +1 -1
  42. package/dist/components/AppInput.js +1 -1
  43. package/dist/components/AppKanban.js +1 -1
  44. package/dist/components/AppLeadPopup.js +1 -0
  45. package/dist/components/AppLink.js +1 -1
  46. package/dist/components/AppMarkdown.js +1 -1
  47. package/dist/components/AppMentionInput.js +1 -1
  48. package/dist/components/AppMetricStrip.js +1 -1
  49. package/dist/components/AppModal.js +1 -1
  50. package/dist/components/AppMultiSelect.js +1 -1
  51. package/dist/components/AppNotificationCenter.js +1 -1
  52. package/dist/components/AppNumberInput.js +1 -1
  53. package/dist/components/AppOtpInput.js +1 -1
  54. package/dist/components/AppPhoneNumberInput.js +1 -1
  55. package/dist/components/AppPopover.js +1 -1
  56. package/dist/components/AppProgress.js +1 -1
  57. package/dist/components/AppRadio.js +1 -1
  58. package/dist/components/AppRadioGroup.js +1 -1
  59. package/dist/components/AppRating.js +1 -1
  60. package/dist/components/AppRichText.js +1 -1
  61. package/dist/components/AppRouteError.js +1 -1
  62. package/dist/components/AppScoreScale.js +1 -1
  63. package/dist/components/AppSearch.js +1 -1
  64. package/dist/components/AppSectionLeadCapture.js +1 -1
  65. package/dist/components/AppSectionLogos.js +1 -1
  66. package/dist/components/AppSegmented.js +1 -1
  67. package/dist/components/AppSelect.js +1 -1
  68. package/dist/components/AppShell.js +1 -1
  69. package/dist/components/AppSlider.js +1 -1
  70. package/dist/components/AppSortableList.js +1 -1
  71. package/dist/components/AppSparkline.js +1 -1
  72. package/dist/components/AppSplitButton.js +1 -1
  73. package/dist/components/AppSplitView.js +1 -1
  74. package/dist/components/AppStepper.js +1 -1
  75. package/dist/components/AppSwitch.js +1 -1
  76. package/dist/components/AppTablePagination.js +1 -1
  77. package/dist/components/AppTableToolbar.js +1 -1
  78. package/dist/components/AppTagInput.js +1 -1
  79. package/dist/components/AppTextarea.js +1 -1
  80. package/dist/components/AppTimePicker.js +1 -1
  81. package/dist/components/AppTimeline.js +1 -1
  82. package/dist/components/AppToast.js +1 -1
  83. package/dist/components/AppUpdateBar.js +1 -1
  84. package/dist/components/AppWhatsNew.js +1 -1
  85. package/dist/components/AppWorkspaceSwitcher.js +1 -1
  86. package/dist/components/iconCatalogNames.g.js +1 -1
  87. package/dist/components/iconGlyphs.g.js +1 -1
  88. package/dist/components/iconVariants.g.js +1 -1
  89. package/dist/components/useWuiControl.js +1 -1
  90. package/dist/guidance.json +235 -2
  91. package/dist/lib/CheckField.js +1 -1
  92. package/dist/lib/FileItemRow.js +1 -1
  93. package/dist/lib/fieldState.js +1 -0
  94. package/dist/lib/fillLabel.js +1 -0
  95. package/dist/lib/labelWithHelp.js +1 -0
  96. package/dist/lib/linkTarget.js +1 -0
  97. package/dist/markdown-core/dist/links.js +1 -1
  98. package/dist/types/components/AppAccountSwitcher.d.ts +41 -0
  99. package/dist/types/components/AppAsyncBlock.d.ts +24 -0
  100. package/dist/types/components/AppAuthLayout.d.ts +45 -0
  101. package/dist/types/components/AppAutocomplete.d.ts +22 -2
  102. package/dist/types/components/AppAvatar.d.ts +6 -0
  103. package/dist/types/components/AppAvatarGroup.d.ts +6 -0
  104. package/dist/types/components/AppBanner.d.ts +6 -0
  105. package/dist/types/components/AppButton.d.ts +1 -0
  106. package/dist/types/components/AppCalendar.d.ts +3 -1
  107. package/dist/types/components/AppCard.d.ts +13 -1
  108. package/dist/types/components/AppCell.d.ts +36 -0
  109. package/dist/types/components/AppChart.d.ts +7 -0
  110. package/dist/types/components/AppChartCard.d.ts +60 -0
  111. package/dist/types/components/AppCheckbox.d.ts +22 -0
  112. package/dist/types/components/AppChoiceCard.d.ts +21 -0
  113. package/dist/types/components/AppChoiceChip.d.ts +21 -0
  114. package/dist/types/components/AppColorField.d.ts +43 -4
  115. package/dist/types/components/AppCommandPalette.d.ts +6 -0
  116. package/dist/types/components/AppCommentThread.d.ts +102 -3
  117. package/dist/types/components/AppCompareTable.d.ts +24 -0
  118. package/dist/types/components/AppConfirmDialog.d.ts +6 -0
  119. package/dist/types/components/AppCountrySelect.d.ts +5 -0
  120. package/dist/types/components/AppDataTable.d.ts +1 -1
  121. package/dist/types/components/AppDatePicker.d.ts +24 -0
  122. package/dist/types/components/AppDateRangePicker.d.ts +31 -1
  123. package/dist/types/components/AppDescriptions.d.ts +4 -1
  124. package/dist/types/components/AppDrawer.d.ts +6 -0
  125. package/dist/types/components/AppDropZone.d.ts +24 -0
  126. package/dist/types/components/AppDueDate.d.ts +42 -0
  127. package/dist/types/components/AppErrorBoundary.d.ts +39 -0
  128. package/dist/types/components/AppFileAttachment.d.ts +54 -1
  129. package/dist/types/components/AppFilePicker.d.ts +75 -0
  130. package/dist/types/components/AppFileTiles.d.ts +6 -3
  131. package/dist/types/components/AppFilterBar.d.ts +73 -0
  132. package/dist/types/components/AppFloatingButton.d.ts +64 -0
  133. package/dist/types/components/AppImagePicker.d.ts +60 -0
  134. package/dist/types/components/AppInlineEdit.d.ts +6 -0
  135. package/dist/types/components/AppInput.d.ts +37 -2
  136. package/dist/types/components/AppKanban.d.ts +32 -0
  137. package/dist/types/components/AppLeadPopup.d.ts +122 -0
  138. package/dist/types/components/AppLink.d.ts +3 -0
  139. package/dist/types/components/AppMentionInput.d.ts +17 -0
  140. package/dist/types/components/AppMetricStrip.d.ts +2 -0
  141. package/dist/types/components/AppModal.d.ts +6 -0
  142. package/dist/types/components/AppMultiSelect.d.ts +18 -1
  143. package/dist/types/components/AppNotificationCenter.d.ts +2 -0
  144. package/dist/types/components/AppNumberInput.d.ts +24 -2
  145. package/dist/types/components/AppOtpInput.d.ts +29 -0
  146. package/dist/types/components/AppPhoneNumberInput.d.ts +26 -0
  147. package/dist/types/components/AppProgress.d.ts +2 -2
  148. package/dist/types/components/AppRadio.d.ts +22 -0
  149. package/dist/types/components/AppRadioGroup.d.ts +24 -0
  150. package/dist/types/components/AppRating.d.ts +39 -0
  151. package/dist/types/components/AppRichText.d.ts +7 -0
  152. package/dist/types/components/AppRouteError.d.ts +54 -0
  153. package/dist/types/components/AppScoreScale.d.ts +6 -0
  154. package/dist/types/components/AppSearch.d.ts +17 -2
  155. package/dist/types/components/AppSectionLeadCapture.d.ts +48 -0
  156. package/dist/types/components/AppSectionLogos.d.ts +2 -0
  157. package/dist/types/components/AppSegmented.d.ts +27 -3
  158. package/dist/types/components/AppSelect.d.ts +22 -2
  159. package/dist/types/components/AppShell.d.ts +165 -0
  160. package/dist/types/components/AppSlider.d.ts +28 -0
  161. package/dist/types/components/AppSortableList.d.ts +5 -0
  162. package/dist/types/components/AppSparkline.d.ts +24 -0
  163. package/dist/types/components/AppSplitView.d.ts +68 -0
  164. package/dist/types/components/AppStepper.d.ts +6 -0
  165. package/dist/types/components/AppSwitch.d.ts +22 -0
  166. package/dist/types/components/AppTablePagination.d.ts +44 -2
  167. package/dist/types/components/AppTableToolbar.d.ts +30 -0
  168. package/dist/types/components/AppTagInput.d.ts +18 -1
  169. package/dist/types/components/AppTextarea.d.ts +20 -0
  170. package/dist/types/components/AppTimePicker.d.ts +17 -0
  171. package/dist/types/components/AppTimeline.d.ts +8 -0
  172. package/dist/types/components/AppToast.d.ts +6 -0
  173. package/dist/types/components/AppUpdateBar.d.ts +18 -0
  174. package/dist/types/components/AppWhatsNew.d.ts +2 -0
  175. package/dist/types/components/AppWorkspaceSwitcher.d.ts +18 -0
  176. package/dist/types/components/iconGlyphs.g.d.ts +1 -0
  177. package/dist/types/components/iconVariants.g.d.ts +5 -0
  178. package/dist/types/components/useWuiControl.d.ts +3 -1
  179. package/dist/types/index.d.ts +6 -0
  180. package/dist/types/lib/FileItemRow.d.ts +9 -2
  181. package/dist/types/lib/fieldState.d.ts +3 -0
  182. package/dist/types/lib/fillLabel.d.ts +1 -0
  183. package/dist/types/lib/labelWithHelp.d.ts +10 -0
  184. package/dist/types/lib/linkTarget.d.ts +30 -0
  185. package/dist/ui-react.js +1 -1
  186. package/package.json +8 -8
@@ -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,6 +31,11 @@ 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
40
  hint?: string;
25
41
  /** An error message shown under the control. */
@@ -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
@@ -18,6 +18,10 @@
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;
@@ -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;
@@ -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 ""
@@ -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;
@@ -18,6 +18,14 @@
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]
@@ -26,6 +34,11 @@
26
34
  * @param {string} [props.error]
27
35
  * @param {string} [props.hint]
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`.
@@ -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
  /**
@@ -86,6 +139,28 @@ export default function AppFilePicker(props: {
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 ""
@@ -19,6 +19,7 @@ import "@webority/ui-elements/elements/filter-popover";
19
19
  * never wrap.
20
20
  *
21
21
  * With `apply`, a search box or date range waits for Apply, or Enter in a search box, before it calls `onChange`; other choices still apply as they change.
22
+ * With `size` "md", every control and button in the bar draws at the 36px field height; the default "sm" is the compact toolbar height.
22
23
  *
23
24
  * @param {object} props
24
25
  * @param {{ key: string, label: string, type: 'enum'|'multiEnum'|'dateRange'|'text',
@@ -29,7 +30,19 @@ import "@webority/ui-elements/elements/filter-popover";
29
30
  * @param {number} [props.inline]
30
31
  * @param {boolean} [props.floating]
31
32
  * @param {boolean} [props.apply]
33
+ * @param {"sm"|"md"} [props.size]
32
34
  * @param {string} [props.className]
35
+ * @param {string} [props.clearAllLabel] Default "Clear all".
36
+ * @param {string} [props.filtersLabel] Default "Filters".
37
+ * @param {string} [props.filtersActiveLabel] Default "Filters, {count} active". Names the Filters button while filters are active; {count} is the active count.
38
+ * @param {string} [props.keepOpenLabel] Default "Keep open".
39
+ * @param {string} [props.appliesAtOnceText] Default "Changes apply at once.".
40
+ * @param {string} [props.applyLabel] Default "Apply".
41
+ * @param {string} [props.anyLabel] Default "Any".
42
+ * @param {string} [props.removeChipLabel] Default "Remove {facet} filter {value}". Names a chip's remove button; {facet} is the facet label, {value} the chip text.
43
+ * @param {string} [props.dateFromText] Default "From {date}". A date range chip with only a start date.
44
+ * @param {string} [props.dateUntilText] Default "Until {date}". A date range chip with only an end date.
45
+ * @param {string} [props.dateRangeText] Default "{from} to {to}". A date range chip with both dates.
33
46
  */
34
47
  export default function AppFilterBar(props: {
35
48
  /** The facets to draw, one filter control each. A facet with no options draws nothing. */
@@ -69,9 +82,69 @@ export default function AppFilterBar(props: {
69
82
  * @default false
70
83
  */
71
84
  apply?: boolean;
85
+ /**
86
+ * Control height. md draws every control and button at the 36px field height; sm is the compact toolbar height.
87
+ * @default "sm"
88
+ */
89
+ size?: "sm" | "md";
72
90
  /**
73
91
  * Extra classes on the filter bar.
74
92
  * @default ""
75
93
  */
76
94
  className?: string;
95
+ /**
96
+ * Replaces the built-in English text, for other languages.
97
+ * @default "Clear all"
98
+ */
99
+ clearAllLabel?: string;
100
+ /**
101
+ * Replaces the built-in English text, for other languages.
102
+ * @default "Filters"
103
+ */
104
+ filtersLabel?: string;
105
+ /**
106
+ * Replaces the built-in English text, for other languages. {count} is the number of active filters.
107
+ * @default "Filters, {count} active"
108
+ */
109
+ filtersActiveLabel?: string;
110
+ /**
111
+ * Replaces the built-in English text, for other languages.
112
+ * @default "Keep open"
113
+ */
114
+ keepOpenLabel?: string;
115
+ /**
116
+ * Replaces the built-in English text, for other languages.
117
+ * @default "Changes apply at once."
118
+ */
119
+ appliesAtOnceText?: string;
120
+ /**
121
+ * Replaces the built-in English text, for other languages.
122
+ * @default "Apply"
123
+ */
124
+ applyLabel?: string;
125
+ /**
126
+ * Replaces the built-in English text, for other languages.
127
+ * @default "Any"
128
+ */
129
+ anyLabel?: string;
130
+ /**
131
+ * Replaces the built-in English text, for other languages. {facet} is the facet label and {value} the chip text.
132
+ * @default "Remove {facet} filter {value}"
133
+ */
134
+ removeChipLabel?: string;
135
+ /**
136
+ * Replaces the built-in English text, for other languages. {date} is the start date of a date range chip.
137
+ * @default "From {date}"
138
+ */
139
+ dateFromText?: string;
140
+ /**
141
+ * Replaces the built-in English text, for other languages. {date} is the end date of a date range chip.
142
+ * @default "Until {date}"
143
+ */
144
+ dateUntilText?: string;
145
+ /**
146
+ * Replaces the built-in English text, for other languages. {from} and {to} are the start and end dates of a date range chip.
147
+ * @default "{from} to {to}"
148
+ */
149
+ dateRangeText?: string;
77
150
  }): import("react").JSX.Element;
@@ -0,0 +1,64 @@
1
+ /**
2
+ * An icon-only circle that sits in the shared floating stack in a bottom corner. The label is
3
+ * the tooltip and the accessible name, and the button shows no text, so the label is required.
4
+ *
5
+ * When stacked, `className` and `style` land on the stack item; when not stacked, they land on
6
+ * the button, because the caller places it.
7
+ *
8
+ * @param {object} props
9
+ * @param {string|import('react').ReactNode} props.icon AppIcon name or a node. Required.
10
+ * @param {string} props.label Accessible name and tooltip. Required.
11
+ * @param {() => void} [props.onClick]
12
+ * @param {"end"|"start"} [props.position="end"] Bottom corner of the stack.
13
+ * @param {"primary"|"secondary"} [props.order="primary"] Slot in the stack: primary sits in the corner, secondary stacks above it.
14
+ * @param {"sm"|"md"|"lg"} [props.size="md"] 40px, 48px, 56px circle.
15
+ * @param {"primary"|"secondary"|"outline"|"ghost"|"text"|"danger"|"success"|"secondary-danger"|"outline-danger"|"light"|"warning"|"neutral"|"outline-light"|"outline-secondary"} [props.variant="primary"]
16
+ * Any AppButton variant.
17
+ * @param {boolean} [props.stacked=true] false renders the bare button with no portal and no stack item (caller places it).
18
+ * @param {boolean} [props.disabled=false]
19
+ * @param {string} [props.className]
20
+ * @param {import('react').CSSProperties} [props.style]
21
+ */
22
+ export default function AppFloatingButton(props: {
23
+ /** AppIcon name, or a node. */
24
+ icon: string | import('react').ReactNode;
25
+ /** Accessible name and tooltip; the button shows no text. */
26
+ label: string;
27
+ onClick?: () => void;
28
+ /**
29
+ * Bottom corner of the stack.
30
+ * @default "end"
31
+ */
32
+ position?: "end" | "start";
33
+ /**
34
+ * Slot in the stack: primary sits in the corner, secondary stacks above it.
35
+ * @default "primary"
36
+ */
37
+ order?: "primary" | "secondary";
38
+ /**
39
+ * Circle size: 40px, 48px or 56px.
40
+ * @default "md"
41
+ */
42
+ size?: "sm" | "md" | "lg";
43
+ /**
44
+ * Button variant.
45
+ * @default "primary"
46
+ */
47
+ variant?: "primary" | "secondary" | "outline" | "ghost" | "text" | "danger" | "success" | "secondary-danger" | "outline-danger" | "light" | "warning" | "neutral" | "outline-light" | "outline-secondary";
48
+ /**
49
+ * False renders the bare button with no stack item; the caller places it.
50
+ * @default true
51
+ */
52
+ stacked?: boolean;
53
+ /**
54
+ * Disables the button.
55
+ * @default false
56
+ */
57
+ disabled?: boolean;
58
+ /**
59
+ * Custom className; on the stack item when stacked, on the button when not.
60
+ * @default ""
61
+ */
62
+ className?: string;
63
+ style?: import('react').CSSProperties;
64
+ }): any;