@galaxy-io/dls 1.3.1 → 1.3.3
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/{metrics → charts}/ProgressBar.js +11 -11
- package/dist/charts/StatChart.d.ts +15 -0
- package/dist/{metrics/MetricItem.js → charts/StatChart.js} +16 -16
- package/dist/inputs/DateInput.js +3 -3
- package/dist/inputs/MultiSelectInput.d.ts +3 -2
- package/dist/inputs/MultiSelectInput.js +8 -8
- package/dist/inputs/SelectInput.d.ts +4 -8
- package/dist/inputs/SelectInput.js +14 -20
- package/dist/styles.css +15 -15
- package/package.json +1 -5
- package/dist/metrics/MetricItem.d.ts +0 -15
- /package/dist/{metrics → charts}/ProgressBar.d.ts +0 -0
|
@@ -4,7 +4,7 @@ import { styled } from "@linaria/react";
|
|
|
4
4
|
import { match } from "ts-pattern";
|
|
5
5
|
import { useMemo } from "react";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
|
-
//#region src/
|
|
7
|
+
//#region src/charts/ProgressBar.tsx
|
|
8
8
|
var ProgressBarVariant = /* @__PURE__ */ function(ProgressBarVariant) {
|
|
9
9
|
ProgressBarVariant["GALAXY"] = "GALAXY";
|
|
10
10
|
ProgressBarVariant["PRIMARY"] = "PRIMARY";
|
|
@@ -17,12 +17,12 @@ var _exp2 = () => ({ theme }) => theme.color.background.tertiary;
|
|
|
17
17
|
var _exp3 = () => ({ theme }) => theme.color.border.primary;
|
|
18
18
|
var StyledProgressBar = withTheme(/*#__PURE__*/ styled("div")({
|
|
19
19
|
name: "StyledProgressBar",
|
|
20
|
-
class: "
|
|
20
|
+
class: "s1yc7aow",
|
|
21
21
|
propsAsIs: false,
|
|
22
22
|
vars: {
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
23
|
+
"s1yc7aow-0": [_exp()],
|
|
24
|
+
"s1yc7aow-1": [_exp2()],
|
|
25
|
+
"s1yc7aow-2": [_exp3()]
|
|
26
26
|
}
|
|
27
27
|
}));
|
|
28
28
|
var _exp4 = () => ({ $width }) => `${$width}%`;
|
|
@@ -32,14 +32,14 @@ var _exp9 = () => ({ theme, $variant }) => match($variant).returnType().with("GA
|
|
|
32
32
|
var _exp0 = () => ({ $noAnimation }) => $noAnimation ? "shimmer 2.5s infinite" : "shimmer 2.5s infinite, pulse 2.5s cubic-bezier(0.4, 0, 0.6, 1) infinite";
|
|
33
33
|
var ProgressBarFill = withTheme(/*#__PURE__*/ styled("div")({
|
|
34
34
|
name: "ProgressBarFill",
|
|
35
|
-
class: "
|
|
35
|
+
class: "p1sc05jm",
|
|
36
36
|
propsAsIs: false,
|
|
37
37
|
vars: {
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
38
|
+
"p1sc05jm-0": [_exp4()],
|
|
39
|
+
"p1sc05jm-1": [_exp9()],
|
|
40
|
+
"p1sc05jm-2": [_exp8()],
|
|
41
|
+
"p1sc05jm-3": [_exp7()],
|
|
42
|
+
"p1sc05jm-4": [_exp0()]
|
|
43
43
|
}
|
|
44
44
|
}));
|
|
45
45
|
var ProgressBar = ({ percentage, variant = "PRIMARY", height = 4, noSliverOnZero = false, noAnimation = false }) => {
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
export declare enum StatChartVariant {
|
|
3
|
+
BASE = "BASE",
|
|
4
|
+
PRIMARY = "PRIMARY",
|
|
5
|
+
SECONDARY = "SECONDARY",
|
|
6
|
+
TERTIARY = "TERTIARY"
|
|
7
|
+
}
|
|
8
|
+
interface StatChartProps {
|
|
9
|
+
label: string;
|
|
10
|
+
value: ReactNode;
|
|
11
|
+
variant?: StatChartVariant;
|
|
12
|
+
noBorder?: boolean;
|
|
13
|
+
}
|
|
14
|
+
declare const StatChart: ({ label, value, variant, noBorder, }: StatChartProps) => import("react").JSX.Element;
|
|
15
|
+
export default StatChart;
|
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
import { withTheme } from "../theme/GalaxyTheme.js";
|
|
2
2
|
import Text, { TextSize, TextVariant, TextWeight } from "../text/Text.js";
|
|
3
3
|
import FlexWrapper, { AlignItems, FlexDirection } from "../containers/FlexWrapper.js";
|
|
4
|
-
/* empty css
|
|
4
|
+
/* empty css */
|
|
5
5
|
import { styled } from "@linaria/react";
|
|
6
6
|
import { match } from "ts-pattern";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
-
//#region src/
|
|
9
|
-
var
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
return
|
|
8
|
+
//#region src/charts/StatChart.tsx
|
|
9
|
+
var StatChartVariant = /* @__PURE__ */ function(StatChartVariant) {
|
|
10
|
+
StatChartVariant["BASE"] = "BASE";
|
|
11
|
+
StatChartVariant["PRIMARY"] = "PRIMARY";
|
|
12
|
+
StatChartVariant["SECONDARY"] = "SECONDARY";
|
|
13
|
+
StatChartVariant["TERTIARY"] = "TERTIARY";
|
|
14
|
+
return StatChartVariant;
|
|
15
15
|
}({});
|
|
16
16
|
var _exp = () => ({ theme, $variant }) => match($variant).with("BASE", () => theme.color.background.base).with("PRIMARY", () => theme.color.background.primary).with("SECONDARY", () => theme.color.background.secondary).with("TERTIARY", () => theme.color.background.tertiary).exhaustive();
|
|
17
17
|
var _exp2 = () => ({ theme, $noBorder }) => $noBorder ? "transparent" : theme.color.border.primary;
|
|
18
|
-
var
|
|
19
|
-
name: "
|
|
20
|
-
class: "
|
|
18
|
+
var StatChartWrapper = withTheme(/*#__PURE__*/ styled("div")({
|
|
19
|
+
name: "StatChartWrapper",
|
|
20
|
+
class: "slaxlp8",
|
|
21
21
|
propsAsIs: false,
|
|
22
22
|
vars: {
|
|
23
|
-
"
|
|
24
|
-
"
|
|
23
|
+
"slaxlp8-0": [_exp()],
|
|
24
|
+
"slaxlp8-1": [_exp2()]
|
|
25
25
|
}
|
|
26
26
|
}));
|
|
27
|
-
var
|
|
28
|
-
return /* @__PURE__ */ jsx(
|
|
27
|
+
var StatChart = ({ label, value, variant = "PRIMARY", noBorder }) => {
|
|
28
|
+
return /* @__PURE__ */ jsx(StatChartWrapper, {
|
|
29
29
|
$variant: variant,
|
|
30
30
|
$noBorder: noBorder,
|
|
31
31
|
children: /* @__PURE__ */ jsxs(FlexWrapper, {
|
|
@@ -50,4 +50,4 @@ var MetricItem = ({ label, value, variant = "PRIMARY", noBorder }) => {
|
|
|
50
50
|
});
|
|
51
51
|
};
|
|
52
52
|
//#endregion
|
|
53
|
-
export {
|
|
53
|
+
export { StatChartVariant, StatChart as default };
|
package/dist/inputs/DateInput.js
CHANGED
|
@@ -7,7 +7,7 @@ import Dropdown, { DropdownVariant } from "../dropdown/Dropdown.js";
|
|
|
7
7
|
import GridWrapper from "../containers/GridWrapper.js";
|
|
8
8
|
import Spacing from "../containers/Spacing.js";
|
|
9
9
|
import { InputLabel, InputSize } from "./Input.js";
|
|
10
|
-
import SelectInput, {
|
|
10
|
+
import SelectInput, { SelectInputVariant } from "./SelectInput.js";
|
|
11
11
|
/* empty css */
|
|
12
12
|
import { styled } from "@linaria/react";
|
|
13
13
|
import { match } from "ts-pattern";
|
|
@@ -379,7 +379,7 @@ var DateInput = ({ label, size = InputSize.MEDIUM, value, placeholder = "Select
|
|
|
379
379
|
onMouseDown: (e) => e.stopPropagation(),
|
|
380
380
|
children: [/* @__PURE__ */ jsx(SelectInput, {
|
|
381
381
|
variant: SelectInputVariant.SECONDARY,
|
|
382
|
-
size:
|
|
382
|
+
size: InputSize.SMALL,
|
|
383
383
|
options: monthOptions,
|
|
384
384
|
value: selectedMonthOption,
|
|
385
385
|
onChange: handleMonthChange,
|
|
@@ -388,7 +388,7 @@ var DateInput = ({ label, size = InputSize.MEDIUM, value, placeholder = "Select
|
|
|
388
388
|
width: 120
|
|
389
389
|
}), /* @__PURE__ */ jsx(SelectInput, {
|
|
390
390
|
variant: SelectInputVariant.SECONDARY,
|
|
391
|
-
size:
|
|
391
|
+
size: InputSize.SMALL,
|
|
392
392
|
options: yearOptions,
|
|
393
393
|
value: selectedYearOption,
|
|
394
394
|
onChange: handleYearChange,
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
2
|
import type { Icon as PhosphorIcon } from "@phosphor-icons/react";
|
|
3
3
|
import { DropdownPosition } from "../dropdown/Dropdown";
|
|
4
|
-
import {
|
|
4
|
+
import { InputSize } from "./Input";
|
|
5
|
+
import { SelectInputVariant, type SelectInputOption } from "./SelectInput";
|
|
5
6
|
export interface PinnedOptions {
|
|
6
7
|
id: string;
|
|
7
8
|
label: string;
|
|
@@ -11,7 +12,7 @@ export interface MultiSelectInputProps {
|
|
|
11
12
|
label?: string;
|
|
12
13
|
icon?: PhosphorIcon;
|
|
13
14
|
variant?: SelectInputVariant;
|
|
14
|
-
size?:
|
|
15
|
+
size?: InputSize;
|
|
15
16
|
options: SelectInputOption[];
|
|
16
17
|
value: SelectInputOption[];
|
|
17
18
|
placeholder?: string;
|
|
@@ -6,12 +6,12 @@ import Icon, { IconVariant } from "../icons/Icon.js";
|
|
|
6
6
|
import FlexWrapper, { AlignItems, FlexDirection } from "../containers/FlexWrapper.js";
|
|
7
7
|
import CheckboxInput, { CheckboxInputVariant } from "./CheckboxInput.js";
|
|
8
8
|
import Dropdown, { DropdownPosition, DropdownVariant } from "../dropdown/Dropdown.js";
|
|
9
|
-
import { InputLabel } from "./Input.js";
|
|
9
|
+
import { InputLabel, InputSize } from "./Input.js";
|
|
10
10
|
import RotateWithTransition from "../animations/RotateWithTransition.js";
|
|
11
11
|
import HorizontalDivider from "../dividers/HorizontalDivider.js";
|
|
12
12
|
import { useElementWidth } from "../hooks/useElementWidth.js";
|
|
13
13
|
import { useControlledOpenState, useDebouncedValue } from "./hooks.js";
|
|
14
|
-
import { SELECT_INPUT_SIZE_TO_ICON_SIZE, SELECT_INPUT_SIZE_TO_TEXT_SIZE_MAP, SELECT_INPUT_VARIANT_TO_ICON_VARIANT_MAP,
|
|
14
|
+
import { SELECT_INPUT_SIZE_TO_ICON_SIZE, SELECT_INPUT_SIZE_TO_TEXT_SIZE_MAP, SELECT_INPUT_VARIANT_TO_ICON_VARIANT_MAP, SelectInputVariant } from "./SelectInput.js";
|
|
15
15
|
/* empty css */
|
|
16
16
|
import { styled } from "@linaria/react";
|
|
17
17
|
import { match } from "ts-pattern";
|
|
@@ -20,10 +20,10 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
|
20
20
|
import { ArrowCounterClockwiseIcon, CaretDownIcon } from "@phosphor-icons/react";
|
|
21
21
|
//#region src/inputs/MultiSelectInput.tsx
|
|
22
22
|
var _exp = () => ({ $size }) => {
|
|
23
|
-
return match($size).with(
|
|
23
|
+
return match($size).with(InputSize.SMALL, () => "0 6px").with(InputSize.MEDIUM, () => "0 8px").with(InputSize.LARGE, () => "0 10px").exhaustive();
|
|
24
24
|
};
|
|
25
25
|
var _exp2 = () => ({ $size }) => {
|
|
26
|
-
return match($size).with(
|
|
26
|
+
return match($size).with(InputSize.SMALL, () => "24px").with(InputSize.MEDIUM, () => "28px").with(InputSize.LARGE, () => "32px").exhaustive();
|
|
27
27
|
};
|
|
28
28
|
var _exp3 = () => ({ $fillWidth, $width }) => $fillWidth ? "100%" : $width ? getCssSizeValue($width) : "auto";
|
|
29
29
|
var _exp4 = () => ({ $isDisabled }) => $isDisabled ? "not-allowed" : "pointer";
|
|
@@ -51,14 +51,14 @@ var StyledMultiSelectInput = withTheme(/*#__PURE__*/ styled("div")({
|
|
|
51
51
|
}
|
|
52
52
|
}));
|
|
53
53
|
var _exp9 = () => ({ $size }) => {
|
|
54
|
-
return match($size).with(
|
|
54
|
+
return match($size).with(InputSize.SMALL, () => "24px").with(InputSize.MEDIUM, () => "28px").with(InputSize.LARGE, () => "32px").exhaustive();
|
|
55
55
|
};
|
|
56
56
|
var _exp0 = () => ({ theme }) => theme.color.text.primary;
|
|
57
57
|
var _exp1 = () => ({ theme, $size }) => {
|
|
58
|
-
return match($size).with(
|
|
58
|
+
return match($size).with(InputSize.SMALL, () => theme.font.sans.size.body_sm).with(InputSize.MEDIUM, () => theme.font.sans.size.body_md).with(InputSize.LARGE, () => theme.font.sans.size.body_lg).exhaustive();
|
|
59
59
|
};
|
|
60
60
|
var _exp10 = () => ({ theme, $size }) => {
|
|
61
|
-
return match($size).with(
|
|
61
|
+
return match($size).with(InputSize.SMALL, () => theme.font.sans.height.body_sm).with(InputSize.MEDIUM, () => theme.font.sans.height.body_md).with(InputSize.LARGE, () => theme.font.sans.height.body_lg).exhaustive();
|
|
62
62
|
};
|
|
63
63
|
var _exp11 = () => ({ theme }) => theme.font.sans.weight.medium;
|
|
64
64
|
var _exp12 = () => ({ theme }) => theme.font.sans.family;
|
|
@@ -131,7 +131,7 @@ var SELECT_INPUT_VARIANT_TO_CHECKBOX_INPUT_VARIANT = {
|
|
|
131
131
|
[SelectInputVariant.SECONDARY]: CheckboxInputVariant.SECONDARY,
|
|
132
132
|
[SelectInputVariant.TERTIARY]: CheckboxInputVariant.PRIMARY
|
|
133
133
|
};
|
|
134
|
-
var MultiSelectInput = ({ label, icon, variant = SelectInputVariant.PRIMARY, size =
|
|
134
|
+
var MultiSelectInput = ({ label, icon, variant = SelectInputVariant.PRIMARY, size = InputSize.MEDIUM, options, value, placeholder = "Select options...", onChange, width, fillWidth, dropdownWidth, dropdownPlacement = DropdownPosition.BOTTOM_START, isDisabled = false, isRequired = false, isOpen: controlledIsOpen, isIconTrailing, onOpenChange, onReset, pinnedOptions = [], maxDisplayItems = 3, renderSelectedText, renderSelectedContent, error, onSearch, debounceMs = 300 }) => {
|
|
135
135
|
const isSearchable = !!onSearch;
|
|
136
136
|
const [isHovered, setIsHovered] = useState(false);
|
|
137
137
|
const [searchTerm, setSearchTerm] = useState("");
|
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
import { IconVariant } from "../icons/Icon";
|
|
2
2
|
import { TextSize, TextVariant } from "../text/Text";
|
|
3
|
+
import { InputSize } from "./Input";
|
|
3
4
|
export declare enum SelectInputVariant {
|
|
4
5
|
BASE = "BASE",
|
|
5
6
|
PRIMARY = "PRIMARY",
|
|
6
7
|
SECONDARY = "SECONDARY",
|
|
7
8
|
TERTIARY = "TERTIARY"
|
|
8
9
|
}
|
|
9
|
-
export declare enum SelectInputSize {
|
|
10
|
-
SMALL = "SMALL",
|
|
11
|
-
MEDIUM = "MEDIUM",
|
|
12
|
-
LARGE = "LARGE"
|
|
13
|
-
}
|
|
14
10
|
export interface SelectInputOption {
|
|
15
11
|
id: string;
|
|
16
12
|
label: string;
|
|
@@ -26,7 +22,7 @@ export interface PinnedOption {
|
|
|
26
22
|
export interface SelectInputProps {
|
|
27
23
|
label?: string;
|
|
28
24
|
variant?: SelectInputVariant;
|
|
29
|
-
size?:
|
|
25
|
+
size?: InputSize;
|
|
30
26
|
options: SelectInputOption[];
|
|
31
27
|
value?: SelectInputOption | null;
|
|
32
28
|
placeholder?: string;
|
|
@@ -45,7 +41,7 @@ export interface SelectInputProps {
|
|
|
45
41
|
debounceMs?: number;
|
|
46
42
|
}
|
|
47
43
|
export declare const SELECT_INPUT_VARIANT_TO_ICON_VARIANT_MAP: Record<SelectInputVariant, IconVariant>;
|
|
48
|
-
export declare const SELECT_INPUT_SIZE_TO_ICON_SIZE: Record<
|
|
49
|
-
export declare const SELECT_INPUT_SIZE_TO_TEXT_SIZE_MAP: Record<
|
|
44
|
+
export declare const SELECT_INPUT_SIZE_TO_ICON_SIZE: Record<InputSize, number>;
|
|
45
|
+
export declare const SELECT_INPUT_SIZE_TO_TEXT_SIZE_MAP: Record<InputSize, TextSize>;
|
|
50
46
|
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;
|
|
51
47
|
export default SelectInput;
|
|
@@ -6,7 +6,7 @@ import Icon, { IconVariant, IconWeight } from "../icons/Icon.js";
|
|
|
6
6
|
import FlexWrapper, { AlignItems, FlexDirection } from "../containers/FlexWrapper.js";
|
|
7
7
|
import Dropdown, { DropdownVariant } from "../dropdown/Dropdown.js";
|
|
8
8
|
import Spacing from "../containers/Spacing.js";
|
|
9
|
-
import { InputLabel } from "./Input.js";
|
|
9
|
+
import { InputLabel, InputSize } from "./Input.js";
|
|
10
10
|
import RotateWithTransition from "../animations/RotateWithTransition.js";
|
|
11
11
|
import HorizontalDivider from "../dividers/HorizontalDivider.js";
|
|
12
12
|
import { useElementWidth } from "../hooks/useElementWidth.js";
|
|
@@ -25,17 +25,11 @@ var SelectInputVariant = /* @__PURE__ */ function(SelectInputVariant) {
|
|
|
25
25
|
SelectInputVariant["TERTIARY"] = "TERTIARY";
|
|
26
26
|
return SelectInputVariant;
|
|
27
27
|
}({});
|
|
28
|
-
var SelectInputSize = /* @__PURE__ */ function(SelectInputSize) {
|
|
29
|
-
SelectInputSize["SMALL"] = "SMALL";
|
|
30
|
-
SelectInputSize["MEDIUM"] = "MEDIUM";
|
|
31
|
-
SelectInputSize["LARGE"] = "LARGE";
|
|
32
|
-
return SelectInputSize;
|
|
33
|
-
}({});
|
|
34
28
|
var _exp = () => ({ $size }) => {
|
|
35
|
-
return match($size).with(
|
|
29
|
+
return match($size).with(InputSize.SMALL, () => "0 6px").with(InputSize.MEDIUM, () => "0 8px").with(InputSize.LARGE, () => "0 10px").exhaustive();
|
|
36
30
|
};
|
|
37
31
|
var _exp2 = () => ({ $size }) => {
|
|
38
|
-
return match($size).with(
|
|
32
|
+
return match($size).with(InputSize.SMALL, () => "24px").with(InputSize.MEDIUM, () => "28px").with(InputSize.LARGE, () => "32px").exhaustive();
|
|
39
33
|
};
|
|
40
34
|
var _exp3 = () => ({ $fillWidth, $width }) => $fillWidth ? "100%" : $width ? getCssSizeValue($width) : "auto";
|
|
41
35
|
var _exp4 = () => ({ $isDisabled }) => $isDisabled ? "not-allowed" : "pointer";
|
|
@@ -63,14 +57,14 @@ var StyledSelectInput = withTheme(/*#__PURE__*/ styled("div")({
|
|
|
63
57
|
}
|
|
64
58
|
}));
|
|
65
59
|
var _exp9 = () => ({ $size }) => {
|
|
66
|
-
return match($size).with(
|
|
60
|
+
return match($size).with(InputSize.SMALL, () => "24px").with(InputSize.MEDIUM, () => "28px").with(InputSize.LARGE, () => "32px").exhaustive();
|
|
67
61
|
};
|
|
68
62
|
var _exp0 = () => ({ theme }) => theme.color.text.primary;
|
|
69
63
|
var _exp1 = () => ({ theme, $size }) => {
|
|
70
|
-
return match($size).with(
|
|
64
|
+
return match($size).with(InputSize.SMALL, () => theme.font.sans.size.body_sm).with(InputSize.MEDIUM, () => theme.font.sans.size.body_md).with(InputSize.LARGE, () => theme.font.sans.size.body_lg).exhaustive();
|
|
71
65
|
};
|
|
72
66
|
var _exp10 = () => ({ theme, $size }) => {
|
|
73
|
-
return match($size).with(
|
|
67
|
+
return match($size).with(InputSize.SMALL, () => theme.font.sans.height.body_sm).with(InputSize.MEDIUM, () => theme.font.sans.height.body_md).with(InputSize.LARGE, () => theme.font.sans.height.body_lg).exhaustive();
|
|
74
68
|
};
|
|
75
69
|
var _exp11 = () => ({ theme }) => theme.font.sans.weight.medium;
|
|
76
70
|
var _exp12 = () => ({ theme }) => theme.font.sans.family;
|
|
@@ -150,16 +144,16 @@ var SELECT_INPUT_VARIANT_TO_ICON_VARIANT_MAP = {
|
|
|
150
144
|
["TERTIARY"]: IconVariant.PRIMARY
|
|
151
145
|
};
|
|
152
146
|
var SELECT_INPUT_SIZE_TO_ICON_SIZE = {
|
|
153
|
-
[
|
|
154
|
-
[
|
|
155
|
-
[
|
|
147
|
+
[InputSize.SMALL]: 12,
|
|
148
|
+
[InputSize.MEDIUM]: 14,
|
|
149
|
+
[InputSize.LARGE]: 16
|
|
156
150
|
};
|
|
157
151
|
var SELECT_INPUT_SIZE_TO_TEXT_SIZE_MAP = {
|
|
158
|
-
[
|
|
159
|
-
[
|
|
160
|
-
[
|
|
152
|
+
[InputSize.SMALL]: TextSize.BODY_MD,
|
|
153
|
+
[InputSize.MEDIUM]: TextSize.BODY_MD,
|
|
154
|
+
[InputSize.LARGE]: TextSize.BODY_MD
|
|
161
155
|
};
|
|
162
|
-
var SelectInput = ({ label, variant = "PRIMARY", size =
|
|
156
|
+
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 }) => {
|
|
163
157
|
const isSearchable = !!onSearch;
|
|
164
158
|
const [isHovered, setIsHovered] = useState(false);
|
|
165
159
|
const [searchTerm, setSearchTerm] = useState("");
|
|
@@ -525,4 +519,4 @@ var SelectInput = ({ label, variant = "PRIMARY", size = "MEDIUM", options, value
|
|
|
525
519
|
});
|
|
526
520
|
};
|
|
527
521
|
//#endregion
|
|
528
|
-
export { SELECT_INPUT_SIZE_TO_ICON_SIZE, SELECT_INPUT_SIZE_TO_TEXT_SIZE_MAP, SELECT_INPUT_VARIANT_TO_ICON_VARIANT_MAP,
|
|
522
|
+
export { SELECT_INPUT_SIZE_TO_ICON_SIZE, SELECT_INPUT_SIZE_TO_TEXT_SIZE_MAP, SELECT_INPUT_VARIANT_TO_ICON_VARIANT_MAP, SelectInputVariant, SelectInput as default };
|
package/dist/styles.css
CHANGED
|
@@ -46,6 +46,21 @@
|
|
|
46
46
|
.cjirv6a{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:6px;-webkit-appearance:none;-moz-appearance:none;-ms-appearance:none;appearance:none;background:none;border:0;padding:0;margin:0;font:inherit;color:inherit;cursor:pointer;border-radius:2px;opacity:1;-webkit-transition:opacity 100ms ease-in-out 200ms;transition:opacity 100ms ease-in-out 200ms;}.cjirv6a[data-state="muted"]{opacity:0.1;}.cjirv6a[data-state="faded"]{opacity:0.04;}@media (prefers-reduced-motion: reduce){.cjirv6a{-webkit-transition:none;transition:none;}}.cjirv6a:focus-visible{outline:1.5px solid currentColor;outline-offset:2px;}
|
|
47
47
|
.c1armna5{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:6px;opacity:1;-webkit-transition:opacity 100ms ease-in-out 200ms;transition:opacity 100ms ease-in-out 200ms;}.c1armna5[data-state="muted"]{opacity:0.1;}.c1armna5[data-state="faded"]{opacity:0.04;}@media (prefers-reduced-motion: reduce){.c1armna5{-webkit-transition:none;transition:none;}}
|
|
48
48
|
.cmbdg2q{width:var(--cmbdg2q-0);height:var(--cmbdg2q-0);border-radius:50%;background-color:var(--cmbdg2q-1);}
|
|
49
|
+
.s1yc7aow{position:relative;height:var(--s1yc7aow-0);width:100%;background-color:var(--s1yc7aow-1);border:0.5px solid var(--s1yc7aow-2);border-radius:4px;overflow:hidden;}
|
|
50
|
+
.p1sc05jm{position:absolute;top:0;left:0;height:100%;width:var(--p1sc05jm-0);background:linear-gradient(
|
|
51
|
+
90deg,
|
|
52
|
+
var(--p1sc05jm-1)
|
|
53
|
+
0%,
|
|
54
|
+
var(--p1sc05jm-2)
|
|
55
|
+
20%,
|
|
56
|
+
var(--p1sc05jm-3)
|
|
57
|
+
50%,
|
|
58
|
+
var(--p1sc05jm-2)
|
|
59
|
+
80%,
|
|
60
|
+
var(--p1sc05jm-1)
|
|
61
|
+
100%
|
|
62
|
+
);-webkit-background-size:200% 100%;background-size:200% 100%;-webkit-animation:var(--p1sc05jm-4);animation:var(--p1sc05jm-4);-webkit-transition:width 0.075s ease-in-out;transition:width 0.075s ease-in-out;}@-webkit-keyframes shimmer-p1sc05jm{0%{-webkit-background-position:150% 0;background-position:150% 0;}100%{-webkit-background-position:-250% 0;background-position:-250% 0;}}@keyframes shimmer-p1sc05jm{0%{-webkit-background-position:150% 0;background-position:150% 0;}100%{-webkit-background-position:-250% 0;background-position:-250% 0;}}@-webkit-keyframes pulse-p1sc05jm{0%,100%{opacity:0.9;}50%{opacity:0.6;}}@keyframes pulse-p1sc05jm{0%,100%{opacity:0.9;}50%{opacity:0.6;}}
|
|
63
|
+
.slaxlp8{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;-webkit-flex-basis:auto;-ms-flex-preferred-size:auto;flex-basis:auto;min-width:140px;background-color:var(--slaxlp8-0);padding:12px 16px;border:0.5px solid var(--slaxlp8-1);border-radius:5px;}
|
|
49
64
|
.shdcix9{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;gap:4px;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;box-sizing:border-box;min-width:16px;cursor:var(--shdcix9-0);-webkit-transition:border-color 0.1s ease-out;transition:border-color 0.1s ease-out;height:var(--shdcix9-1);padding:var(--shdcix9-2);background-color:var(--shdcix9-3);border:0.5px solid var(--shdcix9-4);border-radius:var(--shdcix9-5);}
|
|
50
65
|
.szfsuud{margin-left:0.5px;}.szfsuud>span{display:inline-block;-webkit-animation:ellipsisPulse-szfsuud var(--szfsuud-0) infinite ease-in-out both;animation:ellipsisPulse-szfsuud var(--szfsuud-0) infinite ease-in-out both;-webkit-animation-play-state:var(--szfsuud-1);animation-play-state:var(--szfsuud-1);}.szfsuud>span:nth-child(1){-webkit-animation-delay:0s;animation-delay:0s;}.szfsuud>span:nth-child(2){-webkit-animation-delay:0.2s;animation-delay:0.2s;}.szfsuud>span:nth-child(3){-webkit-animation-delay:0.4s;animation-delay:0.4s;}@-webkit-keyframes ellipsisPulse-szfsuud{0%,80%,100%{opacity:0.5;}40%{opacity:1;}}@keyframes ellipsisPulse-szfsuud{0%,80%,100%{opacity:0.5;}40%{opacity:1;}}
|
|
51
66
|
.s1p67zkf{display:inline-block;background:linear-gradient(
|
|
@@ -125,21 +140,6 @@
|
|
|
125
140
|
.l1o22m4p{height:auto;}
|
|
126
141
|
.s1o45025{margin:0;padding-left:8px;list-style:none;}.s1o45025 li{position:relative;padding-left:16px;margin:0;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:flex-start;-webkit-box-align:flex-start;-ms-flex-align:flex-start;align-items:flex-start;}.s1o45025 li::before{content:"•";position:absolute;left:0;top:0;color:var(--s1o45025-0);font-weight:var(--s1o45025-1);line-height:inherit;}
|
|
127
142
|
|
|
128
|
-
.mv8otd{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;-webkit-flex-basis:auto;-ms-flex-preferred-size:auto;flex-basis:auto;min-width:140px;background-color:var(--mv8otd-0);padding:12px 16px;border:0.5px solid var(--mv8otd-1);border-radius:5px;}
|
|
129
|
-
.sjen46y{position:relative;height:var(--sjen46y-0);width:100%;background-color:var(--sjen46y-1);border:0.5px solid var(--sjen46y-2);border-radius:4px;overflow:hidden;}
|
|
130
|
-
.pma25az{position:absolute;top:0;left:0;height:100%;width:var(--pma25az-0);background:linear-gradient(
|
|
131
|
-
90deg,
|
|
132
|
-
var(--pma25az-1)
|
|
133
|
-
0%,
|
|
134
|
-
var(--pma25az-2)
|
|
135
|
-
20%,
|
|
136
|
-
var(--pma25az-3)
|
|
137
|
-
50%,
|
|
138
|
-
var(--pma25az-2)
|
|
139
|
-
80%,
|
|
140
|
-
var(--pma25az-1)
|
|
141
|
-
100%
|
|
142
|
-
);-webkit-background-size:200% 100%;background-size:200% 100%;-webkit-animation:var(--pma25az-4);animation:var(--pma25az-4);-webkit-transition:width 0.075s ease-in-out;transition:width 0.075s ease-in-out;}@-webkit-keyframes shimmer-pma25az{0%{-webkit-background-position:150% 0;background-position:150% 0;}100%{-webkit-background-position:-250% 0;background-position:-250% 0;}}@keyframes shimmer-pma25az{0%{-webkit-background-position:150% 0;background-position:150% 0;}100%{-webkit-background-position:-250% 0;background-position:-250% 0;}}@-webkit-keyframes pulse-pma25az{0%,100%{opacity:0.9;}50%{opacity:0.6;}}@keyframes pulse-pma25az{0%,100%{opacity:0.9;}50%{opacity:0.6;}}
|
|
143
143
|
.sepkv8n{position:fixed;inset:0;opacity:var(--sepkv8n-0);visibility:var(--sepkv8n-1);pointer-events:none;}
|
|
144
144
|
.m1l9qfn{position:absolute;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;inset:0;pointer-events:none;}
|
|
145
145
|
.m1jgo9vf{position:relative;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;pointer-events:auto;}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@galaxy-io/dls",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.3",
|
|
4
4
|
"description": "Galaxy Design Language System",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"type": "module",
|
|
@@ -99,10 +99,6 @@
|
|
|
99
99
|
"types": "./dist/lists/*.d.ts",
|
|
100
100
|
"import": "./dist/lists/*.js"
|
|
101
101
|
},
|
|
102
|
-
"./metrics/*": {
|
|
103
|
-
"types": "./dist/metrics/*.d.ts",
|
|
104
|
-
"import": "./dist/metrics/*.js"
|
|
105
|
-
},
|
|
106
102
|
"./modal/*": {
|
|
107
103
|
"types": "./dist/modal/*.d.ts",
|
|
108
104
|
"import": "./dist/modal/*.js"
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { ReactNode } from "react";
|
|
2
|
-
export declare enum MetricItemVariant {
|
|
3
|
-
BASE = "BASE",
|
|
4
|
-
PRIMARY = "PRIMARY",
|
|
5
|
-
SECONDARY = "SECONDARY",
|
|
6
|
-
TERTIARY = "TERTIARY"
|
|
7
|
-
}
|
|
8
|
-
interface MetricItemProps {
|
|
9
|
-
label: string;
|
|
10
|
-
value: ReactNode;
|
|
11
|
-
variant?: MetricItemVariant;
|
|
12
|
-
noBorder?: boolean;
|
|
13
|
-
}
|
|
14
|
-
declare const MetricItem: ({ label, value, variant, noBorder, }: MetricItemProps) => import("react").JSX.Element;
|
|
15
|
-
export default MetricItem;
|
|
File without changes
|