@discuss-ds/ui 0.6.3 → 0.7.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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @discuss-ds/ui
2
2
 
3
+ ## 0.7.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#39](https://github.com/TamyresLucas/Discuss-UI-Storybook/pull/39) [`2bc5789`](https://github.com/TamyresLucas/Discuss-UI-Storybook/commit/2bc5789c1a0b9d55686664ac93cc9a313fc5f6fb) Thanks [@TamyresLucas](https://github.com/TamyresLucas)! - `FileUploadItem`: the "Complete" / "Error" status tag now sits to the right of the file size on the second line instead of beside the file name, so a long name can use the full first line. No API change.
8
+
9
+ ## 0.7.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [#37](https://github.com/TamyresLucas/Discuss-UI-Storybook/pull/37) [`2eae2f2`](https://github.com/TamyresLucas/Discuss-UI-Storybook/commit/2eae2f2ec0cfe3d2a3ea9a8e6256158b69a0b9dd) Thanks [@TamyresLucas](https://github.com/TamyresLucas)! - `QuestionOptionEditor`: new `kind="rank"` (with a `rank` position prop) for ranking questions. The row keeps its drag handle and round position number at rest and, like the radio and checkbox kinds, becomes the editor on hover or keyboard focus (shadow lifts, remove and add buttons appear). Existing kinds and the always-on editor row are unchanged.
14
+
3
15
  ## 0.6.3
4
16
 
5
17
  ### Patch Changes
package/dist/index.cjs CHANGED
@@ -2347,16 +2347,14 @@ var FileUploadItem = React36.forwardRef(
2347
2347
  /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "flex size-10 shrink-0 items-center justify-center rounded-full bg-background bg-linear-to-r from-overlay-dark-5 to-overlay-dark-5 text-surface-foreground", children: icon ?? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_react17.FileText, { size: 24, "aria-hidden": true }) }),
2348
2348
  /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col gap-1", children: [
2349
2349
  /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "flex items-center justify-between gap-2", children: [
2350
- /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "flex min-w-0 items-center gap-2", children: [
2351
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("p", { className: "truncate text-ui-label text-surface-foreground", children: name }),
2352
- status === "complete" && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Tag, { variant: "success", children: "Complete" }),
2353
- status === "error" && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Tag, { variant: "destructive", children: "Error" })
2354
- ] }),
2350
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("p", { className: "min-w-0 truncate text-ui-label text-surface-foreground", children: name }),
2355
2351
  onRemove && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Button, { type: "button", variant: "ghost", size: "icon-sm", "aria-label": removeLabel ?? `Remove ${name}`, onClick: onRemove, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_react17.X, { size: 16, "aria-hidden": true }) })
2356
2352
  ] }),
2357
2353
  /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "flex items-center justify-between text-ui-caption text-secondary-muted-foreground", children: [
2358
2354
  /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("span", { className: "flex items-center gap-2", children: [
2359
2355
  size,
2356
+ status === "complete" && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Tag, { variant: "success", children: "Complete" }),
2357
+ status === "error" && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Tag, { variant: "destructive", children: "Error" }),
2360
2358
  uploading && timeLeft && /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_jsx_runtime37.Fragment, { children: [
2361
2359
  /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { "aria-hidden": "true", className: "size-0.5 rounded-full bg-secondary-muted-foreground" }),
2362
2360
  timeLeft
@@ -2990,7 +2988,7 @@ var QuestionOtherOption = React44.forwardRef(
2990
2988
  }
2991
2989
  );
2992
2990
  QuestionOtherOption.displayName = "QuestionOtherOption";
2993
- function QuestionOptionEditor({ label, onLabelChange, onRemove, onAdd, className, kind }) {
2991
+ function QuestionOptionEditor({ label, onLabelChange, onRemove, onAdd, className, kind, rank }) {
2994
2992
  const reveal = kind !== void 0;
2995
2993
  return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: cn("group/option flex w-full items-center gap-2", className), children: [
2996
2994
  /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
@@ -3004,7 +3002,17 @@ function QuestionOptionEditor({ label, onLabelChange, onRemove, onAdd, className
3004
3002
  ) : "border-border hover:border-input hover:shadow-md"
3005
3003
  ),
3006
3004
  children: [
3007
- reveal ? /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("span", { "aria-hidden": "true", className: "relative flex size-5 shrink-0 items-center justify-center", children: [
3005
+ kind === "rank" ? /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_jsx_runtime45.Fragment, { children: [
3006
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react23.DotsSixVertical, { size: 20, "aria-hidden": true, className: "shrink-0 text-surface-foreground" }),
3007
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
3008
+ "span",
3009
+ {
3010
+ "aria-hidden": "true",
3011
+ className: "flex size-6 shrink-0 items-center justify-center rounded-full border border-border bg-background bg-linear-to-r from-overlay-dark-5 to-overlay-dark-5 text-ui-caption text-surface-foreground",
3012
+ children: rank
3013
+ }
3014
+ )
3015
+ ] }) : reveal ? /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("span", { "aria-hidden": "true", className: "relative flex size-5 shrink-0 items-center justify-center", children: [
3008
3016
  /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
3009
3017
  "span",
3010
3018
  {