slippers-ui 3.1.2 → 3.1.3
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/chunks/ChevronLgUp-BwtjsOWr.js +44 -0
- package/dist/icons/index.js +1454 -1485
- package/dist/slippers-ui.es.js +181 -147
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/chunks/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
package/dist/slippers-ui.es.js
CHANGED
|
@@ -1,142 +1,142 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { _ as
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as y, computed as p, openBlock as a, createElementBlock as o, mergeProps as w, renderSlot as d, normalizeClass as u, createElementVNode as r, createBlock as B, resolveDynamicComponent as E, normalizeStyle as M, withCtx as V, createCommentVNode as O, ref as b, onMounted as q, onUnmounted as R, createVNode as D, unref as S, Fragment as C, renderList as I, withModifiers as N, toDisplayString as z } from "vue";
|
|
2
|
+
import { _, C as T, a as j } from "./chunks/ChevronLgUp-BwtjsOWr.js";
|
|
3
|
+
const x = ["href"], A = /* @__PURE__ */ y({
|
|
4
4
|
__name: "SlpButton",
|
|
5
5
|
props: {
|
|
6
6
|
disabled: { type: Boolean },
|
|
7
7
|
variant: {},
|
|
8
8
|
href: {}
|
|
9
9
|
},
|
|
10
|
-
setup(
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
const
|
|
14
|
-
let t = [`slp-btn-${
|
|
15
|
-
return
|
|
10
|
+
setup(c) {
|
|
11
|
+
const e = c, v = p(() => e.disabled ?? !1), n = p(() => e.variant ?? "primary");
|
|
12
|
+
p(() => e.href ?? "");
|
|
13
|
+
const s = p(() => {
|
|
14
|
+
let t = [`slp-btn-${n.value}`];
|
|
15
|
+
return v.value && t.push("slp-btn-disabled"), t.join(" ");
|
|
16
16
|
});
|
|
17
|
-
return (t,
|
|
18
|
-
class: ["slp-btn",
|
|
19
|
-
href:
|
|
17
|
+
return (t, i) => e.href ? (a(), o("a", w({ key: 0 }, t.$attrs, {
|
|
18
|
+
class: ["slp-btn", s.value],
|
|
19
|
+
href: e.href
|
|
20
20
|
}), [
|
|
21
|
-
|
|
22
|
-
], 16,
|
|
23
|
-
class: ["slp-btn",
|
|
21
|
+
d(t.$slots, "default", {}, void 0, !0)
|
|
22
|
+
], 16, x)) : (a(), o("button", w({ key: 1 }, t.$attrs, {
|
|
23
|
+
class: ["slp-btn", s.value],
|
|
24
24
|
type: "button"
|
|
25
25
|
}), [
|
|
26
|
-
|
|
26
|
+
d(t.$slots, "default", {}, void 0, !0)
|
|
27
27
|
], 16));
|
|
28
28
|
}
|
|
29
|
-
}),
|
|
29
|
+
}), ve = /* @__PURE__ */ _(A, [["__scopeId", "data-v-56e2df5f"]]), H = /* @__PURE__ */ y({
|
|
30
30
|
__name: "SlpColumn",
|
|
31
31
|
props: {
|
|
32
32
|
cols: {},
|
|
33
33
|
size: {}
|
|
34
34
|
},
|
|
35
|
-
setup(
|
|
36
|
-
const
|
|
37
|
-
return (t,
|
|
38
|
-
class:
|
|
35
|
+
setup(c) {
|
|
36
|
+
const e = c, v = p(() => e.cols ?? null), n = p(() => e.size ?? "md"), s = p(() => v.value ? `slp-col-${n.value}-${v.value}` : `slp-col-${n.value}`);
|
|
37
|
+
return (t, i) => (a(), o("div", {
|
|
38
|
+
class: u(s.value)
|
|
39
39
|
}, [
|
|
40
|
-
|
|
40
|
+
d(t.$slots, "default", {}, void 0, !0)
|
|
41
41
|
], 2));
|
|
42
42
|
}
|
|
43
|
-
}),
|
|
43
|
+
}), fe = /* @__PURE__ */ _(H, [["__scopeId", "data-v-00b68f22"]]), U = {
|
|
44
44
|
key: 0,
|
|
45
45
|
class: "slp-full-light-purple-background"
|
|
46
|
-
},
|
|
46
|
+
}, W = {
|
|
47
47
|
key: 1,
|
|
48
48
|
class: "slp-charcoal-grey-background"
|
|
49
|
-
},
|
|
49
|
+
}, F = {
|
|
50
50
|
key: 2,
|
|
51
51
|
class: "slp-gradient-background"
|
|
52
|
-
},
|
|
52
|
+
}, J = {
|
|
53
53
|
key: 3,
|
|
54
54
|
class: "slp-full-gradient-background"
|
|
55
|
-
},
|
|
55
|
+
}, P = {
|
|
56
56
|
key: 4,
|
|
57
57
|
class: "slp-full-charcoal-background"
|
|
58
|
-
},
|
|
58
|
+
}, G = {
|
|
59
59
|
key: 5,
|
|
60
60
|
class: "slp-partial-charcoal-background"
|
|
61
|
-
},
|
|
61
|
+
}, K = {
|
|
62
62
|
key: 6,
|
|
63
63
|
class: "slp-half-grey-background"
|
|
64
|
-
},
|
|
64
|
+
}, Q = {
|
|
65
65
|
key: 7,
|
|
66
66
|
class: "slp-partial-white-background"
|
|
67
|
-
},
|
|
67
|
+
}, X = {
|
|
68
68
|
key: 8,
|
|
69
69
|
class: "slp-partial-grey-background"
|
|
70
|
-
},
|
|
70
|
+
}, Y = /* @__PURE__ */ y({
|
|
71
71
|
__name: "SlpContainer",
|
|
72
72
|
props: {
|
|
73
73
|
fluid: { type: Boolean },
|
|
74
74
|
variant: {}
|
|
75
75
|
},
|
|
76
|
-
setup(
|
|
77
|
-
const
|
|
78
|
-
return (t,
|
|
79
|
-
|
|
80
|
-
class:
|
|
76
|
+
setup(c) {
|
|
77
|
+
const e = c, v = p(() => e.fluid ?? !1), n = p(() => e.variant ?? "white"), s = p(() => v.value ? "fluid" : "");
|
|
78
|
+
return (t, i) => n.value === "light-purple-100" ? (a(), o("div", U, [
|
|
79
|
+
r("div", {
|
|
80
|
+
class: u(["slp-container", s.value])
|
|
81
81
|
}, [
|
|
82
|
-
|
|
82
|
+
d(t.$slots, "default", {}, void 0, !0)
|
|
83
83
|
], 2)
|
|
84
|
-
])) :
|
|
85
|
-
|
|
86
|
-
class:
|
|
84
|
+
])) : n.value === "grey-100" ? (a(), o("div", W, [
|
|
85
|
+
r("div", {
|
|
86
|
+
class: u(["slp-container", s.value])
|
|
87
87
|
}, [
|
|
88
|
-
|
|
88
|
+
d(t.$slots, "default", {}, void 0, !0)
|
|
89
89
|
], 2)
|
|
90
|
-
])) :
|
|
91
|
-
|
|
92
|
-
class:
|
|
90
|
+
])) : n.value === "gradient" ? (a(), o("div", F, [
|
|
91
|
+
r("div", {
|
|
92
|
+
class: u(["slp-container", s.value])
|
|
93
93
|
}, [
|
|
94
|
-
|
|
94
|
+
d(t.$slots, "default", {}, void 0, !0)
|
|
95
95
|
], 2)
|
|
96
|
-
])) :
|
|
97
|
-
|
|
98
|
-
class:
|
|
96
|
+
])) : n.value === "gradient-full" ? (a(), o("div", J, [
|
|
97
|
+
r("div", {
|
|
98
|
+
class: u(["slp-container", s.value])
|
|
99
99
|
}, [
|
|
100
|
-
|
|
100
|
+
d(t.$slots, "default", {}, void 0, !0)
|
|
101
101
|
], 2)
|
|
102
|
-
])) :
|
|
103
|
-
|
|
104
|
-
class:
|
|
102
|
+
])) : n.value === "charcoal-100" ? (a(), o("div", P, [
|
|
103
|
+
r("div", {
|
|
104
|
+
class: u(["slp-container", s.value])
|
|
105
105
|
}, [
|
|
106
|
-
|
|
106
|
+
d(t.$slots, "default", {}, void 0, !0)
|
|
107
107
|
], 2)
|
|
108
|
-
])) :
|
|
109
|
-
|
|
110
|
-
class:
|
|
108
|
+
])) : n.value === "charcoal-75" ? (a(), o("div", G, [
|
|
109
|
+
r("div", {
|
|
110
|
+
class: u(["slp-container", s.value])
|
|
111
111
|
}, [
|
|
112
|
-
|
|
112
|
+
d(t.$slots, "default", {}, void 0, !0)
|
|
113
113
|
], 2)
|
|
114
|
-
])) :
|
|
115
|
-
|
|
116
|
-
class:
|
|
114
|
+
])) : n.value === "grey-50" ? (a(), o("div", K, [
|
|
115
|
+
r("div", {
|
|
116
|
+
class: u(["slp-container", s.value])
|
|
117
117
|
}, [
|
|
118
|
-
|
|
118
|
+
d(t.$slots, "default", {}, void 0, !0)
|
|
119
119
|
], 2)
|
|
120
|
-
])) :
|
|
121
|
-
|
|
122
|
-
class:
|
|
120
|
+
])) : n.value === "white-75" ? (a(), o("div", Q, [
|
|
121
|
+
r("div", {
|
|
122
|
+
class: u(["slp-container", s.value])
|
|
123
123
|
}, [
|
|
124
|
-
|
|
124
|
+
d(t.$slots, "default", {}, void 0, !0)
|
|
125
125
|
], 2)
|
|
126
|
-
])) :
|
|
127
|
-
|
|
128
|
-
class:
|
|
126
|
+
])) : n.value === "grey-75" ? (a(), o("div", X, [
|
|
127
|
+
r("div", {
|
|
128
|
+
class: u(["slp-container", s.value])
|
|
129
129
|
}, [
|
|
130
|
-
|
|
130
|
+
d(t.$slots, "default", {}, void 0, !0)
|
|
131
131
|
], 2)
|
|
132
|
-
])) : (
|
|
132
|
+
])) : (a(), o("div", {
|
|
133
133
|
key: 9,
|
|
134
|
-
class:
|
|
134
|
+
class: u(["slp-container", s.value])
|
|
135
135
|
}, [
|
|
136
|
-
|
|
136
|
+
d(t.$slots, "default", {}, void 0, !0)
|
|
137
137
|
], 2));
|
|
138
138
|
}
|
|
139
|
-
}),
|
|
139
|
+
}), ge = /* @__PURE__ */ _(Y, [["__scopeId", "data-v-67a0761e"]]), Z = /* @__PURE__ */ y({
|
|
140
140
|
__name: "SlpIcon",
|
|
141
141
|
props: {
|
|
142
142
|
size: {
|
|
@@ -155,47 +155,47 @@ const O = ["href"], V = /* @__PURE__ */ _({
|
|
|
155
155
|
required: !0
|
|
156
156
|
}
|
|
157
157
|
},
|
|
158
|
-
setup(
|
|
159
|
-
const
|
|
160
|
-
const
|
|
161
|
-
return typeof
|
|
162
|
-
}),
|
|
158
|
+
setup(c) {
|
|
159
|
+
const e = c, v = p(() => {
|
|
160
|
+
const s = ["slp-icon"];
|
|
161
|
+
return typeof e.size == "string" && isNaN(Number(e.size)) && s.push(`slp-icon--size-${e.size}`), e.color && !e.color.startsWith("#") && s.push(`slp-icon--color-${e.color}`), s;
|
|
162
|
+
}), n = p(() => {
|
|
163
163
|
var t;
|
|
164
|
-
const
|
|
165
|
-
if ((t =
|
|
166
|
-
const
|
|
167
|
-
|
|
164
|
+
const s = {};
|
|
165
|
+
if ((t = e.color) != null && t.startsWith("#") && (s.color = e.color, s.fill = e.color), typeof e.size == "number" || !isNaN(Number(e.size))) {
|
|
166
|
+
const i = typeof e.size == "number" ? e.size : Number(e.size);
|
|
167
|
+
s.width = `${i}px`, s.height = `${i}px`;
|
|
168
168
|
}
|
|
169
|
-
return
|
|
169
|
+
return s;
|
|
170
170
|
});
|
|
171
|
-
return (
|
|
172
|
-
var
|
|
173
|
-
return
|
|
174
|
-
class:
|
|
175
|
-
style:
|
|
171
|
+
return (s, t) => {
|
|
172
|
+
var i, f;
|
|
173
|
+
return a(), B(E(c.icon), {
|
|
174
|
+
class: u(["slp-icon", v.value]),
|
|
175
|
+
style: M(n.value),
|
|
176
176
|
role: "img",
|
|
177
177
|
"aria-hidden": "true",
|
|
178
|
-
"data-icon-name": ((
|
|
178
|
+
"data-icon-name": ((f = (i = c.icon) == null ? void 0 : i.__docgenInfo) == null ? void 0 : f.displayName) || ""
|
|
179
179
|
}, null, 8, ["class", "style", "data-icon-name"]);
|
|
180
180
|
};
|
|
181
181
|
}
|
|
182
|
-
}),
|
|
183
|
-
function
|
|
184
|
-
return
|
|
185
|
-
|
|
182
|
+
}), ee = /* @__PURE__ */ _(Z, [["__scopeId", "data-v-b82aeda9"]]), se = {}, te = { class: "slp-row" };
|
|
183
|
+
function ne(c, e) {
|
|
184
|
+
return a(), o("div", te, [
|
|
185
|
+
d(c.$slots, "default", {}, void 0, !0)
|
|
186
186
|
]);
|
|
187
187
|
}
|
|
188
|
-
const
|
|
188
|
+
const he = /* @__PURE__ */ _(se, [["render", ne], ["__scopeId", "data-v-adc8d02f"]]), ae = {
|
|
189
189
|
key: 0,
|
|
190
190
|
class: "arrow-symbol"
|
|
191
|
-
},
|
|
191
|
+
}, oe = /* @__PURE__ */ y({
|
|
192
192
|
__name: "SlpTypography",
|
|
193
193
|
props: {
|
|
194
194
|
variant: {},
|
|
195
195
|
tag: {}
|
|
196
196
|
},
|
|
197
|
-
setup(
|
|
198
|
-
const
|
|
197
|
+
setup(c) {
|
|
198
|
+
const e = [
|
|
199
199
|
"display1",
|
|
200
200
|
"heading1",
|
|
201
201
|
"heading2",
|
|
@@ -217,18 +217,21 @@ const ie = /* @__PURE__ */ h(G, [["render", K], ["__scopeId", "data-v-adc8d02f"]
|
|
|
217
217
|
"arrow",
|
|
218
218
|
"quotes",
|
|
219
219
|
"emphasis"
|
|
220
|
-
],
|
|
221
|
-
return (
|
|
222
|
-
class:
|
|
220
|
+
], v = ["span", "h1", "h2", "h3", "h4", "p", "div"], n = c, s = p(() => e.includes(n.variant || "") ? n.variant : "body1"), t = p(() => v.includes(n.tag || "") ? n.tag : "span"), i = p(() => `slp-text-${s.value}`);
|
|
221
|
+
return (f, k) => (a(), B(E(t.value), {
|
|
222
|
+
class: u(i.value)
|
|
223
223
|
}, {
|
|
224
|
-
default:
|
|
225
|
-
|
|
226
|
-
|
|
224
|
+
default: V(() => [
|
|
225
|
+
d(f.$slots, "default", {}, void 0, !0),
|
|
226
|
+
s.value === "arrow" ? (a(), o("span", ae, "→")) : O("", !0)
|
|
227
227
|
]),
|
|
228
228
|
_: 3
|
|
229
229
|
}, 8, ["class"]));
|
|
230
230
|
}
|
|
231
|
-
}),
|
|
231
|
+
}), _e = /* @__PURE__ */ _(oe, [["__scopeId", "data-v-fba90f83"]]), le = {
|
|
232
|
+
key: 0,
|
|
233
|
+
class: "dropdown-menu"
|
|
234
|
+
}, ie = ["onClick"], re = { class: "side-navigation" }, de = ["data-ga-name", "onClick"], ce = /* @__PURE__ */ y({
|
|
232
235
|
__name: "SlpSideNavigation",
|
|
233
236
|
props: {
|
|
234
237
|
position: {
|
|
@@ -244,69 +247,100 @@ const ie = /* @__PURE__ */ h(G, [["render", K], ["__scopeId", "data-v-adc8d02f"]
|
|
|
244
247
|
required: !0
|
|
245
248
|
}
|
|
246
249
|
},
|
|
247
|
-
setup(
|
|
248
|
-
const
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
250
|
+
setup(c) {
|
|
251
|
+
const e = c, v = b(null), n = (h) => {
|
|
252
|
+
v.value && !v.value.contains(h.target) && (f.value = !1);
|
|
253
|
+
}, s = b(null), t = b(null);
|
|
254
|
+
let i = null;
|
|
255
|
+
const f = b(!1), k = (h) => {
|
|
256
|
+
const g = document.getElementById(h);
|
|
257
|
+
g && g.scrollIntoView({ behavior: "smooth" }), f.value = !1;
|
|
258
|
+
}, L = () => {
|
|
259
|
+
if (!t.value) return;
|
|
260
|
+
const h = e.navigationItems.map((l) => document.getElementById(l.id)).filter((l) => l !== null), g = (window.innerHeight - 140 - 1) * -1;
|
|
261
|
+
i = new IntersectionObserver(
|
|
262
|
+
(l) => {
|
|
263
|
+
l.forEach((m) => {
|
|
259
264
|
if (m.isIntersecting) {
|
|
260
|
-
const
|
|
261
|
-
|
|
265
|
+
const $ = m.target.getAttribute("id");
|
|
266
|
+
$ && (s.value = $);
|
|
262
267
|
}
|
|
263
268
|
});
|
|
264
269
|
},
|
|
265
270
|
{
|
|
266
271
|
rootMargin: `-120px 0px ${g}px 0px`,
|
|
267
|
-
threshold: Array.from({ length: 99 }, (
|
|
272
|
+
threshold: Array.from({ length: 99 }, (l, m) => (m + 2) / 100)
|
|
268
273
|
}
|
|
269
|
-
),
|
|
274
|
+
), h.forEach((l) => i == null ? void 0 : i.observe(l));
|
|
270
275
|
};
|
|
271
|
-
return
|
|
272
|
-
|
|
273
|
-
}),
|
|
274
|
-
|
|
275
|
-
}), (
|
|
276
|
-
class:
|
|
276
|
+
return q(() => {
|
|
277
|
+
L(), document.addEventListener("click", n);
|
|
278
|
+
}), R(() => {
|
|
279
|
+
i && i.disconnect(), document.removeEventListener("click", n);
|
|
280
|
+
}), (h, g) => (a(), o("div", {
|
|
281
|
+
class: u(["side-navigation-layout", `side-navigation-layout--${e.position}`, { "side-navigation--dark": e.darkMode }])
|
|
277
282
|
}, [
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
283
|
+
r("div", {
|
|
284
|
+
ref_key: "dropdownRef",
|
|
285
|
+
ref: v,
|
|
286
|
+
class: "side-navigation-dropdown"
|
|
287
|
+
}, [
|
|
288
|
+
r("button", {
|
|
289
|
+
class: "dropdown-toggle",
|
|
290
|
+
onClick: g[0] || (g[0] = (l) => f.value = !f.value)
|
|
291
|
+
}, [
|
|
292
|
+
g[1] || (g[1] = r("span", null, "Jump to a section", -1)),
|
|
293
|
+
D(ee, {
|
|
294
|
+
icon: f.value ? S(T) : S(j),
|
|
295
|
+
color: "black",
|
|
296
|
+
size: "sm"
|
|
297
|
+
}, null, 8, ["icon"])
|
|
298
|
+
]),
|
|
299
|
+
f.value ? (a(), o("ul", le, [
|
|
300
|
+
(a(!0), o(C, null, I(e.navigationItems, (l) => (a(), o("li", {
|
|
301
|
+
key: l.id,
|
|
302
|
+
class: "dropdown-item"
|
|
303
|
+
}, [
|
|
304
|
+
r("a", {
|
|
305
|
+
href: "#",
|
|
306
|
+
class: "dropdown-link",
|
|
307
|
+
onClick: N((m) => k(l.id), ["prevent"])
|
|
308
|
+
}, z(l.text), 9, ie)
|
|
309
|
+
]))), 128))
|
|
310
|
+
])) : O("", !0)
|
|
311
|
+
], 512),
|
|
312
|
+
r("nav", re, [
|
|
313
|
+
r("ul", null, [
|
|
314
|
+
(a(!0), o(C, null, I(e.navigationItems, (l) => (a(), o("li", {
|
|
315
|
+
key: l.id,
|
|
282
316
|
class: "side-navigation__item"
|
|
283
317
|
}, [
|
|
284
|
-
|
|
318
|
+
r("a", {
|
|
285
319
|
href: "#",
|
|
286
|
-
class:
|
|
287
|
-
"data-ga-name":
|
|
320
|
+
class: u(["side-navigation__link", { "side-navigation__link--active": s.value === l.id }]),
|
|
321
|
+
"data-ga-name": l.text,
|
|
288
322
|
"data-ga-location": "side anchor",
|
|
289
|
-
onClick:
|
|
290
|
-
},
|
|
323
|
+
onClick: N((m) => k(l.id), ["prevent"])
|
|
324
|
+
}, z(l.text), 11, de)
|
|
291
325
|
]))), 128))
|
|
292
326
|
])
|
|
293
327
|
]),
|
|
294
|
-
|
|
328
|
+
r("div", {
|
|
295
329
|
ref_key: "slotContentRef",
|
|
296
|
-
ref:
|
|
330
|
+
ref: t,
|
|
297
331
|
class: "side-navigation-content"
|
|
298
332
|
}, [
|
|
299
|
-
|
|
333
|
+
d(h.$slots, "default", {}, void 0, !0)
|
|
300
334
|
], 512)
|
|
301
335
|
], 2));
|
|
302
336
|
}
|
|
303
|
-
}),
|
|
337
|
+
}), me = /* @__PURE__ */ _(ce, [["__scopeId", "data-v-bb14a48b"]]);
|
|
304
338
|
export {
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
339
|
+
ve as SlpButton,
|
|
340
|
+
fe as SlpColumn,
|
|
341
|
+
ge as SlpContainer,
|
|
342
|
+
ee as SlpIcon,
|
|
343
|
+
he as SlpRow,
|
|
344
|
+
me as SlpSideNavigation,
|
|
345
|
+
_e as SlpTypography
|
|
312
346
|
};
|