@discuss-ds/ui 0.15.0 → 0.16.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 +5 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.js +5 -5
- 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.16.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#70](https://github.com/TamyresLucas/Discuss-UI-Storybook/pull/70) [`d0d0a23`](https://github.com/TamyresLucas/Discuss-UI-Storybook/commit/d0d0a23de66894ce7d569f13c5129faad72e83d9) Thanks [@TamyresLucas](https://github.com/TamyresLucas)! - QuestionOptionEditor: new optional `locked` prop keeps the label editable but removes the drag grip and the remove and add buttons, for editing a translation of options that are shared with the original. Nothing changes for existing callers.
|
|
8
|
+
|
|
3
9
|
## 0.15.0
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
package/dist/index.cjs
CHANGED
|
@@ -3030,7 +3030,7 @@ var QuestionOtherOption = React44.forwardRef(
|
|
|
3030
3030
|
}
|
|
3031
3031
|
);
|
|
3032
3032
|
QuestionOtherOption.displayName = "QuestionOtherOption";
|
|
3033
|
-
function QuestionOptionEditor({ label, onLabelChange, onRemove, onAdd, className, kind, rank, dragHandleProps, lifted }) {
|
|
3033
|
+
function QuestionOptionEditor({ label, onLabelChange, onRemove, onAdd, className, kind, rank, dragHandleProps, lifted, locked }) {
|
|
3034
3034
|
const reveal = kind !== void 0;
|
|
3035
3035
|
const gripProps = dragHandleProps ? {
|
|
3036
3036
|
"aria-label": rank ? `Reorder option ${rank}` : "Reorder option",
|
|
@@ -3051,7 +3051,7 @@ function QuestionOptionEditor({ label, onLabelChange, onRemove, onAdd, className
|
|
|
3051
3051
|
),
|
|
3052
3052
|
children: [
|
|
3053
3053
|
kind === "rank" ? /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_jsx_runtime45.Fragment, { children: [
|
|
3054
|
-
grip,
|
|
3054
|
+
!locked && grip,
|
|
3055
3055
|
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
3056
3056
|
"span",
|
|
3057
3057
|
{
|
|
@@ -3060,7 +3060,7 @@ function QuestionOptionEditor({ label, onLabelChange, onRemove, onAdd, className
|
|
|
3060
3060
|
children: rank
|
|
3061
3061
|
}
|
|
3062
3062
|
)
|
|
3063
|
-
] }) : reveal ? /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("span", { ...gripProps, className: cn("relative flex size-5 shrink-0 items-center justify-center", gripProps.className), children: [
|
|
3063
|
+
] }) : reveal && locked ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { "aria-hidden": "true", className: "relative flex size-5 shrink-0 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: cn("inline-flex size-4 border-2 border-input bg-surface", kind === "radio" ? "rounded-full" : "rounded-xxs") }) }) : reveal ? /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("span", { ...gripProps, className: cn("relative flex size-5 shrink-0 items-center justify-center", gripProps.className), children: [
|
|
3064
3064
|
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
3065
3065
|
"span",
|
|
3066
3066
|
{
|
|
@@ -3083,7 +3083,7 @@ function QuestionOptionEditor({ label, onLabelChange, onRemove, onAdd, className
|
|
|
3083
3083
|
)
|
|
3084
3084
|
}
|
|
3085
3085
|
)
|
|
3086
|
-
] }) : grip,
|
|
3086
|
+
] }) : locked ? null : grip,
|
|
3087
3087
|
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
3088
3088
|
"input",
|
|
3089
3089
|
{
|
|
@@ -3096,7 +3096,7 @@ function QuestionOptionEditor({ label, onLabelChange, onRemove, onAdd, className
|
|
|
3096
3096
|
]
|
|
3097
3097
|
}
|
|
3098
3098
|
),
|
|
3099
|
-
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
3099
|
+
!locked && /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
3100
3100
|
"div",
|
|
3101
3101
|
{
|
|
3102
3102
|
className: cn(
|