@voxel51/voodo 0.1.0 → 0.2.0-feat.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/NOTICE +37 -0
- package/README.md +45 -1
- package/dist/components/ActivityToast/ActivityToast.d.ts +5 -4
- package/dist/components/ActivityToast/ActivityToast.d.ts.map +1 -1
- package/dist/components/Button/Button.d.ts +6 -5
- package/dist/components/Button/Button.d.ts.map +1 -1
- package/dist/components/Card/RichCard.d.ts +4 -4
- package/dist/components/Card/RichCard.d.ts.map +1 -1
- package/dist/components/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/components/Clickable/Clickable.d.ts +1 -1
- package/dist/components/Datepicker/DatepickerIconButton.d.ts +3 -3
- package/dist/components/Datepicker/DatepickerIconButton.d.ts.map +1 -1
- package/dist/components/Datepicker/DatepickerInput.d.ts.map +1 -1
- package/dist/components/Dropdown/Dropdown.d.ts +2 -2
- package/dist/components/Dropdown/DropdownTrigger.d.ts.map +1 -1
- package/dist/components/EmptyState/EmptyState.d.ts +2 -2
- package/dist/components/EmptyState/EmptyState.d.ts.map +1 -1
- package/dist/components/Icons/DragHandle.d.ts +1 -1
- package/dist/components/Icons/DragHandle.d.ts.map +1 -1
- package/dist/components/Icons/Icon.d.ts +29 -6
- package/dist/components/Icons/Icon.d.ts.map +1 -1
- package/dist/components/Icons/IconBase.d.ts +30 -0
- package/dist/components/Icons/IconBase.d.ts.map +1 -0
- package/dist/components/Icons/IconWrapper.d.ts +5 -5
- package/dist/components/Icons/IconWrapper.d.ts.map +1 -1
- package/dist/components/Icons/icons.d.ts +312 -0
- package/dist/components/Icons/icons.d.ts.map +1 -0
- package/dist/components/Icons/index.d.ts +2 -0
- package/dist/components/Icons/index.d.ts.map +1 -1
- package/dist/components/Input/Input.d.ts +4 -4
- package/dist/components/Input/Input.d.ts.map +1 -1
- package/dist/components/Input/InputIcon.d.ts +4 -3
- package/dist/components/Input/InputIcon.d.ts.map +1 -1
- package/dist/components/ListItem/ListItem.d.ts +1 -1
- package/dist/components/Menu/MenuCheckItem.d.ts.map +1 -1
- package/dist/components/Menu/MenuIconTextItem.d.ts +3 -4
- package/dist/components/Menu/MenuIconTextItem.d.ts.map +1 -1
- package/dist/components/Menu/MenuSectionTitle.d.ts +1 -1
- package/dist/components/Menu/styles.d.ts.map +1 -1
- package/dist/components/Pill/Pill.d.ts +3 -2
- package/dist/components/Pill/Pill.d.ts.map +1 -1
- package/dist/components/RichButton/RichButton.d.ts +3 -3
- package/dist/components/RichButton/RichButton.d.ts.map +1 -1
- package/dist/components/RichList/RichList.d.ts +3 -3
- package/dist/components/Scrubber/Scrubber.d.ts +83 -0
- package/dist/components/Scrubber/Scrubber.d.ts.map +1 -0
- package/dist/components/Scrubber/ScrubberThumb.d.ts +33 -0
- package/dist/components/Scrubber/ScrubberThumb.d.ts.map +1 -0
- package/dist/components/Scrubber/ScrubberTick.d.ts +26 -0
- package/dist/components/Scrubber/ScrubberTick.d.ts.map +1 -0
- package/dist/components/Scrubber/index.d.ts +3 -0
- package/dist/components/Scrubber/index.d.ts.map +1 -0
- package/dist/components/Select/Option.d.ts.map +1 -1
- package/dist/components/Select/Select.d.ts.map +1 -1
- package/dist/components/Spinner/Spinner.d.ts +0 -2
- package/dist/components/Spinner/Spinner.d.ts.map +1 -1
- package/dist/components/Toast/Toast.d.ts +5 -4
- package/dist/components/Toast/Toast.d.ts.map +1 -1
- package/dist/components/Tree/TreeItem.d.ts.map +1 -1
- package/dist/components/Tree/TreeSearchInput.d.ts.map +1 -1
- package/dist/components/Tree/TreeSelectTrigger.d.ts.map +1 -1
- package/dist/components/index.d.ts +1 -0
- 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 +4457 -3252
- 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 +223 -0
- package/dist/theme/cssVar.d.ts.map +1 -0
- package/dist/theme/index.d.ts +2 -0
- package/dist/theme/index.d.ts.map +1 -1
- package/dist/theme/mui.d.ts +78 -0
- package/dist/theme/mui.d.ts.map +1 -0
- package/dist/theme/tokens/colors.d.ts +348 -124
- package/dist/theme/tokens/colors.d.ts.map +1 -1
- package/dist/theme/tokens/index.d.ts +252 -125
- package/dist/theme/tokens/index.d.ts.map +1 -1
- package/dist/theme/tokens/typography.d.ts +1 -1
- package/dist/types/color.d.ts +67 -4
- package/dist/types/color.d.ts.map +1 -1
- package/dist/types/icons.d.ts +11 -1
- package/dist/types/icons.d.ts.map +1 -1
- package/dist/voodo.css +1 -1
- package/package.json +18 -3
package/NOTICE
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
VOODO: Voxel's Official Design Ontology
|
|
2
|
+
Copyright 2024-2026 Voxel51, Inc.
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (see LICENSE).
|
|
5
|
+
|
|
6
|
+
This product includes third-party materials:
|
|
7
|
+
|
|
8
|
+
Google Material Icons
|
|
9
|
+
A portion of the icon artwork in src/img is derived from Google
|
|
10
|
+
Material Icons, Copyright Google LLC, licensed under the Apache
|
|
11
|
+
License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0).
|
|
12
|
+
The artwork was extracted from the @mui/icons-material package and
|
|
13
|
+
modified for use in this library.
|
|
14
|
+
|
|
15
|
+
MUI (@mui/icons-material)
|
|
16
|
+
Icon artwork was extracted via the @mui/icons-material package,
|
|
17
|
+
Copyright (c) 2014 Call-Em-All, licensed under the MIT License:
|
|
18
|
+
|
|
19
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
20
|
+
a copy of this software and associated documentation files (the
|
|
21
|
+
"Software"), to deal in the Software without restriction, including
|
|
22
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
23
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
24
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
25
|
+
the following conditions:
|
|
26
|
+
|
|
27
|
+
The above copyright notice and this permission notice shall be
|
|
28
|
+
included in all copies or substantial portions of the Software.
|
|
29
|
+
|
|
30
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
31
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
32
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
33
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
|
|
34
|
+
BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
|
|
35
|
+
ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
36
|
+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
37
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -45,6 +45,21 @@ export const Component = () => {
|
|
|
45
45
|
Note that you'll need to import this library's theme somewhere in your application for the components
|
|
46
46
|
to be styled correctly. See [CSS Themes](#css-themes).
|
|
47
47
|
|
|
48
|
+
### Using icons
|
|
49
|
+
|
|
50
|
+
Every icon is exported as its own component so that bundlers only include the
|
|
51
|
+
icons you actually import (there is intentionally no icon-name enum or runtime
|
|
52
|
+
icon map — that would defeat tree-shaking):
|
|
53
|
+
|
|
54
|
+
```typescript jsx
|
|
55
|
+
import { CheckIcon, Size } from "@voxel51/voodo";
|
|
56
|
+
|
|
57
|
+
export const Component = () => <CheckIcon size={Size.Md} />;
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
To add a new icon, drop the SVG in `src/img` (PascalCase filename) and run
|
|
61
|
+
`npm run generate-icons`.
|
|
62
|
+
|
|
48
63
|
### Theming
|
|
49
64
|
|
|
50
65
|
#### CSS Themes
|
|
@@ -73,7 +88,36 @@ General rules of thumb:
|
|
|
73
88
|
|
|
74
89
|
## Publishing
|
|
75
90
|
|
|
76
|
-
|
|
91
|
+
Pushing a `v*` tag publishes to NPM via the `release` workflow.
|
|
92
|
+
|
|
93
|
+
Stable release, on `main`:
|
|
94
|
+
|
|
95
|
+
```shell
|
|
96
|
+
npm version minor && git push --follow-tags
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
The tag must match `package.json` or the workflow fails.
|
|
100
|
+
|
|
101
|
+
Prerelease, on any branch:
|
|
102
|
+
|
|
103
|
+
```shell
|
|
104
|
+
git tag v0.2.0-dev-my-feature.0 && git push origin v0.2.0-dev-my-feature.0
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
Prerelease versions (`vX.Y.Z-<id>.N`) are stamped from the tag — they never
|
|
108
|
+
appear in `package.json` — and publish under NPM dist-tag `<id>`
|
|
109
|
+
(`npm i @voxel51/voodo@dev-my-feature`), so `latest` only moves on stable
|
|
110
|
+
releases. Use `rc` as the id for release candidates from `main` and
|
|
111
|
+
`dev-<branch>` for feature-branch builds.
|
|
77
112
|
|
|
78
113
|
This library is currently in a pre-release state, with versions matching `0.x.y`.
|
|
79
114
|
Standard semantic versioning will be enforced starting with version `1.0.0`.
|
|
115
|
+
|
|
116
|
+
## License
|
|
117
|
+
|
|
118
|
+
Copyright 2024-2026 Voxel51, Inc. Licensed under the [Apache License, Version 2.0](LICENSE).
|
|
119
|
+
|
|
120
|
+
A portion of the icon artwork is derived from
|
|
121
|
+
[Google Material Icons](https://fonts.google.com/icons) (Apache License 2.0),
|
|
122
|
+
extracted via [`@mui/icons-material`](https://mui.com/material-ui/material-icons/)
|
|
123
|
+
(MIT License). See [NOTICE](NOTICE) for attribution details.
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { FC, HTMLAttributes } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { IconInput } from '../Icons';
|
|
3
|
+
import { Anchor, Variant } from '../../types';
|
|
3
4
|
export interface ActivityToastProps extends HTMLAttributes<HTMLDivElement> {
|
|
4
5
|
anchor?: Anchor;
|
|
5
|
-
icon?:
|
|
6
|
+
icon?: IconInput;
|
|
6
7
|
message?: string;
|
|
7
8
|
open?: boolean;
|
|
8
9
|
variant?: Variant;
|
|
@@ -18,7 +19,7 @@ export interface ActivityToastProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
18
19
|
* ```tsx
|
|
19
20
|
* <ActivityToast
|
|
20
21
|
* open={true}
|
|
21
|
-
* icon={
|
|
22
|
+
* icon={CheckIcon}
|
|
22
23
|
* message={"Operation successful"}
|
|
23
24
|
* variant={Variant.Success}
|
|
24
25
|
* />
|
|
@@ -27,7 +28,7 @@ export interface ActivityToastProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
27
28
|
* @param anchor Position within the viewport to anchor the notification.
|
|
28
29
|
* Options include all cardinal directions as well as all four corners.
|
|
29
30
|
* @param className `class` overrides to apply to the component.
|
|
30
|
-
* @param icon
|
|
31
|
+
* @param icon Icon component which prefixes the toast message.
|
|
31
32
|
* @param message Message to include in the toast.
|
|
32
33
|
* @param open Boolean controlling whether the toast is visible.
|
|
33
34
|
* @param variant The toast variant; this controls the general styling of the toast. See {@link Variant}.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActivityToast.d.ts","sourceRoot":"","sources":["../../../src/components/ActivityToast/ActivityToast.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ActivityToast.d.ts","sourceRoot":"","sources":["../../../src/components/ActivityToast/ActivityToast.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAEhD,OAAO,EAAE,KAAK,SAAS,EAAe,MAAM,oBAAoB,CAAC;AAKjE,OAAO,EACL,MAAM,EAON,OAAO,EACR,MAAM,SAAS,CAAC;AAGjB,MAAM,WAAW,kBAAmB,SAAQ,cAAc,CAAC,cAAc,CAAC;IACxE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,kBAAkB,CAgChD,CAAC"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { ButtonHTMLAttributes, FC } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { IconInput } from '../Icons';
|
|
3
|
+
import { Size, Variant } from '../../types';
|
|
3
4
|
type ButtonSize = Exclude<Size, Size.Lg | Size.Xl>;
|
|
4
5
|
export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
5
6
|
variant?: Variant;
|
|
6
7
|
size?: ButtonSize;
|
|
7
|
-
leadingIcon?:
|
|
8
|
-
trailingIcon?:
|
|
8
|
+
leadingIcon?: IconInput;
|
|
9
|
+
trailingIcon?: IconInput;
|
|
9
10
|
borderless?: boolean;
|
|
10
11
|
}
|
|
11
12
|
/**
|
|
@@ -22,8 +23,8 @@ export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
|
22
23
|
* @param size The size of the button; this controls both the text size and the button size. See {@link Size}.
|
|
23
24
|
* @param borderless Boolean controlling whether the button should be "borderless," removing any borders and
|
|
24
25
|
* rounding the corners.
|
|
25
|
-
* @param leadingIcon Optional
|
|
26
|
-
* @param trailingIcon Optional
|
|
26
|
+
* @param leadingIcon Optional icon component which prefixes the button's content.
|
|
27
|
+
* @param trailingIcon Optional icon component which postfixes the button's content.
|
|
27
28
|
* @param className `class` overrides to apply to the component.
|
|
28
29
|
* @param children Button content.
|
|
29
30
|
* @param props Additional HTML properties to apply to the component.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/components/Button/Button.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/components/Button/Button.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAEjD,OAAO,EAAE,KAAK,SAAS,EAAe,MAAM,oBAAoB,CAAC;AAEjE,OAAO,EAQL,IAAI,EAGJ,OAAO,EACR,MAAM,SAAS,CAAC;AAGjB,KAAK,UAAU,GAAG,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC;AAEnD,MAAM,WAAW,WAAY,SAAQ,oBAAoB,CAAC,iBAAiB,CAAC;IAC1E,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAgED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,MAAM,EAAE,EAAE,CAAC,WAAW,CAiDlC,CAAC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { FC, default as React } from 'react';
|
|
2
2
|
import { CardProps } from '.';
|
|
3
|
-
import {
|
|
3
|
+
import { IconInput } from '../Icons';
|
|
4
4
|
export interface RichCardProps extends CardProps {
|
|
5
5
|
badge?: string;
|
|
6
6
|
compact?: boolean;
|
|
7
7
|
description?: string | string[];
|
|
8
|
-
icon?:
|
|
8
|
+
icon?: IconInput;
|
|
9
9
|
title?: string;
|
|
10
10
|
action?: React.ReactNode;
|
|
11
11
|
}
|
|
@@ -16,7 +16,7 @@ export interface RichCardProps extends CardProps {
|
|
|
16
16
|
* @example
|
|
17
17
|
* ```tsx
|
|
18
18
|
* <RichCard
|
|
19
|
-
* icon={
|
|
19
|
+
* icon={StarIcon}
|
|
20
20
|
* title="Getting Started"
|
|
21
21
|
* description="Follow these steps to set up your workspace."
|
|
22
22
|
* badge="New"
|
|
@@ -26,7 +26,7 @@ export interface RichCardProps extends CardProps {
|
|
|
26
26
|
* @param badge A small badge for supplementary info such as status or count.
|
|
27
27
|
* @param compact When true, uses a horizontal layout with tighter spacing.
|
|
28
28
|
* @param description Body text. Pass an array of strings to render a bulleted list.
|
|
29
|
-
* @param icon The icon to display beside the title.
|
|
29
|
+
* @param icon The icon component to display beside the title.
|
|
30
30
|
* @param title The card heading.
|
|
31
31
|
* @param action A React node (e.g. a button) rendered in the action slot.
|
|
32
32
|
* @param children Content displayed inside the card, below the description.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RichCard.d.ts","sourceRoot":"","sources":["../../../src/components/Card/RichCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAwB,SAAS,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"RichCard.d.ts","sourceRoot":"","sources":["../../../src/components/Card/RichCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAwB,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,EAAE,KAAK,SAAS,EAAoB,MAAM,oBAAoB,CAAC;AAiBtE,MAAM,WAAW,aAAc,SAAQ,SAAS;IAC9C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAChC,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC1B;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,QAAQ,EAAE,EAAE,CAAC,aAAa,CAoEtC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC;IAAE,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;CAAE,CAcvD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../../src/components/Checkbox/Checkbox.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,EAAE,mBAAmB,EAAE,MAAM,OAAO,CAAC;AAMrD,OAAO,
|
|
1
|
+
{"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../../src/components/Checkbox/Checkbox.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,EAAE,mBAAmB,EAAE,MAAM,OAAO,CAAC;AAMrD,OAAO,EAOL,MAAM,EACN,IAAI,EAGL,MAAM,SAAS,CAAC;AAGjB,KAAK,qBAAqB,GAAG,IAAI,CAC/B,mBAAmB,CAAC,gBAAgB,CAAC,EACrC,MAAM,GAAG,UAAU,GAAG,SAAS,GAAG,UAAU,GAAG,WAAW,CAC3D,CAAC;AAEF,MAAM,WAAW,aAAc,SAAQ,qBAAqB;IAC1D,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAkBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,eAAO,MAAM,QAAQ,EAAE,EAAE,CAAC,aAAa,CAwEtC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
+
import { IconInput } from '../Icons';
|
|
2
3
|
import { Size } from '../../types';
|
|
3
|
-
import { IconName } from '../../types/icons';
|
|
4
4
|
export declare enum IconPosition {
|
|
5
5
|
Leading = "leading",
|
|
6
6
|
Trailing = "trailing"
|
|
@@ -11,7 +11,7 @@ export interface DatepickerIconButtonProps {
|
|
|
11
11
|
hasValue?: boolean;
|
|
12
12
|
size?: Size;
|
|
13
13
|
ariaLabel?: string;
|
|
14
|
-
|
|
14
|
+
icon: IconInput;
|
|
15
15
|
position?: IconPosition;
|
|
16
16
|
}
|
|
17
17
|
/**
|
|
@@ -21,7 +21,7 @@ export interface DatepickerIconButtonProps {
|
|
|
21
21
|
* @param disabled If `true`, disables interaction with the icon.
|
|
22
22
|
* @param size Size of the icon. See {@link Size}.
|
|
23
23
|
* @param ariaLabel Optional aria label for the icon; only used for accessibility.
|
|
24
|
-
* @param
|
|
24
|
+
* @param icon The icon component to render.
|
|
25
25
|
* @param position The position of the icon. See {@link IconPosition}.
|
|
26
26
|
*
|
|
27
27
|
* @internal For use by {@link DatepickerInput}.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DatepickerIconButton.d.ts","sourceRoot":"","sources":["../../../src/components/Datepicker/DatepickerIconButton.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"DatepickerIconButton.d.ts","sourceRoot":"","sources":["../../../src/components/Datepicker/DatepickerIconButton.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,EAAE,KAAK,SAAS,EAAoB,MAAM,oBAAoB,CAAC;AACtE,OAAO,EAAa,IAAI,EAAkB,MAAM,SAAS,CAAC;AAK1D,oBAAY,YAAY;IACtB,OAAO,YAAY;IACnB,QAAQ,aAAa;CACtB;AAED,MAAM,WAAW,yBAAyB;IACxC,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,SAAS,CAAC;IAChB,QAAQ,CAAC,EAAE,YAAY,CAAC;CACzB;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,oBAAoB,EAAE,EAAE,CAAC,yBAAyB,CAmC9D,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DatepickerInput.d.ts","sourceRoot":"","sources":["../../../src/components/Datepicker/DatepickerInput.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,EAAuB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"DatepickerInput.d.ts","sourceRoot":"","sources":["../../../src/components/Datepicker/DatepickerInput.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,EAAuB,MAAM,OAAO,CAAC;AAIrD,OAAO,EAML,MAAM,EACN,IAAI,EAGL,MAAM,SAAS,CAAC;AA4CjB,MAAM,WAAW,oBAAoB;IACnC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CAyDpD,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -63,13 +63,13 @@ export interface DropdownProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
63
63
|
* <Dropdown trigger={<DropdownTrigger>Actions</DropdownTrigger>}>
|
|
64
64
|
* <MenuSectionTitle>Actions</MenuSectionTitle>
|
|
65
65
|
* <MenuIconTextItem
|
|
66
|
-
* icon={
|
|
66
|
+
* icon={<ImageSearchIcon />}
|
|
67
67
|
* text="Sort by similarity"
|
|
68
68
|
* subtext="Find visually similar"
|
|
69
69
|
* onClick={() => {}}
|
|
70
70
|
* />
|
|
71
71
|
* <MenuIconTextItem
|
|
72
|
-
* icon={
|
|
72
|
+
* icon={<EmbeddingsIcon />}
|
|
73
73
|
* text="Run embeddings"
|
|
74
74
|
* subtext="Compute vector embeddings"
|
|
75
75
|
* onClick={() => {}}
|
|
@@ -1 +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;
|
|
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;AAI/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"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
+
import { IconInput } from '../Icons';
|
|
2
3
|
import { StackProps } from '../Stack';
|
|
3
|
-
import { IconName } from '../../types';
|
|
4
4
|
export interface EmptyStateProps extends StackProps {
|
|
5
|
-
icon
|
|
5
|
+
icon?: IconInput;
|
|
6
6
|
title: string;
|
|
7
7
|
description?: string;
|
|
8
8
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmptyState.d.ts","sourceRoot":"","sources":["../../../src/components/EmptyState/EmptyState.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"EmptyState.d.ts","sourceRoot":"","sources":["../../../src/components/EmptyState/EmptyState.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,EAAE,KAAK,SAAS,EAAoB,MAAM,oBAAoB,CAAC;AACtE,OAAO,EAAS,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAgBvD,MAAM,WAAW,eAAgB,SAAQ,UAAU;IACjD,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CAoC1C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DragHandle.d.ts","sourceRoot":"","sources":["../../../src/components/Icons/DragHandle.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAErD;;;;;;;GAOG;AACH,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"DragHandle.d.ts","sourceRoot":"","sources":["../../../src/components/Icons/DragHandle.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAErD;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,EAAE,EAAE,CAAC,SAAS,CAiB5C,CAAC"}
|
|
@@ -2,15 +2,20 @@ import { default as React, FC } from 'react';
|
|
|
2
2
|
import { BrandColor, IconColor, TextColor } from '../../types';
|
|
3
3
|
import { IconName } from '../../types/icons';
|
|
4
4
|
import { Size } from '../../types/size';
|
|
5
|
+
import { IconProps as BaseIconProps } from './IconBase';
|
|
5
6
|
type SvgComponent = React.FC<React.SVGProps<SVGSVGElement>>;
|
|
6
7
|
/**
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* 3. import the SVG file and add it to this map
|
|
8
|
+
* @deprecated Legacy runtime icon map (bundles all icons regardless of
|
|
9
|
+
* usage). Do NOT add new icons here — add the SVG and regenerate the
|
|
10
|
+
* per-icon components instead (`npm run generate-icons`).
|
|
11
11
|
*/
|
|
12
12
|
export declare const iconMap: Record<Exclude<IconName, IconName.Spinner>, SvgComponent>;
|
|
13
|
-
|
|
13
|
+
/**
|
|
14
|
+
* @deprecated Props for the legacy map-based {@link Icon}. Renamed from
|
|
15
|
+
* `IconProps` so the per-icon components' `IconProps` (see `IconBase`)
|
|
16
|
+
* keeps that name.
|
|
17
|
+
*/
|
|
18
|
+
export interface LegacyIconProps {
|
|
14
19
|
name: IconName;
|
|
15
20
|
size?: Size;
|
|
16
21
|
className?: string;
|
|
@@ -20,6 +25,11 @@ export interface IconProps {
|
|
|
20
25
|
/**
|
|
21
26
|
* An generic icon component which will take the form of the icon specified by `name`.
|
|
22
27
|
*
|
|
28
|
+
* @deprecated Use the per-icon components instead (e.g. `<EditIcon />`),
|
|
29
|
+
* which are tree-shakable. `Icon` and {@link IconName} exist only to bridge
|
|
30
|
+
* consumers migrating from voodo <= 0.0.39 and will be removed once the
|
|
31
|
+
* migration completes.
|
|
32
|
+
*
|
|
23
33
|
* @example
|
|
24
34
|
* ```tsx
|
|
25
35
|
* <Icon name={IconName.Edit} size={Size.Md} />
|
|
@@ -32,6 +42,19 @@ export interface IconProps {
|
|
|
32
42
|
* @param style `style` overrides to apply to the icon.
|
|
33
43
|
* @param props Additional HTML properties to apply to the component.
|
|
34
44
|
*/
|
|
35
|
-
export declare const Icon: FC<
|
|
45
|
+
export declare const Icon: FC<LegacyIconProps>;
|
|
46
|
+
/**
|
|
47
|
+
* Accepted value for component icon props while the legacy icon API is
|
|
48
|
+
* bridged: a per-icon component (preferred) or a legacy {@link IconName}.
|
|
49
|
+
* The IconName form is deprecated and will be removed with the legacy API,
|
|
50
|
+
* at which point icon props return to plain `FC<IconProps>`.
|
|
51
|
+
*/
|
|
52
|
+
export type IconInput = FC<BaseIconProps> | IconName;
|
|
53
|
+
/**
|
|
54
|
+
* Resolves an {@link IconInput} to a renderable icon component, rendering
|
|
55
|
+
* legacy {@link IconName} values through the deprecated map-based
|
|
56
|
+
* {@link Icon}.
|
|
57
|
+
*/
|
|
58
|
+
export declare function resolveIconInput(icon?: IconInput): FC<BaseIconProps> | undefined;
|
|
36
59
|
export {};
|
|
37
60
|
//# sourceMappingURL=Icon.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../../../src/components/Icons/Icon.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../../../src/components/Icons/Icon.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AA8GvC,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAkB,MAAM,SAAS,CAAC;AAC3E,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,OAAO,EAAE,KAAK,SAAS,IAAI,aAAa,EAAE,MAAM,YAAY,CAAC;AAE7D,KAAK,YAAY,GAAG,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC;AAE5D;;;;GAIG;AACH,eAAO,MAAM,OAAO,EAAE,MAAM,CAC1B,OAAO,CAAC,QAAQ,EAAE,QAAQ,CAAC,OAAO,CAAC,EACnC,YAAY,CA6Gb,CAAC;AAWF;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,UAAU,CAAC;IAC3C,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,IAAI,EAAE,EAAE,CAAC,eAAe,CAuBpC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,SAAS,GAAG,EAAE,CAAC,aAAa,CAAC,GAAG,QAAQ,CAAC;AAOrD;;;;GAIG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,CAAC,EAAE,SAAS,GACf,EAAE,CAAC,aAAa,CAAC,GAAG,SAAS,CAW/B"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { CSSProperties, FC, SVGProps } from 'react';
|
|
2
|
+
import { BrandColor, IconColor, TextColor } from '../../types';
|
|
3
|
+
import { Size } from '../../types/size';
|
|
4
|
+
type SvgComponent = FC<SVGProps<SVGSVGElement>>;
|
|
5
|
+
export interface IconProps {
|
|
6
|
+
size?: Size;
|
|
7
|
+
className?: string;
|
|
8
|
+
color?: TextColor | IconColor | BrandColor;
|
|
9
|
+
style?: CSSProperties;
|
|
10
|
+
}
|
|
11
|
+
interface IconBaseProps extends IconProps {
|
|
12
|
+
svg: SvgComponent;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Shared rendering wrapper for the generated icon components in `icons.tsx`.
|
|
16
|
+
*
|
|
17
|
+
* We are making a strong opinion here that we should treat the SVG
|
|
18
|
+
* as a square - the viewbox on the SVG will still handle the aspect
|
|
19
|
+
* ratio but it's possible that VERY rectangular SVGs will not behave
|
|
20
|
+
* as expected.
|
|
21
|
+
*
|
|
22
|
+
* @param svg The SVG component to render.
|
|
23
|
+
* @param size The size of the icon. If unspecified, fills the parent container. See {@link Size}.
|
|
24
|
+
* @param className `class` overrides to apply to the component.
|
|
25
|
+
* @param color Color of the icon. By default, the icon inherits the text color of its container.
|
|
26
|
+
* @param style `style` overrides to apply to the icon.
|
|
27
|
+
*/
|
|
28
|
+
export declare const IconBase: FC<IconBaseProps>;
|
|
29
|
+
export {};
|
|
30
|
+
//# sourceMappingURL=IconBase.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IconBase.d.ts","sourceRoot":"","sources":["../../../src/components/Icons/IconBase.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEzD,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAkB,MAAM,SAAS,CAAC;AAC3E,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,KAAK,YAAY,GAAG,EAAE,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC;AAWhD,MAAM,WAAW,SAAS;IACxB,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,UAAU,CAAC;IAC3C,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB;AAED,UAAU,aAAc,SAAQ,SAAS;IACvC,GAAG,EAAE,YAAY,CAAC;CACnB;AAED;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,QAAQ,EAAE,EAAE,CAAC,aAAa,CAiBtC,CAAC"}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
import { IconName } from '../../types/icons';
|
|
3
2
|
import { Size } from '../../types/size';
|
|
3
|
+
import { IconInput } from './Icon';
|
|
4
4
|
export interface IconWrapperProps {
|
|
5
|
-
content?:
|
|
5
|
+
content?: IconInput;
|
|
6
6
|
size?: Size;
|
|
7
7
|
className?: string;
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
|
-
* Helper component which resolves
|
|
10
|
+
* Helper component which resolves an icon {@link FC} | ``undefined`` to a rendered icon.
|
|
11
11
|
*
|
|
12
12
|
* Wraps content in a span; use `className` to constrain icon bounds or apply color styling.
|
|
13
13
|
*
|
|
14
|
-
* @param content Icon {@link FC},
|
|
15
|
-
* @param size Size forwarded to
|
|
14
|
+
* @param content Icon {@link FC}, legacy {@link IconName}, or undefined
|
|
15
|
+
* @param size Size forwarded to the icon component
|
|
16
16
|
* @param className Classes applied to the wrapping span
|
|
17
17
|
*/
|
|
18
18
|
export declare const IconWrapper: FC<IconWrapperProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconWrapper.d.ts","sourceRoot":"","sources":["../../../src/components/Icons/IconWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"IconWrapper.d.ts","sourceRoot":"","sources":["../../../src/components/Icons/IconWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAGpC,OAAO,EAAE,KAAK,SAAS,EAAoB,MAAM,QAAQ,CAAC;AAE1D,MAAM,WAAW,gBAAgB;IAG/B,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,CAa5C,CAAC"}
|