@galaxy-io/dls 1.4.9 → 1.4.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/accordion/Accordion.d.ts +19 -2
- package/dist/accordion/Accordion.js +8 -0
- package/dist/avatar/Avatar.d.ts +9 -0
- package/dist/avatar/Avatar.js +4 -0
- package/dist/avatar/AvatarShimmer.d.ts +2 -0
- package/dist/avatar/AvatarShimmer.js +1 -0
- package/dist/backgrounds/CellGridBackground.d.ts +12 -1
- package/dist/backgrounds/CellGridBackground.js +5 -0
- package/dist/backgrounds/CrossGridBackground.d.ts +13 -1
- package/dist/backgrounds/CrossGridBackground.js +4 -0
- package/dist/backgrounds/DotGridBackground.d.ts +12 -1
- package/dist/backgrounds/DotGridBackground.js +4 -0
- package/dist/badge/Badge.d.ts +12 -0
- package/dist/badge/Badge.js +7 -0
- package/dist/beacons/Beacon.d.ts +7 -13
- package/dist/beacons/Beacon.js +3 -0
- package/dist/buttons/Button.d.ts +18 -0
- package/dist/buttons/Button.js +10 -1
- package/dist/charts/BarChart.js +3 -1
- package/dist/charts/ChartFrame.js +5 -7
- package/dist/charts/ChartLegend.js +1 -5
- package/dist/charts/ChartPrimitives.d.ts +1 -14
- package/dist/charts/ChartPrimitives.js +50 -69
- package/dist/charts/DashboardProvider.d.ts +47 -0
- package/dist/charts/DashboardProvider.js +52 -0
- package/dist/charts/LineChart.js +1 -0
- package/dist/charts/ProgressBar.d.ts +13 -1
- package/dist/charts/ProgressBar.js +7 -0
- package/dist/charts/StatChart.d.ts +10 -1
- package/dist/charts/StatChart.js +5 -0
- package/dist/charts/constants.d.ts +4 -18
- package/dist/charts/constants.js +5 -19
- package/dist/charts/useChartInteraction.d.ts +25 -8
- package/dist/charts/useChartInteraction.js +61 -6
- package/dist/chips/Chip.d.ts +20 -1
- package/dist/chips/Chip.js +9 -1
- package/dist/containers/FlexItem.d.ts +14 -12
- package/dist/containers/FlexItem.js +4 -0
- package/dist/containers/FlexWrapper.d.ts +29 -96
- package/dist/containers/FlexWrapper.js +12 -0
- package/dist/containers/GridWrapper.d.ts +25 -66
- package/dist/containers/GridWrapper.js +8 -0
- package/dist/containers/Spacing.d.ts +10 -0
- package/dist/containers/Spacing.js +7 -0
- package/dist/containers/Wrapper.d.ts +11 -1
- package/dist/containers/Wrapper.js +4 -0
- package/dist/dividers/HorizontalDivider.d.ts +2 -0
- package/dist/dividers/HorizontalDivider.js +1 -0
- package/dist/dividers/VerticalDivider.d.ts +4 -0
- package/dist/dividers/VerticalDivider.js +4 -0
- package/dist/drawer/Drawer.d.ts +11 -4
- package/dist/drawer/Drawer.js +7 -0
- package/dist/dropdown/Dropdown.d.ts +24 -0
- package/dist/dropdown/Dropdown.js +9 -0
- package/dist/editor/CodeEditor.d.ts +23 -42
- package/dist/editor/CodeEditor.js +9 -1
- package/dist/hooks/useDismiss.d.ts +6 -0
- package/dist/hooks/useDismiss.js +6 -0
- package/dist/hooks/useElementClientSize.d.ts +2 -2
- package/dist/hooks/useResize.d.ts +5 -2
- package/dist/icons/GalaxyLogomark.d.ts +9 -1
- package/dist/icons/GalaxyLogomark.js +7 -1
- package/dist/icons/GalaxyLogomark3D.d.ts +15 -0
- package/dist/icons/GalaxyLogomark3D.js +9 -0
- package/dist/icons/GalaxyLogomarkAnimation.d.ts +10 -0
- package/dist/icons/GalaxyLogomarkAnimation.js +7 -1
- package/dist/icons/GalaxyWordmark.d.ts +7 -1
- package/dist/icons/GalaxyWordmark.js +5 -1
- package/dist/icons/Icon.d.ts +10 -0
- package/dist/icons/Icon.js +5 -0
- package/dist/inputs/CheckboxInput.d.ts +13 -0
- package/dist/inputs/CheckboxInput.js +8 -0
- package/dist/inputs/ColorInput.d.ts +15 -0
- package/dist/inputs/ColorInput.js +6 -0
- package/dist/inputs/CopyInput.d.ts +9 -0
- package/dist/inputs/CopyInput.js +4 -0
- package/dist/inputs/DateInput.d.ts +13 -0
- package/dist/inputs/DateInput.js +5 -0
- package/dist/inputs/Input.d.ts +37 -0
- package/dist/inputs/Input.js +13 -0
- package/dist/inputs/MultiSelectInput.d.ts +26 -0
- package/dist/inputs/MultiSelectInput.js +6 -0
- package/dist/inputs/MultiTextInput.d.ts +16 -0
- package/dist/inputs/MultiTextInput.js +9 -0
- package/dist/inputs/NumberInput.d.ts +8 -2
- package/dist/inputs/NumberInput.js +7 -1
- package/dist/inputs/PasswordInput.d.ts +9 -1
- package/dist/inputs/PasswordInput.js +4 -0
- package/dist/inputs/RadioInput.d.ts +13 -0
- package/dist/inputs/RadioInput.js +8 -0
- package/dist/inputs/SelectInput.d.ts +30 -0
- package/dist/inputs/SelectInput.js +8 -0
- package/dist/inputs/SliderInput.d.ts +15 -0
- package/dist/inputs/SliderInput.js +6 -0
- package/dist/inputs/SwitcherInput.d.ts +10 -1
- package/dist/inputs/SwitcherInput.js +4 -0
- package/dist/inputs/TextAreaInput.d.ts +24 -0
- package/dist/inputs/TextAreaInput.js +9 -0
- package/dist/inputs/TextInput.d.ts +8 -1
- package/dist/inputs/TextInput.js +6 -0
- package/dist/inputs/ToggleInput.d.ts +11 -0
- package/dist/inputs/ToggleInput.js +6 -0
- package/dist/lists/BulletedList.d.ts +4 -0
- package/dist/lists/BulletedList.js +2 -0
- package/dist/modal/Modal.d.ts +8 -0
- package/dist/modal/Modal.js +6 -0
- package/dist/overlay/OverlayProvider.d.ts +11 -0
- package/dist/overlay/OverlayProvider.js +7 -0
- package/dist/overlay/constants.d.ts +1 -0
- package/dist/overlay/constants.js +1 -0
- package/dist/overlay/useOverlay.d.ts +11 -0
- package/dist/overlay/useOverlay.js +9 -0
- package/dist/resizable/HorizontalResizeHandle.d.ts +8 -1
- package/dist/resizable/HorizontalResizeHandle.js +6 -0
- package/dist/resizable/VerticalResizeHandle.d.ts +8 -1
- package/dist/resizable/VerticalResizeHandle.js +6 -0
- package/dist/shapes/Circle.d.ts +4 -1
- package/dist/shapes/Circle.js +1 -0
- package/dist/shapes/Square.d.ts +4 -1
- package/dist/shapes/Square.js +1 -0
- package/dist/styles.css +20 -21
- package/dist/table/InfiniteSpreadsheet.d.ts +7 -0
- package/dist/table/InfiniteSpreadsheet.js +7 -0
- package/dist/table/InfiniteTable.d.ts +8 -0
- package/dist/table/InfiniteTable.js +8 -0
- package/dist/table/VirtualizedInfiniteTable.d.ts +7 -0
- package/dist/table/VirtualizedInfiniteTable.js +7 -0
- package/dist/text/Bold.d.ts +4 -0
- package/dist/text/Bold.js +4 -0
- package/dist/text/Code.d.ts +4 -0
- package/dist/text/Code.js +4 -0
- package/dist/text/EditableText.d.ts +10 -1
- package/dist/text/EditableText.js +7 -0
- package/dist/text/Ellipsis.d.ts +6 -4
- package/dist/text/Ellipsis.js +4 -0
- package/dist/text/HotKeys.d.ts +10 -0
- package/dist/text/HotKeys.js +6 -0
- package/dist/text/MarkdownText.d.ts +9 -1
- package/dist/text/MarkdownText.js +6 -0
- package/dist/text/Paragraph.d.ts +17 -0
- package/dist/text/Paragraph.js +7 -0
- package/dist/text/RequiredMarker.d.ts +3 -1
- package/dist/text/RequiredMarker.js +1 -0
- package/dist/text/Selectable.d.ts +4 -0
- package/dist/text/Selectable.js +4 -0
- package/dist/text/Text.d.ts +19 -0
- package/dist/text/Text.js +10 -0
- package/dist/text/TextShimmer.d.ts +7 -0
- package/dist/text/TextShimmer.js +4 -0
- package/dist/theme/GalaxyTheme.d.ts +35 -4
- package/dist/theme/GalaxyTheme.js +13 -1
- package/dist/theme/constants.d.ts +1 -6
- package/dist/theme/constants.js +10 -15
- package/dist/theme/index.js +2 -1
- package/dist/theme/types.d.ts +21 -0
- package/dist/theme/types.js +10 -0
- package/dist/toast/Toast.d.ts +11 -0
- package/dist/toast/Toast.js +5 -0
- package/dist/toast/ToastProvider.d.ts +9 -0
- package/dist/toast/ToastProvider.js +4 -0
- package/dist/toast/useToast.d.ts +7 -0
- package/dist/toast/useToast.js +7 -0
- package/dist/tooltip/Tooltip.d.ts +19 -1
- package/dist/tooltip/Tooltip.js +9 -0
- package/dist/transform/Fade.d.ts +7 -0
- package/dist/transform/Fade.js +6 -0
- package/dist/transform/Flash.d.ts +4 -0
- package/dist/transform/Flash.js +4 -0
- package/dist/transform/Rotate.d.ts +7 -0
- package/dist/transform/Rotate.js +4 -0
- package/dist/transform/ScaleFade.d.ts +7 -0
- package/dist/transform/ScaleFade.js +6 -0
- package/dist/transform/Spin.d.ts +7 -0
- package/dist/transform/Spin.js +5 -0
- package/dist/widget/Widget.d.ts +18 -1
- package/dist/widget/Widget.js +5 -0
- package/package.json +1 -1
|
@@ -1,47 +1,77 @@
|
|
|
1
1
|
import { IconVariant } from "../icons/Icon";
|
|
2
2
|
import { TextSize, TextVariant } from "../text/Text";
|
|
3
3
|
import { InputSize } from "./Input";
|
|
4
|
+
/** Surface treatment of the closed trigger. Shared with `MultiSelectInput`. */
|
|
4
5
|
export declare enum SelectInputVariant {
|
|
5
6
|
BASE = "BASE",
|
|
6
7
|
PRIMARY = "PRIMARY",
|
|
7
8
|
SECONDARY = "SECONDARY",
|
|
8
9
|
TERTIARY = "TERTIARY"
|
|
9
10
|
}
|
|
11
|
+
/** One choice in a select. */
|
|
10
12
|
export interface SelectInputOption {
|
|
13
|
+
/** Stable identity — selection is matched on this, not on `value`. */
|
|
11
14
|
id: string;
|
|
15
|
+
/** What the user reads. */
|
|
12
16
|
label: string;
|
|
17
|
+
/** Your payload. Never inspected by the component. */
|
|
13
18
|
value: unknown;
|
|
19
|
+
/** Leading graphic, rendered as-is. */
|
|
14
20
|
icon?: React.ReactNode;
|
|
21
|
+
/** Color role for the label — for status-coded options. */
|
|
15
22
|
variant?: TextVariant;
|
|
16
23
|
}
|
|
24
|
+
/** A shortcut row pinned above the option list. */
|
|
17
25
|
export interface PinnedOption {
|
|
18
26
|
id: string;
|
|
19
27
|
label: string;
|
|
28
|
+
/** The `SelectInputOption.id` this shortcut selects. */
|
|
20
29
|
optionId: string;
|
|
21
30
|
}
|
|
22
31
|
export interface SelectInputProps {
|
|
23
32
|
label?: string;
|
|
33
|
+
/** @default SelectInputVariant.PRIMARY */
|
|
24
34
|
variant?: SelectInputVariant;
|
|
35
|
+
/** @default InputSize.MEDIUM */
|
|
25
36
|
size?: InputSize;
|
|
37
|
+
/** Every choice. Order is preserved. */
|
|
26
38
|
options: SelectInputOption[];
|
|
39
|
+
/** Controlled selection. `null` shows the placeholder. */
|
|
27
40
|
value?: SelectInputOption | null;
|
|
41
|
+
/** @default "Select an option..." */
|
|
28
42
|
placeholder?: string;
|
|
43
|
+
/** Called with the whole option, not just its id. */
|
|
29
44
|
onChange?: (value: SelectInputOption) => void;
|
|
45
|
+
/** Trigger width. A number is px. */
|
|
30
46
|
width?: number | string;
|
|
31
47
|
fillWidth?: boolean;
|
|
48
|
+
/** Panel width. Defaults to matching the trigger. */
|
|
32
49
|
dropdownWidth?: number | string;
|
|
33
50
|
isDisabled?: boolean;
|
|
34
51
|
isRequired?: boolean;
|
|
52
|
+
/** Controlled open state. Pair it with `onOpenChange`. */
|
|
35
53
|
isOpen?: boolean;
|
|
36
54
|
onOpenChange?: (isOpen: boolean) => void;
|
|
55
|
+
/** Adds a clear button to the trigger. Omit and the selection can't be cleared. */
|
|
37
56
|
onReset?: () => void;
|
|
57
|
+
/** Shortcut rows above the list — "All", "None", a recent choice. */
|
|
38
58
|
pinnedOptions?: PinnedOption[];
|
|
59
|
+
/** Message under the field; also switches the border to the error color. */
|
|
39
60
|
error?: string;
|
|
61
|
+
/** Supplying this turns the trigger into a search box. Return the filtered list. */
|
|
40
62
|
onSearch?: (searchTerm: string, options: SelectInputOption[]) => SelectInputOption[];
|
|
63
|
+
/** Debounce before `onSearch` fires, in ms. @default 300 */
|
|
41
64
|
debounceMs?: number;
|
|
42
65
|
}
|
|
43
66
|
export declare const SELECT_INPUT_VARIANT_TO_ICON_VARIANT_MAP: Record<SelectInputVariant, IconVariant>;
|
|
44
67
|
export declare const SELECT_INPUT_SIZE_TO_ICON_SIZE: Record<InputSize, number>;
|
|
45
68
|
export declare const SELECT_INPUT_SIZE_TO_TEXT_SIZE_MAP: Record<InputSize, TextSize>;
|
|
69
|
+
/**
|
|
70
|
+
* Single-choice dropdown with keyboard navigation and optional search.
|
|
71
|
+
*
|
|
72
|
+
* Controlled: `value` is the selected option and `onChange` hands you the whole
|
|
73
|
+
* option back. Passing `onSearch` turns the trigger into a search box — you own
|
|
74
|
+
* the filtering, so it works equally well against a local list or a server.
|
|
75
|
+
*/
|
|
46
76
|
declare const SelectInput: ({ label, variant, size, options, value, placeholder, onChange, width, fillWidth, dropdownWidth, isDisabled, isRequired, isOpen: controlledIsOpen, onOpenChange, onReset, pinnedOptions, error, onSearch, debounceMs, }: SelectInputProps) => import("react").JSX.Element;
|
|
47
77
|
export default SelectInput;
|
|
@@ -18,6 +18,7 @@ import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
|
18
18
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
19
19
|
import { ArrowCounterClockwiseIcon, CaretDownIcon, CheckIcon } from "@phosphor-icons/react";
|
|
20
20
|
//#region src/inputs/SelectInput.tsx
|
|
21
|
+
/** Surface treatment of the closed trigger. Shared with `MultiSelectInput`. */
|
|
21
22
|
var SelectInputVariant = /* @__PURE__ */ function(SelectInputVariant) {
|
|
22
23
|
SelectInputVariant["BASE"] = "BASE";
|
|
23
24
|
SelectInputVariant["PRIMARY"] = "PRIMARY";
|
|
@@ -153,6 +154,13 @@ var SELECT_INPUT_SIZE_TO_TEXT_SIZE_MAP = {
|
|
|
153
154
|
[InputSize.MEDIUM]: TextSize.BODY_MD,
|
|
154
155
|
[InputSize.LARGE]: TextSize.BODY_MD
|
|
155
156
|
};
|
|
157
|
+
/**
|
|
158
|
+
* Single-choice dropdown with keyboard navigation and optional search.
|
|
159
|
+
*
|
|
160
|
+
* Controlled: `value` is the selected option and `onChange` hands you the whole
|
|
161
|
+
* option back. Passing `onSearch` turns the trigger into a search box — you own
|
|
162
|
+
* the filtering, so it works equally well against a local list or a server.
|
|
163
|
+
*/
|
|
156
164
|
var SelectInput = ({ label, variant = "PRIMARY", size = InputSize.MEDIUM, options, value, placeholder = "Select an option...", onChange, width, fillWidth, dropdownWidth, isDisabled = false, isRequired = false, isOpen: controlledIsOpen, onOpenChange, onReset, pinnedOptions = [], error, onSearch, debounceMs = 300 }) => {
|
|
157
165
|
const isSearchable = !!onSearch;
|
|
158
166
|
const [isHovered, setIsHovered] = useState(false);
|
|
@@ -1,16 +1,31 @@
|
|
|
1
1
|
export interface SliderInputProps {
|
|
2
2
|
label?: string;
|
|
3
|
+
/** Adds an info icon beside the label with this content on hover. */
|
|
3
4
|
labelTooltip?: string | React.ReactNode;
|
|
5
|
+
/** Controlled value. Clamped into `[min, max]`. */
|
|
4
6
|
value: number;
|
|
7
|
+
/** Fires continuously while dragging, not just on release. */
|
|
5
8
|
onChange: (value: number) => void;
|
|
9
|
+
/** Drag started — useful for pausing an expensive live preview. */
|
|
6
10
|
onInteractionStart?: () => void;
|
|
11
|
+
/** Drag finished — commit the value here if `onChange` is too chatty. */
|
|
7
12
|
onInteractionEnd?: () => void;
|
|
13
|
+
/** @default 0 */
|
|
8
14
|
min?: number;
|
|
15
|
+
/** @default 100 */
|
|
9
16
|
max?: number;
|
|
17
|
+
/** Increment the thumb snaps to. @default 1 */
|
|
10
18
|
step?: number;
|
|
11
19
|
isDisabled?: boolean;
|
|
20
|
+
/** A number is px. */
|
|
12
21
|
width?: number | string;
|
|
13
22
|
fillWidth?: boolean;
|
|
14
23
|
}
|
|
24
|
+
/**
|
|
25
|
+
* A drag-to-set numeric slider. Fully controlled.
|
|
26
|
+
*
|
|
27
|
+
* `onChange` fires on every pointer move. When each change is expensive, drive
|
|
28
|
+
* a preview from it and commit on `onInteractionEnd`.
|
|
29
|
+
*/
|
|
15
30
|
declare const SliderInput: ({ label, labelTooltip, value, onChange, onInteractionStart, onInteractionEnd, min, max, step, isDisabled, width, fillWidth, }: SliderInputProps) => import("react").JSX.Element;
|
|
16
31
|
export default SliderInput;
|
|
@@ -58,6 +58,12 @@ var HiddenInput = /*#__PURE__*/ styled("input")({
|
|
|
58
58
|
class: "h1trli0w",
|
|
59
59
|
propsAsIs: false
|
|
60
60
|
});
|
|
61
|
+
/**
|
|
62
|
+
* A drag-to-set numeric slider. Fully controlled.
|
|
63
|
+
*
|
|
64
|
+
* `onChange` fires on every pointer move. When each change is expensive, drive
|
|
65
|
+
* a preview from it and commit on `onInteractionEnd`.
|
|
66
|
+
*/
|
|
61
67
|
var SliderInput = ({ label, labelTooltip, value, onChange, onInteractionStart, onInteractionEnd, min = 0, max = 100, step = 1, isDisabled = false, width, fillWidth }) => {
|
|
62
68
|
const [isDragging, setIsDragging] = useState(false);
|
|
63
69
|
const sliderRef = useRef(null);
|
|
@@ -1,13 +1,22 @@
|
|
|
1
1
|
import { InputSize } from "./Input";
|
|
2
2
|
export interface SwitcherInputItem {
|
|
3
|
+
/** Matched against `selectedId` to decide which segment is active. */
|
|
3
4
|
id: string;
|
|
4
5
|
label: string;
|
|
6
|
+
/** Called when this segment is clicked. Update `selectedId` yourself. */
|
|
5
7
|
onClick: () => void;
|
|
6
8
|
}
|
|
7
|
-
interface SwitcherInputProps {
|
|
9
|
+
export interface SwitcherInputProps {
|
|
10
|
+
/** @default InputSize.MEDIUM */
|
|
8
11
|
size?: InputSize;
|
|
12
|
+
/** Segments, left to right. */
|
|
9
13
|
items: SwitcherInputItem[];
|
|
14
|
+
/** The `id` of the active segment. Controlled — nothing moves until this changes. */
|
|
10
15
|
selectedId: string;
|
|
11
16
|
}
|
|
17
|
+
/**
|
|
18
|
+
* A segmented control for switching between a few mutually exclusive views.
|
|
19
|
+
* Each item carries its own `onClick`, so there is no top-level change handler.
|
|
20
|
+
*/
|
|
12
21
|
declare const SwitcherInput: ({ size, items, selectedId }: SwitcherInputProps) => import("react").JSX.Element;
|
|
13
22
|
export default SwitcherInput;
|
|
@@ -40,6 +40,10 @@ var StyledSwitcherInputItem = withTheme(/*#__PURE__*/ styled("div")({
|
|
|
40
40
|
"s1pe4aqp-2": [_exp7()]
|
|
41
41
|
}
|
|
42
42
|
}));
|
|
43
|
+
/**
|
|
44
|
+
* A segmented control for switching between a few mutually exclusive views.
|
|
45
|
+
* Each item carries its own `onClick`, so there is no top-level change handler.
|
|
46
|
+
*/
|
|
43
47
|
var SwitcherInput = ({ size = InputSize.MEDIUM, items, selectedId }) => {
|
|
44
48
|
return /* @__PURE__ */ jsx(StyledSwitcherInput, {
|
|
45
49
|
$size: size,
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
/** Text size and inset density. Row count comes from `lines`, not from this. */
|
|
1
2
|
export declare enum TextAreaSize {
|
|
2
3
|
SMALL = "SMALL",
|
|
3
4
|
MEDIUM = "MEDIUM",
|
|
4
5
|
LARGE = "LARGE"
|
|
5
6
|
}
|
|
7
|
+
/** Background treatment. `TRANSPARENT` is for embedding in an existing surface. */
|
|
6
8
|
export declare enum TextAreaVariant {
|
|
7
9
|
TRANSPARENT = "TRANSPARENT",
|
|
8
10
|
BASE = "BASE",
|
|
@@ -11,30 +13,52 @@ export declare enum TextAreaVariant {
|
|
|
11
13
|
TERTIARY = "TERTIARY"
|
|
12
14
|
}
|
|
13
15
|
export interface TextAreaInputProps {
|
|
16
|
+
/** Controlled value. */
|
|
14
17
|
value?: string;
|
|
15
18
|
onChange: (value: string) => void;
|
|
19
|
+
/** @default TextAreaVariant.PRIMARY */
|
|
16
20
|
variant?: TextAreaVariant;
|
|
21
|
+
/** @default TextAreaSize.MEDIUM */
|
|
17
22
|
size?: TextAreaSize;
|
|
23
|
+
/** Visible rows before scrolling. @default 3 */
|
|
18
24
|
lines?: number;
|
|
19
25
|
placeholder?: string;
|
|
20
26
|
label?: string;
|
|
27
|
+
/** Adds an info icon beside the label with this content on hover. */
|
|
21
28
|
labelTooltip?: string | React.ReactNode;
|
|
29
|
+
/** Message under the field; also switches the border to the error color. */
|
|
22
30
|
error?: string;
|
|
31
|
+
/** Appends the red required asterisk. Note: `required`, not `isRequired`. */
|
|
23
32
|
required?: boolean;
|
|
33
|
+
/** Note: `disabled`, not `isDisabled` — this input predates the `is` convention. */
|
|
24
34
|
disabled?: boolean;
|
|
25
35
|
autoFocus?: boolean;
|
|
36
|
+
/** Character-count bounds, validated on blur. Not a numeric range. */
|
|
26
37
|
min?: number;
|
|
27
38
|
max?: number;
|
|
28
39
|
onFocus?: (e: React.FocusEvent<HTMLTextAreaElement>) => void;
|
|
29
40
|
onBlur?: (e: React.FocusEvent<HTMLTextAreaElement>) => void;
|
|
30
41
|
onKeyDown?: (e: React.KeyboardEvent<HTMLTextAreaElement>) => void;
|
|
42
|
+
/** A number is px. */
|
|
31
43
|
width?: number | string;
|
|
44
|
+
/** A number is px. Overrides the height implied by `lines`. */
|
|
32
45
|
height?: number | string;
|
|
33
46
|
fillWidth?: boolean;
|
|
47
|
+
/** Grow to the parent's height. Pairs with a flex parent. */
|
|
34
48
|
fillHeight?: boolean;
|
|
49
|
+
/** Drop the hairline border. */
|
|
35
50
|
noBorder?: boolean;
|
|
51
|
+
/** Collapse the inset to 0. */
|
|
36
52
|
noPadding?: boolean;
|
|
53
|
+
/** Swap the field for a shimmer placeholder. */
|
|
37
54
|
isLoading?: boolean;
|
|
38
55
|
}
|
|
56
|
+
/**
|
|
57
|
+
* A multi-line text field. Not resizable by the user — size it with `lines`,
|
|
58
|
+
* `height`, or `fillHeight`.
|
|
59
|
+
*
|
|
60
|
+
* Note this one takes `required`/`disabled` rather than the `isRequired`/
|
|
61
|
+
* `isDisabled` the other inputs use.
|
|
62
|
+
*/
|
|
39
63
|
declare const TextAreaInput: import("react").ForwardRefExoticComponent<TextAreaInputProps & import("react").RefAttributes<HTMLTextAreaElement>>;
|
|
40
64
|
export default TextAreaInput;
|
|
@@ -10,12 +10,14 @@ import { match } from "ts-pattern";
|
|
|
10
10
|
import { forwardRef, useState } from "react";
|
|
11
11
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
12
|
//#region src/inputs/TextAreaInput.tsx
|
|
13
|
+
/** Text size and inset density. Row count comes from `lines`, not from this. */
|
|
13
14
|
var TextAreaSize = /* @__PURE__ */ function(TextAreaSize) {
|
|
14
15
|
TextAreaSize["SMALL"] = "SMALL";
|
|
15
16
|
TextAreaSize["MEDIUM"] = "MEDIUM";
|
|
16
17
|
TextAreaSize["LARGE"] = "LARGE";
|
|
17
18
|
return TextAreaSize;
|
|
18
19
|
}({});
|
|
20
|
+
/** Background treatment. `TRANSPARENT` is for embedding in an existing surface. */
|
|
19
21
|
var TextAreaVariant = /* @__PURE__ */ function(TextAreaVariant) {
|
|
20
22
|
TextAreaVariant["TRANSPARENT"] = "TRANSPARENT";
|
|
21
23
|
TextAreaVariant["BASE"] = "BASE";
|
|
@@ -146,6 +148,13 @@ var TEXTAREA_SIZE_TO_SHIMMER_HEIGHT_MAP = {
|
|
|
146
148
|
["MEDIUM"]: 14,
|
|
147
149
|
["LARGE"]: 16
|
|
148
150
|
};
|
|
151
|
+
/**
|
|
152
|
+
* A multi-line text field. Not resizable by the user — size it with `lines`,
|
|
153
|
+
* `height`, or `fillHeight`.
|
|
154
|
+
*
|
|
155
|
+
* Note this one takes `required`/`disabled` rather than the `isRequired`/
|
|
156
|
+
* `isDisabled` the other inputs use.
|
|
157
|
+
*/
|
|
149
158
|
var TextAreaInput = forwardRef(({ variant = "PRIMARY", size = "MEDIUM", lines = 3, value, min, max, placeholder, label, labelTooltip, error, required, disabled, autoFocus, onChange, onKeyDown, onBlur, onFocus, width, height, fillWidth, fillHeight, noBorder, noPadding, isLoading }, ref) => {
|
|
150
159
|
const [state, setState] = useState(DEFAULT_STATE);
|
|
151
160
|
const handleFocus = (e) => {
|
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
import { type InputProps } from "./Input";
|
|
2
|
-
|
|
2
|
+
/** Every `InputProps` field except `type` and `parse`, which are fixed to text. */
|
|
3
|
+
export type TextInputProps = Omit<InputProps<string>, "type" | "parse">;
|
|
4
|
+
/**
|
|
5
|
+
* A single-line text field. The default input.
|
|
6
|
+
*
|
|
7
|
+
* `min`/`max` bound the *character count*, not a numeric range — the field
|
|
8
|
+
* validates length on blur and shows its own error. A `error` you pass wins.
|
|
9
|
+
*/
|
|
3
10
|
declare const TextInput: import("react").ForwardRefExoticComponent<TextInputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
4
11
|
export default TextInput;
|
package/dist/inputs/TextInput.js
CHANGED
|
@@ -3,6 +3,12 @@ import { forwardRef, useState } from "react";
|
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
//#region src/inputs/TextInput.tsx
|
|
5
5
|
var DEFAULT_STATE = { error: "" };
|
|
6
|
+
/**
|
|
7
|
+
* A single-line text field. The default input.
|
|
8
|
+
*
|
|
9
|
+
* `min`/`max` bound the *character count*, not a numeric range — the field
|
|
10
|
+
* validates length on blur and shows its own error. A `error` you pass wins.
|
|
11
|
+
*/
|
|
6
12
|
var TextInput = forwardRef(({ size, value, min, max, placeholder, label, labelTooltip, leading, trailing, error, isRequired, isDisabled, autoFocus, onChange, onKeyDown, onBlur, fillWidth, width, isMonospace }, ref) => {
|
|
7
13
|
const [state, setState] = useState(DEFAULT_STATE);
|
|
8
14
|
const handleFocus = () => {
|
|
@@ -1,11 +1,22 @@
|
|
|
1
1
|
export interface ToggleInputProps {
|
|
2
|
+
/** Label rendered above the switch, like the other inputs. */
|
|
2
3
|
label?: string;
|
|
4
|
+
/** Adds an info icon beside the label with this content on hover. */
|
|
3
5
|
labelTooltip?: string | React.ReactNode;
|
|
6
|
+
/** Controlled state. The switch holds none of its own. */
|
|
4
7
|
value: boolean;
|
|
5
8
|
onChange: (value: boolean) => void;
|
|
6
9
|
isDisabled?: boolean;
|
|
10
|
+
/** A number is px. Ignored when `fillWidth` is set. */
|
|
7
11
|
width?: number | string;
|
|
12
|
+
/** Stretch to the parent's width, pushing the switch to the right edge. */
|
|
8
13
|
fillWidth?: boolean;
|
|
9
14
|
}
|
|
15
|
+
/**
|
|
16
|
+
* An on/off switch. Fully controlled — you own `value`.
|
|
17
|
+
*
|
|
18
|
+
* Use it for settings that apply immediately. For something that only takes
|
|
19
|
+
* effect on submit, a `CheckboxInput` reads more honestly.
|
|
20
|
+
*/
|
|
10
21
|
declare const ToggleInput: ({ label, labelTooltip, value, onChange, isDisabled, width, fillWidth, }: ToggleInputProps) => import("react").JSX.Element;
|
|
11
22
|
export default ToggleInput;
|
|
@@ -44,6 +44,12 @@ var HiddenInput = /*#__PURE__*/ styled("input")({
|
|
|
44
44
|
class: "h1smouvb",
|
|
45
45
|
propsAsIs: false
|
|
46
46
|
});
|
|
47
|
+
/**
|
|
48
|
+
* An on/off switch. Fully controlled — you own `value`.
|
|
49
|
+
*
|
|
50
|
+
* Use it for settings that apply immediately. For something that only takes
|
|
51
|
+
* effect on submit, a `CheckboxInput` reads more honestly.
|
|
52
|
+
*/
|
|
47
53
|
var ToggleInput = ({ label, labelTooltip, value, onChange, isDisabled = false, width, fillWidth }) => {
|
|
48
54
|
const handleClick = useCallback(() => {
|
|
49
55
|
if (!isDisabled) onChange(!value);
|
|
@@ -1,11 +1,15 @@
|
|
|
1
|
+
/** Item text size — maps onto the matching `TextSize` step. */
|
|
1
2
|
export declare enum BulletedListSize {
|
|
2
3
|
SMALL = "SMALL",
|
|
3
4
|
MEDIUM = "MEDIUM",
|
|
4
5
|
LARGE = "LARGE"
|
|
5
6
|
}
|
|
6
7
|
export interface BulletedListProps {
|
|
8
|
+
/** One string per bullet. Plain text only — no nesting, no rich content. */
|
|
7
9
|
items: string[];
|
|
10
|
+
/** @default BulletedListSize.MEDIUM */
|
|
8
11
|
size?: BulletedListSize;
|
|
9
12
|
}
|
|
13
|
+
/** An unordered list of plain strings, each rendered through `Text`. */
|
|
10
14
|
declare const BulletedList: ({ items, size }: BulletedListProps) => import("react").JSX.Element;
|
|
11
15
|
export default BulletedList;
|
|
@@ -20,6 +20,7 @@ var StyledBulletedListItem = /*#__PURE__*/ styled("li")({
|
|
|
20
20
|
class: "s13x8jj4",
|
|
21
21
|
propsAsIs: false
|
|
22
22
|
});
|
|
23
|
+
/** Item text size — maps onto the matching `TextSize` step. */
|
|
23
24
|
var BulletedListSize = /* @__PURE__ */ function(BulletedListSize) {
|
|
24
25
|
BulletedListSize["SMALL"] = "SMALL";
|
|
25
26
|
BulletedListSize["MEDIUM"] = "MEDIUM";
|
|
@@ -31,6 +32,7 @@ var BULLETED_LIST_SIZE_TO_TEXT_SIZE_MAP = {
|
|
|
31
32
|
["MEDIUM"]: TextSize.BODY_MD,
|
|
32
33
|
["LARGE"]: TextSize.BODY_LG
|
|
33
34
|
};
|
|
35
|
+
/** An unordered list of plain strings, each rendered through `Text`. */
|
|
34
36
|
var BulletedList = ({ items, size = "MEDIUM" }) => {
|
|
35
37
|
return /* @__PURE__ */ jsx(StyledBulletedList, { children: items.map((item, index) => /* @__PURE__ */ jsx(StyledBulletedListItem, { children: /* @__PURE__ */ jsx(Text, {
|
|
36
38
|
size: BULLETED_LIST_SIZE_TO_TEXT_SIZE_MAP[size],
|
package/dist/modal/Modal.d.ts
CHANGED
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
import { type PropsWithChildren } from "react";
|
|
2
2
|
export interface ModalProps {
|
|
3
|
+
/** Controlled visibility. The modal has no open state of its own. */
|
|
3
4
|
open: boolean;
|
|
5
|
+
/** Called on Escape and on backdrop click. */
|
|
4
6
|
onClose: () => void;
|
|
5
7
|
}
|
|
8
|
+
/**
|
|
9
|
+
* A centered dialog over a dimmed backdrop. Fully controlled — you own `open`.
|
|
10
|
+
*
|
|
11
|
+
* Stacking and Escape handling come from `OverlayProvider`, so only the topmost
|
|
12
|
+
* overlay closes on Escape. Wrap your app in that provider.
|
|
13
|
+
*/
|
|
6
14
|
declare const Modal: ({ open, onClose, children }: PropsWithChildren<ModalProps>) => import("react").ReactPortal;
|
|
7
15
|
export default Modal;
|
package/dist/modal/Modal.js
CHANGED
|
@@ -28,6 +28,12 @@ var ModalContentWrapper = /*#__PURE__*/ styled("div")({
|
|
|
28
28
|
class: "m1jgo9vf",
|
|
29
29
|
propsAsIs: false
|
|
30
30
|
});
|
|
31
|
+
/**
|
|
32
|
+
* A centered dialog over a dimmed backdrop. Fully controlled — you own `open`.
|
|
33
|
+
*
|
|
34
|
+
* Stacking and Escape handling come from `OverlayProvider`, so only the topmost
|
|
35
|
+
* overlay closes on Escape. Wrap your app in that provider.
|
|
36
|
+
*/
|
|
31
37
|
var Modal = ({ open, onClose, children }) => {
|
|
32
38
|
const { zIndex, isTopmost } = useOverlay(onClose, open, { layer: OverlayLayer.MODAL });
|
|
33
39
|
const handleContentClick = useCallback((e) => {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type PropsWithChildren } from "react";
|
|
2
2
|
import { OverlayLayer } from "./constants";
|
|
3
|
+
/** One registered overlay in the stack. */
|
|
3
4
|
export interface OverlayEntry {
|
|
4
5
|
id: string;
|
|
5
6
|
onDismiss: () => void;
|
|
@@ -7,8 +8,11 @@ export interface OverlayEntry {
|
|
|
7
8
|
dismissOnOverlayClick: boolean;
|
|
8
9
|
zIndex: number;
|
|
9
10
|
}
|
|
11
|
+
/** Options for `useOverlay`'s third argument. */
|
|
10
12
|
export interface OverlayRegisterOptions {
|
|
13
|
+
/** Stacking tier. Modals always sit above drawers. @default OverlayLayer.MODAL */
|
|
11
14
|
layer?: OverlayLayer;
|
|
15
|
+
/** Call `onDismiss` when the shared backdrop is clicked. */
|
|
12
16
|
dismissOnOverlayClick?: boolean;
|
|
13
17
|
}
|
|
14
18
|
export interface OverlayInfo {
|
|
@@ -21,6 +25,13 @@ export interface OverlayContextValue {
|
|
|
21
25
|
overlays: OverlayEntry[];
|
|
22
26
|
}
|
|
23
27
|
export declare const OverlayContext: import("react").Context<OverlayContextValue | null>;
|
|
28
|
+
/**
|
|
29
|
+
* Coordinates every `Modal` and `Drawer` on the page. Mount it once near the
|
|
30
|
+
* root, above anything that opens an overlay.
|
|
31
|
+
*
|
|
32
|
+
* Renders one shared backdrop for the whole stack and routes Escape to the
|
|
33
|
+
* topmost overlay only, so nesting a modal over a drawer behaves.
|
|
34
|
+
*/
|
|
24
35
|
export declare const OverlayProvider: ({ children }: PropsWithChildren) => import("react").JSX.Element;
|
|
25
36
|
export default OverlayProvider;
|
|
26
37
|
export { getOverlayZIndex, OVERLAY_LAYER_PRIORITY, OVERLAY_Z_INDEX, OVERLAY_Z_INDEX_BASE, OVERLAY_Z_INDEX_STEP, OverlayLayer, } from "./constants";
|
|
@@ -28,6 +28,13 @@ var SharedOverlay = withTheme(/*#__PURE__*/ styled("div")({
|
|
|
28
28
|
"s1hpu3t7-6": [_exp7()]
|
|
29
29
|
}
|
|
30
30
|
}));
|
|
31
|
+
/**
|
|
32
|
+
* Coordinates every `Modal` and `Drawer` on the page. Mount it once near the
|
|
33
|
+
* root, above anything that opens an overlay.
|
|
34
|
+
*
|
|
35
|
+
* Renders one shared backdrop for the whole stack and routes Escape to the
|
|
36
|
+
* topmost overlay only, so nesting a modal over a drawer behaves.
|
|
37
|
+
*/
|
|
31
38
|
var OverlayProvider = ({ children }) => {
|
|
32
39
|
const [overlays, setOverlays] = useState([]);
|
|
33
40
|
const zIndexCounterRef = useRef(0);
|
|
@@ -1,7 +1,18 @@
|
|
|
1
1
|
import { type OverlayRegisterOptions } from "./OverlayProvider";
|
|
2
2
|
export interface UseOverlayReturn {
|
|
3
|
+
/** The z-index to render this overlay at. Assigned by its position in the stack. */
|
|
3
4
|
zIndex: number;
|
|
5
|
+
/** True when nothing is stacked above. Only the topmost overlay should act on Escape. */
|
|
4
6
|
isTopmost: boolean;
|
|
5
7
|
}
|
|
8
|
+
/**
|
|
9
|
+
* Registers an overlay in the global stack and returns its z-index and whether
|
|
10
|
+
* it's on top. `Modal` and `Drawer` use it internally — reach for it only when
|
|
11
|
+
* building your own overlay that must interleave correctly with theirs.
|
|
12
|
+
*
|
|
13
|
+
* Registration follows `enabled`, so pass your `open` flag straight through.
|
|
14
|
+
* Falls back to a computed top-of-stack z-index when there's no
|
|
15
|
+
* `OverlayProvider`, so it degrades rather than throwing.
|
|
16
|
+
*/
|
|
6
17
|
export declare const useOverlay: (onDismiss: () => void, enabled: boolean, options?: OverlayRegisterOptions) => UseOverlayReturn;
|
|
7
18
|
export default useOverlay;
|
|
@@ -2,6 +2,15 @@ import { OVERLAY_Z_INDEX_BASE } from "./constants.js";
|
|
|
2
2
|
import { OverlayContext } from "./OverlayProvider.js";
|
|
3
3
|
import { useContext, useEffect, useId } from "react";
|
|
4
4
|
//#region src/overlay/useOverlay.ts
|
|
5
|
+
/**
|
|
6
|
+
* Registers an overlay in the global stack and returns its z-index and whether
|
|
7
|
+
* it's on top. `Modal` and `Drawer` use it internally — reach for it only when
|
|
8
|
+
* building your own overlay that must interleave correctly with theirs.
|
|
9
|
+
*
|
|
10
|
+
* Registration follows `enabled`, so pass your `open` flag straight through.
|
|
11
|
+
* Falls back to a computed top-of-stack z-index when there's no
|
|
12
|
+
* `OverlayProvider`, so it degrades rather than throwing.
|
|
13
|
+
*/
|
|
5
14
|
var useOverlay = (onDismiss, enabled, options) => {
|
|
6
15
|
const context = useContext(OverlayContext);
|
|
7
16
|
const id = useId();
|
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
import type { Icon as PhosphorIcon } from "@phosphor-icons/react";
|
|
2
|
-
interface HorizontalResizeHandleProps {
|
|
2
|
+
export interface HorizontalResizeHandleProps {
|
|
3
|
+
/** Not implemented — the component ignores it. */
|
|
3
4
|
icon?: PhosphorIcon;
|
|
4
5
|
onMouseDown?: (e: React.MouseEvent<HTMLDivElement>) => void;
|
|
5
6
|
onMouseUp?: (e: React.MouseEvent<HTMLDivElement>) => void;
|
|
6
7
|
onMouseMove?: (e: React.MouseEvent<HTMLDivElement>) => void;
|
|
7
8
|
onMouseEnter?: (e: React.MouseEvent<HTMLDivElement>) => void;
|
|
8
9
|
}
|
|
10
|
+
/**
|
|
11
|
+
* The grab bar for resizing a pane vertically (it spans horizontally, dragging
|
|
12
|
+
* up and down). Absolutely positioned — give it a `position: relative` parent.
|
|
13
|
+
*
|
|
14
|
+
* Presentation only: wire the handlers to `useResize` to move anything.
|
|
15
|
+
*/
|
|
9
16
|
declare const HorizontalResizeHandle: ({ onMouseDown, onMouseUp, onMouseMove, onMouseEnter, }: HorizontalResizeHandleProps) => import("react").JSX.Element;
|
|
10
17
|
export default HorizontalResizeHandle;
|
|
@@ -20,6 +20,12 @@ var HorizontalResizeHandleStyled = withTheme(/*#__PURE__*/ styled("div")({
|
|
|
20
20
|
"hvnpu6g-4": [_exp5()]
|
|
21
21
|
}
|
|
22
22
|
}));
|
|
23
|
+
/**
|
|
24
|
+
* The grab bar for resizing a pane vertically (it spans horizontally, dragging
|
|
25
|
+
* up and down). Absolutely positioned — give it a `position: relative` parent.
|
|
26
|
+
*
|
|
27
|
+
* Presentation only: wire the handlers to `useResize` to move anything.
|
|
28
|
+
*/
|
|
23
29
|
var HorizontalResizeHandle = ({ onMouseDown, onMouseUp, onMouseMove, onMouseEnter }) => {
|
|
24
30
|
return /* @__PURE__ */ jsx(HorizontalResizeHandleStyled, {
|
|
25
31
|
onMouseDown,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Icon as PhosphorIcon } from "@phosphor-icons/react";
|
|
2
|
-
interface VerticalResizeHandleProps {
|
|
2
|
+
export interface VerticalResizeHandleProps {
|
|
3
|
+
/** Not implemented — the component ignores it. */
|
|
3
4
|
icon?: PhosphorIcon;
|
|
4
5
|
onMouseDown?: (e: React.MouseEvent<HTMLDivElement>) => void;
|
|
5
6
|
onMouseUp?: (e: React.MouseEvent<HTMLDivElement>) => void;
|
|
@@ -7,5 +8,11 @@ interface VerticalResizeHandleProps {
|
|
|
7
8
|
onMouseEnter?: (e: React.MouseEvent<HTMLDivElement>) => void;
|
|
8
9
|
onMouseLeave?: (e: React.MouseEvent<HTMLDivElement>) => void;
|
|
9
10
|
}
|
|
11
|
+
/**
|
|
12
|
+
* The grab bar for resizing a pane horizontally (it spans vertically, dragging
|
|
13
|
+
* left and right). Absolutely positioned — give it a `position: relative` parent.
|
|
14
|
+
*
|
|
15
|
+
* Presentation only: wire the handlers to `useResize` to move anything.
|
|
16
|
+
*/
|
|
10
17
|
declare const VerticalResizeHandle: ({ onMouseDown, onMouseUp, onMouseMove, onMouseEnter, onMouseLeave, }: VerticalResizeHandleProps) => import("react").JSX.Element;
|
|
11
18
|
export default VerticalResizeHandle;
|
|
@@ -20,6 +20,12 @@ var VerticalResizeHandleStyled = withTheme(/*#__PURE__*/ styled("div")({
|
|
|
20
20
|
"v1ha5e5c-4": [_exp5()]
|
|
21
21
|
}
|
|
22
22
|
}));
|
|
23
|
+
/**
|
|
24
|
+
* The grab bar for resizing a pane horizontally (it spans vertically, dragging
|
|
25
|
+
* left and right). Absolutely positioned — give it a `position: relative` parent.
|
|
26
|
+
*
|
|
27
|
+
* Presentation only: wire the handlers to `useResize` to move anything.
|
|
28
|
+
*/
|
|
23
29
|
var VerticalResizeHandle = ({ onMouseDown, onMouseUp, onMouseMove, onMouseEnter, onMouseLeave }) => {
|
|
24
30
|
return /* @__PURE__ */ jsx(VerticalResizeHandleStyled, {
|
|
25
31
|
onMouseDown,
|
package/dist/shapes/Circle.d.ts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
interface CircleProps {
|
|
1
|
+
export interface CircleProps {
|
|
2
|
+
/** Diameter. A number is px. */
|
|
2
3
|
size: number | string;
|
|
4
|
+
/** Fill color. @default theme.color.text.tertiary */
|
|
3
5
|
hex?: string;
|
|
4
6
|
}
|
|
7
|
+
/** A filled dot. Used for status indicators and legend swatches. */
|
|
5
8
|
declare const Circle: ({ size, hex }: CircleProps) => import("react").JSX.Element;
|
|
6
9
|
export default Circle;
|
package/dist/shapes/Circle.js
CHANGED
|
@@ -15,6 +15,7 @@ var CircleWrapper = withTheme(/*#__PURE__*/ styled("div")({
|
|
|
15
15
|
"cmbdg2q-1": [_exp3()]
|
|
16
16
|
}
|
|
17
17
|
}));
|
|
18
|
+
/** A filled dot. Used for status indicators and legend swatches. */
|
|
18
19
|
var Circle = ({ size, hex }) => {
|
|
19
20
|
return /* @__PURE__ */ jsx(CircleWrapper, {
|
|
20
21
|
$size: size,
|
package/dist/shapes/Square.d.ts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
interface SquareProps {
|
|
1
|
+
export interface SquareProps {
|
|
2
|
+
/** Side length. A number is px. */
|
|
2
3
|
size: number | string;
|
|
4
|
+
/** Fill color. @default theme.color.text.tertiary */
|
|
3
5
|
hex?: string;
|
|
4
6
|
}
|
|
7
|
+
/** A filled square. Used for legend swatches and color chips. */
|
|
5
8
|
declare const Square: ({ size, hex }: SquareProps) => import("react").JSX.Element;
|
|
6
9
|
export default Square;
|
package/dist/shapes/Square.js
CHANGED
|
@@ -15,6 +15,7 @@ var SquareWrapper = withTheme(/*#__PURE__*/ styled("div")({
|
|
|
15
15
|
"s1ibzzfh-1": [_exp3()]
|
|
16
16
|
}
|
|
17
17
|
}));
|
|
18
|
+
/** A filled square. Used for legend swatches and color chips. */
|
|
18
19
|
var Square = ({ size, hex }) => {
|
|
19
20
|
return /* @__PURE__ */ jsx(SquareWrapper, {
|
|
20
21
|
$size: size,
|