@discuss-ds/ui 0.3.0 → 0.3.1

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, focus and while `selected`. Enter saves; Shift+Enter adds a
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
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, focus and while `selected`. Enter saves; Shift+Enter adds a
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
347
347
  * line break when `multiline`.
348
348
  */
349
349
  variant?: 'default' | 'question';
package/dist/index.js CHANGED
@@ -1430,7 +1430,7 @@ var InlineEdit = React24.forwardRef(
1430
1430
  className: cn(
1431
1431
  "w-full px-3 py-1 outline-none",
1432
1432
  multiline && "field-sizing-content resize-none",
1433
- question ? "rounded-none border-0 border-b-2 border-input-accent bg-transparent" : cn("rounded-md focus-visible:border-input-accent", fieldSurfaceClasses("default")),
1433
+ question ? "rounded-none border-0 border-b-2 border-accent-foreground bg-transparent" : cn("rounded-md focus-visible:border-input-accent", fieldSurfaceClasses("default")),
1434
1434
  textClasses
1435
1435
  ),
1436
1436
  onChange: (event) => {
@@ -1460,9 +1460,11 @@ var InlineEdit = React24.forwardRef(
1460
1460
  className: cn(
1461
1461
  "group inline-flex min-w-0 max-w-full items-center gap-2 px-3 py-1 text-left outline-none",
1462
1462
  fill && "w-full",
1463
- question ? cn("rounded-none border-b-2", selected ? "border-input-accent" : "border-transparent") : "rounded-md border border-transparent",
1464
- "enabled:hover:bg-secondary enabled:focus-visible:border-input-accent disabled:cursor-not-allowed disabled:opacity-50",
1465
- question && "enabled:hover:border-input-accent",
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",
1467
+ "enabled:hover:bg-secondary disabled:cursor-not-allowed disabled:opacity-50",
1466
1468
  textClasses
1467
1469
  ),
1468
1470
  children: [