openxiangda 1.0.75 → 1.0.77

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.
@@ -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 className="shrink-0 text-slate-500" size={15} strokeWidth={2} />
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
- {!collapsed ? (
173
- <div className={cn("mt-1 space-y-0.5", compact && "mt-1")}>
174
- {group.items.map(item => {
175
- const active = navigationState.activePath === item.path;
176
- return (
177
- <Link
178
- aria-label={item.name}
179
- className={cn(
180
- "group relative flex h-9 items-center rounded-xl text-sm transition",
181
- compact ? "justify-center px-0" : "gap-2.5 px-3",
182
- active
183
- ? "bg-[#eef6ff] text-[#1677ff]"
184
- : "text-slate-600 hover:bg-slate-50 hover:text-slate-900",
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
- "grid h-5 w-5 shrink-0 place-items-center transition",
200
- active ? "text-[#1677ff]" : "text-slate-500 group-hover:text-slate-700",
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
- <item.icon size={16} strokeWidth={2} />
204
- </span>
205
- <span className={cn("min-w-0 flex-1 truncate font-medium", compact && "sr-only")}>{item.name}</span>
206
- </Link>
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
- ) : null}
223
+ </div>
211
224
  </section>
212
225
  );
213
226
  })}
@@ -1,13 +1,21 @@
1
1
  import React from "react";
2
2
  import ReactDOM from "react-dom/client";
3
+ import { ConfigProvider } from "antd";
4
+ import zhCN from "antd/locale/zh_CN.js";
5
+ import dayjs from "dayjs";
6
+ import "dayjs/locale/zh-cn.js";
3
7
  import { RouterProvider } from "react-router-dom";
4
8
 
5
9
  import { router } from "./app/router";
6
10
  import "antd-mobile/bundle/style.css";
7
11
  import "./styles/index.css";
8
12
 
13
+ dayjs.locale("zh-cn");
14
+
9
15
  ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render(
10
16
  <React.StrictMode>
11
- <RouterProvider router={router} />
17
+ <ConfigProvider locale={zhCN}>
18
+ <RouterProvider router={router} />
19
+ </ConfigProvider>
12
20
  </React.StrictMode>,
13
21
  );