@nordmanai/nif 0.0.0-stage → 0.1.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 +61 -2
- package/dist/index.d.ts +95 -0
- package/dist/index.js +5799 -0
- package/dist/styles.css +2 -0
- package/dist/tokens.css +69 -0
- package/dist/ui/components/nm-accordion/nm-accordion.d.ts +6 -0
- package/dist/ui/components/nm-ai/nm-ai.d.ts +222 -0
- package/dist/ui/components/nm-avatar/nm-avatar.d.ts +12 -0
- package/dist/ui/components/nm-bar-overflow/nm-bar-overflow.d.ts +15 -0
- package/dist/ui/components/nm-bar-overflow/use-bar-overflow.d.ts +7 -0
- package/dist/ui/components/nm-button/nm-button.d.ts +17 -0
- package/dist/ui/components/nm-chatbox/nm-chatbox-icon.d.ts +7 -0
- package/dist/ui/components/nm-chatbox/nm-chatbox.d.ts +19 -0
- package/dist/ui/components/nm-checkbox/nm-checkbox.d.ts +2 -0
- package/dist/ui/components/nm-collection/nm-collection-bar.d.ts +16 -0
- package/dist/ui/components/nm-collection/nm-collection-grid.d.ts +9 -0
- package/dist/ui/components/nm-collection/nm-collection-query.d.ts +18 -0
- package/dist/ui/components/nm-collection/nm-collection-row-menu.d.ts +7 -0
- package/dist/ui/components/nm-collection/nm-collection-table.d.ts +13 -0
- package/dist/ui/components/nm-collection/nm-collection-tile-actions.d.ts +7 -0
- package/dist/ui/components/nm-collection/nm-collection-title.d.ts +10 -0
- package/dist/ui/components/nm-collection/use-collection-scroll-reveal.d.ts +3 -0
- package/dist/ui/components/nm-composer/nm-composer.d.ts +29 -0
- package/dist/ui/components/nm-dropdown/nm-dropdown-item.d.ts +26 -0
- package/dist/ui/components/nm-dropdown/nm-dropdown-options.d.ts +12 -0
- package/dist/ui/components/nm-dropdown/nm-dropdown-panel.d.ts +16 -0
- package/dist/ui/components/nm-dropdown/nm-dropdown-placement.d.ts +55 -0
- package/dist/ui/components/nm-dropdown/nm-dropdown.d.ts +31 -0
- package/dist/ui/components/nm-dropdown-menu/nm-dropdown-menu.d.ts +30 -0
- package/dist/ui/components/nm-field/nm-field.d.ts +50 -0
- package/dist/ui/components/nm-hover-card/nm-hover-card.d.ts +5 -0
- package/dist/ui/components/nm-icon/nm-icon.d.ts +7 -0
- package/dist/ui/components/nm-icon/nm-lucide.d.ts +7 -0
- package/dist/ui/components/nm-icon-border/nm-icon-border.d.ts +21 -0
- package/dist/ui/components/nm-list-item/nm-list-item.d.ts +23 -0
- package/dist/ui/components/nm-message/nm-message-actions.d.ts +7 -0
- package/dist/ui/components/nm-message/nm-message-meta.d.ts +10 -0
- package/dist/ui/components/nm-message/nm-text-shimmer.d.ts +4 -0
- package/dist/ui/components/nm-message/nm-trace.d.ts +58 -0
- package/dist/ui/components/nm-modal/nm-modal.d.ts +35 -0
- package/dist/ui/components/nm-panel-bar/nm-panel-bar.d.ts +17 -0
- package/dist/ui/components/nm-popover/nm-popover.d.ts +8 -0
- package/dist/ui/components/nm-progress/nm-progress.d.ts +3 -0
- package/dist/ui/components/nm-questionnaire/nm-questionnaire.d.ts +17 -0
- package/dist/ui/components/nm-radio-group/nm-radio-group.d.ts +4 -0
- package/dist/ui/components/nm-rail-icon/nm-rail-icon.d.ts +6 -0
- package/dist/ui/components/nm-segmented/nm-segmented.d.ts +20 -0
- package/dist/ui/components/nm-separator/nm-separator.d.ts +2 -0
- package/dist/ui/components/nm-slider/nm-slider.d.ts +2 -0
- package/dist/ui/components/nm-small-icon-button/nm-small-icon-button.d.ts +21 -0
- package/dist/ui/components/nm-switch/nm-switch.d.ts +2 -0
- package/dist/ui/components/nm-tabs/nm-tabs.d.ts +9 -0
- package/dist/ui/components/nm-toggle/nm-toggle.d.ts +9 -0
- package/dist/ui/components/nm-tooltip/nm-tooltip.d.ts +5 -0
- package/dist/ui/components/nm-top-bar/nm-top-bar.d.ts +12 -0
- package/dist/ui/components/nordman-icon-button/nordman-icon-button.d.ts +29 -0
- package/dist/ui/components/nordman-login/nordman-login.d.ts +36 -0
- package/dist/ui/components/nordman-login-field/nordman-login-field.d.ts +13 -0
- package/dist/ui/components/nordman-login-forgot/nordman-login-forgot.d.ts +9 -0
- package/dist/ui/components/nordman-login-google/nordman-login-google.d.ts +6 -0
- package/dist/ui/components/nordman-login-hero/nordman-login-hero.d.ts +6 -0
- package/dist/ui/components/nordman-login-register/nordman-login-register.d.ts +11 -0
- package/dist/ui/components/nordman-login-reset/nordman-login-reset.d.ts +9 -0
- package/dist/ui/components/nordman-login-reveal/nordman-login-reveal.d.ts +6 -0
- package/dist/ui/components/nordman-login-sign-in/nordman-login-sign-in.d.ts +11 -0
- package/dist/ui/components/nordman-toggle/nordman-toggle.d.ts +12 -0
- package/dist/ui/config/nm-ai.d.ts +47 -0
- package/dist/ui/config/nm-app-panel.d.ts +36 -0
- package/dist/ui/config/nm-appearance.d.ts +65 -0
- package/dist/ui/config/nm-bar-overflow.d.ts +9 -0
- package/dist/ui/config/nm-button.d.ts +30 -0
- package/dist/ui/config/nm-chatbox-icons.d.ts +42 -0
- package/dist/ui/config/nm-chatbox.d.ts +40 -0
- package/dist/ui/config/nm-collection.d.ts +88 -0
- package/dist/ui/config/nm-composer.d.ts +43 -0
- package/dist/ui/config/nm-dropdown.d.ts +56 -0
- package/dist/ui/config/nm-fade.d.ts +6 -0
- package/dist/ui/config/nm-field.d.ts +36 -0
- package/dist/ui/config/nm-header-icons.d.ts +15 -0
- package/dist/ui/config/nm-icon-border.d.ts +3 -0
- package/dist/ui/config/nm-icon-button.d.ts +26 -0
- package/dist/ui/config/nm-icons.d.ts +359 -0
- package/dist/ui/config/nm-list-item.d.ts +14 -0
- package/dist/ui/config/nm-message.d.ts +87 -0
- package/dist/ui/config/nm-modal.d.ts +67 -0
- package/dist/ui/config/nm-panel-bar.d.ts +9 -0
- package/dist/ui/config/nm-questionnaire.d.ts +57 -0
- package/dist/ui/config/nm-radius.d.ts +49 -0
- package/dist/ui/config/nm-rail-icons.d.ts +14 -0
- package/dist/ui/config/nm-rail.d.ts +5 -0
- package/dist/ui/config/nm-segmented.d.ts +17 -0
- package/dist/ui/config/nm-site-palette.d.ts +30 -0
- package/dist/ui/config/nm-small-icon-button.d.ts +12 -0
- package/dist/ui/config/nm-tabs.d.ts +8 -0
- package/dist/ui/config/nm-top-bar.d.ts +4 -0
- package/dist/ui/config/nordman-chrome.d.ts +12 -0
- package/dist/ui/config/nordman-login.d.ts +23 -0
- package/dist/ui/content/nm-modal.d.ts +1 -0
- package/dist/ui/content/nordman-login.d.ts +38 -0
- package/dist/ui/kit-logger.d.ts +1 -0
- package/dist/ui/lib/appearance/appearanceState.d.ts +27 -0
- package/dist/ui/lib/appearance/applyAppearance.d.ts +5 -0
- package/dist/ui/lib/appearance/cloudOrbAppearance.d.ts +4 -0
- package/dist/ui/lib/appearance/color.d.ts +13 -0
- package/dist/ui/lib/appearance/deriveTokens.d.ts +4 -0
- package/dist/ui/lib/appearance/index.d.ts +6 -0
- package/dist/ui/lib/appearance/markTokens.d.ts +2 -0
- package/dist/ui/lib/appearance/readLayoutMetrics.d.ts +4 -0
- package/dist/ui/lib/bar-overflow.d.ts +13 -0
- package/dist/ui/lib/logger.d.ts +8 -0
- package/dist/ui/lib/menu-motion.d.ts +72 -0
- package/dist/ui/lib/nm-class.d.ts +2 -0
- package/dist/ui/lib/nordman-ui-locale.d.ts +9 -0
- package/interface/app-panel/code.svg +5 -0
- package/interface/app-panel/console.svg +5 -0
- package/interface/app-panel/copy.svg +5 -0
- package/interface/app-panel/ellipsis.svg +7 -0
- package/interface/app-panel/message.svg +5 -0
- package/interface/app-panel/network.svg +10 -0
- package/interface/app-panel/play.svg +5 -0
- package/interface/app-panel/plus.svg +5 -0
- package/interface/chatbox/app.svg +5 -0
- package/interface/chatbox/audio-lines.svg +5 -0
- package/interface/chatbox/check.svg +5 -0
- package/interface/chatbox/globe.svg +5 -0
- package/interface/chatbox/integration.svg +5 -0
- package/interface/chatbox/mic.svg +5 -0
- package/interface/chatbox/paperclip.svg +5 -0
- package/interface/chatbox/pointer.svg +5 -0
- package/interface/chatbox/send.svg +5 -0
- package/interface/chatbox/settings.svg +5 -0
- package/interface/chatbox/spreadsheet.svg +5 -0
- package/interface/chatbox/x.svg +5 -0
- package/interface/collection/audio.svg +5 -0
- package/interface/collection/download.svg +5 -0
- package/interface/collection/expand.svg +5 -0
- package/interface/collection/grid.svg +10 -0
- package/interface/collection/image.svg +5 -0
- package/interface/collection/spreadsheet.svg +5 -0
- package/interface/collection/video.svg +5 -0
- package/interface/header/app.svg +5 -0
- package/interface/header/bot.svg +5 -0
- package/interface/header/chat.svg +10 -0
- package/interface/header/folder.svg +5 -0
- package/interface/header/layers.svg +10 -0
- package/interface/header/panel.svg +5 -0
- package/interface/header/play.svg +3 -0
- package/interface/header/schedule.svg +8 -0
- package/interface/header/search.svg +5 -0
- package/interface/header/settings.svg +5 -0
- package/interface/header/users.svg +5 -0
- package/interface/message/chevron.svg +5 -0
- package/interface/message/copy.svg +5 -0
- package/interface/message/fork.svg +5 -0
- package/interface/message/refresh.svg +5 -0
- package/interface/message/volume.svg +5 -0
- package/interface/rail/app.svg +5 -0
- package/interface/rail/bot.svg +5 -0
- package/interface/rail/chats.svg +5 -0
- package/interface/rail/folder.svg +5 -0
- package/interface/rail/library.svg +5 -0
- package/interface/rail/plus-sm.svg +5 -0
- package/interface/rail/plus.svg +5 -0
- package/interface/rail/search.svg +5 -0
- package/interface/rail/settings.svg +8 -0
- package/interface/rail/spreadsheet.svg +5 -0
- package/package.json +71 -4
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { ComponentProps } from 'react';
|
|
2
|
+
import { Menu as MenuPrimitive } from '@base-ui/react/menu';
|
|
3
|
+
/** Base UI Menu, in the shadcn dropdown-menu composition, styled by NIF tokens. */
|
|
4
|
+
export declare function NmDropdownMenu(props: MenuPrimitive.Root.Props): import("react").JSX.Element;
|
|
5
|
+
export declare function NmDropdownMenuTrigger(props: MenuPrimitive.Trigger.Props): import("react").JSX.Element;
|
|
6
|
+
type PositionProps = Pick<MenuPrimitive.Positioner.Props, 'align' | 'alignOffset' | 'side' | 'sideOffset'>;
|
|
7
|
+
export declare function NmDropdownMenuContent({ align, alignOffset, side, sideOffset, className, ...props }: MenuPrimitive.Popup.Props & PositionProps): import("react").JSX.Element;
|
|
8
|
+
export declare function NmDropdownMenuGroup(props: MenuPrimitive.Group.Props): import("react").JSX.Element;
|
|
9
|
+
export declare function NmDropdownMenuLabel({ className, ...props }: MenuPrimitive.GroupLabel.Props): import("react").JSX.Element;
|
|
10
|
+
export declare function NmDropdownMenuItem({ className, variant, ...props }: MenuPrimitive.Item.Props & {
|
|
11
|
+
variant?: 'default' | 'destructive';
|
|
12
|
+
}): import("react").JSX.Element;
|
|
13
|
+
export declare function NmDropdownMenuSub(props: MenuPrimitive.SubmenuRoot.Props): import("react").JSX.Element;
|
|
14
|
+
export declare function NmDropdownMenuSubTrigger({ className, children, ...props }: MenuPrimitive.SubmenuTrigger.Props): import("react").JSX.Element;
|
|
15
|
+
export declare function NmDropdownMenuSubContent({ align, alignOffset, side, sideOffset, className, ...props }: MenuPrimitive.Popup.Props & PositionProps): import("react").JSX.Element;
|
|
16
|
+
export declare function NmDropdownMenuCheckboxItem({ className, children, ...props }: MenuPrimitive.CheckboxItem.Props): import("react").JSX.Element;
|
|
17
|
+
export declare function NmDropdownMenuRadioGroup(props: MenuPrimitive.RadioGroup.Props): import("react").JSX.Element;
|
|
18
|
+
export declare function NmDropdownMenuRadioItem({ className, children, ...props }: MenuPrimitive.RadioItem.Props): import("react").JSX.Element;
|
|
19
|
+
export declare function NmDropdownMenuSeparator({ className, ...props }: MenuPrimitive.Separator.Props): import("react").JSX.Element;
|
|
20
|
+
export declare function NmDropdownMenuShortcut({ className, ...props }: ComponentProps<'span'>): import("react").JSX.Element;
|
|
21
|
+
/** Two lines in an item: the title, then a quieter description. */
|
|
22
|
+
export declare function NmDropdownMenuText({ title, description }: {
|
|
23
|
+
title: string;
|
|
24
|
+
description?: string;
|
|
25
|
+
}): import("react").JSX.Element;
|
|
26
|
+
/** A status dot at the start of an item. */
|
|
27
|
+
export declare function NmDropdownMenuDot({ status }: {
|
|
28
|
+
status?: 'ok' | 'error';
|
|
29
|
+
}): import("react").JSX.Element;
|
|
30
|
+
export {};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { type KeyboardEventHandler, type ReactNode, type Ref } from 'react';
|
|
2
|
+
import type { NmIconId } from '../../config/nm-icons.ts';
|
|
3
|
+
import { NM_FIELD_KINDS, NM_FIELD_LAYOUT, type NmFieldKind, type NmFieldLayout, type NmFieldOption } from '../../config/nm-field.ts';
|
|
4
|
+
import { type NmDropdownItem } from '../nm-dropdown/nm-dropdown.tsx';
|
|
5
|
+
export type NmFieldProps = {
|
|
6
|
+
label: string;
|
|
7
|
+
value: string;
|
|
8
|
+
onChange: (value: string) => void;
|
|
9
|
+
kind?: NmFieldKind;
|
|
10
|
+
layout?: NmFieldLayout;
|
|
11
|
+
caption?: string;
|
|
12
|
+
placeholder?: string;
|
|
13
|
+
icon?: NmIconId;
|
|
14
|
+
/** Mark shown inside the field, before the value. */
|
|
15
|
+
leading?: ReactNode;
|
|
16
|
+
leadingSize?: 'mark' | 'face';
|
|
17
|
+
/** Keeps the value in the primary text color when the field is read-only. */
|
|
18
|
+
emphasis?: boolean;
|
|
19
|
+
trailing?: ReactNode;
|
|
20
|
+
/** Ellipsis menu. Hidden until the field is hovered or focused. */
|
|
21
|
+
menuItems?: readonly NmDropdownItem[];
|
|
22
|
+
menuLabel?: string;
|
|
23
|
+
onMenuSelect?: (id: string) => void;
|
|
24
|
+
options?: readonly NmFieldOption[];
|
|
25
|
+
searchPlaceholder?: string;
|
|
26
|
+
searchValue?: string;
|
|
27
|
+
onSearchChange?: (value: string) => void;
|
|
28
|
+
onAdd?: () => void;
|
|
29
|
+
addLabel?: string;
|
|
30
|
+
addIcon?: NmIconId;
|
|
31
|
+
testId?: string;
|
|
32
|
+
disabled?: boolean;
|
|
33
|
+
readOnly?: boolean;
|
|
34
|
+
name?: string;
|
|
35
|
+
id?: string;
|
|
36
|
+
autoComplete?: string;
|
|
37
|
+
minLength?: number;
|
|
38
|
+
maxLength?: number;
|
|
39
|
+
className?: string;
|
|
40
|
+
inputRef?: Ref<HTMLInputElement>;
|
|
41
|
+
describedBy?: string;
|
|
42
|
+
invalid?: boolean;
|
|
43
|
+
keyShortcuts?: string;
|
|
44
|
+
onKeyDown?: KeyboardEventHandler<HTMLInputElement>;
|
|
45
|
+
onKeyUp?: KeyboardEventHandler<HTMLInputElement>;
|
|
46
|
+
onFocus?: () => void;
|
|
47
|
+
onBlur?: () => void;
|
|
48
|
+
};
|
|
49
|
+
export declare const NmField: import("react").ForwardRefExoticComponent<NmFieldProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
50
|
+
export { NM_FIELD_KINDS, NM_FIELD_LAYOUT };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { PreviewCard as PreviewCardPrimitive } from '@base-ui/react/preview-card';
|
|
2
|
+
/** Base UI Preview Card, in the shadcn hover-card composition, styled by NIF tokens. */
|
|
3
|
+
export declare function NmHoverCard(props: PreviewCardPrimitive.Root.Props): import("react").JSX.Element;
|
|
4
|
+
export declare function NmHoverCardTrigger(props: PreviewCardPrimitive.Trigger.Props): import("react").JSX.Element;
|
|
5
|
+
export declare function NmHoverCardContent({ className, side, sideOffset, align, alignOffset, ...props }: PreviewCardPrimitive.Popup.Props & Pick<PreviewCardPrimitive.Positioner.Props, 'align' | 'alignOffset' | 'side' | 'sideOffset'>): import("react").JSX.Element;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { MouseEvent as ReactMouseEvent, ReactNode, Ref } from 'react';
|
|
2
|
+
import type { NmIconId } from '../../config/nm-icons.ts';
|
|
3
|
+
export type NmIconBorderProps = {
|
|
4
|
+
label: string;
|
|
5
|
+
icon?: NmIconId;
|
|
6
|
+
imageSrc?: string;
|
|
7
|
+
pressed?: boolean;
|
|
8
|
+
checked?: boolean;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
ariaDisabled?: boolean;
|
|
11
|
+
busy?: boolean;
|
|
12
|
+
expanded?: boolean;
|
|
13
|
+
popup?: 'listbox';
|
|
14
|
+
controls?: string;
|
|
15
|
+
buttonRef?: Ref<HTMLButtonElement>;
|
|
16
|
+
className?: string;
|
|
17
|
+
children?: ReactNode;
|
|
18
|
+
testId?: string;
|
|
19
|
+
onClick?: (event: ReactMouseEvent<HTMLButtonElement>) => void;
|
|
20
|
+
};
|
|
21
|
+
export declare function NmIconBorder(props: NmIconBorderProps): ReactNode;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import { type NmDropdownItem } from '../nm-dropdown/nm-dropdown.tsx';
|
|
3
|
+
export type NmListItemProps = {
|
|
4
|
+
title: string;
|
|
5
|
+
detail?: string;
|
|
6
|
+
/** Brand mark or face shown beside the title. */
|
|
7
|
+
leading?: ReactNode;
|
|
8
|
+
/** `mark` is a 20px app logo. `icon` is a tool glyph. `face` is the companion portrait. */
|
|
9
|
+
leadingSize?: 'mark' | 'icon' | 'face';
|
|
10
|
+
/** Connect or disconnect control. Stays visible; it does not collapse into the menu. */
|
|
11
|
+
action?: ReactNode;
|
|
12
|
+
menuLabel?: string;
|
|
13
|
+
/** Ellipsis menu. The shared dropdown, usually edit and delete. */
|
|
14
|
+
menuItems?: readonly NmDropdownItem[];
|
|
15
|
+
onMenuSelect?: (id: string) => void;
|
|
16
|
+
locked?: boolean;
|
|
17
|
+
/** Lock shown at rest. Hover replaces it with the menu. */
|
|
18
|
+
resting?: 'lock';
|
|
19
|
+
onMenu?: () => void;
|
|
20
|
+
/** Opens the row. The title becomes the control. */
|
|
21
|
+
onOpen?: () => void;
|
|
22
|
+
};
|
|
23
|
+
export declare function NmListItem(props: NmListItemProps): ReactNode;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export type NmMessageMetaProps = {
|
|
3
|
+
label: string;
|
|
4
|
+
testId?: string;
|
|
5
|
+
expandable?: boolean;
|
|
6
|
+
expanded?: boolean;
|
|
7
|
+
onToggle?: () => void;
|
|
8
|
+
live?: boolean;
|
|
9
|
+
};
|
|
10
|
+
export declare function NmMessageMeta(props: NmMessageMetaProps): ReactNode;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import { type NmTraceGlyphKind, type NmTraceStatus } from '../../config/nm-message.ts';
|
|
3
|
+
export declare function NmTraceGlyph(props: {
|
|
4
|
+
kind: NmTraceGlyphKind;
|
|
5
|
+
spin?: boolean;
|
|
6
|
+
}): ReactNode;
|
|
7
|
+
export declare function NmTrace(props: {
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
testId?: string;
|
|
10
|
+
ariaLabel?: string;
|
|
11
|
+
role?: 'region' | 'group';
|
|
12
|
+
}): ReactNode;
|
|
13
|
+
export declare function NmTraceCollapsible(props: {
|
|
14
|
+
children: ReactNode;
|
|
15
|
+
open?: boolean;
|
|
16
|
+
defaultOpen?: boolean;
|
|
17
|
+
onOpenChange?: (open: boolean) => void;
|
|
18
|
+
testId?: string;
|
|
19
|
+
}): ReactNode;
|
|
20
|
+
export declare function NmTraceCollapsibleTrigger(props: {
|
|
21
|
+
children: ReactNode;
|
|
22
|
+
ariaLabel?: string;
|
|
23
|
+
action?: ReactNode;
|
|
24
|
+
testId?: string;
|
|
25
|
+
}): ReactNode;
|
|
26
|
+
export declare function NmTraceCollapsibleContent(props: {
|
|
27
|
+
children: ReactNode;
|
|
28
|
+
keepMounted?: boolean;
|
|
29
|
+
asList?: boolean;
|
|
30
|
+
testId?: string;
|
|
31
|
+
}): ReactNode;
|
|
32
|
+
export declare function NmTraceLine(props: {
|
|
33
|
+
children: ReactNode;
|
|
34
|
+
status?: NmTraceStatus;
|
|
35
|
+
as?: 'div' | 'span' | 'li';
|
|
36
|
+
testId?: string;
|
|
37
|
+
role?: 'status';
|
|
38
|
+
ariaLive?: 'polite';
|
|
39
|
+
}): ReactNode;
|
|
40
|
+
export declare function NmTraceIcon(props: {
|
|
41
|
+
children: ReactNode;
|
|
42
|
+
}): ReactNode;
|
|
43
|
+
export declare function NmTraceTitle(props: {
|
|
44
|
+
children: ReactNode;
|
|
45
|
+
shimmer?: boolean;
|
|
46
|
+
}): ReactNode;
|
|
47
|
+
export declare function NmTraceDescription(props: {
|
|
48
|
+
children: ReactNode;
|
|
49
|
+
ariaHidden?: boolean;
|
|
50
|
+
testId?: string;
|
|
51
|
+
}): ReactNode;
|
|
52
|
+
export declare function NmTraceBadges(props: {
|
|
53
|
+
children: ReactNode;
|
|
54
|
+
ariaHidden?: boolean;
|
|
55
|
+
}): ReactNode;
|
|
56
|
+
export declare function NmTraceBadge(props: {
|
|
57
|
+
children: ReactNode;
|
|
58
|
+
}): ReactNode;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import type { NmIconId } from '../../config/nm-icons.ts';
|
|
3
|
+
import { NM_MODAL_ACTION, NM_MODAL_CLASSES, NM_MODAL_FOOTER, NM_MODAL_SIZE, NM_MODAL_TITLE, type NmModalActionTone, type NmModalFooter, type NmModalSize, type NmModalTitleSize } from '../../config/nm-modal.ts';
|
|
4
|
+
import './nm-modal.css';
|
|
5
|
+
export declare function useReportSaveDirty(dirty: boolean, enabled?: boolean): void;
|
|
6
|
+
export declare function useTrackSave(): <T>(work: Promise<T>) => Promise<T>;
|
|
7
|
+
export type NmModalProps = {
|
|
8
|
+
open: boolean;
|
|
9
|
+
title: string;
|
|
10
|
+
titleSize?: NmModalTitleSize;
|
|
11
|
+
size?: NmModalSize;
|
|
12
|
+
footer?: NmModalFooter;
|
|
13
|
+
paneTitle?: ReactNode;
|
|
14
|
+
titleEnd?: ReactNode;
|
|
15
|
+
leading?: ReactNode;
|
|
16
|
+
onClose: () => void;
|
|
17
|
+
children: ReactNode;
|
|
18
|
+
menu?: ReactNode;
|
|
19
|
+
actions?: ReactNode;
|
|
20
|
+
testId?: string;
|
|
21
|
+
};
|
|
22
|
+
export declare function NmModal(props: NmModalProps): ReactNode;
|
|
23
|
+
export declare function NmModalAction(props: {
|
|
24
|
+
label?: string;
|
|
25
|
+
accessibleName?: string;
|
|
26
|
+
icon: NmIconId;
|
|
27
|
+
tone?: NmModalActionTone;
|
|
28
|
+
type?: 'button' | 'submit';
|
|
29
|
+
form?: string;
|
|
30
|
+
disabled?: boolean;
|
|
31
|
+
requireChange?: boolean;
|
|
32
|
+
testId?: string;
|
|
33
|
+
onClick?: () => void;
|
|
34
|
+
}): ReactNode;
|
|
35
|
+
export { NM_MODAL_ACTION, NM_MODAL_CLASSES, NM_MODAL_FOOTER, NM_MODAL_SIZE, NM_MODAL_TITLE };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import { type NmSegmentedItem } from '../nm-segmented/nm-segmented.tsx';
|
|
3
|
+
import type { NmSegmentedTone } from '../../config/nm-segmented.ts';
|
|
4
|
+
import { NM_PANEL_BAR_LAYOUT } from '../../config/nm-panel-bar.ts';
|
|
5
|
+
export type NmPanelBarProps = {
|
|
6
|
+
label: string;
|
|
7
|
+
testId?: string;
|
|
8
|
+
items: readonly NmSegmentedItem[];
|
|
9
|
+
active: string;
|
|
10
|
+
toggleLabel: string;
|
|
11
|
+
toggleTestId?: string;
|
|
12
|
+
tone?: NmSegmentedTone;
|
|
13
|
+
layout?: (typeof NM_PANEL_BAR_LAYOUT)[keyof typeof NM_PANEL_BAR_LAYOUT];
|
|
14
|
+
onSelect: (id: string) => void;
|
|
15
|
+
trailing?: ReactNode;
|
|
16
|
+
};
|
|
17
|
+
export declare function NmPanelBar(props: NmPanelBarProps): ReactNode;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ComponentProps } from 'react';
|
|
2
|
+
import { Popover as PopoverPrimitive } from '@base-ui/react/popover';
|
|
3
|
+
export declare function NmPopover(props: PopoverPrimitive.Root.Props): import("react").JSX.Element;
|
|
4
|
+
export declare function NmPopoverTrigger(props: PopoverPrimitive.Trigger.Props): import("react").JSX.Element;
|
|
5
|
+
export declare function NmPopoverContent({ className, align, alignOffset, side, sideOffset, ...props }: PopoverPrimitive.Popup.Props & Pick<PopoverPrimitive.Positioner.Props, 'align' | 'alignOffset' | 'side' | 'sideOffset'>): import("react").JSX.Element;
|
|
6
|
+
export declare function NmPopoverHeader({ className, ...props }: ComponentProps<'div'>): import("react").JSX.Element;
|
|
7
|
+
export declare function NmPopoverTitle({ className, ...props }: PopoverPrimitive.Title.Props): import("react").JSX.Element;
|
|
8
|
+
export declare function NmPopoverDescription({ className, ...props }: PopoverPrimitive.Description.Props): import("react").JSX.Element;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { Progress as ProgressPrimitive } from '@base-ui/react/progress';
|
|
2
|
+
/** Base UI Progress, in the shadcn composition, styled by NIF tokens. */
|
|
3
|
+
export declare function NmProgress({ className, children, value, ...props }: ProgressPrimitive.Root.Props): import("react").JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import { type NmQuestion, type NmQuestionnaireAnswers, type NmQuestionnaireShortcuts, type NmQuestionnaireVariant } from '../../config/nm-questionnaire.ts';
|
|
3
|
+
export type NmQuestionnaireProps = {
|
|
4
|
+
questions: readonly NmQuestion[];
|
|
5
|
+
/** Answers so far. Pass them with `onChange` to control the form, or to resume one. */
|
|
6
|
+
answers?: NmQuestionnaireAnswers;
|
|
7
|
+
onChange?: (answers: NmQuestionnaireAnswers) => void;
|
|
8
|
+
onSubmit: (answers: NmQuestionnaireAnswers) => void;
|
|
9
|
+
/** The step to show first. */
|
|
10
|
+
defaultStep?: number;
|
|
11
|
+
shortcuts?: NmQuestionnaireShortcuts;
|
|
12
|
+
variant?: NmQuestionnaireVariant;
|
|
13
|
+
submitLabel?: string;
|
|
14
|
+
/** After submit the form shows what was answered. */
|
|
15
|
+
submitted?: boolean;
|
|
16
|
+
};
|
|
17
|
+
export declare function NmQuestionnaire(props: NmQuestionnaireProps): ReactNode;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Radio as RadioPrimitive } from '@base-ui/react/radio';
|
|
2
|
+
import { RadioGroup as RadioGroupPrimitive } from '@base-ui/react/radio-group';
|
|
3
|
+
export declare function NmRadioGroup({ className, ...props }: RadioGroupPrimitive.Props): import("react").JSX.Element;
|
|
4
|
+
export declare function NmRadioGroupItem({ className, ...props }: RadioPrimitive.Root.Props): import("react").JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { NmIconId } from '../../config/nm-icons.ts';
|
|
3
|
+
import { NM_SEGMENTED_TONES, type NmSegmentedTone } from '../../config/nm-segmented.ts';
|
|
4
|
+
export type NmSegmentedItem = {
|
|
5
|
+
id: string;
|
|
6
|
+
label: string;
|
|
7
|
+
icon?: NmIconId;
|
|
8
|
+
imageSrc?: string;
|
|
9
|
+
iconOnly?: boolean;
|
|
10
|
+
};
|
|
11
|
+
export type NmSegmentedProps = {
|
|
12
|
+
items: readonly NmSegmentedItem[];
|
|
13
|
+
active: string;
|
|
14
|
+
tone?: NmSegmentedTone;
|
|
15
|
+
label: string;
|
|
16
|
+
testId?: string;
|
|
17
|
+
onSelect: (id: string) => void;
|
|
18
|
+
};
|
|
19
|
+
export declare function NmSegmented(props: NmSegmentedProps): ReactNode;
|
|
20
|
+
export { NM_SEGMENTED_TONES };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type ButtonHTMLAttributes, type ReactNode } from 'react';
|
|
2
|
+
import type { NmIconId } from '../../config/nm-icons.ts';
|
|
3
|
+
import { type NmSmallIconButtonTone } from '../../config/nm-small-icon-button.ts';
|
|
4
|
+
export type NmSmallIconButtonProps = {
|
|
5
|
+
label: string;
|
|
6
|
+
icon: NmIconId;
|
|
7
|
+
tone?: NmSmallIconButtonTone;
|
|
8
|
+
active?: boolean;
|
|
9
|
+
iconContent?: ReactNode;
|
|
10
|
+
testId?: string;
|
|
11
|
+
onClick?: () => void;
|
|
12
|
+
} & Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'onClick' | 'aria-label' | 'children'>;
|
|
13
|
+
export declare const NmSmallIconButton: import("react").ForwardRefExoticComponent<{
|
|
14
|
+
label: string;
|
|
15
|
+
icon: NmIconId;
|
|
16
|
+
tone?: NmSmallIconButtonTone;
|
|
17
|
+
active?: boolean;
|
|
18
|
+
iconContent?: ReactNode;
|
|
19
|
+
testId?: string;
|
|
20
|
+
onClick?: () => void;
|
|
21
|
+
} & Omit<ButtonHTMLAttributes<HTMLButtonElement>, "aria-label" | "children" | "onClick"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import { type NmTabItem } from '../../config/nm-tabs.ts';
|
|
3
|
+
export type NmTabsProps = {
|
|
4
|
+
label: string;
|
|
5
|
+
items: readonly NmTabItem[];
|
|
6
|
+
value: string;
|
|
7
|
+
onChange: (id: string) => void;
|
|
8
|
+
};
|
|
9
|
+
export declare function NmTabs(props: NmTabsProps): ReactNode;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Toggle as TogglePrimitive } from '@base-ui/react/toggle';
|
|
2
|
+
export declare const NM_TOGGLE_VARIANTS: readonly ['default', 'outline'];
|
|
3
|
+
export declare const NM_TOGGLE_SIZES: readonly ['sm', 'default', 'lg'];
|
|
4
|
+
export type NmToggleVariant = (typeof NM_TOGGLE_VARIANTS)[number];
|
|
5
|
+
export type NmToggleSize = (typeof NM_TOGGLE_SIZES)[number];
|
|
6
|
+
export declare function NmToggle({ className, variant, size, ...props }: TogglePrimitive.Props & {
|
|
7
|
+
variant?: NmToggleVariant;
|
|
8
|
+
size?: NmToggleSize;
|
|
9
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Tooltip as TooltipPrimitive } from '@base-ui/react/tooltip';
|
|
2
|
+
export declare function NmTooltipProvider({ delay, ...props }: TooltipPrimitive.Provider.Props): import("react").JSX.Element;
|
|
3
|
+
export declare function NmTooltip(props: TooltipPrimitive.Root.Props): import("react").JSX.Element;
|
|
4
|
+
export declare function NmTooltipTrigger(props: TooltipPrimitive.Trigger.Props): import("react").JSX.Element;
|
|
5
|
+
export declare function NmTooltipContent({ className, side, sideOffset, align, alignOffset, children, ...props }: TooltipPrimitive.Popup.Props & Pick<TooltipPrimitive.Positioner.Props, 'align' | 'alignOffset' | 'side' | 'sideOffset'>): import("react").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export type NmTopBarProps = {
|
|
3
|
+
/** Controls on the leading side: mode, title, search, filters. */
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
/** Controls on the trailing edge, such as the panel toggle. */
|
|
6
|
+
end?: ReactNode;
|
|
7
|
+
/** Narrow-screen control, such as the button that opens the rail. */
|
|
8
|
+
menu?: ReactNode;
|
|
9
|
+
endHidden?: boolean;
|
|
10
|
+
};
|
|
11
|
+
/** The one page bar. Chat, agents, work, artifacts, and the library pass their controls in. */
|
|
12
|
+
export declare function NmTopBar(props: NmTopBarProps): ReactNode;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { type ButtonHTMLAttributes, type ReactNode } from 'react';
|
|
2
|
+
import type { NmIconId } from '../../config/nm-icons.ts';
|
|
3
|
+
import { NM_ICON_BUTTON_TONES, type NmIconButtonTone } from '../../config/nm-icon-button.ts';
|
|
4
|
+
import { type NordmanChromeIconId } from '../../config/nordman-chrome.ts';
|
|
5
|
+
export declare const NORDMAN_ICON_BUTTON_VARIANTS: {
|
|
6
|
+
readonly line: "line";
|
|
7
|
+
readonly raised: "raised";
|
|
8
|
+
};
|
|
9
|
+
export type NordmanIconButtonVariant = (typeof NORDMAN_ICON_BUTTON_VARIANTS)[keyof typeof NORDMAN_ICON_BUTTON_VARIANTS];
|
|
10
|
+
export declare const NordmanIconButton: import("react").ForwardRefExoticComponent<{
|
|
11
|
+
label: string;
|
|
12
|
+
href?: string;
|
|
13
|
+
tone?: NmIconButtonTone;
|
|
14
|
+
variant?: NordmanIconButtonVariant;
|
|
15
|
+
testId?: string;
|
|
16
|
+
imageSrc?: string;
|
|
17
|
+
children?: ReactNode;
|
|
18
|
+
active?: boolean;
|
|
19
|
+
pressed?: boolean;
|
|
20
|
+
checked?: boolean;
|
|
21
|
+
busy?: boolean;
|
|
22
|
+
expanded?: boolean;
|
|
23
|
+
popup?: 'listbox';
|
|
24
|
+
controls?: string;
|
|
25
|
+
ariaDisabled?: boolean;
|
|
26
|
+
glyph?: NmIconId;
|
|
27
|
+
icon?: NordmanChromeIconId;
|
|
28
|
+
} & Omit<ButtonHTMLAttributes<HTMLButtonElement>, "aria-label" | "children"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
29
|
+
export { NM_ICON_BUTTON_TONES };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import { type NordmanLoginView } from '../../config/nordman-login.ts';
|
|
3
|
+
import { type NordmanLoginShape } from '../nordman-login-hero/nordman-login-hero.tsx';
|
|
4
|
+
export type NordmanLoginProps = {
|
|
5
|
+
title: string;
|
|
6
|
+
view: NordmanLoginView;
|
|
7
|
+
error: string | null;
|
|
8
|
+
notice: string | null;
|
|
9
|
+
pending: boolean;
|
|
10
|
+
sent: boolean;
|
|
11
|
+
passwordMin: number;
|
|
12
|
+
onView: (view: NordmanLoginView) => void;
|
|
13
|
+
onSignIn: (input: {
|
|
14
|
+
username: string;
|
|
15
|
+
password: string;
|
|
16
|
+
}) => void;
|
|
17
|
+
onRegister: (input: {
|
|
18
|
+
username: string;
|
|
19
|
+
displayName: string;
|
|
20
|
+
password: string;
|
|
21
|
+
}) => void;
|
|
22
|
+
onRequestReset: (input: {
|
|
23
|
+
identifier: string;
|
|
24
|
+
}) => void;
|
|
25
|
+
onResetPassword: (input: {
|
|
26
|
+
password: string;
|
|
27
|
+
}) => void;
|
|
28
|
+
children?: ReactNode;
|
|
29
|
+
hideSwitch?: boolean;
|
|
30
|
+
after?: ReactNode;
|
|
31
|
+
shape: NordmanLoginShape;
|
|
32
|
+
/** Google-only sign-in via Supabase Auth (hides email/password UI). */
|
|
33
|
+
googleOnly?: boolean;
|
|
34
|
+
onContinueWithGoogle?: () => void;
|
|
35
|
+
};
|
|
36
|
+
export declare function NordmanLogin(props: NordmanLoginProps): ReactNode;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
export type NordmanLoginFieldProps = {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
label: string;
|
|
6
|
+
type: 'text' | 'email' | 'password';
|
|
7
|
+
autoComplete: string;
|
|
8
|
+
placeholder?: string;
|
|
9
|
+
minLength?: number;
|
|
10
|
+
required?: boolean;
|
|
11
|
+
accessory?: ReactNode;
|
|
12
|
+
};
|
|
13
|
+
export declare function NordmanLoginField(props: NordmanLoginFieldProps): ReactNode;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
export type NordmanLoginForgotProps = {
|
|
3
|
+
pending: boolean;
|
|
4
|
+
sent: boolean;
|
|
5
|
+
onRequestReset: (input: {
|
|
6
|
+
identifier: string;
|
|
7
|
+
}) => void;
|
|
8
|
+
};
|
|
9
|
+
export declare function NordmanLoginForgot(props: NordmanLoginForgotProps): ReactNode;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
export type NordmanLoginShape = 'square' | 'triangle' | 'circle';
|
|
3
|
+
/** The website hero. The app loads `nordman-ui.js` and `hero.css`, which live beside `site.css`. */
|
|
4
|
+
export declare function NordmanLoginHero(props: {
|
|
5
|
+
shape: NordmanLoginShape;
|
|
6
|
+
}): ReactNode;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
export type NordmanLoginRegisterProps = {
|
|
3
|
+
pending: boolean;
|
|
4
|
+
passwordMin: number;
|
|
5
|
+
onRegister: (input: {
|
|
6
|
+
username: string;
|
|
7
|
+
displayName: string;
|
|
8
|
+
password: string;
|
|
9
|
+
}) => void;
|
|
10
|
+
};
|
|
11
|
+
export declare function NordmanLoginRegister(props: NordmanLoginRegisterProps): ReactNode;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
export type NordmanLoginResetProps = {
|
|
3
|
+
pending: boolean;
|
|
4
|
+
passwordMin: number;
|
|
5
|
+
onResetPassword: (input: {
|
|
6
|
+
password: string;
|
|
7
|
+
}) => void;
|
|
8
|
+
};
|
|
9
|
+
export declare function NordmanLoginReset(props: NordmanLoginResetProps): ReactNode;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
export type NordmanLoginSignInProps = {
|
|
3
|
+
pending: boolean;
|
|
4
|
+
passwordMin: number;
|
|
5
|
+
onForgot: () => void;
|
|
6
|
+
onSignIn: (input: {
|
|
7
|
+
username: string;
|
|
8
|
+
password: string;
|
|
9
|
+
}) => void;
|
|
10
|
+
};
|
|
11
|
+
export declare function NordmanLoginSignIn(props: NordmanLoginSignInProps): ReactNode;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export type NordmanToggleItem = {
|
|
3
|
+
id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
href: string;
|
|
6
|
+
};
|
|
7
|
+
export type NordmanToggleProps = {
|
|
8
|
+
items: readonly NordmanToggleItem[];
|
|
9
|
+
active: string;
|
|
10
|
+
testId?: string;
|
|
11
|
+
};
|
|
12
|
+
export declare function NordmanToggle(props: NordmanToggleProps): ReactNode;
|