@galaxy-io/dls 2.0.0 → 2.0.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/charts/BarChart.js +29 -13
- package/dist/charts/ChartCategoryTargets.d.ts +2 -2
- package/dist/charts/ChartCategoryTargets.js +2 -1
- package/dist/charts/ChartFrame.d.ts +7 -5
- package/dist/charts/ChartFrame.js +151 -76
- package/dist/charts/ChartLegend.d.ts +14 -4
- package/dist/charts/ChartLegend.js +90 -53
- package/dist/charts/ChartMarkTargets.d.ts +2 -2
- package/dist/charts/ChartMarkTargets.js +2 -1
- package/dist/charts/Heatmap.js +19 -7
- package/dist/charts/LineChart.js +19 -8
- package/dist/charts/PieChart.js +16 -7
- package/dist/charts/chartSelection.d.ts +15 -0
- package/dist/charts/chartSelection.js +22 -0
- package/dist/charts/constants.d.ts +4 -0
- package/dist/charts/constants.js +6 -2
- package/dist/charts/types.d.ts +10 -1
- package/dist/charts/useChartInteraction.d.ts +25 -3
- package/dist/charts/useChartInteraction.js +56 -10
- package/dist/drawer/Drawer.d.ts +3 -1
- package/dist/drawer/Drawer.js +43 -14
- package/dist/feedback/Alert.d.ts +1 -1
- package/dist/inputs/CheckboxGroup.js +1 -1
- package/dist/inputs/CheckboxInput.js +1 -1
- package/dist/inputs/ColorInput.js +1 -1
- package/dist/inputs/CronInput.js +1 -1
- package/dist/inputs/DateInput.js +1 -1
- package/dist/inputs/KeyValueInput.js +1 -1
- package/dist/inputs/SelectInput.js +1 -1
- package/dist/inputs/SwitchInput.js +1 -1
- package/dist/inputs/TextAreaInput.js +6 -0
- package/dist/inputs/internal/ownField.js +1 -1
- package/dist/styles.css +1 -1
- package/dist/table/TableCore.js +6 -1
- package/dist/timeline/Timeline.d.ts +22 -1
- package/dist/timeline/Timeline.js +75 -43
- package/package.json +5 -1
package/dist/table/TableCore.js
CHANGED
|
@@ -192,7 +192,12 @@ var DropIndicator = /*#__PURE__*/ styled("span")({
|
|
|
192
192
|
class: "gx-TableCore-DropIndicator-d1po1i5a",
|
|
193
193
|
propsAsIs: false
|
|
194
194
|
});
|
|
195
|
-
/**
|
|
195
|
+
/**
|
|
196
|
+
* Follows the table, inside the scroll container; observed for `onEndReached`. Zero height: a 1px
|
|
197
|
+
* sentinel made every table overflow its scroll box by a pixel, so the wheel scrolled that pixel
|
|
198
|
+
* and a trackpad gesture latched onto the table instead of scrolling the page.
|
|
199
|
+
* `IntersectionObserver` reports a zero-area target that touches the root's edge.
|
|
200
|
+
*/
|
|
196
201
|
var Sentinel = /*#__PURE__*/ styled("div")({
|
|
197
202
|
name: "Sentinel",
|
|
198
203
|
class: "gx-TableCore-Sentinel-scxvgum",
|
|
@@ -10,6 +10,15 @@ export declare enum TimelineSize {
|
|
|
10
10
|
/** body_lg text, 24px box, 6px dot, 14px icon, 24px between events. */
|
|
11
11
|
LARGE = "LARGE"
|
|
12
12
|
}
|
|
13
|
+
/** The frame around every event's dot or icon. One shape per timeline. */
|
|
14
|
+
export declare enum TimelineMarkerShape {
|
|
15
|
+
/** A square hairline box with control-radius corners. The default. */
|
|
16
|
+
SQUARE = "SQUARE",
|
|
17
|
+
/** A round hairline box. */
|
|
18
|
+
CIRCLE = "CIRCLE",
|
|
19
|
+
/** No box: the dot or icon sits on the rail, 4px clear of the line above and below it. */
|
|
20
|
+
NONE = "NONE"
|
|
21
|
+
}
|
|
13
22
|
/** Marker color of one item (Constitution V-A color set; the Timeline item is listed in that column). */
|
|
14
23
|
export declare enum TimelineVariant {
|
|
15
24
|
/** `text.primary` marker in a `border.primary` box. */
|
|
@@ -85,6 +94,18 @@ export interface TimelineProps extends AriaAttributes {
|
|
|
85
94
|
* @default TimelineSize.MEDIUM
|
|
86
95
|
*/
|
|
87
96
|
size?: TimelineSize;
|
|
97
|
+
/**
|
|
98
|
+
* The frame around each dot or icon: a square box, a round box, or none (the rail runs straight
|
|
99
|
+
* into the marker). The marker keeps its 16 / 20 / 24px slot in every shape, so text never moves.
|
|
100
|
+
* @default TimelineMarkerShape.SQUARE
|
|
101
|
+
*/
|
|
102
|
+
markerShape?: TimelineMarkerShape;
|
|
103
|
+
/**
|
|
104
|
+
* Fill each box with its item's background role: a neutral step, `background.<status>` or
|
|
105
|
+
* `background.<family>`, the way a `Chip` fills. Ignored with `TimelineMarkerShape.NONE`.
|
|
106
|
+
* @default false
|
|
107
|
+
*/
|
|
108
|
+
isFilled?: boolean;
|
|
88
109
|
/** DOM id on the root `<ol>`. */
|
|
89
110
|
id?: string;
|
|
90
111
|
/** Any `data-*` attribute, forwarded to the root `<ol>`. */
|
|
@@ -94,6 +115,6 @@ export interface TimelineProps extends AriaAttributes {
|
|
|
94
115
|
/** Inline style on the root `<ol>`; only for setting CSS custom properties. */
|
|
95
116
|
style?: CSSProperties;
|
|
96
117
|
}
|
|
97
|
-
/** A vertical list of events with
|
|
118
|
+
/** A vertical list of events with dot or icon markers (boxed or bare) on a hairline rail. */
|
|
98
119
|
declare const Timeline: import("react").ForwardRefExoticComponent<TimelineProps & import("react").RefAttributes<HTMLOListElement>>;
|
|
99
120
|
export default Timeline;
|
|
@@ -10,12 +10,12 @@ import { cx } from "@linaria/core";
|
|
|
10
10
|
/**
|
|
11
11
|
* A sequence of events in time order, top to bottom: a pipeline run's history, a sync's steps, an
|
|
12
12
|
* audit trail, an activity feed. Each item is a marker on a vertical rail (a `Beacon` dot, or an
|
|
13
|
-
* `Icon` when `icon` is set, inside a small
|
|
14
|
-
* centered on the
|
|
13
|
+
* `Icon` when `icon` is set, inside a small hairline box: square, round, or no box at all with
|
|
14
|
+
* `markerShape`, unfilled unless `isFilled`), a one-line label centered on the marker, an optional time at the end of the label line, an optional description and
|
|
15
15
|
* an optional footer. A 0.5px rail runs from the bottom edge of each box to the top edge of the
|
|
16
16
|
* next, whatever the item's height. Only the marker takes the item's color-set `variant` (a
|
|
17
17
|
* meaning) or categorical `color` (a palette family): the dot or icon its text color, the box its
|
|
18
|
-
* border color. The words stay primary and secondary.
|
|
18
|
+
* border color (and its fill with `isFilled`). The words stay primary and secondary.
|
|
19
19
|
*
|
|
20
20
|
* Read-only: it does not order, group, fetch or format anything. An ordered list (`<ol>`, kept a
|
|
21
21
|
* list in Safari with `role="list"` because the package reset removes list styling); the rail is
|
|
@@ -31,6 +31,16 @@ var TimelineSize = /* @__PURE__ */ function(TimelineSize) {
|
|
|
31
31
|
TimelineSize["LARGE"] = "LARGE";
|
|
32
32
|
return TimelineSize;
|
|
33
33
|
}({});
|
|
34
|
+
/** The frame around every event's dot or icon. One shape per timeline. */
|
|
35
|
+
var TimelineMarkerShape = /* @__PURE__ */ function(TimelineMarkerShape) {
|
|
36
|
+
/** A square hairline box with control-radius corners. The default. */
|
|
37
|
+
TimelineMarkerShape["SQUARE"] = "SQUARE";
|
|
38
|
+
/** A round hairline box. */
|
|
39
|
+
TimelineMarkerShape["CIRCLE"] = "CIRCLE";
|
|
40
|
+
/** No box: the dot or icon sits on the rail, 4px clear of the line above and below it. */
|
|
41
|
+
TimelineMarkerShape["NONE"] = "NONE";
|
|
42
|
+
return TimelineMarkerShape;
|
|
43
|
+
}({});
|
|
34
44
|
/** Marker color of one item (Constitution V-A color set; the Timeline item is listed in that column). */
|
|
35
45
|
var TimelineVariant = /* @__PURE__ */ function(TimelineVariant) {
|
|
36
46
|
/** `text.primary` marker in a `border.primary` box. */
|
|
@@ -84,10 +94,29 @@ var Marker = /*#__PURE__*/ styled("span")({
|
|
|
84
94
|
class: "gx-Timeline-Marker-m11eshsv",
|
|
85
95
|
propsAsIs: false
|
|
86
96
|
});
|
|
97
|
+
/**
|
|
98
|
+
* The rail is a hairline from a zero-width box centered on the marker. Browsers paint it a whole CSS
|
|
99
|
+
* pixel wide, starting at the center and snapped to the right of it, so on a 2× screen it sits one
|
|
100
|
+
* device pixel right of the dot or icon. Half a pixel back centers it exactly and stays crisp at 2×
|
|
101
|
+
* and up; at 1× a 1px line cannot center on an even-width mark, so it stays put.
|
|
102
|
+
*/
|
|
103
|
+
/**
|
|
104
|
+
* The marker frame per shape. `NONE` drops the box and draws the rail through the empty slot, above
|
|
105
|
+
* and below the dot or icon, stopping 4px short of it, so the line leads to the marker instead of an
|
|
106
|
+
* invisible box edge. The first event has no line above its marker and the last none below (the
|
|
107
|
+
* stubs keep their space, so the marker stays centered on its label).
|
|
108
|
+
*/
|
|
109
|
+
var TIMELINE_MARKER_SHAPE_TO_CSS_MAP = {
|
|
110
|
+
["SQUARE"]: "gx-Timeline-SQUARE-s1u5y4o2",
|
|
111
|
+
["CIRCLE"]: "gx-Timeline-CIRCLE-c132ryei",
|
|
112
|
+
["NONE"]: "gx-Timeline-NONE-n1j1o23c"
|
|
113
|
+
};
|
|
114
|
+
/** `isFilled`: the box takes its item's fill role (`--gx-timeline-fill`, set per variant and color). */
|
|
115
|
+
var FILLED_CSS = "gx-Timeline-FILLED_CSS-f6c9753";
|
|
87
116
|
/** The 0.5px hairline from the bottom of this box to the top of the next one. */
|
|
88
117
|
var Connector = /*#__PURE__*/ styled("span")({
|
|
89
118
|
name: "Connector",
|
|
90
|
-
class: "gx-Timeline-Connector-
|
|
119
|
+
class: "gx-Timeline-Connector-c1fj1oub",
|
|
91
120
|
propsAsIs: false
|
|
92
121
|
});
|
|
93
122
|
/**
|
|
@@ -96,13 +125,13 @@ var Connector = /*#__PURE__*/ styled("span")({
|
|
|
96
125
|
*/
|
|
97
126
|
var Body = /*#__PURE__*/ styled("div")({
|
|
98
127
|
name: "Body",
|
|
99
|
-
class: "gx-Timeline-Body-
|
|
128
|
+
class: "gx-Timeline-Body-b1whgn5t",
|
|
100
129
|
propsAsIs: false
|
|
101
130
|
});
|
|
102
131
|
/** The label wraps; the time stays at the end of the first line. */
|
|
103
132
|
var Heading = /*#__PURE__*/ styled("div")({
|
|
104
133
|
name: "Heading",
|
|
105
|
-
class: "gx-Timeline-Heading-
|
|
134
|
+
class: "gx-Timeline-Heading-h1j9kdi1",
|
|
106
135
|
propsAsIs: false
|
|
107
136
|
});
|
|
108
137
|
/**
|
|
@@ -111,19 +140,19 @@ var Heading = /*#__PURE__*/ styled("div")({
|
|
|
111
140
|
*/
|
|
112
141
|
var Footer = /*#__PURE__*/ styled("div")({
|
|
113
142
|
name: "Footer",
|
|
114
|
-
class: "gx-Timeline-Footer-
|
|
143
|
+
class: "gx-Timeline-Footer-feakmyp",
|
|
115
144
|
propsAsIs: false
|
|
116
145
|
});
|
|
117
146
|
/**
|
|
118
147
|
* The time in the second column, on one line. A flex box, so a `<time>` wrapper has no line strut
|
|
119
148
|
* of its own (the inherited font size) and shares the label's baseline at every size.
|
|
120
149
|
*/
|
|
121
|
-
var TIME_CSS = "gx-Timeline-TIME_CSS-
|
|
150
|
+
var TIME_CSS = "gx-Timeline-TIME_CSS-t1vcatjx";
|
|
122
151
|
/** Line height, marker box (16 / 20 / 24px), column gap and event spacing per rung. */
|
|
123
152
|
var TIMELINE_SIZE_TO_CSS_MAP = {
|
|
124
|
-
["SMALL"]: "gx-Timeline-SMALL-
|
|
125
|
-
["MEDIUM"]: "gx-Timeline-MEDIUM-
|
|
126
|
-
["LARGE"]: "gx-Timeline-LARGE-
|
|
153
|
+
["SMALL"]: "gx-Timeline-SMALL-s1195fxg",
|
|
154
|
+
["MEDIUM"]: "gx-Timeline-MEDIUM-m1oqbau9",
|
|
155
|
+
["LARGE"]: "gx-Timeline-LARGE-l11wi4d2"
|
|
127
156
|
};
|
|
128
157
|
/** The event text's type step. */
|
|
129
158
|
var TIMELINE_SIZE_TO_TEXT_SIZE_MAP = {
|
|
@@ -165,42 +194,45 @@ var TIMELINE_VARIANT_TO_ICON_VARIANT_MAP = {
|
|
|
165
194
|
["WARNING"]: IconVariant.WARNING,
|
|
166
195
|
["ERROR"]: IconVariant.ERROR
|
|
167
196
|
};
|
|
168
|
-
/**
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
["
|
|
174
|
-
["
|
|
175
|
-
["
|
|
176
|
-
["
|
|
177
|
-
["
|
|
197
|
+
/**
|
|
198
|
+
* The marker box's hairline and fill per variant: neutral roles keep `border.primary` and fill
|
|
199
|
+
* `background.secondary`; statuses take their own border and background roles.
|
|
200
|
+
*/
|
|
201
|
+
var TIMELINE_VARIANT_TO_CSS_MAP = {
|
|
202
|
+
["PRIMARY"]: "gx-Timeline-PRIMARY-p1r53y3e",
|
|
203
|
+
["SECONDARY"]: "gx-Timeline-SECONDARY-s61v3n7",
|
|
204
|
+
["TERTIARY"]: "gx-Timeline-TERTIARY-t1tjq5mm",
|
|
205
|
+
["DISABLED"]: "gx-Timeline-DISABLED-da735oo",
|
|
206
|
+
["INHERIT"]: "gx-Timeline-INHERIT-i1ayi32k",
|
|
207
|
+
["SUCCESS"]: "gx-Timeline-SUCCESS-s155vzhv",
|
|
208
|
+
["WARNING"]: "gx-Timeline-WARNING-wtnc6wm",
|
|
209
|
+
["ERROR"]: "gx-Timeline-ERROR-e1q3p1vl"
|
|
178
210
|
};
|
|
179
211
|
/**
|
|
180
212
|
* Categorical `color` on the marker: `text.<family>`, which an icon marker (`IconVariant.INHERIT`)
|
|
181
|
-
* takes, and `border.<family>` on the box.
|
|
213
|
+
* takes, and `border.<family>` and the `background.<family>` fill on the box.
|
|
182
214
|
*/
|
|
183
215
|
var TIMELINE_COLOR_TO_CSS_MAP = {
|
|
184
|
-
red: "gx-Timeline-red-
|
|
185
|
-
orange: "gx-Timeline-orange-
|
|
186
|
-
amber: "gx-Timeline-amber-
|
|
187
|
-
yellow: "gx-Timeline-yellow-
|
|
188
|
-
lime: "gx-Timeline-lime-
|
|
189
|
-
green: "gx-Timeline-green-
|
|
190
|
-
emerald: "gx-Timeline-emerald-
|
|
191
|
-
teal: "gx-Timeline-teal-
|
|
192
|
-
cyan: "gx-Timeline-cyan-
|
|
193
|
-
sky: "gx-Timeline-sky-
|
|
194
|
-
blue: "gx-Timeline-blue-
|
|
195
|
-
indigo: "gx-Timeline-indigo-
|
|
196
|
-
violet: "gx-Timeline-violet-
|
|
197
|
-
purple: "gx-Timeline-purple-
|
|
198
|
-
fuchsia: "gx-Timeline-fuchsia-
|
|
199
|
-
pink: "gx-Timeline-pink-
|
|
200
|
-
rose: "gx-Timeline-rose-
|
|
216
|
+
red: "gx-Timeline-red-r1khc5e9",
|
|
217
|
+
orange: "gx-Timeline-orange-oob0jun",
|
|
218
|
+
amber: "gx-Timeline-amber-acpz10x",
|
|
219
|
+
yellow: "gx-Timeline-yellow-y1arc1uv",
|
|
220
|
+
lime: "gx-Timeline-lime-l1x7dvj6",
|
|
221
|
+
green: "gx-Timeline-green-g1fx1m3c",
|
|
222
|
+
emerald: "gx-Timeline-emerald-e1gy5gqm",
|
|
223
|
+
teal: "gx-Timeline-teal-ttyv4re",
|
|
224
|
+
cyan: "gx-Timeline-cyan-c1506u15",
|
|
225
|
+
sky: "gx-Timeline-sky-s2f8n55",
|
|
226
|
+
blue: "gx-Timeline-blue-b1bza0tc",
|
|
227
|
+
indigo: "gx-Timeline-indigo-i1vbt6lr",
|
|
228
|
+
violet: "gx-Timeline-violet-vjtm0e",
|
|
229
|
+
purple: "gx-Timeline-purple-pek3kdh",
|
|
230
|
+
fuchsia: "gx-Timeline-fuchsia-f13hn3pe",
|
|
231
|
+
pink: "gx-Timeline-pink-pdf3rdi",
|
|
232
|
+
rose: "gx-Timeline-rose-rjv99mk"
|
|
201
233
|
};
|
|
202
|
-
/** A vertical list of events with
|
|
203
|
-
var Timeline = forwardRef(function Timeline({ items, size = "MEDIUM", className, style, ...rest }, ref) {
|
|
234
|
+
/** A vertical list of events with dot or icon markers (boxed or bare) on a hairline rail. */
|
|
235
|
+
var Timeline = forwardRef(function Timeline({ items, size = "MEDIUM", markerShape = "SQUARE", isFilled = false, className, style, ...rest }, ref) {
|
|
204
236
|
const textSize = TIMELINE_SIZE_TO_TEXT_SIZE_MAP[size];
|
|
205
237
|
return /* @__PURE__ */ jsx(Root, {
|
|
206
238
|
...rest,
|
|
@@ -217,7 +249,7 @@ var Timeline = forwardRef(function Timeline({ items, size = "MEDIUM", className,
|
|
|
217
249
|
children: [/* @__PURE__ */ jsxs(Rail, {
|
|
218
250
|
"aria-hidden": true,
|
|
219
251
|
children: [/* @__PURE__ */ jsx(Marker, {
|
|
220
|
-
className: color !== void 0 ? TIMELINE_COLOR_TO_CSS_MAP[color] :
|
|
252
|
+
className: cx(color !== void 0 ? TIMELINE_COLOR_TO_CSS_MAP[color] : TIMELINE_VARIANT_TO_CSS_MAP[variant], TIMELINE_MARKER_SHAPE_TO_CSS_MAP[markerShape], isFilled && markerShape !== "NONE" && FILLED_CSS),
|
|
221
253
|
children: item.icon === void 0 ? /* @__PURE__ */ jsx(Beacon, {
|
|
222
254
|
size: TIMELINE_SIZE_TO_BEACON_SIZE_MAP[size],
|
|
223
255
|
...color !== void 0 ? { color } : { variant: TIMELINE_VARIANT_TO_BEACON_VARIANT_MAP[variant] },
|
|
@@ -266,4 +298,4 @@ var Timeline = forwardRef(function Timeline({ items, size = "MEDIUM", className,
|
|
|
266
298
|
});
|
|
267
299
|
Timeline.displayName = "Timeline";
|
|
268
300
|
//#endregion
|
|
269
|
-
export { TimelineSize, TimelineVariant, Timeline as default };
|
|
301
|
+
export { TimelineMarkerShape, TimelineSize, TimelineVariant, Timeline as default };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@galaxy-io/dls",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"description": "Galaxy Design Language System",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"type": "module",
|
|
@@ -157,6 +157,10 @@
|
|
|
157
157
|
"types": "./dist/charts/chartScales.d.ts",
|
|
158
158
|
"import": "./dist/charts/chartScales.js"
|
|
159
159
|
},
|
|
160
|
+
"./charts/chartSelection": {
|
|
161
|
+
"types": "./dist/charts/chartSelection.d.ts",
|
|
162
|
+
"import": "./dist/charts/chartSelection.js"
|
|
163
|
+
},
|
|
160
164
|
"./charts/constants": {
|
|
161
165
|
"types": "./dist/charts/constants.d.ts",
|
|
162
166
|
"import": "./dist/charts/constants.js"
|