@visitscotland/component-library 5.16.0 → 5.16.1
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/client/manifest.json +9 -9
- package/dist/client/scripts/{49f72f28d28a8aea228b.js → 8f8e18af47afd9dac73b.js} +1 -1
- package/dist/client/scripts/{2265981c0419fd31e547.js → 911dd5e8365b20cc0c1f.js} +1 -1
- package/dist/client/scripts/a2e4b319b67673e9af30.js +1 -0
- package/dist/components/vs-component-library.js +1 -1
- package/dist/components/vs-component-library.mjs +62 -20
- package/dist/ssr/index.js +1 -1
- package/dist/ssr/manifest.json +1 -1
- package/package.json +1 -1
- package/dist/client/scripts/da2e15296fabbccab55c.js +0 -1
- /package/dist/client/styles/{2265981c0419fd31e547.css → 911dd5e8365b20cc0c1f.css} +0 -0
- /package/dist/client/styles/{da2e15296fabbccab55c.css → a2e4b319b67673e9af30.css} +0 -0
- /package/dist/ssr/styles/{9a83335238cd4a02f82a.css → 179937467560f627d301.css} +0 -0
|
@@ -34113,12 +34113,12 @@ const useFederatedSearchStore = defineStore("federatedSearch", () => {
|
|
|
34113
34113
|
emits: ["filter-updated"],
|
|
34114
34114
|
setup(e) {
|
|
34115
34115
|
const n = e, t = ref(null);
|
|
34116
|
-
function a(
|
|
34117
|
-
return typeof n.activeFilter == "string" ? n.activeFilter ===
|
|
34116
|
+
function a(l) {
|
|
34117
|
+
return typeof n.activeFilter == "string" ? n.activeFilter === l : n.activeFilter && typeof n.activeFilter == "object" ? n.activeFilter.includes(l) : !1;
|
|
34118
34118
|
}
|
|
34119
|
-
function r(
|
|
34120
|
-
var
|
|
34121
|
-
|
|
34119
|
+
function r(l) {
|
|
34120
|
+
var c, u;
|
|
34121
|
+
l === "left" ? (c = t.value) == null || c.scrollBy(-200, 0) : l === "right" && ((u = t.value) == null || u.scrollBy(200, 0));
|
|
34122
34122
|
}
|
|
34123
34123
|
function s() {
|
|
34124
34124
|
return [
|
|
@@ -34126,18 +34126,60 @@ const useFederatedSearchStore = defineStore("federatedSearch", () => {
|
|
|
34126
34126
|
n.wrap ? "vs-fed-filter__scroll-rail--wrap" : ""
|
|
34127
34127
|
];
|
|
34128
34128
|
}
|
|
34129
|
-
const o = computed$1(() => [...n.filterCategories].sort((
|
|
34130
|
-
const
|
|
34131
|
-
return
|
|
34129
|
+
const o = computed$1(() => [...n.filterCategories].sort((c, u) => {
|
|
34130
|
+
const d = (c.Label || c.Key || "").toLowerCase(), m = (u.Label || u.Key || "").toLowerCase();
|
|
34131
|
+
return d < m ? -1 : d > m ? 1 : 0;
|
|
34132
34132
|
}));
|
|
34133
|
-
|
|
34134
|
-
|
|
34133
|
+
function i(l) {
|
|
34134
|
+
let c;
|
|
34135
|
+
switch (l) {
|
|
34136
|
+
case "accommodation":
|
|
34137
|
+
c = "fa-regular fa-bed";
|
|
34138
|
+
break;
|
|
34139
|
+
case "active-adventure":
|
|
34140
|
+
c = "fa-kit fa-vs-landscape";
|
|
34141
|
+
break;
|
|
34142
|
+
case "city-break":
|
|
34143
|
+
c = "fa-regular fa-city";
|
|
34144
|
+
break;
|
|
34145
|
+
case "culture-history":
|
|
34146
|
+
c = "fa-regular fa-chess-rook";
|
|
34147
|
+
break;
|
|
34148
|
+
case "events":
|
|
34149
|
+
c = "fa-regular fa-calendar-range";
|
|
34150
|
+
break;
|
|
34151
|
+
case "family-friendly":
|
|
34152
|
+
c = "fa-regular fa-family";
|
|
34153
|
+
break;
|
|
34154
|
+
case "food-drink":
|
|
34155
|
+
c = "fa-regular fa-utensils";
|
|
34156
|
+
break;
|
|
34157
|
+
case "nature-outdoors":
|
|
34158
|
+
c = "fa-regular fa-leaf";
|
|
34159
|
+
break;
|
|
34160
|
+
case "tours":
|
|
34161
|
+
c = "fa-regular fa-binoculars";
|
|
34162
|
+
break;
|
|
34163
|
+
case "travel-information":
|
|
34164
|
+
c = "fa-regular fa-circle-info";
|
|
34165
|
+
break;
|
|
34166
|
+
case "wellness":
|
|
34167
|
+
c = "fa-regular fa-spa";
|
|
34168
|
+
break;
|
|
34169
|
+
default:
|
|
34170
|
+
c = null;
|
|
34171
|
+
break;
|
|
34172
|
+
}
|
|
34173
|
+
return c;
|
|
34174
|
+
}
|
|
34175
|
+
return (l, c) => (openBlock(), createElementBlock("div", _hoisted_1$3, [
|
|
34176
|
+
l.$slots["fed-filter-header"] && l.$slots["fed-filter-header"]() ? (openBlock(), createBlock(VsBody, {
|
|
34135
34177
|
key: 0,
|
|
34136
34178
|
class: "vs-fed-filter__header mb-025 ms-025",
|
|
34137
34179
|
"data-test": "vs-fed-filter__header"
|
|
34138
34180
|
}, {
|
|
34139
34181
|
default: withCtx(() => [
|
|
34140
|
-
renderSlot(
|
|
34182
|
+
renderSlot(l.$slots, "fed-filter-header")
|
|
34141
34183
|
]),
|
|
34142
34184
|
_: 3
|
|
34143
34185
|
})) : createCommentVNode("", !0),
|
|
@@ -34149,7 +34191,7 @@ const useFederatedSearchStore = defineStore("federatedSearch", () => {
|
|
|
34149
34191
|
"icon-only": "",
|
|
34150
34192
|
class: "vs-fed-filter__scroll-button me-050",
|
|
34151
34193
|
"data-test": "vs-fed-filter__scroll-button--left",
|
|
34152
|
-
onClick:
|
|
34194
|
+
onClick: c[0] || (c[0] = (u) => r("left")),
|
|
34153
34195
|
"aria-label": n.scrollLeftText
|
|
34154
34196
|
}, {
|
|
34155
34197
|
default: withCtx(() => [
|
|
@@ -34163,17 +34205,17 @@ const useFederatedSearchStore = defineStore("federatedSearch", () => {
|
|
|
34163
34205
|
ref_key: "scrollRail",
|
|
34164
34206
|
ref: t
|
|
34165
34207
|
}, [
|
|
34166
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(o.value, (
|
|
34167
|
-
key:
|
|
34208
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(o.value, (u, d) => (openBlock(), createBlock(VsButton, {
|
|
34209
|
+
key: d,
|
|
34168
34210
|
class: "vs-fed-filter__category-button",
|
|
34169
|
-
"data-test": `vs-fed-filter__category-button--${
|
|
34170
|
-
icon: n.variant === "primary" ?
|
|
34171
|
-
variant: a(
|
|
34211
|
+
"data-test": `vs-fed-filter__category-button--${u.Key}`,
|
|
34212
|
+
icon: n.variant === "primary" ? i(u.Key) : null,
|
|
34213
|
+
variant: a(u.Key) ? "primary" : "secondary",
|
|
34172
34214
|
size: n.variant === "secondary" ? "sm" : "md",
|
|
34173
|
-
onClick: (
|
|
34215
|
+
onClick: (m) => l.$emit("filter-updated", u)
|
|
34174
34216
|
}, {
|
|
34175
34217
|
default: withCtx(() => [
|
|
34176
|
-
createTextVNode(toDisplayString(
|
|
34218
|
+
createTextVNode(toDisplayString(u.Label || u.Key), 1)
|
|
34177
34219
|
]),
|
|
34178
34220
|
_: 2
|
|
34179
34221
|
}, 1032, ["data-test", "icon", "variant", "size", "onClick"]))), 128))
|
|
@@ -34185,7 +34227,7 @@ const useFederatedSearchStore = defineStore("federatedSearch", () => {
|
|
|
34185
34227
|
"icon-only": "",
|
|
34186
34228
|
class: "vs-fed-filter__scroll-button ms-050",
|
|
34187
34229
|
"data-test": "vs-fed-filter__scroll-button--right",
|
|
34188
|
-
onClick:
|
|
34230
|
+
onClick: c[1] || (c[1] = (u) => r("right")),
|
|
34189
34231
|
"aria-label": n.scrollRightText
|
|
34190
34232
|
}, {
|
|
34191
34233
|
default: withCtx(() => [
|