@studio-west/component-sw 0.13.19 → 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/README.md +259 -39
- package/dist/SwAffix-C-WH1AXb.js +81 -0
- package/dist/SwBackTop-CUlHSCLN.js +42 -0
- package/dist/{SwButton-DpOGpsBS.js → SwButton-yBtJyLyA.js} +1 -1
- package/dist/{SwSelect-DDNh3p6B.js → SwDadata-DqTWDCFW.js} +5 -5
- package/dist/{SwDatePicker-BwgaZLnR.js → SwDatePicker-4iPLiAJM.js} +1 -1
- package/dist/SwDrawer-CWWOrjf8.js +86 -0
- package/dist/{SwDropdownItem-DthBPUxn.js → SwDropdownItem-D1v0dRnc.js} +1 -1
- package/dist/{SwFile-DfeOYJQc.js → SwFile-CL1CigYW.js} +2 -2
- package/dist/{SwGide-BjQbQiBI.js → SwGuide-CjSEK9oe.js} +8 -8
- package/dist/{SwIcon-B-HHyuxu.js → SwIcon-Bjw7BuaO.js} +2 -2
- package/dist/{SwInput-BQXnoovf.js → SwInput-pYuctxdZ.js} +2 -2
- package/dist/{SwMessage-BghpMRWc.js → SwMessage-CmzUF6Jz.js} +2 -2
- package/dist/SwSelect-BK_EkJCH.js +139 -0
- package/dist/{SwSlider-Cl9pwY6h.js → SwSlider-Bxgz0rv5.js} +69 -28
- package/dist/{SwTable-DE3cDsvN.js → SwTable-DzUOHu08.js} +96 -94
- package/dist/SwTag-snjqhsXj.js +52 -0
- package/dist/component-sw.css +1 -1
- package/dist/index.cjs +6 -6
- package/dist/index.js +17 -13
- package/dist/{utils-qzwUfWRX.js → utils-B970mUhr.js} +1 -1
- package/package.json +1 -1
- package/types/components.d.ts +2 -2
- package/types/index.d.ts +57 -1
- package/dist/SwTag-DjZlthUS.js +0 -51
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as e } from "./SwIcon-
|
|
1
|
+
import { n as e } from "./SwIcon-Bjw7BuaO.js";
|
|
2
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 _, unref as v, useSlots as y, withCtx as b } from "vue";
|
|
3
3
|
//#region src/components/SwAlert.vue
|
|
4
4
|
var x = { class: "body" }, S = { class: "text" }, C = { key: 0 }, w = {
|
|
@@ -129,32 +129,36 @@ function M(e = {}) {
|
|
|
129
129
|
//#endregion
|
|
130
130
|
//#region src/index.ts
|
|
131
131
|
var N = /* #__PURE__ */ Object.assign({
|
|
132
|
+
"./components/SwAffix.vue": () => import("./SwAffix-C-WH1AXb.js"),
|
|
133
|
+
"./components/SwBackTop.vue": () => import("./SwBackTop-CUlHSCLN.js"),
|
|
132
134
|
"./components/SwBadge.vue": () => import("./SwBadge-BOqWsTgl.js"),
|
|
133
|
-
"./components/SwButton.vue": () => import("./SwButton-
|
|
135
|
+
"./components/SwButton.vue": () => import("./SwButton-yBtJyLyA.js").then((e) => e.n),
|
|
134
136
|
"./components/SwButtonGroup.vue": () => import("./SwButtonGroup-Ck8aedFL.js"),
|
|
135
137
|
"./components/SwCollapse.vue": () => import("./SwCollapse-DrCfi6Ly.js"),
|
|
136
|
-
"./components/
|
|
138
|
+
"./components/SwDadata.vue": () => import("./SwDadata-DqTWDCFW.js"),
|
|
139
|
+
"./components/SwDatePicker.vue": () => import("./SwDatePicker-4iPLiAJM.js"),
|
|
140
|
+
"./components/SwDrawer.vue": () => import("./SwDrawer-CWWOrjf8.js"),
|
|
137
141
|
"./components/SwDropdown.vue": () => import("./SwDropdown-DpedC6Bn.js"),
|
|
138
|
-
"./components/SwDropdownItem.vue": () => import("./SwDropdownItem-
|
|
139
|
-
"./components/SwFile.vue": () => import("./SwFile-
|
|
142
|
+
"./components/SwDropdownItem.vue": () => import("./SwDropdownItem-D1v0dRnc.js"),
|
|
143
|
+
"./components/SwFile.vue": () => import("./SwFile-CL1CigYW.js"),
|
|
140
144
|
"./components/SwFormItem.vue": () => import("./SwFormItem-SuqNvXBQ.js"),
|
|
141
|
-
"./components/
|
|
142
|
-
"./components/SwIcon.vue": () => import("./SwIcon-
|
|
143
|
-
"./components/SwInput.vue": () => import("./SwInput-
|
|
145
|
+
"./components/SwGuide.vue": () => import("./SwGuide-CjSEK9oe.js"),
|
|
146
|
+
"./components/SwIcon.vue": () => import("./SwIcon-Bjw7BuaO.js").then((e) => e.t),
|
|
147
|
+
"./components/SwInput.vue": () => import("./SwInput-pYuctxdZ.js"),
|
|
144
148
|
"./components/SwMenu.vue": () => import("./SwMenu-Dohv0z9N.js"),
|
|
145
|
-
"./components/SwMessage.vue": () => import("./SwMessage-
|
|
149
|
+
"./components/SwMessage.vue": () => import("./SwMessage-CmzUF6Jz.js"),
|
|
146
150
|
"./components/SwPagination.vue": () => import("./SwPagination-jTW9BD5P.js"),
|
|
147
151
|
"./components/SwSection.vue": () => import("./SwSection-Ck1GYU_A.js"),
|
|
148
|
-
"./components/SwSelect.vue": () => import("./SwSelect-
|
|
152
|
+
"./components/SwSelect.vue": () => import("./SwSelect-BK_EkJCH.js"),
|
|
149
153
|
"./components/SwSkeleton.vue": () => import("./SwSkeleton-DsjPQpL2.js"),
|
|
150
154
|
"./components/SwSkeletonItem.vue": () => import("./SwSkeletonItem-DOBVXQbh.js"),
|
|
151
|
-
"./components/SwSlider.vue": () => import("./SwSlider-
|
|
155
|
+
"./components/SwSlider.vue": () => import("./SwSlider-Bxgz0rv5.js"),
|
|
152
156
|
"./components/SwSwitch.vue": () => import("./SwSwitch-Cxk-eNTf.js"),
|
|
153
|
-
"./components/SwTable.vue": () => import("./SwTable-
|
|
157
|
+
"./components/SwTable.vue": () => import("./SwTable-DzUOHu08.js"),
|
|
154
158
|
"./components/SwTableColumn.vue": () => import("./SwTableColumn-DQT28erv.js"),
|
|
155
159
|
"./components/SwTabs.vue": () => import("./SwTabs-A6JIa-Kl.js"),
|
|
156
160
|
"./components/SwTabsPane.vue": () => import("./SwTabsPane-CDBFh3D3.js"),
|
|
157
|
-
"./components/SwTag.vue": () => import("./SwTag-
|
|
161
|
+
"./components/SwTag.vue": () => import("./SwTag-snjqhsXj.js").then((e) => e.n)
|
|
158
162
|
}), P = { SwAlert: w };
|
|
159
163
|
for (let e in N) {
|
|
160
164
|
let t = e.split("/").pop().replace(".vue", "").replace(/-(\w)/g, (e, t) => t.toUpperCase());
|
|
@@ -41,7 +41,7 @@ function i(e) {
|
|
|
41
41
|
let t = 0, n = document.body.querySelectorAll("*");
|
|
42
42
|
for (let r = 0; r < n.length; r++) {
|
|
43
43
|
let i = n[r];
|
|
44
|
-
if (e && (i === e || e.contains(i)) || i.closest(".sw-alert-wrapper, .sw-dropdown-popup.
|
|
44
|
+
if (e && (i === e || e.contains(i)) || i.closest(".sw-alert-wrapper, .sw-dropdown-popup.guide")) continue;
|
|
45
45
|
let a = getComputedStyle(i);
|
|
46
46
|
if (a.position === "static") continue;
|
|
47
47
|
let o = a.zIndex;
|
package/package.json
CHANGED
package/types/components.d.ts
CHANGED
|
@@ -23,7 +23,7 @@ declare module 'vue' {
|
|
|
23
23
|
SwDropdown: DefineComponent
|
|
24
24
|
SwDropdownItem: DefineComponent
|
|
25
25
|
SwFormItem: DefineComponent
|
|
26
|
-
|
|
26
|
+
SwGuide: DefineComponent
|
|
27
27
|
SwIcon: DefineComponent
|
|
28
28
|
SwMessage: DefineComponent
|
|
29
29
|
SwSection: DefineComponent
|
|
@@ -48,7 +48,7 @@ declare module 'vue' {
|
|
|
48
48
|
'sw-dropdown': DefineComponent
|
|
49
49
|
'sw-dropdown-item': DefineComponent
|
|
50
50
|
'sw-form-item': DefineComponent
|
|
51
|
-
'sw-
|
|
51
|
+
'sw-guide': DefineComponent
|
|
52
52
|
'sw-icon': DefineComponent
|
|
53
53
|
'sw-message': DefineComponent
|
|
54
54
|
'sw-section': DefineComponent
|
package/types/index.d.ts
CHANGED
|
@@ -83,13 +83,61 @@ export interface SwSwitchProps {
|
|
|
83
83
|
checkbox?: boolean
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
+
export interface SwSelectOption {
|
|
87
|
+
label: string
|
|
88
|
+
value: string | number
|
|
89
|
+
disabled?: boolean
|
|
90
|
+
}
|
|
91
|
+
|
|
86
92
|
export interface SwSelectProps {
|
|
93
|
+
class?: string
|
|
94
|
+
size?: 'large' | 'small'
|
|
95
|
+
placeholder?: string
|
|
96
|
+
options?: SwSelectOption[]
|
|
97
|
+
multiple?: boolean
|
|
98
|
+
clearable?: boolean
|
|
99
|
+
disabled?: boolean
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export interface SwDadataModel {
|
|
103
|
+
text: string
|
|
104
|
+
coords: [number, number]
|
|
105
|
+
suggestion: Record<string, unknown> | null
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export interface SwDadataProps {
|
|
87
109
|
class?: string
|
|
88
110
|
size?: 'large' | 'small'
|
|
89
111
|
placeholder?: string
|
|
90
112
|
token?: string
|
|
91
113
|
}
|
|
92
114
|
|
|
115
|
+
export interface SwDrawerProps {
|
|
116
|
+
class?: string
|
|
117
|
+
title?: string
|
|
118
|
+
placement?: 'left' | 'right'
|
|
119
|
+
size?: string
|
|
120
|
+
after?: string
|
|
121
|
+
iconAfter?: string
|
|
122
|
+
modal?: boolean
|
|
123
|
+
closeOnClickModal?: boolean
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export interface SwBackTopProps {
|
|
127
|
+
class?: string
|
|
128
|
+
visibilityHeight?: number
|
|
129
|
+
right?: string
|
|
130
|
+
bottom?: string
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export interface SwAffixProps {
|
|
134
|
+
class?: string
|
|
135
|
+
offset?: number
|
|
136
|
+
offsetBottom?: number
|
|
137
|
+
boundary?: string
|
|
138
|
+
boundaryEdge?: 'top' | 'bottom'
|
|
139
|
+
}
|
|
140
|
+
|
|
93
141
|
export interface SwTagProps {
|
|
94
142
|
class?: string
|
|
95
143
|
size?: 'large' | 'small' | ''
|
|
@@ -151,6 +199,10 @@ export type SwButton = DefineComponent<SwButtonProps>
|
|
|
151
199
|
export type SwInput = DefineComponent<SwInputProps>
|
|
152
200
|
export type SwSwitch = DefineComponent<SwSwitchProps>
|
|
153
201
|
export type SwSelect = DefineComponent<SwSelectProps>
|
|
202
|
+
export type SwDadata = DefineComponent<SwDadataProps>
|
|
203
|
+
export type SwDrawer = DefineComponent<SwDrawerProps>
|
|
204
|
+
export type SwBackTop = DefineComponent<SwBackTopProps>
|
|
205
|
+
export type SwAffix = DefineComponent<SwAffixProps>
|
|
154
206
|
export type SwTag = DefineComponent<SwTagProps>
|
|
155
207
|
export type SwBadge = DefineComponent<SwBadgeProps>
|
|
156
208
|
export type SwPagination = DefineComponent<SwPaginationProps>
|
|
@@ -164,6 +216,10 @@ declare module 'vue' {
|
|
|
164
216
|
SwInput: SwInput
|
|
165
217
|
SwSwitch: SwSwitch
|
|
166
218
|
SwSelect: SwSelect
|
|
219
|
+
SwDadata: SwDadata
|
|
220
|
+
SwDrawer: SwDrawer
|
|
221
|
+
SwBackTop: SwBackTop
|
|
222
|
+
SwAffix: SwAffix
|
|
167
223
|
SwTag: SwTag
|
|
168
224
|
SwBadge: SwBadge
|
|
169
225
|
SwPagination: SwPagination
|
|
@@ -174,7 +230,7 @@ declare module 'vue' {
|
|
|
174
230
|
SwDropdown: DefineComponent
|
|
175
231
|
SwDropdownItem: DefineComponent
|
|
176
232
|
SwFormItem: DefineComponent
|
|
177
|
-
|
|
233
|
+
SwGuide: DefineComponent
|
|
178
234
|
SwIcon: DefineComponent
|
|
179
235
|
SwMessage: DefineComponent
|
|
180
236
|
SwSection: DefineComponent
|
package/dist/SwTag-DjZlthUS.js
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { n as e } from "./SwIcon-B-HHyuxu.js";
|
|
2
|
-
import { computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createTextVNode as o, createVNode as s, defineComponent as c, normalizeClass as l, openBlock as u, renderSlot as d, toDisplayString as f } from "vue";
|
|
3
|
-
//#region src/components/SwTag.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
-
var p = { class: "text" }, m = ["disabled"], h = "https://cdn.jsdelivr.net/npm/@tabler/icons@3.19.0/icons/outline", g = /* @__PURE__ */ c({
|
|
5
|
-
__name: "SwTag",
|
|
6
|
-
props: {
|
|
7
|
-
class: { default: "" },
|
|
8
|
-
size: { default: "" },
|
|
9
|
-
type: { default: "" },
|
|
10
|
-
label: { default: "" },
|
|
11
|
-
before: { default: "" },
|
|
12
|
-
closable: {
|
|
13
|
-
type: Boolean,
|
|
14
|
-
default: !1
|
|
15
|
-
},
|
|
16
|
-
round: {
|
|
17
|
-
type: Boolean,
|
|
18
|
-
default: !1
|
|
19
|
-
},
|
|
20
|
-
disabled: {
|
|
21
|
-
type: Boolean,
|
|
22
|
-
default: !1
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
emits: ["close"],
|
|
26
|
-
setup(c, { emit: g }) {
|
|
27
|
-
let _ = `${h}/x.svg`, v = c, y = g, b = t(() => {
|
|
28
|
-
let e = ["sw-tag"];
|
|
29
|
-
return v.size && e.push("sw-" + v.size), v.type && e.push("sw-" + v.type), v.round && e.push("sw-round"), v.disabled && e.push("sw-disabled"), v.class && e.push(v.class), e;
|
|
30
|
-
}), x = (e) => {
|
|
31
|
-
e.stopPropagation(), v.disabled || y("close");
|
|
32
|
-
};
|
|
33
|
-
return (t, c) => (u(), i("span", { class: l(b.value) }, [
|
|
34
|
-
v.before ? (u(), n(e, {
|
|
35
|
-
key: 0,
|
|
36
|
-
"icon-class": v.before
|
|
37
|
-
}, null, 8, ["icon-class"])) : r("", !0),
|
|
38
|
-
a("span", p, [d(t.$slots, "default", {}, () => [o(f(v.label), 1)])]),
|
|
39
|
-
v.closable ? (u(), i("button", {
|
|
40
|
-
key: 1,
|
|
41
|
-
type: "button",
|
|
42
|
-
class: "close",
|
|
43
|
-
"aria-label": "close",
|
|
44
|
-
disabled: v.disabled,
|
|
45
|
-
onClick: x
|
|
46
|
-
}, [s(e, { "icon-class": _ })], 8, m)) : r("", !0)
|
|
47
|
-
], 2));
|
|
48
|
-
}
|
|
49
|
-
});
|
|
50
|
-
//#endregion
|
|
51
|
-
export { g as default };
|