@axtec/components 0.1.3 → 0.1.4
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/components/PrimaryCard/PrimaryCard.d.ts +24 -0
- package/dist/components/PrimaryCard/index.d.ts +1 -0
- package/dist/components/Sidebar/Sidebar.d.ts +101 -0
- package/dist/components/Sidebar/index.d.ts +1 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/index.css +1 -1
- package/dist/index.js +123 -111
- package/dist/index.js.map +1 -1
- package/dist/index3.js +2 -2
- package/dist/index48.js +44 -56
- package/dist/index48.js.map +1 -1
- package/dist/index49.js +56 -16
- package/dist/index49.js.map +1 -1
- package/dist/index50.js +16 -65
- package/dist/index50.js.map +1 -1
- package/dist/index51.js +62 -51
- package/dist/index51.js.map +1 -1
- package/dist/index52.js +54 -37
- package/dist/index52.js.map +1 -1
- package/dist/index53.js +37 -66
- package/dist/index53.js.map +1 -1
- package/dist/index54.js +63 -19
- package/dist/index54.js.map +1 -1
- package/dist/index55.js +19 -101
- package/dist/index55.js.map +1 -1
- package/dist/index56.js +100 -64
- package/dist/index56.js.map +1 -1
- package/dist/index57.js +206 -224
- package/dist/index57.js.map +1 -1
- package/dist/index58.js +62 -96
- package/dist/index58.js.map +1 -1
- package/dist/index59.js +233 -33
- package/dist/index59.js.map +1 -1
- package/dist/index60.js +98 -14
- package/dist/index60.js.map +1 -1
- package/dist/index61.js +35 -59
- package/dist/index61.js.map +1 -1
- package/dist/index62.js +16 -59
- package/dist/index62.js.map +1 -1
- package/dist/index63.js +57 -72
- package/dist/index63.js.map +1 -1
- package/dist/index64.js +58 -106
- package/dist/index64.js.map +1 -1
- package/dist/index65.js +70 -43
- package/dist/index65.js.map +1 -1
- package/dist/index66.js +101 -40
- package/dist/index66.js.map +1 -1
- package/dist/index67.js +44 -72
- package/dist/index67.js.map +1 -1
- package/dist/index68.js +47 -53
- package/dist/index68.js.map +1 -1
- package/dist/index69.js +70 -62
- package/dist/index69.js.map +1 -1
- package/dist/index70.js +46 -28
- package/dist/index70.js.map +1 -1
- package/dist/index71.js +67 -13
- package/dist/index71.js.map +1 -1
- package/dist/index72.js +35 -2263
- package/dist/index72.js.map +1 -1
- package/dist/index73.js +17 -0
- package/dist/index73.js.map +1 -0
- package/dist/index74.js +2267 -0
- package/dist/index74.js.map +1 -0
- package/package.json +1 -1
package/dist/index53.js
CHANGED
|
@@ -1,69 +1,40 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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
|
-
"button",
|
|
38
|
-
{
|
|
39
|
-
onClick: s,
|
|
40
|
-
className: "text-sm font-semibold text-slate-600 hover:text-slate-800",
|
|
41
|
-
children: "Skip"
|
|
42
|
-
}
|
|
43
|
-
) : /* @__PURE__ */ e(
|
|
44
|
-
"button",
|
|
45
|
-
{
|
|
46
|
-
onClick: a,
|
|
47
|
-
className: "p-2 rounded-md hover:bg-slate-100 transition-colors",
|
|
48
|
-
"aria-label": "Close",
|
|
49
|
-
children: /* @__PURE__ */ e(u, { className: "w-5 h-5 text-slate-500" })
|
|
50
|
-
}
|
|
51
|
-
) })
|
|
52
|
-
] }),
|
|
53
|
-
/* @__PURE__ */ e("div", { className: "flex-1 overflow-y-auto px-8 py-6", children: n }),
|
|
54
|
-
i.length > 0 && /* @__PURE__ */ e("div", { className: "flex justify-end gap-2 px-8 py-4 border-t border-slate-200", children: i.map((l, m) => /* @__PURE__ */ e(
|
|
55
|
-
N,
|
|
56
|
-
{
|
|
57
|
-
...l,
|
|
58
|
-
children: l.text || l.children
|
|
59
|
-
},
|
|
60
|
-
l.key || l.text || `action-${m}`
|
|
61
|
-
)) })
|
|
62
|
-
]
|
|
63
|
-
}
|
|
64
|
-
) })
|
|
65
|
-
] });
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { cn as c } from "./index3.js";
|
|
3
|
+
const f = {
|
|
4
|
+
start: "items-start",
|
|
5
|
+
center: "items-center",
|
|
6
|
+
end: "items-end",
|
|
7
|
+
stretch: "items-stretch"
|
|
8
|
+
}, u = {
|
|
9
|
+
start: "justify-start",
|
|
10
|
+
center: "justify-center",
|
|
11
|
+
end: "justify-end",
|
|
12
|
+
between: "justify-between",
|
|
13
|
+
around: "justify-around"
|
|
14
|
+
}, y = ({
|
|
15
|
+
children: s,
|
|
16
|
+
height: t = 48,
|
|
17
|
+
className: r,
|
|
18
|
+
gap: e,
|
|
19
|
+
align: n = "center",
|
|
20
|
+
justify: i = "start"
|
|
21
|
+
}) => /* @__PURE__ */ o(
|
|
22
|
+
"div",
|
|
23
|
+
{
|
|
24
|
+
className: c(
|
|
25
|
+
"flex flex-row w-full",
|
|
26
|
+
f[n],
|
|
27
|
+
u[i],
|
|
28
|
+
r
|
|
29
|
+
),
|
|
30
|
+
style: {
|
|
31
|
+
height: typeof t == "number" ? `${t}px` : t,
|
|
32
|
+
gap: e ? `${e}px` : void 0
|
|
33
|
+
},
|
|
34
|
+
children: s
|
|
35
|
+
}
|
|
36
|
+
);
|
|
66
37
|
export {
|
|
67
|
-
|
|
38
|
+
y as Row
|
|
68
39
|
};
|
|
69
40
|
//# sourceMappingURL=index53.js.map
|
package/dist/index53.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index53.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"index53.js","sources":["../src/components/Row/Row.tsx"],"sourcesContent":["import { type ReactNode } from 'react'\nimport { cn } from '@/lib/utils'\n\nexport interface RowProps {\n children: ReactNode\n height?: number | string\n className?: string\n gap?: number\n align?: 'start' | 'center' | 'end' | 'stretch'\n justify?: 'start' | 'center' | 'end' | 'between' | 'around'\n}\n\nconst alignStyles = {\n start: 'items-start',\n center: 'items-center',\n end: 'items-end',\n stretch: 'items-stretch',\n}\n\nconst justifyStyles = {\n start: 'justify-start',\n center: 'justify-center',\n end: 'justify-end',\n between: 'justify-between',\n around: 'justify-around',\n}\n\nexport const Row = ({\n children,\n height = 48,\n className,\n gap,\n align = 'center',\n justify = 'start',\n}: RowProps) => {\n return (\n <div\n className={cn(\n 'flex flex-row w-full',\n alignStyles[align],\n justifyStyles[justify],\n className\n )}\n style={{\n height: typeof height === 'number' ? `${height}px` : height,\n gap: gap ? `${gap}px` : undefined,\n }}\n >\n {children}\n </div>\n )\n}\n"],"names":["alignStyles","justifyStyles","Row","children","height","className","gap","align","justify","jsx","cn"],"mappings":";;AAYA,MAAMA,IAAc;AAAA,EAClB,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,KAAK;AAAA,EACL,SAAS;AACX,GAEMC,IAAgB;AAAA,EACpB,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,KAAK;AAAA,EACL,SAAS;AAAA,EACT,QAAQ;AACV,GAEaC,IAAM,CAAC;AAAA,EAClB,UAAAC;AAAA,EACA,QAAAC,IAAS;AAAA,EACT,WAAAC;AAAA,EACA,KAAAC;AAAA,EACA,OAAAC,IAAQ;AAAA,EACR,SAAAC,IAAU;AACZ,MAEI,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAWC;AAAA,MACT;AAAA,MACAV,EAAYO,CAAK;AAAA,MACjBN,EAAcO,CAAO;AAAA,MACrBH;AAAA,IAAA;AAAA,IAEF,OAAO;AAAA,MACL,QAAQ,OAAOD,KAAW,WAAW,GAAGA,CAAM,OAAOA;AAAA,MACrD,KAAKE,IAAM,GAAGA,CAAG,OAAO;AAAA,IAAA;AAAA,IAGzB,UAAAH;AAAA,EAAA;AAAA;"}
|
package/dist/index54.js
CHANGED
|
@@ -1,25 +1,69 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { jsxs as t, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { Dialog as x, DialogPanel as f, DialogTitle as h } from "@headlessui/react";
|
|
3
|
+
import { cn as b } from "./index3.js";
|
|
4
|
+
import { ArrowLeftIcon as p, XMarkIcon as u } from "@heroicons/react/24/outline";
|
|
5
|
+
import { Button as N } from "./index17.js";
|
|
6
|
+
const k = ({
|
|
7
|
+
isOpen: o,
|
|
8
|
+
onClose: a,
|
|
9
|
+
title: d,
|
|
10
|
+
children: n,
|
|
11
|
+
onBack: r,
|
|
12
|
+
onSkip: s,
|
|
13
|
+
rightActions: i = [],
|
|
14
|
+
className: c
|
|
15
|
+
}) => /* @__PURE__ */ t(x, { open: o, onClose: a, className: "relative z-50", children: [
|
|
16
|
+
/* @__PURE__ */ e("div", { className: "fixed inset-0 bg-black/50", "aria-hidden": "true" }),
|
|
17
|
+
/* @__PURE__ */ e("div", { className: "fixed inset-0 flex items-center justify-center p-4", children: /* @__PURE__ */ t(
|
|
18
|
+
f,
|
|
11
19
|
{
|
|
12
|
-
className:
|
|
13
|
-
"
|
|
14
|
-
|
|
15
|
-
o && "pl-3 border-l-4 border-primary-500",
|
|
16
|
-
t
|
|
20
|
+
className: b(
|
|
21
|
+
"bg-white rounded-lg shadow-xl w-full max-w-2xl max-h-[90vh] flex flex-col overflow-hidden",
|
|
22
|
+
c
|
|
17
23
|
),
|
|
18
|
-
children:
|
|
24
|
+
children: [
|
|
25
|
+
/* @__PURE__ */ t("div", { className: "flex items-center justify-between px-6 py-4 border-b border-slate-200", children: [
|
|
26
|
+
/* @__PURE__ */ e("div", { className: "w-10", children: r && /* @__PURE__ */ e(
|
|
27
|
+
"button",
|
|
28
|
+
{
|
|
29
|
+
onClick: r,
|
|
30
|
+
className: "p-2 rounded-md hover:bg-slate-100 transition-colors",
|
|
31
|
+
"aria-label": "Go back",
|
|
32
|
+
children: /* @__PURE__ */ e(p, { className: "w-5 h-5 text-slate-500" })
|
|
33
|
+
}
|
|
34
|
+
) }),
|
|
35
|
+
/* @__PURE__ */ e(h, { className: "text-lg font-bold text-slate-900 flex-1 text-center", children: d }),
|
|
36
|
+
/* @__PURE__ */ e("div", { className: "w-10 flex justify-end", children: s ? /* @__PURE__ */ e(
|
|
37
|
+
"button",
|
|
38
|
+
{
|
|
39
|
+
onClick: s,
|
|
40
|
+
className: "text-sm font-semibold text-slate-600 hover:text-slate-800",
|
|
41
|
+
children: "Skip"
|
|
42
|
+
}
|
|
43
|
+
) : /* @__PURE__ */ e(
|
|
44
|
+
"button",
|
|
45
|
+
{
|
|
46
|
+
onClick: a,
|
|
47
|
+
className: "p-2 rounded-md hover:bg-slate-100 transition-colors",
|
|
48
|
+
"aria-label": "Close",
|
|
49
|
+
children: /* @__PURE__ */ e(u, { className: "w-5 h-5 text-slate-500" })
|
|
50
|
+
}
|
|
51
|
+
) })
|
|
52
|
+
] }),
|
|
53
|
+
/* @__PURE__ */ e("div", { className: "flex-1 overflow-y-auto px-8 py-6", children: n }),
|
|
54
|
+
i.length > 0 && /* @__PURE__ */ e("div", { className: "flex justify-end gap-2 px-8 py-4 border-t border-slate-200", children: i.map((l, m) => /* @__PURE__ */ e(
|
|
55
|
+
N,
|
|
56
|
+
{
|
|
57
|
+
...l,
|
|
58
|
+
children: l.text || l.children
|
|
59
|
+
},
|
|
60
|
+
l.key || l.text || `action-${m}`
|
|
61
|
+
)) })
|
|
62
|
+
]
|
|
19
63
|
}
|
|
20
|
-
)
|
|
21
|
-
}
|
|
64
|
+
) })
|
|
65
|
+
] });
|
|
22
66
|
export {
|
|
23
|
-
|
|
67
|
+
k as ScrollableModal
|
|
24
68
|
};
|
|
25
69
|
//# sourceMappingURL=index54.js.map
|
package/dist/index54.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index54.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"index54.js","sources":["../src/components/ScrollableModal/ScrollableModal.tsx"],"sourcesContent":["import { type ReactNode } from 'react'\nimport { Dialog, DialogPanel, DialogTitle } from '@headlessui/react'\nimport { cn } from '@/lib/utils'\nimport { XMarkIcon, ArrowLeftIcon } from '@heroicons/react/24/outline'\nimport { Button, type ButtonProps } from '../Button/Button'\n\nexport interface ScrollableModalAction extends Omit<ButtonProps, 'key'> {\n key?: string\n text?: string\n}\n\nexport interface ScrollableModalProps {\n isOpen: boolean\n onClose: () => void\n title?: string\n children: ReactNode\n onBack?: () => void\n onSkip?: () => void\n rightActions?: ScrollableModalAction[]\n className?: string\n}\n\nexport const ScrollableModal = ({\n isOpen,\n onClose,\n title,\n children,\n onBack,\n onSkip,\n rightActions = [],\n className,\n}: ScrollableModalProps) => {\n return (\n <Dialog open={isOpen} onClose={onClose} className=\"relative z-50\">\n {/* Backdrop */}\n <div className=\"fixed inset-0 bg-black/50\" aria-hidden=\"true\" />\n\n {/* Full-screen container */}\n <div className=\"fixed inset-0 flex items-center justify-center p-4\">\n <DialogPanel\n className={cn(\n 'bg-white rounded-lg shadow-xl w-full max-w-2xl max-h-[90vh] flex flex-col overflow-hidden',\n className\n )}\n >\n {/* Header */}\n <div className=\"flex items-center justify-between px-6 py-4 border-b border-slate-200\">\n <div className=\"w-10\">\n {onBack && (\n <button\n onClick={onBack}\n className=\"p-2 rounded-md hover:bg-slate-100 transition-colors\"\n aria-label=\"Go back\"\n >\n <ArrowLeftIcon className=\"w-5 h-5 text-slate-500\" />\n </button>\n )}\n </div>\n\n <DialogTitle className=\"text-lg font-bold text-slate-900 flex-1 text-center\">\n {title}\n </DialogTitle>\n\n <div className=\"w-10 flex justify-end\">\n {onSkip ? (\n <button\n onClick={onSkip}\n className=\"text-sm font-semibold text-slate-600 hover:text-slate-800\"\n >\n Skip\n </button>\n ) : (\n <button\n onClick={onClose}\n className=\"p-2 rounded-md hover:bg-slate-100 transition-colors\"\n aria-label=\"Close\"\n >\n <XMarkIcon className=\"w-5 h-5 text-slate-500\" />\n </button>\n )}\n </div>\n </div>\n\n {/* Scrollable Content */}\n <div className=\"flex-1 overflow-y-auto px-8 py-6\">\n {children}\n </div>\n\n {/* Footer Actions */}\n {rightActions.length > 0 && (\n <div className=\"flex justify-end gap-2 px-8 py-4 border-t border-slate-200\">\n {rightActions.map((action, index) => (\n <Button\n key={action.key || action.text || `action-${index}`}\n {...action}\n >\n {action.text || action.children}\n </Button>\n ))}\n </div>\n )}\n </DialogPanel>\n </div>\n </Dialog>\n )\n}\n"],"names":["ScrollableModal","isOpen","onClose","title","children","onBack","onSkip","rightActions","className","Dialog","jsx","jsxs","DialogPanel","cn","ArrowLeftIcon","DialogTitle","XMarkIcon","action","index","Button"],"mappings":";;;;;AAsBO,MAAMA,IAAkB,CAAC;AAAA,EAC9B,QAAAC;AAAA,EACA,SAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,QAAAC;AAAA,EACA,cAAAC,IAAe,CAAA;AAAA,EACf,WAAAC;AACF,wBAEKC,GAAA,EAAO,MAAMR,GAAQ,SAAAC,GAAkB,WAAU,iBAEhD,UAAA;AAAA,EAAA,gBAAAQ,EAAC,OAAA,EAAI,WAAU,6BAA4B,eAAY,QAAO;AAAA,EAG9D,gBAAAA,EAAC,OAAA,EAAI,WAAU,sDACb,UAAA,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,WAAWC;AAAA,QACT;AAAA,QACAL;AAAA,MAAA;AAAA,MAIF,UAAA;AAAA,QAAA,gBAAAG,EAAC,OAAA,EAAI,WAAU,yEACb,UAAA;AAAA,UAAA,gBA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7
|
-
|
|
8
|
-
value: i,
|
|
9
|
-
onChange: m,
|
|
10
|
-
label: c,
|
|
11
|
-
placeholder: u = "Select an option",
|
|
12
|
-
error: o,
|
|
13
|
-
disabled: d,
|
|
14
|
-
className: p
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { cn as i } from "./index3.js";
|
|
3
|
+
function b({
|
|
4
|
+
children: r,
|
|
5
|
+
withBorder: e = !1,
|
|
6
|
+
leftBorder: o = !1,
|
|
7
|
+
className: t
|
|
15
8
|
}) {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
"relative w-full py-2.5 pl-4 pr-10 text-left text-base",
|
|
25
|
-
"bg-white border rounded-lg cursor-pointer",
|
|
26
|
-
"transition-colors duration-200",
|
|
27
|
-
"focus:outline-none focus:ring-2 focus:ring-offset-0",
|
|
28
|
-
o ? "border-red-500 focus:border-red-500 focus:ring-red-500" : "border-slate-300 focus:border-primary-500 focus:ring-primary-500",
|
|
29
|
-
d && "bg-slate-50 cursor-not-allowed opacity-50"
|
|
30
|
-
),
|
|
31
|
-
children: [
|
|
32
|
-
/* @__PURE__ */ e(
|
|
33
|
-
"span",
|
|
34
|
-
{
|
|
35
|
-
className: t(
|
|
36
|
-
"block truncate",
|
|
37
|
-
!a && "text-slate-400"
|
|
38
|
-
),
|
|
39
|
-
children: (a == null ? void 0 : a.label) || u
|
|
40
|
-
}
|
|
41
|
-
),
|
|
42
|
-
/* @__PURE__ */ e("span", { className: "pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3", children: /* @__PURE__ */ e(
|
|
43
|
-
w,
|
|
44
|
-
{
|
|
45
|
-
className: "h-5 w-5 text-slate-400",
|
|
46
|
-
"aria-hidden": "true"
|
|
47
|
-
}
|
|
48
|
-
) })
|
|
49
|
-
]
|
|
50
|
-
}
|
|
9
|
+
return /* @__PURE__ */ a(
|
|
10
|
+
"h2",
|
|
11
|
+
{
|
|
12
|
+
className: i(
|
|
13
|
+
"text-2xl font-semibold text-slate-900",
|
|
14
|
+
e && "pb-3 border-b-2 border-primary-500",
|
|
15
|
+
o && "pl-3 border-l-4 border-primary-500",
|
|
16
|
+
t
|
|
51
17
|
),
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
as: h,
|
|
56
|
-
leave: "transition ease-in duration-100",
|
|
57
|
-
leaveFrom: "opacity-100",
|
|
58
|
-
leaveTo: "opacity-0",
|
|
59
|
-
children: /* @__PURE__ */ e(
|
|
60
|
-
v,
|
|
61
|
-
{
|
|
62
|
-
className: t(
|
|
63
|
-
"absolute z-10 mt-1 w-full max-h-60 overflow-auto",
|
|
64
|
-
"bg-white rounded-lg border border-slate-200 shadow-lg",
|
|
65
|
-
"py-1 text-base",
|
|
66
|
-
"focus:outline-none"
|
|
67
|
-
),
|
|
68
|
-
children: n.map((r) => /* @__PURE__ */ e(
|
|
69
|
-
N,
|
|
70
|
-
{
|
|
71
|
-
value: r.value,
|
|
72
|
-
disabled: r.disabled,
|
|
73
|
-
className: ({ active: l, selected: b }) => t(
|
|
74
|
-
"relative cursor-pointer select-none py-2.5 pl-10 pr-4",
|
|
75
|
-
"transition-colors duration-150",
|
|
76
|
-
l && "bg-primary-50",
|
|
77
|
-
b && "bg-primary-50 text-primary-900",
|
|
78
|
-
r.disabled && "opacity-50 cursor-not-allowed"
|
|
79
|
-
),
|
|
80
|
-
children: ({ selected: l }) => /* @__PURE__ */ s(f, { children: [
|
|
81
|
-
/* @__PURE__ */ e(
|
|
82
|
-
"span",
|
|
83
|
-
{
|
|
84
|
-
className: t(
|
|
85
|
-
"block truncate",
|
|
86
|
-
l ? "font-semibold" : "font-normal"
|
|
87
|
-
),
|
|
88
|
-
children: r.label
|
|
89
|
-
}
|
|
90
|
-
),
|
|
91
|
-
l && /* @__PURE__ */ e("span", { className: "absolute inset-y-0 left-0 flex items-center pl-3 text-primary-600", children: /* @__PURE__ */ e(k, { className: "h-5 w-5", "aria-hidden": "true" }) })
|
|
92
|
-
] })
|
|
93
|
-
},
|
|
94
|
-
r.value
|
|
95
|
-
))
|
|
96
|
-
}
|
|
97
|
-
)
|
|
98
|
-
}
|
|
99
|
-
)
|
|
100
|
-
] }) }),
|
|
101
|
-
o && /* @__PURE__ */ e("p", { className: "mt-1.5 text-sm text-red-600", children: o })
|
|
102
|
-
] });
|
|
18
|
+
children: r
|
|
19
|
+
}
|
|
20
|
+
);
|
|
103
21
|
}
|
|
104
22
|
export {
|
|
105
|
-
|
|
23
|
+
b as SectionHeading
|
|
106
24
|
};
|
|
107
25
|
//# sourceMappingURL=index55.js.map
|
package/dist/index55.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index55.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"index55.js","sources":["../src/components/Typography/SectionHeading.tsx"],"sourcesContent":["import { cn } from '@/lib/utils'\nimport type { ReactNode } from 'react'\n\nexport interface SectionHeadingProps {\n children: ReactNode\n /** Bottom border accent */\n withBorder?: boolean\n /** Left border accent (RealtorIQ style) */\n leftBorder?: boolean\n className?: string\n}\n\nexport function SectionHeading({\n children,\n withBorder = false,\n leftBorder = false,\n className,\n}: SectionHeadingProps) {\n return (\n <h2\n className={cn(\n 'text-2xl font-semibold text-slate-900',\n withBorder && 'pb-3 border-b-2 border-primary-500',\n leftBorder && 'pl-3 border-l-4 border-primary-500',\n className\n )}\n >\n {children}\n </h2>\n )\n}\n"],"names":["SectionHeading","children","withBorder","leftBorder","className","jsx","cn"],"mappings":";;AAYO,SAASA,EAAe;AAAA,EAC7B,UAAAC;AAAA,EACA,YAAAC,IAAa;AAAA,EACb,YAAAC,IAAa;AAAA,EACb,WAAAC;AACF,GAAwB;AACtB,SACE,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC;AAAA,QACT;AAAA,QACAJ,KAAc;AAAA,QACdC,KAAc;AAAA,QACdC;AAAA,MAAA;AAAA,MAGD,UAAAH;AAAA,IAAA;AAAA,EAAA;AAGP;"}
|
package/dist/index56.js
CHANGED
|
@@ -1,71 +1,107 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { jsxs as s, jsx as e, Fragment as f } from "react/jsx-runtime";
|
|
2
|
+
import { Fragment as h } from "react";
|
|
3
|
+
import { Listbox as x, ListboxButton as g, Transition as y, ListboxOptions as v, ListboxOption as N } from "@headlessui/react";
|
|
4
|
+
import { ChevronUpDownIcon as w, CheckIcon as k } from "@heroicons/react/20/solid";
|
|
5
|
+
import { cn as t } from "./index3.js";
|
|
6
|
+
function S({
|
|
7
|
+
options: n,
|
|
8
|
+
value: i,
|
|
9
|
+
onChange: m,
|
|
10
|
+
label: c,
|
|
11
|
+
placeholder: u = "Select an option",
|
|
12
|
+
error: o,
|
|
13
|
+
disabled: d,
|
|
14
|
+
className: p
|
|
8
15
|
}) {
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
16
|
+
const a = n.find((r) => r.value === i);
|
|
17
|
+
return /* @__PURE__ */ s("div", { className: t("w-full", p), children: [
|
|
18
|
+
c && /* @__PURE__ */ e("label", { className: "block text-sm font-medium text-slate-700 mb-1.5", children: c }),
|
|
19
|
+
/* @__PURE__ */ e(x, { value: i, onChange: m, disabled: d, children: /* @__PURE__ */ s("div", { className: "relative", children: [
|
|
20
|
+
/* @__PURE__ */ s(
|
|
21
|
+
g,
|
|
22
|
+
{
|
|
23
|
+
className: t(
|
|
24
|
+
"relative w-full py-2.5 pl-4 pr-10 text-left text-base",
|
|
25
|
+
"bg-white border rounded-lg cursor-pointer",
|
|
26
|
+
"transition-colors duration-200",
|
|
27
|
+
"focus:outline-none focus:ring-2 focus:ring-offset-0",
|
|
28
|
+
o ? "border-red-500 focus:border-red-500 focus:ring-red-500" : "border-slate-300 focus:border-primary-500 focus:ring-primary-500",
|
|
29
|
+
d && "bg-slate-50 cursor-not-allowed opacity-50"
|
|
30
|
+
),
|
|
31
|
+
children: [
|
|
32
|
+
/* @__PURE__ */ e(
|
|
33
|
+
"span",
|
|
34
|
+
{
|
|
35
|
+
className: t(
|
|
36
|
+
"block truncate",
|
|
37
|
+
!a && "text-slate-400"
|
|
38
|
+
),
|
|
39
|
+
children: (a == null ? void 0 : a.label) || u
|
|
40
|
+
}
|
|
41
|
+
),
|
|
42
|
+
/* @__PURE__ */ e("span", { className: "pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3", children: /* @__PURE__ */ e(
|
|
43
|
+
w,
|
|
44
|
+
{
|
|
45
|
+
className: "h-5 w-5 text-slate-400",
|
|
46
|
+
"aria-hidden": "true"
|
|
47
|
+
}
|
|
48
|
+
) })
|
|
49
|
+
]
|
|
50
|
+
}
|
|
27
51
|
),
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
52
|
+
/* @__PURE__ */ e(
|
|
53
|
+
y,
|
|
54
|
+
{
|
|
55
|
+
as: h,
|
|
56
|
+
leave: "transition ease-in duration-100",
|
|
57
|
+
leaveFrom: "opacity-100",
|
|
58
|
+
leaveTo: "opacity-0",
|
|
59
|
+
children: /* @__PURE__ */ e(
|
|
60
|
+
v,
|
|
61
|
+
{
|
|
62
|
+
className: t(
|
|
63
|
+
"absolute z-10 mt-1 w-full max-h-60 overflow-auto",
|
|
64
|
+
"bg-white rounded-lg border border-slate-200 shadow-lg",
|
|
65
|
+
"py-1 text-base",
|
|
66
|
+
"focus:outline-none"
|
|
67
|
+
),
|
|
68
|
+
children: n.map((r) => /* @__PURE__ */ e(
|
|
69
|
+
N,
|
|
70
|
+
{
|
|
71
|
+
value: r.value,
|
|
72
|
+
disabled: r.disabled,
|
|
73
|
+
className: ({ active: l, selected: b }) => t(
|
|
74
|
+
"relative cursor-pointer select-none py-2.5 pl-10 pr-4",
|
|
75
|
+
"transition-colors duration-150",
|
|
76
|
+
l && "bg-primary-50",
|
|
77
|
+
b && "bg-primary-50 text-primary-900",
|
|
78
|
+
r.disabled && "opacity-50 cursor-not-allowed"
|
|
79
|
+
),
|
|
80
|
+
children: ({ selected: l }) => /* @__PURE__ */ s(f, { children: [
|
|
81
|
+
/* @__PURE__ */ e(
|
|
82
|
+
"span",
|
|
83
|
+
{
|
|
84
|
+
className: t(
|
|
85
|
+
"block truncate",
|
|
86
|
+
l ? "font-semibold" : "font-normal"
|
|
87
|
+
),
|
|
88
|
+
children: r.label
|
|
89
|
+
}
|
|
90
|
+
),
|
|
91
|
+
l && /* @__PURE__ */ e("span", { className: "absolute inset-y-0 left-0 flex items-center pl-3 text-primary-600", children: /* @__PURE__ */ e(k, { className: "h-5 w-5", "aria-hidden": "true" }) })
|
|
92
|
+
] })
|
|
93
|
+
},
|
|
94
|
+
r.value
|
|
95
|
+
))
|
|
96
|
+
}
|
|
97
|
+
)
|
|
98
|
+
}
|
|
99
|
+
)
|
|
100
|
+
] }) }),
|
|
101
|
+
o && /* @__PURE__ */ e("p", { className: "mt-1.5 text-sm text-red-600", children: o })
|
|
63
102
|
] });
|
|
64
103
|
}
|
|
65
104
|
export {
|
|
66
|
-
|
|
67
|
-
s as SkeletonAvatar,
|
|
68
|
-
f as SkeletonCard,
|
|
69
|
-
d as SkeletonText
|
|
105
|
+
S as Select
|
|
70
106
|
};
|
|
71
107
|
//# sourceMappingURL=index56.js.map
|
package/dist/index56.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index56.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"index56.js","sources":["../src/components/Select/Select.tsx"],"sourcesContent":["import { Fragment } from 'react'\nimport {\n Listbox,\n ListboxButton,\n ListboxOptions,\n ListboxOption,\n Transition,\n} from '@headlessui/react'\nimport { CheckIcon, ChevronUpDownIcon } from '@heroicons/react/20/solid'\nimport { cn } from '@/lib/utils'\n\nexport interface SelectOption {\n value: string\n label: string\n disabled?: boolean\n}\n\nexport interface SelectProps {\n options: SelectOption[]\n value?: string\n onChange?: (value: string) => void\n label?: string\n placeholder?: string\n error?: string\n disabled?: boolean\n className?: string\n}\n\nexport function Select({\n options,\n value,\n onChange,\n label,\n placeholder = 'Select an option',\n error,\n disabled,\n className,\n}: SelectProps) {\n const selectedOption = options.find((opt) => opt.value === value)\n\n return (\n <div className={cn('w-full', className)}>\n {label && (\n <label className=\"block text-sm font-medium text-slate-700 mb-1.5\">\n {label}\n </label>\n )}\n <Listbox value={value} onChange={onChange} disabled={disabled}>\n <div className=\"relative\">\n <ListboxButton\n className={cn(\n 'relative w-full py-2.5 pl-4 pr-10 text-left text-base',\n 'bg-white border rounded-lg cursor-pointer',\n 'transition-colors duration-200',\n 'focus:outline-none focus:ring-2 focus:ring-offset-0',\n error\n ? 'border-red-500 focus:border-red-500 focus:ring-red-500'\n : 'border-slate-300 focus:border-primary-500 focus:ring-primary-500',\n disabled && 'bg-slate-50 cursor-not-allowed opacity-50'\n )}\n >\n <span\n className={cn(\n 'block truncate',\n !selectedOption && 'text-slate-400'\n )}\n >\n {selectedOption?.label || placeholder}\n </span>\n <span className=\"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3\">\n <ChevronUpDownIcon\n className=\"h-5 w-5 text-slate-400\"\n aria-hidden=\"true\"\n />\n </span>\n </ListboxButton>\n <Transition\n as={Fragment}\n leave=\"transition ease-in duration-100\"\n leaveFrom=\"opacity-100\"\n leaveTo=\"opacity-0\"\n >\n <ListboxOptions\n className={cn(\n 'absolute z-10 mt-1 w-full max-h-60 overflow-auto',\n 'bg-white rounded-lg border border-slate-200 shadow-lg',\n 'py-1 text-base',\n 'focus:outline-none'\n )}\n >\n {options.map((option) => (\n <ListboxOption\n key={option.value}\n value={option.value}\n disabled={option.disabled}\n className={({ active, selected }) =>\n cn(\n 'relative cursor-pointer select-none py-2.5 pl-10 pr-4',\n 'transition-colors duration-150',\n active && 'bg-primary-50',\n selected && 'bg-primary-50 text-primary-900',\n option.disabled && 'opacity-50 cursor-not-allowed'\n )\n }\n >\n {({ selected }) => (\n <>\n <span\n className={cn(\n 'block truncate',\n selected ? 'font-semibold' : 'font-normal'\n )}\n >\n {option.label}\n </span>\n {selected && (\n <span className=\"absolute inset-y-0 left-0 flex items-center pl-3 text-primary-600\">\n <CheckIcon className=\"h-5 w-5\" aria-hidden=\"true\" />\n </span>\n )}\n </>\n )}\n </ListboxOption>\n ))}\n </ListboxOptions>\n </Transition>\n </div>\n </Listbox>\n {error && <p className=\"mt-1.5 text-sm text-red-600\">{error}</p>}\n </div>\n )\n}\n"],"names":["Select","options","value","onChange","label","placeholder","error","disabled","className","selectedOption","opt","cn","jsx","Listbox","jsxs","ListboxButton","ChevronUpDownIcon","Transition","Fragment","ListboxOptions","option","ListboxOption","active","selected","CheckIcon"],"mappings":";;;;;AA4BO,SAASA,EAAO;AAAA,EACrB,SAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,OAAAC;AAAA,EACA,aAAAC,IAAc;AAAA,EACd,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WA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