@voxel51/voodo 2.9.0 → 2.10.0-app-revamp.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.
Files changed (71) hide show
  1. package/dist/components/Avatar/Avatar.d.ts +32 -2
  2. package/dist/components/Avatar/Avatar.d.ts.map +1 -1
  3. package/dist/components/Checkbox/Checkbox.d.ts.map +1 -1
  4. package/dist/components/ChipSelect/ChipSelect.d.ts +51 -0
  5. package/dist/components/ChipSelect/ChipSelect.d.ts.map +1 -0
  6. package/dist/components/ChipSelect/index.d.ts +2 -0
  7. package/dist/components/ChipSelect/index.d.ts.map +1 -0
  8. package/dist/components/CodeBlock/CodeBlock.d.ts +29 -0
  9. package/dist/components/CodeBlock/CodeBlock.d.ts.map +1 -0
  10. package/dist/components/CodeBlock/index.d.ts +2 -0
  11. package/dist/components/CodeBlock/index.d.ts.map +1 -0
  12. package/dist/components/Combobox/Combobox.d.ts +23 -4
  13. package/dist/components/Combobox/Combobox.d.ts.map +1 -1
  14. package/dist/components/Dropdown/DropdownTrigger.d.ts +7 -4
  15. package/dist/components/Dropdown/DropdownTrigger.d.ts.map +1 -1
  16. package/dist/components/EmptyArt/EmptyArt.d.ts +96 -0
  17. package/dist/components/EmptyArt/EmptyArt.d.ts.map +1 -0
  18. package/dist/components/EmptyArt/index.d.ts +2 -0
  19. package/dist/components/EmptyArt/index.d.ts.map +1 -0
  20. package/dist/components/EmptyState/EmptyState.d.ts +14 -1
  21. package/dist/components/EmptyState/EmptyState.d.ts.map +1 -1
  22. package/dist/components/FilterBar/FilterBar.d.ts +33 -0
  23. package/dist/components/FilterBar/FilterBar.d.ts.map +1 -0
  24. package/dist/components/FilterBar/index.d.ts +2 -0
  25. package/dist/components/FilterBar/index.d.ts.map +1 -0
  26. package/dist/components/FilterChip/FilterChip.d.ts +28 -0
  27. package/dist/components/FilterChip/FilterChip.d.ts.map +1 -0
  28. package/dist/components/FilterChip/index.d.ts +2 -0
  29. package/dist/components/FilterChip/index.d.ts.map +1 -0
  30. package/dist/components/IconAction/IconAction.d.ts +9 -2
  31. package/dist/components/IconAction/IconAction.d.ts.map +1 -1
  32. package/dist/components/Icons/icons.d.ts +23 -1
  33. package/dist/components/Icons/icons.d.ts.map +1 -1
  34. package/dist/components/Input/Input.d.ts +5 -1
  35. package/dist/components/Input/Input.d.ts.map +1 -1
  36. package/dist/components/Input/SearchInput.d.ts +53 -0
  37. package/dist/components/Input/SearchInput.d.ts.map +1 -0
  38. package/dist/components/Input/index.d.ts +1 -0
  39. package/dist/components/Input/index.d.ts.map +1 -1
  40. package/dist/components/ListRow/ListRow.d.ts +36 -0
  41. package/dist/components/ListRow/ListRow.d.ts.map +1 -0
  42. package/dist/components/ListRow/index.d.ts +2 -0
  43. package/dist/components/ListRow/index.d.ts.map +1 -0
  44. package/dist/components/LiveToggle/LiveToggle.d.ts +39 -0
  45. package/dist/components/LiveToggle/LiveToggle.d.ts.map +1 -0
  46. package/dist/components/LiveToggle/index.d.ts +2 -0
  47. package/dist/components/LiveToggle/index.d.ts.map +1 -0
  48. package/dist/components/Modal/Modal.d.ts +3 -0
  49. package/dist/components/Modal/Modal.d.ts.map +1 -1
  50. package/dist/components/Pill/Pill.d.ts +6 -1
  51. package/dist/components/Pill/Pill.d.ts.map +1 -1
  52. package/dist/components/Radio/Radio.d.ts.map +1 -1
  53. package/dist/components/RichButton/RichButton.d.ts.map +1 -1
  54. package/dist/components/Select/Select.d.ts.map +1 -1
  55. package/dist/components/Table/Table.d.ts +1 -1
  56. package/dist/components/Tabs/Tabs.d.ts.map +1 -1
  57. package/dist/components/TagInput/TagInput.d.ts +54 -0
  58. package/dist/components/TagInput/TagInput.d.ts.map +1 -0
  59. package/dist/components/TagInput/index.d.ts +2 -0
  60. package/dist/components/TagInput/index.d.ts.map +1 -0
  61. package/dist/components/Tooltip/Tooltip.d.ts.map +1 -1
  62. package/dist/components/index.d.ts +8 -0
  63. package/dist/components/index.d.ts.map +1 -1
  64. package/dist/index.cjs +1 -1
  65. package/dist/index.cjs.map +1 -1
  66. package/dist/index.js +5594 -4257
  67. package/dist/index.js.map +1 -1
  68. package/dist/util/useCompactRow.d.ts +2 -0
  69. package/dist/util/useCompactRow.d.ts.map +1 -1
  70. package/dist/voodo.css +1 -1
  71. package/package.json +2 -1
