@discuss-ds/ui 0.3.1 → 0.3.2

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/index.d.cts CHANGED
@@ -343,7 +343,7 @@ interface InlineEditProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'on
343
343
  /**
344
344
  * `default` is a rounded field. A short single-line label shows the pencil and hugs its text; `multiline` (longer
345
345
  * text) hides the pencil and fills the width. `question` is for question text: it fills the width with no pencil,
346
- * has square corners and shows a bottom border on hover and focus (in the input border colour) that turns accent while `selected`. Enter saves; Shift+Enter adds a
346
+ * has square corners and shows a 1px bottom border on hover and focus (in the input border colour) that becomes a bolder 2px accent border while `selected`. Enter saves; Shift+Enter adds a
347
347
  * line break when `multiline`.
348
348
  */
349
349
  variant?: 'default' | 'question';
package/dist/index.d.ts CHANGED
@@ -343,7 +343,7 @@ interface InlineEditProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'on
343
343
  /**
344
344
  * `default` is a rounded field. A short single-line label shows the pencil and hugs its text; `multiline` (longer
345
345
  * text) hides the pencil and fills the width. `question` is for question text: it fills the width with no pencil,
346
- * has square corners and shows a bottom border on hover and focus (in the input border colour) that turns accent while `selected`. Enter saves; Shift+Enter adds a
346
+ * has square corners and shows a 1px bottom border on hover and focus (in the input border colour) that becomes a bolder 2px accent border while `selected`. Enter saves; Shift+Enter adds a
347
347
  * line break when `multiline`.
348
348
  */
349
349
  variant?: 'default' | 'question';
package/dist/index.js CHANGED
@@ -1458,12 +1458,13 @@ var InlineEdit = React24.forwardRef(
1458
1458
  "aria-label": `${ariaLabel}: ${value || placeholder}. Edit`,
1459
1459
  onClick: start,
1460
1460
  className: cn(
1461
- "group inline-flex min-w-0 max-w-full items-center gap-2 px-3 py-1 text-left outline-none",
1461
+ "group inline-flex min-w-0 max-w-full items-center gap-2 px-3 text-left outline-none",
1462
1462
  fill && "w-full",
1463
1463
  question ? (
1464
- // Hover and focus use the input border colour; only a selected question takes the accent.
1465
- cn("rounded-none border-b-2", selected ? "border-accent-foreground" : "border-transparent enabled:hover:border-input enabled:focus-visible:border-input")
1466
- ) : "rounded-md border border-transparent enabled:focus-visible:border-input-accent",
1464
+ // Hover and focus show a 1px bottom border in the input colour; only a selected question gets the 2px accent
1465
+ // one. The extra 1px of bottom padding keeps the height identical so the text never jumps.
1466
+ selected ? "rounded-none border-b-2 border-accent-foreground py-1" : "rounded-none border-b border-transparent pb-1.25 pt-1 enabled:hover:border-input enabled:focus-visible:border-input"
1467
+ ) : "rounded-md border border-transparent py-1 enabled:focus-visible:border-input-accent",
1467
1468
  "enabled:hover:bg-secondary disabled:cursor-not-allowed disabled:opacity-50",
1468
1469
  textClasses
1469
1470
  ),