@voxel51/voodo 1.3.0 → 1.4.0-dev.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/CodeBlock/CodeBlock.d.ts +32 -0
- package/dist/components/CodeBlock/CodeBlock.d.ts.map +1 -0
- package/dist/components/CodeBlock/index.d.ts +2 -0
- package/dist/components/CodeBlock/index.d.ts.map +1 -0
- package/dist/components/LoadingScreen/LoadingScreen.d.ts +28 -0
- package/dist/components/LoadingScreen/LoadingScreen.d.ts.map +1 -0
- package/dist/components/LoadingScreen/index.d.ts +2 -0
- package/dist/components/LoadingScreen/index.d.ts.map +1 -0
- package/dist/components/Progress/Progress.d.ts +7 -4
- package/dist/components/Progress/Progress.d.ts.map +1 -1
- package/dist/components/Toast/Toast.d.ts +4 -0
- package/dist/components/Toast/Toast.d.ts.map +1 -1
- package/dist/components/ToastContainer/ToastContainer.d.ts +8 -0
- package/dist/components/ToastContainer/ToastContainer.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 +2 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2732 -2593
- package/dist/index.js.map +1 -1
- package/dist/voodo.css +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { FC, HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
export interface CodeBlockProps extends Omit<HTMLAttributes<HTMLDivElement>, "children"> {
|
|
3
|
+
children?: ReactNode;
|
|
4
|
+
code: string;
|
|
5
|
+
copyable?: boolean;
|
|
6
|
+
lineNumbers?: boolean;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* A block of code, with copying it one click away.
|
|
10
|
+
*
|
|
11
|
+
* The block renders `code` as written. A caller that highlights its own code
|
|
12
|
+
* passes the marked-up result as `children`; `code` is still what the copy
|
|
13
|
+
* control puts on the clipboard, so a highlighter's markup never reaches it.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```tsx
|
|
17
|
+
* <CodeBlock code={'print("hello")'} />
|
|
18
|
+
*
|
|
19
|
+
* <CodeBlock code={source}>
|
|
20
|
+
* <Highlighted source={source} language="python" />
|
|
21
|
+
* </CodeBlock>
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* @param children Optional marked-up rendering of `code`, such as a highlighter's output.
|
|
25
|
+
* @param className `class` overrides to apply to the component.
|
|
26
|
+
* @param code The code to display, and what the copy control copies.
|
|
27
|
+
* @param copyable Whether the block offers a copy control.
|
|
28
|
+
* @param lineNumbers Whether the block is numbered down its left edge.
|
|
29
|
+
* @param props Additional HTML properties to apply to the component.
|
|
30
|
+
*/
|
|
31
|
+
export declare const CodeBlock: FC<CodeBlockProps>;
|
|
32
|
+
//# sourceMappingURL=CodeBlock.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CodeBlock.d.ts","sourceRoot":"","sources":["../../../src/components/CodeBlock/CodeBlock.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAqB3D,MAAM,WAAW,cAAe,SAAQ,IAAI,CAC1C,cAAc,CAAC,cAAc,CAAC,EAC9B,UAAU,CACX;IACC,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,SAAS,EAAE,EAAE,CAAC,cAAc,CA0ExC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/CodeBlock/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { FC, HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import { TextColor, TextVariant } from '../../types';
|
|
3
|
+
export interface LoadingScreenProps extends HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
color?: TextColor;
|
|
5
|
+
text: ReactNode;
|
|
6
|
+
variant?: TextVariant;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* A region that is still filling: the whole area, with what it is waiting on
|
|
10
|
+
* centered in it.
|
|
11
|
+
*
|
|
12
|
+
* Where {@link LoadingDots} marks a piece of text as resolving, this stands in
|
|
13
|
+
* for content that has not arrived. Two of these at two sizes read as two
|
|
14
|
+
* different screens, so a product gives every wait the same one.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```tsx
|
|
18
|
+
* <LoadingScreen text="Loading" />
|
|
19
|
+
* ```
|
|
20
|
+
*
|
|
21
|
+
* @param className `class` overrides to apply to the component.
|
|
22
|
+
* @param color Text color. See {@link TextColor}.
|
|
23
|
+
* @param text What the region is waiting on.
|
|
24
|
+
* @param variant Text size. See {@link TextVariant}.
|
|
25
|
+
* @param props Additional HTML properties to apply to the component.
|
|
26
|
+
*/
|
|
27
|
+
export declare const LoadingScreen: FC<LoadingScreenProps>;
|
|
28
|
+
//# sourceMappingURL=LoadingScreen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LoadingScreen.d.ts","sourceRoot":"","sources":["../../../src/components/LoadingScreen/LoadingScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAI3D,OAAO,EAAkB,SAAS,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAGjE,MAAM,WAAW,kBAAmB,SAAQ,cAAc,CAAC,cAAc,CAAC;IACxE,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,IAAI,EAAE,SAAS,CAAC;IAChB,OAAO,CAAC,EAAE,WAAW,CAAC;CACvB;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,kBAAkB,CAehD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/LoadingScreen/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC"}
|
|
@@ -2,8 +2,8 @@ import { FC, HTMLAttributes } from 'react';
|
|
|
2
2
|
import { BackgroundColor, Color, Size } from '../../types';
|
|
3
3
|
export type ProgressSize = `${Exclude<Size, Size.Xs | Size.Xl>}`;
|
|
4
4
|
export interface ProgressProps extends HTMLAttributes<HTMLDivElement> {
|
|
5
|
-
/** Current value, clamped to `[0, max]`. */
|
|
6
|
-
value
|
|
5
|
+
/** Current value, clamped to `[0, max]`. Omit it for work with no known end. */
|
|
6
|
+
value?: number;
|
|
7
7
|
/** Maximum value the bar represents. */
|
|
8
8
|
max?: number;
|
|
9
9
|
/** Track thickness. See {@link Size}. */
|
|
@@ -15,14 +15,17 @@ export interface ProgressProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
15
15
|
}
|
|
16
16
|
/**
|
|
17
17
|
* A read-only progress / meter bar: a filled track showing `value` as a
|
|
18
|
-
* fraction of `max`.
|
|
18
|
+
* fraction of `max`. Without a `value` it sweeps instead, for work that has
|
|
19
|
+
* no known end. For an interactive range input, see {@link Slider}.
|
|
19
20
|
*
|
|
20
21
|
* @example
|
|
21
22
|
* ```tsx
|
|
22
23
|
* <Progress value={68} aria-label="Voxel tokens used" />
|
|
24
|
+
* <Progress aria-label="Loading" />
|
|
23
25
|
* ```
|
|
24
26
|
*
|
|
25
|
-
* @param value Current value, clamped to `[0, max]`.
|
|
27
|
+
* @param value Current value, clamped to `[0, max]`. Omit it for work with no
|
|
28
|
+
* known end, which sweeps rather than filling.
|
|
26
29
|
* @param max Maximum value the bar represents. Defaults to `100`.
|
|
27
30
|
* @param size Track thickness. See {@link Size}. Defaults to {@link Size.Md}.
|
|
28
31
|
* @param color Fill color. See {@link Color}. Defaults to {@link BrandColor.Primary}.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Progress.d.ts","sourceRoot":"","sources":["../../../src/components/Progress/Progress.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"Progress.d.ts","sourceRoot":"","sources":["../../../src/components/Progress/Progress.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAiB,EAAE,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAG/D,OAAO,EACL,eAAe,EAGf,KAAK,KAAK,EAGV,IAAI,EACL,MAAM,SAAS,CAAC;AAIjB,MAAM,MAAM,YAAY,GAAG,GAAG,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC;AAEjE,MAAM,WAAW,aAAc,SAAQ,cAAc,CAAC,cAAc,CAAC;IACnE,gFAAgF;IAChF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wCAAwC;IACxC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,yCAAyC;IACzC,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,qCAAqC;IACrC,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,2EAA2E;IAC3E,UAAU,CAAC,EAAE,eAAe,CAAC;CAC9B;AAQD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,QAAQ,EAAE,EAAE,CAAC,aAAa,CAkDtC,CAAC"}
|
|
@@ -6,6 +6,7 @@ export interface ToastProps extends Omit<HTMLAttributes<HTMLDivElement>, "title"
|
|
|
6
6
|
action?: ReactNode;
|
|
7
7
|
anchor?: Anchor;
|
|
8
8
|
description?: ReactNode;
|
|
9
|
+
duration?: number;
|
|
9
10
|
icon?: IconInput;
|
|
10
11
|
onClose?: () => void;
|
|
11
12
|
open?: boolean;
|
|
@@ -44,6 +45,9 @@ export interface ToastProps extends Omit<HTMLAttributes<HTMLDivElement>, "title"
|
|
|
44
45
|
* @param anchor The location in the viewport to anchor the toast. See {@link Anchor}.
|
|
45
46
|
* @param className `class` overrides to apply to the component.
|
|
46
47
|
* @param description Optional content to display in the "description" slot; this should be considered secondary content.
|
|
48
|
+
* @param duration How long, in milliseconds, the toast shows itself before calling `onClose`. Omit it and the
|
|
49
|
+
* toast stays until something closes it. Hovering or focusing the toast holds it open, and the wait starts
|
|
50
|
+
* over when the pointer or focus leaves.
|
|
47
51
|
* @param icon An optional icon component to display in the "icon" slot.
|
|
48
52
|
* @param onClose Optional handler invoked when the close/dismiss control is activated. If provided, a close
|
|
49
53
|
* control is rendered in the toast.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toast.d.ts","sourceRoot":"","sources":["../../../src/components/Toast/Toast.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"Toast.d.ts","sourceRoot":"","sources":["../../../src/components/Toast/Toast.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,EAAE,EAEF,cAAc,EAEd,SAAS,EACV,MAAM,OAAO,CAAC;AAIf,OAAO,EAAa,KAAK,SAAS,EAAe,MAAM,oBAAoB,CAAC;AAM5E,OAAO,EAEL,MAAM,EAYN,OAAO,EACR,MAAM,SAAS,CAAC;AAGjB,KAAK,YAAY,GAAG,GAAG,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC;AAE9D,MAAM,WAAW,UAAW,SAAQ,IAAI,CACtC,cAAc,CAAC,cAAc,CAAC,EAC9B,OAAO,CACR;IACC,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,OAAO,CAAC,EAAE,YAAY,CAAC;CACxB;AAUD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,eAAO,MAAM,KAAK,EAAE,EAAE,CAAC,UAAU,CAkHhC,CAAC"}
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { FC, HTMLAttributes } from 'react';
|
|
2
2
|
import { Anchor } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* Whether a container is already placing its children. A toast inside one
|
|
5
|
+
* takes its place in the stack rather than anchoring itself to the viewport.
|
|
6
|
+
*/
|
|
7
|
+
export declare const ToastStack: import('react').Context<boolean>;
|
|
3
8
|
export interface ToastContainerProps extends HTMLAttributes<HTMLDivElement> {
|
|
4
9
|
anchor?: Anchor;
|
|
5
10
|
open?: boolean;
|
|
@@ -7,6 +12,9 @@ export interface ToastContainerProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
7
12
|
/**
|
|
8
13
|
* A layout component which acts as a container for toast-like components.
|
|
9
14
|
*
|
|
15
|
+
* Several children stack at the anchor, oldest first, with the newest against
|
|
16
|
+
* the anchored edge.
|
|
17
|
+
*
|
|
10
18
|
* @param anchor The location in the viewport to anchor the toast. See {@link Anchor}.
|
|
11
19
|
* @param children Content wrapped by this component.
|
|
12
20
|
* @param open If `true`, this component and its children will be rendered; otherwise it will be hidden.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToastContainer.d.ts","sourceRoot":"","sources":["../../../src/components/ToastContainer/ToastContainer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ToastContainer.d.ts","sourceRoot":"","sources":["../../../src/components/ToastContainer/ToastContainer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAGhD,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAEjC;;;GAGG;AACH,eAAO,MAAM,UAAU,kCAAgC,CAAC;AAExD,MAAM,WAAW,mBAAoB,SAAQ,cAAc,CAAC,cAAc,CAAC;IACzE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AA0BD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CAsBlD,CAAC"}
|
|
@@ -3,6 +3,7 @@ export * from './Button';
|
|
|
3
3
|
export * from './Card';
|
|
4
4
|
export * from './Checkbox';
|
|
5
5
|
export * from './Clickable';
|
|
6
|
+
export * from './CodeBlock';
|
|
6
7
|
export * from './Collapsible';
|
|
7
8
|
export * from './Combobox';
|
|
8
9
|
export * from './ContextMenu';
|
|
@@ -19,6 +20,7 @@ export * from './ImageList';
|
|
|
19
20
|
export * from './Input';
|
|
20
21
|
export * from './ListItem';
|
|
21
22
|
export * from './LoadingDots';
|
|
23
|
+
export * from './LoadingScreen';
|
|
22
24
|
export * from './Menu';
|
|
23
25
|
export * from './Modal';
|
|
24
26
|
export * from './Pill';
|
|
@@ -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,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAA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