@axzydev/axzy_ui_system 1.8.14 → 1.8.16

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 CHANGED
@@ -2696,10 +2696,8 @@ var import_jsx_runtime16 = require("react/jsx-runtime");
2696
2696
  function cn(...inputs) {
2697
2697
  return (0, import_tailwind_merge.twMerge)((0, import_clsx13.clsx)(inputs));
2698
2698
  }
2699
- var START_HOUR = 6;
2700
- var END_HOUR = 22;
2701
- var HOURS_COUNT = END_HOUR - START_HOUR;
2702
- var TIME_SLOTS = Array.from({ length: HOURS_COUNT + 1 }, (_, i) => START_HOUR + i);
2699
+ var DEFAULT_START_HOUR = 6;
2700
+ var DEFAULT_END_HOUR = 22;
2703
2701
  var ITCalendar = ({
2704
2702
  events = [],
2705
2703
  mode: modeProp,
@@ -2715,8 +2713,18 @@ var ITCalendar = ({
2715
2713
  minDate,
2716
2714
  maxDate,
2717
2715
  className,
2718
- variant = "primary"
2716
+ variant = "primary",
2717
+ resources,
2718
+ startHour = DEFAULT_START_HOUR,
2719
+ endHour = DEFAULT_END_HOUR,
2720
+ hourHeight = 80,
2721
+ hideToolbar = false,
2722
+ showNowTime = false
2719
2723
  }) => {
2724
+ const START_HOUR = startHour;
2725
+ const END_HOUR = endHour;
2726
+ const TIME_SLOTS = Array.from({ length: END_HOUR - START_HOUR + 1 }, (_, i) => START_HOUR + i);
2727
+ const toPx = (minutes) => minutes / 60 * hourHeight;
2720
2728
  const { t, dateLocale } = useITTranslation();
2721
2729
  const mode = modeProp || (onChange ? "month" : "week");
2722
2730
  const [currentDate, setCurrentDate] = (0, import_react18.useState)(value || /* @__PURE__ */ new Date());
@@ -2801,8 +2809,8 @@ var ITCalendar = ({
2801
2809
  const dayStartMinutes = START_HOUR * 60;
2802
2810
  const duration = (0, import_date_fns.differenceInMinutes)(end, start);
2803
2811
  return {
2804
- top: `${(startMinutes - dayStartMinutes) / 60 * 80}px`,
2805
- height: `${duration / 60 * 80}px`
2812
+ top: `${toPx(startMinutes - dayStartMinutes)}px`,
2813
+ height: `${toPx(duration)}px`
2806
2814
  };
2807
2815
  };
2808
2816
  const weekEvents = (0, import_react18.useMemo)(() => {
@@ -2876,7 +2884,7 @@ var ITCalendar = ({
2876
2884
  setDragCurrent(null);
2877
2885
  },
2878
2886
  children: [
2879
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
2887
+ !hideToolbar && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
2880
2888
  "div",
2881
2889
  {
2882
2890
  className: "flex items-center justify-between px-2 py-2 border-b",
@@ -3067,183 +3075,181 @@ var ITCalendar = ({
3067
3075
  }) })
3068
3076
  ] }) : (
3069
3077
  /* Week/Day View (Scheduler) */
3070
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: cn("flex h-full", mode === "week" ? "min-w-[800px]" : "w-full"), children: [
3071
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3072
- "div",
3073
- {
3074
- className: "flex-none w-16 pt-10 select-none",
3075
- style: {
3076
- backgroundColor: "var(--it-calendar-header-hover, #f1f5f9)",
3077
- borderRight: "1px solid var(--it-calendar-border, #e2e8f0)"
3078
- },
3079
- children: TIME_SLOTS.map((hour) => hour < END_HOUR && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "h-20 relative text-right pr-2", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ITText, { as: "span", className: "text-xs text-slate-400 dark:text-slate-500 -mt-2 inline-block transform -translate-y-1/2", children: (0, import_date_fns.format)((/* @__PURE__ */ new Date()).setHours(hour, 0), "HH:mm") }) }, hour))
3080
- }
3081
- ),
3082
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "flex flex-1", children: viewDays.map((day) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
3083
- "div",
3084
- {
3085
- className: "flex-1 min-w-[120px] relative",
3086
- style: { borderRight: "1px solid var(--it-calendar-border, #e2e8f0)" },
3087
- children: [
3088
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
3089
- "div",
3090
- {
3091
- className: "h-10 flex flex-col items-center justify-center sticky top-0 z-10",
3092
- style: {
3093
- backgroundColor: (0, import_date_fns.isToday)(day) ? "var(--it-calendar-today-bg, #eff6ff)" : "var(--it-calendar-bg, #ffffff)",
3094
- borderBottom: "1px solid var(--it-calendar-border, #e2e8f0)"
3095
- },
3096
- children: [
3097
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3098
- ITText,
3099
- {
3100
- as: "span",
3101
- className: "text-xs font-semibold uppercase",
3102
- style: {
3103
- color: (0, import_date_fns.isToday)(day) ? "var(--it-calendar-today-text, #2563eb)" : "var(--it-calendar-days-text, #334155)",
3104
- opacity: (0, import_date_fns.isToday)(day) ? 1 : 0.6
3105
- },
3106
- children: (0, import_date_fns.format)(day, "EEE", { locale: dateLocale })
3107
- }
3108
- ),
3109
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3110
- ITText,
3111
- {
3112
- as: "span",
3113
- className: "text-sm font-bold w-6 h-6 flex items-center justify-center rounded-full mt-0.5",
3114
- style: {
3115
- color: (0, import_date_fns.isToday)(day) ? "var(--it-calendar-selected-text, #ffffff)" : "var(--it-calendar-days-text, #334155)",
3116
- backgroundColor: (0, import_date_fns.isToday)(day) ? "var(--it-calendar-selected-bg, #2563eb)" : "transparent"
3117
- },
3118
- children: (0, import_date_fns.format)(day, "d")
3119
- }
3120
- )
3121
- ]
3122
- }
3123
- ),
3124
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "relative", children: [
3125
- TIME_SLOTS.map((hour) => hour < END_HOUR && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
3078
+ (() => {
3079
+ const byResource = mode === "day" && !!resources?.length;
3080
+ const headerHeight = byResource ? 64 : 40;
3081
+ const columns = byResource ? resources.map((r) => ({ key: r.id, day: viewDays[0], resource: r })) : viewDays.map((d) => ({ key: d.toISOString(), day: d, resource: void 0 }));
3082
+ const now = /* @__PURE__ */ new Date();
3083
+ const nowMinutes = now.getHours() * 60 + now.getMinutes();
3084
+ const nowVisible = nowMinutes >= START_HOUR * 60 && nowMinutes <= END_HOUR * 60;
3085
+ const slotDate = (day, hour, minute) => {
3086
+ const d = new Date(day);
3087
+ d.setHours(hour, minute, 0, 0);
3088
+ return d;
3089
+ };
3090
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: cn("flex", mode === "week" ? "min-w-[800px]" : byResource ? "w-full" : "w-full"), style: byResource ? { minWidth: `${64 + columns.length * 160}px` } : void 0, children: [
3091
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3092
+ "div",
3093
+ {
3094
+ className: "flex-none w-16 select-none",
3095
+ style: {
3096
+ paddingTop: `${headerHeight}px`,
3097
+ backgroundColor: "var(--it-calendar-header-hover, #f1f5f9)",
3098
+ borderRight: "1px solid var(--it-calendar-border, #e2e8f0)"
3099
+ },
3100
+ children: TIME_SLOTS.map((hour) => hour < END_HOUR && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "relative text-right pr-2", style: { height: `${hourHeight}px` }, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ITText, { as: "span", className: "text-xs text-slate-400 dark:text-slate-500 inline-block pt-1", children: (0, import_date_fns.format)((/* @__PURE__ */ new Date()).setHours(hour, 0), "HH:mm") }) }, hour))
3101
+ }
3102
+ ),
3103
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "flex flex-1", children: columns.map(({ key, day, resource }, colIndex) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
3104
+ "div",
3105
+ {
3106
+ className: cn("flex-1 relative", byResource ? "min-w-[160px]" : "min-w-[120px]"),
3107
+ style: { borderRight: colIndex < columns.length - 1 || !byResource ? "1px solid var(--it-calendar-border, #e2e8f0)" : void 0 },
3108
+ children: [
3109
+ resource ? /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
3126
3110
  "div",
3127
3111
  {
3128
- className: "h-20 relative group",
3129
- style: { borderBottom: "1px dashed var(--it-calendar-border, #e2e8f0)" },
3112
+ className: "flex items-center gap-3 px-3 sticky top-0 z-10",
3113
+ style: {
3114
+ height: `${headerHeight}px`,
3115
+ backgroundColor: "var(--it-calendar-bg, #ffffff)",
3116
+ borderBottom: "1px solid var(--it-calendar-border, #e2e8f0)"
3117
+ },
3118
+ children: [
3119
+ resource.avatar,
3120
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "min-w-0", children: [
3121
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ITText, { as: "div", className: "text-sm font-semibold truncate", style: { color: "var(--it-calendar-header-text, #1e293b)" }, children: resource.title }),
3122
+ resource.subtitle && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ITText, { as: "div", className: "text-xs truncate", style: { color: "var(--it-calendar-days-text, #334155)", opacity: 0.7 }, children: resource.subtitle })
3123
+ ] })
3124
+ ]
3125
+ }
3126
+ ) : /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
3127
+ "div",
3128
+ {
3129
+ className: "flex flex-col items-center justify-center sticky top-0 z-10",
3130
+ style: {
3131
+ height: `${headerHeight}px`,
3132
+ backgroundColor: (0, import_date_fns.isToday)(day) ? "var(--it-calendar-today-bg, #eff6ff)" : "var(--it-calendar-bg, #ffffff)",
3133
+ borderBottom: "1px solid var(--it-calendar-border, #e2e8f0)"
3134
+ },
3130
3135
  children: [
3131
3136
  /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3132
- "div",
3137
+ ITText,
3133
3138
  {
3134
- className: "absolute inset-x-0 top-0 h-10 border-b border-transparent hover:border-[var(--it-calendar-today-bg)] hover:bg-[var(--it-calendar-today-bg)] transition-colors cursor-pointer z-0",
3135
- onMouseDown: (e) => {
3136
- const d = new Date(day);
3137
- d.setHours(hour, 0, 0, 0);
3138
- handleMouseDown(d, e);
3139
- },
3140
- onMouseEnter: () => {
3141
- const d = new Date(day);
3142
- d.setHours(hour, 0, 0, 0);
3143
- handleMouseEnter(d);
3139
+ as: "span",
3140
+ className: "text-xs font-semibold uppercase",
3141
+ style: {
3142
+ color: (0, import_date_fns.isToday)(day) ? "var(--it-calendar-today-text, #2563eb)" : "var(--it-calendar-days-text, #334155)",
3143
+ opacity: (0, import_date_fns.isToday)(day) ? 1 : 0.6
3144
3144
  },
3145
- onClick: () => {
3146
- if (!isDraggingRef.current) {
3147
- const d = new Date(day);
3148
- d.setHours(hour, 0, 0, 0);
3149
- if (onSlotClick) onSlotClick(d);
3150
- }
3151
- }
3145
+ children: (0, import_date_fns.format)(day, "EEE", { locale: dateLocale })
3152
3146
  }
3153
3147
  ),
3154
3148
  /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3155
- "div",
3149
+ ITText,
3156
3150
  {
3157
- className: "absolute inset-x-0 bottom-0 h-10 hover:border-[var(--it-calendar-today-bg)] hover:bg-[var(--it-calendar-today-bg)] transition-colors cursor-pointer z-0",
3158
- onMouseDown: (e) => {
3159
- const d = new Date(day);
3160
- d.setHours(hour, 30, 0, 0);
3161
- handleMouseDown(d, e);
3162
- },
3163
- onMouseEnter: () => {
3164
- const d = new Date(day);
3165
- d.setHours(hour, 30, 0, 0);
3166
- handleMouseEnter(d);
3151
+ as: "span",
3152
+ className: "text-sm font-bold w-6 h-6 flex items-center justify-center rounded-full mt-0.5",
3153
+ style: {
3154
+ color: (0, import_date_fns.isToday)(day) ? "var(--it-calendar-selected-text, #ffffff)" : "var(--it-calendar-days-text, #334155)",
3155
+ backgroundColor: (0, import_date_fns.isToday)(day) ? "var(--it-calendar-selected-bg, #2563eb)" : "transparent"
3167
3156
  },
3168
- onClick: () => {
3169
- if (!isDraggingRef.current) {
3170
- const d = new Date(day);
3171
- d.setHours(hour, 30, 0, 0);
3172
- if (onSlotClick) onSlotClick(d);
3173
- }
3174
- }
3157
+ children: (0, import_date_fns.format)(day, "d")
3175
3158
  }
3176
3159
  )
3177
3160
  ]
3178
- },
3179
- hour
3180
- )),
3181
- dragStart && dragCurrent && (0, import_date_fns.isSameDay)(dragStart, day) && (() => {
3182
- let start = dragStart;
3183
- let end = dragCurrent;
3184
- if ((0, import_date_fns.isBefore)(end, start)) [start, end] = [end, start];
3185
- const finalEnd = (0, import_date_fns.addMinutes)(end, 30);
3186
- const startMinutes = start.getHours() * 60 + start.getMinutes();
3187
- const dayStartMinutes = START_HOUR * 60;
3188
- const duration = (0, import_date_fns.differenceInMinutes)(finalEnd, start);
3189
- const top = (startMinutes - dayStartMinutes) / 60 * 80;
3190
- const height = duration / 60 * 80;
3191
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3161
+ }
3162
+ ),
3163
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "relative", children: [
3164
+ TIME_SLOTS.map((hour) => hour < END_HOUR && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3192
3165
  "div",
3193
3166
  {
3194
- className: "absolute left-1 right-1 bg-[var(--it-calendar-selected-bg)]/30 border border-[var(--it-calendar-selected-bg)] rounded z-10 pointer-events-none",
3195
- style: { top: `${top}px`, height: `${height}px` }
3196
- }
3197
- );
3198
- })(),
3199
- weekEvents.filter((event) => (0, import_date_fns.isSameDay)(typeof event.start === "string" ? (0, import_date_fns.parseISO)(event.start) : event.start, day)).map((event) => {
3200
- const style = getEventStyle(event);
3201
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
3167
+ className: "relative group",
3168
+ style: { height: `${hourHeight}px`, borderBottom: "1px dashed var(--it-calendar-border, #e2e8f0)" },
3169
+ children: [0, 30].map((minute) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3170
+ "div",
3171
+ {
3172
+ className: cn(
3173
+ "absolute inset-x-0 border-b border-transparent hover:border-[var(--it-calendar-today-bg)] hover:bg-[var(--it-calendar-today-bg)] transition-colors cursor-pointer z-0",
3174
+ minute === 0 ? "top-0" : "bottom-0"
3175
+ ),
3176
+ style: { height: `${hourHeight / 2}px` },
3177
+ onMouseDown: (e) => handleMouseDown(slotDate(day, hour, minute), e),
3178
+ onMouseEnter: () => handleMouseEnter(slotDate(day, hour, minute)),
3179
+ onClick: () => {
3180
+ if (!isDraggingRef.current && onSlotClick) onSlotClick(slotDate(day, hour, minute), resource?.id);
3181
+ }
3182
+ },
3183
+ minute
3184
+ ))
3185
+ },
3186
+ hour
3187
+ )),
3188
+ !byResource && dragStart && dragCurrent && (0, import_date_fns.isSameDay)(dragStart, day) && (() => {
3189
+ let start = dragStart;
3190
+ let end = dragCurrent;
3191
+ if ((0, import_date_fns.isBefore)(end, start)) [start, end] = [end, start];
3192
+ const finalEnd = (0, import_date_fns.addMinutes)(end, 30);
3193
+ const startMinutes = start.getHours() * 60 + start.getMinutes();
3194
+ const top = toPx(startMinutes - START_HOUR * 60);
3195
+ const height = toPx((0, import_date_fns.differenceInMinutes)(finalEnd, start));
3196
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3197
+ "div",
3198
+ {
3199
+ className: "absolute left-1 right-1 bg-[var(--it-calendar-selected-bg)]/30 border border-[var(--it-calendar-selected-bg)] rounded z-10 pointer-events-none",
3200
+ style: { top: `${top}px`, height: `${height}px` }
3201
+ }
3202
+ );
3203
+ })(),
3204
+ weekEvents.filter((event) => (0, import_date_fns.isSameDay)(typeof event.start === "string" ? (0, import_date_fns.parseISO)(event.start) : event.start, day)).filter((event) => !resource || event.resourceId === resource.id).map((event) => {
3205
+ const style = getEventStyle(event);
3206
+ const custom = !!event.className && !event.color;
3207
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
3208
+ "div",
3209
+ {
3210
+ className: cn(
3211
+ "absolute left-1 right-1 rounded px-2 py-1 text-xs cursor-pointer hover:brightness-110 transition-all shadow-sm overflow-hidden z-20",
3212
+ !custom && "border-l-4",
3213
+ !event.color && !custom && "bg-[var(--it-calendar-today-bg)] text-[var(--it-calendar-today-text)] border-[var(--it-calendar-selected-bg)]",
3214
+ event.className
3215
+ ),
3216
+ style: {
3217
+ top: style.top,
3218
+ height: style.height,
3219
+ backgroundColor: event.color ? `${event.color}20` : void 0,
3220
+ borderColor: event.color,
3221
+ color: event.color ? event.color : void 0
3222
+ },
3223
+ onClick: (e) => {
3224
+ e.stopPropagation();
3225
+ if (onEventClick) onEventClick(event);
3226
+ },
3227
+ children: [
3228
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ITText, { as: "div", className: "font-semibold truncate", children: event.title }),
3229
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ITText, { as: "div", className: "opacity-80 truncate", children: event.subtitle ?? `${(0, import_date_fns.format)(typeof event.start === "string" ? (0, import_date_fns.parseISO)(event.start) : event.start, "HH:mm")} - ${(0, import_date_fns.format)(typeof event.end === "string" ? (0, import_date_fns.parseISO)(event.end) : event.end, "HH:mm")}` })
3230
+ ]
3231
+ },
3232
+ event.id
3233
+ );
3234
+ }),
3235
+ (0, import_date_fns.isToday)(day) && nowVisible && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
3202
3236
  "div",
