@leaflink/stash 42.8.0 → 43.0.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/README.md +1 -1
- package/dist/AddressSelect.js +9 -10
- package/dist/AddressSelect.js.map +1 -1
- package/dist/Alert.js +9 -9
- package/dist/Alert.js.map +1 -1
- package/dist/AppSidebar.js +11 -11
- package/dist/AppSidebar.js.map +1 -1
- package/dist/Avatar.js +33 -32
- package/dist/Avatar.js.map +1 -1
- package/dist/Avatar.vue.d.ts +16 -95
- package/dist/Badge.js +2 -2
- package/dist/Badge.js.map +1 -1
- package/dist/Checkbox.js +4 -4
- package/dist/Checkbox.js.map +1 -1
- package/dist/{Checkbox.vue_vue_type_style_index_0_scoped_0cd31c8f_lang-4ed993c7.js → Checkbox.vue_vue_type_style_index_0_scoped_0d7e7fd0_lang-4ed993c7.js} +1 -1
- package/dist/Checkbox.vue_vue_type_style_index_0_scoped_0d7e7fd0_lang-4ed993c7.js.map +1 -0
- package/dist/Chip.js +32 -30
- package/dist/Chip.js.map +1 -1
- package/dist/Chip.vue.d.ts +16 -95
- package/dist/ConfirmationCodeInput.js +23 -23
- package/dist/ConfirmationCodeInput.js.map +1 -1
- package/dist/ContextSwitcher.js +2 -2
- package/dist/ContextSwitcher.js.map +1 -1
- package/dist/Copy.js +1 -1
- package/dist/Copy.js.map +1 -1
- package/dist/DataView.js +1 -1
- package/dist/DataViewFilters.js +23 -24
- package/dist/DataViewFilters.js.map +1 -1
- package/dist/DataViewSortButton.js +11 -11
- package/dist/DataViewSortButton.js.map +1 -1
- package/dist/DataViewToolbar.js +1 -1
- package/dist/Dialog.js +10 -10
- package/dist/Dialog.js.map +1 -1
- package/dist/Dropdown.js +7 -7
- package/dist/Dropdown.js.map +1 -1
- package/dist/FilterChip.js +2 -3
- package/dist/FilterChip.js.map +1 -1
- package/dist/FilterDrawerItem.js +5 -6
- package/dist/FilterDrawerItem.js.map +1 -1
- package/dist/FilterDropdown.js +3 -4
- package/dist/FilterDropdown.js.map +1 -1
- package/dist/FilterSelect.js +26 -27
- package/dist/FilterSelect.js.map +1 -1
- package/dist/Filters.js +3 -4
- package/dist/Filters.js.map +1 -1
- package/dist/HttpError.js +36 -39
- package/dist/HttpError.js.map +1 -1
- package/dist/IconLabel.js +12 -13
- package/dist/IconLabel.js.map +1 -1
- package/dist/IconLabel.vue.d.ts +9 -75
- package/dist/Illustration.js +1 -1
- package/dist/Illustration.js.map +1 -1
- package/dist/Illustration.vue.d.ts +19 -14
- package/dist/InputOptions.js +7 -8
- package/dist/InputOptions.js.map +1 -1
- package/dist/LicenseChip.js +32 -26
- package/dist/LicenseChip.js.map +1 -1
- package/dist/LicenseChip.vue.d.ts +2 -4
- package/dist/ListItem.js +1 -1
- package/dist/ListView.js +30 -31
- package/dist/ListView.js.map +1 -1
- package/dist/MenuItem.js +4 -4
- package/dist/MenuItem.js.map +1 -1
- package/dist/Metric.js +1 -1
- package/dist/Metric.js.map +1 -1
- package/dist/Metric.vue.d.ts +8 -74
- package/dist/Modal.js +13 -13
- package/dist/Modal.js.map +1 -1
- package/dist/Module.js +1 -1
- package/dist/Module.js.map +1 -1
- package/dist/ModuleFooter.js +1 -1
- package/dist/ModuleFooter.js.map +1 -1
- package/dist/ModuleHeader.js +1 -1
- package/dist/ModuleHeader.js.map +1 -1
- package/dist/PageNavigation.js +28 -29
- package/dist/PageNavigation.js.map +1 -1
- package/dist/Paginate.js +1 -1
- package/dist/Paginate.js.map +1 -1
- package/dist/Paginate.vue_used_vue_type_style_index_0_lang.module-bfccf992.js +11 -0
- package/dist/Paginate.vue_used_vue_type_style_index_0_lang.module-bfccf992.js.map +1 -0
- package/dist/QuickAction.js +14 -14
- package/dist/QuickAction.js.map +1 -1
- package/dist/RadioNew.js +14 -14
- package/dist/SearchBar.js +15 -15
- package/dist/SearchBar.js.map +1 -1
- package/dist/Select.js +92 -93
- package/dist/Select.js.map +1 -1
- package/dist/SelectStatus.js +53 -51
- package/dist/SelectStatus.js.map +1 -1
- package/dist/SelectStatus.vue.d.ts +52 -1
- package/dist/Step.js +28 -28
- package/dist/Step.js.map +1 -1
- package/dist/Tab.js +1 -1
- package/dist/Table.js +2 -2
- package/dist/TableCell.js +2 -2
- package/dist/TableHeaderCell.js +2 -2
- package/dist/TableHeaderRow.js +2 -2
- package/dist/TableRow.js +2 -2
- package/dist/Tabs.js +2 -2
- package/dist/{Tabs.vue_vue_type_script_setup_true_lang-aca4f8b8.js → Tabs.vue_vue_type_script_setup_true_lang-56e85faa.js} +3 -3
- package/dist/Tabs.vue_vue_type_script_setup_true_lang-56e85faa.js.map +1 -0
- package/dist/Textarea.js +19 -19
- package/dist/Textarea.js.map +1 -1
- package/dist/Toast.js +1 -1
- package/dist/Toasts.js +1 -1
- package/dist/ToastsPlugin.js +1 -1
- package/dist/colorScheme.d.ts +3 -16
- package/dist/components.css +1 -1
- package/dist/index.d.ts +64 -25
- package/dist/index.js +188 -186
- package/dist/index.js.map +1 -1
- package/dist/statusLevels-a8b041f4.js +7 -0
- package/dist/statusLevels-a8b041f4.js.map +1 -0
- package/dist/tailwind-base.d.ts +0 -10
- package/dist/tailwind-base.js +22 -20
- package/dist/tailwind-base.js.map +1 -1
- package/dist/utils/colorScheme.js +1 -1
- package/dist/utils/colorScheme.js.map +1 -1
- package/package.json +1 -1
- package/styles/base.css +2 -2
- package/tailwind-base.ts +22 -21
- package/types/colors.ts +84 -26
- package/types/statusLevels.ts +4 -4
- package/dist/Checkbox.vue_vue_type_style_index_0_scoped_0cd31c8f_lang-4ed993c7.js.map +0 -1
- package/dist/Paginate.vue_used_vue_type_style_index_0_lang.module-e579235f.js +0 -11
- package/dist/Paginate.vue_used_vue_type_style_index_0_lang.module-e579235f.js.map +0 -1
- package/dist/Tabs.vue_vue_type_script_setup_true_lang-aca4f8b8.js.map +0 -1
- package/dist/colors-13e95ebf.js +0 -6
- package/dist/colors-13e95ebf.js.map +0 -1
- package/dist/statusLevels-aabf1e3c.js +0 -7
- package/dist/statusLevels-aabf1e3c.js.map +0 -1
package/dist/HttpError.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { openBlock as
|
|
1
|
+
import { openBlock as p, createElementBlock as h, createStaticVNode as x, defineComponent as y, useCssModule as C, useSlots as L, computed as l, resolveComponent as B, normalizeClass as i, unref as o, createElementVNode as r, createVNode as n, withCtx as f, toDisplayString as a, createTextVNode as c, renderSlot as S, createCommentVNode as b } from "vue";
|
|
2
2
|
import { t } from "./locale.js";
|
|
3
3
|
import H from "./Button.js";
|
|
4
4
|
import N, { IllustrationType as X, VignetteName as I } from "./Illustration.js";
|
|
@@ -14,19 +14,16 @@ const z = {
|
|
|
14
14
|
}, T = /* @__PURE__ */ x('<g clip-path="url(#a)" fill="#fff"><path d="M35.265.248h3.883V23.82h-3.883V.248ZM57.586 17.127H45.493c.433 2.143 2.11 3.231 4.422 3.231 1.708 0 3.316-.66 4.254-1.912l2.58 1.945c-1.44 2.242-4.188 3.429-7.036 3.429-4.689 0-8.24-3.231-8.24-8.045 0-4.912 3.752-8.012 8.207-8.012 4.49 0 8.007 3.068 8.007 7.88-.005.496-.038.991-.1 1.483ZM53.8 14.456c-.234-2.11-1.876-3.33-4.053-3.33-2.11 0-3.785.99-4.254 3.33H53.8ZM76.628 8.093V23.82H72.74v-2.407c-1.071 1.648-3.282 2.407-5.196 2.407-4.12 0-7.709-3.132-7.709-8.045 0-4.944 3.552-8.012 7.672-8.012 1.977 0 4.158.758 5.226 2.374V8.09l3.894.002Zm-3.953 7.65c0-2.705-2.278-4.419-4.522-4.419-2.412 0-4.389 1.846-4.389 4.418s1.977 4.484 4.389 4.484c2.378 0 4.522-1.78 4.522-4.484ZM83.997 7.071v1.352h3.484v3.069h-3.484V23.82h-3.882V7.269c0-4.418 2.14-7.089 6.495-7.089h1.843l-1.072 3.56c-2.647 0-3.418 1.452-3.384 3.331ZM91.182.25h3.886v23.57h-3.886V.25ZM97.993 2.983c0-1.352 1.172-2.34 2.546-2.34 1.407 0 2.512.988 2.512 2.34 0 1.319-1.105 2.34-2.512 2.34-1.37 0-2.546-1.021-2.546-2.34Zm.606 5.44h3.886V23.82h-3.886V8.423ZM120.934 15.183v8.637h-3.885v-8.276c0-2.44-1.508-3.692-3.25-3.692-1.776 0-3.984.956-3.984 3.92v8.045h-3.891V8.423h3.886v2.44c.803-1.913 3.249-2.77 4.857-2.77 4.023 0 6.267 2.604 6.267 7.09ZM134.073 23.82l-6.098-6.99v6.99h-3.885V.248h3.885v13.087l4.489-4.912h5.059l-6.365 6.726 7.838 8.67h-4.923ZM7.219 19.014v-4.518L0 23.813h4.195l3.092-3.99a4.958 4.958 0 0 1-.068-.81ZM14.74 22.429a3.8 3.8 0 0 1-2.657-1.095 3.68 3.68 0 0 1-1.097-2.621c0-.03.01-11.764.01-13.665.003-1.747 1.502-3.333 3.442-3.333.87 0 1.706.323 2.343.906A4.876 4.876 0 0 0 14.408.589a4.971 4.971 0 0 0-3.139-.193 4.902 4.902 0 0 0-2.61 1.726 4.771 4.771 0 0 0-1.007 2.932v13.943c0 2.521 2.11 4.802 4.9 4.802a4.905 4.905 0 0 0 2.834-.887c.345-.238.658-.517.932-.831a3.755 3.755 0 0 1-1.578.348Z"></path><path d="M18.023 19.003v-4.517l-4.23 5.428c-.219.282-.53.481-.883.562-.351.082-.72.04-1.044-.117.265.46.641.848 1.094 1.132a3.338 3.338 0 0 0 3.073.248c.494-.207.929-.53 1.267-.941l.788-1.008a4.672 4.672 0 0 1-.065-.787ZM25.55 22.429a3.8 3.8 0 0 1-2.657-1.094 3.679 3.679 0 0 1-1.096-2.622l.01-13.665c0-1.745 1.5-3.33 3.441-3.33.868.001 1.703.325 2.338.907A4.875 4.875 0 0 0 25.216.594 4.971 4.971 0 0 0 22.077.4a4.902 4.902 0 0 0-2.61 1.724 4.77 4.77 0 0 0-1.01 2.93v13.943c0 2.521 2.111 4.802 4.9 4.802a4.904 4.904 0 0 0 2.835-.887c.345-.238.658-.517.932-.831a3.758 3.758 0 0 1-1.574.348Z"></path><path d="m26.12 17.93-1.523 1.983c-.219.282-.53.48-.881.562-.352.081-.72.04-1.044-.116.266.46.642.848 1.095 1.132a3.339 3.339 0 0 0 3.073.248c.494-.207.929-.53 1.268-.941l.67-.864-2.657-2.004ZM25.243 2.169c-.547 0-1.084.147-1.553.425a2.99 2.99 0 0 0-1.11 1.151 1.58 1.58 0 0 1 1.973.31 1.52 1.52 0 0 1 .044 1.965L22.23 9.077v5.4l5.02-6.46a4.711 4.711 0 0 0 1.01-2.92 2.943 2.943 0 0 0-.897-2.074 3.038 3.038 0 0 0-2.119-.854ZM14.438 2.169a3.055 3.055 0 0 0-1.551.426 2.99 2.99 0 0 0-1.108 1.15 1.58 1.58 0 0 1 1.97.312 1.52 1.52 0 0 1 .044 1.963l-2.368 3.057v5.4l5.019-6.46a4.713 4.713 0 0 0 1.008-2.92 2.943 2.943 0 0 0-.897-2.073 3.038 3.038 0 0 0-2.117-.855Z"></path></g><defs><clipPath id="a"><path fill="#fff" transform="translate(0 .18)" d="M0 0h139v23.64H0z"></path></clipPath></defs>', 2), A = [
|
|
15
15
|
T
|
|
16
16
|
];
|
|
17
|
-
function D(
|
|
18
|
-
return
|
|
17
|
+
function D(d, e) {
|
|
18
|
+
return p(), h("svg", z, A);
|
|
19
19
|
}
|
|
20
|
-
const P = { render: D }, j = { class: "heading-jumbo !tw-text-white tw-m-0 tw-mb-3" }, F = { class: "tw-text-white tw-mb-8" }, R = {
|
|
21
|
-
key: 0,
|
|
22
|
-
class: "tw-text-white tw-mb-4"
|
|
23
|
-
}, Y = ["href"], q = /* @__PURE__ */ r("a", {
|
|
20
|
+
const P = { render: D }, j = { class: "heading-jumbo !tw-text-white tw-m-0 tw-mb-3" }, F = { class: "tw-text-white tw-mb-8" }, R = { class: "tw-text-white tw-mb-4" }, Y = ["href"], q = /* @__PURE__ */ r("a", {
|
|
24
21
|
href: "mailto:support@leaflink.com",
|
|
25
22
|
class: "link"
|
|
26
23
|
}, "support@leaflink.com", -1), G = {
|
|
27
24
|
key: 0,
|
|
28
25
|
class: "tw-flex tw-items-start tw-gap-6"
|
|
29
|
-
}, J = /* @__PURE__ */
|
|
26
|
+
}, J = /* @__PURE__ */ y({
|
|
30
27
|
__name: "HttpError",
|
|
31
28
|
props: {
|
|
32
29
|
description: { default: "" },
|
|
@@ -36,8 +33,8 @@ const P = { render: D }, j = { class: "heading-jumbo !tw-text-white tw-m-0 tw-mb
|
|
|
36
33
|
retryLink: { default: void 0 },
|
|
37
34
|
title: { default: "" }
|
|
38
35
|
},
|
|
39
|
-
setup(
|
|
40
|
-
const
|
|
36
|
+
setup(d) {
|
|
37
|
+
const e = d, _ = {
|
|
41
38
|
401: {
|
|
42
39
|
title: t("ll.httpError.401.title"),
|
|
43
40
|
description: t("ll.httpError.401.description")
|
|
@@ -70,22 +67,22 @@ const P = { render: D }, j = { class: "heading-jumbo !tw-text-white tw-m-0 tw-mb
|
|
|
70
67
|
title: t("ll.httpError.504.title"),
|
|
71
68
|
description: t("ll.httpError.504.description")
|
|
72
69
|
}
|
|
73
|
-
}, s = C(),
|
|
74
|
-
return (
|
|
75
|
-
const
|
|
76
|
-
return
|
|
77
|
-
class: i(["stash-http-error tw-min-h-screen tw-px-6 tw-py-12",
|
|
70
|
+
}, s = C(), m = L(), v = l(() => e.errorCode.toString()), w = l(() => parseInt(v.value, 10)), u = l(() => _[w.value] || _[500]), g = l(() => e.title || u.value.title), E = l(() => e.description || u.value.description), k = l(() => !e.hideLogoutButton && e.onLogout), M = l(() => e.retryLink || window.location.href);
|
|
71
|
+
return (V, rt) => {
|
|
72
|
+
const Z = B("router-link");
|
|
73
|
+
return p(), h("div", {
|
|
74
|
+
class: i(["stash-http-error tw-min-h-screen tw-px-6 tw-py-12", o(s).root]),
|
|
78
75
|
"data-test": "stash-http-error"
|
|
79
76
|
}, [
|
|
80
77
|
r("div", {
|
|
81
|
-
class: i(
|
|
78
|
+
class: i(o(s).wrapper)
|
|
82
79
|
}, [
|
|
83
|
-
n(
|
|
80
|
+
n(Z, {
|
|
84
81
|
to: "/",
|
|
85
|
-
class: i(["tw-mb-8",
|
|
82
|
+
class: i(["tw-mb-8", o(s).logo])
|
|
86
83
|
}, {
|
|
87
|
-
default:
|
|
88
|
-
n(
|
|
84
|
+
default: f(() => [
|
|
85
|
+
n(o(P), {
|
|
89
86
|
width: "192",
|
|
90
87
|
height: "33"
|
|
91
88
|
})
|
|
@@ -93,52 +90,52 @@ const P = { render: D }, j = { class: "heading-jumbo !tw-text-white tw-m-0 tw-mb
|
|
|
93
90
|
_: 1
|
|
94
91
|
}, 8, ["class"]),
|
|
95
92
|
r("div", {
|
|
96
|
-
class: i(["tw-mb-8 tw-gap-6",
|
|
93
|
+
class: i(["tw-mb-8 tw-gap-6", o(s).content])
|
|
97
94
|
}, [
|
|
98
95
|
r("div", {
|
|
99
|
-
class: i(["tw-order-2 lg:tw-order-1",
|
|
96
|
+
class: i(["tw-order-2 lg:tw-order-1", o(s).content__text])
|
|
100
97
|
}, [
|
|
101
|
-
r("h1", j,
|
|
102
|
-
r("h2", F, "Error Code: " +
|
|
103
|
-
|
|
104
|
-
c(
|
|
98
|
+
r("h1", j, a(g.value), 1),
|
|
99
|
+
r("h2", F, "Error Code: " + a(e.errorCode), 1),
|
|
100
|
+
r("p", R, [
|
|
101
|
+
c(a(E.value) + " You can ", 1),
|
|
105
102
|
r("a", {
|
|
106
|
-
href:
|
|
103
|
+
href: M.value,
|
|
107
104
|
class: "link"
|
|
108
105
|
}, "try again", 8, Y),
|
|
109
106
|
c(" or reach out to "),
|
|
110
107
|
q,
|
|
111
108
|
c(" for assistance. ")
|
|
112
|
-
])
|
|
109
|
+
])
|
|
113
110
|
], 2),
|
|
114
111
|
r("div", {
|
|
115
|
-
class: i(["tw-order-1 lg:tw-order-2",
|
|
112
|
+
class: i(["tw-order-1 lg:tw-order-2", o(s).illustration])
|
|
116
113
|
}, [
|
|
117
114
|
n(N, {
|
|
118
115
|
size: 300,
|
|
119
|
-
type:
|
|
120
|
-
name:
|
|
116
|
+
type: o(X).Vignette,
|
|
117
|
+
name: o(I).SearchStorefront
|
|
121
118
|
}, null, 8, ["type", "name"])
|
|
122
119
|
], 2)
|
|
123
120
|
], 2),
|
|
124
|
-
|
|
125
|
-
|
|
121
|
+
o(m).actions || k.value ? (p(), h("div", G, [
|
|
122
|
+
S(V.$slots, "actions", {}, () => [
|
|
126
123
|
n(H, {
|
|
127
124
|
tertiary: "",
|
|
128
|
-
onClick:
|
|
125
|
+
onClick: e.onLogout
|
|
129
126
|
}, {
|
|
130
|
-
default:
|
|
127
|
+
default: f(() => [
|
|
131
128
|
c("Logout")
|
|
132
129
|
]),
|
|
133
130
|
_: 1
|
|
134
131
|
}, 8, ["onClick"])
|
|
135
132
|
])
|
|
136
|
-
])) :
|
|
133
|
+
])) : b("", !0)
|
|
137
134
|
], 2)
|
|
138
135
|
], 2);
|
|
139
136
|
};
|
|
140
137
|
}
|
|
141
|
-
}), K = "
|
|
138
|
+
}), K = "_root_fkh89_2", O = "_wrapper_fkh89_11", Q = "_content_fkh89_16", U = "_illustration_fkh89_22", W = "_content__text_fkh89_40", tt = "_logo_fkh89_54", ot = {
|
|
142
139
|
root: K,
|
|
143
140
|
wrapper: O,
|
|
144
141
|
content: Q,
|
|
@@ -147,8 +144,8 @@ const P = { render: D }, j = { class: "heading-jumbo !tw-text-white tw-m-0 tw-mb
|
|
|
147
144
|
logo: tt
|
|
148
145
|
}, et = {
|
|
149
146
|
$style: ot
|
|
150
|
-
},
|
|
147
|
+
}, _t = /* @__PURE__ */ $(J, [["__cssModules", et]]);
|
|
151
148
|
export {
|
|
152
|
-
|
|
149
|
+
_t as default
|
|
153
150
|
};
|
|
154
151
|
//# sourceMappingURL=HttpError.js.map
|
package/dist/HttpError.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HttpError.js","sources":["../assets/logos/leaflink-white-logo-full.svg?component","../src/components/HttpError/HttpError.vue"],"sourcesContent":["import { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createStaticVNode as _createStaticVNode } from \"vue\"\n\nconst _hoisted_1 = {\n viewBox: \"0 0 139 24\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n}\nconst _hoisted_2 = /*#__PURE__*/_createStaticVNode(\"<g clip-path=\\\"url(#a)\\\" fill=\\\"#fff\\\"><path d=\\\"M35.265.248h3.883V23.82h-3.883V.248ZM57.586 17.127H45.493c.433 2.143 2.11 3.231 4.422 3.231 1.708 0 3.316-.66 4.254-1.912l2.58 1.945c-1.44 2.242-4.188 3.429-7.036 3.429-4.689 0-8.24-3.231-8.24-8.045 0-4.912 3.752-8.012 8.207-8.012 4.49 0 8.007 3.068 8.007 7.88-.005.496-.038.991-.1 1.483ZM53.8 14.456c-.234-2.11-1.876-3.33-4.053-3.33-2.11 0-3.785.99-4.254 3.33H53.8ZM76.628 8.093V23.82H72.74v-2.407c-1.071 1.648-3.282 2.407-5.196 2.407-4.12 0-7.709-3.132-7.709-8.045 0-4.944 3.552-8.012 7.672-8.012 1.977 0 4.158.758 5.226 2.374V8.09l3.894.002Zm-3.953 7.65c0-2.705-2.278-4.419-4.522-4.419-2.412 0-4.389 1.846-4.389 4.418s1.977 4.484 4.389 4.484c2.378 0 4.522-1.78 4.522-4.484ZM83.997 7.071v1.352h3.484v3.069h-3.484V23.82h-3.882V7.269c0-4.418 2.14-7.089 6.495-7.089h1.843l-1.072 3.56c-2.647 0-3.418 1.452-3.384 3.331ZM91.182.25h3.886v23.57h-3.886V.25ZM97.993 2.983c0-1.352 1.172-2.34 2.546-2.34 1.407 0 2.512.988 2.512 2.34 0 1.319-1.105 2.34-2.512 2.34-1.37 0-2.546-1.021-2.546-2.34Zm.606 5.44h3.886V23.82h-3.886V8.423ZM120.934 15.183v8.637h-3.885v-8.276c0-2.44-1.508-3.692-3.25-3.692-1.776 0-3.984.956-3.984 3.92v8.045h-3.891V8.423h3.886v2.44c.803-1.913 3.249-2.77 4.857-2.77 4.023 0 6.267 2.604 6.267 7.09ZM134.073 23.82l-6.098-6.99v6.99h-3.885V.248h3.885v13.087l4.489-4.912h5.059l-6.365 6.726 7.838 8.67h-4.923ZM7.219 19.014v-4.518L0 23.813h4.195l3.092-3.99a4.958 4.958 0 0 1-.068-.81ZM14.74 22.429a3.8 3.8 0 0 1-2.657-1.095 3.68 3.68 0 0 1-1.097-2.621c0-.03.01-11.764.01-13.665.003-1.747 1.502-3.333 3.442-3.333.87 0 1.706.323 2.343.906A4.876 4.876 0 0 0 14.408.589a4.971 4.971 0 0 0-3.139-.193 4.902 4.902 0 0 0-2.61 1.726 4.771 4.771 0 0 0-1.007 2.932v13.943c0 2.521 2.11 4.802 4.9 4.802a4.905 4.905 0 0 0 2.834-.887c.345-.238.658-.517.932-.831a3.755 3.755 0 0 1-1.578.348Z\\\"></path><path d=\\\"M18.023 19.003v-4.517l-4.23 5.428c-.219.282-.53.481-.883.562-.351.082-.72.04-1.044-.117.265.46.641.848 1.094 1.132a3.338 3.338 0 0 0 3.073.248c.494-.207.929-.53 1.267-.941l.788-1.008a4.672 4.672 0 0 1-.065-.787ZM25.55 22.429a3.8 3.8 0 0 1-2.657-1.094 3.679 3.679 0 0 1-1.096-2.622l.01-13.665c0-1.745 1.5-3.33 3.441-3.33.868.001 1.703.325 2.338.907A4.875 4.875 0 0 0 25.216.594 4.971 4.971 0 0 0 22.077.4a4.902 4.902 0 0 0-2.61 1.724 4.77 4.77 0 0 0-1.01 2.93v13.943c0 2.521 2.111 4.802 4.9 4.802a4.904 4.904 0 0 0 2.835-.887c.345-.238.658-.517.932-.831a3.758 3.758 0 0 1-1.574.348Z\\\"></path><path d=\\\"m26.12 17.93-1.523 1.983c-.219.282-.53.48-.881.562-.352.081-.72.04-1.044-.116.266.46.642.848 1.095 1.132a3.339 3.339 0 0 0 3.073.248c.494-.207.929-.53 1.268-.941l.67-.864-2.657-2.004ZM25.243 2.169c-.547 0-1.084.147-1.553.425a2.99 2.99 0 0 0-1.11 1.151 1.58 1.58 0 0 1 1.973.31 1.52 1.52 0 0 1 .044 1.965L22.23 9.077v5.4l5.02-6.46a4.711 4.711 0 0 0 1.01-2.92 2.943 2.943 0 0 0-.897-2.074 3.038 3.038 0 0 0-2.119-.854ZM14.438 2.169a3.055 3.055 0 0 0-1.551.426 2.99 2.99 0 0 0-1.108 1.15 1.58 1.58 0 0 1 1.97.312 1.52 1.52 0 0 1 .044 1.963l-2.368 3.057v5.4l5.019-6.46a4.713 4.713 0 0 0 1.008-2.92 2.943 2.943 0 0 0-.897-2.073 3.038 3.038 0 0 0-2.117-.855Z\\\"></path></g><defs><clipPath id=\\\"a\\\"><path fill=\\\"#fff\\\" transform=\\\"translate(0 .18)\\\" d=\\\"M0 0h139v23.64H0z\\\"></path></clipPath></defs>\", 2)\nconst _hoisted_4 = [\n _hoisted_2\n]\n\nexport function render(_ctx, _cache) {\n return (_openBlock(), _createElementBlock(\"svg\", _hoisted_1, _hoisted_4))\n}\nexport default { render: render }","<script setup lang=\"ts\">\n import { computed, useCssModule, useSlots } from 'vue';\n\n import LeafLinkLogo from '../../../assets/logos/leaflink-white-logo-full.svg?component';\n import { t } from '../../locale';\n import Button from '../Button/Button.vue';\n import { IllustrationType, VignetteName } from '../Illustration/Illustration.models';\n import Illustration from '../Illustration/Illustration.vue';\n\n type ErrorCodes = 401 | 403 | 404 | 405 | 500 | 502 | 503 | 504;\n const errors: Record<ErrorCodes, { title: string; description: string }> = {\n 401: {\n title: t('ll.httpError.401.title'),\n description: t('ll.httpError.401.description'),\n },\n 403: {\n title: t('ll.httpError.403.title'),\n description: t('ll.httpError.403.description'),\n },\n 404: {\n title: t('ll.httpError.404.title'),\n description: t('ll.httpError.404.description'),\n },\n 405: {\n title: t('ll.httpError.405.title'),\n description: t('ll.httpError.405.description'),\n },\n 500: {\n title: t('ll.httpError.50X.title'),\n description: t('ll.httpError.50X.description'),\n },\n 502: {\n title: t('ll.httpError.50X.title'),\n description: t('ll.httpError.50X.description'),\n },\n 503: {\n title: t('ll.httpError.50X.title'),\n description: t('ll.httpError.50X.description'),\n },\n 504: {\n title: t('ll.httpError.504.title'),\n description: t('ll.httpError.504.description'),\n },\n };\n\n export interface HttpErrorProps {\n /**\n * A description of what possibly happened.\n */\n description?: string;\n\n /**\n * The error code.\n */\n errorCode: keyof typeof errors | `${keyof typeof errors}`;\n\n /**\n * By default, the logout button is visible unless content is provided to the `actions` slot or\n * this prop is `true`.\n */\n hideLogoutButton?: boolean;\n\n /**\n * A callback that will be called when the user clicks the logout button. If not provided,\n * a `logout` event will be emitted.\n */\n onLogout?: () => void;\n\n /**\n * A link to redirect the user to see if a hard refresh fixes the issue.\n */\n retryLink?: string;\n\n /**\n * The error title.\n */\n title?: string;\n }\n\n const props = withDefaults(defineProps<HttpErrorProps>(), {\n description: '',\n errorCode: '404',\n onLogout: undefined,\n hideLogoutButton: false,\n retryLink: undefined,\n title: '',\n });\n\n const classes = useCssModule();\n const slots = useSlots();\n\n const errorCodeStr = computed(() => props.errorCode.toString());\n const errorCodeInt = computed(() => parseInt(errorCodeStr.value, 10));\n const defaultInfoByErrorCode = computed(() => errors[errorCodeInt.value] || errors['500']);\n const errorTitle = computed(() => props.title || defaultInfoByErrorCode.value.title);\n const errorDescription = computed(() => props.description || defaultInfoByErrorCode.value.description);\n\n const showLogoutButton = computed(() => !props.hideLogoutButton && props.onLogout);\n const computedRetryLink = computed(() => props.retryLink || '/');\n</script>\n\n<template>\n <div class=\"stash-http-error tw-min-h-screen tw-px-6 tw-py-12\" :class=\"classes.root\" data-test=\"stash-http-error\">\n <div :class=\"classes.wrapper\">\n <router-link to=\"/\" class=\"tw-mb-8\" :class=\"classes.logo\">\n <LeafLinkLogo width=\"192\" height=\"33\" />\n </router-link>\n\n <div class=\"tw-mb-8 tw-gap-6\" :class=\"classes.content\">\n <div class=\"tw-order-2 lg:tw-order-1\" :class=\"classes.content__text\">\n <h1 class=\"heading-jumbo !tw-text-white tw-m-0 tw-mb-3\">\n {{ errorTitle }}\n </h1>\n <h2 class=\"tw-text-white tw-mb-8\">Error Code: {{ props.errorCode }}</h2>\n <p v-if=\"!props.hideLogoutButton\" class=\"tw-text-white tw-mb-4\">\n {{ errorDescription }} You can <a :href=\"computedRetryLink\" class=\"link\">try again</a> or reach out to\n <a href=\"mailto:support@leaflink.com\" class=\"link\">support@leaflink.com</a> for assistance.\n </p>\n </div>\n <div class=\"tw-order-1 lg:tw-order-2\" :class=\"classes.illustration\">\n <Illustration :size=\"300\" :type=\"IllustrationType.Vignette\" :name=\"VignetteName.SearchStorefront\" />\n </div>\n </div>\n\n <div v-if=\"slots.actions || showLogoutButton\" class=\"tw-flex tw-items-start tw-gap-6\">\n <slot name=\"actions\">\n <Button tertiary @click=\"props.onLogout\">Logout</Button>\n </slot>\n </div>\n </div>\n </div>\n</template>\n\n<style module>\n .root {\n background-color: theme('colors.purple.DEFAULT');\n display: flex;\n height: 100%;\n justify-content: center;\n align-items: center;\n max-width: 100vw;\n }\n\n .wrapper {\n max-width: 100%;\n width: 56rem;\n }\n\n .content {\n display: flex;\n justify-content: space-between;\n align-items: center;\n }\n\n .illustration {\n /* width and height similar to figma. */\n width: 300px;\n height: 193px;\n }\n\n @media screen and (width < 1024px) {\n .content {\n flex-wrap: wrap;\n gap: 0;\n }\n\n .illustration {\n margin-bottom: 30px;\n }\n }\n\n @media screen and (width >= 1024px) {\n .content__text {\n max-width: 50vw;\n }\n }\n\n .illustration svg {\n /*\n * We cannot use the same sizes from figma because the illustration would be smaller\n * and it would break alignment. The specified height in figma is 193px but the\n * illustration is 300px, so, (300 - 193) / 2 ~= 53, which keeps it aligned.\n */\n margin-top: -53px;\n }\n\n .logo {\n /* width and height similar to figma. */\n width: 192px;\n height: 33px;\n display: block;\n }\n</style>\n"],"names":["_hoisted_1","_hoisted_2","_createStaticVNode","_hoisted_4","render","_ctx","_cache","_openBlock","_createElementBlock","LeafLinkLogo","errors","classes","useCssModule","slots","useSlots","errorCodeStr","computed","props","errorCodeInt","defaultInfoByErrorCode","errorTitle","errorDescription","showLogoutButton","computedRetryLink"],"mappings":";;;;;;;;;AAEA,MAAMA,IAAa;AAAA,EACjB,SAAS;AAAA,EACT,MAAM;AAAA,EACN,OAAO;AACT,GACMC,IAA0BC,gBAAAA,EAAmB,0pGAA4qG,CAAC,GAC1tGC,IAAa;AAAA,EACjBF;AACF;AAEO,SAASG,EAAOC,GAAMC,GAAQ;AACnC,SAAQC,EAAY,GAAEC,EAAoB,OAAOR,GAAYG,CAAU;AACzE;AACA,MAAeM,IAAA,EAAE,QAAQL,EAAM;;;;;;;;;;;;;;;;;;;;iBCLvBM,IAAqE;AAAA,MACzE,KAAK;AAAA,QACH,OAAO,EAAE,wBAAwB;AAAA,QACjC,aAAa,EAAE,8BAA8B;AAAA,MAC/C;AAAA,MACA,KAAK;AAAA,QACH,OAAO,EAAE,wBAAwB;AAAA,QACjC,aAAa,EAAE,8BAA8B;AAAA,MAC/C;AAAA,MACA,KAAK;AAAA,QACH,OAAO,EAAE,wBAAwB;AAAA,QACjC,aAAa,EAAE,8BAA8B;AAAA,MAC/C;AAAA,MACA,KAAK;AAAA,QACH,OAAO,EAAE,wBAAwB;AAAA,QACjC,aAAa,EAAE,8BAA8B;AAAA,MAC/C;AAAA,MACA,KAAK;AAAA,QACH,OAAO,EAAE,wBAAwB;AAAA,QACjC,aAAa,EAAE,8BAA8B;AAAA,MAC/C;AAAA,MACA,KAAK;AAAA,QACH,OAAO,EAAE,wBAAwB;AAAA,QACjC,aAAa,EAAE,8BAA8B;AAAA,MAC/C;AAAA,MACA,KAAK;AAAA,QACH,OAAO,EAAE,wBAAwB;AAAA,QACjC,aAAa,EAAE,8BAA8B;AAAA,MAC/C;AAAA,MACA,KAAK;AAAA,QACH,OAAO,EAAE,wBAAwB;AAAA,QACjC,aAAa,EAAE,8BAA8B;AAAA,MAC/C;AAAA,IAAA,GA8CIC,IAAUC,KACVC,IAAQC,KAERC,IAAeC,EAAS,MAAMC,EAAM,UAAU,UAAU,GACxDC,IAAeF,EAAS,MAAM,SAASD,EAAa,OAAO,EAAE,CAAC,GAC9DI,IAAyBH,EAAS,MAAMN,EAAOQ,EAAa,KAAK,KAAKR,EAAO,GAAK,CAAC,GACnFU,IAAaJ,EAAS,MAAMC,EAAM,SAASE,EAAuB,MAAM,KAAK,GAC7EE,IAAmBL,EAAS,MAAMC,EAAM,eAAeE,EAAuB,MAAM,WAAW,GAE/FG,IAAmBN,EAAS,MAAM,CAACC,EAAM,oBAAoBA,EAAM,QAAQ,GAC3EM,IAAoBP,EAAS,MAAMC,EAAM,aAAa,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"HttpError.js","sources":["../assets/logos/leaflink-white-logo-full.svg?component","../src/components/HttpError/HttpError.vue"],"sourcesContent":["import { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createStaticVNode as _createStaticVNode } from \"vue\"\n\nconst _hoisted_1 = {\n viewBox: \"0 0 139 24\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n}\nconst _hoisted_2 = /*#__PURE__*/_createStaticVNode(\"<g clip-path=\\\"url(#a)\\\" fill=\\\"#fff\\\"><path d=\\\"M35.265.248h3.883V23.82h-3.883V.248ZM57.586 17.127H45.493c.433 2.143 2.11 3.231 4.422 3.231 1.708 0 3.316-.66 4.254-1.912l2.58 1.945c-1.44 2.242-4.188 3.429-7.036 3.429-4.689 0-8.24-3.231-8.24-8.045 0-4.912 3.752-8.012 8.207-8.012 4.49 0 8.007 3.068 8.007 7.88-.005.496-.038.991-.1 1.483ZM53.8 14.456c-.234-2.11-1.876-3.33-4.053-3.33-2.11 0-3.785.99-4.254 3.33H53.8ZM76.628 8.093V23.82H72.74v-2.407c-1.071 1.648-3.282 2.407-5.196 2.407-4.12 0-7.709-3.132-7.709-8.045 0-4.944 3.552-8.012 7.672-8.012 1.977 0 4.158.758 5.226 2.374V8.09l3.894.002Zm-3.953 7.65c0-2.705-2.278-4.419-4.522-4.419-2.412 0-4.389 1.846-4.389 4.418s1.977 4.484 4.389 4.484c2.378 0 4.522-1.78 4.522-4.484ZM83.997 7.071v1.352h3.484v3.069h-3.484V23.82h-3.882V7.269c0-4.418 2.14-7.089 6.495-7.089h1.843l-1.072 3.56c-2.647 0-3.418 1.452-3.384 3.331ZM91.182.25h3.886v23.57h-3.886V.25ZM97.993 2.983c0-1.352 1.172-2.34 2.546-2.34 1.407 0 2.512.988 2.512 2.34 0 1.319-1.105 2.34-2.512 2.34-1.37 0-2.546-1.021-2.546-2.34Zm.606 5.44h3.886V23.82h-3.886V8.423ZM120.934 15.183v8.637h-3.885v-8.276c0-2.44-1.508-3.692-3.25-3.692-1.776 0-3.984.956-3.984 3.92v8.045h-3.891V8.423h3.886v2.44c.803-1.913 3.249-2.77 4.857-2.77 4.023 0 6.267 2.604 6.267 7.09ZM134.073 23.82l-6.098-6.99v6.99h-3.885V.248h3.885v13.087l4.489-4.912h5.059l-6.365 6.726 7.838 8.67h-4.923ZM7.219 19.014v-4.518L0 23.813h4.195l3.092-3.99a4.958 4.958 0 0 1-.068-.81ZM14.74 22.429a3.8 3.8 0 0 1-2.657-1.095 3.68 3.68 0 0 1-1.097-2.621c0-.03.01-11.764.01-13.665.003-1.747 1.502-3.333 3.442-3.333.87 0 1.706.323 2.343.906A4.876 4.876 0 0 0 14.408.589a4.971 4.971 0 0 0-3.139-.193 4.902 4.902 0 0 0-2.61 1.726 4.771 4.771 0 0 0-1.007 2.932v13.943c0 2.521 2.11 4.802 4.9 4.802a4.905 4.905 0 0 0 2.834-.887c.345-.238.658-.517.932-.831a3.755 3.755 0 0 1-1.578.348Z\\\"></path><path d=\\\"M18.023 19.003v-4.517l-4.23 5.428c-.219.282-.53.481-.883.562-.351.082-.72.04-1.044-.117.265.46.641.848 1.094 1.132a3.338 3.338 0 0 0 3.073.248c.494-.207.929-.53 1.267-.941l.788-1.008a4.672 4.672 0 0 1-.065-.787ZM25.55 22.429a3.8 3.8 0 0 1-2.657-1.094 3.679 3.679 0 0 1-1.096-2.622l.01-13.665c0-1.745 1.5-3.33 3.441-3.33.868.001 1.703.325 2.338.907A4.875 4.875 0 0 0 25.216.594 4.971 4.971 0 0 0 22.077.4a4.902 4.902 0 0 0-2.61 1.724 4.77 4.77 0 0 0-1.01 2.93v13.943c0 2.521 2.111 4.802 4.9 4.802a4.904 4.904 0 0 0 2.835-.887c.345-.238.658-.517.932-.831a3.758 3.758 0 0 1-1.574.348Z\\\"></path><path d=\\\"m26.12 17.93-1.523 1.983c-.219.282-.53.48-.881.562-.352.081-.72.04-1.044-.116.266.46.642.848 1.095 1.132a3.339 3.339 0 0 0 3.073.248c.494-.207.929-.53 1.268-.941l.67-.864-2.657-2.004ZM25.243 2.169c-.547 0-1.084.147-1.553.425a2.99 2.99 0 0 0-1.11 1.151 1.58 1.58 0 0 1 1.973.31 1.52 1.52 0 0 1 .044 1.965L22.23 9.077v5.4l5.02-6.46a4.711 4.711 0 0 0 1.01-2.92 2.943 2.943 0 0 0-.897-2.074 3.038 3.038 0 0 0-2.119-.854ZM14.438 2.169a3.055 3.055 0 0 0-1.551.426 2.99 2.99 0 0 0-1.108 1.15 1.58 1.58 0 0 1 1.97.312 1.52 1.52 0 0 1 .044 1.963l-2.368 3.057v5.4l5.019-6.46a4.713 4.713 0 0 0 1.008-2.92 2.943 2.943 0 0 0-.897-2.073 3.038 3.038 0 0 0-2.117-.855Z\\\"></path></g><defs><clipPath id=\\\"a\\\"><path fill=\\\"#fff\\\" transform=\\\"translate(0 .18)\\\" d=\\\"M0 0h139v23.64H0z\\\"></path></clipPath></defs>\", 2)\nconst _hoisted_4 = [\n _hoisted_2\n]\n\nexport function render(_ctx, _cache) {\n return (_openBlock(), _createElementBlock(\"svg\", _hoisted_1, _hoisted_4))\n}\nexport default { render: render }","<script setup lang=\"ts\">\n import { computed, useCssModule, useSlots } from 'vue';\n\n import LeafLinkLogo from '../../../assets/logos/leaflink-white-logo-full.svg?component';\n import { t } from '../../locale';\n import Button from '../Button/Button.vue';\n import { IllustrationType, VignetteName } from '../Illustration/Illustration.models';\n import Illustration from '../Illustration/Illustration.vue';\n\n type ErrorCodes = 401 | 403 | 404 | 405 | 500 | 502 | 503 | 504;\n const errors: Record<ErrorCodes, { title: string; description: string }> = {\n 401: {\n title: t('ll.httpError.401.title'),\n description: t('ll.httpError.401.description'),\n },\n 403: {\n title: t('ll.httpError.403.title'),\n description: t('ll.httpError.403.description'),\n },\n 404: {\n title: t('ll.httpError.404.title'),\n description: t('ll.httpError.404.description'),\n },\n 405: {\n title: t('ll.httpError.405.title'),\n description: t('ll.httpError.405.description'),\n },\n 500: {\n title: t('ll.httpError.50X.title'),\n description: t('ll.httpError.50X.description'),\n },\n 502: {\n title: t('ll.httpError.50X.title'),\n description: t('ll.httpError.50X.description'),\n },\n 503: {\n title: t('ll.httpError.50X.title'),\n description: t('ll.httpError.50X.description'),\n },\n 504: {\n title: t('ll.httpError.504.title'),\n description: t('ll.httpError.504.description'),\n },\n };\n\n export interface HttpErrorProps {\n /**\n * A description of what possibly happened.\n */\n description?: string;\n\n /**\n * The error code.\n */\n errorCode: keyof typeof errors | `${keyof typeof errors}`;\n\n /**\n * By default, the logout button is visible unless content is provided to the `actions` slot or\n * this prop is `true`.\n */\n hideLogoutButton?: boolean;\n\n /**\n * A callback that will be called when the user clicks the logout button. If not provided,\n * a `logout` event will be emitted.\n */\n onLogout?: () => void;\n\n /**\n * A link to redirect the user to see if a hard refresh fixes the issue.\n */\n retryLink?: string;\n\n /**\n * The error title.\n */\n title?: string;\n }\n\n const props = withDefaults(defineProps<HttpErrorProps>(), {\n description: '',\n errorCode: '404',\n onLogout: undefined,\n hideLogoutButton: false,\n retryLink: undefined,\n title: '',\n });\n\n const classes = useCssModule();\n const slots = useSlots();\n\n const errorCodeStr = computed(() => props.errorCode.toString());\n const errorCodeInt = computed(() => parseInt(errorCodeStr.value, 10));\n const defaultInfoByErrorCode = computed(() => errors[errorCodeInt.value] || errors['500']);\n const errorTitle = computed(() => props.title || defaultInfoByErrorCode.value.title);\n const errorDescription = computed(() => props.description || defaultInfoByErrorCode.value.description);\n\n const showLogoutButton = computed(() => !props.hideLogoutButton && props.onLogout);\n const computedRetryLink = computed(() => props.retryLink || window.location.href);\n</script>\n\n<template>\n <div class=\"stash-http-error tw-min-h-screen tw-px-6 tw-py-12\" :class=\"classes.root\" data-test=\"stash-http-error\">\n <div :class=\"classes.wrapper\">\n <router-link to=\"/\" class=\"tw-mb-8\" :class=\"classes.logo\">\n <LeafLinkLogo width=\"192\" height=\"33\" />\n </router-link>\n\n <div class=\"tw-mb-8 tw-gap-6\" :class=\"classes.content\">\n <div class=\"tw-order-2 lg:tw-order-1\" :class=\"classes.content__text\">\n <h1 class=\"heading-jumbo !tw-text-white tw-m-0 tw-mb-3\">\n {{ errorTitle }}\n </h1>\n <h2 class=\"tw-text-white tw-mb-8\">Error Code: {{ props.errorCode }}</h2>\n <p class=\"tw-text-white tw-mb-4\">\n {{ errorDescription }} You can <a :href=\"computedRetryLink\" class=\"link\">try again</a> or reach out to\n <a href=\"mailto:support@leaflink.com\" class=\"link\">support@leaflink.com</a> for assistance.\n </p>\n </div>\n <div class=\"tw-order-1 lg:tw-order-2\" :class=\"classes.illustration\">\n <Illustration :size=\"300\" :type=\"IllustrationType.Vignette\" :name=\"VignetteName.SearchStorefront\" />\n </div>\n </div>\n\n <div v-if=\"slots.actions || showLogoutButton\" class=\"tw-flex tw-items-start tw-gap-6\">\n <slot name=\"actions\">\n <Button tertiary @click=\"props.onLogout\">Logout</Button>\n </slot>\n </div>\n </div>\n </div>\n</template>\n\n<style module>\n .root {\n background-color: theme('colors.purple.500');\n display: flex;\n height: 100%;\n justify-content: center;\n align-items: center;\n max-width: 100vw;\n }\n\n .wrapper {\n max-width: 100%;\n width: 56rem;\n }\n\n .content {\n display: flex;\n justify-content: space-between;\n align-items: center;\n }\n\n .illustration {\n /* width and height similar to figma. */\n width: 300px;\n height: 193px;\n }\n\n @media screen and (width < 1024px) {\n .content {\n flex-wrap: wrap;\n gap: 0;\n }\n\n .illustration {\n margin-bottom: 30px;\n }\n }\n\n @media screen and (width >= 1024px) {\n .content__text {\n max-width: 50vw;\n }\n }\n\n .illustration svg {\n /*\n * We cannot use the same sizes from figma because the illustration would be smaller\n * and it would break alignment. The specified height in figma is 193px but the\n * illustration is 300px, so, (300 - 193) / 2 ~= 53, which keeps it aligned.\n */\n margin-top: -53px;\n }\n\n .logo {\n /* width and height similar to figma. */\n width: 192px;\n height: 33px;\n display: block;\n }\n</style>\n"],"names":["_hoisted_1","_hoisted_2","_createStaticVNode","_hoisted_4","render","_ctx","_cache","_openBlock","_createElementBlock","LeafLinkLogo","errors","classes","useCssModule","slots","useSlots","errorCodeStr","computed","props","errorCodeInt","defaultInfoByErrorCode","errorTitle","errorDescription","showLogoutButton","computedRetryLink"],"mappings":";;;;;;;;;AAEA,MAAMA,IAAa;AAAA,EACjB,SAAS;AAAA,EACT,MAAM;AAAA,EACN,OAAO;AACT,GACMC,IAA0BC,gBAAAA,EAAmB,0pGAA4qG,CAAC,GAC1tGC,IAAa;AAAA,EACjBF;AACF;AAEO,SAASG,EAAOC,GAAMC,GAAQ;AACnC,SAAQC,EAAY,GAAEC,EAAoB,OAAOR,GAAYG,CAAU;AACzE;AACA,MAAeM,IAAA,EAAE,QAAQL,EAAM;;;;;;;;;;;;;;;;;iBCLvBM,IAAqE;AAAA,MACzE,KAAK;AAAA,QACH,OAAO,EAAE,wBAAwB;AAAA,QACjC,aAAa,EAAE,8BAA8B;AAAA,MAC/C;AAAA,MACA,KAAK;AAAA,QACH,OAAO,EAAE,wBAAwB;AAAA,QACjC,aAAa,EAAE,8BAA8B;AAAA,MAC/C;AAAA,MACA,KAAK;AAAA,QACH,OAAO,EAAE,wBAAwB;AAAA,QACjC,aAAa,EAAE,8BAA8B;AAAA,MAC/C;AAAA,MACA,KAAK;AAAA,QACH,OAAO,EAAE,wBAAwB;AAAA,QACjC,aAAa,EAAE,8BAA8B;AAAA,MAC/C;AAAA,MACA,KAAK;AAAA,QACH,OAAO,EAAE,wBAAwB;AAAA,QACjC,aAAa,EAAE,8BAA8B;AAAA,MAC/C;AAAA,MACA,KAAK;AAAA,QACH,OAAO,EAAE,wBAAwB;AAAA,QACjC,aAAa,EAAE,8BAA8B;AAAA,MAC/C;AAAA,MACA,KAAK;AAAA,QACH,OAAO,EAAE,wBAAwB;AAAA,QACjC,aAAa,EAAE,8BAA8B;AAAA,MAC/C;AAAA,MACA,KAAK;AAAA,QACH,OAAO,EAAE,wBAAwB;AAAA,QACjC,aAAa,EAAE,8BAA8B;AAAA,MAC/C;AAAA,IAAA,GA8CIC,IAAUC,KACVC,IAAQC,KAERC,IAAeC,EAAS,MAAMC,EAAM,UAAU,UAAU,GACxDC,IAAeF,EAAS,MAAM,SAASD,EAAa,OAAO,EAAE,CAAC,GAC9DI,IAAyBH,EAAS,MAAMN,EAAOQ,EAAa,KAAK,KAAKR,EAAO,GAAK,CAAC,GACnFU,IAAaJ,EAAS,MAAMC,EAAM,SAASE,EAAuB,MAAM,KAAK,GAC7EE,IAAmBL,EAAS,MAAMC,EAAM,eAAeE,EAAuB,MAAM,WAAW,GAE/FG,IAAmBN,EAAS,MAAM,CAACC,EAAM,oBAAoBA,EAAM,QAAQ,GAC3EM,IAAoBP,EAAS,MAAMC,EAAM,aAAa,OAAO,SAAS,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/IconLabel.js
CHANGED
|
@@ -4,10 +4,9 @@ import { _ as h } from "./_plugin-vue_export-helper-dad06003.js";
|
|
|
4
4
|
import "lodash-es/uniqueId";
|
|
5
5
|
import "./index-79ce320f.js";
|
|
6
6
|
import "./Icon.vue_used_vue_type_style_index_0_lang.module-eb359559.js";
|
|
7
|
-
const k = {
|
|
8
|
-
name: "ll-icon-label"
|
|
9
|
-
|
|
10
|
-
...k,
|
|
7
|
+
const k = /* @__PURE__ */ a({
|
|
8
|
+
name: "ll-icon-label",
|
|
9
|
+
__name: "IconLabel",
|
|
11
10
|
props: {
|
|
12
11
|
icon: {},
|
|
13
12
|
color: { default: void 0 },
|
|
@@ -16,13 +15,13 @@ const k = {
|
|
|
16
15
|
stacked: { type: Boolean, default: !1 },
|
|
17
16
|
truncate: { type: Boolean, default: !1 }
|
|
18
17
|
},
|
|
19
|
-
setup(
|
|
20
|
-
const e =
|
|
18
|
+
setup(n) {
|
|
19
|
+
const e = n, s = o(() => e.to ? "router-link" : e.href ? "a" : "div"), l = o(() => e.to ? {
|
|
21
20
|
to: e.to
|
|
22
21
|
} : e.href ? {
|
|
23
22
|
href: e.href
|
|
24
23
|
} : {});
|
|
25
|
-
return (t,
|
|
24
|
+
return (t, b) => (c(), i(u(s.value), f(l.value, {
|
|
26
25
|
class: ["flex", { "flex-column items-center": e.stacked }]
|
|
27
26
|
}), {
|
|
28
27
|
default: d(() => [
|
|
@@ -44,12 +43,12 @@ const k = {
|
|
|
44
43
|
_: 3
|
|
45
44
|
}, 16, ["class"]));
|
|
46
45
|
}
|
|
47
|
-
}),
|
|
48
|
-
icon:
|
|
49
|
-
},
|
|
50
|
-
$style:
|
|
51
|
-
},
|
|
46
|
+
}), y = "_icon_gr3q2_2", w = {
|
|
47
|
+
icon: y
|
|
48
|
+
}, x = {
|
|
49
|
+
$style: w
|
|
50
|
+
}, L = /* @__PURE__ */ h(k, [["__cssModules", x]]);
|
|
52
51
|
export {
|
|
53
|
-
|
|
52
|
+
L as default
|
|
54
53
|
};
|
|
55
54
|
//# sourceMappingURL=IconLabel.js.map
|
package/dist/IconLabel.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconLabel.js","sources":["../src/components/IconLabel/IconLabel.vue"],"sourcesContent":["<script
|
|
1
|
+
{"version":3,"file":"IconLabel.js","sources":["../src/components/IconLabel/IconLabel.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { computed } from 'vue';\n\n import { StashCommonColor } from '../../../types/colors';\n import { IconName } from '../Icon/Icon.types';\n import Icon from '../Icon/Icon.vue';\n\n export interface IconLabelProps {\n /**\n * Name of the icon to use. All design system icons are supported.\n */\n icon: IconName;\n\n /**\n * Color to apply to the icon. Common Stash colors are supported (default, 100 & 700 shades).\n */\n color?: StashCommonColor;\n\n /**\n * Valid hyperlink.\n */\n href?: string;\n\n /**\n * Valid vue-router route.\n */\n to?: string | object;\n\n /**\n * If true, renders the label below the icon instead of to the right\n */\n stacked?: boolean;\n\n /**\n * If true, truncates overflowing text with an ellipsis when it's unable to wrap\n */\n truncate?: boolean;\n }\n\n const props = withDefaults(defineProps<IconLabelProps>(), {\n color: undefined,\n href: undefined,\n to: undefined,\n stacked: false,\n truncate: false,\n });\n\n defineOptions({\n name: 'll-icon-label',\n });\n\n const is = computed(() => {\n if (props.to) {\n return 'router-link';\n }\n\n if (props.href) {\n return 'a';\n }\n\n return 'div';\n });\n\n const attributes = computed(() => {\n if (props.to) {\n return {\n to: props.to,\n };\n }\n\n if (props.href) {\n return {\n href: props.href,\n };\n }\n\n return {};\n });\n</script>\n\n<template>\n <component :is=\"is\" v-bind=\"attributes\" class=\"flex\" :class=\"{ 'flex-column items-center': props.stacked }\">\n <Icon :name=\"props.icon\" size=\"dense\" :class=\"[$style.icon, { [`text-${color}`]: !!color }]\" />\n\n <div\n :class=\"{\n 'flex-1 tw-ml-1.5': !props.stacked,\n 'text-xs tw-leading-3 tw-mt-1.5': props.stacked,\n 'tw-truncate': truncate,\n }\"\n >\n <!-- @slot Label text -->\n <slot></slot>\n </div>\n </component>\n</template>\n\n<style module>\n .icon {\n margin-top: -1px;\n }\n</style>\n"],"names":["is","computed","props","attributes"],"mappings":";;;;;;;;;;;;;;;;;;iBAmDQA,IAAKC,EAAS,MACdC,EAAM,KACD,gBAGLA,EAAM,OACD,MAGF,KACR,GAEKC,IAAaF,EAAS,MACtBC,EAAM,KACD;AAAA,MACL,IAAIA,EAAM;AAAA,IAAA,IAIVA,EAAM,OACD;AAAA,MACL,MAAMA,EAAM;AAAA,IAAA,IAIT,EACR;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/IconLabel.vue.d.ts
CHANGED
|
@@ -46,7 +46,7 @@ declare const _default: __VLS_WithTemplateSlots<DefineComponent<__VLS_WithDefaul
|
|
|
46
46
|
stacked: boolean;
|
|
47
47
|
truncate: boolean;
|
|
48
48
|
}>>>, {
|
|
49
|
-
color: "
|
|
49
|
+
color: "ice-700" | "purple-700" | "purple-500" | "purple-100" | "royal-700" | "royal-500" | "royal-100" | "blue-700" | "blue-500" | "blue-100" | "teal-700" | "teal-500" | "teal-100" | "green-700" | "green-500" | "green-100" | "seafoam-700" | "seafoam-500" | "seafoam-100" | "yellow-700" | "yellow-500" | "yellow-100" | "orange-700" | "orange-500" | "orange-100" | "red-700" | "red-500" | "red-100" | "ice-500" | "ice-200" | "ice-100" | "white" | "black";
|
|
50
50
|
href: string;
|
|
51
51
|
to: string | object;
|
|
52
52
|
stacked: boolean;
|
|
@@ -62,9 +62,9 @@ export declare interface IconLabelProps {
|
|
|
62
62
|
*/
|
|
63
63
|
icon: IconName;
|
|
64
64
|
/**
|
|
65
|
-
* Color to apply to the icon.
|
|
65
|
+
* Color to apply to the icon. Common Stash colors are supported (default, 100 & 700 shades).
|
|
66
66
|
*/
|
|
67
|
-
color?:
|
|
67
|
+
color?: StashCommonColor;
|
|
68
68
|
/**
|
|
69
69
|
* Valid hyperlink.
|
|
70
70
|
*/
|
|
@@ -87,108 +87,42 @@ declare type IconName = typeof iconNames[number];
|
|
|
87
87
|
|
|
88
88
|
declare const iconNames: readonly ["action-dots", "activity", "alert-bell", "archive", "arrow-down", "arrow-left", "arrow-right", "arrow-up", "badge-discount", "badge-seller-elite", "badge-seller-power", "book-customer", "building-office", "bulk-add", "calendar-reschedule", "calendar", "caret-down", "caret-up", "cart-active", "cart-plus", "change-log", "check", "chevron-down", "chevron-left", "chevron-right", "chevron-up", "circle-check", "circle-close", "circle-dollar", "circle-info", "circle-partial", "circle-percent", "circle-question-mark", "circle-status", "circle-warning", "clipboard-checkmark", "clipboard-inventory", "close", "combine", "compass", "contact", "contract", "copy", "credit-card", "credit-profile", "dashboard", "document-accept", "document-invoice", "document-recieved", "document-sent", "document-view", "document", "dolly", "download", "edit", "ellipsis", "envelope-open", "envelope", "export", "figma", "file-csv", "file", "filter-funnel", "filter-line", "flag", "folder", "folder-bar-graph", "folder-orders", "gear", "github", "globe", "graph-bar-chart", "graph-line-chart", "graph-pie-chart", "hazard", "hazard-outline", "headset-agent", "headset-mic", "heart-filled", "heart-outline", "hide", "history", "image", "keyboard-return", "license-approved", "license-certificate", "lightbulb", "link-add", "link-unlink", "link", "list-items", "loading-big", "loading-small", "location", "lock-unlock", "lock", "logo-facebook", "logo-instagram", "logo-linkedin", "logo-ll", "logo-metrc", "logo-plaid", "logo-x", "logo-youtube", "logout", "medical", "megaphone-sound", "megaphone", "menu", "message-dispute", "message-reply", "message", "minus", "mj-leaf", "money", "note-add", "note", "open-in-new", "paperclip", "performance", "phone", "plus", "preview", "print", "product-menu-manage", "product-menu-search", "product-menu", "queue-add", "queue", "recent", "refresh", "register", "reply", "report-download", "sample", "save", "scale-law", "scale-weight", "search", "seed-cycle", "share", "shop-bag-browse", "shop-bag-reorder", "shop-bag", "shop-basket", "shop-cart-add", "shop-cart", "show", "sign-dollar", "sign-percent", "sort", "split", "star-filled", "star-outline", "storefront", "submit", "swap-horizontal", "swap-vertical", "tag-star", "tag", "test-results", "ticket-star", "ticket", "tool-dropper", "tool-wrench", "transfer", "trashcan", "truck", "upload", "user-add", "user-admin", "user-check", "user", "view-card", "view-detailed", "view-list", "warehouse", "working"];
|
|
89
89
|
|
|
90
|
-
declare type
|
|
90
|
+
declare type StashCommonColor = `${StashCommonColors}`;
|
|
91
91
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
92
|
+
/**
|
|
93
|
+
* A limited list of stash brand colors, only including their 100, 500, and 700 shades.
|
|
94
|
+
*/
|
|
95
|
+
declare enum StashCommonColors {
|
|
96
96
|
Purple700 = "purple-700",
|
|
97
|
-
Purple600 = "purple-600",
|
|
98
97
|
Purple500 = "purple-500",
|
|
99
|
-
Purple400 = "purple-400",
|
|
100
|
-
Purple300 = "purple-300",
|
|
101
|
-
Purple200 = "purple-200",
|
|
102
98
|
Purple100 = "purple-100",
|
|
103
|
-
Royal = "royal",
|
|
104
|
-
Royal900 = "royal-900",
|
|
105
|
-
Royal800 = "royal-800",
|
|
106
99
|
Royal700 = "royal-700",
|
|
107
|
-
Royal600 = "royal-600",
|
|
108
100
|
Royal500 = "royal-500",
|
|
109
|
-
Royal400 = "royal-400",
|
|
110
|
-
Royal300 = "royal-300",
|
|
111
|
-
Royal200 = "royal-200",
|
|
112
101
|
Royal100 = "royal-100",
|
|
113
|
-
Blue = "blue",
|
|
114
|
-
Blue900 = "blue-900",
|
|
115
|
-
Blue800 = "blue-800",
|
|
116
102
|
Blue700 = "blue-700",
|
|
117
|
-
Blue600 = "blue-600",
|
|
118
103
|
Blue500 = "blue-500",
|
|
119
|
-
Blue400 = "blue-400",
|
|
120
|
-
Blue300 = "blue-300",
|
|
121
|
-
Blue200 = "blue-200",
|
|
122
104
|
Blue100 = "blue-100",
|
|
123
|
-
Teal = "teal",
|
|
124
|
-
Teal900 = "teal-900",
|
|
125
|
-
Teal800 = "teal-800",
|
|
126
105
|
Teal700 = "teal-700",
|
|
127
|
-
Teal600 = "teal-600",
|
|
128
106
|
Teal500 = "teal-500",
|
|
129
|
-
Teal400 = "teal-400",
|
|
130
|
-
Teal300 = "teal-300",
|
|
131
|
-
Teal200 = "teal-200",
|
|
132
107
|
Teal100 = "teal-100",
|
|
133
|
-
Green = "green",
|
|
134
|
-
Green900 = "green-900",
|
|
135
|
-
Green800 = "green-800",
|
|
136
108
|
Green700 = "green-700",
|
|
137
|
-
Green600 = "green-600",
|
|
138
109
|
Green500 = "green-500",
|
|
139
|
-
Green400 = "green-400",
|
|
140
|
-
Green300 = "green-300",
|
|
141
|
-
Green200 = "green-200",
|
|
142
110
|
Green100 = "green-100",
|
|
143
|
-
Seafoam = "seafoam",
|
|
144
|
-
Seafoam900 = "seafoam-900",
|
|
145
|
-
Seafoam800 = "seafoam-800",
|
|
146
111
|
Seafoam700 = "seafoam-700",
|
|
147
|
-
Seafoam600 = "seafoam-600",
|
|
148
112
|
Seafoam500 = "seafoam-500",
|
|
149
|
-
Seafoam400 = "seafoam-400",
|
|
150
|
-
Seafoam300 = "seafoam-300",
|
|
151
|
-
Seafoam200 = "seafoam-200",
|
|
152
113
|
Seafoam100 = "seafoam-100",
|
|
153
|
-
Yellow = "yellow",
|
|
154
|
-
Yellow900 = "yellow-900",
|
|
155
|
-
Yellow800 = "yellow-800",
|
|
156
114
|
Yellow700 = "yellow-700",
|
|
157
|
-
Yellow600 = "yellow-600",
|
|
158
115
|
Yellow500 = "yellow-500",
|
|
159
|
-
Yellow400 = "yellow-400",
|
|
160
|
-
Yellow300 = "yellow-300",
|
|
161
|
-
Yellow200 = "yellow-200",
|
|
162
116
|
Yellow100 = "yellow-100",
|
|
163
|
-
Orange = "orange",
|
|
164
|
-
Orange900 = "orange-900",
|
|
165
|
-
Orange800 = "orange-800",
|
|
166
117
|
Orange700 = "orange-700",
|
|
167
|
-
Orange600 = "orange-600",
|
|
168
118
|
Orange500 = "orange-500",
|
|
169
|
-
Orange400 = "orange-400",
|
|
170
|
-
Orange300 = "orange-300",
|
|
171
|
-
Orange200 = "orange-200",
|
|
172
119
|
Orange100 = "orange-100",
|
|
173
|
-
Red = "red",
|
|
174
|
-
Red900 = "red-900",
|
|
175
|
-
Red800 = "red-800",
|
|
176
120
|
Red700 = "red-700",
|
|
177
|
-
Red600 = "red-600",
|
|
178
121
|
Red500 = "red-500",
|
|
179
|
-
Red400 = "red-400",
|
|
180
|
-
Red300 = "red-300",
|
|
181
|
-
Red200 = "red-200",
|
|
182
122
|
Red100 = "red-100",
|
|
183
|
-
Ice = "ice",
|
|
184
|
-
Ice900 = "ice-900",
|
|
185
|
-
Ice800 = "ice-800",
|
|
186
123
|
Ice700 = "ice-700",
|
|
187
|
-
Ice600 = "ice-600",
|
|
188
124
|
Ice500 = "ice-500",
|
|
189
|
-
|
|
190
|
-
Ice300 = "ice-300",
|
|
191
|
-
Ice200 = "ice-200",
|
|
125
|
+
Ice200 = "ice-200",// This is the one outlier, but it's used purposefully in a few places
|
|
192
126
|
Ice100 = "ice-100",
|
|
193
127
|
White = "white",
|
|
194
128
|
Black = "black"
|
package/dist/Illustration.js
CHANGED
package/dist/Illustration.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Illustration.js","sources":["../src/components/Illustration/Illustration.models.ts","../src/components/Illustration/Illustration.vue"],"sourcesContent":["/**\n * Enum to strongly map between a friendly name and file name of the illustration\n */\nexport enum SpotName {\n Approved = 'approved',\n Avatar = 'avatar',\n Barcode = 'barcode',\n Calendar = 'calendar',\n Cartridge = 'cartridge',\n Celebrate = 'celebrate',\n ChatBubble = 'chat-bubble',\n CheckBox = 'check-box',\n CheckCircle = 'check-circle',\n Click = 'click',\n Cocktail = 'cocktail',\n Confirmation = 'confirmation',\n Connnect = 'connnect',\n Cookie = 'cookie',\n CreditCard = 'credit-card',\n Crm = 'crm',\n Cultivation = 'cultivation',\n Data = 'data',\n DeliveryCompleted = 'delivery-completed',\n Delivery = 'delivery',\n DigitalPayments = 'digital-payments',\n Discover = 'discover',\n Diversity = 'diversity',\n Drink = 'drink',\n Dolly = 'dolly',\n EasyReconciliations = 'easy-reconciliations',\n Efficiency = 'efficiency',\n Error = 'error',\n FinancialGrowth = 'financial-growth',\n FinancialInstitution = 'financial-institution',\n Focus = 'focus',\n FulfillmentIssues = 'fulfillment-issues',\n Growth = 'growth',\n Handshake = 'handshake',\n Hierarchy = 'hierarchy',\n Home = 'home',\n Laptop = 'laptop',\n Licenses = 'licenses',\n LightBulb = 'light-bulb',\n LightbulbError = 'lightbulb-error',\n LineChart = 'line-chart',\n Link = 'link',\n LocationPin = 'location-pin',\n Lock = 'lock',\n Messaging = 'messaging',\n Microchip = 'microchip',\n MissingData = 'missing-data',\n MoneyTransfer = 'money-transfer',\n Money = 'money',\n NoInventoryAccess = 'no-inventory-access',\n NoInventory = 'no-inventory',\n NoPromote = 'no-promote',\n PackageReceived = 'package-received',\n Package = 'package',\n PaymentProcessing = 'payment-processing',\n Phone = 'phone',\n PieChart = 'pie-chart',\n ProductCycle = 'product-cycle',\n Puzzle = 'puzzle',\n Receipt = 'receipt',\n Retail = 'retail',\n SearchingDocument = 'searching-document',\n ShoppingBasket = 'shopping-basket',\n Shopping = 'shopping',\n Sign = 'sign',\n Smile = 'smile',\n Speed = 'speed',\n Time = 'time',\n Tools = 'tools',\n Truck = 'truck',\n User = 'user',\n Warehouse = 'warehouse',\n Warning = 'warning',\n XCircle = 'x-circle',\n}\n\nexport type SpotNames = `${SpotName}`;\n\n/**\n * String array of all illustration names\n */\nexport const spotNames = Object.values(SpotName);\n\nexport enum VignetteName {\n Bank = 'bank',\n SearchStorefront = 'search-storefront',\n Todo = 'todo',\n Warehouse = 'warehouse',\n}\n\nexport type VignetteNames = `${VignetteName}`;\n\n/**\n * String array of all vignette names\n */\nexport const vignetteNames = Object.values(VignetteName);\n\n/**\n * Types of illustrations that map to the subfolder under ./assets/illustrations/<type>\n */\nexport enum IllustrationType {\n Spot = 'spot',\n Vignette = 'vignette',\n // Scene is not implemented, but adding it for future work mentioned in STASH-61.\n Scene = 'scene',\n}\n\nexport type IllustrationTypes = `${IllustrationType}`;\n","<script lang=\"ts\">\n export * from './Illustration.models';\n</script>\n\n<script lang=\"ts\" setup>\n import uniqueId from 'lodash-es/uniqueId';\n import { computed, inject, useCssModule } from 'vue';\n import InlineSvg from 'vue-inline-svg';\n\n import { StashPrimaryColor } from '../../../types/colors';\n import { StashProvideState } from '../../../types/misc';\n import {\n IllustrationType,\n IllustrationTypes,\n SpotName,\n SpotNames,\n spotNames,\n VignetteName,\n VignetteNames,\n vignetteNames,\n } from './Illustration.models';\n\n export interface IllustrationProps {\n id?: string;\n\n /**\n * The filename of the icon that should be displayed\n */\n name: SpotNames | VignetteNames;\n\n /**\n * Accessible, short-text description for the icon. Not rendered as part of the graphic, but\n * browsers usually display it as a tooltip and screen readers use this.\n */\n title?: string;\n\n /**\n * The size in pixels of the illustration. This number will be used for width and height\n */\n size?: number;\n\n /**\n * Type of the illustration\n */\n type?: IllustrationTypes;\n\n /**\n * The fill color for the illustration. This component will use the 400 shade of the color\n * per design's request. Defaults to teal.\n */\n fillColor?:
|
|
1
|
+
{"version":3,"file":"Illustration.js","sources":["../src/components/Illustration/Illustration.models.ts","../src/components/Illustration/Illustration.vue"],"sourcesContent":["/**\n * Enum to strongly map between a friendly name and file name of the illustration\n */\nexport enum SpotName {\n Approved = 'approved',\n Avatar = 'avatar',\n Barcode = 'barcode',\n Calendar = 'calendar',\n Cartridge = 'cartridge',\n Celebrate = 'celebrate',\n ChatBubble = 'chat-bubble',\n CheckBox = 'check-box',\n CheckCircle = 'check-circle',\n Click = 'click',\n Cocktail = 'cocktail',\n Confirmation = 'confirmation',\n Connnect = 'connnect',\n Cookie = 'cookie',\n CreditCard = 'credit-card',\n Crm = 'crm',\n Cultivation = 'cultivation',\n Data = 'data',\n DeliveryCompleted = 'delivery-completed',\n Delivery = 'delivery',\n DigitalPayments = 'digital-payments',\n Discover = 'discover',\n Diversity = 'diversity',\n Drink = 'drink',\n Dolly = 'dolly',\n EasyReconciliations = 'easy-reconciliations',\n Efficiency = 'efficiency',\n Error = 'error',\n FinancialGrowth = 'financial-growth',\n FinancialInstitution = 'financial-institution',\n Focus = 'focus',\n FulfillmentIssues = 'fulfillment-issues',\n Growth = 'growth',\n Handshake = 'handshake',\n Hierarchy = 'hierarchy',\n Home = 'home',\n Laptop = 'laptop',\n Licenses = 'licenses',\n LightBulb = 'light-bulb',\n LightbulbError = 'lightbulb-error',\n LineChart = 'line-chart',\n Link = 'link',\n LocationPin = 'location-pin',\n Lock = 'lock',\n Messaging = 'messaging',\n Microchip = 'microchip',\n MissingData = 'missing-data',\n MoneyTransfer = 'money-transfer',\n Money = 'money',\n NoInventoryAccess = 'no-inventory-access',\n NoInventory = 'no-inventory',\n NoPromote = 'no-promote',\n PackageReceived = 'package-received',\n Package = 'package',\n PaymentProcessing = 'payment-processing',\n Phone = 'phone',\n PieChart = 'pie-chart',\n ProductCycle = 'product-cycle',\n Puzzle = 'puzzle',\n Receipt = 'receipt',\n Retail = 'retail',\n SearchingDocument = 'searching-document',\n ShoppingBasket = 'shopping-basket',\n Shopping = 'shopping',\n Sign = 'sign',\n Smile = 'smile',\n Speed = 'speed',\n Time = 'time',\n Tools = 'tools',\n Truck = 'truck',\n User = 'user',\n Warehouse = 'warehouse',\n Warning = 'warning',\n XCircle = 'x-circle',\n}\n\nexport type SpotNames = `${SpotName}`;\n\n/**\n * String array of all illustration names\n */\nexport const spotNames = Object.values(SpotName);\n\nexport enum VignetteName {\n Bank = 'bank',\n SearchStorefront = 'search-storefront',\n Todo = 'todo',\n Warehouse = 'warehouse',\n}\n\nexport type VignetteNames = `${VignetteName}`;\n\n/**\n * String array of all vignette names\n */\nexport const vignetteNames = Object.values(VignetteName);\n\n/**\n * Types of illustrations that map to the subfolder under ./assets/illustrations/<type>\n */\nexport enum IllustrationType {\n Spot = 'spot',\n Vignette = 'vignette',\n // Scene is not implemented, but adding it for future work mentioned in STASH-61.\n Scene = 'scene',\n}\n\nexport type IllustrationTypes = `${IllustrationType}`;\n","<script lang=\"ts\">\n export * from './Illustration.models';\n</script>\n\n<script lang=\"ts\" setup>\n import uniqueId from 'lodash-es/uniqueId';\n import { computed, inject, useCssModule } from 'vue';\n import InlineSvg from 'vue-inline-svg';\n\n import { StashPrimaryColor, StashPrimaryColorGroup } from '../../../types/colors';\n import { StashProvideState } from '../../../types/misc';\n import {\n IllustrationType,\n IllustrationTypes,\n SpotName,\n SpotNames,\n spotNames,\n VignetteName,\n VignetteNames,\n vignetteNames,\n } from './Illustration.models';\n\n export interface IllustrationProps {\n id?: string;\n\n /**\n * The filename of the icon that should be displayed\n */\n name: SpotNames | VignetteNames;\n\n /**\n * Accessible, short-text description for the icon. Not rendered as part of the graphic, but\n * browsers usually display it as a tooltip and screen readers use this.\n */\n title?: string;\n\n /**\n * The size in pixels of the illustration. This number will be used for width and height\n */\n size?: number;\n\n /**\n * Type of the illustration\n */\n type?: IllustrationTypes;\n\n /**\n * The fill color for the illustration. This component will use the 400 shade of the color\n * per design's request. Defaults to teal.\n */\n fillColor?: StashPrimaryColorGroup;\n\n /**\n * The color theme for the illustration. This component will use the standard 500 shade of the color.\n * Defaults to purple\n */\n strokeColor?: StashPrimaryColor;\n\n /**\n * Illustration's custom static path. It'll default to either the staticPath defined on the library installation or '/static' if none are provided.\n */\n staticPath?: string;\n }\n\n const props = withDefaults(defineProps<IllustrationProps>(), {\n id: uniqueId('ll-illustration-'),\n title: '',\n size: 48,\n type: IllustrationType.Spot,\n fillColor: 'blue',\n strokeColor: 'purple-500',\n staticPath: '',\n });\n\n if (props.type === IllustrationType.Scene) {\n throw new Error(\n 'Scene illustration types are not supported. Illustrations will need to be uploaded under ./assets/illustrations/scene. Illustrations to be provided by design.',\n );\n }\n\n if (\n (props.type === IllustrationType.Spot && !spotNames.includes(props.name as SpotName)) ||\n (props.type === IllustrationType.Vignette && !vignetteNames.includes(props.name as VignetteName))\n ) {\n throw new Error(\n `${props.type} illustration name ${props.name} not found. Did you check that you are using the correct type for your illustration?`,\n );\n }\n\n const classes = useCssModule();\n\n const stashOptions = inject<Partial<StashProvideState>>('stashOptions', {\n staticPath: '/static',\n });\n\n const isSpotIllustration = computed(() => props.type === IllustrationType.Spot);\n\n /**\n * Browsers won't add the `stroke-width` attribute if it is set to false.\n * However setting it to specific number value affects vignettes\n */\n const strokeWidth = computed<boolean | string>(() => {\n return isSpotIllustration.value ? '0' : false;\n });\n\n const computedStaticPath = computed(() => {\n return props.staticPath || stashOptions?.staticPath;\n });\n</script>\n\n<template>\n <!-- InlineSvg package (https://github.com/shrpne/vue-inline-svg) swaps external svgs and puts\n them inline so we can style them with CSS -->\n <!-- Having to override fill to be none and stroke to be zero so the exported svgs from Figma\n that do not have those attributes specified do not get a default one applied -->\n <InlineSvg\n :id=\"props.id\"\n :class=\"[\n classes.illustration,\n {\n [`tw-text-${props.fillColor}-400 tw-stroke-${props.strokeColor}`]: isSpotIllustration,\n },\n ]\"\n :title=\"props.title\"\n :height=\"props.size\"\n :width=\"props.size\"\n :stroke-width=\"strokeWidth\"\n fill=\"none\"\n :src=\"`${computedStaticPath}/illustrations/${props.type}/${props.name}.svg`\"\n />\n</template>\n\n<style module>\n .illustration {\n display: inline-block;\n vertical-align: middle;\n }\n</style>\n"],"names":["SpotName","spotNames","VignetteName","vignetteNames","IllustrationType","props","classes","useCssModule","stashOptions","inject","isSpotIllustration","computed","strokeWidth","computedStaticPath"],"mappings":";;;;AAGY,IAAAA,sBAAAA,OACVA,EAAA,WAAW,YACXA,EAAA,SAAS,UACTA,EAAA,UAAU,WACVA,EAAA,WAAW,YACXA,EAAA,YAAY,aACZA,EAAA,YAAY,aACZA,EAAA,aAAa,eACbA,EAAA,WAAW,aACXA,EAAA,cAAc,gBACdA,EAAA,QAAQ,SACRA,EAAA,WAAW,YACXA,EAAA,eAAe,gBACfA,EAAA,WAAW,YACXA,EAAA,SAAS,UACTA,EAAA,aAAa,eACbA,EAAA,MAAM,OACNA,EAAA,cAAc,eACdA,EAAA,OAAO,QACPA,EAAA,oBAAoB,sBACpBA,EAAA,WAAW,YACXA,EAAA,kBAAkB,oBAClBA,EAAA,WAAW,YACXA,EAAA,YAAY,aACZA,EAAA,QAAQ,SACRA,EAAA,QAAQ,SACRA,EAAA,sBAAsB,wBACtBA,EAAA,aAAa,cACbA,EAAA,QAAQ,SACRA,EAAA,kBAAkB,oBAClBA,EAAA,uBAAuB,yBACvBA,EAAA,QAAQ,SACRA,EAAA,oBAAoB,sBACpBA,EAAA,SAAS,UACTA,EAAA,YAAY,aACZA,EAAA,YAAY,aACZA,EAAA,OAAO,QACPA,EAAA,SAAS,UACTA,EAAA,WAAW,YACXA,EAAA,YAAY,cACZA,EAAA,iBAAiB,mBACjBA,EAAA,YAAY,cACZA,EAAA,OAAO,QACPA,EAAA,cAAc,gBACdA,EAAA,OAAO,QACPA,EAAA,YAAY,aACZA,EAAA,YAAY,aACZA,EAAA,cAAc,gBACdA,EAAA,gBAAgB,kBAChBA,EAAA,QAAQ,SACRA,EAAA,oBAAoB,uBACpBA,EAAA,cAAc,gBACdA,EAAA,YAAY,cACZA,EAAA,kBAAkB,oBAClBA,EAAA,UAAU,WACVA,EAAA,oBAAoB,sBACpBA,EAAA,QAAQ,SACRA,EAAA,WAAW,aACXA,EAAA,eAAe,iBACfA,EAAA,SAAS,UACTA,EAAA,UAAU,WACVA,EAAA,SAAS,UACTA,EAAA,oBAAoB,sBACpBA,EAAA,iBAAiB,mBACjBA,EAAA,WAAW,YACXA,EAAA,OAAO,QACPA,EAAA,QAAQ,SACRA,EAAA,QAAQ,SACRA,EAAA,OAAO,QACPA,EAAA,QAAQ,SACRA,EAAA,QAAQ,SACRA,EAAA,OAAO,QACPA,EAAA,YAAY,aACZA,EAAA,UAAU,WACVA,EAAA,UAAU,YA1EAA,IAAAA,KAAA,CAAA,CAAA;AAkFC,MAAAC,IAAY,OAAO,OAAOD,CAAQ;AAEnC,IAAAE,sBAAAA,OACVA,EAAA,OAAO,QACPA,EAAA,mBAAmB,qBACnBA,EAAA,OAAO,QACPA,EAAA,YAAY,aAJFA,IAAAA,KAAA,CAAA,CAAA;AAYC,MAAAC,IAAgB,OAAO,OAAOD,CAAY;AAK3C,IAAAE,sBAAAA,OACVA,EAAA,OAAO,QACPA,EAAA,WAAW,YAEXA,EAAA,QAAQ,SAJEA,IAAAA,KAAA,CAAA,CAAA;;;;;;;;;;;;;;;AC9BN,QAAAC,EAAM,SAASD,EAAiB;AAClC,YAAM,IAAI;AAAA,QACR;AAAA,MAAA;AAIJ,QACGC,EAAM,SAASD,EAAiB,QAAQ,CAACH,EAAU,SAASI,EAAM,IAAgB,KAClFA,EAAM,SAASD,EAAiB,YAAY,CAACD,EAAc,SAASE,EAAM,IAAoB;AAE/F,YAAM,IAAI;AAAA,QACR,GAAGA,EAAM,IAAI,sBAAsBA,EAAM,IAAI;AAAA,MAAA;AAIjD,UAAMC,IAAUC,KAEVC,IAAeC,EAAmC,gBAAgB;AAAA,MACtE,YAAY;AAAA,IAAA,CACb,GAEKC,IAAqBC,EAAS,MAAMN,EAAM,SAASD,EAAiB,IAAI,GAMxEQ,IAAcD,EAA2B,MACtCD,EAAmB,QAAQ,MAAM,EACzC,GAEKG,IAAqBF,EAAS,MAC3BN,EAAM,eAAcG,KAAA,gBAAAA,EAAc,WAC1C;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -49,8 +49,8 @@ declare const _default: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRunt
|
|
|
49
49
|
id: string;
|
|
50
50
|
size: number;
|
|
51
51
|
staticPath: string;
|
|
52
|
-
fillColor:
|
|
53
|
-
strokeColor: "
|
|
52
|
+
fillColor: StashPrimaryColorGroup;
|
|
53
|
+
strokeColor: "purple-500" | "royal-500" | "blue-500" | "teal-500" | "green-500" | "seafoam-500" | "yellow-500" | "orange-500" | "red-500" | "ice-500";
|
|
54
54
|
}, {}>;
|
|
55
55
|
export default _default;
|
|
56
56
|
|
|
@@ -77,7 +77,7 @@ export declare interface IllustrationProps {
|
|
|
77
77
|
* The fill color for the illustration. This component will use the 400 shade of the color
|
|
78
78
|
* per design's request. Defaults to teal.
|
|
79
79
|
*/
|
|
80
|
-
fillColor?:
|
|
80
|
+
fillColor?: StashPrimaryColorGroup;
|
|
81
81
|
/**
|
|
82
82
|
* The color theme for the illustration. This component will use the standard 500 shade of the color.
|
|
83
83
|
* Defaults to purple
|
|
@@ -190,19 +190,24 @@ export declare const spotNames: SpotName[];
|
|
|
190
190
|
declare type StashPrimaryColor = `${StashPrimaryColors}`;
|
|
191
191
|
|
|
192
192
|
/**
|
|
193
|
-
*
|
|
193
|
+
* The names of the color groups.
|
|
194
|
+
*/
|
|
195
|
+
declare type StashPrimaryColorGroup = 'blue' | 'green' | 'ice' | 'orange' | 'purple' | 'red' | 'royal' | 'seafoam' | 'teal' | 'yellow';
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* A limited list of stash brand colors, only including their primary (500) shade.
|
|
194
199
|
*/
|
|
195
200
|
declare enum StashPrimaryColors {
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
201
|
+
Blue500 = "blue-500",
|
|
202
|
+
Green500 = "green-500",
|
|
203
|
+
Ice500 = "ice-500",
|
|
204
|
+
Orange500 = "orange-500",
|
|
205
|
+
Purple500 = "purple-500",
|
|
206
|
+
Red500 = "red-500",
|
|
207
|
+
Royal500 = "royal-500",
|
|
208
|
+
Seafoam500 = "seafoam-500",
|
|
209
|
+
Teal500 = "teal-500",
|
|
210
|
+
Yellow500 = "yellow-500"
|
|
206
211
|
}
|
|
207
212
|
|
|
208
213
|
export declare enum VignetteName {
|
package/dist/InputOptions.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as B, useAttrs as S, useSlots as T, useCssModule as $, ref as
|
|
1
|
+
import { defineComponent as B, useAttrs as S, useSlots as T, useCssModule as $, ref as d, computed as c, watchEffect as k, watch as v, openBlock as E, createBlock as b, mergeProps as m, createSlots as q, withCtx as f, createElementVNode as A, normalizeClass as M, unref as s, createVNode as h, renderSlot as z } from "vue";
|
|
2
2
|
import { _ as F } from "./Field.vue_vue_type_script_setup_true_lang-475832fe.js";
|
|
3
3
|
import N from "./Input.js";
|
|
4
4
|
import O from "./Select.js";
|
|
@@ -26,7 +26,6 @@ import "lodash-es/isFinite";
|
|
|
26
26
|
import "./clickoutside.js";
|
|
27
27
|
import "./MenusPlugin-5e93f0a5.js";
|
|
28
28
|
import "./Chip.js";
|
|
29
|
-
import "./colors-13e95ebf.js";
|
|
30
29
|
import "./utils/colorScheme.js";
|
|
31
30
|
const P = {
|
|
32
31
|
name: "ll-input-options"
|
|
@@ -43,7 +42,7 @@ const P = {
|
|
|
43
42
|
},
|
|
44
43
|
emits: ["update:model-value", "change"],
|
|
45
44
|
setup(_, { emit: a }) {
|
|
46
|
-
const o = _, u = S(), y = T(), r = $(), n =
|
|
45
|
+
const o = _, u = S(), y = T(), r = $(), n = d(), i = d(!1), t = d(), g = c(() => {
|
|
47
46
|
const { disabled: e, placeholder: l } = u;
|
|
48
47
|
return { disabled: e, placeholder: l };
|
|
49
48
|
}), V = c(() => {
|
|
@@ -97,7 +96,7 @@ const P = {
|
|
|
97
96
|
throw new Error("ll-input-options: use :model-value or v-model instead of :value.");
|
|
98
97
|
if (u.onInput)
|
|
99
98
|
throw new Error("ll-input-options: use the @update:model-value event instead of @input");
|
|
100
|
-
return (e, l) => (E(), b(F,
|
|
99
|
+
return (e, l) => (E(), b(F, m(o, {
|
|
101
100
|
class: "input",
|
|
102
101
|
"data-test": "ll-input-options"
|
|
103
102
|
}), q({
|
|
@@ -105,7 +104,7 @@ const P = {
|
|
|
105
104
|
A("div", {
|
|
106
105
|
class: M(["flex", { [s(r)["has-error"]]: !!o.errorText }])
|
|
107
106
|
}, [
|
|
108
|
-
h(N,
|
|
107
|
+
h(N, m(g.value, {
|
|
109
108
|
id: p,
|
|
110
109
|
class: ["flex-1", [s(r).input, { "tw-z-control": i.value }]],
|
|
111
110
|
type: o.type,
|
|
@@ -115,7 +114,7 @@ const P = {
|
|
|
115
114
|
onBlur: l[0] || (l[0] = (I) => i.value = !1),
|
|
116
115
|
onFocus: l[1] || (l[1] = (I) => i.value = !0)
|
|
117
116
|
}), null, 16, ["id", "class", "type", "model-value"]),
|
|
118
|
-
h(O,
|
|
117
|
+
h(O, m(V.value, {
|
|
119
118
|
single: "",
|
|
120
119
|
"hide-search": "",
|
|
121
120
|
"prevent-empty": "",
|
|
@@ -144,8 +143,8 @@ const P = {
|
|
|
144
143
|
"has-error": "_has-error_mqotn_26"
|
|
145
144
|
}, J = {
|
|
146
145
|
$style: H
|
|
147
|
-
},
|
|
146
|
+
}, Ce = /* @__PURE__ */ U(j, [["__cssModules", J]]);
|
|
148
147
|
export {
|
|
149
|
-
|
|
148
|
+
Ce as default
|
|
150
149
|
};
|
|
151
150
|
//# sourceMappingURL=InputOptions.js.map
|