@malloydata/malloy-explorer 0.0.257-dev250410160631
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/.editorconfig +8 -0
- package/.github/workflows/prerelease.yaml +28 -0
- package/.github/workflows/test.yaml +26 -0
- package/.node-version +1 -0
- package/.prettierrc.js +8 -0
- package/.vscode/extensions.json +6 -0
- package/@flowtypes/components/MalloyExplorerProvider.flow.js +13 -0
- package/@flowtypes/components/QueryPanel/QueryActionBar.flow.js +10 -0
- package/@flowtypes/components/QueryPanel/QueryEditor.flow.js +9 -0
- package/@flowtypes/components/ResultPanel/ResultPanel.flow.js +14 -0
- package/@flowtypes/components/ResultPanel/SubmittedQuery.flow.js +32 -0
- package/@flowtypes/components/SourcePanel/SourcePanel.flow.js +9 -0
- package/@flowtypes/contexts/ExplorerPanelsContext.flow.js +6 -0
- package/@flowtypes/index.flow.js +18 -0
- package/CONTRIBUTING.md +44 -0
- package/LICENSE +9 -0
- package/README.md +23 -0
- package/babel.config.mjs +35 -0
- package/dist/cjs/index.cjs +30740 -0
- package/dist/cjs/index.cjs.map +1 -0
- package/dist/esm/index.js +30723 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/malloy-explorer.css +422 -0
- package/dist/types/components/ErrorElement.d.ts +18 -0
- package/dist/types/components/FieldHoverCard.d.ts +13 -0
- package/dist/types/components/FieldToken.d.ts +19 -0
- package/dist/types/components/Label.d.ts +5 -0
- package/dist/types/components/MalloyExplorerProvider.d.ts +11 -0
- package/dist/types/components/QueryPanel/AddMenu/AddAggregate.d.ts +6 -0
- package/dist/types/components/QueryPanel/AddMenu/AddEmptyNest.d.ts +6 -0
- package/dist/types/components/QueryPanel/AddMenu/AddFieldItem.d.ts +15 -0
- package/dist/types/components/QueryPanel/AddMenu/AddGroupBy.d.ts +6 -0
- package/dist/types/components/QueryPanel/AddMenu/AddItem.d.ts +9 -0
- package/dist/types/components/QueryPanel/AddMenu/AddLimit.d.ts +6 -0
- package/dist/types/components/QueryPanel/AddMenu/AddMenu.d.ts +6 -0
- package/dist/types/components/QueryPanel/AddMenu/AddOrderBy.d.ts +6 -0
- package/dist/types/components/QueryPanel/AddMenu/AddView.d.ts +7 -0
- package/dist/types/components/QueryPanel/AddMenu/AddWhere.d.ts +6 -0
- package/dist/types/components/QueryPanel/AddMenu/FieldList.d.ts +11 -0
- package/dist/types/components/QueryPanel/AddMenu/FieldMenu.d.ts +10 -0
- package/dist/types/components/QueryPanel/AddMenu/ValueList.d.ts +10 -0
- package/dist/types/components/QueryPanel/AddMenu/colors.stylex.d.ts +7 -0
- package/dist/types/components/QueryPanel/AddMenu/hooks/useSearch.d.ts +10 -0
- package/dist/types/components/QueryPanel/AddMenu/styles.d.ts +34 -0
- package/dist/types/components/QueryPanel/FieldHover.d.ts +10 -0
- package/dist/types/components/QueryPanel/LiteralValueEditor.d.ts +9 -0
- package/dist/types/components/QueryPanel/Operations.d.ts +6 -0
- package/dist/types/components/QueryPanel/Parameters.d.ts +8 -0
- package/dist/types/components/QueryPanel/Query.d.ts +8 -0
- package/dist/types/components/QueryPanel/QueryActionBar.d.ts +11 -0
- package/dist/types/components/QueryPanel/QueryEditor.d.ts +15 -0
- package/dist/types/components/QueryPanel/QueryPanel.d.ts +10 -0
- package/dist/types/components/QueryPanel/Source.d.ts +8 -0
- package/dist/types/components/QueryPanel/View.d.ts +6 -0
- package/dist/types/components/QueryPanel/ViewDefinition.d.ts +6 -0
- package/dist/types/components/QueryPanel/Visualization.d.ts +7 -0
- package/dist/types/components/QueryPanel/VisualizationIcon.d.ts +5 -0
- package/dist/types/components/QueryPanel/index.d.ts +3 -0
- package/dist/types/components/QueryPanel/operations/AggregateOperations.d.ts +7 -0
- package/dist/types/components/QueryPanel/operations/ClearButton.d.ts +4 -0
- package/dist/types/components/QueryPanel/operations/GroupByOperations.d.ts +7 -0
- package/dist/types/components/QueryPanel/operations/LimitOperation.d.ts +7 -0
- package/dist/types/components/QueryPanel/operations/NestOperation.d.ts +7 -0
- package/dist/types/components/QueryPanel/operations/OperationActionTitle.d.ts +12 -0
- package/dist/types/components/QueryPanel/operations/OrderByOperations.d.ts +7 -0
- package/dist/types/components/QueryPanel/operations/WhereOperations.d.ts +7 -0
- package/dist/types/components/QueryPanel/operations/hover.stylex.d.ts +17 -0
- package/dist/types/components/ResultPanel/BookmarkedView.d.ts +7 -0
- package/dist/types/components/ResultPanel/EmptyQueryDisplay.d.ts +6 -0
- package/dist/types/components/ResultPanel/ResultDisplay.d.ts +6 -0
- package/dist/types/components/ResultPanel/ResultPanel.d.ts +14 -0
- package/dist/types/components/ResultPanel/SubmittedQuery.d.ts +28 -0
- package/dist/types/components/ResultPanel/ViewAttributeTable.d.ts +9 -0
- package/dist/types/components/ResultPanel/Visualization.d.ts +5 -0
- package/dist/types/components/ResultPanel/index.d.ts +1 -0
- package/dist/types/components/SourcePanel/AddFieldDropdownMenu.d.ts +13 -0
- package/dist/types/components/SourcePanel/FieldGroupList.d.ts +10 -0
- package/dist/types/components/SourcePanel/FieldTokenWithActions.d.ts +7 -0
- package/dist/types/components/SourcePanel/NestFieldDropdownMenu.d.ts +12 -0
- package/dist/types/components/SourcePanel/OperationDropdownMenuItems.d.ts +10 -0
- package/dist/types/components/SourcePanel/SearchResultList.d.ts +8 -0
- package/dist/types/components/SourcePanel/SourcePanel.d.ts +7 -0
- package/dist/types/components/SourcePanel/field-token.stylex.d.ts +3 -0
- package/dist/types/components/SourcePanel/hooks/useNestOperations.d.ts +9 -0
- package/dist/types/components/SourcePanel/hooks/useOperations.d.ts +8 -0
- package/dist/types/components/SourcePanel/index.d.ts +1 -0
- package/dist/types/components/SourcePanel/utils.d.ts +24 -0
- package/dist/types/components/TopValuesTable.d.ts +7 -0
- package/dist/types/components/filters/BooleanFilterToken.d.ts +11 -0
- package/dist/types/components/filters/DateTimeFilterToken.d.ts +12 -0
- package/dist/types/components/filters/NumberFilterToken.d.ts +13 -0
- package/dist/types/components/filters/PillInput.d.ts +18 -0
- package/dist/types/components/filters/StringFilterToken.d.ts +14 -0
- package/dist/types/components/filters/index.d.ts +0 -0
- package/dist/types/components/hooks/useClickOutside.d.ts +1 -0
- package/dist/types/components/primitives/Badge.d.ts +37 -0
- package/dist/types/components/primitives/BadgeForField.d.ts +6 -0
- package/dist/types/components/primitives/Banner.d.ts +36 -0
- package/dist/types/components/primitives/Button.d.ts +92 -0
- package/dist/types/components/primitives/Card.d.ts +12 -0
- package/dist/types/components/primitives/CodeBlock.d.ts +26 -0
- package/dist/types/components/primitives/CollapsibleListItem.d.ts +16 -0
- package/dist/types/components/primitives/CollapsiblePanel.d.ts +13 -0
- package/dist/types/components/primitives/DOMElement.d.ts +5 -0
- package/dist/types/components/primitives/DatePicker.d.ts +9 -0
- package/dist/types/components/primitives/Divider.d.ts +24 -0
- package/dist/types/components/primitives/DropdownMenu.d.ts +33 -0
- package/dist/types/components/primitives/ErrorIcon.d.ts +8 -0
- package/dist/types/components/primitives/Icon.d.ts +57 -0
- package/dist/types/components/primitives/List.d.ts +9 -0
- package/dist/types/components/primitives/ListItem.d.ts +21 -0
- package/dist/types/components/primitives/NumberInput.d.ts +10 -0
- package/dist/types/components/primitives/Popover.d.ts +19 -0
- package/dist/types/components/primitives/ResizeBar.d.ts +7 -0
- package/dist/types/components/primitives/ScrollableArea.d.ts +9 -0
- package/dist/types/components/primitives/SelectDropdown.d.ts +31 -0
- package/dist/types/components/primitives/Spinner.d.ts +22 -0
- package/dist/types/components/primitives/TextInput.d.ts +54 -0
- package/dist/types/components/primitives/badge.stylex.d.ts +6 -0
- package/dist/types/components/primitives/button.stylex.d.ts +6 -0
- package/dist/types/components/primitives/colors.stylex.d.ts +39 -0
- package/dist/types/components/primitives/dropdown-menu.stylex.d.ts +9 -0
- package/dist/types/components/primitives/index.d.ts +22 -0
- package/dist/types/components/primitives/scrollable-area.stylex.d.ts +6 -0
- package/dist/types/components/primitives/styles.d.ts +74 -0
- package/dist/types/components/primitives/syntax_highlighting/malloyGrammar.d.ts +279 -0
- package/dist/types/components/primitives/syntax_highlighting/syntaxHighlighter.d.ts +6 -0
- package/dist/types/components/primitives/syntax_highlighting/transformers/lineNumberTransformer.d.ts +3 -0
- package/dist/types/components/primitives/syntax_highlighting/transformers/lineSpacingTransformer.d.ts +8 -0
- package/dist/types/components/primitives/syntax_highlighting/transformers/transformers.d.ts +8 -0
- package/dist/types/components/primitives/tokens/EditableToken.d.ts +50 -0
- package/dist/types/components/primitives/tokens/SelectorToken.d.ts +18 -0
- package/dist/types/components/primitives/tokens/Token.d.ts +49 -0
- package/dist/types/components/primitives/tokens/TokenGroup.d.ts +21 -0
- package/dist/types/components/primitives/tokens/styles.d.ts +45 -0
- package/dist/types/components/primitives/tokens/token.stylex.d.ts +6 -0
- package/dist/types/components/primitives/tokens/types.d.ts +5 -0
- package/dist/types/components/primitives/utils/icon.d.ts +388 -0
- package/dist/types/components/styles.d.ts +66 -0
- package/dist/types/components/utils/fields.d.ts +9 -0
- package/dist/types/components/utils/icon.d.ts +7 -0
- package/dist/types/components/utils/renderer.d.ts +6 -0
- package/dist/types/components/utils/segment.d.ts +6 -0
- package/dist/types/contexts/ExplorerPanelsContext.d.ts +11 -0
- package/dist/types/contexts/QueryEditorContext.d.ts +25 -0
- package/dist/types/hooks/useQueryBuilder.d.ts +3 -0
- package/dist/types/index.d.ts +8 -0
- package/dist/types/types/error.d.ts +8 -0
- package/eslint.config.mjs +156 -0
- package/index.html +19 -0
- package/package.json +109 -0
- package/postcss.config.mjs +20 -0
- package/scripts/env.d.ts +3 -0
- package/scripts/gen_flow.ts +38 -0
- package/scripts/malloy-packages.ts +17 -0
- package/scripts/tsconfig.json +8 -0
- package/tsconfig.json +16 -0
- package/vite.config.mts +65 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export type Variant = keyof typeof variantColors;
|
|
3
|
+
export interface BannerProps {
|
|
4
|
+
/**
|
|
5
|
+
* Title.
|
|
6
|
+
*/
|
|
7
|
+
title: string;
|
|
8
|
+
/**
|
|
9
|
+
* Optional description.
|
|
10
|
+
*/
|
|
11
|
+
description?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Semantic coloring variant; defaults to 'info.'
|
|
14
|
+
*/
|
|
15
|
+
variant?: Variant;
|
|
16
|
+
/**
|
|
17
|
+
* Optional content; displayed on a neutral background below the header.
|
|
18
|
+
*/
|
|
19
|
+
children?: React.ReactNode;
|
|
20
|
+
}
|
|
21
|
+
export default function Banner({ title, description, variant, children, }: BannerProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
declare const variantColors: Readonly<{
|
|
23
|
+
readonly info: Readonly<{
|
|
24
|
+
readonly backgroundColor: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"backgroundColor", string>;
|
|
25
|
+
}>;
|
|
26
|
+
readonly success: Readonly<{
|
|
27
|
+
readonly backgroundColor: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"backgroundColor", string>;
|
|
28
|
+
}>;
|
|
29
|
+
readonly warn: Readonly<{
|
|
30
|
+
readonly backgroundColor: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"backgroundColor", string>;
|
|
31
|
+
}>;
|
|
32
|
+
readonly critical: Readonly<{
|
|
33
|
+
readonly backgroundColor: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"backgroundColor", string>;
|
|
34
|
+
}>;
|
|
35
|
+
}>;
|
|
36
|
+
export {};
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { IconType } from './utils/icon';
|
|
3
|
+
type Variant = keyof typeof colorVariants;
|
|
4
|
+
type Size = keyof typeof sizeVariants;
|
|
5
|
+
interface ButtonProps extends React.ComponentProps<'button'> {
|
|
6
|
+
/**
|
|
7
|
+
* The variant of the button.
|
|
8
|
+
*/
|
|
9
|
+
variant?: Variant;
|
|
10
|
+
/**
|
|
11
|
+
* The size of the button.
|
|
12
|
+
*/
|
|
13
|
+
size?: Size;
|
|
14
|
+
/**
|
|
15
|
+
* The label to display on the button.
|
|
16
|
+
*/
|
|
17
|
+
label?: string;
|
|
18
|
+
/**
|
|
19
|
+
* The tooltip to show when hovering over the button. All buttons without a label need a tooltip.
|
|
20
|
+
*/
|
|
21
|
+
tooltip?: string;
|
|
22
|
+
/**
|
|
23
|
+
* The icon to be shown either to the left of the label or centered (if label is not provided).
|
|
24
|
+
*/
|
|
25
|
+
icon?: IconType;
|
|
26
|
+
/**
|
|
27
|
+
* The click event handler for the button.
|
|
28
|
+
*
|
|
29
|
+
* @param event - The React mouse event.
|
|
30
|
+
*/
|
|
31
|
+
onClick?: (event: React.MouseEvent) => void;
|
|
32
|
+
/**
|
|
33
|
+
* Whether the button is disabled.
|
|
34
|
+
*/
|
|
35
|
+
isDisabled?: boolean;
|
|
36
|
+
}
|
|
37
|
+
export default function Button({ variant, size, icon, label, tooltip, onClick, isDisabled, ...props }: ButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
38
|
+
declare const colorVariants: Readonly<{
|
|
39
|
+
readonly default: Readonly<{
|
|
40
|
+
readonly [x: string]: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<string, {
|
|
41
|
+
readonly default: "rgba(230, 235, 239, 1)";
|
|
42
|
+
readonly ':hover': "rgba(221, 226, 232, 1)";
|
|
43
|
+
readonly ':active': "rgba(204, 211, 219, 1)";
|
|
44
|
+
readonly ':disabled'?: undefined;
|
|
45
|
+
} | {
|
|
46
|
+
readonly default: import("@stylexjs/stylex/lib/StyleXTypes").StyleXVar<string>;
|
|
47
|
+
readonly ':disabled': import("@stylexjs/stylex/lib/StyleXTypes").StyleXVar<string>;
|
|
48
|
+
readonly ':hover'?: undefined;
|
|
49
|
+
readonly ':active'?: undefined;
|
|
50
|
+
}>;
|
|
51
|
+
readonly background: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"background", "rgba(204, 211, 219, 1)" | "rgba(230, 235, 239, 1)" | "rgba(221, 226, 232, 1)">;
|
|
52
|
+
}>;
|
|
53
|
+
readonly flat: Readonly<{
|
|
54
|
+
readonly [x: string]: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<string, {
|
|
55
|
+
readonly default: "transparent";
|
|
56
|
+
readonly ':hover': "rgba(0, 0, 0, 0.05)";
|
|
57
|
+
readonly ':active': "rgba(0, 0, 0, 0.1)";
|
|
58
|
+
readonly ':disabled'?: undefined;
|
|
59
|
+
} | {
|
|
60
|
+
readonly default: import("@stylexjs/stylex/lib/StyleXTypes").StyleXVar<string>;
|
|
61
|
+
readonly ':disabled': import("@stylexjs/stylex/lib/StyleXTypes").StyleXVar<string>;
|
|
62
|
+
readonly ':hover'?: undefined;
|
|
63
|
+
readonly ':active'?: undefined;
|
|
64
|
+
}>;
|
|
65
|
+
readonly background: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"background", "transparent" | "rgba(0, 0, 0, 0.05)" | "rgba(0, 0, 0, 0.1)">;
|
|
66
|
+
}>;
|
|
67
|
+
readonly primary: Readonly<{
|
|
68
|
+
readonly [x: string]: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<string, {
|
|
69
|
+
readonly default: "rgba(0, 100, 224, 1)";
|
|
70
|
+
readonly ':hover': "rgba(4, 87, 203, 1)";
|
|
71
|
+
readonly ':active': "rgba(0, 76, 188, 1)";
|
|
72
|
+
readonly ':disabled'?: undefined;
|
|
73
|
+
} | {
|
|
74
|
+
readonly default: import("@stylexjs/stylex/lib/StyleXTypes").StyleXVar<string>;
|
|
75
|
+
readonly ':disabled': import("@stylexjs/stylex/lib/StyleXTypes").StyleXVar<string>;
|
|
76
|
+
readonly ':hover'?: undefined;
|
|
77
|
+
readonly ':active'?: undefined;
|
|
78
|
+
}>;
|
|
79
|
+
readonly background: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"background", "rgba(0, 100, 224, 1)" | "rgba(4, 87, 203, 1)" | "rgba(0, 76, 188, 1)">;
|
|
80
|
+
}>;
|
|
81
|
+
}>;
|
|
82
|
+
declare const sizeVariants: Readonly<{
|
|
83
|
+
readonly default: Readonly<{
|
|
84
|
+
readonly height: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"height", "36px">;
|
|
85
|
+
readonly padding: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"padding", "8px 12px">;
|
|
86
|
+
}>;
|
|
87
|
+
readonly compact: Readonly<{
|
|
88
|
+
readonly height: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"height", "28px">;
|
|
89
|
+
readonly padding: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"padding", "4px 8px">;
|
|
90
|
+
}>;
|
|
91
|
+
}>;
|
|
92
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { StyleXStyles } from '@stylexjs/stylex';
|
|
3
|
+
interface CardProps {
|
|
4
|
+
/**
|
|
5
|
+
* Optional header content for the Card.
|
|
6
|
+
*/
|
|
7
|
+
header?: React.ReactNode;
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
customStyle?: StyleXStyles;
|
|
10
|
+
}
|
|
11
|
+
export default function Card({ header, children, customStyle }: CardProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { SupportedLang, SupportedTheme } from './syntax_highlighting/syntaxHighlighter';
|
|
2
|
+
import { LineSpacing } from './syntax_highlighting/transformers/lineSpacingTransformer';
|
|
3
|
+
interface CodeBlockProps {
|
|
4
|
+
/**
|
|
5
|
+
* Code to be highlighted & displayed.
|
|
6
|
+
*/
|
|
7
|
+
code: string;
|
|
8
|
+
/**
|
|
9
|
+
* Language used for syntax highlighting.
|
|
10
|
+
*/
|
|
11
|
+
language: SupportedLang;
|
|
12
|
+
/**
|
|
13
|
+
* Display theme. Defaults 'light-plus'.
|
|
14
|
+
*/
|
|
15
|
+
theme?: SupportedTheme;
|
|
16
|
+
/**
|
|
17
|
+
* Include 1-indexed line numbering. Defaults true.
|
|
18
|
+
*/
|
|
19
|
+
lineNumbers?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Line spacing. Defaults double.
|
|
22
|
+
*/
|
|
23
|
+
spacing?: LineSpacing;
|
|
24
|
+
}
|
|
25
|
+
export default function CodeBlock({ code, language, theme, lineNumbers, spacing, }: CodeBlockProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface CollapsibleListItemProps {
|
|
3
|
+
/**
|
|
4
|
+
* The label for the list item.
|
|
5
|
+
*/
|
|
6
|
+
label: string;
|
|
7
|
+
/**
|
|
8
|
+
* The sublabel for the list item.
|
|
9
|
+
*/
|
|
10
|
+
sublabel?: string;
|
|
11
|
+
/**
|
|
12
|
+
* The children items to render.
|
|
13
|
+
*/
|
|
14
|
+
children: React.ReactNode[];
|
|
15
|
+
}
|
|
16
|
+
export default function CollapsibleListItem({ label, sublabel, children, }: CollapsibleListItemProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { IconType } from './utils/icon';
|
|
4
|
+
interface CollapsiblePanelProps {
|
|
5
|
+
title: string;
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
icon?: IconType;
|
|
8
|
+
defaultOpen?: boolean;
|
|
9
|
+
controls?: ReactNode;
|
|
10
|
+
collapsedControls?: ReactNode;
|
|
11
|
+
}
|
|
12
|
+
export default function CollapsiblePanel({ title, children, icon, defaultOpen, controls, collapsedControls, }: CollapsiblePanelProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { StyleXStyles } from '@stylexjs/stylex';
|
|
2
|
+
interface DatePickerProps {
|
|
3
|
+
value: Date;
|
|
4
|
+
setValue: (value: Date) => void;
|
|
5
|
+
maxLevel: 'year' | 'month' | 'day' | 'quarter' | 'week' | 'hour' | 'minute' | 'second';
|
|
6
|
+
style?: StyleXStyles;
|
|
7
|
+
}
|
|
8
|
+
export default function DatePicker({ value, setValue, maxLevel, style, }: DatePickerProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { StyleXStyles } from '@stylexjs/stylex/lib/StyleXTypes';
|
|
2
|
+
type Orientation = keyof typeof orientationVariants;
|
|
3
|
+
interface DividerProps {
|
|
4
|
+
/**
|
|
5
|
+
* Either `horizontal` or `vertical`. Defaults to `horizontal`.
|
|
6
|
+
*/
|
|
7
|
+
orientation?: Orientation;
|
|
8
|
+
/**
|
|
9
|
+
* Custom styles for the divider.
|
|
10
|
+
*/
|
|
11
|
+
customStyle?: StyleXStyles;
|
|
12
|
+
}
|
|
13
|
+
export default function Divider({ orientation, customStyle, }: DividerProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
declare const orientationVariants: Readonly<{
|
|
15
|
+
readonly horizontal: Readonly<{
|
|
16
|
+
readonly height: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"height", "1px">;
|
|
17
|
+
readonly width: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"width", "100%">;
|
|
18
|
+
}>;
|
|
19
|
+
readonly vertical: Readonly<{
|
|
20
|
+
readonly height: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"height", "100px">;
|
|
21
|
+
readonly width: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"width", "1px">;
|
|
22
|
+
}>;
|
|
23
|
+
}>;
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ReactElement } from 'react';
|
|
3
|
+
import { IconType } from '.';
|
|
4
|
+
type Modifiers = Pick<React.MouseEvent, 'altKey' | 'ctrlKey' | 'metaKey' | 'shiftKey'>;
|
|
5
|
+
type DropdownMenuChild = React.ReactElement<DropdownMenuItemProps, typeof DropdownMenuItem> | React.ReactElement<DropdownSubMenuItemProps, typeof DropdownSubMenuItem> | React.ReactElement<DropdownMenuLabelProps, typeof DropdownMenuLabel>;
|
|
6
|
+
interface DropdownMenuProps {
|
|
7
|
+
trigger: ReactElement;
|
|
8
|
+
tooltip?: string | ReactElement;
|
|
9
|
+
onOpenChange?: (open: boolean) => void;
|
|
10
|
+
children: DropdownMenuChild | DropdownMenuChild[];
|
|
11
|
+
}
|
|
12
|
+
export declare function DropdownMenu({ trigger, tooltip, onOpenChange, children, }: DropdownMenuProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
interface DropdownMenuItemProps {
|
|
14
|
+
icon?: IconType;
|
|
15
|
+
label: string;
|
|
16
|
+
sublabel?: string;
|
|
17
|
+
onClick?: (modifiers: Modifiers) => void;
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export declare function DropdownMenuItem({ icon, label, sublabel, onClick, disabled, }: DropdownMenuItemProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
interface DropdownSubMenuItemProps {
|
|
22
|
+
icon?: IconType;
|
|
23
|
+
label: string;
|
|
24
|
+
sublabel?: string;
|
|
25
|
+
disabled?: boolean;
|
|
26
|
+
children: DropdownMenuChild | DropdownMenuChild[];
|
|
27
|
+
}
|
|
28
|
+
export declare function DropdownSubMenuItem({ icon, label, sublabel, disabled, children, }: DropdownSubMenuItemProps): import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
interface DropdownMenuLabelProps {
|
|
30
|
+
label: string;
|
|
31
|
+
}
|
|
32
|
+
export declare function DropdownMenuLabel({ label }: DropdownMenuLabelProps): import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
export {};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { StyleXStyles } from '@stylexjs/stylex';
|
|
2
|
+
import { IconType } from './utils/icon';
|
|
3
|
+
type Color = keyof typeof colorVariants;
|
|
4
|
+
export interface IconProps {
|
|
5
|
+
/**
|
|
6
|
+
* The name of the icon to render.
|
|
7
|
+
*/
|
|
8
|
+
name: IconType;
|
|
9
|
+
/**
|
|
10
|
+
* The color of the icon.
|
|
11
|
+
*/
|
|
12
|
+
color?: Color;
|
|
13
|
+
/**
|
|
14
|
+
* Custom styles for the icon.
|
|
15
|
+
*/
|
|
16
|
+
customStyle?: StyleXStyles;
|
|
17
|
+
}
|
|
18
|
+
export default function Icon({ name, color, customStyle, }: IconProps): import("react/jsx-runtime").JSX.Element | null;
|
|
19
|
+
declare const colorVariants: Readonly<{
|
|
20
|
+
readonly primary: Readonly<{
|
|
21
|
+
readonly color: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"color", string>;
|
|
22
|
+
}>;
|
|
23
|
+
readonly secondary: Readonly<{
|
|
24
|
+
readonly color: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"color", string>;
|
|
25
|
+
}>;
|
|
26
|
+
readonly disabled: Readonly<{
|
|
27
|
+
readonly color: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"color", string>;
|
|
28
|
+
}>;
|
|
29
|
+
readonly primaryOnMedia: Readonly<{
|
|
30
|
+
readonly color: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"color", string>;
|
|
31
|
+
}>;
|
|
32
|
+
readonly gray: Readonly<{
|
|
33
|
+
readonly color: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"color", string>;
|
|
34
|
+
}>;
|
|
35
|
+
readonly purple: Readonly<{
|
|
36
|
+
readonly color: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"color", string>;
|
|
37
|
+
}>;
|
|
38
|
+
readonly green: Readonly<{
|
|
39
|
+
readonly color: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"color", string>;
|
|
40
|
+
}>;
|
|
41
|
+
readonly cyan: Readonly<{
|
|
42
|
+
readonly color: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"color", string>;
|
|
43
|
+
}>;
|
|
44
|
+
readonly info: Readonly<{
|
|
45
|
+
readonly color: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"color", string>;
|
|
46
|
+
}>;
|
|
47
|
+
readonly warning: Readonly<{
|
|
48
|
+
readonly color: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"color", string>;
|
|
49
|
+
}>;
|
|
50
|
+
readonly positive: Readonly<{
|
|
51
|
+
readonly color: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"color", string>;
|
|
52
|
+
}>;
|
|
53
|
+
readonly negative: Readonly<{
|
|
54
|
+
readonly color: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"color", string>;
|
|
55
|
+
}>;
|
|
56
|
+
}>;
|
|
57
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface ListItemProps {
|
|
3
|
+
/**
|
|
4
|
+
* The label for the list item.
|
|
5
|
+
*/
|
|
6
|
+
label: string;
|
|
7
|
+
/**
|
|
8
|
+
* The icon to display at the start of the list item.
|
|
9
|
+
*/
|
|
10
|
+
startIcon?: React.ReactElement;
|
|
11
|
+
/**
|
|
12
|
+
* The badge to display in the list item.
|
|
13
|
+
*/
|
|
14
|
+
badge?: React.ReactElement;
|
|
15
|
+
/**
|
|
16
|
+
* The icon to display at the end of the list item.
|
|
17
|
+
*/
|
|
18
|
+
endIcon?: React.ReactElement;
|
|
19
|
+
onClick: () => void;
|
|
20
|
+
}
|
|
21
|
+
export default function ListItem({ label, startIcon, badge, endIcon, onClick, }: ListItemProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
interface NumberInputProps {
|
|
2
|
+
value: number;
|
|
3
|
+
setValue: (value: number) => void;
|
|
4
|
+
placeholder?: string;
|
|
5
|
+
label?: string;
|
|
6
|
+
autoFocus?: boolean;
|
|
7
|
+
width?: string;
|
|
8
|
+
}
|
|
9
|
+
export default function NumberInput({ value, setValue, placeholder, label, autoFocus, width, }: NumberInputProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React, { ReactNode, RefObject } from 'react';
|
|
2
|
+
import { StyleXStyles } from '@stylexjs/stylex';
|
|
3
|
+
type Placement = 'top' | 'top-start' | 'top-end' | 'right' | 'right-start' | 'right-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end';
|
|
4
|
+
interface PopoverProps {
|
|
5
|
+
open: boolean;
|
|
6
|
+
setOpen: (open: boolean) => void;
|
|
7
|
+
width?: number | string;
|
|
8
|
+
maxHeight?: number | undefined;
|
|
9
|
+
placement?: Placement;
|
|
10
|
+
referenceDiv?: RefObject<HTMLDivElement>;
|
|
11
|
+
zIndex?: number;
|
|
12
|
+
xOffset?: number;
|
|
13
|
+
yOffset?: number;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
children: ReactNode;
|
|
16
|
+
customStyle?: StyleXStyles;
|
|
17
|
+
}
|
|
18
|
+
export declare const Popover: React.FC<PopoverProps>;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
interface ScrollableAreaProps {
|
|
3
|
+
/**
|
|
4
|
+
* The content to be rendered inside the scrollable area.
|
|
5
|
+
*/
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
export default function ScrollableArea({ children }: ScrollableAreaProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { JSX } from 'react';
|
|
2
|
+
import { StyleXStyles } from '@stylexjs/stylex';
|
|
3
|
+
interface SelectDropdownProps<T> {
|
|
4
|
+
autoFocus?: boolean;
|
|
5
|
+
value: T | undefined;
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
onChange?: (newValue: T) => void;
|
|
8
|
+
options: {
|
|
9
|
+
label: string | JSX.Element;
|
|
10
|
+
value: T;
|
|
11
|
+
divider?: boolean;
|
|
12
|
+
}[];
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
valueEqual?: (a: T, b: T) => boolean;
|
|
15
|
+
width?: number | string;
|
|
16
|
+
customStyle?: StyleXStyles;
|
|
17
|
+
}
|
|
18
|
+
export declare const SelectDropdown: <T>({ autoFocus, value, onChange, options, placeholder, disabled, valueEqual, width, customStyle, }: SelectDropdownProps<T>) => JSX.Element;
|
|
19
|
+
interface SelectListProps<T> {
|
|
20
|
+
value: T | undefined;
|
|
21
|
+
options: {
|
|
22
|
+
label: string | JSX.Element;
|
|
23
|
+
value: T;
|
|
24
|
+
divider?: boolean;
|
|
25
|
+
}[];
|
|
26
|
+
valueEqual?: (a: T, b: T) => boolean;
|
|
27
|
+
onChange: (value: T) => void;
|
|
28
|
+
customStyle?: StyleXStyles;
|
|
29
|
+
}
|
|
30
|
+
export declare function SelectList<T>({ options, value, onChange, valueEqual, customStyle, }: SelectListProps<T>): JSX.Element;
|
|
31
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { StyleXStyles } from '@stylexjs/stylex';
|
|
2
|
+
declare const SIZES: {
|
|
3
|
+
large: {
|
|
4
|
+
border: number;
|
|
5
|
+
diameter: number;
|
|
6
|
+
};
|
|
7
|
+
medium: {
|
|
8
|
+
border: number;
|
|
9
|
+
diameter: number;
|
|
10
|
+
};
|
|
11
|
+
small: {
|
|
12
|
+
border: number;
|
|
13
|
+
diameter: number;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
type SpinnerSize = keyof typeof SIZES;
|
|
17
|
+
interface SpinnerProps {
|
|
18
|
+
size: SpinnerSize;
|
|
19
|
+
customStyle?: StyleXStyles;
|
|
20
|
+
}
|
|
21
|
+
export default function Spinner({ size, customStyle }: SpinnerProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { StyleXStyles } from '@stylexjs/stylex';
|
|
3
|
+
import { IconType } from './utils/icon';
|
|
4
|
+
type Size = keyof typeof sizeVariants;
|
|
5
|
+
interface TextInputProps {
|
|
6
|
+
/**
|
|
7
|
+
* The current value of the text input.
|
|
8
|
+
*/
|
|
9
|
+
value: string;
|
|
10
|
+
/**
|
|
11
|
+
* A hint to the user about what to enter in the text input.
|
|
12
|
+
*/
|
|
13
|
+
placeholder?: string;
|
|
14
|
+
/**
|
|
15
|
+
* The size of the text input.
|
|
16
|
+
*/
|
|
17
|
+
size?: Size;
|
|
18
|
+
/**
|
|
19
|
+
* An icon to display inside the text input.
|
|
20
|
+
*/
|
|
21
|
+
icon?: IconType;
|
|
22
|
+
/**
|
|
23
|
+
* Called when the text input's value changes.
|
|
24
|
+
*
|
|
25
|
+
* @param value The new value of the text input.
|
|
26
|
+
*/
|
|
27
|
+
onChange: (value: string) => void;
|
|
28
|
+
/**
|
|
29
|
+
* Whether to display a clear button in the text input.
|
|
30
|
+
*/
|
|
31
|
+
hasClear?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Called when a key is pressed while the input element has focus.
|
|
34
|
+
*
|
|
35
|
+
* @param event The keyboard event that triggered this callback.
|
|
36
|
+
*/
|
|
37
|
+
onKeyDown?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
38
|
+
/**
|
|
39
|
+
* Custom styles to apply to the component.
|
|
40
|
+
*
|
|
41
|
+
* Use this prop to override or extend the default styles of the component.
|
|
42
|
+
*/
|
|
43
|
+
customStyle?: StyleXStyles;
|
|
44
|
+
}
|
|
45
|
+
export default function TextInput({ value, placeholder, size, icon, onChange, onKeyDown, hasClear, customStyle, }: TextInputProps): import("react/jsx-runtime").JSX.Element;
|
|
46
|
+
declare const sizeVariants: Readonly<{
|
|
47
|
+
readonly default: Readonly<{
|
|
48
|
+
readonly padding: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"padding", "8px 12px">;
|
|
49
|
+
}>;
|
|
50
|
+
readonly compact: Readonly<{
|
|
51
|
+
readonly padding: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"padding", "4px 8px">;
|
|
52
|
+
}>;
|
|
53
|
+
}>;
|
|
54
|
+
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export declare const backgroundColors: import("@stylexjs/stylex").VarGroup<Readonly<{
|
|
2
|
+
gray: string;
|
|
3
|
+
purple: string;
|
|
4
|
+
green: string;
|
|
5
|
+
cyan: string;
|
|
6
|
+
washOnWeb: string;
|
|
7
|
+
accentDeemphasized: string;
|
|
8
|
+
positiveDeemphasized: string;
|
|
9
|
+
warningDeemphasized: string;
|
|
10
|
+
negativeDeemphasized: string;
|
|
11
|
+
divider: string;
|
|
12
|
+
token: string;
|
|
13
|
+
}>, symbol>;
|
|
14
|
+
export declare const textColors: import("@stylexjs/stylex").VarGroup<Readonly<{
|
|
15
|
+
primary: string;
|
|
16
|
+
secondary: string;
|
|
17
|
+
disabled: string;
|
|
18
|
+
link: string;
|
|
19
|
+
primaryOnDarkMedia: string;
|
|
20
|
+
gray: string;
|
|
21
|
+
purple: string;
|
|
22
|
+
green: string;
|
|
23
|
+
cyan: string;
|
|
24
|
+
dimension: string;
|
|
25
|
+
}>, symbol>;
|
|
26
|
+
export declare const iconColors: import("@stylexjs/stylex").VarGroup<Readonly<{
|
|
27
|
+
primary: string;
|
|
28
|
+
secondary: string;
|
|
29
|
+
disabled: string;
|
|
30
|
+
primaryOnMedia: string;
|
|
31
|
+
gray: string;
|
|
32
|
+
purple: string;
|
|
33
|
+
green: string;
|
|
34
|
+
cyan: string;
|
|
35
|
+
warning: string;
|
|
36
|
+
accent: string;
|
|
37
|
+
positive: string;
|
|
38
|
+
negative: string;
|
|
39
|
+
}>, symbol>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const iconVars: import("@stylexjs/stylex").VarGroup<Readonly<{
|
|
2
|
+
color: null;
|
|
3
|
+
}>, symbol>;
|
|
4
|
+
export declare const labelVars: import("@stylexjs/stylex").VarGroup<Readonly<{
|
|
5
|
+
color: null;
|
|
6
|
+
}>, symbol>;
|
|
7
|
+
export declare const sublabelVars: import("@stylexjs/stylex").VarGroup<Readonly<{
|
|
8
|
+
color: null;
|
|
9
|
+
}>, symbol>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export { default as Badge } from './Badge';
|
|
2
|
+
export { default as Divider } from './Divider';
|
|
3
|
+
export { default as Icon } from './Icon';
|
|
4
|
+
export { default as List } from './List';
|
|
5
|
+
export { default as ListItem } from './ListItem';
|
|
6
|
+
export { default as ScrollableArea } from './ScrollableArea';
|
|
7
|
+
export { default as Button } from './Button';
|
|
8
|
+
export { default as Token } from './tokens/Token';
|
|
9
|
+
export { default as TokenGroup } from './tokens/TokenGroup';
|
|
10
|
+
export { default as EditableToken } from './tokens/EditableToken';
|
|
11
|
+
export { default as SelectorToken } from './tokens/SelectorToken';
|
|
12
|
+
export { default as Card } from './Card';
|
|
13
|
+
export { default as TextInput } from './TextInput';
|
|
14
|
+
export { default as CollapsibleListItem } from './CollapsibleListItem';
|
|
15
|
+
export { default as CodeBlock } from './CodeBlock';
|
|
16
|
+
export { default as Spinner } from './Spinner';
|
|
17
|
+
export { default as NumberInput } from './NumberInput';
|
|
18
|
+
export { default as DatePicker } from './DatePicker';
|
|
19
|
+
export { default as ResizeBar } from './ResizeBar';
|
|
20
|
+
export { default as Banner } from './Banner';
|
|
21
|
+
export { DropdownMenu, DropdownMenuItem, DropdownSubMenuItem, DropdownMenuLabel, } from './DropdownMenu';
|
|
22
|
+
export { type IconType } from './utils/icon';
|