@danxbot/ui 15.16.0 → 15.17.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/dist/index.js +7718 -7529
- package/dist/index.js.map +1 -1
- package/dist/types/components/IconStack.d.ts +28 -0
- package/dist/types/components/Menu.d.ts +29 -0
- package/dist/types/icons/data.d.ts +8 -0
- package/dist/types/index.d.ts +2 -1
- package/package.json +1 -1
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { HTMLAttributes, Ref } from "react";
|
|
2
|
+
import { type IconName } from "./Icon";
|
|
3
|
+
export type IconStackTone = "neutral" | "accent" | "success" | "warning" | "danger" | "info" | "muted";
|
|
4
|
+
export interface IconStackBadge {
|
|
5
|
+
icon: IconName;
|
|
6
|
+
tone?: IconStackTone;
|
|
7
|
+
}
|
|
8
|
+
export interface IconStackItem {
|
|
9
|
+
icon: IconName;
|
|
10
|
+
tone?: IconStackTone;
|
|
11
|
+
/**
|
|
12
|
+
* The fact is ABSENT: a dashed, quiet outline in place of the filled chip.
|
|
13
|
+
* `tone` is ignored — an absent mark is always the muted one.
|
|
14
|
+
*/
|
|
15
|
+
empty?: boolean;
|
|
16
|
+
/** A smaller mark pinned to this chip's bottom-right corner. */
|
|
17
|
+
badge?: IconStackBadge;
|
|
18
|
+
}
|
|
19
|
+
export type IconStackSize = "sm" | "md" | "lg";
|
|
20
|
+
export interface IconStackProps extends Omit<HTMLAttributes<HTMLSpanElement>, "children" | "aria-label"> {
|
|
21
|
+
/** Marks in paint order: the LAST one is on top. At least one. */
|
|
22
|
+
items: readonly IconStackItem[];
|
|
23
|
+
/** The whole combination, in words. REQUIRED — the marks carry no text. */
|
|
24
|
+
label: string;
|
|
25
|
+
size?: IconStackSize;
|
|
26
|
+
ref?: Ref<HTMLSpanElement>;
|
|
27
|
+
}
|
|
28
|
+
export declare function IconStack({ items, label, size, className, ref, ...props }: IconStackProps): import("react").JSX.Element;
|
|
@@ -83,6 +83,35 @@ export interface MenuRadioItemProps extends Omit<BaseMenu.RadioItem.Props, "clas
|
|
|
83
83
|
ref?: Ref<HTMLDivElement>;
|
|
84
84
|
}
|
|
85
85
|
export declare function MenuRadioItem({ className, children, ref, ...props }: MenuRadioItemProps): import("react").JSX.Element;
|
|
86
|
+
export interface MenuCheckboxItemProps extends Omit<BaseMenu.CheckboxItem.Props, "className"> {
|
|
87
|
+
className?: string;
|
|
88
|
+
/** Leading icon — same slot, and same reason it is a prop, as `MenuItem.icon`. */
|
|
89
|
+
icon?: ReactNode;
|
|
90
|
+
/**
|
|
91
|
+
* A second, quieter line saying what the toggle DOES — shown under the label.
|
|
92
|
+
* A switch row that cannot say what it controls sends the reader to a help
|
|
93
|
+
* page; one line here is the whole help page.
|
|
94
|
+
*/
|
|
95
|
+
description?: ReactNode;
|
|
96
|
+
ref?: Ref<HTMLDivElement>;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* An independent on/off setting inside a menu.
|
|
100
|
+
*
|
|
101
|
+
* A `MenuItem` is an ACTION and closes the menu when picked; a setting that is
|
|
102
|
+
* flipped three at a time must not. Base UI's checkbox item keeps the menu open
|
|
103
|
+
* (`closeOnClick` defaults to `false` here, not by our choice) and announces
|
|
104
|
+
* itself as `menuitemcheckbox` with `aria-checked`, which a `MenuItem` carrying
|
|
105
|
+
* a hand-drawn tick cannot — that is the reason this is its own row and not a
|
|
106
|
+
* `selected` `MenuItem`.
|
|
107
|
+
*
|
|
108
|
+
* The state is drawn as a small trailing switch rather than a leading tick:
|
|
109
|
+
* every other row in the same popup puts its icon on the left, and a tick there
|
|
110
|
+
* reads as "this is the current choice among alternatives" (`MenuRadioItem`),
|
|
111
|
+
* not "this is on". The track is fill AND thumb position, so on/off survives
|
|
112
|
+
* the loss of colour.
|
|
113
|
+
*/
|
|
114
|
+
export declare function MenuCheckboxItem({ className, icon, description, children, ref, ...props }: MenuCheckboxItemProps): import("react").JSX.Element;
|
|
86
115
|
export interface MenuGroupProps {
|
|
87
116
|
/**
|
|
88
117
|
* The group's heading. A prop rather than a child component, so a label
|
|
@@ -355,6 +355,9 @@ export declare const coreIcons: {
|
|
|
355
355
|
readonly "loader-circle": readonly [readonly ["path", {
|
|
356
356
|
readonly d: "M21 12a9 9 0 1 1-6.219-8.56";
|
|
357
357
|
}]];
|
|
358
|
+
readonly shield: readonly [readonly ["path", {
|
|
359
|
+
readonly d: "M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z";
|
|
360
|
+
}]];
|
|
358
361
|
readonly "shield-check": readonly [readonly ["path", {
|
|
359
362
|
readonly d: "M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z";
|
|
360
363
|
}], readonly ["path", {
|
|
@@ -381,6 +384,11 @@ export declare const coreIcons: {
|
|
|
381
384
|
}], readonly ["path", {
|
|
382
385
|
readonly d: "M8.668 3.01A6 6 0 0 1 18 8c0 2.687.77 4.653 1.707 6.05";
|
|
383
386
|
}]];
|
|
387
|
+
readonly "book-open": readonly [readonly ["path", {
|
|
388
|
+
readonly d: "M12 7v14";
|
|
389
|
+
}], readonly ["path", {
|
|
390
|
+
readonly d: "M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z";
|
|
391
|
+
}]];
|
|
384
392
|
readonly bookmark: readonly [readonly ["path", {
|
|
385
393
|
readonly d: "m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z";
|
|
386
394
|
}]];
|
package/dist/types/index.d.ts
CHANGED
|
@@ -38,7 +38,7 @@ export { TriStateSwitch, type TriStateSwitchProps, type TriStateSwitchSize, } fr
|
|
|
38
38
|
export { Dialog, DialogClose, AlertDialog, type DialogProps, type AlertDialogProps, } from "./components/Dialog";
|
|
39
39
|
export { Popover, PopoverClose, Tooltip, TooltipProvider, type PopoverProps, type TooltipProps, } from "./components/Popover";
|
|
40
40
|
export { Toaster, ToastProvider, useToast, type ToasterProps, type ToastProviderProps, type ToastOptions, type ToastTone, } from "./components/Toast";
|
|
41
|
-
export { Menu, MenuItem, MenuGroup, MenuRadioGroup, MenuRadioItem, MenuSeparator, type MenuProps, type MenuItemProps, type MenuItemTone, type MenuGroupProps, type MenuRadioGroupProps, type MenuRadioItemProps, } from "./components/Menu";
|
|
41
|
+
export { Menu, MenuItem, MenuGroup, MenuRadioGroup, MenuRadioItem, MenuCheckboxItem, MenuSeparator, type MenuProps, type MenuItemProps, type MenuItemTone, type MenuGroupProps, type MenuRadioGroupProps, type MenuRadioItemProps, type MenuCheckboxItemProps, } from "./components/Menu";
|
|
42
42
|
export { ThemeMenu, type ThemeMenuProps } from "./components/ThemeMenu";
|
|
43
43
|
export { AppShell, type AppShellProps, type NavItem, type NavSection, } from "./components/AppShell";
|
|
44
44
|
export { FileUpload, type FileUploadProps, type UploadFile } from "./components/FileUpload";
|
|
@@ -72,6 +72,7 @@ export { DataTable, TableEmptyState, CellStack, type DataTableProps, type TableD
|
|
|
72
72
|
export { CodeEditor, CodeEditorToolbar, CodeEditorCaption, CodeEditorCopyButton, CodeEditorWrapToggle, CodeEditorViewSwitch, type CodeEditorProps, type CodeEditorToolbarProps, type CodeEditorView, } from "./components/CodeEditor";
|
|
73
73
|
export { Markdown, CodeBlock, type MarkdownProps, type CodeBlockProps } from "./components/Markdown";
|
|
74
74
|
export { LineDiff, type LineDiffProps } from "./components/LineDiff";
|
|
75
|
+
export { IconStack, type IconStackProps, type IconStackItem, type IconStackBadge, type IconStackTone, type IconStackSize, } from "./components/IconStack";
|
|
75
76
|
export { MarkdownEditor, type MarkdownEditorProps, type MarkdownEditorHandle, } from "./components/MarkdownEditor";
|
|
76
77
|
export { ReadMore, type ReadMoreProps } from "./components/ReadMore";
|
|
77
78
|
export { MarkdownSurface, type SurfaceOptions, type Splice } from "./lib/markdown/surface";
|