@shtabapp/ui-kit 1.75.0 → 1.76.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/CHANGELOG.md +20 -0
- package/dist/{SButton-CLTNdnCK.cjs → SButton-BCgdXE_B.cjs} +1 -1
- package/dist/{SButton-LAOBxpd4.js → SButton-DIWMMCSc.js} +1 -0
- package/dist/{SButtonGroup-DPq5g7bZ.js → SButtonGroup-BqW5Rz1p.js} +0 -2
- package/dist/{SButtonGroup-Co1AUbsm.cjs → SButtonGroup-DSi8mQSz.cjs} +1 -1
- package/dist/{SCard-DKZYyR5b.cjs → SCard-B210wsTH.cjs} +1 -1
- package/dist/{SCard-DgGxjBUV.js → SCard-DJuyINB7.js} +1 -1
- package/dist/SCheckbox-Dkbk21Id.cjs +1 -0
- package/dist/SCheckbox-Dulusx5v.js +105 -0
- package/dist/{SChip-Dcvk3JI8.cjs → SChip-BCB1bvua.cjs} +1 -1
- package/dist/{SChip-NDTK29yq.js → SChip-C6d9oIYL.js} +1 -1
- package/dist/{SColorPicker-Ct8FVU0D.cjs → SColorPicker-CcPnyXE0.cjs} +1 -1
- package/dist/{SColorPicker-BjtlrGHZ.js → SColorPicker-XXyDOuDg.js} +2 -2
- package/dist/{SInput-D8NftspL.js → SInput-CGlUBCkW.js} +57 -54
- package/dist/SInput-fT-S-Tko.cjs +1 -0
- package/dist/SList-BuuCfuHg.js +471 -0
- package/dist/SList-Vg9nx1oe.cjs +1 -0
- package/dist/SListItem-CDlsjhA3.js +227 -0
- package/dist/SListItem-DMjtJXxV.cjs +1 -0
- package/dist/{SPhotoEdit-CShhPLJt.cjs → SPhotoEdit-B4ujF5Dh.cjs} +1 -1
- package/dist/{SPhotoEdit-r63G2NZI.js → SPhotoEdit-BxxycqvA.js} +1 -1
- package/dist/SRadio-B9qQ-PEk.cjs +1 -0
- package/dist/SRadio-BhoLtFUS.js +60 -0
- package/dist/SSelect-Bn4kifqp.js +666 -0
- package/dist/SSelect-DyngcoP9.cjs +1 -0
- package/dist/STab-BkQzKaLY.cjs +1 -0
- package/dist/STab-D7SATMfv.js +242 -0
- package/dist/{STable-G2k-tI4g.js → STable-BVGHC_FJ.js} +156 -133
- package/dist/STable-QYXxMVAw.cjs +1 -0
- package/dist/STabs-BYbsRtvi.js +151 -0
- package/dist/STabs-DDP-2p6T.cjs +1 -0
- package/dist/{STag-C5KhPWjQ.js → STag-DWjv_Za8.js} +1 -1
- package/dist/{STag-ZPrc5q4N.cjs → STag-nqzlv8OZ.cjs} +1 -1
- package/dist/{STagGroup-ccEvIkK7.cjs → STagGroup-CYEI9OXO.cjs} +1 -1
- package/dist/{STagGroup-BGwvunuu.js → STagGroup-DEPpEU5C.js} +1 -1
- package/dist/SToggle-BNgLiIrQ.cjs +1 -0
- package/dist/SToggle-MSdprnRP.js +62 -0
- package/dist/components/SButton/SButton.vue.d.ts.map +1 -1
- package/dist/components/SButtonGroup/SButtonGroup.vue.d.ts.map +1 -1
- package/dist/components/SCheckbox/SCheckbox.vue.d.ts.map +1 -1
- package/dist/components/SInput/SInput.vue.d.ts.map +1 -1
- package/dist/components/SInput/utils/fieldLabelId.d.ts +6 -0
- package/dist/components/SInput/utils/fieldLabelId.d.ts.map +1 -0
- package/dist/components/SList/SList.vue.d.ts.map +1 -1
- package/dist/components/SList/utils/context.d.ts +3 -0
- package/dist/components/SList/utils/context.d.ts.map +1 -1
- package/dist/components/SListItem/SListItem.types.d.ts +22 -0
- package/dist/components/SListItem/SListItem.types.d.ts.map +1 -1
- package/dist/components/SListItem/SListItem.vue.d.ts.map +1 -1
- package/dist/components/SListItem/index.d.ts +2 -2
- package/dist/components/SListItem/index.d.ts.map +1 -1
- package/dist/components/SListItem/utils/listItemAria.d.ts +31 -0
- package/dist/components/SListItem/utils/listItemAria.d.ts.map +1 -0
- package/dist/components/SRadio/SRadio.vue.d.ts.map +1 -1
- package/dist/components/SSelect/SSelect.vue.d.ts.map +1 -1
- package/dist/components/STab/STab.types.d.ts +5 -0
- package/dist/components/STab/STab.types.d.ts.map +1 -1
- package/dist/components/STab/STab.vue.d.ts +2 -0
- package/dist/components/STab/STab.vue.d.ts.map +1 -1
- package/dist/components/STable/STable.vue.d.ts.map +1 -1
- package/dist/components/STable/parts/STableGroupRow.vue.d.ts +2 -0
- package/dist/components/STable/parts/STableGroupRow.vue.d.ts.map +1 -1
- package/dist/components/STable/parts/STableRow.vue.d.ts +2 -0
- package/dist/components/STable/parts/STableRow.vue.d.ts.map +1 -1
- package/dist/components/STabs/STabs.vue.d.ts.map +1 -1
- package/dist/components/SToggle/SToggle.vue.d.ts.map +1 -1
- package/dist/composables/useAriaAttrs.d.ts +21 -0
- package/dist/composables/useAriaAttrs.d.ts.map +1 -0
- package/dist/entries/button-group.cjs +1 -1
- package/dist/entries/button-group.js +1 -1
- package/dist/entries/button.cjs +1 -1
- package/dist/entries/button.js +1 -1
- package/dist/entries/card.cjs +1 -1
- package/dist/entries/card.js +1 -1
- package/dist/entries/checkbox.cjs +1 -1
- package/dist/entries/checkbox.js +1 -1
- package/dist/entries/chip.cjs +1 -1
- package/dist/entries/chip.js +1 -1
- package/dist/entries/color-picker.cjs +1 -1
- package/dist/entries/color-picker.js +1 -1
- package/dist/entries/input.cjs +1 -1
- package/dist/entries/input.js +1 -1
- package/dist/entries/list-item.cjs +1 -1
- package/dist/entries/list-item.d.ts +2 -2
- package/dist/entries/list-item.d.ts.map +1 -1
- package/dist/entries/list-item.js +2 -2
- package/dist/entries/list.cjs +1 -1
- package/dist/entries/list.js +1 -1
- package/dist/entries/photo-edit.cjs +1 -1
- package/dist/entries/photo-edit.js +1 -1
- package/dist/entries/radio.cjs +1 -1
- package/dist/entries/radio.js +1 -1
- package/dist/entries/select.cjs +1 -1
- package/dist/entries/select.js +1 -1
- package/dist/entries/tab.cjs +1 -1
- package/dist/entries/tab.js +1 -1
- package/dist/entries/table.cjs +1 -1
- package/dist/entries/table.js +1 -1
- package/dist/entries/tabs.cjs +1 -1
- package/dist/entries/tabs.js +2 -2
- package/dist/entries/tag-group.cjs +1 -1
- package/dist/entries/tag-group.js +2 -2
- package/dist/entries/tag.cjs +1 -1
- package/dist/entries/tag.js +1 -1
- package/dist/entries/toggle.cjs +1 -1
- package/dist/entries/toggle.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +209 -209
- package/dist/uikit-components.css +1 -1
- package/dist/useAriaAttrs-CxGRTeye.js +15 -0
- package/dist/useAriaAttrs-D748yeJ_.cjs +1 -0
- package/package.json +3 -3
- package/dist/SCheckbox-BMkOc5cn.js +0 -102
- package/dist/SCheckbox-DnnC5mOH.cjs +0 -1
- package/dist/SInput-B4So5LGW.cjs +0 -1
- package/dist/SList-BuXrkB03.js +0 -465
- package/dist/SList-CvP0U6U1.cjs +0 -1
- package/dist/SListItem-BOSQGRWA.js +0 -209
- package/dist/SListItem-BeaflFVf.cjs +0 -1
- package/dist/SRadio-D6_Pd6XX.js +0 -57
- package/dist/SRadio-DRo_GU5A.cjs +0 -1
- package/dist/SSelect-mnobObXO.cjs +0 -1
- package/dist/SSelect-rpJCD5PL.js +0 -652
- package/dist/STab-C06drUMG.cjs +0 -1
- package/dist/STab-ltjZBvbK.js +0 -218
- package/dist/STable-BXVhLjSQ.cjs +0 -1
- package/dist/STabs-BARXqgoB.js +0 -149
- package/dist/STabs-n5hMERTK.cjs +0 -1
- package/dist/SToggle-CGd0Mh0R.cjs +0 -1
- package/dist/SToggle-sGw-LSNd.js +0 -59
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
import { i as e, n as t, r as n, t as r } from "./SButton-DIWMMCSc.js";
|
|
2
|
+
import { n as i } from "./useSelectLink-2aCIYmF6.js";
|
|
3
|
+
import { Fragment as ee, computed as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, createTextVNode as u, defineComponent as d, guardReactiveProps as f, inject as te, mergeProps as ne, normalizeClass as re, normalizeProps as p, openBlock as m, renderSlot as h, toDisplayString as g, unref as _, useSlots as ie, useTemplateRef as ae, withModifiers as oe } from "vue";
|
|
4
|
+
import { ESSkeletonType as v, SIcon as y, SSkeleton as se, useUiKitI18n as ce } from "@shtabapp/ui-kit-primitives";
|
|
5
|
+
//#region src/components/SList/utils/context.ts
|
|
6
|
+
var b = Symbol("sListInjectionKey"), x = /* @__PURE__ */ function(e) {
|
|
7
|
+
return e.NEUTRAL = "neutral", e.SECONDARY = "secondary", e.MAIN = "main", e.ERROR = "error", e.BILLING = "billing", e;
|
|
8
|
+
}({}), S = /* @__PURE__ */ function(e) {
|
|
9
|
+
return e.OPTION = "option", e.TREEITEM = "treeitem", e.MENUITEM = "menuitem", e.MENUITEMCHECKBOX = "menuitemcheckbox", e.MENUITEMRADIO = "menuitemradio", e.BUTTON = "button", e.LINK = "link", e.NONE = "none", e;
|
|
10
|
+
}({}), C = new Set([S.OPTION, S.TREEITEM]), w = new Set([S.MENUITEMCHECKBOX, S.MENUITEMRADIO]), T = new Set([
|
|
11
|
+
S.TREEITEM,
|
|
12
|
+
S.MENUITEM,
|
|
13
|
+
S.BUTTON,
|
|
14
|
+
S.LINK
|
|
15
|
+
]), E = ({ role: e, selected: t }) => ({
|
|
16
|
+
"aria-selected": C.has(e) && t ? !0 : void 0,
|
|
17
|
+
"aria-checked": w.has(e) ? t : void 0
|
|
18
|
+
}), D = ({ role: e, expandable: t, expanded: n, loading: r, depth: i }) => ({
|
|
19
|
+
"aria-expanded": T.has(e) && t && !r ? n : void 0,
|
|
20
|
+
"aria-level": e === S.TREEITEM ? i + 1 : void 0
|
|
21
|
+
}), O = ({ disabled: e, readonly: t, loading: n }) => ({
|
|
22
|
+
"aria-disabled": e || t || n ? !0 : void 0,
|
|
23
|
+
"aria-busy": n ? !0 : void 0
|
|
24
|
+
}), k = (e) => e.role === S.NONE ? { role: e.role } : {
|
|
25
|
+
role: e.role,
|
|
26
|
+
...E(e),
|
|
27
|
+
...D(e),
|
|
28
|
+
...O(e)
|
|
29
|
+
}, A = ["id", "tabindex"], j = {
|
|
30
|
+
key: 0,
|
|
31
|
+
class: "s-ui-list-item__level"
|
|
32
|
+
}, M = { class: "s-ui-list-item__body" }, N = {
|
|
33
|
+
key: 0,
|
|
34
|
+
class: "s-ui-list-item__icon-left"
|
|
35
|
+
}, P = { class: "s-ui-list-item__text" }, F = {
|
|
36
|
+
key: 0,
|
|
37
|
+
class: "s-ui-list-item__title s-ui-typography-label-14-medium"
|
|
38
|
+
}, I = {
|
|
39
|
+
key: 1,
|
|
40
|
+
class: "s-ui-list-item__subtitle s-ui-typography-body-12-regular"
|
|
41
|
+
}, L = {
|
|
42
|
+
key: 1,
|
|
43
|
+
class: "s-ui-list-item__title-action"
|
|
44
|
+
}, R = {
|
|
45
|
+
key: 1,
|
|
46
|
+
class: "s-ui-list-item__actions"
|
|
47
|
+
}, z = { class: "s-ui-list-item__actions-reveal" }, B = { class: "s-ui-list-item__actions-inner" }, V = {
|
|
48
|
+
key: 0,
|
|
49
|
+
class: "s-ui-list-item__trailing"
|
|
50
|
+
}, H = {
|
|
51
|
+
key: 1,
|
|
52
|
+
class: "s-ui-list-item__action-end"
|
|
53
|
+
}, U = ".s-ui-list-item__expand, .s-ui-list-item__title-action, .s-ui-list-item__actions", W = 16, G = "a, button, input, select, textarea, [role=\"button\"], [role=\"link\"], [contenteditable=\"true\"]", K = /* @__PURE__ */ d({
|
|
54
|
+
__name: "SListItem",
|
|
55
|
+
props: {
|
|
56
|
+
depth: { default: 0 },
|
|
57
|
+
hasLevel: {
|
|
58
|
+
type: Boolean,
|
|
59
|
+
default: !1
|
|
60
|
+
},
|
|
61
|
+
expandable: {
|
|
62
|
+
type: Boolean,
|
|
63
|
+
default: !1
|
|
64
|
+
},
|
|
65
|
+
expanded: {
|
|
66
|
+
type: Boolean,
|
|
67
|
+
default: !1
|
|
68
|
+
},
|
|
69
|
+
variant: { default: () => x.NEUTRAL },
|
|
70
|
+
tiny: {
|
|
71
|
+
type: Boolean,
|
|
72
|
+
default: !1
|
|
73
|
+
},
|
|
74
|
+
compact: {
|
|
75
|
+
type: Boolean,
|
|
76
|
+
default: !1
|
|
77
|
+
},
|
|
78
|
+
flush: {
|
|
79
|
+
type: Boolean,
|
|
80
|
+
default: !1
|
|
81
|
+
},
|
|
82
|
+
selected: {
|
|
83
|
+
type: Boolean,
|
|
84
|
+
default: !1
|
|
85
|
+
},
|
|
86
|
+
active: {
|
|
87
|
+
type: Boolean,
|
|
88
|
+
default: !1
|
|
89
|
+
},
|
|
90
|
+
disabled: {
|
|
91
|
+
type: Boolean,
|
|
92
|
+
default: !1
|
|
93
|
+
},
|
|
94
|
+
readonly: {
|
|
95
|
+
type: Boolean,
|
|
96
|
+
default: !1
|
|
97
|
+
},
|
|
98
|
+
loading: {
|
|
99
|
+
type: Boolean,
|
|
100
|
+
default: !1
|
|
101
|
+
},
|
|
102
|
+
title: {},
|
|
103
|
+
subtitle: {},
|
|
104
|
+
iconLeft: {},
|
|
105
|
+
iconLeftSize: {},
|
|
106
|
+
rowKey: {},
|
|
107
|
+
revealRight: { type: Boolean },
|
|
108
|
+
expandOnClick: { type: Boolean },
|
|
109
|
+
role: {}
|
|
110
|
+
},
|
|
111
|
+
emits: [
|
|
112
|
+
"click",
|
|
113
|
+
"toggleExpand",
|
|
114
|
+
"keydown"
|
|
115
|
+
],
|
|
116
|
+
setup(d, { expose: C, emit: w }) {
|
|
117
|
+
let T = w, E = a(() => ({
|
|
118
|
+
disabled: d.disabled,
|
|
119
|
+
readonly: d.readonly
|
|
120
|
+
})), D = ie(), O = ae("listItemElementRef"), K = te(b, null), { t: q } = ce(), J = i({
|
|
121
|
+
group: () => K,
|
|
122
|
+
value: () => d.rowKey,
|
|
123
|
+
el: () => O.value,
|
|
124
|
+
disabled: () => d.disabled || d.loading,
|
|
125
|
+
interactive: () => !d.readonly && !d.loading
|
|
126
|
+
}), le = a(() => d.variant === x.BILLING && !d.disabled), ue = [
|
|
127
|
+
"Enter",
|
|
128
|
+
" ",
|
|
129
|
+
"Spacebar"
|
|
130
|
+
], Y = a(() => K && d.rowKey ? K.isExpanded(d.rowKey) : d.expanded), de = a(() => Y.value ? q("listItem.collapse") : q("listItem.expand")), X = a(() => J.isInGroup.value ? J.isActive.value : d.selected), fe = a(() => K && d.rowKey ? K.activeKey() === d.rowKey : d.active), pe = a(() => d.revealRight ? !0 : K ? K.revealRight() : !1), me = a(() => d.expandOnClick ? !0 : K ? K.expandOnClick() : !1), he = a(() => {
|
|
131
|
+
if (!(!K || !d.rowKey)) return K.getItemOptionId(d.rowKey);
|
|
132
|
+
}), Z = a(() => d.role ? d.role : K ? K.itemRole() : S.BUTTON), ge = a(() => k({
|
|
133
|
+
role: Z.value,
|
|
134
|
+
selected: X.value,
|
|
135
|
+
expandable: d.expandable,
|
|
136
|
+
expanded: Y.value,
|
|
137
|
+
disabled: d.disabled,
|
|
138
|
+
readonly: d.readonly,
|
|
139
|
+
loading: d.loading,
|
|
140
|
+
depth: d.depth
|
|
141
|
+
})), _e = a(() => {
|
|
142
|
+
if (K?.usesActiveDescendantNavigation()) return -1;
|
|
143
|
+
if (!(d.disabled || d.readonly || d.loading || Z.value === S.NONE)) return J.tabIndex.value === void 0 ? 0 : J.tabIndex.value;
|
|
144
|
+
}), Q = a(() => ({
|
|
145
|
+
"--s-ui-list-item-depth": String(d.depth),
|
|
146
|
+
"--s-ui-list-item-icon-size": d.iconLeftSize === void 0 ? void 0 : `${d.iconLeftSize}px`
|
|
147
|
+
})), ve = a(() => [`s-ui-list-item--variant-${d.variant}`, {
|
|
148
|
+
"s-ui-list-item--tiny": d.tiny,
|
|
149
|
+
"s-ui-list-item--compact": d.compact,
|
|
150
|
+
"s-ui-list-item--flush": d.flush,
|
|
151
|
+
"s-ui-list-item--selected": X.value,
|
|
152
|
+
"s-ui-list-item--active": fe.value,
|
|
153
|
+
"s-ui-list-item--disabled": d.disabled,
|
|
154
|
+
"s-ui-list-item--readonly": d.readonly,
|
|
155
|
+
"s-ui-list-item--loading": d.loading,
|
|
156
|
+
"s-ui-list-item--expandable": d.expandable,
|
|
157
|
+
"s-ui-list-item--reveal-right": pe.value
|
|
158
|
+
}]), $ = () => {
|
|
159
|
+
if (K && d.rowKey) {
|
|
160
|
+
K.toggleExpanded(d.rowKey);
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
163
|
+
T("toggleExpand");
|
|
164
|
+
}, ye = () => {
|
|
165
|
+
d.disabled || d.readonly || d.loading || $();
|
|
166
|
+
}, be = (e) => e.target instanceof Element && !!e.target.closest(U) && !!e.target.closest(G), xe = (e) => {
|
|
167
|
+
d.disabled || d.readonly || d.loading || be(e) || (d.expandable && me.value && (K && d.rowKey ? K.toggleExpanded(d.rowKey) : T("toggleExpand")), K && d.rowKey && K.setActiveKey(d.rowKey), J.isInGroup.value && J.handleClick(), T("click", e));
|
|
168
|
+
}, Se = (e) => !d.expandable || K?.handlesTreeKeyboardNavigation() || e.key !== "ArrowLeft" && e.key !== "ArrowRight" || e.key === "ArrowRight" === Y.value ? !1 : (e.preventDefault(), $(), !0), Ce = (e) => K || J.isInGroup.value || !ue.includes(e.key) || e.target !== O.value ? !1 : (e.preventDefault(), O.value?.click(), !0), we = (e) => {
|
|
169
|
+
d.disabled || d.readonly || d.loading || (!Se(e) && !Ce(e) && J.isInGroup.value && J.handleKeydown(e), T("keydown", e));
|
|
170
|
+
};
|
|
171
|
+
return C({ listItemElementRef: O }), (i, a) => (m(), c("div", ne({
|
|
172
|
+
ref_key: "listItemElementRef",
|
|
173
|
+
ref: O,
|
|
174
|
+
id: he.value,
|
|
175
|
+
class: ["s-ui-list-item", ve.value],
|
|
176
|
+
style: Q.value,
|
|
177
|
+
tabindex: _e.value
|
|
178
|
+
}, ge.value, {
|
|
179
|
+
onClick: xe,
|
|
180
|
+
onKeydown: we
|
|
181
|
+
}), [d.loading ? (m(), o(_(se), {
|
|
182
|
+
key: 0,
|
|
183
|
+
type: _(v).S_LIST_ITEM
|
|
184
|
+
}, null, 8, ["type"])) : (m(), c(ee, { key: 1 }, [
|
|
185
|
+
d.expandable || d.depth || d.hasLevel || _(D).level ? (m(), c("div", j, [h(i.$slots, "level", {}, () => [d.expandable ? (m(), o(_(r), {
|
|
186
|
+
key: 0,
|
|
187
|
+
class: re(["s-ui-list-item__expand", { "s-ui-list-item__expand--expanded": Y.value }]),
|
|
188
|
+
appearance: _(t).BARE,
|
|
189
|
+
variant: _(e).NEUTRAL,
|
|
190
|
+
size: _(n).SMALL,
|
|
191
|
+
icon: "chevronMiniRight",
|
|
192
|
+
disabled: d.disabled || d.readonly,
|
|
193
|
+
tabindex: -1,
|
|
194
|
+
"aria-label": de.value,
|
|
195
|
+
onClick: oe(ye, ["stop"])
|
|
196
|
+
}, null, 8, [
|
|
197
|
+
"class",
|
|
198
|
+
"appearance",
|
|
199
|
+
"variant",
|
|
200
|
+
"size",
|
|
201
|
+
"disabled",
|
|
202
|
+
"aria-label"
|
|
203
|
+
])) : s("", !0)])])) : s("", !0),
|
|
204
|
+
l("div", M, [
|
|
205
|
+
d.iconLeft || _(D)["icon-left"] ? (m(), c("div", N, [h(i.$slots, "icon-left", {}, () => [d.iconLeft ? (m(), o(_(y), {
|
|
206
|
+
key: 0,
|
|
207
|
+
name: d.iconLeft,
|
|
208
|
+
size: d.iconLeftSize ?? W,
|
|
209
|
+
billing: le.value
|
|
210
|
+
}, null, 8, [
|
|
211
|
+
"name",
|
|
212
|
+
"size",
|
|
213
|
+
"billing"
|
|
214
|
+
])) : s("", !0)])])) : s("", !0),
|
|
215
|
+
l("div", P, [d.title || _(D).title ? (m(), c("span", F, [h(i.$slots, "title", {}, () => [u(g(d.title), 1)])])) : s("", !0), d.subtitle || _(D).subtitle ? (m(), c("span", I, [h(i.$slots, "subtitle", {}, () => [u(g(d.subtitle), 1)])])) : s("", !0)]),
|
|
216
|
+
_(D)["title-action"] ? (m(), c("div", L, [h(i.$slots, "title-action", p(f(E.value)))])) : s("", !0)
|
|
217
|
+
]),
|
|
218
|
+
_(D).trailing || _(D).right || _(D)["action-end"] ? (m(), c("div", R, [l("div", z, [l("div", B, [
|
|
219
|
+
_(D).trailing ? (m(), c("div", V, [h(i.$slots, "trailing", p(f(E.value)))])) : s("", !0),
|
|
220
|
+
h(i.$slots, "right", p(f(E.value))),
|
|
221
|
+
_(D)["action-end"] ? (m(), c("div", H, [h(i.$slots, "action-end", p(f(E.value)))])) : s("", !0)
|
|
222
|
+
])])])) : s("", !0)
|
|
223
|
+
], 64))], 16, A));
|
|
224
|
+
}
|
|
225
|
+
});
|
|
226
|
+
//#endregion
|
|
227
|
+
export { b as i, S as n, x as r, K as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./SButton-BCgdXE_B.cjs"),t=require("./useSelectLink-DZIAhQ2J.cjs");let n=require("vue"),r=require("@shtabapp/ui-kit-primitives");var i=Symbol(`sListInjectionKey`),a=function(e){return e.NEUTRAL=`neutral`,e.SECONDARY=`secondary`,e.MAIN=`main`,e.ERROR=`error`,e.BILLING=`billing`,e}({}),o=function(e){return e.OPTION=`option`,e.TREEITEM=`treeitem`,e.MENUITEM=`menuitem`,e.MENUITEMCHECKBOX=`menuitemcheckbox`,e.MENUITEMRADIO=`menuitemradio`,e.BUTTON=`button`,e.LINK=`link`,e.NONE=`none`,e}({}),s=new Set([o.OPTION,o.TREEITEM]),c=new Set([o.MENUITEMCHECKBOX,o.MENUITEMRADIO]),l=new Set([o.TREEITEM,o.MENUITEM,o.BUTTON,o.LINK]),u=({role:e,selected:t})=>({"aria-selected":s.has(e)&&t?!0:void 0,"aria-checked":c.has(e)?t:void 0}),d=({role:e,expandable:t,expanded:n,loading:r,depth:i})=>({"aria-expanded":l.has(e)&&t&&!r?n:void 0,"aria-level":e===o.TREEITEM?i+1:void 0}),f=({disabled:e,readonly:t,loading:n})=>({"aria-disabled":e||t||n?!0:void 0,"aria-busy":n?!0:void 0}),p=e=>e.role===o.NONE?{role:e.role}:{role:e.role,...u(e),...d(e),...f(e)},m=[`id`,`tabindex`],h={key:0,class:`s-ui-list-item__level`},g={class:`s-ui-list-item__body`},_={key:0,class:`s-ui-list-item__icon-left`},ee={class:`s-ui-list-item__text`},v={key:0,class:`s-ui-list-item__title s-ui-typography-label-14-medium`},y={key:1,class:`s-ui-list-item__subtitle s-ui-typography-body-12-regular`},b={key:1,class:`s-ui-list-item__title-action`},x={key:1,class:`s-ui-list-item__actions`},S={class:`s-ui-list-item__actions-reveal`},C={class:`s-ui-list-item__actions-inner`},w={key:0,class:`s-ui-list-item__trailing`},T={key:1,class:`s-ui-list-item__action-end`},E=`.s-ui-list-item__expand, .s-ui-list-item__title-action, .s-ui-list-item__actions`,D=16,O=`a, button, input, select, textarea, [role="button"], [role="link"], [contenteditable="true"]`,k=(0,n.defineComponent)({__name:`SListItem`,props:{depth:{default:0},hasLevel:{type:Boolean,default:!1},expandable:{type:Boolean,default:!1},expanded:{type:Boolean,default:!1},variant:{default:()=>a.NEUTRAL},tiny:{type:Boolean,default:!1},compact:{type:Boolean,default:!1},flush:{type:Boolean,default:!1},selected:{type:Boolean,default:!1},active:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},title:{},subtitle:{},iconLeft:{},iconLeftSize:{},rowKey:{},revealRight:{type:Boolean},expandOnClick:{type:Boolean},role:{}},emits:[`click`,`toggleExpand`,`keydown`],setup(s,{expose:c,emit:l}){let u=l,d=(0,n.computed)(()=>({disabled:s.disabled,readonly:s.readonly})),f=(0,n.useSlots)(),k=(0,n.useTemplateRef)(`listItemElementRef`),A=(0,n.inject)(i,null),{t:j}=(0,r.useUiKitI18n)(),M=t.n({group:()=>A,value:()=>s.rowKey,el:()=>k.value,disabled:()=>s.disabled||s.loading,interactive:()=>!s.readonly&&!s.loading}),N=(0,n.computed)(()=>s.variant===a.BILLING&&!s.disabled),P=[`Enter`,` `,`Spacebar`],F=(0,n.computed)(()=>A&&s.rowKey?A.isExpanded(s.rowKey):s.expanded),I=(0,n.computed)(()=>F.value?j(`listItem.collapse`):j(`listItem.expand`)),L=(0,n.computed)(()=>M.isInGroup.value?M.isActive.value:s.selected),R=(0,n.computed)(()=>A&&s.rowKey?A.activeKey()===s.rowKey:s.active),z=(0,n.computed)(()=>s.revealRight?!0:A?A.revealRight():!1),B=(0,n.computed)(()=>s.expandOnClick?!0:A?A.expandOnClick():!1),V=(0,n.computed)(()=>{if(!(!A||!s.rowKey))return A.getItemOptionId(s.rowKey)}),H=(0,n.computed)(()=>s.role?s.role:A?A.itemRole():o.BUTTON),U=(0,n.computed)(()=>p({role:H.value,selected:L.value,expandable:s.expandable,expanded:F.value,disabled:s.disabled,readonly:s.readonly,loading:s.loading,depth:s.depth})),W=(0,n.computed)(()=>{if(A?.usesActiveDescendantNavigation())return-1;if(!(s.disabled||s.readonly||s.loading||H.value===o.NONE))return M.tabIndex.value===void 0?0:M.tabIndex.value}),G=(0,n.computed)(()=>({"--s-ui-list-item-depth":String(s.depth),"--s-ui-list-item-icon-size":s.iconLeftSize===void 0?void 0:`${s.iconLeftSize}px`})),K=(0,n.computed)(()=>[`s-ui-list-item--variant-${s.variant}`,{"s-ui-list-item--tiny":s.tiny,"s-ui-list-item--compact":s.compact,"s-ui-list-item--flush":s.flush,"s-ui-list-item--selected":L.value,"s-ui-list-item--active":R.value,"s-ui-list-item--disabled":s.disabled,"s-ui-list-item--readonly":s.readonly,"s-ui-list-item--loading":s.loading,"s-ui-list-item--expandable":s.expandable,"s-ui-list-item--reveal-right":z.value}]),q=()=>{if(A&&s.rowKey){A.toggleExpanded(s.rowKey);return}u(`toggleExpand`)},J=()=>{s.disabled||s.readonly||s.loading||q()},Y=e=>e.target instanceof Element&&!!e.target.closest(E)&&!!e.target.closest(O),X=e=>{s.disabled||s.readonly||s.loading||Y(e)||(s.expandable&&B.value&&(A&&s.rowKey?A.toggleExpanded(s.rowKey):u(`toggleExpand`)),A&&s.rowKey&&A.setActiveKey(s.rowKey),M.isInGroup.value&&M.handleClick(),u(`click`,e))},Z=e=>!s.expandable||A?.handlesTreeKeyboardNavigation()||e.key!==`ArrowLeft`&&e.key!==`ArrowRight`||e.key===`ArrowRight`===F.value?!1:(e.preventDefault(),q(),!0),Q=e=>A||M.isInGroup.value||!P.includes(e.key)||e.target!==k.value?!1:(e.preventDefault(),k.value?.click(),!0),$=e=>{s.disabled||s.readonly||s.loading||(!Z(e)&&!Q(e)&&M.isInGroup.value&&M.handleKeydown(e),u(`keydown`,e))};return c({listItemElementRef:k}),(t,i)=>((0,n.openBlock)(),(0,n.createElementBlock)(`div`,(0,n.mergeProps)({ref_key:`listItemElementRef`,ref:k,id:V.value,class:[`s-ui-list-item`,K.value],style:G.value,tabindex:W.value},U.value,{onClick:X,onKeydown:$}),[s.loading?((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(r.SSkeleton),{key:0,type:(0,n.unref)(r.ESSkeletonType).S_LIST_ITEM},null,8,[`type`])):((0,n.openBlock)(),(0,n.createElementBlock)(n.Fragment,{key:1},[s.expandable||s.depth||s.hasLevel||(0,n.unref)(f).level?((0,n.openBlock)(),(0,n.createElementBlock)(`div`,h,[(0,n.renderSlot)(t.$slots,`level`,{},()=>[s.expandable?((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(e.t),{key:0,class:(0,n.normalizeClass)([`s-ui-list-item__expand`,{"s-ui-list-item__expand--expanded":F.value}]),appearance:(0,n.unref)(e.n).BARE,variant:(0,n.unref)(e.i).NEUTRAL,size:(0,n.unref)(e.r).SMALL,icon:`chevronMiniRight`,disabled:s.disabled||s.readonly,tabindex:-1,"aria-label":I.value,onClick:(0,n.withModifiers)(J,[`stop`])},null,8,[`class`,`appearance`,`variant`,`size`,`disabled`,`aria-label`])):(0,n.createCommentVNode)(``,!0)])])):(0,n.createCommentVNode)(``,!0),(0,n.createElementVNode)(`div`,g,[s.iconLeft||(0,n.unref)(f)[`icon-left`]?((0,n.openBlock)(),(0,n.createElementBlock)(`div`,_,[(0,n.renderSlot)(t.$slots,`icon-left`,{},()=>[s.iconLeft?((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(r.SIcon),{key:0,name:s.iconLeft,size:s.iconLeftSize??D,billing:N.value},null,8,[`name`,`size`,`billing`])):(0,n.createCommentVNode)(``,!0)])])):(0,n.createCommentVNode)(``,!0),(0,n.createElementVNode)(`div`,ee,[s.title||(0,n.unref)(f).title?((0,n.openBlock)(),(0,n.createElementBlock)(`span`,v,[(0,n.renderSlot)(t.$slots,`title`,{},()=>[(0,n.createTextVNode)((0,n.toDisplayString)(s.title),1)])])):(0,n.createCommentVNode)(``,!0),s.subtitle||(0,n.unref)(f).subtitle?((0,n.openBlock)(),(0,n.createElementBlock)(`span`,y,[(0,n.renderSlot)(t.$slots,`subtitle`,{},()=>[(0,n.createTextVNode)((0,n.toDisplayString)(s.subtitle),1)])])):(0,n.createCommentVNode)(``,!0)]),(0,n.unref)(f)[`title-action`]?((0,n.openBlock)(),(0,n.createElementBlock)(`div`,b,[(0,n.renderSlot)(t.$slots,`title-action`,(0,n.normalizeProps)((0,n.guardReactiveProps)(d.value)))])):(0,n.createCommentVNode)(``,!0)]),(0,n.unref)(f).trailing||(0,n.unref)(f).right||(0,n.unref)(f)[`action-end`]?((0,n.openBlock)(),(0,n.createElementBlock)(`div`,x,[(0,n.createElementVNode)(`div`,S,[(0,n.createElementVNode)(`div`,C,[(0,n.unref)(f).trailing?((0,n.openBlock)(),(0,n.createElementBlock)(`div`,w,[(0,n.renderSlot)(t.$slots,`trailing`,(0,n.normalizeProps)((0,n.guardReactiveProps)(d.value)))])):(0,n.createCommentVNode)(``,!0),(0,n.renderSlot)(t.$slots,`right`,(0,n.normalizeProps)((0,n.guardReactiveProps)(d.value))),(0,n.unref)(f)[`action-end`]?((0,n.openBlock)(),(0,n.createElementBlock)(`div`,T,[(0,n.renderSlot)(t.$slots,`action-end`,(0,n.normalizeProps)((0,n.guardReactiveProps)(d.value)))])):(0,n.createCommentVNode)(``,!0)])])])):(0,n.createCommentVNode)(``,!0)],64))],16,m))}});Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return k}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("./SButton-
|
|
1
|
+
const e=require("./SButton-BCgdXE_B.cjs");let t=require("vue"),n=require("@shtabapp/ui-kit-primitives");var r=function(e){return e.X_SMALL=`x-small`,e.SMALL=`small`,e.BIG=`big`,e}({}),i=function(e){return e.CIRCLE=`circle`,e.SQUARE=`square`,e}({}),a={key:0,class:`s-ui-photo-edit__remove`},o={class:`s-ui-photo-edit__wrapper`},s=[`tabindex`,`aria-disabled`,`aria-label`],c=[`src`,`alt`],l={key:1,class:`s-ui-photo-edit__placeholder`},u={class:`s-ui-photo-edit__camera`},d={class:`s-ui-photo-edit__overlay`},f=[`accept`,`disabled`],p=(0,t.defineComponent)({__name:`SPhotoEdit`,props:(0,t.mergeModels)({accept:{default:`image/jpeg,image/png,image/jpg`},alt:{},disabled:{type:Boolean,default:!1},shape:{default:()=>i.CIRCLE},size:{default:()=>r.SMALL}},{modelValue:{default:null},modelModifiers:{}}),emits:(0,t.mergeModels)([`change`,`remove`],[`update:modelValue`]),setup(i,{emit:p}){let m=(0,t.useModel)(i,`modelValue`),h=p,{t:g}=(0,n.useUiKitI18n)(),_=(0,t.useTemplateRef)(`fileInputRef`),v=(0,t.ref)(null),y=()=>{v.value&&=(URL.revokeObjectURL(v.value),null)};(0,t.watch)(()=>m.value,e=>{y(),e instanceof File&&(v.value=URL.createObjectURL(e))},{immediate:!0}),(0,t.onScopeDispose)(y);let b=(0,t.computed)(()=>{let e=m.value;return e instanceof File?v.value??``:typeof e==`string`?e:``}),x=(0,t.computed)(()=>{let e=m.value;return e instanceof File?!0:typeof e==`string`?e.length>0:!1}),S=(0,t.computed)(()=>({[`s-ui-photo-edit--size-${i.size}`]:!0,[`s-ui-photo-edit--shape-${i.shape}`]:!0,"s-ui-photo-edit--filled":x.value,"s-ui-photo-edit--disabled":i.disabled})),C=(0,t.computed)(()=>i.size===r.X_SMALL?`s-ui-typography-label-10-medium`:`s-ui-typography-label-12-medium`),w=(0,t.computed)(()=>x.value?g(`photoEdit.changePhoto`):g(`photoEdit.uploadPhoto`)),T=(0,t.computed)(()=>x.value?g(`photoEdit.changePhoto`):g(`photoEdit.pickPhoto`)),E=(0,t.computed)(()=>i.disabled?-1:0),D=()=>{_.value&&(_.value.value=``)},O=()=>{m.value=null,y(),D()},k=e=>{h(`change`,{file:e,abort:O})},A=()=>{i.disabled||_.value?.click()},j=()=>{A()},M=e=>{i.disabled||e.key!==`Enter`&&e.key!==` `||(e.preventDefault(),A())},N=e=>{if(!(e.target instanceof HTMLInputElement))return;let t=e.target.files?.[0];t&&(m.value=t,k(t),D())},P=()=>{i.disabled||(h(`remove`),m.value=null,y(),D(),k(null))};return(r,p)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{class:(0,t.normalizeClass)([`s-ui-photo-edit`,S.value])},[x.value?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,a,[(0,t.createVNode)((0,t.unref)(e.t),{appearance:(0,t.unref)(e.n).BARE,variant:(0,t.unref)(e.i).NEUTRAL,size:(0,t.unref)(e.r).SMALL,disabled:i.disabled,tabindex:-1,icon:`closeMini`,"aria-label":(0,t.unref)(g)(`photoEdit.removePhoto`),onClick:(0,t.withModifiers)(P,[`stop`])},null,8,[`appearance`,`variant`,`size`,`disabled`,`aria-label`])])):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`div`,o,[(0,t.createElementVNode)(`div`,{class:`s-ui-photo-edit__trigger`,role:`button`,tabindex:E.value,"aria-disabled":i.disabled||void 0,"aria-label":T.value,onClick:j,onKeydown:M},[b.value?((0,t.openBlock)(),(0,t.createElementBlock)(`img`,{key:0,class:`s-ui-photo-edit__preview`,src:b.value,alt:i.alt??``},null,8,c)):((0,t.openBlock)(),(0,t.createElementBlock)(`div`,l,[(0,t.createElementVNode)(`span`,u,[(0,t.createVNode)((0,t.unref)(n.SIcon),{name:`camera`,size:40})])])),(0,t.createElementVNode)(`div`,d,[(0,t.createElementVNode)(`span`,{class:(0,t.normalizeClass)([`s-ui-photo-edit__label`,C.value])},(0,t.toDisplayString)(w.value),3)])],40,s)]),(0,t.createElementVNode)(`input`,{ref_key:`fileInputRef`,ref:_,class:`s-ui-photo-edit__input`,type:`file`,accept:i.accept,disabled:i.disabled,onChange:N},null,40,f)],2))}});Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return p}});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as e, n as t, r as n, t as r } from "./SButton-
|
|
1
|
+
import { i as e, n as t, r as n, t as r } from "./SButton-DIWMMCSc.js";
|
|
2
2
|
import { computed as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createVNode as c, defineComponent as l, mergeModels as u, normalizeClass as d, onScopeDispose as f, openBlock as p, ref as m, toDisplayString as h, unref as g, useModel as _, useTemplateRef as v, watch as y, withModifiers as b } from "vue";
|
|
3
3
|
import { SIcon as x, useUiKitI18n as S } from "@shtabapp/ui-kit-primitives";
|
|
4
4
|
//#region src/components/SPhotoEdit/SPhotoEdit.types.ts
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./useAriaAttrs-D748yeJ_.cjs");let t=require("vue");var n=function(e){return e.LEFT=`left`,e.RIGHT=`right`,e}({}),r=[`disabled`,`name`,`value`],i={key:0,class:`s-ui-radio__content`},a={key:0,class:`s-ui-radio__label s-ui-typography-label-14-medium`},o={key:1,class:`s-ui-radio__description s-ui-typography-body-12-regular`},s=(0,t.defineComponent)({inheritAttrs:!1,__name:`SRadio`,props:(0,t.mergeModels)({disabled:{type:Boolean,default:!1},labelPlacement:{default:()=>n.RIGHT},name:{},value:{}},{modelValue:{},modelModifiers:{}}),emits:(0,t.mergeModels)([`change`],[`update:modelValue`]),setup(s,{emit:c}){let l=(0,t.useModel)(s,`modelValue`),u=c,{getRootAttrs:d,getAriaAttrs:f}=e.t(),p=(0,t.useSlots)(),m=(0,t.computed)(()=>l.value===s.value),h=(0,t.computed)(()=>[{"s-ui-radio--checked":m.value,"s-ui-radio--disabled":s.disabled,"s-ui-radio--label-left":s.labelPlacement===n.LEFT}]),g=e=>{e.target instanceof HTMLInputElement&&e.target.checked&&u(`change`,s.value)};return(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(`label`,(0,t.mergeProps)({class:`s-ui-radio`},(0,t.unref)(d)(),{class:[h.value,{"s-ui-radio--control-only":!(0,t.unref)(p).default&&!(0,t.unref)(p).description}]}),[(0,t.withDirectives)((0,t.createElementVNode)(`input`,(0,t.mergeProps)({"onUpdate:modelValue":n[0]||=e=>l.value=e,type:`radio`,class:`s-ui-radio__input`},(0,t.unref)(f)(),{disabled:s.disabled,name:s.name,value:s.value,onChange:g}),null,16,r),[[t.vModelRadio,l.value]]),n[1]||=(0,t.createElementVNode)(`span`,{class:`s-ui-radio__control`},[(0,t.createElementVNode)(`span`,{class:`s-ui-radio__thumb`})],-1),(0,t.unref)(p).default||(0,t.unref)(p).description?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,i,[(0,t.unref)(p).default?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,a,[(0,t.renderSlot)(e.$slots,`default`)])):(0,t.createCommentVNode)(``,!0),(0,t.unref)(p).description?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,o,[(0,t.renderSlot)(e.$slots,`description`)])):(0,t.createCommentVNode)(``,!0)])):(0,t.createCommentVNode)(``,!0)],16))}});Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return n}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return s}});
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { t as e } from "./useAriaAttrs-CxGRTeye.js";
|
|
2
|
+
import { computed as t, createCommentVNode as n, createElementBlock as r, createElementVNode as i, defineComponent as a, mergeModels as o, mergeProps as s, openBlock as c, renderSlot as l, unref as u, useModel as d, useSlots as f, vModelRadio as p, withDirectives as m } from "vue";
|
|
3
|
+
//#region src/components/SRadio/SRadio.types.ts
|
|
4
|
+
var h = /* @__PURE__ */ function(e) {
|
|
5
|
+
return e.LEFT = "left", e.RIGHT = "right", e;
|
|
6
|
+
}({}), g = [
|
|
7
|
+
"disabled",
|
|
8
|
+
"name",
|
|
9
|
+
"value"
|
|
10
|
+
], _ = {
|
|
11
|
+
key: 0,
|
|
12
|
+
class: "s-ui-radio__content"
|
|
13
|
+
}, v = {
|
|
14
|
+
key: 0,
|
|
15
|
+
class: "s-ui-radio__label s-ui-typography-label-14-medium"
|
|
16
|
+
}, y = {
|
|
17
|
+
key: 1,
|
|
18
|
+
class: "s-ui-radio__description s-ui-typography-body-12-regular"
|
|
19
|
+
}, b = /* @__PURE__ */ a({
|
|
20
|
+
inheritAttrs: !1,
|
|
21
|
+
__name: "SRadio",
|
|
22
|
+
props: /*@__PURE__*/ o({
|
|
23
|
+
disabled: {
|
|
24
|
+
type: Boolean,
|
|
25
|
+
default: !1
|
|
26
|
+
},
|
|
27
|
+
labelPlacement: { default: () => h.RIGHT },
|
|
28
|
+
name: {},
|
|
29
|
+
value: {}
|
|
30
|
+
}, {
|
|
31
|
+
modelValue: {},
|
|
32
|
+
modelModifiers: {}
|
|
33
|
+
}),
|
|
34
|
+
emits: /*@__PURE__*/ o(["change"], ["update:modelValue"]),
|
|
35
|
+
setup(a, { emit: o }) {
|
|
36
|
+
let b = d(a, "modelValue"), x = o, { getRootAttrs: S, getAriaAttrs: C } = e(), w = f(), T = t(() => b.value === a.value), E = t(() => [{
|
|
37
|
+
"s-ui-radio--checked": T.value,
|
|
38
|
+
"s-ui-radio--disabled": a.disabled,
|
|
39
|
+
"s-ui-radio--label-left": a.labelPlacement === h.LEFT
|
|
40
|
+
}]), D = (e) => {
|
|
41
|
+
e.target instanceof HTMLInputElement && e.target.checked && x("change", a.value);
|
|
42
|
+
};
|
|
43
|
+
return (e, t) => (c(), r("label", s({ class: "s-ui-radio" }, u(S)(), { class: [E.value, { "s-ui-radio--control-only": !u(w).default && !u(w).description }] }), [
|
|
44
|
+
m(i("input", s({
|
|
45
|
+
"onUpdate:modelValue": t[0] ||= (e) => b.value = e,
|
|
46
|
+
type: "radio",
|
|
47
|
+
class: "s-ui-radio__input"
|
|
48
|
+
}, u(C)(), {
|
|
49
|
+
disabled: a.disabled,
|
|
50
|
+
name: a.name,
|
|
51
|
+
value: a.value,
|
|
52
|
+
onChange: D
|
|
53
|
+
}), null, 16, g), [[p, b.value]]),
|
|
54
|
+
t[1] ||= i("span", { class: "s-ui-radio__control" }, [i("span", { class: "s-ui-radio__thumb" })], -1),
|
|
55
|
+
u(w).default || u(w).description ? (c(), r("span", _, [u(w).default ? (c(), r("span", v, [l(e.$slots, "default")])) : n("", !0), u(w).description ? (c(), r("span", y, [l(e.$slots, "description")])) : n("", !0)])) : n("", !0)
|
|
56
|
+
], 16));
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
//#endregion
|
|
60
|
+
export { h as n, b as t };
|