analytica-frontend-lib 1.1.42 → 1.1.44
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/Menu/index.d.mts +1 -0
- package/dist/Menu/index.d.ts +1 -0
- package/dist/Menu/index.js +15 -2
- package/dist/Menu/index.js.map +1 -1
- package/dist/Menu/index.mjs +15 -2
- package/dist/Menu/index.mjs.map +1 -1
- package/dist/Quiz/index.js +1 -1
- package/dist/Quiz/index.js.map +1 -1
- package/dist/Quiz/index.mjs +1 -1
- package/dist/Quiz/index.mjs.map +1 -1
- package/dist/index.css +0 -3
- package/dist/index.css.map +1 -1
- package/dist/index.js +16 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +16 -3
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +0 -3
- package/dist/styles.css.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6472,6 +6472,18 @@ var MenuContent = (0, import_react21.forwardRef)(
|
|
|
6472
6472
|
({ className, children, variant = "menu", ...props }, ref) => {
|
|
6473
6473
|
const baseClasses = "w-full flex flex-row items-center gap-2";
|
|
6474
6474
|
const variantClasses = variant === "menu2" ? "overflow-x-auto scroll-smooth" : "";
|
|
6475
|
+
const childrenArray = import_react21.Children.toArray(children);
|
|
6476
|
+
const menuItemCount = childrenArray.filter(
|
|
6477
|
+
(child) => (0, import_react21.isValidElement)(child) && child.type === MenuItem
|
|
6478
|
+
).length;
|
|
6479
|
+
const enhancedChildren = variant === "menu2" ? import_react21.Children.map(children, (child) => {
|
|
6480
|
+
if ((0, import_react21.isValidElement)(child) && child.type === MenuItem) {
|
|
6481
|
+
return (0, import_react21.cloneElement)(child, {
|
|
6482
|
+
itemCount: menuItemCount
|
|
6483
|
+
});
|
|
6484
|
+
}
|
|
6485
|
+
return child;
|
|
6486
|
+
}) : children;
|
|
6475
6487
|
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
6476
6488
|
"ul",
|
|
6477
6489
|
{
|
|
@@ -6484,7 +6496,7 @@ var MenuContent = (0, import_react21.forwardRef)(
|
|
|
6484
6496
|
`,
|
|
6485
6497
|
style: variant === "menu2" ? { scrollbarWidth: "none", msOverflowStyle: "none" } : void 0,
|
|
6486
6498
|
...props,
|
|
6487
|
-
children
|
|
6499
|
+
children: enhancedChildren
|
|
6488
6500
|
}
|
|
6489
6501
|
);
|
|
6490
6502
|
}
|
|
@@ -6499,6 +6511,7 @@ var MenuItem = (0, import_react21.forwardRef)(
|
|
|
6499
6511
|
store: externalStore,
|
|
6500
6512
|
variant = "menu",
|
|
6501
6513
|
separator = false,
|
|
6514
|
+
itemCount = 1,
|
|
6502
6515
|
...props
|
|
6503
6516
|
}, ref) => {
|
|
6504
6517
|
const store = useMenuStore(externalStore);
|
|
@@ -6544,7 +6557,7 @@ var MenuItem = (0, import_react21.forwardRef)(
|
|
|
6544
6557
|
{
|
|
6545
6558
|
"data-variant": "menu2",
|
|
6546
6559
|
className: `
|
|
6547
|
-
w-fit flex flex-col items-center px-2 pt-4 gap-3 cursor-pointer focus:rounded-sm justify-center hover:bg-background-100 rounded-lg
|
|
6560
|
+
${itemCount === 1 ? "w-fit" : "w-full"} flex flex-col items-center px-2 pt-4 gap-3 cursor-pointer focus:rounded-sm justify-center hover:bg-background-100 rounded-lg
|
|
6548
6561
|
focus:outline-none focus:border-indicator-info focus:border-2
|
|
6549
6562
|
${selectedValue === value ? "" : "pb-4"}
|
|
6550
6563
|
`,
|
|
@@ -10138,7 +10151,7 @@ var QuizListResult = (0, import_react28.forwardRef)(({ className, onSubjectClick
|
|
|
10138
10151
|
CardResults,
|
|
10139
10152
|
{
|
|
10140
10153
|
onClick: () => onSubjectClick?.(subject.subject.id),
|
|
10141
|
-
className: "max-w-full
|
|
10154
|
+
className: "max-w-full",
|
|
10142
10155
|
header: subject.subject.name,
|
|
10143
10156
|
correct_answers: subject.correct,
|
|
10144
10157
|
incorrect_answers: subject.incorrect,
|