@discuss-ds/ui 0.27.0 → 0.28.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.28.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#100](https://github.com/TamyresLucas/Discuss-UI-Storybook/pull/100) [`0fc18de`](https://github.com/TamyresLucas/Discuss-UI-Storybook/commit/0fc18ded23abc77fedb0af83fe7a23fe55816e22) Thanks [@TamyresLucas](https://github.com/TamyresLucas)! - `QuestionEditorCard` and `QuestionHeader` take an optional `titlePlaceholder` (default unchanged: "Click to write the question text"), and `QuestionOptionEditor` takes an optional `placeholder` for its empty option text.
8
+
3
9
  ## 0.27.0
4
10
 
5
11
  ### Minor Changes
package/dist/index.cjs CHANGED
@@ -2809,7 +2809,7 @@ var import_react19 = require("@phosphor-icons/react");
2809
2809
  var import_jsx_runtime41 = require("react/jsx-runtime");
2810
2810
  var eyebrow = "text-ui-caption uppercase text-secondary-muted-foreground";
2811
2811
  var QuestionHeader = React40.forwardRef(
2812
- ({ className, number, title, required, error, onDismissError, editor, onTitleChange, actions, meta, maxLength = 2e3, active, showCounter = true, dragHandleProps, showDragHandle = true, ...props }, ref) => {
2812
+ ({ className, number, title, required, error, onDismissError, editor, onTitleChange, titlePlaceholder = "Click to write the question text", actions, meta, maxLength = 2e3, active, showCounter = true, dragHandleProps, showDragHandle = true, ...props }, ref) => {
2813
2813
  const [draft, setDraft] = React40.useState(null);
2814
2814
  const label = String(number).padStart(2, "0");
2815
2815
  const showError = error !== void 0 && error !== false;
@@ -2863,7 +2863,7 @@ var QuestionHeader = React40.forwardRef(
2863
2863
  selected: active,
2864
2864
  className: "-mx-3 w-auto",
2865
2865
  "aria-label": "Question title",
2866
- placeholder: "Click to write the question text",
2866
+ placeholder: titlePlaceholder,
2867
2867
  value: text,
2868
2868
  maxLength,
2869
2869
  onValueChange: onTitleChange,
@@ -2906,6 +2906,7 @@ var QuestionEditorCard = React41.forwardRef(
2906
2906
  number,
2907
2907
  title,
2908
2908
  onTitleChange,
2909
+ titlePlaceholder,
2909
2910
  active,
2910
2911
  hovered,
2911
2912
  maxLength,
@@ -2951,6 +2952,7 @@ var QuestionEditorCard = React41.forwardRef(
2951
2952
  number,
2952
2953
  title,
2953
2954
  onTitleChange,
2955
+ titlePlaceholder,
2954
2956
  active,
2955
2957
  showCounter: !!active,
2956
2958
  dragHandleProps,
@@ -3168,7 +3170,7 @@ var QuestionOtherOption = React44.forwardRef(
3168
3170
  }
3169
3171
  );
3170
3172
  QuestionOtherOption.displayName = "QuestionOtherOption";
3171
- function QuestionOptionEditor({ label, onLabelChange, onRemove, onAdd, removeDisabled, addDisabled, className, kind, rank, dragHandleProps, lifted, locked }) {
3173
+ function QuestionOptionEditor({ label, onLabelChange, placeholder, onRemove, onAdd, removeDisabled, addDisabled, className, kind, rank, dragHandleProps, lifted, locked }) {
3172
3174
  const reveal = kind !== void 0;
3173
3175
  const gripProps = dragHandleProps ? {
3174
3176
  "aria-label": rank ? `Reorder option ${rank}` : "Reorder option",
@@ -3226,6 +3228,7 @@ function QuestionOptionEditor({ label, onLabelChange, onRemove, onAdd, removeDis
3226
3228
  "input",
3227
3229
  {
3228
3230
  "aria-label": "Option label",
3231
+ placeholder,
3229
3232
  value: label,
3230
3233
  onChange: (event) => onLabelChange?.(event.target.value),
3231
3234
  className: "min-w-0 flex-1 bg-transparent text-body-base text-surface-foreground outline-none"