@voxel51/voodo 0.2.0-feat.0 → 0.2.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/Button/Button.d.ts.map +1 -1
- package/dist/components/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/components/Divider/Divider.d.ts +31 -3
- package/dist/components/Divider/Divider.d.ts.map +1 -1
- package/dist/components/FormField/FormField.d.ts +3 -1
- package/dist/components/FormField/FormField.d.ts.map +1 -1
- package/dist/components/FormFieldGroup/FormFieldGroup.d.ts +2 -0
- package/dist/components/FormFieldGroup/FormFieldGroup.d.ts.map +1 -1
- package/dist/components/Icons/Icon.d.ts.map +1 -1
- package/dist/components/Input/Input.d.ts +30 -6
- package/dist/components/Input/Input.d.ts.map +1 -1
- package/dist/components/Input/styles.d.ts +11 -0
- package/dist/components/Input/styles.d.ts.map +1 -1
- package/dist/components/ListItem/ListItem.d.ts.map +1 -1
- package/dist/components/Pill/Pill.d.ts +3 -0
- package/dist/components/Pill/Pill.d.ts.map +1 -1
- package/dist/components/Radio/Radio.d.ts.map +1 -1
- package/dist/components/RichList/RichList.d.ts +18 -9
- package/dist/components/RichList/RichList.d.ts.map +1 -1
- package/dist/components/Select/Option.d.ts.map +1 -1
- package/dist/components/TextArea/TextArea.d.ts +1 -3
- package/dist/components/TextArea/TextArea.d.ts.map +1 -1
- package/dist/components/Toast/Toast.d.ts +7 -3
- package/dist/components/Toast/Toast.d.ts.map +1 -1
- package/dist/components/Toggle/Toggle.d.ts.map +1 -1
- package/dist/components/ToggleSwitch/ToggleSwitch.d.ts.map +1 -1
- package/dist/components/index.d.ts +0 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2770 -2977
- package/dist/index.js.map +1 -1
- package/dist/styles/color-classes.d.ts +1 -1
- package/dist/styles/color-classes.d.ts.map +1 -1
- package/dist/theme/cssVar.d.ts +1 -0
- package/dist/theme/cssVar.d.ts.map +1 -1
- package/dist/theme/tokens/colors.d.ts +2 -0
- package/dist/theme/tokens/colors.d.ts.map +1 -1
- package/dist/theme/tokens/index.d.ts +2 -0
- package/dist/theme/tokens/index.d.ts.map +1 -1
- package/dist/types/color.d.ts +2 -1
- package/dist/types/color.d.ts.map +1 -1
- package/dist/types/icons.d.ts +1 -5
- package/dist/types/icons.d.ts.map +1 -1
- package/dist/voodo.css +1 -1
- package/package.json +3 -2
- package/dist/components/Scrubber/Scrubber.d.ts +0 -83
- package/dist/components/Scrubber/Scrubber.d.ts.map +0 -1
- package/dist/components/Scrubber/ScrubberThumb.d.ts +0 -33
- package/dist/components/Scrubber/ScrubberThumb.d.ts.map +0 -1
- package/dist/components/Scrubber/ScrubberTick.d.ts +0 -26
- package/dist/components/Scrubber/ScrubberTick.d.ts.map +0 -1
- package/dist/components/Scrubber/index.d.ts +0 -3
- package/dist/components/Scrubber/index.d.ts.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voxel51/voodo",
|
|
3
|
-
"version": "0.2.0
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Voxel51's official design ontology (VOODO) system",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "Voxel Engineering <engineering@voxel51.com>",
|
|
@@ -113,5 +113,6 @@
|
|
|
113
113
|
"react": "^18.0.0",
|
|
114
114
|
"react-dom": "^18.0.0",
|
|
115
115
|
"react-is": "^18.0.0"
|
|
116
|
-
}
|
|
116
|
+
},
|
|
117
|
+
"packageManager": "yarn@4.17.1+sha512.ccbfabf7d7b6b32075088be9386fb9a2e00bb6887ef07fa56effabc890a56d53da1ccc4128d62db245fcbd3961b236d75335bdf7d5320ed6eafb7588b7ad4697"
|
|
117
118
|
}
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import { ReactElement, ReactNode } from 'react';
|
|
2
|
-
import { Orientation } from '../../types';
|
|
3
|
-
export type ScrubberLabelMode = "always" | "scrubbing" | "hover";
|
|
4
|
-
export interface ScrubberProps<T> {
|
|
5
|
-
/** Minimum value of the scrubbing range. */
|
|
6
|
-
min: T;
|
|
7
|
-
/** Maximum value of the scrubbing range. */
|
|
8
|
-
max: T;
|
|
9
|
-
/** Current value. Clamped to `[min, max]` for display. */
|
|
10
|
-
value: T;
|
|
11
|
-
/** Fired when the user commits a new value (pointer release, keyup). */
|
|
12
|
-
onChange: (value: T) => void;
|
|
13
|
-
/**
|
|
14
|
-
* Fired live while dragging or holding a key. Use this for scroll-following
|
|
15
|
-
* UIs; otherwise rely on `onChange`.
|
|
16
|
-
*/
|
|
17
|
-
onScrub?: (value: T) => void;
|
|
18
|
-
/**
|
|
19
|
-
* Maps a value of type `T` into a numeric position space used for layout
|
|
20
|
-
* and drag math. Required for non-numeric `T` (e.g. `Date`); for numeric
|
|
21
|
-
* `T` the default is the identity function.
|
|
22
|
-
*/
|
|
23
|
-
toPosition?: (value: T) => number;
|
|
24
|
-
/** Inverse of {@link toPosition}. Required for non-numeric `T`. */
|
|
25
|
-
fromPosition?: (position: number) => T;
|
|
26
|
-
/**
|
|
27
|
-
* Layout axis. `Orientation.Row` lays the scrubber out horizontally;
|
|
28
|
-
* `Orientation.Column` lays it out vertically. Defaults to `Row`.
|
|
29
|
-
*/
|
|
30
|
-
orientation?: Orientation;
|
|
31
|
-
/**
|
|
32
|
-
* Explicit tick values, each rendered as a perpendicular mark on the
|
|
33
|
-
* track. Values outside `[min, max]` are ignored.
|
|
34
|
-
*/
|
|
35
|
-
ticks?: readonly T[];
|
|
36
|
-
/** Optional label rendered alongside each tick. */
|
|
37
|
-
renderTickLabel?: (value: T, index: number) => ReactNode;
|
|
38
|
-
/** Floating thumb label. Defaults to `String(value)`. */
|
|
39
|
-
renderLabel?: (value: T) => ReactNode;
|
|
40
|
-
/** When to show the floating thumb label. Defaults to `"scrubbing"`. */
|
|
41
|
-
labelMode?: ScrubberLabelMode;
|
|
42
|
-
/**
|
|
43
|
-
* Keyboard step in *position space* — the amount added/subtracted per
|
|
44
|
-
* arrow key. Defaults to `(toPosition(max) - toPosition(min)) / 100`.
|
|
45
|
-
*/
|
|
46
|
-
step?: number;
|
|
47
|
-
/**
|
|
48
|
-
* When `true`, hovering reveals an inline input next to the thumb. The
|
|
49
|
-
* user can type a new value directly; on Enter or blur the parsed value
|
|
50
|
-
* is committed via `onChange`. Defaults to `false`.
|
|
51
|
-
*/
|
|
52
|
-
editable?: boolean;
|
|
53
|
-
/**
|
|
54
|
-
* Parses the user's typed text back into a value. Returning `null` (or
|
|
55
|
-
* throwing) aborts the commit and the input snaps back to the prior
|
|
56
|
-
* formatted value. Defaults to `parseFloat` for numeric `T`; required
|
|
57
|
-
* for non-numeric `T` when `editable` is `true`.
|
|
58
|
-
*/
|
|
59
|
-
parseInput?: (text: string) => T | null;
|
|
60
|
-
/**
|
|
61
|
-
* Formats the current value into the text shown in the editable input.
|
|
62
|
-
* Defaults to `String(value)`.
|
|
63
|
-
*/
|
|
64
|
-
formatInput?: (value: T) => string;
|
|
65
|
-
/**
|
|
66
|
-
* Fired when the user begins a scrub (pointer-down on the track).
|
|
67
|
-
* Pairs with {@link onScrubEnd} so consumers can show transient UI
|
|
68
|
-
* (e.g. falling pixels in the grid) for the duration of the drag.
|
|
69
|
-
*/
|
|
70
|
-
onScrubStart?: () => void;
|
|
71
|
-
/**
|
|
72
|
-
* Fired when the user finishes a scrub (pointer-up). Always fires
|
|
73
|
-
* exactly once per {@link onScrubStart}.
|
|
74
|
-
*/
|
|
75
|
-
onScrubEnd?: () => void;
|
|
76
|
-
className?: string;
|
|
77
|
-
"aria-label"?: string;
|
|
78
|
-
}
|
|
79
|
-
export declare function Scrubber<T>({ min, max, value, onChange, onScrub, toPosition, fromPosition, orientation, ticks, renderTickLabel, renderLabel, labelMode, step, editable, parseInput, formatInput, onScrubStart, onScrubEnd, className, "aria-label": ariaLabel, }: ScrubberProps<T>): ReactElement;
|
|
80
|
-
export declare namespace Scrubber {
|
|
81
|
-
var displayName: string;
|
|
82
|
-
}
|
|
83
|
-
//# sourceMappingURL=Scrubber.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Scrubber.d.ts","sourceRoot":"","sources":["../../../src/components/Scrubber/Scrubber.tsx"],"names":[],"mappings":"AACA,OAAO,EAIL,YAAY,EACZ,SAAS,EAMV,MAAM,OAAO,CAAC;AAMf,OAAO,EAGL,WAAW,EAGZ,MAAM,SAAS,CAAC;AAEjB,MAAM,MAAM,iBAAiB,GAAG,QAAQ,GAAG,WAAW,GAAG,OAAO,CAAC;AAEjE,MAAM,WAAW,aAAa,CAAC,CAAC;IAC9B,4CAA4C;IAC5C,GAAG,EAAE,CAAC,CAAC;IACP,4CAA4C;IAC5C,GAAG,EAAE,CAAC,CAAC;IACP,0DAA0D;IAC1D,KAAK,EAAE,CAAC,CAAC;IACT,wEAAwE;IACxE,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC;IAC7B;;;OAGG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC;IAC7B;;;;OAIG;IACH,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,MAAM,CAAC;IAClC,mEAAmE;IACnE,YAAY,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,CAAC,CAAC;IACvC;;;OAGG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B;;;OAGG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,EAAE,CAAC;IACrB,mDAAmD;IACnD,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,SAAS,CAAC;IACzD,yDAAyD;IACzD,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,SAAS,CAAC;IACtC,wEAAwE;IACxE,SAAS,CAAC,EAAE,iBAAiB,CAAC;IAC9B;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;OAKG;IACH,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,CAAC,GAAG,IAAI,CAAC;IACxC;;;OAGG;IACH,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,MAAM,CAAC;IACnC;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAiDD,wBAAgB,QAAQ,CAAC,CAAC,EAAE,EAC1B,GAAG,EACH,GAAG,EACH,KAAK,EACL,QAAQ,EACR,OAAO,EACP,UAAqB,EACrB,YAA8B,EAC9B,WAA6B,EAC7B,KAAK,EACL,eAAe,EACf,WAAW,EACX,SAAuB,EACvB,IAAI,EACJ,QAAgB,EAChB,UAA8B,EAC9B,WAAW,EACX,YAAY,EACZ,UAAU,EACV,SAAS,EACT,YAAY,EAAE,SAAS,GACxB,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,YAAY,CAyVjC;yBA9We,QAAQ"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { FC, ReactNode } from 'react';
|
|
2
|
-
import { Orientation } from '../../types';
|
|
3
|
-
interface ScrubberThumbProps {
|
|
4
|
-
/** Normalized position along the primary axis, in `[0, 1]`. */
|
|
5
|
-
position: number;
|
|
6
|
-
orientation: Orientation;
|
|
7
|
-
/** Floating label shown next to the thumb. Omit to hide the label. */
|
|
8
|
-
label?: ReactNode;
|
|
9
|
-
/**
|
|
10
|
-
* When `true` (hover or active scrub), the pin scales up slightly with a
|
|
11
|
-
* short transition so users get tactile feedback on interaction.
|
|
12
|
-
*/
|
|
13
|
-
active?: boolean;
|
|
14
|
-
/**
|
|
15
|
-
* When `true`, transitions the primary-axis position so external value
|
|
16
|
-
* changes (e.g. the host scrolling the underlying content) glide instead
|
|
17
|
-
* of jumping. Should be `false` while the user is actively dragging,
|
|
18
|
-
* otherwise the pin lags behind the cursor.
|
|
19
|
-
*/
|
|
20
|
-
animatePosition?: boolean;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* The draggable thumb overlaid on a {@link ScrubberTrack}.
|
|
24
|
-
*
|
|
25
|
-
* Positions itself absolutely along the primary axis; the cross-axis is
|
|
26
|
-
* centered on the track. The optional label hovers in the gutter above
|
|
27
|
-
* (horizontal) or beside (vertical) the thumb.
|
|
28
|
-
*
|
|
29
|
-
* @internal For use by {@link Scrubber}.
|
|
30
|
-
*/
|
|
31
|
-
export declare const ScrubberThumb: FC<ScrubberThumbProps>;
|
|
32
|
-
export {};
|
|
33
|
-
//# sourceMappingURL=ScrubberThumb.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ScrubberThumb.d.ts","sourceRoot":"","sources":["../../../src/components/Scrubber/ScrubberThumb.tsx"],"names":[],"mappings":"AACA,OAAO,EAAiB,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGrD,OAAO,EAA4B,WAAW,EAAU,MAAM,SAAS,CAAC;AAExE,UAAU,kBAAkB;IAC1B,+DAA+D;IAC/D,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,WAAW,CAAC;IACzB,sEAAsE;IACtE,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;;;OAKG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,kBAAkB,CAiGhD,CAAC"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { FC, ReactNode } from 'react';
|
|
2
|
-
import { Orientation } from '../../types';
|
|
3
|
-
interface ScrubberTickProps {
|
|
4
|
-
/** Normalized position along the primary axis, in `[0, 1]`. */
|
|
5
|
-
position: number;
|
|
6
|
-
orientation: Orientation;
|
|
7
|
-
/** Optional label rendered in the cross-axis gutter beside the tick. */
|
|
8
|
-
label?: ReactNode;
|
|
9
|
-
/** Whether this tick coincides with the current scrubber value. */
|
|
10
|
-
active?: boolean;
|
|
11
|
-
/**
|
|
12
|
-
* Whether the tick label should be visible. The Scrubber sets this from
|
|
13
|
-
* its own hover/scrub state so labels only appear when the user is
|
|
14
|
-
* interacting with the pin — keeping the bar quiet at rest.
|
|
15
|
-
*/
|
|
16
|
-
showLabel?: boolean;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* A single tick mark drawn perpendicular to the scrubber track, with an
|
|
20
|
-
* optional label rendered just beyond the track in the cross-axis gutter.
|
|
21
|
-
*
|
|
22
|
-
* @internal For use by {@link Scrubber}.
|
|
23
|
-
*/
|
|
24
|
-
export declare const ScrubberTick: FC<ScrubberTickProps>;
|
|
25
|
-
export {};
|
|
26
|
-
//# sourceMappingURL=ScrubberTick.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ScrubberTick.d.ts","sourceRoot":"","sources":["../../../src/components/Scrubber/ScrubberTick.tsx"],"names":[],"mappings":"AACA,OAAO,EAAiB,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGrD,OAAO,EAGL,WAAW,EAIZ,MAAM,SAAS,CAAC;AAEjB,UAAU,iBAAiB;IACzB,+DAA+D;IAC/D,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,WAAW,CAAC;IACzB,wEAAwE;IACxE,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,mEAAmE;IACnE,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;;;;GAKG;AACH,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,iBAAiB,CAsF9C,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Scrubber/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,YAAY,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC"}
|