@@ -1,23 +1,53 @@
1
- import { FC, HTMLAttributes } from 'react';
1
+ import { FC, HTMLAttributes, ReactNode } from 'react';
2
2
  import { Size } from '../../types';
3
3
  export type AvatarSize = `${Size.Sm | Size.Md | Size.Lg}`;
4
+ /** `"auto"`: a fill picked from the name; `"neutral"`: the muted fill. */
5
+ export type AvatarTone = "auto" | "neutral";
4
6
  export interface AvatarProps extends HTMLAttributes<HTMLSpanElement> {
5
7
  name: string;
6
8
  src?: string;
7
9
  size?: AvatarSize;
10
+ /** Shows the name beside the avatar, truncating, as in a "Run by" cell. */
11
+ showName?: boolean;
12
+ /** With `showName`, a second line under the name, such as an email. */
13
+ subtitle?: ReactNode;
14
+ tone?: AvatarTone;
15
+ /** Shown in place of the initials (an invite, a group), on the muted fill. */
16
+ icon?: ReactNode;
17
+ /** What picks the colour, such as an email; defaults to the initials. */
18
+ colorKey?: string;
19
+ /** Rounded square instead of a circle, for a group rather than a person. */
20
+ square?: boolean;
8
21
  }
9
22
  /**
10
23
  * A round picture of a person, falling back to their initials when there is
11
- * no image.
24
+ * no image or it fails to load.
12
25
  *
13
26
  * @example
14
27
  * ```tsx
15
28
  * <Avatar name="Ada Lovelace" src={user.photoUrl} size="sm" />
29
+ * <Avatar name={run.runBy.name} size="sm" showName />
30
+ * <Avatar name="Ada Lovelace" size="lg" showName subtitle="ada@example.com" />
31
+ * <Avatar name="Ada Lovelace" tone="neutral" />
32
+ * <Avatar name="ada@example.com" icon={<MailOutlineIcon size="md" />} />
33
+ * <Avatar name="Labelers" icon={<UsersRoundIcon size={14} />} />
34
+ * <Avatar name="Ada Lovelace" colorKey={user.email} />
16
35
  * ```
17
36
  *
18
37
  * @param name The person's name: it makes the initials and the accessible label.
19
38
  * @param src Image URL. Initials show when it is missing.
20
39
  * @param size `"sm"` (20px), `"md"` (24px) or `"lg"` (32px). Defaults to `"md"`.
40
+ * @param showName Shows the name beside the avatar (body text, truncating).
41
+ * @param subtitle With `showName`, a second line under a larger name, such
42
+ * as an email or a group's description; both lines truncate.
43
+ * @param tone `"auto"` (default): initials on one of twenty tuned colours
44
+ * picked from `colorKey`, the same for a key everywhere; `"neutral"`: on the
45
+ * muted fill.
46
+ * @param icon Shown in place of the initials when there is no image, on the
47
+ * muted fill: a person not known yet (an invite) or not a person (a group).
48
+ * @param colorKey What picks the colour: a stable id such as the email.
49
+ * Defaults to the initials.
50
+ * @param square Rounded square instead of a circle, for a group.
21
51
  * @param className `class` overrides to apply to the component.
22
52
  * @param props Additional HTML properties to apply to the component.
23
53
  */
