@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.
Files changed (2) hide show
  1. package/dist/index.js +40 -36
  2. 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 /* @__PURE__ */ jsxs46("div", { className: "relative w-full min-w-0", children: [
5244
- /* @__PURE__ */ jsxs46(
5245
- "select",
5246
- {
5247
- ref,
5248
- value,
5249
- defaultValue: showsPlaceholder ? "" : defaultValue,
5250
- ...fieldAria(error, errorMessageId),
5251
- className: cn(
5252
- "scheme-light dark:scheme-dark block cursor-pointer appearance-none truncate",
5253
- FIELD_HEIGHT[size],
5254
- fieldVariants({ size, error: Boolean(error) }),
5255
- pickerChevron(size).endPadding,
5256
- 'has-[option[value=""]:checked]:text-muted-foreground [&>option]:text-foreground',
5257
- className
5258
- ),
5259
- ...props,
5260
- children: [
5261
- placeholder !== void 0 && /* @__PURE__ */ jsx57("option", { value: "", disabled: true, hidden: true, children: placeholder }),
5262
- options?.map((o) => /* @__PURE__ */ jsx57("option", { value: o.value, disabled: o.disabled, children: o.label }, o.value)),
5263
- children
5264
- ]
5265
- }
5266
- ),
5267
- /* @__PURE__ */ jsx57(
5268
- Icon,
5269
- {
5270
- name: "chevron-down",
5271
- size: "sm",
5272
- className: cn(
5273
- "pointer-events-none absolute top-1/2 -translate-y-1/2 text-muted-foreground",
5274
- pickerChevron(size).inset
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";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@caqophony/ui",
3
- "version": "0.9.0",
3
+ "version": "0.9.1",
4
4
  "description": "Generic, optional React UI reuse library (Gossamer tokens). Centrally maintained by Caqophony.",
5
5
  "license": "MIT",
6
6
  "author": "Caqophony",