@galaxy-io/dls 2.4.1 → 2.5.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/beacons/Beacon.d.ts +6 -6
- package/dist/beacons/Beacon.js +22 -19
- package/dist/buttons/Button.d.ts +6 -0
- package/dist/buttons/Button.js +3 -2
- package/dist/charts/BarChart.d.ts +2 -2
- package/dist/charts/ChartLegend.js +2 -1
- package/dist/charts/LineChart.js +1 -0
- package/dist/charts/PieChart.js +1 -0
- package/dist/charts/Sparkline.d.ts +5 -4
- package/dist/charts/Sparkline.js +21 -18
- package/dist/charts/barChartGeometry.d.ts +2 -2
- package/dist/charts/barChartLegend.js +2 -0
- package/dist/charts/chartPalette.d.ts +9 -5
- package/dist/charts/chartPalette.js +8 -2
- package/dist/charts/types.d.ts +7 -5
- package/dist/charts/useSeriesColorResolver.d.ts +2 -1
- package/dist/chips/Chip.d.ts +6 -5
- package/dist/chips/Chip.js +24 -21
- package/dist/feedback/EmptyState.d.ts +29 -3
- package/dist/feedback/EmptyState.js +39 -13
- package/dist/feedback/ProgressBar.d.ts +5 -4
- package/dist/feedback/ProgressBar.js +25 -22
- package/dist/feedback/ProgressCircle.d.ts +5 -4
- package/dist/feedback/ProgressCircle.js +25 -22
- package/dist/inputs/CheckboxGroup.d.ts +5 -1
- package/dist/inputs/CheckboxGroup.js +4 -2
- package/dist/inputs/ColorInput.d.ts +6 -2
- package/dist/inputs/ColorInput.js +4 -2
- package/dist/inputs/CopyInput.d.ts +6 -2
- package/dist/inputs/CopyInput.js +1 -1
- package/dist/inputs/CronInput.d.ts +6 -2
- package/dist/inputs/CronInput.js +4 -2
- package/dist/inputs/DateInput.d.ts +6 -2
- package/dist/inputs/DateInput.js +4 -2
- package/dist/inputs/DurationInput.d.ts +6 -2
- package/dist/inputs/DurationInput.js +4 -2
- package/dist/inputs/FileInput.d.ts +5 -1
- package/dist/inputs/FileInput.js +4 -2
- package/dist/inputs/Input.d.ts +7 -1
- package/dist/inputs/Input.js +7 -4
- package/dist/inputs/KeyValueInput.d.ts +6 -2
- package/dist/inputs/KeyValueInput.js +4 -2
- package/dist/inputs/MultiSelectInput.d.ts +5 -1
- package/dist/inputs/NumberInput.js +2 -1
- package/dist/inputs/PasswordInput.js +2 -1
- package/dist/inputs/PinInput.d.ts +6 -2
- package/dist/inputs/PinInput.js +4 -2
- package/dist/inputs/RadioGroup.d.ts +5 -1
- package/dist/inputs/RadioGroup.js +4 -2
- package/dist/inputs/SelectInput.d.ts +5 -1
- package/dist/inputs/SelectInput.js +4 -2
- package/dist/inputs/SliderInput.d.ts +6 -2
- package/dist/inputs/SliderInput.js +4 -2
- package/dist/inputs/TagInput.d.ts +6 -2
- package/dist/inputs/TagInput.js +4 -2
- package/dist/inputs/TextAreaInput.d.ts +6 -2
- package/dist/inputs/TextAreaInput.js +6 -3
- package/dist/inputs/ToggleInput.d.ts +5 -1
- package/dist/inputs/ToggleInput.js +4 -2
- package/dist/inputs/internal/ownField.d.ts +10 -5
- package/dist/inputs/internal/ownField.js +14 -9
- package/dist/layout/Box.d.ts +1 -1
- package/dist/layout/Box.js +20 -27
- package/dist/layout/Flex.d.ts +24 -1
- package/dist/layout/Flex.js +25 -5
- package/dist/layout/FlexItem.d.ts +24 -1
- package/dist/layout/FlexItem.js +22 -3
- package/dist/layout/internal/surface.d.ts +13 -0
- package/dist/layout/internal/surface.js +28 -0
- package/dist/lists/DescriptionList.d.ts +6 -0
- package/dist/lists/DescriptionList.js +13 -11
- package/dist/modal/ConfirmDialog.d.ts +4 -0
- package/dist/modal/ConfirmDialog.js +7 -4
- package/dist/shapes/Circle.d.ts +6 -5
- package/dist/shapes/Circle.js +21 -18
- package/dist/shapes/Square.d.ts +6 -5
- package/dist/shapes/Square.js +21 -18
- package/dist/styles.css +1 -1
- package/dist/table/TableCore.js +3 -2
- package/dist/theme/enums.d.ts +1 -1
- package/dist/theme/enums.js +1 -1
- package/dist/theme/tokens/palette.d.ts +5 -1
- package/dist/theme/tokens/palette.js +9 -1
- package/dist/theme/tokens/types.d.ts +9 -1
- package/dist/timeline/Timeline.d.ts +6 -5
- package/dist/timeline/Timeline.js +20 -17
- package/package.json +1 -1
package/dist/table/TableCore.js
CHANGED
|
@@ -8,7 +8,7 @@ import { t } from "../theme/tokens/t.js";
|
|
|
8
8
|
import Icon, { IconVariant } from "../icons/Icon.js";
|
|
9
9
|
import Rotate from "../transform/Rotate.js";
|
|
10
10
|
import Button, { ButtonSize, ButtonVariant } from "../buttons/Button.js";
|
|
11
|
-
import EmptyState, { EmptyStateSize } from "../feedback/EmptyState.js";
|
|
11
|
+
import EmptyState, { EmptyStateSize, EmptyStateVariant } from "../feedback/EmptyState.js";
|
|
12
12
|
import { useElementClientSize } from "../hooks/useElementClientSize.js";
|
|
13
13
|
import { formatNumber } from "../utils/format.js";
|
|
14
14
|
import ResizeHandle from "../layout/ResizeHandle.js";
|
|
@@ -945,7 +945,8 @@ function TableFrame({ metrics, columnLayout, leadingHeaders, trailingHeader, has
|
|
|
945
945
|
icon: WarningCircleIcon,
|
|
946
946
|
header: "Couldn't load data",
|
|
947
947
|
description: error,
|
|
948
|
-
size: metrics.emptyStateSize
|
|
948
|
+
size: metrics.emptyStateSize,
|
|
949
|
+
variant: EmptyStateVariant.ERROR
|
|
949
950
|
})
|
|
950
951
|
}) : emptyState ?? /* @__PURE__ */ jsx(EmptyState, {
|
|
951
952
|
header: "No results",
|
package/dist/theme/enums.d.ts
CHANGED
|
@@ -106,7 +106,7 @@ export type SpaceShorthand = Space | [Space, Space] | [Space, Space, Space] | [S
|
|
|
106
106
|
export declare const CANONICAL_SIZE_MEMBERS: readonly ["X_SMALL", "SMALL", "MEDIUM", "LARGE", "X_LARGE"];
|
|
107
107
|
/**
|
|
108
108
|
* Color set: members a color-role `<Component>Variant` may use (Constitution V, V-A). Meaning
|
|
109
|
-
* only: categorical hues are the `color?:
|
|
109
|
+
* only: categorical hues are the `color?: RoleColor` prop. There is no accent: Galaxy is
|
|
110
110
|
* monochrome.
|
|
111
111
|
*/
|
|
112
112
|
export declare const CANONICAL_COLOR_MEMBERS: readonly ["PRIMARY", "SECONDARY", "TERTIARY", "SUCCESS", "WARNING", "ERROR", "DISABLED", "INHERIT"];
|
package/dist/theme/enums.js
CHANGED
|
@@ -116,7 +116,7 @@ var CANONICAL_SIZE_MEMBERS = [
|
|
|
116
116
|
];
|
|
117
117
|
/**
|
|
118
118
|
* Color set: members a color-role `<Component>Variant` may use (Constitution V, V-A). Meaning
|
|
119
|
-
* only: categorical hues are the `color?:
|
|
119
|
+
* only: categorical hues are the `color?: RoleColor` prop. There is no accent: Galaxy is
|
|
120
120
|
* monochrome.
|
|
121
121
|
*/
|
|
122
122
|
var CANONICAL_COLOR_MEMBERS = [
|
|
@@ -5,9 +5,13 @@
|
|
|
5
5
|
* style with `t.palette.<family>[<step>]`, and import `PALETTE` only for JS logic (canvas, WebGL).
|
|
6
6
|
* The theme roles (`t.color.<property>.<family>`) are derived from these steps (dark.ts, light.ts).
|
|
7
7
|
*/
|
|
8
|
-
import type { PaletteColor, PaletteStep } from "./types.js";
|
|
8
|
+
import type { PaletteColor, PaletteStep, RoleColor, StatusColor } from "./types.js";
|
|
9
|
+
/** The three status roles, in severity order. */
|
|
10
|
+
export declare const STATUS_COLORS: readonly StatusColor[];
|
|
9
11
|
/** Every palette family in hue order, red → rose. */
|
|
10
12
|
export declare const PALETTE_COLORS: readonly PaletteColor[];
|
|
13
|
+
/** Every name a mark's `color` takes: the status roles first, then the palette families. */
|
|
14
|
+
export declare const ROLE_COLORS: readonly RoleColor[];
|
|
11
15
|
/** Every step of a family, lightest first. */
|
|
12
16
|
export declare const PALETTE_STEPS: readonly PaletteStep[];
|
|
13
17
|
/** Family → step → hex. */
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
//#region src/theme/tokens/palette.ts
|
|
2
|
+
/** The three status roles, in severity order. */
|
|
3
|
+
var STATUS_COLORS = [
|
|
4
|
+
"success",
|
|
5
|
+
"warning",
|
|
6
|
+
"error"
|
|
7
|
+
];
|
|
2
8
|
/** Every palette family in hue order, red → rose. */
|
|
3
9
|
var PALETTE_COLORS = [
|
|
4
10
|
"red",
|
|
@@ -19,6 +25,8 @@ var PALETTE_COLORS = [
|
|
|
19
25
|
"pink",
|
|
20
26
|
"rose"
|
|
21
27
|
];
|
|
28
|
+
/** Every name a mark's `color` takes: the status roles first, then the palette families. */
|
|
29
|
+
var ROLE_COLORS = [...STATUS_COLORS, ...PALETTE_COLORS];
|
|
22
30
|
/** Every step of a family, lightest first. */
|
|
23
31
|
var PALETTE_STEPS = [
|
|
24
32
|
100,
|
|
@@ -150,4 +158,4 @@ var PALETTE = {
|
|
|
150
158
|
}
|
|
151
159
|
};
|
|
152
160
|
//#endregion
|
|
153
|
-
export { PALETTE, PALETTE_COLORS, PALETTE_STEPS };
|
|
161
|
+
export { PALETTE, PALETTE_COLORS, PALETTE_STEPS, ROLE_COLORS, STATUS_COLORS };
|
|
@@ -21,8 +21,16 @@ export type PaletteStep = 100 | 300 | 500 | 700 | 900;
|
|
|
21
21
|
* palette family): a green, a warm amber and a red that never read alike.
|
|
22
22
|
*/
|
|
23
23
|
export type StatusColor = "success" | "warning" | "error";
|
|
24
|
+
/**
|
|
25
|
+
* A color name a mark can be keyed by: a palette family (a category) or a status role used as a
|
|
26
|
+
* category (a run status map where "completed" is `success` and "running" is `blue`). What the
|
|
27
|
+
* `color` prop of `Square`, `Circle`, `Chip`, `Beacon`, `Sparkline`, `Timeline`, `ProgressBar`,
|
|
28
|
+
* `ProgressCircle` and a chart series takes. Every color property (`text`, `background`,
|
|
29
|
+
* `border`, `solid`) has one value per name.
|
|
30
|
+
*/
|
|
31
|
+
export type RoleColor = StatusColor | PaletteColor;
|
|
24
32
|
/** One value per meaning role and per palette family. */
|
|
25
|
-
type RoleColors = Record<
|
|
33
|
+
type RoleColors = Record<RoleColor, string>;
|
|
26
34
|
/** A strong fill: its background, the text and icons drawn on it, and its two states. */
|
|
27
35
|
export type SolidColor = {
|
|
28
36
|
/** The fill. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Icon as PhosphorIcon } from "@phosphor-icons/react";
|
|
2
2
|
import { type AriaAttributes, type CSSProperties, type ReactNode } from "react";
|
|
3
|
-
import type {
|
|
3
|
+
import type { RoleColor } from "../theme/tokens/types.js";
|
|
4
4
|
/** Canonical rungs (subset); the member names the type step of the event text. */
|
|
5
5
|
export declare enum TimelineSize {
|
|
6
6
|
/** body_sm text, 16px box, 4px dot, 10px icon, 12px between events. */
|
|
@@ -78,11 +78,12 @@ interface TimelineItemColorProps {
|
|
|
78
78
|
*/
|
|
79
79
|
variant?: undefined;
|
|
80
80
|
/**
|
|
81
|
-
* Categorical palette family (`"blue"`, `"violet"`, …)
|
|
82
|
-
*
|
|
83
|
-
*
|
|
81
|
+
* Categorical palette family (`"blue"`, `"violet"`, …) or a status role as a string
|
|
82
|
+
* (`"success"`, `"error"`): the dot or icon takes `text.<name>` and the box `border.<name>`, the
|
|
83
|
+
* way a status variant renders. For an event's category or data-driven color (a source, a team,
|
|
84
|
+
* a run status map); a status that is meaning takes `variant`. Not with `variant`.
|
|
84
85
|
*/
|
|
85
|
-
color:
|
|
86
|
+
color: RoleColor;
|
|
86
87
|
}
|
|
87
88
|
/** One event on the timeline. Passing both `variant` and `color` is a type error. */
|
|
88
89
|
export type TimelineItem = TimelineItemBase & (TimelineItemVariantProps | TimelineItemColorProps);
|
|
@@ -213,23 +213,26 @@ var TIMELINE_VARIANT_TO_CSS_MAP = {
|
|
|
213
213
|
* takes, and `border.<family>` and the `background.<family>` fill on the box.
|
|
214
214
|
*/
|
|
215
215
|
var TIMELINE_COLOR_TO_CSS_MAP = {
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
216
|
+
success: "gx-Timeline-success-s1khc5e9",
|
|
217
|
+
warning: "gx-Timeline-warning-wob0jun",
|
|
218
|
+
error: "gx-Timeline-error-ecpz10x",
|
|
219
|
+
red: "gx-Timeline-red-r1arc1uv",
|
|
220
|
+
orange: "gx-Timeline-orange-o1x7dvj6",
|
|
221
|
+
amber: "gx-Timeline-amber-a1fx1m3c",
|
|
222
|
+
yellow: "gx-Timeline-yellow-y1gy5gqm",
|
|
223
|
+
lime: "gx-Timeline-lime-ltyv4re",
|
|
224
|
+
green: "gx-Timeline-green-g1506u15",
|
|
225
|
+
emerald: "gx-Timeline-emerald-e2f8n55",
|
|
226
|
+
teal: "gx-Timeline-teal-t1bza0tc",
|
|
227
|
+
cyan: "gx-Timeline-cyan-c1vbt6lr",
|
|
228
|
+
sky: "gx-Timeline-sky-sjtm0e",
|
|
229
|
+
blue: "gx-Timeline-blue-bek3kdh",
|
|
230
|
+
indigo: "gx-Timeline-indigo-i13hn3pe",
|
|
231
|
+
violet: "gx-Timeline-violet-vdf3rdi",
|
|
232
|
+
purple: "gx-Timeline-purple-pjv99mk",
|
|
233
|
+
fuchsia: "gx-Timeline-fuchsia-f4wvpbo",
|
|
234
|
+
pink: "gx-Timeline-pink-p1qqjpue",
|
|
235
|
+
rose: "gx-Timeline-rose-r183jhdd"
|
|
233
236
|
};
|
|
234
237
|
/** A vertical list of events with dot or icon markers (boxed or bare) on a hairline rail. */
|
|
235
238
|
var Timeline = forwardRef(function Timeline({ items, size = "MEDIUM", markerShape = "SQUARE", isFilled = false, className, style, ...rest }, ref) {
|