@@ -1 +1 @@
1
- {"version":3,"file":"Avatar.d.ts","sourceRoot":"","sources":["../../../src/components/Avatar/Avatar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAIhD,OAAO,EAIL,IAAI,EAIL,MAAM,SAAS,CAAC;AAGjB,MAAM,MAAM,UAAU,GAAG,GAAG,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;AAE1D,MAAM,WAAW,WAAY,SAAQ,cAAc,CAAC,eAAe,CAAC;IAClE,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,UAAU,CAAC;CACnB;AAgBD;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,MAAM,EAAE,EAAE,CAAC,WAAW,CA0BlC,CAAC"}
1
+ {"version":3,"file":"Avatar.d.ts","sourceRoot":"","sources":["../../../src/components/Avatar/Avatar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,EAAE,EACP,KAAK,cAAc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ChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAsBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,eAAO,MAAM,QAAQ,EAAE,EAAE,CAAC,aAAa,CAwFtC,CAAC"}
@@ -0,0 +1,51 @@
1
+ import { JSX } from 'react';
2
+ import { ButtonProps } from '../Button';
3
+ export interface ChipSelectOption<T extends string = string> {
4
+ id: T;
5
+ label: string;
6
+ }
7
+ export interface ChipSelectProps<T extends string = string> {
8
+ /** The choices, one checked at a time. */
9
+ options: ChipSelectOption<T>[];
10
+ /** The `id` of the checked option. */
11
+ value: T;
12
+ /** Called with the `id` of the option picked. */
13
+ onChange: (value: T) => void;
14
+ /** Names the control; also the accessible name of the trigger. */
15
+ "aria-label": string;
16
+ /** Leading icon of the trigger. */
17
+ icon?: ButtonProps["leadingIcon"];
18
+ /** What the value is (`Sort by`), shown before it; on a phone only in the tooltip. */
19
+ prefix?: string;
20
+ /** The trigger text, when it should differ from the checked option's label (a count, say). */
21
+ label?: string;
22
+ "data-cy"?: string;
23
+ }
24
+ /**
25
+ * A borderless single-choice menu for filter and sort rows: an icon, an optional
26
+ * `prefix: value` and a caret, opening a checklist of options.
27
+ *
28
+ * @example
29
+ * ```tsx
30
+ * <ChipSelect
31
+ * aria-label="Sort by"
32
+ * prefix="Sort by"
33
+ * icon={ArrowDownWideNarrowIcon}
34
+ * value={sort}
35
+ * onChange={setSort}
36
+ * options={[
37
+ * { id: "newest", label: "Newest" },
38
+ * { id: "oldest", label: "Oldest" },
39
+ * ]}
40
+ * />
41
+ * ```
42
+ *
43
+ * @param options The choices, one checked at a time. See {@link ChipSelectOption}.
44
+ * @param value The `id` of the checked option.
45
+ * @param onChange Called with the `id` of the option picked.
46
+ * @param icon Leading icon of the trigger.
47
+ * @param prefix What the value is, shown before it. Below 640px only the value shows and a tooltip names both.
48
+ * @param label The trigger text, when it should differ from the checked option's label. Defaults to that label.
49
+ */
50
+ export declare function ChipSelect<T extends string = string>({ options, value, onChange, icon, prefix, label, "aria-label": ariaLabel, "data-cy": dataCy, }: ChipSelectProps<T>): JSX.Element;
51
+ //# sourceMappingURL=ChipSelect.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChipSelect.d.ts","sourceRoot":"","sources":["../../../src/components/ChipSelect/ChipSelect.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAKvD,MAAM,WAAW,gBAAgB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM;IACzD,EAAE,EAAE,CAAC,CAAC;IACN,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,eAAe,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM;IACxD,0CAA0C;IAC1C,OAAO,EAAE,gBAAgB,CAAC,CAAC,CAAC,EAAE,CAAC;IAC/B,sCAAsC;IACtC,KAAK,EAAE,CAAC,CAAC;IACT,iDAAiD;IACjD,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC;IAC7B,kEAAkE;IAClE,YAAY,EAAE,MAAM,CAAC;IACrB,mCAAmC;IACnC,IAAI,CAAC,EAAE,WAAW,CAAC,aAAa,CAAC,CAAC;IAClC,sFAAsF;IACtF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,8FAA8F;IAC9F,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,UAAU,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,EACpD,OAAO,EACP,KAAK,EACL,QAAQ,EACR,IAAI,EACJ,MAAM,EACN,KAAK,EACL,YAAY,EAAE,SAAS,EACvB,SAAS,EAAE,MAAM,GAClB,EAAE,eAAe,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,OAAO,CA6BlC"}
@@ -0,0 +1,2 @@
1
+ export * from './ChipSelect';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ChipSelect/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
@@ -0,0 +1,29 @@
1
+ import { FC, HTMLAttributes, ReactNode } from 'react';
2
+ export interface CodeBlockProps extends Omit<HTMLAttributes<HTMLDivElement>, "onCopy" | "children"> {
3
+ code: string;
4
+ children?: ReactNode;
5
+ language?: string;
6
+ onCopy?: (code: string) => void;
7
+ }
8
+ /**
9
+ * A read-only code snippet on a card, with a copy action in its corner.
10
+ *
11
+ * @param code The code to show and copy.
12
+ * @param language A Prism language for syntax colours (`"python"`, `"json"`,
13
+ * `"yaml"`, `"ts"`, ...). Defaults to `"python"`; unknown languages render plain.
14
+ * @param children Already highlighted markup to show instead of `language`
15
+ * colours; `code` is still what is copied.
16
+ * @param onCopy Called with the code after it is copied.
17
+ * @param props Additional HTML properties to apply to the card.
18
+ *
19
+ * @example
20
+ * ```tsx
21
+ * <CodeBlock
22
+ * language="python"
23
+ * code={'import fiftyone as fo\n\ndataset = fo.load_dataset("quickstart")'}
24
+ * onCopy={() => toast("Copied")}
25
+ * />
26
+ * ```
27
+ */
28
+ export declare const CodeBlock: FC<CodeBlockProps>;
29
+ //# sourceMappingURL=CodeBlock.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CodeBlock.d.ts","sourceRoot":"","sources":["../../../src/components/CodeBlock/CodeBlock.tsx"],"names":[],"mappings":"AACA,OAAO,EAGL,KAAK,EAAE,EACP,KAAK,cAAc,EACnB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAwDf,MAAM,WAAW,cAAe,SAAQ,IAAI,CAC1C,cAAc,CAAC,cAAc,CAAC,EAC9B,QAAQ,GAAG,UAAU,CACtB;IACC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACjC;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,SAAS,EAAE,EAAE,CAAC,cAAc,CA4DxC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './CodeBlock';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/CodeBlock/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}
@@ -1,4 +1,4 @@
1
- import { FC, HTMLAttributes, ReactNode } from 'react';
1
+ import { FC, HTMLAttributes, ReactNode, RefObject } from 'react';
2
2
  import { IconInput } from '../Icons';
3
3
  import { Size, ZIndex } from '../../types';
4
4
  /** `data-*` attributes a host attaches to a part — a test id, a tracking hook. */
@@ -11,6 +11,11 @@ export interface ComboboxOption {
11
11
  label: string;
12
12
  /** Optional second line — a definition, a slug, an owner. */
13
13
  description?: ReactNode;
14
+ /**
15
+ * The section the row belongs to. A titled section starts wherever the
16
+ * group changes, so pass the rows ordered by group.
17
+ */
18
+ group?: string;
14
19
  /** `data-*` attributes for the row — a test id, a tracking hook. */
15
20
  [dataAttribute: `data-${string}`]: string | undefined;
16
21
  }
@@ -71,6 +76,18 @@ export interface ComboboxProps extends Omit<HTMLAttributes<HTMLDivElement>, "onC
71
76
  * @default false
72
77
  */
73
78
  portal?: boolean;
79
+ /**
80
+ * With `portal`, the element the list drops under and takes its width
81
+ * from, instead of the field — for a field inside a larger frame, such as
82
+ * a search bar, whose list spans the frame.
83
+ */
84
+ anchor?: RefObject<HTMLElement | null>;
85
+ /**
86
+ * The list always shows, in the flow under the field, with no frame of its
87
+ * own — for a picker inside a popover, like a command palette. Escape and
88
+ * picking still report `onOpenChange(false)`, so the host can close.
89
+ */
90
+ inline?: boolean;
74
91
  /** Explicit z-index for the list. A portaled list defaults to above-modal. */
75
92
  zIndex?: ZIndex;
76
93
  /**
@@ -87,8 +104,8 @@ export interface ComboboxProps extends Omit<HTMLAttributes<HTMLDivElement>, "onC
87
104
  /** Focus the field on mount — for a combobox that opens on demand. */
88
105
  focusOnMount?: boolean;
89
106
  /**
90
- * Highlight the first row whenever there is text, so Enter takes the top
91
- * match without an arrow key first. Off by default: with it off, Enter on
107
+ * Highlight the first row whenever there is text (an inline list: always),
108
+ * so Enter takes the top match without an arrow key first. Off by default: with it off, Enter on
92
109
  * unmatched text commits free text (or nothing), never a row the user
93
110
  * has not pointed at.
94
111
  * @default false
@@ -145,12 +162,14 @@ export interface ComboboxProps extends Omit<HTMLAttributes<HTMLDivElement>, "onC
145
162
  * @param emptyMessage Shown when there are no options; a function receives `close`.
146
163
  * @param className `class` overrides for the wrapper.
147
164
  * @param portal Render the list in a portal, anchored to the field.
165
+ * @param anchor With `portal`, the element the list drops under instead of the field.
166
+ * @param inline The list always shows, in the flow, unframed.
148
167
  * @param zIndex Explicit z-index for the list.
149
168
  * @param commitOnBlur Commit free text on blur (default `true`).
150
169
  * @param borderless No frame on the field.
151
170
  * @param icon A leading icon in the field.
152
171
  * @param focusOnMount Focus the field on mount.
153
- * @param autoHighlight Highlight the first row whenever there is text.
172
+ * @param autoHighlight Highlight the first row whenever there is text (inline: always).
154
173
  * @param inputProps Attributes for the field itself.
155
174
  * @param header Shown above the list's contents whenever the list is open.
156
175
  * @param listProps Attributes for the list.
@@ -1 +1 @@
1
- {"version":3,"file":"Combobox.d.ts","sourceRoot":"","sources":["../../../src/components/Combobox/Combobox.tsx"],"names":[],"mappings":"AASA,OAAO,EAML,KAAK,EAAE,EACP,KAAK,cAAc,EAEnB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE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,gBAAgB,CAAC,GAAG,cAAc,CAAC;IAC/D,4EAA4E;IAC5E,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,2CAA2C;IAC3C,SAAS,CAAC,EAAE,cAAc,CAAC,cAAc,CAAC,GAAG,cAAc,CAAC;IAC5D,2CAA2C;IAC3C,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;;OAIG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IACvC;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,8EAA8E;IAC9E,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;;OAKG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,sEAAsE;IACtE,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,iEAAiE;IACjE,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,sEAAsE;IACtE,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;;;;;OAMG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAgCD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+DG;AACH,eAAO,MAAM,QAAQ,EAAE,EAAE,CAAC,aAAa,CA4TtC,CAAC"}
@@ -31,11 +31,14 @@ export type DropdownTriggerProps = Omit<ButtonProps, "variant" | "trailingIcon">
31
31
  * ```
32
32
  *
33
33
  * @param children Button label.
34
- * @param prefix What the value names, shown as `prefix: value`. Below 640px
35
- * only the value shows and a tooltip reads prefix and value; the
36
- * `aria-label` keeps both unless one is passed.
34
+ * @param prefix What the value names, shown as `prefix: value`. Below 640px,
35
+ * or in a row out of room (`useCompactRow`, `OverflowRow`), only the value
36
+ * shows and a tooltip reads prefix and value; the `aria-label` keeps both
37
+ * unless one is passed.
37
38
  * @param size Button size. Defaults to `"sm"`.
38
- * @param borderless No outline; a rounded fill appears on hover.
39
+ * @param borderless No outline; a rounded fill appears on hover. The leading
40
+ * icon shrinks to 14px and both icons take the muted icon colour.
41
+ * @param leadingIcon Optional icon before the label.
39
42
  * @param props Additional {@link ButtonProps} (excluding `variant` and `trailingIcon`).
40
43
  */
41
44
  export declare const DropdownTrigger: FC<DropdownTriggerProps>;
@@ -1 +1 @@
1
- {"version":3,"file":"DropdownTrigger.d.ts","sourceRoot":"","sources":["../../../src/components/Dropdown/DropdownTrigger.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,EAAE,KAAK,SAAS,EAAiC,MAAM,OAAO,CAAC;AAE/E,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAY/D,MAAM,MAAM,oBAAoB,GAAG,IAAI,CACrC,WAAW,EACX,SAAS,GAAG,cAAc,CAC3B,GAAG;IACF,8FAA8F;IAC9F,MAAM,CAAC,EAAE,SAAS,CAAC;CACpB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CA2CpD,CAAC"}
1
+ {"version":3,"file":"DropdownTrigger.d.ts","sourceRoot":"","sources":["../../../src/components/Dropdown/DropdownTrigger.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,EAAE,EACP,KAAK,SAAS,EAIf,MAAM,OAAO,CAAC;AAEf,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,qBAAqB,CAAC;AA4C/D,MAAM,MAAM,oBAAoB,GAAG,IAAI,CACrC,WAAW,EACX,SAAS,GAAG,cAAc,CAC3B,GAAG;IACF,8FAA8F;IAC9F,MAAM,CAAC,EAAE,SAAS,CAAC;CACpB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CAuEpD,CAAC"}
@@ -0,0 +1,96 @@
1
+ import { FC } from 'react';
2
+ export interface EmptyArtProps {
3
+ className?: string;
4
+ }
5
+ /**
6
+ * Attention travelling across a frame and resolving into a thread: the
7
+ * "no comments yet" art.
8
+ *
9
+ * @example
10
+ * ```tsx
11
+ * <EmptyState art={<CommentsEmptyArt />} title="No comments yet" />
12
+ * ```
13
+ *
14
+ * @param className Extra classes for the SVG; it fills its container's width.
15
+ */
16
+ export declare const CommentsEmptyArt: FC<EmptyArtProps>;
17
+ /**
18
+ * A timeline assembling itself: the "no history yet" art.
19
+ *
20
+ * @example
21
+ * ```tsx
22
+ * <EmptyState art={<HistoryEmptyArt />} title="No history yet" />
23
+ * ```
24
+ *
25
+ * @param className Extra classes for the SVG; it fills its container's width.
26
+ */
27
+ export declare const HistoryEmptyArt: FC<EmptyArtProps>;
28
+ /**
29
+ * A scan converging on one match in a grid: the "no results" art.
30
+ *
31
+ * @example
32
+ * ```tsx
33
+ * <EmptyState art={<SearchEmptyArt />} title="Nothing matches yet" />
34
+ * ```
35
+ *
36
+ * @param className Extra classes for the SVG; it fills its container's width.
37
+ */
38
+ export declare const SearchEmptyArt: FC<EmptyArtProps>;
39
+ /**
40
+ * Scattered samples pulled into a neighbourhood around one anchor: the
41
+ * "no similarity index yet" art.
42
+ *
43
+ * @example
44
+ * ```tsx
45
+ * <EmptyState art={<SimilarityEmptyArt />} title="No similarity index yet" />
46
+ * ```
47
+ *
48
+ * @param className Extra classes for the SVG; it fills its container's width.
49
+ */
50
+ export declare const SimilarityEmptyArt: FC<EmptyArtProps>;
51
+ /**
52
+ * Bars rising into a comparison, a scorecard writing itself: the
53
+ * "no evaluations yet" art.
54
+ *
55
+ * @example
56
+ * ```tsx
57
+ * <EmptyState art={<EvaluationEmptyArt />} title="No evaluations yet" />
58
+ * ```
59
+ *
60
+ * @param className Extra classes for the SVG; it fills its container's width.
61
+ */
62
+ export declare const EvaluationEmptyArt: FC<EmptyArtProps>;
63
+ /**
64
+ * A panel surface assembling itself: the neutral "nothing here yet" art.
65
+ *
66
+ * @example
67
+ * ```tsx
68
+ * <EmptyState art={<PanelEmptyArt />} title="No runs yet" />
69
+ * ```
70
+ *
71
+ * @param className Extra classes for the SVG; it fills its container's width.
72
+ */
73
+ export declare const PanelEmptyArt: FC<EmptyArtProps>;
74
+ /**
75
+ * A box drawn and locked onto its subject: the "no annotations yet" art.
76
+ *
77
+ * @example
78
+ * ```tsx
79
+ * <EmptyState art={<AnnotationEmptyArt />} title="No annotations yet" />
80
+ * ```
81
+ *
82
+ * @param className Extra classes for the SVG; it fills its container's width.
83
+ */
84
+ export declare const AnnotationEmptyArt: FC<EmptyArtProps>;
85
+ /**
86
+ * Weights settling into a served model: the "no models yet" art.
87
+ *
88
+ * @example
89
+ * ```tsx
90
+ * <EmptyState art={<ModelsEmptyArt />} title="No models yet" />
91
+ * ```
92
+ *
93
+ * @param className Extra classes for the SVG; it fills its container's width.
94
+ */
95
+ export declare const ModelsEmptyArt: FC<EmptyArtProps>;
96
+ //# sourceMappingURL=EmptyArt.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EmptyArt.d.ts","sourceRoot":"","sources":["../../../src/components/EmptyArt/EmptyArt.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAsB,KAAK,EAAE,EAAyB,MAAM,OAAO,CAAC;AAM3E,MAAM,WAAW,aAAa;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAyCD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,aAAa,CAwH9C,CAAC;AAGF;;;;;;;;;GASG;AACH,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,aAAa,CAkD7C,CAAC;AAGF;;;;;;;;;GASG;AACH,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,aAAa,CAoD5C,CAAC;AAGF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,kBAAkB,EAAE,EAAE,CAAC,aAAa,CAqDhD,CAAC;AAGF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,kBAAkB,EAAE,EAAE,CAAC,aAAa,CA0ChD,CAAC;AAGF;;;;;;;;;GASG;AACH,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,aAAa,CAoC3C,CAAC;AAGF;;;;;;;;;GASG;AACH,eAAO,MAAM,kBAAkB,EAAE,EAAE,CAAC,aAAa,CA6ChD,CAAC;AAGF;;;;;;;;;GASG;AACH,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,aAAa,CAuD5C,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './EmptyArt';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/EmptyArt/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC"}
@@ -1,8 +1,9 @@
1
- import { FC } from 'react';
1
+ import { FC, ReactNode } from 'react';
2
2
  import { IconInput } from '../Icons';
3
3
  import { StackProps } from '../Stack';
4
4
  export interface EmptyStateProps extends StackProps {
5
5
  icon?: IconInput;
6
+ art?: ReactNode;
6
7
  title: string;
7
8
  description?: string;
8
9
  }
@@ -18,9 +19,21 @@ export interface EmptyStateProps extends StackProps {
18
19
  * />
19
20
  * ```
20
21
  *
22
+ * With `art` (such as {@link PanelEmptyArt}), the illustration replaces the
23
+ * icon and the text follows the illustrated layout; `children` render below
24
+ * the text as an action area.
25
+ *
26
+ * ```tsx
27
+ * <EmptyState art={<PanelEmptyArt />} title="No runs yet">
28
+ * <Button variant="primary">Run a workflow</Button>
29
+ * </EmptyState>
30
+ * ```
31
+ *
21
32
  * @param icon The icon to display in the empty state: a per-icon component.
33
+ * @param art An illustration shown instead of the icon, 150px wide.
22
34
  * @param title The title to display in the empty state.
23
35
  * @param description An optional description to display in the empty state.
36
+ * @param children An optional action area below the text.
24
37
  * @param props Additional {@link Stack} properties to apply to the component.
25
38
  */
26
39
  export declare const EmptyState: FC<EmptyStateProps>;
@@ -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;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;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CAwC1C,CAAC"}
1
+ {"version":3,"file":"EmptyState.d.ts","sourceRoot":"","sources":["../../../src/components/EmptyState/EmptyState.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE3C,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,GAAG,CAAC,EAAE,SAAS,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CA+D1C,CAAC"}
@@ -0,0 +1,33 @@
1
+ import { FC, ReactNode } from 'react';
2
+ export interface FilterBarProps {
3
+ /** A title or heading: at the start of the row, or on its own row when narrow. */
4
+ leading?: ReactNode;
5
+ /** The search input; the bar sizes its slot. */
6
+ search?: ReactNode;
7
+ /** Filter and sort controls, such as {@link ChipSelect}s. */
8
+ children?: ReactNode;
9
+ /** Primary actions (a create button), kept at the end of the row. */
10
+ actions?: ReactNode;
11
+ }
12
+ /**
13
+ * The search, filter and action controls above a list. One row on a wide screen;
14
+ * below 1024px the title, then the search and actions, then the filters each
15
+ * take a row, the filters scrolling sideways.
16
+ *
17
+ * @example
18
+ * ```tsx
19
+ * <FilterBar
20
+ * search={<Input type="search" icon={SearchIcon} placeholder="Search" />}
21
+ * actions={<Button variant="primary" leadingIcon={AddIcon} collapse="sm">New</Button>}
22
+ * >
23
+ * <ChipSelect aria-label="Group by" prefix="Group by" value="none" onChange={() => {}} options={[{ id: "none", label: "None" }]} />
24
+ * </FilterBar>
25
+ * ```
26
+ *
27
+ * @param leading A title or heading: at the start of the row on a wide screen, on its own row below 1024px.
28
+ * @param search The search input. Its slot grows to fill the row.
29
+ * @param children Filter and sort controls.
30
+ * @param actions Primary actions, kept at the end of the row.
31
+ */
32
+ export declare const FilterBar: FC<FilterBarProps>;
33
+ //# sourceMappingURL=FilterBar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FilterBar.d.ts","sourceRoot":"","sources":["../../../src/components/FilterBar/FilterBar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAK3C,MAAM,WAAW,cAAc;IAC7B,kFAAkF;IAClF,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,gDAAgD;IAChD,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,6DAA6D;IAC7D,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,qEAAqE;IACrE,OAAO,CAAC,EAAE,SAAS,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,SAAS,EAAE,EAAE,CAAC,cAAc,CAoCxC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './FilterBar';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/FilterBar/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}
@@ -0,0 +1,28 @@
1
+ import { ButtonHTMLAttributes, FC, ReactNode } from 'react';
2
+ export interface FilterChipProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "children"> {
3
+ /** The chip text. */
4
+ children: ReactNode;
5
+ /** A count after the text, in a smaller muted figure. */
6
+ count?: number;
7
+ /** Whether the filter is on; shows the chip inverted and sets `aria-pressed`. */
8
+ selected?: boolean;
9
+ }
10
+ /**
11
+ * A pill button that toggles one filter, such as a tag in a tag cloud, with an
12
+ * optional count.
13
+ *
14
+ * @example
15
+ * ```tsx
16
+ * <FilterChip count={6} selected={on} onClick={() => setOn(!on)}>
17
+ * automotive
18
+ * </FilterChip>
19
+ * ```
20
+ *
21
+ * @param children The chip text.
22
+ * @param count A count after the text, shown smaller and muted, locale formatted.
23
+ * @param selected Whether the filter is on: the chip inverts and `aria-pressed` is set.
24
+ * @param className `class` overrides to apply to the component.
25
+ * @param props Additional button properties.
26
+ */
27
+ export declare const FilterChip: FC<FilterChipProps>;
28
+ //# sourceMappingURL=FilterChip.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FilterChip.d.ts","sourceRoot":"","sources":["../../../src/components/FilterChip/FilterChip.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oBAAoB,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAWjE,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAC3C,oBAAoB,CAAC,iBAAiB,CAAC,EACvC,UAAU,CACX;IACC,qBAAqB;IACrB,QAAQ,EAAE,SAAS,CAAC;IACpB,yDAAyD;IACzD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iFAAiF;IACjF,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CAsC1C,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './FilterChip';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/FilterChip/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
@@ -1,10 +1,15 @@
1
1
  import { ButtonHTMLAttributes, FC } from 'react';
2
2
  import { IconInput } from '../Icons';
3
3
  import { Size } from '../../types';
4
- type IconActionSize = `${Size.Sm | Size.Md | Size.Lg}`;
4
+ type IconActionSize = `${Size.Xs | Size.Sm | Size.Md | Size.Lg}`;
5
+ export type IconActionTone = "default" | "brand" | "danger";
5
6
  export interface IconActionProps extends ButtonHTMLAttributes<HTMLButtonElement> {
6
7
  icon: IconInput;
7
8
  size?: IconActionSize;
9
+ /** On (a pinned pin, say): a filled brand-coloured glyph on a nested-card fill. */
10
+ active?: boolean;
11
+ /** `"brand"`: brand-tinted on hover while off, as it is when on. `"danger"`: a danger fill on hover (remove, delete). */
12
+ tone?: IconActionTone;
8
13
  "aria-label": string;
9
14
  }
10
15
  /**
@@ -16,7 +21,9 @@ export interface IconActionProps extends ButtonHTMLAttributes<HTMLButtonElement>
16
21
  * ```
17
22
  *
18
23
  * @param icon The icon to show: a per-icon component such as `CloseIcon`.
19
- * @param size `"sm"`, `"md"` or `"lg"`. Defaults to `"md"`.
24
+ * @param size `"xs"`, `"sm"`, `"md"` or `"lg"`. Defaults to `"md"`.
25
+ * @param active Shows the action as on: a filled brand-coloured glyph on a nested-card fill, brand-tinted on hover.
26
+ * @param tone `"brand"` gives the off state the same brand-tinted hover (a pin that is not pinned yet); `"danger"` fills with the danger colour on hover (remove, delete). Defaults to `"default"`.
20
27
  * @param aria-label Required, because the action has no visible text.
21
28
  * @param className Additional CSS class names to apply to the button.
22
29
  * @param props Additional HTML button properties, such as `onClick`.
@@ -1 +1 @@
1
- {"version":3,"file":"IconAction.d.ts","sourceRoot":"","sources":["../../../src/components/IconAction/IconAction.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,oBAAoB,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAEtD,OAAO,EAAE,KAAK,SAAS,EAAe,MAAM,oBAAoB,CAAC;AAEjE,OAAO,EAML,IAAI,EAEL,MAAM,SAAS,CAAC;AAEjB,KAAK,cAAc,GAAG,GAAG,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;AAEvD,MAAM,WAAW,eAAgB,SAAQ,oBAAoB,CAAC,iBAAiB,CAAC;IAC9E,IAAI,EAAE,SAAS,CAAC;IAChB,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;CACtB;AAiBD;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CAsB1C,CAAC"}
1
+ {"version":3,"file":"IconAction.d.ts","sourceRoot":"","sources":["../../../src/components/IconAction/IconAction.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,oBAAoB,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAEtD,OAAO,EAAE,KAAK,SAAS,EAAe,MAAM,oBAAoB,CAAC;AAEjE,OAAO,EAOL,IAAI,EAEL,MAAM,SAAS,CAAC;AAEjB,KAAK,cAAc,GAAG,GAAG,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;AAEjE,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,OAAO,GAAG,QAAQ,CAAC;AAE5D,MAAM,WAAW,eAAgB,SAAQ,oBAAoB,CAAC,iBAAiB,CAAC;IAC9E,IAAI,EAAE,SAAS,CAAC;IAChB,IAAI,CAAC,EAAE,c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