@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.
- 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 +84 -3
- package/src/__tests__/container.test.tsx +150 -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 +268 -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 +116 -0
- package/src/sg-nodes/effect.tsx +39 -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 +104 -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 +68 -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 +59 -0
- package/src/sg-nodes/standard-message-dialog.props.ts +56 -0
- package/src/sg-nodes/standard-message-dialog.tsx +48 -0
- package/src/sg-nodes/standard-pinpad-dialog.props.ts +64 -0
- package/src/sg-nodes/standard-pinpad-dialog.tsx +46 -0
- package/src/sg-nodes/standard-progress-dialog.props.ts +30 -0
- package/src/sg-nodes/standard-progress-dialog.tsx +43 -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 +573 -0
- package/src/sg-nodes/video.tsx +73 -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,29 @@
|
|
|
1
|
+
// Copyright (c) 2026 Roku, Inc.
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
|
|
4
|
+
import { Component } from "../types";
|
|
5
|
+
import type { IOverhangProps } from "./overhang.props";
|
|
6
|
+
export type { IOverhangProps } from "./overhang.props";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* The Overhang node provides an information bar that is displayed at the top of a screen
|
|
10
|
+
* in many Roku apps. The regions occupied by the overhang can be filled with either a
|
|
11
|
+
* solid color or a bitmap.
|
|
12
|
+
*
|
|
13
|
+
* The overhang typically includes a logo, title, clock, and options indicator, all of
|
|
14
|
+
* which can be customized or hidden as needed.
|
|
15
|
+
*
|
|
16
|
+
* @see {@link https://developer.roku.com/dev/docs/overhang}
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* <overhang
|
|
20
|
+
* title="My Channel"
|
|
21
|
+
* logoUri="pkg:/images/logo.png"
|
|
22
|
+
* showClock={true}
|
|
23
|
+
* showOptions={true}
|
|
24
|
+
* optionsAvailable={true}
|
|
25
|
+
* />
|
|
26
|
+
*/
|
|
27
|
+
export const Overhang: Component<IOverhangProps> = props => {
|
|
28
|
+
return <overhang {...props}></overhang>;
|
|
29
|
+
};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
// Copyright (c) 2026 Roku, Inc.
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
|
|
4
|
+
import type { IGroupProps } from "./group.props";
|
|
5
|
+
import type { EventHandler } from "./types";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Properties for the PanelSet component.
|
|
9
|
+
*
|
|
10
|
+
* PanelSet extends Group and provides the panel sliding behavior seen in the Roku home screen.
|
|
11
|
+
* It manages the position of child Panel nodes and implements left/right panel sliding behavior.
|
|
12
|
+
* When a Left or Back key is pressed, the panels slide to the right, back towards their original
|
|
13
|
+
* home position. When a Right key is pressed, the panels slide left, and panels that slide off
|
|
14
|
+
* the right side of the display are automatically removed from the PanelSet.
|
|
15
|
+
*
|
|
16
|
+
* @see {@link https://developer.roku.com/dev/docs/panelset}
|
|
17
|
+
* @see {@link https://developer.roku.com/dev/docs/sliding-panels-nodes | Sliding Panels Overview}
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```tsx
|
|
21
|
+
* import { PanelSet, Panel, Label } from "@roku-sdk/components";
|
|
22
|
+
*
|
|
23
|
+
* <PanelSet width={1280} height={605} slideDuration={500}>
|
|
24
|
+
* <Panel panelSize="narrow" leftOnly={true}>
|
|
25
|
+
* <Label text="Navigation Menu" translation={[50, 50]} />
|
|
26
|
+
* </Panel>
|
|
27
|
+
* <Panel panelSize="wide" isFullScreen={false}>
|
|
28
|
+
* <Label text="Content Panel" translation={[50, 50]} />
|
|
29
|
+
* </Panel>
|
|
30
|
+
* </PanelSet>
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
export interface IPanelSetProps extends IGroupProps {
|
|
34
|
+
/**
|
|
35
|
+
* Specifies the width of the PanelSet node in local coordinates.
|
|
36
|
+
* In most cases, this should be set to the display width (e.g., 1280 for HD, 1920 for FHD).
|
|
37
|
+
*
|
|
38
|
+
* @default 1280
|
|
39
|
+
*/
|
|
40
|
+
width?: number;
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Specifies the height of the PanelSet node in local coordinates.
|
|
44
|
+
* In most cases, this should be set to the display height minus the overhang height.
|
|
45
|
+
*
|
|
46
|
+
* @default 605
|
|
47
|
+
*/
|
|
48
|
+
height?: number;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Specifies the duration of the slide transition in milliseconds.
|
|
52
|
+
*
|
|
53
|
+
* @default 500
|
|
54
|
+
*/
|
|
55
|
+
slideDuration?: number;
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Fired when the `isGoingBack` field changes.
|
|
59
|
+
* The value is `true` when the PanelSet panels are sliding right, back towards the original
|
|
60
|
+
* home position, as a result of a Left or Back key press. The value is `false` otherwise.
|
|
61
|
+
*
|
|
62
|
+
* @see **ListPanel, GridPanel Best Practices** at the internal RSG SDK documentation (knowledge-base/list-grid-panel-best-practice.md) for handling slidingBack prop
|
|
63
|
+
*/
|
|
64
|
+
onIsGoingBack?: EventHandler<boolean>;
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Fired when the `numPanels` field changes.
|
|
68
|
+
* Contains the current number of Panel nodes that are children of the PanelSet node.
|
|
69
|
+
*/
|
|
70
|
+
onNumPanels?: EventHandler<number>;
|
|
71
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
// Copyright (c) 2026 Roku, Inc.
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
|
|
4
|
+
import type { IPanelSetProps } from "./panel-set.props";
|
|
5
|
+
import { Component } from "./types";
|
|
6
|
+
export type { IPanelSetProps } from "./panel-set.props";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* PanelSet is a Group node subclass that provides the panel sliding behavior seen in the Roku
|
|
10
|
+
* home screen. It manages child Panel nodes and implements left/right panel sliding behavior.
|
|
11
|
+
*
|
|
12
|
+
* In most cases, a PanelSet displays two Panel nodes: one on the left side (the "left panel")
|
|
13
|
+
* and one on the right side (the "right panel"). The panels slide left or right depending on
|
|
14
|
+
* user input, creating a navigation experience similar to the Roku OS.
|
|
15
|
+
*
|
|
16
|
+
* @see {@link https://developer.roku.com/dev/docs/panelset}
|
|
17
|
+
* @see {@link https://developer.roku.com/dev/docs/sliding-panels-nodes | Sliding Panels Overview}
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* Basic PanelSet with narrow and wide panels:
|
|
21
|
+
* ```tsx
|
|
22
|
+
* <panelSet width={1280} height={605}>
|
|
23
|
+
* <panel panelSize="narrow" leftOnly={true}>
|
|
24
|
+
* <label text="Menu" translation={[50, 50]} />
|
|
25
|
+
* </panel>
|
|
26
|
+
* <panel panelSize="wide">
|
|
27
|
+
* <label text="Details" translation={[50, 50]} />
|
|
28
|
+
* </panel>
|
|
29
|
+
* </panelSet>
|
|
30
|
+
* ```
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* PanelSet with event handlers:
|
|
34
|
+
* ```tsx
|
|
35
|
+
* <panelSet
|
|
36
|
+
* width={1920}
|
|
37
|
+
* height={880}
|
|
38
|
+
* slideDuration={300}
|
|
39
|
+
* onIsGoingBack={(e) => console.log("Going back:", e.value)}
|
|
40
|
+
* onNumPanels={(e) => console.log("Panel count:", e.value)}
|
|
41
|
+
* >
|
|
42
|
+
* <panel panelSize="medium">
|
|
43
|
+
* {/* Panel content *\/}
|
|
44
|
+
* </panel>
|
|
45
|
+
* <panel panelSize="medium">
|
|
46
|
+
* {/* Panel content *\/}
|
|
47
|
+
* </panel>
|
|
48
|
+
* </panelSet>
|
|
49
|
+
* ```
|
|
50
|
+
*/
|
|
51
|
+
export const PanelSet: Component<IPanelSetProps> = props => {
|
|
52
|
+
return <panelSet {...props}></panelSet>;
|
|
53
|
+
};
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
// Copyright (c) 2026 Roku, Inc.
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
|
|
4
|
+
import type { IGroupProps } from "./group.props";
|
|
5
|
+
import type { EventHandler } from "./types";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Panel size options for the Panel component.
|
|
9
|
+
* Controls the width and leftPosition of the panel when displayed in a PanelSet.
|
|
10
|
+
*
|
|
11
|
+
* | Value | Meaning |
|
|
12
|
+
* |----------|------------------------------------------------------------------------------|
|
|
13
|
+
* | `narrow` | Set the width and leftPosition fields to the values for a narrow Panel |
|
|
14
|
+
* | `medium` | Set the width and leftPosition fields to the values for a medium width Panel|
|
|
15
|
+
* | `wide` | Set the width and leftPosition fields to the values for a wide Panel |
|
|
16
|
+
* | `full` | Set the width and leftPosition fields to the values for a full width Panel |
|
|
17
|
+
*
|
|
18
|
+
* Note: PanelSet usage mandates that whenever two Panels are visible, they should include
|
|
19
|
+
* either one narrow and one wide panel or two medium width panels. If one Panel is visible,
|
|
20
|
+
* its panelSize should be set to "full".
|
|
21
|
+
*/
|
|
22
|
+
export type PanelSize = "narrow" | "medium" | "wide" | "full";
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Properties for the Panel component.
|
|
26
|
+
*
|
|
27
|
+
* Panel extends Group and is used to create sliding panels for app UI,
|
|
28
|
+
* similar to those in the Roku OS home screen.
|
|
29
|
+
*
|
|
30
|
+
* @see {@link https://developer.roku.com/dev/docs/panel}
|
|
31
|
+
* @see {@link https://developer.roku.com/dev/docs/sliding-panels-nodes Sliding Panels Overview}
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```tsx
|
|
35
|
+
* import { Panel, PanelSet } from "@roku-sdk/components";
|
|
36
|
+
*
|
|
37
|
+
* <PanelSet>
|
|
38
|
+
* <Panel panelSize="medium" leftOnly={true}>
|
|
39
|
+
* <Label text="Panel Content" />
|
|
40
|
+
* </Panel>
|
|
41
|
+
* </PanelSet>
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
export interface IPanelProps extends IGroupProps {
|
|
45
|
+
/**
|
|
46
|
+
* Specifies one of the default panel sizes. Setting this field causes the width
|
|
47
|
+
* and leftPosition fields to be set to values that match the RSG preferred layout
|
|
48
|
+
* for a panel of the specified size.
|
|
49
|
+
*
|
|
50
|
+
* @default "narrow"
|
|
51
|
+
*/
|
|
52
|
+
panelSize?: PanelSize;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Specifies the width of the panel in pixels. In most cases, this should be set
|
|
56
|
+
* by setting the panelSize field to one of the pre-configured settings.
|
|
57
|
+
*
|
|
58
|
+
* @default 388
|
|
59
|
+
*/
|
|
60
|
+
width?: number;
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Specifies the height of the panel in pixels. In most cases, this will be set
|
|
64
|
+
* by the PanelSet and should be treated as a read-only value.
|
|
65
|
+
*
|
|
66
|
+
* @default -1
|
|
67
|
+
*/
|
|
68
|
+
height?: number;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Specifies the horizontal position of the panel relative to the left edge of the
|
|
72
|
+
* PanelSet (which is at the left edge of the display by default). In most cases,
|
|
73
|
+
* this should be set by setting the panelSize field to one of the pre-configured settings.
|
|
74
|
+
*
|
|
75
|
+
* @default 105
|
|
76
|
+
*/
|
|
77
|
+
leftPosition?: number;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Provides information to the PanelSet that this Panel should never appear in the
|
|
81
|
+
* right position of the PanelSet. When the panels are sliding back towards the home
|
|
82
|
+
* position (as a result of a Left or Back key press), and the panel slides into the
|
|
83
|
+
* right position, the PanelSet initiates another slide in the same back direction
|
|
84
|
+
* so that the panel does not end up on the right.
|
|
85
|
+
*
|
|
86
|
+
* @default false
|
|
87
|
+
*/
|
|
88
|
+
leftOnly?: boolean;
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Provides information to the PanelSet as to whether or not this panel has another
|
|
92
|
+
* panel to its right. If set to true, the PanelSet's right arrow indicator is displayed
|
|
93
|
+
* and pressing the right arrow button on the remote triggers the PanelSet to move the
|
|
94
|
+
* focus one panel to the right, sliding the Panels as needed to make sure the panel
|
|
95
|
+
* that has the focus ends up onscreen. If set to false, the PanelSet's right arrow
|
|
96
|
+
* indicator is not displayed and the right arrow button does not trigger any change
|
|
97
|
+
* to the focused panel.
|
|
98
|
+
*
|
|
99
|
+
* @default false
|
|
100
|
+
*/
|
|
101
|
+
hasNextPanel?: boolean;
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Indicates that this panel should be the only panel displayed (i.e., it will take
|
|
105
|
+
* up both the left and right positions in the PanelSet).
|
|
106
|
+
*
|
|
107
|
+
* @default false
|
|
108
|
+
*/
|
|
109
|
+
isFullScreen?: boolean;
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Setting this field to a value greater than 1 causes the PanelSet to move the focus
|
|
113
|
+
* back that many panels when the user presses the left arrow button, sliding the
|
|
114
|
+
* Panels as needed to make sure the panel that has the focus ends up onscreen.
|
|
115
|
+
*
|
|
116
|
+
* @default 1
|
|
117
|
+
*/
|
|
118
|
+
goBackCount?: number;
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* When set to true, pressing the OK/Select button on the remote control causes the
|
|
122
|
+
* PanelSet focus to move to the next panel.
|
|
123
|
+
*
|
|
124
|
+
* `ListPanel` may override this transiently. When its next panel is supplied
|
|
125
|
+
* asynchronously, the field is forced to false for the few milliseconds the previously
|
|
126
|
+
* built panel is still attached, then restored to the value it had when suppression
|
|
127
|
+
* began — so a change made to this prop during that window is not picked up.
|
|
128
|
+
*
|
|
129
|
+
* @default true
|
|
130
|
+
*/
|
|
131
|
+
selectButtonMovesPanelForward?: boolean;
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* When the panel is used as part of the OverhangPanelSetScene, setting the overhangTitle
|
|
135
|
+
* field will cause that text to be displayed as the title in the overhang when the panel
|
|
136
|
+
* slides into the left position of the PanelSet.
|
|
137
|
+
*
|
|
138
|
+
* @default ""
|
|
139
|
+
*/
|
|
140
|
+
overhangTitle?: string;
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* When the panel is used as part of the OverhangPanelSetScene, setting the clockText
|
|
144
|
+
* field will cause that text to be displayed instead of the clock in the overhang when
|
|
145
|
+
* the panel slides into the left position of the PanelSet.
|
|
146
|
+
*
|
|
147
|
+
* @default ""
|
|
148
|
+
*/
|
|
149
|
+
clockText?: string;
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* When the panel is used as part of the OverhangPanelSetScene, setting optionsAvailable
|
|
153
|
+
* will enable/disable the options button handling when the panel slides into the left
|
|
154
|
+
* position of the PanelSet. The overhang's options prompt will change appearance to
|
|
155
|
+
* provide feedback to the user that the options button is enabled/disabled.
|
|
156
|
+
*
|
|
157
|
+
* @default false
|
|
158
|
+
*/
|
|
159
|
+
optionsAvailable?: boolean;
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* Event handler called when the panel's offscreen left state changes.
|
|
163
|
+
* This field is set by the PanelSet to indicate that the panel is positioned offscreen
|
|
164
|
+
* of the left edge of the PanelSet. This field is often observed to cancel outstanding
|
|
165
|
+
* load requests for images that are displayed on the panel.
|
|
166
|
+
*/
|
|
167
|
+
onIsOffscreenLeft?: EventHandler<boolean>;
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* Event handler called when the panel's left orientation changes.
|
|
171
|
+
* When the panel is used as part of the OverhangPanelSetScene, leftOrientation will be
|
|
172
|
+
* set to true when the panel moves into the left position of the PanelSet and set to
|
|
173
|
+
* false when the panel moves into the right position of the PanelSet.
|
|
174
|
+
*/
|
|
175
|
+
onLeftOrientation?: EventHandler<boolean>;
|
|
176
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
// Copyright (c) 2026 Roku, Inc.
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
|
|
4
|
+
import type { IPanelProps } from "./panel.props";
|
|
5
|
+
import { Component } from "./types";
|
|
6
|
+
export type { PanelSize, IPanelProps } from "./panel.props";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Panel is a Group node subclass used to create sliding panels for app UI,
|
|
10
|
+
* similar to those in the Roku OS home screen.
|
|
11
|
+
*
|
|
12
|
+
* Panels provide a standardized way to create multi-level navigation screens where users
|
|
13
|
+
* can drill down through content. When used within a PanelSet, panels automatically handle
|
|
14
|
+
* sliding animations and focus management.
|
|
15
|
+
*
|
|
16
|
+
* The Panel component supports various size presets through the `panelSize` prop, or
|
|
17
|
+
* custom dimensions through `width` and `height` props. Navigation behavior can be
|
|
18
|
+
* customized through props like `hasNextPanel`, `leftOnly`, and `goBackCount`.
|
|
19
|
+
*
|
|
20
|
+
* @see {@link https://developer.roku.com/dev/docs/panel}
|
|
21
|
+
* @see {@link https://developer.roku.com/dev/docs/sliding-panels-nodes Sliding Panels Overview}
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* Basic panel usage:
|
|
25
|
+
* ```tsx
|
|
26
|
+
* <panel panelSize="medium">
|
|
27
|
+
* <label text="Hello Panel" translation={[50, 50]} />
|
|
28
|
+
* </panel>
|
|
29
|
+
* ```
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* Panel with navigation control:
|
|
33
|
+
* ```tsx
|
|
34
|
+
* <panel
|
|
35
|
+
* panelSize="wide"
|
|
36
|
+
* leftOnly={true}
|
|
37
|
+
* hasNextPanel={true}
|
|
38
|
+
* onIsOffscreenLeft={(isOffscreen) => {
|
|
39
|
+
* console.log("Panel offscreen:", isOffscreen);
|
|
40
|
+
* }}
|
|
41
|
+
* >
|
|
42
|
+
* <markupList id="menuList" />
|
|
43
|
+
* </panel>
|
|
44
|
+
* ```
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* Full screen panel:
|
|
48
|
+
* ```tsx
|
|
49
|
+
* <panel isFullScreen={true} hasNextPanel={false}>
|
|
50
|
+
* {/* Full screen content *\/}
|
|
51
|
+
* </panel>
|
|
52
|
+
* ```
|
|
53
|
+
*/
|
|
54
|
+
export const Panel: Component<IPanelProps> = props => {
|
|
55
|
+
return <panel {...props}></panel>;
|
|
56
|
+
};
|
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
// Copyright (c) 2026 Roku, Inc.
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
|
|
4
|
+
import type { IArrayGridProps } from "./array-grid";
|
|
5
|
+
import type { PosterDisplayMode } from "./poster.props";
|
|
6
|
+
import type { FontValue, HorizAlign, JSX, Uri, Vector2D, VertAlign } from "./types";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Vertical alignment options for PosterGrid captions.
|
|
10
|
+
*
|
|
11
|
+
* Extends the standard vertical alignment with additional positioning options
|
|
12
|
+
* specific to captions relative to the poster.
|
|
13
|
+
*
|
|
14
|
+
* @see {@link https://developer.roku.com/dev/docs/postergrid}
|
|
15
|
+
*/
|
|
16
|
+
export type CaptionVertAlignment = VertAlign | "above" | "below";
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Properties for the PosterGrid node.
|
|
20
|
+
*
|
|
21
|
+
* PosterGrid is a simple grid class that can be used to display two-dimensional grids of posters.
|
|
22
|
+
* In addition to the poster, each item in the grid can include up to two lines of captions.
|
|
23
|
+
*
|
|
24
|
+
* The number of columns in the PosterGrid is fixed and the number of rows varies. The items in the
|
|
25
|
+
* grid fill each row from left to right, then top to bottom.
|
|
26
|
+
*
|
|
27
|
+
* The layout of rows and columns in the grid is very flexible. Possible layouts include:
|
|
28
|
+
* - A simple layout with all posters in the grid having the same size
|
|
29
|
+
* - A layout with posters in some rows having varying heights and/or columns having varying widths
|
|
30
|
+
* - A layout with varying width rows and columns and items that occupy one or more rows and columns
|
|
31
|
+
*
|
|
32
|
+
* The grid items can be organized into sections that are demarcated by labelled horizontal
|
|
33
|
+
* divider lines between the sections.
|
|
34
|
+
*
|
|
35
|
+
* @see {@link https://developer.roku.com/dev/docs/postergrid}
|
|
36
|
+
*
|
|
37
|
+
* @example Simple PosterGrid setup
|
|
38
|
+
* ```tsx
|
|
39
|
+
* <PosterGrid
|
|
40
|
+
* basePosterSize={[240, 240]}
|
|
41
|
+
* itemSpacing={[32, 32]}
|
|
42
|
+
* caption1NumLines={1}
|
|
43
|
+
* caption2NumLines={1}
|
|
44
|
+
* numColumns={4}
|
|
45
|
+
* numRows={3}
|
|
46
|
+
* content={gridContent}
|
|
47
|
+
* onItemSelected={(index) => handleSelection(index)}
|
|
48
|
+
* />
|
|
49
|
+
* ```
|
|
50
|
+
*/
|
|
51
|
+
export interface IPosterGridProps extends IArrayGridProps {
|
|
52
|
+
// ─────────────────────────────────────────────────────────────────────────
|
|
53
|
+
// Content Data
|
|
54
|
+
// ─────────────────────────────────────────────────────────────────────────
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Specifies the content for the grid.
|
|
58
|
+
*
|
|
59
|
+
* Should be a ContentNode with child nodes for each item in the grid.
|
|
60
|
+
* If the data contains section markers, section dividers will be drawn between each section.
|
|
61
|
+
* These section dividers may contain an icon and/or a string.
|
|
62
|
+
*
|
|
63
|
+
* @see {@link https://developer.roku.com/dev/docs/postergrid#data-bindings | Data Bindings}
|
|
64
|
+
*/
|
|
65
|
+
content: JSX.Element;
|
|
66
|
+
|
|
67
|
+
// ─────────────────────────────────────────────────────────────────────────
|
|
68
|
+
// Poster Configuration
|
|
69
|
+
// ─────────────────────────────────────────────────────────────────────────
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Specifies the width and height of the posters in the grid.
|
|
73
|
+
*
|
|
74
|
+
* For simple layouts, set this to the dimensions of each poster image.
|
|
75
|
+
* Can be overridden per-row with `rowHeights` or per-column with `columnWidths`.
|
|
76
|
+
*
|
|
77
|
+
* @default [0, 0]
|
|
78
|
+
* @example [240, 240]
|
|
79
|
+
*/
|
|
80
|
+
basePosterSize?: Vector2D;
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Enables a performance optimization when most poster items have the same size.
|
|
84
|
+
*
|
|
85
|
+
* When true, uses a texture atlas that stores the posters in the grid, providing
|
|
86
|
+
* rendering performance benefits for grids where most posters match `basePosterSize`.
|
|
87
|
+
*
|
|
88
|
+
* Set to false for grids with:
|
|
89
|
+
* - Complicated layouts with several posters differing from `basePosterSize`
|
|
90
|
+
* - Only a few large posters (5-8, or about quarter screen height/width)
|
|
91
|
+
*
|
|
92
|
+
* @default true
|
|
93
|
+
*/
|
|
94
|
+
useAtlas?: boolean;
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Provides automatic scaling of posters when `useAtlas` is set to false.
|
|
98
|
+
*
|
|
99
|
+
* If loading very large images (larger than UI resolution), you must set a scaling
|
|
100
|
+
* option other than `noScale`, otherwise the image may fail to load.
|
|
101
|
+
*
|
|
102
|
+
* - `noScale`: No scaling applied
|
|
103
|
+
* - `scaleToFit`: Scale to fit, preserving aspect ratio (letterboxing/pillarboxing)
|
|
104
|
+
* - `scaleToFill`: Stretch to fill, distorting if aspect ratios differ
|
|
105
|
+
* - `scaleToZoom`: Scale to fill, preserving aspect ratio but cropping
|
|
106
|
+
*
|
|
107
|
+
* @default "noScale"
|
|
108
|
+
*/
|
|
109
|
+
posterDisplayMode?: PosterDisplayMode;
|
|
110
|
+
|
|
111
|
+
// ─────────────────────────────────────────────────────────────────────────
|
|
112
|
+
// Loading State Bitmaps
|
|
113
|
+
// ─────────────────────────────────────────────────────────────────────────
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Specifies the bitmap file to use to suggest where images would appear
|
|
117
|
+
* for empty grids and empty sections of grids.
|
|
118
|
+
*
|
|
119
|
+
* Only set this field to specify a custom bitmap that differs from the default.
|
|
120
|
+
*/
|
|
121
|
+
imageWellBitmapUri?: Uri;
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Specifies a bitmap file to display while a grid item's poster is loading.
|
|
125
|
+
*
|
|
126
|
+
* To execute a seamless cross-fade transition between posters, set this
|
|
127
|
+
* to the URI of the currently displayed poster.
|
|
128
|
+
*/
|
|
129
|
+
loadingBitmapUri?: Uri;
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Specifies an opacity value used to render the loading bitmap.
|
|
133
|
+
*
|
|
134
|
+
* @default 1.0
|
|
135
|
+
*/
|
|
136
|
+
loadingBitmapOpacity?: number;
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Specifies a bitmap file to display when a grid item poster fails to load.
|
|
140
|
+
*/
|
|
141
|
+
failedBitmapUri?: Uri;
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* Specifies an opacity value used to render the failed bitmap.
|
|
145
|
+
*
|
|
146
|
+
* @default 1.0
|
|
147
|
+
*/
|
|
148
|
+
failedBitmapOpacity?: number;
|
|
149
|
+
|
|
150
|
+
// ─────────────────────────────────────────────────────────────────────────
|
|
151
|
+
// Caption Configuration
|
|
152
|
+
// ─────────────────────────────────────────────────────────────────────────
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Specifies the font for the grid item first caption.
|
|
156
|
+
* Can be a SystemFont enum, registry font string, or Font component.
|
|
157
|
+
*
|
|
158
|
+
* @default system default
|
|
159
|
+
* @example
|
|
160
|
+
* ```tsx
|
|
161
|
+
* // Using SystemFont enum (recommended)
|
|
162
|
+
* caption1Font={SystemFont.Medium}
|
|
163
|
+
*
|
|
164
|
+
* // Using registry font string
|
|
165
|
+
* caption1Font="font:MediumSystemFont"
|
|
166
|
+
*
|
|
167
|
+
* // Using Font component for custom size
|
|
168
|
+
* caption1Font={<Font uri="pkg:/fonts/caption.ttf" size={20} />}
|
|
169
|
+
* ```
|
|
170
|
+
*/
|
|
171
|
+
caption1Font?: FontValue;
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* Specifies the color for the grid item first caption.
|
|
175
|
+
*
|
|
176
|
+
* @default "0xddddddff"
|
|
177
|
+
*/
|
|
178
|
+
caption1Color?: string;
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* Specifies the number of lines to render for the grid item first caption.
|
|
182
|
+
*
|
|
183
|
+
* Set to 0 to hide the first caption.
|
|
184
|
+
*
|
|
185
|
+
* @default 0
|
|
186
|
+
*/
|
|
187
|
+
caption1NumLines?: number;
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* Specifies the font for the grid item second caption.
|
|
191
|
+
* Can be a SystemFont enum, registry font string, or Font component.
|
|
192
|
+
*
|
|
193
|
+
* @default system default
|
|
194
|
+
* @example
|
|
195
|
+
* ```tsx
|
|
196
|
+
* // Using SystemFont enum (recommended)
|
|
197
|
+
* caption2Font={SystemFont.Small}
|
|
198
|
+
*
|
|
199
|
+
* // Using registry font string
|
|
200
|
+
* caption2Font="font:SmallSystemFont"
|
|
201
|
+
*
|
|
202
|
+
* // Using Font component for custom size
|
|
203
|
+
* caption2Font={<Font uri="pkg:/fonts/caption.ttf" size={18} />}
|
|
204
|
+
* ```
|
|
205
|
+
*/
|
|
206
|
+
caption2Font?: FontValue;
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* Specifies the color for the grid item second caption.
|
|
210
|
+
*
|
|
211
|
+
* @default "0xddddddff"
|
|
212
|
+
*/
|
|
213
|
+
caption2Color?: string;
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* Specifies the number of lines to render for the grid item second caption.
|
|
217
|
+
*
|
|
218
|
+
* Set to 0 to hide the second caption.
|
|
219
|
+
*
|
|
220
|
+
* @default 0
|
|
221
|
+
*/
|
|
222
|
+
caption2NumLines?: number;
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* Specifies a bitmap file to render as a background for the grid item captions.
|
|
226
|
+
*/
|
|
227
|
+
captionBackgroundBitmapUri?: Uri;
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* Specifies the horizontal positioning of the grid item captions.
|
|
231
|
+
*
|
|
232
|
+
* - `left`: Left-justify the caption relative to the grid item poster
|
|
233
|
+
* - `center`: Center-justify the caption relative to the grid item poster
|
|
234
|
+
* - `right`: Right-justify the caption relative to the grid item poster
|
|
235
|
+
*
|
|
236
|
+
* Set `enableCaptionScrolling` to false to use `captionHorizAlignment`.
|
|
237
|
+
*
|
|
238
|
+
* @default "center"
|
|
239
|
+
*/
|
|
240
|
+
captionHorizAlignment?: HorizAlign;
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* Specifies the vertical positioning of the grid item captions.
|
|
244
|
+
*
|
|
245
|
+
* - `above`: Position caption so bottom lies just above the poster
|
|
246
|
+
* - `top`: Align top of caption with top edge of poster
|
|
247
|
+
* - `center`: Align vertical center of caption with center of poster
|
|
248
|
+
* - `bottom`: Align bottom of caption with bottom edge of poster
|
|
249
|
+
* - `below`: Position caption so top lies just below the poster
|
|
250
|
+
*
|
|
251
|
+
* @default "below"
|
|
252
|
+
*/
|
|
253
|
+
captionVertAlignment?: CaptionVertAlignment;
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* Specifies the spacing in pixels between lines of the caption.
|
|
257
|
+
*
|
|
258
|
+
* @default 0
|
|
259
|
+
*/
|
|
260
|
+
captionLineSpacing?: number;
|
|
261
|
+
|
|
262
|
+
/**
|
|
263
|
+
* If a caption background is specified, this field specifies whether or not
|
|
264
|
+
* to display the caption background when the caption text is empty.
|
|
265
|
+
*
|
|
266
|
+
* @default true
|
|
267
|
+
*/
|
|
268
|
+
showBackgroundForEmptyCaptions?: boolean;
|
|
269
|
+
|
|
270
|
+
/**
|
|
271
|
+
* Specifies whether or not to scroll single line captions when it is necessary
|
|
272
|
+
* to ellipsize the caption because it is wider than the column containing the grid item.
|
|
273
|
+
*
|
|
274
|
+
* @default true
|
|
275
|
+
*/
|
|
276
|
+
enableCaptionScrolling?: boolean;
|
|
277
|
+
}
|