3203
3237
  {
3204
- className: cn(
3205
- "absolute left-1 right-1 rounded px-2 py-1 text-xs cursor-pointer hover:brightness-95 transition-all shadow-sm overflow-hidden z-20 border-l-4",
3206
- !event.color && "bg-[var(--it-calendar-today-bg)] text-[var(--it-calendar-today-text)] border-[var(--it-calendar-selected-bg)]"
3207
- ),
3208
- style: {
3209
- top: style.top,
3210
- height: style.height,
3211
- backgroundColor: event.color ? `${event.color}20` : void 0,
3212
- borderColor: event.color,
3213
- color: event.color ? event.color : void 0
3214
- },
3215
- onClick: (e) => {
3216
- e.stopPropagation();
3217
- if (onEventClick) onEventClick(event);
3218
- },
3238
+ className: "absolute left-0 right-0 border-t-2 border-danger-500 z-30 pointer-events-none",
3239
+ style: { top: `${toPx(nowMinutes - START_HOUR * 60)}px` },
3219
3240
  children: [
3220
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ITText, { as: "div", className: "font-semibold truncate", children: event.title }),
3221
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(ITText, { as: "div", className: "opacity-80 truncate", children: [
3222
- (0, import_date_fns.format)(typeof event.start === "string" ? (0, import_date_fns.parseISO)(event.start) : event.start, "HH:mm"),
3223
- " -",
3224
- (0, import_date_fns.format)(typeof event.end === "string" ? (0, import_date_fns.parseISO)(event.end) : event.end, "HH:mm")
3225
- ] })
3241
+ (!byResource || colIndex === 0) && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "absolute -left-1.5 -top-1.5 w-3 h-3 bg-danger-500 rounded-full" }),
3242
+ showNowTime && (!byResource || colIndex === columns.length - 1) && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ITText, { as: "span", className: "absolute right-1 -top-2.5 rounded-full bg-danger-500 px-1.5 text-[10px] font-bold text-white leading-4", children: (0, import_date_fns.format)(now, "HH:mm") })
3226
3243
  ]
