@voxel51/voodo 0.0.31 → 0.0.33
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/Drawer/Drawer.d.ts +3 -47
- package/dist/components/Drawer/Drawer.d.ts.map +1 -1
- package/dist/components/ToggleSwitch/ToggleSwitch.d.ts +3 -0
- package/dist/components/ToggleSwitch/ToggleSwitch.d.ts.map +1 -1
- package/dist/components/Tooltip/Tooltip.d.ts +4 -3
- package/dist/components/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/components/TreeSelect/TreeSelectTrigger.d.ts.map +1 -1
- package/dist/index.cjs +5 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +6494 -6704
- package/dist/index.js.map +1 -1
- package/dist/util/useResizableDrawer.d.ts +23 -45
- package/dist/util/useResizableDrawer.d.ts.map +1 -1
- package/dist/voodo.css +1 -1
- package/package.json +1 -1
|
@@ -1,68 +1,24 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { UseDisclosureOptions } from '../../util/useDisclosure';
|
|
3
|
-
/**
|
|
4
|
-
* Edge of the viewport the drawer is anchored to. Determines both the
|
|
5
|
-
* drag axis (`left`/`right` resize horizontally; `top`/`bottom` resize
|
|
6
|
-
* vertically) and the direction the drawer expands when opened.
|
|
7
|
-
*/
|
|
8
3
|
export type DrawerSide = "left" | "right" | "top" | "bottom";
|
|
9
|
-
/**
|
|
10
|
-
* State passed to the {@link DrawerProps.header} render prop so callers
|
|
11
|
-
* can react to and control the drawer's open/closed state from within
|
|
12
|
-
* their header content (e.g. a toggle button).
|
|
13
|
-
*/
|
|
14
4
|
export interface DrawerHeaderState {
|
|
15
|
-
/** Whether the drawer is currently expanded. */
|
|
16
5
|
open: boolean;
|
|
17
|
-
/** Flip the drawer between open and closed. */
|
|
18
6
|
toggle: () => void;
|
|
19
7
|
}
|
|
20
|
-
/**
|
|
21
|
-
* Props for the {@link Drawer} component. Extends `UseDisclosureOptions`
|
|
22
|
-
* so callers can drive the open state in either controlled
|
|
23
|
-
* (`open` + `onOpenChange`) or uncontrolled (`defaultOpen`) mode.
|
|
24
|
-
*/
|
|
25
8
|
export interface DrawerProps extends UseDisclosureOptions {
|
|
26
|
-
/** Edge the drawer is anchored to. Defaults to `"bottom"`. */
|
|
27
9
|
side?: DrawerSide;
|
|
28
|
-
/** Size (in px) the drawer opens to when first rendered or re-opened. */
|
|
29
|
-
defaultSize: number;
|
|
30
|
-
/** Minimum size (in px) the user can drag the drawer down to while open. */
|
|
31
|
-
minSize: number;
|
|
32
|
-
/** Maximum size (in px) the user can drag the drawer up to. */
|
|
33
|
-
maxSize: number;
|
|
34
10
|
/**
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
* - `"float"`: the drawer overlays content without affecting layout.
|
|
11
|
+
* Maximum content-area size in pixels. The header and resize handle are
|
|
12
|
+
* excluded — `maxSize` caps only the scrollable body region.
|
|
38
13
|
*/
|
|
14
|
+
maxSize: number;
|
|
39
15
|
mode?: "push" | "float";
|
|
40
|
-
/**
|
|
41
|
-
* Render prop for the always-visible header area. Receives open state and
|
|
42
|
-
* toggle. Everything the caller renders here stays visible when collapsed —
|
|
43
|
-
* toggle button, ruler, pinned rows, etc. Its height is measured and used
|
|
44
|
-
* as the drawer's closed size automatically.
|
|
45
|
-
*/
|
|
46
16
|
header?: (state: DrawerHeaderState) => React.ReactNode;
|
|
47
|
-
/** Called whenever the user finishes resizing the drawer. */
|
|
48
17
|
onSizeChange?: (size: number) => void;
|
|
49
|
-
/** Ref forwarded to the scrollable body element wrapping `children`. */
|
|
50
|
-
bodyRef?: React.RefObject<HTMLDivElement | null>;
|
|
51
|
-
/** Drawer body content, rendered inside the scrollable area. */
|
|
52
18
|
children?: React.ReactNode;
|
|
53
|
-
/** Additional class name applied to the drawer root. */
|
|
54
19
|
className?: string;
|
|
55
|
-
/** Inline styles merged into the drawer root (after the sizing style). */
|
|
56
20
|
style?: React.CSSProperties;
|
|
57
21
|
}
|
|
58
|
-
/**
|
|
59
|
-
* Resizable, collapsible drawer anchored to one edge of its container.
|
|
60
|
-
*
|
|
61
|
-
* The drawer is draggable along its perpendicular axis between `minSize`
|
|
62
|
-
* and `maxSize`, and collapses to the measured height of its `header`
|
|
63
|
-
* render prop (plus the drag handle) when closed. Open state can be
|
|
64
|
-
* controlled or uncontrolled via the inherited disclosure props.
|
|
65
|
-
*/
|
|
66
22
|
declare const Drawer: React.FC<DrawerProps>;
|
|
67
23
|
export default Drawer;
|
|
68
24
|
//# sourceMappingURL=Drawer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Drawer.d.ts","sourceRoot":"","sources":["../../../src/components/Drawer/Drawer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"Drawer.d.ts","sourceRoot":"","sources":["../../../src/components/Drawer/Drawer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAKjE,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,QAAQ,CAAC;AAE7D,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB;AAYD,MAAM,WAAW,WAAY,SAAQ,oBAAoB;IACvD,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IACxB,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,KAAK,CAAC,SAAS,CAAC;IACvD,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B;AAED,QAAA,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAmEjC,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -3,6 +3,8 @@ import { Descriptor, Size } from '../../types';
|
|
|
3
3
|
export interface ToggleSwitchTab {
|
|
4
4
|
label: ReactNode;
|
|
5
5
|
content: ReactNode;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
tooltip?: ReactNode;
|
|
6
8
|
}
|
|
7
9
|
export declare enum ToggleSwitchVariant {
|
|
8
10
|
Default = "default",
|
|
@@ -48,6 +50,7 @@ export interface ToggleSwitchProps extends Omit<HTMLAttributes<HTMLDivElement>,
|
|
|
48
50
|
* ```
|
|
49
51
|
*
|
|
50
52
|
* @param tabs List of component descriptors which will be used to create {@link ToggleSwitchTab} children.
|
|
53
|
+
* Each tab supports optional `disabled` and `tooltip` fields. See {@link ToggleSwitchTab}.
|
|
51
54
|
* @param variant Variant of the tabs.
|
|
52
55
|
* The variants have the following behaviors:
|
|
53
56
|
* - {@link ToggleSwitchVariant.Default} - tabs are bordered and have visible boundaries;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToggleSwitch.d.ts","sourceRoot":"","sources":["../../../src/components/ToggleSwitch/ToggleSwitch.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAE,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ToggleSwitch.d.ts","sourceRoot":"","sources":["../../../src/components/ToggleSwitch/ToggleSwitch.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAE,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAI3D,OAAO,EAML,UAAU,EAEV,IAAI,EAIL,MAAM,SAAS,CAAC;AAGjB,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,SAAS,CAAC;IACjB,OAAO,EAAE,SAAS,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,SAAS,CAAC;CACrB;AAED,oBAAY,mBAAmB;IAC7B,OAAO,YAAY;IACnB,IAAI,SAAS;IACb,IAAI,SAAS;IACb,UAAU,eAAe;CAC1B;AAED,MAAM,MAAM,gBAAgB,GAAG,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC;AAEhE,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAC7C,cAAc,CAAC,cAAc,CAAC,EAC9B,UAAU,GAAG,UAAU,CACxB;IACC,OAAO,CAAC,EAAE,mBAAmB,CAAC;IAC9B,IAAI,EAAE,UAAU,CAAC,eAAe,CAAC,EAAE,CAAC;IACpC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAsFD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,iBAAiB,CA6E9C,CAAC"}
|
|
@@ -5,8 +5,8 @@ export interface TooltipProps extends Omit<HTMLAttributes<HTMLDivElement>, "cont
|
|
|
5
5
|
anchor?: TooltipAnchor;
|
|
6
6
|
content: ReactNode;
|
|
7
7
|
portal?: boolean;
|
|
8
|
-
/** Drop shadow. Use Shadow.Xs through Shadow.Xl. */
|
|
9
8
|
shadow?: Shadow;
|
|
9
|
+
wrapperClassName?: string;
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
12
|
* A tooltip which appears when hovering over the wrapped content.
|
|
@@ -21,9 +21,10 @@ export interface TooltipProps extends Omit<HTMLAttributes<HTMLDivElement>, "cont
|
|
|
21
21
|
* @param anchor Position to anchor the tooltip relative to its content. See {@link Anchor}.
|
|
22
22
|
* @param content The content of the tooltip.
|
|
23
23
|
* @param children The content which this component wraps; this acts as the element anchor and the hover trigger.
|
|
24
|
-
* @param className `class` overrides to apply to the
|
|
25
|
-
* @param portal If `true`,
|
|
24
|
+
* @param className `class` overrides to apply to the tooltip panel.
|
|
25
|
+
* @param portal If `true`, renders the tooltip via a React portal so it escapes overflow-hidden ancestors.
|
|
26
26
|
* @param shadow The shadow to apply to the tooltip. See {@link Shadow}.
|
|
27
|
+
* @param wrapperClassName Additional classes to apply to the outer wrapper element.
|
|
27
28
|
* @param props Additional HTML properties to apply to the component.
|
|
28
29
|
*/
|
|
29
30
|
export declare const Tooltip: FC<TooltipProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../../src/components/Tooltip/Tooltip.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../../src/components/Tooltip/Tooltip.tsx"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,EAAE,EACP,KAAK,cAAc,EACnB,KAAK,SAAS,EAKf,MAAM,OAAO,CAAC;AAKf,OAAO,EACL,MAAM,EAMN,MAAM,EAKP,MAAM,SAAS,CAAC;AAGjB,MAAM,MAAM,aAAa,GAAG,OAAO,CACjC,MAAM,EACN,MAAM,CAAC,GAAG,GAAG,MAAM,CAAC,KAAK,GAAG,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC,IAAI,CACxD,CAAC;AAEF,MAAM,WAAW,YAAa,SAAQ,IAAI,CACxC,cAAc,CAAC,cAAc,CAAC,EAC9B,SAAS,CACV;IACC,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,OAAO,EAAE,SAAS,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AA4ED;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,OAAO,EAAE,EAAE,CAAC,YAAY,CAiFpC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TreeSelectTrigger.d.ts","sourceRoot":"","sources":["../../../src/components/TreeSelect/TreeSelectTrigger.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"TreeSelectTrigger.d.ts","sourceRoot":"","sources":["../../../src/components/TreeSelect/TreeSelectTrigger.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,EAAE,EAAY,MAAM,OAAO,CAAC;AAkBjD,MAAM,WAAW,sBAAsB;IACrC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC;IACrC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,OAAO,CAAC;IAClB,eAAe,EAAE,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,KAAK,MAAM,CAAC;IACjD,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,WAAW,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACrC;AA6DD;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC,sBAAsB,CAsGxD,CAAC"}
|