@particle-academy/react-fancy 1.4.0 → 1.5.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/index.cjs +23 -15
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +23 -15
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -3024,7 +3024,7 @@ var CarouselPanels = react.forwardRef(
|
|
|
3024
3024
|
}
|
|
3025
3025
|
}, [activeIndex, transition]);
|
|
3026
3026
|
if (transition === "fade") {
|
|
3027
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("relative overflow-hidden", className), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3027
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { ref, "data-react-fancy-carousel-panels": "", className: cn("relative overflow-hidden", className), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3028
3028
|
"div",
|
|
3029
3029
|
{
|
|
3030
3030
|
className: cn(
|
|
@@ -3038,13 +3038,13 @@ var CarouselPanels = react.forwardRef(
|
|
|
3038
3038
|
activeIndex
|
|
3039
3039
|
) });
|
|
3040
3040
|
}
|
|
3041
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("relative overflow-hidden", className), children: slides[activeIndex] });
|
|
3041
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { ref, "data-react-fancy-carousel-panels": "", className: cn("relative overflow-hidden", className), children: slides[activeIndex] });
|
|
3042
3042
|
}
|
|
3043
3043
|
);
|
|
3044
3044
|
CarouselPanels.displayName = "CarouselPanels";
|
|
3045
3045
|
var CarouselSlide = react.forwardRef(
|
|
3046
3046
|
({ children, className, name: _name }, ref) => {
|
|
3047
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("w-full", className), children });
|
|
3047
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { ref, "data-react-fancy-carousel-slide": "", className: cn("w-full", className), children });
|
|
3048
3048
|
}
|
|
3049
3049
|
);
|
|
3050
3050
|
CarouselSlide.displayName = "CarouselSlide";
|
|
@@ -3062,7 +3062,7 @@ var CarouselControls = react.forwardRef(
|
|
|
3062
3062
|
const isFirst = activeIndex === 0;
|
|
3063
3063
|
const isLast = activeIndex === totalSlides - 1;
|
|
3064
3064
|
if (variant === "wizard") {
|
|
3065
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, className: cn("flex items-center gap-2", className), children: [
|
|
3065
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, "data-react-fancy-carousel-controls": "", className: cn("flex items-center gap-2", className), children: [
|
|
3066
3066
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3067
3067
|
"button",
|
|
3068
3068
|
{
|
|
@@ -3094,7 +3094,7 @@ var CarouselControls = react.forwardRef(
|
|
|
3094
3094
|
}
|
|
3095
3095
|
const prevDisabled = !loop && isFirst;
|
|
3096
3096
|
const nextDisabled = !loop && isLast;
|
|
3097
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, className: cn("flex items-center gap-2", className), children: [
|
|
3097
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, "data-react-fancy-carousel-controls": "", className: cn("flex items-center gap-2", className), children: [
|
|
3098
3098
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3099
3099
|
"button",
|
|
3100
3100
|
{
|
|
@@ -3126,7 +3126,7 @@ var CarouselSteps = react.forwardRef(
|
|
|
3126
3126
|
return null;
|
|
3127
3127
|
}
|
|
3128
3128
|
if (variant === "wizard") {
|
|
3129
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("flex items-center gap-3", className), children: Array.from({ length: totalSlides }, (_, i) => {
|
|
3129
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { ref, "data-react-fancy-carousel-steps": "", className: cn("flex items-center gap-3", className), children: Array.from({ length: totalSlides }, (_, i) => {
|
|
3130
3130
|
const isActive = i === activeIndex;
|
|
3131
3131
|
const isCompleted = i < activeIndex;
|
|
3132
3132
|
const name = slideNames[i];
|
|
@@ -3163,7 +3163,7 @@ var CarouselSteps = react.forwardRef(
|
|
|
3163
3163
|
);
|
|
3164
3164
|
}) });
|
|
3165
3165
|
}
|
|
3166
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("flex items-center gap-1.5", className), children: Array.from({ length: totalSlides }, (_, i) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3166
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { ref, "data-react-fancy-carousel-steps": "", className: cn("flex items-center gap-1.5", className), children: Array.from({ length: totalSlides }, (_, i) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3167
3167
|
"button",
|
|
3168
3168
|
{
|
|
3169
3169
|
type: "button",
|
|
@@ -3484,10 +3484,10 @@ function useTable() {
|
|
|
3484
3484
|
return ctx;
|
|
3485
3485
|
}
|
|
3486
3486
|
function TableHead({ children, className }) {
|
|
3487
|
-
return /* @__PURE__ */ jsxRuntime.jsx("thead", { className: cn("border-b border-zinc-200 dark:border-zinc-700", className), children });
|
|
3487
|
+
return /* @__PURE__ */ jsxRuntime.jsx("thead", { "data-react-fancy-table-head": "", className: cn("border-b border-zinc-200 dark:border-zinc-700", className), children });
|
|
3488
3488
|
}
|
|
3489
3489
|
function TableBody({ children, className }) {
|
|
3490
|
-
return /* @__PURE__ */ jsxRuntime.jsx("tbody", { className: cn("divide-y divide-zinc-100 dark:divide-zinc-800", className), children });
|
|
3490
|
+
return /* @__PURE__ */ jsxRuntime.jsx("tbody", { "data-react-fancy-table-body": "", className: cn("divide-y divide-zinc-100 dark:divide-zinc-800", className), children });
|
|
3491
3491
|
}
|
|
3492
3492
|
function TableRow({
|
|
3493
3493
|
children,
|
|
@@ -3536,6 +3536,7 @@ function TableRow({
|
|
|
3536
3536
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
3537
3537
|
"tr",
|
|
3538
3538
|
{
|
|
3539
|
+
"data-react-fancy-table-row": "",
|
|
3539
3540
|
className: cn(
|
|
3540
3541
|
"transition-colors hover:bg-zinc-50 dark:hover:bg-zinc-800/50",
|
|
3541
3542
|
onClick && "cursor-pointer",
|
|
@@ -3557,6 +3558,7 @@ function TableCell({ children, className, header }) {
|
|
|
3557
3558
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3558
3559
|
Tag,
|
|
3559
3560
|
{
|
|
3561
|
+
"data-react-fancy-table-cell": "",
|
|
3560
3562
|
className: cn(
|
|
3561
3563
|
"px-4 py-3 text-sm",
|
|
3562
3564
|
header && "text-left font-medium text-zinc-500 dark:text-zinc-400",
|
|
@@ -3572,6 +3574,7 @@ function TableColumn({ label, sortKey, className }) {
|
|
|
3572
3574
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3573
3575
|
"th",
|
|
3574
3576
|
{
|
|
3577
|
+
"data-react-fancy-table-column": "",
|
|
3575
3578
|
className: cn(
|
|
3576
3579
|
"px-4 py-3 text-left text-sm font-medium text-zinc-500 dark:text-zinc-400",
|
|
3577
3580
|
sortKey && "cursor-pointer select-none",
|
|
@@ -3593,7 +3596,7 @@ function TablePagination({
|
|
|
3593
3596
|
const { page, setPage } = useTable();
|
|
3594
3597
|
const totalPages = Math.ceil(total / pageSize);
|
|
3595
3598
|
if (totalPages <= 1) return null;
|
|
3596
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex items-center justify-between px-4 py-3 text-sm", className), children: [
|
|
3599
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-react-fancy-table-pagination": "", className: cn("flex items-center justify-between px-4 py-3 text-sm", className), children: [
|
|
3597
3600
|
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-zinc-500", children: [
|
|
3598
3601
|
"Page ",
|
|
3599
3602
|
page + 1,
|
|
@@ -3632,6 +3635,7 @@ function TableSearch({
|
|
|
3632
3635
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3633
3636
|
"input",
|
|
3634
3637
|
{
|
|
3638
|
+
"data-react-fancy-table-search": "",
|
|
3635
3639
|
type: "text",
|
|
3636
3640
|
value: searchQuery,
|
|
3637
3641
|
onChange: (e) => setSearchQuery(e.target.value),
|
|
@@ -3644,7 +3648,7 @@ function TableSearch({
|
|
|
3644
3648
|
);
|
|
3645
3649
|
}
|
|
3646
3650
|
function TableTray({ children, className }) {
|
|
3647
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex items-center justify-between px-4 py-3", className), children });
|
|
3651
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-react-fancy-table-tray": "", className: cn("flex items-center justify-between px-4 py-3", className), children });
|
|
3648
3652
|
}
|
|
3649
3653
|
function TableRowTray({ children, className }) {
|
|
3650
3654
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -5049,6 +5053,7 @@ function DropdownSeparator({ className }) {
|
|
|
5049
5053
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5050
5054
|
"div",
|
|
5051
5055
|
{
|
|
5056
|
+
"data-react-fancy-dropdown-separator": "",
|
|
5052
5057
|
role: "separator",
|
|
5053
5058
|
className: cn(
|
|
5054
5059
|
"my-1 h-px bg-zinc-200 dark:bg-zinc-700",
|
|
@@ -5102,7 +5107,7 @@ function ContextMenuTrigger({
|
|
|
5102
5107
|
},
|
|
5103
5108
|
[ctx]
|
|
5104
5109
|
);
|
|
5105
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { onContextMenu: handleContextMenu, className: cn(className), children });
|
|
5110
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-react-fancy-context-menu-trigger": "", onContextMenu: handleContextMenu, className: cn(className), children });
|
|
5106
5111
|
}
|
|
5107
5112
|
ContextMenuTrigger.displayName = "ContextMenuTrigger";
|
|
5108
5113
|
function ContextMenuContent({
|
|
@@ -5152,6 +5157,7 @@ function ContextMenuItem({
|
|
|
5152
5157
|
"button",
|
|
5153
5158
|
{
|
|
5154
5159
|
type: "button",
|
|
5160
|
+
"data-react-fancy-context-menu-item": "",
|
|
5155
5161
|
role: "menuitem",
|
|
5156
5162
|
disabled,
|
|
5157
5163
|
"aria-disabled": disabled,
|
|
@@ -5175,6 +5181,7 @@ function ContextMenuSeparator({ className }) {
|
|
|
5175
5181
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5176
5182
|
"div",
|
|
5177
5183
|
{
|
|
5184
|
+
"data-react-fancy-context-menu-separator": "",
|
|
5178
5185
|
role: "separator",
|
|
5179
5186
|
className: cn("my-1 h-px bg-zinc-200 dark:bg-zinc-700", className)
|
|
5180
5187
|
}
|
|
@@ -5914,7 +5921,7 @@ function BreadcrumbsDropdown({ items, activeLabel }) {
|
|
|
5914
5921
|
const ref = react.useRef(null);
|
|
5915
5922
|
useOutsideClick(ref, () => setOpen(false), open);
|
|
5916
5923
|
useEscapeKey(() => setOpen(false), open);
|
|
5917
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, className: "relative flex md:hidden", children: [
|
|
5924
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, "data-react-fancy-breadcrumbs-dropdown": "", className: "relative flex md:hidden", children: [
|
|
5918
5925
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
5919
5926
|
"button",
|
|
5920
5927
|
{
|
|
@@ -7436,6 +7443,7 @@ function ChartLine({
|
|
|
7436
7443
|
"div",
|
|
7437
7444
|
{
|
|
7438
7445
|
ref: containerRef,
|
|
7446
|
+
"data-react-fancy-chart-line": "",
|
|
7439
7447
|
className: cn("relative", className),
|
|
7440
7448
|
onMouseMove: handleMouseMove,
|
|
7441
7449
|
onMouseLeave: () => setHoverInfo(null),
|
|
@@ -7596,7 +7604,7 @@ function ChartPie({
|
|
|
7596
7604
|
const rect = containerRef.current.getBoundingClientRect();
|
|
7597
7605
|
setTooltipPos({ x: e.clientX - rect.left, y: e.clientY - rect.top });
|
|
7598
7606
|
};
|
|
7599
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref: containerRef, className: cn("relative inline-flex items-center gap-6", className), onMouseMove: handleMouseMove, children: [
|
|
7607
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref: containerRef, "data-react-fancy-chart-pie": "", className: cn("relative inline-flex items-center gap-6", className), onMouseMove: handleMouseMove, children: [
|
|
7600
7608
|
/* @__PURE__ */ jsxRuntime.jsx("svg", { width: size, height: size, children: slices.map((slice, i) => /* @__PURE__ */ jsxRuntime.jsxs("g", { children: [
|
|
7601
7609
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7602
7610
|
"path",
|
|
@@ -7754,7 +7762,7 @@ function ChartStackedBar({
|
|
|
7754
7762
|
setTooltipPos({ x: e.clientX - rect.left, y: e.clientY - rect.top });
|
|
7755
7763
|
};
|
|
7756
7764
|
const svgProps = responsive ? { viewBox: `0 0 ${width} ${height}`, width: "100%", preserveAspectRatio: "xMidYMid meet" } : { width, height };
|
|
7757
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref: containerRef, className: cn("relative", className), onMouseMove: handleMouseMove, children: [
|
|
7765
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref: containerRef, "data-react-fancy-chart-stacked-bar": "", className: cn("relative", className), onMouseMove: handleMouseMove, children: [
|
|
7758
7766
|
/* @__PURE__ */ jsxRuntime.jsxs("svg", { ...svgProps, height: responsive ? void 0 : height, children: [
|
|
7759
7767
|
grid && /* @__PURE__ */ jsxRuntime.jsx(
|
|
7760
7768
|
ChartGrid,
|