@gooddata/sdk-ui-kit 11.61.0-alpha.1 → 11.61.0-alpha.3

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.
Files changed (36) hide show
  1. package/esm/@ui/@types/icon.d.ts +1 -1
  2. package/esm/@ui/@types/icon.d.ts.map +1 -1
  3. package/esm/@ui/UiConfigEditor/UiConfigEditor.d.ts.map +1 -1
  4. package/esm/@ui/UiConfigEditor/UiConfigEditor.js +2 -3
  5. package/esm/@ui/UiConfigEditor/configEditorHighlighting.d.ts +5 -3
  6. package/esm/@ui/UiConfigEditor/configEditorHighlighting.d.ts.map +1 -1
  7. package/esm/@ui/UiConfigEditor/configEditorHighlighting.js +4 -13
  8. package/esm/@ui/UiIcon/icons.d.ts.map +1 -1
  9. package/esm/@ui/UiIcon/icons.js +8 -0
  10. package/esm/@ui/UiResizableSidebar/useUiResizableSidebarState.js +1 -1
  11. package/esm/@ui/hooks/useCloseOnOutsideClick.d.ts +1 -1
  12. package/esm/@ui/hooks/useCloseOnOutsideClick.js +1 -1
  13. package/esm/index.d.ts +3 -2
  14. package/esm/index.d.ts.map +1 -1
  15. package/esm/index.js +3 -2
  16. package/esm/measureNumberFormat/customFormatDialog/FormatInput.js +2 -2
  17. package/esm/sdk-ui-kit.d.ts +51 -2
  18. package/esm/syntaxHighlightingInput/SyntaxHighlightingInput.d.ts +18 -1
  19. package/esm/syntaxHighlightingInput/SyntaxHighlightingInput.d.ts.map +1 -1
  20. package/esm/syntaxHighlightingInput/SyntaxHighlightingInput.js +12 -1
  21. package/esm/syntaxHighlightingInput/defaultHighlightStyle.d.ts +6 -0
  22. package/esm/syntaxHighlightingInput/defaultHighlightStyle.d.ts.map +1 -0
  23. package/esm/syntaxHighlightingInput/defaultHighlightStyle.js +15 -0
  24. package/esm/syntaxHighlightingInput/hooks/useCodemirror.d.ts +3 -1
  25. package/esm/syntaxHighlightingInput/hooks/useCodemirror.d.ts.map +1 -1
  26. package/esm/syntaxHighlightingInput/hooks/useCodemirror.js +10 -15
  27. package/package.json +11 -11
  28. package/src/@ui/UiConfigEditor/UiConfigEditor.scss +28 -35
  29. package/src/@ui/UiControlButton/UiControlButton.scss +0 -2
  30. package/styles/css/UiControlButton.css +0 -2
  31. package/styles/css/UiControlButton.css.map +1 -1
  32. package/styles/css/main.css +49 -59
  33. package/styles/css/main.css.map +1 -1
  34. package/styles/css/syntaxHighlightingInput.css +33 -33
  35. package/styles/css/syntaxHighlightingInput.css.map +1 -1
  36. package/styles/scss/syntaxHighlightingInput.scss +32 -30
@@ -1,11 +1,13 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import cx from "classnames";
3
+ import { defaultSyntaxHighlightStyle } from "./defaultHighlightStyle.js";
3
4
  import { useCodemirror } from "./hooks/useCodemirror.js";
4
5
  /**
5
6
  * @internal
6
7
  */
