@discuss-ds/ui 0.29.0 → 0.29.1
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 +8 -0
- package/dist/index.cjs +58 -58
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +58 -58
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3066,7 +3066,7 @@ function QuestionOptionEditor({ label, onLabelChange, placeholder, placeholderTo
|
|
|
3066
3066
|
} : { "aria-hidden": true };
|
|
3067
3067
|
const grip = dragHandleProps ? /* @__PURE__ */ jsx45("span", { ...gripProps, className: cn("shrink-0", gripProps.className), children: /* @__PURE__ */ jsx45(DotsSixVertical3, { size: 20, "aria-hidden": true, className: "text-surface-foreground" }) }) : /* @__PURE__ */ jsx45(DotsSixVertical3, { size: 20, "aria-hidden": true, className: "shrink-0 text-surface-foreground" });
|
|
3068
3068
|
return /* @__PURE__ */ jsxs32("div", { className: cn("group/option flex w-full items-center gap-2", className), children: [
|
|
3069
|
-
/* @__PURE__ */
|
|
3069
|
+
/* @__PURE__ */ jsx45(
|
|
3070
3070
|
"div",
|
|
3071
3071
|
{
|
|
3072
3072
|
className: cn(
|
|
@@ -3076,42 +3076,42 @@ function QuestionOptionEditor({ label, onLabelChange, placeholder, placeholderTo
|
|
|
3076
3076
|
cn("border-border group-hover/option:shadow-md group-focus-within/option:shadow-md", lifted && "shadow-md")
|
|
3077
3077
|
) : "border-border hover:border-input-muted hover:shadow-md"
|
|
3078
3078
|
),
|
|
3079
|
-
children: [
|
|
3080
|
-
/* @__PURE__ */
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
|
|
3087
|
-
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
|
|
3108
|
-
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3079
|
+
children: /* @__PURE__ */ jsxs32("div", { className: "flex min-w-0 items-start gap-2", children: [
|
|
3080
|
+
(kind !== void 0 || !locked) && /* @__PURE__ */ jsx45("div", { className: "flex h-7 shrink-0 items-center gap-2", children: kind === "rank" ? /* @__PURE__ */ jsxs32(Fragment9, { children: [
|
|
3081
|
+
!locked && grip,
|
|
3082
|
+
/* @__PURE__ */ jsx45(
|
|
3083
|
+
"span",
|
|
3084
|
+
{
|
|
3085
|
+
"aria-hidden": "true",
|
|
3086
|
+
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",
|
|
3087
|
+
children: rank
|
|
3088
|
+
}
|
|
3089
|
+
)
|
|
3090
|
+
] }) : reveal && locked ? /* @__PURE__ */ jsx45("span", { "aria-hidden": "true", className: "relative flex size-5 shrink-0 items-center justify-center", children: /* @__PURE__ */ jsx45("span", { className: cn("inline-flex size-4 border-2 border-input bg-surface", kind === "radio" ? "rounded-full" : "rounded-xxs") }) }) : reveal ? /* @__PURE__ */ jsxs32("span", { ...gripProps, className: cn("relative flex size-5 shrink-0 items-center justify-center", gripProps.className), children: [
|
|
3091
|
+
/* @__PURE__ */ jsx45(
|
|
3092
|
+
"span",
|
|
3093
|
+
{
|
|
3094
|
+
"aria-hidden": "true",
|
|
3095
|
+
className: cn(
|
|
3096
|
+
"inline-flex size-4 border-2 border-input bg-surface group-hover/option:hidden group-focus-within/option:hidden",
|
|
3097
|
+
lifted && "hidden",
|
|
3098
|
+
kind === "radio" ? "rounded-full" : "rounded-xxs"
|
|
3099
|
+
)
|
|
3100
|
+
}
|
|
3101
|
+
),
|
|
3102
|
+
/* @__PURE__ */ jsx45(
|
|
3103
|
+
DotsSixVertical3,
|
|
3104
|
+
{
|
|
3105
|
+
size: 20,
|
|
3106
|
+
"aria-hidden": true,
|
|
3107
|
+
className: cn(
|
|
3108
|
+
"hidden shrink-0 text-surface-foreground group-hover/option:block group-focus-within/option:block",
|
|
3109
|
+
lifted && "block"
|
|
3110
|
+
)
|
|
3111
|
+
}
|
|
3112
|
+
)
|
|
3113
|
+
] }) : locked ? null : grip }),
|
|
3114
|
+
/* @__PURE__ */ jsxs32("div", { className: "flex min-w-0 flex-1 flex-col gap-1", children: [
|
|
3115
3115
|
/* @__PURE__ */ jsx45(
|
|
3116
3116
|
"input",
|
|
3117
3117
|
{
|
|
@@ -3158,28 +3158,28 @@ function QuestionOptionEditor({ label, onLabelChange, placeholder, placeholderTo
|
|
|
3158
3158
|
placeholderTone === "regular" ? "placeholder:text-surface-foreground" : "placeholder:text-muted-foreground"
|
|
3159
3159
|
)
|
|
3160
3160
|
}
|
|
3161
|
+
),
|
|
3162
|
+
guarded && draft !== null && /* @__PURE__ */ jsxs32(
|
|
3163
|
+
"p",
|
|
3164
|
+
{
|
|
3165
|
+
id: helperId,
|
|
3166
|
+
role: error ? "alert" : void 0,
|
|
3167
|
+
className: cn("flex items-start justify-between gap-2 text-ui-caption", error ? "text-destructive" : "text-secondary-muted-foreground"),
|
|
3168
|
+
children: [
|
|
3169
|
+
/* @__PURE__ */ jsxs32("span", { className: "flex items-start gap-2", children: [
|
|
3170
|
+
error && /* @__PURE__ */ jsx45(WarningCircle4, { size: 16, "aria-hidden": true, className: "shrink-0" }),
|
|
3171
|
+
limitsText2(minLength, maxLength),
|
|
3172
|
+
error && /* @__PURE__ */ jsx45("span", { className: "sr-only", children: error })
|
|
3173
|
+
] }),
|
|
3174
|
+
/* @__PURE__ */ jsxs32("span", { "aria-hidden": true, className: "shrink-0 tabular-nums", children: [
|
|
3175
|
+
draft.length,
|
|
3176
|
+
maxLength !== void 0 && `/${maxLength}`
|
|
3177
|
+
] })
|
|
3178
|
+
]
|
|
3179
|
+
}
|
|
3161
3180
|
)
|
|
3162
|
-
] })
|
|
3163
|
-
|
|
3164
|
-
"p",
|
|
3165
|
-
{
|
|
3166
|
-
id: helperId,
|
|
3167
|
-
role: error ? "alert" : void 0,
|
|
3168
|
-
className: cn("flex items-start justify-between gap-2 text-ui-caption", error ? "text-destructive" : "text-secondary-muted-foreground"),
|
|
3169
|
-
children: [
|
|
3170
|
-
/* @__PURE__ */ jsxs32("span", { className: "flex items-start gap-2", children: [
|
|
3171
|
-
error && /* @__PURE__ */ jsx45(WarningCircle4, { size: 16, "aria-hidden": true, className: "shrink-0" }),
|
|
3172
|
-
limitsText2(minLength, maxLength),
|
|
3173
|
-
error && /* @__PURE__ */ jsx45("span", { className: "sr-only", children: error })
|
|
3174
|
-
] }),
|
|
3175
|
-
/* @__PURE__ */ jsxs32("span", { "aria-hidden": true, className: "shrink-0 tabular-nums", children: [
|
|
3176
|
-
draft.length,
|
|
3177
|
-
maxLength !== void 0 && `/${maxLength}`
|
|
3178
|
-
] })
|
|
3179
|
-
]
|
|
3180
|
-
}
|
|
3181
|
-
)
|
|
3182
|
-
]
|
|
3181
|
+
] })
|
|
3182
|
+
] })
|
|
3183
3183
|
}
|
|
3184
3184
|
),
|
|
3185
3185
|
!locked && /* @__PURE__ */ jsxs32(
|