@galaxy-io/dls 2.2.1 → 2.3.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/backgrounds/GridBackground.d.ts +11 -2
- package/dist/backgrounds/GridBackground.js +10 -2
- package/dist/buttons/Button.js +1 -1
- package/dist/charts/StatChart.d.ts +1 -1
- package/dist/chips/Chip.d.ts +1 -1
- package/dist/dropdown/Dropdown.js +1 -1
- package/dist/editor/CodeEditor.js +4 -2
- package/dist/feedback/Alert.js +1 -1
- package/dist/feedback/ProgressBar.js +2 -2
- package/dist/inputs/ColorInput.js +2 -2
- package/dist/inputs/CronInput.js +1 -1
- package/dist/inputs/DateInput.js +1 -1
- package/dist/inputs/Input.js +5 -3
- package/dist/inputs/SelectInput.js +6 -3
- package/dist/inputs/TagInput.js +1 -2
- package/dist/inputs/TextAreaInput.js +5 -7
- package/dist/inputs/ToggleInput.js +7 -2
- package/dist/inputs/internal/fieldFrame.d.ts +0 -2
- package/dist/inputs/internal/fieldFrame.js +2 -4
- package/dist/layout/Box.d.ts +1 -1
- package/dist/layout/Divider.js +1 -1
- package/dist/menu/Menu.js +4 -1
- package/dist/navigation/Tabs.js +0 -1
- package/dist/styles/mixins.d.ts +8 -1
- package/dist/styles/mixins.js +10 -3
- package/dist/styles.css +1 -1
- package/dist/timeline/Timeline.js +2 -2
- package/dist/tooltip/Tooltip.js +1 -1
- package/package.json +1 -1
|
@@ -21,6 +21,15 @@ export declare enum GridBackgroundSize {
|
|
|
21
21
|
/** 48px pitch. */
|
|
22
22
|
X_LARGE = "X_LARGE"
|
|
23
23
|
}
|
|
24
|
+
/** Custom property for the mark color: a `t.color.*` token. Unset, each pattern uses its own `opacity.fg*` token. */
|
|
25
|
+
export declare const GRID_BACKGROUND_COLOR_VAR = "--gx-grid-background-color";
|
|
26
|
+
/** Custom property for the pattern's opacity, 0 to 1. Unset, `1`. */
|
|
27
|
+
export declare const GRID_BACKGROUND_OPACITY_VAR = "--gx-grid-background-opacity";
|
|
28
|
+
/** `style` for GridBackground: CSS custom properties only, typed for the two it reads. */
|
|
29
|
+
export type GridBackgroundStyle = CSSProperties & {
|
|
30
|
+
[GRID_BACKGROUND_COLOR_VAR]?: string;
|
|
31
|
+
[GRID_BACKGROUND_OPACITY_VAR]?: number;
|
|
32
|
+
};
|
|
24
33
|
export interface GridBackgroundProps extends AriaAttributes {
|
|
25
34
|
/**
|
|
26
35
|
* The mark repeated across the grid: dots, small crosses at the intersections, or ruled cells.
|
|
@@ -40,8 +49,8 @@ export interface GridBackgroundProps extends AriaAttributes {
|
|
|
40
49
|
[dataAttribute: `data-${string}`]: string | number | boolean | undefined;
|
|
41
50
|
/** Extra class on the root `<div>`. */
|
|
42
51
|
className?: string;
|
|
43
|
-
/** Inline style on the root `<div>`; only for setting CSS custom properties. */
|
|
44
|
-
style?:
|
|
52
|
+
/** Inline style on the root `<div>`; only for setting CSS custom properties (`GRID_BACKGROUND_COLOR_VAR`, `GRID_BACKGROUND_OPACITY_VAR`). */
|
|
53
|
+
style?: GridBackgroundStyle;
|
|
45
54
|
}
|
|
46
55
|
/** A dot, cross or cell grid painted behind centered content. */
|
|
47
56
|
declare const GridBackground: import("react").ForwardRefExoticComponent<GridBackgroundProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -12,6 +12,10 @@ import { match } from "ts-pattern";
|
|
|
12
12
|
* token, so the pattern follows the theme through CSS alone, with the same
|
|
13
13
|
* markup on the server and the client. Decoration only: not interactive, no semantics.
|
|
14
14
|
*
|
|
15
|
+
* Two custom properties tune the marks through `style`: `GRID_BACKGROUND_COLOR_VAR` takes a
|
|
16
|
+
* `t.color.*` token for the mark color, `GRID_BACKGROUND_OPACITY_VAR` a 0 to 1 opacity for the
|
|
17
|
+
* whole pattern. Unset, the pattern keeps its quiet default.
|
|
18
|
+
*
|
|
15
19
|
* Replaces 1.x `DotGridBackground`, `CrossGridBackground` and `CellGridBackground` (`pattern`;
|
|
16
20
|
* `spacing` / `cellSize` → `size`; the color, opacity, stroke, radius and fill props are gone).
|
|
17
21
|
*/
|
|
@@ -39,6 +43,10 @@ var GridBackgroundSize = /* @__PURE__ */ function(GridBackgroundSize) {
|
|
|
39
43
|
GridBackgroundSize["X_LARGE"] = "X_LARGE";
|
|
40
44
|
return GridBackgroundSize;
|
|
41
45
|
}({});
|
|
46
|
+
/** Custom property for the mark color: a `t.color.*` token. Unset, each pattern uses its own `opacity.fg*` token. */
|
|
47
|
+
var GRID_BACKGROUND_COLOR_VAR = "--gx-grid-background-color";
|
|
48
|
+
/** Custom property for the pattern's opacity, 0 to 1. Unset, `1`. */
|
|
49
|
+
var GRID_BACKGROUND_OPACITY_VAR = "--gx-grid-background-opacity";
|
|
42
50
|
/** Fills the parent and centers the children; a stacking context so the layer sits under them. */
|
|
43
51
|
var Root = /*#__PURE__*/ styled("div")({
|
|
44
52
|
name: "Root",
|
|
@@ -51,7 +59,7 @@ var Layer = /*#__PURE__*/ styled("svg")({
|
|
|
51
59
|
class: "gx-GridBackground-Layer-lvvo1cl",
|
|
52
60
|
propsAsIs: false
|
|
53
61
|
});
|
|
54
|
-
/** The mark color per pattern, on the layer only (never inherited by the children). */
|
|
62
|
+
/** The default mark color per pattern, on the layer only (never inherited by the children); `GRID_BACKGROUND_COLOR_VAR` overrides it. */
|
|
55
63
|
var GRID_BACKGROUND_PATTERN_TO_CSS_MAP = {
|
|
56
64
|
["DOT"]: "gx-GridBackground-DOT-d1ezsakb",
|
|
57
65
|
["CROSS"]: "gx-GridBackground-CROSS-cl21ufg",
|
|
@@ -143,4 +151,4 @@ var GridBackground = forwardRef(function GridBackground({ pattern = "DOT", size
|
|
|
143
151
|
});
|
|
144
152
|
GridBackground.displayName = "GridBackground";
|
|
145
153
|
//#endregion
|
|
146
|
-
export { GridBackgroundPattern, GridBackgroundSize, GridBackground as default };
|
|
154
|
+
export { GRID_BACKGROUND_COLOR_VAR, GRID_BACKGROUND_OPACITY_VAR, GridBackgroundPattern, GridBackgroundSize, GridBackground as default };
|
package/dist/buttons/Button.js
CHANGED
|
@@ -72,7 +72,7 @@ var ButtonSize = /* @__PURE__ */ function(ButtonSize) {
|
|
|
72
72
|
return ButtonSize;
|
|
73
73
|
}({});
|
|
74
74
|
/**
|
|
75
|
-
* Static rules. `border:
|
|
75
|
+
* Static rules. `border: 1px solid transparent` gives every variant the same box; the variant
|
|
76
76
|
* map colors it. `INTERACTIVE_RESET` comes first so the rules after it win.
|
|
77
77
|
*/
|
|
78
78
|
var Root = /*#__PURE__*/ styled("button")({
|
|
@@ -25,7 +25,7 @@ export interface StatChartProps extends AriaAttributes {
|
|
|
25
25
|
*/
|
|
26
26
|
variant?: StatChartVariant;
|
|
27
27
|
/**
|
|
28
|
-
* Adds the
|
|
28
|
+
* Adds the 1px hairline. Use it for tiles on a page; leave it off inside an already-bordered container.
|
|
29
29
|
* @default false
|
|
30
30
|
*/
|
|
31
31
|
hasBorder?: boolean;
|
package/dist/chips/Chip.d.ts
CHANGED
|
@@ -60,7 +60,7 @@ var DROPDOWN_VARIANT_TO_POPOVER_VARIANT_MAP = {
|
|
|
60
60
|
["TERTIARY"]: PopoverVariant.TERTIARY
|
|
61
61
|
};
|
|
62
62
|
/**
|
|
63
|
-
* The panel is `border-box` with a
|
|
63
|
+
* The panel is `border-box` with a hairline top and bottom, so its content box is two hairlines
|
|
64
64
|
* shorter than the room Popover reports.
|
|
65
65
|
*/
|
|
66
66
|
/** The region column, capped to the room on screen so only the body scrolls. */
|
|
@@ -2,6 +2,7 @@ import { useControlledState } from "../hooks/useControlledState.js";
|
|
|
2
2
|
import { t } from "../theme/tokens/t.js";
|
|
3
3
|
import { GalaxyThemeContext } from "../theme/useGalaxyTheme.js";
|
|
4
4
|
import { useField } from "../hooks/useField.js";
|
|
5
|
+
import "../styles/mixins.js";
|
|
5
6
|
import { hexToRgb, rgbToHsl } from "../utils/colors.js";
|
|
6
7
|
/* empty css */
|
|
7
8
|
import { styled } from "@linaria/react";
|
|
@@ -245,7 +246,7 @@ function getFocusOutline() {
|
|
|
245
246
|
}
|
|
246
247
|
/** Everything that is not syntax: content inset, gutters, popups, the search panel. All `t.*`. */
|
|
247
248
|
function getEditorViewTheme() {
|
|
248
|
-
const hairline = `
|
|
249
|
+
const hairline = `1px solid ${t.color.border.primary}`;
|
|
249
250
|
const sansBodyMd = {
|
|
250
251
|
fontFamily: t.font.sans.family,
|
|
251
252
|
fontSize: t.font.sans.size.body_md
|
|
@@ -348,6 +349,7 @@ function getEditorViewTheme() {
|
|
|
348
349
|
},
|
|
349
350
|
".cm-panel.cm-search .cm-textfield[name=replace], .cm-panel.cm-search .cm-button[name=replace], .cm-panel.cm-search .cm-button[name=replaceAll], .cm-panel.cm-search label, .cm-panel.cm-search [name=close], .cm-panel.cm-search br": { display: "none" },
|
|
350
351
|
".cm-panel.cm-search .cm-textfield": {
|
|
352
|
+
width: `calc(134px + 2 * ${t.space[8]} + 2 * 1px)`,
|
|
351
353
|
height: t.size.control.small,
|
|
352
354
|
boxSizing: "border-box",
|
|
353
355
|
margin: 0,
|
|
@@ -367,7 +369,7 @@ function getEditorViewTheme() {
|
|
|
367
369
|
boxSizing: "border-box",
|
|
368
370
|
margin: 0,
|
|
369
371
|
padding: `0 ${t.space[8]}`,
|
|
370
|
-
border:
|
|
372
|
+
border: `1px solid transparent`,
|
|
371
373
|
borderRadius: t.radius.md,
|
|
372
374
|
background: "transparent",
|
|
373
375
|
backgroundImage: "none",
|
package/dist/feedback/Alert.js
CHANGED
|
@@ -38,7 +38,7 @@ var AlertVariant = /* @__PURE__ */ function(AlertVariant) {
|
|
|
38
38
|
return AlertVariant;
|
|
39
39
|
}({});
|
|
40
40
|
/**
|
|
41
|
-
* A block-level flex row that fills its parent's width. The transparent
|
|
41
|
+
* A block-level flex row that fills its parent's width. The transparent hairline gives
|
|
42
42
|
* every variant the same box; the variant map colors it.
|
|
43
43
|
*/
|
|
44
44
|
var Root = /*#__PURE__*/ styled("div")({
|
|
@@ -64,8 +64,8 @@ var Header = /*#__PURE__*/ styled("div")({
|
|
|
64
64
|
});
|
|
65
65
|
/**
|
|
66
66
|
* The 1.x track, from tokens; it clips the fill's corners. The hairline is drawn by a layer under
|
|
67
|
-
* the fill instead of the track's own border:
|
|
68
|
-
*
|
|
67
|
+
* the fill instead of the track's own border: a border in the box would take its width out of a
|
|
68
|
+
* 2px track and leave no room for the fill.
|
|
69
69
|
*/
|
|
70
70
|
var Track = /*#__PURE__*/ styled("div")({
|
|
71
71
|
name: "Track",
|
|
@@ -171,7 +171,7 @@ var COLOR_INPUT_VARIANT_TO_HOVER_CSS_MAP = {
|
|
|
171
171
|
var GHOST_HOVER_CSS = "gx-ColorInput-GHOST_HOVER_CSS-g2ye5n";
|
|
172
172
|
/**
|
|
173
173
|
* Height, start inset, gap and the end inset that reserves the caret zone per rung (the
|
|
174
|
-
* SelectInput table). The start inset subtracts the
|
|
174
|
+
* SelectInput table). The start inset subtracts the hairline so the swatch starts on a whole
|
|
175
175
|
* pixel.
|
|
176
176
|
*/
|
|
177
177
|
var COLOR_INPUT_SIZE_TO_CSS_MAP = {
|
|
@@ -282,7 +282,7 @@ var HueFrame = /*#__PURE__*/ styled("div")({
|
|
|
282
282
|
propsAsIs: false
|
|
283
283
|
});
|
|
284
284
|
/**
|
|
285
|
-
* The one pointer for both: a 12px ring (2px `background.base`, a
|
|
285
|
+
* The one pointer for both: a 12px ring (2px `background.base`, a 1px `text.primary` outline)
|
|
286
286
|
* that reads on any color and flips with the theme. Positions are custom properties.
|
|
287
287
|
*/
|
|
288
288
|
var PointerRing = /*#__PURE__*/ styled("span")({
|
package/dist/inputs/CronInput.js
CHANGED
|
@@ -397,7 +397,7 @@ var CRON_INPUT_VARIANT_TO_HOVER_CSS_MAP = {
|
|
|
397
397
|
var GHOST_HOVER_CSS = "gx-CronInput-GHOST_HOVER_CSS-g1279sor";
|
|
398
398
|
/**
|
|
399
399
|
* Height, start inset, gap and the end inset that reserves the icon zone (rung padding + icon +
|
|
400
|
-
* gap) per rung (SelectInput's table). The start inset subtracts the
|
|
400
|
+
* gap) per rung (SelectInput's table). The start inset subtracts the hairline so the value
|
|
401
401
|
* starts on a whole pixel.
|
|
402
402
|
*/
|
|
403
403
|
var CRON_INPUT_SIZE_TO_CSS_MAP = {
|
package/dist/inputs/DateInput.js
CHANGED
|
@@ -188,7 +188,7 @@ var DATE_INPUT_VARIANT_TO_HOVER_CSS_MAP = {
|
|
|
188
188
|
var GHOST_HOVER_CSS = "gx-DateInput-GHOST_HOVER_CSS-gymba5f";
|
|
189
189
|
/**
|
|
190
190
|
* Height, start inset, gap and the end inset that reserves the icon zone (rung padding + icon +
|
|
191
|
-
* gap) per rung (SelectInput's table). The start inset subtracts the
|
|
191
|
+
* gap) per rung (SelectInput's table). The start inset subtracts the hairline so the value
|
|
192
192
|
* starts on a whole pixel.
|
|
193
193
|
*/
|
|
194
194
|
var DATE_INPUT_SIZE_TO_CSS_MAP = {
|
package/dist/inputs/Input.js
CHANGED
|
@@ -120,7 +120,7 @@ var INPUT_SIZE_TO_CSS_MAP = {
|
|
|
120
120
|
};
|
|
121
121
|
/**
|
|
122
122
|
* Start inset when `leading` is set: equal to the vertical gap around an in-field button. The
|
|
123
|
-
*
|
|
123
|
+
* hairline is subtracted, as on the end inset: the border adds to the start padding but the
|
|
124
124
|
* vertical gap already includes it.
|
|
125
125
|
*/
|
|
126
126
|
var INPUT_SIZE_TO_LEADING_INSET_CSS_MAP = {
|
|
@@ -132,7 +132,7 @@ var INPUT_SIZE_TO_LEADING_INSET_CSS_MAP = {
|
|
|
132
132
|
};
|
|
133
133
|
/**
|
|
134
134
|
* End inset when `trailing` is set or `isClearable`: equal to the vertical gap around the clear
|
|
135
|
-
* button. The
|
|
135
|
+
* button. The hairline is subtracted, because the frame's border adds to the end padding
|
|
136
136
|
* but the vertical gap already includes it (the button is centered inside the border).
|
|
137
137
|
*/
|
|
138
138
|
var INPUT_SIZE_TO_TRAILING_INSET_CSS_MAP = {
|
|
@@ -165,7 +165,9 @@ var DISABLED_CSS = "gx-Input-DISABLED_CSS-d1d35fia";
|
|
|
165
165
|
var FILL_WIDTH_CSS = "gx-Input-FILL_WIDTH_CSS-f1jgakl6";
|
|
166
166
|
/**
|
|
167
167
|
* The value's type per family and rung. `height` equals the line height, so the value centers on
|
|
168
|
-
* whole pixels in every rung; mono uses its ~0.92× sizes with the same line heights.
|
|
168
|
+
* whole pixels in every rung; mono uses its ~0.92× sizes with the same line heights. `width` is the
|
|
169
|
+
* default (Chrome's native `size="20"` width for that font), fixed so Safari, whose native input is
|
|
170
|
+
* wider, draws the same field; `flex` still grows and shrinks it inside a sized frame.
|
|
169
171
|
*/
|
|
170
172
|
var INPUT_FAMILY_TO_SIZE_CSS_MAP = {
|
|
171
173
|
[FontFamily.SANS]: {
|
|
@@ -77,7 +77,10 @@ var SelectInputVariant = /* @__PURE__ */ function(SelectInputVariant) {
|
|
|
77
77
|
}({});
|
|
78
78
|
/** The field's width without `fillWidth` (no width token exists; the `MENU_MAX_WIDTH` precedent). */
|
|
79
79
|
/** The panel's widest list (Menu's maximum) and tallest list. */
|
|
80
|
-
/**
|
|
80
|
+
/**
|
|
81
|
+
* The panel is `border-box` with a hairline top and bottom, so its content box is two hairlines
|
|
82
|
+
* shorter than the room Popover reports.
|
|
83
|
+
*/
|
|
81
84
|
/** Pause after typing before `onSearch` receives the term. */
|
|
82
85
|
var SELECT_SEARCH_DEBOUNCE_MS = 150;
|
|
83
86
|
/** Pause after which the typeahead prefix starts over. */
|
|
@@ -237,7 +240,7 @@ var GHOST_HOVER_CSS = "gx-SelectInput-GHOST_HOVER_CSS-g1oazqgn";
|
|
|
237
240
|
/**
|
|
238
241
|
* Height, start inset, gap and the end inset that reserves the caret zone (rung padding + caret +
|
|
239
242
|
* gap) per rung. Off-scale insets are sums of `space` tokens and the rung's caret px. The start inset
|
|
240
|
-
* subtracts the
|
|
243
|
+
* subtracts the hairline so the value starts on a whole pixel, the rung padding from the edge.
|
|
241
244
|
*/
|
|
242
245
|
var SELECT_INPUT_SIZE_TO_CSS_MAP = {
|
|
243
246
|
["X_SMALL"]: "gx-SelectInput-X_SMALL-xhmj664",
|
|
@@ -356,7 +359,7 @@ var ListFrame = /*#__PURE__*/ styled("div")({
|
|
|
356
359
|
});
|
|
357
360
|
/** A virtualized panel is exactly as wide as the field (absolute rows have no content width). */
|
|
358
361
|
var VIRTUALIZED_FRAME_CSS = "gx-SelectInput-VIRTUALIZED_FRAME_CSS-vz9a0uz";
|
|
359
|
-
/** The rows, 4px in from the panel's outer edge (the
|
|
362
|
+
/** The rows, 4px in from the panel's outer edge (the hairline counts toward the inset). */
|
|
360
363
|
var List = /*#__PURE__*/ styled("div")({
|
|
361
364
|
name: "List",
|
|
362
365
|
class: "gx-SelectInput-List-l1pxtftz",
|
package/dist/inputs/TagInput.js
CHANGED
|
@@ -72,8 +72,7 @@ var TAG_INPUT_PASTE_SEPARATORS = [
|
|
|
72
72
|
* hairline plus a 1px inset (`FIELD_FOCUS`), whenever the text input has focus. The hairline is drawn by `::before`
|
|
73
73
|
* over the frame's edge, in the frame's own `border-color` (which the variant, hover, focus and
|
|
74
74
|
* error rules set on a zero-width border), so the height is `chip + 2 × inset` at every device
|
|
75
|
-
* pixel ratio
|
|
76
|
-
* the line.
|
|
75
|
+
* pixel ratio.
|
|
77
76
|
*/
|
|
78
77
|
var Frame = /*#__PURE__*/ styled("div")({
|
|
79
78
|
name: "Frame",
|
|
@@ -65,12 +65,6 @@ var Root = /*#__PURE__*/ styled("div")({
|
|
|
65
65
|
* The field itself: the bordered element, so focus (`FIELD_FOCUS` on any focus: `border.focused` at 1px inside) and
|
|
66
66
|
* the resize handle sit on the frame.
|
|
67
67
|
*/
|
|
68
|
-
/**
|
|
69
|
-
* What the padding gives back for the transparent hairline border. Chrome draws a 0.5px border a
|
|
70
|
-
* whole pixel wide, so padding that subtracted only 0.5px left two rows a pixel taller than the
|
|
71
|
-
* box: the textarea scrolled that pixel and swallowed the wheel instead of the page. Subtracting
|
|
72
|
-
* the full pixel fits exactly in Chrome and leaves half a pixel spare where the border is 0.5px.
|
|
73
|
-
*/
|
|
74
68
|
var Control = /*#__PURE__*/ styled("textarea")({
|
|
75
69
|
name: "Control",
|
|
76
70
|
class: "gx-TextAreaInput-Control-cu0hnok",
|
|
@@ -96,7 +90,11 @@ var TEXT_AREA_INPUT_SIZE_TO_CSS_MAP = {
|
|
|
96
90
|
["LARGE"]: "gx-TextAreaInput-LARGE-l11gu90v",
|
|
97
91
|
["X_LARGE"]: "gx-TextAreaInput-X_LARGE-x53s0j8"
|
|
98
92
|
};
|
|
99
|
-
/**
|
|
93
|
+
/**
|
|
94
|
+
* The value's type per family and rung (Input's family map without its fixed height; mono shares the
|
|
95
|
+
* line heights). `--gx-textarea-content-width` is the default text width (Chrome's native `cols="20"`
|
|
96
|
+
* width for that font), fixed so Safari, whose native textarea is wider, draws the same field.
|
|
97
|
+
*/
|
|
100
98
|
var TEXT_AREA_INPUT_FAMILY_TO_SIZE_CSS_MAP = {
|
|
101
99
|
[FontFamily.SANS]: {
|
|
102
100
|
["X_SMALL"]: "gx-TextAreaInput-X_SMALL-xcocpoc",
|
|
@@ -52,7 +52,7 @@ var ToggleInputVariant = /* @__PURE__ */ function(ToggleInputVariant) {
|
|
|
52
52
|
ToggleInputVariant["TERTIARY"] = "TERTIARY";
|
|
53
53
|
return ToggleInputVariant;
|
|
54
54
|
}({});
|
|
55
|
-
/** The radiogroup. With the
|
|
55
|
+
/** The radiogroup. With the 1px border and 1px padding, segments start 2px inside the outer edge. */
|
|
56
56
|
var Track = /*#__PURE__*/ styled("div")({
|
|
57
57
|
name: "Track",
|
|
58
58
|
class: "gx-ToggleInput-Track-t1t8zlu",
|
|
@@ -97,7 +97,12 @@ var SEGMENT_INTERACTIVE_CSS = "gx-ToggleInput-SEGMENT_INTERACTIVE_CSS-s169tnuo";
|
|
|
97
97
|
var SEGMENT_DISABLED_CSS = "gx-ToggleInput-SEGMENT_DISABLED_CSS-svloi0q";
|
|
98
98
|
/** A read-only group: no hover, no pointer. */
|
|
99
99
|
var SEGMENT_READ_ONLY_CSS = "gx-ToggleInput-SEGMENT_READ_ONLY_CSS-scgck5z";
|
|
100
|
-
/**
|
|
100
|
+
/**
|
|
101
|
+
* 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 track's inner height, not
|
|
103
|
+
* `aspect-ratio`: Safari sizes an inline-flex track from an aspect-ratio item's pre-stretch width,
|
|
104
|
+
* so the stretched segments overflowed the track and the last one was clipped.
|
|
105
|
+
*/
|
|
101
106
|
var SEGMENT_ICON_ONLY_CSS = "gx-ToggleInput-SEGMENT_ICON_ONLY_CSS-snqdq0p";
|
|
102
107
|
/** The Field ToggleInput renders for its own `label` / `error` uses the same rung. */
|
|
103
108
|
var TOGGLE_INPUT_SIZE_TO_FIELD_SIZE_MAP = {
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
/** @internal The DLS hairline width, for frames that draw or subtract it in `calc()`. */
|
|
2
|
-
export declare const HAIRLINE_WIDTH = "0.5px";
|
|
3
1
|
/** @internal The surface set a field frame rests on (the values of every input's `variant`). */
|
|
4
2
|
export declare enum FieldSurface {
|
|
5
3
|
/** `background.base` fill. */
|
|
@@ -12,7 +12,7 @@ import { t } from "../../theme/tokens/t.js";
|
|
|
12
12
|
* re-declaring the rules. They are deliberately **not** `css` classes. The stylesheet lists a
|
|
13
13
|
* module's CSS after the CSS of the modules it imports (`scripts/css-order.mjs`), so a class
|
|
14
14
|
* declared here would land *before* every component's `styled` Root; the Root's own
|
|
15
|
-
* `border:
|
|
15
|
+
* `border: 1px solid transparent`, `display: inline-flex` and `cursor: text` would then win over
|
|
16
16
|
* the fill, the hairline, `fillWidth` and the disabled cursor at equal specificity. Interpolating
|
|
17
17
|
* keeps each class where the component declares it, so the cascade order is unchanged.
|
|
18
18
|
*
|
|
@@ -20,8 +20,6 @@ import { t } from "../../theme/tokens/t.js";
|
|
|
20
20
|
* `<COMPONENT>_VARIANT_TO_CSS_MAP: Record<<Component>Variant, string>` of `css` blocks whose bodies
|
|
21
21
|
* are these fragments, keyed through `FieldSurface`.
|
|
22
22
|
*/
|
|
23
|
-
/** @internal The DLS hairline width, for frames that draw or subtract it in `calc()`. */
|
|
24
|
-
var HAIRLINE_WIDTH = "0.5px";
|
|
25
23
|
/** @internal The surface set a field frame rests on (the values of every input's `variant`). */
|
|
26
24
|
var FieldSurface = /* @__PURE__ */ function(FieldSurface) {
|
|
27
25
|
/** `background.base` fill. */
|
|
@@ -61,4 +59,4 @@ var FIELD_DISABLED = "cursor: not-allowed;";
|
|
|
61
59
|
/** @internal Stretch to the parent's width (the frame, and the `Field` wrapper when there is one). */
|
|
62
60
|
var FIELD_FILL_WIDTH = "display: flex; width: 100%;";
|
|
63
61
|
//#endregion
|
|
64
|
-
export { FIELD_DISABLED, FIELD_ERROR, FIELD_FILL_WIDTH, FIELD_GHOST_REST, FIELD_HOVER, FIELD_SURFACE_TO_REST_MAP, FieldSurface
|
|
62
|
+
export { FIELD_DISABLED, FIELD_ERROR, FIELD_FILL_WIDTH, FIELD_GHOST_REST, FIELD_HOVER, FIELD_SURFACE_TO_REST_MAP, FieldSurface };
|
package/dist/layout/Box.d.ts
CHANGED
package/dist/layout/Divider.js
CHANGED
|
@@ -6,7 +6,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
6
6
|
import { cx } from "@linaria/core";
|
|
7
7
|
//#region src/layout/Divider.tsx
|
|
8
8
|
/**
|
|
9
|
-
* A
|
|
9
|
+
* A 1px hairline rule that separates content. Replaces 1.x `HorizontalDivider` and
|
|
10
10
|
* `VerticalDivider` (Constitution XII.4): `orientation` picks the direction.
|
|
11
11
|
*
|
|
12
12
|
* - Horizontal, no label: an `<hr>` (implicit `role="separator"`) that spans its parent's width.
|
package/dist/menu/Menu.js
CHANGED
|
@@ -66,7 +66,10 @@ var MenuItemVariant = /* @__PURE__ */ function(MenuItemVariant) {
|
|
|
66
66
|
return MenuItemVariant;
|
|
67
67
|
}({});
|
|
68
68
|
/** Narrowest and widest list (no width token exists; the `TOOLTIP_MAX_WIDTH` precedent). */
|
|
69
|
-
/**
|
|
69
|
+
/**
|
|
70
|
+
* The panel is `border-box` with a hairline top and bottom, so its content box is two hairlines
|
|
71
|
+
* shorter than the room Popover reports.
|
|
72
|
+
*/
|
|
70
73
|
/** Pointer rest before a submenu opens, or before an open one closes (a behavior constant, not motion). */
|
|
71
74
|
var MENU_SUBMENU_HOVER_DELAY_MS = 150;
|
|
72
75
|
/** Pause after which the typeahead prefix starts over. */
|
package/dist/navigation/Tabs.js
CHANGED
|
@@ -56,7 +56,6 @@ var TabsSize = /* @__PURE__ */ function(TabsSize) {
|
|
|
56
56
|
TabsSize["LARGE"] = "LARGE";
|
|
57
57
|
return TabsSize;
|
|
58
58
|
}({});
|
|
59
|
-
/** The hairline width; written out because the bar draws one edge only. */
|
|
60
59
|
/** Sub-pixel slack when comparing measured widths. */
|
|
61
60
|
var FIT_EPSILON_PX = .5;
|
|
62
61
|
/** The root block: bar, then panel (a horizontal bar with no panel fills the root's height). */
|
package/dist/styles/mixins.d.ts
CHANGED
|
@@ -3,7 +3,14 @@
|
|
|
3
3
|
* Interpolate it first in a template so the rules after it (a border, a background) win.
|
|
4
4
|
*/
|
|
5
5
|
export declare const INTERACTIVE_RESET = "appearance: none; background: none; border: 0; padding: 0; margin: 0; font: inherit; color: inherit; cursor: pointer;";
|
|
6
|
-
/**
|
|
6
|
+
/**
|
|
7
|
+
* The DLS hairline width: 1px. Chrome rounds a 0.5px border up to 1px at every pixel density
|
|
8
|
+
* while Safari draws it at 0.5px on Retina, so a 0.5px hairline looked and laid out differently
|
|
9
|
+
* in each; 1px is the same line, and the same layout, in every engine. Use it wherever a frame
|
|
10
|
+
* draws one edge or subtracts its border in `calc()`.
|
|
11
|
+
*/
|
|
12
|
+
export declare const HAIRLINE_WIDTH = "1px";
|
|
13
|
+
/** The DLS hairline: a `HAIRLINE_WIDTH` `border.primary` border on every side. */
|
|
7
14
|
export declare const HAIRLINE_BORDER: string;
|
|
8
15
|
/**
|
|
9
16
|
* The focus treatment: a `1px` `border.focused` outline on keyboard focus only (a neutral one step
|
package/dist/styles/mixins.js
CHANGED
|
@@ -23,8 +23,15 @@ import { t } from "../theme/tokens/t.js";
|
|
|
23
23
|
* Interpolate it first in a template so the rules after it (a border, a background) win.
|
|
24
24
|
*/
|
|
25
25
|
var INTERACTIVE_RESET = `appearance: none; background: none; border: 0; padding: 0; margin: 0; font: inherit; color: inherit; cursor: pointer;`;
|
|
26
|
-
/**
|
|
27
|
-
|
|
26
|
+
/**
|
|
27
|
+
* The DLS hairline width: 1px. Chrome rounds a 0.5px border up to 1px at every pixel density
|
|
28
|
+
* while Safari draws it at 0.5px on Retina, so a 0.5px hairline looked and laid out differently
|
|
29
|
+
* in each; 1px is the same line, and the same layout, in every engine. Use it wherever a frame
|
|
30
|
+
* draws one edge or subtracts its border in `calc()`.
|
|
31
|
+
*/
|
|
32
|
+
var HAIRLINE_WIDTH = "1px";
|
|
33
|
+
/** The DLS hairline: a `HAIRLINE_WIDTH` `border.primary` border on every side. */
|
|
34
|
+
var HAIRLINE_BORDER = `border: 1px solid ${t.color.border.primary};`;
|
|
28
35
|
/**
|
|
29
36
|
* The focus treatment: a `1px` `border.focused` outline on keyboard focus only (a neutral one step
|
|
30
37
|
* stronger than `border.hovered`). Components never write their own
|
|
@@ -57,4 +64,4 @@ var VISUALLY_HIDDEN = `position: absolute; width: 1px; height: 1px; padding: 0;
|
|
|
57
64
|
*/
|
|
58
65
|
var REDUCED_MOTION = `@media (prefers-reduced-motion: reduce) { transition: none !important; animation: none !important; }`;
|
|
59
66
|
//#endregion
|
|
60
|
-
export { FIELD_FOCUS, FOCUS_RING, HAIRLINE_BORDER, INTERACTIVE_RESET, REDUCED_MOTION, TRUNCATE, VISUALLY_HIDDEN };
|
|
67
|
+
export { FIELD_FOCUS, FOCUS_RING, HAIRLINE_BORDER, HAIRLINE_WIDTH, INTERACTIVE_RESET, REDUCED_MOTION, TRUNCATE, VISUALLY_HIDDEN };
|