@galaxy-io/dls 2.3.2 → 2.4.1
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/navigation/Tabs.d.ts +2 -1
- package/dist/navigation/Tabs.js +25 -23
- 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],
|
|
@@ -76,7 +76,8 @@ export interface TabsProps<TId extends string = string> extends AriaAttributes {
|
|
|
76
76
|
*/
|
|
77
77
|
orientation?: Orientation;
|
|
78
78
|
/**
|
|
79
|
-
* Horizontal
|
|
79
|
+
* Horizontal: the row spans its parent and every tab takes an equal share; labels truncate instead of overflowing into a menu.
|
|
80
|
+
* Vertical: the column (and its `UNDERLINE` hairline) spans its parent instead of hugging the widest label; for a column with no panel beside it.
|
|
80
81
|
* @default false
|
|
81
82
|
*/
|
|
82
83
|
fillWidth?: boolean;
|
package/dist/navigation/Tabs.js
CHANGED
|
@@ -112,9 +112,11 @@ var TABS_ORIENTATION_TO_CSS_MAP = {
|
|
|
112
112
|
};
|
|
113
113
|
/** Horizontal `fillWidth`: the row spans its parent and every tab takes an equal share. */
|
|
114
114
|
var FILL_WIDTH_CSS = "gx-Tabs-FILL_WIDTH_CSS-fs6iug3";
|
|
115
|
+
/** Vertical `fillWidth`: a column with no panel beside it spans its parent, so the hairline sits on the parent's edge. */
|
|
116
|
+
var VERTICAL_FILL_WIDTH_CSS = "gx-Tabs-VERTICAL_FILL_WIDTH_CSS-vvxftzj";
|
|
115
117
|
var TABS_ORIENTATION_TO_BAR_CSS_MAP = {
|
|
116
|
-
[Orientation.HORIZONTAL]: "gx-Tabs-Orientation_HORIZONTAL-
|
|
117
|
-
[Orientation.VERTICAL]: "gx-Tabs-Orientation_VERTICAL-
|
|
118
|
+
[Orientation.HORIZONTAL]: "gx-Tabs-Orientation_HORIZONTAL-oduyhd6",
|
|
119
|
+
[Orientation.VERTICAL]: "gx-Tabs-Orientation_VERTICAL-oux4b2d"
|
|
118
120
|
};
|
|
119
121
|
/**
|
|
120
122
|
* The hairline on the edge facing the panel (`UNDERLINE` only). A horizontal row draws it as an
|
|
@@ -125,52 +127,52 @@ var TABS_ORIENTATION_TO_BAR_CSS_MAP = {
|
|
|
125
127
|
*/
|
|
126
128
|
var TABS_VARIANT_TO_BAR_CSS_MAP = {
|
|
127
129
|
["UNDERLINE"]: {
|
|
128
|
-
[Orientation.HORIZONTAL]: "gx-Tabs-Orientation_HORIZONTAL-
|
|
129
|
-
[Orientation.VERTICAL]: "gx-Tabs-Orientation_VERTICAL-
|
|
130
|
+
[Orientation.HORIZONTAL]: "gx-Tabs-Orientation_HORIZONTAL-o6lhzlg",
|
|
131
|
+
[Orientation.VERTICAL]: "gx-Tabs-Orientation_VERTICAL-otj50wv"
|
|
130
132
|
},
|
|
131
133
|
["PILL"]: {
|
|
132
|
-
[Orientation.HORIZONTAL]: "gx-Tabs-Orientation_HORIZONTAL-
|
|
133
|
-
[Orientation.VERTICAL]: "gx-Tabs-Orientation_VERTICAL-
|
|
134
|
+
[Orientation.HORIZONTAL]: "gx-Tabs-Orientation_HORIZONTAL-o1wa4rz3",
|
|
135
|
+
[Orientation.VERTICAL]: "gx-Tabs-Orientation_VERTICAL-o19ax5w1"
|
|
134
136
|
}
|
|
135
137
|
};
|
|
136
138
|
var TABS_ORIENTATION_TO_LIST_CSS_MAP = {
|
|
137
|
-
[Orientation.HORIZONTAL]: "gx-Tabs-Orientation_HORIZONTAL-
|
|
138
|
-
[Orientation.VERTICAL]: "gx-Tabs-Orientation_VERTICAL-
|
|
139
|
+
[Orientation.HORIZONTAL]: "gx-Tabs-Orientation_HORIZONTAL-o6on29c",
|
|
140
|
+
[Orientation.VERTICAL]: "gx-Tabs-Orientation_VERTICAL-o1cleozi"
|
|
139
141
|
};
|
|
140
142
|
/** While unmeasured (server, first paint, after items change): every tab renders, clipped. */
|
|
141
|
-
var MEASURING_CSS = "gx-Tabs-MEASURING_CSS-
|
|
143
|
+
var MEASURING_CSS = "gx-Tabs-MEASURING_CSS-mfzxznm";
|
|
142
144
|
/** The overflow trigger copy that is only measured. */
|
|
143
|
-
var MEASURING_TRIGGER_CSS = "gx-Tabs-MEASURING_TRIGGER_CSS-
|
|
145
|
+
var MEASURING_TRIGGER_CSS = "gx-Tabs-MEASURING_TRIGGER_CSS-m10e4gpz";
|
|
144
146
|
/**
|
|
145
147
|
* Height, padding and icon-label gap per rung (custom properties on `Bar`). `--gx-tabs-row-height`
|
|
146
148
|
* is the horizontal `UNDERLINE` row's minimum: the label centered with 8 / 12 / 12px above and
|
|
147
149
|
* below it, the 2px indicator drawn over the bottom of that space.
|
|
148
150
|
*/
|
|
149
151
|
var TABS_SIZE_TO_CSS_MAP = {
|
|
150
|
-
["SMALL"]: "gx-Tabs-SMALL-
|
|
151
|
-
["MEDIUM"]: "gx-Tabs-MEDIUM-
|
|
152
|
-
["LARGE"]: "gx-Tabs-LARGE-
|
|
152
|
+
["SMALL"]: "gx-Tabs-SMALL-s1k4ei2n",
|
|
153
|
+
["MEDIUM"]: "gx-Tabs-MEDIUM-m1fu2ke2",
|
|
154
|
+
["LARGE"]: "gx-Tabs-LARGE-l1q90ijz"
|
|
153
155
|
};
|
|
154
156
|
/** Shape per mode (every tab and the overflow trigger). */
|
|
155
157
|
var TABS_VARIANT_TO_TAB_CSS_MAP = {
|
|
156
|
-
["UNDERLINE"]: "gx-Tabs-UNDERLINE-
|
|
157
|
-
["PILL"]: "gx-Tabs-PILL-
|
|
158
|
+
["UNDERLINE"]: "gx-Tabs-UNDERLINE-u1xzvabb",
|
|
159
|
+
["PILL"]: "gx-Tabs-PILL-pxgth9d"
|
|
158
160
|
};
|
|
159
161
|
/** Hover and press on an enabled, unselected tab (and the overflow trigger). */
|
|
160
162
|
var TABS_VARIANT_TO_INTERACTIVE_CSS_MAP = {
|
|
161
|
-
["UNDERLINE"]: "gx-Tabs-UNDERLINE-
|
|
162
|
-
["PILL"]: "gx-Tabs-PILL-
|
|
163
|
+
["UNDERLINE"]: "gx-Tabs-UNDERLINE-u15kodi3",
|
|
164
|
+
["PILL"]: "gx-Tabs-PILL-phu3rsh"
|
|
163
165
|
};
|
|
164
166
|
var TABS_VARIANT_TO_SELECTED_CSS_MAP = {
|
|
165
|
-
["UNDERLINE"]: "gx-Tabs-UNDERLINE-
|
|
166
|
-
["PILL"]: "gx-Tabs-PILL-
|
|
167
|
+
["UNDERLINE"]: "gx-Tabs-UNDERLINE-u1nmauec",
|
|
168
|
+
["PILL"]: "gx-Tabs-PILL-p14ug43i"
|
|
167
169
|
};
|
|
168
170
|
/** The `UNDERLINE` indicator's edge: always the one facing the panel, over the bar hairline. */
|
|
169
171
|
var TABS_ORIENTATION_TO_INDICATOR_CSS_MAP = {
|
|
170
|
-
[Orientation.HORIZONTAL]: "gx-Tabs-Orientation_HORIZONTAL-
|
|
171
|
-
[Orientation.VERTICAL]: "gx-Tabs-Orientation_VERTICAL-
|
|
172
|
+
[Orientation.HORIZONTAL]: "gx-Tabs-Orientation_HORIZONTAL-o1qvds3x",
|
|
173
|
+
[Orientation.VERTICAL]: "gx-Tabs-Orientation_VERTICAL-oa8x8b6"
|
|
172
174
|
};
|
|
173
|
-
var TAB_DISABLED_CSS = "gx-Tabs-TAB_DISABLED_CSS-
|
|
175
|
+
var TAB_DISABLED_CSS = "gx-Tabs-TAB_DISABLED_CSS-t2u7szj";
|
|
174
176
|
/** Tab icon px per rung: one step below the rung's III-A.4 icon (Mitch, 2026-10-04). */
|
|
175
177
|
var TABS_SIZE_TO_ICON_PX_MAP = {
|
|
176
178
|
["SMALL"]: 12,
|
|
@@ -469,7 +471,7 @@ function TabsImpl(props, ref) {
|
|
|
469
471
|
const selectedPanel = selectedItem !== void 0 && selectedItem.href === void 0 ? selectedItem.panel : void 0;
|
|
470
472
|
return /* @__PURE__ */ jsxs(Root, {
|
|
471
473
|
ref,
|
|
472
|
-
className: cx(TABS_ORIENTATION_TO_CSS_MAP[orientation], fillWidth && isHorizontal
|
|
474
|
+
className: cx(TABS_ORIENTATION_TO_CSS_MAP[orientation], fillWidth && (isHorizontal ? FILL_WIDTH_CSS : VERTICAL_FILL_WIDTH_CSS), className),
|
|
473
475
|
style,
|
|
474
476
|
children: [/* @__PURE__ */ jsxs(Bar, {
|
|
475
477
|
ref: barRef,
|