@dbcdk/react-components 0.0.190 → 0.0.192

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 (128) hide show
  1. package/dist/client.cjs +14 -0
  2. package/dist/client.d.ts +2 -0
  3. package/dist/client.js +2 -0
  4. package/dist/components/button-select/ButtonSelect.cjs +2 -2
  5. package/dist/components/button-select/ButtonSelect.d.ts +1 -0
  6. package/dist/components/button-select/ButtonSelect.js +2 -2
  7. package/dist/components/button-select/ButtonSelect.module.css +14 -0
  8. package/dist/components/chip/Chip.module.css +25 -2
  9. package/dist/components/forms/checkbox/Checkbox.cjs +6 -1
  10. package/dist/components/forms/checkbox/Checkbox.js +6 -1
  11. package/dist/components/forms/checkbox/Checkbox.module.css +26 -0
  12. package/dist/components/forms/input/Input.module.css +93 -0
  13. package/dist/components/forms/input-container/InputContainer.module.css +0 -7
  14. package/dist/components/grid/Grid.cjs +4 -2
  15. package/dist/components/grid/Grid.d.ts +2 -2
  16. package/dist/components/grid/Grid.js +4 -2
  17. package/dist/components/json-viewer/JsonViewer.cjs +2 -1
  18. package/dist/components/json-viewer/JsonViewer.js +3 -2
  19. package/dist/components/line-viewer/LineViewer.cjs +2 -1
  20. package/dist/components/line-viewer/LineViewer.js +3 -2
  21. package/dist/components/overlay/side-panel/SidePanel.module.css +3 -1
  22. package/dist/components/page-layout/PageLayout.module.css +12 -3
  23. package/dist/components/popover/Popover.cjs +2 -1
  24. package/dist/components/popover/Popover.d.ts +8 -1
  25. package/dist/components/popover/Popover.js +2 -1
  26. package/dist/components/search-box/SearchBox.cjs +10 -7
  27. package/dist/components/search-box/SearchBox.d.ts +7 -0
  28. package/dist/components/search-box/SearchBox.js +10 -7
  29. package/dist/components/sidebar/components/sidenav-filteirng/SidenavFiltering.cjs +2 -1
  30. package/dist/components/sidebar/components/sidenav-filteirng/SidenavFiltering.js +2 -1
  31. package/dist/components/tabs/Tabs.cjs +58 -56
  32. package/dist/components/tabs/Tabs.js +58 -56
  33. package/dist/components/tabs/Tabs.module.css +32 -16
  34. package/dist/components/timeline/Timeline.d.ts +1 -0
  35. package/dist/components/timeline/components/TimelineRow.cjs +1 -1
  36. package/dist/components/timeline/components/TimelineRow.js +1 -1
  37. package/dist/components/timeline/components/TimelineRow.module.css +4 -0
  38. package/dist/components/tree-view/TreeNodeRow.cjs +9 -1
  39. package/dist/components/tree-view/TreeNodeRow.d.ts +2 -1
  40. package/dist/components/tree-view/TreeNodeRow.js +9 -1
  41. package/dist/components/tree-view/TreeView.cjs +2 -0
  42. package/dist/components/tree-view/TreeView.d.ts +1 -1
  43. package/dist/components/tree-view/TreeView.js +2 -0
  44. package/dist/components/tree-view/TreeView.module.css +8 -0
  45. package/dist/components/tree-view/types.d.ts +2 -0
  46. package/dist/components/tree-view/useTreeExpansion.cjs +12 -2
  47. package/dist/components/tree-view/useTreeExpansion.d.ts +1 -0
  48. package/dist/components/tree-view/useTreeExpansion.js +12 -2
  49. package/dist/components/xml-viewer/XmlViewer.cjs +2 -1
  50. package/dist/components/xml-viewer/XmlViewer.js +3 -2
  51. package/dist/hooks/useStickyLayout.cjs +99 -0
  52. package/dist/hooks/useStickyLayout.d.ts +22 -0
  53. package/dist/hooks/useStickyLayout.js +97 -0
  54. package/dist/hooks/useTreeViewSettings.cjs +87 -0
  55. package/dist/hooks/useTreeViewSettings.d.ts +35 -0
  56. package/dist/hooks/useTreeViewSettings.js +84 -0
  57. package/dist/index.cjs +7 -0
  58. package/dist/index.d.ts +1 -0
  59. package/dist/index.js +1 -0
  60. package/dist/styles/css-helper-classes/scrollbar.css +10 -0
  61. package/dist/styles/styles.css +1 -21
  62. package/dist/styles/themes/dbc/base.css +2 -2
  63. package/dist/styles.css +1 -21
  64. package/package.json +1 -1
  65. package/dist/styles/fonts/Roboto/OFL.txt +0 -93
  66. package/dist/styles/fonts/Roboto/README.txt +0 -118
  67. package/dist/styles/fonts/Roboto/Roboto-Black.ttf +0 -0
  68. package/dist/styles/fonts/Roboto/Roboto-BlackItalic.ttf +0 -0
  69. package/dist/styles/fonts/Roboto/Roboto-Bold.ttf +0 -0
  70. package/dist/styles/fonts/Roboto/Roboto-BoldItalic.ttf +0 -0
  71. package/dist/styles/fonts/Roboto/Roboto-ExtraBold.ttf +0 -0
  72. package/dist/styles/fonts/Roboto/Roboto-ExtraBoldItalic.ttf +0 -0
  73. package/dist/styles/fonts/Roboto/Roboto-ExtraLight.ttf +0 -0
  74. package/dist/styles/fonts/Roboto/Roboto-ExtraLightItalic.ttf +0 -0
  75. package/dist/styles/fonts/Roboto/Roboto-Italic.ttf +0 -0
  76. package/dist/styles/fonts/Roboto/Roboto-Light.ttf +0 -0
  77. package/dist/styles/fonts/Roboto/Roboto-LightItalic.ttf +0 -0
  78. package/dist/styles/fonts/Roboto/Roboto-Medium.ttf +0 -0
  79. package/dist/styles/fonts/Roboto/Roboto-MediumItalic.ttf +0 -0
  80. package/dist/styles/fonts/Roboto/Roboto-Regular.ttf +0 -0
  81. package/dist/styles/fonts/Roboto/Roboto-SemiBold.ttf +0 -0
  82. package/dist/styles/fonts/Roboto/Roboto-SemiBoldItalic.ttf +0 -0
  83. package/dist/styles/fonts/Roboto/Roboto-Thin.ttf +0 -0
  84. package/dist/styles/fonts/Roboto/Roboto-ThinItalic.ttf +0 -0
  85. package/dist/styles/fonts/Roboto/Roboto_Condensed-Black.ttf +0 -0
  86. package/dist/styles/fonts/Roboto/Roboto_Condensed-BlackItalic.ttf +0 -0
  87. package/dist/styles/fonts/Roboto/Roboto_Condensed-Bold.ttf +0 -0
  88. package/dist/styles/fonts/Roboto/Roboto_Condensed-BoldItalic.ttf +0 -0
  89. package/dist/styles/fonts/Roboto/Roboto_Condensed-ExtraBold.ttf +0 -0
  90. package/dist/styles/fonts/Roboto/Roboto_Condensed-ExtraBoldItalic.ttf +0 -0
  91. package/dist/styles/fonts/Roboto/Roboto_Condensed-ExtraLight.ttf +0 -0
  92. package/dist/styles/fonts/Roboto/Roboto_Condensed-ExtraLightItalic.ttf +0 -0
  93. package/dist/styles/fonts/Roboto/Roboto_Condensed-Italic.ttf +0 -0
  94. package/dist/styles/fonts/Roboto/Roboto_Condensed-Light.ttf +0 -0
  95. package/dist/styles/fonts/Roboto/Roboto_Condensed-LightItalic.ttf +0 -0
  96. package/dist/styles/fonts/Roboto/Roboto_Condensed-Medium.ttf +0 -0
  97. package/dist/styles/fonts/Roboto/Roboto_Condensed-MediumItalic.ttf +0 -0
  98. package/dist/styles/fonts/Roboto/Roboto_Condensed-Regular.ttf +0 -0
  99. package/dist/styles/fonts/Roboto/Roboto_Condensed-SemiBold.ttf +0 -0
  100. package/dist/styles/fonts/Roboto/Roboto_Condensed-SemiBoldItalic.ttf +0 -0
  101. package/dist/styles/fonts/Roboto/Roboto_Condensed-Thin.ttf +0 -0
  102. package/dist/styles/fonts/Roboto/Roboto_Condensed-ThinItalic.ttf +0 -0
  103. package/dist/styles/fonts/Roboto/Roboto_SemiCondensed-Black.ttf +0 -0
  104. package/dist/styles/fonts/Roboto/Roboto_SemiCondensed-BlackItalic.ttf +0 -0
  105. package/dist/styles/fonts/Roboto/Roboto_SemiCondensed-Bold.ttf +0 -0
  106. package/dist/styles/fonts/Roboto/Roboto_SemiCondensed-BoldItalic.ttf +0 -0
  107. package/dist/styles/fonts/Roboto/Roboto_SemiCondensed-ExtraBold.ttf +0 -0
  108. package/dist/styles/fonts/Roboto/Roboto_SemiCondensed-ExtraBoldItalic.ttf +0 -0
  109. package/dist/styles/fonts/Roboto/Roboto_SemiCondensed-ExtraLight.ttf +0 -0
  110. package/dist/styles/fonts/Roboto/Roboto_SemiCondensed-ExtraLightItalic.ttf +0 -0
  111. package/dist/styles/fonts/Roboto/Roboto_SemiCondensed-Italic.ttf +0 -0
  112. package/dist/styles/fonts/Roboto/Roboto_SemiCondensed-Light.ttf +0 -0
  113. package/dist/styles/fonts/Roboto/Roboto_SemiCondensed-LightItalic.ttf +0 -0
  114. package/dist/styles/fonts/Roboto/Roboto_SemiCondensed-Medium.ttf +0 -0
  115. package/dist/styles/fonts/Roboto/Roboto_SemiCondensed-MediumItalic.ttf +0 -0
  116. package/dist/styles/fonts/Roboto/Roboto_SemiCondensed-Regular.ttf +0 -0
  117. package/dist/styles/fonts/Roboto/Roboto_SemiCondensed-SemiBold.ttf +0 -0
  118. package/dist/styles/fonts/Roboto/Roboto_SemiCondensed-SemiBoldItalic.ttf +0 -0
  119. package/dist/styles/fonts/Roboto/Roboto_SemiCondensed-Thin.ttf +0 -0
  120. package/dist/styles/fonts/Roboto/Roboto_SemiCondensed-ThinItalic.ttf +0 -0
  121. package/dist/styles/fonts/Tajawal/OFL.txt +0 -93
  122. package/dist/styles/fonts/Tajawal/Tajawal-Black.ttf +0 -0
  123. package/dist/styles/fonts/Tajawal/Tajawal-Bold.ttf +0 -0
  124. package/dist/styles/fonts/Tajawal/Tajawal-ExtraBold.ttf +0 -0
  125. package/dist/styles/fonts/Tajawal/Tajawal-ExtraLight.ttf +0 -0
  126. package/dist/styles/fonts/Tajawal/Tajawal-Light.ttf +0 -0
  127. package/dist/styles/fonts/Tajawal/Tajawal-Medium.ttf +0 -0
  128. package/dist/styles/fonts/Tajawal/Tajawal-Regular.ttf +0 -0
