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