@studio-west/component-sw 0.13.4 → 0.13.6

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 +13 -0
  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-CiNttvCh.js} +3 -3
  5. package/dist/{SwDropdown-DMkEn-su.js → SwDropdown-BTADCvrN.js} +1 -1
  6. package/dist/{SwDropdownItem-9Bq9fExK.js → SwDropdownItem-BonrOzTM.js} +1 -1
  7. package/dist/{SwDropdownNew-TXu5V6xZ.js → SwDropdownNew-BuCIN-iv.js} +1 -1
  8. package/dist/{SwFile-DpqT0txc.js → SwFile-ChZYrjgB.js} +4 -4
  9. package/dist/{SwGide-C62de-t6.js → SwGide-CZnit8Mq.js} +5 -5
  10. package/dist/{SwIcon-CyVWEZkk.js → SwIcon-AIxt60c-.js} +3 -3
  11. package/dist/{SwInput-BED_o0wD.js → SwInput-PoGX6Cz9.js} +6 -6
  12. package/dist/{SwMenu-Bh4BtVif.js → SwMenu-Dohv0z9N.js} +2 -2
  13. package/dist/{SwMessage-CA8jo3G7.js → SwMessage-DAsMca7a.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-BF9_YZK6.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/package.json +13 -10
  24. package/types/index.d.ts +1 -1
  25. package/dist/SwAlert-CKJhS25j.js +0 -89
  26. package/dist/SwSelect-DyArzImF.js +0 -1597
  27. /package/dist/{SwCollapse-Drz3qkNa.js → SwCollapse-DrCfi6Ly.js} +0 -0
  28. /package/dist/{SwFormItem-rn5iuIUv.js → SwFormItem-DgFaNwe9.js} +0 -0
  29. /package/dist/{SwSection-Bl3H3D2G.js → SwSection-DG9jX0Yc.js} +0 -0
  30. /package/dist/{SwSkeletonItem-BKeBIWXT.js → SwSkeletonItem-DOBVXQbh.js} +0 -0
  31. /package/dist/{SwTableColumn-CpNTUOVF.js → SwTableColumn-DQT28erv.js} +0 -0
  32. /package/dist/{SwTabsPane-Bhi49paR.js → SwTabsPane-CDBFh3D3.js} +0 -0
  33. /package/dist/{utils-CaFnRa4t.js → utils-Bt_XLZwf.js} +0 -0
package/README.md CHANGED
@@ -77,6 +77,19 @@ Interactive playground of the latest version with live examples, demonstration o
77
77
  npm install @studio-west/component-sw
78
78
  ```
79
79
 
80
+ ### Разработка / Development
81
+
82
+ Нужен **Node 24** через [nvm](https://github.com/nvm-sh/nvm) (см. `.nvmrc`). Системный Node 21 с Vite 8 не совместим.
83
+
84
+ ```bash
85
+ nvm use # или: nvm install
86
+ npm run dev # scripts/with-node.sh сам переключает Node
87
+ npm run build
88
+ ```
89
+
90
+ Не вызывайте `npx vite` напрямую на системном Node — используйте `npm run …`. /
91
+ Requires **Node 24** via [nvm](https://github.com/nvm-sh/nvm) (see `.nvmrc`). System Node 21 is incompatible with Vite 8. Use `npm run …` (via `scripts/with-node.sh`), not bare `npx vite`.
92
+
80
93
  ### Глобальное подключение / global add to main.js
81
94
  ```js
82
95
  import { Library } from '@studio-west/component-sw';
@@ -1,7 +1,7 @@
1
- import { t as e } from "./SwSelect-DyArzImF.js";
1
+ import { t as e } from "./SwSelect-DwxIlRFI.js";
2
2
  import { computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createTextVNode as a, defineComponent as o, normalizeClass as s, openBlock as c, renderSlot as l, resolveComponent as u, toDisplayString as d } from "vue";
3
3
  //#region src/components/SwButton.vue?vue&type=script&setup=true&lang.ts
4
- var f = /* @__PURE__ */ o({
4
+ var f = /*@__PURE__*/ o({
5
5
  __name: "SwButton",
6
6
  props: {
7
7
  class: { default: "" },
@@ -2,7 +2,7 @@ import { computed as e, createElementBlock as t, mergeModels as n, normalizeClas
2
2
  //#region src/components/SwButtonGroup.vue
3
3
  var d = {
4
4
  __name: "SwButtonGroup",
5
- props: /* @__PURE__ */ n({
5
+ props: /*@__PURE__*/ n({
6
6
  class: {
7
7
  type: String,
8
8
  default: ""
@@ -1,4 +1,4 @@
1
- import { a as e, i as t } from "./utils-CaFnRa4t.js";
1
+ import { a as e, i as t } from "./utils-Bt_XLZwf.js";
2
2
  import { Fragment as n, computed as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createTextVNode as s, normalizeClass as c, openBlock as l, ref as u, renderList as d, renderSlot as f, toDisplayString as p, unref as m, withModifiers as h } from "vue";
3
3
  //#region src/components/SwDatePicker.vue
4
4
  var ee = { class: "sw-data-picker" }, g = {
@@ -52,7 +52,7 @@ var ee = { class: "sw-data-picker" }, g = {
52
52
  },
53
53
  emits: ["input"],
54
54
  setup(k, { emit: de }) {
55
- let A = k, j = de, M = u(5), N = u(/* @__PURE__ */ new Date()), P = u(/* @__PURE__ */ new Date()), F = u((/* @__PURE__ */ new Date()).getFullYear()), I = u((/* @__PURE__ */ new Date()).getMonth()), L = u((/* @__PURE__ */ new Date()).getFullYear()), R = u((/* @__PURE__ */ new Date()).getMonth()), z = u(new Date(F.value, I.value + 1, 1).getMonth()), B = u([]), V = u(0), H = u(-1), U = u(-1), W = u(typeof navigator < "u" && navigator.language || "ru"), G = /en|zh|ja|he/.test(W.value) ? 0 : 1, K = r(() => Array.from({ length: 12 }, (e, t) => {
55
+ let A = k, j = de, M = u(5), N = u(/* @__PURE__ */ new Date()), P = u(/* @__PURE__ */ new Date()), F = u((/* @__PURE__ */ new Date()).getFullYear()), I = u((/* @__PURE__ */ new Date()).getMonth()), L = u((/* @__PURE__ */ new Date()).getFullYear()), R = u((/* @__PURE__ */ new Date()).getMonth()), z = u(new Date(F.value, I.value + 1, 1).getMonth()), B = u([]), V = u(0), H = u(-1), U = u(-1), W = u(typeof navigator < "u" && navigator.language || "ru"), G = +!/en|zh|ja|he/.test(W.value), K = r(() => Array.from({ length: 12 }, (e, t) => {
56
56
  let n = new Date(2024, t);
57
57
  return new Intl.DateTimeFormat(W.value, { month: "long" }).format(n);
58
58
  })), q = u(Math.floor(F.value / 10) * 10), J = r(() => Array.from({ length: 12 }, (e, t) => q.value + t - 1));
@@ -202,7 +202,7 @@ var ee = { class: "sw-data-picker" }, g = {
202
202
  }, p(e), 11, S))), 128))])) : A.range === "decades" || M.value === 3 ? (l(), a("div", C, [(l(!0), a(n, null, d(J.value, (e, t) => (l(), a("button", {
203
203
  key: t,
204
204
  onClick: h((t) => {
205
- M.value = A.range === "year" ? 1 : 0, $(e, I.value);
205
+ M.value = +(A.range === "year"), $(e, I.value);
206
206
  }, ["prevent"]),
207
207
  class: c(q.value + t - 1 === F.value ? "active" : "")
208
208
  }, p(e), 11, w))), 128))])) : (l(), a("div", te, [(l(!0), a(n, null, d(B.value, (e, t) => (l(), a(n, { key: t }, [t < V.value + (7 - new Date(F.value, I.value + 1, 1).getDay() + m(G)) % 7 ? (l(), a("button", {
@@ -2,7 +2,7 @@ import { Teleport as e, computed as t, createBlock as n, createCommentVNode as r
2
2
  //#region src/components/SwDropdown.vue
3
3
  var _ = ["id"], v = {
4
4
  __name: "SwDropdown",
5
- props: /* @__PURE__ */ a({
5
+ props: /*@__PURE__*/ a({
6
6
  class: {
7
7
  type: String,
8
8
  default: ""
@@ -1,4 +1,4 @@
1
- import { n as e } from "./SwIcon-CyVWEZkk.js";
1
+ import { n as e } from "./SwIcon-AIxt60c-.js";
2
2
  import { computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, normalizeClass as a, openBlock as o, renderSlot as s } from "vue";
3
3
  //#region src/components/SwDropdownItem.vue
4
4
  var c = {
@@ -2,7 +2,7 @@ import { Teleport as e, computed as t, createBlock as n, createCommentVNode as r
2
2
  //#region src/components/SwDropdownNew.vue
3
3
  var _ = ["id"], v = {
4
4
  __name: "SwDropdownNew",
5
- props: /* @__PURE__ */ a({
5
+ props: /*@__PURE__*/ a({
6
6
  class: {
7
7
  type: String,
8
8
  default: ""
@@ -1,5 +1,5 @@
1
- import { n as e } from "./SwIcon-CyVWEZkk.js";
2
- import { t } from "./SwButton-B-Z8Fhdv.js";
1
+ import { n as e } from "./SwIcon-AIxt60c-.js";
2
+ import { t } from "./SwButton-mr7jdXoz.js";
3
3
  import { Fragment as n, computed as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createVNode as s, defineComponent as c, mergeModels as l, nextTick as u, normalizeClass as d, normalizeStyle as f, onUnmounted as p, openBlock as m, ref as h, renderList as g, renderSlot as _, toDisplayString as v, unref as y, useModel as ee, watch as te, withCtx as b, withModifiers as ne } from "vue";
4
4
  //#region src/utils/mediaCrop.ts
5
5
  function re(e, t, n, r) {
@@ -134,7 +134,7 @@ var ce = [
134
134
  class: "sw-file-item-media"
135
135
  }, _e = ["src", "alt"], ve = ["src"], ye = { class: "sw-file-item-info" }, be = { class: "sw-file-item-name" }, xe = { class: "sw-file-item-meta" }, Se = ["src"], Ce = ["src"], we = { class: "sw-file-editor-overlay" }, Te = ["onPointerdown"], O = "https://cdn.jsdelivr.net/npm/@tabler/icons@3.19.0/icons/outline", k = /* @__PURE__ */ c({
136
136
  __name: "SwFile",
137
- props: /* @__PURE__ */ l({
137
+ props: /*@__PURE__*/ l({
138
138
  mode: { default: "photo" },
139
139
  disabled: {
140
140
  type: Boolean,
@@ -153,7 +153,7 @@ var ce = [
153
153
  modelValue: { default: () => [] },
154
154
  modelModifiers: {}
155
155
  }),
156
- emits: /* @__PURE__ */ l([
156
+ emits: /*@__PURE__*/ l([
157
157
  "change",
158
158
  "remove",
159
159
  "preview"
@@ -1,11 +1,11 @@
1
- import { n as e } from "./SwIcon-CyVWEZkk.js";
2
- import { t } from "./SwButton-B-Z8Fhdv.js";
3
- import n from "./SwDropdown-DMkEn-su.js";
1
+ import { n as e } from "./SwIcon-AIxt60c-.js";
2
+ import { t } from "./SwButton-mr7jdXoz.js";
3
+ import n from "./SwDropdown-BTADCvrN.js";
4
4
  import { createElementBlock as r, createElementVNode as i, createTextVNode as a, createVNode as o, mergeModels as s, normalizeClass as c, onMounted as l, openBlock as u, ref as d, renderSlot as f, toDisplayString as p, useModel as m, watchEffect as h, withCtx as g } from "vue";
5
5
  //#region src/components/SwGide.vue
6
6
  var _ = ["src"], v = {
7
7
  __name: "SwGide",
8
- props: /* @__PURE__ */ s({
8
+ props: /*@__PURE__*/ s({
9
9
  steps: {
10
10
  type: Array,
11
11
  default: () => []
@@ -25,7 +25,7 @@ var _ = ["src"], v = {
25
25
  },
26
26
  modelModifiers: {}
27
27
  }),
28
- emits: /* @__PURE__ */ s(["close"], ["update:modelValue"]),
28
+ emits: /*@__PURE__*/ s(["close"], ["update:modelValue"]),
29
29
  setup(s, { emit: v }) {
30
30
  let y = d(null), b = d(!0), x = d(null), S = m(s, "modelValue"), C = v, w = s, T = () => C("close"), E = (e) => {
31
31
  let t = S.value + e;
@@ -1,8 +1,8 @@
1
- import { r as e } from "./utils-CaFnRa4t.js";
2
- import { t } from "./SwSelect-DyArzImF.js";
1
+ import { r as e } from "./utils-Bt_XLZwf.js";
2
+ import { t } from "./SwSelect-DwxIlRFI.js";
3
3
  import { computed as n, createElementBlock as r, createElementVNode as i, mergeProps as a, openBlock as o, unref as s } from "vue";
4
4
  //#region src/components/SwIcon.vue
5
- var c = /* @__PURE__ */ t({ default: () => u }), l = ["href"], u = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
5
+ var c = /* @__PURE__ */ t({ default: () => u }), l = ["href"], u = /*@__PURE__*/ Object.assign({ inheritAttrs: !1 }, {
6
6
  __name: "SwIcon",
7
7
  props: {
8
8
  prefix: {
@@ -1,5 +1,5 @@
1
- import { n as e } from "./utils-CaFnRa4t.js";
2
- import { n as t } from "./SwIcon-CyVWEZkk.js";
1
+ import { n as e } from "./utils-Bt_XLZwf.js";
2
+ import { n as t } from "./SwIcon-AIxt60c-.js";
3
3
  import { computed as n, createBlock as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createTextVNode as s, defineComponent as c, mergeModels as l, mergeProps as u, normalizeClass as d, openBlock as f, ref as p, renderSlot as m, toDisplayString as h, useModel as g, vModelDynamic as _, watch as v, withDirectives as y } from "vue";
4
4
  //#region src/components/SwInput.vue?vue&type=script&setup=true&lang.ts
5
5
  var b = ["for"], x = {
@@ -18,7 +18,7 @@ var b = ["for"], x = {
18
18
  "autofocus"
19
19
  ], C = /* @__PURE__ */ c({
20
20
  __name: "SwInput",
21
- props: /* @__PURE__ */ l({
21
+ props: /*@__PURE__*/ l({
22
22
  before: { default: "" },
23
23
  after: { default: "" },
24
24
  placeholder: { default: "" },
@@ -43,7 +43,7 @@ var b = ["for"], x = {
43
43
  modelValue: {},
44
44
  modelModifiers: {}
45
45
  }),
46
- emits: /* @__PURE__ */ l([
46
+ emits: /*@__PURE__*/ l([
47
47
  "suffix",
48
48
  "prefix",
49
49
  "focusInput"
@@ -72,7 +72,7 @@ var b = ["for"], x = {
72
72
  key: 0,
73
73
  "icon-class": w.before,
74
74
  onClick: M
75
- }, null, 8, ["icon-class"])) : m(e.$slots, "prefix", { key: 1 }),
75
+ }, null, 8, ["icon-class"])) : m(e.$slots, "prefix", {}, void 0, void 0, 1),
76
76
  w.label.length > 0 ? (f(), a("label", {
77
77
  key: 2,
78
78
  for: w.name
@@ -96,7 +96,7 @@ var b = ["for"], x = {
96
96
  key: 3,
97
97
  "icon-class": w.after,
98
98
  onClick: j
99
- }, null, 8, ["icon-class"])) : m(e.$slots, "suffix", { key: 4 })
99
+ }, null, 8, ["icon-class"])) : m(e.$slots, "suffix", {}, void 0, void 0, 4)
100
100
  ], 2));
101
101
  }
102
102
  });
@@ -3,14 +3,14 @@ import { Fragment as e, computed as t, createBlock as n, createElementBlock as r
3
3
  //#region src/components/SwMenu.vue
4
4
  var m = /* @__PURE__ */ i({
5
5
  __name: "SwMenu",
6
- props: /* @__PURE__ */ s({
6
+ props: /*@__PURE__*/ s({
7
7
  menuItems: {},
8
8
  class: { default: "" }
9
9
  }, {
10
10
  modelValue: {},
11
11
  modelModifiers: {}
12
12
  }),
13
- emits: /* @__PURE__ */ s(["click", "change"], ["update:modelValue"]),
13
+ emits: /*@__PURE__*/ s(["click", "change"], ["update:modelValue"]),
14
14
  setup(i, { emit: s }) {
15
15
  let m = i, h = p(i, "modelValue"), g = s, _ = a(), v = (e, t, n = null) => {
16
16
  let r, i = null;
@@ -1,10 +1,10 @@
1
- import { n as e } from "./SwIcon-CyVWEZkk.js";
2
- import { t } from "./SwButton-B-Z8Fhdv.js";
1
+ import { n as e } from "./SwIcon-AIxt60c-.js";
2
+ import { t } from "./SwButton-mr7jdXoz.js";
3
3
  import { createCommentVNode as n, createElementBlock as r, createElementVNode as i, createTextVNode as a, createVNode as o, mergeModels as s, nextTick as c, normalizeClass as l, onUnmounted as u, openBlock as d, ref as f, renderSlot as p, toDisplayString as m, unref as h, useModel as g, useSlots as _, watch as v, withCtx as y } from "vue";
4
4
  //#region src/components/SwMessage.vue
5
5
  var b = { key: 0 }, x = {
6
6
  __name: "SwMessage",
7
- props: /* @__PURE__ */ s({
7
+ props: /*@__PURE__*/ s({
8
8
  name: {
9
9
  type: String,
10
10
  default: ""