@lcars-gui/federation 0.0.0-stage → 0.1.1
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/LICENSE +21 -0
- package/README.md +58 -2
- package/dist/fonts/Antonio/Antonio-latin-ext.woff2 +0 -0
- package/dist/fonts/Antonio/Antonio-latin.woff2 +0 -0
- package/dist/fonts/Antonio/OFL.txt +93 -0
- package/dist/index.d.ts +165 -0
- package/dist/index.global.js +292 -0
- package/dist/index.js +155 -0
- package/dist/react/index.d.ts +241 -0
- package/dist/react/index.js +506 -0
- package/dist/themes/ds9.css +5 -0
- package/dist/themes/picard.css +5 -0
- package/dist/themes/tng.css +5 -0
- package/dist/ui.css +959 -0
- package/package.json +71 -4
- package/tokens/alerts/red.json +9 -0
- package/tokens/alerts/yellow.json +9 -0
- package/tokens/base.json +51 -0
- package/tokens/themes/ds9.json +9 -0
- package/tokens/themes/picard.json +9 -0
- package/tokens/themes/tng.json +16 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
// src/shared.ts
|
|
2
|
+
function colorAttribute(color) {
|
|
3
|
+
return color ? { "data-color": String(color) } : {};
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
// src/button.ts
|
|
7
|
+
var defaultButtonProps = {
|
|
8
|
+
color: 1,
|
|
9
|
+
size: "m",
|
|
10
|
+
shape: "capsule",
|
|
11
|
+
align: "center",
|
|
12
|
+
disabled: false
|
|
13
|
+
};
|
|
14
|
+
var buttonClassName = "lcar-btn-std";
|
|
15
|
+
function normalizeButtonProps(props) {
|
|
16
|
+
return {
|
|
17
|
+
...defaultButtonProps,
|
|
18
|
+
...props
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
function buttonDataAttributes(props) {
|
|
22
|
+
const { color, size, length, shape, align } = normalizeButtonProps(props);
|
|
23
|
+
return {
|
|
24
|
+
"data-color": String(color),
|
|
25
|
+
"data-size": size,
|
|
26
|
+
...length && { "data-length": length },
|
|
27
|
+
...shape !== "capsule" && { "data-shape": shape },
|
|
28
|
+
...align === "bottom-right" && { "data-align": "br" }
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// src/frame.ts
|
|
33
|
+
var frameClassNames = {
|
|
34
|
+
elbow: "lcar-elbow",
|
|
35
|
+
bar: "lcar-bar",
|
|
36
|
+
block: "lcar-block",
|
|
37
|
+
title: "lcar-title",
|
|
38
|
+
stack: "lcar-stack",
|
|
39
|
+
frame: "lcar-frame",
|
|
40
|
+
frameTop: "lcar-frame-top",
|
|
41
|
+
frameBottom: "lcar-frame-bottom",
|
|
42
|
+
frameContent: "lcar-frame-content",
|
|
43
|
+
frameHeader: "lcar-frame-header"
|
|
44
|
+
};
|
|
45
|
+
function elbowDataAttributes({ corner = "tl", color }) {
|
|
46
|
+
return { "data-corner": corner, ...colorAttribute(color) };
|
|
47
|
+
}
|
|
48
|
+
function barDataAttributes({ color, cap, length }) {
|
|
49
|
+
return {
|
|
50
|
+
...colorAttribute(color),
|
|
51
|
+
...cap && { "data-cap": cap },
|
|
52
|
+
...length && { "data-length": length }
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
function blockDataAttributes({ color, fill }) {
|
|
56
|
+
return {
|
|
57
|
+
...colorAttribute(color),
|
|
58
|
+
...fill && { "data-fill": "" }
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// src/display.ts
|
|
63
|
+
import { seededRandom } from "@lcars-gui/core";
|
|
64
|
+
var displayClassNames = {
|
|
65
|
+
cascade: "lcar-cascade",
|
|
66
|
+
cascadeCol: "lcar-cascade-col",
|
|
67
|
+
readout: "lcar-readout",
|
|
68
|
+
number: "lcar-number",
|
|
69
|
+
divider: "lcar-divider",
|
|
70
|
+
grid: "lcar-grid",
|
|
71
|
+
level: "lcar-level",
|
|
72
|
+
gauge: "lcar-gauge",
|
|
73
|
+
sensor: "lcar-sensor",
|
|
74
|
+
blip: "lcar-blip",
|
|
75
|
+
scan: "lcar-scan",
|
|
76
|
+
status: "lcar-status",
|
|
77
|
+
alert: "lcar-alert",
|
|
78
|
+
alertTitle: "lcar-alert-title",
|
|
79
|
+
alertText: "lcar-alert-text"
|
|
80
|
+
};
|
|
81
|
+
var controlClassNames = {
|
|
82
|
+
tabs: "lcar-tabs",
|
|
83
|
+
tablist: "lcar-tablist",
|
|
84
|
+
tab: "lcar-tab",
|
|
85
|
+
tabpanel: "lcar-tabpanel",
|
|
86
|
+
field: "lcar-field",
|
|
87
|
+
fieldLabel: "lcar-field-label",
|
|
88
|
+
input: "lcar-input",
|
|
89
|
+
range: "lcar-range",
|
|
90
|
+
keypad: "lcar-keypad",
|
|
91
|
+
keypadDisplay: "lcar-keypad-display"
|
|
92
|
+
};
|
|
93
|
+
function cascadeNumbers(columns, rows, seed = 47) {
|
|
94
|
+
const random = seededRandom(seed);
|
|
95
|
+
return Array.from({ length: columns }, (_, col) => {
|
|
96
|
+
const digits = 2 + col * 3 % 5;
|
|
97
|
+
return Array.from(
|
|
98
|
+
{ length: rows },
|
|
99
|
+
() => String(Math.floor(random() * 10 ** digits)).padStart(digits, "0")
|
|
100
|
+
);
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
function levelSegments(value, segments = 10, max = 100) {
|
|
104
|
+
const lit = Math.round(Math.min(Math.max(value, 0), max) / max * segments);
|
|
105
|
+
return Array.from({ length: segments }, (_, i) => i < lit);
|
|
106
|
+
}
|
|
107
|
+
function toPercent(value, max = 100) {
|
|
108
|
+
return Math.min(Math.max(value / max * 100, 0), 100);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
// src/behaviors.ts
|
|
112
|
+
import { initBehaviors } from "@lcars-gui/core";
|
|
113
|
+
import { pressedChangeEvent } from "@lcars-gui/core";
|
|
114
|
+
function initLcars(options = {}) {
|
|
115
|
+
fillCascades(options.root);
|
|
116
|
+
return initBehaviors(
|
|
117
|
+
{
|
|
118
|
+
control: `.${buttonClassName}, .${controlClassNames.tab}`,
|
|
119
|
+
keypad: `.${controlClassNames.keypad}`,
|
|
120
|
+
keypadKey: `.${buttonClassName}`,
|
|
121
|
+
keypadDisplay: `.${controlClassNames.keypadDisplay}`
|
|
122
|
+
},
|
|
123
|
+
options
|
|
124
|
+
);
|
|
125
|
+
}
|
|
126
|
+
function fillCascades(root = document) {
|
|
127
|
+
root.querySelectorAll(`.${displayClassNames.cascade}[data-columns]`).forEach((el, k) => {
|
|
128
|
+
const { columns, rows = "6", seed } = el.dataset;
|
|
129
|
+
const data = cascadeNumbers(Number(columns), Number(rows), seed ? Number(seed) : 47 + k);
|
|
130
|
+
el.innerHTML = data.map((col, c) => `<div class="${displayClassNames.cascadeCol}">${col.map((n, r) => `<span style="--i:${r * 2 + c}">${n}</span>`).join("")}</div>`).join("");
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
// src/index.ts
|
|
135
|
+
import { createLcarsSound } from "@lcars-gui/core";
|
|
136
|
+
export {
|
|
137
|
+
barDataAttributes,
|
|
138
|
+
blockDataAttributes,
|
|
139
|
+
buttonClassName,
|
|
140
|
+
buttonDataAttributes,
|
|
141
|
+
cascadeNumbers,
|
|
142
|
+
colorAttribute,
|
|
143
|
+
controlClassNames,
|
|
144
|
+
createLcarsSound,
|
|
145
|
+
defaultButtonProps,
|
|
146
|
+
displayClassNames,
|
|
147
|
+
elbowDataAttributes,
|
|
148
|
+
fillCascades,
|
|
149
|
+
frameClassNames,
|
|
150
|
+
initLcars,
|
|
151
|
+
levelSegments,
|
|
152
|
+
normalizeButtonProps,
|
|
153
|
+
pressedChangeEvent,
|
|
154
|
+
toPercent
|
|
155
|
+
};
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { ButtonHTMLAttributes, HTMLAttributes, ReactNode, InputHTMLAttributes } from 'react';
|
|
3
|
+
import { LcarsSoundKind } from '@lcars-gui/core';
|
|
4
|
+
export { LcarsSoundKind } from '@lcars-gui/core';
|
|
5
|
+
export { SoundProvider, SoundProviderProps, useLcarsSound } from '@lcars-gui/core/react';
|
|
6
|
+
|
|
7
|
+
type LcarsColor = 1 | 2 | 3 | 4 | 5 | 6 | 7;
|
|
8
|
+
type LcarsLength = "xs" | "s" | "m" | "l" | "xl";
|
|
9
|
+
|
|
10
|
+
type ButtonColor = LcarsColor;
|
|
11
|
+
type ButtonSize = "xs" | "s" | "m" | "l" | "xl";
|
|
12
|
+
type ButtonLength = LcarsLength;
|
|
13
|
+
type ButtonShape = "capsule" | "rect" | "cap-left" | "cap-right";
|
|
14
|
+
type ButtonAlign = "center" | "bottom-right";
|
|
15
|
+
/**
|
|
16
|
+
* Platform-neutral button props (without events/children,
|
|
17
|
+
* those come from the respective renderer).
|
|
18
|
+
*/
|
|
19
|
+
interface ButtonProps$1 {
|
|
20
|
+
color?: ButtonColor;
|
|
21
|
+
size?: ButtonSize;
|
|
22
|
+
length?: ButtonLength;
|
|
23
|
+
shape?: ButtonShape;
|
|
24
|
+
align?: ButtonAlign;
|
|
25
|
+
disabled?: boolean;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
type ElbowCorner = "tl" | "tr" | "bl" | "br";
|
|
29
|
+
type BarCap = "left" | "right" | "both";
|
|
30
|
+
interface ElbowProps$1 {
|
|
31
|
+
corner?: ElbowCorner;
|
|
32
|
+
color?: LcarsColor;
|
|
33
|
+
}
|
|
34
|
+
interface BarProps$1 {
|
|
35
|
+
color?: LcarsColor;
|
|
36
|
+
cap?: BarCap;
|
|
37
|
+
length?: LcarsLength;
|
|
38
|
+
}
|
|
39
|
+
interface BlockProps$1 {
|
|
40
|
+
color?: LcarsColor;
|
|
41
|
+
fill?: boolean;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
type LcarsTheme = "tng" | "ds9" | "picard";
|
|
45
|
+
type AlertLevel = "red" | "yellow";
|
|
46
|
+
type StatusKind = "ok" | "warn" | "error" | "off";
|
|
47
|
+
type Orientation = "horizontal" | "vertical";
|
|
48
|
+
|
|
49
|
+
type ButtonProps = ButtonProps$1 & Omit<ButtonHTMLAttributes<HTMLButtonElement>, "color"> & {
|
|
50
|
+
/** Sound on click (only inside a SoundProvider); false = silent */
|
|
51
|
+
sound?: LcarsSoundKind | false;
|
|
52
|
+
};
|
|
53
|
+
declare const Button: react.ForwardRefExoticComponent<ButtonProps$1 & Omit<ButtonHTMLAttributes<HTMLButtonElement>, "color"> & {
|
|
54
|
+
/** Sound on click (only inside a SoundProvider); false = silent */
|
|
55
|
+
sound?: LcarsSoundKind | false;
|
|
56
|
+
} & react.RefAttributes<HTMLButtonElement>>;
|
|
57
|
+
|
|
58
|
+
type DivProps$1 = Omit<HTMLAttributes<HTMLDivElement>, "color">;
|
|
59
|
+
type ElbowProps = ElbowProps$1 & DivProps$1;
|
|
60
|
+
/** L-shaped corner that connects the sidebar and a bar. */
|
|
61
|
+
declare function Elbow({ corner, color, className, ...rest }: ElbowProps): react.JSX.Element;
|
|
62
|
+
type BarProps = BarProps$1 & DivProps$1;
|
|
63
|
+
/** Horizontal bar, optionally with a rounded end (end cap). */
|
|
64
|
+
declare function Bar({ color, cap, length, className, ...rest }: BarProps): react.JSX.Element;
|
|
65
|
+
type BlockProps = BlockProps$1 & DivProps$1;
|
|
66
|
+
/** Rectangular segment, e.g. in the sidebar; the label sits bottom right. */
|
|
67
|
+
declare function Block({ color, fill, className, ...rest }: BlockProps): react.JSX.Element;
|
|
68
|
+
type TitleProps = {
|
|
69
|
+
color?: LcarsColor;
|
|
70
|
+
} & Omit<HTMLAttributes<HTMLHeadingElement>, "color">;
|
|
71
|
+
/** Title in the bar row. */
|
|
72
|
+
declare function Title({ color, className, ...rest }: TitleProps): react.JSX.Element;
|
|
73
|
+
/** Vertical stack of segments with even gaps. */
|
|
74
|
+
declare function Stack({ className, ...rest }: HTMLAttributes<HTMLDivElement>): react.JSX.Element;
|
|
75
|
+
interface FrameProps extends Omit<DivProps$1, "title"> {
|
|
76
|
+
color?: LcarsColor;
|
|
77
|
+
title?: ReactNode;
|
|
78
|
+
/** Label in the top/bottom elbow, e.g. a number like "47-1138" */
|
|
79
|
+
topLabel?: ReactNode;
|
|
80
|
+
bottomLabel?: ReactNode;
|
|
81
|
+
/** Sidebar content (buttons/blocks); filled up to the bottom */
|
|
82
|
+
sidebar?: ReactNode;
|
|
83
|
+
/** Replaces the default bar at the top or bottom */
|
|
84
|
+
top?: ReactNode;
|
|
85
|
+
bottom?: ReactNode;
|
|
86
|
+
}
|
|
87
|
+
/** Classic LCARS panel: sidebar, two elbows, bars and a content area. */
|
|
88
|
+
declare function Frame({ color, title, topLabel, bottomLabel, sidebar, top, bottom, className, children, ...rest }: FrameProps): react.JSX.Element;
|
|
89
|
+
interface SplitFrameProps extends Omit<DivProps$1, "title"> {
|
|
90
|
+
color?: LcarsColor;
|
|
91
|
+
title?: ReactNode;
|
|
92
|
+
/** Content of the upper area (e.g. DataCascade, Readout) */
|
|
93
|
+
header?: ReactNode;
|
|
94
|
+
/** Upper and lower sidebar (buttons/blocks); each is filled up */
|
|
95
|
+
headerSidebar?: ReactNode;
|
|
96
|
+
sidebar?: ReactNode;
|
|
97
|
+
/** Labels in the two middle elbows */
|
|
98
|
+
upperLabel?: ReactNode;
|
|
99
|
+
lowerLabel?: ReactNode;
|
|
100
|
+
/** Replaces the bars next to the middle elbows */
|
|
101
|
+
upperBar?: ReactNode;
|
|
102
|
+
lowerBar?: ReactNode;
|
|
103
|
+
}
|
|
104
|
+
/** TNG main layout: upper and lower area, separated by two elbows. */
|
|
105
|
+
declare function SplitFrame({ color, title, header, headerSidebar, sidebar, upperLabel, lowerLabel, upperBar, lowerBar, className, children, ...rest }: SplitFrameProps): react.JSX.Element;
|
|
106
|
+
|
|
107
|
+
interface ToggleProps extends ButtonProps {
|
|
108
|
+
pressed?: boolean;
|
|
109
|
+
defaultPressed?: boolean;
|
|
110
|
+
onPressedChange?: (pressed: boolean) => void;
|
|
111
|
+
}
|
|
112
|
+
/** Button with an on/off state (aria-pressed). */
|
|
113
|
+
declare function Toggle({ pressed, defaultPressed, onPressedChange, onClick, ...rest }: ToggleProps): react.JSX.Element;
|
|
114
|
+
type SliderProps = {
|
|
115
|
+
color?: LcarsColor;
|
|
116
|
+
} & Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "color">;
|
|
117
|
+
/** Slider (native input type="range"). */
|
|
118
|
+
declare const Slider: react.ForwardRefExoticComponent<{
|
|
119
|
+
color?: LcarsColor;
|
|
120
|
+
} & Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "color"> & react.RefAttributes<HTMLInputElement>>;
|
|
121
|
+
type InputProps = {
|
|
122
|
+
color?: LcarsColor;
|
|
123
|
+
label?: ReactNode;
|
|
124
|
+
} & Omit<InputHTMLAttributes<HTMLInputElement>, "color">;
|
|
125
|
+
/** Text field with a colored label as end cap. */
|
|
126
|
+
declare const Input: react.ForwardRefExoticComponent<{
|
|
127
|
+
color?: LcarsColor;
|
|
128
|
+
label?: ReactNode;
|
|
129
|
+
} & Omit<InputHTMLAttributes<HTMLInputElement>, "color"> & react.RefAttributes<HTMLInputElement>>;
|
|
130
|
+
interface TabItem {
|
|
131
|
+
id: string;
|
|
132
|
+
label: ReactNode;
|
|
133
|
+
content: ReactNode;
|
|
134
|
+
color?: LcarsColor;
|
|
135
|
+
}
|
|
136
|
+
interface TabsProps extends Omit<HTMLAttributes<HTMLDivElement>, "color"> {
|
|
137
|
+
items: TabItem[];
|
|
138
|
+
value?: string;
|
|
139
|
+
defaultValue?: string;
|
|
140
|
+
onValueChange?: (id: string) => void;
|
|
141
|
+
color?: LcarsColor;
|
|
142
|
+
}
|
|
143
|
+
/** Tabs; the active tab flows into the bar below. */
|
|
144
|
+
declare function Tabs({ items, value, defaultValue, onValueChange, color, className, ...rest }: TabsProps): react.JSX.Element;
|
|
145
|
+
interface KeypadProps extends Omit<HTMLAttributes<HTMLDivElement>, "color" | "onSubmit"> {
|
|
146
|
+
color?: LcarsColor;
|
|
147
|
+
/** Maximum code length */
|
|
148
|
+
length?: number;
|
|
149
|
+
/** Show the code as dots */
|
|
150
|
+
mask?: boolean;
|
|
151
|
+
/** Called with the code; true = accepted, false = denied */
|
|
152
|
+
onSubmit?: (code: string) => boolean | void;
|
|
153
|
+
}
|
|
154
|
+
/** Number pad with display, e.g. for access codes. */
|
|
155
|
+
declare function Keypad({ color, length, mask, onSubmit, className, ...rest }: KeypadProps): react.JSX.Element;
|
|
156
|
+
|
|
157
|
+
type DivProps = Omit<HTMLAttributes<HTMLDivElement>, "color">;
|
|
158
|
+
interface DataCascadeProps extends DivProps {
|
|
159
|
+
columns?: number;
|
|
160
|
+
rows?: number;
|
|
161
|
+
seed?: number;
|
|
162
|
+
}
|
|
163
|
+
/** Cycling number columns – the "computer at work" effect. */
|
|
164
|
+
declare function DataCascade({ columns, rows, seed, className, ...rest }: DataCascadeProps): react.JSX.Element;
|
|
165
|
+
interface ReadoutItem {
|
|
166
|
+
label: ReactNode;
|
|
167
|
+
value: ReactNode;
|
|
168
|
+
color?: LcarsColor;
|
|
169
|
+
}
|
|
170
|
+
interface ReadoutProps extends Omit<HTMLAttributes<HTMLDListElement>, "color"> {
|
|
171
|
+
items: ReadoutItem[];
|
|
172
|
+
color?: LcarsColor;
|
|
173
|
+
}
|
|
174
|
+
/** Value table: label on the left, value right-aligned. */
|
|
175
|
+
declare function Readout({ items, color, className, ...rest }: ReadoutProps): react.JSX.Element;
|
|
176
|
+
type NumberCodeProps = {
|
|
177
|
+
color?: LcarsColor;
|
|
178
|
+
} & Omit<HTMLAttributes<HTMLSpanElement>, "color">;
|
|
179
|
+
/** ID number like "47-1138". */
|
|
180
|
+
declare function NumberCode({ color, className, ...rest }: NumberCodeProps): react.JSX.Element;
|
|
181
|
+
declare function Divider({ color, className, ...rest }: {
|
|
182
|
+
color?: LcarsColor;
|
|
183
|
+
} & DivProps): react.JSX.Element;
|
|
184
|
+
interface ButtonGridProps extends HTMLAttributes<HTMLDivElement> {
|
|
185
|
+
columns?: number;
|
|
186
|
+
}
|
|
187
|
+
/** Grid of buttons like a bridge console. */
|
|
188
|
+
declare function ButtonGrid({ columns, className, style, ...rest }: ButtonGridProps): react.JSX.Element;
|
|
189
|
+
interface LevelBarProps extends DivProps {
|
|
190
|
+
value: number;
|
|
191
|
+
max?: number;
|
|
192
|
+
segments?: number;
|
|
193
|
+
orientation?: Orientation;
|
|
194
|
+
color?: LcarsColor;
|
|
195
|
+
}
|
|
196
|
+
/** Segmented level bar. */
|
|
197
|
+
declare function LevelBar({ value, max, segments, orientation, color, className, ...rest }: LevelBarProps): react.JSX.Element;
|
|
198
|
+
interface GaugeProps extends DivProps {
|
|
199
|
+
value: number;
|
|
200
|
+
max?: number;
|
|
201
|
+
segments?: number;
|
|
202
|
+
label?: ReactNode;
|
|
203
|
+
color?: LcarsColor;
|
|
204
|
+
}
|
|
205
|
+
/** Semicircular gauge made of arc segments. */
|
|
206
|
+
declare function Gauge({ value, max, segments, label, color, className, style, ...rest }: GaugeProps): react.JSX.Element;
|
|
207
|
+
interface Blip {
|
|
208
|
+
x: number;
|
|
209
|
+
y: number;
|
|
210
|
+
color?: LcarsColor;
|
|
211
|
+
}
|
|
212
|
+
interface SensorProps extends DivProps {
|
|
213
|
+
blips?: Blip[];
|
|
214
|
+
scan?: boolean;
|
|
215
|
+
color?: LcarsColor;
|
|
216
|
+
}
|
|
217
|
+
/** Sensor display with grid, crosshair, contacts and optional scan. */
|
|
218
|
+
declare function Sensor({ blips, scan, color, className, children, ...rest }: SensorProps): react.JSX.Element;
|
|
219
|
+
interface StatusIndicatorProps extends HTMLAttributes<HTMLSpanElement> {
|
|
220
|
+
status?: StatusKind;
|
|
221
|
+
blink?: boolean;
|
|
222
|
+
}
|
|
223
|
+
/** Indicator light with label. */
|
|
224
|
+
declare function StatusIndicator({ status, blink, className, ...rest }: StatusIndicatorProps): react.JSX.Element;
|
|
225
|
+
interface AlertBannerProps extends Omit<DivProps, "title"> {
|
|
226
|
+
level?: AlertLevel;
|
|
227
|
+
title?: ReactNode;
|
|
228
|
+
}
|
|
229
|
+
/** Large, blinking alert banner. */
|
|
230
|
+
declare function AlertBanner({ level, title, children, className, ...rest }: AlertBannerProps): react.JSX.Element;
|
|
231
|
+
|
|
232
|
+
interface LcarsRootProps extends HTMLAttributes<HTMLDivElement> {
|
|
233
|
+
theme?: LcarsTheme;
|
|
234
|
+
/** Turns everything below red/yellow and makes the bars pulse */
|
|
235
|
+
alert?: AlertLevel | null;
|
|
236
|
+
}
|
|
237
|
+
/** Sets the color theme and alert state for all components below. */
|
|
238
|
+
declare function LcarsRoot({ theme, alert, ...rest }: LcarsRootProps): react.JSX.Element;
|
|
239
|
+
|
|
240
|
+
export { AlertBanner, Bar, Block, Button, ButtonGrid, DataCascade, Divider, Elbow, Frame, Gauge, Input, Keypad, LcarsRoot, LevelBar, NumberCode, Readout, Sensor, Slider, SplitFrame, Stack, StatusIndicator, Tabs, Title, Toggle };
|
|
241
|
+
export type { AlertBannerProps, AlertLevel, BarCap, BarProps, Blip, BlockProps, ButtonAlign, ButtonColor, ButtonGridProps, ButtonLength, ButtonProps, ButtonShape, ButtonSize, DataCascadeProps, ElbowCorner, ElbowProps, FrameProps, GaugeProps, InputProps, KeypadProps, LcarsColor, LcarsLength, LcarsRootProps, LcarsTheme, LevelBarProps, NumberCodeProps, Orientation, ReadoutItem, ReadoutProps, SensorProps, SliderProps, SplitFrameProps, StatusIndicatorProps, StatusKind, TabItem, TabsProps, TitleProps, ToggleProps };
|