@axtec/components 0.1.0
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/Accordion/Accordion.d.ts +12 -0
- package/dist/components/ActionBar/ActionBar.d.ts +10 -0
- package/dist/components/ActionBar/index.d.ts +1 -0
- package/dist/components/ActionLayout/ActionLayout.d.ts +15 -0
- package/dist/components/ActionLayout/index.d.ts +1 -0
- package/dist/components/Alert/Alert.d.ts +9 -0
- package/dist/components/AlertBox/AlertBox.d.ts +15 -0
- package/dist/components/AlertBox/index.d.ts +1 -0
- package/dist/components/AlertModal/AlertModal.d.ts +14 -0
- package/dist/components/AlertModal/index.d.ts +1 -0
- package/dist/components/AutoComplete/AutoComplete.d.ts +17 -0
- package/dist/components/AutoComplete/index.d.ts +1 -0
- package/dist/components/Avatar/Avatar.d.ts +8 -0
- package/dist/components/AvatarCard/AvatarCard.d.ts +27 -0
- package/dist/components/AvatarCard/index.d.ts +1 -0
- package/dist/components/AverageRating/AverageRating.d.ts +8 -0
- package/dist/components/AverageRating/index.d.ts +1 -0
- package/dist/components/Badge/Badge.d.ts +9 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +15 -0
- package/dist/components/Button/Button.d.ts +9 -0
- package/dist/components/ButtonGroup/ButtonGroup.d.ts +11 -0
- package/dist/components/ButtonGroup/index.d.ts +1 -0
- package/dist/components/Card/Card.d.ts +56 -0
- package/dist/components/Checkbox/Checkbox.d.ts +6 -0
- package/dist/components/ConfirmModal/ConfirmModal.d.ts +18 -0
- package/dist/components/ConfirmModal/index.d.ts +1 -0
- package/dist/components/DatePicker/DatePicker.d.ts +13 -0
- package/dist/components/DatePicker/index.d.ts +1 -0
- package/dist/components/Drawer/Drawer.d.ts +10 -0
- package/dist/components/Drawer/index.d.ts +1 -0
- package/dist/components/Dropdown/Dropdown.d.ts +21 -0
- package/dist/components/EmptyData/EmptyData.d.ts +9 -0
- package/dist/components/EmptyData/index.d.ts +1 -0
- package/dist/components/FileUploader/FileUploader.d.ts +10 -0
- package/dist/components/FileUploader/index.d.ts +1 -0
- package/dist/components/IconButton/IconButton.d.ts +7 -0
- package/dist/components/IconButton/index.d.ts +1 -0
- package/dist/components/Image/Image.d.ts +13 -0
- package/dist/components/Image/index.d.ts +1 -0
- package/dist/components/ImageGrid/ImageGrid.d.ts +19 -0
- package/dist/components/ImageGrid/index.d.ts +1 -0
- package/dist/components/ImageUploading/ImageUploading.d.ts +7 -0
- package/dist/components/ImageUploading/index.d.ts +1 -0
- package/dist/components/Input/Input.d.ts +7 -0
- package/dist/components/LinkButton/LinkButton.d.ts +15 -0
- package/dist/components/LinkButton/index.d.ts +1 -0
- package/dist/components/Loader/Loader.d.ts +6 -0
- package/dist/components/LoadingModal/LoadingModal.d.ts +6 -0
- package/dist/components/LoadingModal/index.d.ts +1 -0
- package/dist/components/Logo/AxtecLogo.d.ts +5 -0
- package/dist/components/Logo/MyHomeVaultLogo.d.ts +5 -0
- package/dist/components/Logo/index.d.ts +2 -0
- package/dist/components/LogoLoader/LogoLoader.d.ts +5 -0
- package/dist/components/LogoLoader/index.d.ts +1 -0
- package/dist/components/MenuText/MenuText.d.ts +7 -0
- package/dist/components/MenuText/index.d.ts +1 -0
- package/dist/components/Modal/Modal.d.ts +10 -0
- package/dist/components/MultiItemSelect/MultiItemSelect.d.ts +13 -0
- package/dist/components/MultiItemSelect/index.d.ts +1 -0
- package/dist/components/Notification/Notification.d.ts +11 -0
- package/dist/components/Notification/index.d.ts +1 -0
- package/dist/components/Pagination/Pagination.d.ts +8 -0
- package/dist/components/Panel/Panel.d.ts +40 -0
- package/dist/components/Panel/index.d.ts +1 -0
- package/dist/components/PhotoLibrary/PhotoLibrary.d.ts +14 -0
- package/dist/components/PhotoLibrary/index.d.ts +1 -0
- package/dist/components/Pill/Pill.d.ts +11 -0
- package/dist/components/Pill/index.d.ts +1 -0
- package/dist/components/Progress/Progress.d.ts +10 -0
- package/dist/components/QuickActions/QuickActions.d.ts +8 -0
- package/dist/components/QuickActions/index.d.ts +1 -0
- package/dist/components/RadioGroup/RadioGroup.d.ts +15 -0
- package/dist/components/Rating/Rating.d.ts +11 -0
- package/dist/components/Rating/index.d.ts +1 -0
- package/dist/components/Row/Row.d.ts +10 -0
- package/dist/components/Row/index.d.ts +1 -0
- package/dist/components/ScrollableModal/ScrollableModal.d.ts +17 -0
- package/dist/components/ScrollableModal/index.d.ts +1 -0
- package/dist/components/Select/Select.d.ts +16 -0
- package/dist/components/Skeleton/Skeleton.d.ts +18 -0
- package/dist/components/StatisticsChart/StatisticsChart.d.ts +43 -0
- package/dist/components/StatisticsChart/index.d.ts +1 -0
- package/dist/components/StatisticsLegend/StatisticsLegend.d.ts +22 -0
- package/dist/components/StatisticsLegend/index.d.ts +1 -0
- package/dist/components/StatusIndicator/StatusIndicator.d.ts +21 -0
- package/dist/components/StatusIndicator/index.d.ts +1 -0
- package/dist/components/StepList/StepList.d.ts +8 -0
- package/dist/components/StepList/index.d.ts +1 -0
- package/dist/components/TabView/TabView.d.ts +17 -0
- package/dist/components/TabView/index.d.ts +1 -0
- package/dist/components/Table/Table.d.ts +19 -0
- package/dist/components/Tabs/Tabs.d.ts +16 -0
- package/dist/components/TaskList/TaskList.d.ts +20 -0
- package/dist/components/TaskList/index.d.ts +1 -0
- package/dist/components/Textarea/Textarea.d.ts +7 -0
- package/dist/components/Toggle/Toggle.d.ts +10 -0
- package/dist/components/ToggleButton/ToggleButton.d.ts +8 -0
- package/dist/components/ToggleButton/index.d.ts +1 -0
- package/dist/components/Tooltip/Tooltip.d.ts +9 -0
- package/dist/components/TrendIndicator/TrendIndicator.d.ts +8 -0
- package/dist/components/TrendIndicator/index.d.ts +1 -0
- package/dist/components/Typography/CardHeading.d.ts +6 -0
- package/dist/components/Typography/PageHeading.d.ts +6 -0
- package/dist/components/Typography/SectionHeading.d.ts +10 -0
- package/dist/components/Typography/SubsectionHeading.d.ts +6 -0
- package/dist/components/Typography/Text.d.ts +10 -0
- package/dist/components/Typography/index.d.ts +5 -0
- package/dist/components/index.d.ts +62 -0
- package/dist/index.css +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +153 -0
- package/dist/index.js.map +1 -0
- package/dist/index10.js +104 -0
- package/dist/index10.js.map +1 -0
- package/dist/index11.js +42 -0
- package/dist/index11.js.map +1 -0
- package/dist/index12.js +82 -0
- package/dist/index12.js.map +1 -0
- package/dist/index13.js +28 -0
- package/dist/index13.js.map +1 -0
- package/dist/index14.js +22 -0
- package/dist/index14.js.map +1 -0
- package/dist/index15.js +42 -0
- package/dist/index15.js.map +1 -0
- package/dist/index16.js +76 -0
- package/dist/index16.js.map +1 -0
- package/dist/index17.js +53 -0
- package/dist/index17.js.map +1 -0
- package/dist/index18.js +16 -0
- package/dist/index18.js.map +1 -0
- package/dist/index19.js +157 -0
- package/dist/index19.js.map +1 -0
- package/dist/index20.js +21 -0
- package/dist/index20.js.map +1 -0
- package/dist/index21.js +49 -0
- package/dist/index21.js.map +1 -0
- package/dist/index22.js +53 -0
- package/dist/index22.js.map +1 -0
- package/dist/index23.js +82 -0
- package/dist/index23.js.map +1 -0
- package/dist/index24.js +223 -0
- package/dist/index24.js.map +1 -0
- package/dist/index25.js +55 -0
- package/dist/index25.js.map +1 -0
- package/dist/index26.js +81 -0
- package/dist/index26.js.map +1 -0
- package/dist/index27.js +27 -0
- package/dist/index27.js.map +1 -0
- package/dist/index28.js +81 -0
- package/dist/index28.js.map +1 -0
- package/dist/index29.js +36 -0
- package/dist/index29.js.map +1 -0
- package/dist/index3.js +9 -0
- package/dist/index3.js.map +1 -0
- package/dist/index30.js +95 -0
- package/dist/index30.js.map +1 -0
- package/dist/index31.js +63 -0
- package/dist/index31.js.map +1 -0
- package/dist/index32.js +48 -0
- package/dist/index32.js.map +1 -0
- package/dist/index33.js +51 -0
- package/dist/index33.js.map +1 -0
- package/dist/index34.js +55 -0
- package/dist/index34.js.map +1 -0
- package/dist/index35.js +31 -0
- package/dist/index35.js.map +1 -0
- package/dist/index36.js +57 -0
- package/dist/index36.js.map +1 -0
- package/dist/index37.js +52 -0
- package/dist/index37.js.map +1 -0
- package/dist/index38.js +16 -0
- package/dist/index38.js.map +1 -0
- package/dist/index39.js +85 -0
- package/dist/index39.js.map +1 -0
- package/dist/index4.js +36 -0
- package/dist/index4.js.map +1 -0
- package/dist/index40.js +52 -0
- package/dist/index40.js.map +1 -0
- package/dist/index41.js +22 -0
- package/dist/index41.js.map +1 -0
- package/dist/index42.js +37 -0
- package/dist/index42.js.map +1 -0
- package/dist/index43.js +18 -0
- package/dist/index43.js.map +1 -0
- package/dist/index44.js +94 -0
- package/dist/index44.js.map +1 -0
- package/dist/index45.js +72 -0
- package/dist/index45.js.map +1 -0
- package/dist/index46.js +125 -0
- package/dist/index46.js.map +1 -0
- package/dist/index47.js +43 -0
- package/dist/index47.js.map +1 -0
- package/dist/index48.js +59 -0
- package/dist/index48.js.map +1 -0
- package/dist/index49.js +19 -0
- package/dist/index49.js.map +1 -0
- package/dist/index5.js +24 -0
- package/dist/index5.js.map +1 -0
- package/dist/index50.js +68 -0
- package/dist/index50.js.map +1 -0
- package/dist/index51.js +57 -0
- package/dist/index51.js.map +1 -0
- package/dist/index52.js +40 -0
- package/dist/index52.js.map +1 -0
- package/dist/index53.js +69 -0
- package/dist/index53.js.map +1 -0
- package/dist/index54.js +25 -0
- package/dist/index54.js.map +1 -0
- package/dist/index55.js +107 -0
- package/dist/index55.js.map +1 -0
- package/dist/index56.js +71 -0
- package/dist/index56.js.map +1 -0
- package/dist/index57.js +239 -0
- package/dist/index57.js.map +1 -0
- package/dist/index58.js +105 -0
- package/dist/index58.js.map +1 -0
- package/dist/index59.js +39 -0
- package/dist/index59.js.map +1 -0
- package/dist/index6.js +47 -0
- package/dist/index6.js.map +1 -0
- package/dist/index60.js +21 -0
- package/dist/index60.js.map +1 -0
- package/dist/index61.js +63 -0
- package/dist/index61.js.map +1 -0
- package/dist/index62.js +64 -0
- package/dist/index62.js.map +1 -0
- package/dist/index63.js +78 -0
- package/dist/index63.js.map +1 -0
- package/dist/index64.js +112 -0
- package/dist/index64.js.map +1 -0
- package/dist/index65.js +43 -0
- package/dist/index65.js.map +1 -0
- package/dist/index66.js +51 -0
- package/dist/index66.js.map +1 -0
- package/dist/index67.js +79 -0
- package/dist/index67.js.map +1 -0
- package/dist/index68.js +57 -0
- package/dist/index68.js.map +1 -0
- package/dist/index69.js +71 -0
- package/dist/index69.js.map +1 -0
- package/dist/index7.js +80 -0
- package/dist/index7.js.map +1 -0
- package/dist/index70.js +39 -0
- package/dist/index70.js.map +1 -0
- package/dist/index71.js +17 -0
- package/dist/index71.js.map +1 -0
- package/dist/index72.js +2267 -0
- package/dist/index72.js.map +1 -0
- package/dist/index8.js +82 -0
- package/dist/index8.js.map +1 -0
- package/dist/index9.js +97 -0
- package/dist/index9.js.map +1 -0
- package/dist/lib/utils.d.ts +2 -0
- package/dist/logos/axtec-logo.png +0 -0
- package/dist/logos/mhv-icon.svg +5 -0
- package/dist/logos/mhv-logo.png +0 -0
- package/dist/logos/mhv-logo.svg +23 -0
- package/package.json +63 -0
package/dist/index48.js
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { jsxs as a, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { cn as i } from "./index3.js";
|
|
3
|
+
const c = {
|
|
4
|
+
sm: "h-1.5",
|
|
5
|
+
md: "h-2.5",
|
|
6
|
+
lg: "h-4"
|
|
7
|
+
}, u = {
|
|
8
|
+
default: "bg-primary-500",
|
|
9
|
+
success: "bg-green-500",
|
|
10
|
+
warning: "bg-yellow-500",
|
|
11
|
+
danger: "bg-red-500"
|
|
12
|
+
};
|
|
13
|
+
function g({
|
|
14
|
+
value: t,
|
|
15
|
+
max: r = 100,
|
|
16
|
+
size: d = "md",
|
|
17
|
+
variant: o = "default",
|
|
18
|
+
showLabel: l = !1,
|
|
19
|
+
label: e,
|
|
20
|
+
className: m
|
|
21
|
+
}) {
|
|
22
|
+
const n = Math.min(Math.max(t / r * 100, 0), 100);
|
|
23
|
+
return /* @__PURE__ */ a("div", { className: m, children: [
|
|
24
|
+
(l || e) && /* @__PURE__ */ a("div", { className: "flex justify-between mb-1.5", children: [
|
|
25
|
+
e && /* @__PURE__ */ s("span", { className: "text-sm font-medium text-slate-700", children: e }),
|
|
26
|
+
l && /* @__PURE__ */ a("span", { className: "text-sm text-slate-500", children: [
|
|
27
|
+
Math.round(n),
|
|
28
|
+
"%"
|
|
29
|
+
] })
|
|
30
|
+
] }),
|
|
31
|
+
/* @__PURE__ */ s(
|
|
32
|
+
"div",
|
|
33
|
+
{
|
|
34
|
+
className: i(
|
|
35
|
+
"w-full bg-slate-200 rounded-full overflow-hidden",
|
|
36
|
+
c[d]
|
|
37
|
+
),
|
|
38
|
+
role: "progressbar",
|
|
39
|
+
"aria-valuenow": t,
|
|
40
|
+
"aria-valuemin": 0,
|
|
41
|
+
"aria-valuemax": r,
|
|
42
|
+
children: /* @__PURE__ */ s(
|
|
43
|
+
"div",
|
|
44
|
+
{
|
|
45
|
+
className: i(
|
|
46
|
+
"h-full rounded-full transition-all duration-300 ease-out",
|
|
47
|
+
u[o]
|
|
48
|
+
),
|
|
49
|
+
style: { width: `${n}%` }
|
|
50
|
+
}
|
|
51
|
+
)
|
|
52
|
+
}
|
|
53
|
+
)
|
|
54
|
+
] });
|
|
55
|
+
}
|
|
56
|
+
export {
|
|
57
|
+
g as Progress
|
|
58
|
+
};
|
|
59
|
+
//# sourceMappingURL=index48.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index48.js","sources":["../src/components/Progress/Progress.tsx"],"sourcesContent":["import { cn } from '@/lib/utils'\n\nexport interface ProgressProps {\n value: number\n max?: number\n size?: 'sm' | 'md' | 'lg'\n variant?: 'default' | 'success' | 'warning' | 'danger'\n showLabel?: boolean\n label?: string\n className?: string\n}\n\nconst sizeStyles = {\n sm: 'h-1.5',\n md: 'h-2.5',\n lg: 'h-4',\n}\n\nconst variantStyles = {\n default: 'bg-primary-500',\n success: 'bg-green-500',\n warning: 'bg-yellow-500',\n danger: 'bg-red-500',\n}\n\nexport function Progress({\n value,\n max = 100,\n size = 'md',\n variant = 'default',\n showLabel = false,\n label,\n className,\n}: ProgressProps) {\n const percentage = Math.min(Math.max((value / max) * 100, 0), 100)\n\n return (\n <div className={className}>\n {(showLabel || label) && (\n <div className=\"flex justify-between mb-1.5\">\n {label && (\n <span className=\"text-sm font-medium text-slate-700\">{label}</span>\n )}\n {showLabel && (\n <span className=\"text-sm text-slate-500\">{Math.round(percentage)}%</span>\n )}\n </div>\n )}\n <div\n className={cn(\n 'w-full bg-slate-200 rounded-full overflow-hidden',\n sizeStyles[size]\n )}\n role=\"progressbar\"\n aria-valuenow={value}\n aria-valuemin={0}\n aria-valuemax={max}\n >\n <div\n className={cn(\n 'h-full rounded-full transition-all duration-300 ease-out',\n variantStyles[variant]\n )}\n style={{ width: `${percentage}%` }}\n />\n </div>\n </div>\n )\n}\n"],"names":["sizeStyles","variantStyles","Progress","value","max","size","variant","showLabel","label","className","percentage","jsxs","jsx","cn"],"mappings":";;AAYA,MAAMA,IAAa;AAAA,EACjB,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN,GAEMC,IAAgB;AAAA,EACpB,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,QAAQ;AACV;AAEO,SAASC,EAAS;AAAA,EACvB,OAAAC;AAAA,EACA,KAAAC,IAAM;AAAA,EACN,MAAAC,IAAO;AAAA,EACP,SAAAC,IAAU;AAAA,EACV,WAAAC,IAAY;AAAA,EACZ,OAAAC;AAAA,EACA,WAAAC;AACF,GAAkB;AAChB,QAAMC,IAAa,KAAK,IAAI,KAAK,IAAKP,IAAQC,IAAO,KAAK,CAAC,GAAG,GAAG;AAEjE,SACE,gBAAAO,EAAC,SAAI,WAAAF,GACD,UAAA;AAAA,KAAAF,KAAaC,MACb,gBAAAG,EAAC,OAAA,EAAI,WAAU,+BACZ,UAAA;AAAA,MAAAH,KACC,gBAAAI,EAAC,QAAA,EAAK,WAAU,sCAAsC,UAAAJ,GAAM;AAAA,MAE7DD,KACC,gBAAAI,EAAC,QAAA,EAAK,WAAU,0BAA0B,UAAA;AAAA,QAAA,KAAK,MAAMD,CAAU;AAAA,QAAE;AAAA,MAAA,EAAA,CAAC;AAAA,IAAA,GAEtE;AAAA,IAEF,gBAAAE;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,WAAWC;AAAA,UACT;AAAA,UACAb,EAAWK,CAAI;AAAA,QAAA;AAAA,QAEjB,MAAK;AAAA,QACL,iBAAeF;AAAA,QACf,iBAAe;AAAA,QACf,iBAAeC;AAAA,QAEf,UAAA,gBAAAQ;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,WAAWC;AAAA,cACT;AAAA,cACAZ,EAAcK,CAAO;AAAA,YAAA;AAAA,YAEvB,OAAO,EAAE,OAAO,GAAGI,CAAU,IAAA;AAAA,UAAI;AAAA,QAAA;AAAA,MACnC;AAAA,IAAA;AAAA,EACF,GACF;AAEJ;"}
|
package/dist/index49.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import { cn as s } from "./index3.js";
|
|
3
|
+
const p = ({
|
|
4
|
+
children: t,
|
|
5
|
+
bottom: o = 60,
|
|
6
|
+
right: r = 18,
|
|
7
|
+
className: i
|
|
8
|
+
}) => /* @__PURE__ */ m(
|
|
9
|
+
"div",
|
|
10
|
+
{
|
|
11
|
+
className: s("fixed z-10", i),
|
|
12
|
+
style: { bottom: `${o}px`, right: `${r}px` },
|
|
13
|
+
children: t
|
|
14
|
+
}
|
|
15
|
+
);
|
|
16
|
+
export {
|
|
17
|
+
p as QuickActions
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=index49.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index49.js","sources":["../src/components/QuickActions/QuickActions.tsx"],"sourcesContent":["import { type ReactNode } from 'react'\nimport { cn } from '@/lib/utils'\n\nexport interface QuickActionsProps {\n children: ReactNode\n bottom?: number\n right?: number\n className?: string\n}\n\nexport const QuickActions = ({\n children,\n bottom = 60,\n right = 18,\n className,\n}: QuickActionsProps) => {\n return (\n <div\n className={cn('fixed z-10', className)}\n style={{ bottom: `${bottom}px`, right: `${right}px` }}\n >\n {children}\n </div>\n )\n}\n"],"names":["QuickActions","children","bottom","right","className","jsx","cn"],"mappings":";;AAUO,MAAMA,IAAe,CAAC;AAAA,EAC3B,UAAAC;AAAA,EACA,QAAAC,IAAS;AAAA,EACT,OAAAC,IAAQ;AAAA,EACR,WAAAC;AACF,MAEI,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAWC,EAAG,cAAcF,CAAS;AAAA,IACrC,OAAO,EAAE,QAAQ,GAAGF,CAAM,MAAM,OAAO,GAAGC,CAAK,KAAA;AAAA,IAE9C,UAAAF;AAAA,EAAA;AAAA;"}
|
package/dist/index5.js
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsxs as o, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { cn as c } from "./index3.js";
|
|
3
|
+
import { Button as s } from "./index17.js";
|
|
4
|
+
const d = ({
|
|
5
|
+
leftActions: a = [],
|
|
6
|
+
rightActions: i = [],
|
|
7
|
+
className: m
|
|
8
|
+
}) => /* @__PURE__ */ o(
|
|
9
|
+
"div",
|
|
10
|
+
{
|
|
11
|
+
className: c(
|
|
12
|
+
"flex items-center justify-between border-t border-slate-200 h-[70px] px-8",
|
|
13
|
+
m
|
|
14
|
+
),
|
|
15
|
+
children: [
|
|
16
|
+
/* @__PURE__ */ e("div", { className: "flex gap-2", children: a.map(({ key: r, ...t }) => /* @__PURE__ */ e(s, { ...t }, r)) }),
|
|
17
|
+
/* @__PURE__ */ e("div", { className: "flex gap-2", children: i.map(({ key: r, ...t }) => /* @__PURE__ */ e(s, { ...t }, r)) })
|
|
18
|
+
]
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
export {
|
|
22
|
+
d as ActionBar
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=index5.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index5.js","sources":["../src/components/ActionBar/ActionBar.tsx"],"sourcesContent":["import { cn } from '@/lib/utils'\nimport { Button, type ButtonProps } from '../Button/Button'\n\nexport interface ActionBarAction extends Omit<ButtonProps, 'key'> {\n key: string\n}\n\nexport interface ActionBarProps {\n leftActions?: ActionBarAction[]\n rightActions?: ActionBarAction[]\n className?: string\n}\n\nexport const ActionBar = ({\n leftActions = [],\n rightActions = [],\n className,\n}: ActionBarProps) => {\n return (\n <div\n className={cn(\n 'flex items-center justify-between border-t border-slate-200 h-[70px] px-8',\n className\n )}\n >\n <div className=\"flex gap-2\">\n {leftActions.map(({ key, ...action }) => (\n <Button key={key} {...action} />\n ))}\n </div>\n <div className=\"flex gap-2\">\n {rightActions.map(({ key, ...action }) => (\n <Button key={key} {...action} />\n ))}\n </div>\n </div>\n )\n}\n"],"names":["ActionBar","leftActions","rightActions","className","jsxs","cn","jsx","key","action","Button"],"mappings":";;;AAaO,MAAMA,IAAY,CAAC;AAAA,EACxB,aAAAC,IAAc,CAAA;AAAA,EACd,cAAAC,IAAe,CAAA;AAAA,EACf,WAAAC;AACF,MAEI,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAWC;AAAA,MACT;AAAA,MACAF;AAAA,IAAA;AAAA,IAGF,UAAA;AAAA,MAAA,gBAAAG,EAAC,SAAI,WAAU,cACZ,UAAAL,EAAY,IAAI,CAAC,EAAE,KAAAM,GAAK,GAAGC,EAAA,MAC1B,gBAAAF,EAACG,GAAA,EAAkB,GAAGD,KAATD,CAAiB,CAC/B,GACH;AAAA,wBACC,OAAA,EAAI,WAAU,cACZ,UAAAL,EAAa,IAAI,CAAC,EAAE,KAAAK,GAAK,GAAGC,EAAA,MAC3B,gBAAAF,EAACG,GAAA,EAAkB,GAAGD,EAAA,GAATD,CAAiB,CAC/B,EAAA,CACH;AAAA,IAAA;AAAA,EAAA;AAAA;"}
|
package/dist/index50.js
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { jsx as r, jsxs as s } from "react/jsx-runtime";
|
|
2
|
+
import { cn as c } from "./index3.js";
|
|
3
|
+
function o({
|
|
4
|
+
options: d,
|
|
5
|
+
value: l,
|
|
6
|
+
onChange: a,
|
|
7
|
+
name: i,
|
|
8
|
+
orientation: t = "vertical",
|
|
9
|
+
className: m
|
|
10
|
+
}) {
|
|
11
|
+
return /* @__PURE__ */ r(
|
|
12
|
+
"div",
|
|
13
|
+
{
|
|
14
|
+
className: c(
|
|
15
|
+
"flex gap-3",
|
|
16
|
+
t === "vertical" ? "flex-col" : "flex-row flex-wrap",
|
|
17
|
+
m
|
|
18
|
+
),
|
|
19
|
+
role: "radiogroup",
|
|
20
|
+
children: d.map((e) => /* @__PURE__ */ s(
|
|
21
|
+
"label",
|
|
22
|
+
{
|
|
23
|
+
className: c(
|
|
24
|
+
"flex items-start gap-3 cursor-pointer group",
|
|
25
|
+
e.disabled && "opacity-50 cursor-not-allowed"
|
|
26
|
+
),
|
|
27
|
+
children: [
|
|
28
|
+
/* @__PURE__ */ s("div", { className: "relative flex-shrink-0 mt-0.5", children: [
|
|
29
|
+
/* @__PURE__ */ r(
|
|
30
|
+
"input",
|
|
31
|
+
{
|
|
32
|
+
type: "radio",
|
|
33
|
+
name: i,
|
|
34
|
+
value: e.value,
|
|
35
|
+
checked: l === e.value,
|
|
36
|
+
onChange: () => a == null ? void 0 : a(e.value),
|
|
37
|
+
disabled: e.disabled,
|
|
38
|
+
className: "peer sr-only"
|
|
39
|
+
}
|
|
40
|
+
),
|
|
41
|
+
/* @__PURE__ */ r(
|
|
42
|
+
"div",
|
|
43
|
+
{
|
|
44
|
+
className: c(
|
|
45
|
+
"h-5 w-5 rounded-full border-2 transition-colors duration-200",
|
|
46
|
+
"flex items-center justify-center",
|
|
47
|
+
"peer-focus:ring-2 peer-focus:ring-primary-500 peer-focus:ring-offset-2",
|
|
48
|
+
l === e.value ? "border-primary-500" : "border-slate-300 group-hover:border-slate-400"
|
|
49
|
+
),
|
|
50
|
+
children: l === e.value && /* @__PURE__ */ r("div", { className: "h-2.5 w-2.5 rounded-full bg-primary-500" })
|
|
51
|
+
}
|
|
52
|
+
)
|
|
53
|
+
] }),
|
|
54
|
+
/* @__PURE__ */ s("div", { className: "flex flex-col", children: [
|
|
55
|
+
/* @__PURE__ */ r("span", { className: "text-sm font-medium text-slate-900", children: e.label }),
|
|
56
|
+
e.description && /* @__PURE__ */ r("span", { className: "text-sm text-slate-500", children: e.description })
|
|
57
|
+
] })
|
|
58
|
+
]
|
|
59
|
+
},
|
|
60
|
+
e.value
|
|
61
|
+
))
|
|
62
|
+
}
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
export {
|
|
66
|
+
o as RadioGroup
|
|
67
|
+
};
|
|
68
|
+
//# sourceMappingURL=index50.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index50.js","sources":["../src/components/RadioGroup/RadioGroup.tsx"],"sourcesContent":["import { cn } from '@/lib/utils'\n\nexport interface RadioOption {\n value: string\n label: string\n description?: string\n disabled?: boolean\n}\n\nexport interface RadioGroupProps {\n options: RadioOption[]\n value?: string\n onChange?: (value: string) => void\n name: string\n orientation?: 'horizontal' | 'vertical'\n className?: string\n}\n\nexport function RadioGroup({\n options,\n value,\n onChange,\n name,\n orientation = 'vertical',\n className,\n}: RadioGroupProps) {\n return (\n <div\n className={cn(\n 'flex gap-3',\n orientation === 'vertical' ? 'flex-col' : 'flex-row flex-wrap',\n className\n )}\n role=\"radiogroup\"\n >\n {options.map((option) => (\n <label\n key={option.value}\n className={cn(\n 'flex items-start gap-3 cursor-pointer group',\n option.disabled && 'opacity-50 cursor-not-allowed'\n )}\n >\n <div className=\"relative flex-shrink-0 mt-0.5\">\n <input\n type=\"radio\"\n name={name}\n value={option.value}\n checked={value === option.value}\n onChange={() => onChange?.(option.value)}\n disabled={option.disabled}\n className=\"peer sr-only\"\n />\n <div\n className={cn(\n 'h-5 w-5 rounded-full border-2 transition-colors duration-200',\n 'flex items-center justify-center',\n 'peer-focus:ring-2 peer-focus:ring-primary-500 peer-focus:ring-offset-2',\n value === option.value\n ? 'border-primary-500'\n : 'border-slate-300 group-hover:border-slate-400'\n )}\n >\n {value === option.value && (\n <div className=\"h-2.5 w-2.5 rounded-full bg-primary-500\" />\n )}\n </div>\n </div>\n <div className=\"flex flex-col\">\n <span className=\"text-sm font-medium text-slate-900\">\n {option.label}\n </span>\n {option.description && (\n <span className=\"text-sm text-slate-500\">{option.description}</span>\n )}\n </div>\n </label>\n ))}\n </div>\n )\n}\n"],"names":["RadioGroup","options","value","onChange","name","orientation","className","jsx","cn","option","jsxs"],"mappings":";;AAkBO,SAASA,EAAW;AAAA,EACzB,SAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,MAAAC;AAAA,EACA,aAAAC,IAAc;AAAA,EACd,WAAAC;AACF,GAAoB;AAClB,SACE,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC;AAAA,QACT;AAAA,QACAH,MAAgB,aAAa,aAAa;AAAA,QAC1CC;AAAA,MAAA;AAAA,MAEF,MAAK;AAAA,MAEJ,UAAAL,EAAQ,IAAI,CAACQ,MACZ,gBAAAC;AAAA,QAAC;AAAA,QAAA;AAAA,UAEC,WAAWF;AAAA,YACT;AAAA,YACAC,EAAO,YAAY;AAAA,UAAA;AAAA,UAGrB,UAAA;AAAA,YAAA,gBAAAC,EAAC,OAAA,EAAI,WAAU,iCACb,UAAA;AAAA,cAAA,gBAAAH;AAAA,gBAAC;AAAA,gBAAA;AAAA,kBACC,MAAK;AAAA,kBACL,MAAAH;AAAA,kBACA,OAAOK,EAAO;AAAA,kBACd,SAASP,MAAUO,EAAO;AAAA,kBAC1B,UAAU,MAAMN,KAAA,gBAAAA,EAAWM,EAAO;AAAA,kBAClC,UAAUA,EAAO;AAAA,kBACjB,WAAU;AAAA,gBAAA;AAAA,cAAA;AAAA,cAEZ,gBAAAF;AAAA,gBAAC;AAAA,gBAAA;AAAA,kBACC,WAAWC;AAAA,oBACT;AAAA,oBACA;AAAA,oBACA;AAAA,oBACAN,MAAUO,EAAO,QACb,uBACA;AAAA,kBAAA;AAAA,kBAGL,gBAAUA,EAAO,SAChB,gBAAAF,EAAC,OAAA,EAAI,WAAU,0CAAA,CAA0C;AAAA,gBAAA;AAAA,cAAA;AAAA,YAE7D,GACF;AAAA,YACA,gBAAAG,EAAC,OAAA,EAAI,WAAU,iBACb,UAAA;AAAA,cAAA,gBAAAH,EAAC,QAAA,EAAK,WAAU,sCACb,UAAAE,EAAO,OACV;AAAA,cACCA,EAAO,eACN,gBAAAF,EAAC,UAAK,WAAU,0BAA0B,YAAO,YAAA,CAAY;AAAA,YAAA,EAAA,CAEjE;AAAA,UAAA;AAAA,QAAA;AAAA,QAtCKE,EAAO;AAAA,MAAA,CAwCf;AAAA,IAAA;AAAA,EAAA;AAGP;"}
|
package/dist/index51.js
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { jsxs as S, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { useState as M } from "react";
|
|
3
|
+
import { cn as r } from "./index3.js";
|
|
4
|
+
import { StarIcon as V } from "@heroicons/react/24/solid";
|
|
5
|
+
import { StarIcon as w } from "@heroicons/react/24/outline";
|
|
6
|
+
const y = {
|
|
7
|
+
sm: "w-4 h-4",
|
|
8
|
+
md: "w-6 h-6",
|
|
9
|
+
lg: "w-8 h-8"
|
|
10
|
+
}, E = ({
|
|
11
|
+
value: d = 0,
|
|
12
|
+
onChange: n,
|
|
13
|
+
max: a = 5,
|
|
14
|
+
size: p = "md",
|
|
15
|
+
readonly: t = !1,
|
|
16
|
+
label: l,
|
|
17
|
+
error: c,
|
|
18
|
+
className: h
|
|
19
|
+
}) => {
|
|
20
|
+
const [i, m] = M(null), x = (s) => {
|
|
21
|
+
!t && n && n(s);
|
|
22
|
+
}, b = (s) => {
|
|
23
|
+
t || m(s);
|
|
24
|
+
}, g = () => {
|
|
25
|
+
m(null);
|
|
26
|
+
}, v = i !== null ? i : d, u = y[p];
|
|
27
|
+
return /* @__PURE__ */ S("div", { className: r("flex flex-col", h), children: [
|
|
28
|
+
l && /* @__PURE__ */ e("span", { className: "text-sm font-semibold text-slate-700 mb-2", children: l }),
|
|
29
|
+
/* @__PURE__ */ e("div", { className: "flex items-center gap-1", children: Array.from({ length: a }, (s, f) => {
|
|
30
|
+
const o = f + 1, N = o <= v;
|
|
31
|
+
return /* @__PURE__ */ e(
|
|
32
|
+
"button",
|
|
33
|
+
{
|
|
34
|
+
type: "button",
|
|
35
|
+
onClick: () => x(o),
|
|
36
|
+
onMouseEnter: () => b(o),
|
|
37
|
+
onMouseLeave: g,
|
|
38
|
+
disabled: t,
|
|
39
|
+
className: r(
|
|
40
|
+
"p-0 border-0 bg-transparent",
|
|
41
|
+
t ? "cursor-default" : "cursor-pointer",
|
|
42
|
+
"transition-transform hover:scale-110",
|
|
43
|
+
"focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-1 rounded"
|
|
44
|
+
),
|
|
45
|
+
"aria-label": `Rate ${o} out of ${a}`,
|
|
46
|
+
children: N ? /* @__PURE__ */ e(V, { className: r(u, "text-primary-500") }) : /* @__PURE__ */ e(w, { className: r(u, "text-slate-300") })
|
|
47
|
+
},
|
|
48
|
+
f
|
|
49
|
+
);
|
|
50
|
+
}) }),
|
|
51
|
+
c && /* @__PURE__ */ e("span", { className: "text-sm text-red-500 mt-1", children: c })
|
|
52
|
+
] });
|
|
53
|
+
};
|
|
54
|
+
export {
|
|
55
|
+
E as Rating
|
|
56
|
+
};
|
|
57
|
+
//# sourceMappingURL=index51.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index51.js","sources":["../src/components/Rating/Rating.tsx"],"sourcesContent":["import { useState } from 'react'\nimport { cn } from '@/lib/utils'\nimport { StarIcon as StarSolid } from '@heroicons/react/24/solid'\nimport { StarIcon as StarOutline } from '@heroicons/react/24/outline'\n\nexport interface RatingProps {\n value?: number\n onChange?: (rating: number) => void\n max?: number\n size?: 'sm' | 'md' | 'lg'\n readonly?: boolean\n label?: string\n error?: string\n className?: string\n}\n\nconst sizeStyles = {\n sm: 'w-4 h-4',\n md: 'w-6 h-6',\n lg: 'w-8 h-8',\n}\n\nexport const Rating = ({\n value = 0,\n onChange,\n max = 5,\n size = 'md',\n readonly = false,\n label,\n error,\n className,\n}: RatingProps) => {\n const [hoverValue, setHoverValue] = useState<number | null>(null)\n\n const handleClick = (rating: number) => {\n if (!readonly && onChange) {\n onChange(rating)\n }\n }\n\n const handleMouseEnter = (rating: number) => {\n if (!readonly) {\n setHoverValue(rating)\n }\n }\n\n const handleMouseLeave = () => {\n setHoverValue(null)\n }\n\n const displayValue = hoverValue !== null ? hoverValue : value\n const iconClass = sizeStyles[size]\n\n return (\n <div className={cn('flex flex-col', className)}>\n {label && (\n <span className=\"text-sm font-semibold text-slate-700 mb-2\">\n {label}\n </span>\n )}\n <div className=\"flex items-center gap-1\">\n {Array.from({ length: max }, (_, index) => {\n const starValue = index + 1\n const isFilled = starValue <= displayValue\n\n return (\n <button\n key={index}\n type=\"button\"\n onClick={() => handleClick(starValue)}\n onMouseEnter={() => handleMouseEnter(starValue)}\n onMouseLeave={handleMouseLeave}\n disabled={readonly}\n className={cn(\n 'p-0 border-0 bg-transparent',\n readonly ? 'cursor-default' : 'cursor-pointer',\n 'transition-transform hover:scale-110',\n 'focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-1 rounded'\n )}\n aria-label={`Rate ${starValue} out of ${max}`}\n >\n {isFilled ? (\n <StarSolid className={cn(iconClass, 'text-primary-500')} />\n ) : (\n <StarOutline className={cn(iconClass, 'text-slate-300')} />\n )}\n </button>\n )\n })}\n </div>\n {error && (\n <span className=\"text-sm text-red-500 mt-1\">{error}</span>\n )}\n </div>\n )\n}\n"],"names":["sizeStyles","Rating","value","onChange","max","size","readonly","label","error","className","hoverValue","setHoverValue","useState","handleClick","rating","handleMouseEnter","handleMouseLeave","displayValue","iconClass","cn","jsx","_","index","starValue","isFilled","StarSolid","StarOutline"],"mappings":";;;;;AAgBA,MAAMA,IAAa;AAAA,EACjB,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN,GAEaC,IAAS,CAAC;AAAA,EACrB,OAAAC,IAAQ;AAAA,EACR,UAAAC;AAAA,EACA,KAAAC,IAAM;AAAA,EACN,MAAAC,IAAO;AAAA,EACP,UAAAC,IAAW;AAAA,EACX,OAAAC;AAAA,EACA,OAAAC;AAAA,EACA,WAAAC;AACF,MAAmB;AACjB,QAAM,CAACC,GAAYC,CAAa,IAAIC,EAAwB,IAAI,GAE1DC,IAAc,CAACC,MAAmB;AACtC,IAAI,CAACR,KAAYH,KACfA,EAASW,CAAM;AAAA,EAEnB,GAEMC,IAAmB,CAACD,MAAmB;AAC3C,IAAKR,KACHK,EAAcG,CAAM;AAAA,EAExB,GAEME,IAAmB,MAAM;AAC7B,IAAAL,EAAc,IAAI;AAAA,EACpB,GAEMM,IAAeP,MAAe,OAAOA,IAAaR,GAClDgB,IAAYlB,EAAWK,CAAI;AAEjC,2BACG,OAAA,EAAI,WAAWc,EAAG,iBAAiBV,CAAS,GAC1C,UAAA;AAAA,IAAAF,KACC,gBAAAa,EAAC,QAAA,EAAK,WAAU,6CACb,UAAAb,GACH;AAAA,IAEF,gBAAAa,EAAC,OAAA,EAAI,WAAU,2BACZ,UAAA,MAAM,KAAK,EAAE,QAAQhB,EAAA,GAAO,CAACiB,GAAGC,MAAU;AACzC,YAAMC,IAAYD,IAAQ,GACpBE,IAAWD,KAAaN;AAE9B,aACE,gBAAAG;AAAA,QAAC;AAAA,QAAA;AAAA,UAEC,MAAK;AAAA,UACL,SAAS,MAAMP,EAAYU,CAAS;AAAA,UACpC,cAAc,MAAMR,EAAiBQ,CAAS;AAAA,UAC9C,cAAcP;AAAA,UACd,UAAUV;AAAA,UACV,WAAWa;AAAA,YACT;AAAA,YACAb,IAAW,mBAAmB;AAAA,YAC9B;AAAA,YACA;AAAA,UAAA;AAAA,UAEF,cAAY,QAAQiB,CAAS,WAAWnB,CAAG;AAAA,UAE1C,UAAAoB,IACC,gBAAAJ,EAACK,GAAA,EAAU,WAAWN,EAAGD,GAAW,kBAAkB,EAAA,CAAG,sBAExDQ,GAAA,EAAY,WAAWP,EAAGD,GAAW,gBAAgB,EAAA,CAAG;AAAA,QAAA;AAAA,QAjBtDI;AAAA,MAAA;AAAA,IAqBX,CAAC,EAAA,CACH;AAAA,IACCd,KACC,gBAAAY,EAAC,QAAA,EAAK,WAAU,6BAA6B,UAAAZ,EAAA,CAAM;AAAA,EAAA,GAEvD;AAEJ;"}
|
package/dist/index52.js
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
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
|
+
);
|
|
37
|
+
export {
|
|
38
|
+
y as Row
|
|
39
|
+
};
|
|
40
|
+
//# sourceMappingURL=index52.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index52.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/index53.js
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
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,
|
|
19
|
+
{
|
|
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
|
|
23
|
+
),
|
|
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
|
+
]
|
|
63
|
+
}
|
|
64
|
+
) })
|
|
65
|
+
] });
|
|
66
|
+
export {
|
|
67
|
+
k as ScrollableModal
|
|
68
|
+
};
|
|
69
|
+
//# sourceMappingURL=index53.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index53.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,gBAAAD,EAAC,OAAA,EAAI,WAAU,QACZ,UAAAL,KACC,gBAAAK;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,SAASL;AAAA,cACT,WAAU;AAAA,cACV,cAAW;AAAA,cAEX,UAAA,gBAAAK,EAACI,GAAA,EAAc,WAAU,yBAAA,CAAyB;AAAA,YAAA;AAAA,UAAA,GAGxD;AAAA,UAEA,gBAAAJ,EAACK,GAAA,EAAY,WAAU,uDACpB,UAAAZ,GACH;AAAA,UAEA,gBAAAO,EAAC,OAAA,EAAI,WAAU,yBACZ,UAAAJ,IACC,gBAAAI;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,SAASJ;AAAA,cACT,WAAU;AAAA,cACX,UAAA;AAAA,YAAA;AAAA,UAAA,IAID,gBAAAI;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,SAASR;AAAA,cACT,WAAU;AAAA,cACV,cAAW;AAAA,cAEX,UAAA,gBAAAQ,EAACM,GAAA,EAAU,WAAU,yBAAA,CAAyB;AAAA,YAAA;AAAA,UAAA,EAChD,CAEJ;AAAA,QAAA,GACF;AAAA,QAGA,gBAAAN,EAAC,OAAA,EAAI,WAAU,oCACZ,UAAAN,EAAA,CACH;AAAA,QAGCG,EAAa,SAAS,KACrB,gBAAAG,EAAC,OAAA,EAAI,WAAU,8DACZ,UAAAH,EAAa,IAAI,CAACU,GAAQC,MACzB,gBAAAR;AAAA,UAACS;AAAA,UAAA;AAAA,YAEE,GAAGF;AAAA,YAEH,UAAAA,EAAO,QAAQA,EAAO;AAAA,UAAA;AAAA,UAHlBA,EAAO,OAAOA,EAAO,QAAQ,UAAUC,CAAK;AAAA,QAAA,CAKpD,EAAA,CACH;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA,EAEJ,CACF;AAAA,GACF;"}
|
package/dist/index54.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
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
|
|
8
|
+
}) {
|
|
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
|
|
17
|
+
),
|
|
18
|
+
children: r
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
export {
|
|
23
|
+
b as SectionHeading
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=index54.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index54.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/index55.js
ADDED
|
@@ -0,0 +1,107 @@
|
|
|
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
|
|
15
|
+
}) {
|
|
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
|
+
}
|
|
51
|
+
),
|
|
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 })
|
|
102
|
+
] });
|
|
103
|
+
}
|
|
104
|
+
export {
|
|
105
|
+
S as Select
|
|
106
|
+
};
|
|
107
|
+
//# sourceMappingURL=index55.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index55.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,WAAAC;AACF,GAAgB;AACd,QAAMC,IAAiBR,EAAQ,KAAK,CAACS,MAAQA,EAAI,UAAUR,CAAK;AAEhE,2BACG,OAAA,EAAI,WAAWS,EAAG,UAAUH,CAAS,GACnC,UAAA;AAAA,IAAAJ,KACC,gBAAAQ,EAAC,SAAA,EAAM,WAAU,mDACd,UAAAR,GACH;AAAA,IAEF,gBAAAQ,EAACC,KAAQ,OAAAX,GAAc,UAAAC,GAAoB,UAAAI,GACzC,UAAA,gBAAAO,EAAC,OAAA,EAAI,WAAU,YACb,UAAA;AAAA,MAAA,gBAAAA;AAAA,QAACC;AAAA,QAAA;AAAA,UACC,WAAWJ;AAAA,YACT;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACAL,IACI,2DACA;AAAA,YACJC,KAAY;AAAA,UAAA;AAAA,UAGd,UAAA;AAAA,YAAA,gBAAAK;AAAA,cAAC;AAAA,cAAA;AAAA,gBACC,WAAWD;AAAA,kBACT;AAAA,kBACA,CAACF,KAAkB;AAAA,gBAAA;AAAA,gBAGpB,kCAAgB,UAASJ;AAAA,cAAA;AAAA,YAAA;AAAA,YAE5B,gBAAAO,EAAC,QAAA,EAAK,WAAU,yEACd,UAAA,gBAAAA;AAAA,cAACI;AAAA,cAAA;AAAA,gBACC,WAAU;AAAA,gBACV,eAAY;AAAA,cAAA;AAAA,YAAA,EACd,CACF;AAAA,UAAA;AAAA,QAAA;AAAA,MAAA;AAAA,MAEF,gBAAAJ;AAAA,QAACK;AAAA,QAAA;AAAA,UACC,IAAIC;AAAAA,UACJ,OAAM;AAAA,UACN,WAAU;AAAA,UACV,SAAQ;AAAA,UAER,UAAA,gBAAAN;AAAA,YAACO;AAAA,YAAA;AAAA,cACC,WAAWR;AAAA,gBACT;AAAA,gBACA;AAAA,gBACA;AAAA,gBACA;AAAA,cAAA;AAAA,cAGD,UAAAV,EAAQ,IAAI,CAACmB,MACZ,gBAAAR;AAAA,gBAACS;AAAA,gBAAA;AAAA,kBAEC,OAAOD,EAAO;AAAA,kBACd,UAAUA,EAAO;AAAA,kBACjB,WAAW,CAAC,EAAE,QAAAE,GAAQ,UAAAC,QACpBZ;AAAA,oBACE;AAAA,oBACA;AAAA,oBACAW,KAAU;AAAA,oBACVC,KAAY;AAAA,oBACZH,EAAO,YAAY;AAAA,kBAAA;AAAA,kBAItB,UAAA,CAAC,EAAE,UAAAG,EAAA,MACF,gBAAAT,EAAAI,GAAA,EACE,UAAA;AAAA,oBAAA,gBAAAN;AAAA,sBAAC;AAAA,sBAAA;AAAA,wBACC,WAAWD;AAAA,0BACT;AAAA,0BACAY,IAAW,kBAAkB;AAAA,wBAAA;AAAA,wBAG9B,UAAAH,EAAO;AAAA,sBAAA;AAAA,oBAAA;AAAA,oBAETG,KACC,gBAAAX,EAAC,QAAA,EAAK,WAAU,qEACd,UAAA,gBAAAA,EAACY,GAAA,EAAU,WAAU,WAAU,eAAY,OAAA,CAAO,EAAA,CACpD;AAAA,kBAAA,EAAA,CAEJ;AAAA,gBAAA;AAAA,gBA5BGJ,EAAO;AAAA,cAAA,CA+Bf;AAAA,YAAA;AAAA,UAAA;AAAA,QACH;AAAA,MAAA;AAAA,IACF,EAAA,CACF,EAAA,CACF;AAAA,IACCd,KAAS,gBAAAM,EAAC,KAAA,EAAE,WAAU,+BAA+B,UAAAN,EAAA,CAAM;AAAA,EAAA,GAC9D;AAEJ;"}
|
package/dist/index56.js
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { jsx as t, jsxs as a } from "react/jsx-runtime";
|
|
2
|
+
import { cn as u } from "./index3.js";
|
|
3
|
+
function c({
|
|
4
|
+
variant: e = "text",
|
|
5
|
+
width: r,
|
|
6
|
+
height: l,
|
|
7
|
+
className: n
|
|
8
|
+
}) {
|
|
9
|
+
const o = {
|
|
10
|
+
width: typeof r == "number" ? `${r}px` : r,
|
|
11
|
+
height: typeof l == "number" ? `${l}px` : l
|
|
12
|
+
};
|
|
13
|
+
return /* @__PURE__ */ t(
|
|
14
|
+
"div",
|
|
15
|
+
{
|
|
16
|
+
className: u(
|
|
17
|
+
"animate-pulse bg-slate-200",
|
|
18
|
+
e === "text" && "h-4 rounded",
|
|
19
|
+
e === "circular" && "rounded-full",
|
|
20
|
+
e === "rectangular" && "rounded-lg",
|
|
21
|
+
!r && e === "text" && "w-full",
|
|
22
|
+
!r && e === "circular" && "w-10",
|
|
23
|
+
!l && e === "circular" && "h-10",
|
|
24
|
+
!r && e === "rectangular" && "w-full",
|
|
25
|
+
!l && e === "rectangular" && "h-20",
|
|
26
|
+
n
|
|
27
|
+
),
|
|
28
|
+
style: o
|
|
29
|
+
}
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
function d({ lines: e = 3, className: r }) {
|
|
33
|
+
return /* @__PURE__ */ t("div", { className: u("space-y-2", r), children: Array.from({ length: e }).map((l, n) => /* @__PURE__ */ t(
|
|
34
|
+
c,
|
|
35
|
+
{
|
|
36
|
+
variant: "text",
|
|
37
|
+
width: n === e - 1 ? "60%" : "100%"
|
|
38
|
+
},
|
|
39
|
+
n
|
|
40
|
+
)) });
|
|
41
|
+
}
|
|
42
|
+
function s({ size: e = 40, className: r }) {
|
|
43
|
+
return /* @__PURE__ */ t(
|
|
44
|
+
c,
|
|
45
|
+
{
|
|
46
|
+
variant: "circular",
|
|
47
|
+
width: e,
|
|
48
|
+
height: e,
|
|
49
|
+
className: r
|
|
50
|
+
}
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
function f({ className: e }) {
|
|
54
|
+
return /* @__PURE__ */ a("div", { className: u("p-4 border border-slate-200 rounded-xl", e), children: [
|
|
55
|
+
/* @__PURE__ */ a("div", { className: "flex items-center gap-3 mb-4", children: [
|
|
56
|
+
/* @__PURE__ */ t(s, {}),
|
|
57
|
+
/* @__PURE__ */ a("div", { className: "flex-1 space-y-2", children: [
|
|
58
|
+
/* @__PURE__ */ t(c, { variant: "text", width: "40%" }),
|
|
59
|
+
/* @__PURE__ */ t(c, { variant: "text", width: "20%" })
|
|
60
|
+
] })
|
|
61
|
+
] }),
|
|
62
|
+
/* @__PURE__ */ t(d, { lines: 3 })
|
|
63
|
+
] });
|
|
64
|
+
}
|
|
65
|
+
export {
|
|
66
|
+
c as Skeleton,
|
|
67
|
+
s as SkeletonAvatar,
|
|
68
|
+
f as SkeletonCard,
|
|
69
|
+
d as SkeletonText
|
|
70
|
+
};
|
|
71
|
+
//# sourceMappingURL=index56.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index56.js","sources":["../src/components/Skeleton/Skeleton.tsx"],"sourcesContent":["import { cn } from '@/lib/utils'\n\nexport interface SkeletonProps {\n variant?: 'text' | 'circular' | 'rectangular'\n width?: string | number\n height?: string | number\n className?: string\n}\n\nexport function Skeleton({\n variant = 'text',\n width,\n height,\n className,\n}: SkeletonProps) {\n const style: React.CSSProperties = {\n width: typeof width === 'number' ? `${width}px` : width,\n height: typeof height === 'number' ? `${height}px` : height,\n }\n\n return (\n <div\n className={cn(\n 'animate-pulse bg-slate-200',\n variant === 'text' && 'h-4 rounded',\n variant === 'circular' && 'rounded-full',\n variant === 'rectangular' && 'rounded-lg',\n !width && variant === 'text' && 'w-full',\n !width && variant === 'circular' && 'w-10',\n !height && variant === 'circular' && 'h-10',\n !width && variant === 'rectangular' && 'w-full',\n !height && variant === 'rectangular' && 'h-20',\n className\n )}\n style={style}\n />\n )\n}\n\n// Convenience components for common skeleton patterns\nexport function SkeletonText({ lines = 3, className }: { lines?: number; className?: string }) {\n return (\n <div className={cn('space-y-2', className)}>\n {Array.from({ length: lines }).map((_, i) => (\n <Skeleton\n key={i}\n variant=\"text\"\n width={i === lines - 1 ? '60%' : '100%'}\n />\n ))}\n </div>\n )\n}\n\nexport function SkeletonAvatar({ size = 40, className }: { size?: number; className?: string }) {\n return (\n <Skeleton\n variant=\"circular\"\n width={size}\n height={size}\n className={className}\n />\n )\n}\n\nexport function SkeletonCard({ className }: { className?: string }) {\n return (\n <div className={cn('p-4 border border-slate-200 rounded-xl', className)}>\n <div className=\"flex items-center gap-3 mb-4\">\n <SkeletonAvatar />\n <div className=\"flex-1 space-y-2\">\n <Skeleton variant=\"text\" width=\"40%\" />\n <Skeleton variant=\"text\" width=\"20%\" />\n </div>\n </div>\n <SkeletonText lines={3} />\n </div>\n )\n}\n"],"names":["Skeleton","variant","width","height","className","style","jsx","cn","SkeletonText","lines","_","i","SkeletonAvatar","size","SkeletonCard","jsxs"],"mappings":";;AASO,SAASA,EAAS;AAAA,EACvB,SAAAC,IAAU;AAAA,EACV,OAAAC;AAAA,EACA,QAAAC;AAAA,EACA,WAAAC;AACF,GAAkB;AAChB,QAAMC,IAA6B;AAAA,IACjC,OAAO,OAAOH,KAAU,WAAW,GAAGA,CAAK,OAAOA;AAAA,IAClD,QAAQ,OAAOC,KAAW,WAAW,GAAGA,CAAM,OAAOA;AAAA,EAAA;AAGvD,SACE,gBAAAG;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC;AAAA,QACT;AAAA,QACAN,MAAY,UAAU;AAAA,QACtBA,MAAY,cAAc;AAAA,QAC1BA,MAAY,iBAAiB;AAAA,QAC7B,CAACC,KAASD,MAAY,UAAU;AAAA,QAChC,CAACC,KAASD,MAAY,cAAc;AAAA,QACpC,CAACE,KAAUF,MAAY,cAAc;AAAA,QACrC,CAACC,KAASD,MAAY,iBAAiB;AAAA,QACvC,CAACE,KAAUF,MAAY,iBAAiB;AAAA,QACxCG;AAAA,MAAA;AAAA,MAEF,OAAAC;AAAA,IAAA;AAAA,EAAA;AAGN;AAGO,SAASG,EAAa,EAAE,OAAAC,IAAQ,GAAG,WAAAL,KAAqD;AAC7F,2BACG,OAAA,EAAI,WAAWG,EAAG,aAAaH,CAAS,GACtC,UAAA,MAAM,KAAK,EAAE,QAAQK,EAAA,CAAO,EAAE,IAAI,CAACC,GAAGC,MACrC,gBAAAL;AAAA,IAACN;AAAA,IAAA;AAAA,MAEC,SAAQ;AAAA,MACR,OAAOW,MAAMF,IAAQ,IAAI,QAAQ;AAAA,IAAA;AAAA,IAF5BE;AAAA,EAAA,CAIR,GACH;AAEJ;AAEO,SAASC,EAAe,EAAE,MAAAC,IAAO,IAAI,WAAAT,KAAoD;AAC9F,SACE,gBAAAE;AAAA,IAACN;AAAA,IAAA;AAAA,MACC,SAAQ;AAAA,MACR,OAAOa;AAAA,MACP,QAAQA;AAAA,MACR,WAAAT;AAAA,IAAA;AAAA,EAAA;AAGN;AAEO,SAASU,EAAa,EAAE,WAAAV,KAAqC;AAClE,2BACG,OAAA,EAAI,WAAWG,EAAG,0CAA0CH,CAAS,GACpE,UAAA;AAAA,IAAA,gBAAAW,EAAC,OAAA,EAAI,WAAU,gCACb,UAAA;AAAA,MAAA,gBAAAT,EAACM,GAAA,EAAe;AAAA,MAChB,gBAAAG,EAAC,OAAA,EAAI,WAAU,oBACb,UAAA;AAAA,QAAA,gBAAAT,EAACN,GAAA,EAAS,SAAQ,QAAO,OAAM,OAAM;AAAA,QACrC,gBAAAM,EAACN,GAAA,EAAS,SAAQ,QAAO,OAAM,MAAA,CAAM;AAAA,MAAA,EAAA,CACvC;AAAA,IAAA,GACF;AAAA,IACA,gBAAAM,EAACE,GAAA,EAAa,OAAO,EAAA,CAAG;AAAA,EAAA,GAC1B;AAEJ;"}
|