@discuss-ds/ui 0.6.3 → 0.7.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @discuss-ds/ui
2
2
 
3
+ ## 0.7.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#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.
8
+
3
9
  ## 0.6.3
4
10
 
5
11
  ### Patch Changes
package/dist/index.cjs CHANGED
@@ -2990,7 +2990,7 @@ var QuestionOtherOption = React44.forwardRef(
2990
2990
  }
2991
2991
  );
2992
2992
  QuestionOtherOption.displayName = "QuestionOtherOption";
2993
- function QuestionOptionEditor({ label, onLabelChange, onRemove, onAdd, className, kind }) {
2993
+ function QuestionOptionEditor({ label, onLabelChange, onRemove, onAdd, className, kind, rank }) {
2994
2994
  const reveal = kind !== void 0;
2995
2995
  return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: cn("group/option flex w-full items-center gap-2", className), children: [
2996
2996
  /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
@@ -3004,7 +3004,17 @@ function QuestionOptionEditor({ label, onLabelChange, onRemove, onAdd, className
3004
3004
  ) : "border-border hover:border-input hover:shadow-md"
3005
3005
  ),
3006
3006
  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: [
3007
+ kind === "rank" ? /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_jsx_runtime45.Fragment, { children: [
3008
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react23.DotsSixVertical, { size: 20, "aria-hidden": true, className: "shrink-0 text-surface-foreground" }),
3009
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
3010
+ "span",
3011
+ {
3012
+ "aria-hidden": "true",
3013
+ 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",
3014
+ children: rank
3015
+ }
3016
+ )
3017
+ ] }) : reveal ? /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("span", { "aria-hidden": "true", className: "relative flex size-5 shrink-0 items-center justify-center", children: [
3008
3018
  /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
3009
3019
  "span",
3010
3020
  {