openxiangda 1.0.75 → 1.0.76
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/package.json
CHANGED
|
@@ -145,6 +145,7 @@ export function AdminShell() {
|
|
|
145
145
|
<section className="min-w-0" key={group.title}>
|
|
146
146
|
<button
|
|
147
147
|
aria-label={group.title}
|
|
148
|
+
aria-expanded={!collapsed}
|
|
148
149
|
className={cn(
|
|
149
150
|
"flex h-9 w-full items-center rounded-xl text-[12px] font-semibold text-slate-700 transition hover:bg-slate-50 hover:text-slate-950",
|
|
150
151
|
compact ? "justify-center px-0" : "justify-between gap-2 px-2.5",
|
|
@@ -163,51 +164,63 @@ export function AdminShell() {
|
|
|
163
164
|
</span>
|
|
164
165
|
{compact ? (
|
|
165
166
|
null
|
|
166
|
-
) : collapsed ? (
|
|
167
|
-
<ChevronRight className="shrink-0 text-slate-500" size={15} strokeWidth={2} />
|
|
168
167
|
) : (
|
|
169
|
-
<ChevronDown
|
|
168
|
+
<ChevronDown
|
|
169
|
+
className={cn(
|
|
170
|
+
"shrink-0 text-slate-500 transition-transform duration-200 ease-out motion-reduce:transition-none",
|
|
171
|
+
collapsed && "-rotate-90",
|
|
172
|
+
)}
|
|
173
|
+
size={15}
|
|
174
|
+
strokeWidth={2}
|
|
175
|
+
/>
|
|
170
176
|
)}
|
|
171
177
|
</button>
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
)}
|
|
186
|
-
key={`${group.title}-${item.name}-${item.path}`}
|
|
187
|
-
onClick={() => setMobileOpen(false)}
|
|
188
|
-
to={item.path}
|
|
189
|
-
>
|
|
190
|
-
<span
|
|
191
|
-
className={cn(
|
|
192
|
-
"absolute -left-2.5 top-1 h-7 w-1 rounded-r-full transition",
|
|
193
|
-
active ? "bg-[#1677ff]" : "bg-transparent",
|
|
194
|
-
compact && "-left-2",
|
|
195
|
-
)}
|
|
196
|
-
/>
|
|
197
|
-
<span
|
|
178
|
+
<div
|
|
179
|
+
className={cn(
|
|
180
|
+
"grid transition-[grid-template-rows,opacity] duration-200 ease-out motion-reduce:transition-none",
|
|
181
|
+
collapsed ? "grid-rows-[0fr] opacity-0" : "grid-rows-[1fr] opacity-100",
|
|
182
|
+
)}
|
|
183
|
+
>
|
|
184
|
+
<div className={cn("min-h-0 overflow-hidden", collapsed && "pointer-events-none")}>
|
|
185
|
+
<div className={cn("mt-1 space-y-0.5", compact && "mt-1")}>
|
|
186
|
+
{group.items.map(item => {
|
|
187
|
+
const active = navigationState.activePath === item.path;
|
|
188
|
+
return (
|
|
189
|
+
<Link
|
|
190
|
+
aria-label={item.name}
|
|
198
191
|
className={cn(
|
|
199
|
-
"
|
|
200
|
-
|
|
192
|
+
"group relative flex h-9 items-center rounded-xl text-sm transition",
|
|
193
|
+
compact ? "justify-center px-0" : "gap-2.5 pl-7 pr-3",
|
|
194
|
+
active
|
|
195
|
+
? "bg-[#eef6ff] text-[#1677ff]"
|
|
196
|
+
: "text-slate-600 hover:bg-slate-50 hover:text-slate-900",
|
|
201
197
|
)}
|
|
198
|
+
key={`${group.title}-${item.name}-${item.path}`}
|
|
199
|
+
onClick={() => setMobileOpen(false)}
|
|
200
|
+
to={item.path}
|
|
202
201
|
>
|
|
203
|
-
<
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
202
|
+
<span
|
|
203
|
+
className={cn(
|
|
204
|
+
"absolute -left-2.5 top-1 h-7 w-1 rounded-r-full transition",
|
|
205
|
+
active ? "bg-[#1677ff]" : "bg-transparent",
|
|
206
|
+
compact && "-left-2",
|
|
207
|
+
)}
|
|
208
|
+
/>
|
|
209
|
+
<span
|
|
210
|
+
className={cn(
|
|
211
|
+
"grid h-5 w-5 shrink-0 place-items-center transition",
|
|
212
|
+
active ? "text-[#1677ff]" : "text-slate-500 group-hover:text-slate-700",
|
|
213
|
+
)}
|
|
214
|
+
>
|
|
215
|
+
<item.icon size={16} strokeWidth={2} />
|
|
216
|
+
</span>
|
|
217
|
+
<span className={cn("min-w-0 flex-1 truncate font-medium", compact && "sr-only")}>{item.name}</span>
|
|
218
|
+
</Link>
|
|
219
|
+
);
|
|
220
|
+
})}
|
|
221
|
+
</div>
|
|
209
222
|
</div>
|
|
210
|
-
|
|
223
|
+
</div>
|
|
211
224
|
</section>
|
|
212
225
|
);
|
|
213
226
|
})}
|