@voxel51/voodo 2.4.0-app-revamp.3 → 2.4.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/components/ContextMenu/ContextMenu.d.ts +8 -3
- package/dist/components/ContextMenu/ContextMenu.d.ts.map +1 -1
- package/dist/components/Dropdown/Dropdown.d.ts +8 -7
- package/dist/components/Dropdown/Dropdown.d.ts.map +1 -1
- package/dist/components/Menu/MenuCheckItem.d.ts +1 -0
- package/dist/components/Menu/MenuCheckItem.d.ts.map +1 -1
- package/dist/components/Menu/MenuIconTextItem.d.ts.map +1 -1
- package/dist/components/Menu/MenuSectionTitle.d.ts.map +1 -1
- package/dist/components/Menu/MenuSeparator.d.ts.map +1 -1
- package/dist/components/Menu/MenuSubmenuItem.d.ts +51 -0
- package/dist/components/Menu/MenuSubmenuItem.d.ts.map +1 -0
- package/dist/components/Menu/MenuTextItem.d.ts.map +1 -1
- package/dist/components/Menu/index.d.ts +1 -0
- package/dist/components/Menu/index.d.ts.map +1 -1
- package/dist/components/Menu/styles.d.ts +28 -0
- package/dist/components/Menu/styles.d.ts.map +1 -1
- package/dist/components/Pill/Pill.d.ts +1 -1
- package/dist/components/Radio/Radio.d.ts +4 -1
- package/dist/components/Radio/Radio.d.ts.map +1 -1
- package/dist/components/Radio/RadioGroup.d.ts.map +1 -1
- package/dist/components/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3034 -2940
- package/dist/index.js.map +1 -1
- package/dist/voodo.css +1 -1
- package/package.json +2 -1
|
@@ -8,6 +8,9 @@ type MenuAnchor = "bottom start" | "bottom end" | "top start" | "top end";
|
|
|
8
8
|
* Pick the menu anchor based on whether the menu would overflow the
|
|
9
9
|
* viewport when opened in the default `bottom start` direction.
|
|
10
10
|
*
|
|
11
|
+
* @deprecated {@link ContextMenu} no longer uses this: Base UI flips the
|
|
12
|
+
* menu away from viewport edges itself. Kept only so the export does not
|
|
13
|
+
* break; it will be removed in the next major version.
|
|
11
14
|
* @internal
|
|
12
15
|
*/
|
|
13
16
|
export declare const pickAnchor: (cursor: {
|
|
@@ -36,9 +39,11 @@ export interface ContextMenuProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
36
39
|
* click outside, item selection, or Escape.
|
|
37
40
|
*
|
|
38
41
|
* Composes with the Menu primitives ({@link MenuTextItem},
|
|
39
|
-
* {@link MenuIconTextItem}, {@link MenuCheckItem}, {@link
|
|
40
|
-
* {@link MenuSeparator}). Built on
|
|
41
|
-
*
|
|
42
|
+
* {@link MenuIconTextItem}, {@link MenuCheckItem}, {@link MenuSubmenuItem},
|
|
43
|
+
* {@link MenuSectionTitle}, {@link MenuSeparator}). Built on Base UI's
|
|
44
|
+
* `ContextMenu`, so keyboard navigation, long-press on touch, and ARIA
|
|
45
|
+
* `role="menu"` semantics work out of the box. An `onContextMenu` handler
|
|
46
|
+
* that calls `preventDefault()` keeps the menu closed.
|
|
42
47
|
*
|
|
43
48
|
* @example
|
|
44
49
|
* ```tsx
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContextMenu.d.ts","sourceRoot":"","sources":["../../../src/components/ContextMenu/ContextMenu.tsx"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"ContextMenu.d.ts","sourceRoot":"","sources":["../../../src/components/ContextMenu/ContextMenu.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,cAAc,EAAc,SAAS,EAAE,MAAM,OAAO,CAAC;AAKvE;;;GAGG;AACH,KAAK,UAAU,GAAG,cAAc,GAAG,YAAY,GAAG,WAAW,GAAG,SAAS,CAAC;AAU1E;;;;;;;;GAQG;AACH,eAAO,MAAM,UAAU,GACrB,QAAQ;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,EAChC,UAAU;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,EAC3C,OAAM;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAwB,KAC5D,UAIF,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,gBAAiB,SAAQ,cAAc,CAAC,cAAc,CAAC;IACtE,4EAA4E;IAC5E,QAAQ,EAAE,SAAS,CAAC;IACpB,wDAAwD;IACxD,IAAI,EAAE,SAAS,CAAC;IAChB,oEAAoE;IACpE,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,CAkC5C,CAAC"}
|
|
@@ -2,9 +2,9 @@ import { FC, HTMLAttributes, ReactNode } from 'react';
|
|
|
2
2
|
import { ZIndex } from '../../types';
|
|
3
3
|
/**
|
|
4
4
|
* Position of the dropdown menu panel relative to its trigger.
|
|
5
|
-
* Values follow the `<
|
|
6
|
-
*
|
|
7
|
-
*
|
|
5
|
+
* Values follow the `<side> <alignment>` convention — e.g. `BottomStart`
|
|
6
|
+
* opens the menu below the trigger, left-aligned with it. The menu flips to
|
|
7
|
+
* the other side when it would leave the viewport.
|
|
8
8
|
*/
|
|
9
9
|
export declare const DropdownAnchor: {
|
|
10
10
|
/** Below the trigger, horizontally centered. */
|
|
@@ -35,7 +35,7 @@ export declare namespace DropdownAnchor {
|
|
|
35
35
|
export interface DropdownProps extends HTMLAttributes<HTMLDivElement> {
|
|
36
36
|
/**
|
|
37
37
|
* The element that opens the dropdown when clicked.
|
|
38
|
-
* Rendered inside
|
|
38
|
+
* Rendered inside the menu's trigger wrapper — any focusable element works.
|
|
39
39
|
*/
|
|
40
40
|
trigger: ReactNode;
|
|
41
41
|
/** Menu content. Use the Menu* primitive components as children. */
|
|
@@ -62,10 +62,11 @@ export interface DropdownProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
62
62
|
/**
|
|
63
63
|
* A click-triggered menu component. Composes with the Menu primitives:
|
|
64
64
|
* {@link MenuTextItem}, {@link MenuIconTextItem}, {@link MenuCheckItem},
|
|
65
|
-
* {@link MenuSectionTitle}, and {@link MenuSeparator}.
|
|
65
|
+
* {@link MenuSubmenuItem}, {@link MenuSectionTitle}, and {@link MenuSeparator}.
|
|
66
66
|
*
|
|
67
|
-
* Built on
|
|
68
|
-
* (arrow keys, Enter, Escape)
|
|
67
|
+
* Built on Base UI's `Menu`, providing full keyboard navigation
|
|
68
|
+
* (arrow keys, Enter, Escape, type-ahead), nested menus through
|
|
69
|
+
* {@link MenuSubmenuItem}, and ARIA `role="menu"` semantics automatically.
|
|
69
70
|
*
|
|
70
71
|
* @example
|
|
71
72
|
* ```tsx
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dropdown.d.ts","sourceRoot":"","sources":["../../../src/components/Dropdown/Dropdown.tsx"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"Dropdown.d.ts","sourceRoot":"","sources":["../../../src/components/Dropdown/Dropdown.tsx"],"names":[],"mappings":"AACA,OAAO,EAGL,KAAK,EAAE,EACP,KAAK,cAAc,EACnB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAGf,OAAO,EAAE,MAAM,EAAgB,MAAM,SAAS,CAAC;AAG/C;;;;;GAKG;AACH,eAAO,MAAM,cAAc;IACzB,gDAAgD;;IAEhD,gEAAgE;;IAEhE,+DAA+D;;IAE/D,gDAAgD;;IAEhD,gEAAgE;;IAEhE,+DAA+D;;CAEvD,CAAC;AACX,MAAM,MAAM,cAAc,GACxB,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,OAAO,cAAc,CAAC,EAAE,CAAC;AAE5D,yBAAiB,cAAc,CAAC;IAC9B,KAAY,MAAM,GAAG,OAAO,cAAc,CAAC,MAAM,CAAC;IAClD,KAAY,WAAW,GAAG,OAAO,cAAc,CAAC,WAAW,CAAC;IAC5D,KAAY,SAAS,GAAG,OAAO,cAAc,CAAC,SAAS,CAAC;IACxD,KAAY,GAAG,GAAG,OAAO,cAAc,CAAC,GAAG,CAAC;IAC5C,KAAY,QAAQ,GAAG,OAAO,cAAc,CAAC,QAAQ,CAAC;IACtD,KAAY,MAAM,GAAG,OAAO,cAAc,CAAC,MAAM,CAAC;CACnD;AAmBD;;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,0HAA0H;IAC1H,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,eAAO,MAAM,QAAQ,EAAE,EAAE,CAAC,aAAa,CAsEtC,CAAC"}
|
|
@@ -12,6 +12,7 @@ export interface MenuCheckItemProps extends HTMLAttributes<HTMLButtonElement> {
|
|
|
12
12
|
* A selectable menu item with a leading checkmark indicator.
|
|
13
13
|
* The checkmark is shown when `checked` is `true`; otherwise the slot is empty
|
|
14
14
|
* but reserved so that text alignment stays consistent across items.
|
|
15
|
+
* Clicking it runs `onClick` and keeps the menu open.
|
|
15
16
|
*
|
|
16
17
|
* @example
|
|
17
18
|
* ```tsx
|
|
@@ -1 +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;
|
|
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;AAShD;;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;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,kBAAkB,CAgDhD,CAAC"}
|
|
@@ -1 +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;
|
|
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;AAI3D,OAAO,EAEL,QAAQ,EAIT,MAAM,SAAS,CAAC;AAOjB;;GAEG;AACH,MAAM,WAAW,qBAAsB,SAAQ,cAAc,CAAC,iBAAiB,CAAC;IAC9E;;;;OAIG;IACH,IAAI,EAAE,QAAQ,GAAG,OAAO,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;IAC5C,0BAA0B;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,mEAAmE;IACnE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,sFAAsF;IACtF,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,6IAA6I;IAC7I,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,qBAAqB,CAoEtD,CAAC"}
|
|
@@ -1 +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,
|
|
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,CAwBtD,CAAC"}
|
|
@@ -1 +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,
|
|
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,CAgBhD,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { FC, HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import { IconName } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* Props for {@link MenuSubmenuItem}.
|
|
5
|
+
*/
|
|
6
|
+
export interface MenuSubmenuItemProps extends HTMLAttributes<HTMLDivElement> {
|
|
7
|
+
/**
|
|
8
|
+
* Icon to display to the left of the text content. A legacy
|
|
9
|
+
* {@link IconName} string renders through the deprecated map-based
|
|
10
|
+
* {@link Icon}.
|
|
11
|
+
*/
|
|
12
|
+
icon: IconName | Exclude<ReactNode, string>;
|
|
13
|
+
/** Primary label text. */
|
|
14
|
+
text: string;
|
|
15
|
+
/** Optional secondary description shown below the primary text. */
|
|
16
|
+
subtext?: string;
|
|
17
|
+
/** If `true`, the submenu cannot be opened and the row is rendered in a muted style. */
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
/** Items of the nested menu. Use the Menu* primitive components. */
|
|
20
|
+
children: ReactNode;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* A menu row that opens a flyout of items beside it instead of running an
|
|
24
|
+
* action. Use it inside a {@link Dropdown} or {@link ContextMenu}.
|
|
25
|
+
*
|
|
26
|
+
* Built on Base UI's nested menu: it opens on hover, click, Enter or
|
|
27
|
+
* ArrowRight, closes on ArrowLeft or Escape, flips to the other side when it
|
|
28
|
+
* would leave the viewport, and selecting an item in the flyout closes the
|
|
29
|
+
* whole menu.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```tsx
|
|
33
|
+
* <Dropdown trigger={<DropdownTrigger>Layout</DropdownTrigger>}>
|
|
34
|
+
* <MenuIconTextItem icon={<ImageSearchIcon />} text="Image" />
|
|
35
|
+
* <MenuSubmenuItem icon={<PuzzleIcon />} text="Plugins">
|
|
36
|
+
* <MenuTextItem onClick={() => {}}>Histograms</MenuTextItem>
|
|
37
|
+
* <MenuTextItem onClick={() => {}}>Embeddings</MenuTextItem>
|
|
38
|
+
* </MenuSubmenuItem>
|
|
39
|
+
* </Dropdown>
|
|
40
|
+
* ```
|
|
41
|
+
*
|
|
42
|
+
* @param icon An icon element (e.g. `<PuzzleIcon />`) rendered in the leading slot; a legacy {@link IconName} is still accepted.
|
|
43
|
+
* @param text The primary label for the row.
|
|
44
|
+
* @param subtext An optional secondary line rendered below the primary text in muted color.
|
|
45
|
+
* @param disabled If `true`, the submenu cannot be opened.
|
|
46
|
+
* @param children The flyout's items — use the Menu* primitive components.
|
|
47
|
+
* @param className `class` overrides to apply to the row.
|
|
48
|
+
* @param props Additional HTML properties to apply to the row.
|
|
49
|
+
*/
|
|
50
|
+
export declare const MenuSubmenuItem: FC<MenuSubmenuItemProps>;
|
|
51
|
+
//# sourceMappingURL=MenuSubmenuItem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MenuSubmenuItem.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/MenuSubmenuItem.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAI3D,OAAO,EAIL,QAAQ,EAMT,MAAM,SAAS,CAAC;AAejB;;GAEG;AACH,MAAM,WAAW,oBAAqB,SAAQ,cAAc,CAAC,cAAc,CAAC;IAC1E;;;;OAIG;IACH,IAAI,EAAE,QAAQ,GAAG,OAAO,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;IAC5C,0BAA0B;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,mEAAmE;IACnE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,wFAAwF;IACxF,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,oEAAoE;IACpE,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CAyFpD,CAAC"}
|
|
@@ -1 +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;
|
|
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;AAQhD;;GAEG;AACH,MAAM,WAAW,iBAAkB,SAAQ,cAAc,CAAC,iBAAiB,CAAC;IAC1E,sFAAsF;IACtF,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,kIAAkI;IAClI,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,iBAAiB,CA+B9C,CAAC"}
|
|
@@ -2,6 +2,7 @@ export * from './MenuCheckItem';
|
|
|
2
2
|
export * from './MenuIconTextItem';
|
|
3
3
|
export * from './MenuSectionTitle';
|
|
4
4
|
export * from './MenuSeparator';
|
|
5
|
+
export * from './MenuSubmenuItem';
|
|
5
6
|
export * from './MenuTextItem';
|
|
6
7
|
export * from './styles';
|
|
7
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +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"}
|
|
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,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC"}
|
|
@@ -5,4 +5,32 @@
|
|
|
5
5
|
* and focus outline reset that define the menu's visual identity.
|
|
6
6
|
*/
|
|
7
7
|
export declare const menuPanelStyles: () => string;
|
|
8
|
+
/**
|
|
9
|
+
* Panel styles for action menus (Dropdown, ContextMenu, submenu flyouts):
|
|
10
|
+
* {@link menuPanelStyles} plus the width floor of the Figma ActionMenu, so a
|
|
11
|
+
* menu of short labels is not squeezed to a sliver. Lists sized to an input,
|
|
12
|
+
* such as Combobox, keep the plain panel styles.
|
|
13
|
+
*
|
|
14
|
+
* @internal
|
|
15
|
+
*/
|
|
16
|
+
export declare const actionMenuPanelStyles: () => string;
|
|
17
|
+
/**
|
|
18
|
+
* State the menu row styles depend on. Base UI reports `highlighted` for
|
|
19
|
+
* both pointer hover and keyboard focus, so one flag drives the fill.
|
|
20
|
+
*
|
|
21
|
+
* @internal
|
|
22
|
+
*/
|
|
23
|
+
export interface MenuRowState {
|
|
24
|
+
readonly highlighted: boolean;
|
|
25
|
+
readonly disabled: boolean;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Shared row styles for menu items (text, icon-text, check and submenu rows).
|
|
29
|
+
*
|
|
30
|
+
* Figma Action Menu Row: 6/10 padding, radius 8, bg/card-nested fill on
|
|
31
|
+
* hover and focus. Destructive rows fill danger-default with white content.
|
|
32
|
+
*
|
|
33
|
+
* @internal
|
|
34
|
+
*/
|
|
35
|
+
export declare const menuRowStyles: ({ highlighted, disabled }: MenuRowState, destructive?: boolean) => string;
|
|
8
36
|
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/styles.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/styles.ts"],"names":[],"mappings":"AAaA;;;;;GAKG;AACH,eAAO,MAAM,eAAe,QAAO,MAoBhC,CAAC;AAEJ;;;;;;;GAOG;AACH,eAAO,MAAM,qBAAqB,QAAO,MAED,CAAC;AAEzC;;;;;GAKG;AACH,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;IAC9B,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;CAC5B;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa,GACxB,2BAA2B,YAAY,EACvC,qBAAmB,KAClB,MAgBA,CAAC"}
|
|
@@ -31,7 +31,7 @@ export interface PillProps extends HTMLAttributes<HTMLSpanElement> {
|
|
|
31
31
|
* @param backgroundColor Background color of the pill. Defaults to `"bg-card-elevated"`. See {@link PillColor}.
|
|
32
32
|
* @param isStatus If `true`, prefixes the content with a bullet-like icon.
|
|
33
33
|
* @param onRemove Callback triggered when the remove control is clicked. Providing this makes the pill
|
|
34
|
-
* removable: a trailing
|
|
34
|
+
* removable: a trailing remove button, sized to the pill and in its text color, calls `onRemove`. Omit it
|
|
35
35
|
* for a non-removable pill.
|
|
36
36
|
* @param className `class` overrides to apply to the component.
|
|
37
37
|
* @param children Content of the pill.
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { FC, HTMLAttributes, InputHTMLAttributes } from 'react';
|
|
2
2
|
import { Size } from '../../types';
|
|
3
|
+
type DataAttributes = {
|
|
4
|
+
[key: `data-${string}`]: string | undefined;
|
|
5
|
+
};
|
|
3
6
|
type ModifiedRadioProps = Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "onChange" | "checked" | "disabled" | "className" | "type">;
|
|
4
7
|
export interface RadioProps extends ModifiedRadioProps {
|
|
5
8
|
value?: string;
|
|
@@ -13,7 +16,7 @@ export interface RadioProps extends ModifiedRadioProps {
|
|
|
13
16
|
className?: string;
|
|
14
17
|
labelClassName?: string;
|
|
15
18
|
/** Additional HTML properties for the row holding the radio and its label */
|
|
16
|
-
fieldProps?: HTMLAttributes<HTMLDivElement
|
|
19
|
+
fieldProps?: HTMLAttributes<HTMLDivElement> & DataAttributes;
|
|
17
20
|
}
|
|
18
21
|
/**
|
|
19
22
|
* A single radio option. Render radios through {@link RadioGroup} and its
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Radio.d.ts","sourceRoot":"","sources":["../../../src/components/Radio/Radio.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,EAAE,KAAK,cAAc,EAAE,mBAAmB,EAAE,MAAM,OAAO,CAAC;AAG1E,OAAO,EAAE,IAAI,EAA0C,MAAM,SAAS,CAAC;AAKvE,KAAK,kBAAkB,GAAG,IAAI,CAC5B,mBAAmB,CAAC,gBAAgB,CAAC,EACrC,MAAM,GAAG,UAAU,GAAG,SAAS,GAAG,UAAU,GAAG,WAAW,GAAG,MAAM,CACpE,CAAC;AAEF,MAAM,WAAW,UAAW,SAAQ,kBAAkB;IACpD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,6EAA6E;IAC7E,UAAU,CAAC,EAAE,cAAc,CAAC,cAAc,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"Radio.d.ts","sourceRoot":"","sources":["../../../src/components/Radio/Radio.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,EAAE,KAAK,cAAc,EAAE,mBAAmB,EAAE,MAAM,OAAO,CAAC;AAG1E,OAAO,EAAE,IAAI,EAA0C,MAAM,SAAS,CAAC;AAKvE,KAAK,cAAc,GAAG;IAAE,CAAC,GAAG,EAAE,QAAQ,MAAM,EAAE,GAAG,MAAM,GAAG,SAAS,CAAA;CAAE,CAAC;AAEtE,KAAK,kBAAkB,GAAG,IAAI,CAC5B,mBAAmB,CAAC,gBAAgB,CAAC,EACrC,MAAM,GAAG,UAAU,GAAG,SAAS,GAAG,UAAU,GAAG,WAAW,GAAG,MAAM,CACpE,CAAC;AAEF,MAAM,WAAW,UAAW,SAAQ,kBAAkB;IACpD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,6EAA6E;IAC7E,UAAU,CAAC,EAAE,cAAc,CAAC,cAAc,CAAC,GAAG,cAAc,CAAC;CAC9D;AASD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,KAAK,EAAE,EAAE,CAAC,UAAU,CAwFhC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioGroup.d.ts","sourceRoot":"","sources":["../../../src/components/Radio/RadioGroup.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAE,cAAc,EAAW,MAAM,OAAO,CAAC;AAEpD,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"RadioGroup.d.ts","sourceRoot":"","sources":["../../../src/components/Radio/RadioGroup.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAE,cAAc,EAAW,MAAM,OAAO,CAAC;AAEpD,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAI/B,OAAO,EAAS,UAAU,EAAE,MAAM,SAAS,CAAC;AAE5C,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,6DAA6D;IAC7D,UAAU,CAAC,EAAE,UAAU,CAAC,YAAY,CAAC,CAAC;CACvC;AAED,MAAM,MAAM,cAAc,GAAG,GAAG,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC;AAEzD,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAC3C,cAAc,CAAC,cAAc,CAAC,EAC9B,UAAU,CACX;IACC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,WAAW,EAAE,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,4FAA4F;IAC5F,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CA+C1C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../../src/components/Tooltip/Tooltip.tsx"],"names":[],"mappings":"AAUA,OAAO,EAEL,KAAK,EAAE,EACP,KAAK,cAAc,EACnB,KAAK,SAAS,EAKf,MAAM,OAAO,CAAC;AAMf,OAAO,EACL,MAAM,EAIN,MAAM,EAMP,MAAM,SAAS,CAAC;AAGjB,MAAM,MAAM,aAAa,GAAG,GAAG,OAAO,CACpC,MAAM,EACN,MAAM,CAAC,GAAG,GAAG,MAAM,CAAC,KAAK,GAAG,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC,IAAI,CACxD,EAAE,CAAC;AAEJ,MAAM,WAAW,YAAa,SAAQ,IAAI,CACxC,cAAc,CAAC,cAAc,CAAC,EAC9B,SAAS,CACV;IACC,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,OAAO,EAAE,SAAS,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAkBD;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,eAAO,MAAM,OAAO,EAAE,EAAE,CAAC,YAAY,
|
|
1
|
+
{"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../../src/components/Tooltip/Tooltip.tsx"],"names":[],"mappings":"AAUA,OAAO,EAEL,KAAK,EAAE,EACP,KAAK,cAAc,EACnB,KAAK,SAAS,EAKf,MAAM,OAAO,CAAC;AAMf,OAAO,EACL,MAAM,EAIN,MAAM,EAMP,MAAM,SAAS,CAAC;AAGjB,MAAM,MAAM,aAAa,GAAG,GAAG,OAAO,CACpC,MAAM,EACN,MAAM,CAAC,GAAG,GAAG,MAAM,CAAC,KAAK,GAAG,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC,IAAI,CACxD,EAAE,CAAC;AAEJ,MAAM,WAAW,YAAa,SAAQ,IAAI,CACxC,cAAc,CAAC,cAAc,CAAC,EAC9B,SAAS,CACV;IACC,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,OAAO,EAAE,SAAS,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAkBD;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,eAAO,MAAM,OAAO,EAAE,EAAE,CAAC,YAAY,CA+GpC,CAAC"}
|