@keboola/design 6.4.0 → 6.5.0

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/README.md CHANGED
@@ -116,7 +116,7 @@ Worked examples: `src/components/Button/Button.stories.tsx` (click + disabled),
116
116
 
117
117
  **Coverage so far:** the interactive surface is covered — Button, ButtonInline, Combobox, MultiCombobox, CreatableMultiCombobox, Select, Modal, Sheet, Popover, Popconfirm, DropdownMenu, SplitButton, Tooltip, HoverCard, InfoTooltip, Switch, Checkbox, RadioGroup, Slider, Tabs, PageHeaderTabs, Collapsible, PanelWithDetails, Toast, TextInput, NumberInput, SearchInput, SearchInputWithNavigation, PasswordInput, Textarea, AutoSaveTextarea, AlertWithAction, ListDetail, FilterToolbar. Add a `play()` to new interactive stories by default.
118
118
 
119
- **Known gaps (not yet driven headlessly):** `Command` (cmdk input value isn't reflected on the DOM node under the test runner), `CollapsiblePanel` (collapses via CSS height, so `toBeVisible()` can't see the state change), `Calendar`/`DateInput`/`TimeInput` (day/segment targeting is brittle), `ColorInput`, `Clipboard`/`ClipboardButton` (clipboard API), and `MultiActionButton`/`Tagger` (stories use `alert()` / `onClick` side effects that block a headless run). `ModalForm` currently throws `formContext only works within a formComponent` when its modal opens (`FormBody` is outside `form.AppForm`) — a story-wiring fix, tracked separately. `Search` is deprecated and intentionally untested.
119
+ **Known gaps (not yet driven headlessly):** `Command` (cmdk input value isn't reflected on the DOM node under the test runner), `CollapsiblePanel` (collapses via CSS height, so `toBeVisible()` can't see the state change), `Calendar`/`DateInput`/`TimeInput` (day/segment targeting is brittle), `ColorInput`, `Clipboard`/`ClipboardButton` (clipboard API), and `MultiActionButton` (stories use `alert()` / `onClick` side effects that block a headless run). `ModalForm` currently throws `formContext only works within a formComponent` when its modal opens (`FormBody` is outside `form.AppForm`) — a story-wiring fix, tracked separately. `Search` is deprecated and intentionally untested.
120
120
 
121
121
  **Timing-sensitive:** `HoverCard` is the only test driven by a real `userEvent.hover` past a 200 ms open delay (its `findByText` carries a raised timeout). It passes headlessly today, but it's the most likely flake if CI is slow — `Tooltip` deliberately opens via keyboard focus to avoid this. Watch it when wiring CI.
122
122
 
@@ -136,7 +136,7 @@ Same prerequisites as `test:stories` (build workspace deps, install Chromium). R
136
136
 
137
137
  **What's covered:** `src/**` component source, excluding stories (`*.stories.tsx`), unit tests (`*.test.{ts,tsx}`), barrels (`index.ts`), type decls, `src/docs/**`, and `src/icons/**` (curated lucide re-exports plus custom SVG marks like `Keboola` — trivial visual surface, no logic to gate).
138
138
 
139
- **What the numbers reflect:** only some story files carry a `play()` interaction test; the rest contribute just their render/smoke path, so branch coverage trails statement coverage. The lowest-covered areas are the interaction-heavy blocks that still lack a `play()` (e.g. `Tagger`). Run `test:stories:coverage` and open `coverage/index.html` for the current per-file numbers — they're not pinned here because they drift with every story and `play()` added.
139
+ **What the numbers reflect:** only some story files carry a `play()` interaction test; the rest contribute just their render/smoke path, so branch coverage trails statement coverage. The lowest-covered areas are the interaction-heavy blocks that still lack a `play()`. Run `test:stories:coverage` and open `coverage/index.html` for the current per-file numbers — they're not pinned here because they drift with every story and `play()` added.
140
140
 
141
141
  ### Icons
142
142
 
package/dist/editors.cjs CHANGED
@@ -267,6 +267,7 @@ var Tooltip = ({
267
267
  placement = "right",
268
268
  forceHide = false,
269
269
  forceShow = false,
270
+ delayDuration,
270
271
  // trigger props
271
272
  triggerAsChild = false
272
273
  }) => {
@@ -286,6 +287,7 @@ var Tooltip = ({
286
287
  {
287
288
  open: !!tooltip && (open || forceShow) && !forceHide,
288
289
  onOpenChange: setOpen,
290
+ delayDuration,
289
291
  disableHoverableContent: isActionVariant,
290
292
  children: [
291
293
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -397,6 +399,7 @@ var Keboola = react.forwardRef(
397
399
  width: size,
398
400
  height: size,
399
401
  viewBox: "0 0 300 512",
402
+ overflow: "visible",
400
403
  fill: color,
401
404
  className: cn("lucide", className),
402
405
  ...rest,
@@ -961,14 +964,9 @@ var getLanguageMode = (mode) => {
961
964
  return langJson.json();
962
965
  }
963
966
  };
967
+ var shouldLintJson = (mode, readOnly) => mode === "application/json" && !readOnly;
964
968
  var KbdSeparator = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("span", { ...props, className: cn("tw-text-xs tw-text-muted-foreground", className) });
965
- var KbdGroup = ({
966
- ref,
967
- className,
968
- children,
969
- separator,
970
- ...props
971
- }) => {
969
+ var KbdGroup = ({ ref, className, children, separator, ...props }) => {
972
970
  return /* @__PURE__ */ jsxRuntime.jsx(
973
971
  "kbd",
974
972
  {
@@ -1059,7 +1057,7 @@ var CodeEditor = ({
1059
1057
  const commonExtensions = react.useMemo(() => {
1060
1058
  return [
1061
1059
  getLanguageMode(mode),
1062
- mode === "application/json" && lint.linter(langJson.jsonParseLinter()),
1060
+ shouldLintJson(mode, readOnly) && lint.linter(langJson.jsonParseLinter()),
1063
1061
  withLineWrapping ? view.EditorView.lineWrapping : [],
1064
1062
  CodeMirror.EditorState.languageData.of(() => [
1065
1063
  { autocomplete: completeAny ? autocomplete.completeAnyWord : autocompletions }
@@ -1077,7 +1075,7 @@ var CodeEditor = ({
1077
1075
  autocomplete.autocompletion({ activateOnTyping: completeAny }),
1078
1076
  baseTheme
1079
1077
  ].filter(Boolean);
1080
- }, [autocompletions, completeAny, extraKeys, mode, withLineWrapping, baseTheme]);
1078
+ }, [autocompletions, completeAny, extraKeys, mode, readOnly, withLineWrapping, baseTheme]);
1081
1079
  const extensions = react.useMemo(() => {
1082
1080
  return [
1083
1081
  ...commonExtensions,