@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.
Files changed (33) hide show
  1. package/README.md +66 -13
  2. package/dist/{SwButton-B-Z8Fhdv.js → SwButton-mr7jdXoz.js} +2 -2
  3. package/dist/{SwButtonGroup-Dmsbam44.js → SwButtonGroup-Ck8aedFL.js} +1 -1
  4. package/dist/{SwDatePicker-CKQk4Ktj.js → SwDatePicker-D_UoCJUA.js} +30 -11
  5. package/dist/{SwDropdown-DMkEn-su.js → SwDropdown-BTADCvrN.js} +1 -1
  6. package/dist/{SwDropdownItem-9Bq9fExK.js → SwDropdownItem-oQKFG36T.js} +1 -1
  7. package/dist/{SwDropdownNew-TXu5V6xZ.js → SwDropdownNew-BuCIN-iv.js} +1 -1
  8. package/dist/{SwFile-DpqT0txc.js → SwFile-BBIqUoFG.js} +4 -4
  9. package/dist/{SwGide-C62de-t6.js → SwGide-BYRlBr9D.js} +5 -5
  10. package/dist/{SwIcon-CyVWEZkk.js → SwIcon-C4RHAbK1.js} +3 -3
  11. package/dist/{SwInput-BED_o0wD.js → SwInput-0Eph7P-m.js} +6 -6
  12. package/dist/{SwMenu-Bh4BtVif.js → SwMenu-Dohv0z9N.js} +2 -2
  13. package/dist/{SwMessage-CA8jo3G7.js → SwMessage-CUTW1YCi.js} +3 -3
  14. package/dist/SwSelect-DwxIlRFI.js +1922 -0
  15. package/dist/{SwSkeleton-BIj8PPM_.js → SwSkeleton-DsjPQpL2.js} +2 -2
  16. package/dist/{SwSlider-4S5KNn6o.js → SwSlider-DkgJH6Bh.js} +2 -2
  17. package/dist/{SwSwitch-BqAIQmG3.js → SwSwitch-Cxk-eNTf.js} +3 -2
  18. package/dist/{SwTable-BjYEVovB.js → SwTable-DE3cDsvN.js} +3 -5
  19. package/dist/{SwTabs-jUzYPw9X.js → SwTabs-A6JIa-Kl.js} +2 -2
  20. package/dist/component-sw.css +1 -1
  21. package/dist/index.cjs +9 -6
  22. package/dist/index.js +130 -49
  23. package/dist/{utils-CaFnRa4t.js → utils-DwvFrrWs.js} +1 -0
  24. package/package.json +13 -10
  25. package/types/index.d.ts +1 -1
  26. package/dist/SwAlert-CKJhS25j.js +0 -89
  27. package/dist/SwSelect-DyArzImF.js +0 -1597
  28. /package/dist/{SwCollapse-Drz3qkNa.js → SwCollapse-DrCfi6Ly.js} +0 -0
  29. /package/dist/{SwFormItem-rn5iuIUv.js → SwFormItem-DgFaNwe9.js} +0 -0
  30. /package/dist/{SwSection-Bl3H3D2G.js → SwSection-DG9jX0Yc.js} +0 -0
  31. /package/dist/{SwSkeletonItem-BKeBIWXT.js → SwSkeletonItem-DOBVXQbh.js} +0 -0
  32. /package/dist/{SwTableColumn-CpNTUOVF.js → SwTableColumn-DQT28erv.js} +0 -0
  33. /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 "./SwAlert-CKJhS25j.js";
2
- import { createApp as t, defineAsyncComponent as n, h as r } from "vue";
3
- //#region src/Alert.ts
4
- var i = null;
5
- function a(n = {}) {
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
- i ||= document.querySelector("div.sw-alert-wrapper"), i || (i = document.createElement("div"), i.className = "sw-alert-wrapper", i.setAttribute("popover", "manual"), document.body.appendChild(i));
8
- let { prefix: a, suffix: o, footer: s, ...c } = n, l = (e) => e == null ? null : typeof e == "function" ? e : typeof e == "string" ? () => [r("span", e)] : Array.isArray(e) ? () => e : () => [e], u = t({ setup() {
9
- return () => r(e, {
10
- ...c,
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
- i && u._container && (i.removeChild(u._container), u.unmount()), n.onClose && n.onClose();
94
+ b && s._container && (b.removeChild(s._container), s.unmount()), e.onClose && e.onClose();
13
95
  }
14
96
  }, {
15
- ...a != null && { prefix: l(a) },
16
- ...o != null && { suffix: l(o) },
17
- ...s != null && { footer: l(s) }
97
+ ...t != null && { prefix: o(t) },
98
+ ...n != null && { suffix: o(n) },
99
+ ...i != null && { footer: o(i) }
18
100
  });
19
- } }), d = u.mount(document.createElement("div"));
20
- i && d.$el && i.appendChild(d.$el);
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 o = /* @__PURE__ */ Object.assign({
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
- "./components/SwButtonGroup.vue": () => import("./SwButtonGroup-Dmsbam44.js"),
28
- "./components/SwCollapse.vue": () => import("./SwCollapse-Drz3qkNa.js"),
29
- "./components/SwDatePicker.vue": () => import("./SwDatePicker-CKQk4Ktj.js"),
30
- "./components/SwDropdown.vue": () => import("./SwDropdown-DMkEn-su.js"),
31
- "./components/SwDropdownItem.vue": () => import("./SwDropdownItem-9Bq9fExK.js"),
32
- "./components/SwDropdownNew.vue": () => import("./SwDropdownNew-TXu5V6xZ.js"),
33
- "./components/SwFile.vue": () => import("./SwFile-DpqT0txc.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")
50
- }), s = {};
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
- s[t] = n(() => o[e]());
134
+ C[t] = l(() => S[e]());
54
135
  }
55
- var c = { install(e) {
56
- Object.keys(s).forEach((t) => {
57
- e.component(t, s[t]);
58
- }), e.config.globalProperties.$Alert = a, e.provide("Alert", a);
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 { a as Alert, c as Library, s as components };
142
+ export { x as Alert, w as Library, C as components };
@@ -22,6 +22,7 @@ function t(e, t) {
22
22
  return n.replace(/{(dd|[YmdGHisDFM])+}/g, (e, t) => a[t]?.toString() || e);
23
23
  }
24
24
  function n(e) {
25
+ if (!e) return "T00:00:01";
25
26
  let t = e.match(/\D.*?\D?/);
26
27
  if (!t) return e + "T00:00:01";
27
28
  let n = e.split(t[0]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@studio-west/component-sw",
3
- "version": "0.13.5",
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.7.9",
42
- "vue": "^3.5.13"
41
+ "axios": "^1.18.1",
42
+ "vue": "^3.5.40"
43
43
  },
44
44
  "devDependencies": {
45
- "@vitejs/plugin-vue": "^6.0.4",
46
- "@vue/tsconfig": "^0.8.1",
47
- "sass": "^1.86.0",
48
- "sass-embedded": "^1.83.0",
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.0.5",
51
- "vue-tsc": "^2.2.12"
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?: string
48
+ inputMode?: 'none' | 'text' | 'decimal' | 'numeric' | 'tel' | 'search' | 'email' | 'url'
49
49
  required?: boolean
50
50
  maxlength?: number
51
51
  minlength?: number
@@ -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 };