@nordmanai/nif 0.1.0 → 0.2.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/README.md +18 -0
- package/bin/nif.mjs +196 -0
- package/dist/index.d.ts +30 -1
- package/dist/index.js +9661 -2499
- package/dist/styles.css +1 -1
- package/dist/tokens.css +4 -1
- package/dist/ui/components/nm-ai/nm-ai.d.ts +7 -7
- package/dist/ui/components/nm-brand-logo/nm-brand-logo.d.ts +10 -0
- package/dist/ui/components/nm-breadcrumb/nm-breadcrumb.d.ts +11 -0
- package/dist/ui/components/nm-button/nm-button.d.ts +2 -0
- package/dist/ui/components/nm-button-group/nm-button-group.d.ts +17 -0
- package/dist/ui/components/nm-calendar/nm-calendar.d.ts +3 -0
- package/dist/ui/components/nm-card/nm-card.d.ts +34 -0
- package/dist/ui/components/nm-chip/nm-chip.d.ts +38 -0
- package/dist/ui/components/nm-code-block/nm-code-block.d.ts +55 -0
- package/dist/ui/components/nm-color-picker/nm-color-picker.d.ts +15 -0
- package/dist/ui/components/nm-combobox/nm-combobox.d.ts +26 -0
- package/dist/ui/components/nm-command/nm-command.d.ts +37 -0
- package/dist/ui/components/nm-composer/nm-composer.d.ts +4 -0
- package/dist/ui/components/nm-context-menu/nm-context-menu.d.ts +9 -0
- package/dist/ui/components/nm-date-picker/nm-date-picker.d.ts +35 -0
- package/dist/ui/components/nm-dialog/nm-dialog.d.ts +13 -0
- package/dist/ui/components/nm-field/nm-field.d.ts +2 -0
- package/dist/ui/components/nm-form-field/nm-form-field.d.ts +18 -0
- package/dist/ui/components/nm-gallery/nm-gallery.d.ts +8 -0
- package/dist/ui/components/nm-input/nm-input.d.ts +5 -0
- package/dist/ui/components/nm-input-group/nm-input-group.d.ts +9 -0
- package/dist/ui/components/nm-label/nm-label.d.ts +2 -0
- package/dist/ui/components/nm-menubar/nm-menubar.d.ts +9 -0
- package/dist/ui/components/nm-native-select/nm-native-select.d.ts +5 -0
- package/dist/ui/components/nm-panel/nm-panel.d.ts +14 -0
- package/dist/ui/components/nm-prose/nm-prose.d.ts +6 -0
- package/dist/ui/components/nm-resize-handle/nm-resize-handle.d.ts +18 -0
- package/dist/ui/components/nm-select/nm-select.d.ts +22 -0
- package/dist/ui/components/nm-side-panel/nm-side-panel.d.ts +33 -0
- package/dist/ui/components/nm-slider/nm-slider.d.ts +5 -1
- package/dist/ui/components/nm-status-bar/nm-status-bar.d.ts +8 -0
- package/dist/ui/components/nm-table/nm-table.d.ts +38 -0
- package/dist/ui/components/nm-textarea/nm-textarea.d.ts +2 -0
- package/dist/ui/components/nm-toolbar/nm-toolbar.d.ts +21 -0
- package/dist/ui/config/nm-ai.d.ts +0 -3
- package/dist/ui/config/nm-appearance.d.ts +36 -1
- package/dist/ui/config/nm-button.d.ts +2 -1
- package/dist/ui/config/nm-composer.d.ts +1 -2
- package/dist/ui/config/nm-field.d.ts +2 -0
- package/dist/ui/config/nm-icons.d.ts +13 -1
- package/dist/ui/config/nm-radius.d.ts +4 -4
- package/dist/ui/config/nm-side-panel.d.ts +33 -0
- package/dist/ui/lib/appearance/appearanceState.d.ts +1 -0
- package/dist/ui/lib/appearance/deriveTokens.d.ts +2 -0
- package/package.json +12 -4
- package/registry/index.json +1634 -0
- package/registry/tokens.css +72 -0
- package/registry/ui/components/nm-ai/nm-ai.css +358 -0
- package/registry/ui/components/nm-ai/nm-ai.tsx +632 -0
- package/registry/ui/components/nm-app-panel/nm-app-panel.css +169 -0
- package/registry/ui/components/nm-ask/nm-ask.css +277 -0
- package/registry/ui/components/nm-avatar/nm-avatar.css +85 -0
- package/registry/ui/components/nm-avatar/nm-avatar.tsx +30 -0
- package/registry/ui/components/nm-bar-overflow/nm-bar-overflow.css +43 -0
- package/registry/ui/components/nm-bar-overflow/nm-bar-overflow.tsx +61 -0
- package/registry/ui/components/nm-bar-overflow/use-bar-overflow.ts +92 -0
- package/registry/ui/components/nm-brand-logo/nm-brand-logo.css +20 -0
- package/registry/ui/components/nm-brand-logo/nm-brand-logo.tsx +21 -0
- package/registry/ui/components/nm-breadcrumb/nm-breadcrumb.css +57 -0
- package/registry/ui/components/nm-breadcrumb/nm-breadcrumb.tsx +42 -0
- package/registry/ui/components/nm-button/nm-button.css +110 -0
- package/registry/ui/components/nm-button/nm-button.tsx +58 -0
- package/registry/ui/components/nm-button-group/nm-button-group.css +87 -0
- package/registry/ui/components/nm-button-group/nm-button-group.tsx +32 -0
- package/registry/ui/components/nm-calendar/nm-calendar.css +178 -0
- package/registry/ui/components/nm-calendar/nm-calendar.tsx +43 -0
- package/registry/ui/components/nm-card/nm-card.css +130 -0
- package/registry/ui/components/nm-card/nm-card.tsx +83 -0
- package/registry/ui/components/nm-chatbox/nm-chatbox-icon.tsx +39 -0
- package/registry/ui/components/nm-chatbox/nm-chatbox.css +682 -0
- package/registry/ui/components/nm-chatbox/nm-chatbox.tsx +101 -0
- package/registry/ui/components/nm-checkbox/nm-checkbox.css +61 -0
- package/registry/ui/components/nm-checkbox/nm-checkbox.tsx +14 -0
- package/registry/ui/components/nm-chip/nm-chip.css +112 -0
- package/registry/ui/components/nm-chip/nm-chip.tsx +86 -0
- package/registry/ui/components/nm-code-block/nm-code-block.css +240 -0
- package/registry/ui/components/nm-code-block/nm-code-block.tsx +196 -0
- package/registry/ui/components/nm-collection/nm-collection-bar.tsx +65 -0
- package/registry/ui/components/nm-collection/nm-collection-grid.tsx +69 -0
- package/registry/ui/components/nm-collection/nm-collection-query.tsx +99 -0
- package/registry/ui/components/nm-collection/nm-collection-row-menu.tsx +55 -0
- package/registry/ui/components/nm-collection/nm-collection-table.tsx +99 -0
- package/registry/ui/components/nm-collection/nm-collection-tile-actions.tsx +50 -0
- package/registry/ui/components/nm-collection/nm-collection-title.tsx +25 -0
- package/registry/ui/components/nm-collection/nm-collection.css +353 -0
- package/registry/ui/components/nm-collection/use-collection-scroll-reveal.ts +38 -0
- package/registry/ui/components/nm-color-picker/nm-color-picker.css +67 -0
- package/registry/ui/components/nm-color-picker/nm-color-picker.tsx +79 -0
- package/registry/ui/components/nm-combobox/nm-combobox.css +72 -0
- package/registry/ui/components/nm-combobox/nm-combobox.tsx +80 -0
- package/registry/ui/components/nm-command/nm-command.css +190 -0
- package/registry/ui/components/nm-command/nm-command.tsx +125 -0
- package/registry/ui/components/nm-composer/nm-composer.css +178 -0
- package/registry/ui/components/nm-composer/nm-composer.tsx +151 -0
- package/registry/ui/components/nm-context-menu/nm-context-menu.tsx +25 -0
- package/registry/ui/components/nm-date-picker/nm-date-picker.css +140 -0
- package/registry/ui/components/nm-date-picker/nm-date-picker.tsx +153 -0
- package/registry/ui/components/nm-dialog/nm-dialog.css +84 -0
- package/registry/ui/components/nm-dialog/nm-dialog.tsx +40 -0
- package/registry/ui/components/nm-dropdown/nm-dropdown-item.ts +68 -0
- package/registry/ui/components/nm-dropdown/nm-dropdown-options.tsx +242 -0
- package/registry/ui/components/nm-dropdown/nm-dropdown-panel.tsx +171 -0
- package/registry/ui/components/nm-dropdown/nm-dropdown-placement.ts +157 -0
- package/registry/ui/components/nm-dropdown/nm-dropdown.css +312 -0
- package/registry/ui/components/nm-dropdown/nm-dropdown.tsx +412 -0
- package/registry/ui/components/nm-dropdown-menu/nm-dropdown-menu.css +145 -0
- package/registry/ui/components/nm-dropdown-menu/nm-dropdown-menu.tsx +118 -0
- package/registry/ui/components/nm-field/nm-field.css +356 -0
- package/registry/ui/components/nm-field/nm-field.tsx +355 -0
- package/registry/ui/components/nm-form-field/nm-form-field.css +103 -0
- package/registry/ui/components/nm-form-field/nm-form-field.tsx +71 -0
- package/registry/ui/components/nm-gallery/nm-gallery.css +66 -0
- package/registry/ui/components/nm-gallery/nm-gallery.tsx +31 -0
- package/registry/ui/components/nm-hover-card/nm-hover-card.css +26 -0
- package/registry/ui/components/nm-hover-card/nm-hover-card.tsx +28 -0
- package/registry/ui/components/nm-icon/nm-icon.css +6 -0
- package/registry/ui/components/nm-icon/nm-icon.tsx +69 -0
- package/registry/ui/components/nm-icon/nm-lucide.tsx +180 -0
- package/registry/ui/components/nm-icon-border/nm-icon-border.tsx +56 -0
- package/registry/ui/components/nm-input/nm-input.css +75 -0
- package/registry/ui/components/nm-input/nm-input.tsx +7 -0
- package/registry/ui/components/nm-input-group/nm-input-group.css +66 -0
- package/registry/ui/components/nm-input-group/nm-input-group.tsx +20 -0
- package/registry/ui/components/nm-label/nm-label.css +11 -0
- package/registry/ui/components/nm-label/nm-label.tsx +6 -0
- package/registry/ui/components/nm-list-item/nm-list-item.css +177 -0
- package/registry/ui/components/nm-list-item/nm-list-item.tsx +112 -0
- package/registry/ui/components/nm-menubar/nm-menubar.css +32 -0
- package/registry/ui/components/nm-menubar/nm-menubar.tsx +19 -0
- package/registry/ui/components/nm-message/nm-message-actions.tsx +24 -0
- package/registry/ui/components/nm-message/nm-message-meta.tsx +49 -0
- package/registry/ui/components/nm-message/nm-message.css +686 -0
- package/registry/ui/components/nm-message/nm-text-shimmer.tsx +6 -0
- package/registry/ui/components/nm-message/nm-trace.tsx +219 -0
- package/registry/ui/components/nm-modal/nm-modal.css +763 -0
- package/registry/ui/components/nm-modal/nm-modal.tsx +497 -0
- package/registry/ui/components/nm-native-select/nm-native-select.css +47 -0
- package/registry/ui/components/nm-native-select/nm-native-select.tsx +23 -0
- package/registry/ui/components/nm-panel/nm-panel.css +73 -0
- package/registry/ui/components/nm-panel/nm-panel.tsx +35 -0
- package/registry/ui/components/nm-panel-bar/nm-panel-bar.css +20 -0
- package/registry/ui/components/nm-panel-bar/nm-panel-bar.tsx +48 -0
- package/registry/ui/components/nm-popover/nm-popover.css +43 -0
- package/registry/ui/components/nm-popover/nm-popover.tsx +40 -0
- package/registry/ui/components/nm-progress/nm-progress.css +21 -0
- package/registry/ui/components/nm-progress/nm-progress.tsx +14 -0
- package/registry/ui/components/nm-prose/nm-prose.css +81 -0
- package/registry/ui/components/nm-prose/nm-prose.tsx +10 -0
- package/registry/ui/components/nm-questionnaire/nm-questionnaire.css +182 -0
- package/registry/ui/components/nm-questionnaire/nm-questionnaire.tsx +221 -0
- package/registry/ui/components/nm-radio-group/nm-radio-group.css +48 -0
- package/registry/ui/components/nm-radio-group/nm-radio-group.tsx +15 -0
- package/registry/ui/components/nm-rail-icon/nm-rail-icon.css +6 -0
- package/registry/ui/components/nm-rail-icon/nm-rail-icon.tsx +28 -0
- package/registry/ui/components/nm-resize-handle/nm-resize-handle.css +45 -0
- package/registry/ui/components/nm-resize-handle/nm-resize-handle.tsx +102 -0
- package/registry/ui/components/nm-segmented/nm-segmented.css +104 -0
- package/registry/ui/components/nm-segmented/nm-segmented.tsx +77 -0
- package/registry/ui/components/nm-select/nm-select.css +78 -0
- package/registry/ui/components/nm-select/nm-select.tsx +64 -0
- package/registry/ui/components/nm-separator/nm-separator.css +14 -0
- package/registry/ui/components/nm-separator/nm-separator.tsx +6 -0
- package/registry/ui/components/nm-side-panel/nm-side-panel.css +93 -0
- package/registry/ui/components/nm-side-panel/nm-side-panel.tsx +86 -0
- package/registry/ui/components/nm-slider/nm-slider.css +53 -0
- package/registry/ui/components/nm-slider/nm-slider.tsx +40 -0
- package/registry/ui/components/nm-small-icon-button/nm-small-icon-button.tsx +66 -0
- package/registry/ui/components/nm-status-bar/nm-status-bar.css +50 -0
- package/registry/ui/components/nm-status-bar/nm-status-bar.tsx +28 -0
- package/registry/ui/components/nm-switch/nm-switch.css +45 -0
- package/registry/ui/components/nm-switch/nm-switch.tsx +10 -0
- package/registry/ui/components/nm-table/nm-table.css +155 -0
- package/registry/ui/components/nm-table/nm-table.tsx +95 -0
- package/registry/ui/components/nm-tabs/nm-tabs.css +28 -0
- package/registry/ui/components/nm-tabs/nm-tabs.tsx +32 -0
- package/registry/ui/components/nm-textarea/nm-textarea.css +41 -0
- package/registry/ui/components/nm-textarea/nm-textarea.tsx +6 -0
- package/registry/ui/components/nm-toggle/nm-toggle.css +55 -0
- package/registry/ui/components/nm-toggle/nm-toggle.tsx +16 -0
- package/registry/ui/components/nm-toolbar/nm-toolbar.css +42 -0
- package/registry/ui/components/nm-toolbar/nm-toolbar.tsx +54 -0
- package/registry/ui/components/nm-tooltip/nm-tooltip.css +37 -0
- package/registry/ui/components/nm-tooltip/nm-tooltip.tsx +35 -0
- package/registry/ui/components/nm-top-bar/nm-top-bar.css +29 -0
- package/registry/ui/components/nm-top-bar/nm-top-bar.tsx +34 -0
- package/registry/ui/components/nordman-icon-button/nordman-icon-button.css +119 -0
- package/registry/ui/components/nordman-icon-button/nordman-icon-button.tsx +185 -0
- package/registry/ui/components/nordman-login/nordman-login.css +195 -0
- package/registry/ui/components/nordman-login/nordman-login.tsx +136 -0
- package/registry/ui/components/nordman-login-field/nordman-login-field.tsx +55 -0
- package/registry/ui/components/nordman-login-forgot/nordman-login-forgot.tsx +56 -0
- package/registry/ui/components/nordman-login-google/nordman-login-google.tsx +28 -0
- package/registry/ui/components/nordman-login-hero/nordman-login-hero.tsx +38 -0
- package/registry/ui/components/nordman-login-register/nordman-login-register.tsx +70 -0
- package/registry/ui/components/nordman-login-reset/nordman-login-reset.tsx +71 -0
- package/registry/ui/components/nordman-login-reveal/nordman-login-reveal.tsx +41 -0
- package/registry/ui/components/nordman-login-sign-in/nordman-login-sign-in.tsx +69 -0
- package/registry/ui/components/nordman-toggle/nordman-toggle.css +28 -0
- package/registry/ui/components/nordman-toggle/nordman-toggle.tsx +35 -0
- package/registry/ui/config/nm-ai.ts +59 -0
- package/registry/ui/config/nm-appearance.ts +275 -0
- package/registry/ui/config/nm-bar-overflow.ts +10 -0
- package/registry/ui/config/nm-button.ts +38 -0
- package/registry/ui/config/nm-chatbox-icons.ts +67 -0
- package/registry/ui/config/nm-chatbox.ts +42 -0
- package/registry/ui/config/nm-collection.ts +101 -0
- package/registry/ui/config/nm-composer.ts +39 -0
- package/registry/ui/config/nm-dropdown.ts +62 -0
- package/registry/ui/config/nm-field.ts +43 -0
- package/registry/ui/config/nm-icon-button.ts +35 -0
- package/registry/ui/config/nm-icons.ts +417 -0
- package/registry/ui/config/nm-list-item.ts +14 -0
- package/registry/ui/config/nm-message.ts +106 -0
- package/registry/ui/config/nm-modal.ts +76 -0
- package/registry/ui/config/nm-panel-bar.ts +11 -0
- package/registry/ui/config/nm-questionnaire.ts +53 -0
- package/registry/ui/config/nm-radius.ts +56 -0
- package/registry/ui/config/nm-rail-icons.ts +27 -0
- package/registry/ui/config/nm-segmented.ts +19 -0
- package/registry/ui/config/nm-side-panel.ts +16 -0
- package/registry/ui/config/nm-site-palette.ts +30 -0
- package/registry/ui/config/nm-small-icon-button.ts +17 -0
- package/registry/ui/config/nm-tabs.ts +9 -0
- package/registry/ui/config/nm-top-bar.ts +4 -0
- package/registry/ui/config/nordman-chrome.ts +14 -0
- package/registry/ui/config/nordman-login.ts +28 -0
- package/registry/ui/content/nm-modal.ts +5 -0
- package/registry/ui/content/nordman-login.ts +85 -0
- package/registry/ui/kit-logger.ts +1 -0
- package/registry/ui/lib/appearance/appearanceState.ts +240 -0
- package/registry/ui/lib/appearance/applyAppearance.ts +36 -0
- package/registry/ui/lib/appearance/cloudOrbAppearance.ts +36 -0
- package/registry/ui/lib/appearance/color.ts +96 -0
- package/registry/ui/lib/appearance/deriveTokens.ts +218 -0
- package/registry/ui/lib/appearance/index.ts +6 -0
- package/registry/ui/lib/appearance/markTokens.ts +49 -0
- package/registry/ui/lib/appearance/readLayoutMetrics.ts +28 -0
- package/registry/ui/lib/bar-overflow.ts +41 -0
- package/registry/ui/lib/logger.ts +53 -0
- package/registry/ui/lib/menu-motion.ts +187 -0
- package/registry/ui/lib/nm-class.ts +4 -0
- package/registry/ui/lib/nordman-ui-locale.ts +43 -0
- package/registry/ui/styles/interface-theme.css +196 -0
- package/registry/ui/styles/light-appearance.css +72 -0
- package/registry/ui/styles/tokens.css +424 -0
- package/registry/ui/styles/utilities.css +12 -0
- package/dist/ui/components/nm-accordion/nm-accordion.d.ts +0 -6
package/dist/tokens.css
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
/* One geometry for controls on every page. */
|
|
23
23
|
--control-h:32px; --control-h-sm:28px; --control-h-lg:40px;
|
|
24
24
|
--control-r:6px; --control-px:calc(12px * var(--nm-space-scale, 1)); --control-gap:calc(8px * var(--nm-space-scale, 1));
|
|
25
|
-
--control-fs:14px; --control-fw:
|
|
25
|
+
--control-fs:14px; --control-fw:var(--nm-weight-medium); --btn-hover:.88;
|
|
26
26
|
--field-label-fs:13px; --field-label-gap:calc(6px * var(--nm-space-scale, 1)); --field-area-py:calc(10px * var(--nm-space-scale, 1));
|
|
27
27
|
--tab-py:calc(10px * var(--nm-space-scale, 1)); --tab-px:calc(14px * var(--nm-space-scale, 1)); --tab-rule:2px;
|
|
28
28
|
--toggle-pad:calc(3px * var(--nm-space-scale, 1)); --toggle-h:30px; --toggle-px:calc(14px * var(--nm-space-scale, 1)); --toggle-r:999px;
|
|
@@ -67,3 +67,6 @@
|
|
|
67
67
|
--nm-font-mono:'Geist Mono',ui-monospace,'SF Mono',Menlo,Consolas,monospace;
|
|
68
68
|
--nm-weight-light:300; --nm-weight-regular:400; --nm-weight-medium:500; --nm-weight-semibold:600; --nm-weight-bold:700;
|
|
69
69
|
}
|
|
70
|
+
|
|
71
|
+
/* One height for every field: input, select, date, colour, input group. Content never changes it. */
|
|
72
|
+
:root{ --nm-field-h:var(--control-h-lg); }
|
|
@@ -4,12 +4,6 @@ export declare function NmBubble(props: {
|
|
|
4
4
|
role: 'user' | 'assistant';
|
|
5
5
|
children: ReactNode;
|
|
6
6
|
}): ReactNode;
|
|
7
|
-
export declare function NmCodeBlock(props: {
|
|
8
|
-
children: string;
|
|
9
|
-
label?: string;
|
|
10
|
-
nowrap?: boolean;
|
|
11
|
-
maxHeight?: string;
|
|
12
|
-
}): ReactNode;
|
|
13
7
|
export declare function NmBadge(props: {
|
|
14
8
|
tone?: NmAiBadgeTone;
|
|
15
9
|
children: ReactNode;
|
|
@@ -81,10 +75,15 @@ export type NmFileNode = {
|
|
|
81
75
|
name: string;
|
|
82
76
|
children?: readonly NmFileNode[];
|
|
83
77
|
};
|
|
78
|
+
type TreeSelection = {
|
|
79
|
+
selected?: string;
|
|
80
|
+
onSelect?: (path: string) => void;
|
|
81
|
+
};
|
|
82
|
+
/** Folders open and close. Give it `onSelect` and a file can be chosen. `selected` is its path, like `src/App.tsx`. */
|
|
84
83
|
export declare function NmFileTree(props: {
|
|
85
84
|
nodes: readonly NmFileNode[];
|
|
86
85
|
defaultOpen?: boolean;
|
|
87
|
-
}): ReactNode;
|
|
86
|
+
} & TreeSelection): ReactNode;
|
|
88
87
|
export declare function NmInlineCitation(props: {
|
|
89
88
|
label: string;
|
|
90
89
|
title: string;
|
|
@@ -220,3 +219,4 @@ export declare function NmChat(props: {
|
|
|
220
219
|
};
|
|
221
220
|
streaming?: boolean;
|
|
222
221
|
}): ReactNode;
|
|
222
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ComponentProps } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* A brand logo from its SVG source, such as the strings in @thesvg/icons. The markup must come from a trusted
|
|
4
|
+
* package, never from user input. It is drawn at the icon size, and a mono logo (`mono`) takes the text colour, so it reads on any theme.
|
|
5
|
+
*/
|
|
6
|
+
export declare function NmBrandLogo({ svg, label, mono, className, ...props }: Omit<ComponentProps<'span'>, 'children'> & {
|
|
7
|
+
svg: string;
|
|
8
|
+
label?: string;
|
|
9
|
+
mono?: boolean;
|
|
10
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ComponentProps } from 'react';
|
|
2
|
+
/** The path to the current page. The shadcn Breadcrumb composition, styled by NIF tokens. */
|
|
3
|
+
export declare function NmBreadcrumb({ className, ...props }: ComponentProps<'nav'>): import("react").JSX.Element;
|
|
4
|
+
export declare function NmBreadcrumbList({ className, ...props }: ComponentProps<'ol'>): import("react").JSX.Element;
|
|
5
|
+
export declare function NmBreadcrumbItem({ className, ...props }: ComponentProps<'li'>): import("react").JSX.Element;
|
|
6
|
+
export declare function NmBreadcrumbLink({ className, ...props }: ComponentProps<'a'>): import("react").JSX.Element;
|
|
7
|
+
/** The current page. It is not a link. */
|
|
8
|
+
export declare function NmBreadcrumbPage({ className, ...props }: ComponentProps<'span'>): import("react").JSX.Element;
|
|
9
|
+
export declare function NmBreadcrumbSeparator({ className, children, ...props }: ComponentProps<'li'>): import("react").JSX.Element;
|
|
10
|
+
/** Stands for the levels left out. Put it in a dropdown menu trigger to let people reach them. */
|
|
11
|
+
export declare function NmBreadcrumbEllipsis({ className, ...props }: ComponentProps<'span'>): import("react").JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type ComponentProps, type ReactElement } from 'react';
|
|
2
|
+
import { NmSeparator } from '../nm-separator/nm-separator.tsx';
|
|
3
|
+
/**
|
|
4
|
+
* Joins buttons, and the controls that sit beside them, into one bar. Neighbours share a border and only the outer
|
|
5
|
+
* corners stay round. Nest groups to set sets of buttons apart. The shadcn Button Group composition, styled by NIF tokens.
|
|
6
|
+
*/
|
|
7
|
+
export declare function NmButtonGroup({ className, orientation, ...props }: ComponentProps<'div'> & {
|
|
8
|
+
orientation?: 'horizontal' | 'vertical';
|
|
9
|
+
}): import("react").JSX.Element;
|
|
10
|
+
/** A line between buttons that have no border of their own. Outline buttons do not need one. */
|
|
11
|
+
export declare function NmButtonGroupSeparator({ className, orientation, ...props }: ComponentProps<typeof NmSeparator>): import("react").JSX.Element;
|
|
12
|
+
/** Text in the bar, set like a button. Give `render` an element, such as a Label, to draw the text with it. */
|
|
13
|
+
export declare function NmButtonGroupText({ className, render, children, ...props }: ComponentProps<'div'> & {
|
|
14
|
+
render?: ReactElement<{
|
|
15
|
+
className?: string;
|
|
16
|
+
}>;
|
|
17
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { type DayPickerProps } from 'react-day-picker';
|
|
2
|
+
/** react-day-picker, in the shadcn Calendar composition, drawn entirely by NIF tokens. Single, multiple or range. */
|
|
3
|
+
export declare function NmCalendar({ className, showOutsideDays, ...props }: DayPickerProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { ComponentProps } from 'react';
|
|
2
|
+
export declare const NM_CARD_VARIANTS: readonly ['default', 'outline', 'muted'];
|
|
3
|
+
export declare const NM_CARD_SIZES: readonly ['default', 'sm'];
|
|
4
|
+
export type NmCardVariant = (typeof NM_CARD_VARIANTS)[number];
|
|
5
|
+
export type NmCardSize = (typeof NM_CARD_SIZES)[number];
|
|
6
|
+
type CardOptions = {
|
|
7
|
+
variant?: NmCardVariant;
|
|
8
|
+
size?: NmCardSize;
|
|
9
|
+
/** The card is the person's current choice. */
|
|
10
|
+
selected?: boolean;
|
|
11
|
+
/** The card cannot be used. */
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* A surface that groups related content. The shadcn Card composition, styled by NIF tokens.
|
|
16
|
+
* Give it an `href` and it becomes a link, with hover and focus states.
|
|
17
|
+
*/
|
|
18
|
+
export declare function NmCard({ className, variant, size, selected, disabled, href, ...props }: Omit<ComponentProps<'div'>, 'onClick'> & CardOptions & {
|
|
19
|
+
href?: string;
|
|
20
|
+
onClick?: ComponentProps<'a'>['onClick'];
|
|
21
|
+
}): import("react").JSX.Element;
|
|
22
|
+
/** `align="center"` centres a leading icon and a trailing action against the text, as in a row of apps. */
|
|
23
|
+
export declare function NmCardHeader({ className, align, ...props }: ComponentProps<'div'> & {
|
|
24
|
+
align?: 'start' | 'center';
|
|
25
|
+
}): import("react").JSX.Element;
|
|
26
|
+
export declare function NmCardTitle({ className, ...props }: ComponentProps<'div'>): import("react").JSX.Element;
|
|
27
|
+
export declare function NmCardDescription({ className, ...props }: ComponentProps<'div'>): import("react").JSX.Element;
|
|
28
|
+
/** Sits at the end of the header, beside the title. */
|
|
29
|
+
export declare function NmCardAction({ className, ...props }: ComponentProps<'div'>): import("react").JSX.Element;
|
|
30
|
+
export declare function NmCardContent({ className, ...props }: ComponentProps<'div'>): import("react").JSX.Element;
|
|
31
|
+
export declare function NmCardFooter({ className, ...props }: ComponentProps<'div'>): import("react").JSX.Element;
|
|
32
|
+
/** A leading icon or image in the header. The title, description and footer line up beside it. */
|
|
33
|
+
export declare function NmCardMedia({ className, ...props }: ComponentProps<'div'>): import("react").JSX.Element;
|
|
34
|
+
export {};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { ComponentProps, ReactNode } from 'react';
|
|
2
|
+
import type { NmIconId } from '../../config/nm-icons.ts';
|
|
3
|
+
export declare const NM_CHIP_TONES: readonly ['neutral', 'outline', 'filled', 'ok', 'warn', 'error'];
|
|
4
|
+
export declare const NM_CHIP_SIZES: readonly ['default', 'sm'];
|
|
5
|
+
export type NmChipTone = (typeof NM_CHIP_TONES)[number];
|
|
6
|
+
export type NmChipSize = (typeof NM_CHIP_SIZES)[number];
|
|
7
|
+
type NmChipBase = {
|
|
8
|
+
tone?: NmChipTone;
|
|
9
|
+
size?: NmChipSize;
|
|
10
|
+
icon?: NmIconId;
|
|
11
|
+
/** A chip that stands for a chosen filter or option. */
|
|
12
|
+
selected?: boolean;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
children: ReactNode;
|
|
15
|
+
className?: string;
|
|
16
|
+
};
|
|
17
|
+
export type NmChipProps = NmChipBase & ({
|
|
18
|
+
onClick?: undefined;
|
|
19
|
+
href?: undefined;
|
|
20
|
+
onRemove?: () => void;
|
|
21
|
+
removeLabel?: string;
|
|
22
|
+
} | {
|
|
23
|
+
onClick: () => void;
|
|
24
|
+
href?: undefined;
|
|
25
|
+
onRemove?: undefined;
|
|
26
|
+
removeLabel?: undefined;
|
|
27
|
+
} | {
|
|
28
|
+
href: string;
|
|
29
|
+
onClick?: undefined;
|
|
30
|
+
onRemove?: undefined;
|
|
31
|
+
removeLabel?: undefined;
|
|
32
|
+
}) & Omit<ComponentProps<'span'>, 'children' | 'className' | 'onClick'>;
|
|
33
|
+
/**
|
|
34
|
+
* A small label for a status, a filter, an attachment or a tag. Static by default. Give it `onClick` and it
|
|
35
|
+
* becomes a button, `href` and it becomes a link, `onRemove` and it gains a remove button.
|
|
36
|
+
*/
|
|
37
|
+
export declare function NmChip({ tone, size, icon, selected, disabled, children, className, onClick, href, onRemove, removeLabel, ...rest }: NmChipProps): import("react").JSX.Element;
|
|
38
|
+
export {};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { type ComponentProps, type ReactNode } from 'react';
|
|
2
|
+
export declare const NM_CODE_BLOCK_VARIANTS: readonly ['default', 'destructive'];
|
|
3
|
+
export declare const NM_CODE_BLOCK_SIZES: readonly ['default', 'sm'];
|
|
4
|
+
export type NmCodeBlockVariant = (typeof NM_CODE_BLOCK_VARIANTS)[number];
|
|
5
|
+
export type NmCodeBlockSize = (typeof NM_CODE_BLOCK_SIZES)[number];
|
|
6
|
+
/**
|
|
7
|
+
* Displays code, terminal output and diffs with an optional header, line numbers and a copy button.
|
|
8
|
+
* The shadcn Code Block composition, styled by NIF tokens. Colours for syntax come from the --nm-syntax tokens.
|
|
9
|
+
*/
|
|
10
|
+
export declare function NmCodeBlock({ className, variant, size, ...props }: ComponentProps<'div'> & {
|
|
11
|
+
variant?: NmCodeBlockVariant;
|
|
12
|
+
size?: NmCodeBlockSize;
|
|
13
|
+
}): import("react").JSX.Element;
|
|
14
|
+
export declare function NmCodeBlockHeader({ className, ...props }: ComponentProps<'div'>): import("react").JSX.Element;
|
|
15
|
+
export declare function NmCodeBlockTitle({ className, ...props }: ComponentProps<'div'>): import("react").JSX.Element;
|
|
16
|
+
/** Buttons for the header. Placed straight in the block, they float over its top right corner. */
|
|
17
|
+
export declare function NmCodeBlockActions({ className, ...props }: ComponentProps<'div'>): import("react").JSX.Element;
|
|
18
|
+
/** An icon button that copies `value`. It shows a tick for a moment afterwards. */
|
|
19
|
+
export declare function NmCodeBlockCopyButton({ value, label, copiedLabel }: {
|
|
20
|
+
value: string;
|
|
21
|
+
label?: string;
|
|
22
|
+
copiedLabel?: string;
|
|
23
|
+
}): import("react").JSX.Element;
|
|
24
|
+
/** One line. `variant` marks it as highlighted, added or removed. */
|
|
25
|
+
export declare function NmCodeBlockLine({ className, variant, children, html, language, ...props }: Omit<ComponentProps<'span'>, 'children'> & {
|
|
26
|
+
variant?: 'default' | 'highlighted' | 'added' | 'removed';
|
|
27
|
+
children?: ReactNode;
|
|
28
|
+
html?: string;
|
|
29
|
+
language?: NmCodeLanguage;
|
|
30
|
+
}): import("react").JSX.Element;
|
|
31
|
+
/** Splits highlighted markup from shiki into one string per line. */
|
|
32
|
+
export declare function nmHighlightedLines(html: string): string[];
|
|
33
|
+
export declare const NM_CODE_LANGUAGES: readonly ['tsx', 'ts', 'js', 'json', 'css', 'bash'];
|
|
34
|
+
export type NmCodeLanguage = (typeof NM_CODE_LANGUAGES)[number];
|
|
35
|
+
export type NmCodeBlockContentProps = Omit<ComponentProps<'pre'>, 'children'> & {
|
|
36
|
+
/** A string, or a list of NmCodeBlockLine. */
|
|
37
|
+
children?: ReactNode;
|
|
38
|
+
/** Code already highlighted, as shiki writes it. Used in place of children. */
|
|
39
|
+
html?: string;
|
|
40
|
+
/** Colour the code in this language. Use `html` instead for a highlighter of your own. */
|
|
41
|
+
language?: NmCodeLanguage;
|
|
42
|
+
wrap?: boolean;
|
|
43
|
+
lineNumbers?: boolean;
|
|
44
|
+
startLine?: number;
|
|
45
|
+
/** Show only this many lines, dimmed, with a button to show the rest. */
|
|
46
|
+
collapsedLines?: number;
|
|
47
|
+
labels?: {
|
|
48
|
+
show: string;
|
|
49
|
+
hide: string;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
/** The pre that scrolls or wraps. */
|
|
53
|
+
export declare function NmCodeBlockContent({ className, children, html, language, wrap, lineNumbers, startLine, collapsedLines, labels, style, ...props }: NmCodeBlockContentProps): import("react").JSX.Element;
|
|
54
|
+
/** A row under the code, for a note or a button. */
|
|
55
|
+
export declare function NmCodeBlockFooter({ className, ...props }: ComponentProps<'div'>): import("react").JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** One colour as a swatch. The colour picker and the theme list both draw it. */
|
|
2
|
+
export declare function NmColorSwatch({ color, shape }: {
|
|
3
|
+
color: string;
|
|
4
|
+
shape?: 'square' | 'round';
|
|
5
|
+
}): import("react").JSX.Element;
|
|
6
|
+
/** A colour field. The picker opens in a popover, drawn by NIF tokens around react-colorful. */
|
|
7
|
+
export declare function NmColorPicker({ value, onValueChange, swatches, label, caption, disabled, }: {
|
|
8
|
+
value: string;
|
|
9
|
+
onValueChange: (hex: string) => void;
|
|
10
|
+
swatches?: readonly string[];
|
|
11
|
+
label?: string;
|
|
12
|
+
/** A caption above the field, set like the caption of a Field. */
|
|
13
|
+
caption?: string;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import { Combobox as ComboboxPrimitive } from '@base-ui/react/combobox';
|
|
3
|
+
/**
|
|
4
|
+
* Base UI Combobox, in the shadcn composition, styled by NIF tokens. A select you can search: type to filter the
|
|
5
|
+
* list, then choose. The list is the same surface as the Dropdown Menu and the Select.
|
|
6
|
+
*/
|
|
7
|
+
export declare function NmCombobox<Value = string>(props: ComboboxPrimitive.Root.Props<Value>): import("react").JSX.Element;
|
|
8
|
+
/** The field you type in, with the button that opens the list. `bare` drops its own box, for use inside a Field. */
|
|
9
|
+
export declare function NmComboboxInput({ className, bare, showClear, ...props }: ComboboxPrimitive.Input.Props & {
|
|
10
|
+
bare?: boolean;
|
|
11
|
+
showClear?: boolean;
|
|
12
|
+
}): import("react").JSX.Element;
|
|
13
|
+
/** `anchor` is the element the list lines up with. It defaults to the input. */
|
|
14
|
+
export declare function NmComboboxContent({ className, children, anchor, ...props }: ComboboxPrimitive.Popup.Props & {
|
|
15
|
+
anchor?: HTMLElement | null;
|
|
16
|
+
}): import("react").JSX.Element;
|
|
17
|
+
/** The items. Give it a function of one item, and it draws the filtered list. */
|
|
18
|
+
export declare function NmComboboxList({ className, ...props }: ComboboxPrimitive.List.Props): import("react").JSX.Element;
|
|
19
|
+
export declare function NmComboboxItem({ className, children, ...props }: ComboboxPrimitive.Item.Props & {
|
|
20
|
+
children: ReactNode;
|
|
21
|
+
}): import("react").JSX.Element;
|
|
22
|
+
/** What the list says when nothing matches. */
|
|
23
|
+
export declare function NmComboboxEmpty({ className, ...props }: ComboboxPrimitive.Empty.Props): import("react").JSX.Element;
|
|
24
|
+
export declare function NmComboboxGroup(props: ComboboxPrimitive.Group.Props): import("react").JSX.Element;
|
|
25
|
+
export declare function NmComboboxLabel({ className, ...props }: ComboboxPrimitive.GroupLabel.Props): import("react").JSX.Element;
|
|
26
|
+
export declare function NmComboboxSeparator({ className, ...props }: ComboboxPrimitive.Separator.Props): import("react").JSX.Element;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { type ComponentProps, type ReactNode } from 'react';
|
|
2
|
+
import { Command as CommandPrimitive } from 'cmdk';
|
|
3
|
+
import { NmDialog } from '../nm-dialog/nm-dialog.tsx';
|
|
4
|
+
/**
|
|
5
|
+
* Command: search and run. The shadcn Command composition on cmdk, which gives filtering, arrow-key
|
|
6
|
+
* navigation and the listbox roles. Everything you see is NIF tokens.
|
|
7
|
+
*/
|
|
8
|
+
export declare function NmCommand({ className, ...props }: ComponentProps<typeof CommandPrimitive>): import("react").JSX.Element;
|
|
9
|
+
export declare function NmCommandDialog({ title, description, children, ...props }: Omit<ComponentProps<typeof NmDialog>, 'children'> & {
|
|
10
|
+
title?: string;
|
|
11
|
+
description?: string;
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
}): import("react").JSX.Element;
|
|
14
|
+
/** The search row: an icon, the field and a clear button once there is text. */
|
|
15
|
+
export declare function NmCommandInput({ className, value, defaultValue, onValueChange, clearLabel, ...props }: ComponentProps<typeof CommandPrimitive.Input> & {
|
|
16
|
+
clearLabel?: string;
|
|
17
|
+
defaultValue?: string;
|
|
18
|
+
}): import("react").JSX.Element;
|
|
19
|
+
/** Chips that narrow the list to one kind of result. */
|
|
20
|
+
export declare function NmCommandFilters({ items, value, onValueChange, label, }: {
|
|
21
|
+
items: readonly {
|
|
22
|
+
id: string;
|
|
23
|
+
label: string;
|
|
24
|
+
}[];
|
|
25
|
+
value: string;
|
|
26
|
+
onValueChange: (id: string) => void;
|
|
27
|
+
label?: string;
|
|
28
|
+
}): import("react").JSX.Element;
|
|
29
|
+
export declare function NmCommandList({ className, ...props }: ComponentProps<typeof CommandPrimitive.List>): import("react").JSX.Element;
|
|
30
|
+
export declare function NmCommandEmpty({ className, ...props }: ComponentProps<typeof CommandPrimitive.Empty>): import("react").JSX.Element;
|
|
31
|
+
export declare function NmCommandLoading({ className, children, ...props }: ComponentProps<typeof CommandPrimitive.Loading>): import("react").JSX.Element;
|
|
32
|
+
export declare function NmCommandGroup({ className, ...props }: ComponentProps<typeof CommandPrimitive.Group>): import("react").JSX.Element;
|
|
33
|
+
export declare function NmCommandSeparator({ className, ...props }: ComponentProps<typeof CommandPrimitive.Separator>): import("react").JSX.Element;
|
|
34
|
+
export declare function NmCommandItem({ className, children, ...props }: ComponentProps<typeof CommandPrimitive.Item>): import("react").JSX.Element;
|
|
35
|
+
/** Shown on the right of an item, and only while the item is selected. */
|
|
36
|
+
export declare function NmCommandItemActions({ className, ...props }: ComponentProps<'span'>): import("react").JSX.Element;
|
|
37
|
+
export declare function NmCommandShortcut({ className, ...props }: ComponentProps<'span'>): import("react").JSX.Element;
|
|
@@ -8,6 +8,8 @@ export type NmComposerProps = {
|
|
|
8
8
|
busy?: boolean;
|
|
9
9
|
onStop?: () => void;
|
|
10
10
|
placeholder?: string;
|
|
11
|
+
/** A card shown above the box, such as a usage warning. It stacks directly over the frame. */
|
|
12
|
+
notice?: ReactNode;
|
|
11
13
|
/** Messages waiting for the agent to finish. They stack above the text, oldest first. */
|
|
12
14
|
queue?: readonly NmComposerQueued[];
|
|
13
15
|
onEditQueued?: (id: string) => void;
|
|
@@ -21,6 +23,8 @@ export type NmComposerProps = {
|
|
|
21
23
|
micActive?: boolean;
|
|
22
24
|
/** Voice mode. It shows while the box is empty. Typing swaps it for Send. */
|
|
23
25
|
onVoice?: () => void;
|
|
26
|
+
/** Replaces the add button, for a menu of what to add. Give the trigger the composer button class. */
|
|
27
|
+
addControl?: ReactNode;
|
|
24
28
|
/** Controls beside the add button, such as the model selector. */
|
|
25
29
|
start?: ReactNode;
|
|
26
30
|
disabled?: boolean;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ContextMenu as ContextMenuPrimitive } from '@base-ui/react/context-menu';
|
|
2
|
+
/**
|
|
3
|
+
* Base UI Context Menu: the menu that opens on right click or long press. Its items are the dropdown menu parts
|
|
4
|
+
* (NmDropdownMenuItem, NmDropdownMenuSub, NmDropdownMenuCheckboxItem and the rest).
|
|
5
|
+
*/
|
|
6
|
+
export declare function NmContextMenu(props: ContextMenuPrimitive.Root.Props): import("react").JSX.Element;
|
|
7
|
+
/** The area that answers a right click. */
|
|
8
|
+
export declare function NmContextMenuTrigger({ className, ...props }: ContextMenuPrimitive.Trigger.Props): import("react").JSX.Element;
|
|
9
|
+
export declare function NmContextMenuContent({ className, ...props }: ContextMenuPrimitive.Popup.Props): import("react").JSX.Element;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { DateRange } from 'react-day-picker';
|
|
2
|
+
type Common = {
|
|
3
|
+
placeholder?: string;
|
|
4
|
+
invalid?: boolean;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
label?: string;
|
|
7
|
+
className?: string;
|
|
8
|
+
};
|
|
9
|
+
/** A date field. The calendar opens in a popover, so it follows the theme as everything else does. */
|
|
10
|
+
export declare function NmDatePicker({ value, onValueChange, placeholder, ...rest }: Common & {
|
|
11
|
+
value?: Date;
|
|
12
|
+
onValueChange?: (date: Date | undefined) => void;
|
|
13
|
+
}): import("react").JSX.Element;
|
|
14
|
+
export declare function NmDateRangePicker({ value, onValueChange, placeholder, ...rest }: Common & {
|
|
15
|
+
value?: DateRange;
|
|
16
|
+
onValueChange?: (range: DateRange | undefined) => void;
|
|
17
|
+
}): import("react").JSX.Element;
|
|
18
|
+
/** A month field. Value is `YYYY-MM`. */
|
|
19
|
+
export declare function NmMonthPicker({ value, onValueChange, placeholder, ...rest }: Common & {
|
|
20
|
+
value?: string;
|
|
21
|
+
onValueChange?: (month: string) => void;
|
|
22
|
+
}): import("react").JSX.Element;
|
|
23
|
+
/** A time field in 24 hours. Value is `HH:mm`. */
|
|
24
|
+
export declare function NmTimePicker({ value, onValueChange, placeholder, minuteStep, ...rest }: Common & {
|
|
25
|
+
value?: string;
|
|
26
|
+
onValueChange?: (time: string) => void;
|
|
27
|
+
minuteStep?: number;
|
|
28
|
+
}): import("react").JSX.Element;
|
|
29
|
+
/** A date and a time in one field. */
|
|
30
|
+
export declare function NmDateTimePicker({ value, onValueChange, placeholder, minuteStep, ...rest }: Common & {
|
|
31
|
+
value?: Date;
|
|
32
|
+
onValueChange?: (date: Date | undefined) => void;
|
|
33
|
+
minuteStep?: number;
|
|
34
|
+
}): import("react").JSX.Element;
|
|
35
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ComponentProps } from 'react';
|
|
2
|
+
import { Dialog as DialogPrimitive } from '@base-ui/react/dialog';
|
|
3
|
+
/** Base UI Dialog, in the shadcn composition, styled by NIF tokens. */
|
|
4
|
+
export declare function NmDialog(props: DialogPrimitive.Root.Props): import("react").JSX.Element;
|
|
5
|
+
export declare function NmDialogTrigger(props: DialogPrimitive.Trigger.Props): import("react").JSX.Element;
|
|
6
|
+
export declare function NmDialogClose(props: DialogPrimitive.Close.Props): import("react").JSX.Element;
|
|
7
|
+
/** `size="full"` fills the screen, for a whole view. */
|
|
8
|
+
export declare function NmDialogContent({ className, children, size, ...props }: DialogPrimitive.Popup.Props & {
|
|
9
|
+
size?: 'default' | 'full';
|
|
10
|
+
}): import("react").JSX.Element;
|
|
11
|
+
export declare function NmDialogHeader({ className, ...props }: ComponentProps<'div'>): import("react").JSX.Element;
|
|
12
|
+
export declare function NmDialogTitle({ className, ...props }: DialogPrimitive.Title.Props): import("react").JSX.Element;
|
|
13
|
+
export declare function NmDialogDescription({ className, ...props }: DialogPrimitive.Description.Props): import("react").JSX.Element;
|
|
@@ -23,6 +23,8 @@ export type NmFieldProps = {
|
|
|
23
23
|
onMenuSelect?: (id: string) => void;
|
|
24
24
|
options?: readonly NmFieldOption[];
|
|
25
25
|
searchPlaceholder?: string;
|
|
26
|
+
/** What a searchable select says when nothing matches. */
|
|
27
|
+
emptyLabel?: string;
|
|
26
28
|
searchValue?: string;
|
|
27
29
|
onSearchChange?: (value: string) => void;
|
|
28
30
|
onAdd?: () => void;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ComponentProps } from 'react';
|
|
2
|
+
/** The shadcn Field family. NmField is the older all-in-one field. These parts compose any control into a form. */
|
|
3
|
+
export declare function NmFieldSet({ className, ...props }: ComponentProps<'fieldset'>): import("react").JSX.Element;
|
|
4
|
+
export declare function NmFieldLegend({ className, variant, ...props }: ComponentProps<'legend'> & {
|
|
5
|
+
variant?: 'legend' | 'label';
|
|
6
|
+
}): import("react").JSX.Element;
|
|
7
|
+
export declare function NmFieldGroup({ className, ...props }: ComponentProps<'div'>): import("react").JSX.Element;
|
|
8
|
+
export declare function NmFormField({ className, orientation, invalid, disabled, ...props }: ComponentProps<'div'> & {
|
|
9
|
+
orientation?: 'vertical' | 'horizontal';
|
|
10
|
+
invalid?: boolean;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
}): import("react").JSX.Element;
|
|
13
|
+
export declare function NmFieldContent({ className, ...props }: ComponentProps<'div'>): import("react").JSX.Element;
|
|
14
|
+
export declare function NmFieldLabel({ className, ...props }: ComponentProps<'label'>): import("react").JSX.Element;
|
|
15
|
+
export declare function NmFieldTitle({ className, ...props }: ComponentProps<'div'>): import("react").JSX.Element;
|
|
16
|
+
export declare function NmFieldDescription({ className, ...props }: ComponentProps<'p'>): import("react").JSX.Element;
|
|
17
|
+
export declare function NmFieldError({ className, children, ...props }: ComponentProps<'div'>): import("react").JSX.Element | null;
|
|
18
|
+
export declare function NmFieldSeparator({ className, children, ...props }: ComponentProps<'div'>): import("react").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ComponentProps, ReactNode } from 'react';
|
|
2
|
+
/** Images, or any media, in a grid. Each item is a button, so choosing one opens it, for example in the side panel. */
|
|
3
|
+
export declare function NmGallery({ className, ...props }: ComponentProps<'ul'>): import("react").JSX.Element;
|
|
4
|
+
export declare function NmGalleryItem({ className, label, selected, children, ...props }: Omit<ComponentProps<'button'>, 'children'> & {
|
|
5
|
+
label: string;
|
|
6
|
+
selected?: boolean;
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Input as InputPrimitive } from '@base-ui/react/input';
|
|
2
|
+
/** Base UI Input, in the shadcn composition. Text, email, password, number, search, tel, url, date, time and more. */
|
|
3
|
+
export declare function NmInput({ className, type, ...props }: InputPrimitive.Props & {
|
|
4
|
+
type?: string;
|
|
5
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ComponentProps } from 'react';
|
|
2
|
+
import { Input as InputPrimitive } from '@base-ui/react/input';
|
|
3
|
+
/** An input with something attached: an icon, a unit, a button. The group draws the frame. */
|
|
4
|
+
export declare function NmInputGroup({ className, ...props }: ComponentProps<'div'>): import("react").JSX.Element;
|
|
5
|
+
export declare function NmInputGroupAddon({ className, align, ...props }: ComponentProps<'div'> & {
|
|
6
|
+
align?: 'inline-start' | 'inline-end';
|
|
7
|
+
}): import("react").JSX.Element;
|
|
8
|
+
export declare function NmInputGroupText({ className, ...props }: ComponentProps<'span'>): import("react").JSX.Element;
|
|
9
|
+
export declare function NmInputGroupInput({ className, ...props }: InputPrimitive.Props): import("react").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Menubar as MenubarPrimitive } from '@base-ui/react/menubar';
|
|
2
|
+
import { Menu as MenuPrimitive } from '@base-ui/react/menu';
|
|
3
|
+
/**
|
|
4
|
+
* Base UI Menubar, in the shadcn composition. A row of menus that open on click and then on hover.
|
|
5
|
+
* Each menu is an NmDropdownMenu, so its content and items are the dropdown parts.
|
|
6
|
+
*/
|
|
7
|
+
export declare function NmMenubar({ className, ...props }: MenubarPrimitive.Props): import("react").JSX.Element;
|
|
8
|
+
export declare function NmMenubarMenu(props: MenuPrimitive.Root.Props): import("react").JSX.Element;
|
|
9
|
+
export declare function NmMenubarTrigger({ className, ...props }: MenuPrimitive.Trigger.Props): import("react").JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { ComponentProps } from 'react';
|
|
2
|
+
/** The browser's own select, styled by NIF. Use it where the platform picker is the right control, such as on a phone. */
|
|
3
|
+
export declare function NmNativeSelect({ className, children, ...props }: ComponentProps<'select'>): import("react").JSX.Element;
|
|
4
|
+
export declare function NmNativeSelectOption(props: ComponentProps<'option'>): import("react").JSX.Element;
|
|
5
|
+
export declare function NmNativeSelectOptGroup(props: ComponentProps<'optgroup'>): import("react").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ComponentProps } from 'react';
|
|
2
|
+
export declare const NM_PANEL_VARIANTS: readonly ['default', 'inset', 'plain'];
|
|
3
|
+
export type NmPanelVariant = (typeof NM_PANEL_VARIANTS)[number];
|
|
4
|
+
/** A region of the app, such as an inspector or a side panel: a header, content that scrolls, and a footer. */
|
|
5
|
+
export declare function NmPanel({ className, variant, ...props }: ComponentProps<'section'> & {
|
|
6
|
+
variant?: NmPanelVariant;
|
|
7
|
+
}): import("react").JSX.Element;
|
|
8
|
+
export declare function NmPanelHeader({ className, ...props }: ComponentProps<'header'>): import("react").JSX.Element;
|
|
9
|
+
export declare function NmPanelTitle({ className, ...props }: ComponentProps<'h2'>): import("react").JSX.Element;
|
|
10
|
+
export declare function NmPanelDescription({ className, ...props }: ComponentProps<'p'>): import("react").JSX.Element;
|
|
11
|
+
/** Buttons at the end of the header. */
|
|
12
|
+
export declare function NmPanelActions({ className, ...props }: ComponentProps<'div'>): import("react").JSX.Element;
|
|
13
|
+
export declare function NmPanelContent({ className, ...props }: ComponentProps<'div'>): import("react").JSX.Element;
|
|
14
|
+
export declare function NmPanelFooter({ className, ...props }: ComponentProps<'footer'>): import("react").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ComponentProps } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Rendered text: markdown, docs and long answers. Headings, paragraphs, lists, quotes, code, rules, links and
|
|
4
|
+
* tables take their type, space and colour from NIF tokens, so the plain elements inside it need no classes.
|
|
5
|
+
*/
|
|
6
|
+
export declare function NmProse({ className, ...props }: ComponentProps<'article'>): import("react").JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type RefObject } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* The handle that resizes a panel. Every NIF panel that sits beside other content has one. It follows the pointer,
|
|
4
|
+
* the arrow keys, Home and End, and Enter or a double click restores the default width.
|
|
5
|
+
* The limits are the target's own `min-width` and `max-width`, so tokens in CSS decide how far it goes.
|
|
6
|
+
*/
|
|
7
|
+
export declare function NmResizeHandle({ target, edge, label, onSize, placement, className, }: {
|
|
8
|
+
/** The panel to resize. */
|
|
9
|
+
target: RefObject<HTMLElement | null>;
|
|
10
|
+
/** Which edge of the panel the handle is on. A panel on the right has its handle on the start edge. */
|
|
11
|
+
edge: 'start' | 'end';
|
|
12
|
+
label: string;
|
|
13
|
+
/** The new width in pixels, or null to restore the default. */
|
|
14
|
+
onSize: (px: number | null) => void;
|
|
15
|
+
/** `inside` pins the handle to the edge of its parent. `free` leaves placement to the layout. */
|
|
16
|
+
placement?: 'inside' | 'free';
|
|
17
|
+
className?: string;
|
|
18
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import { Select as SelectPrimitive } from '@base-ui/react/select';
|
|
3
|
+
/**
|
|
4
|
+
* Base UI Select, in the shadcn composition, styled by NIF tokens. The choice of one value from a list that
|
|
5
|
+
* opens under the field. The list is the same surface as the dropdown menu.
|
|
6
|
+
*/
|
|
7
|
+
export declare function NmSelect<Value = string>(props: SelectPrimitive.Root.Props<Value>): import("react").JSX.Element;
|
|
8
|
+
/** `bare` drops its own box, for a trigger that sits inside a field. */
|
|
9
|
+
export declare function NmSelectTrigger({ className, children, bare, ...props }: SelectPrimitive.Trigger.Props & {
|
|
10
|
+
bare?: boolean;
|
|
11
|
+
}): import("react").JSX.Element;
|
|
12
|
+
export declare function NmSelectValue(props: SelectPrimitive.Value.Props): import("react").JSX.Element;
|
|
13
|
+
/** `anchor` is the element the list lines up with. It defaults to the trigger. */
|
|
14
|
+
export declare function NmSelectContent({ className, children, anchor, ...props }: SelectPrimitive.Popup.Props & {
|
|
15
|
+
anchor?: HTMLElement | null;
|
|
16
|
+
}): import("react").JSX.Element;
|
|
17
|
+
export declare function NmSelectItem({ className, children, ...props }: SelectPrimitive.Item.Props & {
|
|
18
|
+
children: ReactNode;
|
|
19
|
+
}): import("react").JSX.Element;
|
|
20
|
+
export declare function NmSelectGroup(props: SelectPrimitive.Group.Props): import("react").JSX.Element;
|
|
21
|
+
export declare function NmSelectLabel({ className, ...props }: SelectPrimitive.GroupLabel.Props): import("react").JSX.Element;
|
|
22
|
+
export declare function NmSelectSeparator({ className, ...props }: SelectPrimitive.Separator.Props): import("react").JSX.Element;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { type ComponentProps } from 'react';
|
|
2
|
+
import { type NmSidePanelKind, type NmSidePanelSize } from '../../config/nm-side-panel.ts';
|
|
3
|
+
/**
|
|
4
|
+
* A view that holds a main area and a side panel next to it, such as a chat with an artifact beside it.
|
|
5
|
+
* It is the organ the side panel opens in.
|
|
6
|
+
*/
|
|
7
|
+
export declare function NmWorkspace({ className, height, ...props }: ComponentProps<'div'> & {
|
|
8
|
+
height?: 'fill' | 'sm' | 'lg';
|
|
9
|
+
}): import("react").JSX.Element;
|
|
10
|
+
/** The main area. It takes the room the side panel leaves. */
|
|
11
|
+
export declare function NmWorkspaceMain({ className, ...props }: ComponentProps<'div'>): import("react").JSX.Element;
|
|
12
|
+
/** The content under a bar in the main area. It fills the height and scrolls. */
|
|
13
|
+
export declare function NmWorkspaceBody({ className, ...props }: ComponentProps<'div'>): import("react").JSX.Element;
|
|
14
|
+
/** A row under the body, such as the composer. */
|
|
15
|
+
export declare function NmWorkspaceFooter({ className, ...props }: ComponentProps<'div'>): import("react").JSX.Element;
|
|
16
|
+
/**
|
|
17
|
+
* The panel that opens beside the main area, for an app, code, an artifact, media, docs or markdown.
|
|
18
|
+
* `open` shows it. `size` sets how much of the view it takes, and the handle on its edge resizes it. Fill it with a toolbar and a body.
|
|
19
|
+
*/
|
|
20
|
+
export declare function NmSidePanel({ className, open, size, label, resizable, style, children, ...props }: Omit<ComponentProps<'aside'>, 'aria-label'> & {
|
|
21
|
+
open?: boolean;
|
|
22
|
+
size?: NmSidePanelSize;
|
|
23
|
+
label: string;
|
|
24
|
+
resizable?: boolean;
|
|
25
|
+
}): import("react").JSX.Element;
|
|
26
|
+
/** The content under the toolbar. It fills the height and scrolls. */
|
|
27
|
+
export declare function NmSidePanelBody({ className, ...props }: ComponentProps<'div'>): import("react").JSX.Element;
|
|
28
|
+
/** One button per kind of content. Pressing one opens the panel on that kind. */
|
|
29
|
+
export declare function NmSidePanelKinds({ kinds, active, onSelect, }: {
|
|
30
|
+
kinds?: readonly NmSidePanelKind[];
|
|
31
|
+
active?: NmSidePanelKind | null;
|
|
32
|
+
onSelect: (kind: NmSidePanelKind) => void;
|
|
33
|
+
}): import("react").JSX.Element;
|
|
@@ -1,2 +1,6 @@
|
|
|
1
1
|
import { Slider as SliderPrimitive } from '@base-ui/react/slider';
|
|
2
|
-
|
|
2
|
+
/** `label` and `output` add a caption above the track, set like the caption of a Field. */
|
|
3
|
+
export declare function NmSlider({ className, defaultValue, value, min, max, label, output, ...props }: SliderPrimitive.Root.Props & {
|
|
4
|
+
label?: string;
|
|
5
|
+
output?: string;
|
|
6
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ComponentProps } from 'react';
|
|
2
|
+
/** A thin bar at the bottom of a window for state: branch, errors, cursor position, connection. */
|
|
3
|
+
export declare function NmStatusBar({ className, ...props }: ComponentProps<'footer'>): import("react").JSX.Element;
|
|
4
|
+
/** One item. Give it `onClick` and it becomes a button. */
|
|
5
|
+
export declare function NmStatusBarItem({ className, onClick, children, ...props }: Omit<ComponentProps<'span'>, 'onClick'> & {
|
|
6
|
+
onClick?: () => void;
|
|
7
|
+
}): import("react").JSX.Element;
|
|
8
|
+
export declare function NmStatusBarSpacer({ className, ...props }: ComponentProps<'span'>): import("react").JSX.Element;
|