@roku-sdk/components 0.0.0-stage → 2.18.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 (211) hide show
  1. package/BREAKING_CHANGES.md +84 -0
  2. package/LICENSE +21 -0
  3. package/README.md +19 -2
  4. package/core-jsx.d.ts +53 -0
  5. package/eslint.config.mjs +3 -0
  6. package/jsx.d.ts +273 -0
  7. package/package.json +84 -3
  8. package/src/__tests__/container.test.tsx +150 -0
  9. package/src/__tests__/glyphs.test.ts +202 -0
  10. package/src/__tests__/modal-boundary-export.test.ts +12 -0
  11. package/src/__tests__/native-modal.test.tsx +224 -0
  12. package/src/__tests__/tween-release.test.tsx +125 -0
  13. package/src/__tests__/tween-stops-shape.test.tsx +165 -0
  14. package/src/__tests__/tween-without-compat.test.tsx +64 -0
  15. package/src/__tests__/tween.test.tsx +195 -0
  16. package/src/blended-busy-spinner.props.ts +37 -0
  17. package/src/blended-busy-spinner.tsx +13 -0
  18. package/src/bounding-tracker.props.ts +18 -0
  19. package/src/bounding-tracker.tsx +13 -0
  20. package/src/button-row.tsx +126 -0
  21. package/src/channel-store.props.ts +425 -0
  22. package/src/channel-store.tsx +76 -0
  23. package/src/container.tsx +130 -0
  24. package/src/core/jsx-runtime.ts +39 -0
  25. package/src/focusable-group.props.ts +8 -0
  26. package/src/focusable-group.tsx +17 -0
  27. package/src/focusable.props.ts +14 -0
  28. package/src/focusable.tsx +17 -0
  29. package/src/glyphs.ts +116 -0
  30. package/src/helpers/index.tsx +4 -0
  31. package/src/helpers/resolution-context.tsx +68 -0
  32. package/src/helpers/scale-for-device-resolution.ts +31 -0
  33. package/src/index.tsx +70 -0
  34. package/src/jsx-props.ts +87 -0
  35. package/src/kdfs.d.ts +14 -0
  36. package/src/kdfs.ts +15 -0
  37. package/src/key-handler.props.ts +33 -0
  38. package/src/key-handler.tsx +24 -0
  39. package/src/modal-dialog.props.ts +38 -0
  40. package/src/modal-dialog.tsx +41 -0
  41. package/src/retain-asset.ts +24 -0
  42. package/src/sg-intrinsics.json +1153 -0
  43. package/src/sg-nodes/__tests__/__snapshots__/font.test.tsx.snap +13 -0
  44. package/src/sg-nodes/__tests__/__snapshots__/prop-forwarding.test.tsx.snap +4409 -0
  45. package/src/sg-nodes/__tests__/core-props.test.ts +301 -0
  46. package/src/sg-nodes/__tests__/font.test.tsx +141 -0
  47. package/src/sg-nodes/__tests__/imperative-methods.test.ts +268 -0
  48. package/src/sg-nodes/__tests__/prop-forwarding.test.tsx +1049 -0
  49. package/src/sg-nodes/__tests__/solid-integration.test.tsx +719 -0
  50. package/src/sg-nodes/animated-image.props.ts +64 -0
  51. package/src/sg-nodes/animated-image.tsx +23 -0
  52. package/src/sg-nodes/animation.props.ts +292 -0
  53. package/src/sg-nodes/animation.tsx +190 -0
  54. package/src/sg-nodes/array-grid.ts +602 -0
  55. package/src/sg-nodes/audio.props.ts +302 -0
  56. package/src/sg-nodes/audio.tsx +57 -0
  57. package/src/sg-nodes/busy-spinner.props.ts +59 -0
  58. package/src/sg-nodes/busy-spinner.tsx +84 -0
  59. package/src/sg-nodes/button-group.props.ts +141 -0
  60. package/src/sg-nodes/button-group.tsx +30 -0
  61. package/src/sg-nodes/button.props.ts +119 -0
  62. package/src/sg-nodes/button.tsx +31 -0
  63. package/src/sg-nodes/check-list.props.ts +71 -0
  64. package/src/sg-nodes/check-list.tsx +55 -0
  65. package/src/sg-nodes/content-node.props.ts +1316 -0
  66. package/src/sg-nodes/content-node.tsx +153 -0
  67. package/src/sg-nodes/core-props.ts +197 -0
  68. package/src/sg-nodes/custom-keyboard.props.ts +108 -0
  69. package/src/sg-nodes/custom-keyboard.tsx +48 -0
  70. package/src/sg-nodes/dialog.props.ts +159 -0
  71. package/src/sg-nodes/dialog.tsx +36 -0
  72. package/src/sg-nodes/dynamic-key-grid.props.ts +22 -0
  73. package/src/sg-nodes/dynamic-key-grid.tsx +16 -0
  74. package/src/sg-nodes/dynamic-keyboard.props.ts +30 -0
  75. package/src/sg-nodes/dynamic-keyboard.tsx +18 -0
  76. package/src/sg-nodes/dynamic-mini-keyboard.props.ts +22 -0
  77. package/src/sg-nodes/dynamic-mini-keyboard.tsx +18 -0
  78. package/src/sg-nodes/dynamic-pinpad.props.ts +57 -0
  79. package/src/sg-nodes/dynamic-pinpad.tsx +18 -0
  80. package/src/sg-nodes/effect.props.ts +116 -0
  81. package/src/sg-nodes/effect.tsx +39 -0
  82. package/src/sg-nodes/font.props.ts +45 -0
  83. package/src/sg-nodes/font.tsx +80 -0
  84. package/src/sg-nodes/group.props.ts +105 -0
  85. package/src/sg-nodes/group.tsx +30 -0
  86. package/src/sg-nodes/label-list.props.ts +86 -0
  87. package/src/sg-nodes/label-list.tsx +64 -0
  88. package/src/sg-nodes/label.props.ts +207 -0
  89. package/src/sg-nodes/label.tsx +56 -0
  90. package/src/sg-nodes/layout-group.props.ts +69 -0
  91. package/src/sg-nodes/layout-group.tsx +75 -0
  92. package/src/sg-nodes/list-panel.props.ts +104 -0
  93. package/src/sg-nodes/list-panel.tsx +49 -0
  94. package/src/sg-nodes/markup-grid.props.ts +78 -0
  95. package/src/sg-nodes/markup-grid.tsx +38 -0
  96. package/src/sg-nodes/markup-list.props.ts +68 -0
  97. package/src/sg-nodes/markup-list.tsx +38 -0
  98. package/src/sg-nodes/mask-group.props.ts +78 -0
  99. package/src/sg-nodes/mask-group.tsx +59 -0
  100. package/src/sg-nodes/media-playback-methods.ts +20 -0
  101. package/src/sg-nodes/node.ts +77 -0
  102. package/src/sg-nodes/overhang.props.ts +169 -0
  103. package/src/sg-nodes/overhang.tsx +29 -0
  104. package/src/sg-nodes/panel-set.props.ts +71 -0
  105. package/src/sg-nodes/panel-set.tsx +53 -0
  106. package/src/sg-nodes/panel.props.ts +176 -0
  107. package/src/sg-nodes/panel.tsx +56 -0
  108. package/src/sg-nodes/poster-grid.props.ts +277 -0
  109. package/src/sg-nodes/poster-grid.tsx +45 -0
  110. package/src/sg-nodes/poster.props.ts +125 -0
  111. package/src/sg-nodes/poster.tsx +44 -0
  112. package/src/sg-nodes/radio-button-list.props.ts +59 -0
  113. package/src/sg-nodes/radio-button-list.tsx +68 -0
  114. package/src/sg-nodes/rectangle.props.ts +29 -0
  115. package/src/sg-nodes/rectangle.tsx +27 -0
  116. package/src/sg-nodes/row-list.props.ts +288 -0
  117. package/src/sg-nodes/row-list.tsx +47 -0
  118. package/src/sg-nodes/scene.props.ts +65 -0
  119. package/src/sg-nodes/scene.tsx +15 -0
  120. package/src/sg-nodes/scrollable-text.props.ts +133 -0
  121. package/src/sg-nodes/scrollable-text.tsx +64 -0
  122. package/src/sg-nodes/scrolling-label.props.ts +106 -0
  123. package/src/sg-nodes/scrolling-label.tsx +42 -0
  124. package/src/sg-nodes/simple-label.props.ts +156 -0
  125. package/src/sg-nodes/simple-label.tsx +59 -0
  126. package/src/sg-nodes/sound-effect.props.ts +130 -0
  127. package/src/sg-nodes/sound-effect.tsx +65 -0
  128. package/src/sg-nodes/standard-dialog.props.ts +520 -0
  129. package/src/sg-nodes/standard-dialog.tsx +428 -0
  130. package/src/sg-nodes/standard-keyboard-dialog.props.ts +84 -0
  131. package/src/sg-nodes/standard-keyboard-dialog.tsx +59 -0
  132. package/src/sg-nodes/standard-message-dialog.props.ts +56 -0
  133. package/src/sg-nodes/standard-message-dialog.tsx +48 -0
  134. package/src/sg-nodes/standard-pinpad-dialog.props.ts +64 -0
  135. package/src/sg-nodes/standard-pinpad-dialog.tsx +46 -0
  136. package/src/sg-nodes/standard-progress-dialog.props.ts +30 -0
  137. package/src/sg-nodes/standard-progress-dialog.tsx +43 -0
  138. package/src/sg-nodes/target-group.props.ts +278 -0
  139. package/src/sg-nodes/target-group.tsx +63 -0
  140. package/src/sg-nodes/target-list.props.ts +128 -0
  141. package/src/sg-nodes/target-list.tsx +66 -0
  142. package/src/sg-nodes/target-set.props.ts +63 -0
  143. package/src/sg-nodes/target-set.tsx +42 -0
  144. package/src/sg-nodes/time-grid.props.ts +646 -0
  145. package/src/sg-nodes/time-grid.tsx +87 -0
  146. package/src/sg-nodes/tween.props.ts +115 -0
  147. package/src/sg-nodes/types.ts +150 -0
  148. package/src/sg-nodes/video.props.ts +573 -0
  149. package/src/sg-nodes/video.tsx +73 -0
  150. package/src/sg-nodes/voice-text-edit-box.props.ts +91 -0
  151. package/src/sg-nodes/voice-text-edit-box.tsx +15 -0
  152. package/src/sg-nodes/zoom-row-list.props.ts +416 -0
  153. package/src/sg-nodes/zoom-row-list.tsx +42 -0
  154. package/src/standard-dialog-next/__tests__/standard-dialog-next.test.tsx +186 -0
  155. package/src/standard-dialog-next/index.ts +5 -0
  156. package/src/standard-dialog-next/standard-dialog-next.props.ts +80 -0
  157. package/src/standard-dialog-next/standard-dialog-next.tsx +326 -0
  158. package/src/test-helpers/tween-test-setup.ts +78 -0
  159. package/src/tween.tsx +173 -0
  160. package/src/types.ts +8 -0
  161. package/src/xml-components/blended-busy-spinner/BlendedBusySpinner.brs +13 -0
  162. package/src/xml-components/blended-busy-spinner/BlendedBusySpinner.xml +10 -0
  163. package/src/xml-components/blended-busy-spinner/BlendedBusySpinner.xml.d.ts +42 -0
  164. package/src/xml-components/bounding-tracker/BoundingTracker.brs +26 -0
  165. package/src/xml-components/bounding-tracker/BoundingTracker.xml +14 -0
  166. package/src/xml-components/bounding-tracker/BoundingTracker.xml.d.ts +42 -0
  167. package/src/xml-components/channel-store/channelStoreExt.brs +159 -0
  168. package/src/xml-components/channel-store/channelStoreExt.xml +29 -0
  169. package/src/xml-components/channel-store/channelStoreExt.xml.d.ts +57 -0
  170. package/src/xml-components/focus/focusable-group.brs +251 -0
  171. package/src/xml-components/focus/focusable-group.xml +15 -0
  172. package/src/xml-components/focus/focusable-group.xml.d.ts +42 -0
  173. package/src/xml-components/focus/focusable.xml +18 -0
  174. package/src/xml-components/focus/focusable.xml.d.ts +48 -0
  175. package/src/xml-components/keyboards/CustomAddressKDF.keyboard.json +547 -0
  176. package/src/xml-components/keyboards/CustomKeyboard.brs +322 -0
  177. package/src/xml-components/keyboards/CustomKeyboard.xml +45 -0
  178. package/src/xml-components/keyboards/CustomKeyboard.xml.d.ts +73 -0
  179. package/src/xml-components/keyboards/KeyGridExt.xml +4 -0
  180. package/src/xml-components/keyboards/KeyGridExt.xml.d.ts +37 -0
  181. package/src/xml-components/keyboards/KeyboardExt.xml +4 -0
  182. package/src/xml-components/keyboards/KeyboardExt.xml.d.ts +37 -0
  183. package/src/xml-components/keyboards/MOPPinPadCustomKDF.keyboard.json +151 -0
  184. package/src/xml-components/keyboards/MiniKeyboardExt.xml +4 -0
  185. package/src/xml-components/keyboards/MiniKeyboardExt.xml.d.ts +37 -0
  186. package/src/xml-components/keyboards/PhonePadCustomKDF.keyboard.json +42 -0
  187. package/src/xml-components/keyboards/PinPadExt.brs +102 -0
  188. package/src/xml-components/keyboards/PinPadExt.xml +17 -0
  189. package/src/xml-components/keyboards/PinPadExt.xml.d.ts +49 -0
  190. package/src/xml-components/keyboards/WifiCustomKDF.keyboard.json +1242 -0
  191. package/src/xml-components/keyhandler/KeyHandler.brs +30 -0
  192. package/src/xml-components/keyhandler/KeyHandler.xml +16 -0
  193. package/src/xml-components/keyhandler/KeyHandler.xml.d.ts +45 -0
  194. package/src/xml-components/managed-list-panel/ManagedListPanel.brs +137 -0
  195. package/src/xml-components/managed-list-panel/ManagedListPanel.xml +10 -0
  196. package/src/xml-components/managed-list-panel/ManagedListPanel.xml.d.ts +37 -0
  197. package/src/xml-components/modal/Modal.brs +105 -0
  198. package/src/xml-components/modal/Modal.xml +22 -0
  199. package/src/xml-components/modal/Modal.xml.d.ts +54 -0
  200. package/src/xml-components/modal/StandardDialogExt.xml +10 -0
  201. package/src/xml-components/modal/StandardDialogExt.xml.d.ts +37 -0
  202. package/src/xml-components/modal/StandardKeyboardDialogExt.xml +10 -0
  203. package/src/xml-components/modal/StandardKeyboardDialogExt.xml.d.ts +37 -0
  204. package/src/xml-components/modal/StandardMessageDialogExt.xml +10 -0
  205. package/src/xml-components/modal/StandardMessageDialogExt.xml.d.ts +37 -0
  206. package/src/xml-components/modal/StandardPinPadDialogExt.xml +10 -0
  207. package/src/xml-components/modal/StandardPinPadDialogExt.xml.d.ts +37 -0
  208. package/src/xml-components/modal/StandardProgressDialogExt.xml +10 -0
  209. package/src/xml-components/modal/StandardProgressDialogExt.xml.d.ts +37 -0
  210. package/src/xml-components/modal/tests/Modal.test.brs +195 -0
  211. package/tsconfig.json +10 -0
