@sikka/hawa 0.43.5-next → 0.44.0-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.d.mts +9 -1
- package/dist/alert/index.d.ts +9 -1
- package/dist/alert/index.js +40 -36
- package/dist/alert/index.js.map +1 -1
- package/dist/alert/index.mjs +40 -36
- package/dist/alert/index.mjs.map +1 -1
- package/dist/appLayout/index.js +11 -22
- package/dist/appLayout/index.js.map +1 -1
- package/dist/appLayout/index.mjs +11 -22
- package/dist/appLayout/index.mjs.map +1 -1
- package/dist/backToTop/index.js +11 -22
- package/dist/backToTop/index.js.map +1 -1
- package/dist/backToTop/index.mjs +11 -22
- package/dist/backToTop/index.mjs.map +1 -1
- package/dist/blocks/auth/index.js +40 -36
- package/dist/blocks/auth/index.mjs +33 -18
- package/dist/blocks/feedback/index.js +27 -30
- package/dist/blocks/feedback/index.mjs +5 -5
- package/dist/blocks/index.js +64 -52
- package/dist/blocks/index.mjs +2 -2
- package/dist/blocks/misc/index.js +11 -22
- package/dist/blocks/misc/index.mjs +5 -5
- package/dist/blocks/pricing/index.js +27 -30
- package/dist/blocks/pricing/index.mjs +4 -4
- package/dist/button/index.d.mts +1 -1
- package/dist/button/index.d.ts +1 -1
- package/dist/button/index.js +11 -22
- package/dist/button/index.js.map +1 -1
- package/dist/button/index.mjs +11 -22
- package/dist/button/index.mjs.map +1 -1
- package/dist/calendar/index.js +12 -23
- package/dist/calendar/index.js.map +1 -1
- package/dist/calendar/index.mjs +12 -23
- package/dist/calendar/index.mjs.map +1 -1
- package/dist/{chunk-RPJYSE6Y.mjs → chunk-3B7UZCET.mjs} +11 -22
- package/dist/{chunk-ZPNZUWM5.mjs → chunk-6LI35F6L.mjs} +11 -22
- package/dist/{chunk-PORTGNAK.mjs → chunk-DYYINLRJ.mjs} +1 -1
- package/dist/{chunk-WJ6XCEUI.mjs → chunk-FIUKVRL5.mjs} +1 -1
- package/dist/{chunk-VWJIORNH.mjs → chunk-FUYMZP4J.mjs} +1 -1
- package/dist/{chunk-P7TMXOPP.mjs → chunk-JDCQLGWW.mjs} +1 -1
- package/dist/{chunk-QBPDB7E2.mjs → chunk-JKZQWCAQ.mjs} +1 -1
- package/dist/{chunk-3MJGVWY2.mjs → chunk-MEXJAHQV.mjs} +55 -32
- package/dist/{chunk-QDZMNVKS.mjs → chunk-OE6XZ6LW.mjs} +17 -9
- package/dist/{chunk-ZWQWYHT4.mjs → chunk-XC6FSDW7.mjs} +1 -1
- package/dist/codeBlock/index.js +11 -22
- package/dist/codeBlock/index.js.map +1 -1
- package/dist/codeBlock/index.mjs +11 -22
- package/dist/codeBlock/index.mjs.map +1 -1
- package/dist/colorPicker/index.js +11 -22
- package/dist/colorPicker/index.js.map +1 -1
- package/dist/colorPicker/index.mjs +11 -22
- package/dist/colorPicker/index.mjs.map +1 -1
- package/dist/combobox/index.js +11 -22
- package/dist/combobox/index.js.map +1 -1
- package/dist/combobox/index.mjs +11 -22
- package/dist/combobox/index.mjs.map +1 -1
- package/dist/dataTable/index.js +11 -22
- package/dist/dataTable/index.js.map +1 -1
- package/dist/dataTable/index.mjs +11 -22
- package/dist/dataTable/index.mjs.map +1 -1
- package/dist/datePicker/index.d.mts +1 -1
- package/dist/datePicker/index.d.ts +1 -1
- package/dist/datePicker/index.js +22 -24
- package/dist/datePicker/index.js.map +1 -1
- package/dist/datePicker/index.mjs +22 -24
- package/dist/datePicker/index.mjs.map +1 -1
- package/dist/docsLayout/index.js +11 -22
- package/dist/docsLayout/index.js.map +1 -1
- package/dist/docsLayout/index.mjs +11 -22
- package/dist/docsLayout/index.mjs.map +1 -1
- package/dist/elements/index.d.mts +10 -2
- package/dist/elements/index.d.ts +10 -2
- package/dist/elements/index.js +65 -53
- package/dist/elements/index.mjs +3 -3
- package/dist/fileDropzone/index.js +40 -36
- package/dist/fileDropzone/index.js.map +1 -1
- package/dist/fileDropzone/index.mjs +40 -36
- package/dist/fileDropzone/index.mjs.map +1 -1
- package/dist/index.d.mts +9 -1
- package/dist/index.d.ts +9 -1
- package/dist/index.js +67 -55
- package/dist/index.mjs +67 -55
- package/dist/input/index.js +11 -22
- package/dist/input/index.js.map +1 -1
- package/dist/input/index.mjs +11 -22
- package/dist/input/index.mjs.map +1 -1
- package/dist/interfaceSettings/index.js +27 -30
- package/dist/interfaceSettings/index.js.map +1 -1
- package/dist/interfaceSettings/index.mjs +27 -30
- package/dist/interfaceSettings/index.mjs.map +1 -1
- package/dist/layout/index.js +11 -22
- package/dist/layout/index.mjs +2 -2
- package/dist/passwordInput/index.js +11 -22
- package/dist/passwordInput/index.js.map +1 -1
- package/dist/passwordInput/index.mjs +11 -22
- package/dist/passwordInput/index.mjs.map +1 -1
- package/dist/phoneInput/index.js +11 -22
- package/dist/phoneInput/index.js.map +1 -1
- package/dist/phoneInput/index.mjs +11 -22
- package/dist/phoneInput/index.mjs.map +1 -1
- package/dist/pinInput/index.js +11 -22
- package/dist/pinInput/index.js.map +1 -1
- package/dist/pinInput/index.mjs +11 -22
- package/dist/pinInput/index.mjs.map +1 -1
- package/dist/radio/index.js +27 -30
- package/dist/radio/index.js.map +1 -1
- package/dist/radio/index.mjs +27 -30
- package/dist/radio/index.mjs.map +1 -1
- package/dist/select/index.js +11 -22
- package/dist/select/index.js.map +1 -1
- package/dist/select/index.mjs +11 -22
- package/dist/select/index.mjs.map +1 -1
- package/dist/sortButton/index.js +11 -22
- package/dist/sortButton/index.js.map +1 -1
- package/dist/sortButton/index.mjs +11 -22
- package/dist/sortButton/index.mjs.map +1 -1
- package/dist/splitButton/index.d.mts +1 -1
- package/dist/splitButton/index.d.ts +1 -1
- package/dist/splitButton/index.js +11 -22
- package/dist/splitButton/index.js.map +1 -1
- package/dist/splitButton/index.mjs +11 -22
- package/dist/splitButton/index.mjs.map +1 -1
- package/dist/textarea/index.js +11 -22
- package/dist/textarea/index.js.map +1 -1
- package/dist/textarea/index.mjs +11 -22
- package/dist/textarea/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/elements/index.js
CHANGED
@@ -164,10 +164,10 @@ __export(elements_exports, {
|
|
164
164
|
TableHead: () => TableHead,
|
165
165
|
TableHeader: () => TableHeader,
|
166
166
|
TableRow: () => TableRow,
|
167
|
-
Tabs: () =>
|
167
|
+
Tabs: () => Tabs2,
|
168
168
|
TabsContent: () => TabsContent,
|
169
|
-
TabsList: () =>
|
170
|
-
TabsTrigger: () =>
|
169
|
+
TabsList: () => TabsList2,
|
170
|
+
TabsTrigger: () => TabsTrigger2,
|
171
171
|
Textarea: () => Textarea,
|
172
172
|
Toast: () => Toast,
|
173
173
|
ToastAction: () => ToastAction,
|
@@ -2404,28 +2404,17 @@ var import_class_variance_authority3 = require("class-variance-authority");
|
|
2404
2404
|
// elements/helperText/HelperText.tsx
|
2405
2405
|
var import_react7 = __toESM(require("react"));
|
2406
2406
|
var HelperText = ({
|
2407
|
-
helperText
|
2408
|
-
|
2409
|
-
|
2410
|
-
|
2411
|
-
|
2412
|
-
|
2413
|
-
|
2414
|
-
|
2415
|
-
|
2416
|
-
|
2417
|
-
|
2418
|
-
"p",
|
2419
|
-
{
|
2420
|
-
className: cn(
|
2421
|
-
"hawa-my-0 hawa-text-start hawa-text-helper-color hawa-transition-all",
|
2422
|
-
helperText ? "hawa-opacity-100" : "hawa-h-0 hawa-opacity-0",
|
2423
|
-
sizes[size]
|
2424
|
-
)
|
2425
|
-
},
|
2426
|
-
helperText
|
2427
|
-
);
|
2428
|
-
};
|
2407
|
+
helperText
|
2408
|
+
}) => /* @__PURE__ */ import_react7.default.createElement(
|
2409
|
+
"p",
|
2410
|
+
{
|
2411
|
+
className: cn(
|
2412
|
+
"hawa-my-0 hawa-text-start hawa-text-helper-color hawa-transition-all hawa-text-xs",
|
2413
|
+
helperText ? "hawa-opacity-100 hawa-h-4" : "hawa-h-0 hawa-opacity-0"
|
2414
|
+
)
|
2415
|
+
},
|
2416
|
+
helperText
|
2417
|
+
);
|
2429
2418
|
|
2430
2419
|
// elements/label/Label.tsx
|
2431
2420
|
var React16 = __toESM(require("react"));
|
@@ -2571,7 +2560,7 @@ var Alert = ({
|
|
2571
2560
|
severity = "none",
|
2572
2561
|
duration,
|
2573
2562
|
icon,
|
2574
|
-
|
2563
|
+
classNames,
|
2575
2564
|
...props
|
2576
2565
|
}) => {
|
2577
2566
|
const alertRef = (0, import_react8.useRef)(null);
|
@@ -2622,21 +2611,25 @@ var Alert = ({
|
|
2622
2611
|
"hawa-relative hawa-mb-4 hawa-flex hawa-flex-col hawa-rounded hawa-p-4 hawa-text-sm hawa-transition-all",
|
2623
2612
|
styleVariant[severity],
|
2624
2613
|
closed ? "hawa-opacity-0" : "hawa-opacity-100",
|
2625
|
-
|
2614
|
+
classNames == null ? void 0 : classNames.root
|
2626
2615
|
)
|
2627
2616
|
},
|
2628
2617
|
/* @__PURE__ */ import_react8.default.createElement("div", { className: "hawa-flex hawa-flex-row" }, icon && /* @__PURE__ */ import_react8.default.createElement(
|
2629
2618
|
"div",
|
2630
2619
|
{
|
2631
|
-
className:
|
2620
|
+
className: cn(
|
2621
|
+
direction === "rtl" ? "hawa-pl-2 hawa-pt-1" : "hawa-pr-2 hawa-pt-1",
|
2622
|
+
classNames == null ? void 0 : classNames.icon
|
2623
|
+
)
|
2632
2624
|
},
|
2633
2625
|
icon
|
2634
|
-
), /* @__PURE__ */ import_react8.default.createElement("div", { className: "hawa-flex hawa-flex-col" }, /* @__PURE__ */ import_react8.default.createElement(
|
2626
|
+
), /* @__PURE__ */ import_react8.default.createElement("div", { className: cn("hawa-flex hawa-flex-col", classNames == null ? void 0 : classNames.content) }, /* @__PURE__ */ import_react8.default.createElement(
|
2635
2627
|
"span",
|
2636
2628
|
{
|
2637
2629
|
className: cn(
|
2638
2630
|
"hawa-font-bold",
|
2639
|
-
direction === "rtl" ? "hawa-ml-8" : "hawa-mr-8"
|
2631
|
+
direction === "rtl" ? "hawa-ml-8" : "hawa-mr-8",
|
2632
|
+
classNames == null ? void 0 : classNames.title
|
2640
2633
|
)
|
2641
2634
|
},
|
2642
2635
|
props.title
|
@@ -2645,19 +2638,29 @@ var Alert = ({
|
|
2645
2638
|
{
|
2646
2639
|
className: cn(
|
2647
2640
|
direction === "rtl" ? "hawa-ml-8" : "hawa-mr-8",
|
2648
|
-
props.persistent ? "hawa-w-full" : "hawa-w-[calc(100% - 40px)]"
|
2641
|
+
props.persistent ? "hawa-w-full" : "hawa-w-[calc(100% - 40px)]",
|
2642
|
+
classNames == null ? void 0 : classNames.text
|
2649
2643
|
)
|
2650
2644
|
},
|
2651
2645
|
props.text
|
2652
|
-
), props.actions && /* @__PURE__ */ import_react8.default.createElement(
|
2653
|
-
|
2646
|
+
), props.actions && /* @__PURE__ */ import_react8.default.createElement(
|
2647
|
+
"div",
|
2654
2648
|
{
|
2655
|
-
|
2656
|
-
|
2657
|
-
|
2649
|
+
className: cn(
|
2650
|
+
"hawa-mt-2 hawa-flex hawa-flex-row hawa-gap-2",
|
2651
|
+
classNames == null ? void 0 : classNames.actions
|
2652
|
+
)
|
2658
2653
|
},
|
2659
|
-
act.
|
2660
|
-
|
2654
|
+
props.actions.map((act, index) => /* @__PURE__ */ import_react8.default.createElement(
|
2655
|
+
Button,
|
2656
|
+
{
|
2657
|
+
key: index,
|
2658
|
+
variant: act.variant,
|
2659
|
+
onClick: act.onClick()
|
2660
|
+
},
|
2661
|
+
act.label
|
2662
|
+
))
|
2663
|
+
))),
|
2661
2664
|
!props.persistent && /* @__PURE__ */ import_react8.default.createElement(
|
2662
2665
|
"button",
|
2663
2666
|
{
|
@@ -2667,7 +2670,8 @@ var Alert = ({
|
|
2667
2670
|
className: cn(
|
2668
2671
|
"hawa-absolute hawa-top-2 hawa-inline-flex hawa-h-9 hawa-w-9 hawa-items-center hawa-justify-center hawa-rounded-inner hawa-p-1.5 hawa-transition-all hover:hawa-text-gray-900",
|
2669
2672
|
closeButtonStyle[severity],
|
2670
|
-
direction === "rtl" ? "hawa-left-2" : "hawa-right-2"
|
2673
|
+
direction === "rtl" ? "hawa-left-2" : "hawa-right-2",
|
2674
|
+
classNames == null ? void 0 : classNames.closeButton
|
2671
2675
|
),
|
2672
2676
|
onClick: () => {
|
2673
2677
|
if (props.onAlertClosed) {
|
@@ -3834,6 +3838,7 @@ var BackToTop = ({ ...props }) => {
|
|
3834
3838
|
|
3835
3839
|
// elements/radio/Radio.tsx
|
3836
3840
|
var import_react13 = __toESM(require("react"));
|
3841
|
+
var import_react_tabs = require("@radix-ui/react-tabs");
|
3837
3842
|
|
3838
3843
|
// elements/popover/Popover.tsx
|
3839
3844
|
var React26 = __toESM(require("react"));
|
@@ -3978,9 +3983,10 @@ var Radio = (0, import_react13.forwardRef)(
|
|
3978
3983
|
)
|
3979
3984
|
},
|
3980
3985
|
props.label && /* @__PURE__ */ import_react13.default.createElement(Label2, { ...labelProps }, props.label),
|
3981
|
-
/* @__PURE__ */ import_react13.default.createElement(
|
3982
|
-
|
3986
|
+
/* @__PURE__ */ import_react13.default.createElement(import_react_tabs.Tabs, null, /* @__PURE__ */ import_react13.default.createElement(
|
3987
|
+
import_react_tabs.TabsList,
|
3983
3988
|
{
|
3989
|
+
role: "tablist",
|
3984
3990
|
ref: parentRef,
|
3985
3991
|
className: cn(
|
3986
3992
|
props.options && ((_a = props.options) == null ? void 0 : _a.length) > 2 ? "hawa-flex-wrap xs:hawa-max-w-full xs:hawa-flex-nowrap" : "",
|
@@ -4006,9 +4012,12 @@ var Radio = (0, import_react13.forwardRef)(
|
|
4006
4012
|
asChild: true
|
4007
4013
|
},
|
4008
4014
|
/* @__PURE__ */ import_react13.default.createElement(
|
4009
|
-
|
4015
|
+
import_react_tabs.TabsTrigger,
|
4010
4016
|
{
|
4011
|
-
"aria-current": "page",
|
4017
|
+
"aria-current": selectedOption === opt.value ? "page" : void 0,
|
4018
|
+
value: opt.value,
|
4019
|
+
role: "tab",
|
4020
|
+
tabIndex: 0,
|
4012
4021
|
onClick: () => {
|
4013
4022
|
if (props.disabled || opt.disabled) return;
|
4014
4023
|
handleChange(opt);
|
@@ -4024,10 +4033,12 @@ var Radio = (0, import_react13.forwardRef)(
|
|
4024
4033
|
),
|
4025
4034
|
/* @__PURE__ */ import_react13.default.createElement(PopoverContent, { ...opt.tooltipContentProps }, opt.tooltip)
|
4026
4035
|
) : /* @__PURE__ */ import_react13.default.createElement(
|
4027
|
-
|
4036
|
+
import_react_tabs.TabsTrigger,
|
4028
4037
|
{
|
4029
4038
|
key: o,
|
4030
|
-
|
4039
|
+
role: "tab",
|
4040
|
+
tabIndex: 0,
|
4041
|
+
"aria-current": selectedOption === opt.value ? "page" : void 0,
|
4031
4042
|
onClick: () => {
|
4032
4043
|
if (props.disabled || opt.disabled) return;
|
4033
4044
|
handleChange(opt);
|
@@ -4035,13 +4046,14 @@ var Radio = (0, import_react13.forwardRef)(
|
|
4035
4046
|
className: cn(
|
4036
4047
|
...radio_option_tabs_styling,
|
4037
4048
|
selectedOption === opt.value ? activeTabStyle : inactiveTabStyle
|
4038
|
-
)
|
4049
|
+
),
|
4050
|
+
value: opt.value
|
4039
4051
|
},
|
4040
4052
|
opt.icon && opt.icon,
|
4041
4053
|
opt.label
|
4042
4054
|
);
|
4043
4055
|
})
|
4044
|
-
),
|
4056
|
+
)),
|
4045
4057
|
!forceHideHelperText && /* @__PURE__ */ import_react13.default.createElement(HelperText, { helperText: props.helperText })
|
4046
4058
|
);
|
4047
4059
|
case "bordered":
|
@@ -5118,7 +5130,7 @@ var tabsTriggerVariant = (0, import_tailwind_variants.tv)({
|
|
5118
5130
|
defaultVariants: { variant: "default", orientation: "horizontal" }
|
5119
5131
|
});
|
5120
5132
|
var TabsContext = React42.createContext({ orientation: "horizontal", variant: "default", scrollable: false });
|
5121
|
-
var
|
5133
|
+
var Tabs2 = React42.forwardRef(
|
5122
5134
|
({ className, orientation, scrollable, variant = "default", ...props }, ref) => /* @__PURE__ */ React42.createElement(
|
5123
5135
|
TabsPrimitive.Root,
|
5124
5136
|
{
|
@@ -5133,7 +5145,7 @@ var Tabs = React42.forwardRef(
|
|
5133
5145
|
/* @__PURE__ */ React42.createElement(TabsContext.Provider, { value: { orientation, variant, scrollable } }, props.children)
|
5134
5146
|
)
|
5135
5147
|
);
|
5136
|
-
var
|
5148
|
+
var TabsList2 = React42.forwardRef(({ className, classNames, ...props }, ref) => {
|
5137
5149
|
const { orientation, variant, scrollable } = React42.useContext(TabsContext);
|
5138
5150
|
const { width } = useViewportSize();
|
5139
5151
|
if (scrollable && width < 768 && orientation === "horizontal") {
|
@@ -5165,7 +5177,7 @@ var TabsList = React42.forwardRef(({ className, classNames, ...props }, ref) =>
|
|
5165
5177
|
);
|
5166
5178
|
}
|
5167
5179
|
});
|
5168
|
-
var
|
5180
|
+
var TabsTrigger2 = React42.forwardRef(
|
5169
5181
|
({ className, chipProps, withPopover = false, onPopoverClick, ...props }, ref) => {
|
5170
5182
|
const { orientation, variant } = React42.useContext(TabsContext);
|
5171
5183
|
if (withPopover) {
|
@@ -5221,9 +5233,9 @@ var TabsContent = React42.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
5221
5233
|
...props
|
5222
5234
|
}
|
5223
5235
|
));
|
5224
|
-
|
5225
|
-
|
5226
|
-
|
5236
|
+
Tabs2.displayName = TabsPrimitive.Root.displayName;
|
5237
|
+
TabsList2.displayName = TabsPrimitive.List.displayName;
|
5238
|
+
TabsTrigger2.displayName = TabsPrimitive.Trigger.displayName;
|
5227
5239
|
TabsContent.displayName = TabsPrimitive.Content.displayName;
|
5228
5240
|
|
5229
5241
|
// elements/select/Select.tsx
|
package/dist/elements/index.mjs
CHANGED
@@ -26,7 +26,7 @@ import {
|
|
26
26
|
TabsList,
|
27
27
|
TabsTrigger,
|
28
28
|
Textarea
|
29
|
-
} from "../chunk-
|
29
|
+
} from "../chunk-MEXJAHQV.mjs";
|
30
30
|
import {
|
31
31
|
useClipboard
|
32
32
|
} from "../chunk-WL7C2A5D.mjs";
|
@@ -41,7 +41,7 @@ import {
|
|
41
41
|
SheetPortal,
|
42
42
|
SheetTitle,
|
43
43
|
SheetTrigger
|
44
|
-
} from "../chunk-
|
44
|
+
} from "../chunk-XC6FSDW7.mjs";
|
45
45
|
import {
|
46
46
|
Button,
|
47
47
|
Card,
|
@@ -81,7 +81,7 @@ import {
|
|
81
81
|
buttonVariants,
|
82
82
|
calculateLuminance,
|
83
83
|
cn
|
84
|
-
} from "../chunk-
|
84
|
+
} from "../chunk-3B7UZCET.mjs";
|
85
85
|
import {
|
86
86
|
__require
|
87
87
|
} from "../chunk-2LUXOXAL.mjs";
|
@@ -57,28 +57,17 @@ var import_class_variance_authority = require("class-variance-authority");
|
|
57
57
|
// elements/helperText/HelperText.tsx
|
58
58
|
var import_react = __toESM(require("react"));
|
59
59
|
var HelperText = ({
|
60
|
-
helperText
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
"p",
|
72
|
-
{
|
73
|
-
className: cn(
|
74
|
-
"hawa-my-0 hawa-text-start hawa-text-helper-color hawa-transition-all",
|
75
|
-
helperText ? "hawa-opacity-100" : "hawa-h-0 hawa-opacity-0",
|
76
|
-
sizes[size]
|
77
|
-
)
|
78
|
-
},
|
79
|
-
helperText
|
80
|
-
);
|
81
|
-
};
|
60
|
+
helperText
|
61
|
+
}) => /* @__PURE__ */ import_react.default.createElement(
|
62
|
+
"p",
|
63
|
+
{
|
64
|
+
className: cn(
|
65
|
+
"hawa-my-0 hawa-text-start hawa-text-helper-color hawa-transition-all hawa-text-xs",
|
66
|
+
helperText ? "hawa-opacity-100 hawa-h-4" : "hawa-h-0 hawa-opacity-0"
|
67
|
+
)
|
68
|
+
},
|
69
|
+
helperText
|
70
|
+
);
|
82
71
|
|
83
72
|
// elements/label/Label.tsx
|
84
73
|
var React3 = __toESM(require("react"));
|
@@ -515,7 +504,7 @@ var Alert = ({
|
|
515
504
|
severity = "none",
|
516
505
|
duration,
|
517
506
|
icon,
|
518
|
-
|
507
|
+
classNames,
|
519
508
|
...props
|
520
509
|
}) => {
|
521
510
|
const alertRef = (0, import_react4.useRef)(null);
|
@@ -566,21 +555,25 @@ var Alert = ({
|
|
566
555
|
"hawa-relative hawa-mb-4 hawa-flex hawa-flex-col hawa-rounded hawa-p-4 hawa-text-sm hawa-transition-all",
|
567
556
|
styleVariant[severity],
|
568
557
|
closed ? "hawa-opacity-0" : "hawa-opacity-100",
|
569
|
-
|
558
|
+
classNames == null ? void 0 : classNames.root
|
570
559
|
)
|
571
560
|
},
|
572
561
|
/* @__PURE__ */ import_react4.default.createElement("div", { className: "hawa-flex hawa-flex-row" }, icon && /* @__PURE__ */ import_react4.default.createElement(
|
573
562
|
"div",
|
574
563
|
{
|
575
|
-
className:
|
564
|
+
className: cn(
|
565
|
+
direction === "rtl" ? "hawa-pl-2 hawa-pt-1" : "hawa-pr-2 hawa-pt-1",
|
566
|
+
classNames == null ? void 0 : classNames.icon
|
567
|
+
)
|
576
568
|
},
|
577
569
|
icon
|
578
|
-
), /* @__PURE__ */ import_react4.default.createElement("div", { className: "hawa-flex hawa-flex-col" }, /* @__PURE__ */ import_react4.default.createElement(
|
570
|
+
), /* @__PURE__ */ import_react4.default.createElement("div", { className: cn("hawa-flex hawa-flex-col", classNames == null ? void 0 : classNames.content) }, /* @__PURE__ */ import_react4.default.createElement(
|
579
571
|
"span",
|
580
572
|
{
|
581
573
|
className: cn(
|
582
574
|
"hawa-font-bold",
|
583
|
-
direction === "rtl" ? "hawa-ml-8" : "hawa-mr-8"
|
575
|
+
direction === "rtl" ? "hawa-ml-8" : "hawa-mr-8",
|
576
|
+
classNames == null ? void 0 : classNames.title
|
584
577
|
)
|
585
578
|
},
|
586
579
|
props.title
|
@@ -589,19 +582,29 @@ var Alert = ({
|
|
589
582
|
{
|
590
583
|
className: cn(
|
591
584
|
direction === "rtl" ? "hawa-ml-8" : "hawa-mr-8",
|
592
|
-
props.persistent ? "hawa-w-full" : "hawa-w-[calc(100% - 40px)]"
|
585
|
+
props.persistent ? "hawa-w-full" : "hawa-w-[calc(100% - 40px)]",
|
586
|
+
classNames == null ? void 0 : classNames.text
|
593
587
|
)
|
594
588
|
},
|
595
589
|
props.text
|
596
|
-
), props.actions && /* @__PURE__ */ import_react4.default.createElement(
|
597
|
-
|
590
|
+
), props.actions && /* @__PURE__ */ import_react4.default.createElement(
|
591
|
+
"div",
|
598
592
|
{
|
599
|
-
|
600
|
-
|
601
|
-
|
593
|
+
className: cn(
|
594
|
+
"hawa-mt-2 hawa-flex hawa-flex-row hawa-gap-2",
|
595
|
+
classNames == null ? void 0 : classNames.actions
|
596
|
+
)
|
602
597
|
},
|
603
|
-
act.
|
604
|
-
|
598
|
+
props.actions.map((act, index) => /* @__PURE__ */ import_react4.default.createElement(
|
599
|
+
Button,
|
600
|
+
{
|
601
|
+
key: index,
|
602
|
+
variant: act.variant,
|
603
|
+
onClick: act.onClick()
|
604
|
+
},
|
605
|
+
act.label
|
606
|
+
))
|
607
|
+
))),
|
605
608
|
!props.persistent && /* @__PURE__ */ import_react4.default.createElement(
|
606
609
|
"button",
|
607
610
|
{
|
@@ -611,7 +614,8 @@ var Alert = ({
|
|
611
614
|
className: cn(
|
612
615
|
"hawa-absolute hawa-top-2 hawa-inline-flex hawa-h-9 hawa-w-9 hawa-items-center hawa-justify-center hawa-rounded-inner hawa-p-1.5 hawa-transition-all hover:hawa-text-gray-900",
|
613
616
|
closeButtonStyle[severity],
|
614
|
-
direction === "rtl" ? "hawa-left-2" : "hawa-right-2"
|
617
|
+
direction === "rtl" ? "hawa-left-2" : "hawa-right-2",
|
618
|
+
classNames == null ? void 0 : classNames.closeButton
|
615
619
|
),
|
616
620
|
onClick: () => {
|
617
621
|
if (props.onAlertClosed) {
|