@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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @discuss-ds/ui
|
|
2
2
|
|
|
3
|
+
## 0.29.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#104](https://github.com/TamyresLucas/Discuss-UI-Storybook/pull/104) [`1918d72`](https://github.com/TamyresLucas/Discuss-UI-Storybook/commit/1918d72cab1c11e67c889abd7158e3b07aabe365) Thanks [@TamyresLucas](https://github.com/TamyresLucas)! - `QuestionOptionEditor`: the helper line shown while a guarded option is edited lines up with the option text instead of the drag grip.
|
|
8
|
+
|
|
9
|
+
- [#106](https://github.com/TamyresLucas/Discuss-UI-Storybook/pull/106) [`3b04f34`](https://github.com/TamyresLucas/Discuss-UI-Storybook/commit/3b04f34cedb63b5ae41edefedb0ed13de28fc3b8) Thanks [@TamyresLucas](https://github.com/TamyresLucas)! - `QuestionOptionEditor`: the grip, indicator or number stays vertically centred with the option text in the default state.
|
|
10
|
+
|
|
3
11
|
## 0.29.0
|
|
4
12
|
|
|
5
13
|
### Minor Changes
|
package/dist/index.cjs
CHANGED
|
@@ -3212,7 +3212,7 @@ function QuestionOptionEditor({ label, onLabelChange, placeholder, placeholderTo
|
|
|
3212
3212
|
} : { "aria-hidden": true };
|
|
3213
3213
|
const grip = dragHandleProps ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { ...gripProps, className: cn("shrink-0", gripProps.className), children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react23.DotsSixVertical, { size: 20, "aria-hidden": true, className: "text-surface-foreground" }) }) : /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react23.DotsSixVertical, { size: 20, "aria-hidden": true, className: "shrink-0 text-surface-foreground" });
|
|
3214
3214
|
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: cn("group/option flex w-full items-center gap-2", className), children: [
|
|
3215
|
-
/* @__PURE__ */ (0, import_jsx_runtime45.
|
|
3215
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
3216
3216
|
"div",
|
|
3217
3217
|
{
|
|
3218
3218
|
className: cn(
|
|
@@ -3222,42 +3222,42 @@ function QuestionOptionEditor({ label, onLabelChange, placeholder, placeholderTo
|
|
|
3222
3222
|
cn("border-border group-hover/option:shadow-md group-focus-within/option:shadow-md", lifted && "shadow-md")
|
|
3223
3223
|
) : "border-border hover:border-input-muted hover:shadow-md"
|
|
3224
3224
|
),
|
|
3225
|
-
children: [
|
|
3226
|
-
/* @__PURE__ */ (0, import_jsx_runtime45.
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
|
|
3233
|
-
|
|
3234
|
-
|
|
3235
|
-
|
|
3236
|
-
|
|
3237
|
-
|
|
3238
|
-
|
|
3239
|
-
|
|
3240
|
-
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
|
|
3245
|
-
|
|
3246
|
-
|
|
3247
|
-
|
|
3248
|
-
|
|
3249
|
-
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
|
|
3253
|
-
|
|
3254
|
-
|
|
3255
|
-
|
|
3256
|
-
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
|
|
3260
|
-
|
|
3225
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "flex min-w-0 items-start gap-2", children: [
|
|
3226
|
+
(kind !== void 0 || !locked) && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "flex h-7 shrink-0 items-center gap-2", children: kind === "rank" ? /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_jsx_runtime45.Fragment, { children: [
|
|
3227
|
+
!locked && grip,
|
|
3228
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
3229
|
+
"span",
|
|
3230
|
+
{
|
|
3231
|
+
"aria-hidden": "true",
|
|
3232
|
+
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",
|
|
3233
|
+
children: rank
|
|
3234
|
+
}
|
|
3235
|
+
)
|
|
3236
|
+
] }) : 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: [
|
|
3237
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
3238
|
+
"span",
|
|
3239
|
+
{
|
|
3240
|
+
"aria-hidden": "true",
|
|
3241
|
+
className: cn(
|
|
3242
|
+
"inline-flex size-4 border-2 border-input bg-surface group-hover/option:hidden group-focus-within/option:hidden",
|
|
3243
|
+
lifted && "hidden",
|
|
3244
|
+
kind === "radio" ? "rounded-full" : "rounded-xxs"
|
|
3245
|
+
)
|
|
3246
|
+
}
|
|
3247
|
+
),
|
|
3248
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
3249
|
+
import_react23.DotsSixVertical,
|
|
3250
|
+
{
|
|
3251
|
+
size: 20,
|
|
3252
|
+
"aria-hidden": true,
|
|
3253
|
+
className: cn(
|
|
3254
|
+
"hidden shrink-0 text-surface-foreground group-hover/option:block group-focus-within/option:block",
|
|
3255
|
+
lifted && "block"
|
|
3256
|
+
)
|
|
3257
|
+
}
|
|
3258
|
+
)
|
|
3259
|
+
] }) : locked ? null : grip }),
|
|
3260
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col gap-1", children: [
|
|
3261
3261
|
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
3262
3262
|
"input",
|
|
3263
3263
|
{
|
|
@@ -3304,28 +3304,28 @@ function QuestionOptionEditor({ label, onLabelChange, placeholder, placeholderTo
|
|
|
3304
3304
|
placeholderTone === "regular" ? "placeholder:text-surface-foreground" : "placeholder:text-muted-foreground"
|
|
3305
3305
|
)
|
|
3306
3306
|
}
|
|
3307
|
+
),
|
|
3308
|
+
guarded && draft !== null && /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
3309
|
+
"p",
|
|
3310
|
+
{
|
|
3311
|
+
id: helperId,
|
|
3312
|
+
role: error ? "alert" : void 0,
|
|
3313
|
+
className: cn("flex items-start justify-between gap-2 text-ui-caption", error ? "text-destructive" : "text-secondary-muted-foreground"),
|
|
3314
|
+
children: [
|
|
3315
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("span", { className: "flex items-start gap-2", children: [
|
|
3316
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react23.WarningCircle, { size: 16, "aria-hidden": true, className: "shrink-0" }),
|
|
3317
|
+
limitsText2(minLength, maxLength),
|
|
3318
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "sr-only", children: error })
|
|
3319
|
+
] }),
|
|
3320
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("span", { "aria-hidden": true, className: "shrink-0 tabular-nums", children: [
|
|
3321
|
+
draft.length,
|
|
3322
|
+
maxLength !== void 0 && `/${maxLength}`
|
|
3323
|
+
] })
|
|
3324
|
+
]
|
|
3325
|
+
}
|
|
3307
3326
|
)
|
|
3308
|
-
] })
|
|
3309
|
-
|
|
3310
|
-
"p",
|
|
3311
|
-
{
|
|
3312
|
-
id: helperId,
|
|
3313
|
-
role: error ? "alert" : void 0,
|
|
3314
|
-
className: cn("flex items-start justify-between gap-2 text-ui-caption", error ? "text-destructive" : "text-secondary-muted-foreground"),
|
|
3315
|
-
children: [
|
|
3316
|
-
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("span", { className: "flex items-start gap-2", children: [
|
|
3317
|
-
error && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react23.WarningCircle, { size: 16, "aria-hidden": true, className: "shrink-0" }),
|
|
3318
|
-
limitsText2(minLength, maxLength),
|
|
3319
|
-
error && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "sr-only", children: error })
|
|
3320
|
-
] }),
|
|
3321
|
-
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("span", { "aria-hidden": true, className: "shrink-0 tabular-nums", children: [
|
|
3322
|
-
draft.length,
|
|
3323
|
-
maxLength !== void 0 && `/${maxLength}`
|
|
3324
|
-
] })
|
|
3325
|
-
]
|
|
3326
|
-
}
|
|
3327
|
-
)
|
|
3328
|
-
]
|
|
3327
|
+
] })
|
|
3328
|
+
] })
|
|
3329
3329
|
}
|
|
3330
3330
|
),
|
|
3331
3331
|
!locked && /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|