@deadragdoll/reactnu 0.1.9

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 (176) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +151 -0
  3. package/dist/appHost/NuAppHostProvider.d.ts +6 -0
  4. package/dist/appHost/appHostContext.d.ts +26 -0
  5. package/dist/components/Button/Button.d.ts +13 -0
  6. package/dist/components/Button/index.d.ts +1 -0
  7. package/dist/components/CheckBox/CheckBox.d.ts +14 -0
  8. package/dist/components/CheckBox/index.d.ts +1 -0
  9. package/dist/components/ComboBox/ComboBox.d.ts +23 -0
  10. package/dist/components/ComboBox/index.d.ts +1 -0
  11. package/dist/components/CommandButton/CommandButton.d.ts +17 -0
  12. package/dist/components/CommandButton/index.d.ts +1 -0
  13. package/dist/components/CrtGlitch/CrtGlitch.d.ts +23 -0
  14. package/dist/components/CrtGlitch/index.d.ts +1 -0
  15. package/dist/components/Dashboard/Dashboard.d.ts +25 -0
  16. package/dist/components/Dashboard/index.d.ts +1 -0
  17. package/dist/components/Desktop/Desktop.d.ts +6 -0
  18. package/dist/components/Desktop/index.d.ts +1 -0
  19. package/dist/components/Dropdown/Dropdown.d.ts +19 -0
  20. package/dist/components/Dropdown/index.d.ts +1 -0
  21. package/dist/components/Frame/Frame.d.ts +24 -0
  22. package/dist/components/Frame/index.d.ts +1 -0
  23. package/dist/components/Glyph/NuGlyph.d.ts +6 -0
  24. package/dist/components/Glyph/index.d.ts +1 -0
  25. package/dist/components/Info/Info.d.ts +13 -0
  26. package/dist/components/Info/index.d.ts +1 -0
  27. package/dist/components/ListBox/ListBox.d.ts +23 -0
  28. package/dist/components/ListBox/index.d.ts +1 -0
  29. package/dist/components/ListBox/internals/ListBoxCategoryView.d.ts +6 -0
  30. package/dist/components/ListBox/internals/ListBoxCheckControl.d.ts +8 -0
  31. package/dist/components/ListBox/internals/ListBoxGroupView.d.ts +17 -0
  32. package/dist/components/ListBox/internals/ListBoxItemView.d.ts +18 -0
  33. package/dist/components/ListBox/internals/helpers.d.ts +5 -0
  34. package/dist/components/ListBox/internals/renderLabel.d.ts +2 -0
  35. package/dist/components/ListBox/internals/types.d.ts +27 -0
  36. package/dist/components/ListView/ListView.d.ts +27 -0
  37. package/dist/components/ListView/index.d.ts +1 -0
  38. package/dist/components/ListView/internals/ListViewCheckControl.d.ts +8 -0
  39. package/dist/components/ListView/internals/ListViewRow.d.ts +18 -0
  40. package/dist/components/ListView/internals/helpers.d.ts +5 -0
  41. package/dist/components/ListView/internals/types.d.ts +17 -0
  42. package/dist/components/MainMenu/MainMenu.d.ts +8 -0
  43. package/dist/components/MainMenu/MainMenu.types.d.ts +23 -0
  44. package/dist/components/MainMenu/index.d.ts +3 -0
  45. package/dist/components/MainMenu/internals/MainMenuList.d.ts +12 -0
  46. package/dist/components/MainMenu/menuState.d.ts +40 -0
  47. package/dist/components/MaskedField/MaskedField.d.ts +13 -0
  48. package/dist/components/MaskedField/index.d.ts +2 -0
  49. package/dist/components/MaskedField/textMask.d.ts +8 -0
  50. package/dist/components/Memo/Memo.d.ts +14 -0
  51. package/dist/components/Memo/index.d.ts +1 -0
  52. package/dist/components/PageControl/PageControl.d.ts +20 -0
  53. package/dist/components/PageControl/index.d.ts +1 -0
  54. package/dist/components/Panel/Panel.d.ts +11 -0
  55. package/dist/components/Panel/index.d.ts +1 -0
  56. package/dist/components/PopupMenu/PopupMenu.d.ts +22 -0
  57. package/dist/components/PopupMenu/index.d.ts +2 -0
  58. package/dist/components/PopupMenu/usePopupMenu.d.ts +12 -0
  59. package/dist/components/ProgressBar/ProgressBar.d.ts +17 -0
  60. package/dist/components/ProgressBar/index.d.ts +1 -0
  61. package/dist/components/PropertyGrid/PropertyGrid.d.ts +38 -0
  62. package/dist/components/PropertyGrid/index.d.ts +1 -0
  63. package/dist/components/RadioGroup/RadioButton.d.ts +9 -0
  64. package/dist/components/RadioGroup/RadioGroup.d.ts +21 -0
  65. package/dist/components/RadioGroup/index.d.ts +2 -0
  66. package/dist/components/ReportCell/ReportCell.d.ts +6 -0
  67. package/dist/components/ReportCell/index.d.ts +1 -0
  68. package/dist/components/SearchBox/SearchBox.d.ts +23 -0
  69. package/dist/components/SearchBox/index.d.ts +1 -0
  70. package/dist/components/SpinBox/SpinBox.d.ts +16 -0
  71. package/dist/components/SpinBox/index.d.ts +1 -0
  72. package/dist/components/Splitter/Splitter.d.ts +15 -0
  73. package/dist/components/Splitter/index.d.ts +1 -0
  74. package/dist/components/Stack/Stack.d.ts +13 -0
  75. package/dist/components/Stack/index.d.ts +1 -0
  76. package/dist/components/TextField/TextField.d.ts +12 -0
  77. package/dist/components/TextField/index.d.ts +1 -0
  78. package/dist/components/TickBar/TickBar.d.ts +22 -0
  79. package/dist/components/TickBar/index.d.ts +1 -0
  80. package/dist/components/ToolBar/ToolBar.d.ts +25 -0
  81. package/dist/components/ToolBar/index.d.ts +1 -0
  82. package/dist/components/TreeListView/TreeListView.d.ts +33 -0
  83. package/dist/components/TreeListView/index.d.ts +1 -0
  84. package/dist/components/TreeListView/internals/TreeListViewRow.d.ts +28 -0
  85. package/dist/components/TreeListView/internals/helpers.d.ts +14 -0
  86. package/dist/components/TreeListView/internals/types.d.ts +32 -0
  87. package/dist/components/TreeView/TreeView.d.ts +26 -0
  88. package/dist/components/TreeView/index.d.ts +1 -0
  89. package/dist/components/TreeView/internals/TreeViewItem.d.ts +21 -0
  90. package/dist/components/TreeView/internals/helpers.d.ts +5 -0
  91. package/dist/components/TreeView/internals/types.d.ts +10 -0
  92. package/dist/components/View/NuView.d.ts +10 -0
  93. package/dist/components/View/index.d.ts +1 -0
  94. package/dist/components/Window/StatusBarItem.d.ts +7 -0
  95. package/dist/components/Window/Window.d.ts +41 -0
  96. package/dist/components/Window/WindowTitleButton.d.ts +17 -0
  97. package/dist/components/Window/index.d.ts +5 -0
  98. package/dist/components/Window/internals/WindowStatusBar.d.ts +8 -0
  99. package/dist/components/Window/internals/WindowTitleBar.d.ts +10 -0
  100. package/dist/components/Window/useWindowTitleButtons.d.ts +12 -0
  101. package/dist/components/Window/windowMenuContext.d.ts +3 -0
  102. package/dist/components/_shared/ControlOpener.d.ts +18 -0
  103. package/dist/components/_shared/portalPositioning.d.ts +16 -0
  104. package/dist/components/_shared/slotProps.d.ts +867 -0
  105. package/dist/components/_shared/themePortal.d.ts +2 -0
  106. package/dist/components/_shared/treeData.d.ts +19 -0
  107. package/dist/components/_shared/usePopupPosition.d.ts +40 -0
  108. package/dist/index.cjs +9848 -0
  109. package/dist/index.d.ts +45 -0
  110. package/dist/index.js +9885 -0
  111. package/dist/styles.css +3644 -0
  112. package/dist/theme/NuThemeProvider.d.ts +26 -0
  113. package/dist/theme/themeContext.d.ts +15 -0
  114. package/dist/theme/themes.d.ts +49 -0
  115. package/dist/utils/renderMnemonicText.d.ts +10 -0
  116. package/dist/windowing/AppBarHost.d.ts +6 -0
  117. package/dist/windowing/AppBarItem.d.ts +587 -0
  118. package/dist/windowing/NuWindowProvider.d.ts +9 -0
  119. package/dist/windowing/WindowBar.d.ts +13 -0
  120. package/dist/windowing/dialogHelpers.d.ts +1793 -0
  121. package/dist/windowing/internals/MdiWindowPickerDialog.d.ts +10 -0
  122. package/dist/windowing/mdiMenu.d.ts +3 -0
  123. package/dist/windowing/windowContext.d.ts +18 -0
  124. package/dist/windowing/windowing.constants.d.ts +1 -0
  125. package/dist/windowing/windowing.types.d.ts +54 -0
  126. package/docs/API_REFERENCE.md +150 -0
  127. package/docs/ARCHITECTURE.md +170 -0
  128. package/docs/AppBarHost.md +22 -0
  129. package/docs/AppBarItem.md +22 -0
  130. package/docs/Button.md +24 -0
  131. package/docs/COMPONENT_INDEX.md +64 -0
  132. package/docs/CONTRIBUTOR_GUIDE.md +393 -0
  133. package/docs/CheckBox.md +30 -0
  134. package/docs/ComboBox.md +41 -0
  135. package/docs/CommandButton.md +45 -0
  136. package/docs/CrtGlitch.md +49 -0
  137. package/docs/Dashboard.md +73 -0
  138. package/docs/Desktop.md +27 -0
  139. package/docs/DialogHelpers.md +85 -0
  140. package/docs/Dropdown.md +44 -0
  141. package/docs/Frame.md +38 -0
  142. package/docs/GETTING_STARTED.md +110 -0
  143. package/docs/Glyph.md +29 -0
  144. package/docs/Info.md +51 -0
  145. package/docs/ListBox.md +35 -0
  146. package/docs/ListView.md +62 -0
  147. package/docs/MainMenu.md +36 -0
  148. package/docs/MaskedField.md +124 -0
  149. package/docs/Memo.md +32 -0
  150. package/docs/NuAppHostProvider.md +28 -0
  151. package/docs/NuThemeProvider.md +64 -0
  152. package/docs/NuView.md +58 -0
  153. package/docs/NuWindowProvider.md +81 -0
  154. package/docs/PageControl.md +28 -0
  155. package/docs/Panel.md +23 -0
  156. package/docs/PopupMenu.md +42 -0
  157. package/docs/ProgressBar.md +33 -0
  158. package/docs/PropertyGrid.md +63 -0
  159. package/docs/RadioGroup.md +36 -0
  160. package/docs/ReportCell.md +27 -0
  161. package/docs/SLOT_CUSTOMIZATION.md +85 -0
  162. package/docs/STORYBOOK.md +96 -0
  163. package/docs/SearchBox.md +41 -0
  164. package/docs/SpinBox.md +25 -0
  165. package/docs/Splitter.md +91 -0
  166. package/docs/Stack.md +26 -0
  167. package/docs/StatusBarItem.md +31 -0
  168. package/docs/TOKEN_CHECKLIST.md +122 -0
  169. package/docs/TextField.md +27 -0
  170. package/docs/TickBar.md +57 -0
  171. package/docs/ToolBar.md +51 -0
  172. package/docs/TreeListView.md +84 -0
  173. package/docs/TreeView.md +53 -0
  174. package/docs/Window.md +53 -0
  175. package/docs/WindowBar.md +24 -0
  176. package/package.json +47 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 code4bones
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,151 @@
1
+ # ReactNU
2
+
3
+ `@deadragdoll/reactnu` is a nostalgic React and TypeScript component library
4
+ inspired by Norton Utilities 6.0 — a tribute to a beautiful era of precise,
5
+ purposeful DOS utility software. It brings that crisp, high-contrast language
6
+ to modern, dense, keyboard-friendly desktop-style interfaces: panels, windows,
7
+ menus, dialogs, data controls, and application chrome.
8
+
9
+ ## Install
10
+
11
+ ```bash
12
+ npm install @deadragdoll/reactnu react react-dom
13
+ ```
14
+
15
+ ReactNU requires React 19 and React DOM 19. Import the stylesheet once in your
16
+ application entry point:
17
+
18
+ ```tsx
19
+ import "@deadragdoll/reactnu/styles.css";
20
+ ```
21
+
22
+ ## Quick Start
23
+
24
+ ```tsx
25
+ import { Button, NuThemeProvider } from "@deadragdoll/reactnu";
26
+ import "@deadragdoll/reactnu/styles.css";
27
+
28
+ export function App() {
29
+ return (
30
+ <NuThemeProvider>
31
+ <Button variant="primary">Run diagnostics</Button>
32
+ </NuThemeProvider>
33
+ );
34
+ }
35
+ ```
36
+
37
+ For a full desktop shell with managed windows, start with `NuThemeProvider` and
38
+ `NuDesktop`; `NuDesktop` provides the application-host and window-manager
39
+ layers internally. The [Getting Started guide](./docs/GETTING_STARTED.md) shows
40
+ the recommended composition.
41
+
42
+ ## Architecture: Desktop First
43
+
44
+ ReactNU is organized around a desktop shell, rather than a collection of
45
+ unrelated controls. `NuDesktop` is the top-level application surface: it owns
46
+ the screen geometry and composes the application-menu and managed-window
47
+ layers internally.
48
+
49
+ ```text
50
+ NuThemeProvider
51
+ └─ NuDesktop
52
+ ├─ Main menu (host-provided through the app host)
53
+ └─ NuWindowProvider
54
+ ├─ Workspace content: panels, views, forms, lists, trees
55
+ ├─ App bar: host-provided status and window controls
56
+ └─ Managed windows and dialogs
57
+ ```
58
+
59
+ Place your normal application UI in `NuDesktop`'s children. Use
60
+ `useNuWindowManager()` anywhere below it to open managed `Window` and dialog
61
+ surfaces. For an embedded or bounded area that needs windows but not a full
62
+ desktop, use `NuWindowProvider` directly.
63
+
64
+ ## Documentation
65
+
66
+ This package includes the complete Markdown documentation set:
67
+
68
+ - [Getting Started](./docs/GETTING_STARTED.md)
69
+ - [API Reference](./docs/API_REFERENCE.md)
70
+ - [Component Index](./docs/COMPONENT_INDEX.md)
71
+ - [Architecture](./docs/ARCHITECTURE.md)
72
+ - [Theme Provider](./docs/NuThemeProvider.md)
73
+ - [Window Provider](./docs/NuWindowProvider.md)
74
+ - [Storybook guidance](./docs/STORYBOOK.md)
75
+
76
+ Each public component has a dedicated page in [`docs/`](./docs/).
77
+
78
+ ## Components
79
+
80
+ ### Providers and desktop shell
81
+
82
+ - `NuThemeProvider` — supplies themes, typography, desktop pattern, and theme context.
83
+ - `NuDesktop` — fullscreen desktop shell with workspace and app-bar regions.
84
+ - `NuAppHostProvider` — owns application-level main-menu state.
85
+ - `NuWindowProvider` — manages windows, dialogs, modal state, and window-manager hooks.
86
+ - `Dashboard` — static grid or lane-based workspace layout.
87
+
88
+ ### Actions and input
89
+
90
+ - `Button` — primary DOS-style action button.
91
+ - `CommandButton` — compact command button with optional icon and popup menu.
92
+ - `CheckBox` — controlled or uncontrolled checkbox with mnemonic labels.
93
+ - `RadioGroup` and `RadioButton` — grouped single-choice controls.
94
+ - `TextField` — basic labelled text input with optional debounced change handling.
95
+ - `MaskedField` — text input constrained by a display/edit mask.
96
+ - `Memo` — multi-line text editor.
97
+ - `SpinBox` — numeric input with increment and decrement controls.
98
+ - `TickBar` — keyboard and pointer-accessible slider with tick marks.
99
+ - `Dropdown` — non-editable selection field with a popup list.
100
+ - `ComboBox` — editable, locally filtered selection field.
101
+ - `SearchBox` — async search and result-selection control.
102
+ - `ProgressBar` — determinate or indeterminate progress indicator.
103
+ - `Info` and `InfoAccent` — informational text and inline emphasis.
104
+
105
+ ### Data, navigation, and layout
106
+
107
+ - `ListBox` — grouped or flat selectable list with optional checkboxes.
108
+ - `ListView` — report-style, column-based data list.
109
+ - `TreeView` — hierarchical tree with keyboard navigation and connector lines.
110
+ - `TreeListView` — tree hierarchy combined with report columns.
111
+ - `PropertyGrid` — hierarchical settings and inspector surface.
112
+ - `PageControl` and `Tabs` — keyboard-navigable tabbed pages.
113
+ - `ToolBar`, `ToolButton`, `ToolDropButton`, and `ToolSeparator` — compact command strip primitives.
114
+ - `Stack` — small flexbox layout helper.
115
+ - `Splitter` — resizable pane layout.
116
+ - `NuView` — scroll-owning content pane.
117
+ - `Panel` — raised primary application surface.
118
+ - `Frame` — bordered container with optional title chrome.
119
+ - `ReportCell` — aligned and toned report-column content helper.
120
+
121
+ ### Menus, windows, and desktop chrome
122
+
123
+ - `MainMenu` — classic nested application menu bar.
124
+ - `PopupMenu` and `usePopupMenu` — anchored/context popup menu and its state helper.
125
+ - `Window` — draggable, resizable window or dialog chrome.
126
+ - `WindowTitleButton` and `useWindowTitleButtons` — custom title-bar actions.
127
+ - `StatusBarItem` — placement helper for window status bars.
128
+ - `AppBarHost` and `AppBarItem` — bottom desktop-bar container and item primitive.
129
+ - `WindowBar` — app-bar representation of managed windows.
130
+ - `useNuWindowManager` — opens, updates, activates, and closes managed windows and helper dialogs.
131
+ - `useAppHostMenu` and `useWindowMenu` — access desktop and window menu state.
132
+
133
+ ### Visual utilities
134
+
135
+ - `NuGlyph` — consistent glyph/icon primitive for interface symbols.
136
+ - `NuCrtGlitch` — opt-in, ambient CRT-fault effect.
137
+ - `nuThemes`, `resolveNuTheme`, `isNuThemeName`, and `useNuTheme` — theme definitions and helpers.
138
+
139
+ ## Design Principles
140
+
141
+ - sharp, high-contrast DOS-style geometry
142
+ - visible focus and keyboard-first interactions
143
+ - provider-owned themes and typography
144
+ - body portals with viewport positioning for popups
145
+ - host-owned desktop, menu, and window workflow composition
146
+
147
+ ## Package Contents
148
+
149
+ - `dist/` — ESM, CommonJS, type declarations, and stylesheet
150
+ - `docs/` — component, architecture, and integration documentation
151
+ - `README.md` and `LICENSE`
@@ -0,0 +1,6 @@
1
+ import { PropsWithChildren } from "react";
2
+ type NuAppHostProviderProps = PropsWithChildren<{
3
+ renderMenu?: boolean;
4
+ }>;
5
+ export declare function NuAppHostProvider({ children, renderMenu }: NuAppHostProviderProps): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,26 @@
1
+ import { MainMenuStateValue } from "../components/MainMenu";
2
+ import { NuMdiMenuBridge } from "../windowing/windowContext";
3
+ type AppHostMenuContextValue = MainMenuStateValue & {
4
+ setWindowBridge: (bridge: NuMdiMenuBridge | null) => void;
5
+ windowBridge: NuMdiMenuBridge | null;
6
+ };
7
+ export declare const AppHostMenuContext: import("react").Context<AppHostMenuContextValue | null>;
8
+ export declare function useAppHostMenu(): {
9
+ mainMenu: import("..").MainMenuNode[];
10
+ setMainMenu: import("react").Dispatch<import("react").SetStateAction<import("..").MainMenuNode[]>>;
11
+ setMenuItem: (id: string, patch: import("..").MainMenuItemPatch) => void;
12
+ setMenuFlags: (id: string, flags: import("..").MainMenuFlags) => void;
13
+ setMenuDisabled: (id: string, disabled: boolean) => void;
14
+ enableMenuItem: (id: string) => void;
15
+ disableMenuItem: (id: string) => void;
16
+ setMenuHidden: (id: string, hidden: boolean) => void;
17
+ showMenuItem: (id: string) => void;
18
+ hideMenuItem: (id: string) => void;
19
+ setMenuChecked: (id: string, checked: boolean) => void;
20
+ checkMenuItem: (id: string) => void;
21
+ uncheckMenuItem: (id: string) => void;
22
+ toggleMenuChecked: (id: string) => void;
23
+ setMenuCheckable: (id: string, checkable: boolean) => void;
24
+ setSubmenuTree: (id: string, items: import("..").MainMenuNode[]) => void;
25
+ };
26
+ export {};
@@ -0,0 +1,13 @@
1
+ import { ButtonHTMLAttributes, PropsWithChildren } from "react";
2
+ import { SlotCustomizationProps } from "../_shared/slotProps";
3
+ type ButtonVariant = "primary" | "secondary" | "danger" | "success";
4
+ export type ButtonSlot = "root" | "face" | "label" | "focusIndicatorLeft" | "focusIndicatorRight" | "shadowRight" | "shadowBottom";
5
+ export type ButtonProps = PropsWithChildren<ButtonHTMLAttributes<HTMLButtonElement> & {
6
+ defaultFocused?: boolean;
7
+ focused?: boolean;
8
+ slotClassNames?: SlotCustomizationProps<ButtonSlot>["slotClassNames"];
9
+ slotStyles?: SlotCustomizationProps<ButtonSlot>["slotStyles"];
10
+ variant?: ButtonVariant;
11
+ }>;
12
+ export declare function Button({ children, className, defaultFocused, disabled, focused, onBlur, onClick, onFocus, slotClassNames, slotStyles, type, variant, ...props }: ButtonProps): import("react/jsx-runtime").JSX.Element;
13
+ export {};
@@ -0,0 +1 @@
1
+ export * from "./Button";
@@ -0,0 +1,14 @@
1
+ import { ChangeEvent, InputHTMLAttributes } from "react";
2
+ import { SlotCustomizationProps } from "../_shared/slotProps";
3
+ export type CheckBoxSlot = "root" | "main" | "input" | "control" | "box" | "mark" | "label" | "hint";
4
+ export type CheckBoxProps = Omit<InputHTMLAttributes<HTMLInputElement>, "checked" | "defaultChecked" | "onChange" | "type"> & {
5
+ checked?: boolean;
6
+ defaultChecked?: boolean;
7
+ hint?: string;
8
+ label: string;
9
+ onCheckedChange?: (checked: boolean, event: ChangeEvent<HTMLInputElement>) => void;
10
+ slotClassNames?: SlotCustomizationProps<CheckBoxSlot>["slotClassNames"];
11
+ slotStyles?: SlotCustomizationProps<CheckBoxSlot>["slotStyles"];
12
+ uncheckedShape?: "box" | "none";
13
+ };
14
+ export declare function CheckBox({ checked, className, defaultChecked, disabled, hint, id, label, onCheckedChange, slotClassNames, slotStyles, uncheckedShape, ...props }: CheckBoxProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export * from "./CheckBox";
@@ -0,0 +1,23 @@
1
+ import { HTMLAttributes } from "react";
2
+ import { SlotCustomizationProps } from "../_shared/slotProps";
3
+ import { ListBoxGroup, ListBoxItem } from "../ListBox/internals/types";
4
+ export type ComboBoxSlot = "root" | "label" | "slot" | "field" | "bracket" | "inputShell" | "input" | "toggle" | "popup" | "listbox" | "hint";
5
+ type ComboBoxChangeHandler = (value: string, item: ListBoxItem, group: ListBoxGroup) => void;
6
+ type ComboBoxInputChangeHandler = (value: string) => void;
7
+ export type ComboBoxProps = Omit<HTMLAttributes<HTMLDivElement>, "defaultValue" | "onChange"> & {
8
+ data: ListBoxGroup[];
9
+ defaultInputValue?: string;
10
+ defaultValue?: string;
11
+ disabled?: boolean;
12
+ hint?: string;
13
+ inputValue?: string;
14
+ label: string;
15
+ onInputValueChange?: ComboBoxInputChangeHandler;
16
+ onValueChange?: ComboBoxChangeHandler;
17
+ placeholder?: string;
18
+ slotClassNames?: SlotCustomizationProps<ComboBoxSlot>["slotClassNames"];
19
+ slotStyles?: SlotCustomizationProps<ComboBoxSlot>["slotStyles"];
20
+ value?: string;
21
+ };
22
+ export declare function ComboBox({ className, data, defaultInputValue, defaultValue, disabled, hint, inputValue: inputValueProp, label, onInputValueChange, onValueChange, placeholder, slotClassNames, slotStyles, style, value, ...props }: ComboBoxProps): import("react/jsx-runtime").JSX.Element;
23
+ export {};
@@ -0,0 +1 @@
1
+ export * from "./ComboBox";
@@ -0,0 +1,17 @@
1
+ import { ButtonHTMLAttributes, PropsWithChildren, ReactNode } from "react";
2
+ import { SlotCustomizationProps } from "../_shared/slotProps";
3
+ import { type NuGlyphName } from "../Glyph";
4
+ import { MainMenuItem, MainMenuNode } from "../MainMenu/MainMenu.types";
5
+ export type CommandButtonSlot = "root" | "icon" | "label" | "caret";
6
+ export type CommandButtonProps = PropsWithChildren<ButtonHTMLAttributes<HTMLButtonElement> & {
7
+ dropdown?: boolean;
8
+ icon?: NuGlyphName | ReactNode;
9
+ menuItems?: MainMenuNode[];
10
+ onMenuItemSelect?: (item: MainMenuItem) => void;
11
+ pressed?: boolean;
12
+ slotClassNames?: SlotCustomizationProps<CommandButtonSlot>["slotClassNames"];
13
+ slotStyles?: SlotCustomizationProps<CommandButtonSlot>["slotStyles"];
14
+ toggled?: boolean;
15
+ uncheckedShape?: "box" | "none";
16
+ }>;
17
+ export declare function CommandButton({ children, className, dropdown, icon, menuItems, onClick, onMenuItemSelect, pressed, slotClassNames, slotStyles, toggled, type, uncheckedShape, ...props }: CommandButtonProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export * from "./CommandButton";
@@ -0,0 +1,23 @@
1
+ export type NuCrtGlitchProps = {
2
+ /** Average gap between glitch pulses, in ms. */
3
+ intervalMs?: number;
4
+ /** How long a single glitch pulse lasts, in ms. */
5
+ durationMs?: number;
6
+ /** When false, no pulses fire (filter defs stay mounted, inert). */
7
+ enabled?: boolean;
8
+ /**
9
+ * CSS selector for the pool of candidate elements, scoped under an open
10
+ * (non-minimized) window. Defaults to small leaf controls (buttons,
11
+ * checkboxes, icons, rows) rather than whole windows — a single control
12
+ * twitching in peripheral vision reads as a real fault; a whole window
13
+ * warping reads as a demo effect.
14
+ */
15
+ targetSelector?: string;
16
+ /**
17
+ * Fraction of pulses (0-1) that target a whole open window instead of a
18
+ * small leaf control from `targetSelector`. Falls back to the other pool
19
+ * when the chosen one has no candidates (e.g. no windows open).
20
+ */
21
+ topLevelRatio?: number;
22
+ };
23
+ export declare function NuCrtGlitch({ intervalMs, durationMs, enabled, targetSelector, topLevelRatio }: NuCrtGlitchProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export * from "./CrtGlitch";
@@ -0,0 +1,25 @@
1
+ import { CSSProperties, HTMLAttributes, ReactNode } from "react";
2
+ export type DashboardItem = {
3
+ alignSelf?: CSSProperties["alignSelf"];
4
+ column?: string;
5
+ columnSpan?: number;
6
+ content: ReactNode;
7
+ id: string | number;
8
+ justifySelf?: CSSProperties["justifySelf"];
9
+ lane?: number;
10
+ maxWidth?: string;
11
+ minHeight?: string;
12
+ minWidth?: string;
13
+ row?: string;
14
+ rowSpan?: number;
15
+ width?: string;
16
+ };
17
+ export type DashboardProps = HTMLAttributes<HTMLDivElement> & {
18
+ columnCount?: number;
19
+ fill?: boolean;
20
+ gap?: number | string;
21
+ items: DashboardItem[];
22
+ layout?: "grid" | "lanes";
23
+ laneCount?: number;
24
+ };
25
+ export declare function Dashboard({ className, columnCount, fill, gap, items, layout, laneCount, style, ...props }: DashboardProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export * from "./Dashboard";
@@ -0,0 +1,6 @@
1
+ import { HTMLAttributes, PropsWithChildren, ReactNode } from "react";
2
+ export type NuDesktopProps = PropsWithChildren<HTMLAttributes<HTMLDivElement> & {
3
+ appBar?: ReactNode;
4
+ appBarContent?: ReactNode;
5
+ }>;
6
+ export declare function NuDesktop({ appBar, appBarContent, children, className, ...props }: NuDesktopProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export * from "./Desktop";
@@ -0,0 +1,19 @@
1
+ import { HTMLAttributes } from "react";
2
+ import { SlotCustomizationProps } from "../_shared/slotProps";
3
+ import { ListBoxGroup, ListBoxItem } from "../ListBox/internals/types";
4
+ export type DropdownSlot = "root" | "label" | "trigger" | "slot" | "field" | "bracket" | "valueShell" | "value" | "arrowShell" | "arrow" | "hint" | "popup" | "popupShell" | "listbox";
5
+ type DropdownChangeHandler = (value: string, item: ListBoxItem, group: ListBoxGroup) => void;
6
+ export type DropdownProps = Omit<HTMLAttributes<HTMLDivElement>, "defaultValue" | "onChange"> & {
7
+ data: ListBoxGroup[];
8
+ defaultValue?: string;
9
+ disabled?: boolean;
10
+ hint?: string;
11
+ label: string;
12
+ onValueChange?: DropdownChangeHandler;
13
+ placeholder?: string;
14
+ slotClassNames?: SlotCustomizationProps<DropdownSlot>["slotClassNames"];
15
+ slotStyles?: SlotCustomizationProps<DropdownSlot>["slotStyles"];
16
+ value?: string;
17
+ };
18
+ export declare function Dropdown({ className, data, defaultValue, disabled, hint, label, onValueChange, placeholder, slotClassNames, slotStyles, value, style, ...props }: DropdownProps): import("react/jsx-runtime").JSX.Element;
19
+ export {};
@@ -0,0 +1 @@
1
+ export * from "./Dropdown";
@@ -0,0 +1,24 @@
1
+ import { CSSProperties, HTMLAttributes, PropsWithChildren, ReactNode } from "react";
2
+ import { SlotCustomizationProps } from "../_shared/slotProps";
3
+ export type FrameTitleProps = {
4
+ background?: CSSProperties["background"];
5
+ borderColor?: CSSProperties["borderColor"];
6
+ color?: CSSProperties["color"];
7
+ };
8
+ export type FrameSlot = "root" | "title" | "titleStart" | "titleContent" | "titleEnd" | "body";
9
+ export type FrameProps = PropsWithChildren<HTMLAttributes<HTMLDivElement> & {
10
+ contentStyle?: CSSProperties;
11
+ fill?: boolean;
12
+ slotClassNames?: SlotCustomizationProps<FrameSlot>["slotClassNames"];
13
+ slotStyles?: SlotCustomizationProps<FrameSlot>["slotStyles"];
14
+ title?: string;
15
+ titleContent?: ReactNode;
16
+ titleEnd?: ReactNode;
17
+ titleProps?: FrameTitleProps;
18
+ titleStart?: ReactNode;
19
+ titleStyle?: CSSProperties;
20
+ variant?: "outline" | "title-bar";
21
+ titleAlign?: "start" | "center" | "end";
22
+ titleBold?: boolean;
23
+ }>;
24
+ export declare function Frame({ children, className, contentStyle, fill, slotClassNames, slotStyles, title, titleContent, titleEnd, titleAlign, titleBold, titleProps, titleStart, titleStyle, variant, ...props }: FrameProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export * from "./Frame";
@@ -0,0 +1,6 @@
1
+ import { HTMLAttributes } from "react";
2
+ export type NuGlyphName = "check-fill" | "check-mark" | "dropdown-arrow" | "folder" | "gear" | "radio-fill" | "radio-ring" | "star" | "tree-caret-down" | "tree-caret-right" | "window-close" | "window-maximize" | "window-minimize" | "window-resize" | "window-restore";
3
+ export type NuGlyphProps = Omit<HTMLAttributes<HTMLSpanElement>, "children"> & {
4
+ name: NuGlyphName;
5
+ };
6
+ export declare function NuGlyph({ className, name, ...props }: NuGlyphProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export * from "./NuGlyph";
@@ -0,0 +1,13 @@
1
+ import { CSSProperties, HTMLAttributes } from "react";
2
+ export type InfoProps = HTMLAttributes<HTMLDivElement> & {
3
+ accentColor?: CSSProperties["color"];
4
+ fill?: boolean;
5
+ };
6
+ export type InfoAccentProps = HTMLAttributes<HTMLSpanElement> & {
7
+ bold?: boolean;
8
+ italic?: boolean;
9
+ underline?: boolean;
10
+ upper?: boolean;
11
+ };
12
+ export declare function Info({ accentColor, children, className, fill, style, ...props }: InfoProps): import("react/jsx-runtime").JSX.Element;
13
+ export declare function InfoAccent({ bold, children, className, italic, style, underline, upper, ...props }: InfoAccentProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export * from "./Info";
@@ -0,0 +1,23 @@
1
+ import { ForwardedRef, HTMLAttributes, RefAttributes } from "react";
2
+ import { ListBoxGroup, ListBoxItem } from "./internals/types";
3
+ export type { ListBoxCategory, ListBoxGroup, ListBoxItem, ListBoxLabel } from "./internals/types";
4
+ export type ListBoxHandle = {
5
+ activateItem: (itemId: string) => void;
6
+ focus: () => void;
7
+ getActiveItemId: () => string | null;
8
+ scrollToItem: (itemId: string) => void;
9
+ toggleItemCheck: (itemId: string) => void;
10
+ };
11
+ export type ListBoxProps = Omit<HTMLAttributes<HTMLDivElement>, "onSelect"> & {
12
+ data: ListBoxGroup[];
13
+ checkedIds?: string[];
14
+ emptyText?: string;
15
+ onItemCheckChange?: (item: ListBoxItem, group: ListBoxGroup, checked: boolean) => void;
16
+ onItemDoubleClick?: (item: ListBoxItem, group: ListBoxGroup) => void;
17
+ rightCheckBox?: boolean;
18
+ selectedId?: string;
19
+ uncheckedShape?: "box" | "none";
20
+ onItemSelect?: (item: ListBoxItem, group: ListBoxGroup) => void;
21
+ };
22
+ declare function ListBoxInner({ className, data, checkedIds, emptyText, onItemCheckChange, onItemDoubleClick, onItemSelect, rightCheckBox, selectedId, uncheckedShape, ...props }: ListBoxProps, ref: ForwardedRef<ListBoxHandle>): import("react/jsx-runtime").JSX.Element;
23
+ export declare const ListBox: (props: ListBoxProps & RefAttributes<ListBoxHandle>) => ReturnType<typeof ListBoxInner>;
@@ -0,0 +1 @@
1
+ export * from "./ListBox";
@@ -0,0 +1,6 @@
1
+ import { ListBoxCategory } from "./types";
2
+ type ListBoxCategoryViewProps = {
3
+ category: ListBoxCategory;
4
+ };
5
+ export declare function ListBoxCategoryView({ category }: ListBoxCategoryViewProps): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,8 @@
1
+ type ListBoxCheckControlProps = {
2
+ isChecked: boolean;
3
+ onActivate: () => void;
4
+ onToggleCheck: () => void;
5
+ uncheckedShape: "box" | "none";
6
+ };
7
+ export declare function ListBoxCheckControl({ isChecked, onActivate, onToggleCheck, uncheckedShape }: ListBoxCheckControlProps): import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,17 @@
1
+ import { ListBoxGroup, ListBoxItem } from "./types";
2
+ type ListBoxGroupViewProps = {
3
+ group: ListBoxGroup;
4
+ groupIndex: number;
5
+ isItemChecked: (item: ListBoxItem) => boolean;
6
+ listboxId: string;
7
+ onActivateItem: (item: ListBoxItem, group: ListBoxGroup, itemId: string) => void;
8
+ onDoubleClickItem?: (item: ListBoxItem, group: ListBoxGroup) => void;
9
+ onToggleItemCheck: (itemId: string) => void;
10
+ registerItemRef: (itemId: string, node: HTMLDivElement | null) => void;
11
+ resolvedActiveId: string | null;
12
+ rightCheckBox: boolean;
13
+ selectedId?: string;
14
+ uncheckedShape: "box" | "none";
15
+ };
16
+ export declare function ListBoxGroupView({ group, groupIndex, isItemChecked, listboxId, onActivateItem, onDoubleClickItem, onToggleItemCheck, registerItemRef, resolvedActiveId, rightCheckBox, selectedId, uncheckedShape }: ListBoxGroupViewProps): import("react/jsx-runtime").JSX.Element;
17
+ export {};
@@ -0,0 +1,18 @@
1
+ import { ListBoxGroup, ListBoxItem } from "./types";
2
+ type ListBoxItemViewProps = {
3
+ group: ListBoxGroup;
4
+ isActive: boolean;
5
+ isChecked: boolean;
6
+ isSelected: boolean;
7
+ item: ListBoxItem;
8
+ itemId: string;
9
+ onActivate: (item: ListBoxItem, group: ListBoxGroup, itemId: string) => void;
10
+ onDoubleClick?: (item: ListBoxItem, group: ListBoxGroup) => void;
11
+ onToggleCheck: (itemId: string) => void;
12
+ registerItemRef: (itemId: string, node: HTMLDivElement | null) => void;
13
+ rightCheckBox: boolean;
14
+ uncheckedShape: "box" | "none";
15
+ };
16
+ declare function ListBoxItemViewInner({ group, isActive, isChecked, isSelected, item, itemId, onActivate, onDoubleClick, onToggleCheck, registerItemRef, rightCheckBox, uncheckedShape }: ListBoxItemViewProps): import("react/jsx-runtime").JSX.Element;
17
+ export declare const ListBoxItemView: import("react").MemoExoticComponent<typeof ListBoxItemViewInner>;
18
+ export {};
@@ -0,0 +1,5 @@
1
+ import { FlattenedListBoxItem, ListBoxGroup, ListBoxItem } from "./types";
2
+ export declare function buildListBoxItemId(listboxId: string, group: ListBoxGroup, groupIndex: number, item: ListBoxItem, itemIndex: number): string;
3
+ export declare function flattenListBoxData(data: ListBoxGroup[], listboxId: string): FlattenedListBoxItem[];
4
+ export declare function getInitialActiveId(selectableItems: FlattenedListBoxItem[], selectedId?: string): string;
5
+ export declare function getListBoxItemChecked(item: ListBoxItem, checkedIds?: string[]): boolean;
@@ -0,0 +1,2 @@
1
+ import { ListBoxLabel } from "./types";
2
+ export declare function renderLabel(label: ListBoxLabel, className: string): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,27 @@
1
+ import { ReactNode } from "react";
2
+ export type ListBoxLabel = {
3
+ text: string;
4
+ icon?: ReactNode;
5
+ };
6
+ export type ListBoxCategory = ListBoxLabel & {
7
+ className?: string;
8
+ };
9
+ export type ListBoxItem = {
10
+ id?: string;
11
+ name: ListBoxLabel;
12
+ details?: ReactNode;
13
+ className?: string;
14
+ checkable?: boolean;
15
+ checked?: boolean;
16
+ disabled?: boolean;
17
+ selected?: boolean;
18
+ };
19
+ export type ListBoxGroup = {
20
+ category: ListBoxCategory | null;
21
+ items: ListBoxItem[];
22
+ };
23
+ export type FlattenedListBoxItem = {
24
+ group: ListBoxGroup;
25
+ item: ListBoxItem;
26
+ itemId: string;
27
+ };
@@ -0,0 +1,27 @@
1
+ import { ForwardedRef, HTMLAttributes, RefAttributes } from "react";
2
+ import { ListViewColumn, ListViewRowBase } from "./internals/types";
3
+ export type { ListViewColumn, ListViewRowBase } from "./internals/types";
4
+ export type ListViewHandle = {
5
+ activateRow: (rowId: string) => void;
6
+ focus: () => void;
7
+ getActiveRowId: () => string | null;
8
+ scrollToRow: (rowId: string) => void;
9
+ toggleRowCheck: (rowId: string) => void;
10
+ };
11
+ export type ListViewProps<T extends ListViewRowBase> = Omit<HTMLAttributes<HTMLDivElement>, "onSelect"> & {
12
+ activeRowId?: string;
13
+ checkedIds?: string[];
14
+ columns: ListViewColumn<T>[];
15
+ data: T[];
16
+ defaultActiveRowId?: string;
17
+ emptyText?: string;
18
+ onActiveRowChange?: (row: T) => void;
19
+ onRowCheckChange?: (row: T, checked: boolean) => void;
20
+ onRowDoubleClick?: (row: T) => void;
21
+ onRowSelect?: (row: T) => void;
22
+ selectedId?: string;
23
+ showCheckBox?: boolean;
24
+ uncheckedShape?: "box" | "none";
25
+ };
26
+ declare function ListViewInner<T extends ListViewRowBase>({ activeRowId: activeRowIdProp, checkedIds, className, columns, data, defaultActiveRowId, emptyText, onActiveRowChange, onRowCheckChange, onRowDoubleClick, onRowSelect, selectedId, showCheckBox, uncheckedShape, ...props }: ListViewProps<T>, ref: ForwardedRef<ListViewHandle>): import("react/jsx-runtime").JSX.Element;
27
+ export declare const ListView: <T extends ListViewRowBase>(props: ListViewProps<T> & RefAttributes<ListViewHandle>) => ReturnType<typeof ListViewInner>;
@@ -0,0 +1 @@
1
+ export * from "./ListView";
@@ -0,0 +1,8 @@
1
+ type ListViewCheckControlProps = {
2
+ isChecked: boolean;
3
+ onActivate: () => void;
4
+ onToggleCheck: () => void;
5
+ uncheckedShape: "box" | "none";
6
+ };
7
+ export declare function ListViewCheckControl({ isChecked, onActivate, onToggleCheck, uncheckedShape }: ListViewCheckControlProps): import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,18 @@
1
+ import { ListViewColumn, ListViewRowBase } from "./types";
2
+ type ListViewRowProps<T extends ListViewRowBase> = {
3
+ columns: ListViewColumn<T>[];
4
+ isActive: boolean;
5
+ isChecked: boolean;
6
+ isSelected: boolean;
7
+ onActivate: (rowId: string) => void;
8
+ onDoubleClick?: (row: T) => void;
9
+ onToggleCheck: (rowId: string) => void;
10
+ registerRowRef: (rowId: string, node: HTMLDivElement | null) => void;
11
+ row: T;
12
+ showCheckBox: boolean;
13
+ templateColumns: string;
14
+ uncheckedShape: "box" | "none";
15
+ };
16
+ declare function ListViewRowInner<T extends ListViewRowBase>({ columns, isActive, isChecked, isSelected, onActivate, onDoubleClick, onToggleCheck, registerRowRef, row, showCheckBox, templateColumns, uncheckedShape }: ListViewRowProps<T>): import("react/jsx-runtime").JSX.Element;
17
+ export declare const ListViewRow: typeof ListViewRowInner;
18
+ export {};
@@ -0,0 +1,5 @@
1
+ import { ReactNode } from "react";
2
+ import { ListViewColumn, ListViewRowBase } from "./types";
3
+ export declare function getInitialActiveRowId<T extends ListViewRowBase>(rows: T[], selectedId?: string): string | null;
4
+ export declare function getListViewRowChecked<T extends ListViewRowBase>(row: T, checkedIds?: string[]): boolean;
5
+ export declare function renderListViewCellValue<T extends ListViewRowBase>(row: T, column: ListViewColumn<T>): ReactNode;