@roku-sdk/components 0.0.0-stage → 2.19.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.
- package/BREAKING_CHANGES.md +84 -0
- package/LICENSE +21 -0
- package/README.md +19 -2
- package/core-jsx.d.ts +53 -0
- package/eslint.config.mjs +3 -0
- package/jsx.d.ts +273 -0
- package/package.json +85 -3
- package/src/__tests__/container.test.tsx +150 -0
- package/src/__tests__/effect-gradient-validation.test.tsx +133 -0
- package/src/__tests__/glyphs.test.ts +202 -0
- package/src/__tests__/modal-boundary-export.test.ts +12 -0
- package/src/__tests__/native-modal.test.tsx +224 -0
- package/src/__tests__/tween-release.test.tsx +125 -0
- package/src/__tests__/tween-stops-shape.test.tsx +165 -0
- package/src/__tests__/tween-without-compat.test.tsx +64 -0
- package/src/__tests__/tween.test.tsx +195 -0
- package/src/blended-busy-spinner.props.ts +37 -0
- package/src/blended-busy-spinner.tsx +13 -0
- package/src/bounding-tracker.props.ts +18 -0
- package/src/bounding-tracker.tsx +13 -0
- package/src/button-row.tsx +126 -0
- package/src/channel-store.props.ts +425 -0
- package/src/channel-store.tsx +76 -0
- package/src/container.tsx +130 -0
- package/src/core/jsx-runtime.ts +39 -0
- package/src/focusable-group.props.ts +8 -0
- package/src/focusable-group.tsx +17 -0
- package/src/focusable.props.ts +14 -0
- package/src/focusable.tsx +17 -0
- package/src/glyphs.ts +116 -0
- package/src/helpers/index.tsx +4 -0
- package/src/helpers/resolution-context.tsx +68 -0
- package/src/helpers/scale-for-device-resolution.ts +31 -0
- package/src/index.tsx +70 -0
- package/src/jsx-props.ts +87 -0
- package/src/kdfs.d.ts +14 -0
- package/src/kdfs.ts +15 -0
- package/src/key-handler.props.ts +33 -0
- package/src/key-handler.tsx +24 -0
- package/src/modal-dialog.props.ts +38 -0
- package/src/modal-dialog.tsx +41 -0
- package/src/retain-asset.ts +24 -0
- package/src/sg-intrinsics.json +1153 -0
- package/src/sg-nodes/__tests__/__snapshots__/font.test.tsx.snap +13 -0
- package/src/sg-nodes/__tests__/__snapshots__/prop-forwarding.test.tsx.snap +4409 -0
- package/src/sg-nodes/__tests__/core-props.test.ts +301 -0
- package/src/sg-nodes/__tests__/font.test.tsx +141 -0
- package/src/sg-nodes/__tests__/imperative-methods.test.ts +276 -0
- package/src/sg-nodes/__tests__/prop-forwarding.test.tsx +1049 -0
- package/src/sg-nodes/__tests__/solid-integration.test.tsx +719 -0
- package/src/sg-nodes/animated-image.props.ts +64 -0
- package/src/sg-nodes/animated-image.tsx +23 -0
- package/src/sg-nodes/animation.props.ts +292 -0
- package/src/sg-nodes/animation.tsx +190 -0
- package/src/sg-nodes/array-grid.ts +602 -0
- package/src/sg-nodes/audio.props.ts +302 -0
- package/src/sg-nodes/audio.tsx +57 -0
- package/src/sg-nodes/busy-spinner.props.ts +59 -0
- package/src/sg-nodes/busy-spinner.tsx +84 -0
- package/src/sg-nodes/button-group.props.ts +141 -0
- package/src/sg-nodes/button-group.tsx +30 -0
- package/src/sg-nodes/button.props.ts +119 -0
- package/src/sg-nodes/button.tsx +31 -0
- package/src/sg-nodes/check-list.props.ts +71 -0
- package/src/sg-nodes/check-list.tsx +55 -0
- package/src/sg-nodes/content-node.props.ts +1316 -0
- package/src/sg-nodes/content-node.tsx +153 -0
- package/src/sg-nodes/core-props.ts +197 -0
- package/src/sg-nodes/custom-keyboard.props.ts +108 -0
- package/src/sg-nodes/custom-keyboard.tsx +48 -0
- package/src/sg-nodes/dialog.props.ts +159 -0
- package/src/sg-nodes/dialog.tsx +36 -0
- package/src/sg-nodes/dynamic-key-grid.props.ts +22 -0
- package/src/sg-nodes/dynamic-key-grid.tsx +16 -0
- package/src/sg-nodes/dynamic-keyboard.props.ts +30 -0
- package/src/sg-nodes/dynamic-keyboard.tsx +18 -0
- package/src/sg-nodes/dynamic-mini-keyboard.props.ts +22 -0
- package/src/sg-nodes/dynamic-mini-keyboard.tsx +18 -0
- package/src/sg-nodes/dynamic-pinpad.props.ts +57 -0
- package/src/sg-nodes/dynamic-pinpad.tsx +18 -0
- package/src/sg-nodes/effect.props.ts +119 -0
- package/src/sg-nodes/effect.tsx +167 -0
- package/src/sg-nodes/font.props.ts +45 -0
- package/src/sg-nodes/font.tsx +80 -0
- package/src/sg-nodes/group.props.ts +105 -0
- package/src/sg-nodes/group.tsx +30 -0
- package/src/sg-nodes/label-list.props.ts +86 -0
- package/src/sg-nodes/label-list.tsx +64 -0
- package/src/sg-nodes/label.props.ts +207 -0
- package/src/sg-nodes/label.tsx +56 -0
- package/src/sg-nodes/layout-group.props.ts +69 -0
- package/src/sg-nodes/layout-group.tsx +75 -0
- package/src/sg-nodes/list-panel.props.ts +103 -0
- package/src/sg-nodes/list-panel.tsx +49 -0
- package/src/sg-nodes/markup-grid.props.ts +78 -0
- package/src/sg-nodes/markup-grid.tsx +38 -0
- package/src/sg-nodes/markup-list.props.ts +66 -0
- package/src/sg-nodes/markup-list.tsx +38 -0
- package/src/sg-nodes/mask-group.props.ts +78 -0
- package/src/sg-nodes/mask-group.tsx +59 -0
- package/src/sg-nodes/media-playback-methods.ts +20 -0
- package/src/sg-nodes/node.ts +77 -0
- package/src/sg-nodes/overhang.props.ts +169 -0
- package/src/sg-nodes/overhang.tsx +29 -0
- package/src/sg-nodes/panel-set.props.ts +71 -0
- package/src/sg-nodes/panel-set.tsx +53 -0
- package/src/sg-nodes/panel.props.ts +176 -0
- package/src/sg-nodes/panel.tsx +56 -0
- package/src/sg-nodes/poster-grid.props.ts +277 -0
- package/src/sg-nodes/poster-grid.tsx +45 -0
- package/src/sg-nodes/poster.props.ts +125 -0
- package/src/sg-nodes/poster.tsx +44 -0
- package/src/sg-nodes/radio-button-list.props.ts +59 -0
- package/src/sg-nodes/radio-button-list.tsx +68 -0
- package/src/sg-nodes/rectangle.props.ts +29 -0
- package/src/sg-nodes/rectangle.tsx +27 -0
- package/src/sg-nodes/row-list.props.ts +288 -0
- package/src/sg-nodes/row-list.tsx +47 -0
- package/src/sg-nodes/scene.props.ts +65 -0
- package/src/sg-nodes/scene.tsx +15 -0
- package/src/sg-nodes/scrollable-text.props.ts +133 -0
- package/src/sg-nodes/scrollable-text.tsx +64 -0
- package/src/sg-nodes/scrolling-label.props.ts +106 -0
- package/src/sg-nodes/scrolling-label.tsx +42 -0
- package/src/sg-nodes/simple-label.props.ts +156 -0
- package/src/sg-nodes/simple-label.tsx +59 -0
- package/src/sg-nodes/sound-effect.props.ts +130 -0
- package/src/sg-nodes/sound-effect.tsx +65 -0
- package/src/sg-nodes/standard-dialog.props.ts +520 -0
- package/src/sg-nodes/standard-dialog.tsx +428 -0
- package/src/sg-nodes/standard-keyboard-dialog.props.ts +84 -0
- package/src/sg-nodes/standard-keyboard-dialog.tsx +58 -0
- package/src/sg-nodes/standard-message-dialog.props.ts +56 -0
- package/src/sg-nodes/standard-message-dialog.tsx +47 -0
- package/src/sg-nodes/standard-pinpad-dialog.props.ts +64 -0
- package/src/sg-nodes/standard-pinpad-dialog.tsx +44 -0
- package/src/sg-nodes/standard-progress-dialog.props.ts +30 -0
- package/src/sg-nodes/standard-progress-dialog.tsx +40 -0
- package/src/sg-nodes/target-group.props.ts +278 -0
- package/src/sg-nodes/target-group.tsx +63 -0
- package/src/sg-nodes/target-list.props.ts +128 -0
- package/src/sg-nodes/target-list.tsx +66 -0
- package/src/sg-nodes/target-set.props.ts +63 -0
- package/src/sg-nodes/target-set.tsx +42 -0
- package/src/sg-nodes/time-grid.props.ts +646 -0
- package/src/sg-nodes/time-grid.tsx +87 -0
- package/src/sg-nodes/tween.props.ts +115 -0
- package/src/sg-nodes/types.ts +150 -0
- package/src/sg-nodes/video.props.ts +642 -0
- package/src/sg-nodes/video.tsx +75 -0
- package/src/sg-nodes/voice-text-edit-box.props.ts +91 -0
- package/src/sg-nodes/voice-text-edit-box.tsx +15 -0
- package/src/sg-nodes/zoom-row-list.props.ts +416 -0
- package/src/sg-nodes/zoom-row-list.tsx +42 -0
- package/src/standard-dialog-next/__tests__/standard-dialog-next.test.tsx +186 -0
- package/src/standard-dialog-next/index.ts +5 -0
- package/src/standard-dialog-next/standard-dialog-next.props.ts +80 -0
- package/src/standard-dialog-next/standard-dialog-next.tsx +326 -0
- package/src/test-helpers/tween-test-setup.ts +78 -0
- package/src/tween.tsx +173 -0
- package/src/types.ts +8 -0
- package/src/xml-components/blended-busy-spinner/BlendedBusySpinner.brs +13 -0
- package/src/xml-components/blended-busy-spinner/BlendedBusySpinner.xml +10 -0
- package/src/xml-components/blended-busy-spinner/BlendedBusySpinner.xml.d.ts +42 -0
- package/src/xml-components/bounding-tracker/BoundingTracker.brs +26 -0
- package/src/xml-components/bounding-tracker/BoundingTracker.xml +14 -0
- package/src/xml-components/bounding-tracker/BoundingTracker.xml.d.ts +42 -0
- package/src/xml-components/channel-store/channelStoreExt.brs +159 -0
- package/src/xml-components/channel-store/channelStoreExt.xml +29 -0
- package/src/xml-components/channel-store/channelStoreExt.xml.d.ts +57 -0
- package/src/xml-components/focus/focusable-group.brs +251 -0
- package/src/xml-components/focus/focusable-group.xml +15 -0
- package/src/xml-components/focus/focusable-group.xml.d.ts +42 -0
- package/src/xml-components/focus/focusable.xml +18 -0
- package/src/xml-components/focus/focusable.xml.d.ts +48 -0
- package/src/xml-components/keyboards/CustomAddressKDF.keyboard.json +547 -0
- package/src/xml-components/keyboards/CustomKeyboard.brs +322 -0
- package/src/xml-components/keyboards/CustomKeyboard.xml +45 -0
- package/src/xml-components/keyboards/CustomKeyboard.xml.d.ts +73 -0
- package/src/xml-components/keyboards/KeyGridExt.xml +4 -0
- package/src/xml-components/keyboards/KeyGridExt.xml.d.ts +37 -0
- package/src/xml-components/keyboards/KeyboardExt.xml +4 -0
- package/src/xml-components/keyboards/KeyboardExt.xml.d.ts +37 -0
- package/src/xml-components/keyboards/MOPPinPadCustomKDF.keyboard.json +151 -0
- package/src/xml-components/keyboards/MiniKeyboardExt.xml +4 -0
- package/src/xml-components/keyboards/MiniKeyboardExt.xml.d.ts +37 -0
- package/src/xml-components/keyboards/PhonePadCustomKDF.keyboard.json +42 -0
- package/src/xml-components/keyboards/PinPadExt.brs +102 -0
- package/src/xml-components/keyboards/PinPadExt.xml +17 -0
- package/src/xml-components/keyboards/PinPadExt.xml.d.ts +49 -0
- package/src/xml-components/keyboards/WifiCustomKDF.keyboard.json +1242 -0
- package/src/xml-components/keyhandler/KeyHandler.brs +30 -0
- package/src/xml-components/keyhandler/KeyHandler.xml +16 -0
- package/src/xml-components/keyhandler/KeyHandler.xml.d.ts +45 -0
- package/src/xml-components/managed-list-panel/ManagedListPanel.brs +137 -0
- package/src/xml-components/managed-list-panel/ManagedListPanel.xml +10 -0
- package/src/xml-components/managed-list-panel/ManagedListPanel.xml.d.ts +37 -0
- package/src/xml-components/modal/Modal.brs +105 -0
- package/src/xml-components/modal/Modal.xml +22 -0
- package/src/xml-components/modal/Modal.xml.d.ts +54 -0
- package/src/xml-components/modal/StandardDialogExt.xml +10 -0
- package/src/xml-components/modal/StandardDialogExt.xml.d.ts +37 -0
- package/src/xml-components/modal/StandardKeyboardDialogExt.xml +10 -0
- package/src/xml-components/modal/StandardKeyboardDialogExt.xml.d.ts +37 -0
- package/src/xml-components/modal/StandardMessageDialogExt.xml +10 -0
- package/src/xml-components/modal/StandardMessageDialogExt.xml.d.ts +37 -0
- package/src/xml-components/modal/StandardPinPadDialogExt.xml +10 -0
- package/src/xml-components/modal/StandardPinPadDialogExt.xml.d.ts +37 -0
- package/src/xml-components/modal/StandardProgressDialogExt.xml +10 -0
- package/src/xml-components/modal/StandardProgressDialogExt.xml.d.ts +37 -0
- package/src/xml-components/modal/tests/Modal.test.brs +195 -0
- package/tsconfig.json +10 -0
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
// Copyright (c) 2026 Roku, Inc.
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
|
|
4
|
+
import type { IGroupProps } from "./group.props";
|
|
5
|
+
import type { EventHandler, Uri } from "./types";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Properties shared across Button-like components (Button, ButtonGroup, ButtonRow).
|
|
9
|
+
*
|
|
10
|
+
* Provides the visual customization fields common to all button presentations,
|
|
11
|
+
* including text styling, icon bitmaps, and sizing constraints.
|
|
12
|
+
*
|
|
13
|
+
* @see {@link https://developer.roku.com/dev/docs/button}
|
|
14
|
+
*/
|
|
15
|
+
export interface IButtonDataProps {
|
|
16
|
+
id?: string;
|
|
17
|
+
centerNoIcon?: boolean;
|
|
18
|
+
centerIconOnly?: boolean;
|
|
19
|
+
positionIconToRight?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Specifies the color of the button label when the button does not have the key focus.
|
|
22
|
+
* @default 0xddddddff
|
|
23
|
+
*/
|
|
24
|
+
textColor?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Specifies the color of the button label when the button has the key focus.
|
|
27
|
+
* @default 0x262626ff
|
|
28
|
+
*/
|
|
29
|
+
focusedTextColor?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Specifies the font of the button label when the button does not have the key focus.
|
|
32
|
+
* @see {@link https://developer.roku.com/dev/docs/button | Button Fields}
|
|
33
|
+
*/
|
|
34
|
+
textFont?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Specifies the font of the button label when the button has the key focus.
|
|
37
|
+
* @see {@link https://developer.roku.com/dev/docs/button | Button Fields}
|
|
38
|
+
*/
|
|
39
|
+
focusedTextFont?: string;
|
|
40
|
+
/**
|
|
41
|
+
* Specifies the button focus "footprint" bitmap file to display when the button does
|
|
42
|
+
* not have key focus. Only set this field to specify a custom bitmap that differs in
|
|
43
|
+
* appearance from the default bitmap. The footprint is only displayed when
|
|
44
|
+
* {@link IButtonDataProps.showFocusFootprint | showFocusFootprint} is `true`.
|
|
45
|
+
* @default ""
|
|
46
|
+
*/
|
|
47
|
+
focusFootprintBitmapUri?: Uri;
|
|
48
|
+
/**
|
|
49
|
+
* Specifies the button background bitmap file to display when the button has the key focus.
|
|
50
|
+
* Only set this field to specify a custom bitmap that differs in appearance from the default bitmap.
|
|
51
|
+
* @default ""
|
|
52
|
+
*/
|
|
53
|
+
focusBitmapUri?: Uri;
|
|
54
|
+
/**
|
|
55
|
+
* Specifies a bitmap file for the button icon when the button does not have the key focus.
|
|
56
|
+
* For a button with no icon, set this field to an empty string.
|
|
57
|
+
* @default ""
|
|
58
|
+
*/
|
|
59
|
+
iconUri?: Uri;
|
|
60
|
+
/**
|
|
61
|
+
* Specifies a bitmap file for the button icon when the button has the key focus.
|
|
62
|
+
* For a button with no icon, set this field to an empty string.
|
|
63
|
+
* @default ""
|
|
64
|
+
*/
|
|
65
|
+
focusedIconUri?: Uri;
|
|
66
|
+
/**
|
|
67
|
+
* Specifies the height of the button.
|
|
68
|
+
* @default 64
|
|
69
|
+
*/
|
|
70
|
+
height?: number;
|
|
71
|
+
/**
|
|
72
|
+
* Specifies the minimum width of the button. Must be less than or equal to
|
|
73
|
+
* {@link IButtonDataProps.maxWidth | maxWidth}.
|
|
74
|
+
* @default 0
|
|
75
|
+
*/
|
|
76
|
+
minWidth?: number;
|
|
77
|
+
/**
|
|
78
|
+
* Specifies the maximum width of the button. Must be greater than or equal to
|
|
79
|
+
* {@link IButtonDataProps.minWidth | minWidth}.
|
|
80
|
+
* @default 32767
|
|
81
|
+
*/
|
|
82
|
+
maxWidth?: number;
|
|
83
|
+
width?: number;
|
|
84
|
+
/**
|
|
85
|
+
* Controls whether the focus "footprint" bitmap is displayed when the button does not
|
|
86
|
+
* have the key focus. When a Button node is not a child of a ButtonGroup, typically this
|
|
87
|
+
* should be set to `true` so the button always displays a background image.
|
|
88
|
+
* @default false
|
|
89
|
+
*/
|
|
90
|
+
showFocusFootprint?: boolean;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Properties for the Button node.
|
|
95
|
+
*
|
|
96
|
+
* The Button node is a simple widget that generates a `buttonSelected` event when the user
|
|
97
|
+
* selects it. The button can display a label and/or an icon, as well as a background image.
|
|
98
|
+
* Fields are provided to customize the label text and color depending on whether or not the
|
|
99
|
+
* button has the key focus. Similarly, the bitmaps used for the icon and background can be
|
|
100
|
+
* specified for both focused and unfocused button states.
|
|
101
|
+
*
|
|
102
|
+
* By default, the background of the button is only shown when the button has the key focus.
|
|
103
|
+
* Buttons are typically used in a ButtonGroup node that manages which button in the group
|
|
104
|
+
* will have the key focus when the ButtonGroup node receives the focus.
|
|
105
|
+
*
|
|
106
|
+
* @see {@link https://developer.roku.com/dev/docs/button}
|
|
107
|
+
*/
|
|
108
|
+
export interface IButtonProps extends IButtonDataProps, IGroupProps {
|
|
109
|
+
/**
|
|
110
|
+
* Specifies the text to be displayed as the button label.
|
|
111
|
+
* @default ""
|
|
112
|
+
*/
|
|
113
|
+
text?: string;
|
|
114
|
+
/**
|
|
115
|
+
* Fired when the button is selected by the user (e.g., pressing the OK remote button
|
|
116
|
+
* while the button has key focus).
|
|
117
|
+
*/
|
|
118
|
+
onButtonSelected?: EventHandler<never>;
|
|
119
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// Copyright (c) 2026 Roku, Inc.
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
|
|
4
|
+
import type { IButtonProps } from "./button.props";
|
|
5
|
+
import { Component } from "./types";
|
|
6
|
+
export type { IButtonDataProps, IButtonProps } from "./button.props";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Button is a simple widget that generates a `buttonSelected` event when the user selects it.
|
|
10
|
+
* The button can display a label and/or an icon, as well as a background image. Fields are
|
|
11
|
+
* provided to customize the label text and color depending on whether or not the button has
|
|
12
|
+
* the key focus.
|
|
13
|
+
*
|
|
14
|
+
* By default, the background is only shown when the button has focus. Buttons are typically
|
|
15
|
+
* used in a ButtonGroup node. When a Button is not a child of a ButtonGroup, set
|
|
16
|
+
* `showFocusFootprint` to `true` so it always displays a background image.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```tsx
|
|
20
|
+
* <button
|
|
21
|
+
* text="Play"
|
|
22
|
+
* showFocusFootprint={true}
|
|
23
|
+
* onButtonSelected={() => console.log("Button selected")}
|
|
24
|
+
* />
|
|
25
|
+
* ```
|
|
26
|
+
*
|
|
27
|
+
* @see {@link https://developer.roku.com/dev/docs/button}
|
|
28
|
+
*/
|
|
29
|
+
export const Button: Component<IButtonProps> = props => {
|
|
30
|
+
return <button {...props}></button>;
|
|
31
|
+
};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
// Copyright (c) 2026 Roku, Inc.
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
|
|
4
|
+
import type { ILabelListProps } from "./label-list.props";
|
|
5
|
+
import type { Uri } from "./types";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Properties for the CheckList component.
|
|
9
|
+
*
|
|
10
|
+
* Extends {@link ILabelListProps} with checkbox state management and
|
|
11
|
+
* custom checkbox icon options.
|
|
12
|
+
*
|
|
13
|
+
* @see {@link https://developer.roku.com/dev/docs/checklist}
|
|
14
|
+
*/
|
|
15
|
+
export interface ICheckListProps extends ILabelListProps {
|
|
16
|
+
/**
|
|
17
|
+
* Specifies the checked state of each item in the list.
|
|
18
|
+
* `true` indicates checked, `false` indicates unchecked.
|
|
19
|
+
*
|
|
20
|
+
* When reading, always includes one value per item.
|
|
21
|
+
* When writing with fewer values than items, unspecified items remain unchanged.
|
|
22
|
+
*
|
|
23
|
+
* @default all false
|
|
24
|
+
* @example [true, false, true]
|
|
25
|
+
*/
|
|
26
|
+
checkedState?: boolean[];
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Controls whether pressing OK toggles the checked state of the focused item.
|
|
30
|
+
* When `false`, developer must manage checked state manually via `checkedState`.
|
|
31
|
+
*
|
|
32
|
+
* @default true
|
|
33
|
+
*/
|
|
34
|
+
checkOnSelect?: boolean;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* URI for the checkbox icon when item is checked and not focused.
|
|
38
|
+
* Typically includes the outline of a box with a checkmark indicator inside.
|
|
39
|
+
* Only set to specify a custom bitmap different from default.
|
|
40
|
+
*
|
|
41
|
+
* @example "pkg:/images/checked.png"
|
|
42
|
+
*/
|
|
43
|
+
checkedIconUri?: Uri;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* URI for the checkbox icon when item is unchecked and not focused.
|
|
47
|
+
* Typically includes the outline of an empty box.
|
|
48
|
+
* Only set to specify a custom bitmap different from default.
|
|
49
|
+
*
|
|
50
|
+
* @example "pkg:/images/unchecked.png"
|
|
51
|
+
*/
|
|
52
|
+
uncheckedIconUri?: Uri;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* URI for the checkbox icon when item is checked and has focus.
|
|
56
|
+
* Typically includes the outline of a box with a checkmark indicator inside.
|
|
57
|
+
* Only set to specify a custom bitmap different from default.
|
|
58
|
+
*
|
|
59
|
+
* @example "pkg:/images/checked-focused.png"
|
|
60
|
+
*/
|
|
61
|
+
focusedCheckedIconUri?: Uri;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* URI for the checkbox icon when item is unchecked and has focus.
|
|
65
|
+
* Typically includes the outline of an empty box.
|
|
66
|
+
* Only set to specify a custom bitmap different from default.
|
|
67
|
+
*
|
|
68
|
+
* @example "pkg:/images/unchecked-focused.png"
|
|
69
|
+
*/
|
|
70
|
+
focusedUncheckedIconUri?: Uri;
|
|
71
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
// Copyright (c) 2026 Roku, Inc.
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
|
|
4
|
+
import type { ICheckListProps } from "./check-list.props";
|
|
5
|
+
import { Component } from "./types";
|
|
6
|
+
export type { ICheckListProps } from "./check-list.props";
|
|
7
|
+
|
|
8
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
9
|
+
// CheckList Properties
|
|
10
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* CheckList displays a list of items with optional checkboxes for selection.
|
|
14
|
+
*
|
|
15
|
+
* Each item shows a text string and an optional checkbox icon positioned to the left.
|
|
16
|
+
* Checkboxes display as empty (unchecked) or with a checkmark (checked).
|
|
17
|
+
*
|
|
18
|
+
* Items can optionally hide their checkbox by setting HIDEICON attribute to false
|
|
19
|
+
* on the ContentNode, allowing mixed checkbox and regular list items.
|
|
20
|
+
*
|
|
21
|
+
* @example Basic usage
|
|
22
|
+
* ```tsx
|
|
23
|
+
* <checkList
|
|
24
|
+
* itemSize={[440, 48]}
|
|
25
|
+
* checkedState={[true, false, false]}
|
|
26
|
+
* checkOnSelect={true}
|
|
27
|
+
* content={
|
|
28
|
+
* <contentNode>
|
|
29
|
+
* <contentNode title="Option 1" />
|
|
30
|
+
* <contentNode title="Option 2" />
|
|
31
|
+
* <contentNode title="Option 3" />
|
|
32
|
+
* </contentNode>
|
|
33
|
+
* }
|
|
34
|
+
* />
|
|
35
|
+
* ```
|
|
36
|
+
*
|
|
37
|
+
* @example With mixed items (checkbox and regular)
|
|
38
|
+
* ```tsx
|
|
39
|
+
* <checkList
|
|
40
|
+
* itemSize={[440, 48]}
|
|
41
|
+
* content={
|
|
42
|
+
* <contentNode>
|
|
43
|
+
* <contentNode title="Selectable Option" />
|
|
44
|
+
* <contentNode title="Regular Item" HIDEICON={false} />
|
|
45
|
+
* </contentNode>
|
|
46
|
+
* }
|
|
47
|
+
* />
|
|
48
|
+
* ```
|
|
49
|
+
*
|
|
50
|
+
* @see {@link https://developer.roku.com/dev/docs/checklist}
|
|
51
|
+
* @see {@link https://github.com/rokudev/samples/tree/master/ux%20components/lists%20and%20grids/CheckListExample | Sample App}
|
|
52
|
+
*/
|
|
53
|
+
export const CheckList: Component<ICheckListProps> = props => {
|
|
54
|
+
return <checkList {...props}></checkList>;
|
|
55
|
+
};
|