@ptlm-azulejo/sidebar 0.0.1-alpha.87 → 0.0.1-alpha.89
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/dist/index.js +263 -94
- package/dist/index.umd.cjs +1 -1
- package/dist/src/components/SidebarFooter.vue.d.ts +18 -0
- package/dist/src/components/SidebarFooter.vue.d.ts.map +1 -0
- package/dist/src/components/SidebarFooterAvatar.vue.d.ts +14 -0
- package/dist/src/components/SidebarFooterAvatar.vue.d.ts.map +1 -0
- package/dist/src/components/SidebarNavigationItems.vue.d.ts +14 -0
- package/dist/src/components/SidebarNavigationItems.vue.d.ts.map +1 -0
- package/dist/src/index.stories.d.ts +1 -0
- package/dist/src/index.stories.d.ts.map +1 -1
- package/dist/src/index.vue.d.ts +26 -0
- package/dist/src/index.vue.d.ts.map +1 -1
- package/dist/src/models/sidebar-footer.models.d.ts +18 -0
- package/dist/src/models/sidebar-footer.models.d.ts.map +1 -0
- package/dist/src/models/sidebar-navigation-items.models.d.ts +22 -0
- package/dist/src/models/sidebar-navigation-items.models.d.ts.map +1 -0
- package/dist/src/models/sidebar.models.d.ts +16 -0
- package/dist/src/models/sidebar.models.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as b, openBlock as
|
|
2
|
-
import { AzIconButton as
|
|
1
|
+
import { defineComponent as b, openBlock as n, createElementBlock as i, normalizeClass as o, createElementVNode as s, normalizeStyle as v, toDisplayString as u, createCommentVNode as d, Fragment as C, renderList as x, createVNode as h, unref as w, ref as O, computed as k, renderSlot as f, mergeDefaults as $ } from "vue";
|
|
2
|
+
import { AzIconButton as S } from "@ptlm-azulejo/icon-button";
|
|
3
3
|
import "@ptlm-azulejo/icon-button/style.css";
|
|
4
|
-
const
|
|
4
|
+
const I = ["src", "alt"], B = /* @__PURE__ */ b({
|
|
5
5
|
__name: "SidebarHeader",
|
|
6
6
|
props: {
|
|
7
7
|
isCollapsed: { type: Boolean },
|
|
@@ -13,30 +13,30 @@ const k = ["src", "alt"], S = /* @__PURE__ */ b({
|
|
|
13
13
|
sidebarHeaderLogo: "w-10 h-10 rounded flex-shrink-0",
|
|
14
14
|
sidebarHeaderTitle: "overflow-hidden whitespace-nowrap transition-all duration-300 font-200 font-semibold whitespace-nowrap"
|
|
15
15
|
};
|
|
16
|
-
return (
|
|
17
|
-
class:
|
|
16
|
+
return (r, l) => (n(), i("div", {
|
|
17
|
+
class: o(t.sidebarHeaderContainer)
|
|
18
18
|
}, [
|
|
19
19
|
s("img", {
|
|
20
|
-
class:
|
|
21
|
-
style:
|
|
20
|
+
class: o(t.sidebarHeaderLogo),
|
|
21
|
+
style: v(`background-color:${e.headerOptions.logoBgColor}`),
|
|
22
22
|
src: e.headerOptions.logoSrc,
|
|
23
23
|
alt: e.headerOptions.logoAlt
|
|
24
|
-
}, null, 14,
|
|
25
|
-
e.isCollapsed ?
|
|
24
|
+
}, null, 14, I),
|
|
25
|
+
e.isCollapsed ? d("", !0) : (n(), i("h2", {
|
|
26
26
|
key: 0,
|
|
27
|
-
class:
|
|
28
|
-
},
|
|
27
|
+
class: o(t.sidebarHeaderTitle)
|
|
28
|
+
}, u(e.headerOptions.sidebarTitle), 3))
|
|
29
29
|
], 2));
|
|
30
30
|
}
|
|
31
|
-
}),
|
|
32
|
-
const
|
|
33
|
-
for (const [
|
|
34
|
-
|
|
35
|
-
return
|
|
36
|
-
},
|
|
31
|
+
}), y = (e, t) => {
|
|
32
|
+
const r = e.__vccOpts || e;
|
|
33
|
+
for (const [l, a] of t)
|
|
34
|
+
r[l] = a;
|
|
35
|
+
return r;
|
|
36
|
+
}, _ = /* @__PURE__ */ y(B, [["__scopeId", "data-v-1be64a50"]]), H = { key: 0 }, j = {
|
|
37
37
|
role: "navigation",
|
|
38
38
|
"aria-label": "sidebar shortcut items"
|
|
39
|
-
},
|
|
39
|
+
}, z = ["id", "href", "target"], L = ["id"], T = /* @__PURE__ */ b({
|
|
40
40
|
__name: "SidebarShortcuts",
|
|
41
41
|
props: {
|
|
42
42
|
isCollapsed: { type: Boolean },
|
|
@@ -49,68 +49,221 @@ const k = ["src", "alt"], S = /* @__PURE__ */ b({
|
|
|
49
49
|
shortcutItemIcon: "text-[24px] az az-",
|
|
50
50
|
shortcutItemLabel: "font-semibold text-[10px]"
|
|
51
51
|
};
|
|
52
|
-
return (
|
|
53
|
-
s("nav",
|
|
52
|
+
return (r, l) => e.shortcutOptions.items && e.shortcutOptions.items.length > 0 ? (n(), i("section", H, [
|
|
53
|
+
s("nav", j, [
|
|
54
54
|
s("ul", {
|
|
55
55
|
role: "menu",
|
|
56
|
-
class:
|
|
56
|
+
class: o(t.shortcutList)
|
|
57
57
|
}, [
|
|
58
|
-
(
|
|
59
|
-
key:
|
|
58
|
+
(n(!0), i(C, null, x(e.shortcutOptions.items, (a) => (n(), i("div", {
|
|
59
|
+
key: a.id,
|
|
60
60
|
class: ""
|
|
61
61
|
}, [
|
|
62
|
-
|
|
62
|
+
a.type === "link" ? (n(), i("a", {
|
|
63
63
|
key: 0,
|
|
64
|
-
id: `shortcut-${
|
|
65
|
-
href:
|
|
66
|
-
target:
|
|
64
|
+
id: `shortcut-${a.id}`,
|
|
65
|
+
href: a.link,
|
|
66
|
+
target: a.target
|
|
67
67
|
}, [
|
|
68
68
|
s("div", {
|
|
69
|
-
class:
|
|
69
|
+
class: o(t.shortcutItem)
|
|
70
70
|
}, [
|
|
71
71
|
s("i", {
|
|
72
|
-
class:
|
|
72
|
+
class: o(`${t.shortcutItemIcon}${a.icon}`)
|
|
73
73
|
}, null, 2),
|
|
74
74
|
s("span", {
|
|
75
|
-
class:
|
|
75
|
+
class: o([
|
|
76
76
|
"inline-block overflow-hidden whitespace-nowrap transition-all duration-300",
|
|
77
77
|
e.isCollapsed ? "max-w-0 opacity-0" : "max-w-xs opacity-100"
|
|
78
78
|
])
|
|
79
79
|
}, [
|
|
80
80
|
s("p", {
|
|
81
|
-
class:
|
|
82
|
-
},
|
|
81
|
+
class: o(t.shortcutItemLabel)
|
|
82
|
+
}, u(a.label), 3)
|
|
83
83
|
], 2)
|
|
84
84
|
], 2)
|
|
85
|
-
], 8,
|
|
86
|
-
|
|
85
|
+
], 8, z)) : d("", !0),
|
|
86
|
+
a.type === "button" ? (n(), i("button", {
|
|
87
87
|
key: 1,
|
|
88
|
-
id: `shortcut-${
|
|
88
|
+
id: `shortcut-${a.id}`
|
|
89
89
|
}, [
|
|
90
90
|
s("div", {
|
|
91
|
-
class:
|
|
91
|
+
class: o(t.shortcutItem)
|
|
92
92
|
}, [
|
|
93
93
|
s("i", {
|
|
94
|
-
class:
|
|
94
|
+
class: o(`${t.shortcutItemIcon}${a.icon}`)
|
|
95
95
|
}, null, 2),
|
|
96
96
|
s("span", {
|
|
97
|
-
class:
|
|
97
|
+
class: o([
|
|
98
98
|
"inline-block overflow-hidden whitespace-nowrap transition-all duration-300",
|
|
99
99
|
e.isCollapsed ? "max-w-0 opacity-0" : "max-w-xs opacity-100"
|
|
100
100
|
])
|
|
101
101
|
}, [
|
|
102
102
|
s("p", {
|
|
103
|
-
class:
|
|
104
|
-
},
|
|
103
|
+
class: o(t.shortcutItemLabel)
|
|
104
|
+
}, u(a.label), 3)
|
|
105
105
|
], 2)
|
|
106
106
|
], 2)
|
|
107
|
-
], 8,
|
|
107
|
+
], 8, L)) : d("", !0)
|
|
108
108
|
]))), 128))
|
|
109
109
|
], 2)
|
|
110
110
|
])
|
|
111
|
-
])) :
|
|
111
|
+
])) : d("", !0);
|
|
112
112
|
}
|
|
113
|
-
}),
|
|
113
|
+
}), A = ["id", "href", "target"], N = ["onClick"], E = /* @__PURE__ */ b({
|
|
114
|
+
__name: "SidebarNavigationItems",
|
|
115
|
+
props: {
|
|
116
|
+
isCollapsed: { type: Boolean },
|
|
117
|
+
navigationOptions: {}
|
|
118
|
+
},
|
|
119
|
+
setup(e) {
|
|
120
|
+
const t = {
|
|
121
|
+
container: "h-10 px-2 flex items-center justify-between",
|
|
122
|
+
containerExpanded: "",
|
|
123
|
+
containerCollapsed: "",
|
|
124
|
+
itemContainer: "flex items-center justify-start gap-2 text-[#404040] cursor-pointer",
|
|
125
|
+
icon: "text-[24px] az az-",
|
|
126
|
+
label: "font-semibold text-[14px]"
|
|
127
|
+
};
|
|
128
|
+
return (r, l) => (n(!0), i(C, null, x(e.navigationOptions.items, (a, c) => {
|
|
129
|
+
var p;
|
|
130
|
+
return n(), i("li", {
|
|
131
|
+
key: (p = a.id) != null ? p : c,
|
|
132
|
+
class: o([
|
|
133
|
+
t.container,
|
|
134
|
+
e.isCollapsed ? t.containerCollapsed : t.containerExpanded
|
|
135
|
+
])
|
|
136
|
+
}, [
|
|
137
|
+
a.type === "link" ? (n(), i("a", {
|
|
138
|
+
key: 0,
|
|
139
|
+
id: `navigation-${a.id}`,
|
|
140
|
+
href: a.link,
|
|
141
|
+
target: a.target
|
|
142
|
+
}, [
|
|
143
|
+
s("div", {
|
|
144
|
+
class: o(t.itemContainer)
|
|
145
|
+
}, [
|
|
146
|
+
s("i", {
|
|
147
|
+
class: o(`${t.icon}${a.icon}`)
|
|
148
|
+
}, null, 2),
|
|
149
|
+
s("p", {
|
|
150
|
+
class: o(t.label)
|
|
151
|
+
}, u(a.label), 3)
|
|
152
|
+
], 2)
|
|
153
|
+
], 8, A)) : d("", !0),
|
|
154
|
+
a.type === "button" ? (n(), i("button", {
|
|
155
|
+
key: 1,
|
|
156
|
+
onClick: a.onClick
|
|
157
|
+
}, [
|
|
158
|
+
s("div", {
|
|
159
|
+
class: o(t.itemContainer)
|
|
160
|
+
}, [
|
|
161
|
+
s("i", {
|
|
162
|
+
class: o(`${t.icon}${a.icon}`)
|
|
163
|
+
}, null, 2),
|
|
164
|
+
s("p", {
|
|
165
|
+
class: o(t.label)
|
|
166
|
+
}, u(a.label), 3)
|
|
167
|
+
], 2)
|
|
168
|
+
], 8, N)) : d("", !0)
|
|
169
|
+
], 2);
|
|
170
|
+
}), 128));
|
|
171
|
+
}
|
|
172
|
+
}), F = ["src", "alt"], D = /* @__PURE__ */ b({
|
|
173
|
+
__name: "SidebarFooterAvatar",
|
|
174
|
+
props: {
|
|
175
|
+
avatarUrl: {},
|
|
176
|
+
name: {},
|
|
177
|
+
initials: {},
|
|
178
|
+
initialsBG: {}
|
|
179
|
+
},
|
|
180
|
+
setup(e) {
|
|
181
|
+
const t = {
|
|
182
|
+
container: "h-8 w-8 rounded-full",
|
|
183
|
+
avatarImg: "h-8 w-8 rounded-full",
|
|
184
|
+
avatarInitials: "h-full w-full flex items-center justify-center rounded-full"
|
|
185
|
+
};
|
|
186
|
+
return (r, l) => {
|
|
187
|
+
var a;
|
|
188
|
+
return n(), i("div", {
|
|
189
|
+
class: o(t.container)
|
|
190
|
+
}, [
|
|
191
|
+
e.avatarUrl ? (n(), i("img", {
|
|
192
|
+
key: 0,
|
|
193
|
+
class: o(t.avatarImg),
|
|
194
|
+
src: e.avatarUrl,
|
|
195
|
+
alt: (a = e.name) != null ? a : "User avatar"
|
|
196
|
+
}, null, 10, F)) : (n(), i("p", {
|
|
197
|
+
key: 1,
|
|
198
|
+
class: o(t.avatarInitials),
|
|
199
|
+
style: v(`background-color: ${e.initialsBG}`)
|
|
200
|
+
}, u(e.initials), 7))
|
|
201
|
+
], 2);
|
|
202
|
+
};
|
|
203
|
+
}
|
|
204
|
+
}), U = { class: "w-8" }, G = /* @__PURE__ */ b({
|
|
205
|
+
__name: "SidebarFooter",
|
|
206
|
+
props: {
|
|
207
|
+
isCollapsed: { type: Boolean },
|
|
208
|
+
footerOptions: {}
|
|
209
|
+
},
|
|
210
|
+
emits: ["toggleSidebarCollapsed"],
|
|
211
|
+
setup(e, { emit: t }) {
|
|
212
|
+
const r = t, l = {
|
|
213
|
+
containerExpanded: "w-full flex justify-between items-center",
|
|
214
|
+
containerCollapsed: "flex flex-col items-center",
|
|
215
|
+
avatarNameContainer: "flex gap-2",
|
|
216
|
+
nameContainer: "flex-1",
|
|
217
|
+
name: "p-0 font-semibold text-[12px]",
|
|
218
|
+
jobTitle: "p-0 text-[12px] text-gray-500",
|
|
219
|
+
collapseButton: "cursor-pointer",
|
|
220
|
+
collapsedCollapseButton: "!w-8 rotate-180 transition-transform duration-300",
|
|
221
|
+
expandedCollapsedButton: "w-10"
|
|
222
|
+
};
|
|
223
|
+
return (a, c) => {
|
|
224
|
+
var p, m, g;
|
|
225
|
+
return n(), i("div", {
|
|
226
|
+
class: o(
|
|
227
|
+
l[e.isCollapsed ? "containerCollapsed" : "containerExpanded"]
|
|
228
|
+
)
|
|
229
|
+
}, [
|
|
230
|
+
s("div", {
|
|
231
|
+
class: o(l.avatarNameContainer)
|
|
232
|
+
}, [
|
|
233
|
+
h(D, {
|
|
234
|
+
"avatar-url": e.footerOptions.avatarUrl,
|
|
235
|
+
initials: (p = e.footerOptions.initials) != null ? p : "AZ",
|
|
236
|
+
"initials-b-g": e.footerOptions.initialsBG
|
|
237
|
+
}, null, 8, ["avatar-url", "initials", "initials-b-g"]),
|
|
238
|
+
e.isCollapsed ? d("", !0) : (n(), i("div", {
|
|
239
|
+
key: 0,
|
|
240
|
+
class: o(l.nameContainer)
|
|
241
|
+
}, [
|
|
242
|
+
s("p", {
|
|
243
|
+
class: o(l.name)
|
|
244
|
+
}, u((m = e.footerOptions.name) != null ? m : "First Last"), 3),
|
|
245
|
+
s("p", {
|
|
246
|
+
class: o(l.jobTitle)
|
|
247
|
+
}, u((g = e.footerOptions.jobTitle) != null ? g : "Job Title"), 3)
|
|
248
|
+
], 2))
|
|
249
|
+
], 2),
|
|
250
|
+
s("div", U, [
|
|
251
|
+
h(w(S), {
|
|
252
|
+
class: o([
|
|
253
|
+
l.collapseButton,
|
|
254
|
+
e.isCollapsed ? l.collapsedCollapseButton : l.expandedCollapsedButton
|
|
255
|
+
]),
|
|
256
|
+
ghost: "",
|
|
257
|
+
appearance: "inverse",
|
|
258
|
+
"aria-label": "Sidebar close button",
|
|
259
|
+
"icon-class": "az-ui-sidebar-collapse",
|
|
260
|
+
onClick: c[0] || (c[0] = () => r("toggleSidebarCollapsed"))
|
|
261
|
+
}, null, 8, ["class"])
|
|
262
|
+
])
|
|
263
|
+
], 2);
|
|
264
|
+
};
|
|
265
|
+
}
|
|
266
|
+
}), V = {
|
|
114
267
|
showHeader: !0,
|
|
115
268
|
headerOptions: () => ({
|
|
116
269
|
showSearch: !0,
|
|
@@ -130,77 +283,93 @@ const k = ["src", "alt"], S = /* @__PURE__ */ b({
|
|
|
130
283
|
onClick: () => console.log("dashboard")
|
|
131
284
|
}
|
|
132
285
|
]
|
|
133
|
-
}
|
|
134
|
-
|
|
286
|
+
},
|
|
287
|
+
navigationOptions: {
|
|
288
|
+
items: [
|
|
289
|
+
{
|
|
290
|
+
id: "dashboard",
|
|
291
|
+
label: "Dashboard",
|
|
292
|
+
icon: "ui-chevron-left",
|
|
293
|
+
type: "button",
|
|
294
|
+
onClick: () => console.log("dashboard")
|
|
295
|
+
}
|
|
296
|
+
]
|
|
297
|
+
},
|
|
298
|
+
footerOptions: { initials: "AZ" }
|
|
299
|
+
}, P = { class: "" }, Z = {
|
|
135
300
|
key: 0,
|
|
136
301
|
class: ""
|
|
137
|
-
},
|
|
302
|
+
}, J = {
|
|
138
303
|
key: 0,
|
|
139
304
|
class: ""
|
|
140
|
-
},
|
|
305
|
+
}, W = { class: "" }, q = {
|
|
141
306
|
class: "",
|
|
142
307
|
role: "navigation",
|
|
143
308
|
"aria-label": "navigation items"
|
|
144
|
-
},
|
|
309
|
+
}, K = { class: "" }, M = /* @__PURE__ */ b({
|
|
145
310
|
__name: "index",
|
|
146
|
-
props: /* @__PURE__ */
|
|
311
|
+
props: /* @__PURE__ */ $({
|
|
147
312
|
showHeader: { type: Boolean },
|
|
148
313
|
headerOptions: {},
|
|
149
314
|
showShortcuts: { type: Boolean },
|
|
150
|
-
shortcutOptions: {}
|
|
151
|
-
|
|
315
|
+
shortcutOptions: {},
|
|
316
|
+
navigationOptions: {},
|
|
317
|
+
footerOptions: {}
|
|
318
|
+
}, V),
|
|
152
319
|
setup(e) {
|
|
153
|
-
const t =
|
|
154
|
-
sidebarContainer: "p-3 bg-white border-r transition-[width] duration-
|
|
320
|
+
const t = O(!1), r = k(() => t.value ? "4rem" : "300px"), l = {
|
|
321
|
+
sidebarContainer: "h-full flex flex-col gap-3 p-3 bg-white border-r transition-[width] duration-500 ease-in-out overflow-hidden whitespace-nowrap",
|
|
322
|
+
footer: "pt-2 flex items-center justify-between border-t border-[#999999]"
|
|
155
323
|
};
|
|
156
|
-
function
|
|
324
|
+
function a() {
|
|
157
325
|
t.value = !t.value;
|
|
158
326
|
}
|
|
159
|
-
return (
|
|
160
|
-
class:
|
|
161
|
-
style:
|
|
327
|
+
return (c, p) => (n(), i("aside", {
|
|
328
|
+
class: o(l.sidebarContainer),
|
|
329
|
+
style: v({ width: r.value })
|
|
162
330
|
}, [
|
|
163
|
-
s("div",
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
331
|
+
s("div", P, [
|
|
332
|
+
f(c.$slots, "header", {}, void 0, !0),
|
|
333
|
+
e.showHeader ? (n(), i("div", Z, [
|
|
334
|
+
h(_, {
|
|
335
|
+
"is-collapsed": t.value,
|
|
336
|
+
"header-options": e.headerOptions
|
|
337
|
+
}, null, 8, ["is-collapsed", "header-options"])
|
|
338
|
+
])) : d("", !0)
|
|
339
|
+
]),
|
|
340
|
+
s("div", null, [
|
|
341
|
+
f(c.$slots, "shortcuts", {}, void 0, !0),
|
|
342
|
+
e.showShortcuts ? (n(), i("div", J, [
|
|
343
|
+
h(T, {
|
|
344
|
+
"is-collapsed": t.value,
|
|
345
|
+
"shortcut-options": e.shortcutOptions
|
|
346
|
+
}, null, 8, ["is-collapsed", "shortcut-options"])
|
|
347
|
+
])) : d("", !0)
|
|
348
|
+
]),
|
|
349
|
+
s("section", W, [
|
|
350
|
+
s("nav", q, [
|
|
351
|
+
s("ul", K, [
|
|
352
|
+
h(E, {
|
|
168
353
|
"is-collapsed": t.value,
|
|
169
|
-
|
|
170
|
-
}, null, 8, ["is-collapsed", "
|
|
171
|
-
|
|
172
|
-
]),
|
|
173
|
-
s("div", null, [
|
|
174
|
-
u(d.$slots, "shortcuts", {}, void 0, !0),
|
|
175
|
-
e.showShortcuts ? (r(), i("div", j, [
|
|
176
|
-
h(L, {
|
|
177
|
-
"is-collapsed": t.value,
|
|
178
|
-
"shortcut-options": e.shortcutOptions
|
|
179
|
-
}, null, 8, ["is-collapsed", "shortcut-options"])
|
|
180
|
-
])) : l("", !0)
|
|
181
|
-
]),
|
|
182
|
-
s("section", N, [
|
|
183
|
-
s("nav", V, [
|
|
184
|
-
s("ul", E, [
|
|
185
|
-
u(d.$slots, "nav", {}, void 0, !0)
|
|
186
|
-
])
|
|
354
|
+
navigationOptions: e.navigationOptions
|
|
355
|
+
}, null, 8, ["is-collapsed", "navigationOptions"]),
|
|
356
|
+
f(c.$slots, "nav", {}, void 0, !0)
|
|
187
357
|
])
|
|
188
|
-
]),
|
|
189
|
-
s("div", P, [
|
|
190
|
-
u(d.$slots, "footer", {}, void 0, !0),
|
|
191
|
-
h(_(C), {
|
|
192
|
-
class: "cursor-pointer",
|
|
193
|
-
ghost: "",
|
|
194
|
-
appearance: "inverse",
|
|
195
|
-
"aria-label": "Sidebar close button",
|
|
196
|
-
"icon-class": "az-ui-sidebar-collapse",
|
|
197
|
-
onClick: o
|
|
198
|
-
})
|
|
199
358
|
])
|
|
200
|
-
])
|
|
359
|
+
]),
|
|
360
|
+
s("div", {
|
|
361
|
+
class: o(l.footer)
|
|
362
|
+
}, [
|
|
363
|
+
f(c.$slots, "footer", {}, void 0, !0),
|
|
364
|
+
h(G, {
|
|
365
|
+
"is-collapsed": t.value,
|
|
366
|
+
"footer-options": e.footerOptions,
|
|
367
|
+
onToggleSidebarCollapsed: a
|
|
368
|
+
}, null, 8, ["is-collapsed", "footer-options"])
|
|
369
|
+
], 2)
|
|
201
370
|
], 6));
|
|
202
371
|
}
|
|
203
|
-
}),
|
|
372
|
+
}), Y = /* @__PURE__ */ y(M, [["__scopeId", "data-v-3107cbc1"]]);
|
|
204
373
|
export {
|
|
205
|
-
|
|
374
|
+
Y as AzSidebar
|
|
206
375
|
};
|
package/dist/index.umd.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(i,e){typeof exports=="object"&&typeof module!="undefined"?e(exports,require("vue"),require("@ptlm-azulejo/icon-button"),require("@ptlm-azulejo/icon-button/style.css")):typeof define=="function"&&define.amd?define(["exports","vue","@ptlm-azulejo/icon-button","@ptlm-azulejo/icon-button/style.css"],e):(i=typeof globalThis!="undefined"?globalThis:i||self,e(i.sidebar={},i.Vue,i["icon-button"]))})(this,function(i,e,p){"use strict";const h=["src","alt"],f=e.defineComponent({__name:"SidebarHeader",props:{isCollapsed:{type:Boolean},headerOptions:{}},setup(t){const o={sidebarHeaderContainer:"flex items-center gap-2",sidebarHeaderLogo:"w-10 h-10 rounded flex-shrink-0",sidebarHeaderTitle:"overflow-hidden whitespace-nowrap transition-all duration-300 font-200 font-semibold whitespace-nowrap"};return(l,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(o.sidebarHeaderContainer)},[e.createElementVNode("img",{class:e.normalizeClass(o.sidebarHeaderLogo),style:e.normalizeStyle(`background-color:${t.headerOptions.logoBgColor}`),src:t.headerOptions.logoSrc,alt:t.headerOptions.logoAlt},null,14,h),t.isCollapsed?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("h2",{key:0,class:e.normalizeClass(o.sidebarHeaderTitle)},e.toDisplayString(t.headerOptions.sidebarTitle),3))],2))}}),c=(t,o)=>{const l=t.__vccOpts||t;for(const[n,a]of o)l[n]=a;return l},C=c(f,[["__scopeId","data-v-1be64a50"]]),b={key:0},g={role:"navigation","aria-label":"sidebar shortcut items"},k=["id","href","target"],y=["id"],B=e.defineComponent({__name:"SidebarShortcuts",props:{isCollapsed:{type:Boolean},shortcutOptions:{}},setup(t){const o={shortcutList:"h-12 flex items-center justify-start",shortcutItem:"h-12 w-[70px] flex flex-col items-center justify-start gap-1",shortcutItemIcon:"text-[24px] az az-",shortcutItemLabel:"font-semibold text-[10px]"};return(l,n)=>t.shortcutOptions.items&&t.shortcutOptions.items.length>0?(e.openBlock(),e.createElementBlock("section",b,[e.createElementVNode("nav",g,[e.createElementVNode("ul",{role:"menu",class:e.normalizeClass(o.shortcutList)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.shortcutOptions.items,a=>(e.openBlock(),e.createElementBlock("div",{key:a.id,class:""},[a.type==="link"?(e.openBlock(),e.createElementBlock("a",{key:0,id:`shortcut-${a.id}`,href:a.link,target:a.target},[e.createElementVNode("div",{class:e.normalizeClass(o.shortcutItem)},[e.createElementVNode("i",{class:e.normalizeClass(`${o.shortcutItemIcon}${a.icon}`)},null,2),e.createElementVNode("span",{class:e.normalizeClass(["inline-block overflow-hidden whitespace-nowrap transition-all duration-300",t.isCollapsed?"max-w-0 opacity-0":"max-w-xs opacity-100"])},[e.createElementVNode("p",{class:e.normalizeClass(o.shortcutItemLabel)},e.toDisplayString(a.label),3)],2)],2)],8,k)):e.createCommentVNode("",!0),a.type==="button"?(e.openBlock(),e.createElementBlock("button",{key:1,id:`shortcut-${a.id}`},[e.createElementVNode("div",{class:e.normalizeClass(o.shortcutItem)},[e.createElementVNode("i",{class:e.normalizeClass(`${o.shortcutItemIcon}${a.icon}`)},null,2),e.createElementVNode("span",{class:e.normalizeClass(["inline-block overflow-hidden whitespace-nowrap transition-all duration-300",t.isCollapsed?"max-w-0 opacity-0":"max-w-xs opacity-100"])},[e.createElementVNode("p",{class:e.normalizeClass(o.shortcutItemLabel)},e.toDisplayString(a.label),3)],2)],2)],8,y)):e.createCommentVNode("",!0)]))),128))],2)])])):e.createCommentVNode("",!0)}}),x=["id","href","target"],E=["onClick"],N=e.defineComponent({__name:"SidebarNavigationItems",props:{isCollapsed:{type:Boolean},navigationOptions:{}},setup(t){const o={container:"h-10 px-2 flex items-center justify-between",containerExpanded:"",containerCollapsed:"",itemContainer:"flex items-center justify-start gap-2 text-[#404040] cursor-pointer",icon:"text-[24px] az az-",label:"font-semibold text-[14px]"};return(l,n)=>(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.navigationOptions.items,(a,s)=>{var r;return e.openBlock(),e.createElementBlock("li",{key:(r=a.id)!=null?r:s,class:e.normalizeClass([o.container,t.isCollapsed?o.containerCollapsed:o.containerExpanded])},[a.type==="link"?(e.openBlock(),e.createElementBlock("a",{key:0,id:`navigation-${a.id}`,href:a.link,target:a.target},[e.createElementVNode("div",{class:e.normalizeClass(o.itemContainer)},[e.createElementVNode("i",{class:e.normalizeClass(`${o.icon}${a.icon}`)},null,2),e.createElementVNode("p",{class:e.normalizeClass(o.label)},e.toDisplayString(a.label),3)],2)],8,x)):e.createCommentVNode("",!0),a.type==="button"?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:a.onClick},[e.createElementVNode("div",{class:e.normalizeClass(o.itemContainer)},[e.createElementVNode("i",{class:e.normalizeClass(`${o.icon}${a.icon}`)},null,2),e.createElementVNode("p",{class:e.normalizeClass(o.label)},e.toDisplayString(a.label),3)],2)],8,E)):e.createCommentVNode("",!0)],2)}),128))}}),z=["src","alt"],V=e.defineComponent({__name:"SidebarFooterAvatar",props:{avatarUrl:{},name:{},initials:{},initialsBG:{}},setup(t){const o={container:"h-8 w-8 rounded-full",avatarImg:"h-8 w-8 rounded-full",avatarInitials:"h-full w-full flex items-center justify-center rounded-full"};return(l,n)=>{var a;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(o.container)},[t.avatarUrl?(e.openBlock(),e.createElementBlock("img",{key:0,class:e.normalizeClass(o.avatarImg),src:t.avatarUrl,alt:(a=t.name)!=null?a:"User avatar"},null,10,z)):(e.openBlock(),e.createElementBlock("p",{key:1,class:e.normalizeClass(o.avatarInitials),style:e.normalizeStyle(`background-color: ${t.initialsBG}`)},e.toDisplayString(t.initials),7))],2)}}}),w={class:"w-8"},S=e.defineComponent({__name:"SidebarFooter",props:{isCollapsed:{type:Boolean},footerOptions:{}},emits:["toggleSidebarCollapsed"],setup(t,{emit:o}){const l=o,n={containerExpanded:"w-full flex justify-between items-center",containerCollapsed:"flex flex-col items-center",avatarNameContainer:"flex gap-2",nameContainer:"flex-1",name:"p-0 font-semibold text-[12px]",jobTitle:"p-0 text-[12px] text-gray-500",collapseButton:"cursor-pointer",collapsedCollapseButton:"!w-8 rotate-180 transition-transform duration-300",expandedCollapsedButton:"w-10"};return(a,s)=>{var r,d,m;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(n[t.isCollapsed?"containerCollapsed":"containerExpanded"])},[e.createElementVNode("div",{class:e.normalizeClass(n.avatarNameContainer)},[e.createVNode(V,{"avatar-url":t.footerOptions.avatarUrl,initials:(r=t.footerOptions.initials)!=null?r:"AZ","initials-b-g":t.footerOptions.initialsBG},null,8,["avatar-url","initials","initials-b-g"]),t.isCollapsed?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(n.nameContainer)},[e.createElementVNode("p",{class:e.normalizeClass(n.name)},e.toDisplayString((d=t.footerOptions.name)!=null?d:"First Last"),3),e.createElementVNode("p",{class:e.normalizeClass(n.jobTitle)},e.toDisplayString((m=t.footerOptions.jobTitle)!=null?m:"Job Title"),3)],2))],2),e.createElementVNode("div",w,[e.createVNode(e.unref(p.AzIconButton),{class:e.normalizeClass([n.collapseButton,t.isCollapsed?n.collapsedCollapseButton:n.expandedCollapsedButton]),ghost:"",appearance:"inverse","aria-label":"Sidebar close button","icon-class":"az-ui-sidebar-collapse",onClick:s[0]||(s[0]=()=>l("toggleSidebarCollapsed"))},null,8,["class"])])],2)}}}),u={showHeader:!0,headerOptions:()=>({showSearch:!0,logoSrc:"",logoAlt:"",logoBgColor:"",sidebarTitle:"Product name"}),showShortcuts:!0,shortcutOptions:{items:[{id:"dashboard",label:"Dashboard",icon:"ui-chevron-left",type:"button",onClick:()=>console.log("dashboard")}]},navigationOptions:{items:[{id:"dashboard",label:"Dashboard",icon:"ui-chevron-left",type:"button",onClick:()=>console.log("dashboard")}]},footerOptions:{initials:"AZ"}},O={class:""},$={key:0,class:""},I={key:0,class:""},_={class:""},j={class:"",role:"navigation","aria-label":"navigation items"},D={class:""},H=c(e.defineComponent({__name:"index",props:e.mergeDefaults({showHeader:{type:Boolean},headerOptions:{},showShortcuts:{type:Boolean},shortcutOptions:{},navigationOptions:{},footerOptions:{}},u),setup(t){const o=e.ref(!1),l=e.computed(()=>o.value?"4rem":"300px"),n={sidebarContainer:"h-full flex flex-col gap-3 p-3 bg-white border-r transition-[width] duration-500 ease-in-out overflow-hidden whitespace-nowrap",footer:"pt-2 flex items-center justify-between border-t border-[#999999]"};function a(){o.value=!o.value}return(s,r)=>(e.openBlock(),e.createElementBlock("aside",{class:e.normalizeClass(n.sidebarContainer),style:e.normalizeStyle({width:l.value})},[e.createElementVNode("div",O,[e.renderSlot(s.$slots,"header",{},void 0,!0),t.showHeader?(e.openBlock(),e.createElementBlock("div",$,[e.createVNode(C,{"is-collapsed":o.value,"header-options":t.headerOptions},null,8,["is-collapsed","header-options"])])):e.createCommentVNode("",!0)]),e.createElementVNode("div",null,[e.renderSlot(s.$slots,"shortcuts",{},void 0,!0),t.showShortcuts?(e.openBlock(),e.createElementBlock("div",I,[e.createVNode(B,{"is-collapsed":o.value,"shortcut-options":t.shortcutOptions},null,8,["is-collapsed","shortcut-options"])])):e.createCommentVNode("",!0)]),e.createElementVNode("section",_,[e.createElementVNode("nav",j,[e.createElementVNode("ul",D,[e.createVNode(N,{"is-collapsed":o.value,navigationOptions:t.navigationOptions},null,8,["is-collapsed","navigationOptions"]),e.renderSlot(s.$slots,"nav",{},void 0,!0)])])]),e.createElementVNode("div",{class:e.normalizeClass(n.footer)},[e.renderSlot(s.$slots,"footer",{},void 0,!0),e.createVNode(S,{"is-collapsed":o.value,"footer-options":t.footerOptions,onToggleSidebarCollapsed:a},null,8,["is-collapsed","footer-options"])],2)],6))}}),[["__scopeId","data-v-3107cbc1"]]);i.AzSidebar=H,Object.defineProperty(i,Symbol.toStringTag,{value:"Module"})});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { SidebarFooterProps } from '../models/sidebar-footer.models';
|
|
2
|
+
|
|
3
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<SidebarFooterProps>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
4
|
+
toggleSidebarCollapsed: (...args: any[]) => void;
|
|
5
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<SidebarFooterProps>>> & Readonly<{
|
|
6
|
+
onToggleSidebarCollapsed?: ((...args: any[]) => any) | undefined;
|
|
7
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
8
|
+
export default _default;
|
|
9
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
10
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
11
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
12
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
13
|
+
} : {
|
|
14
|
+
type: import('vue').PropType<T[K]>;
|
|
15
|
+
required: true;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=SidebarFooter.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SidebarFooter.vue.d.ts","sourceRoot":"","sources":["../../../src/components/SidebarFooter.vue"],"names":[],"mappings":"AAGA,OAAO,qCAAqC,CAAC;AAE7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;;;;;;AA0KrE,wBAOG;AACH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,6BAA6B,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { SidebarFooterAvatarProps } from '../models/sidebar-footer.models';
|
|
2
|
+
|
|
3
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<SidebarFooterAvatarProps>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<SidebarFooterAvatarProps>>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
4
|
+
export default _default;
|
|
5
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
6
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
7
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
8
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
9
|
+
} : {
|
|
10
|
+
type: import('vue').PropType<T[K]>;
|
|
11
|
+
required: true;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=SidebarFooterAvatar.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SidebarFooterAvatar.vue.d.ts","sourceRoot":"","sources":["../../../src/components/SidebarFooterAvatar.vue"],"names":[],"mappings":"AAEA,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;;AAkF3E,wBAMG;AACH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,6BAA6B,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { SidebarNavigationItemsProps } from '../models/sidebar-navigation-items.models';
|
|
2
|
+
|
|
3
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<SidebarNavigationItemsProps>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<SidebarNavigationItemsProps>>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
4
|
+
export default _default;
|
|
5
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
6
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
7
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
8
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
9
|
+
} : {
|
|
10
|
+
type: import('vue').PropType<T[K]>;
|
|
11
|
+
required: true;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=SidebarNavigationItems.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SidebarNavigationItems.vue.d.ts","sourceRoot":"","sources":["../../../src/components/SidebarNavigationItems.vue"],"names":[],"mappings":"AAGA,OAAO,EAAE,2BAA2B,EAAE,MAAM,2CAA2C,CAAC;;AAkKxF,wBAMG;AACH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,6BAA6B,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC"}
|
|
@@ -10,4 +10,5 @@ export declare const WithoutSearch: Story;
|
|
|
10
10
|
export declare const WithShortcuts: Story;
|
|
11
11
|
export declare const CustomHeader: Story;
|
|
12
12
|
export declare const WithFooter: Story;
|
|
13
|
+
export declare const WithFooterAvatar: Story;
|
|
13
14
|
//# sourceMappingURL=index.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.stories.d.ts","sourceRoot":"","sources":["../../src/index.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,OAAO,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.stories.d.ts","sourceRoot":"","sources":["../../src/index.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,OAAO,MAAM,aAAa,CAAC;AAuFlC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,OAAO,CAyL9B,CAAC;AACF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC;AAEjC,eAAO,MAAM,aAAa,EAAE,KAI3B,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAI3B,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAI3B,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAgB1B,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KASxB,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KAW9B,CAAC"}
|
package/dist/src/index.vue.d.ts
CHANGED
|
@@ -25,6 +25,18 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
25
25
|
onClick: () => void;
|
|
26
26
|
}[];
|
|
27
27
|
};
|
|
28
|
+
navigationOptions: {
|
|
29
|
+
items: {
|
|
30
|
+
id: string;
|
|
31
|
+
label: string;
|
|
32
|
+
icon: string;
|
|
33
|
+
type: string;
|
|
34
|
+
onClick: () => void;
|
|
35
|
+
}[];
|
|
36
|
+
};
|
|
37
|
+
footerOptions: {
|
|
38
|
+
initials: string;
|
|
39
|
+
};
|
|
28
40
|
}>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<SidebarProps>, {
|
|
29
41
|
showHeader: boolean;
|
|
30
42
|
headerOptions: () => {
|
|
@@ -44,9 +56,23 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
44
56
|
onClick: () => void;
|
|
45
57
|
}[];
|
|
46
58
|
};
|
|
59
|
+
navigationOptions: {
|
|
60
|
+
items: {
|
|
61
|
+
id: string;
|
|
62
|
+
label: string;
|
|
63
|
+
icon: string;
|
|
64
|
+
type: string;
|
|
65
|
+
onClick: () => void;
|
|
66
|
+
}[];
|
|
67
|
+
};
|
|
68
|
+
footerOptions: {
|
|
69
|
+
initials: string;
|
|
70
|
+
};
|
|
47
71
|
}>>> & Readonly<{}>, {
|
|
48
72
|
headerOptions: import('./models/sidebar-header.models').SidebarHeaderOptions;
|
|
49
73
|
shortcutOptions: import('./models/sidebar-shortcuts.models').SidebarShortcutsOptions;
|
|
74
|
+
navigationOptions: import('./models/sidebar-navigation-items.models').SidebarNavigationItemsOptions;
|
|
75
|
+
footerOptions: import('./models/sidebar-footer.models').SidebarFooterOptions;
|
|
50
76
|
showHeader: boolean;
|
|
51
77
|
showShortcuts: boolean;
|
|
52
78
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.vue.d.ts","sourceRoot":"","sources":["../../src/index.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.vue.d.ts","sourceRoot":"","sources":["../../src/index.vue"],"names":[],"mappings":"AASA,OAAO,EAAuB,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAwB5E,iBAAS,cAAc;oBAwMM,GAAG;uBACA,GAAG;iBACT,GAAG;oBACA,GAAG;EAK/B;AAgBD,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4EAMnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AACxG,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,6BAA6B,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC;AAC9M,KAAK,kBAAkB,CAAC,CAAC,EAAE,CAAC,IAAI;KAE1B,CAAC,IAAI,MAAM,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,SAAS,MAAM,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;QACxE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;KACb,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CACT,CAAC;AACN,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC;AACxD,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAAE,QAAO;QAClD,MAAM,EAAE,CAAC,CAAC;KACT,CAAA;CAAE,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface SidebarFooterProps {
|
|
2
|
+
isCollapsed: boolean;
|
|
3
|
+
footerOptions: SidebarFooterOptions;
|
|
4
|
+
}
|
|
5
|
+
export interface SidebarFooterOptions {
|
|
6
|
+
name?: string;
|
|
7
|
+
jobTitle?: string;
|
|
8
|
+
avatarUrl?: string;
|
|
9
|
+
initials?: string;
|
|
10
|
+
initialsBG?: string;
|
|
11
|
+
}
|
|
12
|
+
export type SidebarFooterAvatarProps = {
|
|
13
|
+
avatarUrl?: string;
|
|
14
|
+
name?: string;
|
|
15
|
+
initials: string;
|
|
16
|
+
initialsBG?: string;
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=sidebar-footer.models.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sidebar-footer.models.d.ts","sourceRoot":"","sources":["../../../src/models/sidebar-footer.models.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,kBAAkB;IACjC,WAAW,EAAE,OAAO,CAAC;IACrB,aAAa,EAAE,oBAAoB,CAAC;CACrC;AAED,MAAM,WAAW,oBAAoB;IACnC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,MAAM,wBAAwB,GAAG;IACrC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export type SidebarNavigationItemsProps = {
|
|
2
|
+
isCollapsed: boolean;
|
|
3
|
+
navigationOptions: SidebarNavigationItemsOptions;
|
|
4
|
+
};
|
|
5
|
+
export type SidebarNavigationItemsOptions = {
|
|
6
|
+
items: SidebarNavigationItem[];
|
|
7
|
+
};
|
|
8
|
+
export type SidebarNavigationItem = {
|
|
9
|
+
id: string;
|
|
10
|
+
label: string;
|
|
11
|
+
icon: string;
|
|
12
|
+
subItems: Omit<SidebarNavigationItem, "subItems">[];
|
|
13
|
+
} & SidebarNavigationItemTypeOption;
|
|
14
|
+
export type SidebarNavigationItemTypeOption = {
|
|
15
|
+
type: "button";
|
|
16
|
+
onClick: () => void;
|
|
17
|
+
} | {
|
|
18
|
+
type: "link";
|
|
19
|
+
link?: string;
|
|
20
|
+
target: "_blank" | "_self" | "_parent" | "_top";
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=sidebar-navigation-items.models.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sidebar-navigation-items.models.d.ts","sourceRoot":"","sources":["../../../src/models/sidebar-navigation-items.models.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,2BAA2B,GAAG;IACxC,WAAW,EAAE,OAAO,CAAC;IACrB,iBAAiB,EAAE,6BAA6B,CAAC;CAClD,CAAC;AAEF,MAAM,MAAM,6BAA6B,GAAG;IAC1C,KAAK,EAAE,qBAAqB,EAAE,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,IAAI,CAAC,qBAAqB,EAAE,UAAU,CAAC,EAAE,CAAC;CACrD,GAAG,+BAA+B,CAAC;AAEpC,MAAM,MAAM,+BAA+B,GACvC;IACE,IAAI,EAAE,QAAQ,CAAC;IACf,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,GACD;IACE,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;CACjD,CAAC"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { SidebarFooterOptions } from './sidebar-footer.models';
|
|
1
2
|
import { SidebarHeaderOptions } from './sidebar-header.models';
|
|
3
|
+
import { SidebarNavigationItemsOptions } from './sidebar-navigation-items.models';
|
|
2
4
|
import { SidebarShortcutsOptions } from './sidebar-shortcuts.models';
|
|
3
5
|
|
|
4
6
|
export type SidebarProps = {
|
|
@@ -6,6 +8,8 @@ export type SidebarProps = {
|
|
|
6
8
|
headerOptions?: SidebarHeaderOptions;
|
|
7
9
|
showShortcuts?: boolean;
|
|
8
10
|
shortcutOptions?: SidebarShortcutsOptions;
|
|
11
|
+
navigationOptions?: SidebarNavigationItemsOptions;
|
|
12
|
+
footerOptions?: SidebarFooterOptions;
|
|
9
13
|
};
|
|
10
14
|
export declare const DefaultSidebarProps: {
|
|
11
15
|
showHeader: boolean;
|
|
@@ -26,5 +30,17 @@ export declare const DefaultSidebarProps: {
|
|
|
26
30
|
onClick: () => void;
|
|
27
31
|
}[];
|
|
28
32
|
};
|
|
33
|
+
navigationOptions: {
|
|
34
|
+
items: {
|
|
35
|
+
id: string;
|
|
36
|
+
label: string;
|
|
37
|
+
icon: string;
|
|
38
|
+
type: string;
|
|
39
|
+
onClick: () => void;
|
|
40
|
+
}[];
|
|
41
|
+
};
|
|
42
|
+
footerOptions: {
|
|
43
|
+
initials: string;
|
|
44
|
+
};
|
|
29
45
|
};
|
|
30
46
|
//# sourceMappingURL=sidebar.models.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sidebar.models.d.ts","sourceRoot":"","sources":["../../../src/models/sidebar.models.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAErE,MAAM,MAAM,YAAY,GAAG;IACzB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,aAAa,CAAC,EAAE,oBAAoB,CAAC;IACrC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,eAAe,CAAC,EAAE,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"sidebar.models.d.ts","sourceRoot":"","sources":["../../../src/models/sidebar.models.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,6BAA6B,EAAE,MAAM,mCAAmC,CAAC;AAClF,OAAO,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAErE,MAAM,MAAM,YAAY,GAAG;IACzB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,aAAa,CAAC,EAAE,oBAAoB,CAAC;IACrC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,eAAe,CAAC,EAAE,uBAAuB,CAAC;IAC1C,iBAAiB,CAAC,EAAE,6BAA6B,CAAC;IAClD,aAAa,CAAC,EAAE,oBAAoB,CAAC;CACtC,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiC/B,CAAC"}
|