@studio-west/component-sw 0.13.16 → 0.13.17

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 CHANGED
@@ -27,6 +27,8 @@ Interactive playground of the latest version with live examples, demonstration o
27
27
 
28
28
  - [SwAlert](#swalert)
29
29
 
30
+ - [SwBadge](#swbadge)
31
+
30
32
  - [SwButton](#swbutton)
31
33
 
32
34
  - [SwButtonGroup](#swbuttongroup)
@@ -53,6 +55,8 @@ Interactive playground of the latest version with live examples, demonstration o
53
55
 
54
56
  - [SwMessage](#swmessage)
55
57
 
58
+ - [SwPagination](#swpagination)
59
+
56
60
  - [SwSelect](#swselect)
57
61
 
58
62
  - [SwSection](#swsection)
@@ -71,6 +75,8 @@ Interactive playground of the latest version with live examples, demonstration o
71
75
 
72
76
  - [SwTabsPane](#swtabspane)
73
77
 
78
+ - [SwTag](#swtag)
79
+
74
80
  - [Изменения / Changelog](#изменения--changelog)
75
81
  ---
76
82
 
@@ -419,9 +425,11 @@ const datePickerLimitation = ref([
419
425
 
420
426
  ## SwDropdown
421
427
 
422
- Компонент `SwDropdown` — всплывающее меню с настройкой места открытия и типа триггера. У попапа есть **уголок**, который указывает на триггер; сторона и смещение считаются по фактической позиции (с учётом flip у края экрана). `z-index` попапа = z-index ближайшего предка + 3 (`Teleport` в `body`).
428
+ Компонент `SwDropdown` — всплывающее меню с настройкой места открытия и типа триггера. У попапа есть **уголок**, который указывает на триггер; сторона и смещение считаются по фактической позиции (с учётом flip у края экрана). `z-index` попапа = z-index ближайшего предка + 3 (`Teleport` в `body`). Клавиатура: **Escape** закрывает, **↑/↓** по пунктам, **Enter** / **Space** выбирает.
423
429
 
424
- The `SwDropdown` popup shows a caret pointing at the trigger; side/offset follow the real placement after edge flip. Popup `z-index` is ancestor z-index + 3.
430
+ **Tooltip:** отдельный `SwTooltip` не нужен. Тот же компонент с `trigger="hover"` и текстом/разметкой в `#dropdown` работает как подсказка (без `SwDropdownItem`, если это не меню).
431
+
432
+ The `SwDropdown` popup shows a caret pointing at the trigger; side/offset follow the real placement after edge flip. Keyboard: Escape, Arrow keys, Enter/Space. Use `trigger="hover"` as a tooltip — no separate Tooltip component.
425
433
 
426
434
  ### Свойства / Properties
427
435
 
@@ -430,7 +438,7 @@ The `SwDropdown` popup shows a caret pointing at the trigger; side/offset follow
430
438
  | `class` | `String` | `` | CSS-класс попапа (например `gide` для онбординга). |
431
439
  | `size` | `String` | `` | Размер: `'large'`, `'small'`. |
432
440
  | `type` | `String` | `` | `'primary'`, `'success'`, `'info'`, `'warning'`, `'danger'`. |
433
- | `trigger` | `String` | `click` | Способ открытия: `'click'`, `'hover'`, `'context'`, `'none'` — только через `model`. |
441
+ | `trigger` | `String` | `click` | Способ открытия: `'click'`, `'hover'` (в т.ч. как tooltip), `'context'`, `'none'` — только через `model`. |
434
442
  | `placement` | `String` | `bottom-left` | `'bottom-left'`, `'bottom'`, `'bottom-right'`, `'top-left'`, `'top'`, `'top-right'`, `'left'`, `'right'`. |
435
443
  | `maxWidth` | `Number` | `0` | Максимальная ширина меню в px. `0` — без ограничений. |
436
444
 
@@ -438,7 +446,7 @@ The `SwDropdown` popup shows a caret pointing at the trigger; side/offset follow
438
446
 
439
447
  Default - текст описания или модуль / модули
440
448
 
441
- #dropdown - контент всплывающего окна
449
+ #dropdown - контент всплывающего окна (пункты меню **или** произвольный текст для tooltip)
442
450
 
443
451
  ### Модель / Model
444
452
 
@@ -446,6 +454,8 @@ model - состояние меню, булевое значение откры
446
454
 
447
455
  ### Пример использования / Example Usage
448
456
 
457
+ Меню:
458
+
449
459
  ```html
450
460
  <sw-dropdown class="custom-class" placement="bottom" :max-width="250">
451
461
  <sw-button label="Меню" type="primary" />
@@ -454,6 +464,17 @@ model - состояние меню, булевое значение откры
454
464
  </template>
455
465
  </sw-dropdown>
456
466
  ```
467
+
468
+ Подсказка (tooltip):
469
+
470
+ ```html
471
+ <sw-dropdown trigger="hover" placement="top" :max-width="220">
472
+ <sw-button label="?" type="info" />
473
+ <template #dropdown>
474
+ Краткая подсказка к элементу
475
+ </template>
476
+ </sw-dropdown>
477
+ ```
457
478
  ---
458
479
 
459
480
  ## SwDropdownItem
@@ -738,16 +759,18 @@ const steps = ref([
738
759
  | `name` | `String` | `required` | Обязателен! нужен для связывания через id input и label. |
739
760
  | `class` | `String` | `sw-input` | Добавляет пользовательский CSS-класс к компоненту. |
740
761
  | `size` | `String` | `` | Размер поля: `'large'`, `'small'`. |
741
- | `type` | `String` | `text` | Тип поля: `'text'`, `'phone'` (маска `+_ (___) ___-__-__` встроена в компонент), `'password'` |
742
- | `inputMode` | `String` | `text` | Мобильная клавиатура: `'text'`- стандартная, `'search'`- поиск, `'numeric'`- цифры, `'decimal'` - числа, `'tel'` - телефон, `'url'` - адреса, `'email'` - почта |
762
+ | `type` | `String` | `text` | `'text'`, `'phone'` (маска), `'password'` (кнопка показать/скрыть), `'textarea'`, и др. HTML-типы |
763
+ | `inputMode` | `String` | `text` | Мобильная клавиатура: `'text'`, `'search'`, `'numeric'`, `'decimal'`, `'tel'`, `'url'`, `'email'` |
743
764
  | `before` | `String` | `` | Иконка в начале: имя из спрайта или URL. См. [SwIcon](#swicon). |
744
765
  | `after` | `String` | `` | Иконка в конце: имя из спрайта или URL. См. [SwIcon](#swicon). |
745
766
  | `placeholder` | `String` | `` | Текст Placeholder. |
746
767
  | `required` | `Boolean` | `false` | Признак обязательно ли для заполнения. |
747
768
  | `label` | `String` | `` | Текст в Label. |
748
- | `maxlength` | `Number` | `128` | Параметр атрибута max-length. Минимальное количество символов разрешённых в тексте. |
749
- | `minlength` | `Number` | `1` | Параметр атрибута min-length. Минимальное количество символов разрешённых в тексте. |
750
- | `inputSize` | `Number` | `60` | Параметр атрибута size - ширина текстового поля. |
769
+ | `maxlength` | `Number` | `128` | Параметр атрибута max-length. |
770
+ | `minlength` | `Number` | `1` | Параметр атрибута min-length. |
771
+ | `inputSize` | `Number` | `60` | Параметр атрибута size — ширина текстового поля. |
772
+ | `clearable` | `Boolean` | `false` | Кнопка очистки значения. |
773
+ | `rows` | `Number` | `3` | Строки для `type="textarea"`. |
751
774
 
752
775
  ### Слоты / Slots
753
776
 
@@ -767,6 +790,8 @@ suffix - клик иконке after
767
790
 
768
791
  focusInput - focus на поле ввода
769
792
 
793
+ clear - очистка через `clearable`
794
+
770
795
  ### Пример использования / Example Usage
771
796
 
772
797
  ```html
@@ -1191,16 +1216,16 @@ header - клик по всему Header
1191
1216
 
1192
1217
  ## SwSelect
1193
1218
 
1194
- Компонент `SwSelect` - реализация подсказок для https://dadata.ru/api/suggest/address/.
1219
+ Компонент `SwSelect` — подсказки адреса [DaData](https://dadata.ru/api/suggest/address/). Стили на `--sw-*` (без Element). Клавиатура: ↑↓, Enter, Escape; поле с `clearable`.
1195
1220
 
1196
1221
  ### Свойства / Properties
1197
1222
 
1198
1223
  | Имя | Тип | По умолчанию | Значения/Описание |
1199
1224
  |----------------|-----------|--------------|-----------------------------------------------|
1200
- | `class` | `String` | `` | Добавляет пользовательский CSS-класс к popup. |
1225
+ | `class` | `String` | `` | CSS-класс корневого блока. |
1201
1226
  | `size` | `String` | `large` | Размер поля: `'large'`, `'small'`. |
1202
- | `placeholder` | `String` | `` | Добавляет в placeholder описание. |
1203
- | `token` | `String` | `` | API-ключ для DADATA. |
1227
+ | `placeholder` | `String` | `` | Placeholder. |
1228
+ | `token` | `String` | `` | API-ключ DaData (без токена запросы не идут). |
1204
1229
 
1205
1230
  ### Модель / Model
1206
1231
 
@@ -1739,8 +1764,108 @@ Default - для вкладок
1739
1764
  ```
1740
1765
  ---
1741
1766
 
1767
+ ## SwTag
1768
+
1769
+ Метка / чип. Опционально `closable` (событие `close`), иконка `before`, типы и размеры как у кнопок.
1770
+
1771
+ ### Свойства / Properties
1772
+
1773
+ | Имя | Тип | По умолчанию | Описание |
1774
+ |-------------|-----------|--------------|-----------------------------------------------|
1775
+ | `label` | `String` | `` | Текст (или default slot). |
1776
+ | `type` | `String` | `` | `primary` / `success` / `info` / `warning` / `danger` |
1777
+ | `size` | `String` | `` | `small` / `large` |
1778
+ | `before` | `String` | `` | Иконка слева (URL / спрайт). |
1779
+ | `closable` | `Boolean` | `false` | Кнопка закрытия → `close`. |
1780
+ | `round` | `Boolean` | `false` | Скругление. |
1781
+ | `disabled` | `Boolean` | `false` | Неактивна. |
1782
+ | `class` | `String` | `` | CSS-класс. |
1783
+
1784
+ ### Пример
1785
+
1786
+ ```html
1787
+ <sw-tag type="primary" label="Новое" />
1788
+ <sw-tag type="danger" closable label="Удалить" @close="onClose" />
1789
+ ```
1790
+ ---
1791
+
1792
+ ## SwBadge
1793
+
1794
+ Индикатор поверх слота: число, текст или точка (`isDot`).
1795
+
1796
+ ### Свойства / Properties
1797
+
1798
+ | Имя | Тип | По умолчанию | Описание |
1799
+ |-------------|-------------------|--------------|-----------------------------------|
1800
+ | `value` | `Number`/`String` | `` | Значение на бейдже. |
1801
+ | `max` | `Number` | `99` | При числе > max → `{max}+`. |
1802
+ | `type` | `String` | `danger` | Цвет метки. |
1803
+ | `isDot` | `Boolean` | `false` | Точка вместо текста. |
1804
+ | `showZero` | `Boolean` | `false` | Показывать `0`. |
1805
+ | `hidden` | `Boolean` | `false` | Скрыть метку. |
1806
+ | `class` | `String` | `` | CSS-класс обёртки. |
1807
+
1808
+ ### Пример
1809
+
1810
+ ```html
1811
+ <sw-badge :value="3">
1812
+ <sw-button label="Сообщения" />
1813
+ </sw-badge>
1814
+ <sw-badge is-dot type="warning">
1815
+ <sw-button label="Статус" />
1816
+ </sw-badge>
1817
+ ```
1818
+ ---
1819
+
1820
+ ## SwPagination
1821
+
1822
+ Постраничная навигация. `v-model` — текущая страница (с 1).
1823
+
1824
+ ### Свойства / Properties
1825
+
1826
+ | Имя | Тип | По умолчанию | Описание |
1827
+ |---------------|-----------|--------------|----------------------------------|
1828
+ | `total` | `Number` | `0` | Всего элементов. |
1829
+ | `pageSize` | `Number` | `10` | Элементов на странице (`v-model:page-size`). |
1830
+ | `pageSizes` | `Number[]` | `[10, 20, 50, 100]` | Варианты в селекте размера. |
1831
+ | `showSize` | `Boolean` | `true` | Показать выбор «N / стр.». |
1832
+ | `pagerCount` | `Number` | `7` | Число кнопок страниц (нечётное). |
1833
+ | `size` | `String` | `` | `small` / `large`. |
1834
+ | `showTotal` | `Boolean` | `false` | Текст «Всего N». |
1835
+ | `disabled` | `Boolean` | `false` | Блок неактивен. |
1836
+ | `class` | `String` | `` | CSS-класс. |
1837
+
1838
+ ### Модель / Events
1839
+
1840
+ - `v-model` / `modelValue` — номер страницы
1841
+ - `v-model:page-size` — размер страницы
1842
+ - `change` — новая страница
1843
+ - `size-change` — новый размер страницы
1844
+
1845
+ ### Пример
1846
+
1847
+ ```html
1848
+ <sw-pagination
1849
+ v-model="page"
1850
+ v-model:page-size="pageSize"
1851
+ :total="240"
1852
+ :page-sizes="[10, 20, 50]"
1853
+ show-total
1854
+ />
1855
+ ```
1856
+ ---
1857
+
1742
1858
  ## Изменения / Changelog
1743
1859
 
1860
+ ### 0.13.17
1861
+
1862
+ - **SwTag** — метки с `closable`, `type`, `size`, `before`
1863
+ - **SwBadge** — индикатор поверх слота (`value` / `isDot` / `max`)
1864
+ - **SwPagination** — страницы + выбор `page-size`
1865
+ - **SwInput** — `textarea`, `password` (показать/скрыть), `clearable`
1866
+ - **SwDropdown** — Escape / ↑↓ / Enter; hover как tooltip (см. README)
1867
+ - **SwSelect** — стили `--sw-*`, клавиатура по подсказкам
1868
+
1744
1869
  ### 0.13.11
1745
1870
 
1746
1871
  **Alert**
@@ -0,0 +1,43 @@
1
+ import { computed as e, createCommentVNode as t, createElementBlock as n, defineComponent as r, normalizeClass as i, openBlock as a, renderSlot as o, toDisplayString as s } from "vue";
2
+ //#endregion
3
+ //#region src/components/SwBadge.vue
4
+ var c = /* @__PURE__ */ r({
5
+ __name: "SwBadge",
6
+ props: {
7
+ class: { default: "" },
8
+ type: { default: "danger" },
9
+ value: { default: "" },
10
+ max: { default: 99 },
11
+ isDot: {
12
+ type: Boolean,
13
+ default: !1
14
+ },
15
+ showZero: {
16
+ type: Boolean,
17
+ default: !1
18
+ },
19
+ hidden: {
20
+ type: Boolean,
21
+ default: !1
22
+ }
23
+ },
24
+ setup(r) {
25
+ let c = r, l = e(() => {
26
+ if (c.isDot) return "";
27
+ let e = c.value;
28
+ return typeof e == "number" ? e > c.max ? `${c.max}+` : String(e) : e == null ? "" : String(e);
29
+ }), u = e(() => c.hidden ? !1 : c.isDot ? !0 : typeof c.value == "number" ? c.value !== 0 || c.showZero : l.value.length > 0), d = e(() => {
30
+ let e = ["mark"];
31
+ return c.isDot && e.push("dot"), c.type && e.push("sw-" + c.type), e;
32
+ }), f = e(() => {
33
+ let e = ["sw-badge"];
34
+ return c.class && e.push(c.class), e;
35
+ });
36
+ return (e, r) => (a(), n("span", { class: i(f.value) }, [o(e.$slots, "default"), u.value ? (a(), n("span", {
37
+ key: 0,
38
+ class: i(d.value)
39
+ }, s(l.value), 3)) : t("", !0)], 2));
40
+ }
41
+ });
42
+ //#endregion
43
+ export { c as default };
@@ -1,4 +1,4 @@
1
- import { t as e } from "./SwSelect-Bo9kUY7P.js";
1
+ import { t as e } from "./SwSelect-DDNh3p6B.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
4
  var f = /*@__PURE__*/ o({
@@ -0,0 +1,177 @@
1
+ import { Teleport as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, mergeModels as a, nextTick as o, normalizeClass as s, normalizeStyle as c, onMounted as l, onUnmounted as u, openBlock as d, ref as f, renderSlot as p, unref as m, useModel as h, watch as g, watchEffect as _, withModifiers as v } from "vue";
2
+ //#region src/components/SwDropdown.vue
3
+ var y = ["id"], b = {
4
+ __name: "SwDropdown",
5
+ props: /*@__PURE__*/ a({
6
+ class: {
7
+ type: String,
8
+ default: ""
9
+ },
10
+ size: {
11
+ type: String,
12
+ default: ""
13
+ },
14
+ type: {
15
+ type: String,
16
+ default: ""
17
+ },
18
+ trigger: {
19
+ type: String,
20
+ default: "click"
21
+ },
22
+ placement: {
23
+ type: String,
24
+ default: "bottom-left"
25
+ },
26
+ maxWidth: {
27
+ type: Number,
28
+ default: 0
29
+ }
30
+ }, {
31
+ modelValue: {},
32
+ modelModifiers: {}
33
+ }),
34
+ emits: ["update:modelValue"],
35
+ setup(a, { expose: b }) {
36
+ let x = a, S = h(a, "modelValue"), C = f(null), w = f(null), T = f({}), E = f(""), D = Math.ceil(Math.random() * 1e3), O = f(0), k = f(-1), A = t(() => {
37
+ let e = ["sw-dropdown"];
38
+ return x.size.length > 0 && e.push("sw-" + x.size), x.type.length > 0 && e.push("sw-" + x.type), e;
39
+ }), j = () => w.value ? [...w.value.querySelectorAll(".sw-dropdown-item")] : [], M = (e) => {
40
+ let t = j();
41
+ if (!t.length) return;
42
+ let n = (e % t.length + t.length) % t.length;
43
+ k.value = n, t.forEach((e, t) => {
44
+ e.classList.toggle("is-active", t === n), t === n && e.scrollIntoView({ block: "nearest" });
45
+ });
46
+ }, N = () => {
47
+ o(() => {
48
+ w.value && (w.value.focus({ preventScroll: !0 }), k.value = -1, j().forEach((e) => e.classList.remove("is-active")));
49
+ });
50
+ }, P = (e) => {
51
+ if (!S.value) return;
52
+ let t = j();
53
+ switch (e.key) {
54
+ case "Escape":
55
+ e.preventDefault(), e.stopPropagation(), S.value = !1, C.value?.querySelector("button, [tabindex], a, input")?.focus?.() || C.value?.focus?.();
56
+ break;
57
+ case "ArrowDown":
58
+ e.preventDefault(), M(k.value + 1);
59
+ break;
60
+ case "ArrowUp":
61
+ e.preventDefault(), M(k.value <= 0 ? t.length - 1 : k.value - 1);
62
+ break;
63
+ case "Home":
64
+ e.preventDefault(), M(0);
65
+ break;
66
+ case "End":
67
+ e.preventDefault(), M(t.length - 1);
68
+ break;
69
+ case "Enter":
70
+ case " ":
71
+ k.value >= 0 && t[k.value] && (e.preventDefault(), t[k.value].click());
72
+ break;
73
+ case "Tab":
74
+ S.value = !1;
75
+ break;
76
+ }
77
+ };
78
+ g(S, (e) => {
79
+ typeof document > "u" || (e ? N() : k.value = -1);
80
+ });
81
+ let F = new ResizeObserver(() => {
82
+ S.value && O.value++, O.value > 99 && (O.value = 1);
83
+ });
84
+ _(() => {
85
+ if (!S.value || !w.value || !C.value) return;
86
+ O.value < 2 && F.observe(w.value);
87
+ let e = window.pageYOffset || document.documentElement.scrollTop, t = window.pageXOffset || document.documentElement.scrollLeft;
88
+ document.body.style.position = "fixed", document.body.style.top = `-${e}px`, document.body.style.left = `-${t}px`, document.body.style.position = "", document.body.style.top = "", document.body.style.left = "", document.documentElement.scrollTop = e, document.documentElement.scrollLeft = t;
89
+ let n = C.value.getBoundingClientRect(), r = window.innerWidth, i = window.innerHeight, a = w.value.offsetHeight, o = w.value.offsetWidth, s = n.left + n.width / 2 + t, c = n.top + n.height / 2 + e, l = n.height / 2 + 8, [u, d] = x.placement.split("-", 2);
90
+ switch (u) {
91
+ case "bottom":
92
+ c = e + i - a - l - 8 < c ? c - l - a : c + l, d === void 0 && (s -= o / 2);
93
+ break;
94
+ case "top":
95
+ c = e + a + l + 8 > c ? c + l : c - l - a, d === void 0 && (s -= o / 2);
96
+ break;
97
+ case "left":
98
+ s - o - n.width / 2 - 8 < 0 ? s + n.width / 2 + 8 + o < r ? (s = s + n.width / 2 + 8, c -= a / 2) : (c = e + a + l + 8 > c ? c + l : c - l - a, s = s + n.width / 2 < r ? s + n.width / 2 - o : s - o / 2) : (s = s - o - n.width / 2 - 8, c -= a / 2);
99
+ break;
100
+ case "right":
101
+ s + n.width / 2 + 8 + o > r ? s - o - n.width / 2 - 8 > 0 ? (s = s - o - n.width / 2 - 8, c -= a / 2) : (c = e + a + l + 8 > c ? c + l : c - l - a, s -= n.width / 2) : (s = s + n.width / 2 + 8, c -= a / 2);
102
+ break;
103
+ }
104
+ switch (d) {
105
+ case "left":
106
+ s = t + r - 8 > s - n.width / 2 + o ? s - n.width / 2 : s - o + n.width / 2;
107
+ break;
108
+ case "right":
109
+ s = 8 < s + n.width / 2 - o ? s - o + n.width / 2 : s - n.width / 2;
110
+ break;
111
+ }
112
+ s < 0 && (s = 0), c < 0 && (c = 0);
113
+ let f = n.left + n.width / 2 + t, p = n.top + n.height / 2 + e, m = s + o / 2 - f, h = c + a / 2 - p, g;
114
+ g = Math.abs(h) >= Math.abs(m) ? h > 0 ? "top" : "bottom" : m > 0 ? "left" : "right";
115
+ let _ = g === "top" || g === "bottom" ? Math.max(12, Math.min(o - 12, f - s)) : Math.max(12, Math.min(a - 12, p - c));
116
+ E.value = `arrow-${g}`;
117
+ let v = 0;
118
+ for (let e = C.value; e && e !== document.documentElement; e = e.parentElement) {
119
+ let t = getComputedStyle(e).zIndex;
120
+ if (t === "auto") continue;
121
+ let n = Number.parseInt(t, 10);
122
+ if (!Number.isNaN(n)) {
123
+ v = n;
124
+ break;
125
+ }
126
+ }
127
+ T.value = {
128
+ position: "absolute",
129
+ top: `${c}px`,
130
+ left: `${s}px`,
131
+ maxWidth: x.maxWidth > 0 ? `${x.maxWidth}px` : "",
132
+ "--sw-dropdown-arrow": `${_}px`,
133
+ "--sw-z-index": String(v)
134
+ };
135
+ }, { flush: "post" });
136
+ let I = () => {
137
+ x.trigger === "click" && (S.value = !S.value);
138
+ }, L = () => {
139
+ x.trigger === "hover" && (S.value = !S.value);
140
+ }, R = () => {
141
+ x.trigger === "context" && (S.value = !S.value);
142
+ }, z = () => {
143
+ S.value && O.value++, O.value > 99 && (O.value = 1);
144
+ };
145
+ b({ handleResize: z });
146
+ let B = (e) => {
147
+ x.trigger !== "none" && !e.target.closest(`[id="${D}"]`) && C.value && !C.value.contains(e.target) && (S.value = !1);
148
+ }, V = (e) => {
149
+ e.key === "Escape" && S.value && (S.value = !1);
150
+ };
151
+ return l(() => {
152
+ typeof window > "u" || (window.addEventListener("resize", z), document.documentElement.ontouchstart === void 0 ? document.documentElement.addEventListener("click", B, !0) : document.documentElement.addEventListener("touchstart", B, !0), window.onscrollend === void 0 ? window.addEventListener("scroll", z) : window.addEventListener("scrollend", z), document.addEventListener("keydown", V));
153
+ }), u(() => {
154
+ F.disconnect(), !(typeof window > "u") && (window.removeEventListener("resize", z), document.documentElement.ontouchstart === void 0 ? document.documentElement.removeEventListener("click", B) : document.documentElement.removeEventListener("touchstart", B), window.onscrollend === void 0 ? window.removeEventListener("scroll", z) : window.removeEventListener("scrollend", z), document.removeEventListener("keydown", V));
155
+ }), (t, a) => (d(), i("div", {
156
+ class: s(A.value),
157
+ onClick: a[0] ||= (e) => I(),
158
+ onMouseover: a[1] ||= v((e) => L(), ["stop"]),
159
+ onMouseleave: a[2] ||= v((e) => L(), ["stop"]),
160
+ onContextmenu: a[3] ||= v((e) => R(), ["stop"]),
161
+ ref_key: "dropdownRef",
162
+ ref: C
163
+ }, [p(t.$slots, "default"), (d(), n(e, { to: "body" }, [S.value ? (d(), i("ul", {
164
+ key: 0,
165
+ ref_key: "popupRef",
166
+ ref: w,
167
+ id: m(D),
168
+ class: s(["sw-dropdown-popup", [x.class, E.value]]),
169
+ style: c(T.value),
170
+ tabindex: "-1",
171
+ role: "menu",
172
+ onKeydown: P
173
+ }, [p(t.$slots, "dropdown")], 46, y)) : r("", !0)]))], 34));
174
+ }
175
+ };
176
+ //#endregion
177
+ export { b as default };
@@ -1,4 +1,4 @@
1
- import { n as e } from "./SwIcon-Ce_Lj65y.js";
1
+ import { n as e } from "./SwIcon-B-HHyuxu.js";
2
2
  import { computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, normalizeClass as o, openBlock as s, renderSlot as c } from "vue";
3
3
  //#region src/components/SwDropdownItem.vue
4
4
  var l = {
@@ -1,5 +1,5 @@
1
- import { n as e } from "./SwIcon-Ce_Lj65y.js";
2
- import { t } from "./SwButton-DBj7jzhd.js";
1
+ import { n as e } from "./SwIcon-B-HHyuxu.js";
2
+ import { t } from "./SwButton-DpOGpsBS.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) {
@@ -1,7 +1,7 @@
1
1
  import { i as e } from "./utils-qzwUfWRX.js";
2
- import { n as t } from "./SwIcon-Ce_Lj65y.js";
3
- import { t as n } from "./SwButton-DBj7jzhd.js";
4
- import r from "./SwDropdown-D5nIZEAM.js";
2
+ import { n as t } from "./SwIcon-B-HHyuxu.js";
3
+ import { t as n } from "./SwButton-DpOGpsBS.js";
4
+ import r from "./SwDropdown-DpedC6Bn.js";
5
5
  import { computed as i, createElementBlock as a, createElementVNode as o, createTextVNode as s, createVNode as c, mergeModels as l, normalizeClass as u, onMounted as d, openBlock as f, ref as p, renderSlot as m, toDisplayString as h, useModel as g, watchEffect as _, withCtx as v } from "vue";
6
6
  //#region src/components/SwGide.vue
7
7
  var y = ["src"], b = {
@@ -1,5 +1,5 @@
1
1
  import { r as e } from "./utils-qzwUfWRX.js";
2
- import { t } from "./SwSelect-Bo9kUY7P.js";
2
+ import { t } from "./SwSelect-DDNh3p6B.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
5
  var c = /* @__PURE__ */ t({ default: () => u }), l = ["href"], u = /*@__PURE__*/ Object.assign({ inheritAttrs: !1 }, {