@sikka/hawa 0.26.21 → 0.26.23
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 +2 -18
- package/dist/alert/index.d.mts +1 -0
- package/dist/alert/index.d.ts +1 -0
- package/dist/blocks/auth/index.mjs +5 -4
- package/dist/blocks/feedback/index.js +114 -118
- package/dist/blocks/feedback/index.mjs +6 -5
- package/dist/blocks/index.js +28 -30
- package/dist/blocks/index.mjs +3 -2
- package/dist/blocks/misc/index.js +28 -30
- package/dist/blocks/misc/index.mjs +20 -17
- package/dist/blocks/pricing/index.mjs +4 -4
- package/dist/carousel/index.d.mts +2 -0
- package/dist/carousel/index.d.ts +2 -0
- package/dist/carousel/index.js +31 -16
- package/dist/carousel/index.mjs +30 -15
- package/dist/checkbox/index.d.mts +1 -1
- package/dist/checkbox/index.d.ts +1 -1
- package/dist/chip/index.d.mts +1 -1
- package/dist/chip/index.d.ts +1 -1
- package/dist/{chunk-OTGCLEKC.mjs → chunk-2R7F2GL7.mjs} +20 -0
- package/dist/{chunk-POIP5U4M.mjs → chunk-4EGKGSGY.mjs} +1 -1
- package/dist/{chunk-APZM24KK.mjs → chunk-5YXZXYLH.mjs} +15 -18
- package/dist/{chunk-WPSUV4AD.mjs → chunk-F3DQJHTG.mjs} +29 -31
- package/dist/{chunk-VQQ6MUX5.mjs → chunk-FQ6WVEHW.mjs} +1 -1
- package/dist/{chunk-U3TZWNDZ.mjs → chunk-GVJYACGA.mjs} +1 -1
- package/dist/{chunk-Z5SL5QTQ.mjs → chunk-MQUAGP7K.mjs} +20 -0
- package/dist/{chunk-OAXF3RCQ.mjs → chunk-NMS5LCSQ.mjs} +1 -1
- package/dist/{chunk-4IOG44R3.mjs → chunk-OY66MBXP.mjs} +1 -1
- package/dist/{chunk-FDKCMEMD.mjs → chunk-R4HAAT6R.mjs} +1 -1
- package/dist/chunk-WUHNPHD5.mjs +0 -0
- package/dist/chunk-ZFXKCRJC.mjs +11 -0
- package/dist/codeBlock/index.d.mts +2 -1
- package/dist/codeBlock/index.d.ts +2 -1
- package/dist/codeBlock/index.js +21 -17
- package/dist/codeBlock/index.mjs +21 -12
- package/dist/collapsible/index.mjs +2 -0
- package/dist/colorPicker/index.d.mts +4 -0
- package/dist/colorPicker/index.d.ts +4 -0
- package/dist/colorPicker/index.js +80 -23
- package/dist/colorPicker/index.mjs +55 -15
- package/dist/commonTypes-2k6FnHw5.d.mts +4 -0
- package/dist/commonTypes-2k6FnHw5.d.ts +4 -0
- package/dist/dataTable/index.d.mts +2 -1
- package/dist/dataTable/index.d.ts +2 -1
- package/dist/dataTable/index.js +1 -1
- package/dist/dataTable/index.mjs +1 -1
- package/dist/elements/index.d.mts +11 -2
- package/dist/elements/index.d.ts +11 -2
- package/dist/elements/index.js +104 -59
- package/dist/elements/index.mjs +69 -33
- package/dist/hooks/index.mjs +1 -0
- package/dist/index.css +377 -202
- package/dist/index.d.mts +11 -2
- package/dist/index.d.ts +11 -2
- package/dist/index.js +104 -59
- package/dist/index.mjs +117 -60
- package/dist/layout/index.mjs +3 -2
- package/dist/switch/index.d.mts +1 -1
- package/dist/switch/index.d.ts +1 -1
- package/dist/tabs/index.d.mts +2 -2
- package/dist/tabs/index.d.ts +2 -2
- package/dist/tabs/index.js +15 -13
- package/dist/tabs/index.mjs +15 -13
- package/dist/textarea/index.d.mts +1 -0
- package/dist/textarea/index.d.ts +1 -0
- package/dist/textarea/index.js +59 -36
- package/dist/textarea/index.mjs +59 -36
- package/package.json +11 -10
- package/dist/commonTypes-cyhMPvmz.d.mts +0 -4
- package/dist/commonTypes-cyhMPvmz.d.ts +0 -4
- /package/dist/{chunk-AREFDTXK.mjs → chunk-D36MPDGE.mjs} +0 -0
@@ -1,25 +1,26 @@
|
|
1
1
|
import {
|
2
2
|
Textarea
|
3
|
-
} from "../../chunk-
|
3
|
+
} from "../../chunk-5YXZXYLH.mjs";
|
4
4
|
import {
|
5
5
|
Select
|
6
|
-
} from "../../chunk-
|
6
|
+
} from "../../chunk-OY66MBXP.mjs";
|
7
|
+
import "../../chunk-WUHNPHD5.mjs";
|
7
8
|
import {
|
8
9
|
Radio
|
9
|
-
} from "../../chunk-
|
10
|
+
} from "../../chunk-NMS5LCSQ.mjs";
|
10
11
|
import {
|
11
12
|
BadEmoji,
|
12
13
|
GoodEmoji,
|
13
14
|
VeryBadEmoji,
|
14
15
|
VeryGoodEmoji
|
15
|
-
} from "../../chunk-
|
16
|
+
} from "../../chunk-GVJYACGA.mjs";
|
16
17
|
import {
|
17
18
|
Button,
|
18
19
|
Card,
|
19
20
|
CardContent,
|
20
21
|
Label,
|
21
22
|
cn
|
22
|
-
} from "../../chunk-
|
23
|
+
} from "../../chunk-D36MPDGE.mjs";
|
23
24
|
|
24
25
|
// blocks/feedback/UserReferralSource.tsx
|
25
26
|
import React, { useRef, useState } from "react";
|
package/dist/blocks/index.js
CHANGED
@@ -4547,6 +4547,7 @@ var Textarea = React27.forwardRef(
|
|
4547
4547
|
forceHideHelperText,
|
4548
4548
|
textareaProps,
|
4549
4549
|
countPosition = "bottom",
|
4550
|
+
isLoading,
|
4550
4551
|
...props
|
4551
4552
|
}, ref) => {
|
4552
4553
|
return /* @__PURE__ */ React27.createElement(
|
@@ -4558,12 +4559,20 @@ var Textarea = React27.forwardRef(
|
|
4558
4559
|
className
|
4559
4560
|
)
|
4560
4561
|
},
|
4561
|
-
props.label && /* @__PURE__ */ React27.createElement(Label, { ...labelProps }, props.label),
|
4562
|
-
|
4562
|
+
/* @__PURE__ */ React27.createElement("div", { className: "hawa-flex hawa-flex-row hawa-justify-between" }, props.label && /* @__PURE__ */ React27.createElement(Label, { ...labelProps }, props.label), showCount && countPosition === "top" && /* @__PURE__ */ React27.createElement(
|
4563
|
+
"div",
|
4564
|
+
{
|
4565
|
+
className: "hawa-text-start hawa-text-xs hawa-transition-all hawa-leading-none"
|
4566
|
+
},
|
4567
|
+
(textareaProps == null ? void 0 : textareaProps.value) ? String(textareaProps == null ? void 0 : textareaProps.value).length : 0,
|
4568
|
+
"/",
|
4569
|
+
textareaProps == null ? void 0 : textareaProps.maxLength
|
4570
|
+
)),
|
4571
|
+
isLoading ? /* @__PURE__ */ React27.createElement(Skeleton, { style: { height: 40 } }) : /* @__PURE__ */ React27.createElement(
|
4563
4572
|
"textarea",
|
4564
4573
|
{
|
4565
4574
|
className: cn(
|
4566
|
-
"hawa-flex hawa-min-h-[40px] hawa-w-full hawa-rounded-md hawa-border hawa-border-input hawa-bg-background hawa-px-3 hawa-py-2 hawa-text-sm hawa-ring-offset-background placeholder:hawa-text-gray-400 placeholder:hawa-text-muted-foreground focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-0 disabled:hawa-cursor-not-allowed disabled:hawa-opacity-50",
|
4575
|
+
"hawa-flex hawa-min-h-[40px] hawa-h-[40px] hawa-w-full hawa-rounded-md hawa-border hawa-border-input hawa-bg-background hawa-px-3 hawa-py-2 hawa-text-sm hawa-ring-offset-background placeholder:hawa-text-gray-400 placeholder:hawa-text-muted-foreground focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-0 disabled:hawa-cursor-not-allowed disabled:hawa-opacity-50",
|
4567
4576
|
classNames == null ? void 0 : classNames.textarea
|
4568
4577
|
),
|
4569
4578
|
ref,
|
@@ -4579,20 +4588,7 @@ var Textarea = React27.forwardRef(
|
|
4579
4588
|
)
|
4580
4589
|
},
|
4581
4590
|
props.helperText
|
4582
|
-
), showCount && /* @__PURE__ */ React27.createElement(
|
4583
|
-
"div",
|
4584
|
-
{
|
4585
|
-
className: cn(
|
4586
|
-
"hawa-text-start hawa-text-xs hawa-transition-all",
|
4587
|
-
{
|
4588
|
-
"hawa-absolute hawa-bottom-[80px] hawa-end-0 hawa-translate-y-1/2": countPosition === "top"
|
4589
|
-
}
|
4590
|
-
)
|
4591
|
-
},
|
4592
|
-
(textareaProps == null ? void 0 : textareaProps.value) ? String(textareaProps == null ? void 0 : textareaProps.value).length : 0,
|
4593
|
-
"/",
|
4594
|
-
textareaProps == null ? void 0 : textareaProps.maxLength
|
4595
|
-
))
|
4591
|
+
), showCount && countPosition === "bottom" && /* @__PURE__ */ React27.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))
|
4596
4592
|
);
|
4597
4593
|
}
|
4598
4594
|
);
|
@@ -5253,19 +5249,21 @@ var Chip = import_react27.default.forwardRef(
|
|
5253
5249
|
|
5254
5250
|
// elements/tabs/Tabs.tsx
|
5255
5251
|
var TabsContext = React35.createContext({ orientation: "vertical" });
|
5256
|
-
var Tabs = React35.forwardRef(
|
5257
|
-
|
5258
|
-
|
5259
|
-
|
5260
|
-
|
5261
|
-
|
5262
|
-
|
5263
|
-
|
5264
|
-
|
5265
|
-
|
5266
|
-
|
5267
|
-
|
5268
|
-
)
|
5252
|
+
var Tabs = React35.forwardRef(
|
5253
|
+
({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ React35.createElement(
|
5254
|
+
TabsPrimitive.Root,
|
5255
|
+
{
|
5256
|
+
ref,
|
5257
|
+
className: cn(
|
5258
|
+
"hawa-flex hawa-gap-2",
|
5259
|
+
orientation === "vertical" ? "hawa-flex-row" : "hawa-flex-col",
|
5260
|
+
className
|
5261
|
+
),
|
5262
|
+
...props
|
5263
|
+
},
|
5264
|
+
/* @__PURE__ */ React35.createElement(TabsContext.Provider, { value: { orientation } }, props.children)
|
5265
|
+
)
|
5266
|
+
);
|
5269
5267
|
Tabs.displayName = TabsPrimitive.Root.displayName;
|
5270
5268
|
var TabsList = React35.forwardRef(({ className, ...props }, ref) => {
|
5271
5269
|
const { orientation } = React35.useContext(TabsContext);
|
package/dist/blocks/index.mjs
CHANGED
@@ -25,7 +25,7 @@ import {
|
|
25
25
|
UncheckMark,
|
26
26
|
VeryBadEmoji,
|
27
27
|
VeryGoodEmoji
|
28
|
-
} from "../chunk-
|
28
|
+
} from "../chunk-F3DQJHTG.mjs";
|
29
29
|
import {
|
30
30
|
Button,
|
31
31
|
Card,
|
@@ -41,7 +41,8 @@ import {
|
|
41
41
|
Skeleton,
|
42
42
|
Tooltip,
|
43
43
|
cn
|
44
|
-
} from "../chunk-
|
44
|
+
} from "../chunk-MQUAGP7K.mjs";
|
45
|
+
import "../chunk-ZFXKCRJC.mjs";
|
45
46
|
|
46
47
|
// blocks/auth/LoginForm.tsx
|
47
48
|
import React2, { useState } from "react";
|
@@ -180,19 +180,21 @@ var Chip = import_react.default.forwardRef(
|
|
180
180
|
|
181
181
|
// elements/tabs/Tabs.tsx
|
182
182
|
var TabsContext = React3.createContext({ orientation: "vertical" });
|
183
|
-
var Tabs = React3.forwardRef(
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
)
|
183
|
+
var Tabs = React3.forwardRef(
|
184
|
+
({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ React3.createElement(
|
185
|
+
TabsPrimitive.Root,
|
186
|
+
{
|
187
|
+
ref,
|
188
|
+
className: cn(
|
189
|
+
"hawa-flex hawa-gap-2",
|
190
|
+
orientation === "vertical" ? "hawa-flex-row" : "hawa-flex-col",
|
191
|
+
className
|
192
|
+
),
|
193
|
+
...props
|
194
|
+
},
|
195
|
+
/* @__PURE__ */ React3.createElement(TabsContext.Provider, { value: { orientation } }, props.children)
|
196
|
+
)
|
197
|
+
);
|
196
198
|
Tabs.displayName = TabsPrimitive.Root.displayName;
|
197
199
|
var TabsList = React3.forwardRef(({ className, ...props }, ref) => {
|
198
200
|
const { orientation } = React3.useContext(TabsContext);
|
@@ -987,6 +989,7 @@ var Textarea = React18.forwardRef(
|
|
987
989
|
forceHideHelperText,
|
988
990
|
textareaProps,
|
989
991
|
countPosition = "bottom",
|
992
|
+
isLoading,
|
990
993
|
...props
|
991
994
|
}, ref) => {
|
992
995
|
return /* @__PURE__ */ React18.createElement(
|
@@ -998,12 +1001,20 @@ var Textarea = React18.forwardRef(
|
|
998
1001
|
className
|
999
1002
|
)
|
1000
1003
|
},
|
1001
|
-
props.label && /* @__PURE__ */ React18.createElement(Label, { ...labelProps }, props.label),
|
1002
|
-
|
1004
|
+
/* @__PURE__ */ React18.createElement("div", { className: "hawa-flex hawa-flex-row hawa-justify-between" }, props.label && /* @__PURE__ */ React18.createElement(Label, { ...labelProps }, props.label), showCount && countPosition === "top" && /* @__PURE__ */ React18.createElement(
|
1005
|
+
"div",
|
1006
|
+
{
|
1007
|
+
className: "hawa-text-start hawa-text-xs hawa-transition-all hawa-leading-none"
|
1008
|
+
},
|
1009
|
+
(textareaProps == null ? void 0 : textareaProps.value) ? String(textareaProps == null ? void 0 : textareaProps.value).length : 0,
|
1010
|
+
"/",
|
1011
|
+
textareaProps == null ? void 0 : textareaProps.maxLength
|
1012
|
+
)),
|
1013
|
+
isLoading ? /* @__PURE__ */ React18.createElement(Skeleton, { style: { height: 40 } }) : /* @__PURE__ */ React18.createElement(
|
1003
1014
|
"textarea",
|
1004
1015
|
{
|
1005
1016
|
className: cn(
|
1006
|
-
"hawa-flex hawa-min-h-[40px] hawa-w-full hawa-rounded-md hawa-border hawa-border-input hawa-bg-background hawa-px-3 hawa-py-2 hawa-text-sm hawa-ring-offset-background placeholder:hawa-text-gray-400 placeholder:hawa-text-muted-foreground focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-0 disabled:hawa-cursor-not-allowed disabled:hawa-opacity-50",
|
1017
|
+
"hawa-flex hawa-min-h-[40px] hawa-h-[40px] hawa-w-full hawa-rounded-md hawa-border hawa-border-input hawa-bg-background hawa-px-3 hawa-py-2 hawa-text-sm hawa-ring-offset-background placeholder:hawa-text-gray-400 placeholder:hawa-text-muted-foreground focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-0 disabled:hawa-cursor-not-allowed disabled:hawa-opacity-50",
|
1007
1018
|
classNames == null ? void 0 : classNames.textarea
|
1008
1019
|
),
|
1009
1020
|
ref,
|
@@ -1019,20 +1030,7 @@ var Textarea = React18.forwardRef(
|
|
1019
1030
|
)
|
1020
1031
|
},
|
1021
1032
|
props.helperText
|
1022
|
-
), showCount && /* @__PURE__ */ React18.createElement(
|
1023
|
-
"div",
|
1024
|
-
{
|
1025
|
-
className: cn(
|
1026
|
-
"hawa-text-start hawa-text-xs hawa-transition-all",
|
1027
|
-
{
|
1028
|
-
"hawa-absolute hawa-bottom-[80px] hawa-end-0 hawa-translate-y-1/2": countPosition === "top"
|
1029
|
-
}
|
1030
|
-
)
|
1031
|
-
},
|
1032
|
-
(textareaProps == null ? void 0 : textareaProps.value) ? String(textareaProps == null ? void 0 : textareaProps.value).length : 0,
|
1033
|
-
"/",
|
1034
|
-
textareaProps == null ? void 0 : textareaProps.maxLength
|
1035
|
-
))
|
1033
|
+
), showCount && countPosition === "bottom" && /* @__PURE__ */ React18.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))
|
1036
1034
|
);
|
1037
1035
|
}
|
1038
1036
|
);
|
@@ -1,13 +1,14 @@
|
|
1
1
|
import {
|
2
2
|
Input
|
3
|
-
} from "../../chunk-
|
3
|
+
} from "../../chunk-R4HAAT6R.mjs";
|
4
4
|
import {
|
5
5
|
Chip,
|
6
6
|
ScrollArea
|
7
|
-
} from "../../chunk-
|
7
|
+
} from "../../chunk-4EGKGSGY.mjs";
|
8
8
|
import {
|
9
9
|
Textarea
|
10
|
-
} from "../../chunk-
|
10
|
+
} from "../../chunk-5YXZXYLH.mjs";
|
11
|
+
import "../../chunk-WUHNPHD5.mjs";
|
11
12
|
import {
|
12
13
|
Button,
|
13
14
|
Card,
|
@@ -17,7 +18,7 @@ import {
|
|
17
18
|
CardHeader,
|
18
19
|
CardTitle,
|
19
20
|
cn
|
20
|
-
} from "../../chunk-
|
21
|
+
} from "../../chunk-D36MPDGE.mjs";
|
21
22
|
|
22
23
|
// blocks/misc/LegalTexts.tsx
|
23
24
|
import React2 from "react";
|
@@ -26,19 +27,21 @@ import React2 from "react";
|
|
26
27
|
import * as React from "react";
|
27
28
|
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
28
29
|
var TabsContext = React.createContext({ orientation: "vertical" });
|
29
|
-
var Tabs = React.forwardRef(
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
)
|
30
|
+
var Tabs = React.forwardRef(
|
31
|
+
({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ React.createElement(
|
32
|
+
TabsPrimitive.Root,
|
33
|
+
{
|
34
|
+
ref,
|
35
|
+
className: cn(
|
36
|
+
"hawa-flex hawa-gap-2",
|
37
|
+
orientation === "vertical" ? "hawa-flex-row" : "hawa-flex-col",
|
38
|
+
className
|
39
|
+
),
|
40
|
+
...props
|
41
|
+
},
|
42
|
+
/* @__PURE__ */ React.createElement(TabsContext.Provider, { value: { orientation } }, props.children)
|
43
|
+
)
|
44
|
+
);
|
42
45
|
Tabs.displayName = TabsPrimitive.Root.displayName;
|
43
46
|
var TabsList = React.forwardRef(({ className, ...props }, ref) => {
|
44
47
|
const { orientation } = React.useContext(TabsContext);
|
@@ -1,22 +1,22 @@
|
|
1
1
|
import {
|
2
2
|
Chip,
|
3
3
|
ScrollArea
|
4
|
-
} from "../../chunk-
|
4
|
+
} from "../../chunk-4EGKGSGY.mjs";
|
5
5
|
import "../../chunk-ZS3FB3PO.mjs";
|
6
6
|
import {
|
7
7
|
Radio
|
8
|
-
} from "../../chunk-
|
8
|
+
} from "../../chunk-NMS5LCSQ.mjs";
|
9
9
|
import {
|
10
10
|
CheckMark,
|
11
11
|
UncheckMark
|
12
|
-
} from "../../chunk-
|
12
|
+
} from "../../chunk-GVJYACGA.mjs";
|
13
13
|
import {
|
14
14
|
Button,
|
15
15
|
Card,
|
16
16
|
Skeleton,
|
17
17
|
Tooltip,
|
18
18
|
cn
|
19
|
-
} from "../../chunk-
|
19
|
+
} from "../../chunk-D36MPDGE.mjs";
|
20
20
|
|
21
21
|
// blocks/pricing/PricingPlans.tsx
|
22
22
|
import React8 from "react";
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import React__default from 'react';
|
2
|
+
import { D as DirectionType } from '../commonTypes-2k6FnHw5.mjs';
|
2
3
|
import { EmblaOptionsType } from 'embla-carousel';
|
3
4
|
|
4
5
|
type CarouselProps = {
|
@@ -7,6 +8,7 @@ type CarouselProps = {
|
|
7
8
|
autoplay?: boolean;
|
8
9
|
autoplayInterval?: number;
|
9
10
|
options?: EmblaOptionsType;
|
11
|
+
direction?: DirectionType;
|
10
12
|
};
|
11
13
|
declare const Carousel: React__default.FC<CarouselProps>;
|
12
14
|
|
package/dist/carousel/index.d.ts
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
import React__default from 'react';
|
2
|
+
import { D as DirectionType } from '../commonTypes-2k6FnHw5.js';
|
2
3
|
import { EmblaOptionsType } from 'embla-carousel';
|
3
4
|
|
4
5
|
type CarouselProps = {
|
@@ -7,6 +8,7 @@ type CarouselProps = {
|
|
7
8
|
autoplay?: boolean;
|
8
9
|
autoplayInterval?: number;
|
9
10
|
options?: EmblaOptionsType;
|
11
|
+
direction?: DirectionType;
|
10
12
|
};
|
11
13
|
declare const Carousel: React__default.FC<CarouselProps>;
|
12
14
|
|
package/dist/carousel/index.js
CHANGED
@@ -36,7 +36,6 @@ module.exports = __toCommonJS(carousel_exports);
|
|
36
36
|
|
37
37
|
// elements/carousel/Carousel.tsx
|
38
38
|
var import_react = __toESM(require("react"));
|
39
|
-
var import_embla_carousel_react = __toESM(require("embla-carousel-react"));
|
40
39
|
|
41
40
|
// util/index.ts
|
42
41
|
var import_clsx = require("clsx");
|
@@ -46,16 +45,19 @@ function cn(...inputs) {
|
|
46
45
|
}
|
47
46
|
|
48
47
|
// elements/carousel/Carousel.tsx
|
48
|
+
var import_embla_carousel_react = __toESM(require("embla-carousel-react"));
|
49
49
|
var Carousel = ({
|
50
50
|
items,
|
51
51
|
showArrows,
|
52
52
|
options,
|
53
53
|
autoplay,
|
54
|
+
direction = "ltr",
|
54
55
|
autoplayInterval = 3e3,
|
55
56
|
...props
|
56
57
|
}) => {
|
57
58
|
const [emblaRef, emblaApi] = (0, import_embla_carousel_react.default)({
|
58
59
|
...options,
|
60
|
+
direction,
|
59
61
|
loop: autoplay ? true : (options == null ? void 0 : options.loop) || false
|
60
62
|
});
|
61
63
|
const [selectedIndex, setSelectedIndex] = (0, import_react.useState)(0);
|
@@ -94,6 +96,7 @@ var Carousel = ({
|
|
94
96
|
))))), /* @__PURE__ */ import_react.default.createElement(
|
95
97
|
Dots,
|
96
98
|
{
|
99
|
+
direction,
|
97
100
|
itemsLength: length,
|
98
101
|
selectedIndex,
|
99
102
|
onDotClick: (index) => emblaApi == null ? void 0 : emblaApi.scrollTo(index)
|
@@ -108,22 +111,34 @@ var Carousel = ({
|
|
108
111
|
}
|
109
112
|
));
|
110
113
|
};
|
111
|
-
var Dots = ({
|
114
|
+
var Dots = ({
|
115
|
+
onDotClick,
|
116
|
+
itemsLength,
|
117
|
+
selectedIndex,
|
118
|
+
direction
|
119
|
+
}) => {
|
112
120
|
const arr = new Array(itemsLength).fill(0);
|
113
|
-
return /* @__PURE__ */ import_react.default.createElement(
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
121
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
122
|
+
"div",
|
123
|
+
{
|
124
|
+
dir: direction,
|
125
|
+
className: "hawa-z-50 hawa-my-2 hawa-flex hawa-justify-center hawa-gap-1"
|
126
|
+
},
|
127
|
+
arr.map((_, index) => {
|
128
|
+
const selected = index === selectedIndex;
|
129
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
130
|
+
"div",
|
131
|
+
{
|
132
|
+
key: index,
|
133
|
+
onClick: () => onDotClick(index),
|
134
|
+
className: cn(
|
135
|
+
"hawa-h-2 hawa-rounded-full hawa-bg-primary hawa-transition-all hawa-duration-300 hover:hawa-cursor-pointer",
|
136
|
+
!selected ? "hawa-w-2 hawa-opacity-50" : "hawa-w-6 hawa-opacity-100"
|
137
|
+
)
|
138
|
+
}
|
139
|
+
);
|
140
|
+
})
|
141
|
+
);
|
127
142
|
};
|
128
143
|
var CarouselControls = (props) => {
|
129
144
|
return /* @__PURE__ */ import_react.default.createElement("div", { className: "hawa-flex hawa-justify-end hawa-gap-2 " }, /* @__PURE__ */ import_react.default.createElement(
|
package/dist/carousel/index.mjs
CHANGED
@@ -10,11 +10,13 @@ var Carousel = ({
|
|
10
10
|
showArrows,
|
11
11
|
options,
|
12
12
|
autoplay,
|
13
|
+
direction = "ltr",
|
13
14
|
autoplayInterval = 3e3,
|
14
15
|
...props
|
15
16
|
}) => {
|
16
17
|
const [emblaRef, emblaApi] = useEmblaCarousel({
|
17
18
|
...options,
|
19
|
+
direction,
|
18
20
|
loop: autoplay ? true : (options == null ? void 0 : options.loop) || false
|
19
21
|
});
|
20
22
|
const [selectedIndex, setSelectedIndex] = useState(0);
|
@@ -53,6 +55,7 @@ var Carousel = ({
|
|
53
55
|
))))), /* @__PURE__ */ React.createElement(
|
54
56
|
Dots,
|
55
57
|
{
|
58
|
+
direction,
|
56
59
|
itemsLength: length,
|
57
60
|
selectedIndex,
|
58
61
|
onDotClick: (index) => emblaApi == null ? void 0 : emblaApi.scrollTo(index)
|
@@ -67,22 +70,34 @@ var Carousel = ({
|
|
67
70
|
}
|
68
71
|
));
|
69
72
|
};
|
70
|
-
var Dots = ({
|
73
|
+
var Dots = ({
|
74
|
+
onDotClick,
|
75
|
+
itemsLength,
|
76
|
+
selectedIndex,
|
77
|
+
direction
|
78
|
+
}) => {
|
71
79
|
const arr = new Array(itemsLength).fill(0);
|
72
|
-
return /* @__PURE__ */ React.createElement(
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
80
|
+
return /* @__PURE__ */ React.createElement(
|
81
|
+
"div",
|
82
|
+
{
|
83
|
+
dir: direction,
|
84
|
+
className: "hawa-z-50 hawa-my-2 hawa-flex hawa-justify-center hawa-gap-1"
|
85
|
+
},
|
86
|
+
arr.map((_, index) => {
|
87
|
+
const selected = index === selectedIndex;
|
88
|
+
return /* @__PURE__ */ React.createElement(
|
89
|
+
"div",
|
90
|
+
{
|
91
|
+
key: index,
|
92
|
+
onClick: () => onDotClick(index),
|
93
|
+
className: cn(
|
94
|
+
"hawa-h-2 hawa-rounded-full hawa-bg-primary hawa-transition-all hawa-duration-300 hover:hawa-cursor-pointer",
|
95
|
+
!selected ? "hawa-w-2 hawa-opacity-50" : "hawa-w-6 hawa-opacity-100"
|
96
|
+
)
|
97
|
+
}
|
98
|
+
);
|
99
|
+
})
|
100
|
+
);
|
86
101
|
};
|
87
102
|
var CarouselControls = (props) => {
|
88
103
|
return /* @__PURE__ */ React.createElement("div", { className: "hawa-flex hawa-justify-end hawa-gap-2 " }, /* @__PURE__ */ React.createElement(
|
package/dist/checkbox/index.d.ts
CHANGED
package/dist/chip/index.d.mts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import React__default from 'react';
|
2
|
-
import { R as RadiusType } from '../commonTypes-
|
2
|
+
import { R as RadiusType } from '../commonTypes-2k6FnHw5.mjs';
|
3
3
|
|
4
4
|
type ChipColors = "green" | "blue" | "red" | "yellow" | "orange" | "purple" | "cyan" | "hyper" | "oceanic";
|
5
5
|
type ChipTypes = React__default.HTMLAttributes<HTMLSpanElement> & {
|
package/dist/chip/index.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import React__default from 'react';
|
2
|
-
import { R as RadiusType } from '../commonTypes-
|
2
|
+
import { R as RadiusType } from '../commonTypes-2k6FnHw5.js';
|
3
3
|
|
4
4
|
type ChipColors = "green" | "blue" | "red" | "yellow" | "orange" | "purple" | "cyan" | "hyper" | "oceanic";
|
5
5
|
type ChipTypes = React__default.HTMLAttributes<HTMLSpanElement> & {
|
@@ -4,6 +4,25 @@ import { twMerge } from "tailwind-merge";
|
|
4
4
|
function cn(...inputs) {
|
5
5
|
return twMerge(clsx(inputs));
|
6
6
|
}
|
7
|
+
var parseColor = (color) => {
|
8
|
+
if (color.startsWith("#")) {
|
9
|
+
let r = parseInt(color.slice(1, 3), 16);
|
10
|
+
let g = parseInt(color.slice(3, 5), 16);
|
11
|
+
let b = parseInt(color.slice(5, 7), 16);
|
12
|
+
return [r, g, b];
|
13
|
+
} else if (color.startsWith("rgb")) {
|
14
|
+
return color.match(/\d+/g).map(Number);
|
15
|
+
}
|
16
|
+
return [255, 255, 255];
|
17
|
+
};
|
18
|
+
var calculateLuminance = (color) => {
|
19
|
+
var _a;
|
20
|
+
const [r, g, b] = (_a = parseColor(color)) == null ? void 0 : _a.map((c) => {
|
21
|
+
c /= 255;
|
22
|
+
return c <= 0.03928 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4;
|
23
|
+
});
|
24
|
+
return 0.2126 * r + 0.7152 * g + 0.0722 * b;
|
25
|
+
};
|
7
26
|
|
8
27
|
// elements/tooltip/Tooltip.tsx
|
9
28
|
import React from "react";
|
@@ -58,5 +77,6 @@ var Tooltip = ({
|
|
58
77
|
|
59
78
|
export {
|
60
79
|
cn,
|
80
|
+
calculateLuminance,
|
61
81
|
Tooltip
|
62
82
|
};
|
@@ -1,7 +1,8 @@
|
|
1
1
|
import {
|
2
2
|
Label,
|
3
|
+
Skeleton,
|
3
4
|
cn
|
4
|
-
} from "./chunk-
|
5
|
+
} from "./chunk-D36MPDGE.mjs";
|
5
6
|
|
6
7
|
// elements/textarea/Textarea.tsx
|
7
8
|
import * as React from "react";
|
@@ -14,6 +15,7 @@ var Textarea = React.forwardRef(
|
|
14
15
|
forceHideHelperText,
|
15
16
|
textareaProps,
|
16
17
|
countPosition = "bottom",
|
18
|
+
isLoading,
|
17
19
|
...props
|
18
20
|
}, ref) => {
|
19
21
|
return /* @__PURE__ */ React.createElement(
|
@@ -25,12 +27,20 @@ var Textarea = React.forwardRef(
|
|
25
27
|
className
|
26
28
|
)
|
27
29
|
},
|
28
|
-
props.label && /* @__PURE__ */ React.createElement(Label, { ...labelProps }, props.label),
|
29
|
-
|
30
|
+
/* @__PURE__ */ React.createElement("div", { className: "hawa-flex hawa-flex-row hawa-justify-between" }, props.label && /* @__PURE__ */ React.createElement(Label, { ...labelProps }, props.label), showCount && countPosition === "top" && /* @__PURE__ */ React.createElement(
|
31
|
+
"div",
|
32
|
+
{
|
33
|
+
className: "hawa-text-start hawa-text-xs hawa-transition-all hawa-leading-none"
|
34
|
+
},
|
35
|
+
(textareaProps == null ? void 0 : textareaProps.value) ? String(textareaProps == null ? void 0 : textareaProps.value).length : 0,
|
36
|
+
"/",
|
37
|
+
textareaProps == null ? void 0 : textareaProps.maxLength
|
38
|
+
)),
|
39
|
+
isLoading ? /* @__PURE__ */ React.createElement(Skeleton, { style: { height: 40 } }) : /* @__PURE__ */ React.createElement(
|
30
40
|
"textarea",
|
31
41
|
{
|
32
42
|
className: cn(
|
33
|
-
"hawa-flex hawa-min-h-[40px] hawa-w-full hawa-rounded-md hawa-border hawa-border-input hawa-bg-background hawa-px-3 hawa-py-2 hawa-text-sm hawa-ring-offset-background placeholder:hawa-text-gray-400 placeholder:hawa-text-muted-foreground focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-0 disabled:hawa-cursor-not-allowed disabled:hawa-opacity-50",
|
43
|
+
"hawa-flex hawa-min-h-[40px] hawa-h-[40px] hawa-w-full hawa-rounded-md hawa-border hawa-border-input hawa-bg-background hawa-px-3 hawa-py-2 hawa-text-sm hawa-ring-offset-background placeholder:hawa-text-gray-400 placeholder:hawa-text-muted-foreground focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-0 disabled:hawa-cursor-not-allowed disabled:hawa-opacity-50",
|
34
44
|
classNames == null ? void 0 : classNames.textarea
|
35
45
|
),
|
36
46
|
ref,
|
@@ -46,20 +56,7 @@ var Textarea = React.forwardRef(
|
|
46
56
|
)
|
47
57
|
},
|
48
58
|
props.helperText
|
49
|
-
), showCount && /* @__PURE__ */ React.createElement(
|
50
|
-
"div",
|
51
|
-
{
|
52
|
-
className: cn(
|
53
|
-
"hawa-text-start hawa-text-xs hawa-transition-all",
|
54
|
-
{
|
55
|
-
"hawa-absolute hawa-bottom-[80px] hawa-end-0 hawa-translate-y-1/2": countPosition === "top"
|
56
|
-
}
|
57
|
-
)
|
58
|
-
},
|
59
|
-
(textareaProps == null ? void 0 : textareaProps.value) ? String(textareaProps == null ? void 0 : textareaProps.value).length : 0,
|
60
|
-
"/",
|
61
|
-
textareaProps == null ? void 0 : textareaProps.maxLength
|
62
|
-
))
|
59
|
+
), showCount && countPosition === "bottom" && /* @__PURE__ */ React.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))
|
63
60
|
);
|
64
61
|
}
|
65
62
|
);
|