@voxel51/voodo 0.0.41 → 0.1.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/README.md +0 -24
- package/dist/components/ActivityToast/ActivityToast.d.ts +4 -5
- package/dist/components/ActivityToast/ActivityToast.d.ts.map +1 -1
- package/dist/components/Button/Button.d.ts +5 -6
- 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 +37 -0
- package/dist/components/Icons/Icon.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/index.d.ts +1 -2
- 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 +3 -4
- 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 +4 -3
- package/dist/components/Menu/MenuIconTextItem.d.ts.map +1 -1
- package/dist/components/Menu/MenuSectionTitle.d.ts +1 -1
- package/dist/components/Pill/Pill.d.ts +2 -3
- 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/Select/Option.d.ts.map +1 -1
- package/dist/components/Select/Select.d.ts.map +1 -1
- package/dist/components/Spinner/Spinner.d.ts +2 -0
- package/dist/components/Spinner/Spinner.d.ts.map +1 -1
- package/dist/components/Toast/Toast.d.ts +4 -5
- 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/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2988 -3170
- package/dist/index.js.map +1 -1
- package/dist/types/icons.d.ts +108 -0
- package/dist/types/icons.d.ts.map +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +2 -5
- package/NOTICE +0 -37
- package/dist/components/Icons/IconBase.d.ts +0 -30
- package/dist/components/Icons/IconBase.d.ts.map +0 -1
- package/dist/components/Icons/icons.d.ts +0 -312
- package/dist/components/Icons/icons.d.ts.map +0 -1
package/README.md
CHANGED
|
@@ -45,21 +45,6 @@ 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
|
-
|
|
63
48
|
### Theming
|
|
64
49
|
|
|
65
50
|
#### CSS Themes
|
|
@@ -92,12 +77,3 @@ This library is published to NPM via GitHub Actions workflows.
|
|
|
92
77
|
|
|
93
78
|
This library is currently in a pre-release state, with versions matching `0.x.y`.
|
|
94
79
|
Standard semantic versioning will be enforced starting with version `1.0.0`.
|
|
95
|
-
|
|
96
|
-
## License
|
|
97
|
-
|
|
98
|
-
Copyright 2024-2026 Voxel51, Inc. Licensed under the [Apache License, Version 2.0](LICENSE).
|
|
99
|
-
|
|
100
|
-
A portion of the icon artwork is derived from
|
|
101
|
-
[Google Material Icons](https://fonts.google.com/icons) (Apache License 2.0),
|
|
102
|
-
extracted via [`@mui/icons-material`](https://mui.com/material-ui/material-icons/)
|
|
103
|
-
(MIT License). See [NOTICE](NOTICE) for attribution details.
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { FC, HTMLAttributes } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import { Anchor, Variant } from '../../types';
|
|
2
|
+
import { Anchor, IconName, Variant } from '../../types';
|
|
4
3
|
export interface ActivityToastProps extends HTMLAttributes<HTMLDivElement> {
|
|
5
4
|
anchor?: Anchor;
|
|
6
|
-
icon?: FC
|
|
5
|
+
icon?: FC | IconName;
|
|
7
6
|
message?: string;
|
|
8
7
|
open?: boolean;
|
|
9
8
|
variant?: Variant;
|
|
@@ -19,7 +18,7 @@ export interface ActivityToastProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
19
18
|
* ```tsx
|
|
20
19
|
* <ActivityToast
|
|
21
20
|
* open={true}
|
|
22
|
-
* icon={
|
|
21
|
+
* icon={() => <Icon name={IconName.Check}/>}
|
|
23
22
|
* message={"Operation successful"}
|
|
24
23
|
* variant={Variant.Success}
|
|
25
24
|
* />
|
|
@@ -28,7 +27,7 @@ export interface ActivityToastProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
28
27
|
* @param anchor Position within the viewport to anchor the notification.
|
|
29
28
|
* Options include all cardinal directions as well as all four corners.
|
|
30
29
|
* @param className `class` overrides to apply to the component.
|
|
31
|
-
* @param icon
|
|
30
|
+
* @param icon Reference (`FC`) to an icon or an {@link IconName} to render which prefixes the toast message. See {@link Icon}.
|
|
32
31
|
* @param message Message to include in the toast.
|
|
33
32
|
* @param open Boolean controlling whether the toast is visible.
|
|
34
33
|
* @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;AAOhD,OAAO,EACL,MAAM,EAKN,QAAQ,EAGR,OAAO,EACR,MAAM,SAAS,CAAC;AAGjB,MAAM,WAAW,kBAAmB,SAAQ,cAAc,CAAC,cAAc,CAAC;IACxE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,EAAE,GAAG,QAAQ,CAAC;IACrB,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,12 +1,11 @@
|
|
|
1
1
|
import { ButtonHTMLAttributes, FC } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import { Size, Variant } from '../../types';
|
|
2
|
+
import { IconName, Size, Variant } from '../../types';
|
|
4
3
|
type ButtonSize = Exclude<Size, Size.Lg | Size.Xl>;
|
|
5
4
|
export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
6
5
|
variant?: Variant;
|
|
7
6
|
size?: ButtonSize;
|
|
8
|
-
leadingIcon?: FC
|
|
9
|
-
trailingIcon?: FC
|
|
7
|
+
leadingIcon?: FC | IconName;
|
|
8
|
+
trailingIcon?: FC | IconName;
|
|
10
9
|
borderless?: boolean;
|
|
11
10
|
}
|
|
12
11
|
/**
|
|
@@ -23,8 +22,8 @@ export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
|
23
22
|
* @param size The size of the button; this controls both the text size and the button size. See {@link Size}.
|
|
24
23
|
* @param borderless Boolean controlling whether the button should be "borderless," removing any borders and
|
|
25
24
|
* rounding the corners.
|
|
26
|
-
* @param leadingIcon Optional icon
|
|
27
|
-
* @param trailingIcon Optional icon
|
|
25
|
+
* @param leadingIcon Optional reference ({@link FC}) to an icon or an {@link IconName} which prefixes the button's content. See {@link Icon}.
|
|
26
|
+
* @param trailingIcon Optional reference ({@link FC}) to an icon or an {@link IconName} which postfixes the button's content. See {@link Icon}.
|
|
28
27
|
* @param className `class` overrides to apply to the component.
|
|
29
28
|
* @param children Button content.
|
|
30
29
|
* @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;AAIjD,OAAO,EAOL,QAAQ,EAER,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,EAAE,GAAG,QAAQ,CAAC;IAC5B,YAAY,CAAC,EAAE,EAAE,GAAG,QAAQ,CAAC;IAC7B,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 { IconName } from '../../types';
|
|
4
4
|
export interface RichCardProps extends CardProps {
|
|
5
5
|
badge?: string;
|
|
6
6
|
compact?: boolean;
|
|
7
7
|
description?: string | string[];
|
|
8
|
-
icon?:
|
|
8
|
+
icon?: IconName;
|
|
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={IconName.Star}
|
|
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
|
|
29
|
+
* @param icon The icon to display beside the title. See {@link IconName}.
|
|
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;AAIpE,OAAO,EAGL,QAAQ,EAST,MAAM,SAAS,CAAC;AAGjB,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,QAAQ,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC1B;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,QAAQ,EAAE,EAAE,CAAC,aAAa,CAkEtC,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,EAQL,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,CA0EtC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
import { IconProps } from '../Icons';
|
|
3
2
|
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
|
+
iconName: IconName;
|
|
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 iconName Name of the icon. See {@link IconName}.
|
|
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;AAGhC,OAAO,EAAa,IAAI,EAAkB,MAAM,SAAS,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAKzC,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,QAAQ,EAAE,QAAQ,CAAC;IACnB,QAAQ,CAAC,EAAE,YAAY,CAAC;CACzB;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,oBAAoB,EAAE,EAAE,CAAC,yBAAyB,CAiC9D,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;AAGrD,OAAO,EAML,MAAM,EACN,IAAI,EAGL,MAAM,SAAS,CAAC;AA6CjB,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={IconName.ImageSearch}
|
|
67
67
|
* text="Sort by similarity"
|
|
68
68
|
* subtext="Find visually similar"
|
|
69
69
|
* onClick={() => {}}
|
|
70
70
|
* />
|
|
71
71
|
* <MenuIconTextItem
|
|
72
|
-
* icon={
|
|
72
|
+
* icon={IconName.Embeddings}
|
|
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;AAG/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 { IconProps } from '../Icons';
|
|
3
2
|
import { StackProps } from '../Stack';
|
|
3
|
+
import { IconName } from '../../types';
|
|
4
4
|
export interface EmptyStateProps extends StackProps {
|
|
5
|
-
icon
|
|
5
|
+
icon: IconName;
|
|
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;AAGhC,OAAO,EAAS,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAGvD,OAAO,EAKL,QAAQ,EAMT,MAAM,SAAS,CAAC;AAGjB,MAAM,WAAW,eAAgB,SAAQ,UAAU;IACjD,IAAI,EAAE,QAAQ,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CAkC1C,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,cAAc,EAAE,EAAE,CAAC,SAAS,CAiBxC,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { default as React, FC } from 'react';
|
|
2
|
+
import { BrandColor, IconColor, TextColor } from '../../types';
|
|
3
|
+
import { IconName } from '../../types/icons';
|
|
4
|
+
import { Size } from '../../types/size';
|
|
5
|
+
type SvgComponent = React.FC<React.SVGProps<SVGSVGElement>>;
|
|
6
|
+
/**
|
|
7
|
+
* To add a new icon:
|
|
8
|
+
* 1. add the SVG file to the image directory,
|
|
9
|
+
* 2. create a enum value for the icon name
|
|
10
|
+
* 3. import the SVG file and add it to this map
|
|
11
|
+
*/
|
|
12
|
+
export declare const iconMap: Record<Exclude<IconName, IconName.Spinner>, SvgComponent>;
|
|
13
|
+
export interface IconProps {
|
|
14
|
+
name: IconName;
|
|
15
|
+
size?: Size;
|
|
16
|
+
className?: string;
|
|
17
|
+
color?: TextColor | IconColor | BrandColor;
|
|
18
|
+
style?: React.CSSProperties;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* An generic icon component which will take the form of the icon specified by `name`.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```tsx
|
|
25
|
+
* <Icon name={IconName.Edit} size={Size.Md} />
|
|
26
|
+
* ```
|
|
27
|
+
*
|
|
28
|
+
* @param name Icon to display. See {@link IconName}.
|
|
29
|
+
* @param size The size of the icon. See {@link Size}.
|
|
30
|
+
* @param className `class` overrides to apply to the component.
|
|
31
|
+
* @param color Color of the icon. By default, the icon inherits the text color of its container.
|
|
32
|
+
* @param style `style` overrides to apply to the icon.
|
|
33
|
+
* @param props Additional HTML properties to apply to the component.
|
|
34
|
+
*/
|
|
35
|
+
export declare const Icon: FC<IconProps>;
|
|
36
|
+
export {};
|
|
37
|
+
//# sourceMappingURL=Icon.d.ts.map
|
|
@@ -0,0 +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;AA0GvC,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,KAAK,YAAY,GAAG,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC;AAE5D;;;;;GAKG;AACH,eAAO,MAAM,OAAO,EAAE,MAAM,CAC1B,OAAO,CAAC,QAAQ,EAAE,QAAQ,CAAC,OAAO,CAAC,EACnC,YAAY,CAyGb,CAAC;AAWF,MAAM,WAAW,SAAS;IACxB,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;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,IAAI,EAAE,EAAE,CAAC,SAAS,CAuB9B,CAAC"}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
+
import { IconName } from '../../types/icons';
|
|
2
3
|
import { Size } from '../../types/size';
|
|
3
|
-
import { IconProps } from './IconBase';
|
|
4
4
|
export interface IconWrapperProps {
|
|
5
|
-
content?: FC
|
|
5
|
+
content?: FC | IconName;
|
|
6
6
|
size?: Size;
|
|
7
7
|
className?: string;
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
|
-
* Helper component which resolves
|
|
10
|
+
* Helper component which resolves {@link FC} | {@link IconName} | ``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} or undefined
|
|
15
|
-
* @param size Size forwarded to
|
|
14
|
+
* @param content Icon {@link FC}, icon name, or undefined
|
|
15
|
+
* @param size Size forwarded to {@link Icon} when resolving by name
|
|
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,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAKpC,MAAM,WAAW,gBAAgB;IAC/B,OAAO,CAAC,EAAE,EAAE,GAAG,QAAQ,CAAC;IACxB,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,CAiB5C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Icons/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Icons/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,eAAe,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FC, InputHTMLAttributes } from 'react';
|
|
2
|
-
import { IconProps } from '../Icons';
|
|
3
|
-
import { Radius, Size } from '../../types';
|
|
2
|
+
import { IconProps } from '../Icons/types';
|
|
3
|
+
import { IconName, Radius, Size } from '../../types';
|
|
4
4
|
type ModifiedInputProps = Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "className">;
|
|
5
5
|
export declare enum InputType {
|
|
6
6
|
Text = "text",
|
|
@@ -17,7 +17,7 @@ export interface InputProps extends ModifiedInputProps {
|
|
|
17
17
|
className?: string;
|
|
18
18
|
type?: InputType;
|
|
19
19
|
error?: boolean;
|
|
20
|
-
icon?: FC<IconProps
|
|
20
|
+
icon?: FC<IconProps> | IconName;
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
23
|
* A utility function which returns the classes required for styling an input component.
|
|
@@ -73,7 +73,7 @@ export declare const inputStyle: ({ disabled, error, icon, radius, size, }: {
|
|
|
73
73
|
* @param value The controlled value of the input.
|
|
74
74
|
* @param onChange Callback triggered when the input value changes.
|
|
75
75
|
* @param error If `true`, formats the input to appear in an error state.
|
|
76
|
-
* @param icon Optional icon
|
|
76
|
+
* @param icon Optional reference ({@link FC}) to an icon or an {@link IconName} to prefix the input's value. See {@link Icon}.
|
|
77
77
|
* @param props Additional HTML properties to apply to the component.
|
|
78
78
|
*/
|
|
79
79
|
export declare const Input: FC<InputProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../src/components/Input/Input.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,EAAE,mBAAmB,EAAE,MAAM,OAAO,CAAC;AAErD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../src/components/Input/Input.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,EAAE,mBAAmB,EAAE,MAAM,OAAO,CAAC;AAErD,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAErD,OAAO,EAML,QAAQ,EACR,MAAM,EACN,IAAI,EAGL,MAAM,SAAS,CAAC;AAMjB,KAAK,kBAAkB,GAAG,IAAI,CAC5B,mBAAmB,CAAC,gBAAgB,CAAC,EACrC,MAAM,GAAG,WAAW,CACrB,CAAC;AAEF,oBAAY,SAAS;IACnB,IAAI,SAAS;IACb,KAAK,UAAU;IACf,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,GAAG,QAAQ;IACX,GAAG,QAAQ;IACX,MAAM,WAAW;CAClB;AAED,MAAM,WAAW,UAAW,SAAQ,kBAAkB;IACpD,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,IAAI,CAAC,EAAE,EAAE,CAAC,SAAS,CAAC,GAAG,QAAQ,CAAC;CACjC;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,UAAU,GAAI,0CAMxB;IACD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,IAAI,CAAC;CACb,KAAG,MAwBD,CAAC;AAEJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,eAAO,MAAM,KAAK,EAAE,EAAE,CAAC,UAAU,CAyChC,CAAC"}
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import { Size } from '../../types';
|
|
2
|
+
import { IconName, Size } from '../../types';
|
|
4
3
|
export interface InputIconProps {
|
|
5
|
-
icon: FC
|
|
4
|
+
icon: FC | IconName;
|
|
6
5
|
size: Size;
|
|
7
6
|
hasText?: boolean;
|
|
8
7
|
}
|
|
9
8
|
/**
|
|
10
9
|
* A wrapper component for properly formatting an icon to display within the {@link Input} component.
|
|
11
10
|
*
|
|
12
|
-
* @param icon Icon
|
|
11
|
+
* @param icon Icon reference ({@link FC}) or an {@link IconName} specifying the icon to use.
|
|
13
12
|
* @param size The size of the icon. See {@link Size}.
|
|
14
13
|
* @param hasText If `true`, de-emphasizes the icon in favor of the input text.
|
|
15
14
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputIcon.d.ts","sourceRoot":"","sources":["../../../src/components/Input/InputIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"InputIcon.d.ts","sourceRoot":"","sources":["../../../src/components/Input/InputIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAGhC,OAAO,EAAE,QAAQ,EAAE,IAAI,EAA6B,MAAM,SAAS,CAAC;AAKpE,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,EAAE,GAAG,QAAQ,CAAC;IACpB,IAAI,EAAE,IAAI,CAAC;IACX,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,SAAS,EAAE,EAAE,CAAC,cAAc,CAcxC,CAAC"}
|
|
@@ -17,7 +17,7 @@ export interface ListItemProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
17
17
|
* @param canSelect If `true`, the component will include a {@link Checkbox} to enable selection.
|
|
18
18
|
* @param selected Controls the selection state of the list item. If `canSelect` is not truthy, this has no effect.
|
|
19
19
|
* @param onSelected Callback triggered when this item is selected.
|
|
20
|
-
* @param canDrag If `true`, displays a {@link
|
|
20
|
+
* @param canDrag If `true`, displays a {@link DragHandleIcon} to allow dragging this component.
|
|
21
21
|
* @param dragHandleListeners Optional mapping of `listenerId: listener` for drag events.
|
|
22
22
|
* @param primaryContent Primary content to display in the list item.
|
|
23
23
|
* @param secondaryContent Secondary content to display in the list item.
|
|
@@ -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;AAiBhD;;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;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,kBAAkB,CAgDhD,CAAC"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { FC, HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import { IconName } from '../../types';
|
|
2
3
|
/**
|
|
3
4
|
* Props for {@link MenuIconTextItem}.
|
|
4
5
|
*/
|
|
5
6
|
export interface MenuIconTextItemProps extends HTMLAttributes<HTMLButtonElement> {
|
|
6
7
|
/** Icon to display to the left of the text content. */
|
|
7
|
-
icon: ReactNode;
|
|
8
|
+
icon: IconName | ReactNode;
|
|
8
9
|
/** Primary label text. */
|
|
9
10
|
text: string;
|
|
10
11
|
/** Optional secondary description shown below the primary text. */
|
|
@@ -22,7 +23,7 @@ export interface MenuIconTextItemProps extends HTMLAttributes<HTMLButtonElement>
|
|
|
22
23
|
* ```tsx
|
|
23
24
|
* <Dropdown trigger={<DropdownTrigger>Open</DropdownTrigger>}>
|
|
24
25
|
* <MenuIconTextItem
|
|
25
|
-
* icon={
|
|
26
|
+
* icon={IconName.ImageSearch}
|
|
26
27
|
* text="Sort by similarity"
|
|
27
28
|
* subtext="Find visually similar"
|
|
28
29
|
* onClick={() => {}}
|
|
@@ -30,7 +31,7 @@ export interface MenuIconTextItemProps extends HTMLAttributes<HTMLButtonElement>
|
|
|
30
31
|
* </Dropdown>
|
|
31
32
|
* ```
|
|
32
33
|
*
|
|
33
|
-
* @param icon
|
|
34
|
+
* @param icon An {@link IconName} or a custom ReactNode rendered in the leading slot.
|
|
34
35
|
* @param text The primary label for the item.
|
|
35
36
|
* @param subtext An optional secondary line rendered below the primary text in muted color.
|
|
36
37
|
* @param disabled If `true`, the item cannot be interacted with.
|
|
@@ -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;AAK3D,OAAO,EAKL,QAAQ,EAKT,MAAM,SAAS,CAAC;AAGjB;;GAEG;AACH,MAAM,WAAW,qBAAsB,SAAQ,cAAc,CAAC,iBAAiB,CAAC;IAC9E,uDAAuD;IACvD,IAAI,EAAE,QAAQ,GAAG,SAAS,CAAC;IAC3B,0BAA0B;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,mEAAmE;IACnE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,sFAAsF;IACtF,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,yEAAyE;IACzE,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,qBAAqB,CA+DtD,CAAC"}
|
|
@@ -14,7 +14,7 @@ export interface MenuSectionTitleProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
14
14
|
* ```tsx
|
|
15
15
|
* <Dropdown trigger={<DropdownTrigger>Open</DropdownTrigger>}>
|
|
16
16
|
* <MenuSectionTitle>Actions</MenuSectionTitle>
|
|
17
|
-
* <MenuIconTextItem icon={
|
|
17
|
+
* <MenuIconTextItem icon={IconName.Edit} text="Edit" />
|
|
18
18
|
* </Dropdown>
|
|
19
19
|
* ```
|
|
20
20
|
*
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { FC, HTMLAttributes } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import { BackgroundColor, Radius, SemanticColor, Shadow, Size, StatusColor, TextColor } from '../../types';
|
|
2
|
+
import { BackgroundColor, IconName, Radius, SemanticColor, Shadow, Size, StatusColor, TextColor } from '../../types';
|
|
4
3
|
export type PillSize = Exclude<Size, Size.Lg | Size.Xl>;
|
|
5
4
|
export type PillColor = BackgroundColor | SemanticColor | StatusColor;
|
|
6
5
|
export interface PillProps extends HTMLAttributes<HTMLSpanElement> {
|
|
@@ -10,7 +9,7 @@ export interface PillProps extends HTMLAttributes<HTMLSpanElement> {
|
|
|
10
9
|
color?: TextColor;
|
|
11
10
|
isStatus?: boolean;
|
|
12
11
|
backgroundColor?: PillColor;
|
|
13
|
-
icon?:
|
|
12
|
+
icon?: IconName;
|
|
14
13
|
onRemove?: () => void;
|
|
15
14
|
}
|
|
16
15
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Pill.d.ts","sourceRoot":"","sources":["../../../src/components/Pill/Pill.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Pill.d.ts","sourceRoot":"","sources":["../../../src/components/Pill/Pill.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAMhD,OAAO,EACL,eAAe,EACf,QAAQ,EACR,MAAM,EACN,aAAa,EACb,MAAM,EACN,IAAI,EAEJ,WAAW,EACX,SAAS,EACV,MAAM,SAAS,CAAC;AAIjB,MAAM,MAAM,QAAQ,GAAG,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC;AACxD,MAAM,MAAM,SAAS,GAAG,eAAe,GAAG,aAAa,GAAG,WAAW,CAAC;AAEtE,MAAM,WAAW,SAAU,SAAQ,cAAc,CAAC,eAAe,CAAC;IAChE,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,eAAe,CAAC,EAAE,SAAS,CAAC;IAC5B,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB;AAQD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,IAAI,EAAE,EAAE,CAAC,SAAS,CAoE9B,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { FC, HTMLAttributes, ReactNode } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { IconName } from '../../types';
|
|
3
3
|
export interface RichButtonProps extends HTMLAttributes<HTMLDivElement> {
|
|
4
4
|
active?: boolean;
|
|
5
5
|
description?: ReactNode;
|
|
6
|
-
icon?: FC
|
|
6
|
+
icon?: FC | IconName;
|
|
7
7
|
label?: ReactNode;
|
|
8
8
|
onClick?: () => void;
|
|
9
9
|
}
|
|
@@ -31,7 +31,7 @@ export interface RichButtonProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
31
31
|
*
|
|
32
32
|
* @param active If `true`, renders the component in its active state.
|
|
33
33
|
* @param description Content to display as the description of the component. This is the component's secondary content.
|
|
34
|
-
* @param icon Icon
|
|
34
|
+
* @param icon Icon reference ({@link FC}) or an {@link IconName} to display in the component. See {@link Icon}.
|
|
35
35
|
* @param label Content to display as the label of the component. This is the component's primary content.
|
|
36
36
|
* @param onClick Callback triggered when the component is clicked.
|
|
37
37
|
* @param className `class` overrides to apply to the component.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RichButton.d.ts","sourceRoot":"","sources":["../../../src/components/RichButton/RichButton.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"RichButton.d.ts","sourceRoot":"","sources":["../../../src/components/RichButton/RichButton.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAM3D,OAAO,EAOL,QAAQ,EAIT,MAAM,SAAS,CAAC;AAGjB,MAAM,WAAW,eAAgB,SAAQ,cAAc,CAAC,cAAc,CAAC;IACrE,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,IAAI,CAAC,EAAE,EAAE,GAAG,QAAQ,CAAC;IACrB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CAyD1C,CAAC"}
|
|
@@ -26,7 +26,7 @@ export interface RichListProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
26
26
|
* secondaryContent: "First item description"
|
|
27
27
|
* actions: (
|
|
28
28
|
* <Clickable onClick={() => openSettings("1")}>
|
|
29
|
-
* <
|
|
29
|
+
* <Icon name={IconName.Settings} />
|
|
30
30
|
* </Clickable>
|
|
31
31
|
* )
|
|
32
32
|
* },
|
|
@@ -38,7 +38,7 @@ export interface RichListProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
38
38
|
* secondaryContent: "Second item description"
|
|
39
39
|
* actions: (
|
|
40
40
|
* <Clickable onClick={() => openSettings("2")}>
|
|
41
|
-
* <
|
|
41
|
+
* <Icon name={IconName.Settings} />
|
|
42
42
|
* </Clickable>
|
|
43
43
|
* )
|
|
44
44
|
* },
|
|
@@ -49,7 +49,7 @@ export interface RichListProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
49
49
|
* secondaryContent: "Third item description"
|
|
50
50
|
* actions: (
|
|
51
51
|
* <Clickable onClick={() => openSettings("3")}>
|
|
52
|
-
* <
|
|
52
|
+
* <Icon name={IconName.Settings} />
|
|
53
53
|
* </Clickable>
|
|
54
54
|
* )
|
|
55
55
|
* },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Option.d.ts","sourceRoot":"","sources":["../../../src/components/Select/Option.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAE,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Option.d.ts","sourceRoot":"","sources":["../../../src/components/Select/Option.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAE,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAiBhD,MAAM,WAAW,WAAY,SAAQ,cAAc,CAAC,cAAc,CAAC;IACjE,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,MAAM,EAAE,EAAE,CAAC,WAAW,CA+BlC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../src/components/Select/Select.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,EAAE,EACF,cAAc,EACd,SAAS,EAMV,MAAM,OAAO,CAAC;AAOf,OAAO,EAKL,UAAU,EAMV,MAAM,EAEP,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../src/components/Select/Select.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,EAAE,EACF,cAAc,EACd,SAAS,EAMV,MAAM,OAAO,CAAC;AAOf,OAAO,EAKL,UAAU,EAMV,MAAM,EAEP,MAAM,SAAS,CAAC;AAMjB,oBAAY,YAAY;IACtB,MAAM,WAAW;IACjB,WAAW,iBAAiB;IAC5B,SAAS,eAAe;IACxB,GAAG,QAAQ;IACX,QAAQ,cAAc;IACtB,MAAM,YAAY;CACnB;AAED,MAAM,WAAW,WAAY,SAAQ,IAAI,CACvC,cAAc,CAAC,cAAc,CAAC,EAC9B,UAAU,CACX;IACC,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,IAAI,KAAK,IAAI,CAAC;IACrD,OAAO,CAAC,EAAE,UAAU,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,SAAS,CAAA;KAAE,CAAC,EAAE,CAAC;IAC/D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;CAC3B;AAsBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuEG;AACH,eAAO,MAAM,MAAM,EAAE,EAAE,CAAC,WAAW,CAiJlC,CAAC"}
|
|
@@ -6,6 +6,8 @@ export interface SpinnerProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
6
6
|
/**
|
|
7
7
|
* An animated spinner component.
|
|
8
8
|
*
|
|
9
|
+
* Note that this component is also available via the {@link Icon} component with {@link IconName.Spinner}.
|
|
10
|
+
*
|
|
9
11
|
* @example
|
|
10
12
|
* ```tsx
|
|
11
13
|
* <Spinner size={Size.Md} />
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Spinner.d.ts","sourceRoot":"","sources":["../../../src/components/Spinner/Spinner.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAGhD,OAAO,EAAE,IAAI,EAA6B,MAAM,SAAS,CAAC;AAG1D,MAAM,WAAW,YAAa,SAAQ,cAAc,CAAC,cAAc,CAAC;IAClE,IAAI,CAAC,EAAE,IAAI,CAAC;CACb;AAUD
|
|
1
|
+
{"version":3,"file":"Spinner.d.ts","sourceRoot":"","sources":["../../../src/components/Spinner/Spinner.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAGhD,OAAO,EAAE,IAAI,EAA6B,MAAM,SAAS,CAAC;AAG1D,MAAM,WAAW,YAAa,SAAQ,cAAc,CAAC,cAAc,CAAC;IAClE,IAAI,CAAC,EAAE,IAAI,CAAC;CACb;AAUD;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,OAAO,EAAE,EAAE,CAAC,YAAY,CAepC,CAAC"}
|