@galaxy-io/dls 2.3.2 → 2.4.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 +7 -6
- package/dist/beacons/Beacon.js +21 -14
- package/dist/brand/GalaxyFilamentWordmark.js +10 -11
- package/dist/brand/GalaxyLogomark.js +8 -14
- package/dist/{three → brand}/GalaxyLogomark3D.d.ts +1 -6
- package/dist/{three → brand}/GalaxyLogomark3D.js +16 -17
- package/dist/brand/GalaxyWordmark.js +10 -36
- package/dist/{three → brand}/assets/galaxy-logomark.js +1 -1
- package/dist/{three → brand/internal}/galaxyLogomark3DScene.d.ts +1 -3
- package/dist/{three → brand/internal}/galaxyLogomark3DScene.js +45 -50
- package/dist/brand/internal/svg/GalaxyFilamentWordmarkSvg.d.ts +13 -0
- package/dist/brand/internal/svg/GalaxyFilamentWordmarkSvg.js +26 -0
- package/dist/brand/internal/svg/GalaxyLogomarkSvg.d.ts +13 -0
- package/dist/brand/internal/svg/GalaxyLogomarkSvg.js +30 -0
- package/dist/brand/internal/svg/GalaxyWordmarkSvg.d.ts +13 -0
- package/dist/brand/internal/svg/GalaxyWordmarkSvg.js +36 -0
- package/dist/charts/BarChart.js +3 -5
- package/dist/charts/ChartFrame.d.ts +4 -7
- package/dist/charts/ChartFrame.js +5 -5
- package/dist/charts/ChartLegend.d.ts +2 -9
- package/dist/charts/ChartLegend.js +4 -12
- package/dist/charts/ChartTooltip.d.ts +2 -3
- package/dist/charts/ChartTooltip.js +3 -3
- package/dist/charts/Heatmap.js +3 -4
- package/dist/charts/LineChart.d.ts +1 -1
- package/dist/charts/LineChart.js +3 -4
- package/dist/charts/PieChart.js +3 -4
- package/dist/charts/types.d.ts +12 -0
- package/dist/charts/types.js +9 -1
- package/dist/inputs/NumberInput.d.ts +1 -1
- package/dist/inputs/PasswordInput.d.ts +1 -1
- package/dist/inputs/SearchInput.d.ts +1 -1
- package/dist/inputs/ToggleInput.d.ts +9 -9
- package/dist/inputs/ToggleInput.js +40 -25
- package/dist/styles.css +1 -1
- package/dist/theme/tokens/light.js +2 -2
- package/dist/tokens.css +2 -2
- package/package.json +11 -10
package/dist/charts/types.d.ts
CHANGED
|
@@ -85,6 +85,13 @@ export declare enum ChartKind {
|
|
|
85
85
|
/** `Heatmap`. */
|
|
86
86
|
HEATMAP = "HEATMAP"
|
|
87
87
|
}
|
|
88
|
+
/** Shape of the legend and tooltip swatches. By default it mirrors the marks: a dot for lines, a square for filled marks. */
|
|
89
|
+
export declare enum ChartSwatch {
|
|
90
|
+
/** `Circle SMALL`: the default for `LineChart`. */
|
|
91
|
+
CIRCLE = "CIRCLE",
|
|
92
|
+
/** `Square SMALL`: the default for `AreaChart`, `BarChart`, `PieChart` and `Heatmap`. */
|
|
93
|
+
SQUARE = "SQUARE"
|
|
94
|
+
}
|
|
88
95
|
/** @internal Where the legend sits relative to the plot. */
|
|
89
96
|
export declare enum ChartLegendPlacement {
|
|
90
97
|
/** Beneath the plot, one line (cartesian charts, Heatmap). */
|
|
@@ -262,6 +269,11 @@ export interface BaseChartProps<TKey extends string> extends AriaAttributes {
|
|
|
262
269
|
* @default true
|
|
263
270
|
*/
|
|
264
271
|
hasLegend?: boolean;
|
|
272
|
+
/**
|
|
273
|
+
* Shape of the legend and tooltip swatches. Set it to match a neighbouring chart that keys the same series (square keys on a line chart beside a bar chart).
|
|
274
|
+
* @default mirrors the marks: ChartSwatch.CIRCLE for LineChart, ChartSwatch.SQUARE for AreaChart, BarChart, PieChart and Heatmap
|
|
275
|
+
*/
|
|
276
|
+
swatch?: ChartSwatch;
|
|
265
277
|
/**
|
|
266
278
|
* Shows the tooltip on hover and keyboard focus. With `false` and no `onSelect`, the plot is a static image.
|
|
267
279
|
* @default true
|
package/dist/charts/types.js
CHANGED
|
@@ -69,6 +69,14 @@ var ChartKind = /* @__PURE__ */ function(ChartKind) {
|
|
|
69
69
|
ChartKind["HEATMAP"] = "HEATMAP";
|
|
70
70
|
return ChartKind;
|
|
71
71
|
}({});
|
|
72
|
+
/** Shape of the legend and tooltip swatches. By default it mirrors the marks: a dot for lines, a square for filled marks. */
|
|
73
|
+
var ChartSwatch = /* @__PURE__ */ function(ChartSwatch) {
|
|
74
|
+
/** `Circle SMALL`: the default for `LineChart`. */
|
|
75
|
+
ChartSwatch["CIRCLE"] = "CIRCLE";
|
|
76
|
+
/** `Square SMALL`: the default for `AreaChart`, `BarChart`, `PieChart` and `Heatmap`. */
|
|
77
|
+
ChartSwatch["SQUARE"] = "SQUARE";
|
|
78
|
+
return ChartSwatch;
|
|
79
|
+
}({});
|
|
72
80
|
/** @internal Where the legend sits relative to the plot. */
|
|
73
81
|
var ChartLegendPlacement = /* @__PURE__ */ function(ChartLegendPlacement) {
|
|
74
82
|
/** Beneath the plot, one line (cartesian charts, Heatmap). */
|
|
@@ -86,4 +94,4 @@ var ChartTargetShape = /* @__PURE__ */ function(ChartTargetShape) {
|
|
|
86
94
|
return ChartTargetShape;
|
|
87
95
|
}({});
|
|
88
96
|
//#endregion
|
|
89
|
-
export { ChartCurve, ChartKind, ChartLegendPlacement, ChartMarkState, ChartPalette, ChartTargetShape };
|
|
97
|
+
export { ChartCurve, ChartKind, ChartLegendPlacement, ChartMarkState, ChartPalette, ChartSwatch, ChartTargetShape };
|
|
@@ -32,7 +32,7 @@ export type NumberInputProps = Omit<InputProps, "type" | "value" | "defaultValue
|
|
|
32
32
|
hasSteppers?: boolean;
|
|
33
33
|
};
|
|
34
34
|
/** A single-line number field: `Input` with `type="text"`, parsing, clamping and stepping at its edge. */
|
|
35
|
-
declare const NumberInput: import("react").ForwardRefExoticComponent<Omit<InputProps, "value" | "defaultValue" | "onChange" | "
|
|
35
|
+
declare const NumberInput: import("react").ForwardRefExoticComponent<Omit<InputProps, "value" | "defaultValue" | "onChange" | "type" | "spellCheck" | "inputMode" | "onEnter" | "maxLength" | "isClearable"> & {
|
|
36
36
|
/** Controlled committed value. `null` is an empty field. */
|
|
37
37
|
value?: number | null;
|
|
38
38
|
/**
|
|
@@ -8,7 +8,7 @@ export type PasswordInputProps = Omit<InputProps, "type" | "trailing" | "isClear
|
|
|
8
8
|
autoComplete?: InputProps["autoComplete"];
|
|
9
9
|
};
|
|
10
10
|
/** A masked single-line field with a "Show password" toggle: `Input` with `type="password"`. */
|
|
11
|
-
declare const PasswordInput: import("react").ForwardRefExoticComponent<Omit<InputProps, "
|
|
11
|
+
declare const PasswordInput: import("react").ForwardRefExoticComponent<Omit<InputProps, "type" | "spellCheck" | "prefix" | "inputMode" | "trailing" | "autoComplete" | "suffix" | "isClearable"> & {
|
|
12
12
|
/**
|
|
13
13
|
* Password-manager hint. Use `"new-password"` on sign-up and change-password forms.
|
|
14
14
|
* @default "current-password"
|
|
@@ -32,7 +32,7 @@ export type SearchInputProps = Omit<InputProps, "type" | "icon" | "leading" | "p
|
|
|
32
32
|
isLoading?: boolean;
|
|
33
33
|
};
|
|
34
34
|
/** A search field: `Input` with `type="search"`, a magnifier, clearing, a debounced `onSearch` and a focus shortcut. */
|
|
35
|
-
declare const SearchInput: import("react").ForwardRefExoticComponent<Omit<InputProps, "icon" | "ariaLabel" | "
|
|
35
|
+
declare const SearchInput: import("react").ForwardRefExoticComponent<Omit<InputProps, "icon" | "ariaLabel" | "type" | "enterKeyHint" | "prefix" | "inputMode" | "leading" | "placeholder" | "onEnter" | "suffix" | "isClearable"> & {
|
|
36
36
|
/**
|
|
37
37
|
* Hint shown while the value is empty.
|
|
38
38
|
* @default "Search"
|
|
@@ -2,18 +2,18 @@ import type { Icon as PhosphorIcon } from "@phosphor-icons/react";
|
|
|
2
2
|
import { type AriaAttributes, type CSSProperties, type ReactElement, type ReactNode, type RefAttributes } from "react";
|
|
3
3
|
/** Canonical rungs; ToggleInput supports all five. */
|
|
4
4
|
export declare enum ToggleInputSize {
|
|
5
|
-
/** 20px
|
|
5
|
+
/** 20px, caption text, 12px icons. */
|
|
6
6
|
X_SMALL = "X_SMALL",
|
|
7
|
-
/** 24px
|
|
7
|
+
/** 24px, body_sm text, 12px icons. */
|
|
8
8
|
SMALL = "SMALL",
|
|
9
|
-
/** 32px
|
|
9
|
+
/** 32px, body_md text, 14px icons. The default (1.x MEDIUM was 28px). */
|
|
10
10
|
MEDIUM = "MEDIUM",
|
|
11
|
-
/** 36px
|
|
11
|
+
/** 36px, body_lg text, 14px icons. */
|
|
12
12
|
LARGE = "LARGE",
|
|
13
|
-
/** 40px
|
|
13
|
+
/** 40px, body_lg text, 16px icons. */
|
|
14
14
|
X_LARGE = "X_LARGE"
|
|
15
15
|
}
|
|
16
|
-
/**
|
|
16
|
+
/** The fill behind the unselected segments (Constitution V-A surface set; the 1.x InputVariant members, unchanged). */
|
|
17
17
|
export declare enum ToggleInputVariant {
|
|
18
18
|
/** `background.base`. */
|
|
19
19
|
BASE = "BASE",
|
|
@@ -65,13 +65,13 @@ export interface ToggleInputProps<TId extends string = string> extends AriaAttri
|
|
|
65
65
|
*/
|
|
66
66
|
size?: ToggleInputSize;
|
|
67
67
|
/**
|
|
68
|
-
*
|
|
68
|
+
* The fill behind the unselected segments, from the surface set. Ignored with `isGhost`.
|
|
69
69
|
* @default ToggleInputVariant.SECONDARY
|
|
70
70
|
*/
|
|
71
71
|
variant?: ToggleInputVariant;
|
|
72
72
|
/**
|
|
73
|
-
* Ghost
|
|
74
|
-
* fills still show. For a toggle set into a toolbar. An error still draws the red hairline.
|
|
73
|
+
* Ghost: no fill, no frame and no seams (1.x `TRANSPARENT`); the selected fill and the segment
|
|
74
|
+
* hover fills still show. For a toggle set into a toolbar. An error still draws the red hairline.
|
|
75
75
|
* @default false
|
|
76
76
|
*/
|
|
77
77
|
isGhost?: boolean;
|
|
@@ -15,8 +15,10 @@ import { cx } from "@linaria/core";
|
|
|
15
15
|
/**
|
|
16
16
|
* The segmented control: one choice among two to five short, mutually exclusive options shown
|
|
17
17
|
* side by side (Table / Graph / JSON, Compact / Comfortable). It holds the chosen option's `id`
|
|
18
|
-
* with `value` / `defaultValue` / `onChange(id)`, draws the options as segments in one
|
|
19
|
-
* the
|
|
18
|
+
* with `value` / `defaultValue` / `onChange(id)`, and draws the options as flush segments in one
|
|
19
|
+
* frame, the way an attached `ButtonGroup` draws its buttons: one `border.secondary` hairline
|
|
20
|
+
* around the set, one shared hairline at each seam, round outer corners only, and the selected
|
|
21
|
+
* segment filled `background.selected` (a quick color fade, no slide). It supports text, icon +
|
|
20
22
|
* text and icon-only segments (each icon-only segment shows its `ariaLabel` as a tooltip). To
|
|
21
23
|
* assistive tech and the keyboard it is a radio group: one tab stop, arrows and Home / End move
|
|
22
24
|
* the selection. It renders its own `label` and `error` through `Field`.
|
|
@@ -28,19 +30,19 @@ import { cx } from "@linaria/core";
|
|
|
28
30
|
*/
|
|
29
31
|
/** Canonical rungs; ToggleInput supports all five. */
|
|
30
32
|
var ToggleInputSize = /* @__PURE__ */ function(ToggleInputSize) {
|
|
31
|
-
/** 20px
|
|
33
|
+
/** 20px, caption text, 12px icons. */
|
|
32
34
|
ToggleInputSize["X_SMALL"] = "X_SMALL";
|
|
33
|
-
/** 24px
|
|
35
|
+
/** 24px, body_sm text, 12px icons. */
|
|
34
36
|
ToggleInputSize["SMALL"] = "SMALL";
|
|
35
|
-
/** 32px
|
|
37
|
+
/** 32px, body_md text, 14px icons. The default (1.x MEDIUM was 28px). */
|
|
36
38
|
ToggleInputSize["MEDIUM"] = "MEDIUM";
|
|
37
|
-
/** 36px
|
|
39
|
+
/** 36px, body_lg text, 14px icons. */
|
|
38
40
|
ToggleInputSize["LARGE"] = "LARGE";
|
|
39
|
-
/** 40px
|
|
41
|
+
/** 40px, body_lg text, 16px icons. */
|
|
40
42
|
ToggleInputSize["X_LARGE"] = "X_LARGE";
|
|
41
43
|
return ToggleInputSize;
|
|
42
44
|
}({});
|
|
43
|
-
/**
|
|
45
|
+
/** The fill behind the unselected segments (Constitution V-A surface set; the 1.x InputVariant members, unchanged). */
|
|
44
46
|
var ToggleInputVariant = /* @__PURE__ */ function(ToggleInputVariant) {
|
|
45
47
|
/** `background.base`. */
|
|
46
48
|
ToggleInputVariant["BASE"] = "BASE";
|
|
@@ -52,28 +54,42 @@ var ToggleInputVariant = /* @__PURE__ */ function(ToggleInputVariant) {
|
|
|
52
54
|
ToggleInputVariant["TERTIARY"] = "TERTIARY";
|
|
53
55
|
return ToggleInputVariant;
|
|
54
56
|
}({});
|
|
55
|
-
/**
|
|
57
|
+
/**
|
|
58
|
+
* The radiogroup: the one frame around the segments (an attached `ButtonGroup`'s silhouette). The
|
|
59
|
+
* seam color is a custom property so `isGhost` can clear the seams with the frame. `isolation:
|
|
60
|
+
* isolate` keeps the focused segment's `z-index: 1` inside the control.
|
|
61
|
+
*/
|
|
56
62
|
var Track = /*#__PURE__*/ styled("div")({
|
|
57
63
|
name: "Track",
|
|
58
64
|
class: "gx-ToggleInput-Track-t1t8zlu",
|
|
59
65
|
propsAsIs: false
|
|
60
66
|
});
|
|
61
|
-
/**
|
|
67
|
+
/**
|
|
68
|
+
* One option: a `button role="radio"`, content width (or an equal share under `fillWidth`), the
|
|
69
|
+
* frame's full inner height. Every segment after the first draws the seam before it as its own
|
|
70
|
+
* leading border, so each seam is one hairline. Only the first and last segments round their outer
|
|
71
|
+
* corners, by the frame's radius less its border, so no fill pokes past the rounded frame. The
|
|
72
|
+
* focused segment is lifted so its focus ring is never painted over by the next segment.
|
|
73
|
+
*/
|
|
62
74
|
var Segment = /*#__PURE__*/ styled("button")({
|
|
63
75
|
name: "Segment",
|
|
64
76
|
class: "gx-ToggleInput-Segment-s1br7yd",
|
|
65
77
|
propsAsIs: false
|
|
66
78
|
});
|
|
67
|
-
/**
|
|
79
|
+
/**
|
|
80
|
+
* Rest look per surface: the fill behind the unselected segments, under the same `border.secondary`
|
|
81
|
+
* hairline a `SECONDARY` button draws (the attached-group frame, not the field frame's
|
|
82
|
+
* `border.primary`).
|
|
83
|
+
*/
|
|
68
84
|
var TOGGLE_INPUT_VARIANT_TO_CSS_MAP = {
|
|
69
85
|
["BASE"]: "gx-ToggleInput-BASE-b1xwadc7",
|
|
70
86
|
["PRIMARY"]: "gx-ToggleInput-PRIMARY-p1smouvb",
|
|
71
87
|
["SECONDARY"]: "gx-ToggleInput-SECONDARY-s169kxy0",
|
|
72
88
|
["TERTIARY"]: "gx-ToggleInput-TERTIARY-t1cbak55"
|
|
73
89
|
};
|
|
74
|
-
/** `isGhost`: no
|
|
90
|
+
/** `isGhost`: no fill, no frame, no seams. Declared after the variant map, which it replaces. */
|
|
75
91
|
var GHOST_CSS = "gx-ToggleInput-GHOST_CSS-gl8s2yr";
|
|
76
|
-
/** Height, segment padding and icon-label gap per rung
|
|
92
|
+
/** Height, segment padding and icon-label gap per rung: Button's table, so a segment and a button of one rung set their label alike. */
|
|
77
93
|
var TOGGLE_INPUT_SIZE_TO_CSS_MAP = {
|
|
78
94
|
["X_SMALL"]: "gx-ToggleInput-X_SMALL-xgugjmx",
|
|
79
95
|
["SMALL"]: "gx-ToggleInput-SMALL-szayufa",
|
|
@@ -83,27 +99,26 @@ var TOGGLE_INPUT_SIZE_TO_CSS_MAP = {
|
|
|
83
99
|
};
|
|
84
100
|
/** Red hairline on every variant, from `error`, `isError` or the Field's error. */
|
|
85
101
|
var ERROR_CSS = "gx-ToggleInput-ERROR_CSS-e6je9tz";
|
|
86
|
-
/** Group disabled: the selected segment
|
|
102
|
+
/** Group disabled: the selected segment steps down to the pressed fill; the frame keeps its resting hairline (field-frame note). */
|
|
87
103
|
var DISABLED_CSS = "gx-ToggleInput-DISABLED_CSS-d8pd3s2";
|
|
88
104
|
/** Equal shares: the track fills its parent and every segment (icon-only too) takes `1 1 0`. */
|
|
89
105
|
var FILL_WIDTH_CSS = "gx-ToggleInput-FILL_WIDTH_CSS-fc2kmgg";
|
|
90
|
-
/** The selected segment's
|
|
106
|
+
/** The selected segment: the selection fill (the chosen-item role) and primary text; it fades in with the segment's color transition. */
|
|
91
107
|
var SEGMENT_SELECTED_CSS = "gx-ToggleInput-SEGMENT_SELECTED_CSS-s1d7otlt";
|
|
92
|
-
/** The selected segment's fill and hairline; it fades in with the segment's color transition. */
|
|
93
|
-
var SEGMENT_SELECTED_FILL_CSS = "gx-ToggleInput-SEGMENT_SELECTED_FILL_CSS-s1wijxdi";
|
|
94
108
|
/** Hover and press on an unselected, enabled segment of an editable group: the neutral ramp. */
|
|
95
|
-
var SEGMENT_INTERACTIVE_CSS = "gx-ToggleInput-SEGMENT_INTERACTIVE_CSS-
|
|
109
|
+
var SEGMENT_INTERACTIVE_CSS = "gx-ToggleInput-SEGMENT_INTERACTIVE_CSS-s1wijxdi";
|
|
96
110
|
/** A disabled option, or every segment of a disabled group. */
|
|
97
|
-
var SEGMENT_DISABLED_CSS = "gx-ToggleInput-SEGMENT_DISABLED_CSS-
|
|
111
|
+
var SEGMENT_DISABLED_CSS = "gx-ToggleInput-SEGMENT_DISABLED_CSS-s169tnuo";
|
|
98
112
|
/** A read-only group: no hover, no pointer. */
|
|
99
|
-
var SEGMENT_READ_ONLY_CSS = "gx-ToggleInput-SEGMENT_READ_ONLY_CSS-
|
|
113
|
+
var SEGMENT_READ_ONLY_CSS = "gx-ToggleInput-SEGMENT_READ_ONLY_CSS-svloi0q";
|
|
100
114
|
/**
|
|
101
115
|
* No label: a square segment with the icon centered (an equal share under `fillWidth`, where
|
|
102
|
-
* `flex: 1 1 0` overrides the width). The square is explicit, the
|
|
103
|
-
* `aspect-ratio`: Safari sizes an inline-flex track from an
|
|
104
|
-
* so the stretched segments overflowed the track and the
|
|
116
|
+
* `flex: 1 1 0` overrides the width). The square is explicit, the frame's inner height plus the
|
|
117
|
+
* seam a later segment carries, not `aspect-ratio`: Safari sizes an inline-flex track from an
|
|
118
|
+
* aspect-ratio item's pre-stretch width, so the stretched segments overflowed the track and the
|
|
119
|
+
* last one was clipped.
|
|
105
120
|
*/
|
|
106
|
-
var SEGMENT_ICON_ONLY_CSS = "gx-ToggleInput-SEGMENT_ICON_ONLY_CSS-
|
|
121
|
+
var SEGMENT_ICON_ONLY_CSS = "gx-ToggleInput-SEGMENT_ICON_ONLY_CSS-scgck5z";
|
|
107
122
|
/** The Field ToggleInput renders for its own `label` / `error` uses the same rung. */
|
|
108
123
|
var TOGGLE_INPUT_SIZE_TO_FIELD_SIZE_MAP = {
|
|
109
124
|
["X_SMALL"]: FieldSize.X_SMALL,
|
|
@@ -221,7 +236,7 @@ function TrackBody({ trackProps, forwardedRef, isRoot }) {
|
|
|
221
236
|
tabIndex: index === tabStopIndex ? 0 : -1,
|
|
222
237
|
onClick: () => select(index),
|
|
223
238
|
onKeyDown: (event) => handleKeyDown(event, index),
|
|
224
|
-
className: cx(isSelected && SEGMENT_SELECTED_CSS,
|
|
239
|
+
className: cx(isSelected && SEGMENT_SELECTED_CSS, !isSelected && isEnabled && !isReadOnly && SEGMENT_INTERACTIVE_CSS, !isEnabled && SEGMENT_DISABLED_CSS, isEnabled && isReadOnly && SEGMENT_READ_ONLY_CSS, isIconOnly && SEGMENT_ICON_ONLY_CSS),
|
|
225
240
|
children: [option.icon !== void 0 && /* @__PURE__ */ jsx(Icon, {
|
|
226
241
|
component: option.icon,
|
|
227
242
|
size: TOGGLE_INPUT_SIZE_TO_ICON_PX_MAP[size],
|