7
- export function SyntaxHighlightingInput({ value, label, placeholder, autocompletion, onApi, onChange, onCursor, onKeyDown, onCompletion, onFocus, onBlur, className, beforeExtensions = [], extensions = [], disabled, externalChangeSelection, }) {
8
+ export function SyntaxHighlightingInput({ value, highlightStyle, label, placeholder, autocompletion, onApi, onChange, onCursor, onKeyDown, onCompletion, onFocus, onBlur, className, beforeExtensions = [], extensions = [], disabled, externalChangeSelection, }) {
8
9
  const { editorRef } = useCodemirror({
10
+ highlightStyle,
9
11
  placeholderText: placeholder,
10
12
  autocompletion,
11
13
  label,
@@ -24,3 +26,12 @@ export function SyntaxHighlightingInput({ value, label, placeholder, autocomplet
24
26
  });
25
27
  return _jsx("div", { className: cx(className, "gd-input-syntax-highlighting-input"), ref: editorRef });
26
28
  }
29
+ /**
30
+ * {@link SyntaxHighlightingInput} with the standard input frame, a fixed height and the default
31
+ * light token palette.
32
+ *
33
+ * @internal
34
+ */
35
+ export function DefaultSyntaxHighlightingInput({ className, highlightStyle = defaultSyntaxHighlightStyle, ...props }) {
36
+ return (_jsx(SyntaxHighlightingInput, { ...props, highlightStyle: highlightStyle, className: cx(className, "gd-input-syntax-highlighting-input--default-chrome") }));
37
+ }
@@ -0,0 +1,6 @@
1
+ import { HighlightStyle } from "@codemirror/language";
2
+ /**
3
+ * @internal
4
+ */
5
+ export declare const defaultSyntaxHighlightStyle: HighlightStyle;
6
+ //# sourceMappingURL=defaultHighlightStyle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"defaultHighlightStyle.d.ts","sourceRoot":"","sources":["../../src/syntaxHighlightingInput/defaultHighlightStyle.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAGtD;;GAEG;AACH,eAAO,MAAM,2BAA2B,gBAQtC,CAAC"}
@@ -0,0 +1,15 @@
1
+ // (C) 2025-2026 GoodData Corporation
2
+ import { HighlightStyle } from "@codemirror/language";
3
+ import { tags as t } from "@lezer/highlight";
4
+ /**
5
+ * @internal
6
+ */
7
+ export const defaultSyntaxHighlightStyle = HighlightStyle.define([
8
+ { tag: t.punctuation, color: "#94a1ad" },
9
+ { tag: t.bracket, color: "#94a1ad" },
10
+ { tag: t.variableName, color: "#464e56" },
11
+ { tag: t.string, color: "#a11" },
12
+ { tag: t.special(t.variableName), color: "#13b1e2", fontWeight: "bold" },
13
+ { tag: t.standard(t.variableName), color: "#00c18e", fontWeight: "bold" },
14
+ { tag: t.keyword, color: "#ab55a3", fontWeight: "bold" },
15
+ ]);
@@ -1,9 +1,11 @@
1
+ import { type HighlightStyle } from "@codemirror/language";
1
2
  import { type Extension } from "@codemirror/state";
2
3
  import { EditorView } from "@codemirror/view";
3
4
  import { type ExternalChangeSelection } from "./useCodemirrorChange.js";
4
5
  import { type IUseEventHandlersProps } from "./useEventHandlers.js";
5
6
  export interface IUseCodemirrorProps extends IUseEventHandlersProps {
6
7
  value?: string;
8
+ highlightStyle: HighlightStyle;
7
9
  label?: string;
8
10
  placeholderText?: string;
9
11
  disabled?: boolean;
@@ -18,7 +20,7 @@ export interface IUseCodemirrorProps extends IUseEventHandlersProps {
18
20
  /** Where the selection goes when the controlled value is replaced from outside. */
19
21
  externalChangeSelection?: ExternalChangeSelection;
20
22
  }
21
- export declare function useCodemirror({ value, label, disabled, autocompletion, placeholderText, extensions, beforeExtensions, onCompletion, onApi, onKeyDown, onCursor, onChange, onBlur, onFocus, externalChangeSelection, }: IUseCodemirrorProps): {
23
+ export declare function useCodemirror({ value, highlightStyle, label, disabled, autocompletion, placeholderText, extensions, beforeExtensions, onCompletion, onApi, onKeyDown, onCursor, onChange, onBlur, onFocus, externalChangeSelection, }: IUseCodemirrorProps): {
22
24
  editorRef: import("react").RefObject<HTMLDivElement | null>;
23
25
  viewRef: import("react").RefObject<EditorView | null>;
24
26
  };
@@ -1 +1 @@
1
- {"version":3,"file":"useCodemirror.d.ts","sourceRoot":"","sources":["../../../src/syntaxHighlightingInput/hooks/useCodemirror.ts"],"names":[],"mappings":"AAKA,OAAO,EAAe,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAChE,OAAO,EAAE,UAAU,EAAiB,MAAM,kBAAkB,CAAC;AAK7D,OAAO,EAAE,KAAK,uBAAuB,EAAuB,MAAM,0BAA0B,CAAC;AAK7F,OAAO,EAAE,KAAK,sBAAsB,EAAoB,MAAM,uBAAuB,CAAC;AAatF,MAAM,WAAW,mBAAoB,SAAQ,sBAAsB;IAC/D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,cAAc,CAAC,EAAE;QACb,WAAW,CAAC,EAAE,OAAO,CAAC;QACtB,UAAU,CAAC,EAAE,OAAO,CAAC;QACrB,eAAe,CAAC,EAAE,MAAM,CAAC;KAC5B,CAAC;IACF,gBAAgB,CAAC,EAAE,SAAS,EAAE,CAAC;IAC/B,UAAU,CAAC,EAAE,SAAS,EAAE,CAAC;IACzB,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI,KAAK,IAAI,CAAC;IAC1C,mFAAmF;IACnF,uBAAuB,CAAC,EAAE,uBAAuB,CAAC;CACrD;AAED,wBAAgB,aAAa,CAAC,EAC1B,KAAU,EACV,KAAK,EACL,QAAQ,EACR,cAAc,EACd,eAAe,EACf,UAAU,EACV,gBAAgB,EAChB,YAAY,EACZ,KAAK,EACL,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,OAAO,EACP,uBAAuB,GAC1B,EAAE,mBAAmB;;;EAkFrB"}
1
+ {"version":3,"file":"useCodemirror.d.ts","sourceRoot":"","sources":["../../../src/syntaxHighlightingInput/hooks/useCodemirror.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,cAAc,EAAuC,MAAM,sBAAsB,CAAC;AAChG,OAAO,EAA4B,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC7E,OAAO,EAAE,UAAU,EAAiB,MAAM,kBAAkB,CAAC;AAI7D,OAAO,EAAE,KAAK,uBAAuB,EAAuB,MAAM,0BAA0B,CAAC;AAK7F,OAAO,EAAE,KAAK,sBAAsB,EAAoB,MAAM,uBAAuB,CAAC;AAEtF,MAAM,WAAW,mBAAoB,SAAQ,sBAAsB;IAC/D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,cAAc,EAAE,cAAc,CAAC;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,cAAc,CAAC,EAAE;QACb,WAAW,CAAC,EAAE,OAAO,CAAC;QACtB,UAAU,CAAC,EAAE,OAAO,CAAC;QACrB,eAAe,CAAC,EAAE,MAAM,CAAC;KAC5B,CAAC;IACF,gBAAgB,CAAC,EAAE,SAAS,EAAE,CAAC;IAC/B,UAAU,CAAC,EAAE,SAAS,EAAE,CAAC;IACzB,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI,KAAK,IAAI,CAAC;IAC1C,mFAAmF;IACnF,uBAAuB,CAAC,EAAE,uBAAuB,CAAC;CACrD;AAED,wBAAgB,aAAa,CAAC,EAC1B,KAAU,EACV,cAAc,EACd,KAAK,EACL,QAAQ,EACR,cAAc,EACd,eAAe,EACf,UAAU,EACV,gBAAgB,EAChB,YAAY,EACZ,KAAK,EACL,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,OAAO,EACP,uBAAuB,GAC1B,EAAE,mBAAmB;;;EAyFrB"}
@@ -1,9 +1,8 @@
1
1
  // (C) 2025-2026 GoodData Corporation
2
2
  import { useEffect, useRef } from "react";
3
- import { HighlightStyle, bracketMatching, syntaxHighlighting } from "@codemirror/language";
4
- import { EditorState } from "@codemirror/state";
3
+ import { bracketMatching, syntaxHighlighting } from "@codemirror/language";
4
+ import { Compartment, EditorState } from "@codemirror/state";
5
5
  import { EditorView, drawSelection } from "@codemirror/view";
6
- import { tags as t } from "@lezer/highlight";
7
6
  import { useAutocompletion } from "./useAutocompletion.js";
8
7
  import { useChangeHandler } from "./useChangeHandler.js";
9
8
  import { useCodemirrorChange } from "./useCodemirrorChange.js";
@@ -12,19 +11,10 @@ import { useCodemirrorEvents } from "./useCodemirrorEvents.js";
12
11
  import { useCodemirrorKeymap } from "./useCodemirrorKeymap.js";
13
12
  import { useCodemirrorOptions } from "./useCodemirrorOptions.js";
14
13
  import { useEventHandlers } from "./useEventHandlers.js";
15
- // Custom syntax highlighting
16
- const customHighlightStyle = HighlightStyle.define([
17
- { tag: t.punctuation, color: "#94a1ad" },
18
- { tag: t.bracket, color: "#94a1ad" },
19
- { tag: t.variableName, color: "#464e56" },
20
- { tag: t.string, color: "#a11" },
21
- { tag: t.special(t.variableName), color: "#13b1e2", fontWeight: "bold" },
22
- { tag: t.standard(t.variableName), color: "#00c18e", fontWeight: "bold" },
23
- { tag: t.keyword, color: "#ab55a3", fontWeight: "bold" },
24
- ]);
25
- export function useCodemirror({ value = "", label, disabled, autocompletion, placeholderText, extensions, beforeExtensions, onCompletion, onApi, onKeyDown, onCursor, onChange, onBlur, onFocus, externalChangeSelection, }) {
14
+ export function useCodemirror({ value = "", highlightStyle, label, disabled, autocompletion, placeholderText, extensions, beforeExtensions, onCompletion, onApi, onKeyDown, onCursor, onChange, onBlur, onFocus, externalChangeSelection, }) {
26
15
  const editorRef = useRef(null);
27
16
  const viewRef = useRef(null);
17
+ const highlightCompartmentRef = useRef(new Compartment());
28
18
  const { handleCompletion, handleChange, handleKeyDown, handleCursor, handleFocus, handleBlur } = useEventHandlers({
29
19
  onChange,
30
20
  onKeyDown,
@@ -67,7 +57,7 @@ export function useCodemirror({ value = "", label, disabled, autocompletion, pla
67
57
  domEventsExtension,
68
58
  ...(beforeExtensions ?? []),
69
59
  keymapExtension,
70
- syntaxHighlighting(customHighlightStyle),
60
+ highlightCompartmentRef.current.of(syntaxHighlighting(highlightStyle)),
71
61
  EditorView.lineWrapping,
72
62
  disableAutofocusExtension,
73
63
  changeHandlerExtension,
@@ -89,6 +79,11 @@ export function useCodemirror({ value = "", label, disabled, autocompletion, pla
89
79
  view.destroy();
90
80
  };
91
81
  }, []); // oxlint-disable-line react-hooks/exhaustive-deps
82
+ useEffect(() => {
83
+ viewRef.current?.dispatch({
84
+ effects: highlightCompartmentRef.current.reconfigure(syntaxHighlighting(highlightStyle)),
85
+ });
86
+ }, [highlightStyle]);
92
87
  // Handle external value changes
93
88
  useCodemirrorChange(viewRef, value, externalChangeSelection);
94
89
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gooddata/sdk-ui-kit",
3
- "version": "11.61.0-alpha.1",
3
+ "version": "11.61.0-alpha.3",
4
4
  "description": "GoodData SDK - UI Building Components",
5
5
  "license": "MIT",
6
6
  "author": "GoodData Corporation",
@@ -79,11 +79,11 @@
79
79
  "unified": "^11.0.5",
80
80
  "uuid": "11.1.1",
81
81
  "yaml": "2.8.3",
82
- "@gooddata/sdk-backend-spi": "11.61.0-alpha.1",
83
- "@gooddata/sdk-ui": "11.61.0-alpha.1",
84
- "@gooddata/sdk-ui-theme-provider": "11.61.0-alpha.1",
85
- "@gooddata/util": "11.61.0-alpha.1",
86
- "@gooddata/sdk-model": "11.61.0-alpha.1"
82
+ "@gooddata/sdk-backend-spi": "11.61.0-alpha.3",
83
+ "@gooddata/sdk-model": "11.61.0-alpha.3",
84
+ "@gooddata/sdk-ui-theme-provider": "11.61.0-alpha.3",
85
+ "@gooddata/sdk-ui": "11.61.0-alpha.3",
86
+ "@gooddata/util": "11.61.0-alpha.3"
87
87
  },
88
88
  "devDependencies": {
89
89
  "@microsoft/api-documenter": "7.30.16",
@@ -128,11 +128,11 @@
128
128
  "typescript": "7.0.2",
129
129
  "vitest": "4.1.11",
130
130
  "vitest-dom": "0.1.1",
131
- "@gooddata/eslint-config": "11.61.0-alpha.1",
132
- "@gooddata/oxlint-config": "11.61.0-alpha.1",
133
- "@gooddata/reference-workspace": "11.61.0-alpha.1",
134
- "@gooddata/stylelint-config": "11.61.0-alpha.1",
135
- "@gooddata/sdk-backend-mockingbird": "11.61.0-alpha.1"
131
+ "@gooddata/eslint-config": "11.61.0-alpha.3",
132
+ "@gooddata/oxlint-config": "11.61.0-alpha.3",
133
+ "@gooddata/reference-workspace": "11.61.0-alpha.3",
134
+ "@gooddata/sdk-backend-mockingbird": "11.61.0-alpha.3",
135
+ "@gooddata/stylelint-config": "11.61.0-alpha.3"
136
136
  },
137
137
  "peerDependencies": {
138
138
  "react": "^18.0.0 || ^19.0.0",
@@ -65,13 +65,9 @@
65
65
  min-height: 0;
66
66
  }
67
67
 
68
- /**
69
- * The shared syntax-highlighting input renders its own wrapper between this element and
70
- * `.cm-editor`, and that wrapper is a plain block. Without making it part of the flex column the
71
- * `flex` on `.cm-editor` below is inert, so a long document grows the editor without bound and
72
- * the surrounding dialog scrolls instead of the editor scrolling inside itself.
73
- */
74
- &__editor > * {
68
+ // The input's wrapper sits between `__editor` and `.cm-editor`. It joins the flex column, or the
69
+ // `flex` on `.cm-editor` is inert and a long document grows the dialog instead of scrolling.
70
+ &__input {
75
71
  display: flex;
76
72
  flex: 1;
77
73
  flex-direction: column;
@@ -79,11 +75,6 @@
79
75
  }
80
76
 
81
77
  /**
82
- * The shared syntax-highlighting input ships a fixed `height: 100px` on `.cm-editor`, scoped
83
- * under its own `.gd-input-syntax-highlighting-input` class. That stylesheet is bundled after
84
- * this one, so at equal specificity it would win — hence the repeated block class, which buys a
85
- * third class without changing what is matched.
86
- *
87
78
  * Height comes from `rows`, while still growing to fill a taller parent, so the editor works
88
79
  * both standalone and as a field in a fixed-height dialog.
89
80
  *
@@ -91,28 +82,33 @@
91
82
  * for theme variables, each of which needs a specification in sdk-ui-theme-provider. This one
92
83
  * only carries the `rows` prop into the stylesheet and is not something a theme should set.
93
84
  */
94
- &.gd-ui-kit-config-editor &__editor .cm-editor {
85
+ &__input .cm-editor {
95
86
  // A definite height rather than a floor, so the scroller inside always has something to
96
87
  // scroll against: with `min-height` alone a long document grows the editor without bound in
97
88
  // any parent that is not itself height-constrained, and the page scrolls instead.
98
89
  //
99
- // `rows` whole lines, plus the 8px of padding CodeMirror puts around its content and the 1px
100
- // border on each side (the box is border-box). Sizing to whole lines keeps a line from being
101
- // clipped through the middle, which looks unfinished and makes a screenshot of it turn on how
102
- // half a glyph happens to be antialiased.
90
+ // `rows` whole lines, plus the 8px of padding CodeMirror puts around its content. Sizing to
91
+ // whole lines keeps a line from being clipped through the middle, which looks unfinished and
92
+ // makes a screenshot of it turn on how half a glyph happens to be antialiased.
103
93
  height: calc(var(--config-editor-rows, 12) * var(--config-editor-line-height) * 1em + 8px);
104
94
  // Still grows to take the space when a parent does constrain and offer it, which is what a
105
95
  // fixed-height dialog does.
106
96
  flex: 1 1 auto;
107
97
  min-height: 0;
108
- // The frame and its corners now belong to the wrapper, so the shared input's own border and
109
- // radius would draw a second box inside it.
110
- border: none;
111
- border-radius: 0;
112
- // The standard input inner shadow, falling from the toolbar onto the code area. It replaces
113
- // the shared input's own (which doubles as its focus styling — here focus is shown on the
114
- // whole field instead), with the design's slightly softer blur.
98
+ line-height: normal;
99
+ color: variables.$gd-medium-gray;
100
+ background: variables.$gd-color-white;
101
+ font-size: 14px;
102
+ // Tooltips mount inside `.cm-editor` but outside `.cm-scroller`, so they inherit this font.
103
+ font-family: monospace;
104
+ font-weight: 200;
105
+ // The standard input inner shadow, falling from the toolbar onto the code area. Focus is
106
+ // shown on the whole field instead, with the design's slightly softer blur.
115
107
  box-shadow: inset 0 1px 2px 0 color.adjust(variables.$gd-input-text-box-shadow-color, $alpha: -0.85);
108
+
109
+ &.cm-focused {
110
+ outline: none;
111
+ }
116
112
  }
117
113
 
118
114
  // Focus is shown on the whole field instead, so the toolbar is visibly part of what is focused.
@@ -121,12 +117,14 @@
121
117
  }
122
118
 
123
119
  // Pinned rather than left as `normal`, so the height above is exactly `rows` lines.
124
- &__editor .cm-content {
120
+ // `--config-editor-font-family` lets a host swap the code font, like `--config-editor-rows`.
121
+ &__input .cm-content {
125
122
  line-height: var(--config-editor-line-height);
123
+ font-family: var(--config-editor-font-family, monospace);
126
124
  }
127
125
 
128
126
  // Scrolling past the end of a long config should not start scrolling the dialog behind it.
129
- &__editor .cm-scroller {
127
+ &__input .cm-scroller {
130
128
  overflow: auto;
131
129
  overscroll-behavior: contain;
132
130
  }
@@ -140,27 +138,22 @@
140
138
  * The repeated block class is for specificity: CodeMirror's own rule is `.cm-editor.cm-light
141
139
  * .cm-gutters`, which would otherwise win.
142
140
  */
143
- &.gd-ui-kit-config-editor &__editor .cm-gutters {
141
+ &.gd-ui-kit-config-editor &__input .cm-gutters {
144
142
  border-right: none;
145
143
  background: transparent;
146
144
  color: var(--gd-palette-complementary-6);
147
145
  }
148
146
 
149
- &.gd-ui-kit-config-editor &__editor .cm-activeLineGutter {
147
+ &.gd-ui-kit-config-editor &__input .cm-activeLineGutter {
150
148
  background: transparent;
151
149
  color: var(--gd-palette-complementary-7);
152
150
  }
153
151
 
154
- // Muted surface for a value that cannot be edited. Applied to the whole field, toolbar included,
155
- // now that they share one frame — tinting only the code area would leave a lighter strip on top.
156
- // The gutter is transparent, so it takes the same muted surface by itself.
152
+ // Muted surface for a value that cannot be edited. Only the toolbar takes it: the code area keeps
153
+ // its own surface.
157
154
  &--disabled,
158
155
  &--readOnly {
159
156
  background: var(--gd-palette-complementary-1);
160
-
161
- .cm-editor {
162
- background: transparent;
163
- }
164
157
  }
165
158
 
166
159
  &--disabled {
@@ -205,8 +205,6 @@ $drag-handle-icon: "data:image/svg+xml,%3Csvg width='7' height='26' viewBox='0 0
205
205
  position: relative;
206
206
  z-index: 1;
207
207
  display: flex;
208
- justify-content: center;
209
- height: 100%;
210
208
  flex-direction: column;
211
209
  min-width: 0;
212
210
  flex: 1 1 auto;
@@ -154,8 +154,6 @@
154
154
  position: relative;
155
155
  z-index: 1;
156
156
  display: flex;
157
- justify-content: center;
158
- height: 100%;
159
157
  flex-direction: column;
160
158
  min-width: 0;
161
159
  flex: 1 1 auto;
@@ -1 +1 @@
1
- {"version":3,"sourceRoot":"","sources":["../scss/Button/_variables.scss","../scss/mixins.scss","../../src/@ui/UiControlButton/UiControlButton.scss","../scss/variables.scss"],"names":[],"mappings":"AAIA;AAAA;AAAA;ACsHA;AA4DA;AC9KA;EAGI;EACA;EACA;EACA,aCuFc;EDtFd;EACA;EACA;EACA;EACA;EACA;;AAEA;EACI;;AAGJ;EAEI;EACA;EACA;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAIA;EACI,cFpCuB;;AEuC3B;EACI,YACI;;AAGJ;EACI;;AAMR;EACI;EACA;ED6IR,YD7LmC,uDC6LT;EAC1B;EACA;EACA;EACA;;ACzII;EACI;;AAGJ;EACI;;AAIR;EACI;;AAEA;EACI,cF1EuB;EE2EvB;;AAGJ;EACI;;AAIR;EACI;EACA,OCxCgB;EDyChB;;AAGJ;EACI;EACA,OC9BkB;ED+BlB;;AAGJ;EACI;;AAEA;EAGI;EACA;EACA;EACA;EACA;;AAMR;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;;AAGA;EACI;;AAGJ;EACI;EACA;EACA;;AAIJ;EACI;EACA;EACA;;AAIJ;EACI;EACA;EACA;EACA;;AAGJ;EACI;;AAGJ;EACI;EACA;EACA;;AAGA;EACI;EACA;EAEA;EACA;EACA;EACA;;AAMR;EACI;;AAIR;EACI;EACA;EACA;EACA;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGJ;EACI;EACA;EACA;EACA;;AAGJ;EACI;EACA,OC9LQ;ED+LR;EACA;EACA;EACA;;AAEA;AAAA;EAEI;;AAGJ;EACI;;AAIR;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA,OC5MQ;;AD8MR;EACI;EACA;EACA;EACA,aCvJK;EDwJL;EACA;EACA;EACA,OCnOW;EDoOX;;AAIR;EACI;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;AAAA;EAEI;;AAGJ;EACI","file":"UiControlButton.css"}
1
+ {"version":3,"sourceRoot":"","sources":["../scss/Button/_variables.scss","../scss/mixins.scss","../../src/@ui/UiControlButton/UiControlButton.scss","../scss/variables.scss"],"names":[],"mappings":"AAIA;AAAA;AAAA;ACsHA;AA4DA;AC9KA;EAGI;EACA;EACA;EACA,aCuFc;EDtFd;EACA;EACA;EACA;EACA;EACA;;AAEA;EACI;;AAGJ;EAEI;EACA;EACA;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAIA;EACI,cFpCuB;;AEuC3B;EACI,YACI;;AAGJ;EACI;;AAMR;EACI;EACA;ED6IR,YD7LmC,uDC6LT;EAC1B;EACA;EACA;EACA;;ACzII;EACI;;AAGJ;EACI;;AAIR;EACI;;AAEA;EACI,cF1EuB;EE2EvB;;AAGJ;EACI;;AAIR;EACI;EACA,OCxCgB;EDyChB;;AAGJ;EACI;EACA,OC9BkB;ED+BlB;;AAGJ;EACI;;AAEA;EAGI;EACA;EACA;EACA;EACA;;AAMR;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;;AAGA;EACI;;AAGJ;EACI;EACA;EACA;;AAIJ;EACI;EACA;EACA;;AAIJ;EACI;EACA;EACA;EACA;;AAGJ;EACI;;AAGJ;EACI;EACA;EACA;;AAGA;EACI;EACA;EAEA;EACA;EACA;EACA;;AAMR;EACI;;AAIR;EACI;EACA;EACA;EACA;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;;AAGJ;EACI;EACA;EACA;EACA;;AAGJ;EACI;EACA,OC5LQ;ED6LR;EACA;EACA;EACA;;AAEA;AAAA;EAEI;;AAGJ;EACI;;AAIR;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA,OC1MQ;;AD4MR;EACI;EACA;EACA;EACA,aCrJK;EDsJL;EACA;EACA;EACA,OCjOW;EDkOX;;AAIR;EACI;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;AAAA;EAEI;;AAGJ;EACI","file":"UiControlButton.css"}
@@ -1637,8 +1637,6 @@
1637
1637
  position: relative;
1638
1638
  z-index: 1;
1639
1639
  display: flex;
1640
- justify-content: center;
1641
- height: 100%;
1642
1640
  flex-direction: column;
1643
1641
  min-width: 0;
1644
1642
  flex: 1 1 auto;
@@ -4582,15 +4580,7 @@
4582
4580
  flex-direction: column;
4583
4581
  min-height: 0;
4584
4582
  }
4585
- .gd-ui-kit-config-editor {
4586
- /**
4587
- * The shared syntax-highlighting input renders its own wrapper between this element and
4588
- * `.cm-editor`, and that wrapper is a plain block. Without making it part of the flex column the
4589
- * `flex` on `.cm-editor` below is inert, so a long document grows the editor without bound and
4590
- * the surrounding dialog scrolls instead of the editor scrolling inside itself.
4591
- */
4592
- }
4593
- .gd-ui-kit-config-editor__editor > * {
4583
+ .gd-ui-kit-config-editor__input {
4594
4584
  display: flex;
4595
4585
  flex: 1;
4596
4586
  flex-direction: column;
@@ -4598,11 +4588,6 @@
4598
4588
  }
4599
4589
  .gd-ui-kit-config-editor {
4600
4590
  /**
4601
- * The shared syntax-highlighting input ships a fixed `height: 100px` on `.cm-editor`, scoped
4602
- * under its own `.gd-input-syntax-highlighting-input` class. That stylesheet is bundled after
4603
- * this one, so at equal specificity it would win — hence the repeated block class, which buys a
4604
- * third class without changing what is matched.
4605
- *
4606
4591
  * Height comes from `rows`, while still growing to fill a taller parent, so the editor works
4607
4592
  * both standalone and as a field in a fixed-height dialog.
4608
4593
  *
@@ -4611,21 +4596,29 @@
4611
4596
  * only carries the `rows` prop into the stylesheet and is not something a theme should set.
4612
4597
  */
4613
4598
  }
4614
- .gd-ui-kit-config-editor.gd-ui-kit-config-editor .gd-ui-kit-config-editor__editor .cm-editor {
4599
+ .gd-ui-kit-config-editor__input .cm-editor {
4615
4600
  height: calc(var(--config-editor-rows, 12) * var(--config-editor-line-height) * 1em + 8px);
4616
4601
  flex: 1 1 auto;
4617
4602
  min-height: 0;
4618
- border: none;
4619
- border-radius: 0;
4603
+ line-height: normal;
4604
+ color: var(--gd-palette-complementary-7-from-theme, #687581);
4605
+ background: var(--gd-palette-complementary-0, #fff);
4606
+ font-size: 14px;
4607
+ font-family: monospace;
4608
+ font-weight: 200;
4620
4609
  box-shadow: inset 0 1px 2px 0 rgba(31, 53, 74, 0.15);
4621
4610
  }
4611
+ .gd-ui-kit-config-editor__input .cm-editor.cm-focused {
4612
+ outline: none;
4613
+ }
4622
4614
  .gd-ui-kit-config-editor.gd-ui-kit-config-editor:has(.cm-editor.cm-focused) {
4623
4615
  border-color: var(--gd-palette-primary-base);
4624
4616
  }
4625
- .gd-ui-kit-config-editor__editor .cm-content {
4617
+ .gd-ui-kit-config-editor__input .cm-content {
4626
4618
  line-height: var(--config-editor-line-height);
4619
+ font-family: var(--config-editor-font-family, monospace);
4627
4620
  }
4628
- .gd-ui-kit-config-editor__editor .cm-scroller {
4621
+ .gd-ui-kit-config-editor__input .cm-scroller {
4629
4622
  overflow: auto;
4630
4623
  overscroll-behavior: contain;
4631
4624
  }
@@ -4640,21 +4633,18 @@
4640
4633
  * .cm-gutters`, which would otherwise win.
4641
4634
  */
4642
4635
  }
4643
- .gd-ui-kit-config-editor.gd-ui-kit-config-editor .gd-ui-kit-config-editor__editor .cm-gutters {
4636
+ .gd-ui-kit-config-editor.gd-ui-kit-config-editor .gd-ui-kit-config-editor__input .cm-gutters {
4644
4637
  border-right: none;
4645
4638
  background: transparent;
4646
4639
  color: var(--gd-palette-complementary-6);
4647
4640
  }
4648
- .gd-ui-kit-config-editor.gd-ui-kit-config-editor .gd-ui-kit-config-editor__editor .cm-activeLineGutter {
4641
+ .gd-ui-kit-config-editor.gd-ui-kit-config-editor .gd-ui-kit-config-editor__input .cm-activeLineGutter {
4649
4642
  background: transparent;
4650
4643
  color: var(--gd-palette-complementary-7);
4651
4644
  }
4652
4645
  .gd-ui-kit-config-editor--disabled, .gd-ui-kit-config-editor--readOnly {
4653
4646
  background: var(--gd-palette-complementary-1);
4654
4647
  }
4655
- .gd-ui-kit-config-editor--disabled .cm-editor, .gd-ui-kit-config-editor--readOnly .cm-editor {
4656
- background: transparent;
4657
- }
4658
4648
  .gd-ui-kit-config-editor--disabled {
4659
4649
  opacity: 0.7;
4660
4650
  }
@@ -9050,7 +9040,29 @@ textarea.gd-input, textarea.input-text {
9050
9040
  white-space: nowrap;
9051
9041
  }
9052
9042
 
9053
- .gd-input-syntax-highlighting-input .cm-editor {
9043
+ .gd-input-syntax-highlighting-input .cm-editor .cm-matchingBracket {
9044
+ font-weight: bold;
9045
+ color: var(--gd-palette-complementary-9, #000);
9046
+ background-color: var(--gd-palette-warning-dimmed, rgb(98.9019607843%, 90.5098039216%, 80%));
9047
+ }
9048
+ .gd-input-syntax-highlighting-input .cm-editor .cm-nonmatchingBracket {
9049
+ color: var(--gd-palette-error-base, #e54d42);
9050
+ }
9051
+ .gd-input-syntax-highlighting-input .cm-editor .cm-content {
9052
+ caret-color: transparent;
9053
+ }
9054
+ .gd-input-syntax-highlighting-input .cm-editor .cm-cursor,
9055
+ .gd-input-syntax-highlighting-input .cm-editor .cm-dropCursor {
9056
+ border-left-color: var(--gd-palette-complementary-7-from-theme, #687581);
9057
+ }
9058
+ .gd-input-syntax-highlighting-input .cm-editor .cm-selectionBackground, .gd-input-syntax-highlighting-input .cm-editor.cm-focused .cm-selectionBackground {
9059
+ background: var(--gd-palette-primary-dimmed, rgb(90.7843137255%, 96.9803921569%, 98.862745098%));
9060
+ }
9061
+ .gd-input-syntax-highlighting-input .cm-editor .cm-placeholder {
9062
+ color: var(--gd-palette-complementary-7, #6d7680);
9063
+ opacity: 0.75;
9064
+ }
9065
+ .gd-input-syntax-highlighting-input--default-chrome .cm-editor {
9054
9066
  box-sizing: border-box;
9055
9067
  height: 100px;
9056
9068
  margin: 0;
@@ -9067,7 +9079,7 @@ textarea.gd-input, textarea.input-text {
9067
9079
  border-radius: 3px;
9068
9080
  box-shadow: inset 0 1px 1px 0 rgba(31, 53, 74, 0.15);
9069
9081
  }
9070
- .gd-input-syntax-highlighting-input .cm-editor::-webkit-input-placeholder {
9082
+ .gd-input-syntax-highlighting-input--default-chrome .cm-editor::-webkit-input-placeholder {
9071
9083
  color: var(--gd-palette-complementary-7, #6d7680);
9072
9084
  opacity: 0.75;
9073
9085
  -moz-transition-property: color;
@@ -9080,7 +9092,7 @@ textarea.gd-input, textarea.input-text {
9080
9092
  -webkit-transition-timing-function: ease-in-out;
9081
9093
  transition-timing-function: ease-in-out;
9082
9094
  }
9083
- .gd-input-syntax-highlighting-input .cm-editor:-moz-placeholder {
9095
+ .gd-input-syntax-highlighting-input--default-chrome .cm-editor:-moz-placeholder {
9084
9096
  color: var(--gd-palette-complementary-7, #6d7680);
9085
9097
  opacity: 0.75;
9086
9098
  -moz-transition-property: color;
@@ -9093,7 +9105,7 @@ textarea.gd-input, textarea.input-text {
9093
9105
  -webkit-transition-timing-function: ease-in-out;
9094
9106
  transition-timing-function: ease-in-out;
9095
9107
  }
9096
- .gd-input-syntax-highlighting-input .cm-editor::-moz-placeholder {
9108
+ .gd-input-syntax-highlighting-input--default-chrome .cm-editor::-moz-placeholder {
9097
9109
  color: var(--gd-palette-complementary-7, #6d7680);
9098
9110
  opacity: 0.75;
9099
9111
  -moz-transition-property: color;
@@ -9106,7 +9118,7 @@ textarea.gd-input, textarea.input-text {
9106
9118
  -webkit-transition-timing-function: ease-in-out;
9107
9119
  transition-timing-function: ease-in-out;
9108
9120
  }
9109
- .gd-input-syntax-highlighting-input .cm-editor:-ms-input-placeholder {
9121
+ .gd-input-syntax-highlighting-input--default-chrome .cm-editor:-ms-input-placeholder {
9110
9122
  color: var(--gd-palette-complementary-7, #6d7680);
9111
9123
  opacity: 0.75;
9112
9124
  -moz-transition-property: color;
@@ -9119,48 +9131,26 @@ textarea.gd-input, textarea.input-text {
9119
9131
  -webkit-transition-timing-function: ease-in-out;
9120
9132
  transition-timing-function: ease-in-out;
9121
9133
  }
9122
- .gd-input-syntax-highlighting-input .cm-editor:hover {
9134
+ .gd-input-syntax-highlighting-input--default-chrome .cm-editor:hover {
9123
9135
  border-color: var(--gd-palette-complementary-5-from-theme, #b1c1d1);
9124
9136
  }
9125
- .gd-input-syntax-highlighting-input .cm-editor:hover::-webkit-input-placeholder {
9137
+ .gd-input-syntax-highlighting-input--default-chrome .cm-editor:hover::-webkit-input-placeholder {
9126
9138
  color: var(--gd-palette-complementary-7, #6d7680);
9127
9139
  }
9128
- .gd-input-syntax-highlighting-input .cm-editor:hover:-moz-placeholder {
9140
+ .gd-input-syntax-highlighting-input--default-chrome .cm-editor:hover:-moz-placeholder {
9129
9141
  color: var(--gd-palette-complementary-7, #6d7680);
9130
9142
  }
9131
- .gd-input-syntax-highlighting-input .cm-editor:hover::-moz-placeholder {
9143
+ .gd-input-syntax-highlighting-input--default-chrome .cm-editor:hover::-moz-placeholder {
9132
9144
  color: var(--gd-palette-complementary-7, #6d7680);
9133
9145
  }
9134
- .gd-input-syntax-highlighting-input .cm-editor:hover:-ms-input-placeholder {
9146
+ .gd-input-syntax-highlighting-input--default-chrome .cm-editor:hover:-ms-input-placeholder {
9135
9147
  color: var(--gd-palette-complementary-7, #6d7680);
9136
9148
  }
9137
- .gd-input-syntax-highlighting-input .cm-editor.cm-focused {
9149
+ .gd-input-syntax-highlighting-input--default-chrome .cm-editor.cm-focused {
9138
9150
  border-color: var(--gd-palette-primary-base, #14b2e2);
9139
9151
  outline: none;
9140
9152
  box-shadow: inset 0 1px 1px 0 rgba(31, 53, 74, 0.15);
9141
9153
  }
9142
- .gd-input-syntax-highlighting-input .cm-editor .cm-matchingBracket {
9143
- font-weight: bold;
9144
- color: var(--gd-palette-complementary-9, #000);
9145
- background-color: var(--gd-palette-warning-dimmed, rgb(98.9019607843%, 90.5098039216%, 80%));
9146
- }
9147
- .gd-input-syntax-highlighting-input .cm-editor .cm-nonmatchingBracket {
9148
- color: var(--gd-palette-error-base, #e54d42);
9149
- }
9150
- .gd-input-syntax-highlighting-input .cm-editor .cm-content {
9151
- caret-color: transparent;
9152
- }
9153
- .gd-input-syntax-highlighting-input .cm-editor .cm-cursor,
9154
- .gd-input-syntax-highlighting-input .cm-editor .cm-dropCursor {
9155
- border-left-color: var(--gd-palette-complementary-7-from-theme, #687581);
9156
- }
9157
- .gd-input-syntax-highlighting-input .cm-editor .cm-selectionBackground, .gd-input-syntax-highlighting-input .cm-editor.cm-focused .cm-selectionBackground {
9158
- background: var(--gd-palette-primary-dimmed, rgb(90.7843137255%, 96.9803921569%, 98.862745098%));
9159
- }
9160
- .gd-input-syntax-highlighting-input .cm-editor .cm-placeholder {
9161
- color: var(--gd-palette-complementary-7, #6d7680);
9162
- opacity: 0.75;
9163
- }
9164
9154
 
9165
9155
  /* ==========================================================================
9166
9156
  Timepicker