@discuss-ds/ui 0.6.2 → 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,17 @@
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
+
9
+ ## 0.6.3
10
+
11
+ ### Patch Changes
12
+
13
+ - [#35](https://github.com/TamyresLucas/Discuss-UI-Storybook/pull/35) [`323ace1`](https://github.com/TamyresLucas/Discuss-UI-Storybook/commit/323ace193c8a545fb6b659ed7cd524bc953f2215) Thanks [@TamyresLucas](https://github.com/TamyresLucas)! - `QuestionEditorCard`: hovering anywhere on the card now gives the "Question N" tag its hover look (grip icon shown, tighter left padding), not only when the tag itself is hovered. `QuestionHeader` used on its own is unchanged.
14
+
3
15
  ## 0.6.2
4
16
 
5
17
  ### Patch Changes
package/dist/index.cjs CHANGED
@@ -2665,6 +2665,8 @@ var QuestionHeader = React40.forwardRef(
2665
2665
  ...dragHandleProps,
2666
2666
  className: cn(
2667
2667
  "group/handle inline-flex h-6 items-center gap-1 rounded-sm px-2.5 text-ui-caption hover:pl-1",
2668
+ // Inside a QuestionEditorCard the tag takes its hover look whenever the card is hovered.
2669
+ "group-hover/editor:pl-1",
2668
2670
  active ? "bg-accent-soft text-accent-soft-foreground" : "bg-secondary bg-linear-to-r from-overlay-dark-5 to-overlay-dark-5 text-surface-foreground",
2669
2671
  dragHandleProps && "cursor-grab touch-none select-none focus-visible:pl-1",
2670
2672
  dragHandleProps?.className
@@ -2675,7 +2677,7 @@ var QuestionHeader = React40.forwardRef(
2675
2677
  {
2676
2678
  size: 16,
2677
2679
  "aria-hidden": true,
2678
- className: "hidden shrink-0 group-hover/handle:block group-focus-visible/handle:block"
2680
+ className: "hidden shrink-0 group-hover/editor:block group-hover/handle:block group-focus-visible/handle:block"
2679
2681
  }
2680
2682
  ),
2681
2683
  "Question ",
@@ -2988,7 +2990,7 @@ var QuestionOtherOption = React44.forwardRef(
2988
2990
  }
2989
2991
  );
2990
2992
  QuestionOtherOption.displayName = "QuestionOtherOption";
2991
- function QuestionOptionEditor({ label, onLabelChange, onRemove, onAdd, className, kind }) {
2993
+ function QuestionOptionEditor({ label, onLabelChange, onRemove, onAdd, className, kind, rank }) {
2992
2994
  const reveal = kind !== void 0;
2993
2995
  return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: cn("group/option flex w-full items-center gap-2", className), children: [
2994
2996
  /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
@@ -3002,7 +3004,17 @@ function QuestionOptionEditor({ label, onLabelChange, onRemove, onAdd, className
3002
3004
  ) : "border-border hover:border-input hover:shadow-md"
3003
3005
  ),
3004
3006
  children: [
3005
- 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: [
3006
3018
  /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
3007
3019
  "span",
3008
3020
  {