@discuss-ds/ui 0.26.0 → 0.27.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 +6 -0
- package/dist/index.cjs +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @discuss-ds/ui
|
|
2
2
|
|
|
3
|
+
## 0.27.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#98](https://github.com/TamyresLucas/Discuss-UI-Storybook/pull/98) [`9c29e17`](https://github.com/TamyresLucas/Discuss-UI-Storybook/commit/9c29e17ecae358617451931fd003d6406c894c74) Thanks [@TamyresLucas](https://github.com/TamyresLucas)! - `QuestionOptionEditor` takes optional `removeDisabled` and `addDisabled` props that disable its trash and add (+) buttons, for example at a question's minimum or maximum number of options. Without them nothing changes.
|
|
8
|
+
|
|
3
9
|
## 0.26.0
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
package/dist/index.cjs
CHANGED
|
@@ -3168,7 +3168,7 @@ var QuestionOtherOption = React44.forwardRef(
|
|
|
3168
3168
|
}
|
|
3169
3169
|
);
|
|
3170
3170
|
QuestionOtherOption.displayName = "QuestionOtherOption";
|
|
3171
|
-
function QuestionOptionEditor({ label, onLabelChange, onRemove, onAdd, className, kind, rank, dragHandleProps, lifted, locked }) {
|
|
3171
|
+
function QuestionOptionEditor({ label, onLabelChange, onRemove, onAdd, removeDisabled, addDisabled, className, kind, rank, dragHandleProps, lifted, locked }) {
|
|
3172
3172
|
const reveal = kind !== void 0;
|
|
3173
3173
|
const gripProps = dragHandleProps ? {
|
|
3174
3174
|
"aria-label": rank ? `Reorder option ${rank}` : "Reorder option",
|
|
@@ -3242,8 +3242,8 @@ function QuestionOptionEditor({ label, onLabelChange, onRemove, onAdd, className
|
|
|
3242
3242
|
reveal && "opacity-0 transition-opacity group-hover/option:opacity-100 group-focus-within/option:opacity-100"
|
|
3243
3243
|
),
|
|
3244
3244
|
children: [
|
|
3245
|
-
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Button, { type: "button", variant: "destructive", size: "icon-sm", "aria-label": "Remove option", onClick: onRemove, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react23.Trash, { size: 16, "aria-hidden": true }) }),
|
|
3246
|
-
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Button, { type: "button", variant: "ghost", size: "icon-sm", "aria-label": "Add option", onClick: onAdd, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react23.Plus, { size: 16, "aria-hidden": true }) })
|
|
3245
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Button, { type: "button", variant: "destructive", size: "icon-sm", "aria-label": "Remove option", disabled: removeDisabled, onClick: onRemove, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react23.Trash, { size: 16, "aria-hidden": true }) }),
|
|
3246
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Button, { type: "button", variant: "ghost", size: "icon-sm", "aria-label": "Add option", disabled: addDisabled, onClick: onAdd, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react23.Plus, { size: 16, "aria-hidden": true }) })
|
|
3247
3247
|
]
|
|
3248
3248
|
}
|
|
3249
3249
|
)
|