@hilum/ui 2.0.1 → 2.0.3

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
@@ -789,14 +789,16 @@ declare const ProgressRoot: React.ForwardRefExoticComponent<Omit<Progress.Progre
789
789
  interface PropertyRowProps extends React.ComponentProps<"div"> {
790
790
  /** Optional label rendered on the left. Pass a string or any React node (icon + label, etc.). */
791
791
  label?: React.ReactNode;
792
- /** Width of the label column. Default: 96px. */
792
+ /** Label layout. Default: "stacked". */
793
+ layout?: "stacked" | "inline";
794
+ /** Width of the label column when layout="inline". Default: 96px. */
793
795
  labelWidth?: number | string;
794
- /** Aligns label vertically with controls. Default: "center". */
796
+ /** Aligns label vertically with controls when layout="inline". Default: "center". */
795
797
  labelAlign?: "start" | "center";
796
798
  }
797
799
  /**
798
- * Horizontal property row used inside designer inspector panels:
799
- * left-aligned label, right-aligned controls, single visual row.
800
+ * Property row used inside designer inspector panels:
801
+ * label above controls by default, with an inline option for dense rows.
800
802
  * Different from <Field>, which is a vertical form field with hint/error.
801
803
  *
802
804
  * <PropertyRow label="Opacity">
@@ -804,7 +806,7 @@ interface PropertyRowProps extends React.ComponentProps<"div"> {
804
806
  * <InputNumber />
805
807
  * </PropertyRow>
806
808
  */
807
- declare function PropertyRow({ label, labelWidth, labelAlign, className, children, ...rest }: PropertyRowProps): react_jsx_runtime.JSX.Element;
809
+ declare function PropertyRow({ label, layout, labelWidth, labelAlign, className, children, ...rest }: PropertyRowProps): react_jsx_runtime.JSX.Element;
808
810
  declare namespace PropertyRow {
809
811
  var displayName: string;
810
812
  }
package/dist/index.js CHANGED
@@ -3174,18 +3174,20 @@ var ProgressRoot = React15.forwardRef(({ className, value, ...props }, ref) => /
3174
3174
  ProgressRoot.displayName = "Progress";
3175
3175
  function PropertyRow({
3176
3176
  label,
3177
+ layout = "stacked",
3177
3178
  labelWidth = 96,
3178
3179
  labelAlign = "center",
3179
3180
  className,
3180
3181
  children,
3181
3182
  ...rest
3182
3183
  }) {
3184
+ const inline = layout === "inline";
3183
3185
  return /* @__PURE__ */ jsxs(
3184
3186
  "div",
3185
3187
  {
3186
3188
  className: cn(
3187
- "flex w-full gap-3 py-1",
3188
- labelAlign === "center" ? "items-center" : "items-start",
3189
+ "flex w-full min-w-0 py-1",
3190
+ inline ? cn("gap-3", labelAlign === "center" ? "items-center" : "items-start") : "flex-col items-stretch gap-1.5",
3189
3191
  className
3190
3192
  ),
3191
3193
  ...rest,
@@ -3193,12 +3195,15 @@ function PropertyRow({
3193
3195
  label !== void 0 && /* @__PURE__ */ jsx(
3194
3196
  "div",
3195
3197
  {
3196
- className: "caption text-muted-foreground shrink-0 select-none",
3197
- style: { width: typeof labelWidth === "number" ? `${labelWidth}px` : labelWidth },
3198
+ className: cn(
3199
+ "caption select-none text-muted-foreground",
3200
+ inline ? "shrink-0" : "w-full"
3201
+ ),
3202
+ style: inline ? { width: typeof labelWidth === "number" ? `${labelWidth}px` : labelWidth } : void 0,
3198
3203
  children: label
3199
3204
  }
3200
3205
  ),
3201
- /* @__PURE__ */ jsx("div", { className: "flex flex-1 items-center gap-2 min-w-0", children })
3206
+ /* @__PURE__ */ jsx("div", { className: "flex min-w-0 flex-1 items-center gap-2", children })
3202
3207
  ]
3203
3208
  }
3204
3209
  );