@studio-west/component-sw 0.12.25 → 0.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +141 -28
- package/dist/{SwAlert-CU7nEnO-.js → SwAlert-CKJhS25j.js} +2 -2
- package/dist/SwButton-B-Z8Fhdv.js +61 -0
- package/dist/{SwDropdownItem-CKOTwhTf.js → SwDropdownItem-9Bq9fExK.js} +1 -1
- package/dist/SwFile-hpyHTblK.js +499 -0
- package/dist/{SwGide-Ie6XCPUn.js → SwGide-C62de-t6.js} +2 -2
- package/dist/{SwIcon-D6FCTrgR.js → SwIcon-CyVWEZkk.js} +1 -1
- package/dist/{SwInput-u7kS3lQn.js → SwInput-BED_o0wD.js} +1 -1
- package/dist/{SwMessage-DRjFGSK3.js → SwMessage-CA8jo3G7.js} +2 -2
- package/dist/{SwSkeleton-Byvq4bjt.js → SwSkeleton-BIj8PPM_.js} +1 -1
- package/dist/component-sw.css +1 -1
- package/dist/index.cjs +6 -6
- package/dist/index.js +21 -20
- package/package.json +3 -2
- package/types/components.d.ts +3 -0
- package/types/index.d.ts +19 -0
- package/dist/SwButton-Bvn3JLcT.js +0 -61
- /package/dist/{SwFormItem-DQJohClb.js → SwFormItem-rn5iuIUv.js} +0 -0
- /package/dist/{SwMenu-eQSh_MlP.js → SwMenu-Bh4BtVif.js} +0 -0
- /package/dist/{SwSection-BN1U3KaZ.js → SwSection-Bl3H3D2G.js} +0 -0
- /package/dist/{SwSelect-CMDZWWEI.js → SwSelect-DyArzImF.js} +0 -0
- /package/dist/{SwSkeletonItem-BnXZXE54.js → SwSkeletonItem-BKeBIWXT.js} +0 -0
- /package/dist/{SwSlider-DrIc0Xna.js → SwSlider-4S5KNn6o.js} +0 -0
- /package/dist/{SwSwitch-BVbje0T9.js → SwSwitch-BqAIQmG3.js} +0 -0
- /package/dist/{SwTable-4kHapbYy.js → SwTable-BjYEVovB.js} +0 -0
- /package/dist/{SwTableColumn-DCxVGb9d.js → SwTableColumn-CpNTUOVF.js} +0 -0
- /package/dist/{SwTabs-x2bXZwz1.js → SwTabs-jUzYPw9X.js} +0 -0
- /package/dist/{SwTabsPane-DpkTKQH8.js → SwTabsPane-Bhi49paR.js} +0 -0
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as e } from "./SwAlert-
|
|
1
|
+
import { n as e } from "./SwAlert-CKJhS25j.js";
|
|
2
2
|
import { createApp as t, defineAsyncComponent as n, h as r } from "vue";
|
|
3
3
|
//#region src/Alert.ts
|
|
4
4
|
var i = null;
|
|
@@ -22,30 +22,31 @@ function a(n = {}) {
|
|
|
22
22
|
//#endregion
|
|
23
23
|
//#region src/index.ts
|
|
24
24
|
var o = /* @__PURE__ */ Object.assign({
|
|
25
|
-
"./components/SwAlert.vue": () => import("./SwAlert-
|
|
26
|
-
"./components/SwButton.vue": () => import("./SwButton-
|
|
25
|
+
"./components/SwAlert.vue": () => import("./SwAlert-CKJhS25j.js").then((e) => e.t),
|
|
26
|
+
"./components/SwButton.vue": () => import("./SwButton-B-Z8Fhdv.js").then((e) => e.n),
|
|
27
27
|
"./components/SwButtonGroup.vue": () => import("./SwButtonGroup-Dmsbam44.js"),
|
|
28
28
|
"./components/SwCollapse.vue": () => import("./SwCollapse-Drz3qkNa.js"),
|
|
29
29
|
"./components/SwDatePicker.vue": () => import("./SwDatePicker-B3GrfMfB.js"),
|
|
30
30
|
"./components/SwDropdown.vue": () => import("./SwDropdown-DMkEn-su.js"),
|
|
31
|
-
"./components/SwDropdownItem.vue": () => import("./SwDropdownItem-
|
|
31
|
+
"./components/SwDropdownItem.vue": () => import("./SwDropdownItem-9Bq9fExK.js"),
|
|
32
32
|
"./components/SwDropdownNew.vue": () => import("./SwDropdownNew-TXu5V6xZ.js"),
|
|
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/
|
|
33
|
+
"./components/SwFile.vue": () => import("./SwFile-hpyHTblK.js"),
|
|
34
|
+
"./components/SwFormItem.vue": () => import("./SwFormItem-rn5iuIUv.js"),
|
|
35
|
+
"./components/SwGide.vue": () => import("./SwGide-C62de-t6.js"),
|
|
36
|
+
"./components/SwIcon.vue": () => import("./SwIcon-CyVWEZkk.js").then((e) => e.t),
|
|
37
|
+
"./components/SwInput.vue": () => import("./SwInput-BED_o0wD.js"),
|
|
38
|
+
"./components/SwMenu.vue": () => import("./SwMenu-Bh4BtVif.js"),
|
|
39
|
+
"./components/SwMessage.vue": () => import("./SwMessage-CA8jo3G7.js"),
|
|
40
|
+
"./components/SwSection.vue": () => import("./SwSection-Bl3H3D2G.js"),
|
|
41
|
+
"./components/SwSelect.vue": () => import("./SwSelect-DyArzImF.js"),
|
|
42
|
+
"./components/SwSkeleton.vue": () => import("./SwSkeleton-BIj8PPM_.js"),
|
|
43
|
+
"./components/SwSkeletonItem.vue": () => import("./SwSkeletonItem-BKeBIWXT.js"),
|
|
44
|
+
"./components/SwSlider.vue": () => import("./SwSlider-4S5KNn6o.js"),
|
|
45
|
+
"./components/SwSwitch.vue": () => import("./SwSwitch-BqAIQmG3.js"),
|
|
46
|
+
"./components/SwTable.vue": () => import("./SwTable-BjYEVovB.js"),
|
|
47
|
+
"./components/SwTableColumn.vue": () => import("./SwTableColumn-CpNTUOVF.js"),
|
|
48
|
+
"./components/SwTabs.vue": () => import("./SwTabs-jUzYPw9X.js"),
|
|
49
|
+
"./components/SwTabsPane.vue": () => import("./SwTabsPane-Bhi49paR.js")
|
|
49
50
|
}), s = {};
|
|
50
51
|
for (let e in o) {
|
|
51
52
|
let t = e.split("/").pop().replace(".vue", "").replace(/-(\w)/g, (e, t) => t.toUpperCase());
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@studio-west/component-sw",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.1",
|
|
4
4
|
"description": "Vue components of Component-SW collection.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
@@ -34,7 +34,8 @@
|
|
|
34
34
|
"build:lib": "bash scripts/with-node.sh vite build",
|
|
35
35
|
"build:panel": "bash scripts/with-node.sh vite build --mode panel",
|
|
36
36
|
"preview:panel": "bash scripts/with-node.sh vite preview --mode panel",
|
|
37
|
-
"type-check": "bash scripts/with-node.sh vue-tsc --noEmit"
|
|
37
|
+
"type-check": "bash scripts/with-node.sh vue-tsc --noEmit",
|
|
38
|
+
"test:ssr": "bash scripts/with-node.sh node scripts/ssr-safe.mjs"
|
|
38
39
|
},
|
|
39
40
|
"dependencies": {
|
|
40
41
|
"axios": "^1.7.9",
|
package/types/components.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export type SwInput = DefineComponent<import('./index').SwInputProps>
|
|
|
7
7
|
export type SwSwitch = DefineComponent<import('./index').SwSwitchProps>
|
|
8
8
|
export type SwSelect = DefineComponent<import('./index').SwSelectProps>
|
|
9
9
|
export type SwMenu = DefineComponent<import('./index').SwMenuProps>
|
|
10
|
+
export type SwFile = DefineComponent<import('./index').SwFileProps>
|
|
10
11
|
|
|
11
12
|
// Augment Vue's GlobalComponents interface
|
|
12
13
|
declare module 'vue' {
|
|
@@ -35,6 +36,7 @@ declare module 'vue' {
|
|
|
35
36
|
SwTabs: DefineComponent
|
|
36
37
|
SwTabsPane: DefineComponent
|
|
37
38
|
SwMenu: SwMenu
|
|
39
|
+
SwFile: SwFile
|
|
38
40
|
|
|
39
41
|
// kebab-case component names (alternative)
|
|
40
42
|
'sw-button': SwButton
|
|
@@ -60,6 +62,7 @@ declare module 'vue' {
|
|
|
60
62
|
'sw-tabs': DefineComponent
|
|
61
63
|
'sw-tabs-pane': DefineComponent
|
|
62
64
|
'sw-menu': SwMenu
|
|
65
|
+
'sw-file': SwFile
|
|
63
66
|
}
|
|
64
67
|
}
|
|
65
68
|
|
package/types/index.d.ts
CHANGED
|
@@ -75,12 +75,30 @@ export interface SwMenuProps {
|
|
|
75
75
|
class?: string
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
+
export interface SwFileProps {
|
|
79
|
+
mode?: 'photo' | 'document'
|
|
80
|
+
disabled?: boolean
|
|
81
|
+
accept?: string
|
|
82
|
+
label?: string
|
|
83
|
+
class?: string
|
|
84
|
+
aspectRatio?: number | null
|
|
85
|
+
/** [empty, image, video] */
|
|
86
|
+
editorTitle?: [string, string, string] | string[]
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export interface SwFileItem {
|
|
90
|
+
id: string
|
|
91
|
+
file: File
|
|
92
|
+
previewUrl: string
|
|
93
|
+
}
|
|
94
|
+
|
|
78
95
|
// Export component constructor types
|
|
79
96
|
export type SwButton = DefineComponent<SwButtonProps>
|
|
80
97
|
export type SwInput = DefineComponent<SwInputProps>
|
|
81
98
|
export type SwSwitch = DefineComponent<SwSwitchProps>
|
|
82
99
|
export type SwSelect = DefineComponent<SwSelectProps>
|
|
83
100
|
export type SwMenu = DefineComponent<SwMenuProps>
|
|
101
|
+
export type SwFile = DefineComponent<SwFileProps>
|
|
84
102
|
|
|
85
103
|
// Global component registration
|
|
86
104
|
declare module 'vue' {
|
|
@@ -109,6 +127,7 @@ declare module 'vue' {
|
|
|
109
127
|
SwTabs: DefineComponent
|
|
110
128
|
SwTabsPane: DefineComponent
|
|
111
129
|
SwMenu: SwMenu
|
|
130
|
+
SwFile: DefineComponent
|
|
112
131
|
}
|
|
113
132
|
}
|
|
114
133
|
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { computed as e, createBlock as t, createCommentVNode as n, createElementBlock as r, createTextVNode as i, defineComponent as a, normalizeClass as o, openBlock as s, renderSlot as c, resolveComponent as l, toDisplayString as u } from "vue";
|
|
2
|
-
//#endregion
|
|
3
|
-
//#region src/components/SwButton.vue
|
|
4
|
-
var d = /* @__PURE__ */ a({
|
|
5
|
-
__name: "SwButton",
|
|
6
|
-
props: {
|
|
7
|
-
class: { default: "" },
|
|
8
|
-
size: { default: "" },
|
|
9
|
-
type: { default: "" },
|
|
10
|
-
round: {
|
|
11
|
-
type: Boolean,
|
|
12
|
-
default: !1
|
|
13
|
-
},
|
|
14
|
-
text: {
|
|
15
|
-
type: Boolean,
|
|
16
|
-
default: !1
|
|
17
|
-
},
|
|
18
|
-
link: {
|
|
19
|
-
type: Boolean,
|
|
20
|
-
default: !1
|
|
21
|
-
},
|
|
22
|
-
href: { default: "" },
|
|
23
|
-
disabled: {
|
|
24
|
-
type: Boolean,
|
|
25
|
-
default: !1
|
|
26
|
-
},
|
|
27
|
-
label: { default: "" },
|
|
28
|
-
prefix: { default: "" },
|
|
29
|
-
postfix: { default: "" }
|
|
30
|
-
},
|
|
31
|
-
setup(a) {
|
|
32
|
-
let d = a, f = () => {
|
|
33
|
-
if (d.href.length > 0) {
|
|
34
|
-
let e = document.createElement("a");
|
|
35
|
-
e.setAttribute("href", d.href), e.setAttribute("target", "_blank"), d.disabled || e.click();
|
|
36
|
-
}
|
|
37
|
-
}, p = e(() => {
|
|
38
|
-
let e = ["sw-button"];
|
|
39
|
-
return d.size.length > 0 && e.push("sw-" + d.size), d.type.length > 0 && e.push("sw-" + d.type), d.round && e.push("sw-round"), d.text && e.push("sw-text"), d.link && e.push("sw-link"), d.disabled && e.push("sw-disabled"), d.class.length > 0 && e.push(d.class), e;
|
|
40
|
-
});
|
|
41
|
-
return (e, d) => {
|
|
42
|
-
let m = l("sw-icon");
|
|
43
|
-
return s(), r("button", {
|
|
44
|
-
class: o(p.value),
|
|
45
|
-
onClick: f
|
|
46
|
-
}, [c(e.$slots, "default", {}, () => [
|
|
47
|
-
a.prefix ? (s(), t(m, {
|
|
48
|
-
key: 0,
|
|
49
|
-
iconClass: a.prefix
|
|
50
|
-
}, null, 8, ["iconClass"])) : n("", !0),
|
|
51
|
-
i(u(a.label), 1),
|
|
52
|
-
a.postfix ? (s(), t(m, {
|
|
53
|
-
key: 1,
|
|
54
|
-
iconClass: a.postfix
|
|
55
|
-
}, null, 8, ["iconClass"])) : n("", !0)
|
|
56
|
-
])], 2);
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
//#endregion
|
|
61
|
-
export { d as default };
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|