react-cosmos-ui 7.3.0 → 7.3.1-canary.238df28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/KeyBox.js +1 -1
- package/dist/components/SidePanel.d.ts +4 -4
- package/dist/components/SidePanel.js +1 -1
- package/dist/components/ValueInputTree/ValueInput/BooleanValueInput.js +2 -2
- package/dist/components/ValueInputTree/ValueInput/NullValueInput.js +1 -1
- package/dist/components/ValueInputTree/ValueInput/StringValueInput.js +3 -3
- package/dist/components/ValueInputTree/ValueInput/UndefinedValueInput.js +1 -1
- package/dist/components/ValueInputTree/ValueInput/UnserializableValueInput.js +1 -1
- package/dist/components/ValueInputTree/ValueInput/ValueInput.js +1 -1
- package/dist/components/ValueInputTree/ValueInput/shared.d.ts +8 -6
- package/dist/components/ValueInputTree/ValueInputDir.js +5 -5
- package/dist/components/ValueInputTree/shared.d.ts +2 -2
- package/dist/components/ValueInputTree/shared.js +1 -1
- package/dist/components/buttons/Button32.js +2 -2
- package/dist/components/buttons/Button8.js +2 -2
- package/dist/components/buttons/IconButton32.js +2 -2
- package/dist/components/buttons/IconButton8.js +2 -2
- package/dist/components/buttons/shared.d.ts +20 -12
- package/dist/components/buttons/shared.js +11 -11
- package/dist/components/inputs/NumberInput.js +3 -3
- package/dist/components/inputs/Select.js +11 -11
- package/dist/components/inputs/shared.d.ts +24 -14
- package/dist/components/inputs/shared.js +6 -6
- package/dist/playground.bundle.js +335 -335
- package/dist/playground.bundle.js.LICENSE.txt +0 -19
- package/dist/playground.bundle.js.map +1 -1
- package/dist/plugins/FixtureBookmark/FixtureBookmarks.js +7 -7
- package/dist/plugins/FixtureSearch/FixtureSearchHeader.js +2 -2
- package/dist/plugins/FixtureSearch/FixtureSearchOverlay.js +8 -8
- package/dist/plugins/FixtureSearch/FixtureSearchResult.js +2 -2
- package/dist/plugins/FixtureSearch/FixtureSearchShortcuts.js +1 -1
- package/dist/plugins/FixtureTree/BlankState.d.ts +2 -2
- package/dist/plugins/FixtureTree/FixtureTree/FixtureButton.js +1 -1
- package/dist/plugins/FixtureTree/FixtureTree/FixtureDir.js +3 -3
- package/dist/plugins/FixtureTree/FixtureTree/FixtureLink.js +2 -2
- package/dist/plugins/FixtureTree/FixtureTree/FixtureTreeItem.d.ts +3 -3
- package/dist/plugins/FixtureTree/FixtureTree/FixtureTreeItem.js +2 -2
- package/dist/plugins/FixtureTree/FixtureTree/MultiFixtureButton.js +2 -2
- package/dist/plugins/FixtureTree/FixtureTree/MultiFixtureChildButton.js +2 -2
- package/dist/plugins/Notifications/Notifications.js +1 -1
- package/dist/plugins/PropsPanel/BlankState.d.ts +2 -2
- package/dist/plugins/RendererPreview/RendererOverlay/WaitingForRenderer.js +4 -4
- package/dist/plugins/RendererPreview/RendererOverlay/rendererOverlayShared.d.ts +3 -3
- package/dist/plugins/ResponsivePreview/ResponsivePreview/ResponsiveHeader.d.ts +1 -1
- package/dist/plugins/ResponsivePreview/ResponsivePreview/ResponsiveHeader.js +3 -3
- package/dist/plugins/ResponsivePreview/ResponsivePreview/ResponsivePreview.js +3 -3
- package/dist/plugins/Root/ControlPanel.js +1 -1
- package/dist/plugins/Root/HomeOverlay/HomeOverlay.js +1 -1
- package/dist/plugins/Root/NavPanel.js +1 -1
- package/dist/plugins/Root/Root.js +3 -3
- package/dist/style/colors.d.ts +2 -2
- package/dist/style/colors.js +2 -2
- package/dist/style/globalStyle.d.ts +1 -1
- package/package.json +4 -4
- package/tsconfig.build.tsbuildinfo +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export declare const SidePanelContainer: import("styled-components").
|
|
3
|
-
export declare const SidePanelHeader: import("styled-components").
|
|
2
|
+
export declare const SidePanelContainer: import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
|
|
3
|
+
export declare const SidePanelHeader: import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
|
|
4
4
|
type TitleProps = {
|
|
5
5
|
label: string;
|
|
6
6
|
componentName?: string;
|
|
7
7
|
};
|
|
8
8
|
export declare function SidePanelTitle({ label, componentName }: TitleProps): React.JSX.Element;
|
|
9
|
-
export declare const SidePanelActions: import("styled-components").
|
|
10
|
-
export declare const SidePanelBody: import("styled-components").
|
|
9
|
+
export declare const SidePanelActions: import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
|
|
10
|
+
export declare const SidePanelBody: import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
|
|
11
11
|
export {};
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { Label, UneditableInput, ValueDataContainer } from './shared.js';
|
|
3
3
|
export function NullValueInput({ name }) {
|
|
4
4
|
return (React.createElement(React.Fragment, null,
|
|
5
|
-
React.createElement(Label, { title: name, disabled: true }, name),
|
|
5
|
+
React.createElement(Label, { title: name, $disabled: true }, name),
|
|
6
6
|
React.createElement(ValueDataContainer, null,
|
|
7
7
|
React.createElement(UneditableInput, null,
|
|
8
8
|
React.createElement("em", null, "null")))));
|
|
@@ -25,8 +25,8 @@ export function StringValueInput({ id, name, data, onChange }) {
|
|
|
25
25
|
return (React.createElement(React.Fragment, null,
|
|
26
26
|
React.createElement(Label, { title: name, htmlFor: id }, name),
|
|
27
27
|
React.createElement(ValueDataContainer, null,
|
|
28
|
-
React.createElement(TextInputContainer, { focused: focused, focusedBg: grey8, focusedBoxShadow: `0 0 0.5px 1px ${blue}` },
|
|
28
|
+
React.createElement(TextInputContainer, { $focused: focused, $focusedBg: grey8, $focusedBoxShadow: `0 0 0.5px 1px ${blue}` },
|
|
29
29
|
React.createElement(TextContainer, null,
|
|
30
|
-
React.createElement(TextMirror, { minWidth: 64, focused: focused }, localData.length > 0 || focused ? mirrorText : React.createElement("em", null, "empty")),
|
|
31
|
-
React.createElement(TextField, { rows: 1, id: id, value: localData, focused: focused, color: grey248, onChange: onInputChange, onFocus: onFocus, onBlur: onBlur }))))));
|
|
30
|
+
React.createElement(TextMirror, { $minWidth: 64, $focused: focused }, localData.length > 0 || focused ? mirrorText : React.createElement("em", null, "empty")),
|
|
31
|
+
React.createElement(TextField, { rows: 1, id: id, value: localData, $focused: focused, $color: grey248, onChange: onInputChange, onFocus: onFocus, onBlur: onBlur }))))));
|
|
32
32
|
}
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { Label, UneditableInput, ValueDataContainer } from './shared.js';
|
|
3
3
|
export function UndefinedValueInput({ name }) {
|
|
4
4
|
return (React.createElement(React.Fragment, null,
|
|
5
|
-
React.createElement(Label, { title: name, disabled: true }, name),
|
|
5
|
+
React.createElement(Label, { title: name, $disabled: true }, name),
|
|
6
6
|
React.createElement(ValueDataContainer, null,
|
|
7
7
|
React.createElement(UneditableInput, null,
|
|
8
8
|
React.createElement("em", null, "undefined")))));
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { Label, UneditableInput, ValueDataContainer } from './shared.js';
|
|
3
3
|
export function UnserializableValueInput({ name, data }) {
|
|
4
4
|
return (React.createElement(React.Fragment, null,
|
|
5
|
-
React.createElement(Label, { title: name, disabled: true }, name),
|
|
5
|
+
React.createElement(Label, { title: name, $disabled: true }, name),
|
|
6
6
|
React.createElement(ValueDataContainer, null,
|
|
7
7
|
React.createElement(UneditableInput, { title: data }, trimMultilineValue(data)))));
|
|
8
8
|
}
|
|
@@ -10,7 +10,7 @@ import { UndefinedValueInput } from './UndefinedValueInput.js';
|
|
|
10
10
|
import { UnserializableValueInput } from './UnserializableValueInput.js';
|
|
11
11
|
export function ValueInput({ value, name, id, indentLevel, onChange }) {
|
|
12
12
|
return (React.createElement(ValueInputSlot, { slotProps: { id, name, value, indentLevel, onChange } },
|
|
13
|
-
React.createElement(ValueTreeItem, { indentLevel: indentLevel },
|
|
13
|
+
React.createElement(ValueTreeItem, { $indentLevel: indentLevel },
|
|
14
14
|
React.createElement(ValueInputContainer, null, getInput(id, name, value, onChange)))));
|
|
15
15
|
}
|
|
16
16
|
function getInput(id, name, value, onChange) {
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
export declare const Label: import("styled-components").
|
|
2
|
-
disabled?: boolean;
|
|
3
|
-
}, never
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export declare const
|
|
1
|
+
export declare const Label: import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, "$disabled"> & {
|
|
2
|
+
$disabled?: boolean;
|
|
3
|
+
}, never> & Partial<Pick<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, "$disabled"> & {
|
|
4
|
+
$disabled?: boolean;
|
|
5
|
+
}, never>>> & string;
|
|
6
|
+
export declare const ValueInputContainer: import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
|
|
7
|
+
export declare const ValueDataContainer: import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
|
|
8
|
+
export declare const UneditableInput: import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never> & Partial<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>>> & string;
|
|
@@ -4,13 +4,13 @@ import { blue, disabledColors, grey128, grey160, grey224, } from '../../style/co
|
|
|
4
4
|
import { ChevronDownIcon, ChevronRightIcon } from '../icons/index.js';
|
|
5
5
|
import { ValueTreeItem } from './shared.js';
|
|
6
6
|
export function ValueInputDir({ name, childrenText, disabled, expanded, indentLevel, onToggle, }) {
|
|
7
|
-
return (React.createElement(ValueTreeItem, { indentLevel: indentLevel },
|
|
7
|
+
return (React.createElement(ValueTreeItem, { $indentLevel: indentLevel },
|
|
8
8
|
React.createElement(ButtonContainer, null,
|
|
9
9
|
React.createElement(Button, { disabled: disabled, onClick: onToggle },
|
|
10
10
|
React.createElement(React.Fragment, null,
|
|
11
11
|
!disabled && (React.createElement(ChevronContainer, null, expanded ? React.createElement(ChevronDownIcon, null) : React.createElement(ChevronRightIcon, null))),
|
|
12
12
|
React.createElement(Text, null,
|
|
13
|
-
React.createElement(DirName, { disabled: disabled }, name),
|
|
13
|
+
React.createElement(DirName, { $disabled: disabled }, name),
|
|
14
14
|
React.createElement(ChildrenInfo, null, childrenText)))))));
|
|
15
15
|
}
|
|
16
16
|
const ButtonContainer = styled.div `
|
|
@@ -33,11 +33,11 @@ const Button = styled.button `
|
|
|
33
33
|
outline: none;
|
|
34
34
|
white-space: nowrap;
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
&:focus {
|
|
37
37
|
box-shadow: 0 0 0.5px 1px ${blue};
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
&::-moz-focus-inner {
|
|
41
41
|
border: 0;
|
|
42
42
|
}
|
|
43
43
|
`;
|
|
@@ -57,7 +57,7 @@ const Text = styled.span `
|
|
|
57
57
|
`;
|
|
58
58
|
const DirName = styled.span `
|
|
59
59
|
color: ${disabledColors(grey224, grey128)};
|
|
60
|
-
padding: 0 0 0 ${props => (props
|
|
60
|
+
padding: 0 0 0 ${props => (props.$disabled ? 16 : 0)}px;
|
|
61
61
|
`;
|
|
62
62
|
const ChildrenInfo = styled.span `
|
|
63
63
|
padding: 0 0 0 6px;
|
|
@@ -9,8 +9,8 @@ export type ValueNodeData = {
|
|
|
9
9
|
};
|
|
10
10
|
export type ValueNode = TreeNode<ValueNodeData>;
|
|
11
11
|
type ValueTreeItemProps = {
|
|
12
|
-
indentLevel: number;
|
|
12
|
+
$indentLevel: number;
|
|
13
13
|
};
|
|
14
|
-
export declare const ValueTreeItem: import("styled-components").
|
|
14
|
+
export declare const ValueTreeItem: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$indentLevel"> & ValueTreeItemProps, never> & Partial<Pick<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$indentLevel"> & ValueTreeItemProps, never>>> & string;
|
|
15
15
|
export declare function stringifyElementId(elementId: FixtureElementId): string;
|
|
16
16
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import styled from 'styled-components';
|
|
2
2
|
export const ValueTreeItem = styled.div `
|
|
3
|
-
padding: 0 0 0 ${props => getLeftPadding(props
|
|
3
|
+
padding: 0 0 0 ${props => getLeftPadding(props.$indentLevel)}px;
|
|
4
4
|
`;
|
|
5
5
|
export function stringifyElementId(elementId) {
|
|
6
6
|
const { decoratorId, elPath } = elementId;
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { grey160, grey176, grey224, grey24, grey248, grey32, grey8, } from '../../style/colors.js';
|
|
3
3
|
import { Label, StyledButton, StyledIcon } from './shared.js';
|
|
4
4
|
export function Button32({ icon, label, title, disabled = false, selected = false, onClick, }) {
|
|
5
|
-
return (React.createElement(StyledButton, { bg: grey32, bgSelect: grey8, bgHover: grey24, color: grey224, colorSelect: grey248, title: title, selected: selected, disabled: disabled, onClick: onClick },
|
|
6
|
-
icon && (React.createElement(StyledIcon, { color: selected ? grey176 : grey160 }, icon)),
|
|
5
|
+
return (React.createElement(StyledButton, { $bg: grey32, $bgSelect: grey8, $bgHover: grey24, $color: grey224, $colorSelect: grey248, title: title, $selected: selected, disabled: disabled, onClick: onClick },
|
|
6
|
+
icon && (React.createElement(StyledIcon, { $color: selected ? grey176 : grey160 }, icon)),
|
|
7
7
|
React.createElement(Label, null, label)));
|
|
8
8
|
}
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { grey144, grey176, grey216, grey24, grey248, grey32, grey8, } from '../../style/colors.js';
|
|
3
3
|
import { Label, StyledButton, StyledIcon } from './shared.js';
|
|
4
4
|
export function Button8({ icon, label, title, disabled = false, selected = false, onClick, }) {
|
|
5
|
-
return (React.createElement(StyledButton, { bg: grey8, bgSelect: grey32, bgHover: grey24, color: grey216, colorSelect: grey248, title: title, selected: selected, disabled: disabled, onClick: onClick },
|
|
6
|
-
icon && (React.createElement(StyledIcon, { color: selected ? grey176 : grey144 }, icon)),
|
|
5
|
+
return (React.createElement(StyledButton, { $bg: grey8, $bgSelect: grey32, $bgHover: grey24, $color: grey216, $colorSelect: grey248, title: title, $selected: selected, disabled: disabled, onClick: onClick },
|
|
6
|
+
icon && (React.createElement(StyledIcon, { $color: selected ? grey176 : grey144 }, icon)),
|
|
7
7
|
React.createElement(Label, null, label)));
|
|
8
8
|
}
|
|
@@ -2,6 +2,6 @@ import React from 'react';
|
|
|
2
2
|
import { grey160, grey176, grey224, grey24, grey248, grey32, grey8, } from '../../style/colors.js';
|
|
3
3
|
import { StyledButton, StyledIcon } from './shared.js';
|
|
4
4
|
export function IconButton32({ icon, title, disabled = false, selected = false, onClick, }) {
|
|
5
|
-
return (React.createElement(StyledButton, { bg: grey32, bgSelect: grey8, bgHover: grey24, color: grey224, colorSelect: grey248, title: title, selected: selected, disabled: disabled, onClick: onClick },
|
|
6
|
-
React.createElement(StyledIcon, { color: selected ? grey176 : grey160 }, icon)));
|
|
5
|
+
return (React.createElement(StyledButton, { $bg: grey32, $bgSelect: grey8, $bgHover: grey24, $color: grey224, $colorSelect: grey248, title: title, $selected: selected, disabled: disabled, onClick: onClick },
|
|
6
|
+
React.createElement(StyledIcon, { $color: selected ? grey176 : grey160 }, icon)));
|
|
7
7
|
}
|
|
@@ -2,6 +2,6 @@ import React from 'react';
|
|
|
2
2
|
import { grey144, grey176, grey216, grey24, grey248, grey32, grey8, } from '../../style/colors.js';
|
|
3
3
|
import { StyledButton, StyledIcon } from './shared.js';
|
|
4
4
|
export function IconButton8({ icon, title, disabled = false, selected = false, onClick, }) {
|
|
5
|
-
return (React.createElement(StyledButton, { bg: grey8, bgSelect: grey32, bgHover: grey24, color: grey216, colorSelect: grey248, title: title, selected: selected, disabled: disabled, onClick: onClick },
|
|
6
|
-
React.createElement(StyledIcon, { color: selected ? grey176 : grey144 }, icon)));
|
|
5
|
+
return (React.createElement(StyledButton, { $bg: grey8, $bgSelect: grey32, $bgHover: grey24, $color: grey216, $colorSelect: grey248, title: title, $selected: selected, disabled: disabled, onClick: onClick },
|
|
6
|
+
React.createElement(StyledIcon, { $color: selected ? grey176 : grey144 }, icon)));
|
|
7
7
|
}
|
|
@@ -1,16 +1,24 @@
|
|
|
1
1
|
type StyledButtonProps = {
|
|
2
|
-
bg: string;
|
|
3
|
-
bgSelect: string;
|
|
4
|
-
bgHover: string;
|
|
5
|
-
color: string;
|
|
6
|
-
colorSelect: string;
|
|
7
|
-
selected: boolean;
|
|
2
|
+
$bg: string;
|
|
3
|
+
$bgSelect: string;
|
|
4
|
+
$bgHover: string;
|
|
5
|
+
$color: string;
|
|
6
|
+
$colorSelect: string;
|
|
7
|
+
$selected: boolean;
|
|
8
8
|
disabled: boolean;
|
|
9
9
|
};
|
|
10
|
-
export declare const StyledButton: import("styled-components").
|
|
11
|
-
export declare const StyledLink: import("styled-components").
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}, never
|
|
15
|
-
|
|
10
|
+
export declare const StyledButton: import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, keyof StyledButtonProps> & StyledButtonProps, never> & Partial<Pick<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, keyof StyledButtonProps> & StyledButtonProps, never>>> & string;
|
|
11
|
+
export declare const StyledLink: import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, keyof StyledButtonProps> & StyledButtonProps, never> & Partial<Pick<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, keyof StyledButtonProps> & StyledButtonProps, never>> & {
|
|
12
|
+
as?: import("styled-components").WebTarget | undefined;
|
|
13
|
+
forwardedAs?: import("styled-components").WebTarget | undefined;
|
|
14
|
+
}, keyof import("react").ClassAttributes<HTMLAnchorElement> | keyof import("react").AnchorHTMLAttributes<HTMLAnchorElement>> & import("react").ClassAttributes<HTMLAnchorElement> & import("react").AnchorHTMLAttributes<HTMLAnchorElement>, "as"> & Partial<Pick<import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, keyof StyledButtonProps> & StyledButtonProps, never> & Partial<Pick<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, keyof StyledButtonProps> & StyledButtonProps, never>> & {
|
|
15
|
+
as?: import("styled-components").WebTarget | undefined;
|
|
16
|
+
forwardedAs?: import("styled-components").WebTarget | undefined;
|
|
17
|
+
}, keyof import("react").ClassAttributes<HTMLAnchorElement> | keyof import("react").AnchorHTMLAttributes<HTMLAnchorElement>> & import("react").ClassAttributes<HTMLAnchorElement> & import("react").AnchorHTMLAttributes<HTMLAnchorElement>, "as">>> & string;
|
|
18
|
+
export declare const StyledIcon: import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "$color"> & {
|
|
19
|
+
$color: string;
|
|
20
|
+
}, never> & Partial<Pick<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "$color"> & {
|
|
21
|
+
$color: string;
|
|
22
|
+
}, never>>> & string;
|
|
23
|
+
export declare const Label: import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never> & Partial<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>>> & string;
|
|
16
24
|
export {};
|
|
@@ -9,8 +9,8 @@ export const StyledButton = styled.button `
|
|
|
9
9
|
height: 32px;
|
|
10
10
|
border: 0;
|
|
11
11
|
border-radius: 3px;
|
|
12
|
-
background: ${props => (props
|
|
13
|
-
color: ${props => (props
|
|
12
|
+
background: ${props => (props.$selected ? props.$bgSelect : props.$bg)};
|
|
13
|
+
color: ${props => (props.$selected ? props.$colorSelect : props.$color)};
|
|
14
14
|
white-space: nowrap;
|
|
15
15
|
user-select: none;
|
|
16
16
|
outline: none;
|
|
@@ -19,25 +19,25 @@ export const StyledButton = styled.button `
|
|
|
19
19
|
color ${quick}s,
|
|
20
20
|
opacity ${quick}s;
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
background: ${props =>
|
|
22
|
+
&:hover {
|
|
23
|
+
background: ${props => props.$selected ? props.$bgSelect : props.$bgHover};
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
&:focus {
|
|
27
27
|
box-shadow: 0 0 0.5px 1px ${blue};
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
background: ${props => (props
|
|
30
|
+
&:disabled {
|
|
31
|
+
background: ${props => (props.$selected ? props.$bgSelect : props.$bg)};
|
|
32
32
|
cursor: default;
|
|
33
33
|
opacity: 0.5;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
&::-moz-focus-inner {
|
|
37
37
|
border: 0;
|
|
38
38
|
}
|
|
39
39
|
`;
|
|
40
|
-
export const StyledLink = styled(StyledButton.
|
|
40
|
+
export const StyledLink = styled(StyledButton).attrs({ as: 'a' }) `
|
|
41
41
|
text-decoration: none;
|
|
42
42
|
`;
|
|
43
43
|
const iconSize = 16;
|
|
@@ -45,14 +45,14 @@ export const StyledIcon = styled.span `
|
|
|
45
45
|
width: ${iconSize}px;
|
|
46
46
|
height: ${iconSize}px;
|
|
47
47
|
padding: 2px 0 0 0;
|
|
48
|
-
color: ${props => props
|
|
48
|
+
color: ${props => props.$color};
|
|
49
49
|
transition: color ${quick}s;
|
|
50
50
|
`;
|
|
51
51
|
export const Label = styled.span `
|
|
52
52
|
padding-left: 6px;
|
|
53
53
|
line-height: 14px;
|
|
54
54
|
|
|
55
|
-
|
|
55
|
+
&:first-child {
|
|
56
56
|
padding-left: 0;
|
|
57
57
|
}
|
|
58
58
|
`;
|
|
@@ -72,8 +72,8 @@ export function NumberInput({ id, value, minValue = -maxNumber, maxValue = maxNu
|
|
|
72
72
|
return increment(getStep(), -1);
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
|
-
return (React.createElement(TextInputContainer, { focused: focused, focusedBg: styles.focusedBg, focusedBoxShadow: styles.focusedBoxShadow },
|
|
75
|
+
return (React.createElement(TextInputContainer, { $focused: focused, $focusedBg: styles.focusedBg, $focusedBoxShadow: styles.focusedBoxShadow },
|
|
76
76
|
React.createElement(TextContainer, null,
|
|
77
|
-
React.createElement(TextMirror, { minWidth: 8, focused: focused }, rawValue),
|
|
78
|
-
React.createElement(TextField, { rows: 1, id: id, value: rawValue, focused: focused, color: styles.focusedColor, onChange: handleChange, onFocus: onFocus, onBlur: handleBlur, onKeyDown: handleKeyDown }))));
|
|
77
|
+
React.createElement(TextMirror, { $minWidth: 8, $focused: focused }, rawValue),
|
|
78
|
+
React.createElement(TextField, { rows: 1, id: id, value: rawValue, $focused: focused, $color: styles.focusedColor, onChange: handleChange, onFocus: onFocus, onBlur: handleBlur, onKeyDown: handleKeyDown }))));
|
|
79
79
|
}
|
|
@@ -17,10 +17,10 @@ export function Select({ id, testId, options, value, color, height, padding, onC
|
|
|
17
17
|
const renderOption = (option) => (React.createElement("option", { key: option.value, value: option.value }, option.label));
|
|
18
18
|
const selectedOption = findOption(options, value);
|
|
19
19
|
const selectedLabel = selectedOption ? selectedOption.label : CUSTOM_LABEL;
|
|
20
|
-
return (React.createElement(Container, { focused: focused, bg: grey32 },
|
|
21
|
-
React.createElement(VisibleButton, { height: height, padding: padding },
|
|
22
|
-
React.createElement(Label, { height: height, color: color }, selectedLabel),
|
|
23
|
-
React.createElement(IconContainer, { color: color },
|
|
20
|
+
return (React.createElement(Container, { $focused: focused, $bg: grey32 },
|
|
21
|
+
React.createElement(VisibleButton, { $height: height, $padding: padding },
|
|
22
|
+
React.createElement(Label, { $height: height, $color: color }, selectedLabel),
|
|
23
|
+
React.createElement(IconContainer, { $color: color },
|
|
24
24
|
React.createElement(ChevronDownIcon, null))),
|
|
25
25
|
React.createElement(SelectInput, { id: id, "data-testid": testId, value: value, onFocus: onFocus, onBlur: onBlur, onChange: onInputChange },
|
|
26
26
|
!selectedOption && (React.createElement("option", { key: "custom-option", value: value }, CUSTOM_LABEL)),
|
|
@@ -36,20 +36,20 @@ function findOption(options, targetValue) {
|
|
|
36
36
|
const Container = styled.div `
|
|
37
37
|
position: relative;
|
|
38
38
|
border-radius: 3px;
|
|
39
|
-
background: ${props => props
|
|
40
|
-
box-shadow: ${props => (props
|
|
39
|
+
background: ${props => props.$bg};
|
|
40
|
+
box-shadow: ${props => (props.$focused ? `0 0 0.5px 1px ${blue}` : 'none')};
|
|
41
41
|
overflow: hidden;
|
|
42
42
|
`;
|
|
43
43
|
const VisibleButton = styled.div `
|
|
44
44
|
display: flex;
|
|
45
45
|
flex-direction: row;
|
|
46
46
|
align-items: center;
|
|
47
|
-
padding: 0 ${props => props
|
|
48
|
-
height: ${props => props
|
|
47
|
+
padding: 0 ${props => props.$padding - 2}px 0 ${props => props.$padding}px;
|
|
48
|
+
height: ${props => props.$height}px;
|
|
49
49
|
`;
|
|
50
50
|
const Label = styled.span `
|
|
51
|
-
color: ${props => props
|
|
52
|
-
line-height: ${props => props
|
|
51
|
+
color: ${props => props.$color};
|
|
52
|
+
line-height: ${props => props.$height}px;
|
|
53
53
|
overflow: hidden;
|
|
54
54
|
white-space: nowrap;
|
|
55
55
|
text-overflow: ellipsis;
|
|
@@ -60,7 +60,7 @@ const IconContainer = styled.span `
|
|
|
60
60
|
width: ${iconSize}px;
|
|
61
61
|
height: ${iconSize}px;
|
|
62
62
|
padding: 2px 0 0 2px;
|
|
63
|
-
color: ${props => props
|
|
63
|
+
color: ${props => props.$color};
|
|
64
64
|
opacity: 0.7;
|
|
65
65
|
`;
|
|
66
66
|
const SelectInput = styled.select `
|
|
@@ -1,14 +1,24 @@
|
|
|
1
|
-
export declare const TextInputContainer: import("styled-components").
|
|
2
|
-
focused: boolean;
|
|
3
|
-
focusedBg: string;
|
|
4
|
-
focusedBoxShadow: string;
|
|
5
|
-
}, never
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
export declare const
|
|
12
|
-
focused: boolean;
|
|
13
|
-
|
|
14
|
-
}, never
|
|
1
|
+
export declare const TextInputContainer: import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$focused" | "$focusedBg" | "$focusedBoxShadow"> & {
|
|
2
|
+
$focused: boolean;
|
|
3
|
+
$focusedBg: string;
|
|
4
|
+
$focusedBoxShadow: string;
|
|
5
|
+
}, never> & Partial<Pick<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$focused" | "$focusedBg" | "$focusedBoxShadow"> & {
|
|
6
|
+
$focused: boolean;
|
|
7
|
+
$focusedBg: string;
|
|
8
|
+
$focusedBoxShadow: string;
|
|
9
|
+
}, never>>> & string;
|
|
10
|
+
export declare const TextContainer: import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
|
|
11
|
+
export declare const TextField: import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "$color" | "$focused"> & {
|
|
12
|
+
$focused: boolean;
|
|
13
|
+
$color: string;
|
|
14
|
+
}, never> & Partial<Pick<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "$color" | "$focused"> & {
|
|
15
|
+
$focused: boolean;
|
|
16
|
+
$color: string;
|
|
17
|
+
}, never>>> & string;
|
|
18
|
+
export declare const TextMirror: import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$focused" | "$minWidth"> & {
|
|
19
|
+
$focused: boolean;
|
|
20
|
+
$minWidth: number;
|
|
21
|
+
}, never> & Partial<Pick<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$focused" | "$minWidth"> & {
|
|
22
|
+
$focused: boolean;
|
|
23
|
+
$minWidth: number;
|
|
24
|
+
}, never>>> & string;
|
|
@@ -5,8 +5,8 @@ export const TextInputContainer = styled.div `
|
|
|
5
5
|
max-width: 100%;
|
|
6
6
|
padding: 2px 5px;
|
|
7
7
|
border-radius: 3px;
|
|
8
|
-
background: ${props => (props
|
|
9
|
-
box-shadow: ${props => (props
|
|
8
|
+
background: ${props => (props.$focused ? props.$focusedBg : 'transparent')};
|
|
9
|
+
box-shadow: ${props => (props.$focused ? props.$focusedBoxShadow : 'none')};
|
|
10
10
|
`;
|
|
11
11
|
export const TextContainer = styled.div `
|
|
12
12
|
position: relative;
|
|
@@ -21,19 +21,19 @@ export const TextField = styled.textarea `
|
|
|
21
21
|
padding: 0;
|
|
22
22
|
border: 0;
|
|
23
23
|
background: none;
|
|
24
|
-
color: ${props => props
|
|
24
|
+
color: ${props => props.$color};
|
|
25
25
|
font-size: 14px;
|
|
26
26
|
line-height: 20px;
|
|
27
27
|
white-space: pre;
|
|
28
28
|
overflow: hidden;
|
|
29
29
|
outline: none;
|
|
30
30
|
resize: none;
|
|
31
|
-
opacity: ${props => (props
|
|
31
|
+
opacity: ${props => (props.$focused ? 1 : 0)};
|
|
32
32
|
`;
|
|
33
33
|
export const TextMirror = styled.div `
|
|
34
34
|
color: ${lightBlue};
|
|
35
|
-
opacity: ${props => (props
|
|
36
|
-
min-width: ${props => props
|
|
35
|
+
opacity: ${props => (props.$focused ? 0 : 1)};
|
|
36
|
+
min-width: ${props => props.$minWidth}px;
|
|
37
37
|
min-height: 20px;
|
|
38
38
|
font-size: 14px;
|
|
39
39
|
line-height: 20px;
|