orion-design 0.1.15 → 0.1.17
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/components/Form/FileInput/FileInput.vue.d.ts +2 -2
- package/dist/components/Form/LovInput/LovInput.d.ts +2 -0
- package/dist/components/Form/LovInput/LovInput.js.map +1 -1
- package/dist/components/Form/index.js +337 -320
- package/dist/components/Form/index.js.map +1 -1
- package/dist/components/LovTable/LovPagetable.vue.d.ts +296 -0
- package/dist/components/LovTable/LovQuerytable.vue.d.ts +184 -0
- package/dist/components/LovTable/index.d.ts +295 -2
- package/dist/components/LovTable/index.js +118 -45
- package/dist/components/LovTable/index.js.map +1 -1
- package/dist/components/Pagetable/index.js +64 -63
- package/dist/components/Pagetable/index.js.map +1 -1
- package/dist/components/Querytable/index.js +62 -61
- package/dist/components/Querytable/index.js.map +1 -1
- package/dist/components/Tabs/constants.d.ts +19 -0
- package/dist/components/Tabs/constants.js +5 -0
- package/dist/components/Tabs/constants.js.map +1 -0
- package/dist/components/Tabs/index.d.ts +74 -0
- package/dist/components/Tabs/index.js +475 -0
- package/dist/components/Tabs/index.js.map +1 -0
- package/dist/components/Tabs/tab-bar.d.ts +59 -0
- package/dist/components/Tabs/tab-bar.js +15 -0
- package/dist/components/Tabs/tab-bar.js.map +1 -0
- package/dist/components/Tabs/tab-bar.vue.d.ts +131 -0
- package/dist/components/Tabs/tab-nav.d.ts +237 -0
- package/dist/components/Tabs/tab-pane.d.ts +16 -0
- package/dist/components/Tabs/tab-pane.js +35 -0
- package/dist/components/Tabs/tab-pane.js.map +1 -0
- package/dist/components/Tabs/tab-pane.vue.d.ts +43 -0
- package/dist/components/Tabs/tabs.d.ts +101 -0
- package/dist/components/_constants/aria.d.ts +17 -0
- package/dist/components/_constants/aria.js +25 -0
- package/dist/components/_constants/aria.js.map +1 -0
- package/dist/components/_constants/event.d.ts +3 -0
- package/dist/components/_constants/event.js +7 -0
- package/dist/components/_constants/event.js.map +1 -0
- package/dist/components/_constants/index.d.ts +2 -0
- package/dist/components/_constants/index.js +9 -0
- package/dist/components/_constants/index.js.map +1 -0
- package/dist/components/_hooks/index.d.ts +2 -0
- package/dist/components/_hooks/index.js +10 -0
- package/dist/components/_hooks/index.js.map +1 -0
- package/dist/components/_hooks/use-namespace/index.d.ts +23 -0
- package/dist/components/_hooks/use-namespace/index.js +46 -0
- package/dist/components/_hooks/use-namespace/index.js.map +1 -0
- package/dist/components/_hooks/use-ordered-children/index.d.ts +8 -0
- package/dist/components/_hooks/use-ordered-children/index.js +27 -0
- package/dist/components/_hooks/use-ordered-children/index.js.map +1 -0
- package/dist/components/_util/browser.js +2 -2
- package/dist/components/_util/dom/element.js +1 -1
- package/dist/components/_util/dom/position.js +1 -1
- package/dist/components/_util/dom/scroll.js +1 -1
- package/dist/components/_util/dom/style.js +1 -1
- package/dist/components/_util/index.js +1 -1
- package/dist/components/_util/raf.js +1 -1
- package/dist/components/_util/vue/global-node.js +1 -1
- package/dist/components/_util/vue/icon.js +24 -146
- package/dist/components/_util/vue/icon.js.map +1 -1
- package/dist/components/components.d.ts +2 -0
- package/dist/components/components.js +13 -11
- package/dist/components/components.js.map +1 -1
- package/dist/components/index.js +21 -19
- package/dist/components/index.js.map +1 -1
- package/dist/components-0PErqPHo.js +72 -0
- package/dist/{components-DXZmD0GT.js.map → components-0PErqPHo.js.map} +1 -1
- package/dist/index-BwWeqwHB.js +164 -0
- package/dist/index-BwWeqwHB.js.map +1 -0
- package/dist/index-C9tCD90X.js +45 -0
- package/dist/{index-C8JNJPWW.js.map → index-C9tCD90X.js.map} +1 -1
- package/dist/index.css +1 -1
- package/dist/index.js +21 -19
- package/dist/index.js.map +1 -1
- package/dist/version/version.d.ts +1 -1
- package/dist/version/version.js +1 -1
- package/dist/version/version.js.map +1 -1
- package/global.d.ts +6 -1
- package/package.json +3 -1
- package/dist/components/LovTable/LovPagetable.d.ts +0 -2
- package/dist/components/LovTable/LovQuerytable.d.ts +0 -2
- package/dist/components-DXZmD0GT.js +0 -70
- package/dist/index-C8JNJPWW.js +0 -8
@@ -0,0 +1,17 @@
|
|
1
|
+
export declare const EVENT_CODE: {
|
2
|
+
tab: string;
|
3
|
+
enter: string;
|
4
|
+
space: string;
|
5
|
+
left: string;
|
6
|
+
up: string;
|
7
|
+
right: string;
|
8
|
+
down: string;
|
9
|
+
esc: string;
|
10
|
+
delete: string;
|
11
|
+
backspace: string;
|
12
|
+
numpadEnter: string;
|
13
|
+
pageUp: string;
|
14
|
+
pageDown: string;
|
15
|
+
home: string;
|
16
|
+
end: string;
|
17
|
+
};
|
@@ -0,0 +1,25 @@
|
|
1
|
+
const e = {
|
2
|
+
tab: "Tab",
|
3
|
+
enter: "Enter",
|
4
|
+
space: "Space",
|
5
|
+
left: "ArrowLeft",
|
6
|
+
// 37
|
7
|
+
up: "ArrowUp",
|
8
|
+
// 38
|
9
|
+
right: "ArrowRight",
|
10
|
+
// 39
|
11
|
+
down: "ArrowDown",
|
12
|
+
// 40
|
13
|
+
esc: "Escape",
|
14
|
+
delete: "Delete",
|
15
|
+
backspace: "Backspace",
|
16
|
+
numpadEnter: "NumpadEnter",
|
17
|
+
pageUp: "PageUp",
|
18
|
+
pageDown: "PageDown",
|
19
|
+
home: "Home",
|
20
|
+
end: "End"
|
21
|
+
};
|
22
|
+
export {
|
23
|
+
e as EVENT_CODE
|
24
|
+
};
|
25
|
+
//# sourceMappingURL=aria.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"aria.js","sources":["../../../src/components/_constants/aria.ts"],"sourcesContent":["export const EVENT_CODE = {\r\n tab: 'Tab',\r\n enter: 'Enter',\r\n space: 'Space',\r\n left: 'ArrowLeft', // 37\r\n up: 'ArrowUp', // 38\r\n right: 'ArrowRight', // 39\r\n down: 'ArrowDown', // 40\r\n esc: 'Escape',\r\n delete: 'Delete',\r\n backspace: 'Backspace',\r\n numpadEnter: 'NumpadEnter',\r\n pageUp: 'PageUp',\r\n pageDown: 'PageDown',\r\n home: 'Home',\r\n end: 'End',\r\n}\r\n"],"names":["EVENT_CODE"],"mappings":"AAAO,MAAMA,IAAa;AAAA,EACxB,KAAK;AAAA,EACL,OAAO;AAAA,EACP,OAAO;AAAA,EACP,MAAM;AAAA;AAAA,EACN,IAAI;AAAA;AAAA,EACJ,OAAO;AAAA;AAAA,EACP,MAAM;AAAA;AAAA,EACN,KAAK;AAAA,EACL,QAAQ;AAAA,EACR,WAAW;AAAA,EACX,aAAa;AAAA,EACb,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,MAAM;AAAA,EACN,KAAK;AACP;"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"event.js","sources":["../../../src/components/_constants/event.ts"],"sourcesContent":["export const UPDATE_MODEL_EVENT = 'update:modelValue'\r\nexport const CHANGE_EVENT = 'change'\r\nexport const INPUT_EVENT = 'input'\r\n"],"names":["UPDATE_MODEL_EVENT","CHANGE_EVENT","INPUT_EVENT"],"mappings":"AAAO,MAAMA,IAAqB,qBACrBC,IAAe,UACfC,IAAc;"}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import { EVENT_CODE as T } from "./aria.js";
|
2
|
+
import { CHANGE_EVENT as o, INPUT_EVENT as r, UPDATE_MODEL_EVENT as V } from "./event.js";
|
3
|
+
export {
|
4
|
+
o as CHANGE_EVENT,
|
5
|
+
T as EVENT_CODE,
|
6
|
+
r as INPUT_EVENT,
|
7
|
+
V as UPDATE_MODEL_EVENT
|
8
|
+
};
|
9
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { defaultNamespace as r, namespaceContextKey as s, useGetDerivedNamespace as m, useNamespace as p } from "./use-namespace/index.js";
|
2
|
+
import { useOrderedChildren as d } from "./use-ordered-children/index.js";
|
3
|
+
export {
|
4
|
+
r as defaultNamespace,
|
5
|
+
s as namespaceContextKey,
|
6
|
+
m as useGetDerivedNamespace,
|
7
|
+
p as useNamespace,
|
8
|
+
d as useOrderedChildren
|
9
|
+
};
|
10
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import { InjectionKey, Ref } from 'vue';
|
2
|
+
export declare const defaultNamespace = "orion";
|
3
|
+
export declare const namespaceContextKey: InjectionKey<Ref<string | undefined>>;
|
4
|
+
export declare const useGetDerivedNamespace: (namespaceOverrides?: Ref<string | undefined>) => import('vue').ComputedRef<string>;
|
5
|
+
export declare const useNamespace: (block: string, namespaceOverrides?: Ref<string | undefined>) => {
|
6
|
+
namespace: import('vue').ComputedRef<string>;
|
7
|
+
b: (blockSuffix?: string) => string;
|
8
|
+
e: (element?: string) => string;
|
9
|
+
m: (modifier?: string) => string;
|
10
|
+
be: (blockSuffix?: string, element?: string) => string;
|
11
|
+
em: (element?: string, modifier?: string) => string;
|
12
|
+
bm: (blockSuffix?: string, modifier?: string) => string;
|
13
|
+
bem: (blockSuffix?: string, element?: string, modifier?: string) => string;
|
14
|
+
is: {
|
15
|
+
(name: string, state: boolean | undefined): string;
|
16
|
+
(name: string): string;
|
17
|
+
};
|
18
|
+
cssVar: (object: Record<string, string>) => Record<string, string>;
|
19
|
+
cssVarName: (name: string) => string;
|
20
|
+
cssVarBlock: (object: Record<string, string>) => Record<string, string>;
|
21
|
+
cssVarBlockName: (name: string) => string;
|
22
|
+
};
|
23
|
+
export type UseNamespaceReturn = ReturnType<typeof useNamespace>;
|
@@ -0,0 +1,46 @@
|
|
1
|
+
import { getCurrentInstance as p, inject as N, ref as v, computed as V, unref as y } from "vue";
|
2
|
+
const m = "orion", l = "is-", c = (a, r, t, o, $) => {
|
3
|
+
let u = `${a}-${r}`;
|
4
|
+
return t && (u += `-${t}`), o && (u += `__${o}`), $ && (u += `--${$}`), u;
|
5
|
+
}, B = Symbol("namespaceContextKey"), C = (a) => {
|
6
|
+
const r = a || (p() ? N(B, v(m)) : v(m));
|
7
|
+
return V(() => y(r) || m);
|
8
|
+
}, q = (a, r) => {
|
9
|
+
const t = C(r);
|
10
|
+
return {
|
11
|
+
namespace: t,
|
12
|
+
b: (s = "") => c(t.value, a, s, "", ""),
|
13
|
+
e: (s) => s ? c(t.value, a, "", s, "") : "",
|
14
|
+
m: (s) => s ? c(t.value, a, "", "", s) : "",
|
15
|
+
be: (s, e) => s && e ? c(t.value, a, s, e, "") : "",
|
16
|
+
em: (s, e) => s && e ? c(t.value, a, "", s, e) : "",
|
17
|
+
bm: (s, e) => s && e ? c(t.value, a, s, "", e) : "",
|
18
|
+
bem: (s, e, n) => s && e && n ? c(t.value, a, s, e, n) : "",
|
19
|
+
is: (s, ...e) => {
|
20
|
+
const n = e.length >= 1 ? e[0] : !0;
|
21
|
+
return s && n ? `${l}${s}` : "";
|
22
|
+
},
|
23
|
+
// css
|
24
|
+
cssVar: (s) => {
|
25
|
+
const e = {};
|
26
|
+
for (const n in s)
|
27
|
+
s[n] && (e[`--${t.value}-${n}`] = s[n]);
|
28
|
+
return e;
|
29
|
+
},
|
30
|
+
cssVarName: (s) => `--${t.value}-${s}`,
|
31
|
+
cssVarBlock: (s) => {
|
32
|
+
const e = {};
|
33
|
+
for (const n in s)
|
34
|
+
s[n] && (e[`--${t.value}-${a}-${n}`] = s[n]);
|
35
|
+
return e;
|
36
|
+
},
|
37
|
+
cssVarBlockName: (s) => `--${t.value}-${a}-${s}`
|
38
|
+
};
|
39
|
+
};
|
40
|
+
export {
|
41
|
+
m as defaultNamespace,
|
42
|
+
B as namespaceContextKey,
|
43
|
+
C as useGetDerivedNamespace,
|
44
|
+
q as useNamespace
|
45
|
+
};
|
46
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/_hooks/use-namespace/index.ts"],"sourcesContent":["import { computed, getCurrentInstance, inject, ref, unref } from 'vue'\r\n\r\nimport type { InjectionKey, Ref } from 'vue'\r\n\r\nexport const defaultNamespace = 'orion'\r\nconst statePrefix = 'is-'\r\n\r\nconst _bem = (\r\n namespace: string,\r\n block: string,\r\n blockSuffix: string,\r\n element: string,\r\n modifier: string\r\n) => {\r\n let cls = `${namespace}-${block}`\r\n if (blockSuffix) {\r\n cls += `-${blockSuffix}`\r\n }\r\n if (element) {\r\n cls += `__${element}`\r\n }\r\n if (modifier) {\r\n cls += `--${modifier}`\r\n }\r\n return cls\r\n}\r\n\r\nexport const namespaceContextKey: InjectionKey<Ref<string | undefined>> =\r\n Symbol('namespaceContextKey')\r\n\r\nexport const useGetDerivedNamespace = (\r\n namespaceOverrides?: Ref<string | undefined>\r\n) => {\r\n const derivedNamespace =\r\n namespaceOverrides ||\r\n (getCurrentInstance()\r\n ? inject(namespaceContextKey, ref(defaultNamespace))\r\n : ref(defaultNamespace))\r\n const namespace = computed(() => {\r\n return unref(derivedNamespace) || defaultNamespace\r\n })\r\n return namespace\r\n}\r\n\r\nexport const useNamespace = (\r\n block: string,\r\n namespaceOverrides?: Ref<string | undefined>\r\n) => {\r\n const namespace = useGetDerivedNamespace(namespaceOverrides)\r\n const b = (blockSuffix = '') =>\r\n _bem(namespace.value, block, blockSuffix, '', '')\r\n const e = (element?: string) =>\r\n element ? _bem(namespace.value, block, '', element, '') : ''\r\n const m = (modifier?: string) =>\r\n modifier ? _bem(namespace.value, block, '', '', modifier) : ''\r\n const be = (blockSuffix?: string, element?: string) =>\r\n blockSuffix && element\r\n ? _bem(namespace.value, block, blockSuffix, element, '')\r\n : ''\r\n const em = (element?: string, modifier?: string) =>\r\n element && modifier\r\n ? _bem(namespace.value, block, '', element, modifier)\r\n : ''\r\n const bm = (blockSuffix?: string, modifier?: string) =>\r\n blockSuffix && modifier\r\n ? _bem(namespace.value, block, blockSuffix, '', modifier)\r\n : ''\r\n const bem = (blockSuffix?: string, element?: string, modifier?: string) =>\r\n blockSuffix && element && modifier\r\n ? _bem(namespace.value, block, blockSuffix, element, modifier)\r\n : ''\r\n const is: {\r\n (name: string, state: boolean | undefined): string\r\n (name: string): string\r\n } = (name: string, ...args: [boolean | undefined] | []) => {\r\n const state = args.length >= 1 ? args[0]! : true\r\n return name && state ? `${statePrefix}${name}` : ''\r\n }\r\n\r\n // for css var\r\n // --el-xxx: value;\r\n const cssVar = (object: Record<string, string>) => {\r\n const styles: Record<string, string> = {}\r\n for (const key in object) {\r\n if (object[key]) {\r\n styles[`--${namespace.value}-${key}`] = object[key]\r\n }\r\n }\r\n return styles\r\n }\r\n // with block\r\n const cssVarBlock = (object: Record<string, string>) => {\r\n const styles: Record<string, string> = {}\r\n for (const key in object) {\r\n if (object[key]) {\r\n styles[`--${namespace.value}-${block}-${key}`] = object[key]\r\n }\r\n }\r\n return styles\r\n }\r\n\r\n const cssVarName = (name: string) => `--${namespace.value}-${name}`\r\n const cssVarBlockName = (name: string) =>\r\n `--${namespace.value}-${block}-${name}`\r\n\r\n return {\r\n namespace,\r\n b,\r\n e,\r\n m,\r\n be,\r\n em,\r\n bm,\r\n bem,\r\n is,\r\n // css\r\n cssVar,\r\n cssVarName,\r\n cssVarBlock,\r\n cssVarBlockName,\r\n }\r\n}\r\n\r\nexport type UseNamespaceReturn = ReturnType<typeof useNamespace>\r\n"],"names":["defaultNamespace","statePrefix","_bem","namespace","block","blockSuffix","element","modifier","cls","namespaceContextKey","useGetDerivedNamespace","namespaceOverrides","derivedNamespace","getCurrentInstance","inject","ref","computed","unref","useNamespace","name","args","state","object","styles","key"],"mappings":";AAIO,MAAMA,IAAmB,SAC1BC,IAAc,OAEdC,IAAO,CACXC,GACAC,GACAC,GACAC,GACAC,MACG;AACH,MAAIC,IAAM,GAAGL,CAAS,IAAIC,CAAK;AAC/B,SAAIC,MACFG,KAAO,IAAIH,CAAW,KAEpBC,MACFE,KAAO,KAAKF,CAAO,KAEjBC,MACFC,KAAO,KAAKD,CAAQ,KAEfC;AACT,GAEaC,IACX,OAAO,qBAAqB,GAEjBC,IAAyB,CACpCC,MACG;AACG,QAAAC,IACJD,MACCE,EAAA,IACGC,EAAOL,GAAqBM,EAAIf,CAAgB,CAAC,IACjDe,EAAIf,CAAgB;AAInB,SAHWgB,EAAS,MAClBC,EAAML,CAAgB,KAAKZ,CACnC;AAEH,GAEakB,IAAe,CAC1Bd,GACAO,MACG;AACG,QAAAR,IAAYO,EAAuBC,CAAkB;AAyDpD,SAAA;AAAA,IACL,WAAAR;AAAA,IACA,GA1DQ,CAACE,IAAc,OACvBH,EAAKC,EAAU,OAAOC,GAAOC,GAAa,IAAI,EAAE;AAAA,IA0DhD,GAzDQ,CAACC,MACTA,IAAUJ,EAAKC,EAAU,OAAOC,GAAO,IAAIE,GAAS,EAAE,IAAI;AAAA,IAyD1D,GAxDQ,CAACC,MACTA,IAAWL,EAAKC,EAAU,OAAOC,GAAO,IAAI,IAAIG,CAAQ,IAAI;AAAA,IAwD5D,IAvDS,CAACF,GAAsBC,MAChCD,KAAeC,IACXJ,EAAKC,EAAU,OAAOC,GAAOC,GAAaC,GAAS,EAAE,IACrD;AAAA,IAqDJ,IApDS,CAACA,GAAkBC,MAC5BD,KAAWC,IACPL,EAAKC,EAAU,OAAOC,GAAO,IAAIE,GAASC,CAAQ,IAClD;AAAA,IAkDJ,IAjDS,CAACF,GAAsBE,MAChCF,KAAeE,IACXL,EAAKC,EAAU,OAAOC,GAAOC,GAAa,IAAIE,CAAQ,IACtD;AAAA,IA+CJ,KA9CU,CAACF,GAAsBC,GAAkBC,MACnDF,KAAeC,KAAWC,IACtBL,EAAKC,EAAU,OAAOC,GAAOC,GAAaC,GAASC,CAAQ,IAC3D;AAAA,IA4CJ,IAxCE,CAACY,MAAiBC,MAAqC;AACzD,YAAMC,IAAQD,EAAK,UAAU,IAAIA,EAAK,CAAC,IAAK;AAC5C,aAAOD,KAAQE,IAAQ,GAAGpB,CAAW,GAAGkB,CAAI,KAAK;AAAA,IAAA;AAAA;AAAA,IAwCjD,QAnCa,CAACG,MAAmC;AACjD,YAAMC,IAAiC,CAAA;AACvC,iBAAWC,KAAOF;AACZ,QAAAA,EAAOE,CAAG,MACLD,EAAA,KAAKpB,EAAU,KAAK,IAAIqB,CAAG,EAAE,IAAIF,EAAOE,CAAG;AAG/C,aAAAD;AAAA,IAAA;AAAA,IA6BP,YAhBiB,CAACJ,MAAiB,KAAKhB,EAAU,KAAK,IAAIgB,CAAI;AAAA,IAiB/D,aA3BkB,CAACG,MAAmC;AACtD,YAAMC,IAAiC,CAAA;AACvC,iBAAWC,KAAOF;AACZ,QAAAA,EAAOE,CAAG,MACLD,EAAA,KAAKpB,EAAU,KAAK,IAAIC,CAAK,IAAIoB,CAAG,EAAE,IAAIF,EAAOE,CAAG;AAGxD,aAAAD;AAAA,IAAA;AAAA,IAqBP,iBAjBsB,CAACJ,MACvB,KAAKhB,EAAU,KAAK,IAAIC,CAAK,IAAIe,CAAI;AAAA,EAgBrC;AAEJ;"}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import { ComponentInternalInstance } from 'vue';
|
2
|
+
export declare const useOrderedChildren: <T extends {
|
3
|
+
uid: number;
|
4
|
+
}>(vm: ComponentInternalInstance, childComponentName: string) => {
|
5
|
+
children: import('vue').ShallowRef<T[], T[]>;
|
6
|
+
addChild: (child: T) => void;
|
7
|
+
removeChild: (uid: number) => void;
|
8
|
+
};
|
@@ -0,0 +1,27 @@
|
|
1
|
+
import { shallowRef as s, isVNode as m } from "vue";
|
2
|
+
import "lodash-es";
|
3
|
+
import "element-plus";
|
4
|
+
import { flattedChildren as c } from "../../_util/vue/vnode.js";
|
5
|
+
const u = (t, i, d) => c(t.subTree).filter(
|
6
|
+
(e) => {
|
7
|
+
var r;
|
8
|
+
return m(e) && ((r = e.type) == null ? void 0 : r.name) === i && !!e.component;
|
9
|
+
}
|
10
|
+
).map((e) => e.component.uid).map((e) => d[e]).filter((e) => !!e), f = (t, i) => {
|
11
|
+
const d = {}, o = s([]);
|
12
|
+
return {
|
13
|
+
children: o,
|
14
|
+
addChild: (r) => {
|
15
|
+
d[r.uid] = r, o.value = u(t, i, d);
|
16
|
+
},
|
17
|
+
removeChild: (r) => {
|
18
|
+
delete d[r], o.value = o.value.filter(
|
19
|
+
(l) => l.uid !== r
|
20
|
+
);
|
21
|
+
}
|
22
|
+
};
|
23
|
+
};
|
24
|
+
export {
|
25
|
+
f as useOrderedChildren
|
26
|
+
};
|
27
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/_hooks/use-ordered-children/index.ts"],"sourcesContent":["import { shallowRef } from 'vue'\r\nimport { flattedChildren, isVNode } from '../../_util'\r\n\r\nimport type { ComponentInternalInstance, VNode } from 'vue'\r\n\r\nconst getOrderedChildren = <T>(\r\n vm: ComponentInternalInstance,\r\n childComponentName: string,\r\n children: Record<number, T>\r\n): T[] => {\r\n const nodes = flattedChildren(vm.subTree).filter(\r\n (n): n is VNode =>\r\n isVNode(n) &&\r\n (n.type as any)?.name === childComponentName &&\r\n !!n.component\r\n )\r\n const uids = nodes.map((n) => n.component!.uid)\r\n return uids.map((uid) => children[uid]).filter((p) => !!p)\r\n}\r\n\r\nexport const useOrderedChildren = <T extends { uid: number }>(\r\n vm: ComponentInternalInstance,\r\n childComponentName: string\r\n) => {\r\n const children: Record<number, T> = {}\r\n const orderedChildren = shallowRef<T[]>([])\r\n\r\n // TODO: split into two functions: addChild and sortChildren\r\n const addChild = (child: T) => {\r\n children[child.uid] = child\r\n orderedChildren.value = getOrderedChildren(vm, childComponentName, children)\r\n }\r\n const removeChild = (uid: number) => {\r\n delete children[uid]\r\n orderedChildren.value = orderedChildren.value.filter(\r\n (children) => children.uid !== uid\r\n )\r\n }\r\n\r\n return {\r\n children: orderedChildren,\r\n addChild,\r\n removeChild,\r\n }\r\n}\r\n"],"names":["getOrderedChildren","vm","childComponentName","children","flattedChildren","n","isVNode","_a","uid","p","useOrderedChildren","orderedChildren","shallowRef","child"],"mappings":";;;;AAKA,MAAMA,IAAqB,CACzBC,GACAC,GACAC,MAEcC,EAAgBH,EAAG,OAAO,EAAE;AAAA,EACxC,CAACI,MACC;;AAAA,WAAAC,EAAQD,CAAC,OACRE,IAAAF,EAAE,SAAF,gBAAAE,EAAgB,UAASL,KAC1B,CAAC,CAACG,EAAE;AAAA;AAAA,EAEW,IAAI,CAACA,MAAMA,EAAE,UAAW,GAAG,EAClC,IAAI,CAACG,MAAQL,EAASK,CAAG,CAAC,EAAE,OAAO,CAACC,MAAM,CAAC,CAACA,CAAC,GAG9CC,IAAqB,CAChCT,GACAC,MACG;AACH,QAAMC,IAA8B,CAAA,GAC9BQ,IAAkBC,EAAgB,CAAA,CAAE;AAcnC,SAAA;AAAA,IACL,UAAUD;AAAA,IACV,UAbe,CAACE,MAAa;AACpB,MAAAV,EAAAU,EAAM,GAAG,IAAIA,GACtBF,EAAgB,QAAQX,EAAmBC,GAAIC,GAAoBC,CAAQ;AAAA,IAAA;AAAA,IAY3E,aAVkB,CAACK,MAAgB;AACnC,aAAOL,EAASK,CAAG,GACHG,EAAA,QAAQA,EAAgB,MAAM;AAAA,QAC5C,CAACR,MAAaA,EAAS,QAAQK;AAAA,MAAA;AAAA,IACjC;AAAA,EAMA;AAEJ;"}
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { i } from "../../index-
|
2
|
-
import { a as s } from "../../index-
|
1
|
+
import { i } from "../../index-C9tCD90X.js";
|
2
|
+
import { a as s } from "../../index-C9tCD90X.js";
|
3
3
|
const r = () => i && /firefox/i.test(window.navigator.userAgent);
|
4
4
|
export {
|
5
5
|
i as isClient,
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { e as t } from "../../../functions-DzLqXvGt.js";
|
2
2
|
import "lodash-es";
|
3
3
|
import "vue";
|
4
|
-
import { i as e } from "../../../index-
|
4
|
+
import { i as e } from "../../../index-C9tCD90X.js";
|
5
5
|
const u = (r) => {
|
6
6
|
if (!e || r === "") return null;
|
7
7
|
if (t(r))
|
@@ -2,7 +2,7 @@ import { easeInOutCubic as w } from "../easings.js";
|
|
2
2
|
import { isWindow as u } from "../types.js";
|
3
3
|
import { rAF as h, cAF as a } from "../raf.js";
|
4
4
|
import { getStyle as T } from "./style.js";
|
5
|
-
import { i as p } from "../../../index-
|
5
|
+
import { i as p } from "../../../index-C9tCD90X.js";
|
6
6
|
const v = (o, t) => {
|
7
7
|
if (!p) return !1;
|
8
8
|
const l = {
|
@@ -2,7 +2,7 @@ import { isNumber as u, isStringNumber as d } from "../types.js";
|
|
2
2
|
import { c as f, d as c, e as m } from "../../../functions-DzLqXvGt.js";
|
3
3
|
import { entriesOf as p, keysOf as b } from "../objects.js";
|
4
4
|
import { debugWarn as g } from "../error.js";
|
5
|
-
import { i as l } from "../../../index-
|
5
|
+
import { i as l } from "../../../index-C9tCD90X.js";
|
6
6
|
const y = "utils/dom/style", e = (r = "") => r.split(" ").filter((t) => !!t.trim()), w = (r, t) => {
|
7
7
|
if (!r || !t) return !1;
|
8
8
|
if (t.includes(" ")) throw new Error("className should not contain space.");
|
@@ -26,7 +26,7 @@ import { mutable as Co } from "./typescript.js";
|
|
26
26
|
import { throttleByRaf as So } from "./throttleByRaf.js";
|
27
27
|
import { easeInOutCubic as Po } from "./easings.js";
|
28
28
|
import { castArray as Oo } from "lodash-es";
|
29
|
-
import { i as Io, a as wo } from "../../index-
|
29
|
+
import { i as Io, a as wo } from "../../index-C9tCD90X.js";
|
30
30
|
import { isVNode as Ao } from "vue";
|
31
31
|
export {
|
32
32
|
K as CloseComponents,
|
@@ -1,154 +1,32 @@
|
|
1
|
-
import {
|
2
|
-
import { definePropType as
|
3
|
-
|
4
|
-
var v = /* @__PURE__ */ l({
|
5
|
-
name: "CircleCheck",
|
6
|
-
__name: "circle-check",
|
7
|
-
setup(t) {
|
8
|
-
return (r, c) => (a(), _("svg", {
|
9
|
-
xmlns: "http://www.w3.org/2000/svg",
|
10
|
-
viewBox: "0 0 1024 1024"
|
11
|
-
}, [
|
12
|
-
e("path", {
|
13
|
-
fill: "currentColor",
|
14
|
-
d: "M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"
|
15
|
-
}),
|
16
|
-
e("path", {
|
17
|
-
fill: "currentColor",
|
18
|
-
d: "M745.344 361.344a32 32 0 0 1 45.312 45.312l-288 288a32 32 0 0 1-45.312 0l-160-160a32 32 0 1 1 45.312-45.312L480 626.752l265.344-265.408z"
|
19
|
-
})
|
20
|
-
]));
|
21
|
-
}
|
22
|
-
}), d = v, f = /* @__PURE__ */ l({
|
23
|
-
name: "CircleCloseFilled",
|
24
|
-
__name: "circle-close-filled",
|
25
|
-
setup(t) {
|
26
|
-
return (r, c) => (a(), _("svg", {
|
27
|
-
xmlns: "http://www.w3.org/2000/svg",
|
28
|
-
viewBox: "0 0 1024 1024"
|
29
|
-
}, [
|
30
|
-
e("path", {
|
31
|
-
fill: "currentColor",
|
32
|
-
d: "M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 393.664L407.936 353.6a38.4 38.4 0 1 0-54.336 54.336L457.664 512 353.6 616.064a38.4 38.4 0 1 0 54.336 54.336L512 566.336 616.064 670.4a38.4 38.4 0 1 0 54.336-54.336L566.336 512 670.4 407.936a38.4 38.4 0 1 0-54.336-54.336z"
|
33
|
-
})
|
34
|
-
]));
|
35
|
-
}
|
36
|
-
}), s = f, m = /* @__PURE__ */ l({
|
37
|
-
name: "CircleClose",
|
38
|
-
__name: "circle-close",
|
39
|
-
setup(t) {
|
40
|
-
return (r, c) => (a(), _("svg", {
|
41
|
-
xmlns: "http://www.w3.org/2000/svg",
|
42
|
-
viewBox: "0 0 1024 1024"
|
43
|
-
}, [
|
44
|
-
e("path", {
|
45
|
-
fill: "currentColor",
|
46
|
-
d: "m466.752 512-90.496-90.496a32 32 0 0 1 45.248-45.248L512 466.752l90.496-90.496a32 32 0 1 1 45.248 45.248L557.248 512l90.496 90.496a32 32 0 1 1-45.248 45.248L512 557.248l-90.496 90.496a32 32 0 0 1-45.248-45.248z"
|
47
|
-
}),
|
48
|
-
e("path", {
|
49
|
-
fill: "currentColor",
|
50
|
-
d: "M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"
|
51
|
-
})
|
52
|
-
]));
|
53
|
-
}
|
54
|
-
}), g = m, w = /* @__PURE__ */ l({
|
55
|
-
name: "Close",
|
56
|
-
__name: "close",
|
57
|
-
setup(t) {
|
58
|
-
return (r, c) => (a(), _("svg", {
|
59
|
-
xmlns: "http://www.w3.org/2000/svg",
|
60
|
-
viewBox: "0 0 1024 1024"
|
61
|
-
}, [
|
62
|
-
e("path", {
|
63
|
-
fill: "currentColor",
|
64
|
-
d: "M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"
|
65
|
-
})
|
66
|
-
]));
|
67
|
-
}
|
68
|
-
}), o = w, h = /* @__PURE__ */ l({
|
69
|
-
name: "InfoFilled",
|
70
|
-
__name: "info-filled",
|
71
|
-
setup(t) {
|
72
|
-
return (r, c) => (a(), _("svg", {
|
73
|
-
xmlns: "http://www.w3.org/2000/svg",
|
74
|
-
viewBox: "0 0 1024 1024"
|
75
|
-
}, [
|
76
|
-
e("path", {
|
77
|
-
fill: "currentColor",
|
78
|
-
d: "M512 64a448 448 0 1 1 0 896.064A448 448 0 0 1 512 64m67.2 275.072c33.28 0 60.288-23.104 60.288-57.344s-27.072-57.344-60.288-57.344c-33.28 0-60.16 23.104-60.16 57.344s26.88 57.344 60.16 57.344M590.912 699.2c0-6.848 2.368-24.64 1.024-34.752l-52.608 60.544c-10.88 11.456-24.512 19.392-30.912 17.28a12.992 12.992 0 0 1-8.256-14.72l87.68-276.992c7.168-35.136-12.544-67.2-54.336-71.296-44.096 0-108.992 44.736-148.48 101.504 0 6.784-1.28 23.68.064 33.792l52.544-60.608c10.88-11.328 23.552-19.328 29.952-17.152a12.8 12.8 0 0 1 7.808 16.128L388.48 728.576c-10.048 32.256 8.96 63.872 55.04 71.04 67.84 0 107.904-43.648 147.456-100.416z"
|
79
|
-
})
|
80
|
-
]));
|
81
|
-
}
|
82
|
-
}), n = h, C = /* @__PURE__ */ l({
|
83
|
-
name: "Loading",
|
84
|
-
__name: "loading",
|
85
|
-
setup(t) {
|
86
|
-
return (r, c) => (a(), _("svg", {
|
87
|
-
xmlns: "http://www.w3.org/2000/svg",
|
88
|
-
viewBox: "0 0 1024 1024"
|
89
|
-
}, [
|
90
|
-
e("path", {
|
91
|
-
fill: "currentColor",
|
92
|
-
d: "M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32m448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32m-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32M195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248zm452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248zM828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0m-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0z"
|
93
|
-
})
|
94
|
-
]));
|
95
|
-
}
|
96
|
-
}), x = C, L = /* @__PURE__ */ l({
|
97
|
-
name: "SuccessFilled",
|
98
|
-
__name: "success-filled",
|
99
|
-
setup(t) {
|
100
|
-
return (r, c) => (a(), _("svg", {
|
101
|
-
xmlns: "http://www.w3.org/2000/svg",
|
102
|
-
viewBox: "0 0 1024 1024"
|
103
|
-
}, [
|
104
|
-
e("path", {
|
105
|
-
fill: "currentColor",
|
106
|
-
d: "M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m-55.808 536.384-99.52-99.584a38.4 38.4 0 1 0-54.336 54.336l126.72 126.72a38.272 38.272 0 0 0 54.336 0l262.4-262.464a38.4 38.4 0 1 0-54.272-54.336z"
|
107
|
-
})
|
108
|
-
]));
|
109
|
-
}
|
110
|
-
}), i = L, M = /* @__PURE__ */ l({
|
111
|
-
name: "WarningFilled",
|
112
|
-
__name: "warning-filled",
|
113
|
-
setup(t) {
|
114
|
-
return (r, c) => (a(), _("svg", {
|
115
|
-
xmlns: "http://www.w3.org/2000/svg",
|
116
|
-
viewBox: "0 0 1024 1024"
|
117
|
-
}, [
|
118
|
-
e("path", {
|
119
|
-
fill: "currentColor",
|
120
|
-
d: "M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 192a58.432 58.432 0 0 0-58.24 63.744l23.36 256.384a35.072 35.072 0 0 0 69.76 0l23.296-256.384A58.432 58.432 0 0 0 512 256m0 512a51.2 51.2 0 1 0 0-102.4 51.2 51.2 0 0 0 0 102.4"
|
121
|
-
})
|
122
|
-
]));
|
123
|
-
}
|
124
|
-
}), p = M;
|
125
|
-
const z = u([
|
1
|
+
import { c as e, s as l, i as s, w as o, a as c, l as n, b as i, d as a } from "../../../index-BwWeqwHB.js";
|
2
|
+
import { definePropType as t } from "./props/runtime.js";
|
3
|
+
const f = t([
|
126
4
|
String,
|
127
5
|
Object,
|
128
6
|
Function
|
129
|
-
]),
|
130
|
-
Close:
|
131
|
-
},
|
132
|
-
Close:
|
133
|
-
SuccessFilled:
|
134
|
-
InfoFilled:
|
135
|
-
WarningFilled:
|
136
|
-
CircleCloseFilled:
|
137
|
-
},
|
7
|
+
]), p = {
|
8
|
+
Close: e
|
9
|
+
}, _ = {
|
10
|
+
Close: e,
|
11
|
+
SuccessFilled: l,
|
12
|
+
InfoFilled: s,
|
13
|
+
WarningFilled: o,
|
14
|
+
CircleCloseFilled: c
|
15
|
+
}, u = {
|
16
|
+
success: l,
|
17
|
+
warning: o,
|
18
|
+
error: c,
|
19
|
+
info: s
|
20
|
+
}, C = {
|
21
|
+
validating: n,
|
138
22
|
success: i,
|
139
|
-
|
140
|
-
error: s,
|
141
|
-
info: n
|
142
|
-
}, V = {
|
143
|
-
validating: x,
|
144
|
-
success: d,
|
145
|
-
error: g
|
23
|
+
error: a
|
146
24
|
};
|
147
25
|
export {
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
26
|
+
p as CloseComponents,
|
27
|
+
_ as TypeComponents,
|
28
|
+
u as TypeComponentsMap,
|
29
|
+
C as ValidateComponentsMap,
|
30
|
+
f as iconPropType
|
153
31
|
};
|
154
32
|
//# sourceMappingURL=icon.js.map
|