@caqophony/ui 0.9.0 → 0.9.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.js +40 -36
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5240,42 +5240,46 @@ var Select = React43.forwardRef(
|
|
|
5240
5240
|
"Select: pass `options` or `<option>` children, not both"
|
|
5241
5241
|
);
|
|
5242
5242
|
const showsPlaceholder = placeholder !== void 0 && value === void 0 && defaultValue === void 0;
|
|
5243
|
-
return
|
|
5244
|
-
|
|
5245
|
-
|
|
5246
|
-
|
|
5247
|
-
|
|
5248
|
-
|
|
5249
|
-
|
|
5250
|
-
|
|
5251
|
-
|
|
5252
|
-
|
|
5253
|
-
|
|
5254
|
-
|
|
5255
|
-
|
|
5256
|
-
|
|
5257
|
-
|
|
5258
|
-
|
|
5259
|
-
|
|
5260
|
-
|
|
5261
|
-
|
|
5262
|
-
|
|
5263
|
-
children
|
|
5264
|
-
|
|
5265
|
-
|
|
5266
|
-
|
|
5267
|
-
|
|
5268
|
-
|
|
5269
|
-
|
|
5270
|
-
|
|
5271
|
-
|
|
5272
|
-
|
|
5273
|
-
"
|
|
5274
|
-
|
|
5275
|
-
|
|
5276
|
-
|
|
5277
|
-
|
|
5278
|
-
|
|
5243
|
+
return (
|
|
5244
|
+
// #6712: the caller's className sizes and places the box: the wrapper,
|
|
5245
|
+
// which holds the chevron, as Combobox's root does. On the <select> a
|
|
5246
|
+
// width split the box from its chevron, which stayed at the row's end.
|
|
5247
|
+
/* @__PURE__ */ jsxs46("div", { className: cn("relative w-full min-w-0", className), children: [
|
|
5248
|
+
/* @__PURE__ */ jsxs46(
|
|
5249
|
+
"select",
|
|
5250
|
+
{
|
|
5251
|
+
ref,
|
|
5252
|
+
value,
|
|
5253
|
+
defaultValue: showsPlaceholder ? "" : defaultValue,
|
|
5254
|
+
...fieldAria(error, errorMessageId),
|
|
5255
|
+
className: cn(
|
|
5256
|
+
"scheme-light dark:scheme-dark block w-full cursor-pointer appearance-none truncate",
|
|
5257
|
+
FIELD_HEIGHT[size],
|
|
5258
|
+
fieldVariants({ size, error: Boolean(error) }),
|
|
5259
|
+
pickerChevron(size).endPadding,
|
|
5260
|
+
'has-[option[value=""]:checked]:text-muted-foreground [&>option]:text-foreground'
|
|
5261
|
+
),
|
|
5262
|
+
...props,
|
|
5263
|
+
children: [
|
|
5264
|
+
placeholder !== void 0 && /* @__PURE__ */ jsx57("option", { value: "", disabled: true, hidden: true, children: placeholder }),
|
|
5265
|
+
options?.map((o) => /* @__PURE__ */ jsx57("option", { value: o.value, disabled: o.disabled, children: o.label }, o.value)),
|
|
5266
|
+
children
|
|
5267
|
+
]
|
|
5268
|
+
}
|
|
5269
|
+
),
|
|
5270
|
+
/* @__PURE__ */ jsx57(
|
|
5271
|
+
Icon,
|
|
5272
|
+
{
|
|
5273
|
+
name: "chevron-down",
|
|
5274
|
+
size: "sm",
|
|
5275
|
+
className: cn(
|
|
5276
|
+
"pointer-events-none absolute top-1/2 -translate-y-1/2 text-muted-foreground",
|
|
5277
|
+
pickerChevron(size).inset
|
|
5278
|
+
)
|
|
5279
|
+
}
|
|
5280
|
+
)
|
|
5281
|
+
] })
|
|
5282
|
+
);
|
|
5279
5283
|
}
|
|
5280
5284
|
);
|
|
5281
5285
|
Select.displayName = "Select";
|