3227
- },
3228
- event.id
3229
- );
3230
- })
3231
- ] }),
3232
- (0, import_date_fns.isToday)(day) && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3233
- "div",
3234
- {
3235
- className: "absolute left-0 right-0 border-t-2 border-danger-500 z-30 pointer-events-none",
3236
- style: {
3237
- top: `${((/* @__PURE__ */ new Date()).getHours() * 60 + (/* @__PURE__ */ new Date()).getMinutes() - START_HOUR * 60) / 60 * 80}px`
3238
- },
3239
- children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "absolute -left-1.5 -top-1.5 w-3 h-3 bg-danger-500 rounded-full" })
3240
- }
3241
- )
3242
- ]
3243
- },
3244
- day.toISOString()
3245
- )) })
3246
- ] })
3244
+ }
3245
+ )
3246
+ ] })
3247
+ ]
3248
+ },
3249
+ key
3250
+ )) })
3251
+ ] });
3252
+ })()
3247
3253
  )
3248
3254
  }
3249
3255
  )
@@ -9252,7 +9258,7 @@ function ITSidebar({
9252
9258
  style: { backgroundColor: "var(--it-sidebar-active-icon, var(--color-primary-500))", boxShadow: "0 0 10px var(--it-sidebar-active-icon, var(--color-primary-500))" }
9253
9259
  }
9254
9260
  ),
9255
- /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "flex items-center gap-2.5 relative z-10 w-full", children: [
9261
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: `flex items-center gap-2.5 relative z-10 w-full ${isSidebarCollapsed ? "justify-center" : ""}`, children: [
9256
9262
  item.icon && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
9257
9263
  "div",
9258
9264
  {