@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.js
CHANGED
|
@@ -2714,7 +2714,7 @@ var CarouselPanels = forwardRef(
|
|
|
2714
2714
|
}
|
|
2715
2715
|
}, [activeIndex, transition]);
|
|
2716
2716
|
if (transition === "fade") {
|
|
2717
|
-
return /* @__PURE__ */ jsx("div", { ref, className: cn("relative overflow-hidden", className), children: /* @__PURE__ */ jsx(
|
|
2717
|
+
return /* @__PURE__ */ jsx("div", { ref, "data-react-fancy-carousel-panels": "", className: cn("relative overflow-hidden", className), children: /* @__PURE__ */ jsx(
|
|
2718
2718
|
"div",
|
|
2719
2719
|
{
|
|
2720
2720
|
className: cn(
|
|
@@ -2728,13 +2728,13 @@ var CarouselPanels = forwardRef(
|
|
|
2728
2728
|
activeIndex
|
|
2729
2729
|
) });
|
|
2730
2730
|
}
|
|
2731
|
-
return /* @__PURE__ */ jsx("div", { ref, className: cn("relative overflow-hidden", className), children: slides[activeIndex] });
|
|
2731
|
+
return /* @__PURE__ */ jsx("div", { ref, "data-react-fancy-carousel-panels": "", className: cn("relative overflow-hidden", className), children: slides[activeIndex] });
|
|
2732
2732
|
}
|
|
2733
2733
|
);
|
|
2734
2734
|
CarouselPanels.displayName = "CarouselPanels";
|
|
2735
2735
|
var CarouselSlide = forwardRef(
|
|
2736
2736
|
({ children, className, name: _name }, ref) => {
|
|
2737
|
-
return /* @__PURE__ */ jsx("div", { ref, className: cn("w-full", className), children });
|
|
2737
|
+
return /* @__PURE__ */ jsx("div", { ref, "data-react-fancy-carousel-slide": "", className: cn("w-full", className), children });
|
|
2738
2738
|
}
|
|
2739
2739
|
);
|
|
2740
2740
|
CarouselSlide.displayName = "CarouselSlide";
|
|
@@ -2752,7 +2752,7 @@ var CarouselControls = forwardRef(
|
|
|
2752
2752
|
const isFirst = activeIndex === 0;
|
|
2753
2753
|
const isLast = activeIndex === totalSlides - 1;
|
|
2754
2754
|
if (variant === "wizard") {
|
|
2755
|
-
return /* @__PURE__ */ jsxs("div", { ref, className: cn("flex items-center gap-2", className), children: [
|
|
2755
|
+
return /* @__PURE__ */ jsxs("div", { ref, "data-react-fancy-carousel-controls": "", className: cn("flex items-center gap-2", className), children: [
|
|
2756
2756
|
/* @__PURE__ */ jsx(
|
|
2757
2757
|
"button",
|
|
2758
2758
|
{
|
|
@@ -2784,7 +2784,7 @@ var CarouselControls = forwardRef(
|
|
|
2784
2784
|
}
|
|
2785
2785
|
const prevDisabled = !loop && isFirst;
|
|
2786
2786
|
const nextDisabled = !loop && isLast;
|
|
2787
|
-
return /* @__PURE__ */ jsxs("div", { ref, className: cn("flex items-center gap-2", className), children: [
|
|
2787
|
+
return /* @__PURE__ */ jsxs("div", { ref, "data-react-fancy-carousel-controls": "", className: cn("flex items-center gap-2", className), children: [
|
|
2788
2788
|
/* @__PURE__ */ jsx(
|
|
2789
2789
|
"button",
|
|
2790
2790
|
{
|
|
@@ -2816,7 +2816,7 @@ var CarouselSteps = forwardRef(
|
|
|
2816
2816
|
return null;
|
|
2817
2817
|
}
|
|
2818
2818
|
if (variant === "wizard") {
|
|
2819
|
-
return /* @__PURE__ */ jsx("div", { ref, className: cn("flex items-center gap-3", className), children: Array.from({ length: totalSlides }, (_, i) => {
|
|
2819
|
+
return /* @__PURE__ */ jsx("div", { ref, "data-react-fancy-carousel-steps": "", className: cn("flex items-center gap-3", className), children: Array.from({ length: totalSlides }, (_, i) => {
|
|
2820
2820
|
const isActive = i === activeIndex;
|
|
2821
2821
|
const isCompleted = i < activeIndex;
|
|
2822
2822
|
const name = slideNames[i];
|
|
@@ -2853,7 +2853,7 @@ var CarouselSteps = forwardRef(
|
|
|
2853
2853
|
);
|
|
2854
2854
|
}) });
|
|
2855
2855
|
}
|
|
2856
|
-
return /* @__PURE__ */ jsx("div", { ref, className: cn("flex items-center gap-1.5", className), children: Array.from({ length: totalSlides }, (_, i) => /* @__PURE__ */ jsx(
|
|
2856
|
+
return /* @__PURE__ */ jsx("div", { ref, "data-react-fancy-carousel-steps": "", className: cn("flex items-center gap-1.5", className), children: Array.from({ length: totalSlides }, (_, i) => /* @__PURE__ */ jsx(
|
|
2857
2857
|
"button",
|
|
2858
2858
|
{
|
|
2859
2859
|
type: "button",
|
|
@@ -3174,10 +3174,10 @@ function useTable() {
|
|
|
3174
3174
|
return ctx;
|
|
3175
3175
|
}
|
|
3176
3176
|
function TableHead({ children, className }) {
|
|
3177
|
-
return /* @__PURE__ */ jsx("thead", { className: cn("border-b border-zinc-200 dark:border-zinc-700", className), children });
|
|
3177
|
+
return /* @__PURE__ */ jsx("thead", { "data-react-fancy-table-head": "", className: cn("border-b border-zinc-200 dark:border-zinc-700", className), children });
|
|
3178
3178
|
}
|
|
3179
3179
|
function TableBody({ children, className }) {
|
|
3180
|
-
return /* @__PURE__ */ jsx("tbody", { className: cn("divide-y divide-zinc-100 dark:divide-zinc-800", className), children });
|
|
3180
|
+
return /* @__PURE__ */ jsx("tbody", { "data-react-fancy-table-body": "", className: cn("divide-y divide-zinc-100 dark:divide-zinc-800", className), children });
|
|
3181
3181
|
}
|
|
3182
3182
|
function TableRow({
|
|
3183
3183
|
children,
|
|
@@ -3226,6 +3226,7 @@ function TableRow({
|
|
|
3226
3226
|
/* @__PURE__ */ jsxs(
|
|
3227
3227
|
"tr",
|
|
3228
3228
|
{
|
|
3229
|
+
"data-react-fancy-table-row": "",
|
|
3229
3230
|
className: cn(
|
|
3230
3231
|
"transition-colors hover:bg-zinc-50 dark:hover:bg-zinc-800/50",
|
|
3231
3232
|
onClick && "cursor-pointer",
|
|
@@ -3247,6 +3248,7 @@ function TableCell({ children, className, header }) {
|
|
|
3247
3248
|
return /* @__PURE__ */ jsx(
|
|
3248
3249
|
Tag,
|
|
3249
3250
|
{
|
|
3251
|
+
"data-react-fancy-table-cell": "",
|
|
3250
3252
|
className: cn(
|
|
3251
3253
|
"px-4 py-3 text-sm",
|
|
3252
3254
|
header && "text-left font-medium text-zinc-500 dark:text-zinc-400",
|
|
@@ -3262,6 +3264,7 @@ function TableColumn({ label, sortKey, className }) {
|
|
|
3262
3264
|
return /* @__PURE__ */ jsx(
|
|
3263
3265
|
"th",
|
|
3264
3266
|
{
|
|
3267
|
+
"data-react-fancy-table-column": "",
|
|
3265
3268
|
className: cn(
|
|
3266
3269
|
"px-4 py-3 text-left text-sm font-medium text-zinc-500 dark:text-zinc-400",
|
|
3267
3270
|
sortKey && "cursor-pointer select-none",
|
|
@@ -3283,7 +3286,7 @@ function TablePagination({
|
|
|
3283
3286
|
const { page, setPage } = useTable();
|
|
3284
3287
|
const totalPages = Math.ceil(total / pageSize);
|
|
3285
3288
|
if (totalPages <= 1) return null;
|
|
3286
|
-
return /* @__PURE__ */ jsxs("div", { className: cn("flex items-center justify-between px-4 py-3 text-sm", className), children: [
|
|
3289
|
+
return /* @__PURE__ */ jsxs("div", { "data-react-fancy-table-pagination": "", className: cn("flex items-center justify-between px-4 py-3 text-sm", className), children: [
|
|
3287
3290
|
/* @__PURE__ */ jsxs("span", { className: "text-zinc-500", children: [
|
|
3288
3291
|
"Page ",
|
|
3289
3292
|
page + 1,
|
|
@@ -3322,6 +3325,7 @@ function TableSearch({
|
|
|
3322
3325
|
return /* @__PURE__ */ jsx(
|
|
3323
3326
|
"input",
|
|
3324
3327
|
{
|
|
3328
|
+
"data-react-fancy-table-search": "",
|
|
3325
3329
|
type: "text",
|
|
3326
3330
|
value: searchQuery,
|
|
3327
3331
|
onChange: (e) => setSearchQuery(e.target.value),
|
|
@@ -3334,7 +3338,7 @@ function TableSearch({
|
|
|
3334
3338
|
);
|
|
3335
3339
|
}
|
|
3336
3340
|
function TableTray({ children, className }) {
|
|
3337
|
-
return /* @__PURE__ */ jsx("div", { className: cn("flex items-center justify-between px-4 py-3", className), children });
|
|
3341
|
+
return /* @__PURE__ */ jsx("div", { "data-react-fancy-table-tray": "", className: cn("flex items-center justify-between px-4 py-3", className), children });
|
|
3338
3342
|
}
|
|
3339
3343
|
function TableRowTray({ children, className }) {
|
|
3340
3344
|
return /* @__PURE__ */ jsx(
|
|
@@ -4739,6 +4743,7 @@ function DropdownSeparator({ className }) {
|
|
|
4739
4743
|
return /* @__PURE__ */ jsx(
|
|
4740
4744
|
"div",
|
|
4741
4745
|
{
|
|
4746
|
+
"data-react-fancy-dropdown-separator": "",
|
|
4742
4747
|
role: "separator",
|
|
4743
4748
|
className: cn(
|
|
4744
4749
|
"my-1 h-px bg-zinc-200 dark:bg-zinc-700",
|
|
@@ -4792,7 +4797,7 @@ function ContextMenuTrigger({
|
|
|
4792
4797
|
},
|
|
4793
4798
|
[ctx]
|
|
4794
4799
|
);
|
|
4795
|
-
return /* @__PURE__ */ jsx("div", { onContextMenu: handleContextMenu, className: cn(className), children });
|
|
4800
|
+
return /* @__PURE__ */ jsx("div", { "data-react-fancy-context-menu-trigger": "", onContextMenu: handleContextMenu, className: cn(className), children });
|
|
4796
4801
|
}
|
|
4797
4802
|
ContextMenuTrigger.displayName = "ContextMenuTrigger";
|
|
4798
4803
|
function ContextMenuContent({
|
|
@@ -4842,6 +4847,7 @@ function ContextMenuItem({
|
|
|
4842
4847
|
"button",
|
|
4843
4848
|
{
|
|
4844
4849
|
type: "button",
|
|
4850
|
+
"data-react-fancy-context-menu-item": "",
|
|
4845
4851
|
role: "menuitem",
|
|
4846
4852
|
disabled,
|
|
4847
4853
|
"aria-disabled": disabled,
|
|
@@ -4865,6 +4871,7 @@ function ContextMenuSeparator({ className }) {
|
|
|
4865
4871
|
return /* @__PURE__ */ jsx(
|
|
4866
4872
|
"div",
|
|
4867
4873
|
{
|
|
4874
|
+
"data-react-fancy-context-menu-separator": "",
|
|
4868
4875
|
role: "separator",
|
|
4869
4876
|
className: cn("my-1 h-px bg-zinc-200 dark:bg-zinc-700", className)
|
|
4870
4877
|
}
|
|
@@ -5604,7 +5611,7 @@ function BreadcrumbsDropdown({ items, activeLabel }) {
|
|
|
5604
5611
|
const ref = useRef(null);
|
|
5605
5612
|
useOutsideClick(ref, () => setOpen(false), open);
|
|
5606
5613
|
useEscapeKey(() => setOpen(false), open);
|
|
5607
|
-
return /* @__PURE__ */ jsxs("div", { ref, className: "relative flex md:hidden", children: [
|
|
5614
|
+
return /* @__PURE__ */ jsxs("div", { ref, "data-react-fancy-breadcrumbs-dropdown": "", className: "relative flex md:hidden", children: [
|
|
5608
5615
|
/* @__PURE__ */ jsxs(
|
|
5609
5616
|
"button",
|
|
5610
5617
|
{
|
|
@@ -7126,6 +7133,7 @@ function ChartLine({
|
|
|
7126
7133
|
"div",
|
|
7127
7134
|
{
|
|
7128
7135
|
ref: containerRef,
|
|
7136
|
+
"data-react-fancy-chart-line": "",
|
|
7129
7137
|
className: cn("relative", className),
|
|
7130
7138
|
onMouseMove: handleMouseMove,
|
|
7131
7139
|
onMouseLeave: () => setHoverInfo(null),
|
|
@@ -7286,7 +7294,7 @@ function ChartPie({
|
|
|
7286
7294
|
const rect = containerRef.current.getBoundingClientRect();
|
|
7287
7295
|
setTooltipPos({ x: e.clientX - rect.left, y: e.clientY - rect.top });
|
|
7288
7296
|
};
|
|
7289
|
-
return /* @__PURE__ */ jsxs("div", { ref: containerRef, className: cn("relative inline-flex items-center gap-6", className), onMouseMove: handleMouseMove, children: [
|
|
7297
|
+
return /* @__PURE__ */ jsxs("div", { ref: containerRef, "data-react-fancy-chart-pie": "", className: cn("relative inline-flex items-center gap-6", className), onMouseMove: handleMouseMove, children: [
|
|
7290
7298
|
/* @__PURE__ */ jsx("svg", { width: size, height: size, children: slices.map((slice, i) => /* @__PURE__ */ jsxs("g", { children: [
|
|
7291
7299
|
/* @__PURE__ */ jsx(
|
|
7292
7300
|
"path",
|
|
@@ -7444,7 +7452,7 @@ function ChartStackedBar({
|
|
|
7444
7452
|
setTooltipPos({ x: e.clientX - rect.left, y: e.clientY - rect.top });
|
|
7445
7453
|
};
|
|
7446
7454
|
const svgProps = responsive ? { viewBox: `0 0 ${width} ${height}`, width: "100%", preserveAspectRatio: "xMidYMid meet" } : { width, height };
|
|
7447
|
-
return /* @__PURE__ */ jsxs("div", { ref: containerRef, className: cn("relative", className), onMouseMove: handleMouseMove, children: [
|
|
7455
|
+
return /* @__PURE__ */ jsxs("div", { ref: containerRef, "data-react-fancy-chart-stacked-bar": "", className: cn("relative", className), onMouseMove: handleMouseMove, children: [
|
|
7448
7456
|
/* @__PURE__ */ jsxs("svg", { ...svgProps, height: responsive ? void 0 : height, children: [
|
|
7449
7457
|
grid && /* @__PURE__ */ jsx(
|
|
7450
7458
|
ChartGrid,
|