analytica-frontend-lib 1.0.63 → 1.0.65
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/Calendar/index.js +5 -5
- package/dist/Calendar/index.js.map +1 -1
- package/dist/Calendar/index.mjs +5 -5
- package/dist/Calendar/index.mjs.map +1 -1
- package/dist/Card/index.js +7 -7
- package/dist/Card/index.js.map +1 -1
- package/dist/Card/index.mjs +7 -7
- package/dist/Card/index.mjs.map +1 -1
- package/dist/DropdownMenu/index.js +3 -3
- package/dist/DropdownMenu/index.js.map +1 -1
- package/dist/DropdownMenu/index.mjs +3 -3
- package/dist/DropdownMenu/index.mjs.map +1 -1
- package/dist/Menu/index.d.mts +3 -2
- package/dist/Menu/index.d.ts +3 -2
- package/dist/Menu/index.js +47 -46
- package/dist/Menu/index.js.map +1 -1
- package/dist/Menu/index.mjs +47 -45
- package/dist/Menu/index.mjs.map +1 -1
- package/dist/index.css +221 -15
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +62 -61
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +62 -60
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +221 -15
- package/dist/styles.css.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -2522,16 +2522,16 @@ var Calendar = ({
|
|
|
2522
2522
|
onDateSelect?.(day.date);
|
|
2523
2523
|
};
|
|
2524
2524
|
if (variant === "navigation") {
|
|
2525
|
-
return /* @__PURE__ */ jsxs16("div", { className: `bg-background rounded-xl
|
|
2525
|
+
return /* @__PURE__ */ jsxs16("div", { className: `bg-background rounded-xl pt-6 ${className}`, children: [
|
|
2526
2526
|
/* @__PURE__ */ jsxs16("div", { className: "flex items-center justify-between mb-4 px-6", children: [
|
|
2527
2527
|
/* @__PURE__ */ jsxs16("div", { className: "relative", ref: monthPickerContainerRef, children: [
|
|
2528
2528
|
/* @__PURE__ */ jsxs16(
|
|
2529
2529
|
"button",
|
|
2530
2530
|
{
|
|
2531
2531
|
onClick: toggleMonthPicker,
|
|
2532
|
-
className: "flex items-center gap-1
|
|
2532
|
+
className: "flex items-center group gap-1 rounded transition-colors cursor-pointer",
|
|
2533
2533
|
children: [
|
|
2534
|
-
/* @__PURE__ */ jsxs16("span", { className: "text-sm font-medium text-text-600", children: [
|
|
2534
|
+
/* @__PURE__ */ jsxs16("span", { className: "text-sm font-medium text-text-600 group-hover:text-primary-950", children: [
|
|
2535
2535
|
MONTH_NAMES[currentDate.getMonth()],
|
|
2536
2536
|
" ",
|
|
2537
2537
|
currentDate.getFullYear()
|
|
@@ -2623,7 +2623,7 @@ var Calendar = ({
|
|
|
2623
2623
|
)
|
|
2624
2624
|
] })
|
|
2625
2625
|
] }),
|
|
2626
|
-
/* @__PURE__ */ jsx21("div", { className: "grid grid-cols-7 gap-1 mb-2", children: WEEK_DAYS_SHORT.map((day, index) => /* @__PURE__ */ jsx21(
|
|
2626
|
+
/* @__PURE__ */ jsx21("div", { className: "grid grid-cols-7 gap-1 mb-2 px-3", children: WEEK_DAYS_SHORT.map((day, index) => /* @__PURE__ */ jsx21(
|
|
2627
2627
|
"div",
|
|
2628
2628
|
{
|
|
2629
2629
|
className: "h-9 flex items-center justify-center text-xs font-normal text-text-600",
|
|
@@ -2631,7 +2631,7 @@ var Calendar = ({
|
|
|
2631
2631
|
},
|
|
2632
2632
|
`${day}-${index}`
|
|
2633
2633
|
)) }),
|
|
2634
|
-
/* @__PURE__ */ jsx21("div", { className: "grid grid-cols-7 gap-1", children: calendarData.map((day) => {
|
|
2634
|
+
/* @__PURE__ */ jsx21("div", { className: "grid grid-cols-7 gap-1 px-3", children: calendarData.map((day) => {
|
|
2635
2635
|
if (!day.isCurrentMonth) {
|
|
2636
2636
|
return /* @__PURE__ */ jsx21(
|
|
2637
2637
|
"div",
|
|
@@ -3228,7 +3228,7 @@ var ProfileMenuTrigger = forwardRef9(({ className, onClick, store: externalStore
|
|
|
3228
3228
|
"button",
|
|
3229
3229
|
{
|
|
3230
3230
|
ref,
|
|
3231
|
-
className: `rounded-lg size-10 bg-
|
|
3231
|
+
className: `rounded-lg size-10 bg-primary-50 flex items-center justify-center cursor-pointer ${className}`,
|
|
3232
3232
|
onClick: (e) => {
|
|
3233
3233
|
e.stopPropagation();
|
|
3234
3234
|
toggleOpen();
|
|
@@ -3236,7 +3236,7 @@ var ProfileMenuTrigger = forwardRef9(({ className, onClick, store: externalStore
|
|
|
3236
3236
|
},
|
|
3237
3237
|
"aria-expanded": open,
|
|
3238
3238
|
...props,
|
|
3239
|
-
children: /* @__PURE__ */ jsx23("span", { className: "size-6 rounded-full bg-
|
|
3239
|
+
children: /* @__PURE__ */ jsx23("span", { className: "size-6 rounded-full bg-primary-100 flex items-center justify-center", children: /* @__PURE__ */ jsx23(User, { className: "text-primary-950", size: 18 }) })
|
|
3240
3240
|
}
|
|
3241
3241
|
);
|
|
3242
3242
|
});
|
|
@@ -3253,7 +3253,7 @@ var ProfileMenuHeader = forwardRef9(({ className, name, email, store: _store, ..
|
|
|
3253
3253
|
`,
|
|
3254
3254
|
...props,
|
|
3255
3255
|
children: [
|
|
3256
|
-
/* @__PURE__ */ jsx23("span", { className: "size-16 bg-
|
|
3256
|
+
/* @__PURE__ */ jsx23("span", { className: "size-16 bg-primary-100 rounded-full flex items-center justify-center", children: /* @__PURE__ */ jsx23(User, { size: 34, className: "text-primary-950" }) }),
|
|
3257
3257
|
/* @__PURE__ */ jsxs18("div", { className: "flex flex-col ", children: [
|
|
3258
3258
|
/* @__PURE__ */ jsx23("p", { className: "text-xl font-bold text-text-950", children: name }),
|
|
3259
3259
|
/* @__PURE__ */ jsx23("p", { className: "text-md text-text-600", children: email })
|
|
@@ -3665,9 +3665,13 @@ import {
|
|
|
3665
3665
|
} from "react";
|
|
3666
3666
|
import { CaretLeft, CaretRight } from "phosphor-react";
|
|
3667
3667
|
import { jsx as jsx25, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
3668
|
-
var createMenuStore = () => create4((set) => ({
|
|
3668
|
+
var createMenuStore = (onValueChange) => create4((set) => ({
|
|
3669
3669
|
value: "",
|
|
3670
|
-
setValue: (value) =>
|
|
3670
|
+
setValue: (value) => {
|
|
3671
|
+
set({ value });
|
|
3672
|
+
onValueChange?.(value);
|
|
3673
|
+
},
|
|
3674
|
+
onValueChange
|
|
3671
3675
|
}));
|
|
3672
3676
|
var useMenuStore = (externalStore) => {
|
|
3673
3677
|
if (!externalStore) throw new Error("MenuItem must be inside Menu");
|
|
@@ -3689,22 +3693,12 @@ var Menu = forwardRef11(
|
|
|
3689
3693
|
...props
|
|
3690
3694
|
}, ref) => {
|
|
3691
3695
|
const storeRef = useRef4(null);
|
|
3692
|
-
storeRef.current ??= createMenuStore();
|
|
3696
|
+
storeRef.current ??= createMenuStore(onValueChange);
|
|
3693
3697
|
const store = storeRef.current;
|
|
3694
|
-
const { setValue
|
|
3698
|
+
const { setValue } = useStore3(store, (s) => s);
|
|
3695
3699
|
useEffect5(() => {
|
|
3696
3700
|
setValue(propValue ?? defaultValue);
|
|
3697
3701
|
}, [defaultValue, propValue, setValue]);
|
|
3698
|
-
const onValueChangeRef = useRef4(onValueChange);
|
|
3699
|
-
const isInitializedRef = useRef4(false);
|
|
3700
|
-
onValueChangeRef.current = onValueChange;
|
|
3701
|
-
useEffect5(() => {
|
|
3702
|
-
if (isInitializedRef.current) {
|
|
3703
|
-
onValueChangeRef.current?.(value);
|
|
3704
|
-
} else {
|
|
3705
|
-
isInitializedRef.current = true;
|
|
3706
|
-
}
|
|
3707
|
-
}, [value]);
|
|
3708
3702
|
const baseClasses = "w-full py-2 px-6 flex flex-row items-center justify-center";
|
|
3709
3703
|
const variantClasses = VARIANT_CLASSES5[variant];
|
|
3710
3704
|
return /* @__PURE__ */ jsx25(
|
|
@@ -3734,6 +3728,7 @@ var MenuContent = forwardRef11(
|
|
|
3734
3728
|
className: `
|
|
3735
3729
|
${baseClasses}
|
|
3736
3730
|
${variantClasses}
|
|
3731
|
+
${variant == "breadcrumb" ? "flex-wrap" : ""}
|
|
3737
3732
|
${className ?? ""}
|
|
3738
3733
|
`,
|
|
3739
3734
|
style: variant === "menu2" ? { scrollbarWidth: "none", msOverflowStyle: "none" } : void 0,
|
|
@@ -3752,12 +3747,15 @@ var MenuItem = forwardRef11(
|
|
|
3752
3747
|
disabled = false,
|
|
3753
3748
|
store: externalStore,
|
|
3754
3749
|
variant = "menu",
|
|
3750
|
+
separator = false,
|
|
3755
3751
|
...props
|
|
3756
3752
|
}, ref) => {
|
|
3757
3753
|
const store = useMenuStore(externalStore);
|
|
3758
3754
|
const { value: selectedValue, setValue } = useStore3(store, (s) => s);
|
|
3759
3755
|
const handleClick = (e) => {
|
|
3760
|
-
if (!disabled)
|
|
3756
|
+
if (!disabled) {
|
|
3757
|
+
setValue(value);
|
|
3758
|
+
}
|
|
3761
3759
|
props.onClick?.(e);
|
|
3762
3760
|
};
|
|
3763
3761
|
const commonProps = {
|
|
@@ -3790,41 +3788,59 @@ var MenuItem = forwardRef11(
|
|
|
3790
3788
|
children
|
|
3791
3789
|
}
|
|
3792
3790
|
),
|
|
3793
|
-
menu2: /* @__PURE__ */
|
|
3791
|
+
menu2: /* @__PURE__ */ jsxs20(
|
|
3794
3792
|
"li",
|
|
3795
3793
|
{
|
|
3796
3794
|
"data-variant": "menu2",
|
|
3797
3795
|
className: `
|
|
3798
|
-
w-full flex flex-
|
|
3799
|
-
focus:outline-none focus:border-indicator-info focus:border-2
|
|
3800
|
-
${selectedValue === value ? "
|
|
3801
|
-
${className ?? ""}
|
|
3796
|
+
w-full flex flex-col items-center px-4 pt-4 gap-3 border-b-4 border-transparent cursor-pointer focus:rounded-sm justify-center hover:bg-background-100 rounded-lg
|
|
3797
|
+
focus:outline-none focus:border-indicator-info focus:border-2
|
|
3798
|
+
${selectedValue === value ? "" : "pb-4"}
|
|
3802
3799
|
`,
|
|
3803
3800
|
...commonProps,
|
|
3804
|
-
children
|
|
3801
|
+
children: [
|
|
3802
|
+
/* @__PURE__ */ jsx25(
|
|
3803
|
+
"span",
|
|
3804
|
+
{
|
|
3805
|
+
className: `flex flex-row items-center gap-2 px-2 text-text-950 text-xs font-bold ${className ?? ""}`,
|
|
3806
|
+
children
|
|
3807
|
+
}
|
|
3808
|
+
),
|
|
3809
|
+
selectedValue === value && /* @__PURE__ */ jsx25("div", { className: "h-1 w-full bg-primary-950 rounded-lg" })
|
|
3810
|
+
]
|
|
3805
3811
|
}
|
|
3806
3812
|
),
|
|
3807
|
-
breadcrumb: /* @__PURE__ */
|
|
3813
|
+
breadcrumb: /* @__PURE__ */ jsxs20(
|
|
3808
3814
|
"li",
|
|
3809
3815
|
{
|
|
3810
3816
|
"data-variant": "breadcrumb",
|
|
3811
3817
|
className: `
|
|
3812
|
-
w-
|
|
3818
|
+
flex flex-row gap-2 items-center w-fit p-2 rounded-lg hover:text-primary-600 cursor-pointer font-bold text-xs
|
|
3813
3819
|
focus:outline-none focus:border-indicator-info focus:border-2
|
|
3814
3820
|
${selectedValue === value ? "text-text-950" : "text-text-600"}
|
|
3815
3821
|
${className ?? ""}
|
|
3816
3822
|
`,
|
|
3817
3823
|
...commonProps,
|
|
3818
|
-
children:
|
|
3819
|
-
|
|
3820
|
-
|
|
3821
|
-
|
|
3824
|
+
children: [
|
|
3825
|
+
/* @__PURE__ */ jsx25(
|
|
3826
|
+
"span",
|
|
3827
|
+
{
|
|
3828
|
+
className: `
|
|
3822
3829
|
border-b border-text-600 hover:border-primary-600 text-inherit text-xs
|
|
3823
|
-
${selectedValue === value ? "border-b-0 font-bold" : "border-b-
|
|
3830
|
+
${selectedValue === value ? "border-b-0 font-bold" : "border-b-text-600"}
|
|
3824
3831
|
`,
|
|
3825
|
-
|
|
3826
|
-
|
|
3827
|
-
|
|
3832
|
+
children
|
|
3833
|
+
}
|
|
3834
|
+
),
|
|
3835
|
+
separator && /* @__PURE__ */ jsx25(
|
|
3836
|
+
CaretRight,
|
|
3837
|
+
{
|
|
3838
|
+
size: 16,
|
|
3839
|
+
className: "text-text-600",
|
|
3840
|
+
"data-testid": "separator"
|
|
3841
|
+
}
|
|
3842
|
+
)
|
|
3843
|
+
]
|
|
3828
3844
|
}
|
|
3829
3845
|
)
|
|
3830
3846
|
};
|
|
@@ -3832,19 +3848,6 @@ var MenuItem = forwardRef11(
|
|
|
3832
3848
|
}
|
|
3833
3849
|
);
|
|
3834
3850
|
MenuItem.displayName = "MenuItem";
|
|
3835
|
-
var MenuSeparator = forwardRef11(
|
|
3836
|
-
({ className, children, ...props }, ref) => /* @__PURE__ */ jsx25(
|
|
3837
|
-
"li",
|
|
3838
|
-
{
|
|
3839
|
-
ref,
|
|
3840
|
-
"aria-hidden": "true",
|
|
3841
|
-
className: `[&>svg]:w-4 [&>svg]:h-4 text-text-600 ${className ?? ""}`,
|
|
3842
|
-
...props,
|
|
3843
|
-
children: children ?? /* @__PURE__ */ jsx25(CaretRight, {})
|
|
3844
|
-
}
|
|
3845
|
-
)
|
|
3846
|
-
);
|
|
3847
|
-
MenuSeparator.displayName = "MenuSeparator";
|
|
3848
3851
|
var internalScroll = (container, direction) => {
|
|
3849
3852
|
if (!container) return;
|
|
3850
3853
|
container.scrollBy({
|
|
@@ -4217,10 +4220,10 @@ var CardProgress = forwardRef12(
|
|
|
4217
4220
|
className: `
|
|
4218
4221
|
flex justify-center items-center [&>svg]:size-6 text-text-950
|
|
4219
4222
|
${isHorizontal ? "min-w-[80px] min-h-[80px] rounded-l-xl" : "min-h-[50px] w-full rounded-t-xl"}
|
|
4223
|
+
${!color.startsWith("#") ? `bg-${color}` : ""}
|
|
4220
4224
|
`,
|
|
4221
|
-
style: {
|
|
4222
|
-
|
|
4223
|
-
},
|
|
4225
|
+
style: color.startsWith("#") ? { backgroundColor: color } : void 0,
|
|
4226
|
+
"data-testid": "icon-container",
|
|
4224
4227
|
children: icon
|
|
4225
4228
|
}
|
|
4226
4229
|
),
|
|
@@ -4317,7 +4320,8 @@ var CardPerformance = forwardRef12(
|
|
|
4317
4320
|
layout: "horizontal",
|
|
4318
4321
|
padding: "medium",
|
|
4319
4322
|
minHeight: "none",
|
|
4320
|
-
className: `justify-between gap-2 ${className}`,
|
|
4323
|
+
className: `justify-between gap-2 ${actionVariant == "caret" ? "cursor-pointer" : ""} ${className}`,
|
|
4324
|
+
onClick: () => actionVariant == "caret" && onClickButton?.(valueButton),
|
|
4321
4325
|
...props,
|
|
4322
4326
|
children: [
|
|
4323
4327
|
/* @__PURE__ */ jsxs21("div", { className: "w-full flex flex-col justify-between gap-2", children: [
|
|
@@ -4346,8 +4350,7 @@ var CardPerformance = forwardRef12(
|
|
|
4346
4350
|
CaretRight2,
|
|
4347
4351
|
{
|
|
4348
4352
|
className: "size-4.5 text-text-800 cursor-pointer",
|
|
4349
|
-
"data-testid": "caret-icon"
|
|
4350
|
-
onClick: () => onClickButton?.(valueButton)
|
|
4353
|
+
"data-testid": "caret-icon"
|
|
4351
4354
|
}
|
|
4352
4355
|
)
|
|
4353
4356
|
]
|
|
@@ -4682,7 +4685,7 @@ var CardAudio = forwardRef12(
|
|
|
4682
4685
|
layout: "horizontal",
|
|
4683
4686
|
padding: "medium",
|
|
4684
4687
|
minHeight: "none",
|
|
4685
|
-
className: `w-auto h-14 items-center gap-2
|
|
4688
|
+
className: `w-auto h-14 items-center gap-2 ${className}`,
|
|
4686
4689
|
...props,
|
|
4687
4690
|
children: [
|
|
4688
4691
|
/* @__PURE__ */ jsx26(
|
|
@@ -5011,7 +5014,6 @@ export {
|
|
|
5011
5014
|
MenuItem,
|
|
5012
5015
|
MenuLabel,
|
|
5013
5016
|
MenuOverflow,
|
|
5014
|
-
MenuSeparator,
|
|
5015
5017
|
Modal_default as Modal,
|
|
5016
5018
|
NavButton_default as NavButton,
|
|
5017
5019
|
ProfileMenuFooter,
|