@discuss-ds/ui 0.3.1 → 0.3.3
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/CHANGELOG.md +12 -0
- package/dist/index.cjs +13 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +13 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
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
|
|
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
|
|
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
|
|
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
|
|
1465
|
-
|
|
1466
|
-
|
|
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
|
),
|
|
@@ -2755,7 +2756,14 @@ var QuestionNavItem = React43.forwardRef(
|
|
|
2755
2756
|
children: [
|
|
2756
2757
|
/* @__PURE__ */ jsxs30("span", { "aria-hidden": "true", className: "relative flex size-4 shrink-0 items-center justify-center", children: [
|
|
2757
2758
|
/* @__PURE__ */ jsx44(DotsSixVertical2, { size: 16, className: "hidden group-hover/nav:block" }),
|
|
2758
|
-
/* @__PURE__ */ jsx44("span", { className: "group-hover/nav:hidden", children: error ? /* @__PURE__ */ jsx44(Warning2, { size: 16, className: "text-destructive" }) : /* @__PURE__ */ jsx44(
|
|
2759
|
+
/* @__PURE__ */ jsx44("span", { className: "group-hover/nav:hidden", children: error ? /* @__PURE__ */ jsx44(Warning2, { size: 16, className: "text-destructive" }) : /* @__PURE__ */ jsx44(
|
|
2760
|
+
QuestionTypeIcon,
|
|
2761
|
+
{
|
|
2762
|
+
type: questionType,
|
|
2763
|
+
size: 16,
|
|
2764
|
+
className: selected ? "text-accent-foreground" : "text-muted-foreground"
|
|
2765
|
+
}
|
|
2766
|
+
) })
|
|
2759
2767
|
] }),
|
|
2760
2768
|
/* @__PURE__ */ jsx44("span", { className: "min-w-0 flex-1 truncate", children }),
|
|
2761
2769
|
error && /* @__PURE__ */ jsx44("span", { className: "sr-only", children: ", has errors" })
|