@keboola/design 3.2.0 → 4.0.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.
@@ -57,9 +57,10 @@ type MarkdownEditorProps = {
57
57
  */
58
58
  singleLine?: boolean;
59
59
  /**
60
- * Clamps content to ~2 lines with a bottom fade in the display (not-focused) state;
61
- * focus expands the editor to full height (no clamp). Per the inline-editable-text
62
- * pattern spec for description-style slots — fade replaces truncation/ellipsis.
60
+ * Clamps content to 2 lines (truncating with an ellipsis) in the display (not-focused)
61
+ * state; focus expands the editor to full height (no clamp). `line-clamp` is self-gating,
62
+ * so short/empty content renders fully with no truncation. Per the inline-editable-text
63
+ * pattern spec for description-style slots.
63
64
  */
64
65
  clampDisplay?: boolean;
65
66
  /**
@@ -57,9 +57,10 @@ type MarkdownEditorProps = {
57
57
  */
58
58
  singleLine?: boolean;
59
59
  /**
60
- * Clamps content to ~2 lines with a bottom fade in the display (not-focused) state;
61
- * focus expands the editor to full height (no clamp). Per the inline-editable-text
62
- * pattern spec for description-style slots — fade replaces truncation/ellipsis.
60
+ * Clamps content to 2 lines (truncating with an ellipsis) in the display (not-focused)
61
+ * state; focus expands the editor to full height (no clamp). `line-clamp` is self-gating,
62
+ * so short/empty content renders fully with no truncation. Per the inline-editable-text
63
+ * pattern spec for description-style slots.
63
64
  */
64
65
  clampDisplay?: boolean;
65
66
  /**
@@ -4483,10 +4483,10 @@ var MarkdownEditor = ({
4483
4483
  // adjacent-sibling selector for paragraph spacing so single-paragraph blocks (titles,
4484
4484
  // short descriptions) stay tight while multi-paragraph blocks still breathe.
4485
4485
  compact && "[&_p]:tw-m-0 [&_p+p]:tw-mt-2",
4486
- // Display-state clamp: 2 lines + bottom fade. Drops in focus-within so editing
4487
- // expands to full height. Fade replaces ellipsis per the pattern spec — the
4488
- // mask gradient overlays line-clamp's default ellipsis so it's invisible.
4489
- clampDisplay && "[&:not(:focus-within)]:tw-line-clamp-2 [&:not(:focus-within)]:[mask-image:linear-gradient(to_bottom,black_50%,transparent)]",
4486
+ // Display-state clamp: 2 lines, dropped in focus-within so editing expands to full
4487
+ // height. line-clamp is self-gating (no effect below 3 lines), so short/empty content
4488
+ // renders clean; a CSS fade can't gate on overflow without JS, so it's omitted.
4489
+ clampDisplay && "[&:not(:focus-within)]:tw-line-clamp-2",
4490
4490
  className
4491
4491
  ),
4492
4492
  onBlur: handleBlur,