@pushwoosh/dumb-components 1.1.148 → 1.1.150

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 (323) hide show
  1. package/AccessForbidden/AccessForbidden.d.ts +3 -0
  2. package/AccessForbidden/AccessForbidden.js +3 -0
  3. package/Alert/Alert.d.ts +7 -0
  4. package/Alert/Alert.js +7 -0
  5. package/Alert/types.d.ts +6 -0
  6. package/ApplicationPreloader/ApplicationPreloader.d.ts +8 -0
  7. package/ApplicationPreloader/ApplicationPreloader.js +6 -0
  8. package/Badge/Badge.d.ts +6 -0
  9. package/Badge/Badge.js +6 -0
  10. package/Badge/types.d.ts +6 -0
  11. package/Banner/Banner.d.ts +7 -0
  12. package/Banner/Banner.js +7 -0
  13. package/Banner/types.d.ts +16 -0
  14. package/Button/Button.d.ts +19 -0
  15. package/Button/GhostButton.d.ts +1 -0
  16. package/Button/GhostButton.js +1 -0
  17. package/Button/RemoveButton.d.ts +6 -0
  18. package/Button/RemoveButton.js +6 -0
  19. package/Button/types.d.ts +21 -0
  20. package/Calendar/CalendarDropdown/CalendarDropdown.d.ts +12 -0
  21. package/Calendar/CalendarDropdown/CalendarDropdown.js +12 -0
  22. package/Calendar/CalendarDropdown/helpers.d.ts +4 -0
  23. package/Calendar/CalendarDropdown/helpers.js +4 -0
  24. package/Calendar/CalendarDropdown/types.d.ts +33 -0
  25. package/Calendar/CalendarSuperForm/CalendarSuperForm.d.ts +7 -0
  26. package/Calendar/CalendarSuperForm/CalendarSuperForm.js +7 -0
  27. package/Calendar/CalendarSuperForm/types.d.ts +36 -10
  28. package/Calendar/helpers.d.ts +10 -0
  29. package/Calendar/helpers.js +10 -0
  30. package/Calendar/types.d.ts +16 -1
  31. package/CardMetric/CardMetric.d.ts +7 -0
  32. package/CardMetric/CardMetric.js +7 -0
  33. package/CardMetric/types.d.ts +13 -0
  34. package/Checkbox/Checkbox.d.ts +6 -0
  35. package/Checkbox/Checkbox.js +6 -0
  36. package/Checkbox/types.d.ts +13 -0
  37. package/Chip/Chip.d.ts +7 -0
  38. package/Chip/Chip.js +7 -0
  39. package/Chip/Chip.types.d.ts +9 -0
  40. package/CodeEditor/CodeEditor.d.ts +7 -0
  41. package/CodeEditor/CodeEditor.js +7 -0
  42. package/CodeEditor/languages/html.d.ts +1 -0
  43. package/CodeEditor/languages/html.js +1 -0
  44. package/CodeEditor/languages/json.d.ts +1 -0
  45. package/CodeEditor/languages/json.js +1 -0
  46. package/CodeEditor/languages/liquid.d.ts +1 -0
  47. package/CodeEditor/languages/liquid.js +1 -0
  48. package/CodeEditor/types.d.ts +11 -0
  49. package/CrashScreen/CrashScreen.d.ts +4 -0
  50. package/CrashScreen/CrashScreen.js +4 -0
  51. package/DateTimePicker/components/DatePicker/DatePicker.d.ts +5 -0
  52. package/DateTimePicker/components/DatePicker/DatePicker.js +5 -0
  53. package/DateTimePicker/components/DatePicker/types.d.ts +9 -0
  54. package/DateTimePicker/components/DatePickerField/DatePickerField.d.ts +5 -0
  55. package/DateTimePicker/components/DatePickerField/DatePickerField.js +5 -0
  56. package/DateTimePicker/components/DatePickerField/types.d.ts +9 -0
  57. package/DateTimePicker/components/DateTimePicker/DateTimePicker.d.ts +5 -0
  58. package/DateTimePicker/components/DateTimePicker/DateTimePicker.js +5 -0
  59. package/DateTimePicker/components/DateTimePicker/types.d.ts +6 -0
  60. package/DateTimePicker/components/DateTimePickerField/DateTimePickerField.d.ts +5 -0
  61. package/DateTimePicker/components/DateTimePickerField/DateTimePickerField.js +5 -0
  62. package/DateTimePicker/components/DateTimePickerField/types.d.ts +9 -0
  63. package/DateTimePicker/types.d.ts +5 -0
  64. package/Drawer/components/Drawer/Drawer.d.ts +11 -0
  65. package/Drawer/components/Drawer/Drawer.js +12 -1
  66. package/Drawer/components/Drawer/types.d.ts +10 -1
  67. package/Drawer/components/DrawerContent/styles.d.ts +3 -0
  68. package/Drawer/components/DrawerContent/styles.js +3 -0
  69. package/Drawer/components/DrawerDocs/DrawerDocs.d.ts +7 -0
  70. package/Drawer/components/DrawerDocs/DrawerDocs.js +7 -0
  71. package/Drawer/components/DrawerDocs/hooks.d.ts +4 -0
  72. package/Drawer/components/DrawerDocs/hooks.js +4 -0
  73. package/Drawer/components/DrawerDocs/types.d.ts +4 -0
  74. package/DropdownMenu/components/DropdownMenu/DropdownMenu.d.ts +12 -0
  75. package/DropdownMenu/components/DropdownMenu/DropdownMenu.js +12 -0
  76. package/DropdownMenu/components/DropdownMenu/types.d.ts +15 -0
  77. package/DropdownMenu/components/DropdownMenuButton/DropdownMenuButton.d.ts +8 -0
  78. package/DropdownMenu/components/DropdownMenuButton/DropdownMenuButton.js +8 -0
  79. package/DropdownMenu/components/DropdownMenuButton/types.d.ts +16 -0
  80. package/DropdownMenu/components/DropdownMenuItem/DropdownMenuItem.d.ts +7 -0
  81. package/DropdownMenu/components/DropdownMenuItem/DropdownMenuItem.js +7 -0
  82. package/DropdownMenu/components/DropdownMenuItem/types.d.ts +6 -0
  83. package/DropdownMenu/components/DropdownMenuSection/DropdownMenuSection.d.ts +8 -0
  84. package/DropdownMenu/components/DropdownMenuSection/DropdownMenuSection.js +8 -0
  85. package/DropdownMenu/components/DropdownMenuSection/types.d.ts +3 -0
  86. package/DropdownMenu/components/DropdownMenuSubmenu/DropdownMenuSubmenu.d.ts +9 -0
  87. package/DropdownMenu/components/DropdownMenuSubmenu/DropdownMenuSubmenu.js +9 -0
  88. package/DropdownMenu/components/DropdownMenuSubmenu/types.d.ts +5 -0
  89. package/EditableField/EditableField.d.ts +9 -0
  90. package/EditableField/EditableField.js +9 -0
  91. package/EditableField/types.d.ts +12 -0
  92. package/EmailTemplatePreview/EmailTemplatePreview.d.ts +7 -0
  93. package/EmailTemplatePreview/EmailTemplatePreview.js +7 -0
  94. package/EmailTemplatePreview/components/NoEmailTemplatePreview/NoEmailTemplatePreview.d.ts +4 -0
  95. package/EmailTemplatePreview/components/NoEmailTemplatePreview/NoEmailTemplatePreview.js +4 -0
  96. package/EmailTemplatePreview/helpers.d.ts +8 -0
  97. package/EmailTemplatePreview/helpers.js +8 -0
  98. package/EmailTemplatePreview/types.d.ts +7 -0
  99. package/EnhancedInput/EnhancedInput.d.ts +7 -0
  100. package/EnhancedInput/EnhancedInput.js +7 -0
  101. package/EnhancedInput/SearchInput.d.ts +6 -0
  102. package/EnhancedInput/SearchInput.js +6 -0
  103. package/EnhancedInput/types.d.ts +5 -0
  104. package/ExportResult/ExportResult.d.ts +7 -0
  105. package/ExportResult/ExportResult.js +7 -0
  106. package/ExportResult/types.d.ts +7 -0
  107. package/ExternalImagePreview/ExternalImagePreview.d.ts +7 -0
  108. package/ExternalImagePreview/ExternalImagePreview.js +7 -0
  109. package/ExternalImagePreview/types.d.ts +7 -0
  110. package/FieldBox/FieldBox.d.ts +9 -0
  111. package/FieldBox/FieldBox.js +9 -0
  112. package/FieldBox/types.d.ts +10 -0
  113. package/FrequencyCapping/FrequencyCappingEdit.d.ts +7 -0
  114. package/FrequencyCapping/FrequencyCappingEdit.js +7 -0
  115. package/FrequencyCapping/FrequencyCappingInApps.d.ts +7 -0
  116. package/FrequencyCapping/FrequencyCappingInApps.js +7 -0
  117. package/FrequencyCapping/FrequencyCappingReadonly.d.ts +3 -0
  118. package/FrequencyCapping/FrequencyCappingReadonly.js +3 -0
  119. package/FrequencyCapping/types.d.ts +37 -0
  120. package/FrequencyCapping/types.js +1 -0
  121. package/GetStartedPage/GetStartedPage.d.ts +7 -0
  122. package/GetStartedPage/GetStartedPage.js +7 -0
  123. package/GetStartedPage/types.d.ts +7 -0
  124. package/InputFile/InputFile.d.ts +7 -0
  125. package/InputFile/InputFile.js +7 -0
  126. package/InputFile/types.d.ts +18 -0
  127. package/Link/Link.d.ts +18 -0
  128. package/Link/types.d.ts +17 -0
  129. package/Modal/components/Modal/Modal.d.ts +11 -0
  130. package/Modal/components/Modal/Modal.js +11 -0
  131. package/Modal/components/Modal/types.d.ts +6 -0
  132. package/Modal/components/ModalConfirm/ModalConfirm.d.ts +8 -0
  133. package/Modal/components/ModalConfirm/ModalConfirm.js +8 -0
  134. package/Modal/components/ModalConfirm/ModalConfirmProvider.d.ts +7 -0
  135. package/Modal/components/ModalConfirm/ModalConfirmProvider.js +7 -0
  136. package/Modal/components/ModalConfirm/hooks.d.ts +8 -0
  137. package/Modal/components/ModalConfirm/hooks.js +8 -0
  138. package/Modal/components/ModalConfirm/types.d.ts +16 -0
  139. package/Modal/components/ModalContent/styles.d.ts +5 -0
  140. package/Modal/components/ModalContent/styles.js +5 -0
  141. package/Modal/components/ModalTitle/ModalTitle.d.ts +6 -0
  142. package/Modal/components/ModalTitle/ModalTitle.js +6 -0
  143. package/Modal/components/ModalTitle/types.d.ts +3 -0
  144. package/NotificationInbox/NotificationBar.d.ts +7 -0
  145. package/NotificationInbox/NotificationBar.js +7 -0
  146. package/NotificationInbox/NotificationBell.d.ts +7 -0
  147. package/NotificationInbox/NotificationBell.js +7 -0
  148. package/NotificationInbox/NotificationInbox.d.ts +7 -0
  149. package/NotificationInbox/NotificationInbox.js +7 -0
  150. package/NotificationInbox/types.d.ts +31 -0
  151. package/NumberPicker/NumberPicker.d.ts +7 -0
  152. package/NumberPicker/NumberPicker.js +7 -0
  153. package/NumberPicker/types.d.ts +12 -0
  154. package/PageHeader/components/AutosizeInput/AutosizeInput.d.ts +7 -0
  155. package/PageHeader/components/AutosizeInput/AutosizeInput.js +7 -0
  156. package/PageHeader/components/AutosizeInput/types.d.ts +7 -0
  157. package/PageHeader/components/PageHeader/PageHeader.d.ts +7 -0
  158. package/PageHeader/components/PageHeader/PageHeader.js +7 -0
  159. package/PageHeader/components/PageHeader/types.d.ts +13 -0
  160. package/PageHeader/components/PageHeaderEditable/PageHeaderEditable.d.ts +7 -0
  161. package/PageHeader/components/PageHeaderEditable/PageHeaderEditable.js +7 -0
  162. package/PageHeader/components/PageHeaderEditable/types.d.ts +19 -0
  163. package/Pagination/Pagination.d.ts +7 -0
  164. package/Pagination/Pagination.js +7 -0
  165. package/Pagination/types.d.ts +7 -0
  166. package/Popover/Popover.d.ts +10 -0
  167. package/Popover/Popover.js +10 -0
  168. package/Popover/styles.d.ts +1 -0
  169. package/Popover/styles.js +1 -0
  170. package/Popover/types.d.ts +9 -0
  171. package/ProgressBar/ProgressBar.d.ts +6 -0
  172. package/ProgressBar/ProgressBar.js +6 -0
  173. package/ProgressBar/types.d.ts +7 -0
  174. package/PushPreview/PushPreview.d.ts +7 -0
  175. package/PushPreview/PushPreview.js +7 -0
  176. package/PushPreview/types.d.ts +17 -0
  177. package/Radio/Radio.d.ts +7 -0
  178. package/Radio/Radio.js +7 -0
  179. package/Radio/types.d.ts +14 -0
  180. package/RadioCard/RadioCard.d.ts +7 -0
  181. package/RadioCard/RadioCard.js +7 -0
  182. package/RadioCard/types.d.ts +7 -0
  183. package/ReCaptcha/ReCaptcha.d.ts +8 -0
  184. package/ReCaptcha/ReCaptcha.js +8 -0
  185. package/ReCaptcha/helpers.d.ts +4 -0
  186. package/ReCaptcha/helpers.js +4 -0
  187. package/ReCaptcha/hooks.d.ts +4 -0
  188. package/ReCaptcha/hooks.js +4 -0
  189. package/ReCaptcha/types.d.ts +5 -0
  190. package/RichMessageEditor/RichMessageEditor.d.ts +8 -0
  191. package/RichMessageEditor/RichMessageEditor.js +8 -0
  192. package/RichMessageEditor/RichMessageEditor.types.d.ts +10 -0
  193. package/RichMessageEditor/RichMessageViewer.d.ts +10 -0
  194. package/RichMessageEditor/RichMessageViewer.js +7 -0
  195. package/RichMessageEditor/slate/types.d.ts +5 -0
  196. package/RichMessageEditor/types.d.ts +1 -0
  197. package/RichmediaPreview/RichmediaPreview.d.ts +7 -0
  198. package/RichmediaPreview/RichmediaPreview.js +7 -0
  199. package/RichmediaPreview/hooks.d.ts +4 -0
  200. package/RichmediaPreview/hooks.js +4 -0
  201. package/RichmediaPreview/types.d.ts +13 -0
  202. package/Select/Select.d.ts +22 -0
  203. package/Select/Select.js +22 -0
  204. package/Select/constants.d.ts +1 -0
  205. package/Select/constants.js +1 -0
  206. package/Select/types.d.ts +19 -0
  207. package/SendRate/SendRateEdit.d.ts +7 -0
  208. package/SendRate/SendRateEdit.js +7 -0
  209. package/SendRate/SendRateReadonly.d.ts +3 -0
  210. package/SendRate/SendRateReadonly.js +3 -0
  211. package/SendRate/types.d.ts +20 -0
  212. package/Skeleton/TextSkeleton.d.ts +6 -0
  213. package/Skeleton/TextSkeleton.js +6 -0
  214. package/Skeleton/styles.d.ts +2 -0
  215. package/Skeleton/styles.js +2 -0
  216. package/Skeleton/types.d.ts +11 -0
  217. package/SortButton/SortButton.d.ts +6 -0
  218. package/SortButton/SortButton.js +6 -0
  219. package/SortButton/types.d.ts +11 -0
  220. package/Spinner/Spinner.d.ts +6 -0
  221. package/Spinner/Spinner.js +6 -0
  222. package/Spinner/types.d.ts +4 -0
  223. package/StatisticCard/StatisticCard.d.ts +7 -0
  224. package/StatisticCard/StatisticCard.js +7 -0
  225. package/StatisticCard/types.d.ts +21 -0
  226. package/Switch/Switch.d.ts +6 -0
  227. package/Switch/Switch.js +6 -0
  228. package/Switch/types.d.ts +8 -0
  229. package/Tabs/components/Tab/Tab.d.ts +4 -0
  230. package/Tabs/components/Tab/Tab.js +4 -0
  231. package/Tabs/components/Tab/types.d.ts +6 -0
  232. package/Tabs/components/TabBar/TabBar.d.ts +3 -0
  233. package/Tabs/components/TabBar/TabBar.js +3 -0
  234. package/Tabs/components/TabBar/types.d.ts +2 -0
  235. package/Tabs/components/TabPanel/TabPanel.d.ts +4 -0
  236. package/Tabs/components/TabPanel/TabPanel.js +4 -0
  237. package/Tabs/components/TabPanel/types.d.ts +3 -0
  238. package/Tabs/components/Tabs/Tabs.d.ts +11 -0
  239. package/Tabs/components/Tabs/Tabs.js +11 -0
  240. package/Tabs/components/Tabs/types.d.ts +4 -0
  241. package/Tabs/types.d.ts +4 -0
  242. package/Toast/Toast.d.ts +5 -0
  243. package/Toast/Toast.js +5 -0
  244. package/Toast/ToastProvider.d.ts +7 -0
  245. package/Toast/ToastProvider.js +7 -0
  246. package/Toast/hooks.d.ts +8 -0
  247. package/Toast/hooks.js +8 -0
  248. package/Toast/types.d.ts +24 -0
  249. package/Tooltip/Tooltip.d.ts +7 -0
  250. package/Tooltip/Tooltip.js +7 -0
  251. package/Tooltip/TooltipTrigger.d.ts +13 -0
  252. package/Tooltip/TooltipTrigger.js +7 -0
  253. package/Tooltip/types.d.ts +12 -0
  254. package/hooks/useElementWidth.d.ts +4 -3
  255. package/hooks/useElementWidth.js +4 -3
  256. package/hooks/useLayer.d.ts +7 -0
  257. package/hooks/useLayer.js +7 -0
  258. package/hooks/useOnClickOutside.d.ts +7 -0
  259. package/hooks/useOnClickOutside.js +7 -0
  260. package/native/Input.d.ts +3 -0
  261. package/native/Input.js +1 -0
  262. package/native/NativeTimeInput.d.ts +1 -0
  263. package/native/NativeTimeInput.js +1 -0
  264. package/native/Select.d.ts +1 -0
  265. package/native/Select.js +1 -0
  266. package/native/Textarea.d.ts +1 -0
  267. package/native/Textarea.js +1 -0
  268. package/package.json +2 -3
  269. package/polyglot/react.d.ts +19 -0
  270. package/polyglot/react.js +19 -0
  271. package/polyglot/types.d.ts +4 -0
  272. package/shared/dropdownField/FieldInput.d.ts +1 -0
  273. package/shared/dropdownField/FieldInput.js +1 -0
  274. package/shared/dropdownField/FieldShell.d.ts +4 -0
  275. package/shared/dropdownField/FieldShell.js +4 -0
  276. package/shared/dropdownField/SuggestionsDropdown.d.ts +4 -0
  277. package/shared/dropdownField/SuggestionsDropdown.js +4 -0
  278. package/shared/dropdownField/constants.d.ts +1 -0
  279. package/shared/dropdownField/constants.js +1 -0
  280. package/shared/dropdownField/shared.d.ts +7 -0
  281. package/shared/dropdownField/shared.js +7 -0
  282. package/shared/dropdownField/types.d.ts +7 -0
  283. package/shared/dropdownField/useActiveIndex.d.ts +4 -0
  284. package/shared/dropdownField/useActiveIndex.js +4 -0
  285. package/shared/dropdownField/useAsyncItems.d.ts +4 -0
  286. package/shared/dropdownField/useAsyncItems.js +4 -0
  287. package/shared/dropdownField/useDebouncedValue.d.ts +1 -0
  288. package/shared/dropdownField/useDebouncedValue.js +1 -0
  289. package/shared/dropdownField/useDropdownItems.d.ts +4 -0
  290. package/shared/dropdownField/useDropdownItems.js +4 -0
  291. package/shared/dropdownField/useDropdownPosition.d.ts +4 -0
  292. package/shared/dropdownField/useDropdownPosition.js +4 -0
  293. package/shared/dropdownField/useFieldOpenEffects.d.ts +4 -0
  294. package/shared/dropdownField/useFieldOpenEffects.js +4 -0
  295. package/shared/dropdownField/useListNavigation.d.ts +5 -0
  296. package/shared/dropdownField/useListNavigation.js +5 -0
  297. package/Alert/ai-documentation.md +0 -132
  298. package/Badge/ai-documentation.md +0 -155
  299. package/Banner/ai-documentation.md +0 -285
  300. package/Button/ai-documentation.md +0 -247
  301. package/CardMetric/ai-documentation.md +0 -277
  302. package/Checkbox/ai-documentation.md +0 -231
  303. package/Chip/ai-documentation.md +0 -281
  304. package/CodeEditor/ai-documentation.md +0 -350
  305. package/DateTimePicker/ai-documentation.md +0 -400
  306. package/Drawer/ai-documentation.md +0 -417
  307. package/EnhancedInput/ai-documentation.md +0 -352
  308. package/InputFile/ai-documentation.md +0 -420
  309. package/Modal/ai-documentation.md +0 -285
  310. package/PageHeader/ai-documentation.md +0 -511
  311. package/Pagination/ai-documentation.md +0 -509
  312. package/Popover/ai-documentation.md +0 -625
  313. package/ProgressBar/ai-documentation.md +0 -533
  314. package/Radio/ai-documentation.md +0 -243
  315. package/Select/ai-documentation.md +0 -374
  316. package/Skeleton/ai-documentation.md +0 -574
  317. package/Spinner/ai-documentation.md +0 -607
  318. package/Switch/ai-documentation.md +0 -312
  319. package/Tabs/ai-documentation.md +0 -475
  320. package/Toast/ai-documentation.md +0 -220
  321. package/Tooltip/ai-documentation.md +0 -340
  322. package/ai-documentation.md +0 -124
  323. package/native/ai-documentation.md +0 -485
