@galaxy-io/dls 2.9.0 → 2.10.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 +1 -1
- package/dist/beacons/Beacon.js +12 -28
- package/dist/brand/GalaxyAlchemyWordmark.d.ts +4 -1
- package/dist/brand/GalaxyAlchemyWordmark.js +7 -1
- package/dist/brand/GalaxyFilamentWordmark.d.ts +5 -2
- package/dist/brand/GalaxyFilamentWordmark.js +9 -2
- package/dist/brand/GalaxyLogomark.js +3 -0
- package/dist/brand/PoweredBy.d.ts +27 -0
- package/dist/brand/PoweredBy.js +96 -0
- package/dist/brand/internal/svg/GalaxyFilamentWordmarkSvg.d.ts +1 -1
- package/dist/brand/internal/svg/GalaxyFilamentWordmarkSvg.js +2 -2
- package/dist/charts/Heatmap.js +25 -9
- package/dist/charts/Sparkline.d.ts +1 -1
- package/dist/charts/Sparkline.js +10 -26
- package/dist/charts/chartFormat.d.ts +1 -1
- package/dist/charts/chartFormat.js +2 -2
- package/dist/charts/heatmapGeometry.d.ts +14 -0
- package/dist/charts/heatmapGeometry.js +17 -1
- package/dist/chips/Chip.d.ts +2 -2
- package/dist/chips/Chip.js +15 -31
- package/dist/drawer/Drawer.d.ts +2 -2
- package/dist/drawer/Drawer.js +1 -1
- package/dist/editor/CodeEditor.d.ts +1 -1
- package/dist/editor/CodeEditor.js +2 -1
- package/dist/feedback/Alert.d.ts +36 -9
- package/dist/feedback/Alert.js +26 -8
- package/dist/feedback/ProgressBar.d.ts +4 -1
- package/dist/feedback/ProgressBar.js +17 -30
- package/dist/feedback/ProgressCircle.d.ts +1 -1
- package/dist/feedback/ProgressCircle.js +14 -30
- package/dist/hooks/useEndReached.d.ts +40 -0
- package/dist/hooks/useEndReached.js +69 -0
- package/dist/icons/Icon.d.ts +36 -8
- package/dist/icons/Icon.js +14 -7
- package/dist/inputs/CronInput.js +114 -78
- package/dist/inputs/DateInput.d.ts +1 -1
- package/dist/inputs/DateInput.js +10 -10
- package/dist/inputs/MultiSelectInput.d.ts +3 -1
- package/dist/inputs/MultiSelectInput.js +8 -3
- package/dist/inputs/SelectInput.d.ts +8 -1
- package/dist/inputs/SelectInput.js +52 -25
- package/dist/inputs/internal/selectAll.d.ts +11 -0
- package/dist/inputs/internal/selectAll.js +28 -0
- package/dist/json/JsonViewer.js +7 -6
- package/dist/layout/AppFrame.d.ts +20 -0
- package/dist/layout/AppFrame.js +71 -0
- package/dist/layout/EmptyLayout.d.ts +53 -0
- package/dist/layout/EmptyLayout.js +59 -0
- package/dist/layout/ErrorLayout.d.ts +42 -0
- package/dist/layout/ErrorLayout.js +60 -0
- package/dist/layout/PageLayout.d.ts +26 -0
- package/dist/layout/PageLayout.js +116 -0
- package/dist/layout/PendingLayout.d.ts +30 -0
- package/dist/layout/PendingLayout.js +57 -0
- package/dist/layout/internal/errorState.d.ts +14 -0
- package/dist/layout/internal/errorState.js +49 -0
- package/dist/layout/internal/region.d.ts +10 -0
- package/dist/layout/internal/region.js +24 -0
- package/dist/lists/DescriptionList.js +1 -0
- package/dist/menu/Menu.d.ts +2 -2
- package/dist/menu/Menu.js +6 -13
- package/dist/modal/Modal.d.ts +2 -2
- package/dist/modal/Modal.js +1 -1
- package/dist/navigation/CommandPalette.js +4 -11
- package/dist/navigation/SidebarNav.d.ts +5 -0
- package/dist/navigation/SidebarNav.js +41 -22
- package/dist/navigation/Tabs.d.ts +4 -2
- package/dist/navigation/Tabs.js +52 -32
- package/dist/navigation/Topbar.js +4 -0
- package/dist/shapes/Circle.d.ts +1 -1
- package/dist/shapes/Circle.js +10 -26
- package/dist/shapes/Square.d.ts +1 -1
- package/dist/shapes/Square.js +10 -26
- package/dist/styles/internal/roleColor.d.ts +3 -0
- package/dist/styles/internal/roleColor.js +42 -0
- package/dist/styles/mixins.js +1 -1
- package/dist/styles.css +1 -1
- package/dist/table/InfiniteSpreadsheet.js +6 -6
- package/dist/table/InfiniteTable.d.ts +52 -20
- package/dist/table/InfiniteTable.js +3 -2
- package/dist/table/TableCore.d.ts +7 -1
- package/dist/table/TableCore.js +93 -83
- package/dist/table/VirtualizedInfiniteTable.d.ts +53 -21
- package/dist/table/VirtualizedInfiniteTable.js +7 -5
- package/dist/table/useInfiniteScrollSentinel.d.ts +13 -13
- package/dist/table/useInfiniteScrollSentinel.js +7 -51
- package/dist/theme/tokens/dark.js +1 -1
- package/dist/theme/tokens/light.js +4 -3
- package/dist/theme/tokens/types.d.ts +7 -7
- package/dist/timeline/Timeline.d.ts +1 -1
- package/dist/timeline/Timeline.js +6 -24
- package/dist/tokens.css +1 -1
- package/dist/utils/format.d.ts +35 -10
- package/dist/utils/format.js +60 -12
- package/dist/utils/search.d.ts +15 -0
- package/dist/utils/search.js +24 -0
- package/dist/vite/index.d.ts +16 -2
- package/dist/vite/index.js +28 -19
- package/dist/vite/internal/themeBoot.d.ts +25 -0
- package/dist/vite/internal/themeBoot.js +44 -0
- package/dist/vite/internal/wywOptions.d.ts +46 -0
- package/dist/vite/internal/wywOptions.js +44 -0
- package/package.json +34 -1
package/dist/navigation/Tabs.js
CHANGED
|
@@ -17,7 +17,7 @@ import { CaretDownIcon } from "@phosphor-icons/react";
|
|
|
17
17
|
* Switches between peer views of one place: Canvas / History / Settings of a pipeline, Overview /
|
|
18
18
|
* Logs of a run. A row (or a column) of labelled tabs marks the selected one and either renders
|
|
19
19
|
* the selected item's `panel` beside it or, when the items are links (`href` + a router `as`),
|
|
20
|
-
* navigates. Each tab can show an icon and a count `Chip`. `UNDERLINE` is the page-level mode (a
|
|
20
|
+
* navigates. Each tab can show a leading mark (a connector logo), an icon and a count `Chip`. `UNDERLINE` is the page-level mode (a
|
|
21
21
|
* hairline with a `text.primary` indicator under the selected tab); `PILL` is a quieter second level (the
|
|
22
22
|
* selected tab is a filled pill). Horizontal tabs that do not fit collapse into a "More" menu at
|
|
23
23
|
* the end of the row, so the row never wraps or scrolls. `inset` pads the row (or column) from its
|
|
@@ -37,7 +37,7 @@ import { CaretDownIcon } from "@phosphor-icons/react";
|
|
|
37
37
|
* SSR: every tab renders on the server (clipped while unmeasured); measurement and the
|
|
38
38
|
* `ResizeObserver` start in an effect. Nothing touches `window` or `document` at module scope.
|
|
39
39
|
*/
|
|
40
|
-
/** Mode (
|
|
40
|
+
/** Mode (AGENTS.md "Variant": a declared mode set, Tabs UNDERLINE / PILL; listed in scripts/lint-dls.ts MODE_SETS). */
|
|
41
41
|
var TabsVariant = /* @__PURE__ */ function(TabsVariant) {
|
|
42
42
|
/** Tabs on a hairline; the selected tab has a `text.primary` indicator on the edge facing the panel. The default. */
|
|
43
43
|
TabsVariant["UNDERLINE"] = "UNDERLINE";
|
|
@@ -97,30 +97,39 @@ var Tab = /*#__PURE__*/ styled("button")({
|
|
|
97
97
|
class: "gx-Tabs-Tab-t1ynoa32",
|
|
98
98
|
propsAsIs: false
|
|
99
99
|
});
|
|
100
|
+
/**
|
|
101
|
+
* A tab's `leading` node, in the icon's slot and gap: centered on the tab, kept at its own size
|
|
102
|
+
* (never stretched, squeezed or clipped), so only the label truncates.
|
|
103
|
+
*/
|
|
104
|
+
var LeadingSlot = /*#__PURE__*/ styled("span")({
|
|
105
|
+
name: "LeadingSlot",
|
|
106
|
+
class: "gx-Tabs-LeadingSlot-l1ecacuu",
|
|
107
|
+
propsAsIs: false
|
|
108
|
+
});
|
|
100
109
|
/** Controls after the tabs (or under the column). */
|
|
101
110
|
var Actions = /*#__PURE__*/ styled("div")({
|
|
102
111
|
name: "Actions",
|
|
103
|
-
class: "gx-Tabs-Actions-
|
|
112
|
+
class: "gx-Tabs-Actions-a1hrazk9",
|
|
104
113
|
propsAsIs: false
|
|
105
114
|
});
|
|
106
115
|
/** The selected panel tab's content. */
|
|
107
116
|
var Panel = /*#__PURE__*/ styled("div")({
|
|
108
117
|
name: "Panel",
|
|
109
|
-
class: "gx-Tabs-Panel-
|
|
118
|
+
class: "gx-Tabs-Panel-p1r67x9f",
|
|
110
119
|
propsAsIs: false
|
|
111
120
|
});
|
|
112
121
|
var TABS_ORIENTATION_TO_CSS_MAP = {
|
|
113
|
-
[Orientation.HORIZONTAL]: "gx-Tabs-Orientation_HORIZONTAL-
|
|
114
|
-
[Orientation.VERTICAL]: "gx-Tabs-Orientation_VERTICAL-
|
|
122
|
+
[Orientation.HORIZONTAL]: "gx-Tabs-Orientation_HORIZONTAL-o2dkvh9",
|
|
123
|
+
[Orientation.VERTICAL]: "gx-Tabs-Orientation_VERTICAL-os6iug3"
|
|
115
124
|
};
|
|
116
125
|
/** Horizontal `fillWidth`: the row spans its parent and every tab takes an equal share. */
|
|
117
|
-
var FILL_WIDTH_CSS = "gx-Tabs-FILL_WIDTH_CSS-
|
|
126
|
+
var FILL_WIDTH_CSS = "gx-Tabs-FILL_WIDTH_CSS-fvxftzj";
|
|
118
127
|
/** Vertical `fillWidth`: a column with no panel beside it spans its parent, so the hairline sits on the parent's edge. */
|
|
119
|
-
var VERTICAL_FILL_WIDTH_CSS = "gx-Tabs-VERTICAL_FILL_WIDTH_CSS-
|
|
128
|
+
var VERTICAL_FILL_WIDTH_CSS = "gx-Tabs-VERTICAL_FILL_WIDTH_CSS-vduyhd6";
|
|
120
129
|
/** The bar's `inset` is padding on the bar itself, so the `UNDERLINE` hairline (drawn on the bar's edge) spans it. */
|
|
121
130
|
var TABS_ORIENTATION_TO_BAR_CSS_MAP = {
|
|
122
|
-
[Orientation.HORIZONTAL]: "gx-Tabs-Orientation_HORIZONTAL-
|
|
123
|
-
[Orientation.VERTICAL]: "gx-Tabs-Orientation_VERTICAL-
|
|
131
|
+
[Orientation.HORIZONTAL]: "gx-Tabs-Orientation_HORIZONTAL-oux4b2d",
|
|
132
|
+
[Orientation.VERTICAL]: "gx-Tabs-Orientation_VERTICAL-o6lhzlg"
|
|
124
133
|
};
|
|
125
134
|
/**
|
|
126
135
|
* The hairline on the edge facing the panel (`UNDERLINE` only). A horizontal row draws it as an
|
|
@@ -131,52 +140,54 @@ var TABS_ORIENTATION_TO_BAR_CSS_MAP = {
|
|
|
131
140
|
*/
|
|
132
141
|
var TABS_VARIANT_TO_BAR_CSS_MAP = {
|
|
133
142
|
["UNDERLINE"]: {
|
|
134
|
-
[Orientation.HORIZONTAL]: "gx-Tabs-Orientation_HORIZONTAL-
|
|
135
|
-
[Orientation.VERTICAL]: "gx-Tabs-Orientation_VERTICAL-
|
|
143
|
+
[Orientation.HORIZONTAL]: "gx-Tabs-Orientation_HORIZONTAL-otj50wv",
|
|
144
|
+
[Orientation.VERTICAL]: "gx-Tabs-Orientation_VERTICAL-o1wa4rz3"
|
|
136
145
|
},
|
|
137
146
|
["PILL"]: {
|
|
138
|
-
[Orientation.HORIZONTAL]: "gx-Tabs-Orientation_HORIZONTAL-
|
|
139
|
-
[Orientation.VERTICAL]: "gx-Tabs-Orientation_VERTICAL-
|
|
147
|
+
[Orientation.HORIZONTAL]: "gx-Tabs-Orientation_HORIZONTAL-o19ax5w1",
|
|
148
|
+
[Orientation.VERTICAL]: "gx-Tabs-Orientation_VERTICAL-o6on29c"
|
|
140
149
|
}
|
|
141
150
|
};
|
|
142
151
|
var TABS_ORIENTATION_TO_LIST_CSS_MAP = {
|
|
143
|
-
[Orientation.HORIZONTAL]: "gx-Tabs-Orientation_HORIZONTAL-
|
|
144
|
-
[Orientation.VERTICAL]: "gx-Tabs-Orientation_VERTICAL-
|
|
152
|
+
[Orientation.HORIZONTAL]: "gx-Tabs-Orientation_HORIZONTAL-o1cleozi",
|
|
153
|
+
[Orientation.VERTICAL]: "gx-Tabs-Orientation_VERTICAL-ofzxznm"
|
|
145
154
|
};
|
|
146
155
|
/** While unmeasured (server, first paint, after items change): every tab renders, clipped. */
|
|
147
|
-
var MEASURING_CSS = "gx-Tabs-MEASURING_CSS-
|
|
156
|
+
var MEASURING_CSS = "gx-Tabs-MEASURING_CSS-m10e4gpz";
|
|
148
157
|
/** The overflow trigger copy that is only measured. */
|
|
149
|
-
var MEASURING_TRIGGER_CSS = "gx-Tabs-MEASURING_TRIGGER_CSS-
|
|
158
|
+
var MEASURING_TRIGGER_CSS = "gx-Tabs-MEASURING_TRIGGER_CSS-m1k4ei2n";
|
|
150
159
|
/**
|
|
151
160
|
* Height, padding and icon-label gap per rung (custom properties on `Bar`). `--gx-tabs-row-height`
|
|
152
161
|
* is the horizontal `UNDERLINE` row's minimum: the label centered with 8 / 12 / 12px above and
|
|
153
162
|
* below it, the 2px indicator drawn over the bottom of that space.
|
|
154
163
|
*/
|
|
155
164
|
var TABS_SIZE_TO_CSS_MAP = {
|
|
156
|
-
["SMALL"]: "gx-Tabs-SMALL-
|
|
157
|
-
["MEDIUM"]: "gx-Tabs-MEDIUM-
|
|
158
|
-
["LARGE"]: "gx-Tabs-LARGE-
|
|
165
|
+
["SMALL"]: "gx-Tabs-SMALL-s1fu2ke2",
|
|
166
|
+
["MEDIUM"]: "gx-Tabs-MEDIUM-m1q90ijz",
|
|
167
|
+
["LARGE"]: "gx-Tabs-LARGE-l1xzvabb"
|
|
159
168
|
};
|
|
160
169
|
/** Shape per mode (every tab and the overflow trigger). */
|
|
161
170
|
var TABS_VARIANT_TO_TAB_CSS_MAP = {
|
|
162
|
-
["UNDERLINE"]: "gx-Tabs-UNDERLINE-
|
|
163
|
-
["PILL"]: "gx-Tabs-PILL-
|
|
171
|
+
["UNDERLINE"]: "gx-Tabs-UNDERLINE-uxgth9d",
|
|
172
|
+
["PILL"]: "gx-Tabs-PILL-p15kodi3"
|
|
164
173
|
};
|
|
165
174
|
/** Hover and press on an enabled, unselected tab (and the overflow trigger). */
|
|
166
175
|
var TABS_VARIANT_TO_INTERACTIVE_CSS_MAP = {
|
|
167
|
-
["UNDERLINE"]: "gx-Tabs-UNDERLINE-
|
|
168
|
-
["PILL"]: "gx-Tabs-PILL-
|
|
176
|
+
["UNDERLINE"]: "gx-Tabs-UNDERLINE-uhu3rsh",
|
|
177
|
+
["PILL"]: "gx-Tabs-PILL-p1nmauec"
|
|
169
178
|
};
|
|
170
179
|
var TABS_VARIANT_TO_SELECTED_CSS_MAP = {
|
|
171
|
-
["UNDERLINE"]: "gx-Tabs-UNDERLINE-
|
|
172
|
-
["PILL"]: "gx-Tabs-PILL-
|
|
180
|
+
["UNDERLINE"]: "gx-Tabs-UNDERLINE-u14ug43i",
|
|
181
|
+
["PILL"]: "gx-Tabs-PILL-p1qvds3x"
|
|
173
182
|
};
|
|
174
183
|
/** The `UNDERLINE` indicator's edge: always the one facing the panel, over the bar hairline. */
|
|
175
184
|
var TABS_ORIENTATION_TO_INDICATOR_CSS_MAP = {
|
|
176
|
-
[Orientation.HORIZONTAL]: "gx-Tabs-Orientation_HORIZONTAL-
|
|
177
|
-
[Orientation.VERTICAL]: "gx-Tabs-Orientation_VERTICAL-
|
|
185
|
+
[Orientation.HORIZONTAL]: "gx-Tabs-Orientation_HORIZONTAL-oa8x8b6",
|
|
186
|
+
[Orientation.VERTICAL]: "gx-Tabs-Orientation_VERTICAL-o2u7szj"
|
|
178
187
|
};
|
|
179
|
-
var TAB_DISABLED_CSS = "gx-Tabs-TAB_DISABLED_CSS-
|
|
188
|
+
var TAB_DISABLED_CSS = "gx-Tabs-TAB_DISABLED_CSS-t15gyusk";
|
|
189
|
+
/** A disabled tab's `leading`: `color` dims an icon or text, not a logo's own fills, so it fades with the label. */
|
|
190
|
+
var LEADING_DISABLED_CSS = "gx-Tabs-LEADING_DISABLED_CSS-l1semd88";
|
|
180
191
|
/** Tab icon px per rung: one step below the rung's III-A.4 icon (Mitch, 2026-10-04). */
|
|
181
192
|
var TABS_SIZE_TO_ICON_PX_MAP = {
|
|
182
193
|
["SMALL"]: 12,
|
|
@@ -228,7 +239,11 @@ var OverflowTrigger = forwardRef(function OverflowTrigger({ size, variant, class
|
|
|
228
239
|
OverflowTrigger.displayName = "TabsOverflowTrigger";
|
|
229
240
|
/** The parts of `items` that change a tab's width, plus the rung and mode. */
|
|
230
241
|
function measurementSignature(items, size, variant) {
|
|
231
|
-
return `${size}\u0001${variant}\u0001${items.map((item) => `${item.id}\u0000${item.label}\u0000${item.count ?? ""}\u0000${item.icon === void 0 ? 0 : 1}`).join("")}`;
|
|
242
|
+
return `${size}\u0001${variant}\u0001${items.map((item) => `${item.id}\u0000${item.label}\u0000${item.count ?? ""}\u0000${item.icon === void 0 ? 0 : 1}\u0000${hasNode(item.leading) ? 1 : 0}`).join("")}`;
|
|
243
|
+
}
|
|
244
|
+
/** A slot holds something (not `undefined`, `null` or `false`). */
|
|
245
|
+
function hasNode(node) {
|
|
246
|
+
return node !== void 0 && node !== null && node !== false;
|
|
232
247
|
}
|
|
233
248
|
/** A CSS length in px, or 0. */
|
|
234
249
|
function pxOf(value) {
|
|
@@ -284,7 +299,7 @@ function TabsImpl(props, ref) {
|
|
|
284
299
|
const [measurement, setMeasurement] = useState(null);
|
|
285
300
|
const [available, setAvailable] = useState(null);
|
|
286
301
|
const isMeasuring = isOverflowMode && (measurement === null || measurement.signature !== signature);
|
|
287
|
-
const hasActions = actions
|
|
302
|
+
const hasActions = hasNode(actions);
|
|
288
303
|
/** The row's width for tabs and the trigger: the bar minus its `inset` padding, `actions` and its gap. */
|
|
289
304
|
const readAvailable = useCallback(() => {
|
|
290
305
|
const bar = barRef.current;
|
|
@@ -399,6 +414,10 @@ function TabsImpl(props, ref) {
|
|
|
399
414
|
const isSelected = index === selectedIndex;
|
|
400
415
|
const isItemDisabled = item.isDisabled === true;
|
|
401
416
|
const content = /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
417
|
+
hasNode(item.leading) && /* @__PURE__ */ jsx(LeadingSlot, {
|
|
418
|
+
className: cx(isItemDisabled && LEADING_DISABLED_CSS),
|
|
419
|
+
children: item.leading
|
|
420
|
+
}),
|
|
402
421
|
item.icon !== void 0 && /* @__PURE__ */ jsx(Icon, {
|
|
403
422
|
component: item.icon,
|
|
404
423
|
size: TABS_SIZE_TO_ICON_PX_MAP[size],
|
|
@@ -519,6 +538,7 @@ function TabsImpl(props, ref) {
|
|
|
519
538
|
} };
|
|
520
539
|
return /* @__PURE__ */ jsx(MenuItem, {
|
|
521
540
|
label: item.label,
|
|
541
|
+
...hasNode(item.leading) ? { leading: item.leading } : {},
|
|
522
542
|
...item.icon === void 0 ? {} : { icon: item.icon },
|
|
523
543
|
...trailing === void 0 ? {} : { trailing },
|
|
524
544
|
isDisabled: item.isDisabled === true,
|
|
@@ -12,6 +12,10 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
12
12
|
* spacing and the left / right split; everything inside is composed from other components. It
|
|
13
13
|
* does not stick, route or collapse. In an app frame it sits above the page's scrolling region.
|
|
14
14
|
*
|
|
15
|
+
* It belongs to the standalone-app frame (Topbar + a `SidebarNav` with a `header`, whose 48px rows
|
|
16
|
+
* meet on one hairline). A Galaxy module uses `AppFrame` + `PageLayout` instead, whose 64px title
|
|
17
|
+
* row carries the page; the two frames are never mixed.
|
|
18
|
+
*
|
|
15
19
|
* Outside `main`, `article`, `aside`, `nav` and `section` the `<header>` is the page's `banner`
|
|
16
20
|
* landmark, so use one Topbar per page. New in 2.0 (from the rafa prototype).
|
|
17
21
|
*/
|
package/dist/shapes/Circle.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export declare enum CircleSize {
|
|
|
13
13
|
/** 12px, beside `body_lg` (20px line). */
|
|
14
14
|
X_LARGE = "X_LARGE"
|
|
15
15
|
}
|
|
16
|
-
/** Fill color role (
|
|
16
|
+
/** Fill color role (AGENTS.md "Variant": color set). Neutral steps resolve to `color.text.*`, statuses to `color.mark.*`. */
|
|
17
17
|
export declare enum CircleVariant {
|
|
18
18
|
/** `text.primary`. */
|
|
19
19
|
PRIMARY = "PRIMARY",
|
package/dist/shapes/Circle.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ROLE_COLOR_TO_CSS_MAP } from "../styles/internal/roleColor.js";
|
|
1
2
|
/* empty css */
|
|
2
3
|
import { styled } from "@linaria/react";
|
|
3
4
|
import { forwardRef } from "react";
|
|
@@ -34,7 +35,7 @@ var CircleSize = /* @__PURE__ */ function(CircleSize) {
|
|
|
34
35
|
CircleSize["X_LARGE"] = "X_LARGE";
|
|
35
36
|
return CircleSize;
|
|
36
37
|
}({});
|
|
37
|
-
/** Fill color role (
|
|
38
|
+
/** Fill color role (AGENTS.md "Variant": color set). Neutral steps resolve to `color.text.*`, statuses to `color.mark.*`. */
|
|
38
39
|
var CircleVariant = /* @__PURE__ */ function(CircleVariant) {
|
|
39
40
|
/** `text.primary`. */
|
|
40
41
|
CircleVariant["PRIMARY"] = "PRIMARY";
|
|
@@ -82,31 +83,14 @@ var CIRCLE_VARIANT_TO_CSS_MAP = {
|
|
|
82
83
|
["WARNING"]: "gx-Circle-WARNING-w1wd9i5w",
|
|
83
84
|
["ERROR"]: "gx-Circle-ERROR-e4bqin2"
|
|
84
85
|
};
|
|
85
|
-
/**
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
orange: "gx-Circle-orange-omm7dfa",
|
|
92
|
-
amber: "gx-Circle-amber-a15qmdzt",
|
|
93
|
-
yellow: "gx-Circle-yellow-y1p4fg4l",
|
|
94
|
-
lime: "gx-Circle-lime-l6eszpj",
|
|
95
|
-
green: "gx-Circle-green-g1kmyxwu",
|
|
96
|
-
emerald: "gx-Circle-emerald-er4sdq5",
|
|
97
|
-
teal: "gx-Circle-teal-tw9vccf",
|
|
98
|
-
cyan: "gx-Circle-cyan-c1rmact7",
|
|
99
|
-
sky: "gx-Circle-sky-syv0gwd",
|
|
100
|
-
blue: "gx-Circle-blue-bdx6kbq",
|
|
101
|
-
indigo: "gx-Circle-indigo-i1j11685",
|
|
102
|
-
violet: "gx-Circle-violet-vgz62lk",
|
|
103
|
-
purple: "gx-Circle-purple-pe429ux",
|
|
104
|
-
fuchsia: "gx-Circle-fuchsia-f1h7hg24",
|
|
105
|
-
pink: "gx-Circle-pink-po1cc6l",
|
|
106
|
-
rose: "gx-Circle-rose-r1ljyczc"
|
|
107
|
-
};
|
|
86
|
+
/**
|
|
87
|
+
* Categorical `color`: `mark.<family>`, the way a status variant renders. Reads the shared
|
|
88
|
+
* `--gx-role-*` variables `ROLE_COLOR_TO_CSS_MAP` sets per family, so the twenty families are
|
|
89
|
+
* written once (`styles/internal/roleColor`).
|
|
90
|
+
*/
|
|
91
|
+
var CIRCLE_COLOR_CSS = "gx-Circle-CIRCLE_COLOR_CSS-cisghat";
|
|
108
92
|
/** Declared after the variant and color maps so `hex` wins over them. */
|
|
109
|
-
var HEX_CSS = "gx-Circle-HEX_CSS-
|
|
93
|
+
var HEX_CSS = "gx-Circle-HEX_CSS-hrnyxi5";
|
|
110
94
|
/** A filled dot beside a label; its color is a role (`variant`), a category (`color`) or data (`hex`). */
|
|
111
95
|
var Circle = forwardRef(function Circle({ size = "MEDIUM", variant = "TERTIARY", color, hex, ariaLabel, id, className, style, ...rest }, ref) {
|
|
112
96
|
const variables = {};
|
|
@@ -119,7 +103,7 @@ var Circle = forwardRef(function Circle({ size = "MEDIUM", variant = "TERTIARY",
|
|
|
119
103
|
...rest,
|
|
120
104
|
ref,
|
|
121
105
|
id,
|
|
122
|
-
className: cx(CIRCLE_SIZE_TO_CSS_MAP[size], color !== void 0 ?
|
|
106
|
+
className: cx(CIRCLE_SIZE_TO_CSS_MAP[size], color !== void 0 ? cx(ROLE_COLOR_TO_CSS_MAP[color], CIRCLE_COLOR_CSS) : CIRCLE_VARIANT_TO_CSS_MAP[variant], hex !== void 0 && HEX_CSS, className),
|
|
123
107
|
style: {
|
|
124
108
|
...variables,
|
|
125
109
|
...style
|
package/dist/shapes/Square.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export declare enum SquareSize {
|
|
|
13
13
|
/** 12px, beside `body_lg` (20px line). */
|
|
14
14
|
X_LARGE = "X_LARGE"
|
|
15
15
|
}
|
|
16
|
-
/** Fill color role (
|
|
16
|
+
/** Fill color role (AGENTS.md "Variant": color set). Neutral steps resolve to `color.text.*`, statuses to `color.mark.*`. */
|
|
17
17
|
export declare enum SquareVariant {
|
|
18
18
|
/** `text.primary`. */
|
|
19
19
|
PRIMARY = "PRIMARY",
|
package/dist/shapes/Square.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ROLE_COLOR_TO_CSS_MAP } from "../styles/internal/roleColor.js";
|
|
1
2
|
/* empty css */
|
|
2
3
|
import { styled } from "@linaria/react";
|
|
3
4
|
import { forwardRef } from "react";
|
|
@@ -34,7 +35,7 @@ var SquareSize = /* @__PURE__ */ function(SquareSize) {
|
|
|
34
35
|
SquareSize["X_LARGE"] = "X_LARGE";
|
|
35
36
|
return SquareSize;
|
|
36
37
|
}({});
|
|
37
|
-
/** Fill color role (
|
|
38
|
+
/** Fill color role (AGENTS.md "Variant": color set). Neutral steps resolve to `color.text.*`, statuses to `color.mark.*`. */
|
|
38
39
|
var SquareVariant = /* @__PURE__ */ function(SquareVariant) {
|
|
39
40
|
/** `text.primary`. */
|
|
40
41
|
SquareVariant["PRIMARY"] = "PRIMARY";
|
|
@@ -83,31 +84,14 @@ var SQUARE_VARIANT_TO_CSS_MAP = {
|
|
|
83
84
|
["WARNING"]: "gx-Square-WARNING-w1jcu9g9",
|
|
84
85
|
["ERROR"]: "gx-Square-ERROR-e1a9qgv5"
|
|
85
86
|
};
|
|
86
|
-
/**
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
orange: "gx-Square-orange-o13w32o7",
|
|
93
|
-
amber: "gx-Square-amber-aflvbdc",
|
|
94
|
-
yellow: "gx-Square-yellow-y1wrg0mj",
|
|
95
|
-
lime: "gx-Square-lime-lbmrs5y",
|
|
96
|
-
green: "gx-Square-green-g1229390",
|
|
97
|
-
emerald: "gx-Square-emerald-eylmgp4",
|
|
98
|
-
teal: "gx-Square-teal-tgnvnom",
|
|
99
|
-
cyan: "gx-Square-cyan-cqzrj1i",
|
|
100
|
-
sky: "gx-Square-sky-sx1evfg",
|
|
101
|
-
blue: "gx-Square-blue-b1bh3ofr",
|
|
102
|
-
indigo: "gx-Square-indigo-i15n3xo4",
|
|
103
|
-
violet: "gx-Square-violet-v1qvour9",
|
|
104
|
-
purple: "gx-Square-purple-p1g6v6vx",
|
|
105
|
-
fuchsia: "gx-Square-fuchsia-f1u3b7de",
|
|
106
|
-
pink: "gx-Square-pink-pdedn2c",
|
|
107
|
-
rose: "gx-Square-rose-rod6x1x"
|
|
108
|
-
};
|
|
87
|
+
/**
|
|
88
|
+
* Categorical `color`: `mark.<family>`, the way a status variant renders. Reads the shared
|
|
89
|
+
* `--gx-role-*` variables `ROLE_COLOR_TO_CSS_MAP` sets per family, so the twenty families are
|
|
90
|
+
* written once (`styles/internal/roleColor`).
|
|
91
|
+
*/
|
|
92
|
+
var SQUARE_COLOR_CSS = "gx-Square-SQUARE_COLOR_CSS-s44keg";
|
|
109
93
|
/** Declared after the variant and color maps so `hex` wins over them. */
|
|
110
|
-
var HEX_CSS = "gx-Square-HEX_CSS-
|
|
94
|
+
var HEX_CSS = "gx-Square-HEX_CSS-h1czb11g";
|
|
111
95
|
/** A filled square mark beside a label; its color is a role (`variant`), a category (`color`) or data (`hex`). */
|
|
112
96
|
var Square = forwardRef(function Square({ size = "MEDIUM", variant = "TERTIARY", color, hex, ariaLabel, id, className, style, ...rest }, ref) {
|
|
113
97
|
const variables = {};
|
|
@@ -120,7 +104,7 @@ var Square = forwardRef(function Square({ size = "MEDIUM", variant = "TERTIARY",
|
|
|
120
104
|
...rest,
|
|
121
105
|
ref,
|
|
122
106
|
id,
|
|
123
|
-
className: cx(SQUARE_SIZE_TO_CSS_MAP[size], color !== void 0 ?
|
|
107
|
+
className: cx(SQUARE_SIZE_TO_CSS_MAP[size], color !== void 0 ? cx(ROLE_COLOR_TO_CSS_MAP[color], SQUARE_COLOR_CSS) : SQUARE_VARIANT_TO_CSS_MAP[variant], hex !== void 0 && HEX_CSS, className),
|
|
124
108
|
style: {
|
|
125
109
|
...variables,
|
|
126
110
|
...style
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/* empty css */
|
|
2
|
+
//#region src/styles/internal/roleColor.ts
|
|
3
|
+
/**
|
|
4
|
+
* @internal One role-color source for every `color?: RoleColor` prop. Each block sets four custom
|
|
5
|
+
* properties for one status or palette family, and a component reads the ones it needs:
|
|
6
|
+
*
|
|
7
|
+
* - `--gx-role-text`: `text.<c>` (labels and icons; icons keep `text`, never `mark`);
|
|
8
|
+
* - `--gx-role-fill`: `background.<c>` (a quiet tinted surface);
|
|
9
|
+
* - `--gx-role-border`: `border.<c>` (its hairline);
|
|
10
|
+
* - `--gx-role-mark`: `mark.<c>` (a filled shape with no text on it).
|
|
11
|
+
*
|
|
12
|
+
* Why variables rather than one `Record<RoleColor>` of declarations per component: the twenty
|
|
13
|
+
* families are written once, a component keys `ROLE_COLOR_TO_CSS_MAP[color]` and adds one block
|
|
14
|
+
* that maps the variables onto its own properties, and `hex` and disabled states keep overriding
|
|
15
|
+
* by declaration order exactly as before. Private on purpose (an `internal/` module: built, never a
|
|
16
|
+
* package export).
|
|
17
|
+
*/
|
|
18
|
+
/** Sets the four `--gx-role-*` variables per status and palette family. */
|
|
19
|
+
var ROLE_COLOR_TO_CSS_MAP = {
|
|
20
|
+
success: "gx-roleColor-success-s1c8ieft",
|
|
21
|
+
warning: "gx-roleColor-warning-w100nkh0",
|
|
22
|
+
error: "gx-roleColor-error-e1nhco0",
|
|
23
|
+
red: "gx-roleColor-red-r16os4ey",
|
|
24
|
+
orange: "gx-roleColor-orange-oyt3k76",
|
|
25
|
+
amber: "gx-roleColor-amber-ail1y4f",
|
|
26
|
+
yellow: "gx-roleColor-yellow-y1bp9ddu",
|
|
27
|
+
lime: "gx-roleColor-lime-lb02nu3",
|
|
28
|
+
green: "gx-roleColor-green-gyvr8v1",
|
|
29
|
+
emerald: "gx-roleColor-emerald-e16fojs1",
|
|
30
|
+
teal: "gx-roleColor-teal-t1ik3gps",
|
|
31
|
+
cyan: "gx-roleColor-cyan-c1tqfkft",
|
|
32
|
+
sky: "gx-roleColor-sky-s1q7825m",
|
|
33
|
+
blue: "gx-roleColor-blue-bxyqpwq",
|
|
34
|
+
indigo: "gx-roleColor-indigo-i1rsw8me",
|
|
35
|
+
violet: "gx-roleColor-violet-v1l5oydn",
|
|
36
|
+
purple: "gx-roleColor-purple-p1k8sszd",
|
|
37
|
+
fuchsia: "gx-roleColor-fuchsia-f149phwe",
|
|
38
|
+
pink: "gx-roleColor-pink-p1fg2myf",
|
|
39
|
+
rose: "gx-roleColor-rose-r1ur3f9e"
|
|
40
|
+
};
|
|
41
|
+
//#endregion
|
|
42
|
+
export { ROLE_COLOR_TO_CSS_MAP };
|
package/dist/styles/mixins.js
CHANGED
|
@@ -2,7 +2,7 @@ import { t } from "../theme/tokens/t.js";
|
|
|
2
2
|
/* empty css */
|
|
3
3
|
//#region src/styles/mixins.ts
|
|
4
4
|
/**
|
|
5
|
-
* Shared style mixins (
|
|
5
|
+
* Shared style mixins (AGENTS.md "Mixins"). Each export is a CSS-text fragment (a plain string,
|
|
6
6
|
* evaluated at build time by wyw): interpolate it inside a `styled` or `css` template instead of
|
|
7
7
|
* re-declaring the rules. Never compose a mixin with `cx(...)`; it is not a class name.
|
|
8
8
|
*
|