@sikka/hawa 0.15.2-next → 0.15.4-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/index.css +8 -0
- package/dist/index.d.mts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +41 -15
- package/dist/index.mjs +39 -14
- package/package.json +1 -1
package/dist/index.css
CHANGED
|
@@ -843,6 +843,9 @@ input[type="number"]::-webkit-inner-spin-button,
|
|
|
843
843
|
.hawa-z-\[1\] {
|
|
844
844
|
z-index: 1;
|
|
845
845
|
}
|
|
846
|
+
.hawa-z-\[900\] {
|
|
847
|
+
z-index: 900;
|
|
848
|
+
}
|
|
846
849
|
.hawa-m-0 {
|
|
847
850
|
margin: 0px;
|
|
848
851
|
}
|
|
@@ -1531,6 +1534,11 @@ input[type="number"]::-webkit-inner-spin-button,
|
|
|
1531
1534
|
-moz-user-select: none;
|
|
1532
1535
|
user-select: none;
|
|
1533
1536
|
}
|
|
1537
|
+
.hawa-select-text {
|
|
1538
|
+
-webkit-user-select: text;
|
|
1539
|
+
-moz-user-select: text;
|
|
1540
|
+
user-select: text;
|
|
1541
|
+
}
|
|
1534
1542
|
.hawa-resize-none {
|
|
1535
1543
|
resize: none;
|
|
1536
1544
|
}
|
package/dist/index.d.mts
CHANGED
|
@@ -716,9 +716,11 @@ declare const ScrollIndicator: FC<ScrollIndicatorProps>;
|
|
|
716
716
|
type BadgeTypes = {
|
|
717
717
|
position: "right" | "left";
|
|
718
718
|
anchor: RefObject<HTMLElement>;
|
|
719
|
+
size?: "small" | "default" | "large";
|
|
720
|
+
text?: string | number;
|
|
719
721
|
};
|
|
720
722
|
declare const Badge: FC<BadgeTypes>;
|
|
721
|
-
declare const BadgedComponent: ({ children, className, hideBadge, position, }: any) => React__default.JSX.Element;
|
|
723
|
+
declare const BadgedComponent: ({ children, className, hideBadge, position, size, text, }: any) => React__default.JSX.Element;
|
|
722
724
|
|
|
723
725
|
declare const Tabs: React$1.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
724
726
|
orientation?: OrientationType | undefined;
|
package/dist/index.d.ts
CHANGED
|
@@ -716,9 +716,11 @@ declare const ScrollIndicator: FC<ScrollIndicatorProps>;
|
|
|
716
716
|
type BadgeTypes = {
|
|
717
717
|
position: "right" | "left";
|
|
718
718
|
anchor: RefObject<HTMLElement>;
|
|
719
|
+
size?: "small" | "default" | "large";
|
|
720
|
+
text?: string | number;
|
|
719
721
|
};
|
|
720
722
|
declare const Badge: FC<BadgeTypes>;
|
|
721
|
-
declare const BadgedComponent: ({ children, className, hideBadge, position, }: any) => React__default.JSX.Element;
|
|
723
|
+
declare const BadgedComponent: ({ children, className, hideBadge, position, size, text, }: any) => React__default.JSX.Element;
|
|
722
724
|
|
|
723
725
|
declare const Tabs: React$1.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
724
726
|
orientation?: OrientationType | undefined;
|
package/dist/index.js
CHANGED
|
@@ -3438,7 +3438,7 @@ var Label2 = React14.forwardRef(function(_param, ref) /* @__PURE__ */ {
|
|
|
3438
3438
|
"children"
|
|
3439
3439
|
]);
|
|
3440
3440
|
return React14.createElement("div", {
|
|
3441
|
-
className: "hawa-flex hawa-flex-row hawa-gap-
|
|
3441
|
+
className: "hawa-flex hawa-flex-row hawa-gap-1 hawa-items-center"
|
|
3442
3442
|
}, /* @__PURE__ */ React14.createElement("label", _object_spread({
|
|
3443
3443
|
ref: ref,
|
|
3444
3444
|
className: cn("hawa-text-sm hawa-font-medium hawa-leading-none peer-disabled:hawa-cursor-not-allowed peer-disabled:hawa-opacity-70", className)
|
|
@@ -4331,14 +4331,18 @@ var Combobox = function(_param) {
|
|
|
4331
4331
|
]);
|
|
4332
4332
|
var _React28_useState = _sliced_to_array(React28.useState(false), 2), open = _React28_useState[0], setOpen = _React28_useState[1];
|
|
4333
4333
|
var _React28_useState1 = _sliced_to_array(React28.useState(defaultValue), 2), value = _React28_useState1[0], setValue = _React28_useState1[1];
|
|
4334
|
+
var handleOpenChange = function(open2) {
|
|
4335
|
+
if (!(props.isLoading || props.preview)) {
|
|
4336
|
+
setOpen(open2);
|
|
4337
|
+
}
|
|
4338
|
+
};
|
|
4334
4339
|
return /* @__PURE__ */ React28.createElement("div", {
|
|
4335
4340
|
className: cn("hawa-flex hawa-flex-col hawa-gap-2 hawa-relative hawa-h-fit", props.width === "fit" ? "hawa-w-fit" : "hawa-w-full")
|
|
4336
4341
|
}, props.label && /* @__PURE__ */ React28.createElement(Label2, null, props.label), /* @__PURE__ */ React28.createElement(PopoverPrimitive2.Root, {
|
|
4337
4342
|
open: open,
|
|
4338
|
-
onOpenChange:
|
|
4343
|
+
onOpenChange: handleOpenChange
|
|
4339
4344
|
}, /* @__PURE__ */ React28.createElement(PopoverTrigger, {
|
|
4340
|
-
asChild: true
|
|
4341
|
-
disabled: props.isLoading || props.preview
|
|
4345
|
+
asChild: true
|
|
4342
4346
|
}, props.isLoading ? /* @__PURE__ */ React28.createElement("div", {
|
|
4343
4347
|
className: "hawa-pb-2"
|
|
4344
4348
|
}, /* @__PURE__ */ React28.createElement(Skeleton, {
|
|
@@ -4601,7 +4605,7 @@ var CodeBlock = function(_param) {
|
|
|
4601
4605
|
var React32 = __toESM(require("react"));
|
|
4602
4606
|
var ToastPrimitives = __toESM(require("@radix-ui/react-toast"));
|
|
4603
4607
|
var import_class_variance_authority2 = require("class-variance-authority");
|
|
4604
|
-
var toastVariants = (0, import_class_variance_authority2.cva)("hawa-group hawa-pointer-events-auto hawa-relative hawa-flex hawa-w-full hawa-items-center hawa-justify-between hawa-space-x-4 hawa-overflow-hidden hawa-rounded-md hawa-border hawa-shadow-lg hawa-transition-all data-[swipe=cancel]:hawa-translate-x-0 data-[swipe=end]:hawa-translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:hawa-translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:hawa-transition-none data-[state=open]:hawa-animate-in data-[state=closed]:hawa-animate-out data-[swipe=end]:hawa-animate-out data-[state=closed]:hawa-fade-out-80 data-[state=open]:hawa-slide-in-from-top-full data-[state=open]:sm:hawa-slide-in-from-bottom-full", {
|
|
4608
|
+
var toastVariants = (0, import_class_variance_authority2.cva)("hawa-group hawa-z-[900] hawa-pointer-events-auto hawa-relative hawa-flex hawa-w-full hawa-items-center hawa-justify-between hawa-space-x-4 hawa-overflow-hidden hawa-rounded-md hawa-border hawa-shadow-lg hawa-transition-all data-[swipe=cancel]:hawa-translate-x-0 data-[swipe=end]:hawa-translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:hawa-translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:hawa-transition-none data-[state=open]:hawa-animate-in data-[state=closed]:hawa-animate-out data-[swipe=end]:hawa-animate-out data-[state=closed]:hawa-fade-out-80 data-[state=open]:hawa-slide-in-from-top-full data-[state=open]:sm:hawa-slide-in-from-bottom-full", {
|
|
4605
4609
|
variants: {
|
|
4606
4610
|
variant: {
|
|
4607
4611
|
default: "hawa-border hawa-bg-background hawa-text-foreground",
|
|
@@ -4684,7 +4688,7 @@ var ToastTitle = React32.forwardRef(function(_param, ref) /* @__PURE__ */ {
|
|
|
4684
4688
|
]);
|
|
4685
4689
|
return React32.createElement(ToastPrimitives.Title, _object_spread({
|
|
4686
4690
|
ref: ref,
|
|
4687
|
-
className: cn("hawa-text-sm hawa-font-semibold", className)
|
|
4691
|
+
className: cn("hawa-text-sm hawa-font-semibold hawa-select-text", className)
|
|
4688
4692
|
}, props));
|
|
4689
4693
|
});
|
|
4690
4694
|
ToastTitle.displayName = ToastPrimitives.Title.displayName;
|
|
@@ -4694,7 +4698,7 @@ var ToastDescription = React32.forwardRef(function(_param, ref) /* @__PURE__ */
|
|
|
4694
4698
|
]);
|
|
4695
4699
|
return React32.createElement(ToastPrimitives.Description, _object_spread({
|
|
4696
4700
|
ref: ref,
|
|
4697
|
-
className: cn("hawa-text-sm hawa-opacity-90", className)
|
|
4701
|
+
className: cn("hawa-text-sm hawa-opacity-90 hawa-select-text", className)
|
|
4698
4702
|
}, props));
|
|
4699
4703
|
});
|
|
4700
4704
|
ToastDescription.displayName = ToastPrimitives.Description.displayName;
|
|
@@ -6073,9 +6077,29 @@ var ScrollIndicator = function(param) {
|
|
|
6073
6077
|
// components/elements/Badge.tsx
|
|
6074
6078
|
var import_react29 = __toESM(require("react"));
|
|
6075
6079
|
var Badge = function(param) {
|
|
6076
|
-
var anchor = param.anchor, _param_position = param.position, position = _param_position === void 0 ? "right" : _param_position;
|
|
6080
|
+
var anchor = param.anchor, _param_position = param.position, position = _param_position === void 0 ? "right" : _param_position, _param_size = param.size, size = _param_size === void 0 ? "default" : _param_size, text = param.text;
|
|
6077
6081
|
var _ref = _sliced_to_array((0, import_react29.useState)(null), 2), badgePosition = _ref[0], setBadgePosition = _ref[1];
|
|
6078
6082
|
var indicatorRef = (0, import_react29.useRef)(null);
|
|
6083
|
+
var sizeStyles = {
|
|
6084
|
+
small: {
|
|
6085
|
+
top: 4,
|
|
6086
|
+
left: 6,
|
|
6087
|
+
right: 7,
|
|
6088
|
+
classes: "hawa-w-3 hawa-h-3"
|
|
6089
|
+
},
|
|
6090
|
+
default: {
|
|
6091
|
+
top: 4,
|
|
6092
|
+
left: 7,
|
|
6093
|
+
right: 5,
|
|
6094
|
+
classes: "hawa-w-3 hawa-h-3"
|
|
6095
|
+
},
|
|
6096
|
+
large: {
|
|
6097
|
+
top: 6,
|
|
6098
|
+
left: 12,
|
|
6099
|
+
right: 7,
|
|
6100
|
+
classes: "hawa-w-6 hawa-h-6"
|
|
6101
|
+
}
|
|
6102
|
+
};
|
|
6079
6103
|
(0, import_react29.useEffect)(function() {
|
|
6080
6104
|
var handlePositioning = function() {
|
|
6081
6105
|
if (anchor.current && indicatorRef.current) {
|
|
@@ -6087,8 +6111,8 @@ var Badge = function(param) {
|
|
|
6087
6111
|
var marginRight = parseFloat(style.marginRight.replace("px", ""));
|
|
6088
6112
|
if (parentRect) {
|
|
6089
6113
|
setBadgePosition({
|
|
6090
|
-
top: rect.top - parentRect.top - marginTop -
|
|
6091
|
-
left: position === "right" ? parentRect.right - parentRect.left -
|
|
6114
|
+
top: rect.top - parentRect.top - marginTop - sizeStyles[size].top,
|
|
6115
|
+
left: position === "right" ? parentRect.right - parentRect.left - sizeStyles[size].left : rect.right - parentRect.left - parentRect.width - marginRight - sizeStyles[size].right
|
|
6092
6116
|
});
|
|
6093
6117
|
}
|
|
6094
6118
|
}
|
|
@@ -6110,16 +6134,18 @@ var Badge = function(param) {
|
|
|
6110
6134
|
top: badgePosition === null || badgePosition === void 0 ? void 0 : badgePosition.top,
|
|
6111
6135
|
left: badgePosition === null || badgePosition === void 0 ? void 0 : badgePosition.left
|
|
6112
6136
|
},
|
|
6113
|
-
className: "hawa-bg-red-500 hawa-origin-center hawa-
|
|
6114
|
-
}));
|
|
6137
|
+
className: cn("hawa-bg-red-500 hawa-origin-center hawa-rounded-full ", sizeStyles[size].classes, "hawa-text-white hawa-text-[9px] hawa-flex hawa-flex-row hawa-justify-center hawa-items-center")
|
|
6138
|
+
}, size === "large" && text && text));
|
|
6115
6139
|
};
|
|
6116
6140
|
var BadgedComponent = function(param) {
|
|
6117
|
-
var children = param.children, className = param.className, hideBadge = param.hideBadge, position = param.position;
|
|
6141
|
+
var children = param.children, className = param.className, hideBadge = param.hideBadge, position = param.position, size = param.size, text = param.text;
|
|
6118
6142
|
var ref = (0, import_react29.useRef)(null);
|
|
6119
6143
|
return /* @__PURE__ */ import_react29.default.createElement("div", {
|
|
6120
6144
|
className: cn("hawa-relative", className),
|
|
6121
6145
|
ref: ref
|
|
6122
6146
|
}, !hideBadge && /* @__PURE__ */ import_react29.default.createElement(Badge, {
|
|
6147
|
+
size: size,
|
|
6148
|
+
text: text,
|
|
6123
6149
|
position: position,
|
|
6124
6150
|
anchor: ref
|
|
6125
6151
|
}), children);
|
|
@@ -7196,7 +7222,7 @@ var AppLayout = function(_param) {
|
|
|
7196
7222
|
return /* @__PURE__ */ import_react37.default.createElement("div", {
|
|
7197
7223
|
className: "hawa-fixed hawa-left-0"
|
|
7198
7224
|
}, props.topBar && /* @__PURE__ */ import_react37.default.createElement("div", {
|
|
7199
|
-
className: cn("hawa-fixed hawa-left-0 hawa-right-0 hawa-top-0 hawa-z-
|
|
7225
|
+
className: cn("hawa-fixed hawa-left-0 hawa-right-0 hawa-top-0 hawa-z-0 hawa-flex hawa-h-14 hawa-w-full hawa-items-center hawa-justify-between hawa-bg-primary-foreground hawa-p-2", isRTL ? "hawa-flex-row-reverse" : "hawa-flex-row")
|
|
7200
7226
|
}, size > 600 ? /* @__PURE__ */ import_react37.default.createElement("div", {
|
|
7201
7227
|
className: cn("dark:hawa-text-white", isRTL ? [
|
|
7202
7228
|
size > 600 ? "hawa-mr-14" : "hawa-mr-2",
|
|
@@ -7255,7 +7281,7 @@ var AppLayout = function(_param) {
|
|
|
7255
7281
|
clipRule: "evenodd"
|
|
7256
7282
|
})))
|
|
7257
7283
|
}))), /* @__PURE__ */ import_react37.default.createElement("div", {
|
|
7258
|
-
className: cn("hawa-fixed hawa-z-
|
|
7284
|
+
className: cn("hawa-fixed hawa-z-0 hawa-flex hawa-flex-col hawa-justify-between hawa-overflow-x-clip hawa-transition-all", isRTL ? "hawa-right-0 hawa-top-0 hawa-h-14" : "hawa-left-0 hawa-top-0 hawa-h-14", "hawa-h-[calc(100dvh)]"),
|
|
7259
7285
|
style: {
|
|
7260
7286
|
width: size > 600 ? openSideMenu ? "".concat(drawerSizeStyle["opened"][drawerSize], "px") : "".concat(drawerSizeStyle["closed"][drawerSize], "px") : openSideMenu ? "".concat(drawerSizeStyle["opened"][drawerSize], "px") : "0px"
|
|
7261
7287
|
},
|
package/dist/index.mjs
CHANGED
|
@@ -2694,7 +2694,7 @@ var Tooltip = ({
|
|
|
2694
2694
|
|
|
2695
2695
|
// components/elements/Label.tsx
|
|
2696
2696
|
var Label2 = React14.forwardRef(
|
|
2697
|
-
({ className, hint, hintSide, required, children, ...props }, ref) => /* @__PURE__ */ React14.createElement("div", { className: "hawa-flex hawa-flex-row hawa-gap-
|
|
2697
|
+
({ className, hint, hintSide, required, children, ...props }, ref) => /* @__PURE__ */ React14.createElement("div", { className: "hawa-flex hawa-flex-row hawa-gap-1 hawa-items-center" }, /* @__PURE__ */ React14.createElement(
|
|
2698
2698
|
"label",
|
|
2699
2699
|
{
|
|
2700
2700
|
ref,
|
|
@@ -3809,6 +3809,11 @@ var Combobox = ({
|
|
|
3809
3809
|
function getProperty(obj, key) {
|
|
3810
3810
|
return obj[key];
|
|
3811
3811
|
}
|
|
3812
|
+
const handleOpenChange = (open2) => {
|
|
3813
|
+
if (!(props.isLoading || props.preview)) {
|
|
3814
|
+
setOpen(open2);
|
|
3815
|
+
}
|
|
3816
|
+
};
|
|
3812
3817
|
return /* @__PURE__ */ React28.createElement(
|
|
3813
3818
|
"div",
|
|
3814
3819
|
{
|
|
@@ -3818,7 +3823,7 @@ var Combobox = ({
|
|
|
3818
3823
|
)
|
|
3819
3824
|
},
|
|
3820
3825
|
props.label && /* @__PURE__ */ React28.createElement(Label2, null, props.label),
|
|
3821
|
-
/* @__PURE__ */ React28.createElement(PopoverPrimitive2.Root, { open, onOpenChange:
|
|
3826
|
+
/* @__PURE__ */ React28.createElement(PopoverPrimitive2.Root, { open, onOpenChange: handleOpenChange }, /* @__PURE__ */ React28.createElement(PopoverTrigger, { asChild: true }, props.isLoading ? /* @__PURE__ */ React28.createElement("div", { className: "hawa-pb-2" }, /* @__PURE__ */ React28.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" })) : /* @__PURE__ */ React28.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-2 hawa-items-start " }, /* @__PURE__ */ React28.createElement(
|
|
3822
3827
|
"div",
|
|
3823
3828
|
{
|
|
3824
3829
|
className: cn(
|
|
@@ -4164,7 +4169,7 @@ import * as React32 from "react";
|
|
|
4164
4169
|
import * as ToastPrimitives from "@radix-ui/react-toast";
|
|
4165
4170
|
import { cva as cva2 } from "class-variance-authority";
|
|
4166
4171
|
var toastVariants = cva2(
|
|
4167
|
-
"hawa-group hawa-pointer-events-auto hawa-relative hawa-flex hawa-w-full hawa-items-center hawa-justify-between hawa-space-x-4 hawa-overflow-hidden hawa-rounded-md hawa-border hawa-shadow-lg hawa-transition-all data-[swipe=cancel]:hawa-translate-x-0 data-[swipe=end]:hawa-translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:hawa-translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:hawa-transition-none data-[state=open]:hawa-animate-in data-[state=closed]:hawa-animate-out data-[swipe=end]:hawa-animate-out data-[state=closed]:hawa-fade-out-80 data-[state=open]:hawa-slide-in-from-top-full data-[state=open]:sm:hawa-slide-in-from-bottom-full",
|
|
4172
|
+
"hawa-group hawa-z-[900] hawa-pointer-events-auto hawa-relative hawa-flex hawa-w-full hawa-items-center hawa-justify-between hawa-space-x-4 hawa-overflow-hidden hawa-rounded-md hawa-border hawa-shadow-lg hawa-transition-all data-[swipe=cancel]:hawa-translate-x-0 data-[swipe=end]:hawa-translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:hawa-translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:hawa-transition-none data-[state=open]:hawa-animate-in data-[state=closed]:hawa-animate-out data-[swipe=end]:hawa-animate-out data-[state=closed]:hawa-fade-out-80 data-[state=open]:hawa-slide-in-from-top-full data-[state=open]:sm:hawa-slide-in-from-bottom-full",
|
|
4168
4173
|
{
|
|
4169
4174
|
variants: {
|
|
4170
4175
|
variant: {
|
|
@@ -4266,7 +4271,10 @@ var ToastTitle = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
4266
4271
|
ToastPrimitives.Title,
|
|
4267
4272
|
{
|
|
4268
4273
|
ref,
|
|
4269
|
-
className: cn(
|
|
4274
|
+
className: cn(
|
|
4275
|
+
"hawa-text-sm hawa-font-semibold hawa-select-text",
|
|
4276
|
+
className
|
|
4277
|
+
),
|
|
4270
4278
|
...props
|
|
4271
4279
|
}
|
|
4272
4280
|
));
|
|
@@ -4275,7 +4283,7 @@ var ToastDescription = React32.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
4275
4283
|
ToastPrimitives.Description,
|
|
4276
4284
|
{
|
|
4277
4285
|
ref,
|
|
4278
|
-
className: cn("hawa-text-sm hawa-opacity-90", className),
|
|
4286
|
+
className: cn("hawa-text-sm hawa-opacity-90 hawa-select-text", className),
|
|
4279
4287
|
...props
|
|
4280
4288
|
}
|
|
4281
4289
|
));
|
|
@@ -5792,9 +5800,19 @@ var ScrollIndicator = ({
|
|
|
5792
5800
|
|
|
5793
5801
|
// components/elements/Badge.tsx
|
|
5794
5802
|
import React50, { useEffect as useEffect15, useState as useState20, useRef as useRef8 } from "react";
|
|
5795
|
-
var Badge = ({
|
|
5803
|
+
var Badge = ({
|
|
5804
|
+
anchor,
|
|
5805
|
+
position = "right",
|
|
5806
|
+
size = "default",
|
|
5807
|
+
text
|
|
5808
|
+
}) => {
|
|
5796
5809
|
const [badgePosition, setBadgePosition] = useState20(null);
|
|
5797
5810
|
const indicatorRef = useRef8(null);
|
|
5811
|
+
const sizeStyles = {
|
|
5812
|
+
small: { top: 4, left: 6, right: 7, classes: "hawa-w-3 hawa-h-3" },
|
|
5813
|
+
default: { top: 4, left: 7, right: 5, classes: "hawa-w-3 hawa-h-3" },
|
|
5814
|
+
large: { top: 6, left: 12, right: 7, classes: "hawa-w-6 hawa-h-6" }
|
|
5815
|
+
};
|
|
5798
5816
|
useEffect15(() => {
|
|
5799
5817
|
const handlePositioning = () => {
|
|
5800
5818
|
if (anchor.current && indicatorRef.current) {
|
|
@@ -5805,8 +5823,8 @@ var Badge = ({ anchor, position = "right" }) => {
|
|
|
5805
5823
|
const marginRight = parseFloat(style.marginRight.replace("px", ""));
|
|
5806
5824
|
if (parentRect) {
|
|
5807
5825
|
setBadgePosition({
|
|
5808
|
-
top: rect.top - parentRect.top - marginTop -
|
|
5809
|
-
left: position === "right" ? parentRect.right - parentRect.left -
|
|
5826
|
+
top: rect.top - parentRect.top - marginTop - sizeStyles[size].top,
|
|
5827
|
+
left: position === "right" ? parentRect.right - parentRect.left - sizeStyles[size].left : rect.right - parentRect.left - parentRect.width - marginRight - sizeStyles[size].right
|
|
5810
5828
|
});
|
|
5811
5829
|
}
|
|
5812
5830
|
}
|
|
@@ -5825,18 +5843,25 @@ var Badge = ({ anchor, position = "right" }) => {
|
|
|
5825
5843
|
top: badgePosition?.top,
|
|
5826
5844
|
left: badgePosition?.left
|
|
5827
5845
|
},
|
|
5828
|
-
className:
|
|
5829
|
-
|
|
5846
|
+
className: cn(
|
|
5847
|
+
"hawa-bg-red-500 hawa-origin-center hawa-rounded-full ",
|
|
5848
|
+
sizeStyles[size].classes,
|
|
5849
|
+
"hawa-text-white hawa-text-[9px] hawa-flex hawa-flex-row hawa-justify-center hawa-items-center"
|
|
5850
|
+
)
|
|
5851
|
+
},
|
|
5852
|
+
size === "large" && text && text
|
|
5830
5853
|
));
|
|
5831
5854
|
};
|
|
5832
5855
|
var BadgedComponent = ({
|
|
5833
5856
|
children,
|
|
5834
5857
|
className,
|
|
5835
5858
|
hideBadge,
|
|
5836
|
-
position
|
|
5859
|
+
position,
|
|
5860
|
+
size,
|
|
5861
|
+
text
|
|
5837
5862
|
}) => {
|
|
5838
5863
|
const ref = useRef8(null);
|
|
5839
|
-
return /* @__PURE__ */ React50.createElement("div", { className: cn("hawa-relative", className), ref }, !hideBadge && /* @__PURE__ */ React50.createElement(Badge, { position, anchor: ref }), children);
|
|
5864
|
+
return /* @__PURE__ */ React50.createElement("div", { className: cn("hawa-relative", className), ref }, !hideBadge && /* @__PURE__ */ React50.createElement(Badge, { size, text, position, anchor: ref }), children);
|
|
5840
5865
|
};
|
|
5841
5866
|
|
|
5842
5867
|
// components/elements/Tabs.tsx
|
|
@@ -7017,7 +7042,7 @@ var AppLayout = ({
|
|
|
7017
7042
|
"div",
|
|
7018
7043
|
{
|
|
7019
7044
|
className: cn(
|
|
7020
|
-
"hawa-fixed hawa-left-0 hawa-right-0 hawa-top-0 hawa-z-
|
|
7045
|
+
"hawa-fixed hawa-left-0 hawa-right-0 hawa-top-0 hawa-z-0 hawa-flex hawa-h-14 hawa-w-full hawa-items-center hawa-justify-between hawa-bg-primary-foreground hawa-p-2",
|
|
7021
7046
|
isRTL ? "hawa-flex-row-reverse" : "hawa-flex-row"
|
|
7022
7047
|
)
|
|
7023
7048
|
},
|
|
@@ -7113,7 +7138,7 @@ var AppLayout = ({
|
|
|
7113
7138
|
"div",
|
|
7114
7139
|
{
|
|
7115
7140
|
className: cn(
|
|
7116
|
-
"hawa-fixed hawa-z-
|
|
7141
|
+
"hawa-fixed hawa-z-0 hawa-flex hawa-flex-col hawa-justify-between hawa-overflow-x-clip hawa-transition-all",
|
|
7117
7142
|
isRTL ? "hawa-right-0 hawa-top-0 hawa-h-14" : "hawa-left-0 hawa-top-0 hawa-h-14",
|
|
7118
7143
|
"hawa-h-[calc(100dvh)]"
|
|
7119
7144
|
),
|