@@ -1,19 +1,36 @@
1
+ /** Rendering mode of {@link PushPreview}. */
1
2
  export type PushPreviewView = 'compact' | 'extended' | 'silent' | 'missed-content' | 'empty';
3
+ /** Minimal push-preset shape {@link PushPreview} reads to render a notification. */
2
4
  export interface PushBasicData {
5
+ /** Per-language title map. */
3
6
  title?: Record<string, string>;
7
+ /** Per-language subtitle map. */
4
8
  subtitle?: Record<string, string>;
9
+ /** Per-language body map. */
5
10
  content?: Record<string, string>;
11
+ /** Alternative per-language title map. */
6
12
  localizedTitle?: Record<string, string>;
13
+ /** Alternative per-language subtitle map. */
7
14
  localizedSubtitle?: Record<string, string>;
15
+ /** Alternative per-language body map. */
8
16
  localizedContent?: Record<string, string>;
17
+ /** Notification icon URL. */
9
18
  icon?: string;
10
19
  }
20
+ /** Props of {@link PushPreview}. */
11
21
  export interface PushPreviewProps<T> {
22
+ /** Rendering mode (default `compact`). */
12
23
  view?: PushPreviewView;
24
+ /** Push preset to preview; `null`/absent shows the app defaults. */
13
25
  pushPreset?: T | null;
26
+ /** Language key used to pick localized strings. */
14
27
  language?: string;
28
+ /** Show the loading placeholder. */
15
29
  isLoading?: boolean;
30
+ /** Fallback app name shown when the preset has no title. */
16
31
  appTitle?: string;
32
+ /** Fallback app icon URL. */
17
33
  appIcon?: string;
34
+ /** CSS width of the preview. */
18
35
  width?: string | number;
19
36
  }
