lingee-ui 0.0.18 → 0.0.20
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/button/index.d.mts +1 -1
- package/dist/button/index.d.ts +1 -1
- package/dist/chunk-4QG542GX.js +1 -0
- package/dist/{chunk-KSRZSPQR.js → chunk-5LB5DYXZ.js} +1 -1
- package/dist/chunk-67CCJI3Y.mjs +1 -0
- package/dist/{chunk-QRQE2XPJ.js → chunk-ARLTJ7O7.js} +1 -1
- package/dist/chunk-IBJZAWUP.mjs +1 -0
- package/dist/chunk-N4R34DPZ.js +1 -0
- package/dist/{chunk-X2JJ6KOR.mjs → chunk-NLYZRYOJ.mjs} +1 -1
- package/dist/{chunk-L6IXM6OV.mjs → chunk-QIGXWGB4.mjs} +1 -1
- package/dist/chunk-R2WK7AJL.mjs +1 -0
- package/dist/{chunk-CW6SU5IY.js → chunk-V32QRQMP.js} +1 -1
- package/dist/{index-7pb5YOcq.d.mts → index-BVXwKHfX.d.mts} +1 -1
- package/dist/{index-7pb5YOcq.d.ts → index-BVXwKHfX.d.ts} +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.mts +520 -10
- package/dist/index.d.ts +520 -10
- package/dist/index.js +2 -2
- package/dist/index.mjs +2 -2
- package/dist/input/index.css +1 -1
- package/dist/input/index.js +1 -1
- package/dist/input/index.mjs +1 -1
- package/dist/popover/index.js +1 -1
- package/dist/popover/index.mjs +1 -1
- package/dist/tabs/index.css +1 -1
- package/dist/tabs/index.d.mts +1 -1
- package/dist/tabs/index.d.ts +1 -1
- package/dist/tabs/index.js +1 -1
- package/dist/tabs/index.mjs +1 -1
- package/dist/toast/index.css +1 -1
- package/dist/toast/index.js +1 -1
- package/dist/toast/index.mjs +1 -1
- package/dist/tokens.css +1 -1
- package/dist/tree/index.css +1 -1
- package/dist/tree/index.js +1 -1
- package/dist/tree/index.mjs +1 -1
- package/package.json +1 -1
- package/skill/AGENTS-SNIPPET.md +13 -4
- package/skill/SKILL.md +6 -4
- package/skill/VERSION.json +3 -3
- package/skill/references/components/breadcrumb.md +44 -0
- package/skill/references/components/checkbox.md +2 -0
- package/skill/references/components/dropdown.md +11 -1
- package/skill/references/components/person-picker.md +176 -0
- package/skill/references/setup.md +1 -1
- package/skill/references/tokens.md +10 -3
- package/dist/chunk-3RAHZU2C.js +0 -1
- package/dist/chunk-4OLAOR2B.mjs +0 -1
- package/dist/chunk-6OF5LIF4.mjs +0 -1
- package/dist/chunk-A2VQ5WK4.js +0 -1
- package/dist/chunk-XQRQYJIE.mjs +0 -1
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
# PersonPicker 选人
|
|
2
|
+
|
|
3
|
+
组织人员选择器,支持组织层级下钻、远程搜索与已选汇总,数据由消费方注入。
|
|
4
|
+
|
|
5
|
+
- 导入:`import { PersonPicker, PersonPickerPanel, DEFAULT_TABS as PERSON_PICKER_DEFAULT_TABS, ENTITY_TYPE_ORDER as PERSON_PICKER_TYPE_ORDER, entityKey as personPickerEntityKey, usePickerState as usePersonPickerState } from "lingee-ui";`
|
|
6
|
+
- 可用类型:`PickerGroup`, `PickerState`, `UsePickerStateOptions`, `PersonPickerProps`, `PersonPickerPanelProps`, `PickerTabKey`, `PickerEntity`, `PickerEntityType`, `PickerExtra`, `PickerSection`, `PickerPaneData`, `PickerOrgPathItem`, `PickerMode`, `PickerChangeInfo`, `PickerSelectedCount`
|
|
7
|
+
|
|
8
|
+
## 最小示例
|
|
9
|
+
|
|
10
|
+
```tsx
|
|
11
|
+
import { useMemo, useState } from "react";
|
|
12
|
+
import { Button, PersonPicker } from "lingee-ui";
|
|
13
|
+
import type { PickerEntity, PickerOrgPathItem, PickerPaneData, PickerTabKey } from "lingee-ui";
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* 子部门。键为父级 id,值为该层级下的子部门。
|
|
17
|
+
*
|
|
18
|
+
* 带 hasChildren 的行点击整行即进入下一级,只有最前面的勾选框才是选中。
|
|
19
|
+
*/
|
|
20
|
+
const CHILD_DEPARTMENTS: Record<string, PickerEntity[]> = {
|
|
21
|
+
root: [
|
|
22
|
+
{ type: "org", id: "eng", name: "Engineering", desc: "86", hasChildren: true },
|
|
23
|
+
{ type: "org", id: "mkt", name: "Marketing", desc: "24", hasChildren: true },
|
|
24
|
+
{ type: "org", id: "fin", name: "Finance", desc: "12" },
|
|
25
|
+
],
|
|
26
|
+
eng: [
|
|
27
|
+
{ type: "org", id: "eng-web", name: "Web Platform", desc: "31", hasChildren: true },
|
|
28
|
+
{ type: "org", id: "eng-api", name: "API Services", desc: "28" },
|
|
29
|
+
{ type: "org", id: "eng-qa", name: "Quality Assurance", desc: "15" },
|
|
30
|
+
],
|
|
31
|
+
"eng-web": [
|
|
32
|
+
{ type: "org", id: "eng-web-ui", name: "Design System", desc: "9" },
|
|
33
|
+
{ type: "org", id: "eng-web-app", name: "Application Shell", desc: "11" },
|
|
34
|
+
],
|
|
35
|
+
mkt: [
|
|
36
|
+
{ type: "org", id: "mkt-brand", name: "Brand", desc: "8" },
|
|
37
|
+
{ type: "org", id: "mkt-growth", name: "Growth", desc: "10" },
|
|
38
|
+
],
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
/** 各层级的直属成员 */
|
|
42
|
+
const MEMBERS: Record<string, PickerEntity[]> = {
|
|
43
|
+
root: [{ type: "person", id: "p1", name: "Avery Stone", code: "10001", deptName: "Executive" }],
|
|
44
|
+
eng: [
|
|
45
|
+
{ type: "person", id: "p2", name: "Blake Rivers", code: "10002", deptName: "Engineering" },
|
|
46
|
+
{ type: "person", id: "p3", name: "Casey Lane", code: "10003", deptName: "Engineering" },
|
|
47
|
+
],
|
|
48
|
+
"eng-web": [
|
|
49
|
+
{ type: "person", id: "p4", name: "Devon Pike", code: "10004", deptName: "Web Platform" },
|
|
50
|
+
{ type: "person", id: "p5", name: "Ellis Ward", code: "10005", deptName: "Web Platform" },
|
|
51
|
+
{ type: "person", id: "p6", name: "Frankie Hale", code: "10006", deptName: "Web Platform" },
|
|
52
|
+
],
|
|
53
|
+
"eng-web-ui": [
|
|
54
|
+
{ type: "person", id: "p7", name: "Georgia Mills", code: "10007", deptName: "Design System" },
|
|
55
|
+
],
|
|
56
|
+
"eng-api": [
|
|
57
|
+
{ type: "person", id: "p8", name: "Harper Quinn", code: "10008", deptName: "API Services" },
|
|
58
|
+
{ type: "person", id: "p9", name: "Indigo Reese", code: "10009", deptName: "API Services" },
|
|
59
|
+
],
|
|
60
|
+
mkt: [{ type: "person", id: "p10", name: "Jordan Vale", code: "10010", deptName: "Marketing" }],
|
|
61
|
+
fin: [{ type: "person", id: "p11", name: "Kai Monroe", code: "10011", deptName: "Finance" }],
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
const ALL_MEMBERS = Object.values(MEMBERS).flat();
|
|
65
|
+
|
|
66
|
+
export default function Basic() {
|
|
67
|
+
const [open, setOpen] = useState(false);
|
|
68
|
+
const [tab, setTab] = useState<PickerTabKey>("org");
|
|
69
|
+
const [path, setPath] = useState<PickerOrgPathItem[]>([]);
|
|
70
|
+
const [keyword, setKeyword] = useState("");
|
|
71
|
+
const [result, setResult] = useState<PickerEntity[]>([]);
|
|
72
|
+
|
|
73
|
+
const currentId = path.length > 0 ? path[path.length - 1].id : "root";
|
|
74
|
+
|
|
75
|
+
// 组件不持有数据:页签、层级与搜索词变化后由此处换出新的 data
|
|
76
|
+
const data = useMemo<PickerPaneData>(() => {
|
|
77
|
+
if (keyword.trim()) {
|
|
78
|
+
const hit = ALL_MEMBERS.filter((item) =>
|
|
79
|
+
item.name.toLowerCase().includes(keyword.trim().toLowerCase()),
|
|
80
|
+
);
|
|
81
|
+
return { sections: [{ key: "search", items: hit }] };
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
const children = CHILD_DEPARTMENTS[currentId] ?? [];
|
|
85
|
+
if (tab === "org") return { orgNodes: children };
|
|
86
|
+
|
|
87
|
+
return {
|
|
88
|
+
selectAll: true,
|
|
89
|
+
sections: [{ key: "members", title: "Members", items: MEMBERS[currentId] ?? [] }],
|
|
90
|
+
orgNodes: children,
|
|
91
|
+
};
|
|
92
|
+
}, [currentId, keyword, tab]);
|
|
93
|
+
|
|
94
|
+
return (
|
|
95
|
+
<div style={{ display: "flex", alignItems: "center", gap: 12 }}>
|
|
96
|
+
<Button variant="primary" onClick={() => setOpen(true)}>
|
|
97
|
+
Open picker
|
|
98
|
+
</Button>
|
|
99
|
+
<span style={{ color: "var(--lg-g-fg-color-black-default)", fontSize: 12 }}>
|
|
100
|
+
{result.length > 0 ? `Confirmed: ${result.length}` : "Nothing confirmed yet"}
|
|
101
|
+
</span>
|
|
102
|
+
|
|
103
|
+
<PersonPicker
|
|
104
|
+
open={open}
|
|
105
|
+
onOpenChange={setOpen}
|
|
106
|
+
tabs={["org", "person"]}
|
|
107
|
+
activeTab={tab}
|
|
108
|
+
onTabChange={setTab}
|
|
109
|
+
orgPath={path}
|
|
110
|
+
onOrgPathChange={setPath}
|
|
111
|
+
keyword={keyword}
|
|
112
|
+
onSearch={setKeyword}
|
|
113
|
+
data={data}
|
|
114
|
+
onConfirm={setResult}
|
|
115
|
+
/>
|
|
116
|
+
</div>
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## API
|
|
122
|
+
|
|
123
|
+
### PersonPicker
|
|
124
|
+
|
|
125
|
+
继承 `PersonPickerPanelProps`,额外提供弹窗外壳相关属性。
|
|
126
|
+
|
|
127
|
+
| 属性 | 说明 | 类型 | 默认值 |
|
|
128
|
+
|------|------|------|--------|
|
|
129
|
+
| `open` | 是否打开(受控) | `boolean` | - |
|
|
130
|
+
| `onOpenChange` | 开关状态变化回调 | `(open: boolean) => void` | - |
|
|
131
|
+
| `title` | 标题,不传时取语言包 | `ReactNode` | `选择人员` |
|
|
132
|
+
| `okText` | 确认按钮文案 | `string` | `确定` |
|
|
133
|
+
| `cancelText` | 取消按钮文案 | `string` | `取消` |
|
|
134
|
+
| `okLoading` | 确认按钮 loading | `boolean` | `false` |
|
|
135
|
+
| `okDisabledWhenEmpty` | 未选中任何项时禁用确认按钮 | `boolean` | `true` |
|
|
136
|
+
| `onConfirm` | 点击确认,回传已选项;返回 Promise 时按钮自动 loading。**承载模式下不触发** | `(value: PickerEntity[]) => void \| Promise<void>` | - |
|
|
137
|
+
| `onCancel` | 点击取消、关闭按钮或 Esc | `() => void` | - |
|
|
138
|
+
| `width` | 弹窗宽度 | `number` | `720` |
|
|
139
|
+
| `zIndex` | 自定义 z-index | `number` | - |
|
|
140
|
+
| `hostModal` | 宿主弹窗配置,透传给内部 `Dialog`。承载模式下本组件不产出 DOM,底部按钮需由承载页自绘 | `DialogHostModal` | - |
|
|
141
|
+
|
|
142
|
+
### PersonPickerPanel
|
|
143
|
+
|
|
144
|
+
左右分栏内容体,不含弹窗外壳。
|
|
145
|
+
|
|
146
|
+
| 属性 | 说明 | 类型 | 默认值 |
|
|
147
|
+
|------|------|------|--------|
|
|
148
|
+
| `tabs` | 启用的页签及顺序;仅剩一个时不渲染页签栏 | `PickerTabKey[]` | `["org", "person"]` |
|
|
149
|
+
| `activeTab` | 当前页签(受控) | `PickerTabKey` | - |
|
|
150
|
+
| `defaultActiveTab` | 默认页签,缺省取 `tabs` 首项 | `PickerTabKey` | - |
|
|
151
|
+
| `onTabChange` | 页签切换回调 | `(key: PickerTabKey) => void` | - |
|
|
152
|
+
| `tabLabels` | 覆盖页签文案 | `Partial<Record<PickerTabKey, ReactNode>>` | - |
|
|
153
|
+
| `data` | 左栏当前要渲染的数据 | `PickerPaneData` | `{}` |
|
|
154
|
+
| `loading` | **换批**加载中,展示骨架屏;优先级高于 `loadError`。追加下一页时不要置真 | `boolean` | `false` |
|
|
155
|
+
| `loadingDelay` | 骨架屏延迟显示毫秒数,避免快请求下的白闪 | `number` | `200` |
|
|
156
|
+
| `loadError` | 加载失败 | `boolean` | `false` |
|
|
157
|
+
| `onRetry` | 失败重试回调,传入后才出现重试入口 | `() => void` | - |
|
|
158
|
+
| `hasMore` | 列表是否还有下一页 | `boolean` | `false` |
|
|
159
|
+
| `onLoadMore` | 加载下一页,须返回 Promise | `(isRetry: boolean) => Promise<void>` | - |
|
|
160
|
+
| `value` | 已选项(受控) | `PickerEntity[]` | - |
|
|
161
|
+
| `defaultValue` | 默认已选项(非受控) | `PickerEntity[]` | `[]` |
|
|
162
|
+
| `onChange` | 已选项变化回调 | `(value: PickerEntity[], info: PickerChangeInfo) => void` | - |
|
|
163
|
+
| `keyword` | 搜索词(受控),非空即进入搜索态 | `string` | - |
|
|
164
|
+
| `onSearch` | 搜索词变化回调,已去抖 | `(keyword: string) => void` | - |
|
|
165
|
+
| `searchDebounce` | 搜索去抖毫秒数 | `number` | `300` |
|
|
166
|
+
| `searchPlaceholder` | 搜索框 placeholder | `string` | `搜索姓名、工号` |
|
|
167
|
+
| `orgPath` | 当前组织层级路径(受控),不含根节点 | `PickerOrgPathItem[]` | - |
|
|
168
|
+
| `onOrgPathChange` | 层级变化回调(面包屑回跳与行尾下钻) | `(path: PickerOrgPathItem[]) => void` | - |
|
|
169
|
+
| `onExpandOrg` | 把组织展开为其下全部人员(递归)。传入后「选择人员」页签勾选组织即选中其下所有人 | `(org: PickerEntity) => Promise<PickerEntity[]>` | - |
|
|
170
|
+
| `onExpandOrgError` | `onExpandOrg` 失败时触发,需由消费方提示用户 | `(org: PickerEntity, error: unknown) => void` | - |
|
|
171
|
+
| `mode` | 选择模式;`single` 下新选中项替换旧值 | `"multiple" \| "single"` | `"multiple"` |
|
|
172
|
+
| `max` | 最多可选数量 | `number` | - |
|
|
173
|
+
| `onExceed` | 将超过 `max` 时触发,本次勾选被丢弃 | `(max: number) => void` | - |
|
|
174
|
+
| `paneHeight` | 左右分栏高度。`"fill"` 撑满父容器(需父容器有确定高度),用于嵌入形态 | `number \| "fill"` | `456` |
|
|
175
|
+
| `className` | 自定义类名 | `string` | - |
|
|
176
|
+
| `style` | 自定义样式 | `CSSProperties` | - |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# 语义 Token 全表
|
|
2
2
|
|
|
3
|
-
组件库 `0.0.
|
|
3
|
+
组件库 `0.0.20`。仅列语义层(`--lg-g-*`)。
|
|
4
4
|
|
|
5
5
|
亮色与暗色**变量名完全相同**,给 `<html>` 加 `data-theme="dark"` 即自动切换,业务代码只写一次。
|
|
6
6
|
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
| `var(--lg-g-fg-color-violet-default)` | ~~`--lg-g-fg-color-violet-defauit`~~ |
|
|
25
25
|
| `var(--lg-g-bg-color-emerald-translucent-soft)` | ~~`--lg-g-bg-color-emeraid-translucent-soft`~~ |
|
|
26
26
|
|
|
27
|
-
## 前景色 fg(color / fill / stroke)(
|
|
27
|
+
## 前景色 fg(color / fill / stroke)(54)
|
|
28
28
|
|
|
29
29
|
| Token | 亮色 | 暗色 |
|
|
30
30
|
|-------|------|------|
|
|
@@ -76,8 +76,14 @@
|
|
|
76
76
|
| `var(--lg-g-fg-color-lime-low)` | `#74D70B` | `#74D70B` |
|
|
77
77
|
| `var(--lg-g-fg-color-violet-low)` | `#7858F9` | `#7858F9` |
|
|
78
78
|
| `var(--lg-g-fg-color-black-title)` | `rgba(0, 0, 0, 0.64)` | `rgba(255, 255, 255, 0.46)` |
|
|
79
|
+
| `var(--lg-g-fg-color-black-blue-moderate)` | `rgba(0, 29, 65, 0.18)` | `#FFFFFF` |
|
|
80
|
+
| `var(--lg-g-fg-color-black-blue-faint)` | `rgba(0, 29, 65, 0.28)` | `#FFFFFF` |
|
|
81
|
+
| `var(--lg-g-fg-color-black-blue-default)` | `rgba(0, 29, 65, 0.46)` | `#FFFFFF` |
|
|
82
|
+
| `var(--lg-g-fg-color-black-blue-muted)` | `rgba(0, 29, 65, 0.64)` | `#FFFFFF` |
|
|
83
|
+
| `var(--lg-g-fg-color-black-blue-strong)` | `rgba(0, 29, 65, 0.82)` | `#FFFFFF` |
|
|
84
|
+
| `var(--lg-g-fg-color-black-blue-intense)` | `rgba(0, 29, 65, 0.94)` | `#FFFFFF` |
|
|
79
85
|
|
|
80
|
-
## 背景色 bg(background)(
|
|
86
|
+
## 背景色 bg(background)(108)
|
|
81
87
|
|
|
82
88
|
| Token | 亮色 | 暗色 |
|
|
83
89
|
|-------|------|------|
|
|
@@ -188,6 +194,7 @@
|
|
|
188
194
|
| `var(--lg-g-bg-color-black-people)` | `rgba(0, 0, 0, 0.18)` | `rgba(255, 255, 255, 0.18)` |
|
|
189
195
|
| `var(--lg-g-bg-color-black-translucent-soft)` | `rgba(0, 0, 0, 0.04)` | `rgba(255, 255, 255, 0.08)` |
|
|
190
196
|
| `var(--lg-g-bg-color-black-translucent-muted)` | `rgba(0, 0, 0, 0.02)` | `rgba(255, 255, 255, 0.06)` |
|
|
197
|
+
| `var(--lg-g-bg-color-color)` | `#E4EEFF` | `#E4EEFF` |
|
|
191
198
|
|
|
192
199
|
## 边框色 border(border-color / outline)(45)
|
|
193
200
|
|
package/dist/chunk-3RAHZU2C.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
'use strict';var chunkP427AFIE_js=require('./chunk-P427AFIE.js'),chunkDCDWEVW4_js=require('./chunk-DCDWEVW4.js'),ze=require('react'),sonner=require('sonner'),lingeeIcon=require('lingee-icon'),jsxRuntime=require('react/jsx-runtime');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var ze__default=/*#__PURE__*/_interopDefault(ze);var ce={locale:"zh-CN",Button:{},Breadcrumb:{more:"\u66F4\u591A",back:"\u8FD4\u56DE"},Select:{loading:"\u52A0\u8F7D\u4E2D",loadError:"\u52A0\u8F7D\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5",loadFailed:"\u52A0\u8F7D\u5931\u8D25",notFound:"\u641C\u7D22\u65E0\u7ED3\u679C",clear:"\u6E05\u7A7A"},Dropdown:{clear:"\u6E05\u9664",loading:"\u52A0\u8F7D\u4E2D",loadError:"\u52A0\u8F7D\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5",empty:"\u6682\u65E0\u6570\u636E"},Tabs:{scrollLeft:"\u5411\u5DE6\u6EDA\u52A8",scrollRight:"\u5411\u53F3\u6EDA\u52A8"},Carousel:{carousel:"\u8F6E\u64AD",prev:"\u4E0A\u4E00\u5F20",next:"\u4E0B\u4E00\u5F20",goToPage:"\u8DF3\u8F6C\u5230\u7B2C {page} \u5F20"},Form:{required:"{label}\u4E0D\u80FD\u4E3A\u7A7A",requiredNoLabel:"\u6B64\u9879\u4E0D\u80FD\u4E3A\u7A7A"},Tag:{close:"\u5173\u95ED"},Upload:{retry:"\u91CD\u65B0\u4E0A\u4F20",remove:"\u79FB\u9664\u6587\u4EF6",removeShort:"\u79FB\u9664",dragText:"\u62D6\u62FD\u6587\u4EF6\u5230\u6B64\u5904\uFF0C\u6216",clickUpload:"\u70B9\u51FB\u4E0A\u4F20"},ColorPicker:{placeholder:"\u8BF7\u9009\u62E9\u989C\u8272"},DatePicker:{placeholder:"\u5E74/\u6708/\u65E5",today:"\u4ECA\u5929",prevYear:"\u4E0A\u4E00\u5E74",nextYear:"\u4E0B\u4E00\u5E74",prevMonth:"\u4E0A\u4E00\u6708",nextMonth:"\u4E0B\u4E00\u6708",prevDecade:"\u4E0A\u4E00\u7EC4\u5E74\u4EFD",nextDecade:"\u4E0B\u4E00\u7EC4\u5E74\u4EFD",months:["1\u6708","2\u6708","3\u6708","4\u6708","5\u6708","6\u6708","7\u6708","8\u6708","9\u6708","10\u6708","11\u6708","12\u6708"],yearFormat:"{year}\u5E74",monthFormat:"{month}\u6708"},RangePicker:{startPlaceholder:"\u5E74/\u6708/\u65E5",endPlaceholder:"\u5E74/\u6708/\u65E5"},TimePicker:{now:"\u73B0\u5728",confirm:"\u786E\u5B9A",placeholder:"\u65F6:\u5206",placeholderFull:"\u65F6:\u5206:\u79D2"},Table:{loading:"\u52A0\u8F7D\u4E2D",empty:"\u6682\u65E0\u6570\u636E",loadError:"\u52A0\u8F7D\u5931\u8D25"},Tree:{empty:"\u6682\u65E0\u6570\u636E"},Pagination:{total:"\u5171 {total} \u6761",prevPage:"\u4E0A\u4E00\u9875",nextPage:"\u4E0B\u4E00\u9875",itemsPerPage:"{size}\u6761/\u9875",jumpTo:"\u8DF3\u81F3",page:"\u9875"},Dialog:{close:"\u5173\u95ED"},Drawer:{close:"\u5173\u95ED"},Input:{clear:"\u6E05\u7A7A",expand:"\u5C55\u5F00\u8F93\u5165\u6846"},Alert:{close:"\u5173\u95ED"},Toast:{close:"\u5173\u95ED\u6D88\u606F"},Spin:{loading:"\u52A0\u8F7D\u4E2D"},Empty:{retry:"\u91CD\u8BD5"},InfiniteScroll:{loading:"\u52A0\u8F7D\u4E2D",noMore:"\u6CA1\u6709\u66F4\u591A\u4E86",loadFailed:"\u52A0\u8F7D\u5931\u8D25"},Sidebar:{expand:"\u5C55\u5F00",collapse:"\u6536\u8D77",loading:"\u52A0\u8F7D\u4E2D",empty:"\u6682\u65E0\u6570\u636E",loadError:"\u52A0\u8F7D\u5931\u8D25"}},v=ce;var _=new Map,O=0;function A(){return O+=1,{id:O}}function z(e,o,t){_.set(e.id,{site:o,depth:t});}function Y(e){_.delete(e.id);}function pe(){let e;for(let o of _.values())(!e||o.depth>=e.depth)&&(e=o);return e?.site}function E(){return pe()==="lingee"}var U={dialog:{}},h=ze.createContext(U),N=new Map,B=0;function G(){return B+=1,{id:B}}function q(e,o,t){N.set(e.id,{config:o,depth:t});}function j(e){N.delete(e.id);}function ge(){let e;for(let o of N.values())(!e||o.depth>=e.depth)&&(e=o);return e?.config??U}function me(){return ze.useContext(h)}var Te={locale:"en-US",Button:{},Breadcrumb:{more:"More",back:"Back"},Select:{loading:"Loading",loadError:"Failed to load, please retry",loadFailed:"Failed to load",notFound:"No results found",clear:"Clear"},Dropdown:{clear:"Clear",loading:"Loading",loadError:"Failed to load, please retry",empty:"No data"},Tabs:{scrollLeft:"Scroll left",scrollRight:"Scroll right"},Carousel:{carousel:"Carousel",prev:"Previous slide",next:"Next slide",goToPage:"Go to slide {page}"},Form:{required:"{label} is required",requiredNoLabel:"This field is required"},Tag:{close:"Close"},Upload:{retry:"Retry upload",remove:"Remove file",removeShort:"Remove",dragText:"Drag files here, or ",clickUpload:"click to upload"},ColorPicker:{placeholder:"Select a color"},DatePicker:{placeholder:"YYYY/MM/DD",today:"Today",prevYear:"Previous year",nextYear:"Next year",prevMonth:"Previous month",nextMonth:"Next month",prevDecade:"Previous decade",nextDecade:"Next decade",months:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],yearFormat:"{year}",monthFormat:"{month}"},RangePicker:{startPlaceholder:"Start date",endPlaceholder:"End date"},TimePicker:{now:"Now",confirm:"OK",placeholder:"HH:mm",placeholderFull:"HH:mm:ss"},Table:{loading:"Loading",empty:"No data",loadError:"Failed to load"},Tree:{empty:"No data"},Pagination:{total:"{total} items",prevPage:"Previous page",nextPage:"Next page",itemsPerPage:"{size} / page",jumpTo:"Go to",page:""},Dialog:{close:"Close"},Drawer:{close:"Close"},Input:{clear:"Clear",expand:"Expand input"},Alert:{close:"Close"},Toast:{close:"Close message"},Spin:{loading:"Loading"},Empty:{retry:"Retry"},InfiniteScroll:{loading:"Loading",noMore:"No more items",loadFailed:"Failed to load"},Sidebar:{expand:"Expand",collapse:"Collapse",loading:"Loading",empty:"No data",loadError:"Failed to load"}},xe=Te;var V=ze.createContext(v),Z=ze.createContext(void 0),X=ze.createContext(-1);function ve({locale:e=v,site:o,dialog:t,children:n}){let r=ze.useContext(X)+1,a=ze.useContext(h),i=t?.zIndex,s=a.dialog.zIndex,l=ze.useMemo(()=>({dialog:{zIndex:i??s}}),[i,s]),c=ze.useRef();c.current||(c.current=A());let p=c.current,g=ze.useRef();g.current||(g.current=G());let m=g.current;z(p,o,r),q(m,l,r),ze.useEffect(()=>()=>{Y(p),j(m);},[m,p]);let d=jsxRuntime.jsx(X.Provider,{value:r,children:jsxRuntime.jsx(h.Provider,{value:l,children:jsxRuntime.jsx(Z.Provider,{value:o,children:jsxRuntime.jsxs(V.Provider,{value:e,children:[n,r===0&&jsxRuntime.jsx(J,{})]})})})});return r===0?jsxRuntime.jsx(chunkP427AFIE_js.c,{children:d}):d}ve.displayName="LingeeProvider";function he(){return ze.useContext(V)}function W(e){return he()[e]}function oo(){return ze.useContext(Z)}var _e={info:jsxRuntime.jsx(lingeeIcon.ExclamationCircleFill,{size:20}),success:jsxRuntime.jsx(lingeeIcon.CheckCircleFill,{size:20}),warning:jsxRuntime.jsx(lingeeIcon.ExclamationCircleFill1,{size:20}),error:jsxRuntime.jsx(lingeeIcon.XCircleFill,{size:20})};function $({type:e,content:o,icon:t,closable:n,className:r,onClose:a}){let i=W("Toast"),s=()=>{if(t===null)return null;let l=t!==void 0?t:_e[e];return jsxRuntime.jsx("span",{className:"lg-toast__icon",children:l})};return jsxRuntime.jsxs("div",{className:chunkDCDWEVW4_js.a("lg-toast",`lg-toast--${e}`,r),children:[s(),jsxRuntime.jsx("span",{className:"lg-toast__content",children:o}),n&&jsxRuntime.jsx("button",{className:"lg-toast__close",onClick:a,"aria-label":i.close,type:"button",children:jsxRuntime.jsx(lingeeIcon.XLg,{size:16})})]})}var ee="lingee-web-bridge",oe="1.0.0",Ne="host",De="iframe",Re="lingee-web-bridge:host-toast-show",He="lingee-web-bridge:host-toast-dismiss",Ie="lingee-web-bridge:host-toast-probe",Me="lingee-web-bridge:host-toast-ready";function te(){if(typeof crypto<"u"&&typeof crypto.randomUUID=="function")return crypto.randomUUID();let e=Date.now();return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,o=>{let t=(e+Math.random()*16)%16|0;return e=Math.floor(e/16),(o==="x"?t:t&3|8).toString(16)})}function Fe(e,o){return {_protocol:ee,_version:oe,_source:e,_nonce:te(),_traceId:"",payload:o}}function Oe(e,o){if(typeof e!="object"||e===null)return false;let t=e;return t._protocol===ee&&t._version===oe&&t._source===o&&typeof t._nonce=="string"&&"payload"in t}function y(){return typeof window<"u"&&window.parent!==window}var C=false,f=new Map,Q=false;function Ae(e){if(!Oe(e,Ne))return false;let o=e.payload;return !!o&&typeof o=="object"&&o.type===Me}function R(e){window.parent.postMessage(Fe(De,e),"*");}function w(){Q||!y()||(Q=true,window.addEventListener("message",e=>{e.source===window.parent&&Ae(e.data)&&(C=true);}),window.addEventListener("pagehide",()=>{!C||f.size===0||S();}),R({type:Ie}));}function H(){return w(),C}function ne(e){if(w(),!C||!e.content)return null;let o=te();R({type:Re,toastId:o,content:e.content.slice(0,500),level:e.level,duration:e.duration,key:e.key});let t=e.duration??3e3,n=t>0?window.setTimeout(()=>f.delete(o),t+500):void 0;return f.set(o,n),o}function S(e){if(w(),!!C){if(e){let o=f.get(e);o!==void 0&&window.clearTimeout(o),f.delete(e);}else f.forEach(o=>{o!==void 0&&window.clearTimeout(o);}),f.clear();R({type:He,toastId:e});}}w();function I(){if(!(typeof window>"u"))return window.lingeeBridge}function re(e){if(typeof e=="string")return e;if(typeof e=="number")return String(e)}function ie(e,o={}){return !(!(y()?H():E()&&typeof I()?.showToast=="function")||re(e.content)===void 0||e.icon!==void 0||e.className!==void 0||e.closable||o.getContainer!==void 0||o.top!==void 0||o.maxCount!==void 0)}function ae(e,o,t,n={}){let r=re(o.content);if(r===void 0)return null;let a={level:e,content:r,duration:t,key:o.key};if(y()){let d=ne(a);return d?(n.onAccepted?.(),{dismiss:()=>S(d)}):null}let i=I(),s=i?.showToast;if(!s)return null;let l=null,c=null,p=false,g=false,m=()=>{p||g||c||(c=n.onFallback?.()??null);};return Promise.resolve().then(()=>s(a)).then(d=>{if(!d?.ok||!d.toastId){m();return}if(g=true,l=d.toastId,p){i?.dismissToast?.(l);return}n.onAccepted?.();}).catch(d=>{console.error("[lingee-ui] showToast failed:",d),m();}),{dismiss:()=>{if(!p){if(p=true,c){c(),c=null;return}l&&i?.dismissToast?.(l);}}}}function se(){if(y())return H()?(S(),true):false;let e=I();return !E()||typeof e?.dismissToast!="function"?false:(e.dismissToast().catch(o=>{console.error("[lingee-ui] dismissToast failed:",o);}),true)}var T={};function J(){let e=T.top??16;return jsxRuntime.jsx(sonner.Toaster,{position:"top-center",offset:e,gap:8,closeButton:false,toastOptions:{unstyled:true,className:"lg-toast-wrapper"},style:{"--width":"560px"}})}function Be(e){let o=e[0];return typeof o=="object"&&o!==null&&!ze__default.default.isValidElement(o)?o:{content:o,duration:e[1],onClose:e[2]}}function le(e,o,t,n=()=>o.onClose?.()){let r=t===0?1/0:t,a=false,i=()=>{a||(a=true,n());},s=sonner.toast.custom(l=>jsxRuntime.jsx($,{type:e,content:o.content,icon:o.icon,closable:o.closable,className:o.className,onClose:()=>sonner.toast.dismiss(l)}),{...o.key!==void 0&&{id:o.key},duration:r,onAutoClose:i,onDismiss:i});return ()=>{sonner.toast.dismiss(s),i();}}var L=new Set;function Ue(e,o){let t=o.duration!==void 0?o.duration<0?T.duration??3e3:o.duration:T.duration??3e3;if(ie(o,T)){let n=false,r,a=()=>{},i=()=>{n||(n=true,r!==void 0&&clearTimeout(r),L.delete(a),o.onClose?.());},s=ae(e,o,t,{onAccepted:()=>{t>0&&!n&&(r=setTimeout(i,t));},onFallback:()=>le(e,{...o,onClose:void 0},t,i)});if(s)return a=()=>{n||(s.dismiss(),i());},L.add(a),a}return le(e,o,t)}function k(e){return (...o)=>{let t=Be(o);return Ue(e,t)}}var So={info:k("info"),success:k("success"),warning:k("warning"),error:k("error"),destroy:()=>{Array.from(L).forEach(e=>e()),L.clear(),se(),sonner.toast.dismiss();},config:e=>{T={...T,...e};}};exports.a=E;exports.b=J;exports.c=So;exports.d=v;exports.e=ge;exports.f=me;exports.g=xe;exports.h=ve;exports.i=he;exports.j=W;exports.k=oo;
|
package/dist/chunk-4OLAOR2B.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {b}from'./chunk-H44VO62M.mjs';import {j}from'./chunk-XQRQYJIE.mjs';import {a}from'./chunk-DN2VKVCV.mjs';import Bl,{useState,useRef,useCallback,useEffect,useLayoutEffect}from'react';import {cva}from'class-variance-authority';import*as s from'@radix-ui/react-tabs';import {ChevronLeft,ChevronRight}from'lingee-icon';import {jsxs,jsx}from'react/jsx-runtime';var C={arrows:true,step:200,fade:true,scrollIntoView:true},Sl=cva("lg-tabs",{variants:{variant:{segmented:"lg-tabs--segmented",rounded:"lg-tabs--rounded",solid:"lg-tabs--solid",outline:"lg-tabs--outline",underline:"lg-tabs--underline"},size:{sm:"lg-tabs--sm",md:"lg-tabs--md"}},defaultVariants:{variant:"segmented",size:"md"}}),ol=typeof window<"u"?useLayoutEffect:useEffect;function Ll({items:o,activeKey:d,defaultActiveKey:tl,onChange:N,variant:i="segmented",size:nl="md",overflow:sl,scrollOptions:y,wrap:il=false,scrollable:bl=false,glassy:cl=false,transparent:dl=false,animated:B=true,destroyInactivePanel:M=false,className:ul,dir:vl,...fl},pl){let V=j("Tabs"),O=sl??(bl?"scroll":il?"wrap":"none"),X=O==="wrap"&&(i==="segmented"||i==="rounded")?"none":O,a$1=X==="scroll",A=X==="wrap",P=y?.arrows??C.arrows,T=y?.step??C.step,H=y?.fade??C.fade,$=y?.scrollIntoView??C.scrollIntoView,u=d!==void 0,ml=o.find(l=>!l.disabled)?.key,W=u?void 0:tl??ml,[hl,wl]=useState(W),t=u?d:hl,k=useRef(o.findIndex(l=>l.key===t)),[j$1,x]=useState("right"),_l=useCallback(l=>{let g=o.findIndex(_=>_.key===l),r=k.current;g>r?x("right"):g<r&&x("left"),k.current=g,u||wl(l),N?.(l);},[u,N,o]);useEffect(()=>{if(u&&d){let l=o.findIndex(r=>r.key===d),g=k.current;l!==g&&(l>g?x("right"):x("left"),k.current=l);}},[u,d,o]);let q=o.some(l=>l.children!=null),n=useRef(null),E=useRef(new Map),[Fl,R]=useState({opacity:0}),h=useRef(false),U=useRef(0),yl=useCallback(l=>g=>{g?E.current.set(l,g):E.current.delete(l);},[]),w=useCallback(l=>{let g=n.current,r=t?E.current.get(t):void 0;if(!g||!r){R(al=>al.opacity===0?al:{opacity:0});return}let _=g.getBoundingClientRect(),f=(i==="underline"?r.querySelector(".lg-tabs__tab-label")??r:r).getBoundingClientRect(),rl=f.left-_.left+g.scrollLeft;if(!A){R({width:f.width,transform:`translateX(${rl}px)`,opacity:1,transition:l?"transform var(--_tabs-slider-duration) var(--lg-transition-timing), width var(--_tabs-slider-duration) var(--lg-transition-timing)":"none"});return}let S=i==="underline",Cl=S?r.getBoundingClientRect():f,L=S?Cl.bottom-_.top:f.top-_.top,Dl=l&&Math.abs(L-U.current)>1;U.current=L,R({width:f.width,...S?null:{height:f.height},top:0,bottom:"auto",transform:`translate(${rl}px, ${L}px)`,opacity:1,transition:Dl?"opacity var(--_tabs-slider-duration) var(--lg-transition-timing)":l?"transform var(--_tabs-slider-duration) var(--lg-transition-timing), width var(--_tabs-slider-duration) var(--lg-transition-timing)":"none"});},[t,i,A]),Y=useRef(w);Y.current=w;let G=useRef(0);ol(()=>{let l=h.current;w(l),l&&(G.current=Date.now()),h.current=true;},[w,t]);let J=o.map(l=>`${l.key}:${l.disabled?1:0}`).join("|");ol(()=>{let l=h.current;h.current=false,w(false),h.current=l;},[J]),useEffect(()=>{if(!n.current)return;let l=new ResizeObserver(()=>{Date.now()-G.current<350||Y.current(false);});return l.observe(n.current),()=>l.disconnect()},[]);let[kl,Q]=useState(false),[Z,xl]=useState(false),[K,El]=useState(false),v=useCallback(()=>{let l=n.current;!l||!a$1||(Q(l.scrollWidth>l.clientWidth+1),xl(l.scrollLeft>1),El(l.scrollLeft+l.clientWidth<l.scrollWidth-1));},[a$1]);useEffect(()=>{if(!a$1){Q(false);return}let l=n.current;if(l)return v(),l.addEventListener("scroll",v),()=>l.removeEventListener("scroll",v)},[a$1,v,J]),useEffect(()=>{let l=n.current;if(!a$1||!l)return;let g=new ResizeObserver(()=>v());return g.observe(l),()=>g.disconnect()},[a$1,v]),useEffect(()=>{if(!a$1||!$||!t)return;let l=E.current.get(t);typeof l?.scrollIntoView=="function"&&l.scrollIntoView({behavior:"smooth",inline:"nearest",block:"nearest"});},[a$1,$,t]);let ll=useCallback((l,g)=>{let r=n.current;r&&(r.scrollBy({left:l==="left"?-T:T,behavior:"smooth"}),g&&g.detail>0&&g.currentTarget.blur());},[T]),z=a$1&&kl&&P!==false,gl=jsxs(s.List,{className:a("lg-tabs__list",a$1&&"lg-tabs__list--scrollable"),ref:n,children:[jsx("span",{className:a(`lg-tabs__slider lg-tabs__slider--${i}`,cl&&"lg-tabs__slider--glassy"),style:Fl,"aria-hidden":true}),o.map(l=>jsxs(s.Trigger,{value:l.key,disabled:l.disabled,ref:yl(l.key),"aria-label":l.ariaLabel,className:a("lg-tabs__tab",l.disabled&&"lg-tabs__tab--disabled"),children:[l.icon&&jsx("span",{className:"lg-tabs__tab-icon",children:l.icon}),jsx("span",{className:"lg-tabs__tab-label",children:l.label}),l.suffix!=null&&jsx("span",{className:"lg-tabs__tab-suffix",children:l.suffix})]},l.key))]});return jsxs(s.Root,{ref:pl,className:a(Sl({variant:i,size:nl}),A&&"lg-tabs--wrap",a$1&&"lg-tabs--scrollable",dl&&"lg-tabs--transparent",q&&"lg-tabs--has-content",ul),value:d,defaultValue:W,onValueChange:_l,dir:vl,...fl,children:[a$1?jsxs("div",{className:a("lg-tabs__scroll-wrapper",P==="hover"&&"lg-tabs__scroll-wrapper--hover-controls",!z&&"lg-tabs__scroll-wrapper--no-arrows"),children:[z&&jsx(b,{shape:"circle",size:"sm",variant:"text",icon:jsx(ChevronLeft,{}),tooltip:V.scrollLeft,disabled:!Z,onClick:l=>ll("left",l),className:"lg-tabs__scroll-arrow lg-tabs__scroll-arrow--left"}),H&&Z&&jsx("span",{className:"lg-tabs__fade lg-tabs__fade--left","aria-hidden":true}),gl,H&&K&&jsx("span",{className:"lg-tabs__fade lg-tabs__fade--right","aria-hidden":true}),z&&jsx(b,{shape:"circle",size:"sm",variant:"text",icon:jsx(ChevronRight,{}),tooltip:V.scrollRight,disabled:!K,onClick:l=>ll("right",l),className:"lg-tabs__scroll-arrow lg-tabs__scroll-arrow--right"})]}):gl,q&&jsx("div",{className:"lg-tabs__content-wrapper",children:o.map(l=>{if(l.children==null)return null;let g=l.key===t;return M&&!g?null:jsx(s.Content,{value:l.key,forceMount:M?void 0:true,className:a("lg-tabs__panel",B&&"lg-tabs__panel--animated",g&&"lg-tabs__panel--active",!g&&"lg-tabs__panel--inactive",B&&j$1==="right"&&"lg-tabs__panel--slide-right",B&&j$1==="left"&&"lg-tabs__panel--slide-left"),children:l.children},l.key)})})]})}var ql=Bl.forwardRef(Ll);export{Sl as a,ql as b};
|
package/dist/chunk-6OF5LIF4.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {a}from'./chunk-DN2VKVCV.mjs';import e from'react';import*as c from'@radix-ui/react-popover';import {jsx}from'react/jsx-runtime';var L="data-lg-modality",z=false;function M(r){document.documentElement.setAttribute(L,r);}function G(){return typeof document>"u"?false:document.documentElement.getAttribute(L)==="keyboard"}function N(){z||typeof document>"u"||(z=true,document.documentElement.hasAttribute(L)||M("keyboard"),document.addEventListener("pointerdown",()=>M("pointer"),true),document.addEventListener("keydown",r=>{(r.key==="Enter"||r.key===" "||r.key==="Tab"||r.key.startsWith("Arrow"))&&M("keyboard");},true));}var O=e.createContext(null),k=e.createContext(null);function F(r,n,i,t,a){let d=e.useRef(),u=e.useRef(t);u.current=t;let f=e.useRef(a);f.current=a;let s=e.useCallback(()=>{clearTimeout(d.current),d.current=void 0;},[]);return e.useEffect(()=>s,[r,n,i,s]),e.useMemo(()=>{if(!r)return null;let g=(l,m)=>{s(),d.current=setTimeout(()=>{d.current=void 0,u.current(l);},m);};return {onPointerEnter:()=>g(true,n),onPointerLeave:()=>g(false,i),onTriggerClick:l=>{s(),f.current(l);}}},[r,n,i,s])}function I({children:r,open:n,defaultOpen:i,onOpenChange:t,modal:a=false,trigger:d="click",mouseEnterDelay:u=100,mouseLeaveDelay:f=100}){e.useEffect(()=>{N();},[]);let[s,g]=e.useState(i??false),l=n!==void 0,m=l?n:s,o=e.useRef(false),y=e.useRef(false),C=e.useCallback(v=>{if(o.current){o.current=false;return}l||g(v),t?.(v);},[l,t]),x=e.useCallback(v=>{y.current=v,C(v);},[C]),A=e.useCallback(v=>{o.current=v==="mouse",v==="fallback"&&(y.current=false);},[]),h=F(d==="hover",u,f,x,A),E=e.useMemo(()=>h?{...h,shouldPreventAutoFocus:()=>y.current}:null,[h]),H=e.useRef(null),b=e.useRef(null),R=e.useMemo(()=>({anchorRef:H,triggerRef:b,open:m}),[m]),T=jsx(c.Root,{open:m,onOpenChange:C,modal:a,children:r});return jsx(k.Provider,{value:R,children:jsx(O.Provider,{value:E,children:T})})}I.displayName="Popover";var Y=e.forwardRef(({children:r,asChild:n=true,onPointerEnter:i,onPointerLeave:t,onPointerDown:a,onClick:d,...u},f)=>{let s=e.useContext(O),g=e.useContext(k),l=e.useRef(null),m=e.useCallback(o=>{g&&(g.triggerRef.current=o),typeof f=="function"?f(o):f&&(f.current=o);},[f,g]);return jsx(c.Trigger,{ref:m,asChild:n,onPointerEnter:o=>{i?.(o),(!o.pointerType||o.pointerType==="mouse")&&s?.onPointerEnter();},onPointerLeave:o=>{t?.(o),(!o.pointerType||o.pointerType==="mouse")&&s?.onPointerLeave();},onPointerDown:o=>{l.current=o.pointerType,a?.(o);},onClick:o=>{if(d?.(o),o.defaultPrevented){l.current=null;return}let y=o.detail>0&&l.current==="mouse"?"mouse":"fallback";s?.onTriggerClick(y),l.current=null;},...u,children:r})});Y.displayName="PopoverTrigger";var D=e.forwardRef(({children:r,asChild:n=true,...i},t)=>{let a=e.useContext(k),d=e.useCallback(u=>{a&&(a.anchorRef.current=u),typeof t=="function"?t(u):t&&(t.current=u);},[t,a]);return jsx(c.Anchor,{ref:d,asChild:n,...i,children:r})});D.displayName="PopoverAnchor";var V=e.forwardRef(({children:r,className:n,side:i="bottom",align:t="center",sideOffset:a$1=4,alignOffset:d=0,container:u,collisionPadding:f=8,hideWhenDetached:s=true,onEscapeKeyDown:g,onPointerDownOutside:l,onFocusOutside:m,onInteractOutside:o,onOpenAutoFocus:y,onCloseAutoFocus:C,onPointerEnter:x,onPointerLeave:A,style:h,...E},H)=>{let b=e.useContext(O),R=e.useContext(k),[T,v]=e.useState(false);e.useEffect(()=>{if(!s||!R?.open)return;let p=R.anchorRef.current??R.triggerRef.current;if(!p||typeof p.checkVisibility!="function"||typeof ResizeObserver>"u")return;let _=new ResizeObserver(()=>{v(!p.checkVisibility());});return _.observe(p),()=>{_.disconnect(),v(false);}},[s,R]);let B=b?{"--_popover-bridge-size":`${a$1+2}px`,...h}:h,S=jsx(c.Content,{ref:H,className:a("lg-popover",b&&"lg-popover--hover-bridge",n),style:T?{...B,visibility:"hidden",pointerEvents:"none"}:B,"data-anchor-hidden":T||void 0,onPointerEnter:p=>{x?.(p),(!p.pointerType||p.pointerType==="mouse")&&b?.onPointerEnter();},onPointerLeave:p=>{A?.(p),(!p.pointerType||p.pointerType==="mouse")&&b?.onPointerLeave();},side:i,align:t,sideOffset:a$1,alignOffset:d,collisionPadding:f,onEscapeKeyDown:g,onPointerDownOutside:l,onFocusOutside:m,onInteractOutside:o,onOpenAutoFocus:y??(b?p=>{b.shouldPreventAutoFocus()&&p.preventDefault();}:void 0),onCloseAutoFocus:C,...E,children:r});return u===null?S:jsx(c.Portal,{container:u,children:S})});V.displayName="PopoverContent";var X=e.forwardRef(({className:r,width:n=10,height:i=5,...t},a$1)=>jsx(c.Arrow,{ref:a$1,className:a("lg-popover__arrow",r),width:n,height:i,...t}));X.displayName="PopoverArrow";var j=e.forwardRef(({children:r,asChild:n=true,...i},t)=>jsx(c.Close,{ref:t,asChild:n,...i,children:r}));j.displayName="PopoverClose";export{G as a,N as b,I as c,Y as d,D as e,V as f,X as g,j as h};
|
package/dist/chunk-A2VQ5WK4.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
'use strict';var chunkDCDWEVW4_js=require('./chunk-DCDWEVW4.js'),e=require('react'),c=require('@radix-ui/react-popover'),jsxRuntime=require('react/jsx-runtime');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var e__default=/*#__PURE__*/_interopDefault(e);var c__namespace=/*#__PURE__*/_interopNamespace(c);var L="data-lg-modality",z=false;function M(r){document.documentElement.setAttribute(L,r);}function G(){return typeof document>"u"?false:document.documentElement.getAttribute(L)==="keyboard"}function N(){z||typeof document>"u"||(z=true,document.documentElement.hasAttribute(L)||M("keyboard"),document.addEventListener("pointerdown",()=>M("pointer"),true),document.addEventListener("keydown",r=>{(r.key==="Enter"||r.key===" "||r.key==="Tab"||r.key.startsWith("Arrow"))&&M("keyboard");},true));}var O=e__default.default.createContext(null),k=e__default.default.createContext(null);function F(r,n,i,t,a){let d=e__default.default.useRef(),u=e__default.default.useRef(t);u.current=t;let f=e__default.default.useRef(a);f.current=a;let s=e__default.default.useCallback(()=>{clearTimeout(d.current),d.current=void 0;},[]);return e__default.default.useEffect(()=>s,[r,n,i,s]),e__default.default.useMemo(()=>{if(!r)return null;let g=(l,m)=>{s(),d.current=setTimeout(()=>{d.current=void 0,u.current(l);},m);};return {onPointerEnter:()=>g(true,n),onPointerLeave:()=>g(false,i),onTriggerClick:l=>{s(),f.current(l);}}},[r,n,i,s])}function I({children:r,open:n,defaultOpen:i,onOpenChange:t,modal:a=false,trigger:d="click",mouseEnterDelay:u=100,mouseLeaveDelay:f=100}){e__default.default.useEffect(()=>{N();},[]);let[s,g]=e__default.default.useState(i??false),l=n!==void 0,m=l?n:s,o=e__default.default.useRef(false),y=e__default.default.useRef(false),C=e__default.default.useCallback(v=>{if(o.current){o.current=false;return}l||g(v),t?.(v);},[l,t]),x=e__default.default.useCallback(v=>{y.current=v,C(v);},[C]),A=e__default.default.useCallback(v=>{o.current=v==="mouse",v==="fallback"&&(y.current=false);},[]),h=F(d==="hover",u,f,x,A),E=e__default.default.useMemo(()=>h?{...h,shouldPreventAutoFocus:()=>y.current}:null,[h]),H=e__default.default.useRef(null),b=e__default.default.useRef(null),R=e__default.default.useMemo(()=>({anchorRef:H,triggerRef:b,open:m}),[m]),T=jsxRuntime.jsx(c__namespace.Root,{open:m,onOpenChange:C,modal:a,children:r});return jsxRuntime.jsx(k.Provider,{value:R,children:jsxRuntime.jsx(O.Provider,{value:E,children:T})})}I.displayName="Popover";var Y=e__default.default.forwardRef(({children:r,asChild:n=true,onPointerEnter:i,onPointerLeave:t,onPointerDown:a,onClick:d,...u},f)=>{let s=e__default.default.useContext(O),g=e__default.default.useContext(k),l=e__default.default.useRef(null),m=e__default.default.useCallback(o=>{g&&(g.triggerRef.current=o),typeof f=="function"?f(o):f&&(f.current=o);},[f,g]);return jsxRuntime.jsx(c__namespace.Trigger,{ref:m,asChild:n,onPointerEnter:o=>{i?.(o),(!o.pointerType||o.pointerType==="mouse")&&s?.onPointerEnter();},onPointerLeave:o=>{t?.(o),(!o.pointerType||o.pointerType==="mouse")&&s?.onPointerLeave();},onPointerDown:o=>{l.current=o.pointerType,a?.(o);},onClick:o=>{if(d?.(o),o.defaultPrevented){l.current=null;return}let y=o.detail>0&&l.current==="mouse"?"mouse":"fallback";s?.onTriggerClick(y),l.current=null;},...u,children:r})});Y.displayName="PopoverTrigger";var D=e__default.default.forwardRef(({children:r,asChild:n=true,...i},t)=>{let a=e__default.default.useContext(k),d=e__default.default.useCallback(u=>{a&&(a.anchorRef.current=u),typeof t=="function"?t(u):t&&(t.current=u);},[t,a]);return jsxRuntime.jsx(c__namespace.Anchor,{ref:d,asChild:n,...i,children:r})});D.displayName="PopoverAnchor";var V=e__default.default.forwardRef(({children:r,className:n,side:i="bottom",align:t="center",sideOffset:a=4,alignOffset:d=0,container:u,collisionPadding:f=8,hideWhenDetached:s=true,onEscapeKeyDown:g,onPointerDownOutside:l,onFocusOutside:m,onInteractOutside:o,onOpenAutoFocus:y,onCloseAutoFocus:C,onPointerEnter:x,onPointerLeave:A,style:h,...E},H)=>{let b=e__default.default.useContext(O),R=e__default.default.useContext(k),[T,v]=e__default.default.useState(false);e__default.default.useEffect(()=>{if(!s||!R?.open)return;let p=R.anchorRef.current??R.triggerRef.current;if(!p||typeof p.checkVisibility!="function"||typeof ResizeObserver>"u")return;let _=new ResizeObserver(()=>{v(!p.checkVisibility());});return _.observe(p),()=>{_.disconnect(),v(false);}},[s,R]);let B=b?{"--_popover-bridge-size":`${a+2}px`,...h}:h,S=jsxRuntime.jsx(c__namespace.Content,{ref:H,className:chunkDCDWEVW4_js.a("lg-popover",b&&"lg-popover--hover-bridge",n),style:T?{...B,visibility:"hidden",pointerEvents:"none"}:B,"data-anchor-hidden":T||void 0,onPointerEnter:p=>{x?.(p),(!p.pointerType||p.pointerType==="mouse")&&b?.onPointerEnter();},onPointerLeave:p=>{A?.(p),(!p.pointerType||p.pointerType==="mouse")&&b?.onPointerLeave();},side:i,align:t,sideOffset:a,alignOffset:d,collisionPadding:f,onEscapeKeyDown:g,onPointerDownOutside:l,onFocusOutside:m,onInteractOutside:o,onOpenAutoFocus:y??(b?p=>{b.shouldPreventAutoFocus()&&p.preventDefault();}:void 0),onCloseAutoFocus:C,...E,children:r});return u===null?S:jsxRuntime.jsx(c__namespace.Portal,{container:u,children:S})});V.displayName="PopoverContent";var X=e__default.default.forwardRef(({className:r,width:n=10,height:i=5,...t},a)=>jsxRuntime.jsx(c__namespace.Arrow,{ref:a,className:chunkDCDWEVW4_js.a("lg-popover__arrow",r),width:n,height:i,...t}));X.displayName="PopoverArrow";var j=e__default.default.forwardRef(({children:r,asChild:n=true,...i},t)=>jsxRuntime.jsx(c__namespace.Close,{ref:t,asChild:n,...i,children:r}));j.displayName="PopoverClose";exports.a=G;exports.b=N;exports.c=I;exports.d=Y;exports.e=D;exports.f=V;exports.g=X;exports.h=j;
|
package/dist/chunk-XQRQYJIE.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {c}from'./chunk-KXUUVDLA.mjs';import {a}from'./chunk-DN2VKVCV.mjs';import ze,{createContext,useContext,useMemo,useRef,useEffect}from'react';import {Toaster,toast}from'sonner';import {XCircleFill,ExclamationCircleFill1,CheckCircleFill,ExclamationCircleFill,XLg}from'lingee-icon';import {jsx,jsxs}from'react/jsx-runtime';var ce={locale:"zh-CN",Button:{},Breadcrumb:{more:"\u66F4\u591A",back:"\u8FD4\u56DE"},Select:{loading:"\u52A0\u8F7D\u4E2D",loadError:"\u52A0\u8F7D\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5",loadFailed:"\u52A0\u8F7D\u5931\u8D25",notFound:"\u641C\u7D22\u65E0\u7ED3\u679C",clear:"\u6E05\u7A7A"},Dropdown:{clear:"\u6E05\u9664",loading:"\u52A0\u8F7D\u4E2D",loadError:"\u52A0\u8F7D\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5",empty:"\u6682\u65E0\u6570\u636E"},Tabs:{scrollLeft:"\u5411\u5DE6\u6EDA\u52A8",scrollRight:"\u5411\u53F3\u6EDA\u52A8"},Carousel:{carousel:"\u8F6E\u64AD",prev:"\u4E0A\u4E00\u5F20",next:"\u4E0B\u4E00\u5F20",goToPage:"\u8DF3\u8F6C\u5230\u7B2C {page} \u5F20"},Form:{required:"{label}\u4E0D\u80FD\u4E3A\u7A7A",requiredNoLabel:"\u6B64\u9879\u4E0D\u80FD\u4E3A\u7A7A"},Tag:{close:"\u5173\u95ED"},Upload:{retry:"\u91CD\u65B0\u4E0A\u4F20",remove:"\u79FB\u9664\u6587\u4EF6",removeShort:"\u79FB\u9664",dragText:"\u62D6\u62FD\u6587\u4EF6\u5230\u6B64\u5904\uFF0C\u6216",clickUpload:"\u70B9\u51FB\u4E0A\u4F20"},ColorPicker:{placeholder:"\u8BF7\u9009\u62E9\u989C\u8272"},DatePicker:{placeholder:"\u5E74/\u6708/\u65E5",today:"\u4ECA\u5929",prevYear:"\u4E0A\u4E00\u5E74",nextYear:"\u4E0B\u4E00\u5E74",prevMonth:"\u4E0A\u4E00\u6708",nextMonth:"\u4E0B\u4E00\u6708",prevDecade:"\u4E0A\u4E00\u7EC4\u5E74\u4EFD",nextDecade:"\u4E0B\u4E00\u7EC4\u5E74\u4EFD",months:["1\u6708","2\u6708","3\u6708","4\u6708","5\u6708","6\u6708","7\u6708","8\u6708","9\u6708","10\u6708","11\u6708","12\u6708"],yearFormat:"{year}\u5E74",monthFormat:"{month}\u6708"},RangePicker:{startPlaceholder:"\u5E74/\u6708/\u65E5",endPlaceholder:"\u5E74/\u6708/\u65E5"},TimePicker:{now:"\u73B0\u5728",confirm:"\u786E\u5B9A",placeholder:"\u65F6:\u5206",placeholderFull:"\u65F6:\u5206:\u79D2"},Table:{loading:"\u52A0\u8F7D\u4E2D",empty:"\u6682\u65E0\u6570\u636E",loadError:"\u52A0\u8F7D\u5931\u8D25"},Tree:{empty:"\u6682\u65E0\u6570\u636E"},Pagination:{total:"\u5171 {total} \u6761",prevPage:"\u4E0A\u4E00\u9875",nextPage:"\u4E0B\u4E00\u9875",itemsPerPage:"{size}\u6761/\u9875",jumpTo:"\u8DF3\u81F3",page:"\u9875"},Dialog:{close:"\u5173\u95ED"},Drawer:{close:"\u5173\u95ED"},Input:{clear:"\u6E05\u7A7A",expand:"\u5C55\u5F00\u8F93\u5165\u6846"},Alert:{close:"\u5173\u95ED"},Toast:{close:"\u5173\u95ED\u6D88\u606F"},Spin:{loading:"\u52A0\u8F7D\u4E2D"},Empty:{retry:"\u91CD\u8BD5"},InfiniteScroll:{loading:"\u52A0\u8F7D\u4E2D",noMore:"\u6CA1\u6709\u66F4\u591A\u4E86",loadFailed:"\u52A0\u8F7D\u5931\u8D25"},Sidebar:{expand:"\u5C55\u5F00",collapse:"\u6536\u8D77",loading:"\u52A0\u8F7D\u4E2D",empty:"\u6682\u65E0\u6570\u636E",loadError:"\u52A0\u8F7D\u5931\u8D25"}},v=ce;var _=new Map,O=0;function A(){return O+=1,{id:O}}function z(e,o,t){_.set(e.id,{site:o,depth:t});}function Y(e){_.delete(e.id);}function pe(){let e;for(let o of _.values())(!e||o.depth>=e.depth)&&(e=o);return e?.site}function E(){return pe()==="lingee"}var U={dialog:{}},h=createContext(U),N=new Map,B=0;function G(){return B+=1,{id:B}}function q(e,o,t){N.set(e.id,{config:o,depth:t});}function j(e){N.delete(e.id);}function ge(){let e;for(let o of N.values())(!e||o.depth>=e.depth)&&(e=o);return e?.config??U}function me(){return useContext(h)}var Te={locale:"en-US",Button:{},Breadcrumb:{more:"More",back:"Back"},Select:{loading:"Loading",loadError:"Failed to load, please retry",loadFailed:"Failed to load",notFound:"No results found",clear:"Clear"},Dropdown:{clear:"Clear",loading:"Loading",loadError:"Failed to load, please retry",empty:"No data"},Tabs:{scrollLeft:"Scroll left",scrollRight:"Scroll right"},Carousel:{carousel:"Carousel",prev:"Previous slide",next:"Next slide",goToPage:"Go to slide {page}"},Form:{required:"{label} is required",requiredNoLabel:"This field is required"},Tag:{close:"Close"},Upload:{retry:"Retry upload",remove:"Remove file",removeShort:"Remove",dragText:"Drag files here, or ",clickUpload:"click to upload"},ColorPicker:{placeholder:"Select a color"},DatePicker:{placeholder:"YYYY/MM/DD",today:"Today",prevYear:"Previous year",nextYear:"Next year",prevMonth:"Previous month",nextMonth:"Next month",prevDecade:"Previous decade",nextDecade:"Next decade",months:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],yearFormat:"{year}",monthFormat:"{month}"},RangePicker:{startPlaceholder:"Start date",endPlaceholder:"End date"},TimePicker:{now:"Now",confirm:"OK",placeholder:"HH:mm",placeholderFull:"HH:mm:ss"},Table:{loading:"Loading",empty:"No data",loadError:"Failed to load"},Tree:{empty:"No data"},Pagination:{total:"{total} items",prevPage:"Previous page",nextPage:"Next page",itemsPerPage:"{size} / page",jumpTo:"Go to",page:""},Dialog:{close:"Close"},Drawer:{close:"Close"},Input:{clear:"Clear",expand:"Expand input"},Alert:{close:"Close"},Toast:{close:"Close message"},Spin:{loading:"Loading"},Empty:{retry:"Retry"},InfiniteScroll:{loading:"Loading",noMore:"No more items",loadFailed:"Failed to load"},Sidebar:{expand:"Expand",collapse:"Collapse",loading:"Loading",empty:"No data",loadError:"Failed to load"}},xe=Te;var V=createContext(v),Z=createContext(void 0),X=createContext(-1);function ve({locale:e=v,site:o,dialog:t,children:n}){let r=useContext(X)+1,a=useContext(h),i=t?.zIndex,s=a.dialog.zIndex,l=useMemo(()=>({dialog:{zIndex:i??s}}),[i,s]),c$1=useRef();c$1.current||(c$1.current=A());let p=c$1.current,g=useRef();g.current||(g.current=G());let m=g.current;z(p,o,r),q(m,l,r),useEffect(()=>()=>{Y(p),j(m);},[m,p]);let d=jsx(X.Provider,{value:r,children:jsx(h.Provider,{value:l,children:jsx(Z.Provider,{value:o,children:jsxs(V.Provider,{value:e,children:[n,r===0&&jsx(J,{})]})})})});return r===0?jsx(c,{children:d}):d}ve.displayName="LingeeProvider";function he(){return useContext(V)}function W(e){return he()[e]}function oo(){return useContext(Z)}var _e={info:jsx(ExclamationCircleFill,{size:20}),success:jsx(CheckCircleFill,{size:20}),warning:jsx(ExclamationCircleFill1,{size:20}),error:jsx(XCircleFill,{size:20})};function $({type:e,content:o,icon:t,closable:n,className:r,onClose:a$1}){let i=W("Toast"),s=()=>{if(t===null)return null;let l=t!==void 0?t:_e[e];return jsx("span",{className:"lg-toast__icon",children:l})};return jsxs("div",{className:a("lg-toast",`lg-toast--${e}`,r),children:[s(),jsx("span",{className:"lg-toast__content",children:o}),n&&jsx("button",{className:"lg-toast__close",onClick:a$1,"aria-label":i.close,type:"button",children:jsx(XLg,{size:16})})]})}var ee="lingee-web-bridge",oe="1.0.0",Ne="host",De="iframe",Re="lingee-web-bridge:host-toast-show",He="lingee-web-bridge:host-toast-dismiss",Ie="lingee-web-bridge:host-toast-probe",Me="lingee-web-bridge:host-toast-ready";function te(){if(typeof crypto<"u"&&typeof crypto.randomUUID=="function")return crypto.randomUUID();let e=Date.now();return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,o=>{let t=(e+Math.random()*16)%16|0;return e=Math.floor(e/16),(o==="x"?t:t&3|8).toString(16)})}function Fe(e,o){return {_protocol:ee,_version:oe,_source:e,_nonce:te(),_traceId:"",payload:o}}function Oe(e,o){if(typeof e!="object"||e===null)return false;let t=e;return t._protocol===ee&&t._version===oe&&t._source===o&&typeof t._nonce=="string"&&"payload"in t}function y(){return typeof window<"u"&&window.parent!==window}var C=false,f=new Map,Q=false;function Ae(e){if(!Oe(e,Ne))return false;let o=e.payload;return !!o&&typeof o=="object"&&o.type===Me}function R(e){window.parent.postMessage(Fe(De,e),"*");}function w(){Q||!y()||(Q=true,window.addEventListener("message",e=>{e.source===window.parent&&Ae(e.data)&&(C=true);}),window.addEventListener("pagehide",()=>{!C||f.size===0||S();}),R({type:Ie}));}function H(){return w(),C}function ne(e){if(w(),!C||!e.content)return null;let o=te();R({type:Re,toastId:o,content:e.content.slice(0,500),level:e.level,duration:e.duration,key:e.key});let t=e.duration??3e3,n=t>0?window.setTimeout(()=>f.delete(o),t+500):void 0;return f.set(o,n),o}function S(e){if(w(),!!C){if(e){let o=f.get(e);o!==void 0&&window.clearTimeout(o),f.delete(e);}else f.forEach(o=>{o!==void 0&&window.clearTimeout(o);}),f.clear();R({type:He,toastId:e});}}w();function I(){if(!(typeof window>"u"))return window.lingeeBridge}function re(e){if(typeof e=="string")return e;if(typeof e=="number")return String(e)}function ie(e,o={}){return !(!(y()?H():E()&&typeof I()?.showToast=="function")||re(e.content)===void 0||e.icon!==void 0||e.className!==void 0||e.closable||o.getContainer!==void 0||o.top!==void 0||o.maxCount!==void 0)}function ae(e,o,t,n={}){let r=re(o.content);if(r===void 0)return null;let a={level:e,content:r,duration:t,key:o.key};if(y()){let d=ne(a);return d?(n.onAccepted?.(),{dismiss:()=>S(d)}):null}let i=I(),s=i?.showToast;if(!s)return null;let l=null,c=null,p=false,g=false,m=()=>{p||g||c||(c=n.onFallback?.()??null);};return Promise.resolve().then(()=>s(a)).then(d=>{if(!d?.ok||!d.toastId){m();return}if(g=true,l=d.toastId,p){i?.dismissToast?.(l);return}n.onAccepted?.();}).catch(d=>{console.error("[lingee-ui] showToast failed:",d),m();}),{dismiss:()=>{if(!p){if(p=true,c){c(),c=null;return}l&&i?.dismissToast?.(l);}}}}function se(){if(y())return H()?(S(),true):false;let e=I();return !E()||typeof e?.dismissToast!="function"?false:(e.dismissToast().catch(o=>{console.error("[lingee-ui] dismissToast failed:",o);}),true)}var T={};function J(){let e=T.top??16;return jsx(Toaster,{position:"top-center",offset:e,gap:8,closeButton:false,toastOptions:{unstyled:true,className:"lg-toast-wrapper"},style:{"--width":"560px"}})}function Be(e){let o=e[0];return typeof o=="object"&&o!==null&&!ze.isValidElement(o)?o:{content:o,duration:e[1],onClose:e[2]}}function le(e,o,t,n=()=>o.onClose?.()){let r=t===0?1/0:t,a=false,i=()=>{a||(a=true,n());},s=toast.custom(l=>jsx($,{type:e,content:o.content,icon:o.icon,closable:o.closable,className:o.className,onClose:()=>toast.dismiss(l)}),{...o.key!==void 0&&{id:o.key},duration:r,onAutoClose:i,onDismiss:i});return ()=>{toast.dismiss(s),i();}}var L=new Set;function Ue(e,o){let t=o.duration!==void 0?o.duration<0?T.duration??3e3:o.duration:T.duration??3e3;if(ie(o,T)){let n=false,r,a=()=>{},i=()=>{n||(n=true,r!==void 0&&clearTimeout(r),L.delete(a),o.onClose?.());},s=ae(e,o,t,{onAccepted:()=>{t>0&&!n&&(r=setTimeout(i,t));},onFallback:()=>le(e,{...o,onClose:void 0},t,i)});if(s)return a=()=>{n||(s.dismiss(),i());},L.add(a),a}return le(e,o,t)}function k(e){return (...o)=>{let t=Be(o);return Ue(e,t)}}var So={info:k("info"),success:k("success"),warning:k("warning"),error:k("error"),destroy:()=>{Array.from(L).forEach(e=>e()),L.clear(),se(),toast.dismiss();},config:e=>{T={...T,...e};}};export{E as a,J as b,So as c,v as d,ge as e,me as f,xe as g,ve as h,he as i,W as j,oo as k};
|