@@ -0,0 +1,520 @@
1
+ // Copyright (c) 2026 Roku, Inc.
2
+ // SPDX-License-Identifier: MIT
3
+
4
+ import type { IModalLifecycleProps } from "../modal-dialog.props";
5
+ import type { IGroupProps } from "./group.props";
6
+ import type { EventHandler, JSX, ResType, Uri } from "./types";
7
+
8
+ /** Keyboard layout type for {@link StdDlgKeyboardItem}. */
9
+ export enum StdDlgKeyboardLayoutType {
10
+ /** No keyboard displayed. */
11
+ Unspecified = "unspecified",
12
+ /** Full DynamicKeyboard for alphanumeric/symbol entry. */
13
+ Keyboard = "keyboard",
14
+ /** DynamicPinPad for digit entry. */
15
+ PinPad = "pinpad"
16
+ }
17
+
18
+ interface PaletteColors {
19
+ /** Background color of the dialog. */
20
+ dialogBackgroundColor?: string;
21
+ /** Color of non-text items in the dialog. */
22
+ dialogItemColor?: string;
23
+ /** Primary text color in the dialog. */
24
+ dialogTextColor?: string;
25
+ /** Color of the focus indicator highlight. */
26
+ dialogFocusColor?: string;
27
+ /** Color of items within the focus indicator. */
28
+ dialogFocusItemColor?: string;
29
+ /** Secondary text color in the dialog. */
30
+ dialogSecondaryTextColor?: string;
31
+ /** Color of secondary items in the dialog. */
32
+ dialogSecondaryItemColor?: string;
33
+ /** Color of input fields such as text edit boxes. */
34
+ dialogInputFieldColor?: string;
35
+ /** Color of keyboard keys. */
36
+ dialogKeyboardColor?: string;
37
+ /** Color of footprint (background) areas such as action card backgrounds. */
38
+ dialogFootprintColor?: string;
39
+ }
40
+
41
+ export interface IStandardDialogRSGPaletteNodeProps {
42
+ /** Color palette values for the dialog. */
43
+ colors: PaletteColors;
44
+ }
45
+
46
+ /**
47
+ * Properties for the {@link StandardDialog} component.
48
+ *
49
+ * StandardDialog is the base dialog node for Roku's standard dialog framework. It can host
50
+ * pre-built dialogs (message, keyboard, pinpad, progress) or be used directly with custom
51
+ * dialog structures built from StdDlg* area and item nodes.
52
+ *
53
+ * @see {@link https://developer.roku.com/dev/docs/standard-dialog}
54
+ */
55
+ export interface IStandardDialogProps extends IGroupProps, IModalLifecycleProps {
56
+ /** Native dialog title, including the accessibility title. */
57
+ title?: string;
58
+ /** Also dismiss when the Options key is pressed. @default false */
59
+ optionsDialog?: boolean;
60
+ /**
61
+ * Sets the color palette for the dialog's background, text, buttons, and other elements.
62
+ * Pass an {@link RsgPalette} element to override the inherited palette.
63
+ * @default not set (inherited from ancestor nodes)
64
+ */
65
+ palette?: JSX.Element;
66
+ /**
67
+ * Width of the dialog in pixels. When set to 0, the system default is used
68
+ * (1038 FHD / 692 HD), and the dialog auto-expands for title/button text up to 1380 FHD / 920 HD.
69
+ * @default 0
70
+ */
71
+ width?: number;
72
+ /**
73
+ * Height of the dialog in pixels. If greater than 0 and the layout height is less than
74
+ * this value, the button area moves to the bottom with a blank region above it.
75
+ * @default 0
76
+ */
77
+ height?: number;
78
+ /**
79
+ * Fired when a button in the button area is selected. The handler receives the zero-based
80
+ * index of the selected button.
81
+ */
82
+ onButtonSelected?: EventHandler<number>;
83
+ /**
84
+ * Fired when a button in the button area gains focus. The handler receives the zero-based
85
+ * index of the focused button.
86
+ */
87
+ onButtonFocused?: EventHandler<number>;
88
+ /**
89
+ * Dismisses the dialog whenever set (regardless of the value). Setting this field to any value
90
+ * triggers the dialog to close.
91
+ * @default false
92
+ */
93
+ close?: boolean;
94
+ }
95
+
96
+ /**
97
+ * Base props shared by all dialog area nodes ({@link StdDlgTitleArea}, {@link StdDlgContentArea},
98
+ * {@link StdDlgButtonArea}). Extends {@link IGroupProps} with no additional fields.
99
+ *
100
+ * @see {@link https://developer.roku.com/dev/docs/std-dlg-area-base}
101
+ */
102
+ export type IStdDlgAreaBaseProps = IGroupProps;
103
+
104
+ /**
105
+ * Properties for the {@link StdDlgTitleArea} component.
106
+ *
107
+ * Contains the dialog's title information, always displayed at the top of the dialog.
108
+ * May include optional primary and secondary icons alongside the title text.
109
+ *
110
+ * @see {@link https://developer.roku.com/dev/docs/std-dlg-title-area}
111
+ */
112
+ export interface IStdDlgTitleAreaProps extends IStdDlgAreaBaseProps {
113
+ /**
114
+ * Title text displayed in the dialog's title area.
115
+ * @default ""
116
+ */
117
+ primaryTitle?: string;
118
+ /**
119
+ * URI of a bitmap displayed at the left edge of the title area, to the left of the primary title.
120
+ * @default ""
121
+ */
122
+ primaryIcon?: Uri;
123
+ /**
124
+ * Vertical position adjustment of the primary icon relative to the title baseline.
125
+ * @default 0
126
+ */
127
+ primaryIconVertOffset?: number;
128
+ /**
129
+ * URI of a bitmap displayed at the right edge of the title area.
130
+ * @default ""
131
+ */
132
+ secondaryIcon?: Uri;
133
+ /**
134
+ * Vertical position adjustment of the secondary icon relative to the title baseline.
135
+ * @default 0
136
+ */
137
+ secondaryIconVertOffset?: number;
138
+ }
139
+
140
+ /**
141
+ * Properties for the {@link StdDlgContentArea} component.
142
+ *
143
+ * Contains the main body of the dialog, positioned between the title area and button area.
144
+ * Add zero or more StdDlgItemBase-derived child nodes, which are arranged vertically top-to-bottom.
145
+ *
146
+ * @see {@link https://developer.roku.com/dev/docs/std-dlg-content-area}
147
+ */
148
+ export type IStdDlgContentAreaProps = IStdDlgAreaBaseProps;
149
+
150
+ /**
151
+ * Properties for the {@link StdDlgButtonArea} component.
152
+ *
153
+ * Always positioned at the bottom of the dialog. Contains zero or more {@link StdDlgButton}
154
+ * child nodes arranged vertically in listed order.
155
+ *
156
+ * @see {@link https://developer.roku.com/dev/docs/std-dlg-button-area}
157
+ */
158
+ export type IStdDlgButtonAreaProps = IStdDlgAreaBaseProps;
159
+
160
+ /**
161
+ * Properties for the {@link StdDlgSideCardArea} component.
162
+ *
163
+ * A freeform area on the left or right side of the dialog for decorative images or
164
+ * annotative text. The side card area never gains key focus.
165
+ *
166
+ * @see {@link https://developer.roku.com/dev/docs/std-dlg-side-card-area}
167
+ */
168
+ export interface IStdDlgSideCardAreaProps extends IStdDlgAreaBaseProps {
169
+ /**
170
+ * Width of the side card area. When 0, defaults to the width of the content area's bounding rectangle.
171
+ * @default 0
172
+ */
173
+ width: number;
174
+ /**
175
+ * Whether the area extends to the dialog's background image edge (`true`) or respects
176
+ * 9-patch margins (`false`).
177
+ * @default true
178
+ */
179
+ extendToDialogEdge?: boolean;
180
+ /**
181
+ * Which side of the dialog the area appears on.
182
+ * @default "right"
183
+ */
184
+ horizAlign?: "left" | "right";
185
+ /**
186
+ * Whether a thin vertical divider line is displayed between the side card and the main content column.
187
+ * @default false
188
+ */
189
+ showDivider?: boolean;
190
+ }
191
+
192
+ /**
193
+ * Properties for the {@link StdDlgButton} component.
194
+ *
195
+ * Represents a single button in the dialog's button area. Buttons are displayed in listed
196
+ * order with size and layout controlled by the StandardDialog layout algorithm.
197
+ *
198
+ * @see {@link https://developer.roku.com/dev/docs/std-dlg-button}
199
+ */
200
+ export interface IStdDlgButtonProps extends IGroupProps {
201
+ /**
202
+ * Text displayed on the button.
203
+ * @default ""
204
+ */
205
+ text: string;
206
+ /**
207
+ * When `true`, the button has an inactive appearance and cannot receive focus.
208
+ * @default false
209
+ */
210
+ disabled?: boolean;
211
+ }
212
+
213
+ /**
214
+ * Base props shared by all content area item nodes. Extends {@link IGroupProps} with
215
+ * a `scrollable` property.
216
+ *
217
+ * @see {@link https://developer.roku.com/dev/docs/std-dlg-item-base}
218
+ */
219
+ export interface IStdDlgItemBaseProps extends IGroupProps {
220
+ /**
221
+ * Whether the item can be scrolled vertically. The layout algorithm reduces the height
222
+ * of scrollable items if the dialog content is too large to fit.
223
+ * @default false
224
+ */
225
+ scrollable?: boolean;
226
+ }
227
+
228
+ /**
229
+ * Properties for the {@link StdDlgItemGroup} component.
230
+ *
231
+ * Visually groups StdDlgItemBase child nodes with reduced vertical spacing. Enforces
232
+ * a radio-button "only 1 of N" rule for {@link StdDlgActionCardItem} children with
233
+ * `iconType="radiobutton"`.
234
+ *
235
+ * @see {@link https://developer.roku.com/dev/docs/std-dlg-item-group}
236
+ */
237
+ export interface IStdDlgItemGroupProps extends IStdDlgItemBaseProps {
238
+ /**
239
+ * Index of the currently selected child node. Updated when the user selects an
240
+ * ActionCardItem child. Enforces radio-button exclusivity.
241
+ * @default 0
242
+ */
243
+ selectedIndex?: number;
244
+ }
245
+
246
+ /** Icon type for {@link StdDlgActionCardItem}. */
247
+ export type IStdDlgActionIconType = "none" | "more_info" | "checkbox" | "radiobutton";
248
+
249
+ /**
250
+ * Properties for the {@link StdDlgActionCardItem} component.
251
+ *
252
+ * Highlights child items with optional icons (arrow, radio button, or checkbox).
253
+ * Drawn on top of a rectangular background tinted with the RSGPalette's DialogFootprintColor.
254
+ * Focusable — receives key events.
255
+ *
256
+ * @see {@link https://developer.roku.com/dev/docs/std-dlg-action-card-item}
257
+ */
258
+ export interface IStdDlgActionCardItemProps extends IStdDlgItemBaseProps {
259
+ /**
260
+ * Whether the action card is checked or unchecked when {@link iconType} is
261
+ * `"checkbox"` or `"radiobutton"`.
262
+ * @default false
263
+ */
264
+ iconStatus?: boolean;
265
+ /**
266
+ * Type of icon displayed on the action card.
267
+ * - `"none"`: no icon
268
+ * - `"more_info"`: right-pointing arrow
269
+ * - `"checkbox"`: checkmark / empty box
270
+ * - `"radiobutton"`: filled / empty circle
271
+ * @default "none"
272
+ */
273
+ iconType?: IStdDlgActionIconType;
274
+ /**
275
+ * Event fired when the action card item is selected. The handler receives the resulting
276
+ * {@link iconStatus} value (for `"checkbox"` and `"radiobutton"` icon types).
277
+ */
278
+ onSelected?: EventHandler<boolean>;
279
+ }
280
+
281
+ /** Bullet list delimiter type for {@link StdDlgBulletTextItem}. */
282
+ export type IStdDialogBulletType = "bullet" | "numbered" | "lettered";
283
+
284
+ /**
285
+ * Properties for the {@link StdDlgBulletTextItem} component.
286
+ *
287
+ * Displays a bulleted, numbered, or lettered list of text in the content area.
288
+ *
289
+ * @see {@link https://developer.roku.com/dev/docs/std-dlg-bullet-text-item}
290
+ */
291
+ export interface IStdDlgBulletTextItemProps extends IStdDlgItemBaseProps {
292
+ /**
293
+ * Array of strings displayed as a bulleted/numbered/lettered list.
294
+ * @default []
295
+ */
296
+ bulletText?: string[];
297
+ /**
298
+ * Type of list delimiter.
299
+ * - `"bullet"`: bullet point
300
+ * - `"numbered"`: 1, 2, 3…
301
+ * - `"lettered"`: a, b, c…
302
+ * @default "bullet"
303
+ */
304
+ bulletType?: IStdDialogBulletType;
305
+ }
306
+
307
+ /**
308
+ * Properties for the {@link StdDlgDeterminateProgressItem} component.
309
+ *
310
+ * Displays a percentage progress indicator for tasks with a known duration.
311
+ *
312
+ * @see {@link https://developer.roku.com/dev/docs/std-dlg-determinate-progress-item}
313
+ */
314
+ export interface IStdDlgDeterminateProgressItemProps extends IStdDlgItemBaseProps {
315
+ /**
316
+ * Current completion percentage (0–100). Clamped to the 0–100 range.
317
+ *
318
+ * > **Note:** The Roku documentation defines this as a `string`, but the SDK uses `number`
319
+ * > for a more ergonomic API. The value is converted automatically.
320
+ * @default 0
321
+ */
322
+ percent?: number;
323
+ /**
324
+ * Text displayed next to the progress graphic. Wraps if too wide.
325
+ * @default ""
326
+ */
327
+ text?: string;
328
+ }
329
+
330
+ /** Graphic/text alignment for {@link StdDlgGraphicItem}. */
331
+ export type IStdDlgGraphicAlign = "left" | "right" | "center_below" | "center_above";
332
+
333
+ /**
334
+ * Properties for the {@link StdDlgGraphicItem} component.
335
+ *
336
+ * Displays an image with an optional text label positioned to the left, right, above, or below.
337
+ *
338
+ * @see {@link https://developer.roku.com/dev/docs/std-dlg-graphic-item}
339
+ */
340
+ export interface IStdDlgGraphicItemProps extends IStdDlgItemBaseProps {
341
+ /**
342
+ * Text displayed next to the graphic. Wraps if too wide.
343
+ * @default ""
344
+ */
345
+ text?: string;
346
+ /**
347
+ * URI of the image to display.
348
+ * @default ""
349
+ */
350
+ graphicUri?: Uri;
351
+ /**
352
+ * Width override for the image (instead of its actual width).
353
+ * @default 0
354
+ */
355
+ graphicWidth?: number;
356
+ /**
357
+ * Height override for the image (instead of its actual height).
358
+ * @default 0
359
+ */
360
+ graphicHeight?: number;
361
+ /**
362
+ * Relative position of the graphic and text.
363
+ * - `"left"`: graphic left, text right
364
+ * - `"right"`: graphic right, text left
365
+ * - `"center_below"`: graphic below text, both centered
366
+ * - `"center_above"`: graphic above text, both centered
367
+ * @default "left"
368
+ */
369
+ graphicAlign?: IStdDlgGraphicAlign;
370
+ }
371
+
372
+ /**
373
+ * Properties for the {@link StdDlgKeyboardItem} component.
374
+ *
375
+ * Displays a keyboard or PIN pad in the content area for alphanumeric/symbol/digit entry.
376
+ *
377
+ * @see {@link https://developer.roku.com/dev/docs/std-dlg-keyboard-item}
378
+ */
379
+ export interface IStdDlgKeyboardItemProps extends IStdDlgItemBaseProps {
380
+ /**
381
+ * Type of keyboard to display.
382
+ * @default StdDlgKeyboardLayoutType.Unspecified
383
+ */
384
+ keyLayoutType?: StdDlgKeyboardLayoutType;
385
+ /**
386
+ * Default string in the text edit box. Updated as the user types.
387
+ * @default ""
388
+ */
389
+ text?: string;
390
+ /**
391
+ * Fired whenever the text in the keyboard's text edit box changes (on each keystroke).
392
+ * The handler receives the full current string entered by the user.
393
+ *
394
+ * Use this to react to live input — for example to validate input or enable/disable
395
+ * action buttons based on what the user has typed so far.
396
+ */
397
+ onText?: EventHandler<string>;
398
+ // textEditBox?: node; TODO: Add support for textEditBox
399
+ }
400
+
401
+ /** Drawing style for a named text style in {@link StdDlgMultiStyleTextItem}. */
402
+ export interface IStdDlgDrawingStyle {
403
+ /**
404
+ * Font size in points. Ignored when using system fonts.
405
+ */
406
+ fontSize?: ResType<number>;
407
+ /**
408
+ * TrueType/OpenType font file URI (e.g., `"pkg:/fonts/font.ttf"`) or a system font URI
409
+ * (e.g., `"font:MediumBoldSystemFont"`).
410
+ */
411
+ fontUri?: string;
412
+ /** Text color in hex format (e.g., `"0xFF0000FF"`). */
413
+ color?: string;
414
+ }
415
+
416
+ /**
417
+ * Properties for the {@link StdDlgMultiStyleTextItem} component.
418
+ *
419
+ * Enables text with multiple styles (fonts, colors, sizes) using markup tags that reference
420
+ * named drawing styles.
421
+ *
422
+ * @see {@link https://developer.roku.com/dev/docs/std-dlg-multi-style-text-item}
423
+ */
424
+ export interface IStdDlgMultiStyleTextItemProps extends IStdDlgItemBaseProps {
425
+ /**
426
+ * Text to display. Use markup tags referencing keys in {@link drawingStyles} to apply styles.
427
+ * @default ""
428
+ */
429
+ text?: string;
430
+ /**
431
+ * Named font styles. Each top-level key becomes a markup tag name usable in the `text` field.
432
+ *
433
+ * @example
434
+ * ```tsx
435
+ * drawingStyles={{
436
+ * bold: { fontUri: "font:MediumBoldSystemFont", color: "0xFFFFFFFF" },
437
+ * highlight: { fontSize: 24, color: "0xFFFF00FF" }
438
+ * }}
439
+ * // Then in text: "Normal <bold>bold text</bold> and <highlight>highlighted</highlight>"
440
+ * ```
441
+ */
442
+ drawingStyles: { [tag: string]: IStdDlgDrawingStyle };
443
+ /**
444
+ * String spoken by the screen reader instead of the `text` field value.
445
+ * @default ""
446
+ */
447
+ audioGuideText: string;
448
+ }
449
+
450
+ /**
451
+ * Properties for the {@link StdDlgProgressItem} component.
452
+ *
453
+ * Displays a spinning progress indicator for tasks with an indeterminate duration.
454
+ *
455
+ * @see {@link https://developer.roku.com/dev/docs/std-dlg-progress-item}
456
+ */
457
+ export interface IStdDlgProgressItemProps extends IStdDlgItemBaseProps {
458
+ /**
459
+ * Text displayed next to the spinning progress graphic. Wraps if too wide.
460
+ * @default ""
461
+ */
462
+ text: string;
463
+ }
464
+
465
+ /** Named text style for {@link StdDlgTextItem}. */
466
+ export type INamedTextStyles = "normal" | "secondary" | "bold" | "custom_secondary" | "centered" | "errorcode";
467
+
468
+ /**
469
+ * Properties for the {@link StdDlgTextItem} component.
470
+ *
471
+ * Displays a block of text in the content area. Use multiple StdDlgTextItem nodes to
472
+ * separate lines of text rather than newline characters.
473
+ *
474
+ * @see {@link https://developer.roku.com/dev/docs/std-dlg-text-item}
475
+ */
476
+ export interface IStdDlgTextItemProps extends IStdDlgItemBaseProps {
477
+ /**
478
+ * Text to display. Wraps if too wide for the content area.
479
+ * @default ""
480
+ */
481
+ text: string;
482
+ /**
483
+ * Named text style controlling font and color.
484
+ * - `"normal"`: DialogTextColor, SmallSystemFont
485
+ * - `"secondary"`: DialogSecondaryTextColor, SmallestSystemFont
486
+ * - `"bold"`: DialogTextColor, SmallBoldSystemFont
487
+ * - `"custom_secondary"`: custom secondary style
488
+ * - `"centered"`: centered text
489
+ * - `"errorcode"`: error code style
490
+ * @default "normal"
491
+ */
492
+ namedTextStyle?: INamedTextStyles;
493
+ /**
494
+ * String spoken by the screen reader instead of the `text` field value.
495
+ * @default ""
496
+ */
497
+ audioGuideText?: string;
498
+ }
499
+
500
+ /**
501
+ * Properties for the {@link StdDlgCustomItem} component.
502
+ *
503
+ * Free-form dialog item in the content area requiring custom layout. Set `focusable=true`
504
+ * on child nodes if they need to receive focus (e.g., custom keyboard).
505
+ *
506
+ * @see {@link https://developer.roku.com/dev/docs/std-dlg-custom-item}
507
+ */
508
+ export interface IStdDlgCustomItemProps extends IStdDlgItemBaseProps {
509
+ /**
510
+ * Width of the custom item enforced by the content area's layout algorithm (read-only).
511
+ * @default 0
512
+ */
513
+ widthField?: number;
514
+ /**
515
+ * Desired width passed to the content area's layout algorithm. Typically used with
516
+ * DynamicCustomKeyboard nodes.
517
+ * @default 0
518
+ */
519
+ fixedWidthField?: number;
520
+ }