@assure-one/design-system 0.15.0 → 0.15.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/dist/index.d.ts CHANGED
@@ -1161,8 +1161,16 @@ interface SearchSelectProps {
1161
1161
  */
1162
1162
  onCreateNew?: () => void;
1163
1163
  createNewLabel?: string;
1164
+ /**
1165
+ * How the collapsed single-value display renders the picked option's
1166
+ * `description`. "inline" (default) appends it as muted "· text" after the
1167
+ * label — the existing behaviour. "pill" renders it as a discrete rounded
1168
+ * badge after the label, so dense metadata (e.g. "1040 · 2025", "todo")
1169
+ * reads as a tag instead of running into the label. Single-mode only.
1170
+ */
1171
+ descriptionVariant?: "inline" | "pill";
1164
1172
  }
1165
- declare function SearchSelect({ options, selected: selectedProp, onSelect: onSelectProp, onRemove: onRemoveProp, value, onValueChange, onCreate, placeholder, className, disabled, groupFilter, pinnedGroups, closeOnSelect: closeOnSelectProp, showGroupCounts, onCreateNew, createNewLabel, }: SearchSelectProps): react_jsx_runtime.JSX.Element;
1173
+ declare function SearchSelect({ options, selected: selectedProp, onSelect: onSelectProp, onRemove: onRemoveProp, value, onValueChange, onCreate, placeholder, className, disabled, groupFilter, pinnedGroups, closeOnSelect: closeOnSelectProp, showGroupCounts, onCreateNew, createNewLabel, descriptionVariant, }: SearchSelectProps): react_jsx_runtime.JSX.Element;
1166
1174
  declare namespace SearchSelect {
1167
1175
  var displayName: string;
1168
1176
  }
package/dist/index.js CHANGED
@@ -6062,7 +6062,8 @@ function SearchSelect({
6062
6062
  closeOnSelect: closeOnSelectProp = false,
6063
6063
  showGroupCounts = false,
6064
6064
  onCreateNew,
6065
- createNewLabel = "Create new"
6065
+ createNewLabel = "Create new",
6066
+ descriptionVariant = "inline"
6066
6067
  }) {
6067
6068
  const isSingleMode = value !== void 0 || onValueChange !== void 0;
6068
6069
  const singleSelectedOption = React36.useMemo(
@@ -6233,7 +6234,7 @@ function SearchSelect({
6233
6234
  type: "button",
6234
6235
  onClick: () => !disabled && setOpen(true),
6235
6236
  disabled,
6236
- className: "flex h-full flex-1 items-center gap-2 text-left outline-none disabled:cursor-not-allowed",
6237
+ className: "flex h-full min-w-0 flex-1 items-center gap-2 text-left outline-none disabled:cursor-not-allowed",
6237
6238
  children: [
6238
6239
  singleValue.icon && /* @__PURE__ */ jsx(
6239
6240
  "span",
@@ -6246,7 +6247,15 @@ function SearchSelect({
6246
6247
  children: singleValue.icon
6247
6248
  }
6248
6249
  ),
6249
- /* @__PURE__ */ jsxs("span", { className: "text-fg flex-1 truncate text-[13px]", children: [
6250
+ descriptionVariant === "pill" && singleValue.description ? (
6251
+ // Pill variant: label truncates, description rides after it
6252
+ // as a discrete shrink-0 badge so dense metadata reads as a
6253
+ // tag instead of running into the label.
6254
+ /* @__PURE__ */ jsxs("span", { className: "flex min-w-0 flex-1 items-center gap-1.5 text-[13px]", children: [
6255
+ /* @__PURE__ */ jsx("span", { className: "text-fg truncate", children: singleValue.label }),
6256
+ /* @__PURE__ */ jsx("span", { className: "rounded-pill border-rule bg-bg-2 text-fg-3 shrink-0 border px-1.5 py-0.5 text-[11px] leading-none", children: singleValue.description })
6257
+ ] })
6258
+ ) : /* @__PURE__ */ jsxs("span", { className: "text-fg min-w-0 flex-1 truncate text-[13px]", children: [
6250
6259
  singleValue.label,
6251
6260
  singleValue.description && /* @__PURE__ */ jsxs("span", { className: "text-fg-4", children: [
6252
6261
  " \xB7 ",