@sikka/hawa 0.35.5-next → 0.35.6-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/appLayout/index.js +177 -170
- package/dist/appLayout/index.js.map +1 -1
- package/dist/appLayout/index.mjs +198 -191
- package/dist/appLayout/index.mjs.map +1 -1
- package/dist/blocks/index.js +60 -60
- package/dist/blocks/index.mjs +12 -12
- package/dist/blocks/misc/index.js +49 -49
- package/dist/blocks/misc/index.mjs +62 -62
- package/dist/{chunk-TERP5K6R.mjs → chunk-57EAKTAP.mjs} +1 -184
- package/dist/{chunk-G7JHUC5N.mjs → chunk-ANXGMZXS.mjs} +205 -0
- package/dist/{chunk-HSRW7X3Z.mjs → chunk-MZRUEJED.mjs} +1 -1
- package/dist/chunk-SYGWSBJL.mjs +63 -0
- package/dist/elements/index.js +74 -74
- package/dist/elements/index.mjs +9 -9
- package/dist/hooks/index.d.mts +4 -1
- package/dist/hooks/index.d.ts +4 -1
- package/dist/hooks/index.js +31 -2
- package/dist/hooks/index.mjs +4 -2
- package/dist/index.d.mts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +177 -177
- package/dist/index.mjs +723 -724
- package/dist/layout/index.js +285 -278
- package/dist/layout/index.mjs +26 -57
- package/dist/passwordInput/index.js.map +1 -1
- package/dist/passwordInput/index.mjs.map +1 -1
- package/dist/tabs/index.js +20 -20
- package/dist/tabs/index.js.map +1 -1
- package/dist/tabs/index.mjs +25 -25
- package/dist/tabs/index.mjs.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-545D35G6.mjs +0 -54
@@ -95,7 +95,7 @@ var ScrollBar = React.forwardRef(({ className, orientation = "vertical", ...prop
|
|
95
95
|
ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
|
96
96
|
|
97
97
|
// elements/tabs/Tabs.tsx
|
98
|
-
var
|
98
|
+
var React12 = __toESM(require("react"));
|
99
99
|
|
100
100
|
// hooks/useIsomorphicEffect.ts
|
101
101
|
var import_react = require("react");
|
@@ -178,8 +178,8 @@ var useMeasureDirty = (ref) => {
|
|
178
178
|
return rect;
|
179
179
|
};
|
180
180
|
|
181
|
-
// hooks/
|
182
|
-
var import_react16 =
|
181
|
+
// hooks/useClickOutside.ts
|
182
|
+
var import_react16 = require("react");
|
183
183
|
|
184
184
|
// elements/tabs/Tabs.tsx
|
185
185
|
var TabsPrimitive = __toESM(require("@radix-ui/react-tabs"));
|
@@ -267,7 +267,7 @@ var Chip = import_react17.default.forwardRef(
|
|
267
267
|
);
|
268
268
|
|
269
269
|
// elements/floatBox/FloatBox.tsx
|
270
|
-
var
|
270
|
+
var React11 = __toESM(require("react"));
|
271
271
|
var FloatBox = ({
|
272
272
|
className,
|
273
273
|
open,
|
@@ -305,7 +305,7 @@ var FloatBox = ({
|
|
305
305
|
right: "hawa-arrow-default-left",
|
306
306
|
left: "hawa-arrow-default-right"
|
307
307
|
};
|
308
|
-
return /* @__PURE__ */
|
308
|
+
return /* @__PURE__ */ React11.createElement(
|
309
309
|
"div",
|
310
310
|
{
|
311
311
|
className: cn(
|
@@ -316,8 +316,8 @@ var FloatBox = ({
|
|
316
316
|
"data-side": side,
|
317
317
|
"data-floatbox-state": open ? "open" : "closed"
|
318
318
|
},
|
319
|
-
withArrow && /* @__PURE__ */
|
320
|
-
/* @__PURE__ */
|
319
|
+
withArrow && /* @__PURE__ */ React11.createElement("div", { className: cn(arrowDirection[side]) }),
|
320
|
+
/* @__PURE__ */ React11.createElement("span", null, props.children)
|
321
321
|
);
|
322
322
|
};
|
323
323
|
|
@@ -380,8 +380,8 @@ var tabsTriggerVariant = (0, import_tailwind_variants.tv)({
|
|
380
380
|
],
|
381
381
|
defaultVariants: { variant: "default", orientation: "horizontal" }
|
382
382
|
});
|
383
|
-
var TabsContext =
|
384
|
-
var Tabs =
|
383
|
+
var TabsContext = React12.createContext({ orientation: "horizontal", variant: "default" });
|
384
|
+
var Tabs = React12.forwardRef(({ className, orientation, variant = "default", ...props }, ref) => /* @__PURE__ */ React12.createElement(
|
385
385
|
TabsPrimitive.Root,
|
386
386
|
{
|
387
387
|
ref,
|
@@ -392,11 +392,11 @@ var Tabs = React13.forwardRef(({ className, orientation, variant = "default", ..
|
|
392
392
|
),
|
393
393
|
...props
|
394
394
|
},
|
395
|
-
/* @__PURE__ */
|
395
|
+
/* @__PURE__ */ React12.createElement(TabsContext.Provider, { value: { orientation, variant } }, props.children)
|
396
396
|
));
|
397
|
-
var TabsList =
|
398
|
-
const { orientation, variant } =
|
399
|
-
return /* @__PURE__ */
|
397
|
+
var TabsList = React12.forwardRef(({ className, ...props }, ref) => {
|
398
|
+
const { orientation, variant } = React12.useContext(TabsContext);
|
399
|
+
return /* @__PURE__ */ React12.createElement(
|
400
400
|
TabsPrimitive.List,
|
401
401
|
{
|
402
402
|
ref,
|
@@ -409,11 +409,11 @@ var TabsList = React13.forwardRef(({ className, ...props }, ref) => {
|
|
409
409
|
}
|
410
410
|
);
|
411
411
|
});
|
412
|
-
var TabsTrigger =
|
413
|
-
const { orientation, variant } =
|
414
|
-
const tabTriggerRef =
|
412
|
+
var TabsTrigger = React12.forwardRef(({ className, chipProps, ...props }, ref) => {
|
413
|
+
const { orientation, variant } = React12.useContext(TabsContext);
|
414
|
+
const tabTriggerRef = React12.useRef(null);
|
415
415
|
const { width } = useMeasureDirty(tabTriggerRef);
|
416
|
-
return /* @__PURE__ */
|
416
|
+
return /* @__PURE__ */ React12.createElement(
|
417
417
|
TabsPrimitive.Trigger,
|
418
418
|
{
|
419
419
|
ref: tabTriggerRef,
|
@@ -425,8 +425,8 @@ var TabsTrigger = React13.forwardRef(({ className, chipProps, ...props }, ref) =
|
|
425
425
|
...props
|
426
426
|
},
|
427
427
|
props.children,
|
428
|
-
chipProps && /* @__PURE__ */
|
429
|
-
/* @__PURE__ */
|
428
|
+
chipProps && /* @__PURE__ */ React12.createElement(Chip, { ...chipProps }),
|
429
|
+
/* @__PURE__ */ React12.createElement(
|
430
430
|
FloatBox,
|
431
431
|
{
|
432
432
|
withArrow: true,
|
@@ -439,7 +439,7 @@ var TabsTrigger = React13.forwardRef(({ className, chipProps, ...props }, ref) =
|
|
439
439
|
)
|
440
440
|
);
|
441
441
|
});
|
442
|
-
var TabsContent =
|
442
|
+
var TabsContent = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React12.createElement(
|
443
443
|
TabsPrimitive.Content,
|
444
444
|
{
|
445
445
|
ref,
|
@@ -483,7 +483,7 @@ var LegalTexts = ({ tabs, ...props }) => {
|
|
483
483
|
var import_react22 = __toESM(require("react"));
|
484
484
|
|
485
485
|
// elements/button/Button.tsx
|
486
|
-
var
|
486
|
+
var React18 = __toESM(require("react"));
|
487
487
|
var import_class_variance_authority = require("class-variance-authority");
|
488
488
|
|
489
489
|
// elements/helperText/HelperText.tsx
|
@@ -500,7 +500,7 @@ var HelperText = ({ helperText }) => /* @__PURE__ */ import_react19.default.crea
|
|
500
500
|
);
|
501
501
|
|
502
502
|
// elements/label/Label.tsx
|
503
|
-
var
|
503
|
+
var React16 = __toESM(require("react"));
|
504
504
|
|
505
505
|
// elements/tooltip/Tooltip.tsx
|
506
506
|
var import_react20 = __toESM(require("react"));
|
@@ -574,7 +574,7 @@ var Tooltip = ({
|
|
574
574
|
};
|
575
575
|
|
576
576
|
// elements/label/Label.tsx
|
577
|
-
var Label =
|
577
|
+
var Label = React16.forwardRef(({ className, hint, hintSide, required, children, ...props }, ref) => /* @__PURE__ */ React16.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-1 hawa-transition-all" }, /* @__PURE__ */ React16.createElement(
|
578
578
|
"label",
|
579
579
|
{
|
580
580
|
ref,
|
@@ -585,8 +585,8 @@ var Label = React17.forwardRef(({ className, hint, hintSide, required, children,
|
|
585
585
|
...props
|
586
586
|
},
|
587
587
|
children,
|
588
|
-
required && /* @__PURE__ */
|
589
|
-
), hint && /* @__PURE__ */
|
588
|
+
required && /* @__PURE__ */ React16.createElement("span", { className: "hawa-mx-0.5 hawa-text-red-500" }, "*")
|
589
|
+
), hint && /* @__PURE__ */ React16.createElement(
|
590
590
|
Tooltip,
|
591
591
|
{
|
592
592
|
content: hint,
|
@@ -596,7 +596,7 @@ var Label = React17.forwardRef(({ className, hint, hintSide, required, children,
|
|
596
596
|
onClick: (event) => event.preventDefault()
|
597
597
|
}
|
598
598
|
},
|
599
|
-
/* @__PURE__ */
|
599
|
+
/* @__PURE__ */ React16.createElement("div", null, /* @__PURE__ */ React16.createElement(
|
600
600
|
"svg",
|
601
601
|
{
|
602
602
|
xmlns: "http://www.w3.org/2000/svg",
|
@@ -608,9 +608,9 @@ var Label = React17.forwardRef(({ className, hint, hintSide, required, children,
|
|
608
608
|
strokeLinecap: "round",
|
609
609
|
strokeLinejoin: "round"
|
610
610
|
},
|
611
|
-
/* @__PURE__ */
|
612
|
-
/* @__PURE__ */
|
613
|
-
/* @__PURE__ */
|
611
|
+
/* @__PURE__ */ React16.createElement("circle", { cx: "12", cy: "12", r: "10" }),
|
612
|
+
/* @__PURE__ */ React16.createElement("path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" }),
|
613
|
+
/* @__PURE__ */ React16.createElement("path", { d: "M12 17h.01" })
|
614
614
|
))
|
615
615
|
)));
|
616
616
|
Label.displayName = "Label";
|
@@ -864,7 +864,7 @@ var buttonVariants = (0, import_class_variance_authority.cva)(
|
|
864
864
|
defaultVariants: { variant: "default", size: "default" }
|
865
865
|
}
|
866
866
|
);
|
867
|
-
var Button =
|
867
|
+
var Button = React18.forwardRef(
|
868
868
|
({
|
869
869
|
className,
|
870
870
|
label,
|
@@ -880,7 +880,7 @@ var Button = React19.forwardRef(
|
|
880
880
|
}, ref) => {
|
881
881
|
const Comp = "button";
|
882
882
|
const loadingColor = variant === "outline" || variant === "ghost" || variant === "neoBrutalism" ? "hawa-bg-primary" : "hawa-bg-primary-foreground";
|
883
|
-
return /* @__PURE__ */
|
883
|
+
return /* @__PURE__ */ React18.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-2" }, label && /* @__PURE__ */ React18.createElement(Label, { ...labelProps }, label), /* @__PURE__ */ React18.createElement(
|
884
884
|
Comp,
|
885
885
|
{
|
886
886
|
className: cn(
|
@@ -890,7 +890,7 @@ var Button = React19.forwardRef(
|
|
890
890
|
ref,
|
891
891
|
...props
|
892
892
|
},
|
893
|
-
isLoading ? /* @__PURE__ */
|
893
|
+
isLoading ? /* @__PURE__ */ React18.createElement(
|
894
894
|
Loading,
|
895
895
|
{
|
896
896
|
design: size === "icon" || size === "smallIcon" ? "spinner" : "dots-pulse",
|
@@ -899,14 +899,14 @@ var Button = React19.forwardRef(
|
|
899
899
|
size: size === "sm" || size === "xs" ? "xs" : "button"
|
900
900
|
}
|
901
901
|
) : children
|
902
|
-
), showHelperText && /* @__PURE__ */
|
902
|
+
), showHelperText && /* @__PURE__ */ React18.createElement(HelperText, { helperText: props.helperText }));
|
903
903
|
}
|
904
904
|
);
|
905
905
|
Button.displayName = "Button";
|
906
906
|
|
907
907
|
// elements/card/Card.tsx
|
908
|
-
var
|
909
|
-
var Card =
|
908
|
+
var React19 = __toESM(require("react"));
|
909
|
+
var Card = React19.forwardRef(
|
910
910
|
({
|
911
911
|
className,
|
912
912
|
variant = "default",
|
@@ -925,7 +925,7 @@ var Card = React20.forwardRef(
|
|
925
925
|
clickable && "hawa-cursor-pointer active:hawa-translate-x-0.5 active:hawa-translate-y-0.5 active:hawa-shadow-color-primary-active active:translate-x-0.5 active:translate-y-0.5 active:shadow-color-primary-active"
|
926
926
|
)
|
927
927
|
};
|
928
|
-
return /* @__PURE__ */
|
928
|
+
return /* @__PURE__ */ React19.createElement(
|
929
929
|
"div",
|
930
930
|
{
|
931
931
|
ref,
|
@@ -935,7 +935,7 @@ var Card = React20.forwardRef(
|
|
935
935
|
);
|
936
936
|
}
|
937
937
|
);
|
938
|
-
var CardHeader =
|
938
|
+
var CardHeader = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React19.createElement(
|
939
939
|
"div",
|
940
940
|
{
|
941
941
|
ref,
|
@@ -946,7 +946,7 @@ var CardHeader = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
946
946
|
...props
|
947
947
|
}
|
948
948
|
));
|
949
|
-
var CardTitle =
|
949
|
+
var CardTitle = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React19.createElement(
|
950
950
|
"h3",
|
951
951
|
{
|
952
952
|
ref,
|
@@ -954,7 +954,7 @@ var CardTitle = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
954
954
|
...props
|
955
955
|
}
|
956
956
|
));
|
957
|
-
var CardDescription =
|
957
|
+
var CardDescription = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React19.createElement(
|
958
958
|
"p",
|
959
959
|
{
|
960
960
|
ref,
|
@@ -962,8 +962,8 @@ var CardDescription = React20.forwardRef(({ className, ...props }, ref) => /* @_
|
|
962
962
|
...props
|
963
963
|
}
|
964
964
|
));
|
965
|
-
var CardContent =
|
966
|
-
({ headless, noPadding, className, ...props }, ref) => /* @__PURE__ */
|
965
|
+
var CardContent = React19.forwardRef(
|
966
|
+
({ headless, noPadding, className, ...props }, ref) => /* @__PURE__ */ React19.createElement(
|
967
967
|
"div",
|
968
968
|
{
|
969
969
|
ref,
|
@@ -976,7 +976,7 @@ var CardContent = React20.forwardRef(
|
|
976
976
|
}
|
977
977
|
)
|
978
978
|
);
|
979
|
-
var CardFooter =
|
979
|
+
var CardFooter = React19.forwardRef(({ className, noPadding, ...props }, ref) => /* @__PURE__ */ React19.createElement(
|
980
980
|
"div",
|
981
981
|
{
|
982
982
|
ref,
|
@@ -1498,8 +1498,8 @@ var Select = ({
|
|
1498
1498
|
};
|
1499
1499
|
|
1500
1500
|
// elements/textarea/Textarea.tsx
|
1501
|
-
var
|
1502
|
-
var Textarea =
|
1501
|
+
var React29 = __toESM(require("react"));
|
1502
|
+
var Textarea = React29.forwardRef(
|
1503
1503
|
({
|
1504
1504
|
className,
|
1505
1505
|
classNames,
|
@@ -1511,7 +1511,7 @@ var Textarea = React30.forwardRef(
|
|
1511
1511
|
isLoading,
|
1512
1512
|
...props
|
1513
1513
|
}, ref) => {
|
1514
|
-
return /* @__PURE__ */
|
1514
|
+
return /* @__PURE__ */ React29.createElement(
|
1515
1515
|
"div",
|
1516
1516
|
{
|
1517
1517
|
className: cn(
|
@@ -1520,7 +1520,7 @@ var Textarea = React30.forwardRef(
|
|
1520
1520
|
className
|
1521
1521
|
)
|
1522
1522
|
},
|
1523
|
-
/* @__PURE__ */
|
1523
|
+
/* @__PURE__ */ React29.createElement("div", { className: "hawa-flex hawa-flex-row hawa-justify-between" }, props.label && /* @__PURE__ */ React29.createElement(Label, { ...labelProps }, props.label), showCount && countPosition === "top" && /* @__PURE__ */ React29.createElement(
|
1524
1524
|
"div",
|
1525
1525
|
{
|
1526
1526
|
className: "hawa-text-start hawa-text-xs hawa-transition-all hawa-leading-none"
|
@@ -1529,7 +1529,7 @@ var Textarea = React30.forwardRef(
|
|
1529
1529
|
"/",
|
1530
1530
|
textareaProps == null ? void 0 : textareaProps.maxLength
|
1531
1531
|
)),
|
1532
|
-
isLoading ? /* @__PURE__ */
|
1532
|
+
isLoading ? /* @__PURE__ */ React29.createElement(Skeleton, { style: { height: 40 } }) : /* @__PURE__ */ React29.createElement(
|
1533
1533
|
"textarea",
|
1534
1534
|
{
|
1535
1535
|
...textareaProps,
|
@@ -1540,7 +1540,7 @@ var Textarea = React30.forwardRef(
|
|
1540
1540
|
ref
|
1541
1541
|
}
|
1542
1542
|
),
|
1543
|
-
/* @__PURE__ */
|
1543
|
+
/* @__PURE__ */ React29.createElement("div", { className: "hawa-flex hawa-flex-row hawa-justify-between" }, !forceHideHelperText && /* @__PURE__ */ React29.createElement(
|
1544
1544
|
"p",
|
1545
1545
|
{
|
1546
1546
|
className: cn(
|
@@ -1549,7 +1549,7 @@ var Textarea = React30.forwardRef(
|
|
1549
1549
|
)
|
1550
1550
|
},
|
1551
1551
|
props.helperText
|
1552
|
-
), showCount && countPosition === "bottom" && /* @__PURE__ */
|
1552
|
+
), showCount && countPosition === "bottom" && /* @__PURE__ */ React29.createElement("div", { className: "hawa-text-start hawa-text-xs hawa-transition-all" }, (textareaProps == null ? void 0 : textareaProps.value) ? String(textareaProps == null ? void 0 : textareaProps.value).length : 0, "/", textareaProps == null ? void 0 : textareaProps.maxLength))
|
1553
1553
|
);
|
1554
1554
|
}
|
1555
1555
|
);
|