package/dist/client.cjs CHANGED
@@ -22,6 +22,7 @@ var useColorScheme = require('./hooks/useColorScheme');
22
22
  var useGetActiveTheme = require('./hooks/useGetActiveTheme');
23
23
  var useTheme = require('./hooks/useTheme');
24
24
  var usePersistentState = require('./hooks/usePersistentState');
25
+ var useTreeViewSettings = require('./hooks/useTreeViewSettings');
25
26
  var Chip = require('./components/chip/Chip');
26
27
  var Panel = require('./components/panel/Panel');
27
28
  var Card = require('./components/card/Card');
@@ -48,6 +49,7 @@ var TreeView = require('./components/tree-view/TreeView');
48
49
  var nestedFiltering = require('./utils/arrays/nested-filtering');
49
50
  var MultiSelect = require('./components/forms/multi-select/MultiSelect');
50
51
  var useViewportFill = require('./hooks/useViewportFill');
52
+ var useStickyLayout = require('./hooks/useStickyLayout');
51
53
  var formatDate = require('./utils/date/formatDate');
52
54
  var FilterField = require('./components/filter-field/FilterField');
53
55
  var Select = require('./components/forms/select/Select');
@@ -230,6 +232,12 @@ Object.keys(usePersistentState).forEach(function (k) {
230
232
  get: function () { return usePersistentState[k]; }
231
233
  });