package/Radio/Radio.d.ts CHANGED
@@ -1,3 +1,10 @@
1
1
  import { type ReactElement } from 'react';
2
2
  import type { RadioProps } from './types';
3
+ /**
4
+ * Single radio button with label, sizes and an optional help tooltip.
5
+ * Group radios by sharing a `name`.
6
+ *
7
+ * @example
8
+ * <Radio name="plan" value="pro" label="Pro" isChecked={plan === 'pro'} onChange={setPlan} />
9
+ */
3
10
  export declare function Radio(props: RadioProps): ReactElement;
package/Radio/Radio.js CHANGED
@@ -5,6 +5,13 @@ import { Horizontal } from '@pushwoosh/kit-helpers';
5
5
  import { InputContainer, NativeLabel, NativeRadio } from './styles';
6
6
  import { TooltipTrigger } from '../Tooltip';
7
7
  let counter = 0;
8
+ /**
9
+ * Single radio button with label, sizes and an optional help tooltip.
10
+ * Group radios by sharing a `name`.
11
+ *
12
+ * @example
13
+ * <Radio name="plan" value="pro" label="Pro" isChecked={plan === 'pro'} onChange={setPlan} />
14
+ */
8
15
  export function Radio(props) {
9
16
  const {
10
17
  label,
package/Radio/types.d.ts CHANGED
@@ -1,16 +1,30 @@
1
1
  import type { ReactNode } from 'react';
2
+ /** Visual state of a {@link Radio}: `normal` or `error` (red). */
2
3
  export type RadioType = 'normal' | 'error';
4
+ /** Size preset of a {@link Radio}: `regular` or `compact`. */
3
5
  export type RadioSize = 'regular' | 'compact';
6
+ /** Props of {@link Radio}. */
4
7
  export type RadioProps = {
8
+ /** Label rendered next to the control. */
5
9
  label?: ReactNode;
10
+ /** Explicit element id; auto-generated when omitted. */
6
11
  id?: string;
12
+ /** Group name — radios sharing a `name` are mutually exclusive. */
7
13
  name?: string;
14
+ /** Value passed to `onChange` when this radio is picked. */
8
15
  value?: string;
16
+ /** Visual state: `normal` (default) or `error`. */
9
17
  type?: RadioType;
18
+ /** Selected state (controlled). */
10
19
  isChecked?: boolean;
20
+ /** Disable interaction and render the disabled state. */
11
21
  isDisabled?: boolean;
22
+ /** Size preset: `regular` (default) or `compact`. */
12
23
  size?: RadioSize;
24
+ /** Help text shown via a question-mark tooltip next to the radio. */
13
25
  tooltip?: string;
26
+ /** Fires with this radio's `value` when it becomes selected. */
14
27
  onChange?: (checked: string | number) => void;
28
+ /** Fires when the control loses focus. */
15
29
  onBlur?: () => void;
16
30
  };
@@ -1,3 +1,10 @@
1
1
  import { type ReactElement } from 'react';
2
2
  import type { RadioCardProps } from './types';
3
+ /**
4
+ * Selectable card with a title, description and a radio indicator — a richer
5
+ * alternative to {@link Radio} for choosing one option among cards.
6
+ *
7
+ * @example
8
+ * <RadioCard title="Pro" description="For growing teams" isActive={plan === 'pro'} onClick={() => setPlan('pro')} />
9
+ */
3
10
  export declare function RadioCard(props: RadioCardProps): ReactElement;
@@ -3,6 +3,13 @@ import { Horizontal, Vertical } from '@pushwoosh/kit-helpers';
3
3
  import { H4, Paragraph } from '@pushwoosh/kit-typography';
4
4
  import { Radio } from '../Radio';
5
5
  import { RootBox } from './styled';
6
+ /**
7
+ * Selectable card with a title, description and a radio indicator — a richer
8
+ * alternative to {@link Radio} for choosing one option among cards.
9
+ *
10
+ * @example
11
+ * <RadioCard title="Pro" description="For growing teams" isActive={plan === 'pro'} onClick={() => setPlan('pro')} />
12
+ */
6
13
  export function RadioCard(props) {
7
14
  const {
8
15
  title,
@@ -1,9 +1,16 @@
1
1
  import type { ReactNode } from 'react';
2
+ /** Props of {@link RadioCard}. */
2
3
  export interface RadioCardProps {
4
+ /** Card heading. */
3
5
  title: string;
6
+ /** Supporting text under the title. */
4
7
  description: string;
8
+ /** CSS width of the card (default `"262px"`). */
5
9
  width?: string | number;
10
+ /** Whether this card is the selected one (drives the radio + active styling). */
6
11
  isActive?: boolean;
12
+ /** Extra content rendered below the description. */
7
13
  children?: ReactNode;
14
+ /** Fires when the card is clicked. */
8
15
  onClick: () => void;
9
16
  }
@@ -1,2 +1,10 @@
1
1
  import { type ReactElement } from 'react';
2
+ /**
3
+ * Renders the (invisible) reCAPTCHA host element. Pair with {@link useRecaptcha} to
4
+ * load the script and obtain tokens.
5
+ *
6
+ * @example
7
+ * const { getRecaptchaToken } = useRecaptcha();
8
+ * return <ReCaptcha />;
9
+ */
2
10
  export declare function ReCaptcha(): ReactElement;
@@ -1,6 +1,14 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { RECAPTCHA_CONTAINER_ID } from './constants';
3
3
  import { RecaptchaElement } from './styles';
4
+ /**
5
+ * Renders the (invisible) reCAPTCHA host element. Pair with {@link useRecaptcha} to
6
+ * load the script and obtain tokens.
7
+ *
8
+ * @example
9
+ * const { getRecaptchaToken } = useRecaptcha();
10
+ * return <ReCaptcha />;
11
+ */
4
12
  export function ReCaptcha() {
5
13
  return _jsx(RecaptchaElement, {
6
14
  id: RECAPTCHA_CONTAINER_ID
@@ -1 +1,5 @@
1
+ /**
2
+ * Injects a `<script>` with the given `src` once and resolves when it loads
3
+ * (resolves immediately if already present); rejects on load error.
4
+ */
1
5
  export declare function asyncScriptLoad(scriptUrl: string): Promise<Event | void>;
@@ -1,3 +1,7 @@
1
+ /**
2
+ * Injects a `<script>` with the given `src` once and resolves when it loads
3
+ * (resolves immediately if already present); rejects on load error.
4
+ */
1
5
  export async function asyncScriptLoad(scriptUrl) {
2
6
  return new Promise((resolve, reject) => {
3
7
  const isAlreadyLoaded = document.querySelector(`script[src="${scriptUrl}"]`);
@@ -1,2 +1,6 @@
1
1
  import type { RecaptchaExposedApi } from './types';
2
+ /**
3
+ * Loads the reCAPTCHA script, renders an invisible widget into the {@link ReCaptcha}
4
+ * element, and returns `{ isRecaptchaReady, recaptchaErrorCode, getRecaptchaToken }`.
5
+ */
2
6
  export declare function useRecaptcha(): RecaptchaExposedApi;
@@ -1,6 +1,10 @@
1
1
  import { useState, useEffect, useCallback, useRef } from 'react';
2
2
  import { RECAPTCHA_KEY, RECAPTCHA_SCRIPT_URL, RECAPTCHA_CONTAINER_ID } from './constants';
3
3
  import { asyncScriptLoad } from './helpers';
4
+ /**
5
+ * Loads the reCAPTCHA script, renders an invisible widget into the {@link ReCaptcha}
6
+ * element, and returns `{ isRecaptchaReady, recaptchaErrorCode, getRecaptchaToken }`.
7
+ */
4
8
  export function useRecaptcha() {
5
9
  var _window;
6
10
  const promiseRef = useRef({});
@@ -1,8 +1,13 @@
1
+ /** Value returned by {@link useRecaptcha}. */
1
2
  export type RecaptchaExposedApi = {
3
+ /** Whether the widget is rendered and ready to execute. */
2
4
  readonly isRecaptchaReady: boolean;
5
+ /** Internal error code (`RIExxx`), or empty string when there's no error. */
3
6
  readonly recaptchaErrorCode: string;
7
+ /** Runs an invisible challenge and resolves with the verification token. */
4
8
  readonly getRecaptchaToken: () => Promise<string>;
5
9
  };
10
+ /** Holds the pending token resolver between `execute` and the reCAPTCHA callback. */
6
11
  export type PromiseRef = {
7
12
  resolve?: (token: string) => void;
8
13
  };
@@ -1,3 +1,11 @@
1
1
  import { type FC } from 'react';
2
2
  import { type RichMessageEditorProps } from './RichMessageEditor.types';
3
+ /**
4
+ * Slate-based message editor with optional personalization (dynamic-content) tokens
5
+ * and an emoji picker; serializes to a string via `onChange`. Render the result with
6
+ * {@link RichMessageViewer}.
7
+ *
8
+ * @example
9
+ * <RichMessageEditor title="Message" initialValue={text} onChange={setText} canUseEmoji />
10
+ */
3
11
  export declare const RichMessageEditor: FC<RichMessageEditorProps>;
@@ -13,6 +13,14 @@ import { placementToDirection } from './RichMessageEditor.helpers';
13
13
  import { Arrow, DropArea, DropContent, ImSpan } from './RichMessageEditor.styled';
14
14
  import { getDcByPath } from './slate/helpers';
15
15
  import { SlateEditable, SlateEditor } from './slate/SlateEditor';
16
+ /**
17
+ * Slate-based message editor with optional personalization (dynamic-content) tokens
18
+ * and an emoji picker; serializes to a string via `onChange`. Render the result with
19
+ * {@link RichMessageViewer}.
20
+ *
21
+ * @example
22
+ * <RichMessageEditor title="Message" initialValue={text} onChange={setText} canUseEmoji />
23
+ */
16
24
  export const RichMessageEditor = ({
17
25
  title,
18
26
  initialValue,
@@ -14,15 +14,25 @@ export type RenderDynamicContentProps = {
14
14
  onClose: () => void;
15
15
  update: () => void;
16
16
  };
17
+ /** Props of {@link RichMessageEditor}. */
17
18
  export type RichMessageEditorProps = {
19
+ /** Field label (rendered by the surrounding FieldBox). */
18
20
  title: ReactNode;
21
+ /** Initial serialized message value. */
19
22
  initialValue: string;
23
+ /** Fires with the serialized value on every edit. */
20
24
  onChange: (value: string) => void;
25
+ /** Minimum editor height (CSS value). */
21
26
  minHeight?: string;
27
+ /** Error message; switches the field to the error state. */
22
28
  error?: ReactNode;
29
+ /** Enable inserting personalization (dynamic-content) tokens. */
23
30
  canUsePersonalization?: boolean;
31
+ /** Enable the emoji picker. */
24
32
  canUseEmoji?: boolean;
33
+ /** Fires when the editor loses focus. */
25
34
  onBlur?: () => void;
35
+ /** Renders the personalization editor popover for a {@link DynamicContent} token. */
26
36
  renderDynamicContent?: (props: RenderDynamicContentProps) => ReactNode;
27
37
  };
28
38
  export type ArrowDirection = 'top' | 'bottom' | 'left' | 'right';
@@ -1,7 +1,17 @@
1
1
  import { type FC } from 'react';
2
2
  import { type RichMessageEditorContent } from './types';
3
+ /** Props of {@link RichMessageViewer}. */
3
4
  export type RichMessageViewerProps = {
5
+ /** Message to render — structured {@link RichMessageEditorContent} or a serialized string. */
4
6
  value: RichMessageEditorContent | string;
7
+ /** Render inline (paragraphs joined with spaces) instead of as blocks. */
5
8
  flat?: boolean;
6
9
  };
10
+ /**
11
+ * Read-only renderer for {@link RichMessageEditor} output, displaying text and
12
+ * personalization tokens. Accepts structured content or a serialized string.
13
+ *
14
+ * @example
15
+ * <RichMessageViewer value={message} flat />
16
+ */
7
17
  export declare const RichMessageViewer: FC<RichMessageViewerProps>;
@@ -2,6 +2,13 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Fragment, useMemo } from 'react';
3
3
  import { DynamicContentBracket, DynamicContentRoot, Paragraph } from './RichMessageViewer.styled';
4
4
  import { isElement, string2content } from './slate/helpers';
5
+ /**
6
+ * Read-only renderer for {@link RichMessageEditor} output, displaying text and
7
+ * personalization tokens. Accepts structured content or a serialized string.
8
+ *
9
+ * @example
10
+ * <RichMessageViewer value={message} flat />
11
+ */
5
12
  export const RichMessageViewer = ({
6
13
  value,
7
14
  flat
@@ -1,8 +1,13 @@
1
1
  import type { Descendant } from 'slate';
2
+ /** Editor document model — an array of Slate nodes (exported publicly as `RichMessageEditorContent`). */
2
3
  export type SlateEditorContent = Descendant[];
4
+ /** A dynamic-content (personalization) token embedded in the message. */
3
5
  export type DynamicContent = {
6
+ /** Personalization tag name (e.g. a tag or attribute key). */
4
7
  tagName: string;
8
+ /** Optional value modifier/formatter. */
5
9
  modifier: string;
10
+ /** Fallback value used when the tag resolves to nothing. */
6
11
  defaultValue: string;
7
12
  };
8
13
  export type ParagraphElement = {
@@ -1,2 +1,3 @@
1
1
  import { type SlateEditorContent as RichMessageEditorContent } from './slate/types';
2
+ /** Structured content model produced/consumed by {@link RichMessageEditor} and {@link RichMessageViewer}. */
2
3
  export { type RichMessageEditorContent };
@@ -1,3 +1,10 @@
1
1
  import { type ReactElement } from 'react';
2
2
  import type { RichmediaPreviewProps } from './types';
3
+ /**
4
+ * Renders a rich-media (in-app) template in a sandboxed iframe, resolving params and
5
+ * localization via {@link useRichmediaHtml}.
6
+ *
7
+ * @example
8
+ * <RichmediaPreview name="Promo" content={html} params={params} language="en" />
9
+ */
3
10
  export declare function RichmediaPreview(props: RichmediaPreviewProps): ReactElement;
@@ -4,6 +4,13 @@ import { Color } from '@pushwoosh/kit-constants';
4
4
  import { Spinner } from '../Spinner';
5
5
  import { useRichmediaHtml } from './hooks';
6
6
  import { RichMediaPreviewContainer, RichMediaPreviewIframe } from './styles';
7
+ /**
8
+ * Renders a rich-media (in-app) template in a sandboxed iframe, resolving params and
9
+ * localization via {@link useRichmediaHtml}.
10
+ *
11
+ * @example
12
+ * <RichmediaPreview name="Promo" content={html} params={params} language="en" />
13
+ */
7
14
  export function RichmediaPreview(props) {
8
15
  const {
9
16
  name,
@@ -1,2 +1,6 @@
1
1
  import type { BuildRichmediaHtmlArgs } from './types';
2
+ /**
3
+ * Builds the final rich-media HTML string from a template, params and language
4
+ * (memoized). Use it to render rich media yourself instead of {@link RichmediaPreview}.
5
+ */
2
6
  export declare function useRichmediaHtml({ content, params, language, defaultLanguage, baseUrl, }: BuildRichmediaHtmlArgs): string;
@@ -34,6 +34,10 @@ function buildRichmediaHtml({
34
34
  const template = new Template(content, vars, formattedParams, `${window.location.protocol}//${window.location.host}${baseUrl}/`);
35
35
  return template.run();
36
36
  }
37
+ /**
38
+ * Builds the final rich-media HTML string from a template, params and language
39
+ * (memoized). Use it to render rich media yourself instead of {@link RichmediaPreview}.
40
+ */
37
41
  export function useRichmediaHtml({
38
42
  content,
39
43
  params,
@@ -1,20 +1,33 @@
1
+ /** A generic string-keyed object of rich-media params. */
1
2
  export type ObjectItem = {
2
3
  [key: string]: any;
3
4
  };
5
+ /** A single placeholder→value substitution applied to the rich-media content. */
4
6
  export type Replacer = {
5
7
  placeholder: string;
6
8
  replacer: any;
7
9
  };
10
+ /** Inputs needed to build the rich-media HTML (shared by {@link RichmediaPreview} and {@link useRichmediaHtml}). */
8
11
  export type BuildRichmediaHtmlArgs = {
12
+ /** Rich-media params (object or JSON string), keyed by language. */
9
13
  params: any;
14
+ /** Raw rich-media template content. */
10
15
  content: string;
16
+ /** Language key used to pick params (default `en`). */
11
17
  language?: string;
18
+ /** Fallback language when `language` has no params (default `en`). */
12
19
  defaultLanguage?: string;
20
+ /** Base URL prepended to relative asset references. */
13
21
  baseUrl?: string;
14
22
  };
23
+ /** Props of {@link RichmediaPreview}. */
15
24
  export type RichmediaPreviewProps = BuildRichmediaHtmlArgs & {
25
+ /** Title/name of the rich media (used as the iframe title). */
16
26
  name: string;
27
+ /** CSS width of the preview (default `304`). */
17
28
  width?: string | number;
29
+ /** CSS height of the preview (default `480`). */
18
30
  height?: string | number;
31
+ /** Show the loading spinner. */
19
32
  isLoading?: boolean;
20
33
  };
@@ -1,6 +1,28 @@
1
1
  import { type ReactElement } from 'react';
2
2
  import type { GroupBase } from 'react-select';
3
3
  import type { SelectProps, SelectAsyncProps, SelectCreatableProps } from './types';
4
+ /**
5
+ * Styled `react-select` dropdown (single or multi via `isMulti`).
6
+ *
7
+ * @deprecated Use {@link Combobox} (or {@link ComboboxMulti} for multi-select) instead —
8
+ * Combobox is the in-house replacement for the `react-select` family.
9
+ * @example
10
+ * <Select options={options} value={value} onChange={onChange} />
11
+ */
4
12
  export declare function Select<Option, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>(props: SelectProps<Option, IsMulti, Group>): ReactElement;
13
+ /**
14
+ * Styled `react-select` dropdown that loads options asynchronously via `loadOptions`.
15
+ *
16
+ * @deprecated Use {@link Combobox} with `loadItems` instead.
17
+ * @example
18
+ * <SelectAsync loadOptions={fetchOptions} defaultOptions />
19
+ */
5
20
  export declare function SelectAsync<Option, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>(props: SelectAsyncProps<Option, IsMulti, Group>): ReactElement;
21
+ /**
22
+ * Styled `react-select` dropdown that lets the user create new options by typing.
23
+ *
24
+ * @deprecated Use the free-text {@link Combobox} instead.
25
+ * @example
26
+ * <CreatableSelect options={options} onCreateOption={addOption} />
27
+ */
6
28
  export declare function CreatableSelect<Option, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>(props: SelectCreatableProps<Option, IsMulti, Group>): ReactElement;
package/Select/Select.js CHANGED
@@ -12,6 +12,14 @@ const componentsProps = {
12
12
  })
13
13
  })
14
14
  };
15
+ /**
16
+ * Styled `react-select` dropdown (single or multi via `isMulti`).
17
+ *
18
+ * @deprecated Use {@link Combobox} (or {@link ComboboxMulti} for multi-select) instead —
19
+ * Combobox is the in-house replacement for the `react-select` family.
20
+ * @example
21
+ * <Select options={options} value={value} onChange={onChange} />
22
+ */
15
23
  export function Select(props) {
16
24
  const {
17
25
  classNamePrefix = CLASS_NAME_PREFIX
@@ -25,6 +33,13 @@ export function Select(props) {
25
33
  ...customProps
26
34
  });
27
35
  }
36
+ /**
37
+ * Styled `react-select` dropdown that loads options asynchronously via `loadOptions`.
38
+ *
39
+ * @deprecated Use {@link Combobox} with `loadItems` instead.
40
+ * @example
41
+ * <SelectAsync loadOptions={fetchOptions} defaultOptions />
42
+ */
28
43
  export function SelectAsync(props) {
29
44
  const {
30
45
  classNamePrefix = CLASS_NAME_PREFIX
@@ -38,6 +53,13 @@ export function SelectAsync(props) {
38
53
  ...customProps
39
54
  });
40
55
  }
56
+ /**
57
+ * Styled `react-select` dropdown that lets the user create new options by typing.
58
+ *
59
+ * @deprecated Use the free-text {@link Combobox} instead.
60
+ * @example
61
+ * <CreatableSelect options={options} onCreateOption={addOption} />
62
+ */
41
63
  export function CreatableSelect(props) {
42
64
  const {
43
65
  classNamePrefix = CLASS_NAME_PREFIX
@@ -1 +1,2 @@
1
+ /** `classNamePrefix` applied to the `react-select` markup so the Pushwoosh styles can target it. */
1
2
  export declare const CLASS_NAME_PREFIX = "kit-select";
@@ -1 +1,2 @@
1
+ /** `classNamePrefix` applied to the `react-select` markup so the Pushwoosh styles can target it. */
1
2
  export const CLASS_NAME_PREFIX = 'kit-select';
package/Select/types.d.ts CHANGED
@@ -1,15 +1,34 @@
1
1
  import type { Props, GroupBase, MultiValue } from 'react-select';
2
2
  import type { AsyncProps } from 'react-select/async';
3
3
  import type { CreatableProps } from 'react-select/creatable';
4
+ /** A single `{ label, value }` option for the `react-select`-based selects. */
4
5
  export type SelectOption = {
6
+ /** Text shown in the control and dropdown. */
5
7
  label: string;
8
+ /** Underlying value submitted/compared. */
6
9
  value: string;
7
10
  };
11
+ /** Selected options array for a multi-select. */
8
12
  export type MultiSelectOptions = MultiValue<SelectOption>;
13
+ /** Pushwoosh styling extras mixed into every Select variant's props. */
9
14
  export type SelectBase = {
15
+ /** Fixed CSS width of the control. */
10
16
  width?: string;
17
+ /** Render the error (red) state. */
11
18
  $isErrored?: boolean;
12
19
  };
20
+ /**
21
+ * Props of {@link Select} — all `react-select` props plus {@link SelectBase}.
22
+ * @deprecated Use {@link Combobox} (or {@link ComboboxMulti} for multi-select) instead.
23
+ */
13
24
  export type SelectProps<Option, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>> = Props<Option, IsMulti, Group> & SelectBase;
25
+ /**
26
+ * Props of {@link SelectAsync} — {@link SelectProps} plus `react-select/async` props.
27
+ * @deprecated Use {@link Combobox} with `loadItems` instead.
28
+ */
14
29
  export type SelectAsyncProps<Option, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>> = SelectProps<Option, IsMulti, Group> & AsyncProps<Option, IsMulti, Group> & SelectBase;
30
+ /**
31
+ * Props of {@link CreatableSelect} — {@link SelectProps} plus `react-select/creatable` props.
32
+ * @deprecated Use the free-text {@link Combobox} instead.
33
+ */
15
34
  export type SelectCreatableProps<Option, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>> = SelectProps<Option, IsMulti, Group> & CreatableProps<Option, IsMulti, Group> & SelectBase;
@@ -1,2 +1,9 @@
1
1
  import { type SendRateEditProps, type SendRateBase } from './types';
2
+ /**
3
+ * Editable send-rate control: pick the policy (global/custom/ignore) and set a
4
+ * custom rate within `minValue`–`maxValue`.
5
+ *
6
+ * @example
7
+ * <SendRateEdit sendRate={rate} globalSendRate={global} applicationCode={code} minValue={1} maxValue={1000} onChange={setRate} editGlobalClicked={openGlobal} />
8
+ */
2
9
  export declare function SendRateEdit<T extends SendRateBase>({ sendRate, globalSendRate, onChange, applicationCode, minValue, maxValue, editGlobalClicked, }: SendRateEditProps<T>): import("react/jsx-runtime").JSX.Element;
@@ -12,6 +12,13 @@ import { Select } from '../Select';
12
12
  import { sendRateOptions } from './constants';
13
13
  import { useLang } from './polyglot';
14
14
  import { Container, LinkWrapper } from './styles';
15
+ /**
16
+ * Editable send-rate control: pick the policy (global/custom/ignore) and set a
17
+ * custom rate within `minValue`–`maxValue`.
18
+ *
19
+ * @example
20
+ * <SendRateEdit sendRate={rate} globalSendRate={global} applicationCode={code} minValue={1} maxValue={1000} onChange={setRate} editGlobalClicked={openGlobal} />
21
+ */
15
22
  export function SendRateEdit({
16
23
  sendRate,
17
24
  globalSendRate,
@@ -1,2 +1,5 @@
1
1
  import { type SendRateReadonlyProps, type SendRateBase } from './types';
2
+ /**
3
+ * Read-only summary of a send-rate config, with a link to edit the global send rate.
4
+ */
2
5
  export declare function SendRateReadonly<T extends SendRateBase>({ sendRate, globalSendRate, applicationCode, editGlobalClicked, }: SendRateReadonlyProps<T>): import("react/jsx-runtime").JSX.Element;
@@ -5,6 +5,9 @@ import { Link } from '../Link';
5
5
  import { getGlobalSendRateLinkText } from './helpers/getGlobalSendRateLinkText';
6
6
  import { getReadonlySendRateLabel } from './helpers/getReadonlySendRateHelpers';
7
7
  import { useLang } from './polyglot';
8
+ /**
9
+ * Read-only summary of a send-rate config, with a link to edit the global send rate.
10
+ */
8
11
  export function SendRateReadonly({
9
12
  sendRate,
10
13
  globalSendRate,
@@ -1,30 +1,50 @@
1
+ /** Send-rate mode: unset, follow the global rate, custom rate, or ignore throttling. */
1
2
  export type SendRatePolicy = 'UNKNOWN' | 'GLOBAL' | 'CUSTOM' | 'IGNORE';
3
+ /** Send-rate config: a numeric rate plus the selected policy. */
2
4
  export type SendRateBase<K extends SendRatePolicy = SendRatePolicy> = {
5
+ /** Custom rate value (messages per unit). */
3
6
  sendRate: number;
7
+ /** Active send-rate policy. */
4
8
  policy: K;
5
9
  };
10
+ /** A send-rate policy option for the mode selector. */
6
11
  export type SendRateOption = {
12
+ /** Human-readable label. */
7
13
  label: string;
14
+ /** Corresponding policy. */
8
15
  value: SendRatePolicy;
9
16
  };
17
+ /** Props of {@link SendRateEdit}. */
10
18
  export type SendRateEditProps<T extends SendRateBase> = {
19
+ /** Current send-rate config. */
11
20
  sendRate: T;
21
+ /** The account-wide global send rate, for reference. */
12
22
  globalSendRate: {
13
23
  count: number;
14
24
  seconds: number;
15
25
  };
26
+ /** Fires with the updated send-rate config. */
16
27
  onChange: (newSendRateState: T) => void;
28
+ /** Fires when the "edit global send rate" link is clicked. */
17
29
  editGlobalClicked: () => void;
30
+ /** Application code the send rate applies to. */
18
31
  applicationCode: string;
32
+ /** Minimum allowed custom rate. */
19
33
  minValue: number;
34
+ /** Maximum allowed custom rate. */
20
35
  maxValue: number;
21
36
  };
37
+ /** Props of {@link SendRateReadonly}. */
22
38
  export type SendRateReadonlyProps<T extends SendRateBase> = {
39
+ /** Send-rate config to summarize. */
23
40
  sendRate: T;
41
+ /** The account-wide global send rate, for reference. */
24
42
  globalSendRate: {
25
43
  count: number;
26
44
  seconds: number;
27
45
  };
46
+ /** Application code the send rate applies to. */
28
47
  applicationCode: string;
48
+ /** Fires when the "edit global send rate" link is clicked. */
29
49
  editGlobalClicked: () => void;
30
50
  };
@@ -1,3 +1,9 @@
1
1
  import { type ReactElement, type PropsWithChildren } from 'react';
2
2
  import type { TextSkeletonProps } from './types';
3
+ /**
4
+ * Loading placeholder for a line of text; sizes to its content unless `width` is given.
5
+ *
6
+ * @example
7
+ * <TextSkeleton width={160} />
8
+ */
3
9
  export declare function TextSkeleton(props: PropsWithChildren<TextSkeletonProps>): ReactElement;
@@ -1,5 +1,11 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { TextSkeletonTag } from './styles';
3
+ /**
4
+ * Loading placeholder for a line of text; sizes to its content unless `width` is given.
5
+ *
6
+ * @example
7
+ * <TextSkeleton width={160} />
8
+ */
3
9
  export function TextSkeleton(props) {
4
10
  const {
5
11
  children,