@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
@@ -4,7 +4,7 @@ import {
|
|
4
4
|
Skeleton,
|
5
5
|
Tooltip,
|
6
6
|
cn
|
7
|
-
} from "./chunk-
|
7
|
+
} from "./chunk-MQUAGP7K.mjs";
|
8
8
|
|
9
9
|
// elements/alert/Alert.tsx
|
10
10
|
import React, { useRef, useState, useEffect } from "react";
|
@@ -2652,6 +2652,7 @@ var Textarea = React10.forwardRef(
|
|
2652
2652
|
forceHideHelperText,
|
2653
2653
|
textareaProps,
|
2654
2654
|
countPosition = "bottom",
|
2655
|
+
isLoading,
|
2655
2656
|
...props
|
2656
2657
|
}, ref) => {
|
2657
2658
|
return /* @__PURE__ */ React10.createElement(
|
@@ -2663,12 +2664,20 @@ var Textarea = React10.forwardRef(
|
|
2663
2664
|
className
|
2664
2665
|
)
|
2665
2666
|
},
|
2666
|
-
props.label && /* @__PURE__ */ React10.createElement(Label, { ...labelProps }, props.label),
|
2667
|
-
|
2667
|
+
/* @__PURE__ */ React10.createElement("div", { className: "hawa-flex hawa-flex-row hawa-justify-between" }, props.label && /* @__PURE__ */ React10.createElement(Label, { ...labelProps }, props.label), showCount && countPosition === "top" && /* @__PURE__ */ React10.createElement(
|
2668
|
+
"div",
|
2669
|
+
{
|
2670
|
+
className: "hawa-text-start hawa-text-xs hawa-transition-all hawa-leading-none"
|
2671
|
+
},
|
2672
|
+
(textareaProps == null ? void 0 : textareaProps.value) ? String(textareaProps == null ? void 0 : textareaProps.value).length : 0,
|
2673
|
+
"/",
|
2674
|
+
textareaProps == null ? void 0 : textareaProps.maxLength
|
2675
|
+
)),
|
2676
|
+
isLoading ? /* @__PURE__ */ React10.createElement(Skeleton, { style: { height: 40 } }) : /* @__PURE__ */ React10.createElement(
|
2668
2677
|
"textarea",
|
2669
2678
|
{
|
2670
2679
|
className: cn(
|
2671
|
-
"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",
|
2680
|
+
"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",
|
2672
2681
|
classNames == null ? void 0 : classNames.textarea
|
2673
2682
|
),
|
2674
2683
|
ref,
|
@@ -2684,20 +2693,7 @@ var Textarea = React10.forwardRef(
|
|
2684
2693
|
)
|
2685
2694
|
},
|
2686
2695
|
props.helperText
|
2687
|
-
), showCount && /* @__PURE__ */ React10.createElement(
|
2688
|
-
"div",
|
2689
|
-
{
|
2690
|
-
className: cn(
|
2691
|
-
"hawa-text-start hawa-text-xs hawa-transition-all",
|
2692
|
-
{
|
2693
|
-
"hawa-absolute hawa-bottom-[80px] hawa-end-0 hawa-translate-y-1/2": countPosition === "top"
|
2694
|
-
}
|
2695
|
-
)
|
2696
|
-
},
|
2697
|
-
(textareaProps == null ? void 0 : textareaProps.value) ? String(textareaProps == null ? void 0 : textareaProps.value).length : 0,
|
2698
|
-
"/",
|
2699
|
-
textareaProps == null ? void 0 : textareaProps.maxLength
|
2700
|
-
))
|
2696
|
+
), showCount && countPosition === "bottom" && /* @__PURE__ */ React10.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))
|
2701
2697
|
);
|
2702
2698
|
}
|
2703
2699
|
);
|
@@ -2807,19 +2803,21 @@ ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
|
|
2807
2803
|
import * as React13 from "react";
|
2808
2804
|
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
2809
2805
|
var TabsContext = React13.createContext({ orientation: "vertical" });
|
2810
|
-
var Tabs = React13.forwardRef(
|
2811
|
-
|
2812
|
-
|
2813
|
-
|
2814
|
-
|
2815
|
-
|
2816
|
-
|
2817
|
-
|
2818
|
-
|
2819
|
-
|
2820
|
-
|
2821
|
-
|
2822
|
-
)
|
2806
|
+
var Tabs = React13.forwardRef(
|
2807
|
+
({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ React13.createElement(
|
2808
|
+
TabsPrimitive.Root,
|
2809
|
+
{
|
2810
|
+
ref,
|
2811
|
+
className: cn(
|
2812
|
+
"hawa-flex hawa-gap-2",
|
2813
|
+
orientation === "vertical" ? "hawa-flex-row" : "hawa-flex-col",
|
2814
|
+
className
|
2815
|
+
),
|
2816
|
+
...props
|
2817
|
+
},
|
2818
|
+
/* @__PURE__ */ React13.createElement(TabsContext.Provider, { value: { orientation } }, props.children)
|
2819
|
+
)
|
2820
|
+
);
|
2823
2821
|
Tabs.displayName = TabsPrimitive.Root.displayName;
|
2824
2822
|
var TabsList = React13.forwardRef(({ className, ...props }, ref) => {
|
2825
2823
|
const { orientation } = React13.useContext(TabsContext);
|
@@ -7,6 +7,25 @@ import { twMerge } from "tailwind-merge";
|
|
7
7
|
function cn(...inputs) {
|
8
8
|
return twMerge(clsx(inputs));
|
9
9
|
}
|
10
|
+
var parseColor = (color) => {
|
11
|
+
if (color.startsWith("#")) {
|
12
|
+
let r = parseInt(color.slice(1, 3), 16);
|
13
|
+
let g = parseInt(color.slice(3, 5), 16);
|
14
|
+
let b = parseInt(color.slice(5, 7), 16);
|
15
|
+
return [r, g, b];
|
16
|
+
} else if (color.startsWith("rgb")) {
|
17
|
+
return color.match(/\d+/g).map(Number);
|
18
|
+
}
|
19
|
+
return [255, 255, 255];
|
20
|
+
};
|
21
|
+
var calculateLuminance = (color) => {
|
22
|
+
var _a;
|
23
|
+
const [r, g, b] = (_a = parseColor(color)) == null ? void 0 : _a.map((c) => {
|
24
|
+
c /= 255;
|
25
|
+
return c <= 0.03928 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4;
|
26
|
+
});
|
27
|
+
return 0.2126 * r + 0.7152 * g + 0.0722 * b;
|
28
|
+
};
|
10
29
|
|
11
30
|
// elements/loading/Loading.tsx
|
12
31
|
var Loading = ({
|
@@ -1045,6 +1064,7 @@ var DropdownMenuRadio = (props) => {
|
|
1045
1064
|
|
1046
1065
|
export {
|
1047
1066
|
cn,
|
1067
|
+
calculateLuminance,
|
1048
1068
|
Loading,
|
1049
1069
|
buttonVariants,
|
1050
1070
|
Button,
|
File without changes
|
@@ -0,0 +1,11 @@
|
|
1
|
+
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
2
|
+
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
3
|
+
}) : x)(function(x) {
|
4
|
+
if (typeof require !== "undefined")
|
5
|
+
return require.apply(this, arguments);
|
6
|
+
throw Error('Dynamic require of "' + x + '" is not supported');
|
7
|
+
});
|
8
|
+
|
9
|
+
export {
|
10
|
+
__require
|
11
|
+
};
|
@@ -1,8 +1,9 @@
|
|
1
1
|
import { FC } from 'react';
|
2
|
+
import { HighlightProps } from 'prism-react-renderer';
|
2
3
|
|
3
4
|
type CodeBlockTypes = {
|
4
5
|
/** Specifies the programming language for syntax highlighting.*/
|
5
|
-
language?:
|
6
|
+
language?: HighlightProps["language"];
|
6
7
|
/** Defines the width of the code block.*/
|
7
8
|
width?: "full" | "md" | "sm";
|
8
9
|
/** Array of tabs each containing a title and code content.*/
|
@@ -1,8 +1,9 @@
|
|
1
1
|
import { FC } from 'react';
|
2
|
+
import { HighlightProps } from 'prism-react-renderer';
|
2
3
|
|
3
4
|
type CodeBlockTypes = {
|
4
5
|
/** Specifies the programming language for syntax highlighting.*/
|
5
|
-
language?:
|
6
|
+
language?: HighlightProps["language"];
|
6
7
|
/** Defines the width of the code block.*/
|
7
8
|
width?: "full" | "md" | "sm";
|
8
9
|
/** Array of tabs each containing a title and code content.*/
|
package/dist/codeBlock/index.js
CHANGED
@@ -36,6 +36,15 @@ module.exports = __toCommonJS(codeBlock_exports);
|
|
36
36
|
|
37
37
|
// elements/codeBlock/CodeBlock.tsx
|
38
38
|
var import_react4 = __toESM(require("react"));
|
39
|
+
|
40
|
+
// util/index.ts
|
41
|
+
var import_clsx = require("clsx");
|
42
|
+
var import_tailwind_merge = require("tailwind-merge");
|
43
|
+
function cn(...inputs) {
|
44
|
+
return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
|
45
|
+
}
|
46
|
+
|
47
|
+
// elements/codeBlock/CodeBlock.tsx
|
39
48
|
var import_prism_react_renderer = require("prism-react-renderer");
|
40
49
|
|
41
50
|
// hooks/useClipboard.ts
|
@@ -64,13 +73,6 @@ function useClipboard({ timeout = 2e3 } = {}) {
|
|
64
73
|
return { copy, reset, error, copied };
|
65
74
|
}
|
66
75
|
|
67
|
-
// util/index.ts
|
68
|
-
var import_clsx = require("clsx");
|
69
|
-
var import_tailwind_merge = require("tailwind-merge");
|
70
|
-
function cn(...inputs) {
|
71
|
-
return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
|
72
|
-
}
|
73
|
-
|
74
76
|
// elements/button/Button.tsx
|
75
77
|
var React2 = __toESM(require("react"));
|
76
78
|
var import_class_variance_authority = require("class-variance-authority");
|
@@ -376,6 +378,8 @@ var Tooltip = ({
|
|
376
378
|
};
|
377
379
|
|
378
380
|
// elements/codeBlock/CodeBlock.tsx
|
381
|
+
(typeof global !== "undefined" ? global : window).Prism = import_prism_react_renderer.Prism;
|
382
|
+
require("prismjs/components/prism-bash");
|
379
383
|
var CodeBlock = ({
|
380
384
|
tabs,
|
381
385
|
code,
|
@@ -388,8 +392,7 @@ var CodeBlock = ({
|
|
388
392
|
}) => {
|
389
393
|
const clipboard = useClipboard();
|
390
394
|
const [selectedTab, setSelectedTab] = (0, import_react4.useState)(0);
|
391
|
-
const
|
392
|
-
const theme = isDarkMode ? import_prism_react_renderer.themes.vsDark : import_prism_react_renderer.themes.vsLight;
|
395
|
+
const theme = import_prism_react_renderer.themes.oceanicNext;
|
393
396
|
let widthStyles = {
|
394
397
|
full: "hawa-w-full",
|
395
398
|
md: "hawa-w-full hawa-max-w-md",
|
@@ -409,15 +412,15 @@ var CodeBlock = ({
|
|
409
412
|
"div",
|
410
413
|
{
|
411
414
|
className: cn(
|
412
|
-
"hawa-flex hawa-flex-row hawa-gap-2 hawa-rounded-t
|
413
|
-
fileName && tabs ? "hawa-bg-
|
415
|
+
"hawa-flex hawa-flex-row hawa-gap-2 hawa-rounded-t hawa-p-2 hawa-py-0.5 hawa-pb-0 hawa-font-mono hawa-text-foreground",
|
416
|
+
fileName && tabs ? "hawa-bg-primary/10" : "hawa-bg-primary/15"
|
414
417
|
)
|
415
418
|
},
|
416
419
|
/* @__PURE__ */ import_react4.default.createElement(
|
417
420
|
"div",
|
418
421
|
{
|
419
422
|
className: cn(
|
420
|
-
"mono hawa-w-full hawa-max-w-[52px] hawa-rounded-inner hawa-p-1 hawa-py-0.5 hawa-text-center hawa-text-[0.75rem]"
|
423
|
+
"hawa-font-mono hawa-w-full hawa-max-w-[52px] hawa-rounded-inner hawa-p-1 hawa-py-0.5 hawa-text-center hawa-text-[0.75rem]"
|
421
424
|
)
|
422
425
|
},
|
423
426
|
fileName
|
@@ -427,7 +430,8 @@ var CodeBlock = ({
|
|
427
430
|
"div",
|
428
431
|
{
|
429
432
|
className: cn(
|
430
|
-
|
433
|
+
// hawa-bg-gray-300 dark:hawa-bg-red-600
|
434
|
+
"hawa-flex hawa-flex-row hawa-gap-2 hawa-rounded-t hawa-p-1 hawa-bg-primary/15 hawa-pb-0 hawa-font-mono hawa-text-foreground",
|
431
435
|
tabs && fileName && "hawa-rounded-t-none"
|
432
436
|
)
|
433
437
|
},
|
@@ -444,7 +448,7 @@ var CodeBlock = ({
|
|
444
448
|
{
|
445
449
|
onClick: () => setSelectedTab(i),
|
446
450
|
className: cn(
|
447
|
-
"hawa-mb-
|
451
|
+
"hawa-mb-0.5 hawa-w-full hawa-max-w-[52px] hawa-cursor-pointer hawa-rounded-inner hawa-p-2 hawa-py-0.5 hawa-text-center hawa-text-[0.7rem] hawa-transition-all hover:hawa-bg-muted-foreground/20"
|
448
452
|
)
|
449
453
|
},
|
450
454
|
tab.title
|
@@ -455,7 +459,7 @@ var CodeBlock = ({
|
|
455
459
|
"div",
|
456
460
|
{
|
457
461
|
className: cn(
|
458
|
-
"hawa-flex hawa-w-full hawa-flex-row hawa-items-start hawa-justify-between hawa-border hawa-bg-
|
462
|
+
"hawa-flex hawa-w-full hawa-flex-row hawa-items-start hawa-justify-between hawa-border hawa-bg-gray-700 hawa-p-0 hawa-text-left hawa-text-sm sm:hawa-text-base ",
|
459
463
|
tabs || fileName ? "hawa-rounded-b hawa-rounded-t-none" : "hawa-rounded"
|
460
464
|
)
|
461
465
|
},
|
@@ -484,12 +488,12 @@ var CodeBlock = ({
|
|
484
488
|
size: "icon",
|
485
489
|
onClick: () => clipboard.copy(tabs ? tabs[selectedTab].code : code),
|
486
490
|
variant: "outline",
|
487
|
-
className: "hawa-text-
|
491
|
+
className: "hawa-text-gray-200 hawa-opacity-50 "
|
488
492
|
},
|
489
493
|
/* @__PURE__ */ import_react4.default.createElement(
|
490
494
|
"svg",
|
491
495
|
{
|
492
|
-
"aria-label": "Copy
|
496
|
+
"aria-label": "Copy",
|
493
497
|
stroke: "currentColor",
|
494
498
|
fill: "none",
|
495
499
|
strokeWidth: "2",
|
package/dist/codeBlock/index.mjs
CHANGED
@@ -1,11 +1,18 @@
|
|
1
1
|
import {
|
2
2
|
Tooltip,
|
3
3
|
cn
|
4
|
-
} from "../chunk-
|
4
|
+
} from "../chunk-2R7F2GL7.mjs";
|
5
|
+
import {
|
6
|
+
__require
|
7
|
+
} from "../chunk-ZFXKCRJC.mjs";
|
5
8
|
|
6
9
|
// elements/codeBlock/CodeBlock.tsx
|
7
10
|
import React3, { useState as useState2 } from "react";
|
8
|
-
import {
|
11
|
+
import {
|
12
|
+
Highlight,
|
13
|
+
themes,
|
14
|
+
Prism
|
15
|
+
} from "prism-react-renderer";
|
9
16
|
|
10
17
|
// hooks/useClipboard.ts
|
11
18
|
import { useState } from "react";
|
@@ -287,6 +294,8 @@ var Button = React2.forwardRef(
|
|
287
294
|
Button.displayName = "Button";
|
288
295
|
|
289
296
|
// elements/codeBlock/CodeBlock.tsx
|
297
|
+
(typeof global !== "undefined" ? global : window).Prism = Prism;
|
298
|
+
__require("prismjs/components/prism-bash");
|
290
299
|
var CodeBlock = ({
|
291
300
|
tabs,
|
292
301
|
code,
|
@@ -299,8 +308,7 @@ var CodeBlock = ({
|
|
299
308
|
}) => {
|
300
309
|
const clipboard = useClipboard();
|
301
310
|
const [selectedTab, setSelectedTab] = useState2(0);
|
302
|
-
const
|
303
|
-
const theme = isDarkMode ? themes.vsDark : themes.vsLight;
|
311
|
+
const theme = themes.oceanicNext;
|
304
312
|
let widthStyles = {
|
305
313
|
full: "hawa-w-full",
|
306
314
|
md: "hawa-w-full hawa-max-w-md",
|
@@ -320,15 +328,15 @@ var CodeBlock = ({
|
|
320
328
|
"div",
|
321
329
|
{
|
322
330
|
className: cn(
|
323
|
-
"hawa-flex hawa-flex-row hawa-gap-2 hawa-rounded-t
|
324
|
-
fileName && tabs ? "hawa-bg-
|
331
|
+
"hawa-flex hawa-flex-row hawa-gap-2 hawa-rounded-t hawa-p-2 hawa-py-0.5 hawa-pb-0 hawa-font-mono hawa-text-foreground",
|
332
|
+
fileName && tabs ? "hawa-bg-primary/10" : "hawa-bg-primary/15"
|
325
333
|
)
|
326
334
|
},
|
327
335
|
/* @__PURE__ */ React3.createElement(
|
328
336
|
"div",
|
329
337
|
{
|
330
338
|
className: cn(
|
331
|
-
"mono hawa-w-full hawa-max-w-[52px] hawa-rounded-inner hawa-p-1 hawa-py-0.5 hawa-text-center hawa-text-[0.75rem]"
|
339
|
+
"hawa-font-mono hawa-w-full hawa-max-w-[52px] hawa-rounded-inner hawa-p-1 hawa-py-0.5 hawa-text-center hawa-text-[0.75rem]"
|
332
340
|
)
|
333
341
|
},
|
334
342
|
fileName
|
@@ -338,7 +346,8 @@ var CodeBlock = ({
|
|
338
346
|
"div",
|
339
347
|
{
|
340
348
|
className: cn(
|
341
|
-
|
349
|
+
// hawa-bg-gray-300 dark:hawa-bg-red-600
|
350
|
+
"hawa-flex hawa-flex-row hawa-gap-2 hawa-rounded-t hawa-p-1 hawa-bg-primary/15 hawa-pb-0 hawa-font-mono hawa-text-foreground",
|
342
351
|
tabs && fileName && "hawa-rounded-t-none"
|
343
352
|
)
|
344
353
|
},
|
@@ -355,7 +364,7 @@ var CodeBlock = ({
|
|
355
364
|
{
|
356
365
|
onClick: () => setSelectedTab(i),
|
357
366
|
className: cn(
|
358
|
-
"hawa-mb-
|
367
|
+
"hawa-mb-0.5 hawa-w-full hawa-max-w-[52px] hawa-cursor-pointer hawa-rounded-inner hawa-p-2 hawa-py-0.5 hawa-text-center hawa-text-[0.7rem] hawa-transition-all hover:hawa-bg-muted-foreground/20"
|
359
368
|
)
|
360
369
|
},
|
361
370
|
tab.title
|
@@ -366,7 +375,7 @@ var CodeBlock = ({
|
|
366
375
|
"div",
|
367
376
|
{
|
368
377
|
className: cn(
|
369
|
-
"hawa-flex hawa-w-full hawa-flex-row hawa-items-start hawa-justify-between hawa-border hawa-bg-
|
378
|
+
"hawa-flex hawa-w-full hawa-flex-row hawa-items-start hawa-justify-between hawa-border hawa-bg-gray-700 hawa-p-0 hawa-text-left hawa-text-sm sm:hawa-text-base ",
|
370
379
|
tabs || fileName ? "hawa-rounded-b hawa-rounded-t-none" : "hawa-rounded"
|
371
380
|
)
|
372
381
|
},
|
@@ -395,12 +404,12 @@ var CodeBlock = ({
|
|
395
404
|
size: "icon",
|
396
405
|
onClick: () => clipboard.copy(tabs ? tabs[selectedTab].code : code),
|
397
406
|
variant: "outline",
|
398
|
-
className: "hawa-text-
|
407
|
+
className: "hawa-text-gray-200 hawa-opacity-50 "
|
399
408
|
},
|
400
409
|
/* @__PURE__ */ React3.createElement(
|
401
410
|
"svg",
|
402
411
|
{
|
403
|
-
"aria-label": "Copy
|
412
|
+
"aria-label": "Copy",
|
404
413
|
stroke: "currentColor",
|
405
414
|
fill: "none",
|
406
415
|
strokeWidth: "2",
|
@@ -13,8 +13,12 @@ type LabelProps = {
|
|
13
13
|
type ColorPickerTypes = {
|
14
14
|
label?: string;
|
15
15
|
id?: string;
|
16
|
+
isLoading?: boolean;
|
16
17
|
labelProps?: LabelProps;
|
17
18
|
helperText?: string;
|
19
|
+
forceHideHelperText?: boolean;
|
20
|
+
/** Boolean to enable/disable editing the input field and using it as a text field */
|
21
|
+
preview?: boolean;
|
18
22
|
/** The hex code for the color */
|
19
23
|
color?: any;
|
20
24
|
/** Fires everytime the color changes */
|
@@ -13,8 +13,12 @@ type LabelProps = {
|
|
13
13
|
type ColorPickerTypes = {
|
14
14
|
label?: string;
|
15
15
|
id?: string;
|
16
|
+
isLoading?: boolean;
|
16
17
|
labelProps?: LabelProps;
|
17
18
|
helperText?: string;
|
19
|
+
forceHideHelperText?: boolean;
|
20
|
+
/** Boolean to enable/disable editing the input field and using it as a text field */
|
21
|
+
preview?: boolean;
|
18
22
|
/** The hex code for the color */
|
19
23
|
color?: any;
|
20
24
|
/** Fires everytime the color changes */
|