@neobrut-vue/core 0.1.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 +5 -0
- package/LICENSE +21 -0
- package/README.md +335 -0
- package/dist/components/NbAccordion/NbAccordion.vue.d.ts +30 -0
- package/dist/components/NbAccordion/NbAccordionItem.vue.d.ts +24 -0
- package/dist/components/NbAccordion/index.d.ts +2 -0
- package/dist/components/NbAlert/NbAlert.vue.d.ts +30 -0
- package/dist/components/NbAlert/index.d.ts +1 -0
- package/dist/components/NbAspectRatio/NbAspectRatio.vue.d.ts +22 -0
- package/dist/components/NbAspectRatio/index.d.ts +1 -0
- package/dist/components/NbAvatar/NbAvatar.vue.d.ts +13 -0
- package/dist/components/NbAvatar/index.d.ts +1 -0
- package/dist/components/NbBadge/NbBadge.vue.d.ts +26 -0
- package/dist/components/NbBadge/index.d.ts +1 -0
- package/dist/components/NbBreadcrumbs/NbBreadcrumbs.vue.d.ts +12 -0
- package/dist/components/NbBreadcrumbs/index.d.ts +2 -0
- package/dist/components/NbButton/NbButton.vue.d.ts +32 -0
- package/dist/components/NbButton/index.d.ts +1 -0
- package/dist/components/NbCard/NbCard.vue.d.ts +27 -0
- package/dist/components/NbCard/index.d.ts +1 -0
- package/dist/components/NbCheckbox/NbCheckbox.vue.d.ts +15 -0
- package/dist/components/NbCheckbox/index.d.ts +1 -0
- package/dist/components/NbCombobox/NbCombobox.vue.d.ts +30 -0
- package/dist/components/NbCombobox/index.d.ts +2 -0
- package/dist/components/NbDialog/NbDialog.vue.d.ts +35 -0
- package/dist/components/NbDialog/index.d.ts +1 -0
- package/dist/components/NbDropdownMenu/NbDropdownMenu.vue.d.ts +35 -0
- package/dist/components/NbDropdownMenu/NbDropdownMenuItem.vue.d.ts +28 -0
- package/dist/components/NbDropdownMenu/NbDropdownMenuSeparator.vue.d.ts +2 -0
- package/dist/components/NbDropdownMenu/index.d.ts +3 -0
- package/dist/components/NbEmptyState/NbEmptyState.vue.d.ts +22 -0
- package/dist/components/NbEmptyState/index.d.ts +1 -0
- package/dist/components/NbFieldset/NbFieldset.vue.d.ts +24 -0
- package/dist/components/NbFieldset/index.d.ts +1 -0
- package/dist/components/NbInput/NbInput.vue.d.ts +17 -0
- package/dist/components/NbInput/index.d.ts +1 -0
- package/dist/components/NbInputGroup/NbInputGroup.vue.d.ts +19 -0
- package/dist/components/NbInputGroup/index.d.ts +1 -0
- package/dist/components/NbNumberInput/NbNumberInput.vue.d.ts +26 -0
- package/dist/components/NbNumberInput/index.d.ts +1 -0
- package/dist/components/NbPagination/NbPagination.vue.d.ts +21 -0
- package/dist/components/NbPagination/index.d.ts +1 -0
- package/dist/components/NbPopover/NbPopover.vue.d.ts +36 -0
- package/dist/components/NbPopover/index.d.ts +1 -0
- package/dist/components/NbProgress/NbProgress.vue.d.ts +13 -0
- package/dist/components/NbProgress/index.d.ts +1 -0
- package/dist/components/NbRadioGroup/NbRadioGroup.vue.d.ts +23 -0
- package/dist/components/NbRadioGroup/index.d.ts +2 -0
- package/dist/components/NbScrollArea/NbScrollArea.vue.d.ts +26 -0
- package/dist/components/NbScrollArea/index.d.ts +1 -0
- package/dist/components/NbSelect/NbSelect.vue.d.ts +37 -0
- package/dist/components/NbSelect/NbSelectItem.vue.d.ts +23 -0
- package/dist/components/NbSelect/index.d.ts +2 -0
- package/dist/components/NbSeparator/NbSeparator.vue.d.ts +9 -0
- package/dist/components/NbSeparator/index.d.ts +1 -0
- package/dist/components/NbSkeleton/NbSkeleton.vue.d.ts +11 -0
- package/dist/components/NbSkeleton/index.d.ts +1 -0
- package/dist/components/NbSlider/NbSlider.vue.d.ts +30 -0
- package/dist/components/NbSlider/index.d.ts +1 -0
- package/dist/components/NbSpinner/NbSpinner.vue.d.ts +9 -0
- package/dist/components/NbSpinner/index.d.ts +1 -0
- package/dist/components/NbSwitch/NbSwitch.vue.d.ts +16 -0
- package/dist/components/NbSwitch/index.d.ts +1 -0
- package/dist/components/NbTable/NbTable.vue.d.ts +20 -0
- package/dist/components/NbTable/index.d.ts +1 -0
- package/dist/components/NbTabs/NbTabs.vue.d.ts +30 -0
- package/dist/components/NbTabs/NbTabsContent.vue.d.ts +20 -0
- package/dist/components/NbTabs/NbTabsList.vue.d.ts +17 -0
- package/dist/components/NbTabs/NbTabsTrigger.vue.d.ts +23 -0
- package/dist/components/NbTabs/index.d.ts +5 -0
- package/dist/components/NbTabs/tabsContext.d.ts +11 -0
- package/dist/components/NbTextarea/NbTextarea.vue.d.ts +17 -0
- package/dist/components/NbTextarea/index.d.ts +1 -0
- package/dist/components/NbToast/NbToast.vue.d.ts +35 -0
- package/dist/components/NbToast/index.d.ts +2 -0
- package/dist/components/NbToggleGroup/NbToggleGroup.vue.d.ts +40 -0
- package/dist/components/NbToggleGroup/NbToggleGroupItem.vue.d.ts +23 -0
- package/dist/components/NbToggleGroup/index.d.ts +3 -0
- package/dist/components/NbTooltip/NbTooltip.vue.d.ts +21 -0
- package/dist/components/NbTooltip/index.d.ts +1 -0
- package/dist/components/formField.d.ts +6 -0
- package/dist/index.d.ts +42 -0
- package/dist/lib/ids.d.ts +1 -0
- package/dist/lib/variants.d.ts +1 -0
- package/dist/neobrut-vue.css +1 -0
- package/dist/neobrut-vue.js +1875 -0
- package/dist/plugin.d.ts +2 -0
- package/package.json +56 -0
|
@@ -0,0 +1,1875 @@
|
|
|
1
|
+
import { defineComponent as v, openBlock as n, createBlock as N, unref as a, withCtx as c, renderSlot as _, createVNode as m, createElementVNode as u, toDisplayString as p, computed as $, createElementBlock as i, normalizeClass as V, createCommentVNode as h, createTextVNode as B, Fragment as C, renderList as P, mergeProps as k, ref as x, watch as D, onBeforeUnmount as F, withModifiers as j, nextTick as K, useSlots as H, normalizeStyle as M, inject as X, provide as J, withDirectives as Q, vShow as W } from "vue";
|
|
2
|
+
import { AccordionRoot as Y, AccordionItem as Z, AccordionHeader as ee, AccordionTrigger as te, AccordionContent as ae, AspectRatio as le, AvatarRoot as ne, AvatarImage as oe, AvatarFallback as se, ComboboxRoot as ie, ComboboxAnchor as de, ComboboxInput as re, ComboboxTrigger as ue, ComboboxPortal as ce, ComboboxContent as be, ComboboxViewport as fe, ComboboxEmpty as me, ComboboxItem as pe, ComboboxItemIndicator as he, DropdownMenuRoot as ve, DropdownMenuTrigger as ge, DropdownMenuPortal as _e, DropdownMenuContent as ye, DropdownMenuItem as $e, DropdownMenuSeparator as Ne, NumberFieldRoot as Ie, NumberFieldDecrement as ke, NumberFieldInput as Be, NumberFieldIncrement as Ve, PaginationRoot as we, PaginationPrev as xe, PaginationList as Se, PaginationListItem as Te, PaginationEllipsis as Ae, PaginationNext as Ce, PopoverRoot as Pe, PopoverTrigger as De, PopoverPortal as Re, PopoverContent as qe, PopoverClose as Oe, ProgressRoot as Me, ProgressIndicator as Ee, ScrollAreaRoot as Ge, ScrollAreaViewport as Ue, ScrollAreaScrollbar as ze, ScrollAreaThumb as Le, SelectRoot as Fe, SelectTrigger as je, SelectValue as Ke, SelectIcon as He, SelectPortal as Xe, SelectContent as Je, SelectScrollUpButton as Qe, SelectViewport as We, SelectScrollDownButton as Ye, SelectItem as Ze, SelectItemText as et, SelectItemIndicator as tt, Separator as at, SliderRoot as lt, SliderTrack as nt, SliderRange as ot, SliderThumb as st, ToastProvider as it, ToastRoot as dt, ToastTitle as rt, ToastDescription as ut, ToastClose as ct, ToastViewport as bt, ToggleGroupRoot as ft, ToggleGroupItem as mt } from "reka-ui";
|
|
3
|
+
function pt(e) {
|
|
4
|
+
return {
|
|
5
|
+
install(o) {
|
|
6
|
+
Object.entries(e).forEach(([t, s]) => o.component(t, s));
|
|
7
|
+
}
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
const ht = /* @__PURE__ */ v({
|
|
11
|
+
__name: "NbAccordion",
|
|
12
|
+
props: {
|
|
13
|
+
modelValue: {},
|
|
14
|
+
defaultValue: {},
|
|
15
|
+
collapsible: { type: Boolean, default: !0 },
|
|
16
|
+
disabled: { type: Boolean, default: !1 }
|
|
17
|
+
},
|
|
18
|
+
emits: ["update:modelValue"],
|
|
19
|
+
setup(e, { emit: o }) {
|
|
20
|
+
const t = o;
|
|
21
|
+
return (s, l) => (n(), N(a(Y), {
|
|
22
|
+
class: "nb-root nb-accordion",
|
|
23
|
+
type: "single",
|
|
24
|
+
"model-value": e.modelValue,
|
|
25
|
+
"default-value": e.defaultValue,
|
|
26
|
+
collapsible: e.collapsible,
|
|
27
|
+
disabled: e.disabled,
|
|
28
|
+
"onUpdate:modelValue": l[0] || (l[0] = (b) => t("update:modelValue", b))
|
|
29
|
+
}, {
|
|
30
|
+
default: c(() => [
|
|
31
|
+
_(s.$slots, "default")
|
|
32
|
+
]),
|
|
33
|
+
_: 3
|
|
34
|
+
}, 8, ["model-value", "default-value", "collapsible", "disabled"]));
|
|
35
|
+
}
|
|
36
|
+
}), vt = { class: "nb-accordion__body" }, gt = /* @__PURE__ */ v({
|
|
37
|
+
__name: "NbAccordionItem",
|
|
38
|
+
props: {
|
|
39
|
+
value: {},
|
|
40
|
+
title: {},
|
|
41
|
+
disabled: { type: Boolean, default: !1 }
|
|
42
|
+
},
|
|
43
|
+
setup(e) {
|
|
44
|
+
return (o, t) => (n(), N(a(Z), {
|
|
45
|
+
class: "nb-accordion__item",
|
|
46
|
+
value: e.value,
|
|
47
|
+
disabled: e.disabled
|
|
48
|
+
}, {
|
|
49
|
+
default: c(() => [
|
|
50
|
+
m(a(ee), { class: "nb-accordion__header" }, {
|
|
51
|
+
default: c(() => [
|
|
52
|
+
m(a(te), { class: "nb-accordion__trigger" }, {
|
|
53
|
+
default: c(() => [
|
|
54
|
+
u("span", null, p(e.title), 1),
|
|
55
|
+
t[0] || (t[0] = u("svg", {
|
|
56
|
+
class: "nb-accordion__icon",
|
|
57
|
+
viewBox: "0 0 16 16",
|
|
58
|
+
"aria-hidden": "true",
|
|
59
|
+
focusable: "false"
|
|
60
|
+
}, [
|
|
61
|
+
u("path", { d: "m3 6 5 5 5-5" })
|
|
62
|
+
], -1))
|
|
63
|
+
]),
|
|
64
|
+
_: 1
|
|
65
|
+
})
|
|
66
|
+
]),
|
|
67
|
+
_: 1
|
|
68
|
+
}),
|
|
69
|
+
m(a(ae), { class: "nb-accordion__content" }, {
|
|
70
|
+
default: c(() => [
|
|
71
|
+
u("div", vt, [
|
|
72
|
+
_(o.$slots, "default")
|
|
73
|
+
])
|
|
74
|
+
]),
|
|
75
|
+
_: 3
|
|
76
|
+
})
|
|
77
|
+
]),
|
|
78
|
+
_: 3
|
|
79
|
+
}, 8, ["value", "disabled"]));
|
|
80
|
+
}
|
|
81
|
+
}), _t = /* @__PURE__ */ v({
|
|
82
|
+
__name: "NbAspectRatio",
|
|
83
|
+
props: {
|
|
84
|
+
ratio: { default: 1 }
|
|
85
|
+
},
|
|
86
|
+
setup(e) {
|
|
87
|
+
return (o, t) => (n(), N(a(le), {
|
|
88
|
+
class: "nb-root nb-aspect-ratio",
|
|
89
|
+
ratio: e.ratio
|
|
90
|
+
}, {
|
|
91
|
+
default: c(() => [
|
|
92
|
+
_(o.$slots, "default")
|
|
93
|
+
]),
|
|
94
|
+
_: 3
|
|
95
|
+
}, 8, ["ratio"]));
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
function R(...e) {
|
|
99
|
+
return e.filter(Boolean).join(" ");
|
|
100
|
+
}
|
|
101
|
+
const yt = /* @__PURE__ */ v({
|
|
102
|
+
__name: "NbBadge",
|
|
103
|
+
props: {
|
|
104
|
+
tone: { default: "primary" },
|
|
105
|
+
size: { default: "md" }
|
|
106
|
+
},
|
|
107
|
+
setup(e) {
|
|
108
|
+
const o = e, t = $(() => R(`nb-badge--${o.tone}`, `nb-badge--${o.size}`));
|
|
109
|
+
return (s, l) => (n(), i("span", {
|
|
110
|
+
class: V(["nb-root nb-badge", t.value])
|
|
111
|
+
}, [
|
|
112
|
+
_(s.$slots, "default")
|
|
113
|
+
], 2));
|
|
114
|
+
}
|
|
115
|
+
}), $t = /* @__PURE__ */ v({
|
|
116
|
+
__name: "NbAvatar",
|
|
117
|
+
props: {
|
|
118
|
+
name: {},
|
|
119
|
+
src: {},
|
|
120
|
+
size: { default: "md" },
|
|
121
|
+
tone: { default: "primary" }
|
|
122
|
+
},
|
|
123
|
+
setup(e) {
|
|
124
|
+
const o = e, t = $(() => o.name.trim().split(/\s+/).slice(0, 2).map((s) => s[0]?.toUpperCase()).join(""));
|
|
125
|
+
return (s, l) => (n(), N(a(ne), {
|
|
126
|
+
class: V(["nb-root nb-avatar", [`nb-avatar--${e.size}`, `nb-avatar--${e.tone}`]]),
|
|
127
|
+
role: "img",
|
|
128
|
+
"aria-label": e.name
|
|
129
|
+
}, {
|
|
130
|
+
default: c(() => [
|
|
131
|
+
e.src ? (n(), N(a(oe), {
|
|
132
|
+
key: 0,
|
|
133
|
+
class: "nb-avatar__image",
|
|
134
|
+
src: e.src,
|
|
135
|
+
alt: "",
|
|
136
|
+
"aria-hidden": "true"
|
|
137
|
+
}, null, 8, ["src"])) : h("", !0),
|
|
138
|
+
m(a(se), {
|
|
139
|
+
class: "nb-avatar__fallback",
|
|
140
|
+
"aria-hidden": "true"
|
|
141
|
+
}, {
|
|
142
|
+
default: c(() => [
|
|
143
|
+
B(p(t.value), 1)
|
|
144
|
+
]),
|
|
145
|
+
_: 1
|
|
146
|
+
})
|
|
147
|
+
]),
|
|
148
|
+
_: 1
|
|
149
|
+
}, 8, ["class", "aria-label"]));
|
|
150
|
+
}
|
|
151
|
+
}), Nt = ["aria-label"], It = ["href"], kt = ["aria-current"], Bt = {
|
|
152
|
+
key: 2,
|
|
153
|
+
class: "nb-breadcrumbs__separator",
|
|
154
|
+
viewBox: "0 0 16 16",
|
|
155
|
+
"aria-hidden": "true",
|
|
156
|
+
focusable: "false"
|
|
157
|
+
}, Vt = /* @__PURE__ */ v({
|
|
158
|
+
__name: "NbBreadcrumbs",
|
|
159
|
+
props: {
|
|
160
|
+
items: {},
|
|
161
|
+
label: { default: "Breadcrumb" }
|
|
162
|
+
},
|
|
163
|
+
setup(e) {
|
|
164
|
+
return (o, t) => (n(), i("nav", {
|
|
165
|
+
class: "nb-root nb-breadcrumbs",
|
|
166
|
+
"aria-label": e.label
|
|
167
|
+
}, [
|
|
168
|
+
u("ol", null, [
|
|
169
|
+
(n(!0), i(C, null, P(e.items, (s, l) => (n(), i("li", {
|
|
170
|
+
key: `${s.label}-${l}`
|
|
171
|
+
}, [
|
|
172
|
+
s.href && l < e.items.length - 1 ? (n(), i("a", {
|
|
173
|
+
key: 0,
|
|
174
|
+
href: s.href
|
|
175
|
+
}, p(s.label), 9, It)) : (n(), i("span", {
|
|
176
|
+
key: 1,
|
|
177
|
+
"aria-current": l === e.items.length - 1 ? "page" : void 0
|
|
178
|
+
}, p(s.label), 9, kt)),
|
|
179
|
+
l < e.items.length - 1 ? (n(), i("svg", Bt, [...t[0] || (t[0] = [
|
|
180
|
+
u("path", { d: "m6 3 5 5-5 5" }, null, -1)
|
|
181
|
+
])])) : h("", !0)
|
|
182
|
+
]))), 128))
|
|
183
|
+
])
|
|
184
|
+
], 8, Nt));
|
|
185
|
+
}
|
|
186
|
+
}), wt = ["type", "disabled", "aria-busy"], xt = {
|
|
187
|
+
key: 0,
|
|
188
|
+
class: "nb-button__loader",
|
|
189
|
+
"aria-hidden": "true"
|
|
190
|
+
}, St = /* @__PURE__ */ v({
|
|
191
|
+
inheritAttrs: !1,
|
|
192
|
+
__name: "NbButton",
|
|
193
|
+
props: {
|
|
194
|
+
variant: { default: "primary" },
|
|
195
|
+
size: { default: "md" },
|
|
196
|
+
type: { default: "button" },
|
|
197
|
+
loading: { type: Boolean, default: !1 },
|
|
198
|
+
disabled: { type: Boolean, default: !1 }
|
|
199
|
+
},
|
|
200
|
+
setup(e) {
|
|
201
|
+
const o = e, t = $(() => R(
|
|
202
|
+
`nb-button--${o.variant}`,
|
|
203
|
+
`nb-button--${o.size}`,
|
|
204
|
+
o.loading && "is-loading"
|
|
205
|
+
));
|
|
206
|
+
return (s, l) => (n(), i("button", k(s.$attrs, {
|
|
207
|
+
class: ["nb-root nb-button", t.value],
|
|
208
|
+
type: e.type,
|
|
209
|
+
disabled: e.disabled || e.loading,
|
|
210
|
+
"aria-busy": e.loading || void 0
|
|
211
|
+
}), [
|
|
212
|
+
e.loading ? (n(), i("span", xt, "✦")) : h("", !0),
|
|
213
|
+
u("span", null, [
|
|
214
|
+
_(s.$slots, "default")
|
|
215
|
+
])
|
|
216
|
+
], 16, wt));
|
|
217
|
+
}
|
|
218
|
+
}), Tt = {
|
|
219
|
+
key: 0,
|
|
220
|
+
class: "nb-card__header"
|
|
221
|
+
}, At = { class: "nb-card__body" }, Ct = {
|
|
222
|
+
key: 1,
|
|
223
|
+
class: "nb-card__footer"
|
|
224
|
+
}, Pt = /* @__PURE__ */ v({
|
|
225
|
+
inheritAttrs: !1,
|
|
226
|
+
__name: "NbCard",
|
|
227
|
+
props: {
|
|
228
|
+
tone: { default: "paper" },
|
|
229
|
+
interactive: { type: Boolean, default: !1 }
|
|
230
|
+
},
|
|
231
|
+
setup(e) {
|
|
232
|
+
const o = e, t = $(() => R(
|
|
233
|
+
`nb-card--${o.tone}`,
|
|
234
|
+
o.interactive && "nb-card--interactive"
|
|
235
|
+
));
|
|
236
|
+
return (s, l) => (n(), i("article", k(s.$attrs, {
|
|
237
|
+
class: ["nb-root nb-card", t.value]
|
|
238
|
+
}), [
|
|
239
|
+
s.$slots.header ? (n(), i("header", Tt, [
|
|
240
|
+
_(s.$slots, "header")
|
|
241
|
+
])) : h("", !0),
|
|
242
|
+
u("div", At, [
|
|
243
|
+
_(s.$slots, "default")
|
|
244
|
+
]),
|
|
245
|
+
s.$slots.footer ? (n(), i("footer", Ct, [
|
|
246
|
+
_(s.$slots, "footer")
|
|
247
|
+
])) : h("", !0)
|
|
248
|
+
], 16));
|
|
249
|
+
}
|
|
250
|
+
});
|
|
251
|
+
let z = 0;
|
|
252
|
+
function S(e = "nb") {
|
|
253
|
+
return z += 1, `${e}-${z}`;
|
|
254
|
+
}
|
|
255
|
+
function w(e, o) {
|
|
256
|
+
const t = o ?? S(e);
|
|
257
|
+
return {
|
|
258
|
+
inputId: t,
|
|
259
|
+
hintId: `${t}-hint`,
|
|
260
|
+
errorId: `${t}-error`
|
|
261
|
+
};
|
|
262
|
+
}
|
|
263
|
+
function A(e, o, t, s) {
|
|
264
|
+
return [e && t, o && s].filter(Boolean).join(" ") || void 0;
|
|
265
|
+
}
|
|
266
|
+
const Dt = ["for"], Rt = ["id", "checked", "disabled"], qt = { class: "nb-checkbox__label" }, Ot = /* @__PURE__ */ v({
|
|
267
|
+
inheritAttrs: !1,
|
|
268
|
+
__name: "NbCheckbox",
|
|
269
|
+
props: {
|
|
270
|
+
modelValue: { type: Boolean, default: !1 },
|
|
271
|
+
label: {},
|
|
272
|
+
disabled: { type: Boolean, default: !1 },
|
|
273
|
+
id: {}
|
|
274
|
+
},
|
|
275
|
+
emits: ["update:modelValue"],
|
|
276
|
+
setup(e, { emit: o }) {
|
|
277
|
+
const t = e, s = o, l = w("checkbox", t.id);
|
|
278
|
+
return (b, f) => (n(), i("label", {
|
|
279
|
+
class: "nb-root nb-checkbox",
|
|
280
|
+
for: a(l).inputId
|
|
281
|
+
}, [
|
|
282
|
+
u("input", k(b.$attrs, {
|
|
283
|
+
id: a(l).inputId,
|
|
284
|
+
class: "nb-checkbox__input",
|
|
285
|
+
type: "checkbox",
|
|
286
|
+
checked: e.modelValue,
|
|
287
|
+
disabled: e.disabled,
|
|
288
|
+
onChange: f[0] || (f[0] = (d) => s("update:modelValue", d.target.checked))
|
|
289
|
+
}), null, 16, Rt),
|
|
290
|
+
f[1] || (f[1] = u("span", {
|
|
291
|
+
class: "nb-checkbox__box",
|
|
292
|
+
"aria-hidden": "true"
|
|
293
|
+
}, "✓", -1)),
|
|
294
|
+
u("span", qt, p(e.label), 1)
|
|
295
|
+
], 8, Dt));
|
|
296
|
+
}
|
|
297
|
+
}), Mt = { class: "nb-root nb-field" }, Et = ["for"], Gt = ["id"], Ut = ["id"], zt = /* @__PURE__ */ v({
|
|
298
|
+
inheritAttrs: !1,
|
|
299
|
+
__name: "NbCombobox",
|
|
300
|
+
props: {
|
|
301
|
+
modelValue: { default: "" },
|
|
302
|
+
options: {},
|
|
303
|
+
label: {},
|
|
304
|
+
placeholder: { default: "Search options" },
|
|
305
|
+
emptyText: { default: "No options found" },
|
|
306
|
+
hint: {},
|
|
307
|
+
error: {},
|
|
308
|
+
disabled: { type: Boolean, default: !1 },
|
|
309
|
+
required: { type: Boolean, default: !1 },
|
|
310
|
+
name: {},
|
|
311
|
+
id: {}
|
|
312
|
+
},
|
|
313
|
+
emits: ["update:modelValue"],
|
|
314
|
+
setup(e, { emit: o }) {
|
|
315
|
+
const t = e, s = o, l = w("combobox", t.id), b = $(() => A(t.hint, t.error, l.hintId, l.errorId));
|
|
316
|
+
function f(r) {
|
|
317
|
+
return t.options.find((g) => g.value === r)?.label ?? "";
|
|
318
|
+
}
|
|
319
|
+
function d(r) {
|
|
320
|
+
typeof r == "string" && s("update:modelValue", r);
|
|
321
|
+
}
|
|
322
|
+
return (r, g) => (n(), i("div", Mt, [
|
|
323
|
+
e.label ? (n(), i("label", {
|
|
324
|
+
key: 0,
|
|
325
|
+
class: "nb-field__label",
|
|
326
|
+
for: a(l).inputId
|
|
327
|
+
}, p(e.label), 9, Et)) : h("", !0),
|
|
328
|
+
m(a(ie), {
|
|
329
|
+
"model-value": e.modelValue,
|
|
330
|
+
disabled: e.disabled,
|
|
331
|
+
required: e.required,
|
|
332
|
+
name: e.name,
|
|
333
|
+
"open-on-click": "",
|
|
334
|
+
"onUpdate:modelValue": d
|
|
335
|
+
}, {
|
|
336
|
+
default: c(() => [
|
|
337
|
+
m(a(de), { class: "nb-combobox__anchor" }, {
|
|
338
|
+
default: c(() => [
|
|
339
|
+
m(a(re), k(r.$attrs, {
|
|
340
|
+
id: a(l).inputId,
|
|
341
|
+
class: "nb-combobox__input",
|
|
342
|
+
"display-value": f,
|
|
343
|
+
placeholder: e.placeholder,
|
|
344
|
+
"aria-invalid": e.error ? "true" : void 0,
|
|
345
|
+
"aria-describedby": b.value
|
|
346
|
+
}), null, 16, ["id", "placeholder", "aria-invalid", "aria-describedby"]),
|
|
347
|
+
m(a(ue), {
|
|
348
|
+
class: "nb-combobox__trigger",
|
|
349
|
+
"aria-label": "Show options"
|
|
350
|
+
}, {
|
|
351
|
+
default: c(() => [...g[0] || (g[0] = [
|
|
352
|
+
u("svg", {
|
|
353
|
+
viewBox: "0 0 16 16",
|
|
354
|
+
"aria-hidden": "true",
|
|
355
|
+
focusable: "false"
|
|
356
|
+
}, [
|
|
357
|
+
u("path", { d: "m3 6 5 5 5-5" })
|
|
358
|
+
], -1)
|
|
359
|
+
])]),
|
|
360
|
+
_: 1
|
|
361
|
+
})
|
|
362
|
+
]),
|
|
363
|
+
_: 1
|
|
364
|
+
}),
|
|
365
|
+
m(a(ce), null, {
|
|
366
|
+
default: c(() => [
|
|
367
|
+
m(a(be), {
|
|
368
|
+
class: "nb-root nb-combobox__content",
|
|
369
|
+
position: "popper",
|
|
370
|
+
align: "start",
|
|
371
|
+
"side-offset": 5
|
|
372
|
+
}, {
|
|
373
|
+
default: c(() => [
|
|
374
|
+
m(a(fe), { class: "nb-combobox__viewport" }, {
|
|
375
|
+
default: c(() => [
|
|
376
|
+
m(a(me), { class: "nb-combobox__empty" }, {
|
|
377
|
+
default: c(() => [
|
|
378
|
+
B(p(e.emptyText), 1)
|
|
379
|
+
]),
|
|
380
|
+
_: 1
|
|
381
|
+
}),
|
|
382
|
+
(n(!0), i(C, null, P(e.options, (y) => (n(), N(a(pe), {
|
|
383
|
+
key: y.value,
|
|
384
|
+
class: "nb-combobox__item",
|
|
385
|
+
value: y.value,
|
|
386
|
+
"text-value": y.label,
|
|
387
|
+
disabled: y.disabled,
|
|
388
|
+
"data-value": y.value
|
|
389
|
+
}, {
|
|
390
|
+
default: c(() => [
|
|
391
|
+
u("span", null, p(y.label), 1),
|
|
392
|
+
m(a(he), {
|
|
393
|
+
class: "nb-combobox__indicator",
|
|
394
|
+
"aria-hidden": "true"
|
|
395
|
+
}, {
|
|
396
|
+
default: c(() => [...g[1] || (g[1] = [
|
|
397
|
+
u("svg", {
|
|
398
|
+
viewBox: "0 0 16 16",
|
|
399
|
+
focusable: "false"
|
|
400
|
+
}, [
|
|
401
|
+
u("path", { d: "m3 8 3 3 7-7" })
|
|
402
|
+
], -1)
|
|
403
|
+
])]),
|
|
404
|
+
_: 1
|
|
405
|
+
})
|
|
406
|
+
]),
|
|
407
|
+
_: 2
|
|
408
|
+
}, 1032, ["value", "text-value", "disabled", "data-value"]))), 128))
|
|
409
|
+
]),
|
|
410
|
+
_: 1
|
|
411
|
+
})
|
|
412
|
+
]),
|
|
413
|
+
_: 1
|
|
414
|
+
})
|
|
415
|
+
]),
|
|
416
|
+
_: 1
|
|
417
|
+
})
|
|
418
|
+
]),
|
|
419
|
+
_: 1
|
|
420
|
+
}, 8, ["model-value", "disabled", "required", "name"]),
|
|
421
|
+
e.hint ? (n(), i("span", {
|
|
422
|
+
key: 1,
|
|
423
|
+
id: a(l).hintId,
|
|
424
|
+
class: "nb-field__hint"
|
|
425
|
+
}, p(e.hint), 9, Gt)) : h("", !0),
|
|
426
|
+
e.error ? (n(), i("span", {
|
|
427
|
+
key: 2,
|
|
428
|
+
id: a(l).errorId,
|
|
429
|
+
class: "nb-field__error"
|
|
430
|
+
}, p(e.error), 9, Ut)) : h("", !0)
|
|
431
|
+
]));
|
|
432
|
+
}
|
|
433
|
+
}), Lt = { class: "nb-alert__content" }, Ft = { key: 0 }, jt = /* @__PURE__ */ v({
|
|
434
|
+
__name: "NbAlert",
|
|
435
|
+
props: {
|
|
436
|
+
tone: { default: "info" },
|
|
437
|
+
title: {},
|
|
438
|
+
dismissible: { type: Boolean, default: !1 }
|
|
439
|
+
},
|
|
440
|
+
emits: ["dismiss"],
|
|
441
|
+
setup(e, { emit: o }) {
|
|
442
|
+
const t = e, s = o, l = x(!1), b = $(() => R(`nb-alert--${t.tone}`));
|
|
443
|
+
function f() {
|
|
444
|
+
l.value = !0, s("dismiss");
|
|
445
|
+
}
|
|
446
|
+
return (d, r) => l.value ? h("", !0) : (n(), i("div", {
|
|
447
|
+
key: 0,
|
|
448
|
+
class: V(["nb-root nb-alert", b.value]),
|
|
449
|
+
role: "alert"
|
|
450
|
+
}, [
|
|
451
|
+
u("div", Lt, [
|
|
452
|
+
e.title ? (n(), i("strong", Ft, p(e.title), 1)) : h("", !0),
|
|
453
|
+
u("span", null, [
|
|
454
|
+
_(d.$slots, "default")
|
|
455
|
+
])
|
|
456
|
+
]),
|
|
457
|
+
e.dismissible ? (n(), i("button", {
|
|
458
|
+
key: 0,
|
|
459
|
+
class: "nb-alert__close",
|
|
460
|
+
type: "button",
|
|
461
|
+
"aria-label": "Dismiss",
|
|
462
|
+
onClick: f
|
|
463
|
+
}, "×")) : h("", !0)
|
|
464
|
+
], 2));
|
|
465
|
+
}
|
|
466
|
+
}), Kt = { class: "nb-dialog__header" }, Ht = { class: "nb-dialog__body" }, Xt = {
|
|
467
|
+
key: 0,
|
|
468
|
+
class: "nb-dialog__footer"
|
|
469
|
+
}, Jt = /* @__PURE__ */ v({
|
|
470
|
+
inheritAttrs: !1,
|
|
471
|
+
__name: "NbDialog",
|
|
472
|
+
props: {
|
|
473
|
+
open: { type: Boolean },
|
|
474
|
+
title: {},
|
|
475
|
+
closeOnBackdrop: { type: Boolean, default: !0 }
|
|
476
|
+
},
|
|
477
|
+
emits: ["update:open", "close"],
|
|
478
|
+
setup(e, { emit: o }) {
|
|
479
|
+
const t = e, s = o, b = `${S("dialog")}-title`, f = x(null), d = x(null);
|
|
480
|
+
function r() {
|
|
481
|
+
s("update:open", !1), s("close");
|
|
482
|
+
}
|
|
483
|
+
function g() {
|
|
484
|
+
return Array.from(f.value?.querySelectorAll(
|
|
485
|
+
'button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'
|
|
486
|
+
) ?? []);
|
|
487
|
+
}
|
|
488
|
+
function y(I) {
|
|
489
|
+
if (I.key === "Escape") {
|
|
490
|
+
I.preventDefault(), r();
|
|
491
|
+
return;
|
|
492
|
+
}
|
|
493
|
+
if (I.key !== "Tab") return;
|
|
494
|
+
const T = g();
|
|
495
|
+
if (!T.length) return;
|
|
496
|
+
const O = T[0], U = T[T.length - 1];
|
|
497
|
+
I.shiftKey && document.activeElement === O ? (I.preventDefault(), U.focus()) : !I.shiftKey && document.activeElement === U && (I.preventDefault(), O.focus());
|
|
498
|
+
}
|
|
499
|
+
function q() {
|
|
500
|
+
d.value = document.activeElement instanceof HTMLElement ? document.activeElement : null, document.addEventListener("keydown", y), K(() => (g()[0] ?? f.value)?.focus());
|
|
501
|
+
}
|
|
502
|
+
function G() {
|
|
503
|
+
document.removeEventListener("keydown", y), d.value?.focus(), d.value = null;
|
|
504
|
+
}
|
|
505
|
+
return D(() => t.open, (I) => {
|
|
506
|
+
I ? q() : G();
|
|
507
|
+
}, { immediate: !0 }), F(G), (I, T) => e.open ? (n(), i("div", {
|
|
508
|
+
key: 0,
|
|
509
|
+
class: "nb-root nb-dialog-layer",
|
|
510
|
+
onMousedown: T[0] || (T[0] = j((O) => e.closeOnBackdrop && r(), ["self"]))
|
|
511
|
+
}, [
|
|
512
|
+
u("section", k(I.$attrs, {
|
|
513
|
+
ref_key: "dialogRef",
|
|
514
|
+
ref: f,
|
|
515
|
+
class: "nb-dialog",
|
|
516
|
+
role: "dialog",
|
|
517
|
+
"aria-modal": "true",
|
|
518
|
+
"aria-labelledby": b,
|
|
519
|
+
tabindex: "-1"
|
|
520
|
+
}), [
|
|
521
|
+
u("header", Kt, [
|
|
522
|
+
u("h2", { id: b }, p(e.title), 1),
|
|
523
|
+
u("button", {
|
|
524
|
+
class: "nb-dialog__close",
|
|
525
|
+
type: "button",
|
|
526
|
+
"aria-label": "Close dialog",
|
|
527
|
+
onClick: r
|
|
528
|
+
}, "×")
|
|
529
|
+
]),
|
|
530
|
+
u("div", Ht, [
|
|
531
|
+
_(I.$slots, "default")
|
|
532
|
+
]),
|
|
533
|
+
I.$slots.footer ? (n(), i("footer", Xt, [
|
|
534
|
+
_(I.$slots, "footer")
|
|
535
|
+
])) : h("", !0)
|
|
536
|
+
], 16)
|
|
537
|
+
], 32)) : h("", !0);
|
|
538
|
+
}
|
|
539
|
+
}), Qt = /* @__PURE__ */ v({
|
|
540
|
+
__name: "NbDropdownMenu",
|
|
541
|
+
props: {
|
|
542
|
+
open: { type: Boolean, default: void 0 },
|
|
543
|
+
defaultOpen: { type: Boolean, default: !1 },
|
|
544
|
+
label: { default: "Open menu" },
|
|
545
|
+
align: { default: "start" },
|
|
546
|
+
disabled: { type: Boolean, default: !1 }
|
|
547
|
+
},
|
|
548
|
+
emits: ["update:open"],
|
|
549
|
+
setup(e, { emit: o }) {
|
|
550
|
+
const t = e, s = o, l = x(t.open ?? t.defaultOpen), b = $(() => t.open ?? l.value);
|
|
551
|
+
D(() => t.open, (d) => {
|
|
552
|
+
d !== void 0 && (l.value = d);
|
|
553
|
+
});
|
|
554
|
+
function f(d) {
|
|
555
|
+
l.value = d, s("update:open", d);
|
|
556
|
+
}
|
|
557
|
+
return (d, r) => (n(), N(a(ve), {
|
|
558
|
+
open: b.value,
|
|
559
|
+
"default-open": e.defaultOpen,
|
|
560
|
+
"onUpdate:open": f
|
|
561
|
+
}, {
|
|
562
|
+
default: c(() => [
|
|
563
|
+
m(a(ge), {
|
|
564
|
+
class: "nb-root nb-overlay-trigger",
|
|
565
|
+
"aria-label": e.label,
|
|
566
|
+
disabled: e.disabled
|
|
567
|
+
}, {
|
|
568
|
+
default: c(() => [
|
|
569
|
+
_(d.$slots, "trigger"),
|
|
570
|
+
r[0] || (r[0] = u("svg", {
|
|
571
|
+
class: "nb-overlay-trigger__icon",
|
|
572
|
+
viewBox: "0 0 16 16",
|
|
573
|
+
"aria-hidden": "true",
|
|
574
|
+
focusable: "false"
|
|
575
|
+
}, [
|
|
576
|
+
u("path", { d: "m3 6 5 5 5-5" })
|
|
577
|
+
], -1))
|
|
578
|
+
]),
|
|
579
|
+
_: 3
|
|
580
|
+
}, 8, ["aria-label", "disabled"]),
|
|
581
|
+
m(a(_e), null, {
|
|
582
|
+
default: c(() => [
|
|
583
|
+
m(a(ye), {
|
|
584
|
+
class: "nb-root nb-dropdown-menu",
|
|
585
|
+
align: e.align,
|
|
586
|
+
"side-offset": 8
|
|
587
|
+
}, {
|
|
588
|
+
default: c(() => [
|
|
589
|
+
_(d.$slots, "default")
|
|
590
|
+
]),
|
|
591
|
+
_: 3
|
|
592
|
+
}, 8, ["align"])
|
|
593
|
+
]),
|
|
594
|
+
_: 3
|
|
595
|
+
})
|
|
596
|
+
]),
|
|
597
|
+
_: 3
|
|
598
|
+
}, 8, ["open", "default-open"]));
|
|
599
|
+
}
|
|
600
|
+
}), Wt = /* @__PURE__ */ v({
|
|
601
|
+
__name: "NbDropdownMenuItem",
|
|
602
|
+
props: {
|
|
603
|
+
disabled: { type: Boolean, default: !1 },
|
|
604
|
+
destructive: { type: Boolean, default: !1 }
|
|
605
|
+
},
|
|
606
|
+
emits: ["select"],
|
|
607
|
+
setup(e, { emit: o }) {
|
|
608
|
+
const t = o;
|
|
609
|
+
return (s, l) => (n(), N(a($e), {
|
|
610
|
+
class: V(["nb-dropdown-menu__item", { "nb-dropdown-menu__item--destructive": e.destructive }]),
|
|
611
|
+
disabled: e.disabled,
|
|
612
|
+
onSelect: l[0] || (l[0] = (b) => t("select", b))
|
|
613
|
+
}, {
|
|
614
|
+
default: c(() => [
|
|
615
|
+
_(s.$slots, "default")
|
|
616
|
+
]),
|
|
617
|
+
_: 3
|
|
618
|
+
}, 8, ["class", "disabled"]));
|
|
619
|
+
}
|
|
620
|
+
}), Yt = /* @__PURE__ */ v({
|
|
621
|
+
__name: "NbDropdownMenuSeparator",
|
|
622
|
+
setup(e) {
|
|
623
|
+
return (o, t) => (n(), N(a(Ne), { class: "nb-dropdown-menu__separator" }));
|
|
624
|
+
}
|
|
625
|
+
}), Zt = ["aria-labelledby"], ea = {
|
|
626
|
+
key: 0,
|
|
627
|
+
class: "nb-empty-state__icon",
|
|
628
|
+
"aria-hidden": "true"
|
|
629
|
+
}, ta = ["id"], aa = { key: 1 }, la = {
|
|
630
|
+
key: 2,
|
|
631
|
+
class: "nb-empty-state__action"
|
|
632
|
+
}, na = /* @__PURE__ */ v({
|
|
633
|
+
__name: "NbEmptyState",
|
|
634
|
+
props: {
|
|
635
|
+
title: {},
|
|
636
|
+
description: {}
|
|
637
|
+
},
|
|
638
|
+
setup(e) {
|
|
639
|
+
const o = S("empty-state-title");
|
|
640
|
+
return (t, s) => (n(), i("section", {
|
|
641
|
+
class: "nb-root nb-empty-state",
|
|
642
|
+
role: "region",
|
|
643
|
+
"aria-labelledby": a(o)
|
|
644
|
+
}, [
|
|
645
|
+
t.$slots.icon ? (n(), i("div", ea, [
|
|
646
|
+
_(t.$slots, "icon")
|
|
647
|
+
])) : h("", !0),
|
|
648
|
+
u("h2", { id: a(o) }, p(e.title), 9, ta),
|
|
649
|
+
e.description ? (n(), i("p", aa, p(e.description), 1)) : h("", !0),
|
|
650
|
+
t.$slots.default ? (n(), i("div", la, [
|
|
651
|
+
_(t.$slots, "default")
|
|
652
|
+
])) : h("", !0)
|
|
653
|
+
], 8, Zt));
|
|
654
|
+
}
|
|
655
|
+
}), oa = ["disabled", "aria-describedby"], sa = {
|
|
656
|
+
key: 0,
|
|
657
|
+
class: "nb-fieldset__legend"
|
|
658
|
+
}, ia = { class: "nb-fieldset__content" }, da = /* @__PURE__ */ v({
|
|
659
|
+
__name: "NbFieldset",
|
|
660
|
+
props: {
|
|
661
|
+
legend: {},
|
|
662
|
+
description: {},
|
|
663
|
+
disabled: { type: Boolean, default: !1 }
|
|
664
|
+
},
|
|
665
|
+
setup(e) {
|
|
666
|
+
const o = `${S("fieldset")}-description`;
|
|
667
|
+
return (t, s) => (n(), i("fieldset", {
|
|
668
|
+
class: "nb-root nb-fieldset",
|
|
669
|
+
disabled: e.disabled,
|
|
670
|
+
"aria-describedby": e.description ? o : void 0
|
|
671
|
+
}, [
|
|
672
|
+
e.legend ? (n(), i("legend", sa, p(e.legend), 1)) : h("", !0),
|
|
673
|
+
e.description ? (n(), i("p", {
|
|
674
|
+
key: 1,
|
|
675
|
+
id: o,
|
|
676
|
+
class: "nb-fieldset__description"
|
|
677
|
+
}, p(e.description), 1)) : h("", !0),
|
|
678
|
+
u("div", ia, [
|
|
679
|
+
_(t.$slots, "default")
|
|
680
|
+
])
|
|
681
|
+
], 8, oa));
|
|
682
|
+
}
|
|
683
|
+
}), ra = { class: "nb-root nb-field" }, ua = ["for"], ca = ["id", "value", "disabled", "aria-invalid", "aria-describedby"], ba = ["id"], fa = ["id"], ma = /* @__PURE__ */ v({
|
|
684
|
+
inheritAttrs: !1,
|
|
685
|
+
__name: "NbInput",
|
|
686
|
+
props: {
|
|
687
|
+
modelValue: { default: "" },
|
|
688
|
+
label: {},
|
|
689
|
+
hint: {},
|
|
690
|
+
error: {},
|
|
691
|
+
disabled: { type: Boolean, default: !1 },
|
|
692
|
+
id: {}
|
|
693
|
+
},
|
|
694
|
+
emits: ["update:modelValue"],
|
|
695
|
+
setup(e, { emit: o }) {
|
|
696
|
+
const t = e, s = o, l = w("input", t.id), b = $(() => A(t.hint, t.error, l.hintId, l.errorId));
|
|
697
|
+
return (f, d) => (n(), i("div", ra, [
|
|
698
|
+
e.label ? (n(), i("label", {
|
|
699
|
+
key: 0,
|
|
700
|
+
class: "nb-field__label",
|
|
701
|
+
for: a(l).inputId
|
|
702
|
+
}, p(e.label), 9, ua)) : h("", !0),
|
|
703
|
+
u("input", k(f.$attrs, {
|
|
704
|
+
id: a(l).inputId,
|
|
705
|
+
class: "nb-field__control",
|
|
706
|
+
value: e.modelValue,
|
|
707
|
+
disabled: e.disabled,
|
|
708
|
+
"aria-invalid": e.error ? "true" : void 0,
|
|
709
|
+
"aria-describedby": b.value,
|
|
710
|
+
onInput: d[0] || (d[0] = (r) => s("update:modelValue", r.target.value))
|
|
711
|
+
}), null, 16, ca),
|
|
712
|
+
e.hint ? (n(), i("span", {
|
|
713
|
+
key: 1,
|
|
714
|
+
id: a(l).hintId,
|
|
715
|
+
class: "nb-field__hint"
|
|
716
|
+
}, p(e.hint), 9, ba)) : h("", !0),
|
|
717
|
+
e.error ? (n(), i("span", {
|
|
718
|
+
key: 2,
|
|
719
|
+
id: a(l).errorId,
|
|
720
|
+
class: "nb-field__error"
|
|
721
|
+
}, p(e.error), 9, fa)) : h("", !0)
|
|
722
|
+
]));
|
|
723
|
+
}
|
|
724
|
+
}), pa = { class: "nb-root nb-input-group" }, ha = {
|
|
725
|
+
key: 0,
|
|
726
|
+
class: "nb-input-group__addon"
|
|
727
|
+
}, va = { class: "nb-input-group__control" }, ga = {
|
|
728
|
+
key: 1,
|
|
729
|
+
class: "nb-input-group__addon"
|
|
730
|
+
}, _a = /* @__PURE__ */ v({
|
|
731
|
+
__name: "NbInputGroup",
|
|
732
|
+
setup(e) {
|
|
733
|
+
const o = H();
|
|
734
|
+
return (t, s) => (n(), i("div", pa, [
|
|
735
|
+
a(o).start ? (n(), i("span", ha, [
|
|
736
|
+
_(t.$slots, "start")
|
|
737
|
+
])) : h("", !0),
|
|
738
|
+
u("div", va, [
|
|
739
|
+
_(t.$slots, "default")
|
|
740
|
+
]),
|
|
741
|
+
a(o).end ? (n(), i("span", ga, [
|
|
742
|
+
_(t.$slots, "end")
|
|
743
|
+
])) : h("", !0)
|
|
744
|
+
]));
|
|
745
|
+
}
|
|
746
|
+
}), ya = { class: "nb-root nb-field" }, $a = ["for"], Na = ["id"], Ia = ["id"], ka = /* @__PURE__ */ v({
|
|
747
|
+
inheritAttrs: !1,
|
|
748
|
+
__name: "NbNumberInput",
|
|
749
|
+
props: {
|
|
750
|
+
modelValue: { default: null },
|
|
751
|
+
label: {},
|
|
752
|
+
hint: {},
|
|
753
|
+
error: {},
|
|
754
|
+
disabled: { type: Boolean, default: !1 },
|
|
755
|
+
readonly: { type: Boolean, default: !1 },
|
|
756
|
+
required: { type: Boolean, default: !1 },
|
|
757
|
+
name: {},
|
|
758
|
+
id: {},
|
|
759
|
+
min: {},
|
|
760
|
+
max: {},
|
|
761
|
+
step: { default: 1 }
|
|
762
|
+
},
|
|
763
|
+
emits: ["update:modelValue"],
|
|
764
|
+
setup(e, { emit: o }) {
|
|
765
|
+
const t = e, s = o, l = w("number-input", t.id), b = $(() => A(t.hint, t.error, l.hintId, l.errorId)), f = $(() => t.label ?? "value");
|
|
766
|
+
return (d, r) => (n(), i("div", ya, [
|
|
767
|
+
e.label ? (n(), i("label", {
|
|
768
|
+
key: 0,
|
|
769
|
+
class: "nb-field__label",
|
|
770
|
+
for: a(l).inputId
|
|
771
|
+
}, p(e.label), 9, $a)) : h("", !0),
|
|
772
|
+
m(a(Ie), {
|
|
773
|
+
class: "nb-number-input",
|
|
774
|
+
"model-value": e.modelValue,
|
|
775
|
+
min: e.min,
|
|
776
|
+
max: e.max,
|
|
777
|
+
step: e.step,
|
|
778
|
+
disabled: e.disabled,
|
|
779
|
+
readonly: e.readonly,
|
|
780
|
+
required: e.required,
|
|
781
|
+
name: e.name,
|
|
782
|
+
"onUpdate:modelValue": r[0] || (r[0] = (g) => s("update:modelValue", g))
|
|
783
|
+
}, {
|
|
784
|
+
default: c(() => [
|
|
785
|
+
m(a(ke), {
|
|
786
|
+
class: "nb-number-input__button",
|
|
787
|
+
"aria-label": `Decrease ${f.value}`
|
|
788
|
+
}, {
|
|
789
|
+
default: c(() => [...r[1] || (r[1] = [
|
|
790
|
+
B("−", -1)
|
|
791
|
+
])]),
|
|
792
|
+
_: 1
|
|
793
|
+
}, 8, ["aria-label"]),
|
|
794
|
+
m(a(Be), k(d.$attrs, {
|
|
795
|
+
id: a(l).inputId,
|
|
796
|
+
class: "nb-number-input__input",
|
|
797
|
+
"aria-invalid": e.error ? "true" : void 0,
|
|
798
|
+
"aria-describedby": b.value
|
|
799
|
+
}), null, 16, ["id", "aria-invalid", "aria-describedby"]),
|
|
800
|
+
m(a(Ve), {
|
|
801
|
+
class: "nb-number-input__button",
|
|
802
|
+
"aria-label": `Increase ${f.value}`
|
|
803
|
+
}, {
|
|
804
|
+
default: c(() => [...r[2] || (r[2] = [
|
|
805
|
+
B("+", -1)
|
|
806
|
+
])]),
|
|
807
|
+
_: 1
|
|
808
|
+
}, 8, ["aria-label"])
|
|
809
|
+
]),
|
|
810
|
+
_: 1
|
|
811
|
+
}, 8, ["model-value", "min", "max", "step", "disabled", "readonly", "required", "name"]),
|
|
812
|
+
e.hint ? (n(), i("span", {
|
|
813
|
+
key: 1,
|
|
814
|
+
id: a(l).hintId,
|
|
815
|
+
class: "nb-field__hint"
|
|
816
|
+
}, p(e.hint), 9, Na)) : h("", !0),
|
|
817
|
+
e.error ? (n(), i("span", {
|
|
818
|
+
key: 2,
|
|
819
|
+
id: a(l).errorId,
|
|
820
|
+
class: "nb-field__error"
|
|
821
|
+
}, p(e.error), 9, Ia)) : h("", !0)
|
|
822
|
+
]));
|
|
823
|
+
}
|
|
824
|
+
}), Ba = /* @__PURE__ */ v({
|
|
825
|
+
__name: "NbPagination",
|
|
826
|
+
props: {
|
|
827
|
+
page: {},
|
|
828
|
+
defaultPage: { default: 1 },
|
|
829
|
+
total: {},
|
|
830
|
+
itemsPerPage: { default: 10 },
|
|
831
|
+
siblingCount: { default: 1 },
|
|
832
|
+
disabled: { type: Boolean, default: !1 },
|
|
833
|
+
label: { default: "Pagination" }
|
|
834
|
+
},
|
|
835
|
+
emits: ["update:page"],
|
|
836
|
+
setup(e, { emit: o }) {
|
|
837
|
+
const t = o;
|
|
838
|
+
return (s, l) => (n(), N(a(we), {
|
|
839
|
+
class: "nb-root nb-pagination",
|
|
840
|
+
page: e.page,
|
|
841
|
+
"default-page": e.defaultPage,
|
|
842
|
+
total: e.total,
|
|
843
|
+
"items-per-page": e.itemsPerPage,
|
|
844
|
+
"sibling-count": e.siblingCount,
|
|
845
|
+
disabled: e.disabled,
|
|
846
|
+
"show-edges": "",
|
|
847
|
+
"aria-label": e.label,
|
|
848
|
+
"onUpdate:page": l[0] || (l[0] = (b) => t("update:page", b))
|
|
849
|
+
}, {
|
|
850
|
+
default: c(() => [
|
|
851
|
+
m(a(xe), {
|
|
852
|
+
class: "nb-pagination__button",
|
|
853
|
+
"aria-label": "Go to previous page"
|
|
854
|
+
}, {
|
|
855
|
+
default: c(() => [...l[1] || (l[1] = [
|
|
856
|
+
u("svg", {
|
|
857
|
+
viewBox: "0 0 16 16",
|
|
858
|
+
"aria-hidden": "true",
|
|
859
|
+
focusable: "false"
|
|
860
|
+
}, [
|
|
861
|
+
u("path", { d: "m10 3-5 5 5 5" })
|
|
862
|
+
], -1)
|
|
863
|
+
])]),
|
|
864
|
+
_: 1
|
|
865
|
+
}),
|
|
866
|
+
m(a(Se), { class: "nb-pagination__list" }, {
|
|
867
|
+
default: c(({ items: b }) => [
|
|
868
|
+
(n(!0), i(C, null, P(b, (f, d) => (n(), i(C, {
|
|
869
|
+
key: f.type === "page" ? f.value : `ellipsis-${d}`
|
|
870
|
+
}, [
|
|
871
|
+
f.type === "page" ? (n(), N(a(Te), {
|
|
872
|
+
key: 0,
|
|
873
|
+
class: "nb-pagination__button",
|
|
874
|
+
value: f.value
|
|
875
|
+
}, {
|
|
876
|
+
default: c(() => [
|
|
877
|
+
B(p(f.value), 1)
|
|
878
|
+
]),
|
|
879
|
+
_: 2
|
|
880
|
+
}, 1032, ["value"])) : (n(), N(a(Ae), {
|
|
881
|
+
key: 1,
|
|
882
|
+
class: "nb-pagination__ellipsis"
|
|
883
|
+
}, {
|
|
884
|
+
default: c(() => [...l[2] || (l[2] = [
|
|
885
|
+
B("…", -1)
|
|
886
|
+
])]),
|
|
887
|
+
_: 1
|
|
888
|
+
}))
|
|
889
|
+
], 64))), 128))
|
|
890
|
+
]),
|
|
891
|
+
_: 1
|
|
892
|
+
}),
|
|
893
|
+
m(a(Ce), {
|
|
894
|
+
class: "nb-pagination__button",
|
|
895
|
+
"aria-label": "Go to next page"
|
|
896
|
+
}, {
|
|
897
|
+
default: c(() => [...l[3] || (l[3] = [
|
|
898
|
+
u("svg", {
|
|
899
|
+
viewBox: "0 0 16 16",
|
|
900
|
+
"aria-hidden": "true",
|
|
901
|
+
focusable: "false"
|
|
902
|
+
}, [
|
|
903
|
+
u("path", { d: "m6 3 5 5-5 5" })
|
|
904
|
+
], -1)
|
|
905
|
+
])]),
|
|
906
|
+
_: 1
|
|
907
|
+
})
|
|
908
|
+
]),
|
|
909
|
+
_: 1
|
|
910
|
+
}, 8, ["page", "default-page", "total", "items-per-page", "sibling-count", "disabled", "aria-label"]));
|
|
911
|
+
}
|
|
912
|
+
}), Va = {
|
|
913
|
+
key: 0,
|
|
914
|
+
class: "nb-popover__header"
|
|
915
|
+
}, wa = ["id"], xa = { class: "nb-popover__body" }, Sa = /* @__PURE__ */ v({
|
|
916
|
+
__name: "NbPopover",
|
|
917
|
+
props: {
|
|
918
|
+
open: { type: Boolean, default: void 0 },
|
|
919
|
+
defaultOpen: { type: Boolean, default: !1 },
|
|
920
|
+
title: {},
|
|
921
|
+
align: { default: "center" },
|
|
922
|
+
side: { default: "bottom" },
|
|
923
|
+
disabled: { type: Boolean, default: !1 }
|
|
924
|
+
},
|
|
925
|
+
emits: ["update:open"],
|
|
926
|
+
setup(e, { emit: o }) {
|
|
927
|
+
const t = e, s = o, l = S("popover-title"), b = x(t.open ?? t.defaultOpen), f = $(() => t.open ?? b.value);
|
|
928
|
+
D(() => t.open, (r) => {
|
|
929
|
+
r !== void 0 && (b.value = r);
|
|
930
|
+
});
|
|
931
|
+
function d(r) {
|
|
932
|
+
b.value = r, s("update:open", r);
|
|
933
|
+
}
|
|
934
|
+
return (r, g) => (n(), N(a(Pe), {
|
|
935
|
+
open: f.value,
|
|
936
|
+
"default-open": e.defaultOpen,
|
|
937
|
+
"onUpdate:open": d
|
|
938
|
+
}, {
|
|
939
|
+
default: c(() => [
|
|
940
|
+
m(a(De), {
|
|
941
|
+
class: "nb-root nb-overlay-trigger",
|
|
942
|
+
disabled: e.disabled
|
|
943
|
+
}, {
|
|
944
|
+
default: c(() => [
|
|
945
|
+
_(r.$slots, "trigger")
|
|
946
|
+
]),
|
|
947
|
+
_: 3
|
|
948
|
+
}, 8, ["disabled"]),
|
|
949
|
+
m(a(Re), null, {
|
|
950
|
+
default: c(() => [
|
|
951
|
+
m(a(qe), {
|
|
952
|
+
class: "nb-root nb-popover",
|
|
953
|
+
align: e.align,
|
|
954
|
+
side: e.side,
|
|
955
|
+
"side-offset": 8,
|
|
956
|
+
"aria-labelledby": e.title ? a(l) : void 0
|
|
957
|
+
}, {
|
|
958
|
+
default: c(() => [
|
|
959
|
+
e.title ? (n(), i("header", Va, [
|
|
960
|
+
u("h2", { id: a(l) }, p(e.title), 9, wa),
|
|
961
|
+
m(a(Oe), {
|
|
962
|
+
class: "nb-overlay-close",
|
|
963
|
+
"aria-label": "Close popover"
|
|
964
|
+
}, {
|
|
965
|
+
default: c(() => [...g[0] || (g[0] = [
|
|
966
|
+
B("×", -1)
|
|
967
|
+
])]),
|
|
968
|
+
_: 1
|
|
969
|
+
})
|
|
970
|
+
])) : h("", !0),
|
|
971
|
+
u("div", xa, [
|
|
972
|
+
_(r.$slots, "default")
|
|
973
|
+
])
|
|
974
|
+
]),
|
|
975
|
+
_: 3
|
|
976
|
+
}, 8, ["align", "side", "aria-labelledby"])
|
|
977
|
+
]),
|
|
978
|
+
_: 3
|
|
979
|
+
})
|
|
980
|
+
]),
|
|
981
|
+
_: 3
|
|
982
|
+
}, 8, ["open", "default-open"]));
|
|
983
|
+
}
|
|
984
|
+
}), Ta = { class: "nb-root nb-progress-wrap" }, Aa = {
|
|
985
|
+
key: 0,
|
|
986
|
+
class: "nb-progress__header"
|
|
987
|
+
}, Ca = /* @__PURE__ */ v({
|
|
988
|
+
__name: "NbProgress",
|
|
989
|
+
props: {
|
|
990
|
+
value: { default: null },
|
|
991
|
+
max: { default: 100 },
|
|
992
|
+
label: { default: "Progress" },
|
|
993
|
+
showValue: { type: Boolean, default: !1 }
|
|
994
|
+
},
|
|
995
|
+
setup(e) {
|
|
996
|
+
const o = e, t = $(() => o.value === null ? 0 : Math.min(100, Math.max(0, o.value / o.max * 100)));
|
|
997
|
+
return (s, l) => (n(), i("div", Ta, [
|
|
998
|
+
e.showValue ? (n(), i("div", Aa, [
|
|
999
|
+
u("span", null, p(e.label), 1),
|
|
1000
|
+
u("span", null, p(Math.round(t.value)) + "%", 1)
|
|
1001
|
+
])) : h("", !0),
|
|
1002
|
+
m(a(Me), {
|
|
1003
|
+
class: "nb-progress",
|
|
1004
|
+
"model-value": e.value,
|
|
1005
|
+
max: e.max,
|
|
1006
|
+
"get-value-label": () => e.label
|
|
1007
|
+
}, {
|
|
1008
|
+
default: c(() => [
|
|
1009
|
+
m(a(Ee), {
|
|
1010
|
+
class: "nb-progress__indicator",
|
|
1011
|
+
style: M(e.value === null ? void 0 : { transform: `translateX(-${100 - t.value}%)` })
|
|
1012
|
+
}, null, 8, ["style"])
|
|
1013
|
+
]),
|
|
1014
|
+
_: 1
|
|
1015
|
+
}, 8, ["model-value", "max", "get-value-label"])
|
|
1016
|
+
]));
|
|
1017
|
+
}
|
|
1018
|
+
}), Pa = ["disabled", "aria-describedby"], Da = {
|
|
1019
|
+
key: 0,
|
|
1020
|
+
class: "nb-radio-group__legend"
|
|
1021
|
+
}, Ra = { class: "nb-radio-group__options" }, qa = ["for"], Oa = ["id", "name", "value", "checked", "disabled", "onChange"], Ma = { class: "nb-radio__content" }, Ea = { class: "nb-radio__label" }, Ga = {
|
|
1022
|
+
key: 0,
|
|
1023
|
+
class: "nb-radio__description"
|
|
1024
|
+
}, Ua = /* @__PURE__ */ v({
|
|
1025
|
+
__name: "NbRadioGroup",
|
|
1026
|
+
props: {
|
|
1027
|
+
modelValue: { default: "" },
|
|
1028
|
+
name: {},
|
|
1029
|
+
label: {},
|
|
1030
|
+
hint: {},
|
|
1031
|
+
disabled: { type: Boolean, default: !1 },
|
|
1032
|
+
options: {}
|
|
1033
|
+
},
|
|
1034
|
+
emits: ["update:modelValue"],
|
|
1035
|
+
setup(e, { emit: o }) {
|
|
1036
|
+
const t = e, s = o, l = S("radio-group"), b = t.name ?? l, f = `${l}-hint`;
|
|
1037
|
+
return (d, r) => (n(), i("fieldset", {
|
|
1038
|
+
class: "nb-root nb-radio-group",
|
|
1039
|
+
disabled: e.disabled,
|
|
1040
|
+
"aria-describedby": e.hint ? f : void 0
|
|
1041
|
+
}, [
|
|
1042
|
+
e.label ? (n(), i("legend", Da, p(e.label), 1)) : h("", !0),
|
|
1043
|
+
e.hint ? (n(), i("p", {
|
|
1044
|
+
key: 1,
|
|
1045
|
+
id: f,
|
|
1046
|
+
class: "nb-field__hint nb-radio-group__hint"
|
|
1047
|
+
}, p(e.hint), 1)) : h("", !0),
|
|
1048
|
+
u("div", Ra, [
|
|
1049
|
+
(n(!0), i(C, null, P(e.options, (g, y) => (n(), i("label", {
|
|
1050
|
+
key: g.value,
|
|
1051
|
+
class: V(["nb-radio", { "is-checked": e.modelValue === g.value }]),
|
|
1052
|
+
for: `${a(l)}-${y}`
|
|
1053
|
+
}, [
|
|
1054
|
+
u("input", {
|
|
1055
|
+
id: `${a(l)}-${y}`,
|
|
1056
|
+
class: "nb-radio__input",
|
|
1057
|
+
type: "radio",
|
|
1058
|
+
name: a(b),
|
|
1059
|
+
value: g.value,
|
|
1060
|
+
checked: e.modelValue === g.value,
|
|
1061
|
+
disabled: e.disabled || g.disabled,
|
|
1062
|
+
onChange: (q) => s("update:modelValue", g.value)
|
|
1063
|
+
}, null, 40, Oa),
|
|
1064
|
+
r[0] || (r[0] = u("span", {
|
|
1065
|
+
class: "nb-radio__mark",
|
|
1066
|
+
"aria-hidden": "true"
|
|
1067
|
+
}, null, -1)),
|
|
1068
|
+
u("span", Ma, [
|
|
1069
|
+
u("span", Ea, p(g.label), 1),
|
|
1070
|
+
g.description ? (n(), i("span", Ga, p(g.description), 1)) : h("", !0)
|
|
1071
|
+
])
|
|
1072
|
+
], 10, qa))), 128))
|
|
1073
|
+
])
|
|
1074
|
+
], 8, Pa));
|
|
1075
|
+
}
|
|
1076
|
+
}), za = /* @__PURE__ */ v({
|
|
1077
|
+
__name: "NbScrollArea",
|
|
1078
|
+
props: {
|
|
1079
|
+
label: { default: "Scrollable content" },
|
|
1080
|
+
height: { default: "16rem" },
|
|
1081
|
+
type: { default: "hover" }
|
|
1082
|
+
},
|
|
1083
|
+
setup(e) {
|
|
1084
|
+
return (o, t) => (n(), N(a(Ge), {
|
|
1085
|
+
class: "nb-root nb-scroll-area",
|
|
1086
|
+
type: e.type,
|
|
1087
|
+
style: M({ height: e.height })
|
|
1088
|
+
}, {
|
|
1089
|
+
default: c(() => [
|
|
1090
|
+
m(a(Ue), {
|
|
1091
|
+
class: "nb-scroll-area__viewport",
|
|
1092
|
+
"aria-label": e.label
|
|
1093
|
+
}, {
|
|
1094
|
+
default: c(() => [
|
|
1095
|
+
_(o.$slots, "default")
|
|
1096
|
+
]),
|
|
1097
|
+
_: 3
|
|
1098
|
+
}, 8, ["aria-label"]),
|
|
1099
|
+
m(a(ze), {
|
|
1100
|
+
class: "nb-scroll-area__scrollbar",
|
|
1101
|
+
orientation: "vertical"
|
|
1102
|
+
}, {
|
|
1103
|
+
default: c(() => [
|
|
1104
|
+
m(a(Le), { class: "nb-scroll-area__thumb" })
|
|
1105
|
+
]),
|
|
1106
|
+
_: 1
|
|
1107
|
+
})
|
|
1108
|
+
]),
|
|
1109
|
+
_: 3
|
|
1110
|
+
}, 8, ["type", "style"]));
|
|
1111
|
+
}
|
|
1112
|
+
}), La = { class: "nb-root nb-field" }, Fa = ["for"], ja = ["id"], Ka = ["id"], Ha = /* @__PURE__ */ v({
|
|
1113
|
+
inheritAttrs: !1,
|
|
1114
|
+
__name: "NbSelect",
|
|
1115
|
+
props: {
|
|
1116
|
+
modelValue: { default: "" },
|
|
1117
|
+
label: {},
|
|
1118
|
+
placeholder: { default: "Select an option" },
|
|
1119
|
+
hint: {},
|
|
1120
|
+
error: {},
|
|
1121
|
+
disabled: { type: Boolean, default: !1 },
|
|
1122
|
+
required: { type: Boolean, default: !1 },
|
|
1123
|
+
name: {},
|
|
1124
|
+
id: {}
|
|
1125
|
+
},
|
|
1126
|
+
emits: ["update:modelValue"],
|
|
1127
|
+
setup(e, { emit: o }) {
|
|
1128
|
+
const t = e, s = o, l = w("select", t.id), b = $(() => A(t.hint, t.error, l.hintId, l.errorId));
|
|
1129
|
+
function f(d) {
|
|
1130
|
+
typeof d == "string" && s("update:modelValue", d);
|
|
1131
|
+
}
|
|
1132
|
+
return (d, r) => (n(), i("div", La, [
|
|
1133
|
+
e.label ? (n(), i("label", {
|
|
1134
|
+
key: 0,
|
|
1135
|
+
class: "nb-field__label",
|
|
1136
|
+
for: a(l).inputId
|
|
1137
|
+
}, p(e.label), 9, Fa)) : h("", !0),
|
|
1138
|
+
m(a(Fe), {
|
|
1139
|
+
"model-value": e.modelValue,
|
|
1140
|
+
disabled: e.disabled,
|
|
1141
|
+
required: e.required,
|
|
1142
|
+
name: e.name,
|
|
1143
|
+
"onUpdate:modelValue": f
|
|
1144
|
+
}, {
|
|
1145
|
+
default: c(() => [
|
|
1146
|
+
m(a(je), k(d.$attrs, {
|
|
1147
|
+
id: a(l).inputId,
|
|
1148
|
+
class: "nb-select__trigger",
|
|
1149
|
+
"aria-invalid": e.error ? "true" : void 0,
|
|
1150
|
+
"aria-describedby": b.value
|
|
1151
|
+
}), {
|
|
1152
|
+
default: c(() => [
|
|
1153
|
+
m(a(Ke), { placeholder: e.placeholder }, null, 8, ["placeholder"]),
|
|
1154
|
+
m(a(He), {
|
|
1155
|
+
class: "nb-select__icon",
|
|
1156
|
+
"aria-hidden": "true"
|
|
1157
|
+
}, {
|
|
1158
|
+
default: c(() => [...r[0] || (r[0] = [
|
|
1159
|
+
u("svg", {
|
|
1160
|
+
viewBox: "0 0 16 16",
|
|
1161
|
+
focusable: "false"
|
|
1162
|
+
}, [
|
|
1163
|
+
u("path", { d: "m3 6 5 5 5-5" })
|
|
1164
|
+
], -1)
|
|
1165
|
+
])]),
|
|
1166
|
+
_: 1
|
|
1167
|
+
})
|
|
1168
|
+
]),
|
|
1169
|
+
_: 1
|
|
1170
|
+
}, 16, ["id", "aria-invalid", "aria-describedby"]),
|
|
1171
|
+
m(a(Xe), null, {
|
|
1172
|
+
default: c(() => [
|
|
1173
|
+
m(a(Je), {
|
|
1174
|
+
class: "nb-root nb-select__content",
|
|
1175
|
+
position: "popper",
|
|
1176
|
+
"side-offset": 5
|
|
1177
|
+
}, {
|
|
1178
|
+
default: c(() => [
|
|
1179
|
+
m(a(Qe), {
|
|
1180
|
+
class: "nb-select__scroll-button",
|
|
1181
|
+
"aria-label": "Scroll up"
|
|
1182
|
+
}, {
|
|
1183
|
+
default: c(() => [...r[1] || (r[1] = [
|
|
1184
|
+
u("svg", {
|
|
1185
|
+
viewBox: "0 0 16 16",
|
|
1186
|
+
"aria-hidden": "true",
|
|
1187
|
+
focusable: "false"
|
|
1188
|
+
}, [
|
|
1189
|
+
u("path", { d: "m3 10 5-5 5 5" })
|
|
1190
|
+
], -1)
|
|
1191
|
+
])]),
|
|
1192
|
+
_: 1
|
|
1193
|
+
}),
|
|
1194
|
+
m(a(We), { class: "nb-select__viewport" }, {
|
|
1195
|
+
default: c(() => [
|
|
1196
|
+
_(d.$slots, "default")
|
|
1197
|
+
]),
|
|
1198
|
+
_: 3
|
|
1199
|
+
}),
|
|
1200
|
+
m(a(Ye), {
|
|
1201
|
+
class: "nb-select__scroll-button",
|
|
1202
|
+
"aria-label": "Scroll down"
|
|
1203
|
+
}, {
|
|
1204
|
+
default: c(() => [...r[2] || (r[2] = [
|
|
1205
|
+
u("svg", {
|
|
1206
|
+
viewBox: "0 0 16 16",
|
|
1207
|
+
"aria-hidden": "true",
|
|
1208
|
+
focusable: "false"
|
|
1209
|
+
}, [
|
|
1210
|
+
u("path", { d: "m3 6 5 5 5-5" })
|
|
1211
|
+
], -1)
|
|
1212
|
+
])]),
|
|
1213
|
+
_: 1
|
|
1214
|
+
})
|
|
1215
|
+
]),
|
|
1216
|
+
_: 3
|
|
1217
|
+
})
|
|
1218
|
+
]),
|
|
1219
|
+
_: 3
|
|
1220
|
+
})
|
|
1221
|
+
]),
|
|
1222
|
+
_: 3
|
|
1223
|
+
}, 8, ["model-value", "disabled", "required", "name"]),
|
|
1224
|
+
e.hint ? (n(), i("span", {
|
|
1225
|
+
key: 1,
|
|
1226
|
+
id: a(l).hintId,
|
|
1227
|
+
class: "nb-field__hint"
|
|
1228
|
+
}, p(e.hint), 9, ja)) : h("", !0),
|
|
1229
|
+
e.error ? (n(), i("span", {
|
|
1230
|
+
key: 2,
|
|
1231
|
+
id: a(l).errorId,
|
|
1232
|
+
class: "nb-field__error"
|
|
1233
|
+
}, p(e.error), 9, Ka)) : h("", !0)
|
|
1234
|
+
]));
|
|
1235
|
+
}
|
|
1236
|
+
}), Xa = /* @__PURE__ */ v({
|
|
1237
|
+
__name: "NbSelectItem",
|
|
1238
|
+
props: {
|
|
1239
|
+
value: {},
|
|
1240
|
+
disabled: { type: Boolean, default: !1 }
|
|
1241
|
+
},
|
|
1242
|
+
setup(e) {
|
|
1243
|
+
return (o, t) => (n(), N(a(Ze), {
|
|
1244
|
+
class: "nb-select__item",
|
|
1245
|
+
value: e.value,
|
|
1246
|
+
disabled: e.disabled,
|
|
1247
|
+
"data-value": e.value
|
|
1248
|
+
}, {
|
|
1249
|
+
default: c(() => [
|
|
1250
|
+
m(a(et), null, {
|
|
1251
|
+
default: c(() => [
|
|
1252
|
+
_(o.$slots, "default")
|
|
1253
|
+
]),
|
|
1254
|
+
_: 3
|
|
1255
|
+
}),
|
|
1256
|
+
m(a(tt), {
|
|
1257
|
+
class: "nb-select__indicator",
|
|
1258
|
+
"aria-hidden": "true"
|
|
1259
|
+
}, {
|
|
1260
|
+
default: c(() => [...t[0] || (t[0] = [
|
|
1261
|
+
u("svg", {
|
|
1262
|
+
viewBox: "0 0 16 16",
|
|
1263
|
+
focusable: "false"
|
|
1264
|
+
}, [
|
|
1265
|
+
u("path", { d: "m2.5 8.5 3.5 3.5 7.5-8" })
|
|
1266
|
+
], -1)
|
|
1267
|
+
])]),
|
|
1268
|
+
_: 1
|
|
1269
|
+
})
|
|
1270
|
+
]),
|
|
1271
|
+
_: 3
|
|
1272
|
+
}, 8, ["value", "disabled", "data-value"]));
|
|
1273
|
+
}
|
|
1274
|
+
}), Ja = /* @__PURE__ */ v({
|
|
1275
|
+
__name: "NbSeparator",
|
|
1276
|
+
props: {
|
|
1277
|
+
orientation: { default: "horizontal" },
|
|
1278
|
+
decorative: { type: Boolean, default: !0 }
|
|
1279
|
+
},
|
|
1280
|
+
setup(e) {
|
|
1281
|
+
return (o, t) => (n(), N(a(at), {
|
|
1282
|
+
class: "nb-root nb-separator",
|
|
1283
|
+
orientation: e.orientation,
|
|
1284
|
+
decorative: e.decorative
|
|
1285
|
+
}, null, 8, ["orientation", "decorative"]));
|
|
1286
|
+
}
|
|
1287
|
+
}), Qa = { class: "nb-root nb-field" }, Wa = {
|
|
1288
|
+
key: 0,
|
|
1289
|
+
class: "nb-slider__header"
|
|
1290
|
+
}, Ya = {
|
|
1291
|
+
key: 1,
|
|
1292
|
+
class: "nb-slider__value"
|
|
1293
|
+
}, Za = ["id"], el = ["id"], tl = /* @__PURE__ */ v({
|
|
1294
|
+
inheritAttrs: !1,
|
|
1295
|
+
__name: "NbSlider",
|
|
1296
|
+
props: {
|
|
1297
|
+
modelValue: { default: 0 },
|
|
1298
|
+
label: {},
|
|
1299
|
+
hint: {},
|
|
1300
|
+
error: {},
|
|
1301
|
+
disabled: { type: Boolean, default: !1 },
|
|
1302
|
+
required: { type: Boolean, default: !1 },
|
|
1303
|
+
name: {},
|
|
1304
|
+
id: {},
|
|
1305
|
+
min: { default: 0 },
|
|
1306
|
+
max: { default: 100 },
|
|
1307
|
+
step: { default: 1 },
|
|
1308
|
+
showValue: { type: Boolean, default: !0 }
|
|
1309
|
+
},
|
|
1310
|
+
emits: ["update:modelValue", "change"],
|
|
1311
|
+
setup(e, { emit: o }) {
|
|
1312
|
+
const t = e, s = o, l = w("slider", t.id), b = `${l.inputId}-label`, f = $(() => A(t.hint, t.error, l.hintId, l.errorId));
|
|
1313
|
+
function d(g) {
|
|
1314
|
+
g?.[0] !== void 0 && s("update:modelValue", g[0]);
|
|
1315
|
+
}
|
|
1316
|
+
function r(g) {
|
|
1317
|
+
g[0] !== void 0 && s("change", g[0]);
|
|
1318
|
+
}
|
|
1319
|
+
return (g, y) => (n(), i("div", Qa, [
|
|
1320
|
+
e.label || e.showValue ? (n(), i("div", Wa, [
|
|
1321
|
+
e.label ? (n(), i("span", {
|
|
1322
|
+
key: 0,
|
|
1323
|
+
id: b,
|
|
1324
|
+
class: "nb-field__label"
|
|
1325
|
+
}, p(e.label), 1)) : h("", !0),
|
|
1326
|
+
e.showValue ? (n(), i("output", Ya, p(e.modelValue), 1)) : h("", !0)
|
|
1327
|
+
])) : h("", !0),
|
|
1328
|
+
m(a(lt), {
|
|
1329
|
+
class: "nb-slider",
|
|
1330
|
+
"model-value": [e.modelValue],
|
|
1331
|
+
min: e.min,
|
|
1332
|
+
max: e.max,
|
|
1333
|
+
step: e.step,
|
|
1334
|
+
disabled: e.disabled,
|
|
1335
|
+
required: e.required,
|
|
1336
|
+
name: e.name,
|
|
1337
|
+
"onUpdate:modelValue": d,
|
|
1338
|
+
onValueCommit: r
|
|
1339
|
+
}, {
|
|
1340
|
+
default: c(() => [
|
|
1341
|
+
m(a(nt), { class: "nb-slider__track" }, {
|
|
1342
|
+
default: c(() => [
|
|
1343
|
+
m(a(ot), { class: "nb-slider__range" })
|
|
1344
|
+
]),
|
|
1345
|
+
_: 1
|
|
1346
|
+
}),
|
|
1347
|
+
m(a(st), k(g.$attrs, {
|
|
1348
|
+
id: a(l).inputId,
|
|
1349
|
+
class: "nb-slider__thumb",
|
|
1350
|
+
"aria-labelledby": e.label ? b : void 0,
|
|
1351
|
+
"aria-invalid": e.error ? "true" : void 0,
|
|
1352
|
+
"aria-describedby": f.value
|
|
1353
|
+
}), null, 16, ["id", "aria-labelledby", "aria-invalid", "aria-describedby"])
|
|
1354
|
+
]),
|
|
1355
|
+
_: 1
|
|
1356
|
+
}, 8, ["model-value", "min", "max", "step", "disabled", "required", "name"]),
|
|
1357
|
+
e.hint ? (n(), i("span", {
|
|
1358
|
+
key: 1,
|
|
1359
|
+
id: a(l).hintId,
|
|
1360
|
+
class: "nb-field__hint"
|
|
1361
|
+
}, p(e.hint), 9, Za)) : h("", !0),
|
|
1362
|
+
e.error ? (n(), i("span", {
|
|
1363
|
+
key: 2,
|
|
1364
|
+
id: a(l).errorId,
|
|
1365
|
+
class: "nb-field__error"
|
|
1366
|
+
}, p(e.error), 9, el)) : h("", !0)
|
|
1367
|
+
]));
|
|
1368
|
+
}
|
|
1369
|
+
}), al = /* @__PURE__ */ v({
|
|
1370
|
+
__name: "NbSkeleton",
|
|
1371
|
+
props: {
|
|
1372
|
+
width: { default: "100%" },
|
|
1373
|
+
height: { default: "1rem" },
|
|
1374
|
+
rounded: { type: Boolean, default: !1 }
|
|
1375
|
+
},
|
|
1376
|
+
setup(e) {
|
|
1377
|
+
const o = e, t = $(() => ({ width: o.width, height: o.height }));
|
|
1378
|
+
return (s, l) => (n(), i("div", {
|
|
1379
|
+
class: V(["nb-root nb-skeleton", { "nb-skeleton--rounded": e.rounded }]),
|
|
1380
|
+
style: M(t.value),
|
|
1381
|
+
"aria-hidden": "true"
|
|
1382
|
+
}, null, 6));
|
|
1383
|
+
}
|
|
1384
|
+
}), ll = ["aria-label"], nl = /* @__PURE__ */ v({
|
|
1385
|
+
__name: "NbSpinner",
|
|
1386
|
+
props: {
|
|
1387
|
+
label: { default: "Loading" },
|
|
1388
|
+
size: { default: "md" }
|
|
1389
|
+
},
|
|
1390
|
+
setup(e) {
|
|
1391
|
+
return (o, t) => (n(), i("span", {
|
|
1392
|
+
class: "nb-root nb-spinner-wrap",
|
|
1393
|
+
role: "status",
|
|
1394
|
+
"aria-label": e.label
|
|
1395
|
+
}, [
|
|
1396
|
+
u("span", {
|
|
1397
|
+
class: V(["nb-spinner", `nb-spinner--${e.size}`]),
|
|
1398
|
+
"aria-hidden": "true"
|
|
1399
|
+
}, null, 2)
|
|
1400
|
+
], 8, ll));
|
|
1401
|
+
}
|
|
1402
|
+
}), ol = ["for"], sl = ["id", "checked", "disabled", "aria-checked", "aria-describedby"], il = { class: "nb-switch__content" }, dl = { class: "nb-switch__label" }, rl = ["id"], ul = /* @__PURE__ */ v({
|
|
1403
|
+
inheritAttrs: !1,
|
|
1404
|
+
__name: "NbSwitch",
|
|
1405
|
+
props: {
|
|
1406
|
+
modelValue: { type: Boolean, default: !1 },
|
|
1407
|
+
label: {},
|
|
1408
|
+
description: {},
|
|
1409
|
+
disabled: { type: Boolean, default: !1 },
|
|
1410
|
+
id: {}
|
|
1411
|
+
},
|
|
1412
|
+
emits: ["update:modelValue"],
|
|
1413
|
+
setup(e, { emit: o }) {
|
|
1414
|
+
const t = e, s = o, l = w("switch", t.id);
|
|
1415
|
+
return (b, f) => (n(), i("label", {
|
|
1416
|
+
class: V(["nb-root nb-switch", { "is-disabled": e.disabled }]),
|
|
1417
|
+
for: a(l).inputId
|
|
1418
|
+
}, [
|
|
1419
|
+
u("input", k(b.$attrs, {
|
|
1420
|
+
id: a(l).inputId,
|
|
1421
|
+
class: "nb-switch__input",
|
|
1422
|
+
type: "checkbox",
|
|
1423
|
+
role: "switch",
|
|
1424
|
+
checked: e.modelValue,
|
|
1425
|
+
disabled: e.disabled,
|
|
1426
|
+
"aria-checked": e.modelValue ? "true" : "false",
|
|
1427
|
+
"aria-describedby": e.description ? a(l).hintId : void 0,
|
|
1428
|
+
onChange: f[0] || (f[0] = (d) => s("update:modelValue", d.target.checked))
|
|
1429
|
+
}), null, 16, sl),
|
|
1430
|
+
f[1] || (f[1] = u("span", {
|
|
1431
|
+
class: "nb-switch__track",
|
|
1432
|
+
"aria-hidden": "true"
|
|
1433
|
+
}, [
|
|
1434
|
+
u("span", { class: "nb-switch__thumb" })
|
|
1435
|
+
], -1)),
|
|
1436
|
+
u("span", il, [
|
|
1437
|
+
u("span", dl, p(e.label), 1),
|
|
1438
|
+
e.description ? (n(), i("span", {
|
|
1439
|
+
key: 0,
|
|
1440
|
+
id: a(l).hintId,
|
|
1441
|
+
class: "nb-switch__description"
|
|
1442
|
+
}, p(e.description), 9, rl)) : h("", !0)
|
|
1443
|
+
])
|
|
1444
|
+
], 10, ol));
|
|
1445
|
+
}
|
|
1446
|
+
}), L = /* @__PURE__ */ Symbol("nb-tabs");
|
|
1447
|
+
function E() {
|
|
1448
|
+
const e = X(L);
|
|
1449
|
+
if (!e) throw new Error("Tabs components must be used inside NbTabs");
|
|
1450
|
+
return e;
|
|
1451
|
+
}
|
|
1452
|
+
const cl = ["data-orientation"], bl = /* @__PURE__ */ v({
|
|
1453
|
+
__name: "NbTabs",
|
|
1454
|
+
props: {
|
|
1455
|
+
modelValue: {},
|
|
1456
|
+
defaultValue: { default: "" },
|
|
1457
|
+
orientation: { default: "horizontal" }
|
|
1458
|
+
},
|
|
1459
|
+
emits: ["update:modelValue"],
|
|
1460
|
+
setup(e, { emit: o }) {
|
|
1461
|
+
const t = e, s = o, l = S("tabs"), b = x(t.defaultValue), f = $(() => t.modelValue ?? b.value), d = $(() => t.orientation), r = (y) => encodeURIComponent(y);
|
|
1462
|
+
function g(y) {
|
|
1463
|
+
t.modelValue === void 0 && (b.value = y), s("update:modelValue", y);
|
|
1464
|
+
}
|
|
1465
|
+
return J(L, {
|
|
1466
|
+
activeValue: f,
|
|
1467
|
+
orientation: d,
|
|
1468
|
+
select: g,
|
|
1469
|
+
triggerId: (y) => `${l}-tab-${r(y)}`,
|
|
1470
|
+
panelId: (y) => `${l}-panel-${r(y)}`
|
|
1471
|
+
}), (y, q) => (n(), i("div", {
|
|
1472
|
+
class: V(["nb-root nb-tabs", `nb-tabs--${d.value}`]),
|
|
1473
|
+
"data-orientation": d.value
|
|
1474
|
+
}, [
|
|
1475
|
+
_(y.$slots, "default")
|
|
1476
|
+
], 10, cl));
|
|
1477
|
+
}
|
|
1478
|
+
}), fl = ["id", "aria-labelledby", "hidden"], ml = /* @__PURE__ */ v({
|
|
1479
|
+
__name: "NbTabsContent",
|
|
1480
|
+
props: {
|
|
1481
|
+
value: {}
|
|
1482
|
+
},
|
|
1483
|
+
setup(e) {
|
|
1484
|
+
const o = e, t = E(), s = $(() => t.activeValue.value === o.value);
|
|
1485
|
+
return (l, b) => Q((n(), i("div", {
|
|
1486
|
+
class: "nb-tabs__content",
|
|
1487
|
+
role: "tabpanel",
|
|
1488
|
+
id: a(t).panelId(e.value),
|
|
1489
|
+
"aria-labelledby": a(t).triggerId(e.value),
|
|
1490
|
+
hidden: !s.value,
|
|
1491
|
+
tabindex: "0"
|
|
1492
|
+
}, [
|
|
1493
|
+
_(l.$slots, "default")
|
|
1494
|
+
], 8, fl)), [
|
|
1495
|
+
[W, s.value]
|
|
1496
|
+
]);
|
|
1497
|
+
}
|
|
1498
|
+
}), pl = ["aria-orientation"], hl = /* @__PURE__ */ v({
|
|
1499
|
+
__name: "NbTabsList",
|
|
1500
|
+
setup(e) {
|
|
1501
|
+
const { orientation: o } = E();
|
|
1502
|
+
function t(s) {
|
|
1503
|
+
const l = o.value === "vertical" ? "ArrowUp" : "ArrowLeft", b = o.value === "vertical" ? "ArrowDown" : "ArrowRight";
|
|
1504
|
+
if (![l, b, "Home", "End"].includes(s.key)) return;
|
|
1505
|
+
const f = s.currentTarget, d = Array.from(f.querySelectorAll('[role="tab"]:not(:disabled)')), r = s.target.closest('[role="tab"]'), g = r ? d.indexOf(r) : -1;
|
|
1506
|
+
if (!d.length || g < 0) return;
|
|
1507
|
+
s.preventDefault();
|
|
1508
|
+
const y = s.key === "Home" ? 0 : s.key === "End" ? d.length - 1 : (g + (s.key === b ? 1 : -1) + d.length) % d.length;
|
|
1509
|
+
d[y]?.focus(), d[y]?.click();
|
|
1510
|
+
}
|
|
1511
|
+
return (s, l) => (n(), i("div", {
|
|
1512
|
+
class: "nb-tabs__list",
|
|
1513
|
+
role: "tablist",
|
|
1514
|
+
"aria-orientation": a(o),
|
|
1515
|
+
onKeydown: t
|
|
1516
|
+
}, [
|
|
1517
|
+
_(s.$slots, "default")
|
|
1518
|
+
], 40, pl));
|
|
1519
|
+
}
|
|
1520
|
+
}), vl = ["id", "aria-selected", "aria-controls", "tabindex", "disabled", "data-active"], gl = /* @__PURE__ */ v({
|
|
1521
|
+
__name: "NbTabsTrigger",
|
|
1522
|
+
props: {
|
|
1523
|
+
value: {},
|
|
1524
|
+
disabled: { type: Boolean, default: !1 }
|
|
1525
|
+
},
|
|
1526
|
+
setup(e) {
|
|
1527
|
+
const o = e, t = E(), s = $(() => t.activeValue.value === o.value);
|
|
1528
|
+
return (l, b) => (n(), i("button", {
|
|
1529
|
+
class: V(["nb-tabs__trigger", { "is-active": s.value }]),
|
|
1530
|
+
id: a(t).triggerId(e.value),
|
|
1531
|
+
type: "button",
|
|
1532
|
+
role: "tab",
|
|
1533
|
+
"aria-selected": s.value,
|
|
1534
|
+
"aria-controls": a(t).panelId(e.value),
|
|
1535
|
+
tabindex: s.value ? 0 : -1,
|
|
1536
|
+
disabled: e.disabled,
|
|
1537
|
+
"data-active": s.value ? "" : void 0,
|
|
1538
|
+
onClick: b[0] || (b[0] = (f) => a(t).select(e.value))
|
|
1539
|
+
}, [
|
|
1540
|
+
_(l.$slots, "default")
|
|
1541
|
+
], 10, vl));
|
|
1542
|
+
}
|
|
1543
|
+
}), _l = { class: "nb-root nb-field" }, yl = ["for"], $l = ["id", "value", "disabled", "aria-invalid", "aria-describedby"], Nl = ["id"], Il = ["id"], kl = /* @__PURE__ */ v({
|
|
1544
|
+
inheritAttrs: !1,
|
|
1545
|
+
__name: "NbTextarea",
|
|
1546
|
+
props: {
|
|
1547
|
+
modelValue: { default: "" },
|
|
1548
|
+
label: {},
|
|
1549
|
+
hint: {},
|
|
1550
|
+
error: {},
|
|
1551
|
+
disabled: { type: Boolean, default: !1 },
|
|
1552
|
+
id: {}
|
|
1553
|
+
},
|
|
1554
|
+
emits: ["update:modelValue"],
|
|
1555
|
+
setup(e, { emit: o }) {
|
|
1556
|
+
const t = e, s = o, l = w("textarea", t.id), b = $(() => A(t.hint, t.error, l.hintId, l.errorId));
|
|
1557
|
+
return (f, d) => (n(), i("div", _l, [
|
|
1558
|
+
e.label ? (n(), i("label", {
|
|
1559
|
+
key: 0,
|
|
1560
|
+
class: "nb-field__label",
|
|
1561
|
+
for: a(l).inputId
|
|
1562
|
+
}, p(e.label), 9, yl)) : h("", !0),
|
|
1563
|
+
u("textarea", k(f.$attrs, {
|
|
1564
|
+
id: a(l).inputId,
|
|
1565
|
+
class: "nb-field__control nb-field__control--textarea",
|
|
1566
|
+
value: e.modelValue,
|
|
1567
|
+
disabled: e.disabled,
|
|
1568
|
+
"aria-invalid": e.error ? "true" : void 0,
|
|
1569
|
+
"aria-describedby": b.value,
|
|
1570
|
+
onInput: d[0] || (d[0] = (r) => s("update:modelValue", r.target.value))
|
|
1571
|
+
}), null, 16, $l),
|
|
1572
|
+
e.hint ? (n(), i("span", {
|
|
1573
|
+
key: 1,
|
|
1574
|
+
id: a(l).hintId,
|
|
1575
|
+
class: "nb-field__hint"
|
|
1576
|
+
}, p(e.hint), 9, Nl)) : h("", !0),
|
|
1577
|
+
e.error ? (n(), i("span", {
|
|
1578
|
+
key: 2,
|
|
1579
|
+
id: a(l).errorId,
|
|
1580
|
+
class: "nb-field__error"
|
|
1581
|
+
}, p(e.error), 9, Il)) : h("", !0)
|
|
1582
|
+
]));
|
|
1583
|
+
}
|
|
1584
|
+
}), Bl = { class: "nb-root nb-table-wrap" }, Vl = { key: 0 }, wl = /* @__PURE__ */ v({
|
|
1585
|
+
inheritAttrs: !1,
|
|
1586
|
+
__name: "NbTable",
|
|
1587
|
+
props: {
|
|
1588
|
+
caption: {}
|
|
1589
|
+
},
|
|
1590
|
+
setup(e) {
|
|
1591
|
+
return (o, t) => (n(), i("div", Bl, [
|
|
1592
|
+
u("table", k(o.$attrs, { class: "nb-table" }), [
|
|
1593
|
+
e.caption ? (n(), i("caption", Vl, p(e.caption), 1)) : h("", !0),
|
|
1594
|
+
_(o.$slots, "default")
|
|
1595
|
+
], 16)
|
|
1596
|
+
]));
|
|
1597
|
+
}
|
|
1598
|
+
}), xl = { class: "nb-toast__content" }, Sl = /* @__PURE__ */ v({
|
|
1599
|
+
__name: "NbToast",
|
|
1600
|
+
props: {
|
|
1601
|
+
open: { type: Boolean, default: void 0 },
|
|
1602
|
+
defaultOpen: { type: Boolean, default: !1 },
|
|
1603
|
+
title: {},
|
|
1604
|
+
description: {},
|
|
1605
|
+
tone: { default: "info" },
|
|
1606
|
+
duration: { default: 5e3 }
|
|
1607
|
+
},
|
|
1608
|
+
emits: ["update:open"],
|
|
1609
|
+
setup(e, { emit: o }) {
|
|
1610
|
+
const t = e, s = o, l = x(t.open ?? t.defaultOpen), b = $(() => t.open ?? l.value);
|
|
1611
|
+
D(() => t.open, (d) => {
|
|
1612
|
+
d !== void 0 && (l.value = d);
|
|
1613
|
+
});
|
|
1614
|
+
function f(d) {
|
|
1615
|
+
l.value = d, s("update:open", d);
|
|
1616
|
+
}
|
|
1617
|
+
return (d, r) => (n(), N(a(it), {
|
|
1618
|
+
label: "Notification",
|
|
1619
|
+
duration: e.duration
|
|
1620
|
+
}, {
|
|
1621
|
+
default: c(() => [
|
|
1622
|
+
m(a(dt), {
|
|
1623
|
+
class: V(["nb-root nb-toast", `nb-toast--${e.tone}`]),
|
|
1624
|
+
open: b.value,
|
|
1625
|
+
"default-open": e.defaultOpen,
|
|
1626
|
+
type: "foreground",
|
|
1627
|
+
role: "status",
|
|
1628
|
+
"onUpdate:open": f
|
|
1629
|
+
}, {
|
|
1630
|
+
default: c(() => [
|
|
1631
|
+
u("div", xl, [
|
|
1632
|
+
m(a(rt), { class: "nb-toast__title" }, {
|
|
1633
|
+
default: c(() => [
|
|
1634
|
+
B(p(e.title), 1)
|
|
1635
|
+
]),
|
|
1636
|
+
_: 1
|
|
1637
|
+
}),
|
|
1638
|
+
e.description ? (n(), N(a(ut), {
|
|
1639
|
+
key: 0,
|
|
1640
|
+
class: "nb-toast__description"
|
|
1641
|
+
}, {
|
|
1642
|
+
default: c(() => [
|
|
1643
|
+
B(p(e.description), 1)
|
|
1644
|
+
]),
|
|
1645
|
+
_: 1
|
|
1646
|
+
})) : h("", !0),
|
|
1647
|
+
_(d.$slots, "default")
|
|
1648
|
+
]),
|
|
1649
|
+
m(a(ct), {
|
|
1650
|
+
class: "nb-overlay-close",
|
|
1651
|
+
"aria-label": "Dismiss notification"
|
|
1652
|
+
}, {
|
|
1653
|
+
default: c(() => [...r[0] || (r[0] = [
|
|
1654
|
+
B("×", -1)
|
|
1655
|
+
])]),
|
|
1656
|
+
_: 1
|
|
1657
|
+
})
|
|
1658
|
+
]),
|
|
1659
|
+
_: 3
|
|
1660
|
+
}, 8, ["class", "open", "default-open"]),
|
|
1661
|
+
m(a(bt), { class: "nb-root nb-toast-viewport" })
|
|
1662
|
+
]),
|
|
1663
|
+
_: 3
|
|
1664
|
+
}, 8, ["duration"]));
|
|
1665
|
+
}
|
|
1666
|
+
}), Tl = { class: "nb-root nb-field" }, Al = ["id"], Cl = ["id"], Pl = /* @__PURE__ */ v({
|
|
1667
|
+
inheritAttrs: !1,
|
|
1668
|
+
__name: "NbToggleGroup",
|
|
1669
|
+
props: {
|
|
1670
|
+
modelValue: {},
|
|
1671
|
+
type: { default: "single" },
|
|
1672
|
+
orientation: { default: "horizontal" },
|
|
1673
|
+
label: {},
|
|
1674
|
+
hint: {},
|
|
1675
|
+
error: {},
|
|
1676
|
+
disabled: { type: Boolean, default: !1 },
|
|
1677
|
+
required: { type: Boolean, default: !1 },
|
|
1678
|
+
name: {},
|
|
1679
|
+
id: {}
|
|
1680
|
+
},
|
|
1681
|
+
emits: ["update:modelValue"],
|
|
1682
|
+
setup(e, { emit: o }) {
|
|
1683
|
+
const t = e, s = o, l = w("toggle-group", t.id), b = `${l.inputId}-label`, f = $(() => A(t.hint, t.error, l.hintId, l.errorId));
|
|
1684
|
+
function d(r) {
|
|
1685
|
+
(typeof r == "string" || Array.isArray(r) && r.every((g) => typeof g == "string")) && s("update:modelValue", r);
|
|
1686
|
+
}
|
|
1687
|
+
return (r, g) => (n(), i("div", Tl, [
|
|
1688
|
+
e.label ? (n(), i("span", {
|
|
1689
|
+
key: 0,
|
|
1690
|
+
id: b,
|
|
1691
|
+
class: "nb-field__label"
|
|
1692
|
+
}, p(e.label), 1)) : h("", !0),
|
|
1693
|
+
m(a(ft), k(r.$attrs, {
|
|
1694
|
+
id: a(l).inputId,
|
|
1695
|
+
class: "nb-toggle-group",
|
|
1696
|
+
"model-value": e.modelValue,
|
|
1697
|
+
type: e.type,
|
|
1698
|
+
orientation: e.orientation,
|
|
1699
|
+
disabled: e.disabled,
|
|
1700
|
+
required: e.required,
|
|
1701
|
+
name: e.name,
|
|
1702
|
+
"data-orientation": e.orientation,
|
|
1703
|
+
"aria-labelledby": e.label ? b : void 0,
|
|
1704
|
+
"aria-invalid": e.error ? "true" : void 0,
|
|
1705
|
+
"aria-describedby": f.value,
|
|
1706
|
+
"onUpdate:modelValue": d
|
|
1707
|
+
}), {
|
|
1708
|
+
default: c(() => [
|
|
1709
|
+
_(r.$slots, "default")
|
|
1710
|
+
]),
|
|
1711
|
+
_: 3
|
|
1712
|
+
}, 16, ["id", "model-value", "type", "orientation", "disabled", "required", "name", "data-orientation", "aria-labelledby", "aria-invalid", "aria-describedby"]),
|
|
1713
|
+
e.hint ? (n(), i("span", {
|
|
1714
|
+
key: 1,
|
|
1715
|
+
id: a(l).hintId,
|
|
1716
|
+
class: "nb-field__hint"
|
|
1717
|
+
}, p(e.hint), 9, Al)) : h("", !0),
|
|
1718
|
+
e.error ? (n(), i("span", {
|
|
1719
|
+
key: 2,
|
|
1720
|
+
id: a(l).errorId,
|
|
1721
|
+
class: "nb-field__error"
|
|
1722
|
+
}, p(e.error), 9, Cl)) : h("", !0)
|
|
1723
|
+
]));
|
|
1724
|
+
}
|
|
1725
|
+
}), Dl = /* @__PURE__ */ v({
|
|
1726
|
+
inheritAttrs: !1,
|
|
1727
|
+
__name: "NbToggleGroupItem",
|
|
1728
|
+
props: {
|
|
1729
|
+
value: {},
|
|
1730
|
+
disabled: { type: Boolean, default: !1 }
|
|
1731
|
+
},
|
|
1732
|
+
setup(e) {
|
|
1733
|
+
return (o, t) => (n(), N(a(mt), k(o.$attrs, {
|
|
1734
|
+
class: "nb-toggle-group__item",
|
|
1735
|
+
value: e.value,
|
|
1736
|
+
disabled: e.disabled
|
|
1737
|
+
}), {
|
|
1738
|
+
default: c(() => [
|
|
1739
|
+
_(o.$slots, "default")
|
|
1740
|
+
]),
|
|
1741
|
+
_: 3
|
|
1742
|
+
}, 16, ["value", "disabled"]));
|
|
1743
|
+
}
|
|
1744
|
+
}), Rl = ["aria-describedby"], ql = ["id", "hidden"], Ol = /* @__PURE__ */ v({
|
|
1745
|
+
__name: "NbTooltip",
|
|
1746
|
+
props: {
|
|
1747
|
+
content: {}
|
|
1748
|
+
},
|
|
1749
|
+
setup(e) {
|
|
1750
|
+
const o = e, t = x(!1), s = S("tooltip");
|
|
1751
|
+
function l() {
|
|
1752
|
+
t.value = !0;
|
|
1753
|
+
}
|
|
1754
|
+
function b() {
|
|
1755
|
+
t.value = !1;
|
|
1756
|
+
}
|
|
1757
|
+
function f(d) {
|
|
1758
|
+
d.key === "Escape" && b();
|
|
1759
|
+
}
|
|
1760
|
+
return (d, r) => (n(), i("span", {
|
|
1761
|
+
class: "nb-root nb-tooltip",
|
|
1762
|
+
onMouseenter: l,
|
|
1763
|
+
onMouseleave: b
|
|
1764
|
+
}, [
|
|
1765
|
+
u("span", {
|
|
1766
|
+
class: "nb-tooltip__trigger",
|
|
1767
|
+
tabindex: "0",
|
|
1768
|
+
"aria-describedby": a(s),
|
|
1769
|
+
onFocus: l,
|
|
1770
|
+
onBlur: b,
|
|
1771
|
+
onKeydown: f
|
|
1772
|
+
}, [
|
|
1773
|
+
_(d.$slots, "default")
|
|
1774
|
+
], 40, Rl),
|
|
1775
|
+
u("span", {
|
|
1776
|
+
id: a(s),
|
|
1777
|
+
class: "nb-tooltip__content",
|
|
1778
|
+
role: "tooltip",
|
|
1779
|
+
hidden: !t.value
|
|
1780
|
+
}, [
|
|
1781
|
+
_(d.$slots, "content", {}, () => [
|
|
1782
|
+
B(p(o.content), 1)
|
|
1783
|
+
])
|
|
1784
|
+
], 8, ql)
|
|
1785
|
+
], 32));
|
|
1786
|
+
}
|
|
1787
|
+
}), Gl = pt({
|
|
1788
|
+
NbAccordion: ht,
|
|
1789
|
+
NbAccordionItem: gt,
|
|
1790
|
+
NbAlert: jt,
|
|
1791
|
+
NbAspectRatio: _t,
|
|
1792
|
+
NbAvatar: $t,
|
|
1793
|
+
NbBadge: yt,
|
|
1794
|
+
NbBreadcrumbs: Vt,
|
|
1795
|
+
NbButton: St,
|
|
1796
|
+
NbCard: Pt,
|
|
1797
|
+
NbCheckbox: Ot,
|
|
1798
|
+
NbCombobox: zt,
|
|
1799
|
+
NbDialog: Jt,
|
|
1800
|
+
NbDropdownMenu: Qt,
|
|
1801
|
+
NbDropdownMenuItem: Wt,
|
|
1802
|
+
NbDropdownMenuSeparator: Yt,
|
|
1803
|
+
NbEmptyState: na,
|
|
1804
|
+
NbFieldset: da,
|
|
1805
|
+
NbInput: ma,
|
|
1806
|
+
NbInputGroup: _a,
|
|
1807
|
+
NbNumberInput: ka,
|
|
1808
|
+
NbPagination: Ba,
|
|
1809
|
+
NbPopover: Sa,
|
|
1810
|
+
NbProgress: Ca,
|
|
1811
|
+
NbRadioGroup: Ua,
|
|
1812
|
+
NbScrollArea: za,
|
|
1813
|
+
NbSelect: Ha,
|
|
1814
|
+
NbSelectItem: Xa,
|
|
1815
|
+
NbSeparator: Ja,
|
|
1816
|
+
NbSkeleton: al,
|
|
1817
|
+
NbSlider: tl,
|
|
1818
|
+
NbSpinner: nl,
|
|
1819
|
+
NbSwitch: ul,
|
|
1820
|
+
NbTable: wl,
|
|
1821
|
+
NbTabs: bl,
|
|
1822
|
+
NbTabsContent: ml,
|
|
1823
|
+
NbTabsList: hl,
|
|
1824
|
+
NbTabsTrigger: gl,
|
|
1825
|
+
NbTextarea: kl,
|
|
1826
|
+
NbToast: Sl,
|
|
1827
|
+
NbToggleGroup: Pl,
|
|
1828
|
+
NbToggleGroupItem: Dl,
|
|
1829
|
+
NbTooltip: Ol
|
|
1830
|
+
});
|
|
1831
|
+
export {
|
|
1832
|
+
ht as NbAccordion,
|
|
1833
|
+
gt as NbAccordionItem,
|
|
1834
|
+
jt as NbAlert,
|
|
1835
|
+
_t as NbAspectRatio,
|
|
1836
|
+
$t as NbAvatar,
|
|
1837
|
+
yt as NbBadge,
|
|
1838
|
+
Vt as NbBreadcrumbs,
|
|
1839
|
+
St as NbButton,
|
|
1840
|
+
Pt as NbCard,
|
|
1841
|
+
Ot as NbCheckbox,
|
|
1842
|
+
zt as NbCombobox,
|
|
1843
|
+
Jt as NbDialog,
|
|
1844
|
+
Qt as NbDropdownMenu,
|
|
1845
|
+
Wt as NbDropdownMenuItem,
|
|
1846
|
+
Yt as NbDropdownMenuSeparator,
|
|
1847
|
+
na as NbEmptyState,
|
|
1848
|
+
da as NbFieldset,
|
|
1849
|
+
ma as NbInput,
|
|
1850
|
+
_a as NbInputGroup,
|
|
1851
|
+
ka as NbNumberInput,
|
|
1852
|
+
Ba as NbPagination,
|
|
1853
|
+
Sa as NbPopover,
|
|
1854
|
+
Ca as NbProgress,
|
|
1855
|
+
Ua as NbRadioGroup,
|
|
1856
|
+
za as NbScrollArea,
|
|
1857
|
+
Ha as NbSelect,
|
|
1858
|
+
Xa as NbSelectItem,
|
|
1859
|
+
Ja as NbSeparator,
|
|
1860
|
+
al as NbSkeleton,
|
|
1861
|
+
tl as NbSlider,
|
|
1862
|
+
nl as NbSpinner,
|
|
1863
|
+
ul as NbSwitch,
|
|
1864
|
+
wl as NbTable,
|
|
1865
|
+
bl as NbTabs,
|
|
1866
|
+
ml as NbTabsContent,
|
|
1867
|
+
hl as NbTabsList,
|
|
1868
|
+
gl as NbTabsTrigger,
|
|
1869
|
+
kl as NbTextarea,
|
|
1870
|
+
Sl as NbToast,
|
|
1871
|
+
Pl as NbToggleGroup,
|
|
1872
|
+
Dl as NbToggleGroupItem,
|
|
1873
|
+
Ol as NbTooltip,
|
|
1874
|
+
Gl as NeoBrutalVue
|
|
1875
|
+
};
|