@lmy54321/design-system 1.0.0 → 1.1.1
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.d.mts +35 -1
- package/dist/index.d.ts +35 -1
- package/dist/index.js +425 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +421 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -2
- package/styles/globals.css +1 -2
package/dist/index.d.mts
CHANGED
|
@@ -322,6 +322,15 @@ interface NewsItemProps {
|
|
|
322
322
|
}
|
|
323
323
|
declare function NewsItem({ title, source, time, category, variant, className }: NewsItemProps): react_jsx_runtime.JSX.Element;
|
|
324
324
|
|
|
325
|
+
/**
|
|
326
|
+
* 卡片容器使用示例
|
|
327
|
+
*
|
|
328
|
+
* 本组件展示设计系统中两种卡片容器的正确用法:
|
|
329
|
+
* 1. 普通卡(灰色)- 用于常规模块,无使用限制
|
|
330
|
+
* 2. 强调卡(白色)- 用于重要模块,一屏仅使用一次
|
|
331
|
+
*/
|
|
332
|
+
declare function CardDemo(): react_jsx_runtime.JSX.Element;
|
|
333
|
+
|
|
325
334
|
type BottomActionMode = 'single' | 'split' | 'weighted';
|
|
326
335
|
type BottomLeftContentType = 'none' | 'search' | 'capsule' | 'capsule-more';
|
|
327
336
|
interface BottomActionButtonsProps {
|
|
@@ -377,6 +386,31 @@ interface TencentMapProps {
|
|
|
377
386
|
}
|
|
378
387
|
declare function TencentMap({ className, center, zoom, pitch, rotation, showPois, showText, roamMode, demoMode, markers }: TencentMapProps): react_jsx_runtime.JSX.Element;
|
|
379
388
|
|
|
389
|
+
/** 所有可用图标名列表(outline stem) */
|
|
390
|
+
declare const ICON_NAMES: string[];
|
|
391
|
+
/** 检查某个图标是否有 filled 变体 */
|
|
392
|
+
declare function hasFilledVariant(name: string): boolean;
|
|
393
|
+
declare const ICON_GROUPS: {
|
|
394
|
+
label: string;
|
|
395
|
+
icons: string[];
|
|
396
|
+
}[];
|
|
397
|
+
interface IconFontProps {
|
|
398
|
+
/** TDesign 图标 stem 名称,如 "location"、"search"、"close" */
|
|
399
|
+
name: string;
|
|
400
|
+
/** 变体:outline(线性,默认)或 filled(实心) */
|
|
401
|
+
variant?: "outline" | "filled";
|
|
402
|
+
/** 尺寸 */
|
|
403
|
+
size?: string | number;
|
|
404
|
+
/** 额外 className */
|
|
405
|
+
className?: string;
|
|
406
|
+
/** 内联 style */
|
|
407
|
+
style?: React__default.CSSProperties;
|
|
408
|
+
}
|
|
409
|
+
declare function IconFont({ name, variant, size, className, style, }: IconFontProps): react_jsx_runtime.JSX.Element;
|
|
410
|
+
type IconName = string;
|
|
411
|
+
|
|
412
|
+
declare function IconGallery(): react_jsx_runtime.JSX.Element;
|
|
413
|
+
|
|
380
414
|
declare function ImageWithFallback(props: React__default.ImgHTMLAttributes<HTMLImageElement>): react_jsx_runtime.JSX.Element;
|
|
381
415
|
|
|
382
416
|
declare function TypographyDocs(): react_jsx_runtime.JSX.Element;
|
|
@@ -385,4 +419,4 @@ declare function GridSystemDocs(): react_jsx_runtime.JSX.Element;
|
|
|
385
419
|
|
|
386
420
|
declare function cn(...inputs: ClassValue[]): string;
|
|
387
421
|
|
|
388
|
-
export { ActionSheet, type ActionSheetVariant, BottomActionButtons, type BottomActionButtonsProps, type BottomActionMode, BottomNavigationBar, BottomSheet, BottomSheetOption, type BottomSheetOptionProps, type BottomSheetProps, BottomSheetShareItem, type BottomSheetShareItemProps, BottomToolbar, type BottomToolbarProps, Btn, type BtnProps, type BtnSize, type BtnVariant, type BubbleAlignment, type BubblePlacement, BubbleTip, DRAWER_STATES, Dialog, type DialogProps, type DialogVariant, DraggablePanel, EmptyState, type EmptyStateProps, type EmptyStateVariant, GridSystemDocs, IcExpand, IcPlan, ImageWithFallback, Loading, type LoadingProps, NewsItem, type NewsItemProps, type NotificationAction, NotificationBar, type NotificationVariant, POIListItem, PoiItem, type PoiItemProps, Push, type PushProps, SearchBox, type SearchBoxMode, type SearchBoxProps, type SearchBoxVariant, SegmentedControl, type SegmentedControlProps, type SegmentedControlSize, type ShareItemType, StatGrid, type StatGridProps, type StatItem, Switch, type SwitchProps, type TabId, Tag, type TagProps, TencentMap, Toast, type ToastProps, type ToolbarMode, TopToolbar, type TopToolbarProps, TypographyDocs, cn };
|
|
422
|
+
export { ActionSheet, type ActionSheetVariant, BottomActionButtons, type BottomActionButtonsProps, type BottomActionMode, BottomNavigationBar, BottomSheet, BottomSheetOption, type BottomSheetOptionProps, type BottomSheetProps, BottomSheetShareItem, type BottomSheetShareItemProps, BottomToolbar, type BottomToolbarProps, Btn, type BtnProps, type BtnSize, type BtnVariant, type BubbleAlignment, type BubblePlacement, BubbleTip, CardDemo, DRAWER_STATES, Dialog, type DialogProps, type DialogVariant, DraggablePanel, EmptyState, type EmptyStateProps, type EmptyStateVariant, GridSystemDocs, ICON_GROUPS, ICON_NAMES, IcExpand, IcPlan, IconFont, type IconFontProps, IconGallery, type IconName, ImageWithFallback, Loading, type LoadingProps, NewsItem, type NewsItemProps, type NotificationAction, NotificationBar, type NotificationVariant, POIListItem, PoiItem, type PoiItemProps, Push, type PushProps, SearchBox, type SearchBoxMode, type SearchBoxProps, type SearchBoxVariant, SegmentedControl, type SegmentedControlProps, type SegmentedControlSize, type ShareItemType, StatGrid, type StatGridProps, type StatItem, Switch, type SwitchProps, type TabId, Tag, type TagProps, TencentMap, Toast, type ToastProps, type ToolbarMode, TopToolbar, type TopToolbarProps, TypographyDocs, cn, hasFilledVariant };
|
package/dist/index.d.ts
CHANGED
|
@@ -322,6 +322,15 @@ interface NewsItemProps {
|
|
|
322
322
|
}
|
|
323
323
|
declare function NewsItem({ title, source, time, category, variant, className }: NewsItemProps): react_jsx_runtime.JSX.Element;
|
|
324
324
|
|
|
325
|
+
/**
|
|
326
|
+
* 卡片容器使用示例
|
|
327
|
+
*
|
|
328
|
+
* 本组件展示设计系统中两种卡片容器的正确用法:
|
|
329
|
+
* 1. 普通卡(灰色)- 用于常规模块,无使用限制
|
|
330
|
+
* 2. 强调卡(白色)- 用于重要模块,一屏仅使用一次
|
|
331
|
+
*/
|
|
332
|
+
declare function CardDemo(): react_jsx_runtime.JSX.Element;
|
|
333
|
+
|
|
325
334
|
type BottomActionMode = 'single' | 'split' | 'weighted';
|
|
326
335
|
type BottomLeftContentType = 'none' | 'search' | 'capsule' | 'capsule-more';
|
|
327
336
|
interface BottomActionButtonsProps {
|
|
@@ -377,6 +386,31 @@ interface TencentMapProps {
|
|
|
377
386
|
}
|
|
378
387
|
declare function TencentMap({ className, center, zoom, pitch, rotation, showPois, showText, roamMode, demoMode, markers }: TencentMapProps): react_jsx_runtime.JSX.Element;
|
|
379
388
|
|
|
389
|
+
/** 所有可用图标名列表(outline stem) */
|
|
390
|
+
declare const ICON_NAMES: string[];
|
|
391
|
+
/** 检查某个图标是否有 filled 变体 */
|
|
392
|
+
declare function hasFilledVariant(name: string): boolean;
|
|
393
|
+
declare const ICON_GROUPS: {
|
|
394
|
+
label: string;
|
|
395
|
+
icons: string[];
|
|
396
|
+
}[];
|
|
397
|
+
interface IconFontProps {
|
|
398
|
+
/** TDesign 图标 stem 名称,如 "location"、"search"、"close" */
|
|
399
|
+
name: string;
|
|
400
|
+
/** 变体:outline(线性,默认)或 filled(实心) */
|
|
401
|
+
variant?: "outline" | "filled";
|
|
402
|
+
/** 尺寸 */
|
|
403
|
+
size?: string | number;
|
|
404
|
+
/** 额外 className */
|
|
405
|
+
className?: string;
|
|
406
|
+
/** 内联 style */
|
|
407
|
+
style?: React__default.CSSProperties;
|
|
408
|
+
}
|
|
409
|
+
declare function IconFont({ name, variant, size, className, style, }: IconFontProps): react_jsx_runtime.JSX.Element;
|
|
410
|
+
type IconName = string;
|
|
411
|
+
|
|
412
|
+
declare function IconGallery(): react_jsx_runtime.JSX.Element;
|
|
413
|
+
|
|
380
414
|
declare function ImageWithFallback(props: React__default.ImgHTMLAttributes<HTMLImageElement>): react_jsx_runtime.JSX.Element;
|
|
381
415
|
|
|
382
416
|
declare function TypographyDocs(): react_jsx_runtime.JSX.Element;
|
|
@@ -385,4 +419,4 @@ declare function GridSystemDocs(): react_jsx_runtime.JSX.Element;
|
|
|
385
419
|
|
|
386
420
|
declare function cn(...inputs: ClassValue[]): string;
|
|
387
421
|
|
|
388
|
-
export { ActionSheet, type ActionSheetVariant, BottomActionButtons, type BottomActionButtonsProps, type BottomActionMode, BottomNavigationBar, BottomSheet, BottomSheetOption, type BottomSheetOptionProps, type BottomSheetProps, BottomSheetShareItem, type BottomSheetShareItemProps, BottomToolbar, type BottomToolbarProps, Btn, type BtnProps, type BtnSize, type BtnVariant, type BubbleAlignment, type BubblePlacement, BubbleTip, DRAWER_STATES, Dialog, type DialogProps, type DialogVariant, DraggablePanel, EmptyState, type EmptyStateProps, type EmptyStateVariant, GridSystemDocs, IcExpand, IcPlan, ImageWithFallback, Loading, type LoadingProps, NewsItem, type NewsItemProps, type NotificationAction, NotificationBar, type NotificationVariant, POIListItem, PoiItem, type PoiItemProps, Push, type PushProps, SearchBox, type SearchBoxMode, type SearchBoxProps, type SearchBoxVariant, SegmentedControl, type SegmentedControlProps, type SegmentedControlSize, type ShareItemType, StatGrid, type StatGridProps, type StatItem, Switch, type SwitchProps, type TabId, Tag, type TagProps, TencentMap, Toast, type ToastProps, type ToolbarMode, TopToolbar, type TopToolbarProps, TypographyDocs, cn };
|
|
422
|
+
export { ActionSheet, type ActionSheetVariant, BottomActionButtons, type BottomActionButtonsProps, type BottomActionMode, BottomNavigationBar, BottomSheet, BottomSheetOption, type BottomSheetOptionProps, type BottomSheetProps, BottomSheetShareItem, type BottomSheetShareItemProps, BottomToolbar, type BottomToolbarProps, Btn, type BtnProps, type BtnSize, type BtnVariant, type BubbleAlignment, type BubblePlacement, BubbleTip, CardDemo, DRAWER_STATES, Dialog, type DialogProps, type DialogVariant, DraggablePanel, EmptyState, type EmptyStateProps, type EmptyStateVariant, GridSystemDocs, ICON_GROUPS, ICON_NAMES, IcExpand, IcPlan, IconFont, type IconFontProps, IconGallery, type IconName, ImageWithFallback, Loading, type LoadingProps, NewsItem, type NewsItemProps, type NotificationAction, NotificationBar, type NotificationVariant, POIListItem, PoiItem, type PoiItemProps, Push, type PushProps, SearchBox, type SearchBoxMode, type SearchBoxProps, type SearchBoxVariant, SegmentedControl, type SegmentedControlProps, type SegmentedControlSize, type ShareItemType, StatGrid, type StatGridProps, type StatItem, Switch, type SwitchProps, type TabId, Tag, type TagProps, TencentMap, Toast, type ToastProps, type ToolbarMode, TopToolbar, type TopToolbarProps, TypographyDocs, cn, hasFilledVariant };
|
package/dist/index.js
CHANGED
|
@@ -6,6 +6,7 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
6
6
|
var react = require('motion/react');
|
|
7
7
|
var classVarianceAuthority = require('class-variance-authority');
|
|
8
8
|
var React = require('react');
|
|
9
|
+
var tdesignIconsReact = require('tdesign-icons-react');
|
|
9
10
|
|
|
10
11
|
function _interopNamespace(e) {
|
|
11
12
|
if (e && e.__esModule) return e;
|
|
@@ -2303,6 +2304,269 @@ function NewsItem({
|
|
|
2303
2304
|
), children: category })
|
|
2304
2305
|
] });
|
|
2305
2306
|
}
|
|
2307
|
+
var _manifest = tdesignIconsReact.manifest;
|
|
2308
|
+
var outlineStems = _manifest.filter((m) => !m.stem.endsWith("-filled")).map((m) => m.stem).sort();
|
|
2309
|
+
var filledSet = new Set(
|
|
2310
|
+
_manifest.filter((m) => m.stem.endsWith("-filled")).map((m) => m.stem)
|
|
2311
|
+
);
|
|
2312
|
+
var ICON_NAMES = outlineStems;
|
|
2313
|
+
function hasFilledVariant(name) {
|
|
2314
|
+
return filledSet.has(`${name}-filled`);
|
|
2315
|
+
}
|
|
2316
|
+
var GROUP_CONFIG = [
|
|
2317
|
+
{
|
|
2318
|
+
label: "\u5B9A\u4F4D / \u5730\u56FE",
|
|
2319
|
+
match: (s) => /^(location|map|gps|compass|pin|globe|earth|system-location|task-location)/.test(s)
|
|
2320
|
+
},
|
|
2321
|
+
{
|
|
2322
|
+
label: "\u7BAD\u5934 / \u65B9\u5411",
|
|
2323
|
+
match: (s) => /^(arrow|chevron|caret|backtop|backward|forward|swap)/.test(s)
|
|
2324
|
+
},
|
|
2325
|
+
{
|
|
2326
|
+
label: "\u7528\u6237 / \u793E\u4EA4",
|
|
2327
|
+
match: (s) => /^(user|usergroup|heart|chat|message|mail|call|phone)/.test(s)
|
|
2328
|
+
},
|
|
2329
|
+
{
|
|
2330
|
+
label: "\u6587\u4EF6 / \u6587\u4EF6\u5939",
|
|
2331
|
+
match: (s) => /^(file|folder|document|attachment)/.test(s)
|
|
2332
|
+
},
|
|
2333
|
+
{
|
|
2334
|
+
label: "\u7F16\u8F91 / \u64CD\u4F5C",
|
|
2335
|
+
match: (s) => /^(edit|delete|add|copy|paste|save|cut|undo|redo|close|check|minus|more|menu|refresh|search|filter|sort|download|upload)/.test(s)
|
|
2336
|
+
},
|
|
2337
|
+
{
|
|
2338
|
+
label: "\u6570\u636E / \u56FE\u8868",
|
|
2339
|
+
match: (s) => /^(chart|data|statistic|dashboard|table)/.test(s)
|
|
2340
|
+
},
|
|
2341
|
+
{
|
|
2342
|
+
label: "\u901A\u77E5 / \u72B6\u6001",
|
|
2343
|
+
match: (s) => /^(notification|bell|info|error|warning|alert|check-circle|check-rectangle|success|loading|time|history|calendar)/.test(s)
|
|
2344
|
+
},
|
|
2345
|
+
{
|
|
2346
|
+
label: "\u5A92\u4F53 / \u5F71\u50CF",
|
|
2347
|
+
match: (s) => /^(image|video|camera|play|pause|stop|volume|music|microphone|photo|film)/.test(s)
|
|
2348
|
+
},
|
|
2349
|
+
{
|
|
2350
|
+
label: "\u5929\u6C14",
|
|
2351
|
+
match: (s) => /^(sunny|cloudy|rain|snow|wind|fog|moon|sun|rainbow|thunderstorm|weather)/.test(s)
|
|
2352
|
+
},
|
|
2353
|
+
{
|
|
2354
|
+
label: "\u5EFA\u7B51 / \u573A\u6240",
|
|
2355
|
+
match: (s) => /^(shop|store|hospital|school|hotel|building|home|house|castle|bridge|dam|city|tower|double-storey|sailing)/.test(s)
|
|
2356
|
+
},
|
|
2357
|
+
{
|
|
2358
|
+
label: "\u54C1\u724C / Logo",
|
|
2359
|
+
match: (s) => /^(logo)/.test(s)
|
|
2360
|
+
},
|
|
2361
|
+
{
|
|
2362
|
+
label: "AI / \u667A\u80FD",
|
|
2363
|
+
match: (s) => /^(ai)/.test(s)
|
|
2364
|
+
}
|
|
2365
|
+
];
|
|
2366
|
+
function categorize(stems) {
|
|
2367
|
+
const groups = [];
|
|
2368
|
+
const used = /* @__PURE__ */ new Set();
|
|
2369
|
+
for (const cfg of GROUP_CONFIG) {
|
|
2370
|
+
const icons = stems.filter((s) => cfg.match(s) && !used.has(s));
|
|
2371
|
+
if (icons.length > 0) {
|
|
2372
|
+
icons.forEach((i) => used.add(i));
|
|
2373
|
+
groups.push({ label: cfg.label, icons });
|
|
2374
|
+
}
|
|
2375
|
+
}
|
|
2376
|
+
const rest = stems.filter((s) => !used.has(s));
|
|
2377
|
+
if (rest.length > 0) {
|
|
2378
|
+
groups.push({ label: "\u5176\u4ED6", icons: rest });
|
|
2379
|
+
}
|
|
2380
|
+
return groups;
|
|
2381
|
+
}
|
|
2382
|
+
var ICON_GROUPS = categorize(outlineStems);
|
|
2383
|
+
function IconFont({
|
|
2384
|
+
name,
|
|
2385
|
+
variant = "outline",
|
|
2386
|
+
size,
|
|
2387
|
+
className,
|
|
2388
|
+
style
|
|
2389
|
+
}) {
|
|
2390
|
+
const iconName = variant === "filled" && hasFilledVariant(name) ? `${name}-filled` : name;
|
|
2391
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2392
|
+
tdesignIconsReact.Icon,
|
|
2393
|
+
{
|
|
2394
|
+
name: iconName,
|
|
2395
|
+
size,
|
|
2396
|
+
className: cn("inline-block", className),
|
|
2397
|
+
style
|
|
2398
|
+
}
|
|
2399
|
+
);
|
|
2400
|
+
}
|
|
2401
|
+
function CardDemo() {
|
|
2402
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-3 gap-6 max-w-7xl mx-auto", children: [
|
|
2403
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "lg:col-span-2", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "max-w-[390px] mx-auto space-y-4", children: [
|
|
2404
|
+
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "mb-6", children: "\u5361\u7247\u5BB9\u5668\u793A\u4F8B" }),
|
|
2405
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2406
|
+
"div",
|
|
2407
|
+
{
|
|
2408
|
+
className: "bg-card border-[0.5px] border-card-border rounded-[16px] p-4 space-y-3",
|
|
2409
|
+
style: { boxShadow: "var(--elevation-sm)" },
|
|
2410
|
+
children: [
|
|
2411
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
2412
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
2413
|
+
/* @__PURE__ */ jsxRuntime.jsx(IconFont, { name: "location", className: "size-5 text-primary" }),
|
|
2414
|
+
/* @__PURE__ */ jsxRuntime.jsx("h4", { children: "\u5F53\u524D\u4F4D\u7F6E" })
|
|
2415
|
+
] }),
|
|
2416
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-accent", children: "\u5F3A\u8C03\u5361" })
|
|
2417
|
+
] }),
|
|
2418
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
2419
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-foreground", children: "\u5317\u4EAC\u5E02\u4E1C\u57CE\u533A\u4E1C\u957F\u5B89\u8857" }),
|
|
2420
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm text-muted-foreground", children: "\u5929\u5B89\u95E8\u5E7F\u573A\u9644\u8FD1 \xB7 \u8DDD\u79BB\u60A8 80\u7C73" })
|
|
2421
|
+
] }),
|
|
2422
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-3 gap-3 pt-2 border-t border-border", children: [
|
|
2423
|
+
/* @__PURE__ */ jsxRuntime.jsxs("button", { className: "flex flex-col items-center gap-1 py-2 hover:bg-muted/50 rounded-lg transition-colors", children: [
|
|
2424
|
+
/* @__PURE__ */ jsxRuntime.jsx(IconFont, { name: "map-navigation", className: "size-5 text-primary" }),
|
|
2425
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-foreground", children: "\u5BFC\u822A" })
|
|
2426
|
+
] }),
|
|
2427
|
+
/* @__PURE__ */ jsxRuntime.jsxs("button", { className: "flex flex-col items-center gap-1 py-2 hover:bg-muted/50 rounded-lg transition-colors", children: [
|
|
2428
|
+
/* @__PURE__ */ jsxRuntime.jsx(IconFont, { name: "share", className: "size-5 text-primary" }),
|
|
2429
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-foreground", children: "\u5206\u4EAB" })
|
|
2430
|
+
] }),
|
|
2431
|
+
/* @__PURE__ */ jsxRuntime.jsxs("button", { className: "flex flex-col items-center gap-1 py-2 hover:bg-muted/50 rounded-lg transition-colors", children: [
|
|
2432
|
+
/* @__PURE__ */ jsxRuntime.jsx(IconFont, { name: "star", className: "size-5 text-primary" }),
|
|
2433
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-foreground", children: "\u6536\u85CF" })
|
|
2434
|
+
] })
|
|
2435
|
+
] })
|
|
2436
|
+
]
|
|
2437
|
+
}
|
|
2438
|
+
),
|
|
2439
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-card-muted rounded-[16px] p-4 space-y-3", children: [
|
|
2440
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
2441
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
2442
|
+
/* @__PURE__ */ jsxRuntime.jsx(IconFont, { name: "map-location", className: "size-5 text-muted-foreground" }),
|
|
2443
|
+
/* @__PURE__ */ jsxRuntime.jsx("h4", { children: "\u9644\u8FD1\u5730\u70B9" })
|
|
2444
|
+
] }),
|
|
2445
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-muted-foreground", children: "\u666E\u901A\u5361" })
|
|
2446
|
+
] }),
|
|
2447
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-2", children: [
|
|
2448
|
+
{ name: "\u6545\u5BAB\u535A\u7269\u9662", distance: "1.2km", type: "\u666F\u70B9" },
|
|
2449
|
+
{ name: "\u738B\u5E9C\u4E95\u5927\u8857", distance: "850m", type: "\u5546\u5708" },
|
|
2450
|
+
{ name: "\u56FD\u5BB6\u535A\u7269\u9986", distance: "450m", type: "\u535A\u7269\u9986" }
|
|
2451
|
+
].map((poi, index) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3 py-2", children: [
|
|
2452
|
+
/* @__PURE__ */ jsxRuntime.jsx(IconFont, { name: "location", className: "size-4 text-muted-foreground shrink-0" }),
|
|
2453
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
2454
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm text-foreground truncate", children: poi.name }),
|
|
2455
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs text-muted-foreground", children: poi.type })
|
|
2456
|
+
] }),
|
|
2457
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs text-muted-foreground shrink-0", children: poi.distance })
|
|
2458
|
+
] }, index)) })
|
|
2459
|
+
] }),
|
|
2460
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-card-muted rounded-[16px] p-4 space-y-3", children: [
|
|
2461
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
2462
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
2463
|
+
/* @__PURE__ */ jsxRuntime.jsx(IconFont, { name: "history", className: "size-5 text-muted-foreground" }),
|
|
2464
|
+
/* @__PURE__ */ jsxRuntime.jsx("h4", { children: "\u641C\u7D22\u5386\u53F2" })
|
|
2465
|
+
] }),
|
|
2466
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-muted-foreground", children: "\u666E\u901A\u5361" })
|
|
2467
|
+
] }),
|
|
2468
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-2", children: [
|
|
2469
|
+
{ keyword: "\u5317\u4EAC\u5357\u7AD9", time: "\u4ECA\u5929 14:30" },
|
|
2470
|
+
{ keyword: "\u4E09\u91CC\u5C6F", time: "\u6628\u5929" },
|
|
2471
|
+
{ keyword: "\u9996\u90FD\u673A\u573A", time: "2\u5929\u524D" }
|
|
2472
|
+
].map((item, index) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between py-2", children: [
|
|
2473
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
2474
|
+
/* @__PURE__ */ jsxRuntime.jsx(IconFont, { name: "search", className: "size-4 text-muted-foreground" }),
|
|
2475
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm text-foreground", children: item.keyword })
|
|
2476
|
+
] }),
|
|
2477
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs text-muted-foreground", children: item.time })
|
|
2478
|
+
] }, index)) })
|
|
2479
|
+
] })
|
|
2480
|
+
] }) }),
|
|
2481
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "lg:col-span-1", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
2482
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-muted/50 rounded-[16px] p-4 space-y-3", children: [
|
|
2483
|
+
/* @__PURE__ */ jsxRuntime.jsx("h4", { children: "\u{1F4DD} \u4F7F\u7528\u89C4\u5219" }),
|
|
2484
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-3 text-sm", children: [
|
|
2485
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-1", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-2", children: [
|
|
2486
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "size-5 shrink-0 flex items-center justify-center", children: "\u2705" }),
|
|
2487
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
2488
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-foreground", children: "\u5F3A\u8C03\u5361\uFF08\u767D\u8272\uFF09" }),
|
|
2489
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-muted-foreground", children: "\u4E00\u5C4F\u4EC5\u4F7F\u7528\u4E00\u6B21\uFF0C\u7528\u4E8E\u7A81\u51FA\u6700\u91CD\u8981\u7684\u6A21\u5757" })
|
|
2490
|
+
] })
|
|
2491
|
+
] }) }),
|
|
2492
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-1", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-2", children: [
|
|
2493
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "size-5 shrink-0 flex items-center justify-center", children: "\u2705" }),
|
|
2494
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
2495
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-foreground", children: "\u666E\u901A\u5361\uFF08\u7070\u8272\uFF09" }),
|
|
2496
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-muted-foreground", children: "\u65E0\u4F7F\u7528\u9650\u5236\uFF0C\u9002\u7528\u4E8E\u5927\u591A\u6570\u6A21\u5757\u5185\u5BB9" })
|
|
2497
|
+
] })
|
|
2498
|
+
] }) }),
|
|
2499
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-1", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-2", children: [
|
|
2500
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "size-5 shrink-0 flex items-center justify-center", children: "\u274C" }),
|
|
2501
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
2502
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-foreground", children: "\u7981\u6B62" }),
|
|
2503
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-muted-foreground", children: "\u5728\u540C\u4E00\u89C6\u53E3\u5185\u4F7F\u7528\u591A\u4E2A\u5F3A\u8C03\u5361" })
|
|
2504
|
+
] })
|
|
2505
|
+
] }) }),
|
|
2506
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-1", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-2", children: [
|
|
2507
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "size-5 shrink-0 flex items-center justify-center", children: "\u{1F4A1}" }),
|
|
2508
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
2509
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-foreground", children: "\u63A8\u8350" }),
|
|
2510
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-muted-foreground", children: "1\u4E2A\u5F3A\u8C03\u5361 + \u591A\u4E2A\u666E\u901A\u5361\u7684\u6DF7\u5408\u4F7F\u7528" })
|
|
2511
|
+
] })
|
|
2512
|
+
] }) })
|
|
2513
|
+
] })
|
|
2514
|
+
] }),
|
|
2515
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-muted/50 rounded-[16px] p-4 space-y-3", children: [
|
|
2516
|
+
/* @__PURE__ */ jsxRuntime.jsx("h4", { children: "\u{1F4BB} \u4EE3\u7801\u793A\u4F8B" }),
|
|
2517
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-3", children: [
|
|
2518
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
2519
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs text-muted-foreground mb-2", children: "\u5F3A\u8C03\u5361\uFF08\u767D\u8272\uFF09" }),
|
|
2520
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-background rounded-lg p-3 text-xs space-y-1 border border-border", children: [
|
|
2521
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-muted-foreground", children: "<div className=" }),
|
|
2522
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-foreground pl-2", children: ' "bg-card' }),
|
|
2523
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-foreground pl-2", children: " border-[0.5px]" }),
|
|
2524
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-foreground pl-2", children: " border-card-border" }),
|
|
2525
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-foreground pl-2", children: " rounded-[16px]" }),
|
|
2526
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-foreground pl-2", children: ' p-4"' }),
|
|
2527
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-muted-foreground pl-2", children: " style={{{" }),
|
|
2528
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-foreground pl-4", children: " boxShadow:" }),
|
|
2529
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-foreground pl-4", children: ' "var(--elevation-sm)"' }),
|
|
2530
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-muted-foreground pl-2", children: "}}" }),
|
|
2531
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-muted-foreground", children: ">" })
|
|
2532
|
+
] })
|
|
2533
|
+
] }),
|
|
2534
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
2535
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs text-muted-foreground mb-2", children: "\u666E\u901A\u5361\uFF08\u7070\u8272\uFF09" }),
|
|
2536
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-background rounded-lg p-3 text-xs space-y-1 border border-border", children: [
|
|
2537
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-muted-foreground", children: "<div className=" }),
|
|
2538
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-foreground pl-2", children: ' "bg-card-muted' }),
|
|
2539
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-foreground pl-2", children: " rounded-[16px]" }),
|
|
2540
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-foreground pl-2", children: ' p-4"' }),
|
|
2541
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-muted-foreground", children: ">" })
|
|
2542
|
+
] })
|
|
2543
|
+
] })
|
|
2544
|
+
] })
|
|
2545
|
+
] }),
|
|
2546
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-muted/50 rounded-[16px] p-4 space-y-3", children: [
|
|
2547
|
+
/* @__PURE__ */ jsxRuntime.jsx("h4", { children: "\u{1F3A8} CSS\u53D8\u91CF" }),
|
|
2548
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2 text-xs", children: [
|
|
2549
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between py-1", children: [
|
|
2550
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: "--card" }),
|
|
2551
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-foreground", children: "\u767D\u8272\u80CC\u666F" })
|
|
2552
|
+
] }),
|
|
2553
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between py-1", children: [
|
|
2554
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: "--card-muted" }),
|
|
2555
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-foreground", children: "\u7070\u8272\u80CC\u666F" })
|
|
2556
|
+
] }),
|
|
2557
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between py-1", children: [
|
|
2558
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: "--card-border" }),
|
|
2559
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-foreground", children: "\u8FB9\u6846\u989C\u8272" })
|
|
2560
|
+
] }),
|
|
2561
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between py-1", children: [
|
|
2562
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: "--elevation-sm" }),
|
|
2563
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-foreground", children: "\u9634\u5F71\u6548\u679C" })
|
|
2564
|
+
] })
|
|
2565
|
+
] })
|
|
2566
|
+
] })
|
|
2567
|
+
] }) })
|
|
2568
|
+
] });
|
|
2569
|
+
}
|
|
2306
2570
|
function Capsule({ more = false }) {
|
|
2307
2571
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center h-[48px] bg-card rounded-[24px] px-4 shadow-sm border border-border shrink-0", children: [
|
|
2308
2572
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col justify-center mr-3", children: [
|
|
@@ -2915,6 +3179,161 @@ function TencentMap({
|
|
|
2915
3179
|
}
|
|
2916
3180
|
` }) });
|
|
2917
3181
|
}
|
|
3182
|
+
function IconGallery() {
|
|
3183
|
+
const [search, setSearch] = React.useState("");
|
|
3184
|
+
const [variant, setVariant] = React.useState("outline");
|
|
3185
|
+
const [activeTab, setActiveTab] = React.useState(0);
|
|
3186
|
+
const tabBarRef = React.useRef(null);
|
|
3187
|
+
const activeTabRef = React.useRef(null);
|
|
3188
|
+
const allNames = ICON_NAMES;
|
|
3189
|
+
const filteredNames = React.useMemo(() => {
|
|
3190
|
+
if (!search) return null;
|
|
3191
|
+
const q = search.toLowerCase();
|
|
3192
|
+
return allNames.filter((s) => s.includes(q));
|
|
3193
|
+
}, [search, allNames]);
|
|
3194
|
+
const currentGroup = ICON_GROUPS[activeTab];
|
|
3195
|
+
React.useEffect(() => {
|
|
3196
|
+
if (activeTabRef.current && tabBarRef.current) {
|
|
3197
|
+
const container = tabBarRef.current;
|
|
3198
|
+
const btn = activeTabRef.current;
|
|
3199
|
+
const scrollLeft = btn.offsetLeft - container.offsetWidth / 2 + btn.offsetWidth / 2;
|
|
3200
|
+
container.scrollTo({ left: scrollLeft, behavior: "smooth" });
|
|
3201
|
+
}
|
|
3202
|
+
}, [activeTab]);
|
|
3203
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-0", children: [
|
|
3204
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col sm:flex-row sm:items-center justify-between gap-4 pb-4", children: [
|
|
3205
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
3206
|
+
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-lg font-semibold text-foreground", children: "TDesign Icon Library" }),
|
|
3207
|
+
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-sm text-muted-foreground", children: [
|
|
3208
|
+
allNames.length,
|
|
3209
|
+
" icons \xB7 powered by tdesign-icons-react"
|
|
3210
|
+
] })
|
|
3211
|
+
] }),
|
|
3212
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-4", children: [
|
|
3213
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-muted p-1 rounded-lg inline-flex shrink-0", children: [
|
|
3214
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3215
|
+
"button",
|
|
3216
|
+
{
|
|
3217
|
+
onClick: () => setVariant("outline"),
|
|
3218
|
+
className: cn(
|
|
3219
|
+
"px-4 py-1.5 rounded-md text-sm font-medium transition-all",
|
|
3220
|
+
variant === "outline" ? "bg-card shadow-sm text-foreground" : "text-muted-foreground hover:text-foreground"
|
|
3221
|
+
),
|
|
3222
|
+
children: "Outline"
|
|
3223
|
+
}
|
|
3224
|
+
),
|
|
3225
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3226
|
+
"button",
|
|
3227
|
+
{
|
|
3228
|
+
onClick: () => setVariant("filled"),
|
|
3229
|
+
className: cn(
|
|
3230
|
+
"px-4 py-1.5 rounded-md text-sm font-medium transition-all",
|
|
3231
|
+
variant === "filled" ? "bg-card shadow-sm text-foreground" : "text-muted-foreground hover:text-foreground"
|
|
3232
|
+
),
|
|
3233
|
+
children: "Filled"
|
|
3234
|
+
}
|
|
3235
|
+
)
|
|
3236
|
+
] }),
|
|
3237
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3238
|
+
"input",
|
|
3239
|
+
{
|
|
3240
|
+
type: "text",
|
|
3241
|
+
placeholder: "\u641C\u7D22\u56FE\u6807...",
|
|
3242
|
+
className: "px-3 py-2 border rounded-lg text-sm w-48 focus:outline-none focus:ring-2 focus:ring-primary/20 border-border bg-input-background",
|
|
3243
|
+
value: search,
|
|
3244
|
+
onChange: (e) => setSearch(e.target.value)
|
|
3245
|
+
}
|
|
3246
|
+
)
|
|
3247
|
+
] })
|
|
3248
|
+
] }),
|
|
3249
|
+
filteredNames !== null ? filteredNames.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-12 text-center bg-card-muted rounded-xl border border-dashed border-border text-muted-foreground", children: "\u672A\u627E\u5230\u5339\u914D\u56FE\u6807" }) : /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-3 pt-2", children: [
|
|
3250
|
+
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-xs text-muted-foreground", children: [
|
|
3251
|
+
"\u627E\u5230 ",
|
|
3252
|
+
filteredNames.length,
|
|
3253
|
+
" \u4E2A\u56FE\u6807"
|
|
3254
|
+
] }),
|
|
3255
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-3 sm:grid-cols-5 md:grid-cols-7 lg:grid-cols-9 gap-3", children: filteredNames.slice(0, 200).map((name) => /* @__PURE__ */ jsxRuntime.jsx(IconCell, { name, variant }, name)) }),
|
|
3256
|
+
filteredNames.length > 200 && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground text-center", children: "\u4EC5\u663E\u793A\u524D 200 \u4E2A\u7ED3\u679C\uFF0C\u8BF7\u7F29\u5C0F\u641C\u7D22\u8303\u56F4" })
|
|
3257
|
+
] }) : (
|
|
3258
|
+
/* Tab 分类模式 */
|
|
3259
|
+
/* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
3260
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3261
|
+
"div",
|
|
3262
|
+
{
|
|
3263
|
+
className: "sticky top-0 z-10 bg-background -mx-8 px-8 pb-3 pt-3 border-b border-border",
|
|
3264
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3265
|
+
"div",
|
|
3266
|
+
{
|
|
3267
|
+
ref: tabBarRef,
|
|
3268
|
+
className: "flex items-center gap-1 overflow-x-auto",
|
|
3269
|
+
style: { scrollbarWidth: "none" },
|
|
3270
|
+
children: ICON_GROUPS.map((group, idx) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3271
|
+
"button",
|
|
3272
|
+
{
|
|
3273
|
+
ref: idx === activeTab ? activeTabRef : void 0,
|
|
3274
|
+
onClick: () => setActiveTab(idx),
|
|
3275
|
+
className: cn(
|
|
3276
|
+
"shrink-0 px-4 py-2 rounded-[var(--radius-button)] text-sm font-medium transition-all whitespace-nowrap",
|
|
3277
|
+
idx === activeTab ? "bg-primary text-white shadow-sm" : "bg-muted text-muted-foreground hover:text-foreground hover:bg-muted/80"
|
|
3278
|
+
),
|
|
3279
|
+
children: [
|
|
3280
|
+
group.label,
|
|
3281
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-1.5 text-xs opacity-70", children: group.icons.length })
|
|
3282
|
+
]
|
|
3283
|
+
},
|
|
3284
|
+
group.label
|
|
3285
|
+
))
|
|
3286
|
+
}
|
|
3287
|
+
)
|
|
3288
|
+
}
|
|
3289
|
+
),
|
|
3290
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "pt-5", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-3 sm:grid-cols-5 md:grid-cols-7 lg:grid-cols-9 gap-3", children: currentGroup?.icons.map((name) => /* @__PURE__ */ jsxRuntime.jsx(IconCell, { name, variant }, name)) }) })
|
|
3291
|
+
] })
|
|
3292
|
+
)
|
|
3293
|
+
] });
|
|
3294
|
+
}
|
|
3295
|
+
function IconCell({
|
|
3296
|
+
name,
|
|
3297
|
+
variant
|
|
3298
|
+
}) {
|
|
3299
|
+
const [copied, setCopied] = React.useState(false);
|
|
3300
|
+
const hasFilled = hasFilledVariant(name);
|
|
3301
|
+
const handleClick = () => {
|
|
3302
|
+
navigator.clipboard?.writeText(name).then(() => {
|
|
3303
|
+
setCopied(true);
|
|
3304
|
+
setTimeout(() => setCopied(false), 1200);
|
|
3305
|
+
});
|
|
3306
|
+
};
|
|
3307
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3308
|
+
"button",
|
|
3309
|
+
{
|
|
3310
|
+
onClick: handleClick,
|
|
3311
|
+
className: cn(
|
|
3312
|
+
"flex flex-col items-center gap-2 p-3 border rounded-xl transition-all group bg-card relative",
|
|
3313
|
+
"hover:border-primary/40 hover:bg-primary/5 hover:shadow-sm",
|
|
3314
|
+
"active:scale-95"
|
|
3315
|
+
),
|
|
3316
|
+
children: [
|
|
3317
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-[24px] text-foreground transition-colors group-hover:text-primary", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3318
|
+
IconFont,
|
|
3319
|
+
{
|
|
3320
|
+
name,
|
|
3321
|
+
variant: variant === "filled" && hasFilled ? "filled" : "outline",
|
|
3322
|
+
size: "1em"
|
|
3323
|
+
}
|
|
3324
|
+
) }),
|
|
3325
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-muted-foreground font-mono truncate w-full text-center select-all leading-[14px]", children: copied ? "Copied!" : name }),
|
|
3326
|
+
variant === "filled" && !hasFilled && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3327
|
+
"div",
|
|
3328
|
+
{
|
|
3329
|
+
className: "absolute top-1.5 right-1.5 w-1.5 h-1.5 rounded-full bg-orange-400/60",
|
|
3330
|
+
title: "\u65E0 filled \u53D8\u4F53"
|
|
3331
|
+
}
|
|
3332
|
+
)
|
|
3333
|
+
]
|
|
3334
|
+
}
|
|
3335
|
+
);
|
|
3336
|
+
}
|
|
2918
3337
|
function TypographyDocs() {
|
|
2919
3338
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-8 p-6 rounded-2xl bg-background", children: [
|
|
2920
3339
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-3", children: [
|
|
@@ -3340,13 +3759,18 @@ exports.BottomSheetShareItem = BottomSheetShareItem;
|
|
|
3340
3759
|
exports.BottomToolbar = BottomToolbar;
|
|
3341
3760
|
exports.Btn = Btn;
|
|
3342
3761
|
exports.BubbleTip = BubbleTip;
|
|
3762
|
+
exports.CardDemo = CardDemo;
|
|
3343
3763
|
exports.DRAWER_STATES = DRAWER_STATES;
|
|
3344
3764
|
exports.Dialog = Dialog;
|
|
3345
3765
|
exports.DraggablePanel = DraggablePanel;
|
|
3346
3766
|
exports.EmptyState = EmptyState;
|
|
3347
3767
|
exports.GridSystemDocs = GridSystemDocs;
|
|
3768
|
+
exports.ICON_GROUPS = ICON_GROUPS;
|
|
3769
|
+
exports.ICON_NAMES = ICON_NAMES;
|
|
3348
3770
|
exports.IcExpand = IcExpand;
|
|
3349
3771
|
exports.IcPlan = IcPlan;
|
|
3772
|
+
exports.IconFont = IconFont;
|
|
3773
|
+
exports.IconGallery = IconGallery;
|
|
3350
3774
|
exports.ImageWithFallback = ImageWithFallback;
|
|
3351
3775
|
exports.Loading = Loading;
|
|
3352
3776
|
exports.NewsItem = NewsItem;
|
|
@@ -3364,5 +3788,6 @@ exports.Toast = Toast;
|
|
|
3364
3788
|
exports.TopToolbar = TopToolbar;
|
|
3365
3789
|
exports.TypographyDocs = TypographyDocs;
|
|
3366
3790
|
exports.cn = cn;
|
|
3791
|
+
exports.hasFilledVariant = hasFilledVariant;
|
|
3367
3792
|
//# sourceMappingURL=index.js.map
|
|
3368
3793
|
//# sourceMappingURL=index.js.map
|