hazo_ui 2.6.3 → 2.6.5

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/README.md CHANGED
@@ -1873,6 +1873,7 @@ interface HazoUiDialogProps {
1873
1873
  // Size Configuration
1874
1874
  sizeWidth?: string; // default: "min(90vw, 600px)"
1875
1875
  sizeHeight?: string; // default: "min(80vh, 800px)"
1876
+ fixedSize?: boolean; // default: false - When true, sizeHeight becomes a fixed height instead of maxHeight
1876
1877
 
1877
1878
  // Animation Configuration
1878
1879
  openAnimation?: AnimationPreset | string; // default: "zoom"
@@ -2361,6 +2362,13 @@ function ProgressDialog() {
2361
2362
  sizeHeight="min(90vh, 1000px)"
2362
2363
  {...props}
2363
2364
  />
2365
+
2366
+ // Fixed Size - dialog maintains exact height regardless of content
2367
+ <HazoUiDialog
2368
+ sizeHeight="500px"
2369
+ fixedSize={true}
2370
+ {...props}
2371
+ />
2364
2372
  ```
2365
2373
 
2366
2374
  #### Animation Variants
@@ -2653,7 +2661,8 @@ function FormDialog() {
2653
2661
  | `actionButtonIcon` | `React.ReactNode` | - | Icon element rendered before action button text |
2654
2662
  | `footerContent` | `React.ReactNode` | - | Custom footer content that replaces default buttons |
2655
2663
  | `sizeWidth` | `string` | `"min(90vw, 600px)"` | Dialog width |
2656
- | `sizeHeight` | `string` | `"min(80vh, 800px)"` | Dialog max height |
2664
+ | `sizeHeight` | `string` | `"min(80vh, 800px)"` | Dialog max height (or fixed height when `fixedSize` is true) |
2665
+ | `fixedSize` | `boolean` | `false` | When true, `sizeHeight` becomes a fixed height instead of max height |
2657
2666
  | `openAnimation` | `AnimationPreset \| string` | `"zoom"` | Open animation |
2658
2667
  | `closeAnimation` | `AnimationPreset \| string` | `"zoom"` | Close animation |
2659
2668
  | `headerBackgroundColor` | `string` | - | Header background color |
package/dist/index.cjs CHANGED
@@ -232,13 +232,36 @@ var buttonVariants = classVarianceAuthority.cva(
232
232
  }
233
233
  }
234
234
  );
235
+ var variant_styles = {
236
+ default: {
237
+ backgroundColor: "var(--primary)",
238
+ color: "var(--primary-foreground)",
239
+ border: "1px solid var(--primary)"
240
+ },
241
+ destructive: {
242
+ backgroundColor: "var(--destructive)",
243
+ color: "white",
244
+ border: "1px solid var(--destructive)"
245
+ },
246
+ outline: {
247
+ backgroundColor: "var(--background)",
248
+ color: "var(--foreground)",
249
+ border: "1px solid var(--border)"
250
+ },
251
+ secondary: {
252
+ backgroundColor: "var(--secondary)",
253
+ color: "var(--secondary-foreground)"
254
+ }
255
+ };
235
256
  var Button = React27__namespace.forwardRef(
236
- ({ className, variant, size, asChild = false, ...props }, ref) => {
257
+ ({ className, variant, size, asChild = false, style, ...props }, ref) => {
237
258
  const Comp = asChild ? reactSlot.Slot : "button";
259
+ const fallback_styles = variant_styles[variant ?? "default"] ?? {};
238
260
  return /* @__PURE__ */ jsxRuntime.jsx(
239
261
  Comp,
240
262
  {
241
263
  className: cn(buttonVariants({ variant, size, className })),
264
+ style: { ...fallback_styles, ...style },
242
265
  ref,
243
266
  ...props
244
267
  }
@@ -6245,6 +6268,7 @@ function HazoUiDialog({
6245
6268
  footerContent,
6246
6269
  sizeWidth = "min(90vw, 600px)",
6247
6270
  sizeHeight = "min(80vh, 800px)",
6271
+ fixedSize = false,
6248
6272
  openAnimation = "zoom",
6249
6273
  closeAnimation = "zoom",
6250
6274
  variant = "default",
@@ -6279,7 +6303,7 @@ function HazoUiDialog({
6279
6303
  const resolved_border_color = borderColor ?? variant_preset?.border_color;
6280
6304
  const contentStyles = {
6281
6305
  width: sizeWidth,
6282
- maxHeight: sizeHeight,
6306
+ ...fixedSize ? { height: sizeHeight, minHeight: sizeHeight, maxHeight: sizeHeight } : { maxHeight: sizeHeight },
6283
6307
  ...resolved_border_color && { borderColor: resolved_border_color }
6284
6308
  };
6285
6309
  const finalHeaderBackgroundColor = headerBackgroundColor ?? variant_preset?.header_background_color ?? config.header_background_color;