@particle-academy/react-fancy 5.5.0 → 5.6.1
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 +78 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +71 -1
- package/dist/index.d.ts +71 -1
- package/dist/index.js +76 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -7020,6 +7020,81 @@ var Kbd = react.forwardRef(
|
|
|
7020
7020
|
}
|
|
7021
7021
|
);
|
|
7022
7022
|
Kbd.displayName = "Kbd";
|
|
7023
|
+
var IndexList = react.forwardRef(
|
|
7024
|
+
({ items, linkAs, className, ...props }, ref) => {
|
|
7025
|
+
const Link = linkAs ?? "a";
|
|
7026
|
+
return /* @__PURE__ */ jsxRuntime.jsx("ol", { ref, "data-react-fancy-index-list": "", className: cn("m-0 list-none p-0", className), ...props, children: items.map((item, i) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7027
|
+
"li",
|
|
7028
|
+
{
|
|
7029
|
+
"data-react-fancy-index-row": "",
|
|
7030
|
+
className: "relative flex items-baseline gap-4 border-b border-zinc-200 py-3 last:border-b-0 dark:border-zinc-800",
|
|
7031
|
+
children: [
|
|
7032
|
+
item.num != null && /* @__PURE__ */ jsxRuntime.jsx("span", { "data-react-fancy-index-num": "", className: "shrink-0 font-mono text-xs tabular-nums text-zinc-400 dark:text-zinc-500", children: item.num }),
|
|
7033
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { "data-react-fancy-index-title": "", className: "min-w-0 flex-1 truncate font-medium text-zinc-900 dark:text-zinc-100", children: item.href ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
7034
|
+
Link,
|
|
7035
|
+
{
|
|
7036
|
+
href: item.href,
|
|
7037
|
+
className: "no-underline after:absolute after:inset-0 after:content-[''] hover:underline",
|
|
7038
|
+
children: item.title
|
|
7039
|
+
}
|
|
7040
|
+
) : item.title }),
|
|
7041
|
+
item.meta != null && /* @__PURE__ */ jsxRuntime.jsx("span", { "data-react-fancy-index-meta": "", className: "shrink-0 truncate text-sm text-zinc-500 dark:text-zinc-400", children: item.meta }),
|
|
7042
|
+
item.value != null && /* @__PURE__ */ jsxRuntime.jsx("span", { "data-react-fancy-index-value": "", className: "ml-auto shrink-0 font-mono text-xs tabular-nums text-zinc-500 dark:text-zinc-400", children: item.value })
|
|
7043
|
+
]
|
|
7044
|
+
},
|
|
7045
|
+
item.id ?? i
|
|
7046
|
+
)) });
|
|
7047
|
+
}
|
|
7048
|
+
);
|
|
7049
|
+
IndexList.displayName = "IndexList";
|
|
7050
|
+
var StatBand = react.forwardRef(
|
|
7051
|
+
({ columns = 4, className, style, children, ...props }, ref) => {
|
|
7052
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
7053
|
+
"div",
|
|
7054
|
+
{
|
|
7055
|
+
ref,
|
|
7056
|
+
"data-react-fancy-stat-band": "",
|
|
7057
|
+
className: cn("grid gap-6", className),
|
|
7058
|
+
style: { gridTemplateColumns: `repeat(${columns}, minmax(0, 1fr))`, ...style },
|
|
7059
|
+
...props,
|
|
7060
|
+
children
|
|
7061
|
+
}
|
|
7062
|
+
);
|
|
7063
|
+
}
|
|
7064
|
+
);
|
|
7065
|
+
StatBand.displayName = "StatBand";
|
|
7066
|
+
var valueClasses = {
|
|
7067
|
+
sm: "text-xl",
|
|
7068
|
+
md: "text-3xl",
|
|
7069
|
+
lg: "text-5xl"
|
|
7070
|
+
};
|
|
7071
|
+
var StatRoot = react.forwardRef(
|
|
7072
|
+
({ value, label, size = "md", className, children, ...props }, ref) => {
|
|
7073
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { ref, "data-react-fancy-stat": "", className: cn(className), ...props, children: children ?? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
7074
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7075
|
+
"div",
|
|
7076
|
+
{
|
|
7077
|
+
"data-react-fancy-stat-value": "",
|
|
7078
|
+
className: cn(
|
|
7079
|
+
"font-semibold leading-none tracking-tight text-zinc-900 tabular-nums dark:text-zinc-100",
|
|
7080
|
+
valueClasses[size]
|
|
7081
|
+
),
|
|
7082
|
+
children: value
|
|
7083
|
+
}
|
|
7084
|
+
),
|
|
7085
|
+
label != null && /* @__PURE__ */ jsxRuntime.jsx(
|
|
7086
|
+
"div",
|
|
7087
|
+
{
|
|
7088
|
+
"data-react-fancy-stat-label": "",
|
|
7089
|
+
className: "mt-1.5 font-mono text-xs uppercase tracking-wide text-zinc-500 dark:text-zinc-400",
|
|
7090
|
+
children: label
|
|
7091
|
+
}
|
|
7092
|
+
)
|
|
7093
|
+
] }) });
|
|
7094
|
+
}
|
|
7095
|
+
);
|
|
7096
|
+
StatRoot.displayName = "Stat";
|
|
7097
|
+
var Stat = Object.assign(StatRoot, { Band: StatBand });
|
|
7023
7098
|
var gapClasses2 = {
|
|
7024
7099
|
sm: "gap-2",
|
|
7025
7100
|
md: "gap-3",
|
|
@@ -16592,6 +16667,7 @@ exports.FormProvider = FormProvider;
|
|
|
16592
16667
|
exports.Heading = Heading;
|
|
16593
16668
|
exports.Icon = Icon;
|
|
16594
16669
|
exports.ImageViewer = ImageViewer;
|
|
16670
|
+
exports.IndexList = IndexList;
|
|
16595
16671
|
exports.Input = Input;
|
|
16596
16672
|
exports.InputTag = InputTag;
|
|
16597
16673
|
exports.Kanban = Kanban;
|
|
@@ -16622,6 +16698,8 @@ exports.Separator = Separator;
|
|
|
16622
16698
|
exports.Sidebar = Sidebar;
|
|
16623
16699
|
exports.Skeleton = Skeleton;
|
|
16624
16700
|
exports.Slider = Slider;
|
|
16701
|
+
exports.Stat = Stat;
|
|
16702
|
+
exports.StatBand = StatBand;
|
|
16625
16703
|
exports.StickyNote = StickyNote;
|
|
16626
16704
|
exports.Switch = Switch;
|
|
16627
16705
|
exports.Table = Table;
|