@studio-west/component-sw 0.13.5 → 0.13.7
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/README.md +66 -13
- package/dist/{SwButton-B-Z8Fhdv.js → SwButton-mr7jdXoz.js} +2 -2
- package/dist/{SwButtonGroup-Dmsbam44.js → SwButtonGroup-Ck8aedFL.js} +1 -1
- package/dist/{SwDatePicker-CKQk4Ktj.js → SwDatePicker-D_UoCJUA.js} +30 -11
- package/dist/{SwDropdown-DMkEn-su.js → SwDropdown-BTADCvrN.js} +1 -1
- package/dist/{SwDropdownItem-9Bq9fExK.js → SwDropdownItem-oQKFG36T.js} +1 -1
- package/dist/{SwDropdownNew-TXu5V6xZ.js → SwDropdownNew-BuCIN-iv.js} +1 -1
- package/dist/{SwFile-DpqT0txc.js → SwFile-BBIqUoFG.js} +4 -4
- package/dist/{SwGide-C62de-t6.js → SwGide-BYRlBr9D.js} +5 -5
- package/dist/{SwIcon-CyVWEZkk.js → SwIcon-C4RHAbK1.js} +3 -3
- package/dist/{SwInput-BED_o0wD.js → SwInput-0Eph7P-m.js} +6 -6
- package/dist/{SwMenu-Bh4BtVif.js → SwMenu-Dohv0z9N.js} +2 -2
- package/dist/{SwMessage-CA8jo3G7.js → SwMessage-CUTW1YCi.js} +3 -3
- package/dist/SwSelect-DwxIlRFI.js +1922 -0
- package/dist/{SwSkeleton-BIj8PPM_.js → SwSkeleton-DsjPQpL2.js} +2 -2
- package/dist/{SwSlider-4S5KNn6o.js → SwSlider-DkgJH6Bh.js} +2 -2
- package/dist/{SwSwitch-BqAIQmG3.js → SwSwitch-Cxk-eNTf.js} +3 -2
- package/dist/{SwTable-BjYEVovB.js → SwTable-DE3cDsvN.js} +3 -5
- package/dist/{SwTabs-jUzYPw9X.js → SwTabs-A6JIa-Kl.js} +2 -2
- package/dist/component-sw.css +1 -1
- package/dist/index.cjs +9 -6
- package/dist/index.js +130 -49
- package/dist/{utils-CaFnRa4t.js → utils-DwvFrrWs.js} +1 -0
- package/package.json +13 -10
- package/types/index.d.ts +1 -1
- package/dist/SwAlert-CKJhS25j.js +0 -89
- package/dist/SwSelect-DyArzImF.js +0 -1597
- /package/dist/{SwCollapse-Drz3qkNa.js → SwCollapse-DrCfi6Ly.js} +0 -0
- /package/dist/{SwFormItem-rn5iuIUv.js → SwFormItem-DgFaNwe9.js} +0 -0
- /package/dist/{SwSection-Bl3H3D2G.js → SwSection-DG9jX0Yc.js} +0 -0
- /package/dist/{SwSkeletonItem-BKeBIWXT.js → SwSkeletonItem-DOBVXQbh.js} +0 -0
- /package/dist/{SwTableColumn-CpNTUOVF.js → SwTableColumn-DQT28erv.js} +0 -0
- /package/dist/{SwTabsPane-Bhi49paR.js → SwTabsPane-CDBFh3D3.js} +0 -0
package/dist/index.js
CHANGED
|
@@ -1,61 +1,142 @@
|
|
|
1
|
-
import { n as e } from "./
|
|
2
|
-
import {
|
|
3
|
-
//#region src/
|
|
4
|
-
var
|
|
5
|
-
|
|
1
|
+
import { n as e } from "./SwIcon-C4RHAbK1.js";
|
|
2
|
+
import { Transition as t, computed as n, createApp as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createTextVNode as c, defineAsyncComponent as l, h as u, normalizeClass as d, onMounted as f, onUnmounted as p, openBlock as m, ref as h, renderSlot as g, toDisplayString as _, withCtx as v } from "vue";
|
|
3
|
+
//#region src/components/SwAlert.vue
|
|
4
|
+
var y = {
|
|
5
|
+
__name: "SwAlert",
|
|
6
|
+
props: {
|
|
7
|
+
message: {
|
|
8
|
+
type: String,
|
|
9
|
+
default: "Default message"
|
|
10
|
+
},
|
|
11
|
+
before: {
|
|
12
|
+
type: String,
|
|
13
|
+
default: ""
|
|
14
|
+
},
|
|
15
|
+
class: {
|
|
16
|
+
type: String,
|
|
17
|
+
default: ""
|
|
18
|
+
},
|
|
19
|
+
after: {
|
|
20
|
+
type: String,
|
|
21
|
+
default: ""
|
|
22
|
+
},
|
|
23
|
+
size: {
|
|
24
|
+
type: String,
|
|
25
|
+
default: ""
|
|
26
|
+
},
|
|
27
|
+
duration: {
|
|
28
|
+
type: Number,
|
|
29
|
+
default: 6e3
|
|
30
|
+
},
|
|
31
|
+
type: {
|
|
32
|
+
type: String,
|
|
33
|
+
default: "info",
|
|
34
|
+
validator: (e) => [
|
|
35
|
+
"success",
|
|
36
|
+
"warning",
|
|
37
|
+
"error",
|
|
38
|
+
"info"
|
|
39
|
+
].includes(e)
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
emits: ["closed"],
|
|
43
|
+
setup(r, { emit: l }) {
|
|
44
|
+
let u = r, y = l, b = h(!1), x = null, S = () => {
|
|
45
|
+
document.querySelector(".sw-alert-wrapper").togglePopover(), b.value = !0, document.querySelector(".sw-alert-wrapper").showPopover(), E();
|
|
46
|
+
}, C = () => {
|
|
47
|
+
b.value = !1, y("closed");
|
|
48
|
+
}, w = () => {
|
|
49
|
+
x &&= (clearTimeout(x), null);
|
|
50
|
+
}, T = () => {
|
|
51
|
+
E();
|
|
52
|
+
}, E = () => {
|
|
53
|
+
x = setTimeout(C, u.duration);
|
|
54
|
+
};
|
|
55
|
+
f(() => {
|
|
56
|
+
S();
|
|
57
|
+
}), p(() => {
|
|
58
|
+
x && clearTimeout(x);
|
|
59
|
+
});
|
|
60
|
+
let D = n(() => {
|
|
61
|
+
let e = ["sw-alert"];
|
|
62
|
+
return u.size.length > 0 && e.push(`sw-${u.size}`), u.type.length > 0 && e.push(`sw-${u.type}`), u.class.length > 0 && e.push(u.class), e;
|
|
63
|
+
});
|
|
64
|
+
return (n, r) => (m(), i(t, { name: "fade" }, {
|
|
65
|
+
default: v(() => [b.value ? (m(), o("div", {
|
|
66
|
+
key: 0,
|
|
67
|
+
class: d(D.value),
|
|
68
|
+
onMouseenter: w,
|
|
69
|
+
onMouseleave: T
|
|
70
|
+
}, [
|
|
71
|
+
u.before.length > 0 ? (m(), i(e, {
|
|
72
|
+
key: 0,
|
|
73
|
+
"icon-class": u.before
|
|
74
|
+
}, null, 8, ["icon-class"])) : g(n.$slots, "prefix", {}, void 0, void 0, 1),
|
|
75
|
+
g(n.$slots, "default", {}, () => [c(_(u.message), 1)]),
|
|
76
|
+
u.after.length > 0 ? (m(), i(e, {
|
|
77
|
+
key: 2,
|
|
78
|
+
"icon-class": u.after,
|
|
79
|
+
onClick: C
|
|
80
|
+
}, null, 8, ["icon-class"])) : g(n.$slots, "suffix", {}, void 0, void 0, 3),
|
|
81
|
+
s("footer", null, [g(n.$slots, "footer")])
|
|
82
|
+
], 34)) : a("", !0)]),
|
|
83
|
+
_: 3
|
|
84
|
+
}));
|
|
85
|
+
}
|
|
86
|
+
}, b = null;
|
|
87
|
+
function x(e = {}) {
|
|
6
88
|
if (typeof document > "u") return;
|
|
7
|
-
|
|
8
|
-
let { prefix:
|
|
9
|
-
return () =>
|
|
10
|
-
...
|
|
89
|
+
b ||= document.querySelector("div.sw-alert-wrapper"), b || (b = document.createElement("div"), b.className = "sw-alert-wrapper", b.setAttribute("popover", "manual"), document.body.appendChild(b));
|
|
90
|
+
let { prefix: t, suffix: n, footer: i, ...a } = e, o = (e) => e == null ? null : typeof e == "function" ? e : typeof e == "string" ? () => [u("span", e)] : Array.isArray(e) ? () => e : () => [e], s = r({ setup() {
|
|
91
|
+
return () => u(y, {
|
|
92
|
+
...a,
|
|
11
93
|
onClose: () => {
|
|
12
|
-
|
|
94
|
+
b && s._container && (b.removeChild(s._container), s.unmount()), e.onClose && e.onClose();
|
|
13
95
|
}
|
|
14
96
|
}, {
|
|
15
|
-
...
|
|
16
|
-
...
|
|
17
|
-
...
|
|
97
|
+
...t != null && { prefix: o(t) },
|
|
98
|
+
...n != null && { suffix: o(n) },
|
|
99
|
+
...i != null && { footer: o(i) }
|
|
18
100
|
});
|
|
19
|
-
} }),
|
|
20
|
-
|
|
101
|
+
} }), c = s.mount(document.createElement("div"));
|
|
102
|
+
b && c.$el && b.appendChild(c.$el);
|
|
21
103
|
}
|
|
22
104
|
//#endregion
|
|
23
105
|
//#region src/index.ts
|
|
24
|
-
var
|
|
25
|
-
"./components/
|
|
26
|
-
"./components/
|
|
27
|
-
"./components/
|
|
28
|
-
"./components/
|
|
29
|
-
"./components/
|
|
30
|
-
"./components/
|
|
31
|
-
"./components/
|
|
32
|
-
"./components/
|
|
33
|
-
"./components/
|
|
34
|
-
"./components/
|
|
35
|
-
"./components/
|
|
36
|
-
"./components/
|
|
37
|
-
"./components/
|
|
38
|
-
"./components/
|
|
39
|
-
"./components/
|
|
40
|
-
"./components/
|
|
41
|
-
"./components/
|
|
42
|
-
"./components/
|
|
43
|
-
"./components/
|
|
44
|
-
"./components/
|
|
45
|
-
"./components/
|
|
46
|
-
"./components/
|
|
47
|
-
"./components/
|
|
48
|
-
"./components/
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
for (let e in o) {
|
|
106
|
+
var S = /* #__PURE__ */ Object.assign({
|
|
107
|
+
"./components/SwButton.vue": () => import("./SwButton-mr7jdXoz.js").then((e) => e.n),
|
|
108
|
+
"./components/SwButtonGroup.vue": () => import("./SwButtonGroup-Ck8aedFL.js"),
|
|
109
|
+
"./components/SwCollapse.vue": () => import("./SwCollapse-DrCfi6Ly.js"),
|
|
110
|
+
"./components/SwDatePicker.vue": () => import("./SwDatePicker-D_UoCJUA.js"),
|
|
111
|
+
"./components/SwDropdown.vue": () => import("./SwDropdown-BTADCvrN.js"),
|
|
112
|
+
"./components/SwDropdownItem.vue": () => import("./SwDropdownItem-oQKFG36T.js"),
|
|
113
|
+
"./components/SwDropdownNew.vue": () => import("./SwDropdownNew-BuCIN-iv.js"),
|
|
114
|
+
"./components/SwFile.vue": () => import("./SwFile-BBIqUoFG.js"),
|
|
115
|
+
"./components/SwFormItem.vue": () => import("./SwFormItem-DgFaNwe9.js"),
|
|
116
|
+
"./components/SwGide.vue": () => import("./SwGide-BYRlBr9D.js"),
|
|
117
|
+
"./components/SwIcon.vue": () => import("./SwIcon-C4RHAbK1.js").then((e) => e.t),
|
|
118
|
+
"./components/SwInput.vue": () => import("./SwInput-0Eph7P-m.js"),
|
|
119
|
+
"./components/SwMenu.vue": () => import("./SwMenu-Dohv0z9N.js"),
|
|
120
|
+
"./components/SwMessage.vue": () => import("./SwMessage-CUTW1YCi.js"),
|
|
121
|
+
"./components/SwSection.vue": () => import("./SwSection-DG9jX0Yc.js"),
|
|
122
|
+
"./components/SwSelect.vue": () => import("./SwSelect-DwxIlRFI.js"),
|
|
123
|
+
"./components/SwSkeleton.vue": () => import("./SwSkeleton-DsjPQpL2.js"),
|
|
124
|
+
"./components/SwSkeletonItem.vue": () => import("./SwSkeletonItem-DOBVXQbh.js"),
|
|
125
|
+
"./components/SwSlider.vue": () => import("./SwSlider-DkgJH6Bh.js"),
|
|
126
|
+
"./components/SwSwitch.vue": () => import("./SwSwitch-Cxk-eNTf.js"),
|
|
127
|
+
"./components/SwTable.vue": () => import("./SwTable-DE3cDsvN.js"),
|
|
128
|
+
"./components/SwTableColumn.vue": () => import("./SwTableColumn-DQT28erv.js"),
|
|
129
|
+
"./components/SwTabs.vue": () => import("./SwTabs-A6JIa-Kl.js"),
|
|
130
|
+
"./components/SwTabsPane.vue": () => import("./SwTabsPane-CDBFh3D3.js")
|
|
131
|
+
}), C = { SwAlert: y };
|
|
132
|
+
for (let e in S) {
|
|
52
133
|
let t = e.split("/").pop().replace(".vue", "").replace(/-(\w)/g, (e, t) => t.toUpperCase());
|
|
53
|
-
|
|
134
|
+
C[t] = l(() => S[e]());
|
|
54
135
|
}
|
|
55
|
-
var
|
|
56
|
-
Object.keys(
|
|
57
|
-
e.component(t,
|
|
58
|
-
}), e.config.globalProperties.$Alert =
|
|
136
|
+
var w = { install(e) {
|
|
137
|
+
Object.keys(C).forEach((t) => {
|
|
138
|
+
e.component(t, C[t]);
|
|
139
|
+
}), e.config.globalProperties.$Alert = x, e.provide("Alert", x);
|
|
59
140
|
} };
|
|
60
141
|
//#endregion
|
|
61
|
-
export {
|
|
142
|
+
export { x as Alert, w as Library, C as components };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@studio-west/component-sw",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.7",
|
|
4
4
|
"description": "Vue components of Component-SW collection.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
@@ -38,18 +38,21 @@
|
|
|
38
38
|
"test:ssr": "bash scripts/with-node.sh node scripts/ssr-safe.mjs"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"axios": "^1.
|
|
42
|
-
"vue": "^3.5.
|
|
41
|
+
"axios": "^1.18.1",
|
|
42
|
+
"vue": "^3.5.40"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@vitejs/plugin-vue": "^6.0.
|
|
46
|
-
"@vue/tsconfig": "^0.
|
|
47
|
-
"sass": "^1.
|
|
48
|
-
"sass-embedded": "^1.
|
|
45
|
+
"@vitejs/plugin-vue": "^6.0.8",
|
|
46
|
+
"@vue/tsconfig": "^0.9.1",
|
|
47
|
+
"sass": "^1.101.7",
|
|
48
|
+
"sass-embedded": "^1.100.0",
|
|
49
49
|
"typescript": "^5.9.3",
|
|
50
|
-
"vite": "8.
|
|
51
|
-
"vue-tsc": "^
|
|
50
|
+
"vite": "8.1.5",
|
|
51
|
+
"vue-tsc": "^3.3.8"
|
|
52
52
|
},
|
|
53
53
|
"author": "Alexander Efimov",
|
|
54
|
-
"license": "MIT"
|
|
54
|
+
"license": "MIT",
|
|
55
|
+
"engines": {
|
|
56
|
+
"node": ">=20.19.0 || >=22.12.0"
|
|
57
|
+
}
|
|
55
58
|
}
|
package/types/index.d.ts
CHANGED
|
@@ -45,7 +45,7 @@ export interface SwInputProps {
|
|
|
45
45
|
class?: string
|
|
46
46
|
size?: string
|
|
47
47
|
type?: string
|
|
48
|
-
inputMode?:
|
|
48
|
+
inputMode?: 'none' | 'text' | 'decimal' | 'numeric' | 'tel' | 'search' | 'email' | 'url'
|
|
49
49
|
required?: boolean
|
|
50
50
|
maxlength?: number
|
|
51
51
|
minlength?: number
|
package/dist/SwAlert-CKJhS25j.js
DELETED
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import { n as e } from "./SwIcon-CyVWEZkk.js";
|
|
2
|
-
import { t } from "./SwSelect-DyArzImF.js";
|
|
3
|
-
import { Transition as n, computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createTextVNode as c, normalizeClass as l, onMounted as u, onUnmounted as d, openBlock as f, ref as p, renderSlot as m, toDisplayString as h, withCtx as g } from "vue";
|
|
4
|
-
//#region src/components/SwAlert.vue
|
|
5
|
-
var _ = /* @__PURE__ */ t({ default: () => v }), v = {
|
|
6
|
-
__name: "SwAlert",
|
|
7
|
-
props: {
|
|
8
|
-
message: {
|
|
9
|
-
type: String,
|
|
10
|
-
default: "Default message"
|
|
11
|
-
},
|
|
12
|
-
before: {
|
|
13
|
-
type: String,
|
|
14
|
-
default: ""
|
|
15
|
-
},
|
|
16
|
-
class: {
|
|
17
|
-
type: String,
|
|
18
|
-
default: ""
|
|
19
|
-
},
|
|
20
|
-
after: {
|
|
21
|
-
type: String,
|
|
22
|
-
default: ""
|
|
23
|
-
},
|
|
24
|
-
size: {
|
|
25
|
-
type: String,
|
|
26
|
-
default: ""
|
|
27
|
-
},
|
|
28
|
-
duration: {
|
|
29
|
-
type: Number,
|
|
30
|
-
default: 6e3
|
|
31
|
-
},
|
|
32
|
-
type: {
|
|
33
|
-
type: String,
|
|
34
|
-
default: "info",
|
|
35
|
-
validator: (e) => [
|
|
36
|
-
"success",
|
|
37
|
-
"warning",
|
|
38
|
-
"error",
|
|
39
|
-
"info"
|
|
40
|
-
].includes(e)
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
emits: ["closed"],
|
|
44
|
-
setup(t, { emit: _ }) {
|
|
45
|
-
let v = t, y = _, b = p(!1), x = null, S = () => {
|
|
46
|
-
document.querySelector(".sw-alert-wrapper").togglePopover(), b.value = !0, document.querySelector(".sw-alert-wrapper").showPopover(), E();
|
|
47
|
-
}, C = () => {
|
|
48
|
-
b.value = !1, y("closed");
|
|
49
|
-
}, w = () => {
|
|
50
|
-
x &&= (clearTimeout(x), null);
|
|
51
|
-
}, T = () => {
|
|
52
|
-
E();
|
|
53
|
-
}, E = () => {
|
|
54
|
-
x = setTimeout(C, v.duration);
|
|
55
|
-
};
|
|
56
|
-
u(() => {
|
|
57
|
-
S();
|
|
58
|
-
}), d(() => {
|
|
59
|
-
x && clearTimeout(x);
|
|
60
|
-
});
|
|
61
|
-
let D = r(() => {
|
|
62
|
-
let e = ["sw-alert"];
|
|
63
|
-
return v.size.length > 0 && e.push(`sw-${v.size}`), v.type.length > 0 && e.push(`sw-${v.type}`), v.class.length > 0 && e.push(v.class), e;
|
|
64
|
-
});
|
|
65
|
-
return (t, r) => (f(), i(n, { name: "fade" }, {
|
|
66
|
-
default: g(() => [b.value ? (f(), o("div", {
|
|
67
|
-
key: 0,
|
|
68
|
-
class: l(D.value),
|
|
69
|
-
onMouseenter: w,
|
|
70
|
-
onMouseleave: T
|
|
71
|
-
}, [
|
|
72
|
-
v.before.length > 0 ? (f(), i(e, {
|
|
73
|
-
key: 0,
|
|
74
|
-
"icon-class": v.before
|
|
75
|
-
}, null, 8, ["icon-class"])) : m(t.$slots, "prefix", { key: 1 }),
|
|
76
|
-
m(t.$slots, "default", {}, () => [c(h(v.message), 1)]),
|
|
77
|
-
v.after.length > 0 ? (f(), i(e, {
|
|
78
|
-
key: 2,
|
|
79
|
-
"icon-class": v.after,
|
|
80
|
-
onClick: C
|
|
81
|
-
}, null, 8, ["icon-class"])) : m(t.$slots, "suffix", { key: 3 }),
|
|
82
|
-
s("footer", null, [m(t.$slots, "footer")])
|
|
83
|
-
], 34)) : a("", !0)]),
|
|
84
|
-
_: 3
|
|
85
|
-
}));
|
|
86
|
-
}
|
|
87
|
-
};
|
|
88
|
-
//#endregion
|
|
89
|
-
export { v as n, _ as t };
|