@origen-ui/tabs 1.0.0
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/LICENSE +21 -0
- package/README.md +92 -0
- package/dist/config-BVOCsdxN.js +16 -0
- package/dist/config-DbOzZnZx.cjs +1 -0
- package/dist/index.cjs +2 -0
- package/dist/index.d.ts +396 -0
- package/dist/index.mjs +2247 -0
- package/dist/locale.cjs +1 -0
- package/dist/locale.d.ts +64 -0
- package/dist/locale.mjs +63 -0
- package/dist/runtime.cjs +1 -0
- package/dist/runtime.d.ts +209 -0
- package/dist/runtime.mjs +9 -0
- package/dist/style.css +1 -0
- package/package.json +77 -0
package/dist/locale.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={pin:"固定页签",unpin:"取消固定页签",close:"关闭页签",closeOthers:"关闭其他页签",closeLeft:"关闭左侧页签",closeRight:"关闭右侧页签",closeAll:"关闭全部页签",refresh:"刷新页签",moveTop:"移至首位",moveBottom:"移至末位",findTabs:"查找页签",findTabsPlaceholder:"搜索页签",noResults:"未找到匹配页签",tabActions:"页签操作",pinned:"已固定",loading:"加载中",empty:"暂无页签",unsaved:"未保存的更改"},o={pin:"Pin tab",unpin:"Unpin tab",close:"Close tab",closeOthers:"Close other tabs",closeLeft:"Close tabs to the left",closeRight:"Close tabs to the right",closeAll:"Close all tabs",refresh:"Refresh tab",moveTop:"Move to start",moveBottom:"Move to end",findTabs:"Find tabs",findTabsPlaceholder:"Search tabs",noResults:"No matching tabs",tabActions:"Tab actions",pinned:"Pinned",loading:"Loading",empty:"No tabs",unsaved:"Unsaved changes"},s={pin:"固定頁籤",unpin:"取消固定頁籤",close:"關閉頁籤",closeOthers:"關閉其他頁籤",closeLeft:"關閉左側頁籤",closeRight:"關閉右側頁籤",closeAll:"關閉全部頁籤",refresh:"重新整理頁籤",moveTop:"移至首位",moveBottom:"移至末位",findTabs:"尋找頁籤",findTabsPlaceholder:"搜尋頁籤",noResults:"找不到符合的頁籤",tabActions:"頁籤操作",pinned:"已固定",loading:"載入中",empty:"暫無頁籤",unsaved:"未儲存的變更"};exports.OG_TABS_LOCALE_EN_US=o;exports.OG_TABS_LOCALE_ZH_CN=e;exports.OG_TABS_LOCALE_ZH_TW=s;
|
package/dist/locale.d.ts
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
export declare const OG_TABS_LOCALE_EN_US: {
|
|
2
|
+
pin: string;
|
|
3
|
+
unpin: string;
|
|
4
|
+
close: string;
|
|
5
|
+
closeOthers: string;
|
|
6
|
+
closeLeft: string;
|
|
7
|
+
closeRight: string;
|
|
8
|
+
closeAll: string;
|
|
9
|
+
refresh: string;
|
|
10
|
+
moveTop: string;
|
|
11
|
+
moveBottom: string;
|
|
12
|
+
findTabs: string;
|
|
13
|
+
findTabsPlaceholder: string;
|
|
14
|
+
noResults: string;
|
|
15
|
+
tabActions: string;
|
|
16
|
+
pinned: string;
|
|
17
|
+
loading: string;
|
|
18
|
+
empty: string;
|
|
19
|
+
unsaved: string;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export declare const OG_TABS_LOCALE_ZH_CN: {
|
|
23
|
+
pin: string;
|
|
24
|
+
unpin: string;
|
|
25
|
+
close: string;
|
|
26
|
+
closeOthers: string;
|
|
27
|
+
closeLeft: string;
|
|
28
|
+
closeRight: string;
|
|
29
|
+
closeAll: string;
|
|
30
|
+
refresh: string;
|
|
31
|
+
moveTop: string;
|
|
32
|
+
moveBottom: string;
|
|
33
|
+
findTabs: string;
|
|
34
|
+
findTabsPlaceholder: string;
|
|
35
|
+
noResults: string;
|
|
36
|
+
tabActions: string;
|
|
37
|
+
pinned: string;
|
|
38
|
+
loading: string;
|
|
39
|
+
empty: string;
|
|
40
|
+
unsaved: string;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export declare const OG_TABS_LOCALE_ZH_TW: {
|
|
44
|
+
pin: string;
|
|
45
|
+
unpin: string;
|
|
46
|
+
close: string;
|
|
47
|
+
closeOthers: string;
|
|
48
|
+
closeLeft: string;
|
|
49
|
+
closeRight: string;
|
|
50
|
+
closeAll: string;
|
|
51
|
+
refresh: string;
|
|
52
|
+
moveTop: string;
|
|
53
|
+
moveBottom: string;
|
|
54
|
+
findTabs: string;
|
|
55
|
+
findTabsPlaceholder: string;
|
|
56
|
+
noResults: string;
|
|
57
|
+
tabActions: string;
|
|
58
|
+
pinned: string;
|
|
59
|
+
loading: string;
|
|
60
|
+
empty: string;
|
|
61
|
+
unsaved: string;
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
export { }
|
package/dist/locale.mjs
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
const e = {
|
|
2
|
+
pin: "固定页签",
|
|
3
|
+
unpin: "取消固定页签",
|
|
4
|
+
close: "关闭页签",
|
|
5
|
+
closeOthers: "关闭其他页签",
|
|
6
|
+
closeLeft: "关闭左侧页签",
|
|
7
|
+
closeRight: "关闭右侧页签",
|
|
8
|
+
closeAll: "关闭全部页签",
|
|
9
|
+
refresh: "刷新页签",
|
|
10
|
+
moveTop: "移至首位",
|
|
11
|
+
moveBottom: "移至末位",
|
|
12
|
+
findTabs: "查找页签",
|
|
13
|
+
findTabsPlaceholder: "搜索页签",
|
|
14
|
+
noResults: "未找到匹配页签",
|
|
15
|
+
tabActions: "页签操作",
|
|
16
|
+
pinned: "已固定",
|
|
17
|
+
loading: "加载中",
|
|
18
|
+
empty: "暂无页签",
|
|
19
|
+
unsaved: "未保存的更改"
|
|
20
|
+
}, o = {
|
|
21
|
+
pin: "Pin tab",
|
|
22
|
+
unpin: "Unpin tab",
|
|
23
|
+
close: "Close tab",
|
|
24
|
+
closeOthers: "Close other tabs",
|
|
25
|
+
closeLeft: "Close tabs to the left",
|
|
26
|
+
closeRight: "Close tabs to the right",
|
|
27
|
+
closeAll: "Close all tabs",
|
|
28
|
+
refresh: "Refresh tab",
|
|
29
|
+
moveTop: "Move to start",
|
|
30
|
+
moveBottom: "Move to end",
|
|
31
|
+
findTabs: "Find tabs",
|
|
32
|
+
findTabsPlaceholder: "Search tabs",
|
|
33
|
+
noResults: "No matching tabs",
|
|
34
|
+
tabActions: "Tab actions",
|
|
35
|
+
pinned: "Pinned",
|
|
36
|
+
loading: "Loading",
|
|
37
|
+
empty: "No tabs",
|
|
38
|
+
unsaved: "Unsaved changes"
|
|
39
|
+
}, s = {
|
|
40
|
+
pin: "固定頁籤",
|
|
41
|
+
unpin: "取消固定頁籤",
|
|
42
|
+
close: "關閉頁籤",
|
|
43
|
+
closeOthers: "關閉其他頁籤",
|
|
44
|
+
closeLeft: "關閉左側頁籤",
|
|
45
|
+
closeRight: "關閉右側頁籤",
|
|
46
|
+
closeAll: "關閉全部頁籤",
|
|
47
|
+
refresh: "重新整理頁籤",
|
|
48
|
+
moveTop: "移至首位",
|
|
49
|
+
moveBottom: "移至末位",
|
|
50
|
+
findTabs: "尋找頁籤",
|
|
51
|
+
findTabsPlaceholder: "搜尋頁籤",
|
|
52
|
+
noResults: "找不到符合的頁籤",
|
|
53
|
+
tabActions: "頁籤操作",
|
|
54
|
+
pinned: "已固定",
|
|
55
|
+
loading: "載入中",
|
|
56
|
+
empty: "暫無頁籤",
|
|
57
|
+
unsaved: "未儲存的變更"
|
|
58
|
+
};
|
|
59
|
+
export {
|
|
60
|
+
o as OG_TABS_LOCALE_EN_US,
|
|
61
|
+
e as OG_TABS_LOCALE_ZH_CN,
|
|
62
|
+
s as OG_TABS_LOCALE_ZH_TW
|
|
63
|
+
};
|
package/dist/runtime.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./config-DbOzZnZx.cjs"),_=require("./locale.cjs");exports.createOgTabs=e.createOgTabs;exports.useOgTabsGlobalConfig=e.useOgTabsGlobalConfig;exports.OG_TABS_LOCALE_EN_US=_.OG_TABS_LOCALE_EN_US;exports.OG_TABS_LOCALE_ZH_CN=_.OG_TABS_LOCALE_ZH_CN;exports.OG_TABS_LOCALE_ZH_TW=_.OG_TABS_LOCALE_ZH_TW;
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
import { Component } from 'vue';
|
|
2
|
+
import { DeepPartial } from '@origen-ui/shared';
|
|
3
|
+
import { MaybePromise } from '@origen-ui/shared';
|
|
4
|
+
import { OrigenUiLocaleSource } from '@origen-ui/shared';
|
|
5
|
+
import { Plugin as Plugin_2 } from 'vue';
|
|
6
|
+
import { TabsProps } from 'element-plus';
|
|
7
|
+
|
|
8
|
+
/** Installs app-scoped OgTabs defaults without sharing state across Vue apps. */
|
|
9
|
+
export declare function createOgTabs(config?: OgTabsGlobalConfig): Plugin_2;
|
|
10
|
+
|
|
11
|
+
export declare const OG_TABS_LOCALE_EN_US: {
|
|
12
|
+
pin: string;
|
|
13
|
+
unpin: string;
|
|
14
|
+
close: string;
|
|
15
|
+
closeOthers: string;
|
|
16
|
+
closeLeft: string;
|
|
17
|
+
closeRight: string;
|
|
18
|
+
closeAll: string;
|
|
19
|
+
refresh: string;
|
|
20
|
+
moveTop: string;
|
|
21
|
+
moveBottom: string;
|
|
22
|
+
findTabs: string;
|
|
23
|
+
findTabsPlaceholder: string;
|
|
24
|
+
noResults: string;
|
|
25
|
+
tabActions: string;
|
|
26
|
+
pinned: string;
|
|
27
|
+
loading: string;
|
|
28
|
+
empty: string;
|
|
29
|
+
unsaved: string;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export declare const OG_TABS_LOCALE_ZH_CN: {
|
|
33
|
+
pin: string;
|
|
34
|
+
unpin: string;
|
|
35
|
+
close: string;
|
|
36
|
+
closeOthers: string;
|
|
37
|
+
closeLeft: string;
|
|
38
|
+
closeRight: string;
|
|
39
|
+
closeAll: string;
|
|
40
|
+
refresh: string;
|
|
41
|
+
moveTop: string;
|
|
42
|
+
moveBottom: string;
|
|
43
|
+
findTabs: string;
|
|
44
|
+
findTabsPlaceholder: string;
|
|
45
|
+
noResults: string;
|
|
46
|
+
tabActions: string;
|
|
47
|
+
pinned: string;
|
|
48
|
+
loading: string;
|
|
49
|
+
empty: string;
|
|
50
|
+
unsaved: string;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
export declare const OG_TABS_LOCALE_ZH_TW: {
|
|
54
|
+
pin: string;
|
|
55
|
+
unpin: string;
|
|
56
|
+
close: string;
|
|
57
|
+
closeOthers: string;
|
|
58
|
+
closeLeft: string;
|
|
59
|
+
closeRight: string;
|
|
60
|
+
closeAll: string;
|
|
61
|
+
refresh: string;
|
|
62
|
+
moveTop: string;
|
|
63
|
+
moveBottom: string;
|
|
64
|
+
findTabs: string;
|
|
65
|
+
findTabsPlaceholder: string;
|
|
66
|
+
noResults: string;
|
|
67
|
+
tabActions: string;
|
|
68
|
+
pinned: string;
|
|
69
|
+
loading: string;
|
|
70
|
+
empty: string;
|
|
71
|
+
unsaved: string;
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
declare interface OgTabItem<TKey extends TabKey = TabKey, TData = unknown> {
|
|
75
|
+
key: TKey;
|
|
76
|
+
label: string;
|
|
77
|
+
icon?: Component;
|
|
78
|
+
badge?: string | number;
|
|
79
|
+
status?: OgTabsStatus;
|
|
80
|
+
statusIcon?: Component;
|
|
81
|
+
remark?: string;
|
|
82
|
+
/** Marks a tab whose underlying task has unsaved changes. */
|
|
83
|
+
dirty?: boolean;
|
|
84
|
+
disabled?: boolean;
|
|
85
|
+
readonly?: boolean;
|
|
86
|
+
closable?: boolean;
|
|
87
|
+
pinned?: boolean;
|
|
88
|
+
pinnable?: boolean;
|
|
89
|
+
draggable?: boolean;
|
|
90
|
+
lazy?: boolean;
|
|
91
|
+
data?: TData;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
declare interface OgTabsActionContext<TKey extends TabKey = TabKey, TData = unknown> {
|
|
95
|
+
operation: OgTabsOperation;
|
|
96
|
+
source: OgTabsActionSource;
|
|
97
|
+
tab: OgTabItem<TKey, TData> | undefined;
|
|
98
|
+
activeKey: TKey | undefined;
|
|
99
|
+
activeTab: OgTabItem<TKey, TData> | undefined;
|
|
100
|
+
items: readonly OgTabItem<TKey, TData>[];
|
|
101
|
+
nextItems?: readonly OgTabItem<TKey, TData>[];
|
|
102
|
+
nextActiveKey?: TKey | undefined;
|
|
103
|
+
targets?: readonly OgTabItem<TKey, TData>[];
|
|
104
|
+
targetTab?: OgTabItem<TKey, TData> | undefined;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/** One explicit action-policy mode prevents whitelist/blacklist precedence conflicts. */
|
|
108
|
+
declare type OgTabsActionPolicy = {
|
|
109
|
+
mode: 'allow';
|
|
110
|
+
actions: readonly OgTabsOperation[];
|
|
111
|
+
} | {
|
|
112
|
+
mode: 'deny';
|
|
113
|
+
actions: readonly OgTabsOperation[];
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
declare type OgTabsActionSource = 'native' | 'contextmenu' | 'menu' | 'keyboard' | 'drag' | 'finder' | 'api';
|
|
117
|
+
|
|
118
|
+
export declare interface OgTabsContextMenuOptions {
|
|
119
|
+
/** Enables pointer, keyboard, and active-tab context-menu triggers. Defaults to true. */
|
|
120
|
+
enabled?: boolean;
|
|
121
|
+
hiddenActions?: readonly OgTabsOperation[];
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export declare type OgTabsDensity = 'compact' | 'default';
|
|
125
|
+
|
|
126
|
+
export declare type OgTabsElementProps = Omit<Partial<TabsProps>, 'modelValue' | 'beforeLeave' | 'closable' | 'editable' | 'addable'>;
|
|
127
|
+
|
|
128
|
+
export declare interface OgTabsFeatures {
|
|
129
|
+
close?: boolean;
|
|
130
|
+
pin?: boolean;
|
|
131
|
+
refresh?: boolean;
|
|
132
|
+
drag?: boolean;
|
|
133
|
+
finder?: boolean;
|
|
134
|
+
keyboard?: boolean;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/** App-wide presentation and feature defaults. Controlled tab state and callbacks remain local. */
|
|
138
|
+
export declare interface OgTabsGlobalConfig {
|
|
139
|
+
variant?: OgTabsVariant;
|
|
140
|
+
density?: OgTabsDensity;
|
|
141
|
+
renderContent?: boolean;
|
|
142
|
+
features?: OgTabsFeatures;
|
|
143
|
+
tabsProps?: OgTabsElementProps;
|
|
144
|
+
locale?: DeepPartial<OgTabsLocale>;
|
|
145
|
+
/** Reactive language namespace provided by the application integration. */
|
|
146
|
+
localeSource?: OrigenUiLocaleSource<OgTabsLocale>;
|
|
147
|
+
minTabWidth?: string | number;
|
|
148
|
+
maxTabWidth?: string | number;
|
|
149
|
+
themeColor?: string;
|
|
150
|
+
sticky?: boolean | number;
|
|
151
|
+
finderThreshold?: number;
|
|
152
|
+
contextMenu?: OgTabsContextMenuOptions;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export declare interface OgTabsLocale {
|
|
156
|
+
pin: string;
|
|
157
|
+
unpin: string;
|
|
158
|
+
close: string;
|
|
159
|
+
closeOthers: string;
|
|
160
|
+
closeLeft: string;
|
|
161
|
+
closeRight: string;
|
|
162
|
+
closeAll: string;
|
|
163
|
+
refresh: string;
|
|
164
|
+
moveTop: string;
|
|
165
|
+
moveBottom: string;
|
|
166
|
+
findTabs: string;
|
|
167
|
+
findTabsPlaceholder: string;
|
|
168
|
+
noResults: string;
|
|
169
|
+
tabActions: string;
|
|
170
|
+
pinned: string;
|
|
171
|
+
loading: string;
|
|
172
|
+
empty: string;
|
|
173
|
+
unsaved: string;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
declare type OgTabsOperation = 'activate' | 'close' | 'close-others' | 'close-left' | 'close-right' | 'close-all' | 'refresh' | 'pin' | 'unpin' | 'move' | 'move-top' | 'move-bottom';
|
|
177
|
+
|
|
178
|
+
export declare interface OgTabsProps<TKey extends TabKey = TabKey, TData = unknown> {
|
|
179
|
+
/** An omitted value and an explicit `undefined` both represent no active tab. */
|
|
180
|
+
modelValue?: TKey | undefined;
|
|
181
|
+
items: readonly OgTabItem<TKey, TData>[];
|
|
182
|
+
variant?: OgTabsVariant | undefined;
|
|
183
|
+
density?: OgTabsDensity | undefined;
|
|
184
|
+
renderContent?: boolean | undefined;
|
|
185
|
+
features?: OgTabsFeatures | undefined;
|
|
186
|
+
readonly?: boolean | undefined;
|
|
187
|
+
busy?: boolean | undefined;
|
|
188
|
+
tabsProps?: OgTabsElementProps | undefined;
|
|
189
|
+
locale?: DeepPartial<OgTabsLocale> | undefined;
|
|
190
|
+
minTabWidth?: string | number | undefined;
|
|
191
|
+
maxTabWidth?: string | number | undefined;
|
|
192
|
+
themeColor?: string | undefined;
|
|
193
|
+
sticky?: boolean | number | undefined;
|
|
194
|
+
finderThreshold?: number | undefined;
|
|
195
|
+
contextMenu?: OgTabsContextMenuOptions | undefined;
|
|
196
|
+
actionPolicy?: OgTabsActionPolicy | undefined;
|
|
197
|
+
beforeAction?: ((context: OgTabsActionContext<TKey, TData>) => MaybePromise<boolean | void>) | undefined;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
declare type OgTabsStatus = 'loading' | 'success' | 'warning' | 'error';
|
|
201
|
+
|
|
202
|
+
export declare type OgTabsVariant = 'default' | 'workspace';
|
|
203
|
+
|
|
204
|
+
declare type TabKey = string | number;
|
|
205
|
+
|
|
206
|
+
/** Returns the app-scoped defaults for read-only consumption. */
|
|
207
|
+
export declare function useOgTabsGlobalConfig(): Readonly<OgTabsGlobalConfig> | undefined;
|
|
208
|
+
|
|
209
|
+
export { }
|
package/dist/runtime.mjs
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { c as a, u as o } from "./config-BVOCsdxN.js";
|
|
2
|
+
import { OG_TABS_LOCALE_EN_US as L, OG_TABS_LOCALE_ZH_CN as T, OG_TABS_LOCALE_ZH_TW as e } from "./locale.mjs";
|
|
3
|
+
export {
|
|
4
|
+
L as OG_TABS_LOCALE_EN_US,
|
|
5
|
+
T as OG_TABS_LOCALE_ZH_CN,
|
|
6
|
+
e as OG_TABS_LOCALE_ZH_TW,
|
|
7
|
+
a as createOgTabs,
|
|
8
|
+
o as useOgTabsGlobalConfig
|
|
9
|
+
};
|
package/dist/style.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.og-tabs-context-menu[data-v-49db788b]{position:fixed;z-index:var(--el-index-popper);min-width:184px;padding:4px;border:1px solid var(--el-border-color-light);border-radius:6px;background:var(--el-bg-color-overlay);box-shadow:var(--el-box-shadow-light)}.og-tabs-context-menu button[data-v-49db788b]{display:flex;width:100%;min-height:32px;align-items:center;gap:8px;padding:6px 8px;border:0;border-radius:4px;background:transparent;color:var(--el-text-color-regular);text-align:left;cursor:pointer}.og-tabs-context-menu button[data-v-49db788b]:hover:not(:disabled),.og-tabs-context-menu button[data-v-49db788b]:focus-visible{background:var(--el-fill-color-light);color:var(--el-color-primary);outline:0}.og-tabs-context-menu button[data-v-49db788b]:disabled{color:var(--el-text-color-disabled);cursor:not-allowed}.og-tabs-context-menu__divider[data-v-49db788b]{height:1px;margin:4px;background:var(--el-border-color-lighter)}.og-tabs-finder__content[data-v-884c1955]{display:grid;gap:8px}.og-tabs-finder__input[data-v-884c1955]{width:100%;min-width:0;padding:7px 11px;border:1px solid var(--el-border-color);border-radius:4px;outline:0;background:var(--el-bg-color);color:var(--el-text-color-primary);font:inherit}.og-tabs-finder__input[data-v-884c1955]:focus{border-color:var(--el-color-primary);box-shadow:0 0 0 1px var(--el-color-primary-light-5)}.og-tabs-finder__list[data-v-884c1955]{display:grid;max-height:280px;overflow:auto;overscroll-behavior:contain}.og-tabs-finder__list button[data-v-884c1955]{display:flex;min-width:0;align-items:center;justify-content:space-between;gap:8px;padding:8px;border:0;border-radius:4px;background:transparent;color:var(--el-text-color-regular);text-align:left;cursor:pointer}.og-tabs-finder__list button[data-v-884c1955]:hover:not(:disabled),.og-tabs-finder__list button[aria-selected=true][data-v-884c1955],.og-tabs-finder__list button.is-active[data-v-884c1955]{background:var(--el-fill-color-light);color:var(--el-color-primary)}.og-tabs-finder__list button[data-v-884c1955]:disabled{color:var(--el-text-color-disabled);cursor:not-allowed}.og-tabs-finder__label[data-v-884c1955]{display:inline-flex;min-width:0;align-items:center;gap:6px}.og-tabs-finder__title[data-v-884c1955]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.og-tabs-finder__dirty[data-v-884c1955]{width:6px;height:6px;flex:none;border-radius:50%;background:var(--el-color-warning)}.og-tabs-finder__meta[data-v-884c1955]{color:var(--el-text-color-secondary);font-size:12px}.og-tabs-label[data-v-b81db2ee]{display:inline-flex;min-width:0;align-items:center;gap:5px}.og-tabs-label__icon[data-v-b81db2ee],.og-tabs-label__pin[data-v-b81db2ee],.og-tabs-label__status[data-v-b81db2ee]{flex:none;font-size:14px}.og-tabs-label__pin[data-v-b81db2ee]{color:var(--el-text-color-secondary)}.og-tabs-label__status.is-error[data-v-b81db2ee]{color:var(--el-color-danger)}.og-tabs-label__status.is-warning[data-v-b81db2ee]{color:var(--el-color-warning)}.og-tabs-label__text[data-v-b81db2ee]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.og-tabs-label__dirty[data-v-b81db2ee]{width:6px;height:6px;flex:none;border-radius:50%;background:var(--el-color-warning)}.og-tabs-label__badge[data-v-b81db2ee]{display:grid;min-width:16px;height:16px;padding:0 4px;place-items:center;border-radius:8px;background:var(--el-color-danger);color:var(--el-color-white);font-size:11px;line-height:1}.og-tabs-label__loading[data-v-b81db2ee]{width:12px;height:12px;flex:none;border:2px solid var(--el-border-color);border-top-color:var(--el-color-primary);border-radius:50%;animation:og-tabs-spin-b81db2ee .8s linear infinite}@keyframes og-tabs-spin-b81db2ee{to{transform:rotate(360deg)}}.og-tabs{--og-tabs-height: 38px;--og-tabs-theme-color: var(--el-color-primary);min-width:0;background:var(--el-bg-color);border-bottom:1px solid var(--el-border-color-lighter)}.og-tabs--compact{--og-tabs-height: 32px}.og-tabs.is-sticky{position:sticky;top:var(--og-tabs-sticky-top);z-index:var(--el-index-normal)}.og-tabs__header{min-height:28px}.og-tabs__bar{display:flex;min-width:0;align-items:flex-start}.og-tabs__native{min-width:0;flex:1}.og-tabs__native .el-tabs__header{margin:0}.og-tabs__native .el-tabs__content{overflow:visible}.og-tabs__native .el-tabs__nav-wrap:after{background:transparent}.og-tabs__native .el-tabs__item{height:var(--og-tabs-height);max-width:var(--og-tabs-tab-max-width);min-width:var(--og-tabs-tab-min-width, 0);margin:4px 2px 0;padding:0 8px;border:1px solid var(--el-border-color-lighter);border-radius:6px 6px 0 0;background:var(--el-fill-color-lighter);color:var(--el-text-color-regular);transition:background-color .16s ease,border-color .16s ease,color .16s ease}.og-tabs__native .el-tabs__item:hover{background:var(--el-fill-color-light);border-color:var(--el-border-color);border-bottom-color:var(--el-border-color-lighter);color:var(--og-tabs-theme-color)}.og-tabs__native .el-tabs__item.is-active{background:var(--el-bg-color);border-color:var(--el-border-color);border-bottom-color:var(--el-bg-color);color:var(--og-tabs-theme-color);font-weight:600}.og-tabs__native .el-tabs__active-bar{height:2px;border-radius:2px;background:var(--og-tabs-theme-color)}.og-tabs__native .el-tabs__item .is-icon-close{display:inline-grid;width:24px;height:24px;margin-left:2px;place-items:center;border-radius:4px;opacity:.56;transition:background-color .16s ease,opacity .16s ease}.og-tabs__native .el-tabs__item:hover .is-icon-close,.og-tabs__native .el-tabs__item:focus-visible .is-icon-close,.og-tabs__native .el-tabs__item.is-active .is-icon-close{opacity:1}.og-tabs__native .el-tabs__item .is-icon-close:hover{background:var(--el-fill-color)}.og-tabs__actions{display:flex;height:var(--og-tabs-height);flex:none;align-items:center;gap:2px;padding-left:4px}.og-tabs__action{display:grid;width:28px;height:28px;padding:0;place-items:center;border:0;border-radius:4px;background:transparent;color:var(--el-text-color-regular);cursor:pointer;touch-action:manipulation}.og-tabs__action:hover{background:var(--el-fill-color-light);color:var(--og-tabs-theme-color)}.og-tabs__empty{padding:16px;color:var(--el-text-color-secondary)}.og-tabs :focus-visible{outline:2px solid var(--og-tabs-theme-color);outline-offset:2px}.og-tabs.is-pending .el-tabs__item{cursor:wait}.og-tabs-sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media(pointer:coarse){.og-tabs__native .el-tabs__item .is-icon-close,.og-tabs__action{width:36px;height:36px}}@media(prefers-reduced-motion:reduce){.og-tabs *,.og-tabs *:before,.og-tabs *:after{scroll-behavior:auto!important;transition-duration:.01ms!important}}
|
package/package.json
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@origen-ui/tabs",
|
|
3
|
+
"type": "module",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"description": "Workspace tabs component with pinning and controlled state for Vue 3 + Element Plus",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"homepage": "https://gitee.com/zapcenter/origen-ui",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://gitee.com/zapcenter/origen-ui.git"
|
|
11
|
+
},
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://gitee.com/zapcenter/origen-ui/issues"
|
|
14
|
+
},
|
|
15
|
+
"publishConfig": {
|
|
16
|
+
"access": "public"
|
|
17
|
+
},
|
|
18
|
+
"exports": {
|
|
19
|
+
".": {
|
|
20
|
+
"types": "./dist/index.d.ts",
|
|
21
|
+
"import": "./dist/index.mjs",
|
|
22
|
+
"require": "./dist/index.cjs"
|
|
23
|
+
},
|
|
24
|
+
"./runtime": {
|
|
25
|
+
"types": "./dist/runtime.d.ts",
|
|
26
|
+
"import": "./dist/runtime.mjs",
|
|
27
|
+
"require": "./dist/runtime.cjs"
|
|
28
|
+
},
|
|
29
|
+
"./locale": {
|
|
30
|
+
"types": "./dist/locale.d.ts",
|
|
31
|
+
"import": "./dist/locale.mjs",
|
|
32
|
+
"require": "./dist/locale.cjs"
|
|
33
|
+
},
|
|
34
|
+
"./style.css": "./dist/style.css"
|
|
35
|
+
},
|
|
36
|
+
"main": "./dist/index.cjs",
|
|
37
|
+
"module": "./dist/index.mjs",
|
|
38
|
+
"types": "./dist/index.d.ts",
|
|
39
|
+
"files": [
|
|
40
|
+
"README.md",
|
|
41
|
+
"dist"
|
|
42
|
+
],
|
|
43
|
+
"engines": {
|
|
44
|
+
"node": ">=20.0.0"
|
|
45
|
+
},
|
|
46
|
+
"peerDependencies": {
|
|
47
|
+
"element-plus": "^2.14.4",
|
|
48
|
+
"vue": "^3.5.40"
|
|
49
|
+
},
|
|
50
|
+
"dependencies": {
|
|
51
|
+
"@element-plus/icons-vue": "^2.3.2",
|
|
52
|
+
"sortablejs": "^1.15.7",
|
|
53
|
+
"@origen-ui/shared": "1.0.0"
|
|
54
|
+
},
|
|
55
|
+
"devDependencies": {
|
|
56
|
+
"@types/sortablejs": "^1.15.9",
|
|
57
|
+
"@vitejs/plugin-vue": "^6.0.1",
|
|
58
|
+
"@vitest/coverage-v8": "^3.2.6",
|
|
59
|
+
"@vue/test-utils": "^2.4.6",
|
|
60
|
+
"element-plus": "^2.14.4",
|
|
61
|
+
"jsdom": "^24.1.3",
|
|
62
|
+
"typescript": "^5.6.2",
|
|
63
|
+
"vite": "^7.3.6",
|
|
64
|
+
"vite-plugin-dts": "^5.0.3",
|
|
65
|
+
"vitest": "^3.2.6",
|
|
66
|
+
"vue": "^3.5.40",
|
|
67
|
+
"vue-tsc": "^3.1.8"
|
|
68
|
+
},
|
|
69
|
+
"scripts": {
|
|
70
|
+
"build": "vite build",
|
|
71
|
+
"dev": "vite build --watch",
|
|
72
|
+
"type-check": "vue-tsc --noEmit",
|
|
73
|
+
"test": "vitest run",
|
|
74
|
+
"test:coverage": "vitest run --coverage --pool=threads --poolOptions.threads.singleThread",
|
|
75
|
+
"lint": "eslint src"
|
|
76
|
+
}
|
|
77
|
+
}
|