@voxel51/voodo 0.0.28 → 0.0.29
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/components/Dropdown/Dropdown.d.ts +94 -0
- package/dist/components/Dropdown/Dropdown.d.ts.map +1 -0
- package/dist/components/Dropdown/DropdownTrigger.d.ts +26 -0
- package/dist/components/Dropdown/DropdownTrigger.d.ts.map +1 -0
- package/dist/components/Dropdown/index.d.ts +3 -0
- package/dist/components/Dropdown/index.d.ts.map +1 -0
- package/dist/components/Menu/MenuCheckItem.d.ts +35 -0
- package/dist/components/Menu/MenuCheckItem.d.ts.map +1 -0
- package/dist/components/Menu/MenuIconTextItem.d.ts +43 -0
- package/dist/components/Menu/MenuIconTextItem.d.ts.map +1 -0
- package/dist/components/Menu/MenuSectionTitle.d.ts +26 -0
- package/dist/components/Menu/MenuSectionTitle.d.ts.map +1 -0
- package/dist/components/Menu/MenuSeparator.d.ts +23 -0
- package/dist/components/Menu/MenuSeparator.d.ts.map +1 -0
- package/dist/components/Menu/MenuTextItem.d.ts +30 -0
- package/dist/components/Menu/MenuTextItem.d.ts.map +1 -0
- package/dist/components/Menu/index.d.ts +7 -0
- package/dist/components/Menu/index.d.ts.map +1 -0
- package/dist/components/Menu/styles.d.ts +8 -0
- package/dist/components/Menu/styles.d.ts.map +1 -0
- package/dist/components/Select/Select.d.ts.map +1 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/index.cjs +6 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +6607 -6042
- package/dist/index.js.map +1 -1
- package/dist/voodo.css +1 -1
- package/package.json +2 -1
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { FC, HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import { ZIndex } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* Position of the dropdown menu panel relative to its trigger.
|
|
5
|
+
* Values follow the `<edge> <alignment>` convention used by HeadlessUI's
|
|
6
|
+
* floating UI — e.g. `BottomStart` opens the menu below the trigger,
|
|
7
|
+
* left-aligned with it.
|
|
8
|
+
*/
|
|
9
|
+
export declare enum DropdownAnchor {
|
|
10
|
+
/** Below the trigger, horizontally centered. */
|
|
11
|
+
Bottom = "bottom",
|
|
12
|
+
/** Below the trigger, aligned with its leading (start) edge. */
|
|
13
|
+
BottomStart = "bottom start",
|
|
14
|
+
/** Below the trigger, aligned with its trailing (end) edge. */
|
|
15
|
+
BottomEnd = "bottom end",
|
|
16
|
+
/** Above the trigger, horizontally centered. */
|
|
17
|
+
Top = "top",
|
|
18
|
+
/** Above the trigger, aligned with its leading (start) edge. */
|
|
19
|
+
TopStart = "top start",
|
|
20
|
+
/** Above the trigger, aligned with its trailing (end) edge. */
|
|
21
|
+
TopEnd = "top end"
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Props for {@link Dropdown}.
|
|
25
|
+
*/
|
|
26
|
+
export interface DropdownProps extends HTMLAttributes<HTMLDivElement> {
|
|
27
|
+
/**
|
|
28
|
+
* The element that opens the dropdown when clicked.
|
|
29
|
+
* Rendered inside a `MenuButton` wrapper — any focusable element works.
|
|
30
|
+
*/
|
|
31
|
+
trigger: ReactNode;
|
|
32
|
+
/** Menu content. Use the Menu* primitive components as children. */
|
|
33
|
+
children: ReactNode;
|
|
34
|
+
/** Position of the menu panel relative to the trigger. */
|
|
35
|
+
anchor?: DropdownAnchor;
|
|
36
|
+
/**
|
|
37
|
+
* Renders the menu panel in a portal so it escapes overflow-hidden
|
|
38
|
+
* ancestors and stacks above complex layouts (modals, mosaic grids,
|
|
39
|
+
* scrollable regions). Defaults to `true` — opt out by passing `false`
|
|
40
|
+
* when the menu must stay inside its trigger's DOM subtree (e.g. tightly
|
|
41
|
+
* scoped to a virtualized list).
|
|
42
|
+
* @default true
|
|
43
|
+
*/
|
|
44
|
+
portal?: boolean;
|
|
45
|
+
/** Explicit z-index override for the menu panel. */
|
|
46
|
+
zIndex?: ZIndex;
|
|
47
|
+
/**
|
|
48
|
+
* If `true`, the trigger cannot open the menu. Also inferred automatically
|
|
49
|
+
* when the `trigger` element has `disabled` set on its props.
|
|
50
|
+
*/
|
|
51
|
+
disabled?: boolean;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* A click-triggered menu component. Composes with the Menu primitives:
|
|
55
|
+
* {@link MenuTextItem}, {@link MenuIconTextItem}, {@link MenuCheckItem},
|
|
56
|
+
* {@link MenuSectionTitle}, and {@link MenuSeparator}.
|
|
57
|
+
*
|
|
58
|
+
* Built on HeadlessUI's `Menu`, providing full keyboard navigation
|
|
59
|
+
* (arrow keys, Enter, Escape) and ARIA `role="menu"` semantics automatically.
|
|
60
|
+
*
|
|
61
|
+
* @example
|
|
62
|
+
* ```tsx
|
|
63
|
+
* <Dropdown trigger={<DropdownTrigger>Actions</DropdownTrigger>}>
|
|
64
|
+
* <MenuSectionTitle>Actions</MenuSectionTitle>
|
|
65
|
+
* <MenuIconTextItem
|
|
66
|
+
* icon={IconName.ImageSearch}
|
|
67
|
+
* text="Sort by similarity"
|
|
68
|
+
* subtext="Find visually similar"
|
|
69
|
+
* onClick={() => {}}
|
|
70
|
+
* />
|
|
71
|
+
* <MenuIconTextItem
|
|
72
|
+
* icon={IconName.Embeddings}
|
|
73
|
+
* text="Run embeddings"
|
|
74
|
+
* subtext="Compute vector embeddings"
|
|
75
|
+
* onClick={() => {}}
|
|
76
|
+
* />
|
|
77
|
+
* <MenuSeparator />
|
|
78
|
+
* <MenuTextItem destructive onClick={() => {}}>
|
|
79
|
+
* Delete
|
|
80
|
+
* </MenuTextItem>
|
|
81
|
+
* </Dropdown>
|
|
82
|
+
* ```
|
|
83
|
+
*
|
|
84
|
+
* @param trigger The trigger element that opens the menu.
|
|
85
|
+
* @param children Menu content — use the Menu* primitive components.
|
|
86
|
+
* @param anchor Position of the menu panel relative to the trigger. See {@link DropdownAnchor}.
|
|
87
|
+
* @param portal If `true`, renders the panel in a portal with a high z-index.
|
|
88
|
+
* @param zIndex Explicit z-index for the panel.
|
|
89
|
+
* @param disabled If `true`, the menu cannot be opened.
|
|
90
|
+
* @param className `class` overrides for the root wrapper.
|
|
91
|
+
* @param props Additional HTML properties for the root wrapper.
|
|
92
|
+
*/
|
|
93
|
+
export declare const Dropdown: FC<DropdownProps>;
|
|
94
|
+
//# sourceMappingURL=Dropdown.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Dropdown.d.ts","sourceRoot":"","sources":["../../../src/components/Dropdown/Dropdown.tsx"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,EAAE,EACP,KAAK,cAAc,EACnB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAGf,OAAO,EAAE,MAAM,EAAgB,MAAM,SAAS,CAAC;AAG/C;;;;;GAKG;AACH,oBAAY,cAAc;IACxB,gDAAgD;IAChD,MAAM,WAAW;IACjB,gEAAgE;IAChE,WAAW,iBAAiB;IAC5B,+DAA+D;IAC/D,SAAS,eAAe;IACxB,gDAAgD;IAChD,GAAG,QAAQ;IACX,gEAAgE;IAChE,QAAQ,cAAc;IACtB,+DAA+D;IAC/D,MAAM,YAAY;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,aAAc,SAAQ,cAAc,CAAC,cAAc,CAAC;IACnE;;;OAGG;IACH,OAAO,EAAE,SAAS,CAAC;IACnB,oEAAoE;IACpE,QAAQ,EAAE,SAAS,CAAC;IACpB,0DAA0D;IAC1D,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,oDAAoD;IACpD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,eAAO,MAAM,QAAQ,EAAE,EAAE,CAAC,aAAa,CA0CtC,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { ButtonProps } from '../Button';
|
|
3
|
+
/**
|
|
4
|
+
* Props for {@link DropdownTrigger}. Accepts {@link ButtonProps} except
|
|
5
|
+
* `variant` and `trailingIcon`, which are fixed by the trigger preset
|
|
6
|
+
* (secondary variant + caret-down icon).
|
|
7
|
+
*/
|
|
8
|
+
export type DropdownTriggerProps = Omit<ButtonProps, "variant" | "trailingIcon">;
|
|
9
|
+
/**
|
|
10
|
+
* The standard trigger button for a {@link Dropdown}.
|
|
11
|
+
* Always renders as a secondary button with a trailing caret-down icon
|
|
12
|
+
* so users know the element opens a menu.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```tsx
|
|
16
|
+
* <Dropdown trigger={<DropdownTrigger>Actions</DropdownTrigger>}>
|
|
17
|
+
* <DropdownTextItem onClick={() => {}}>Edit</DropdownTextItem>
|
|
18
|
+
* </Dropdown>
|
|
19
|
+
* ```
|
|
20
|
+
*
|
|
21
|
+
* @param children Button label.
|
|
22
|
+
* @param size Button size. Defaults to {@link Size.Sm}.
|
|
23
|
+
* @param props Additional {@link ButtonProps} (excluding `variant` and `trailingIcon`).
|
|
24
|
+
*/
|
|
25
|
+
export declare const DropdownTrigger: FC<DropdownTriggerProps>;
|
|
26
|
+
//# sourceMappingURL=DropdownTrigger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DropdownTrigger.d.ts","sourceRoot":"","sources":["../../../src/components/Dropdown/DropdownTrigger.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAG/D;;;;GAIG;AACH,MAAM,MAAM,oBAAoB,GAAG,IAAI,CACrC,WAAW,EACX,SAAS,GAAG,cAAc,CAC3B,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CAapD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Dropdown/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { FC, HTMLAttributes } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Props for {@link MenuCheckItem}.
|
|
4
|
+
*/
|
|
5
|
+
export interface MenuCheckItemProps extends HTMLAttributes<HTMLButtonElement> {
|
|
6
|
+
/** Whether this item is currently checked/selected. */
|
|
7
|
+
checked?: boolean;
|
|
8
|
+
/** If `true`, the item cannot be interacted with and is rendered in a muted style. */
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* A selectable menu item with a leading checkmark indicator.
|
|
13
|
+
* The checkmark is shown when `checked` is `true`; otherwise the slot is empty
|
|
14
|
+
* but reserved so that text alignment stays consistent across items.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```tsx
|
|
18
|
+
* <Dropdown trigger={<DropdownTrigger>Sort</DropdownTrigger>}>
|
|
19
|
+
* <MenuCheckItem checked={sort === "asc"} onClick={() => setSort("asc")}>
|
|
20
|
+
* Ascending
|
|
21
|
+
* </MenuCheckItem>
|
|
22
|
+
* <MenuCheckItem checked={sort === "desc"} onClick={() => setSort("desc")}>
|
|
23
|
+
* Descending
|
|
24
|
+
* </MenuCheckItem>
|
|
25
|
+
* </Dropdown>
|
|
26
|
+
* ```
|
|
27
|
+
*
|
|
28
|
+
* @param checked If `true`, a checkmark is shown in the leading slot.
|
|
29
|
+
* @param disabled If `true`, the item cannot be interacted with.
|
|
30
|
+
* @param children The label text.
|
|
31
|
+
* @param className `class` overrides to apply to the component.
|
|
32
|
+
* @param props Additional HTML properties to apply to the component.
|
|
33
|
+
*/
|
|
34
|
+
export declare const MenuCheckItem: FC<MenuCheckItemProps>;
|
|
35
|
+
//# sourceMappingURL=MenuCheckItem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MenuCheckItem.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/MenuCheckItem.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAiBhD;;GAEG;AACH,MAAM,WAAW,kBAAmB,SAAQ,cAAc,CAAC,iBAAiB,CAAC;IAC3E,uDAAuD;IACvD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,sFAAsF;IACtF,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,kBAAkB,CAgDhD,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { FC, HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import { IconName } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* Props for {@link MenuIconTextItem}.
|
|
5
|
+
*/
|
|
6
|
+
export interface MenuIconTextItemProps extends HTMLAttributes<HTMLButtonElement> {
|
|
7
|
+
/** Icon to display to the left of the text content. */
|
|
8
|
+
icon: IconName | ReactNode;
|
|
9
|
+
/** Primary label text. */
|
|
10
|
+
text: string;
|
|
11
|
+
/** Optional secondary description shown below the primary text. */
|
|
12
|
+
subtext?: string;
|
|
13
|
+
/** If `true`, the item cannot be interacted with and is rendered in a muted style. */
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
/** If `true`, renders text and icon in the destructive color palette. */
|
|
16
|
+
destructive?: boolean;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* A menu item displaying an icon alongside primary text and an optional subtext description.
|
|
20
|
+
* Matches the layout shown for action menus such as "Sort by similarity / Find visually similar".
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```tsx
|
|
24
|
+
* <Dropdown trigger={<DropdownTrigger>Open</DropdownTrigger>}>
|
|
25
|
+
* <MenuIconTextItem
|
|
26
|
+
* icon={IconName.ImageSearch}
|
|
27
|
+
* text="Sort by similarity"
|
|
28
|
+
* subtext="Find visually similar"
|
|
29
|
+
* onClick={() => {}}
|
|
30
|
+
* />
|
|
31
|
+
* </Dropdown>
|
|
32
|
+
* ```
|
|
33
|
+
*
|
|
34
|
+
* @param icon An {@link IconName} or a custom ReactNode rendered in the leading slot.
|
|
35
|
+
* @param text The primary label for the item.
|
|
36
|
+
* @param subtext An optional secondary line rendered below the primary text in muted color.
|
|
37
|
+
* @param disabled If `true`, the item cannot be interacted with.
|
|
38
|
+
* @param destructive If `true`, renders text colors in the destructive palette.
|
|
39
|
+
* @param className `class` overrides to apply to the component.
|
|
40
|
+
* @param props Additional HTML properties to apply to the component.
|
|
41
|
+
*/
|
|
42
|
+
export declare const MenuIconTextItem: FC<MenuIconTextItemProps>;
|
|
43
|
+
//# sourceMappingURL=MenuIconTextItem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MenuIconTextItem.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/MenuIconTextItem.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAK3D,OAAO,EAKL,QAAQ,EAKT,MAAM,SAAS,CAAC;AAGjB;;GAEG;AACH,MAAM,WAAW,qBAAsB,SAAQ,cAAc,CAAC,iBAAiB,CAAC;IAC9E,uDAAuD;IACvD,IAAI,EAAE,QAAQ,GAAG,SAAS,CAAC;IAC3B,0BAA0B;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,mEAAmE;IACnE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,sFAAsF;IACtF,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,yEAAyE;IACzE,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,qBAAqB,CA+DtD,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { FC, HTMLAttributes } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Props for {@link MenuSectionTitle}.
|
|
4
|
+
*/
|
|
5
|
+
export interface MenuSectionTitleProps extends HTMLAttributes<HTMLDivElement> {
|
|
6
|
+
/** The section title text. Rendered as an uppercase muted label. */
|
|
7
|
+
children: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* A non-interactive section title within a menu (e.g. {@link Dropdown}).
|
|
11
|
+
* Renders as an uppercase label above a group of items.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```tsx
|
|
15
|
+
* <Dropdown trigger={<DropdownTrigger>Open</DropdownTrigger>}>
|
|
16
|
+
* <MenuSectionTitle>Actions</MenuSectionTitle>
|
|
17
|
+
* <MenuIconTextItem icon={IconName.Edit} text="Edit" />
|
|
18
|
+
* </Dropdown>
|
|
19
|
+
* ```
|
|
20
|
+
*
|
|
21
|
+
* @param children The section title text.
|
|
22
|
+
* @param className `class` overrides to apply to the component.
|
|
23
|
+
* @param props Additional HTML properties to apply to the component.
|
|
24
|
+
*/
|
|
25
|
+
export declare const MenuSectionTitle: FC<MenuSectionTitleProps>;
|
|
26
|
+
//# sourceMappingURL=MenuSectionTitle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MenuSectionTitle.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/MenuSectionTitle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAMhD;;GAEG;AACH,MAAM,WAAW,qBAAsB,SAAQ,cAAc,CAAC,cAAc,CAAC;IAC3E,oEAAoE;IACpE,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,qBAAqB,CAgBtD,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { FC, HTMLAttributes } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Props for {@link MenuSeparator}. Accepts any standard div HTML attributes.
|
|
4
|
+
*/
|
|
5
|
+
export type MenuSeparatorProps = HTMLAttributes<HTMLDivElement>;
|
|
6
|
+
/**
|
|
7
|
+
* A horizontal rule separator within a menu (e.g. {@link Dropdown}).
|
|
8
|
+
* Used to visually divide groups of items.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```tsx
|
|
12
|
+
* <Dropdown trigger={<DropdownTrigger>Open</DropdownTrigger>}>
|
|
13
|
+
* <MenuTextItem onClick={() => {}}>First group</MenuTextItem>
|
|
14
|
+
* <MenuSeparator />
|
|
15
|
+
* <MenuTextItem onClick={() => {}}>Second group</MenuTextItem>
|
|
16
|
+
* </Dropdown>
|
|
17
|
+
* ```
|
|
18
|
+
*
|
|
19
|
+
* @param className `class` overrides to apply to the component.
|
|
20
|
+
* @param props Additional HTML properties to apply to the component.
|
|
21
|
+
*/
|
|
22
|
+
export declare const MenuSeparator: FC<MenuSeparatorProps>;
|
|
23
|
+
//# sourceMappingURL=MenuSeparator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MenuSeparator.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/MenuSeparator.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAKhD;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,cAAc,CAAC,cAAc,CAAC,CAAC;AAEhE;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,kBAAkB,CAehD,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { FC, HTMLAttributes } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Props for {@link MenuTextItem}.
|
|
4
|
+
*/
|
|
5
|
+
export interface MenuTextItemProps extends HTMLAttributes<HTMLButtonElement> {
|
|
6
|
+
/** If `true`, the item cannot be interacted with and is rendered in a muted style. */
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
/** If `true`, renders the label in the destructive text color (e.g. for "Delete"). */
|
|
9
|
+
destructive?: boolean;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* A simple text-only item within a menu (e.g. {@link Dropdown}).
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```tsx
|
|
16
|
+
* <Dropdown trigger={<DropdownTrigger>Open</DropdownTrigger>}>
|
|
17
|
+
* <MenuTextItem onClick={() => console.log("clicked")}>
|
|
18
|
+
* Delete item
|
|
19
|
+
* </MenuTextItem>
|
|
20
|
+
* </Dropdown>
|
|
21
|
+
* ```
|
|
22
|
+
*
|
|
23
|
+
* @param children The label text.
|
|
24
|
+
* @param disabled If `true`, the item cannot be interacted with.
|
|
25
|
+
* @param destructive If `true`, renders the label in the destructive text color.
|
|
26
|
+
* @param className `class` overrides to apply to the component.
|
|
27
|
+
* @param props Additional HTML properties to apply to the component.
|
|
28
|
+
*/
|
|
29
|
+
export declare const MenuTextItem: FC<MenuTextItemProps>;
|
|
30
|
+
//# sourceMappingURL=MenuTextItem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MenuTextItem.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/MenuTextItem.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAchD;;GAEG;AACH,MAAM,WAAW,iBAAkB,SAAQ,cAAc,CAAC,iBAAiB,CAAC;IAC1E,sFAAsF;IACtF,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,sFAAsF;IACtF,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,iBAAiB,CAoC9C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared visual styles for menu panels (Dropdown, ContextMenu, etc.).
|
|
3
|
+
*
|
|
4
|
+
* Provides the popover background, padding, max-width cap, radius, shadow,
|
|
5
|
+
* and focus outline reset that define the menu's visual identity.
|
|
6
|
+
*/
|
|
7
|
+
export declare const menuPanelStyles: () => string;
|
|
8
|
+
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/styles.ts"],"names":[],"mappings":"AAKA;;;;;GAKG;AACH,eAAO,MAAM,eAAe,QAAO,MAQhC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../src/components/Select/Select.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,EAAE,EACF,cAAc,EACd,SAAS,
|
|
1
|
+
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../src/components/Select/Select.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,EAAE,EACF,cAAc,EACd,SAAS,EAMV,MAAM,OAAO,CAAC;AAOf,OAAO,EACL,UAAU,EAMV,MAAM,EAEP,MAAM,SAAS,CAAC;AAKjB,oBAAY,YAAY;IACtB,MAAM,WAAW;IACjB,WAAW,iBAAiB;IAC5B,SAAS,eAAe;IACxB,GAAG,QAAQ;IACX,QAAQ,cAAc;IACtB,MAAM,YAAY;CACnB;AAED,MAAM,WAAW,WAAY,SAAQ,IAAI,CACvC,cAAc,CAAC,cAAc,CAAC,EAC9B,UAAU,CACX;IACC,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,IAAI,KAAK,IAAI,CAAC;IACrD,OAAO,CAAC,EAAE,UAAU,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,SAAS,CAAA;KAAE,CAAC,EAAE,CAAC;IAC/D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;CAC3B;AAsBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuEG;AACH,eAAO,MAAM,MAAM,EAAE,EAAE,CAAC,WAAW,CA4IlC,CAAC"}
|
|
@@ -7,6 +7,7 @@ export * from './Collapsible';
|
|
|
7
7
|
export * from './Datepicker';
|
|
8
8
|
export * from './Divider';
|
|
9
9
|
export * from './Drawer';
|
|
10
|
+
export * from './Dropdown';
|
|
10
11
|
export * from './EmptyState';
|
|
11
12
|
export * from './FormField';
|
|
12
13
|
export * from './FormFieldGroup';
|
|
@@ -15,6 +16,7 @@ export * from './Icons';
|
|
|
15
16
|
export * from './ImageList';
|
|
16
17
|
export * from './Input';
|
|
17
18
|
export * from './ListItem';
|
|
19
|
+
export * from './Menu';
|
|
18
20
|
export * from './Pill';
|
|
19
21
|
export * from './Radio';
|
|
20
22
|
export * from './RichButton';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,kBAAkB,CAAC;AACjC,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,kBAAkB,CAAC;AACjC,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC"}
|