ekm-ui 0.4.49 → 0.4.51
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/.turbo/turbo-build.log +418 -411
- package/CHANGELOG.md +14 -0
- package/dist/account-manager.d.ts +14 -0
- package/dist/account-manager.js +6 -0
- package/dist/account-manager.js.map +1 -0
- package/dist/button.js +1 -1
- package/dist/card-payment-block.css +1 -1
- package/dist/card-payment-block.css.map +1 -1
- package/dist/card-payment-block.js +20 -19
- package/dist/chunk-6TL5EZJH.js +10 -0
- package/dist/chunk-6TL5EZJH.js.map +1 -0
- package/dist/chunk-6XUGQCY5.js +8 -0
- package/dist/chunk-6XUGQCY5.js.map +1 -0
- package/dist/{chunk-F3BF3KTV.js → chunk-7SCKJ3BO.js} +2 -2
- package/dist/chunk-BDTV2HMW.js +11 -0
- package/dist/chunk-BDTV2HMW.js.map +1 -0
- package/dist/{chunk-M4UBHZDH.js → chunk-DL4PX4HA.js} +2 -2
- package/dist/{chunk-3PTVTRDP.js → chunk-GIZ3LLSA.js} +3 -3
- package/dist/chunk-GIZ3LLSA.js.map +1 -0
- package/dist/{chunk-D5TS3JJH.js → chunk-IC6K6O46.js} +2 -2
- package/dist/chunk-LMMFRNNG.js +9 -0
- package/dist/chunk-LMMFRNNG.js.map +1 -0
- package/dist/{chunk-UP4YN4XR.js → chunk-PWW4HEGR.js} +2 -2
- package/dist/{chunk-UHSXJRCR.js → chunk-T5BCSSI5.js} +6 -6
- package/dist/{chunk-RRNNHYSF.js → chunk-VHPJC234.js} +2 -2
- package/dist/country-picker/country-modal.css +1 -1
- package/dist/country-picker/country-modal.css.map +1 -1
- package/dist/country-picker/country-modal.js +20 -19
- package/dist/dashboard-notification.d.ts +7 -6
- package/dist/dashboard-notification.js +1 -3
- package/dist/date-range-picker.js +2 -2
- package/dist/date-time-component.js +2 -2
- package/dist/date-time-picker.js +2 -2
- package/dist/drag-and-drop.css +1 -1
- package/dist/drag-and-drop.css.map +1 -1
- package/dist/drag-and-drop.js +20 -19
- package/dist/draggable-stacked-list-item.js +2 -2
- package/dist/file-picker/file-picker.css +1 -1
- package/dist/file-picker/file-picker.css.map +1 -1
- package/dist/file-picker/file-picker.js +20 -19
- package/dist/fixed-alert.js +2 -2
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +20 -19
- package/dist/layout/layout.css +1 -1
- package/dist/layout/layout.css.map +1 -1
- package/dist/layout/layout.js +20 -19
- package/dist/product-picker/product-modal.css +1 -1
- package/dist/product-picker/product-modal.css.map +1 -1
- package/dist/product-picker/product-modal.js +20 -19
- package/dist/progress-bar.d.ts +4 -1
- package/dist/progress-bar.js +1 -1
- package/dist/stacked-list-item.css +1 -1
- package/dist/stacked-list-item.css.map +1 -1
- package/dist/stacked-list-item.js +20 -19
- package/dist/table-result-block.css +1 -1
- package/dist/table-result-block.css.map +1 -1
- package/dist/table-result-block.js +20 -19
- package/dist/toggleswitch.js +1 -1
- package/package.json +1 -1
- package/src/account-manager.tsx +64 -0
- package/src/button.tsx +7 -7
- package/src/dashboard-notification.tsx +79 -56
- package/src/index.tsx +2 -1
- package/src/progress-bar.tsx +9 -7
- package/src/toggleswitch.tsx +1 -3
- package/dist/chunk-3PTVTRDP.js.map +0 -1
- package/dist/chunk-E5KIDP3Z.js +0 -9
- package/dist/chunk-E5KIDP3Z.js.map +0 -1
- package/dist/chunk-TMO76FWT.js +0 -10
- package/dist/chunk-TMO76FWT.js.map +0 -1
- package/dist/chunk-VOFMZ77E.js +0 -11
- package/dist/chunk-VOFMZ77E.js.map +0 -1
- /package/dist/{chunk-F3BF3KTV.js.map → chunk-7SCKJ3BO.js.map} +0 -0
- /package/dist/{chunk-M4UBHZDH.js.map → chunk-DL4PX4HA.js.map} +0 -0
- /package/dist/{chunk-D5TS3JJH.js.map → chunk-IC6K6O46.js.map} +0 -0
- /package/dist/{chunk-UP4YN4XR.js.map → chunk-PWW4HEGR.js.map} +0 -0
- /package/dist/{chunk-UHSXJRCR.js.map → chunk-T5BCSSI5.js.map} +0 -0
- /package/dist/{chunk-RRNNHYSF.js.map → chunk-VHPJC234.js.map} +0 -0
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
export { e as TableResultBlock } from './chunk-
|
|
1
|
+
export { e as TableResultBlock } from './chunk-T5BCSSI5.js';
|
|
2
|
+
import './chunk-22RUXGYW.js';
|
|
2
3
|
import './chunk-LQKVFBLU.js';
|
|
3
4
|
import './chunk-HVNLAQA6.js';
|
|
4
5
|
import './chunk-HW7AZG2V.js';
|
|
5
6
|
import './chunk-HE5X7TRV.js';
|
|
6
7
|
import './chunk-YZ2YZSNQ.js';
|
|
8
|
+
import './chunk-FTVJMY65.js';
|
|
7
9
|
import './chunk-YXTGVTGL.js';
|
|
8
10
|
import './chunk-EZPRW5WN.js';
|
|
9
11
|
import './chunk-XKE3VK6Z.js';
|
|
@@ -11,65 +13,64 @@ import './chunk-7Q6OMA2A.js';
|
|
|
11
13
|
import './chunk-GVNUAH45.js';
|
|
12
14
|
import './chunk-JAR3LP2K.js';
|
|
13
15
|
import './chunk-EK5I26TX.js';
|
|
14
|
-
import './chunk-
|
|
16
|
+
import './chunk-FPXEE5TC.js';
|
|
15
17
|
import './chunk-XXP5K6Y4.js';
|
|
16
18
|
import './chunk-LWTESXND.js';
|
|
17
19
|
import './chunk-AN66H4D6.js';
|
|
18
20
|
import './chunk-GWERJBUR.js';
|
|
19
21
|
import './chunk-I2DMRDYJ.js';
|
|
20
|
-
import './chunk-
|
|
22
|
+
import './chunk-LIXVY47P.js';
|
|
21
23
|
import './chunk-Y5DEGGVQ.js';
|
|
22
24
|
import './chunk-F7MTEILK.js';
|
|
23
25
|
import './chunk-7WJGATIR.js';
|
|
24
26
|
import './chunk-RTRHNOTP.js';
|
|
25
27
|
import './chunk-XABECXZS.js';
|
|
26
|
-
import './chunk-
|
|
28
|
+
import './chunk-AO5TGD7T.js';
|
|
27
29
|
import './chunk-WVAVR5V6.js';
|
|
28
30
|
import './chunk-2VS7BVWY.js';
|
|
29
31
|
import './chunk-QCHLLBHM.js';
|
|
30
|
-
import './chunk-
|
|
32
|
+
import './chunk-IY6WVOAI.js';
|
|
31
33
|
import './chunk-T2SOP5NE.js';
|
|
32
34
|
import './chunk-AVTJXS4U.js';
|
|
33
35
|
import './chunk-SFEJDNIA.js';
|
|
34
36
|
import './chunk-6QS4FM7C.js';
|
|
35
37
|
import './chunk-THOZT55U.js';
|
|
36
|
-
import './chunk-
|
|
38
|
+
import './chunk-LMMFRNNG.js';
|
|
37
39
|
import './chunk-R3QJRZTP.js';
|
|
38
|
-
import './chunk-AO5TGD7T.js';
|
|
39
40
|
import './chunk-Z44LYPKH.js';
|
|
40
41
|
import './chunk-CNJDESTL.js';
|
|
41
42
|
import './chunk-W55BPRI4.js';
|
|
42
43
|
import './chunk-AY4JB2QV.js';
|
|
43
44
|
import './chunk-Y2GINGVR.js';
|
|
44
45
|
import './chunk-ESJIQMQJ.js';
|
|
45
|
-
import './chunk-
|
|
46
|
-
import './chunk-
|
|
47
|
-
import './chunk-
|
|
46
|
+
import './chunk-VHPJC234.js';
|
|
47
|
+
import './chunk-DL4PX4HA.js';
|
|
48
|
+
import './chunk-6TL5EZJH.js';
|
|
48
49
|
import './chunk-NDDDT4TO.js';
|
|
49
50
|
import './chunk-QYKN3JZ5.js';
|
|
50
51
|
import './chunk-SLIZ4TDR.js';
|
|
51
|
-
import './chunk-
|
|
52
|
+
import './chunk-7SCKJ3BO.js';
|
|
52
53
|
import './chunk-ANU7OAPA.js';
|
|
53
54
|
import './chunk-ISA6E23B.js';
|
|
54
|
-
import './chunk-
|
|
55
|
-
import './chunk-
|
|
56
|
-
import './chunk-D5TS3JJH.js';
|
|
55
|
+
import './chunk-6XUGQCY5.js';
|
|
56
|
+
import './chunk-IC6K6O46.js';
|
|
57
57
|
import './chunk-DSJ5TRZW.js';
|
|
58
58
|
import './chunk-E4USZ2Q3.js';
|
|
59
59
|
import './chunk-F47A36U7.js';
|
|
60
|
-
import './chunk-
|
|
61
|
-
import './chunk-RRNNHYSF.js';
|
|
60
|
+
import './chunk-PWW4HEGR.js';
|
|
62
61
|
import './chunk-4FSPYK2A.js';
|
|
62
|
+
import './chunk-BDTV2HMW.js';
|
|
63
63
|
import './chunk-WLWG565K.js';
|
|
64
|
+
import './chunk-GIZ3LLSA.js';
|
|
65
|
+
import './chunk-ER5CL77P.js';
|
|
64
66
|
import './chunk-5SEJVYKM.js';
|
|
65
67
|
import './chunk-MBACKGWE.js';
|
|
66
68
|
import './chunk-2OPJLYW6.js';
|
|
67
69
|
import './chunk-P5IM3T4M.js';
|
|
68
|
-
import './chunk-TRVGXTCI.js';
|
|
69
|
-
import './chunk-XYGVDZRO.js';
|
|
70
|
-
import './chunk-VOFMZ77E.js';
|
|
71
70
|
import './chunk-TJMI4DH2.js';
|
|
71
|
+
import './chunk-TRVGXTCI.js';
|
|
72
72
|
import './chunk-6LHL364H.js';
|
|
73
|
+
import './chunk-XYGVDZRO.js';
|
|
73
74
|
import './chunk-Z4LPO673.js';
|
|
74
75
|
//# sourceMappingURL=out.js.map
|
|
75
76
|
//# sourceMappingURL=table-result-block.js.map
|
package/dist/toggleswitch.js
CHANGED
package/package.json
CHANGED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { HiXMark } from "react-icons/hi2";
|
|
2
|
+
import { Card } from "./card";
|
|
3
|
+
|
|
4
|
+
type Props = {
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
title: string;
|
|
7
|
+
text: string;
|
|
8
|
+
children: JSX.Element;
|
|
9
|
+
imgURL: string;
|
|
10
|
+
type: "sm" | "lg";
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export function AccountManager({
|
|
14
|
+
title,
|
|
15
|
+
text,
|
|
16
|
+
onClose,
|
|
17
|
+
children,
|
|
18
|
+
type,
|
|
19
|
+
imgURL,
|
|
20
|
+
}: Props) {
|
|
21
|
+
return (
|
|
22
|
+
<Card className={`relative shadow-sm`}>
|
|
23
|
+
<div
|
|
24
|
+
onClick={onClose}
|
|
25
|
+
className="absolute right-2 top-2 cursor-pointer rounded p-1 transition hover:bg-gray-200 hover:dark:bg-gray-600 "
|
|
26
|
+
>
|
|
27
|
+
<HiXMark className="h-6 w-6 text-gray-400 dark:text-gray-300" />
|
|
28
|
+
</div>
|
|
29
|
+
<div
|
|
30
|
+
className={`flex flex-col gap-4 ${
|
|
31
|
+
type == "lg" ? "items-center justify-center " : "sm:flex-row"
|
|
32
|
+
}`}
|
|
33
|
+
>
|
|
34
|
+
<div className="flex-shrink-0">
|
|
35
|
+
<img
|
|
36
|
+
src={imgURL}
|
|
37
|
+
alt=""
|
|
38
|
+
className={`h-16 w-16 rounded-md border border-gray-200 ${
|
|
39
|
+
type == "lg" ? "h-28 w-28 object-cover object-center" : ""
|
|
40
|
+
}`}
|
|
41
|
+
/>
|
|
42
|
+
</div>
|
|
43
|
+
<div className={`${type == "lg" ? "flex flex-col items-center" : ""}`}>
|
|
44
|
+
<p
|
|
45
|
+
className={`mb-1 text-lg font-semibold dark:text-white ${
|
|
46
|
+
type == "lg" ? "text-center" : ""
|
|
47
|
+
}`}
|
|
48
|
+
>
|
|
49
|
+
{title}
|
|
50
|
+
</p>
|
|
51
|
+
<p
|
|
52
|
+
className={`mb-6 text-gray-500 dark:text-gray-400 ${
|
|
53
|
+
type == "lg" ? "text-center" : ""
|
|
54
|
+
}`}
|
|
55
|
+
>
|
|
56
|
+
{text}
|
|
57
|
+
</p>
|
|
58
|
+
{children}
|
|
59
|
+
</div>
|
|
60
|
+
</div>
|
|
61
|
+
</Card>
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
AccountManager.displayName = "AccountManager";
|
package/src/button.tsx
CHANGED
|
@@ -12,10 +12,10 @@ const buttonProps = variantProps({
|
|
|
12
12
|
dark: "enabled:hover:bg-gray-900 focus:ring-4 focus:ring-gray-300 dark:bg-gray-800 dark:enabled:hover:bg-gray-700 dark:focus:ring-gray-800 dark:border-gray-700",
|
|
13
13
|
failure:
|
|
14
14
|
"enabled:hover:bg-red-800 focus:ring-4 focus:ring-red-300 dark:enabled:hover:bg-red-700 dark:focus:ring-red-900",
|
|
15
|
-
gray: "
|
|
16
|
-
info: "enabled:hover:bg-
|
|
15
|
+
gray: "border border-gray-200 enabled:hover:bg-gray-100 focus:ring-blue-700 focus:text-blue-700 dark:bg-transparent dark:text-gray-400 dark:border-gray-600 dark:enabled:hover:text-white dark:enabled:hover:bg-gray-700 focus:ring-2",
|
|
16
|
+
info: "enabled:hover:bg-blue-800 focus:ring-4 focus:ring-blue-300 dark:bg-blue-600 dark:enabled:hover:bg-blue-700 dark:focus:ring-blue-800",
|
|
17
17
|
light:
|
|
18
|
-
"text-gray-900 bg-white border border-gray-300 enabled:hover:bg-gray-100 focus:ring-4 focus:ring-
|
|
18
|
+
"text-gray-900 bg-white border border-gray-300 enabled:hover:bg-gray-100 focus:ring-4 focus:ring-blue-300 dark:bg-gray-600 dark:text-white dark:border-gray-600 dark:enabled:hover:bg-gray-700 dark:enabled:hover:border-gray-700 dark:focus:ring-gray-700",
|
|
19
19
|
success:
|
|
20
20
|
"enabled:hover:bg-green-800 focus:ring-4 focus:ring-green-300 dark:enabled:hover:bg-green-700 dark:focus:ring-green-800",
|
|
21
21
|
warning:
|
|
@@ -64,14 +64,14 @@ const buttonProps = variantProps({
|
|
|
64
64
|
color: "info",
|
|
65
65
|
outline: true,
|
|
66
66
|
},
|
|
67
|
-
className: "text-
|
|
67
|
+
className: "text-blue-700 border-blue-700 hover:text-white",
|
|
68
68
|
},
|
|
69
69
|
{
|
|
70
70
|
variants: {
|
|
71
71
|
color: "info",
|
|
72
72
|
outline: false,
|
|
73
73
|
},
|
|
74
|
-
className: "text-white bg-
|
|
74
|
+
className: "text-white bg-blue-700",
|
|
75
75
|
},
|
|
76
76
|
{
|
|
77
77
|
variants: {
|
|
@@ -107,14 +107,14 @@ const buttonProps = variantProps({
|
|
|
107
107
|
outline: true,
|
|
108
108
|
},
|
|
109
109
|
className:
|
|
110
|
-
"text-gray-900 bg-white
|
|
110
|
+
"text-gray-900 bg-white border border-gray-200",
|
|
111
111
|
},
|
|
112
112
|
{
|
|
113
113
|
variants: {
|
|
114
114
|
color: "gray",
|
|
115
115
|
outline: false,
|
|
116
116
|
},
|
|
117
|
-
className: "text-gray-900 bg-
|
|
117
|
+
className: "text-gray-900 bg-gray-200 border border-gray-200",
|
|
118
118
|
},
|
|
119
119
|
],
|
|
120
120
|
});
|
|
@@ -1,65 +1,88 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { HiExclamationCircle, HiInformationCircle } from "react-icons/hi2"
|
|
2
|
+
|
|
3
|
+
const variantColours= Object.freeze([
|
|
4
|
+
{
|
|
5
|
+
variant: 'default',
|
|
6
|
+
titleColour: 'text-black',
|
|
7
|
+
backgroundColour: 'bg-white border-gray-200 dark:border-gray-700 dark:bg-gray-800',
|
|
8
|
+
detailsColour: 'text-gray-500',
|
|
9
|
+
icon: null
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
variant: 'alert',
|
|
13
|
+
titleColour: 'text-red-900',
|
|
14
|
+
backgroundColour: 'bg-red-50 border-red-800',
|
|
15
|
+
detailsColour: 'text-red-800',
|
|
16
|
+
icon: (<HiExclamationCircle className='text-red-900 w-6 h-6 mr-1'/>)
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
variant: 'info',
|
|
20
|
+
titleColour: 'text-blue-700',
|
|
21
|
+
backgroundColour: 'bg-blue-50 border-blue-300',
|
|
22
|
+
detailsColour: 'text-blue-800',
|
|
23
|
+
icon: (<HiInformationCircle className='text-blue-700 w-6 h-6 mr-1'/>)
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
variant: 'warning',
|
|
27
|
+
titleColour: 'text-yellow-700',
|
|
28
|
+
backgroundColour: 'bg-yellow-50 border-yellow-500',
|
|
29
|
+
detailsColour: 'text-yellow-500',
|
|
30
|
+
icon: (<HiExclamationCircle className='text-yellow-700 w-6 h-6 mr-1'/>)
|
|
31
|
+
},
|
|
32
|
+
]
|
|
33
|
+
|
|
34
|
+
)
|
|
3
35
|
|
|
4
36
|
type Props = {
|
|
5
|
-
|
|
37
|
+
id: string;
|
|
6
38
|
title: string;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
39
|
+
details: string | React.ReactNode;
|
|
40
|
+
imageNode: React.ReactNode;
|
|
41
|
+
buttonNode: React.ReactNode;
|
|
42
|
+
variant: "default" | "alert" | "info"| "warning" ;
|
|
43
|
+
showIcon: boolean;
|
|
44
|
+
|
|
11
45
|
};
|
|
12
46
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
{title}
|
|
50
|
-
</p>
|
|
51
|
-
<p
|
|
52
|
-
className={`mb-6 text-gray-500 dark:text-gray-400 ${
|
|
53
|
-
type == "lg" ? "text-center" : ""
|
|
54
|
-
}`}
|
|
55
|
-
>
|
|
56
|
-
{text}
|
|
57
|
-
</p>
|
|
58
|
-
{children}
|
|
47
|
+
|
|
48
|
+
export function DashboardNotification({id, title, details, imageNode, buttonNode, variant='default', showIcon=false} : Props) {
|
|
49
|
+
|
|
50
|
+
const variantColor = variantColours.find(v => v.variant === variant) || variantColours[0]
|
|
51
|
+
return (
|
|
52
|
+
<div id={id} className={`flex flex-col rounded-lg border p-3 shadow-sm ${variantColor.backgroundColour}`}>
|
|
53
|
+
<div className="flex flex-col lg:flex-row items-center gap-4">
|
|
54
|
+
{imageNode && (
|
|
55
|
+
<div className="flex-none">
|
|
56
|
+
{imageNode}
|
|
57
|
+
</div>
|
|
58
|
+
)}
|
|
59
|
+
{showIcon && (
|
|
60
|
+
<div className="flex lg:hidden">
|
|
61
|
+
{variantColor.icon}
|
|
62
|
+
</div>
|
|
63
|
+
)}
|
|
64
|
+
<div className="flex-1">
|
|
65
|
+
<div className={`${variantColor.titleColour} text-lg font-semibold flex items-center`}>
|
|
66
|
+
{showIcon &&
|
|
67
|
+
<div className="hidden lg:flex">
|
|
68
|
+
{variantColor.icon}
|
|
69
|
+
</div>
|
|
70
|
+
}
|
|
71
|
+
{title}
|
|
72
|
+
</div>
|
|
73
|
+
<div className={`${variantColor.detailsColour} text-sm font-normal`}>
|
|
74
|
+
{details}
|
|
75
|
+
</div>
|
|
76
|
+
</div>
|
|
77
|
+
{buttonNode && (
|
|
78
|
+
<div className="flex-none">
|
|
79
|
+
{buttonNode}
|
|
80
|
+
</div>
|
|
81
|
+
)}
|
|
82
|
+
</div>
|
|
59
83
|
</div>
|
|
60
|
-
|
|
61
|
-
</Card>
|
|
62
|
-
);
|
|
84
|
+
)
|
|
63
85
|
}
|
|
64
86
|
|
|
65
87
|
DashboardNotification.displayName = "DashboardNotification";
|
|
88
|
+
|
package/src/index.tsx
CHANGED
|
@@ -17,7 +17,7 @@ export { ButtonGroupItem } from "./button-group-item";
|
|
|
17
17
|
export { InputAddon } from "./input-addon";
|
|
18
18
|
export { Alert } from "./alert";
|
|
19
19
|
export { VideoDashboardNotification } from "./video-dashboard-notification";
|
|
20
|
-
export {
|
|
20
|
+
export { AccountManager } from "./account-manager";
|
|
21
21
|
export { VideoModal } from "./video-modal";
|
|
22
22
|
export { InputCopy } from "./input-copy";
|
|
23
23
|
export { DraggableStackedListItem } from "./draggable-stacked-list-item";
|
|
@@ -72,6 +72,7 @@ export { NBUI_Card_Paragraphs } from "./nbui/nbui-card-paragraphs";
|
|
|
72
72
|
export { NBUI_Footer} from "./nbui/nbui-footer";
|
|
73
73
|
export { DateTimeComponent } from "./date-time-component";
|
|
74
74
|
export { PinFeatureButton} from "./pin-feature-button";
|
|
75
|
+
export { DashboardNotification} from "./dashboard-notification";
|
|
75
76
|
|
|
76
77
|
|
|
77
78
|
import "./styles.css";
|
package/src/progress-bar.tsx
CHANGED
|
@@ -13,20 +13,20 @@ const colors = Object.freeze({
|
|
|
13
13
|
});
|
|
14
14
|
|
|
15
15
|
const sizes = Object.freeze({
|
|
16
|
-
sm: "h-1.5
|
|
17
|
-
md: "h-2.5
|
|
18
|
-
lg: "h-4
|
|
16
|
+
sm: "h-1.5",
|
|
17
|
+
md: "h-2.5",
|
|
18
|
+
lg: "h-4",
|
|
19
19
|
xl: "h-6",
|
|
20
20
|
});
|
|
21
21
|
|
|
22
|
-
export function ProgressBar({ progress, size = "md", color = "primary" }) {
|
|
22
|
+
export function ProgressBar({ progress, size = "md", color = "primary", customColor = ""}) {
|
|
23
23
|
return (
|
|
24
24
|
<div
|
|
25
|
-
className={`w-full rounded-full bg-gray-200 ${sizes[size]}
|
|
25
|
+
className={`w-full rounded-full bg-gray-200 ${sizes[size]} dark:bg-gray-700`}
|
|
26
26
|
>
|
|
27
27
|
<div
|
|
28
|
-
className={`${sizes[size]} rounded-full ${colors[color]}`}
|
|
29
|
-
style={{ width: `${progress}%` }}
|
|
28
|
+
className={`${sizes[size]} rounded-full ${customColor ? '' : colors[color]}`}
|
|
29
|
+
style={customColor ? { width: `${progress}%`, background: customColor } : { width: `${progress}%` }}
|
|
30
30
|
></div>
|
|
31
31
|
</div>
|
|
32
32
|
);
|
|
@@ -48,4 +48,6 @@ ProgressBar.propTypes = {
|
|
|
48
48
|
"light",
|
|
49
49
|
"dark",
|
|
50
50
|
]),
|
|
51
|
+
/** Hex color (including #) of progress bar (used instead of color property). Optional */
|
|
52
|
+
customColor: PropTypes.string,
|
|
51
53
|
};
|
package/src/toggleswitch.tsx
CHANGED
|
@@ -6,9 +6,7 @@ export const ToggleSwitch = forwardRef(function ToggleSwitch(props, ref) {
|
|
|
6
6
|
return (
|
|
7
7
|
<div className={props.className && props.className}>
|
|
8
8
|
<label
|
|
9
|
-
className={`relative
|
|
10
|
-
props.disabled && "cursor-not-allowed opacity-50"
|
|
11
|
-
}`}
|
|
9
|
+
className={`relative inline-flex items-center ${props.disabled ? "cursor-not-allowed opacity-50" : "cursor-pointer"}`}
|
|
12
10
|
>
|
|
13
11
|
<input
|
|
14
12
|
id={props.id}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/dashboard-notification.tsx"],"names":["HiXMark","jsx","jsxs","DashboardNotification","title","text","onClose","children","type","imgURL","Card"],"mappings":"mCAAA,OAAS,WAAAA,MAAe,kBA0BhB,cAAAC,EAgBA,QAAAC,MAhBA,oBAdD,SAASC,EAAsB,CACpC,MAAAC,EACA,KAAAC,EACA,QAAAC,EACA,SAAAC,EACA,KAAAC,EACA,OAAAC,CACF,EAAU,CACR,OACEP,EAACQ,EAAA,CAAK,UAAW,qBACf,UAAAT,EAAC,OACC,QAASK,EACT,UAAU,yGAEV,SAAAL,EAACD,EAAA,CAAQ,UAAU,2CAA2C,EAChE,EACAE,EAAC,OACC,UAAW,wBACTM,GAAQ,KAAO,+BAAiC,gBAGlD,UAAAP,EAAC,OAAI,UAAU,gBACb,SAAAA,EAAC,OACC,IAAKQ,EACL,IAAI,GACJ,UAAW,gDACTD,GAAQ,KAAO,uCAAyC,KAE5D,EACF,EACAN,EAAC,OAAI,UAAW,GAAGM,GAAQ,KAAO,6BAA+B,KAC/D,UAAAP,EAAC,KACC,UAAW,8CACTO,GAAQ,KAAO,cAAgB,KAGhC,SAAAJ,EACH,EACAH,EAAC,KACC,UAAW,yCACTO,GAAQ,KAAO,cAAgB,KAGhC,SAAAH,EACH,EACCE,GACH,GACF,GACF,CAEJ,CAEAJ,EAAsB,YAAc","sourcesContent":["import { HiXMark } from \"react-icons/hi2\";\nimport { Card } from \"./card\";\n\ntype Props = {\n onClose: () => void;\n title: string;\n text: string;\n children: JSX.Element;\n imgURL: string;\n type: \"sm\" | \"lg\";\n};\n\nexport function DashboardNotification({\n title,\n text,\n onClose,\n children,\n type,\n imgURL,\n}: Props) {\n return (\n <Card className={`relative shadow-sm`}>\n <div\n onClick={onClose}\n className=\"absolute right-2 top-2 cursor-pointer rounded p-1 transition hover:bg-gray-200 hover:dark:bg-gray-600 \"\n >\n <HiXMark className=\"h-6 w-6 text-gray-400 dark:text-gray-300\" />\n </div>\n <div\n className={`flex flex-col gap-4 ${\n type == \"lg\" ? \"items-center justify-center \" : \"sm:flex-row\"\n }`}\n >\n <div className=\"flex-shrink-0\">\n <img\n src={imgURL}\n alt=\"\"\n className={`h-16 w-16 rounded-md border border-gray-200 ${\n type == \"lg\" ? \"h-28 w-28 object-cover object-center\" : \"\"\n }`}\n />\n </div>\n <div className={`${type == \"lg\" ? \"flex flex-col items-center\" : \"\"}`}>\n <p\n className={`mb-1 text-lg font-semibold dark:text-white ${\n type == \"lg\" ? \"text-center\" : \"\"\n }`}\n >\n {title}\n </p>\n <p\n className={`mb-6 text-gray-500 dark:text-gray-400 ${\n type == \"lg\" ? \"text-center\" : \"\"\n }`}\n >\n {text}\n </p>\n {children}\n </div>\n </div>\n </Card>\n );\n}\n\nDashboardNotification.displayName = \"DashboardNotification\";\n"]}
|
package/dist/chunk-E5KIDP3Z.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { a } from './chunk-6LHL364H.js';
|
|
2
|
-
import { e } from './chunk-Z4LPO673.js';
|
|
3
|
-
import { jsx } from 'react/jsx-runtime';
|
|
4
|
-
|
|
5
|
-
var r=e(a(),1);var o=Object.freeze({primary:"bg-blue-600 dark:bg-blue-500",secondary:"bg-gray-600 dark:bg-gray-500",success:"bg-green-600 dark:bg-green-500",danger:"bg-red-600 dark:bg-red-500",warning:"bg-yellow-600 dark:bg-yellow-500",info:"bg-blue-600 dark:bg-blue-500",light:"bg-gray-100 dark:bg-gray-900",dark:"bg-gray-800 dark:bg-gray-200"}),g=Object.freeze({sm:"h-1.5 mb-4",md:"h-2.5 mb-4",lg:"h-4 mb-4",xl:"h-6"});function n({progress:d,size:e="md",color:b="primary"}){return jsx("div",{className:`w-full rounded-full bg-gray-200 ${g[e]} mb-4 dark:bg-gray-700`,children:jsx("div",{className:`${g[e]} rounded-full ${o[b]}`,style:{width:`${d}%`}})})}n.propTypes={progress:r.default.number.isRequired,size:r.default.oneOf(["sm","md","lg","xl"]),color:r.default.oneOf(["primary","secondary","success","danger","warning","info","light","dark"])};
|
|
6
|
-
|
|
7
|
-
export { n as a };
|
|
8
|
-
//# sourceMappingURL=out.js.map
|
|
9
|
-
//# sourceMappingURL=chunk-E5KIDP3Z.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/progress-bar.tsx"],"names":["import_prop_types","jsx","colors","sizes","ProgressBar","progress","size","color","PropTypes"],"mappings":"gFACA,IAAAA,EAAsB,SAyBhB,cAAAC,MAAA,oBAvBN,IAAMC,EAAS,OAAO,OAAO,CAC3B,QAAS,+BACT,UAAW,+BACX,QAAS,iCACT,OAAQ,6BACR,QAAS,mCACT,KAAM,+BACN,MAAO,+BACP,KAAM,8BACR,CAAC,EAEKC,EAAQ,OAAO,OAAO,CAC1B,GAAI,aACJ,GAAI,aACJ,GAAI,WACJ,GAAI,KACN,CAAC,EAEM,SAASC,EAAY,CAAE,SAAAC,EAAU,KAAAC,EAAO,KAAM,MAAAC,EAAQ,SAAU,EAAG,CACxE,OACEN,EAAC,OACC,UAAW,mCAAmCE,EAAMG,CAAI,0BAExD,SAAAL,EAAC,OACC,UAAW,GAAGE,EAAMG,CAAI,kBAAkBJ,EAAOK,CAAK,IACtD,MAAO,CAAE,MAAO,GAAGF,IAAY,EAChC,EACH,CAEJ,CAEAD,EAAY,UAAY,CAEtB,SAAU,EAAAI,QAAU,OAAO,WAE3B,KAAM,EAAAA,QAAU,MAAM,CAAC,KAAM,KAAM,KAAM,IAAI,CAAC,EAE9C,MAAO,EAAAA,QAAU,MAAM,CACrB,UACA,YACA,UACA,SACA,UACA,OACA,QACA,MACF,CAAC,CACH","sourcesContent":["//@ts-nocheck\nimport PropTypes from \"prop-types\";\n\nconst colors = Object.freeze({\n primary: \"bg-blue-600 dark:bg-blue-500\",\n secondary: \"bg-gray-600 dark:bg-gray-500\",\n success: \"bg-green-600 dark:bg-green-500\",\n danger: \"bg-red-600 dark:bg-red-500\",\n warning: \"bg-yellow-600 dark:bg-yellow-500\",\n info: \"bg-blue-600 dark:bg-blue-500\",\n light: \"bg-gray-100 dark:bg-gray-900\",\n dark: \"bg-gray-800 dark:bg-gray-200\",\n});\n\nconst sizes = Object.freeze({\n sm: \"h-1.5 mb-4\",\n md: \"h-2.5 mb-4\",\n lg: \"h-4 mb-4\",\n xl: \"h-6\",\n});\n\nexport function ProgressBar({ progress, size = \"md\", color = \"primary\" }) {\n return (\n <div\n className={`w-full rounded-full bg-gray-200 ${sizes[size]} mb-4 dark:bg-gray-700`}\n >\n <div\n className={`${sizes[size]} rounded-full ${colors[color]}`}\n style={{ width: `${progress}%` }}\n ></div>\n </div>\n );\n}\n\nProgressBar.propTypes = {\n /** Current progress to be shown (defaults to 0) */\n progress: PropTypes.number.isRequired,\n /** Size of the progress bar (defaults to md) */\n size: PropTypes.oneOf([\"sm\", \"md\", \"lg\", \"xl\"]),\n /** Color of the progress bar (defaults to primary) */\n color: PropTypes.oneOf([\n \"primary\",\n \"secondary\",\n \"success\",\n \"danger\",\n \"warning\",\n \"info\",\n \"light\",\n \"dark\",\n ]),\n};\n"]}
|
package/dist/chunk-TMO76FWT.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { a as a$1 } from './chunk-6LHL364H.js';
|
|
2
|
-
import { e } from './chunk-Z4LPO673.js';
|
|
3
|
-
import { forwardRef } from 'react';
|
|
4
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
5
|
-
|
|
6
|
-
var a=e(a$1(),1);var t=forwardRef(function(e,l){return jsx("div",{className:e.className&&e.className,children:jsxs("label",{className:`relative mb-5 inline-flex items-center ${e.disabled&&"cursor-not-allowed opacity-50"}`,children:[jsx("input",{id:e.id,ref:l,type:"checkbox",className:"peer sr-only",onChange:e.onChange,name:e.name,checked:e.checked,disabled:e.disabled}),jsx("div",{className:"peer h-6 w-11 rounded-full bg-gray-200 after:absolute after:start-[2px] after:top-0.5 after:h-5 after:w-5 after:rounded-full after:border after:border-gray-300 after:bg-white after:transition-all after:content-[''] peer-checked:bg-blue-600 peer-checked:after:translate-x-full peer-checked:after:border-white rtl:peer-checked:after:-translate-x-full dark:border-gray-600 dark:bg-gray-700"}),e.label&&jsx("span",{class:"ms-3 text-sm font-medium text-gray-900 dark:text-gray-300",children:e.label})]})})});t.propTypes={id:a.default.string.isRequired,checked:a.default.bool,disabled:a.default.bool,onChange:a.default.func,label:a.default.string};t.displayName="ToggleSwitch";
|
|
7
|
-
|
|
8
|
-
export { t as a };
|
|
9
|
-
//# sourceMappingURL=out.js.map
|
|
10
|
-
//# sourceMappingURL=chunk-TMO76FWT.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/toggleswitch.tsx"],"names":["import_prop_types","forwardRef","jsx","jsxs","ToggleSwitch","props","ref","PropTypes"],"mappings":"gFACA,IAAAA,EAAsB,SACtB,OAAS,cAAAC,MAAkB,QAKpB,OAKG,OAAAC,EALH,QAAAC,MAAA,oBAHA,IAAMC,EAAeH,EAAW,SAAsBI,EAAOC,EAAK,CACvE,OACEJ,EAAC,OAAI,UAAWG,EAAM,WAAaA,EAAM,UACtC,SAAAF,EAAC,SACE,UAAW,0CACTE,EAAM,UAAY,kCAGpB,UAAAH,EAAC,SACC,GAAIG,EAAM,GACV,IAAKC,EACL,KAAK,WACL,UAAW,eACX,SAAUD,EAAM,SAChB,KAAMA,EAAM,KACZ,QAASA,EAAM,QACf,SAAUA,EAAM,SAChB,EACFH,EAAC,OAAI,UAAU,qYAAqY,EACnZG,EAAM,OACLH,EAAC,QAAK,MAAM,4DACT,SAAAG,EAAM,MACT,GAEJ,EACF,CAEN,CAAC,EAEDD,EAAa,UAAY,CAEvB,GAAI,EAAAG,QAAU,OAAO,WAErB,QAAS,EAAAA,QAAU,KAEnB,SAAU,EAAAA,QAAU,KAEpB,SAAU,EAAAA,QAAU,KACpB,MAAO,EAAAA,QAAU,MACnB,EAEAH,EAAa,YAAc","sourcesContent":["//@ts-nocheck\nimport PropTypes from \"prop-types\";\nimport { forwardRef } from \"react\";\n\nexport const ToggleSwitch = forwardRef(function ToggleSwitch(props, ref) {\n return (\n <div className={props.className && props.className}>\n <label\n className={`relative mb-5 inline-flex items-center ${\n props.disabled && \"cursor-not-allowed opacity-50\"\n }`}\n >\n <input\n id={props.id}\n ref={ref}\n type=\"checkbox\"\n className={`peer sr-only`}\n onChange={props.onChange}\n name={props.name}\n checked={props.checked}\n disabled={props.disabled}\n />\n <div className=\"peer h-6 w-11 rounded-full bg-gray-200 after:absolute after:start-[2px] after:top-0.5 after:h-5 after:w-5 after:rounded-full after:border after:border-gray-300 after:bg-white after:transition-all after:content-[''] peer-checked:bg-blue-600 peer-checked:after:translate-x-full peer-checked:after:border-white rtl:peer-checked:after:-translate-x-full dark:border-gray-600 dark:bg-gray-700\" />\n {props.label && (\n <span class=\"ms-3 text-sm font-medium text-gray-900 dark:text-gray-300\">\n {props.label}\n </span>\n )}\n </label>\n </div>\n );\n});\n\nToggleSwitch.propTypes = {\n /** Id for Toggle switch */\n id: PropTypes.string.isRequired,\n /** Bool to determine if ToggleSwitch has been checked */\n checked: PropTypes.bool,\n /** Bool to disable toggle switch */\n disabled: PropTypes.bool,\n /** function to handle checked value */\n onChange: PropTypes.func,\n label: PropTypes.string,\n};\n\nToggleSwitch.displayName = \"ToggleSwitch\";\n"]}
|
package/dist/chunk-VOFMZ77E.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { a as a$2 } from './chunk-TJMI4DH2.js';
|
|
2
|
-
import { a } from './chunk-6LHL364H.js';
|
|
3
|
-
import { e as e$1, c, b, a as a$1 } from './chunk-Z4LPO673.js';
|
|
4
|
-
import { variantProps } from 'classname-variants/react';
|
|
5
|
-
import { jsx } from 'react/jsx-runtime';
|
|
6
|
-
|
|
7
|
-
var e=e$1(a(),1);var v=variantProps({base:"group flex items-stretch items-center justify-center p-0.5 text-center font-medium relative focus:z-10 focus:outline-none rounded-lg",variants:{color:{default:"focus:outline-none text-white bg-blue-700 border border-transparent enabled:hover:bg-blue-800 focus:ring-blue-300 dark:bg-blue-600 dark:enabled:hover:bg-blue-700 dark:focus:ring-blue-800 rounded-lg focus:ring-2",dark:"enabled:hover:bg-gray-900 focus:ring-4 focus:ring-gray-300 dark:bg-gray-800 dark:enabled:hover:bg-gray-700 dark:focus:ring-gray-800 dark:border-gray-700",failure:"enabled:hover:bg-red-800 focus:ring-4 focus:ring-red-300 dark:enabled:hover:bg-red-700 dark:focus:ring-red-900",gray:"text-gray-900 bg-white border border-gray-200 enabled:hover:bg-gray-100 enabled:hover:text-cyan-700 :ring-cyan-700 focus:text-cyan-700 dark:bg-transparent dark:text-gray-400 dark:border-gray-600 dark:enabled:hover:text-white dark:enabled:hover:bg-gray-700 focus:ring-2",info:"enabled:hover:bg-cyan-800 focus:ring-4 focus:ring-cyan-300 dark:bg-cyan-600 dark:enabled:hover:bg-cyan-700 dark:focus:ring-cyan-800",light:"text-gray-900 bg-white border border-gray-300 enabled:hover:bg-gray-100 focus:ring-4 focus:ring-cyan-300 dark:bg-gray-600 dark:text-white dark:border-gray-600 dark:enabled:hover:bg-gray-700 dark:enabled:hover:border-gray-700 dark:focus:ring-gray-700",success:"enabled:hover:bg-green-800 focus:ring-4 focus:ring-green-300 dark:enabled:hover:bg-green-700 dark:focus:ring-green-800",warning:"enabled:hover:bg-yellow-500 focus:ring-4 focus:ring-yellow-300 dark:focus:ring-yellow-900"},disabled:{true:"cursor-not-allowed opacity-50",false:""},outline:{true:"border",false:""}},compoundVariants:[{variants:{color:"dark",outline:!0},className:"text-gray-800 border-gray-800 hover:text-white"},{variants:{color:"dark",outline:!1},className:"border-0 text-white bg-gray-800"},{variants:{color:"failure",outline:!0},className:"text-red-700 border-red-700 hover:text-white"},{variants:{color:"failure",outline:!1},className:"border-0 text-white bg-red-700"},{variants:{color:"info",outline:!0},className:"text-cyan-700 border-cyan-700 hover:text-white"},{variants:{color:"info",outline:!1},className:"text-white bg-cyan-700"},{variants:{color:"success",outline:!0},className:"text-green-700 border-green-700 hover:text-white"},{variants:{color:"success",outline:!1},className:"text-white bg-green-700"},{variants:{color:"warning",outline:!0},className:"text-yellow-400 border-yellow-400 hover:text-white"},{variants:{color:"warning",outline:!1},className:"text-white bg-yellow-400"},{variants:{color:"gray",outline:!0},className:"text-gray-900 bg-white hover:text-white border border-gray-200"},{variants:{color:"gray",outline:!1},className:"text-gray-900 bg-white border border-gray-200"}]}),m=Object.freeze({xs:"text-xs px-2 py-1",sm:"text-sm px-3 py-1.5",md:"text-sm px-4 py-2",lg:"text-base px-5 py-2.5",xl:"text-base px-6 py-3"});function i(k){var t=k,{color:g="default",disabled:d,outline:b$1,size:c$1="md",children:u,className:a}=t,y=c(t,["color","disabled","outline","size","children","className"]);return jsx("button",b(a$1(a$1({},v({color:g,disabled:d,outline:b$1,className:a})),y),{children:jsx("span",{className:a$2("flex items-center justify-center rounded-md transition-all duration-200",m[c$1],a),children:u})}))}i.propTypes={color:e.default.oneOf(["default","dark","failure","gray","info","light","success","warning"]),size:e.default.oneOf(["xs","sm","md","lg","xl"]),disabled:e.default.bool,outline:e.default.bool,addon:e.default.element,icon:e.default.element};i.displayName="Button";
|
|
8
|
-
|
|
9
|
-
export { i as a };
|
|
10
|
-
//# sourceMappingURL=out.js.map
|
|
11
|
-
//# sourceMappingURL=chunk-VOFMZ77E.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/button.tsx"],"names":["variantProps","import_prop_types","jsx","buttonProps","sizes","Button","_a","_b","color","disabled","outline","size","children","className","props","__objRest","__spreadProps","__spreadValues","twMerge","PropTypes"],"mappings":"6IACA,OAAS,gBAAAA,MAAoB,2BAE7B,IAAAC,EAAsB,SA4IhB,cAAAC,MAAA,oBA1IN,IAAMC,EAAcH,EAAa,CAC/B,KAAM,uIACN,SAAU,CACR,MAAO,CACL,QACE,qNACF,KAAM,2JACN,QACE,iHACF,KAAM,+QACN,KAAM,sIACN,MACE,4PACF,QACE,yHACF,QACE,2FACJ,EACA,SAAU,CACR,KAAM,gCACN,MAAO,EACT,EACA,QAAS,CACP,KAAM,SACN,MAAO,EACT,CACF,EACA,iBAAkB,CAChB,CACE,SAAU,CACR,MAAO,OACP,QAAS,EACX,EACA,UAAW,gDACb,EACA,CACE,SAAU,CACR,MAAO,OACP,QAAS,EACX,EACA,UAAW,iCACb,EACA,CACE,SAAU,CACR,MAAO,UACP,QAAS,EACX,EACA,UAAW,8CACb,EACA,CACE,SAAU,CACR,MAAO,UACP,QAAS,EACX,EACA,UAAW,gCACb,EACA,CACE,SAAU,CACR,MAAO,OACP,QAAS,EACX,EACA,UAAW,gDACb,EACA,CACE,SAAU,CACR,MAAO,OACP,QAAS,EACX,EACA,UAAW,wBACb,EACA,CACE,SAAU,CACR,MAAO,UACP,QAAS,EACX,EACA,UAAW,kDACb,EACA,CACE,SAAU,CACR,MAAO,UACP,QAAS,EACX,EACA,UAAW,yBACb,EACA,CACE,SAAU,CACR,MAAO,UACP,QAAS,EACX,EACA,UAAW,oDACb,EACA,CACE,SAAU,CACR,MAAO,UACP,QAAS,EACX,EACA,UAAW,0BACb,EACA,CACE,SAAU,CACR,MAAO,OACP,QAAS,EACX,EACA,UACE,gEACJ,EACA,CACE,SAAU,CACR,MAAO,OACP,QAAS,EACX,EACA,UAAW,+CACb,CACF,CACF,CAAC,EAEKI,EAAQ,OAAO,OAAO,CAC1B,GAAI,oBACJ,GAAI,sBACJ,GAAI,oBACJ,GAAI,wBACJ,GAAI,qBACN,CAAC,EAEM,SAASC,EAAOC,EAQpB,CARoB,IAAAC,EAAAD,EACrB,OAAAE,EAAQ,UACR,SAAAC,EACA,QAAAC,EACA,KAAAC,EAAO,KACP,SAAAC,EACA,UAAAC,CAvIF,EAiIuBN,EAOlBO,EAAAC,EAPkBR,EAOlB,CANH,QACA,WACA,UACA,OACA,WACA,cAGA,OACEL,EAAC,SAAAc,EAAAC,IAAA,GACKd,EAAY,CAAE,MAAAK,EAAO,SAAAC,EAAU,QAAAC,EAAS,UAAAG,CAAU,CAAC,GACnDC,GAFL,CAIC,SAAAZ,EAAC,QACC,UAAWgB,EACT,0EACAd,EAAMO,CAAI,EACVE,CACF,EAEC,SAAAD,EACH,GACF,CAEJ,CAEAP,EAAO,UAAY,CAEjB,MAAO,EAAAc,QAAU,MAAM,CACrB,UACA,OACA,UACA,OACA,OACA,QACA,UACA,SACF,CAAC,EAED,KAAM,EAAAA,QAAU,MAAM,CAAC,KAAM,KAAM,KAAM,KAAM,IAAI,CAAC,EAEpD,SAAU,EAAAA,QAAU,KAEpB,QAAS,EAAAA,QAAU,KAEnB,MAAO,EAAAA,QAAU,QAEjB,KAAM,EAAAA,QAAU,OAClB,EAEAd,EAAO,YAAc","sourcesContent":["//@ts-nocheck\nimport { variantProps } from \"classname-variants/react\";\nimport { twMerge } from \"tailwind-merge\";\nimport PropTypes from \"prop-types\";\n\nconst buttonProps = variantProps({\n base: \"group flex items-stretch items-center justify-center p-0.5 text-center font-medium relative focus:z-10 focus:outline-none rounded-lg\",\n variants: {\n color: {\n default:\n \"focus:outline-none text-white bg-blue-700 border border-transparent enabled:hover:bg-blue-800 focus:ring-blue-300 dark:bg-blue-600 dark:enabled:hover:bg-blue-700 dark:focus:ring-blue-800 rounded-lg focus:ring-2\",\n dark: \"enabled:hover:bg-gray-900 focus:ring-4 focus:ring-gray-300 dark:bg-gray-800 dark:enabled:hover:bg-gray-700 dark:focus:ring-gray-800 dark:border-gray-700\",\n failure:\n \"enabled:hover:bg-red-800 focus:ring-4 focus:ring-red-300 dark:enabled:hover:bg-red-700 dark:focus:ring-red-900\",\n gray: \"text-gray-900 bg-white border border-gray-200 enabled:hover:bg-gray-100 enabled:hover:text-cyan-700 :ring-cyan-700 focus:text-cyan-700 dark:bg-transparent dark:text-gray-400 dark:border-gray-600 dark:enabled:hover:text-white dark:enabled:hover:bg-gray-700 focus:ring-2\",\n info: \"enabled:hover:bg-cyan-800 focus:ring-4 focus:ring-cyan-300 dark:bg-cyan-600 dark:enabled:hover:bg-cyan-700 dark:focus:ring-cyan-800\",\n light:\n \"text-gray-900 bg-white border border-gray-300 enabled:hover:bg-gray-100 focus:ring-4 focus:ring-cyan-300 dark:bg-gray-600 dark:text-white dark:border-gray-600 dark:enabled:hover:bg-gray-700 dark:enabled:hover:border-gray-700 dark:focus:ring-gray-700\",\n success:\n \"enabled:hover:bg-green-800 focus:ring-4 focus:ring-green-300 dark:enabled:hover:bg-green-700 dark:focus:ring-green-800\",\n warning:\n \"enabled:hover:bg-yellow-500 focus:ring-4 focus:ring-yellow-300 dark:focus:ring-yellow-900\",\n },\n disabled: {\n true: \"cursor-not-allowed opacity-50\",\n false: \"\",\n },\n outline: {\n true: \"border\",\n false: \"\",\n },\n },\n compoundVariants: [\n {\n variants: {\n color: \"dark\",\n outline: true,\n },\n className: \"text-gray-800 border-gray-800 hover:text-white\",\n },\n {\n variants: {\n color: \"dark\",\n outline: false,\n },\n className: \"border-0 text-white bg-gray-800\",\n },\n {\n variants: {\n color: \"failure\",\n outline: true,\n },\n className: \"text-red-700 border-red-700 hover:text-white\",\n },\n {\n variants: {\n color: \"failure\",\n outline: false,\n },\n className: \"border-0 text-white bg-red-700\",\n },\n {\n variants: {\n color: \"info\",\n outline: true,\n },\n className: \"text-cyan-700 border-cyan-700 hover:text-white\",\n },\n {\n variants: {\n color: \"info\",\n outline: false,\n },\n className: \"text-white bg-cyan-700\",\n },\n {\n variants: {\n color: \"success\",\n outline: true,\n },\n className: \"text-green-700 border-green-700 hover:text-white\",\n },\n {\n variants: {\n color: \"success\",\n outline: false,\n },\n className: \"text-white bg-green-700\",\n },\n {\n variants: {\n color: \"warning\",\n outline: true,\n },\n className: \"text-yellow-400 border-yellow-400 hover:text-white\",\n },\n {\n variants: {\n color: \"warning\",\n outline: false,\n },\n className: \"text-white bg-yellow-400\",\n },\n {\n variants: {\n color: \"gray\",\n outline: true,\n },\n className:\n \"text-gray-900 bg-white hover:text-white border border-gray-200\",\n },\n {\n variants: {\n color: \"gray\",\n outline: false,\n },\n className: \"text-gray-900 bg-white border border-gray-200\",\n },\n ],\n});\n\nconst sizes = Object.freeze({\n xs: \"text-xs px-2 py-1\",\n sm: \"text-sm px-3 py-1.5\",\n md: \"text-sm px-4 py-2\",\n lg: \"text-base px-5 py-2.5\",\n xl: \"text-base px-6 py-3\",\n});\n\nexport function Button({\n color = \"default\",\n disabled,\n outline,\n size = \"md\",\n children,\n className,\n ...props\n}) {\n return (\n <button\n {...buttonProps({ color, disabled, outline, className })}\n {...props}\n >\n <span\n className={twMerge(\n \"flex items-center justify-center rounded-md transition-all duration-200\",\n sizes[size],\n className\n )}\n >\n {children}\n </span>\n </button>\n );\n}\n\nButton.propTypes = {\n /** String for color of button */\n color: PropTypes.oneOf([\n \"default\",\n \"dark\",\n \"failure\",\n \"gray\",\n \"info\",\n \"light\",\n \"success\",\n \"warning\",\n ]),\n /** String to determine the size of the badge. \"xs, sm, md, lg, xl\" */\n size: PropTypes.oneOf([\"xs\", \"sm\", \"md\", \"lg\", \"xl\"]),\n /** Bool to disable button */\n disabled: PropTypes.bool,\n /** Bool to outline button */\n outline: PropTypes.bool,\n /** element for addon on button */\n addon: PropTypes.element,\n /** element for icon on button */\n icon: PropTypes.element,\n};\n\nButton.displayName = \"Button\";\n"]}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|