@sikka/hawa 0.38.0-next → 0.38.2-next
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/alert/index.js +43 -19
- package/dist/alert/index.js.map +1 -1
- package/dist/alert/index.mjs +43 -19
- package/dist/alert/index.mjs.map +1 -1
- package/dist/appLayout/index.js +43 -19
- package/dist/appLayout/index.js.map +1 -1
- package/dist/appLayout/index.mjs +43 -19
- package/dist/appLayout/index.mjs.map +1 -1
- package/dist/backToTop/index.js +43 -19
- package/dist/backToTop/index.js.map +1 -1
- package/dist/backToTop/index.mjs +43 -19
- package/dist/backToTop/index.mjs.map +1 -1
- package/dist/blocks/auth/index.js +44 -20
- package/dist/blocks/auth/index.mjs +5 -5
- package/dist/blocks/feedback/index.js +43 -19
- package/dist/blocks/feedback/index.mjs +5 -5
- package/dist/blocks/index.js +44 -20
- package/dist/blocks/index.mjs +3 -3
- package/dist/blocks/misc/index.js +43 -19
- package/dist/blocks/misc/index.mjs +5 -5
- package/dist/blocks/pricing/index.js +43 -19
- package/dist/blocks/pricing/index.mjs +4 -4
- package/dist/button/index.d.mts +4 -0
- package/dist/button/index.d.ts +4 -0
- package/dist/button/index.js +43 -19
- package/dist/button/index.js.map +1 -1
- package/dist/button/index.mjs +43 -19
- package/dist/button/index.mjs.map +1 -1
- package/dist/calendar/index.js +43 -19
- package/dist/calendar/index.js.map +1 -1
- package/dist/calendar/index.mjs +43 -19
- package/dist/calendar/index.mjs.map +1 -1
- package/dist/{chunk-JJMRBD3S.mjs → chunk-EZBHA2IL.mjs} +1 -1
- package/dist/{chunk-E77TUADR.mjs → chunk-F23GAE2P.mjs} +1 -1
- package/dist/{chunk-E6C3LDHD.mjs → chunk-IC5WYNKN.mjs} +1 -1
- package/dist/{chunk-IA5FLRFL.mjs → chunk-RTK6REIK.mjs} +1 -1
- package/dist/{chunk-MHSSZ6XE.mjs → chunk-UDJFVH2I.mjs} +1 -1
- package/dist/{chunk-4EZL2A64.mjs → chunk-UJ5SXC3M.mjs} +1 -1
- package/dist/{chunk-V4SUYEVH.mjs → chunk-UMOBOCED.mjs} +43 -19
- package/dist/{chunk-LDJD5ITW.mjs → chunk-V7O5MQZQ.mjs} +43 -19
- package/dist/{chunk-Q3HJI7ZE.mjs → chunk-WDCKXU54.mjs} +1 -1
- package/dist/{chunk-TMUQCNLO.mjs → chunk-XFSBC5VI.mjs} +1 -1
- package/dist/codeBlock/index.js +43 -19
- package/dist/codeBlock/index.js.map +1 -1
- package/dist/codeBlock/index.mjs +43 -19
- package/dist/codeBlock/index.mjs.map +1 -1
- package/dist/dataTable/index.js +43 -19
- package/dist/dataTable/index.js.map +1 -1
- package/dist/dataTable/index.mjs +43 -19
- package/dist/dataTable/index.mjs.map +1 -1
- package/dist/datePicker/index.d.mts +4 -0
- package/dist/datePicker/index.d.ts +4 -0
- package/dist/datePicker/index.js +44 -19
- package/dist/datePicker/index.js.map +1 -1
- package/dist/datePicker/index.mjs +44 -19
- package/dist/datePicker/index.mjs.map +1 -1
- package/dist/docsLayout/index.js +43 -19
- package/dist/docsLayout/index.js.map +1 -1
- package/dist/docsLayout/index.mjs +43 -19
- package/dist/docsLayout/index.mjs.map +1 -1
- package/dist/elements/index.d.mts +4 -0
- package/dist/elements/index.d.ts +4 -0
- package/dist/elements/index.js +43 -19
- package/dist/elements/index.mjs +3 -3
- package/dist/fileDropzone/index.js +43 -19
- package/dist/fileDropzone/index.js.map +1 -1
- package/dist/fileDropzone/index.mjs +43 -19
- package/dist/fileDropzone/index.mjs.map +1 -1
- package/dist/index.css +1759 -2201
- package/dist/index.d.mts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +44 -20
- package/dist/index.mjs +44 -20
- package/dist/layout/index.js +43 -19
- package/dist/layout/index.mjs +2 -2
- package/dist/sortButton/index.js +43 -19
- package/dist/sortButton/index.js.map +1 -1
- package/dist/sortButton/index.mjs +43 -19
- package/dist/sortButton/index.mjs.map +1 -1
- package/dist/splitButton/index.d.mts +4 -0
- package/dist/splitButton/index.d.ts +4 -0
- package/dist/splitButton/index.js +43 -19
- package/dist/splitButton/index.js.map +1 -1
- package/dist/splitButton/index.mjs +43 -19
- package/dist/splitButton/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/appLayout/index.mjs
CHANGED
@@ -437,30 +437,54 @@ var Button = React5.forwardRef(
|
|
437
437
|
children,
|
438
438
|
labelProps,
|
439
439
|
showHelperText = false,
|
440
|
+
inForm = false,
|
440
441
|
...props
|
441
442
|
}, ref) => {
|
442
443
|
const Comp = "button";
|
443
444
|
const loadingColor = variant === "outline" || variant === "ghost" || variant === "neoBrutalism" ? "hawa-bg-primary" : "hawa-bg-primary-foreground";
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
className: cn(
|
448
|
-
buttonVariants({ variant, size, className }),
|
449
|
-
centered && "hawa-justify-center"
|
450
|
-
),
|
451
|
-
ref,
|
452
|
-
...props
|
453
|
-
},
|
454
|
-
isLoading ? /* @__PURE__ */ React5.createElement(
|
455
|
-
Loading,
|
445
|
+
if (inForm) {
|
446
|
+
return /* @__PURE__ */ React5.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-2" }, label && /* @__PURE__ */ React5.createElement(Label, { ...labelProps }, label), /* @__PURE__ */ React5.createElement(
|
447
|
+
Comp,
|
456
448
|
{
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
449
|
+
className: cn(
|
450
|
+
buttonVariants({ variant, size, className }),
|
451
|
+
centered && "hawa-justify-center"
|
452
|
+
),
|
453
|
+
ref,
|
454
|
+
...props
|
455
|
+
},
|
456
|
+
isLoading ? /* @__PURE__ */ React5.createElement(
|
457
|
+
Loading,
|
458
|
+
{
|
459
|
+
design: size === "icon" || size === "smallIcon" ? "spinner" : "dots-pulse",
|
460
|
+
themeMode: variant === "outline" ? "light" : "dark",
|
461
|
+
color: loadingColor,
|
462
|
+
size: size === "sm" || size === "xs" ? "xs" : "button"
|
463
|
+
}
|
464
|
+
) : children
|
465
|
+
), showHelperText && /* @__PURE__ */ React5.createElement(HelperText, { helperText: props.helperText }));
|
466
|
+
} else {
|
467
|
+
return /* @__PURE__ */ React5.createElement(
|
468
|
+
Comp,
|
469
|
+
{
|
470
|
+
className: cn(
|
471
|
+
buttonVariants({ variant, size, className }),
|
472
|
+
centered && "hawa-justify-center"
|
473
|
+
),
|
474
|
+
ref,
|
475
|
+
...props
|
476
|
+
},
|
477
|
+
isLoading ? /* @__PURE__ */ React5.createElement(
|
478
|
+
Loading,
|
479
|
+
{
|
480
|
+
design: size === "icon" || size === "smallIcon" ? "spinner" : "dots-pulse",
|
481
|
+
themeMode: variant === "outline" ? "light" : "dark",
|
482
|
+
color: loadingColor,
|
483
|
+
size: size === "sm" || size === "xs" ? "xs" : "button"
|
484
|
+
}
|
485
|
+
) : children
|
486
|
+
);
|
487
|
+
}
|
464
488
|
}
|
465
489
|
);
|
466
490
|
Button.displayName = "Button";
|