232
234
  });
235
+ Object.keys(useTreeViewSettings).forEach(function (k) {
236
+ if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
237
+ enumerable: true,
238
+ get: function () { return useTreeViewSettings[k]; }
239
+ });
240
+ });
233
241
  Object.keys(Chip).forEach(function (k) {
234
242
  if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
235
243
  enumerable: true,
@@ -386,6 +394,12 @@ Object.keys(useViewportFill).forEach(function (k) {
386
394
  get: function () { return useViewportFill[k]; }
387
395
  });
388
396
  });
397
+ Object.keys(useStickyLayout).forEach(function (k) {
398
+ if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
399
+ enumerable: true,
400
+ get: function () { return useStickyLayout[k]; }
401
+ });
402
+ });
389
403
  Object.keys(formatDate).forEach(function (k) {
390
404
  if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
391
405
  enumerable: true,
package/dist/client.d.ts CHANGED
@@ -19,6 +19,7 @@ export * from './hooks/useColorScheme';
19
19
  export * from './hooks/useGetActiveTheme';
20
20
  export * from './hooks/useTheme';
21
21
  export * from './hooks/usePersistentState';
22
+ export * from './hooks/useTreeViewSettings';
22
23
  export * from './components/chip/Chip';
23
24
  export * from './components/panel/Panel';
24
25
  export * from './components/card/Card';
@@ -45,6 +46,7 @@ export * from './components/tree-view/TreeView';
45
46
  export * from './utils/arrays/nested-filtering';
46
47
  export * from './components/forms/multi-select/MultiSelect';
47
48
  export * from './hooks/useViewportFill';
49
+ export * from './hooks/useStickyLayout';
48
50
  export * from './utils/date/formatDate';
49
51
  export * from './components/filter-field/FilterField';
50
52
  export * from './components/forms/select/Select';
package/dist/client.js CHANGED
@@ -20,6 +20,7 @@ export * from './hooks/useColorScheme';
20
20
  export * from './hooks/useGetActiveTheme';
21
21
  export * from './hooks/useTheme';
22
22
  export * from './hooks/usePersistentState';
23
+ export * from './hooks/useTreeViewSettings';
23
24
  export * from './components/chip/Chip';
24
25
  export * from './components/panel/Panel';
25
26
  export * from './components/card/Card';
@@ -46,6 +47,7 @@ export * from './components/tree-view/TreeView';
46
47
  export * from './utils/arrays/nested-filtering';
47
48
  export * from './components/forms/multi-select/MultiSelect';
48
49
  export * from './hooks/useViewportFill';
50
+ export * from './hooks/useStickyLayout';
49
51
  export * from './utils/date/formatDate';
50
52
  export * from './components/filter-field/FilterField';
51
53
  export * from './components/forms/select/Select';
@@ -10,7 +10,7 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
10
10
  var styles__default = /*#__PURE__*/_interopDefault(styles);
11
11
 
12
12
  function ButtonSelect(props) {
13
- const { options, size = "md", disabled } = props;
13
+ const { options, size = "md", disabled, modified = false } = props;
14
14
  const selectedValues = Array.isArray(props.value) ? props.value : [props.value];
15
15
  function handleSelect(optionValue) {
16
16
  if (props.multiple) {
@@ -20,7 +20,7 @@ function ButtonSelect(props) {
20
20
  }
21
21
  props.onChange(optionValue);
22
22
  }
23
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles__default.default.group, role: "group", children: options.map((option) => {
23
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles__default.default.group, role: "group", "data-modified": modified ? "true" : void 0, children: options.map((option) => {
24
24
  const isSelected = selectedValues.includes(option.value);
25
25
  return /* @__PURE__ */ jsxRuntime.jsx(
26
26
  Button.Button,
@@ -10,6 +10,7 @@ interface ButtonSelectBaseProps<T extends string = string> {
10
10
  options: ButtonSelectOption<T>[];
11
11
  size?: ButtonSize;
12
12
  disabled?: boolean;
13
+ modified?: boolean;
13
14
  }
14
15
  export interface ButtonSelectSingleProps<T extends string = string> extends ButtonSelectBaseProps<T> {
15
16
  value: T;
@@ -4,7 +4,7 @@ import { Button } from '../../components/button/Button';
4
4
  import styles from './ButtonSelect.module.css';
5
5
 
6
6
  function ButtonSelect(props) {
7
- const { options, size = "md", disabled } = props;
7
+ const { options, size = "md", disabled, modified = false } = props;
8
8
  const selectedValues = Array.isArray(props.value) ? props.value : [props.value];
9
9
  function handleSelect(optionValue) {
10
10
  if (props.multiple) {
@@ -14,7 +14,7 @@ function ButtonSelect(props) {
14
14
  }
15
15
  props.onChange(optionValue);
16
16
  }
17
- return /* @__PURE__ */ jsx("div", { className: styles.group, role: "group", children: options.map((option) => {
17
+ return /* @__PURE__ */ jsx("div", { className: styles.group, role: "group", "data-modified": modified ? "true" : void 0, children: options.map((option) => {
18
18
  const isSelected = selectedValues.includes(option.value);
19
19
  return /* @__PURE__ */ jsx(
20
20
  Button,
@@ -3,6 +3,20 @@
3
3
  flex-wrap: nowrap;
4
4
  }
5
5
 
6
+ .group[data-modified='true'] {
7
+ background-color: color-mix(in srgb, var(--color-status-warning-bg) 35%, transparent);
8
+ border-radius: var(--border-radius-default);
9
+ padding: 0;
10
+ }
11
+
12
+ .group[data-modified='true'] .btn {
13
+ border-color: color-mix(
14
+ in srgb,
15
+ var(--color-status-warning-border) 60%,
16
+ var(--color-border-default)
17
+ );
18
+ }
19
+
6
20
  /* Collapse the doubled border between adjacent buttons */
7
21
  .group .btn:not(:first-child) {
8
22
  margin-left: -1px;
@@ -43,14 +43,14 @@
43
43
  /* Types */
44
44
 
45
45
  .outlined {
46
- --chip-bg: var(--color-bg-surface);
46
+ --chip-bg: transparent;
47
47
  --chip-border: var(--chip-outlined-border, var(--color-border-subtle));
48
48
  --chip-fg: var(--chip-outlined-fg, var(--color-fg-muted));
49
49
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
50
50
  }
51
51
 
52
52
  .outlined:hover {
53
- background-color: var(--color-bg-surface);
53
+ background-color: transparent;
54
54
  border-color: var(--chip-outlined-border-hover, var(--color-border-default));
55
55
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
56
56
  color: var(--chip-outlined-fg-hover, var(--color-fg-default));
@@ -124,6 +124,16 @@
124
124
  box-shadow: none;
125
125
  }
126
126
 
127
+ .outlined.neutral {
128
+ --chip-bg: transparent;
129
+ --chip-border: var(--chip-outlined-border, var(--color-border-subtle));
130
+ }
131
+
132
+ .outlined.neutral:hover,
133
+ .outlined.neutral:focus-visible {
134
+ --chip-bg: transparent;
135
+ }
136
+
127
137
  .neutral .close {
128
138
  color: var(--color-fg-subtle);
129
139
  }
@@ -208,6 +218,19 @@
208
218
  box-shadow: inset 0 0 0 1px var(--color-border-selected);
209
219
  }
210
220
 
221
+ .outlined.selected,
222
+ .outlined.selected:hover,
223
+ .outlined.selected:focus-visible {
224
+ background: color-mix(in srgb, var(--color-bg-selected) 65%, var(--color-bg-surface));
225
+ border-color: var(--color-border-selected);
226
+ box-shadow: inset 0 0 0 1px var(--color-border-selected);
227
+ color: var(--color-brand);
228
+ }
229
+
230
+ .outlined.selected:hover {
231
+ background: color-mix(in srgb, var(--color-bg-selected-hover) 65%, var(--color-bg-surface));
232
+ }
233
+
211
234
  .selected:hover {
212
235
  background-color: var(--color-bg-selected);
213
236
  border-color: var(--color-border-selected);
@@ -49,7 +49,11 @@ function Checkbox({
49
49
  const content = /* @__PURE__ */ jsxRuntime.jsxs(
50
50
  "span",
51
51
  {
52
- className: [styles__default.default.container, size === "sm" ? styles__default.default.containerSm : ""].filter(Boolean).join(" "),
52
+ className: [
53
+ styles__default.default.container,
54
+ size === "sm" ? styles__default.default.containerSm : "",
55
+ modified ? styles__default.default.modified : ""
56
+ ].filter(Boolean).join(" "),
53
57
  "data-cy": dataCy,
54
58
  children: [
55
59
  /* @__PURE__ */ jsxRuntime.jsx(Tooltip.Tooltip, { content: tooltip, placement: tooltipPlacement, children: /* @__PURE__ */ jsxRuntime.jsx(
@@ -65,6 +69,7 @@ function Checkbox({
65
69
  onClick: toggle,
66
70
  className: [
67
71
  styles__default.default.checkbox,
72
+ disabled ? "disabled" : "",
68
73
  isChecked ? styles__default.default.checked : "",
69
74
  styles__default.default[variant],
70
75
  styles__default.default[size]
@@ -43,7 +43,11 @@ function Checkbox({
43
43
  const content = /* @__PURE__ */ jsxs(
44
44
  "span",
45
45
  {
46
- className: [styles.container, size === "sm" ? styles.containerSm : ""].filter(Boolean).join(" "),
46
+ className: [
47
+ styles.container,
48
+ size === "sm" ? styles.containerSm : "",
49
+ modified ? styles.modified : ""
50
+ ].filter(Boolean).join(" "),
47
51
  "data-cy": dataCy,
48
52
  children: [
49
53
  /* @__PURE__ */ jsx(Tooltip, { content: tooltip, placement: tooltipPlacement, children: /* @__PURE__ */ jsx(
@@ -59,6 +63,7 @@ function Checkbox({
59
63
  onClick: toggle,
60
64
  className: [
61
65
  styles.checkbox,
66
+ disabled ? "disabled" : "",
62
67
  isChecked ? styles.checked : "",
63
68
  styles[variant],
64
69
  styles[size]
@@ -7,6 +7,13 @@
7
7
  color: var(--color-fg-default);
8
8
  }
9
9
 
10
+ .container.modified {
11
+ background-color: color-mix(in srgb, var(--color-status-warning-bg) 75%, transparent);
12
+ border-radius: var(--border-radius-default);
13
+ padding: 0;
14
+ display: inline-flex;
15
+ }
16
+
10
17
  .containerSm {
11
18
  gap: var(--spacing-xs);
12
19
  }
@@ -28,6 +35,12 @@
28
35
  box-shadow var(--transition-fast) var(--ease-standard);
29
36
  }
30
37
 
38
+ .checkbox:disabled {
39
+ cursor: not-allowed;
40
+ opacity: 0.5;
41
+ filter: grayscale(0.2);
42
+ }
43
+
31
44
  .checkbox.sm {
32
45
  width: var(--component-size-xs);
33
46
  height: var(--component-size-xs);
@@ -54,11 +67,24 @@
54
67
  border-color: var(--color-fg-default);
55
68
  }
56
69
 
70
+ .checkbox:disabled:hover {
71
+ border-color: var(--color-border-default);
72
+ }
73
+
57
74
  .checked {
58
75
  background-color: var(--color-brand);
59
76
  border-color: var(--color-brand);
60
77
  }
61
78
 
79
+ .checkbox:disabled.checked {
80
+ background-color: var(--color-bg-subtle);
81
+ border-color: var(--color-border-muted);
82
+ }
83
+
84
+ .checkbox:disabled.checked .icon {
85
+ color: var(--color-fg-muted);
86
+ }
87
+
62
88
  .icon {
63
89
  width: var(--icon-size-md);
64
90
  height: var(--icon-size-md);
@@ -41,7 +41,12 @@
41
41
  flex: 1 1 auto;
42
42
  min-inline-size: 0;
43
43
  inline-size: 100%;
44
+ /* Size classes also apply to the field; keep the input inside its border. */
45
+ max-block-size: 100%;
44
46
  box-sizing: border-box;
47
+ /* Matches `.field`'s radius so the autofill box-shadow below (which paints
48
+ within this element's own box) doesn't show sharp corners under it. */
49
+ border-radius: inherit;
45
50
  text-overflow: ellipsis;
46
51
  color: var(--color-fg-default);
47
52
  background: transparent;
@@ -59,6 +64,94 @@
59
64
  color: var(--color-fg-subtle) !important;
60
65
  }
61
66
 
67
+ /* Match the design system's selection color instead of the browser default. */
68
+ .input::selection {
69
+ background-color: var(--color-bg-selected);
70
+ color: var(--color-fg-default);
71
+ }
72
+
73
+ .input::-moz-selection {
74
+ background-color: var(--color-bg-selected);
75
+ color: var(--color-fg-default);
76
+ }
77
+
78
+ /* Neutralize the browser's native autofill tint (Chrome's light-blue fill,
79
+ applied via this pseudo-class) so a filled field keeps the field's normal
80
+ background instead of the browser's own color - this also fires for
81
+ Chrome's "previous values typed in this field" history dropdown, which
82
+ uses the same autofill styling even though it's not real autofill data.
83
+ The huge transition delay is the standard trick to stop Chrome animating
84
+ its own background/text color in on top of this.
85
+
86
+ The field overlay below keeps the focus ring above this opaque fill. */
87
+ .input:-webkit-autofill,
88
+ .input:-webkit-autofill:hover {
89
+ -webkit-text-fill-color: var(--color-fg-default);
90
+ -webkit-box-shadow: 0 0 0 1000px var(--color-bg-surface) inset;
91
+ box-shadow: 0 0 0 1000px var(--color-bg-surface) inset;
92
+ transition:
93
+ background-color 600000s 0s,
94
+ color 600000s 0s;
95
+ }
96
+
97
+ .subtle .input:-webkit-autofill,
98
+ .subtle .input:-webkit-autofill:hover {
99
+ -webkit-box-shadow: 0 0 0 1000px var(--color-bg-toolbar) inset;
100
+ box-shadow: 0 0 0 1000px var(--color-bg-toolbar) inset;
101
+ }
102
+
103
+ .embedded .input:-webkit-autofill,
104
+ .embedded .input:-webkit-autofill:hover,
105
+ .embedded .input:-webkit-autofill:focus {
106
+ -webkit-box-shadow: 0 0 0 1000px transparent inset;
107
+ box-shadow: 0 0 0 1000px transparent inset;
108
+ }
109
+
110
+ .header .input:-webkit-autofill,
111
+ .header .input:-webkit-autofill:hover {
112
+ -webkit-box-shadow: 0 0 0 1000px transparent inset;
113
+ box-shadow: 0 0 0 1000px transparent inset;
114
+ }
115
+
116
+ .header .input:-webkit-autofill {
117
+ -webkit-text-fill-color: var(--color-navbar-fg);
118
+ }
119
+
120
+ /* Paint over the autofill fill using the whole field's geometry, including
121
+ adornments. A ring on the input itself creates an extra inner rectangle.
122
+ Keep this overlay non-interactive so clear buttons remain clickable. */
123
+ .field:has(.input:-webkit-autofill)::after {
124
+ content: '';
125
+ position: absolute;
126
+ inset: 0;
127
+ border-radius: inherit;
128
+ pointer-events: none;
129
+ box-shadow: inset 0 0 0 var(--border-width-thin)
130
+ var(--input-autofill-ring, var(--color-field-focus));
131
+ opacity: 0;
132
+ transition: opacity var(--transition-fast) var(--ease-standard);
133
+ }
134
+
135
+ .field:has(.input:-webkit-autofill):focus-within:not([aria-disabled='true'])::after {
136
+ opacity: 1;
137
+ }
138
+
139
+ .header {
140
+ --input-autofill-ring: var(--color-navbar-fg);
141
+ }
142
+
143
+ .modified {
144
+ --input-autofill-ring: color-mix(
145
+ in srgb,
146
+ var(--color-status-warning-border) 55%,
147
+ var(--color-border-default)
148
+ );
149
+ }
150
+
151
+ .embedded:has(.input:-webkit-autofill)::after {
152
+ content: none;
153
+ }
154
+
62
155
  .input:disabled {
63
156
  background-color: transparent;
64
157
  color: var(--color-disabled-fg);
@@ -50,10 +50,3 @@
50
50
  .messageRow {
51
51
  min-height: 1lh;
52
52
  }
53
-
54
- /* Optional: keep this only for controls whose own label lives inside children,
55
- such as checkbox/radio wrappers. It will not affect Input's top label. */
56
- .inputContainer[data-modified] label:not(.label) {
57
- background-color: color-mix(in srgb, var(--color-status-warning-bg) 35%, transparent);
58
- border-radius: var(--border-radius-default);
59
- }
@@ -1,6 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var jsxRuntime = require('react/jsx-runtime');
4
+ var react = require('react');
4
5
  var styles = require('./Grid.module.css');
5
6
 
6
7
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
@@ -38,11 +39,12 @@ function Grid({
38
39
  }
39
40
  );
40
41
  }
41
- function GridItem({ children, base = 12, md, lg, className, style }) {
42
+ const GridItem = react.forwardRef(function GridItem2({ children, base = 12, md, lg, className, style }, ref) {
42
43
  const toTrackSpan = (span) => span * 2;
43
44
  return /* @__PURE__ */ jsxRuntime.jsx(
44
45
  "div",
45
46
  {
47
+ ref,
46
48
  className: [styles__default.default.item, className].filter(Boolean).join(" "),
47
49
  style: {
48
50
  "--span-base": toTrackSpan(base),
@@ -53,7 +55,7 @@ function GridItem({ children, base = 12, md, lg, className, style }) {
53
55
  children
54
56
  }
55
57
  );
56
- }
58
+ });
57
59
 
58
60
  exports.Grid = Grid;
59
61
  exports.GridItem = GridItem;
@@ -1,4 +1,4 @@
1
- import type { CSSProperties, ReactNode } from 'react';
1
+ import { type CSSProperties, type ReactNode } from 'react';
2
2
  export type GridGap = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
3
3
  export interface GridMaxWidth {
4
4
  base?: string;
@@ -26,4 +26,4 @@ export interface GridItemProps {
26
26
  className?: string;
27
27
  style?: CSSProperties;
28
28
  }
29
- export declare function GridItem({ children, base, md, lg, className, style }: GridItemProps): import("react/jsx-runtime").JSX.Element;
29
+ export declare const GridItem: import("react").ForwardRefExoticComponent<GridItemProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -1,4 +1,5 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
+ import { forwardRef } from 'react';
2
3
  import styles from './Grid.module.css';
3
4
 
4
5
  const GAP_TOKEN = {
@@ -32,11 +33,12 @@ function Grid({
32
33
  }
33
34
  );
34
35
  }
35
- function GridItem({ children, base = 12, md, lg, className, style }) {
36
+ const GridItem = forwardRef(function GridItem2({ children, base = 12, md, lg, className, style }, ref) {
36
37
  const toTrackSpan = (span) => span * 2;
37
38
  return /* @__PURE__ */ jsx(
38
39
  "div",
39
40
  {
41
+ ref,
40
42
  className: [styles.item, className].filter(Boolean).join(" "),
41
43
  style: {
42
44
  "--span-base": toTrackSpan(base),
@@ -47,6 +49,6 @@ function GridItem({ children, base = 12, md, lg, className, style }) {
47
49
  children
48
50
  }
49
51
  );
50
- }
52
+ });
51
53
 
52
54
  export { Grid, GridItem };
@@ -12,6 +12,7 @@ var styles = require('./JsonViewer.module.css');
12
12
  var useClipboardStatus = require('./useClipboardStatus');
13
13
  var utils = require('./utils');
14
14
  var Button = require('../button/Button');
15
+ var Icon = require('../icon/Icon');
15
16
 
16
17
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
17
18
 
@@ -151,7 +152,7 @@ function JsonViewer({
151
152
  "aria-haspopup": "menu",
152
153
  "aria-expanded": isOpen ? true : false,
153
154
  onClick: toggle,
154
- children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.MoreVertical, { "aria-hidden": "true" })
155
+ children: /* @__PURE__ */ jsxRuntime.jsx(Icon.Icon, { customIcon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Settings2, { "aria-hidden": "true" }) })
155
156
  }
156
157
  ),
157
158
  children: (close) => /* @__PURE__ */ jsxRuntime.jsxs(Menu.Menu, { children: [
@@ -1,6 +1,6 @@
1
1
  'use client';
2
2
  import { jsxs, jsx } from 'react/jsx-runtime';
3
- import { Search, X, ArrowDown, ArrowUp, ListTree, Braces, Sun, Moon, ClipboardCopy, MoreVertical } from 'lucide-react';
3
+ import { Search, X, ArrowDown, ArrowUp, ListTree, Braces, Sun, Moon, ClipboardCopy, Settings2 } from 'lucide-react';
4
4
  import { useState, useId, useEffect, useMemo } from 'react';
5
5
  import { Menu } from '../../components/menu/Menu';
6
6
  import { Popover } from '../../components/popover/Popover';
@@ -10,6 +10,7 @@ import styles from './JsonViewer.module.css';
10
10
  import { useClipboardStatus } from './useClipboardStatus';
11
11
  import { normalizeSearch, isJsonValue, collectSearchMatches, collectExpandableNodeIds, collectInitiallyExpandedNodeIds } from './utils';
12
12
  import { Button } from '../button/Button';
13
+ import { Icon } from '../icon/Icon';
13
14
 
14
15
  const COPY_ALL_ID = "__json-viewer-copy-all__";
15
16
  function JsonViewer({
@@ -145,7 +146,7 @@ function JsonViewer({
145
146
  "aria-haspopup": "menu",
146
147
  "aria-expanded": isOpen ? true : false,
147
148
  onClick: toggle,
148
- children: /* @__PURE__ */ jsx(MoreVertical, { "aria-hidden": "true" })
149
+ children: /* @__PURE__ */ jsx(Icon, { customIcon: /* @__PURE__ */ jsx(Settings2, { "aria-hidden": "true" }) })
149
150
  }
150
151
  ),
151
152
  children: (close) => /* @__PURE__ */ jsxs(Menu, { children: [
@@ -10,6 +10,7 @@ var usePersistentState = require('../../hooks/usePersistentState');
10
10
  var styles = require('./LineViewer.module.css');
11
11
  var tokenizeLineFormat = require('./tokenizeLineFormat');
12
12
  var Button = require('../button/Button');
13
+ var Icon = require('../icon/Icon');
13
14
 
14
15
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
15
16
 
@@ -87,7 +88,7 @@ function LineViewer({
87
88
  "aria-haspopup": "menu",
88
89
  "aria-expanded": isOpen ? true : false,
89
90
  onClick: toggle,
90
- children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.MoreVertical, { "aria-hidden": "true" })
91
+ children: /* @__PURE__ */ jsxRuntime.jsx(Icon.Icon, { customIcon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Settings2, { "aria-hidden": "true" }) })
91
92
  }
92
93
  ),
93
94
  children: (close) => /* @__PURE__ */ jsxRuntime.jsxs(Menu.Menu, { children: [
@@ -1,6 +1,6 @@
1
1
  'use client';
2
2
  import { jsxs, jsx } from 'react/jsx-runtime';
3
- import { TextWrap, ListTree, Code2, Sun, Moon, ClipboardCopy, MoreVertical } from 'lucide-react';
3
+ import { TextWrap, ListTree, Code2, Sun, Moon, ClipboardCopy, Settings2 } from 'lucide-react';
4
4
  import { useMemo, useRef } from 'react';
5
5
  import { Menu } from '../../components/menu/Menu';
6
6
  import { Popover } from '../../components/popover/Popover';
@@ -8,6 +8,7 @@ import { usePersistentState } from '../../hooks/usePersistentState';
8
8
  import styles from './LineViewer.module.css';
9
9
  import { tokenizeLineFormat } from './tokenizeLineFormat';
10
10
  import { Button } from '../button/Button';
11
+ import { Icon } from '../icon/Icon';
11
12
 
12
13
  const TOKEN_CLASS = {
13
14
  tag: styles.tag,
@@ -81,7 +82,7 @@ function LineViewer({
81
82
  "aria-haspopup": "menu",
82
83
  "aria-expanded": isOpen ? true : false,
83
84
  onClick: toggle,
84
- children: /* @__PURE__ */ jsx(MoreVertical, { "aria-hidden": "true" })
85
+ children: /* @__PURE__ */ jsx(Icon, { customIcon: /* @__PURE__ */ jsx(Settings2, { "aria-hidden": "true" }) })
85
86
  }
86
87
  ),
87
88
  children: (close) => /* @__PURE__ */ jsxs(Menu, { children: [
@@ -96,7 +96,9 @@
96
96
 
97
97
  display: flex;
98
98
  flex-direction: column;
99
- gap: var(--spacing-md);
99
+ /* Header/content spacing is defined by their own padding, so avoid adding another
100
+ gap that creates double spacing between the panel title and the content area. */
101
+ gap: 0;
100
102
  }
101
103
 
102
104
  .header {
@@ -17,8 +17,9 @@
17
17
  var(--spacing-2xs) * 2 + var(--font-size-md) * var(--line-height-normal)
18
18
  );
19
19
 
20
- /* Structural bottom breathing room for all page content. */
21
- --page-layout-content-padding-bottom: var(--spacing-2xl);
20
+ /* Structural bottom breathing room for all page content, so it doesn't sit
21
+ flush against the viewport edge. */
22
+ --page-layout-content-padding-bottom: var(--spacing-xl);
22
23
  }
23
24
 
24
25
  /* Viewport handling:
@@ -211,7 +212,15 @@
211
212
  /* Content area (not a scroll container anymore) */
212
213
  .content {
213
214
  min-width: 0;
214
- min-height: 0;
215
+ /* Deliberately no min-height:0 here (unlike `.mainScroll` above, which does
216
+ need it): this lets `.content` size to its own natural content height —
217
+ including its own padding-block-end — instead of being flex-shrunk
218
+ shorter than that content. `.mainScroll` (overflow:auto) already has its
219
+ own min-height:0, which is what lets it stay bounded to the available
220
+ space and scroll; if `.content` could *also* shrink below its content,
221
+ that shrunk-but-visible-overflow content would spill straight past
222
+ wherever its own bottom padding was supposed to land, so it would never
223
+ actually render (this happened in practice before this comment existed). */
215
224
  flex: 1 1 auto; /* take remaining space inside mainScroll */
216
225
  display: flex; /* lets contentInner stretch */
217
226
  flex-direction: column;
@@ -145,7 +145,7 @@ const Popover = React.forwardRef(function Popover2({
145
145
  React.useImperativeHandle(
146
146
  ref,
147
147
  () => ({
148
- close: () => closePopover("api"),
148
+ close: (opts) => closePopover((opts == null ? void 0 : opts.returnFocus) === false ? "dismiss" : "api"),
149
149
  open: openPopover,
150
150
  isOpen: () => isOpen
151
151
  }),
@@ -265,6 +265,7 @@ const Popover = React.forwardRef(function Popover2({
265
265
  if (isOpen) return;
266
266
  if (!returnFocus) return;
267
267
  if (lastCloseReasonRef.current === "outside") return;
268
+ if (lastCloseReasonRef.current === "dismiss") return;
268
269
  (_b = (_a = triggerElRef.current) == null ? void 0 : _a.focus) == null ? void 0 : _b.call(_a);
269
270
  }, [isOpen, returnFocus]);
270
271
  const chevronClassName = variant === "header" ? styles__default.default.chevronHeader : void 0;
@@ -22,7 +22,14 @@ export interface PopoverProps {
22
22
  variant?: 'default' | 'header';
23
23
  }
24
24
  export interface PopoverHandle {
25
- close: () => void;
25
+ /**
26
+ * Pass `{ returnFocus: false }` to close without focus returning to the
27
+ * trigger afterward - e.g. when the caller is about to navigate away or
28
+ * move focus itself, so the trigger shouldn't reclaim it back.
29
+ */
30
+ close: (opts?: {
31
+ returnFocus?: boolean;
32
+ }) => void;
26
33
  open: () => void;
27
34
  isOpen: () => boolean;
28
35
  }
@@ -121,7 +121,7 @@ const Popover = forwardRef(function Popover2({
121
121
  useImperativeHandle(
122
122
  ref,
123
123
  () => ({
124
- close: () => closePopover("api"),
124
+ close: (opts) => closePopover((opts == null ? void 0 : opts.returnFocus) === false ? "dismiss" : "api"),
125
125
  open: openPopover,
126
126
  isOpen: () => isOpen
127
127
  }),
@@ -241,6 +241,7 @@ const Popover = forwardRef(function Popover2({
241
241
  if (isOpen) return;
242
242
  if (!returnFocus) return;
243
243
  if (lastCloseReasonRef.current === "outside") return;
244
+ if (lastCloseReasonRef.current === "dismiss") return;
244
245
  (_b = (_a = triggerElRef.current) == null ? void 0 : _a.focus) == null ? void 0 : _b.call(_a);
245
246
  }, [isOpen, returnFocus]);
246
247
  const chevronClassName = variant === "header" ? styles.chevronHeader : void 0;