@pnkx-lib/ui 1.9.507 → 1.9.508

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.
@@ -2,7 +2,7 @@ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
2
  import * as React from 'react';
3
3
  import { useState, useEffect, useMemo } from 'react';
4
4
  import { useLocation, useNavigate } from 'react-router';
5
- import { Flex, AutoComplete, Divider, Dropdown } from 'antd';
5
+ import { Flex, AutoComplete, Divider, ConfigProvider, Dropdown } from 'antd';
6
6
  import { Layout } from '../Layout.js';
7
7
  import { Input } from '../../fields/Input.js';
8
8
  import { t as twMerge } from '../../chunks/bundle-mjs-BME7zF0Z.js';
@@ -300,21 +300,39 @@ const UserInfoSection = ({
300
300
  ]
301
301
  }
302
302
  ) }) }),
303
- /* @__PURE__ */ jsx("div", { className: "flex items-center z-[9999]", children: /* @__PURE__ */ jsx("a", { onClick: (e) => e.preventDefault(), children: /* @__PURE__ */ jsx("li", { className: "list-none cursor-pointer group flex items-center", children: /* @__PURE__ */ jsxs(
304
- "div",
303
+ /* @__PURE__ */ jsx("div", { className: "flex items-center", children: /* @__PURE__ */ jsx(ConfigProvider, { theme: { token: { zIndexPopupBase: 3e3 } }, children: /* @__PURE__ */ jsx(
304
+ Dropdown,
305
305
  {
306
- className: twMerge(
307
- hoverOpenMenu ? "" : "justify-center",
308
- "text-black flex items-center rounded-md gap-2"
309
- ),
310
- children: [
311
- /* @__PURE__ */ jsx(Divider, { type: "vertical" }),
312
- /* @__PURE__ */ jsx("div", { className: "flex justify-center w-[30px] h-[30px] rounded-full", children: /* @__PURE__ */ jsx("img", { src: userInfo?.avatar, alt: "default_avatar" }) }),
313
- /* @__PURE__ */ jsx("p", { children: userInfo?.name }),
314
- /* @__PURE__ */ jsx(Dropdown, { menu: { items }, children: /* @__PURE__ */ jsx(DownOutlinedIcon, { className: "w-6 h-6" }) })
315
- ]
306
+ menu: { items },
307
+ trigger: ["click"],
308
+ placement: "bottomRight",
309
+ getPopupContainer: () => document.body,
310
+ overlayStyle: { zIndex: 9999 },
311
+ children: /* @__PURE__ */ jsxs(
312
+ "button",
313
+ {
314
+ type: "button",
315
+ className: twMerge(
316
+ hoverOpenMenu ? "" : "justify-center",
317
+ "text-black flex items-center rounded-md gap-2 focus:outline-none"
318
+ ),
319
+ children: [
320
+ /* @__PURE__ */ jsx(Divider, { type: "vertical" }),
321
+ /* @__PURE__ */ jsx("div", { className: "flex justify-center w-[30px] h-[30px] rounded-full overflow-hidden", children: /* @__PURE__ */ jsx(
322
+ "img",
323
+ {
324
+ src: userInfo.avatar,
325
+ alt: "avatar",
326
+ className: "w-full h-full object-cover"
327
+ }
328
+ ) }),
329
+ /* @__PURE__ */ jsx("p", { className: "max-w-[120px] truncate", children: userInfo.name }),
330
+ /* @__PURE__ */ jsx(DownOutlinedIcon, { className: "w-6 h-6" })
331
+ ]
332
+ }
333
+ )
316
334
  }
317
- ) }) }) })
335
+ ) }) })
318
336
  ] });
319
337
  };
320
338
 
package/es/ui/Tabs.js CHANGED
@@ -29,8 +29,8 @@ const identity = (arg) => arg;
29
29
  function useStore(api, selector = identity) {
30
30
  const slice = React__default.useSyncExternalStore(
31
31
  api.subscribe,
32
- () => selector(api.getState()),
33
- () => selector(api.getInitialState())
32
+ React__default.useCallback(() => selector(api.getState()), [api, selector]),
33
+ React__default.useCallback(() => selector(api.getInitialState()), [api, selector])
34
34
  );
35
35
  React__default.useDebugValue(slice);
36
36
  return slice;
@@ -1,5 +1,5 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
- import { C as Controller } from '../chunks/index.esm-AaUjBMaK.js';
2
+ import { C as Controller } from '../chunks/index.esm-Dr5ZHcf7.js';
3
3
  import { UploadComponent } from './UploadComponent.js';
4
4
 
5
5
  const UploadImage = ({