@leaflink/stash 42.5.0 → 42.5.2
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 +24 -3
- package/dist/ActionsDropdown.js +15 -20
- package/dist/ActionsDropdown.js.map +1 -1
- package/dist/AddressSelect.js +34 -45
- package/dist/AddressSelect.js.map +1 -1
- package/dist/Alert.js +11 -13
- package/dist/Alert.js.map +1 -1
- package/dist/AppNavigationItem.js +4 -6
- package/dist/AppNavigationItem.js.map +1 -1
- package/dist/AppTopbar.js +13 -15
- package/dist/AppTopbar.js.map +1 -1
- package/dist/ButtonGroup.js +12 -14
- package/dist/ButtonGroup.js.map +1 -1
- package/dist/CardMedia.js +9 -11
- package/dist/CardMedia.js.map +1 -1
- package/dist/Carousel.js +41 -44
- package/dist/Carousel.js.map +1 -1
- package/dist/Checkbox.js +9 -11
- package/dist/Checkbox.js.map +1 -1
- package/dist/ChevronToggle.js +2 -4
- package/dist/ChevronToggle.js.map +1 -1
- package/dist/Chip.js +4 -6
- package/dist/Chip.js.map +1 -1
- package/dist/ContextSwitcher.js +12 -17
- package/dist/ContextSwitcher.js.map +1 -1
- package/dist/Copy.js +19 -24
- package/dist/Copy.js.map +1 -1
- package/dist/CurrencyInput.js +8 -13
- package/dist/CurrencyInput.js.map +1 -1
- package/dist/DataView.js +48 -59
- package/dist/DataView.js.map +1 -1
- package/dist/DataViewFilters.js +87 -97
- package/dist/DataViewFilters.js.map +1 -1
- package/dist/DataViewSortButton.js +14 -18
- package/dist/DataViewSortButton.js.map +1 -1
- package/dist/DataViewToolbar.js +12 -14
- package/dist/DataViewToolbar.js.map +1 -1
- package/dist/DatePicker.js +8 -18
- package/dist/DatePicker.js.map +1 -1
- package/dist/Dialog.js +6 -9
- package/dist/Dialog.js.map +1 -1
- package/dist/Dropdown.js +15 -20
- package/dist/Dropdown.js.map +1 -1
- package/dist/EmptyState.js +10 -13
- package/dist/EmptyState.js.map +1 -1
- package/dist/Field.js +3 -6
- package/dist/Field.js.map +1 -1
- package/dist/{Field.vue_vue_type_script_setup_true_lang-c864abd3.js → Field.vue_vue_type_script_setup_true_lang-475832fe.js} +2 -2
- package/dist/{Field.vue_vue_type_script_setup_true_lang-c864abd3.js.map → Field.vue_vue_type_script_setup_true_lang-475832fe.js.map} +1 -1
- package/dist/FileUpload.js +27 -30
- package/dist/FileUpload.js.map +1 -1
- package/dist/FilterChip.js +10 -13
- package/dist/FilterChip.js.map +1 -1
- package/dist/FilterDrawerItem.js +5 -8
- package/dist/FilterDrawerItem.js.map +1 -1
- package/dist/FilterDropdown.js +73 -88
- package/dist/FilterDropdown.js.map +1 -1
- package/dist/FilterSelect.js +15 -18
- package/dist/FilterSelect.js.map +1 -1
- package/dist/Filters.js +67 -78
- package/dist/Filters.js.map +1 -1
- package/dist/HttpError.js +4 -7
- package/dist/HttpError.js.map +1 -1
- package/dist/Icon.js +236 -14
- package/dist/Icon.js.map +1 -1
- package/dist/Icon.vue.d.ts +2 -2
- package/dist/Icon.vue_used_vue_type_style_index_0_lang.module-eb359559.js +11 -0
- package/dist/Icon.vue_used_vue_type_style_index_0_lang.module-eb359559.js.map +1 -0
- package/dist/IconLabel.js +4 -6
- package/dist/IconLabel.js.map +1 -1
- package/dist/Illustration.js +6 -8
- package/dist/Illustration.js.map +1 -1
- package/dist/Image.js +39 -49
- package/dist/Image.js.map +1 -1
- package/dist/InlineEdit.js +10 -12
- package/dist/InlineEdit.js.map +1 -1
- package/dist/Input.js +50 -55
- package/dist/Input.js.map +1 -1
- package/dist/InputOptions.js +20 -29
- package/dist/InputOptions.js.map +1 -1
- package/dist/Label.js +1 -4
- package/dist/Label.js.map +1 -1
- package/dist/LicenseChip.js +7 -9
- package/dist/LicenseChip.js.map +1 -1
- package/dist/ListItem.js +11 -13
- package/dist/ListItem.js.map +1 -1
- package/dist/ListView.js +47 -58
- package/dist/ListView.js.map +1 -1
- package/dist/Metric.js +6 -8
- package/dist/Metric.js.map +1 -1
- package/dist/Modal.js +16 -19
- package/dist/Modal.js.map +1 -1
- package/dist/Modals.js +16 -26
- package/dist/Modals.js.map +1 -1
- package/dist/ModalsPlugin.js +12 -22
- package/dist/ModalsPlugin.js.map +1 -1
- package/dist/ObfuscateText.js +7 -9
- package/dist/ObfuscateText.js.map +1 -1
- package/dist/PageNavigation.js +25 -29
- package/dist/PageNavigation.js.map +1 -1
- package/dist/Paginate.js +29 -31
- package/dist/Paginate.js.map +1 -1
- package/dist/QuickAction.js +13 -15
- package/dist/QuickAction.js.map +1 -1
- package/dist/RadioGroup.js +86 -89
- package/dist/RadioGroup.js.map +1 -1
- package/dist/SearchBar.js +18 -20
- package/dist/SearchBar.js.map +1 -1
- package/dist/Select.js +13 -23
- package/dist/Select.js.map +1 -1
- package/dist/SelectStatus.js +26 -36
- package/dist/SelectStatus.js.map +1 -1
- package/dist/Step.js +19 -21
- package/dist/Step.js.map +1 -1
- package/dist/Switch.js +8 -10
- package/dist/Switch.js.map +1 -1
- package/dist/Tab.js +25 -30
- package/dist/Tab.js.map +1 -1
- package/dist/Table.js +19 -21
- package/dist/Table.js.map +1 -1
- package/dist/TableCell.js +21 -22
- package/dist/TableCell.js.map +1 -1
- package/dist/TableHeaderCell.js +4 -4
- package/dist/TableHeaderRow.js +7 -9
- package/dist/TableHeaderRow.js.map +1 -1
- package/dist/TableRow.js +22 -24
- package/dist/TableRow.js.map +1 -1
- package/dist/Tabs.js +11 -16
- package/dist/Tabs.js.map +1 -1
- package/dist/{Tabs.vue_vue_type_script_setup_true_lang-ba383fda.js → Tabs.vue_vue_type_script_setup_true_lang-aca4f8b8.js} +3 -3
- package/dist/{Tabs.vue_vue_type_script_setup_true_lang-ba383fda.js.map → Tabs.vue_vue_type_script_setup_true_lang-aca4f8b8.js.map} +1 -1
- package/dist/Textarea.js +10 -13
- package/dist/Textarea.js.map +1 -1
- package/dist/Toast.js +8 -10
- package/dist/Toast.js.map +1 -1
- package/dist/Toasts.js +14 -25
- package/dist/Toasts.js.map +1 -1
- package/dist/ToastsPlugin.js +14 -25
- package/dist/ToastsPlugin.js.map +1 -1
- package/dist/components.css +1 -1
- package/dist/index.js +53 -62
- package/dist/index.js.map +1 -1
- package/dist/locale.js +12 -15
- package/dist/locale.js.map +1 -1
- package/dist/{searchFuzzy-13c124f8.js → searchFuzzy-74a7de1c.js} +2 -2
- package/dist/{searchFuzzy-13c124f8.js.map → searchFuzzy-74a7de1c.js.map} +1 -1
- package/dist/storage.js +6 -11
- package/dist/storage.js.map +1 -1
- package/dist/tailwind-base.d.ts +1 -0
- package/dist/tailwind-base.js +1 -0
- package/dist/tailwind-base.js.map +1 -1
- package/dist/tooltip.js +21 -26
- package/dist/tooltip.js.map +1 -1
- package/dist/useGoogleMaps.js +91 -226
- package/dist/useGoogleMaps.js.map +1 -1
- package/dist/useModals.js +21 -31
- package/dist/useModals.js.map +1 -1
- package/dist/useSearch.js +17 -22
- package/dist/useSearch.js.map +1 -1
- package/dist/useToasts.js +25 -36
- package/dist/useToasts.js.map +1 -1
- package/dist/useValidation.js +79 -108
- package/dist/useValidation.js.map +1 -1
- package/dist/utils/calculateElementOverflow.js +9 -14
- package/dist/utils/calculateElementOverflow.js.map +1 -1
- package/dist/utils/createQueryString.js +9 -15
- package/dist/utils/createQueryString.js.map +1 -1
- package/dist/utils/helpers.js +46 -59
- package/dist/utils/helpers.js.map +1 -1
- package/dist/utils/i18n.js +17 -20
- package/dist/utils/i18n.js.map +1 -1
- package/dist/utils/searchFuzzy.js +7 -12
- package/dist/utils/searchFuzzy.js.map +1 -1
- package/dist/utils/storage.js +10 -15
- package/dist/utils/storage.js.map +1 -1
- package/dist/viewable.js +26 -34
- package/dist/viewable.js.map +1 -1
- package/package.json +2 -4
- package/tailwind-base.ts +1 -0
- package/dist/Icon.vue_used_vue_type_style_index_0_lang.module-d2507af3.js +0 -243
- package/dist/Icon.vue_used_vue_type_style_index_0_lang.module-d2507af3.js.map +0 -1
- package/dist/_MapCache-65811284.js +0 -188
- package/dist/_MapCache-65811284.js.map +0 -1
- package/dist/_Uint8Array-06e4d083.js +0 -66
- package/dist/_Uint8Array-06e4d083.js.map +0 -1
- package/dist/_baseAssignValue-dd1499b4.js +0 -22
- package/dist/_baseAssignValue-dd1499b4.js.map +0 -1
- package/dist/_baseIsEqual-d594c87f.js +0 -171
- package/dist/_baseIsEqual-d594c87f.js.map +0 -1
- package/dist/_createCompounder-ae01a723.js +0 -245
- package/dist/_createCompounder-ae01a723.js.map +0 -1
- package/dist/_getAllKeys-5e735d41.js +0 -44
- package/dist/_getAllKeys-5e735d41.js.map +0 -1
- package/dist/_getPrototype-3e6fccd6.js +0 -7
- package/dist/_getPrototype-3e6fccd6.js.map +0 -1
- package/dist/_getTag-4db47fa6.js +0 -47
- package/dist/_getTag-4db47fa6.js.map +0 -1
- package/dist/_initCloneObject-161353b9.js +0 -88
- package/dist/_initCloneObject-161353b9.js.map +0 -1
- package/dist/_overArg-6d920d99.js +0 -9
- package/dist/_overArg-6d920d99.js.map +0 -1
- package/dist/capitalize-667d9f60.js +0 -42
- package/dist/capitalize-667d9f60.js.map +0 -1
- package/dist/cloneDeep-5bc375b0.js +0 -146
- package/dist/cloneDeep-5bc375b0.js.map +0 -1
- package/dist/debounce-6aca1ca9.js +0 -86
- package/dist/debounce-6aca1ca9.js.map +0 -1
- package/dist/get-27d90892.js +0 -66
- package/dist/get-27d90892.js.map +0 -1
- package/dist/identity-452d03fd.js +0 -20
- package/dist/identity-452d03fd.js.map +0 -1
- package/dist/isArrayLike-09233e52.js +0 -61
- package/dist/isArrayLike-09233e52.js.map +0 -1
- package/dist/isEmpty-2fbad344.js +0 -23
- package/dist/isEmpty-2fbad344.js.map +0 -1
- package/dist/isEqual-fca467fb.js +0 -8
- package/dist/isEqual-fca467fb.js.map +0 -1
- package/dist/isObjectLike-54341556.js +0 -39
- package/dist/isObjectLike-54341556.js.map +0 -1
- package/dist/isPlainObject-55c7f916.js +0 -16
- package/dist/isPlainObject-55c7f916.js.map +0 -1
- package/dist/merge-b14fad9d.js +0 -124
- package/dist/merge-b14fad9d.js.map +0 -1
- package/dist/toString-7d5bf363.js +0 -29
- package/dist/toString-7d5bf363.js.map +0 -1
- package/dist/uniqueId-847efe53.js +0 -10
- package/dist/uniqueId-847efe53.js.map +0 -1
package/dist/Icon.js
CHANGED
|
@@ -1,17 +1,239 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import "
|
|
5
|
-
import "./
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import { defineComponent as p, useCssModule as m, inject as h, computed as i, openBlock as g, createBlock as f, unref as a, normalizeClass as b } from "vue";
|
|
2
|
+
import w from "lodash-es/uniqueId";
|
|
3
|
+
import { I as k } from "./index-79ce320f.js";
|
|
4
|
+
import { s as v } from "./Icon.vue_used_vue_type_style_index_0_lang.module-eb359559.js";
|
|
5
|
+
import { _ as y } from "./_plugin-vue_export-helper-dad06003.js";
|
|
6
|
+
const _ = [
|
|
7
|
+
"action-dots",
|
|
8
|
+
"activity",
|
|
9
|
+
"alert-bell",
|
|
10
|
+
"archive",
|
|
11
|
+
"arrow-down",
|
|
12
|
+
"arrow-left",
|
|
13
|
+
"arrow-right",
|
|
14
|
+
"arrow-up",
|
|
15
|
+
"badge-discount",
|
|
16
|
+
"badge-seller-elite",
|
|
17
|
+
"badge-seller-power",
|
|
18
|
+
"book-customer",
|
|
19
|
+
"building-office",
|
|
20
|
+
"bulk-add",
|
|
21
|
+
"calendar-reschedule",
|
|
22
|
+
"calendar",
|
|
23
|
+
"caret-down",
|
|
24
|
+
"caret-up",
|
|
25
|
+
"cart-active",
|
|
26
|
+
"cart-plus",
|
|
27
|
+
"change-log",
|
|
28
|
+
"check",
|
|
29
|
+
"chevron-down",
|
|
30
|
+
"chevron-left",
|
|
31
|
+
"chevron-right",
|
|
32
|
+
"chevron-up",
|
|
33
|
+
"circle-check",
|
|
34
|
+
"circle-close",
|
|
35
|
+
"circle-dollar",
|
|
36
|
+
"circle-info",
|
|
37
|
+
"circle-partial",
|
|
38
|
+
"circle-percent",
|
|
39
|
+
"circle-question-mark",
|
|
40
|
+
"circle-status",
|
|
41
|
+
"circle-warning",
|
|
42
|
+
"clipboard-checkmark",
|
|
43
|
+
"clipboard-inventory",
|
|
44
|
+
"close",
|
|
45
|
+
"combine",
|
|
46
|
+
"compass",
|
|
47
|
+
"contact",
|
|
48
|
+
"contract",
|
|
49
|
+
"copy",
|
|
50
|
+
"credit-card",
|
|
51
|
+
"credit-profile",
|
|
52
|
+
"dashboard",
|
|
53
|
+
"document-accept",
|
|
54
|
+
"document-invoice",
|
|
55
|
+
"document-recieved",
|
|
56
|
+
"document-sent",
|
|
57
|
+
"document-view",
|
|
58
|
+
"document",
|
|
59
|
+
"dolly",
|
|
60
|
+
"download",
|
|
61
|
+
"edit",
|
|
62
|
+
"ellipsis",
|
|
63
|
+
"envelope-open",
|
|
64
|
+
"envelope",
|
|
65
|
+
"export",
|
|
66
|
+
"figma",
|
|
67
|
+
"file-csv",
|
|
68
|
+
"file",
|
|
69
|
+
"filter-funnel",
|
|
70
|
+
"filter-line",
|
|
71
|
+
"flag",
|
|
72
|
+
"folder",
|
|
73
|
+
"folder-bar-graph",
|
|
74
|
+
"folder-orders",
|
|
75
|
+
"gear",
|
|
76
|
+
"github",
|
|
77
|
+
"globe",
|
|
78
|
+
"graph-bar-chart",
|
|
79
|
+
"graph-line-chart",
|
|
80
|
+
"graph-pie-chart",
|
|
81
|
+
"hazard",
|
|
82
|
+
"hazard-outline",
|
|
83
|
+
"headset-agent",
|
|
84
|
+
"headset-mic",
|
|
85
|
+
"heart-filled",
|
|
86
|
+
"heart-outline",
|
|
87
|
+
"hide",
|
|
88
|
+
"history",
|
|
89
|
+
"image",
|
|
90
|
+
"import",
|
|
91
|
+
"keyboard-return",
|
|
92
|
+
"license-approved",
|
|
93
|
+
"license-certificate",
|
|
94
|
+
"lightbulb",
|
|
95
|
+
"link-add",
|
|
96
|
+
"link-unlink",
|
|
97
|
+
"link",
|
|
98
|
+
"list-items",
|
|
99
|
+
"loading-big",
|
|
100
|
+
"loading-small",
|
|
101
|
+
"location",
|
|
102
|
+
"lock-unlock",
|
|
103
|
+
"lock",
|
|
104
|
+
"logo-facebook",
|
|
105
|
+
"logo-instagram",
|
|
106
|
+
"logo-linkedin",
|
|
107
|
+
"logo-ll",
|
|
108
|
+
"logo-metrc",
|
|
109
|
+
"logo-plaid",
|
|
110
|
+
"logo-x",
|
|
111
|
+
"logo-youtube",
|
|
112
|
+
"logout",
|
|
113
|
+
"medical",
|
|
114
|
+
"megaphone-sound",
|
|
115
|
+
"megaphone",
|
|
116
|
+
"menu",
|
|
117
|
+
"message-dispute",
|
|
118
|
+
"message-reply",
|
|
119
|
+
"message",
|
|
120
|
+
"minus",
|
|
121
|
+
"mj-leaf",
|
|
122
|
+
"money",
|
|
123
|
+
"note-add",
|
|
124
|
+
"note",
|
|
125
|
+
"open-in-new",
|
|
126
|
+
"paperclip",
|
|
127
|
+
"performance",
|
|
128
|
+
"phone",
|
|
129
|
+
"plus",
|
|
130
|
+
"preview",
|
|
131
|
+
"print",
|
|
132
|
+
"product-menu-manage",
|
|
133
|
+
"product-menu-search",
|
|
134
|
+
"product-menu",
|
|
135
|
+
"queue-add",
|
|
136
|
+
"queue",
|
|
137
|
+
"recent",
|
|
138
|
+
"refresh",
|
|
139
|
+
"register",
|
|
140
|
+
"reply",
|
|
141
|
+
"report-download",
|
|
142
|
+
"sample",
|
|
143
|
+
"save",
|
|
144
|
+
"scale-law",
|
|
145
|
+
"scale-weight",
|
|
146
|
+
"search",
|
|
147
|
+
"seed-cycle",
|
|
148
|
+
"share",
|
|
149
|
+
"shop-bag-browse",
|
|
150
|
+
"shop-bag-reorder",
|
|
151
|
+
"shop-bag",
|
|
152
|
+
"shop-basket",
|
|
153
|
+
"shop-cart-add",
|
|
154
|
+
"shop-cart",
|
|
155
|
+
"show",
|
|
156
|
+
"sign-dollar",
|
|
157
|
+
"sign-percent",
|
|
158
|
+
"sort",
|
|
159
|
+
"split",
|
|
160
|
+
"star-filled",
|
|
161
|
+
"star-outline",
|
|
162
|
+
"storefront",
|
|
163
|
+
"submit",
|
|
164
|
+
"swap-horizontal",
|
|
165
|
+
"swap-vertical",
|
|
166
|
+
"tag-star",
|
|
167
|
+
"tag",
|
|
168
|
+
"test-results",
|
|
169
|
+
"ticket-star",
|
|
170
|
+
"ticket",
|
|
171
|
+
"tool-dropper",
|
|
172
|
+
"tool-wrench",
|
|
173
|
+
"transfer",
|
|
174
|
+
"trashcan",
|
|
175
|
+
"truck",
|
|
176
|
+
"upload",
|
|
177
|
+
"user-add",
|
|
178
|
+
"user-admin",
|
|
179
|
+
"user-check",
|
|
180
|
+
"user",
|
|
181
|
+
"view-card",
|
|
182
|
+
"view-detailed",
|
|
183
|
+
"view-list",
|
|
184
|
+
"warehouse",
|
|
185
|
+
"working"
|
|
186
|
+
];
|
|
187
|
+
var z = /* @__PURE__ */ ((r) => (r.Standard = "standard", r.Dense = "dense", r.Small = "small", r.Large = "large", r))(z || {});
|
|
188
|
+
const q = /* @__PURE__ */ p({
|
|
189
|
+
name: "ll-icon",
|
|
190
|
+
__name: "Icon",
|
|
191
|
+
props: {
|
|
192
|
+
id: { default: () => w("ll-icon-") },
|
|
193
|
+
name: {},
|
|
194
|
+
title: { default: "" },
|
|
195
|
+
size: { default: "standard" },
|
|
196
|
+
dense: { type: Boolean },
|
|
197
|
+
small: { type: Boolean },
|
|
198
|
+
staticPath: { default: "" }
|
|
199
|
+
},
|
|
200
|
+
setup(r) {
|
|
201
|
+
const e = r, o = m(), s = h("stashOptions", {
|
|
202
|
+
staticPath: "/static"
|
|
203
|
+
}), c = i(() => _.includes(e.name) ? e.name : "mj-leaf"), d = i(() => e.staticPath || (s == null ? void 0 : s.staticPath)), u = (t) => {
|
|
204
|
+
if (!t)
|
|
205
|
+
return t;
|
|
206
|
+
const l = document.createElement("use");
|
|
207
|
+
l.setAttribute("href", `#${c.value}`);
|
|
208
|
+
const n = t.querySelector(`#${c.value}`);
|
|
209
|
+
return n ? (t.replaceChildren(n, l), t) : (t.insertBefore(l, t.firstChild), t);
|
|
210
|
+
};
|
|
211
|
+
return (t, l) => (g(), f(a(k), {
|
|
212
|
+
id: e.id,
|
|
213
|
+
role: "presentation",
|
|
214
|
+
"aria-labelledby": e.id,
|
|
215
|
+
class: b(["stash-icon", [
|
|
216
|
+
a(o).icon,
|
|
217
|
+
`icon--${e.name}`,
|
|
218
|
+
{
|
|
219
|
+
[a(o).standard]: e.size === "standard",
|
|
220
|
+
[a(o).dense]: e.size === "dense" || e.dense,
|
|
221
|
+
[a(o).small]: e.size === "small" || e.small,
|
|
222
|
+
[a(o).large]: e.size === "large"
|
|
223
|
+
}
|
|
224
|
+
]]),
|
|
225
|
+
"data-test": "stash-icon",
|
|
226
|
+
src: `${d.value}/spritesheet.svg`,
|
|
227
|
+
title: e.title,
|
|
228
|
+
"transform-source": u
|
|
229
|
+
}, null, 8, ["id", "aria-labelledby", "class", "src", "title"]));
|
|
230
|
+
}
|
|
231
|
+
}), x = {
|
|
232
|
+
$style: v
|
|
233
|
+
}, S = /* @__PURE__ */ y(q, [["__cssModules", x]]);
|
|
12
234
|
export {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
235
|
+
z as IconSizes,
|
|
236
|
+
S as default,
|
|
237
|
+
_ as iconNames
|
|
16
238
|
};
|
|
17
239
|
//# sourceMappingURL=Icon.js.map
|
package/dist/Icon.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Icon.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"Icon.js","sources":["../src/components/Icon/Icon.types.ts","../src/components/Icon/Icon.vue"],"sourcesContent":["export const iconNames = [\n 'action-dots',\n 'activity',\n 'alert-bell',\n 'archive',\n 'arrow-down',\n 'arrow-left',\n 'arrow-right',\n 'arrow-up',\n 'badge-discount',\n 'badge-seller-elite',\n 'badge-seller-power',\n 'book-customer',\n 'building-office',\n 'bulk-add',\n 'calendar-reschedule',\n 'calendar',\n 'caret-down',\n 'caret-up',\n 'cart-active',\n 'cart-plus',\n 'change-log',\n 'check',\n 'chevron-down',\n 'chevron-left',\n 'chevron-right',\n 'chevron-up',\n 'circle-check',\n 'circle-close',\n 'circle-dollar',\n 'circle-info',\n 'circle-partial',\n 'circle-percent',\n 'circle-question-mark',\n 'circle-status',\n 'circle-warning',\n 'clipboard-checkmark',\n 'clipboard-inventory',\n 'close',\n 'combine',\n 'compass',\n 'contact',\n 'contract',\n 'copy',\n 'credit-card',\n 'credit-profile',\n 'dashboard',\n 'document-accept',\n 'document-invoice',\n 'document-recieved',\n 'document-sent',\n 'document-view',\n 'document',\n 'dolly',\n 'download',\n 'edit',\n 'ellipsis',\n 'envelope-open',\n 'envelope',\n 'export',\n 'figma',\n 'file-csv',\n 'file',\n 'filter-funnel',\n 'filter-line',\n 'flag',\n 'folder',\n 'folder-bar-graph',\n 'folder-orders',\n 'gear',\n 'github',\n 'globe',\n 'graph-bar-chart',\n 'graph-line-chart',\n 'graph-pie-chart',\n 'hazard',\n 'hazard-outline',\n 'headset-agent',\n 'headset-mic',\n 'heart-filled',\n 'heart-outline',\n 'hide',\n 'history',\n 'image',\n 'import',\n 'keyboard-return',\n 'license-approved',\n 'license-certificate',\n 'lightbulb',\n 'link-add',\n 'link-unlink',\n 'link',\n 'list-items',\n 'loading-big',\n 'loading-small',\n 'location',\n 'lock-unlock',\n 'lock',\n 'logo-facebook',\n 'logo-instagram',\n 'logo-linkedin',\n 'logo-ll',\n 'logo-metrc',\n 'logo-plaid',\n 'logo-x',\n 'logo-youtube',\n 'logout',\n 'medical',\n 'megaphone-sound',\n 'megaphone',\n 'menu',\n 'message-dispute',\n 'message-reply',\n 'message',\n 'minus',\n 'mj-leaf',\n 'money',\n 'note-add',\n 'note',\n 'open-in-new',\n 'paperclip',\n 'performance',\n 'phone',\n 'plus',\n 'preview',\n 'print',\n 'product-menu-manage',\n 'product-menu-search',\n 'product-menu',\n 'queue-add',\n 'queue',\n 'recent',\n 'refresh',\n 'register',\n 'reply',\n 'report-download',\n 'sample',\n 'save',\n 'scale-law',\n 'scale-weight',\n 'search',\n 'seed-cycle',\n 'share',\n 'shop-bag-browse',\n 'shop-bag-reorder',\n 'shop-bag',\n 'shop-basket',\n 'shop-cart-add',\n 'shop-cart',\n 'show',\n 'sign-dollar',\n 'sign-percent',\n 'sort',\n 'split',\n 'star-filled',\n 'star-outline',\n 'storefront',\n 'submit',\n 'swap-horizontal',\n 'swap-vertical',\n 'tag-star',\n 'tag',\n 'test-results',\n 'ticket-star',\n 'ticket',\n 'tool-dropper',\n 'tool-wrench',\n 'transfer',\n 'trashcan',\n 'truck',\n 'upload',\n 'user-add',\n 'user-admin',\n 'user-check',\n 'user',\n 'view-card',\n 'view-detailed',\n 'view-list',\n 'warehouse',\n 'working',\n] as const;\n\nexport type IconName = typeof iconNames[number];\n\nexport enum IconSizes {\n Standard = 'standard',\n Dense = 'dense',\n Small = 'small',\n Large = 'large',\n}\n\nexport type IconSize = `${IconSizes}`;\n","<script lang=\"ts\">\n export * from './Icon.types';\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 { StashProvideState } from '../../../types/misc';\n import { IconName, iconNames, IconSize } from './Icon.types';\n\n export interface IconProps {\n id?: string;\n\n /**\n * The filename of the icon that should be displayed\n */\n name: IconName;\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 of the icon\n * Options: large (32x32px), default (24x24px), dense (20x20px), small (14x14px).\n */\n size?: IconSize;\n\n /**\n * @deprecated Use the `size` prop with value \"dense\" instead\n */\n dense?: boolean;\n\n /**\n` * @deprecated Use the `size` prop with value \"small\" instead\n */\n small?: boolean;\n\n /**\n * Icon'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 defineOptions({\n name: 'll-icon',\n });\n\n const props = withDefaults(defineProps<IconProps>(), {\n id: () => uniqueId('ll-icon-'),\n size: 'standard',\n title: '',\n staticPath: '',\n });\n const classes = useCssModule();\n const stashOptions = inject<Partial<StashProvideState>>('stashOptions', {\n staticPath: '/static',\n });\n\n const computedName = computed<IconName>(() => {\n if (iconNames.includes(props.name)) {\n return props.name;\n }\n\n return 'mj-leaf';\n });\n\n const computedStaticPath = computed(() => {\n return props.staticPath || stashOptions?.staticPath;\n });\n\n /**\n * Event handler to add the use tag for the specific icon we need to the svg\n */\n const transformSvgSource = (svgElem: SVGElement) => {\n if (!svgElem) {\n return svgElem;\n }\n\n const useNode = document.createElement('use');\n useNode.setAttribute('href', `#${computedName.value}`);\n\n // Grab icon from sprite\n const symbolNode = svgElem.querySelector(`#${computedName.value}`);\n\n // This really shouldn't happen but if the spritesheet gets out of sync with the `IconName` type it could\n if (!symbolNode) {\n // still insert <use> element but it will not be found (this is more for tests than anything else)\n svgElem.insertBefore(useNode, svgElem.firstChild);\n return svgElem;\n }\n\n /**\n * Repeatedly inlining the entire spritesheet was causing failures in mobile Safari, and also\n * performance issues on long list pages where the svg was being inlined over and over.\n * Since the SVG is cached after the first request, this callback is just removing the unnecessary\n * <symbol> nodes to slim down the DOM manipulation and insertion.\n */\n // Replace all children with just the one <symbol> element and <use> element\n svgElem.replaceChildren(symbolNode, useNode);\n\n return svgElem;\n };\n</script>\n\n<!-- Use inline svg so that requests to pull the spritesheet are done via JS and avoid\n browser restrictions for different domains for svgs. inline svg also caches the requests\n so we don't load the spritesheet multiple times\n Reference: https://oreillymedia.github.io/Using_SVG/extras/ch10-cors.html -->\n<template>\n <InlineSvg\n :id=\"props.id\"\n role=\"presentation\"\n :aria-labelledby=\"props.id\"\n class=\"stash-icon\"\n :class=\"[\n classes.icon,\n `icon--${props.name}`,\n {\n [classes.standard]: props.size === 'standard',\n [classes.dense]: props.size === 'dense' || props.dense,\n [classes.small]: props.size === 'small' || props.small,\n [classes.large]: props.size === 'large',\n },\n ]\"\n data-test=\"stash-icon\"\n :src=\"`${computedStaticPath}/spritesheet.svg`\"\n :title=\"props.title\"\n :transform-source=\"transformSvgSource\"\n />\n</template>\n\n<style module>\n .icon {\n display: inline-block;\n fill: currentcolor;\n vertical-align: middle;\n }\n\n .standard {\n height: 24px;\n min-height: 24px;\n min-width: 24px;\n width: 24px;\n }\n\n .dense {\n height: 20px;\n min-height: 20px;\n min-width: 20px;\n width: 20px;\n }\n\n .small {\n height: 14px;\n min-height: 14px;\n min-width: 14px;\n width: 14px;\n }\n\n .large {\n height: 32px;\n min-height: 32px;\n min-width: 32px;\n width: 32px;\n }\n</style>\n"],"names":["iconNames","IconSizes","classes","useCssModule","stashOptions","inject","computedName","computed","props","computedStaticPath","transformSvgSource","svgElem","useNode","symbolNode"],"mappings":";;;;;AAAO,MAAMA,IAAY;AAAA,EACvB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAIY,IAAAC,sBAAAA,OACVA,EAAA,WAAW,YACXA,EAAA,QAAQ,SACRA,EAAA,QAAQ,SACRA,EAAA,QAAQ,SAJEA,IAAAA,KAAA,CAAA,CAAA;;;;;;;;;;;;;;iBC9HJC,IAAUC,KACVC,IAAeC,EAAmC,gBAAgB;AAAA,MACtE,YAAY;AAAA,IAAA,CACb,GAEKC,IAAeC,EAAmB,MAClCP,EAAU,SAASQ,EAAM,IAAI,IACxBA,EAAM,OAGR,SACR,GAEKC,IAAqBF,EAAS,MAC3BC,EAAM,eAAcJ,KAAA,gBAAAA,EAAc,WAC1C,GAKKM,IAAqB,CAACC,MAAwB;AAClD,UAAI,CAACA;AACI,eAAAA;AAGH,YAAAC,IAAU,SAAS,cAAc,KAAK;AAC5C,MAAAA,EAAQ,aAAa,QAAQ,IAAIN,EAAa,KAAK,EAAE;AAGrD,YAAMO,IAAaF,EAAQ,cAAc,IAAIL,EAAa,KAAK,EAAE;AAGjE,aAAKO,KAaGF,EAAA,gBAAgBE,GAAYD,CAAO,GAEpCD,MAbGA,EAAA,aAAaC,GAASD,EAAQ,UAAU,GACzCA;AAAA,IAYF;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/Icon.vue.d.ts
CHANGED
|
@@ -28,12 +28,12 @@ declare type __VLS_WithDefaults<P, D> = {
|
|
|
28
28
|
};
|
|
29
29
|
|
|
30
30
|
declare const _default: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<IconProps>, {
|
|
31
|
-
id: string;
|
|
31
|
+
id: () => string;
|
|
32
32
|
size: string;
|
|
33
33
|
title: string;
|
|
34
34
|
staticPath: string;
|
|
35
35
|
}>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<IconProps>, {
|
|
36
|
-
id: string;
|
|
36
|
+
id: () => string;
|
|
37
37
|
size: string;
|
|
38
38
|
title: string;
|
|
39
39
|
staticPath: string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
const s = "_icon_1x7lf_2", l = "_standard_1x7lf_8", n = "_dense_1x7lf_15", _ = "_small_1x7lf_22", a = "_large_1x7lf_29", e = {
|
|
2
|
+
icon: s,
|
|
3
|
+
standard: l,
|
|
4
|
+
dense: n,
|
|
5
|
+
small: _,
|
|
6
|
+
large: a
|
|
7
|
+
};
|
|
8
|
+
export {
|
|
9
|
+
e as s
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=Icon.vue_used_vue_type_style_index_0_lang.module-eb359559.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Icon.vue_used_vue_type_style_index_0_lang.module-eb359559.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
|
package/dist/IconLabel.js
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { defineComponent as a, computed as o, openBlock as c, createBlock as i, resolveDynamicComponent as u, mergeProps as f, withCtx as d, createVNode as m, normalizeClass as r, createElementVNode as p, renderSlot as _ } from "vue";
|
|
2
2
|
import v from "./Icon.js";
|
|
3
3
|
import { _ as h } from "./_plugin-vue_export-helper-dad06003.js";
|
|
4
|
-
import "
|
|
5
|
-
import "./uniqueId-847efe53.js";
|
|
6
|
-
import "./toString-7d5bf363.js";
|
|
7
|
-
import "./isObjectLike-54341556.js";
|
|
4
|
+
import "lodash-es/uniqueId";
|
|
8
5
|
import "./index-79ce320f.js";
|
|
6
|
+
import "./Icon.vue_used_vue_type_style_index_0_lang.module-eb359559.js";
|
|
9
7
|
const k = {
|
|
10
8
|
name: "ll-icon-label"
|
|
11
9
|
}, y = /* @__PURE__ */ a({
|
|
@@ -50,8 +48,8 @@ const k = {
|
|
|
50
48
|
icon: w
|
|
51
49
|
}, B = {
|
|
52
50
|
$style: x
|
|
53
|
-
},
|
|
51
|
+
}, N = /* @__PURE__ */ h(y, [["__cssModules", B]]);
|
|
54
52
|
export {
|
|
55
|
-
|
|
53
|
+
N as default
|
|
56
54
|
};
|
|
57
55
|
//# 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 lang=\"ts\">\n export default {\n name: 'll-icon-label',\n };\n</script>\n\n<script setup lang=\"ts\">\n import { computed } from 'vue';\n\n import { StashColor } 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. All design system colors are supported.\n */\n color?: StashColor;\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 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":"
|
|
1
|
+
{"version":3,"file":"IconLabel.js","sources":["../src/components/IconLabel/IconLabel.vue"],"sourcesContent":["<script lang=\"ts\">\n export default {\n name: 'll-icon-label',\n };\n</script>\n\n<script setup lang=\"ts\">\n import { computed } from 'vue';\n\n import { StashColor } 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. All design system colors are supported.\n */\n color?: StashColor;\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 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":";;;;;;AACE,UAAe;AAAA,EACb,MAAM;AACR;;;;;;;;;;;iBAkDMA,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/Illustration.js
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import { defineComponent as h, useCssModule as y, inject as f, computed as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as h, useCssModule as y, inject as f, computed as s, openBlock as g, createBlock as k, unref as c, normalizeClass as v } from "vue";
|
|
2
|
+
import C from "lodash-es/uniqueId";
|
|
3
3
|
import { I as b } from "./index-79ce320f.js";
|
|
4
4
|
import { _ as w } from "./_plugin-vue_export-helper-dad06003.js";
|
|
5
|
-
import "./toString-7d5bf363.js";
|
|
6
|
-
import "./isObjectLike-54341556.js";
|
|
7
5
|
var l = /* @__PURE__ */ ((i) => (i.Approved = "approved", i.Avatar = "avatar", i.Barcode = "barcode", i.Calendar = "calendar", i.Cartridge = "cartridge", i.Celebrate = "celebrate", i.ChatBubble = "chat-bubble", i.CheckBox = "check-box", i.CheckCircle = "check-circle", i.Click = "click", i.Cocktail = "cocktail", i.Confirmation = "confirmation", i.Connnect = "connnect", i.Cookie = "cookie", i.CreditCard = "credit-card", i.Crm = "crm", i.Cultivation = "cultivation", i.Data = "data", i.DeliveryCompleted = "delivery-completed", i.Delivery = "delivery", i.DigitalPayments = "digital-payments", i.Discover = "discover", i.Diversity = "diversity", i.Drink = "drink", i.Dolly = "dolly", i.EasyReconciliations = "easy-reconciliations", i.Efficiency = "efficiency", i.Error = "error", i.FinancialGrowth = "financial-growth", i.FinancialInstitution = "financial-institution", i.Focus = "focus", i.FulfillmentIssues = "fulfillment-issues", i.Growth = "growth", i.Handshake = "handshake", i.Hierarchy = "hierarchy", i.Home = "home", i.Laptop = "laptop", i.Licenses = "licenses", i.LightBulb = "light-bulb", i.LightbulbError = "lightbulb-error", i.LineChart = "line-chart", i.Link = "link", i.LocationPin = "location-pin", i.Lock = "lock", i.Messaging = "messaging", i.Microchip = "microchip", i.MissingData = "missing-data", i.MoneyTransfer = "money-transfer", i.Money = "money", i.NoInventoryAccess = "no-inventory-access", i.NoInventory = "no-inventory", i.NoPromote = "no-promote", i.PackageReceived = "package-received", i.Package = "package", i.PaymentProcessing = "payment-processing", i.Phone = "phone", i.PieChart = "pie-chart", i.ProductCycle = "product-cycle", i.Puzzle = "puzzle", i.Receipt = "receipt", i.Retail = "retail", i.SearchingDocument = "searching-document", i.ShoppingBasket = "shopping-basket", i.Shopping = "shopping", i.Sign = "sign", i.Smile = "smile", i.Speed = "speed", i.Time = "time", i.Tools = "tools", i.Truck = "truck", i.User = "user", i.Warehouse = "warehouse", i.Warning = "warning", i.XCircle = "x-circle", i))(l || {});
|
|
8
6
|
const P = Object.values(l);
|
|
9
7
|
var o = /* @__PURE__ */ ((i) => (i.Bank = "bank", i.SearchStorefront = "search-storefront", i.Todo = "todo", i.Warehouse = "warehouse", i))(o || {});
|
|
@@ -33,13 +31,13 @@ const D = /* @__PURE__ */ h({
|
|
|
33
31
|
);
|
|
34
32
|
const u = y(), n = f("stashOptions", {
|
|
35
33
|
staticPath: "/static"
|
|
36
|
-
}),
|
|
34
|
+
}), t = s(() => e.type === r.Spot), a = s(() => t.value ? "0" : !1), d = s(() => e.staticPath || (n == null ? void 0 : n.staticPath));
|
|
37
35
|
return (B, L) => (g(), k(c(b), {
|
|
38
36
|
id: e.id,
|
|
39
37
|
class: v([
|
|
40
38
|
c(u).illustration,
|
|
41
39
|
{
|
|
42
|
-
[`tw-text-${e.fillColor}-400 tw-stroke-${e.strokeColor}`]:
|
|
40
|
+
[`tw-text-${e.fillColor}-400 tw-stroke-${e.strokeColor}`]: t.value
|
|
43
41
|
}
|
|
44
42
|
]),
|
|
45
43
|
title: e.title,
|
|
@@ -54,12 +52,12 @@ const D = /* @__PURE__ */ h({
|
|
|
54
52
|
illustration: I
|
|
55
53
|
}, z = {
|
|
56
54
|
$style: x
|
|
57
|
-
},
|
|
55
|
+
}, R = /* @__PURE__ */ w(D, [["__cssModules", z]]);
|
|
58
56
|
export {
|
|
59
57
|
r as IllustrationType,
|
|
60
58
|
l as SpotName,
|
|
61
59
|
o as VignetteName,
|
|
62
|
-
|
|
60
|
+
R as default,
|
|
63
61
|
P as spotNames,
|
|
64
62
|
_ as vignetteNames
|
|
65
63
|
};
|
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?: StashPrimaryColor;\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',\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":"
|
|
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?: StashPrimaryColor;\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',\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;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/Image.js
CHANGED
|
@@ -1,42 +1,32 @@
|
|
|
1
1
|
import { defineComponent as x, inject as D, computed as d, useAttrs as W, openBlock as L, createElementBlock as M, mergeProps as V } from "vue";
|
|
2
2
|
import { IMAGE_PROVIDER_URLS as N, CSS_VARS as b } from "./constants.js";
|
|
3
3
|
import { getCssVar as E } from "./utils/helpers.js";
|
|
4
|
-
import
|
|
5
|
-
import "
|
|
6
|
-
import "
|
|
7
|
-
import "
|
|
8
|
-
import "
|
|
9
|
-
import "./get-27d90892.js";
|
|
10
|
-
import "./_MapCache-65811284.js";
|
|
11
|
-
import "./isPlainObject-55c7f916.js";
|
|
12
|
-
import "./_getPrototype-3e6fccd6.js";
|
|
13
|
-
import "./_overArg-6d920d99.js";
|
|
14
|
-
import "./_Uint8Array-06e4d083.js";
|
|
15
|
-
import "./isArrayLike-09233e52.js";
|
|
16
|
-
import "./_baseAssignValue-dd1499b4.js";
|
|
17
|
-
import "./identity-452d03fd.js";
|
|
18
|
-
import "./_initCloneObject-161353b9.js";
|
|
4
|
+
import B from "lodash-es/merge";
|
|
5
|
+
import "lodash-es/camelCase";
|
|
6
|
+
import "lodash-es/get";
|
|
7
|
+
import "lodash-es/isFinite";
|
|
8
|
+
import "lodash-es/isPlainObject";
|
|
19
9
|
function P(e) {
|
|
20
10
|
return (t) => e[t] || t;
|
|
21
11
|
}
|
|
22
12
|
function G({
|
|
23
13
|
formatter: e = (n, c) => `${n}=${c}`,
|
|
24
14
|
keyMap: t,
|
|
25
|
-
joinWith:
|
|
26
|
-
valueMap:
|
|
15
|
+
joinWith: f = "/",
|
|
16
|
+
valueMap: i = {}
|
|
27
17
|
} = {}) {
|
|
28
18
|
const n = typeof t == "function" ? t : P(t);
|
|
29
|
-
return Object.keys(
|
|
30
|
-
typeof
|
|
19
|
+
return Object.keys(i).forEach((c) => {
|
|
20
|
+
typeof i[c] != "function" && (i[c] = P(i[c]));
|
|
31
21
|
}), (c = {}) => Object.entries(c).map(([g, v]) => {
|
|
32
|
-
const
|
|
22
|
+
const m = i[g], S = n(g);
|
|
33
23
|
let h = v;
|
|
34
|
-
return typeof
|
|
35
|
-
}).join(
|
|
24
|
+
return typeof m == "function" && (h = m(c[g])), e(S, h);
|
|
25
|
+
}).join(f);
|
|
36
26
|
}
|
|
37
27
|
function k(e = "", t = []) {
|
|
38
|
-
const
|
|
39
|
-
return t.some((n) => n ===
|
|
28
|
+
const i = new URL(e).host;
|
|
29
|
+
return t.some((n) => n === i ? !0 : n.endsWith(`.${i}`));
|
|
40
30
|
}
|
|
41
31
|
const q = N.CLOUDINARY, F = (e) => e.startsWith("#") ? e.replace("#", "rgb_") : e, j = G({
|
|
42
32
|
keyMap: {
|
|
@@ -71,8 +61,8 @@ const q = N.CLOUDINARY, F = (e) => e.startsWith("#") ? e.replace("#", "rgb_") :
|
|
|
71
61
|
quality: "auto"
|
|
72
62
|
};
|
|
73
63
|
function H(e, t = {}) {
|
|
74
|
-
const
|
|
75
|
-
return `${q}/${
|
|
64
|
+
const f = B(Y, t), i = j(f);
|
|
65
|
+
return `${q}/${i}/${e}`;
|
|
76
66
|
}
|
|
77
67
|
const K = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
78
68
|
__proto__: null,
|
|
@@ -111,7 +101,7 @@ const J = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
111
101
|
}
|
|
112
102
|
};
|
|
113
103
|
var tt = /* @__PURE__ */ ((e) => (e.None = "none", e.Rounded = "rounded", e))(tt || {});
|
|
114
|
-
const
|
|
104
|
+
const ut = /* @__PURE__ */ x({
|
|
115
105
|
__name: "Image",
|
|
116
106
|
props: {
|
|
117
107
|
src: { default: "" },
|
|
@@ -121,15 +111,15 @@ const St = /* @__PURE__ */ x({
|
|
|
121
111
|
radius: { default: "none" }
|
|
122
112
|
},
|
|
123
113
|
setup(e) {
|
|
124
|
-
const t = e,
|
|
114
|
+
const t = e, f = {
|
|
125
115
|
CLOUDINARY: "cloudinary",
|
|
126
116
|
STATIC: "static"
|
|
127
|
-
},
|
|
117
|
+
}, i = {
|
|
128
118
|
md: E(b.SCREEN_MD),
|
|
129
119
|
lg: E(b.SCREEN_LG)
|
|
130
120
|
}, n = D("stashOptions"), c = d(() => {
|
|
131
|
-
const { src: r, ...
|
|
132
|
-
return
|
|
121
|
+
const { src: r, ...s } = W();
|
|
122
|
+
return s.sizes = T.value, s.srcset = U.value, s;
|
|
133
123
|
}), I = d(() => {
|
|
134
124
|
var r;
|
|
135
125
|
return ((r = n == null ? void 0 : n.images) == null ? void 0 : r.staticDomains) || [];
|
|
@@ -142,25 +132,25 @@ const St = /* @__PURE__ */ x({
|
|
|
142
132
|
return k(t.src, I.value);
|
|
143
133
|
}), v = d(() => {
|
|
144
134
|
var r;
|
|
145
|
-
return t.provider ? t.provider : (r = n == null ? void 0 : n.images) != null && r.provider && n.images.provider !==
|
|
146
|
-
}),
|
|
147
|
-
() =>
|
|
148
|
-
), T = d(() => t.sizes || !
|
|
135
|
+
return t.provider ? t.provider : (r = n == null ? void 0 : n.images) != null && r.provider && n.images.provider !== f.STATIC && !g.value ? n.images.provider : f.STATIC;
|
|
136
|
+
}), m = d(() => v.value === f.STATIC), S = d(() => Q[v.value]), h = d(
|
|
137
|
+
() => m.value ? _() : _({ width: w.medium.width })
|
|
138
|
+
), T = d(() => t.sizes || !m.value ? C() : void 0), U = d(() => t.sizes && !t.srcset && !m.value ? A() : t.srcset), y = d(() => t.sizes ? z(t.sizes) : m.value ? [] : z("lg:large"));
|
|
149
139
|
function _(r = {}) {
|
|
150
140
|
return S.value.getImageUrl(t.src, r);
|
|
151
141
|
}
|
|
152
142
|
function A() {
|
|
153
|
-
const r = Object.entries(w).reduce((
|
|
154
|
-
return Object.values(r).map((
|
|
155
|
-
const l =
|
|
156
|
-
return `${_({ width: l })} ${
|
|
143
|
+
const r = Object.entries(w).reduce((s, [l, a]) => ((!!y.value.find((o) => o.preset === l) || a.alwaysIncluded) && (s[l] = a), s), {});
|
|
144
|
+
return Object.values(r).map((s) => {
|
|
145
|
+
const l = s.width;
|
|
146
|
+
return `${_({ width: l })} ${s.width}w`;
|
|
157
147
|
}).join(", ");
|
|
158
148
|
}
|
|
159
149
|
function C() {
|
|
160
150
|
return y.value.map((r) => `${r.media ? r.media + " " : ""}${r.size}`).join(", ");
|
|
161
151
|
}
|
|
162
152
|
function z(r) {
|
|
163
|
-
const
|
|
153
|
+
const s = [], l = {
|
|
164
154
|
default: "100vw"
|
|
165
155
|
};
|
|
166
156
|
if (typeof r == "string") {
|
|
@@ -176,22 +166,22 @@ const St = /* @__PURE__ */ x({
|
|
|
176
166
|
} else
|
|
177
167
|
throw new Error("`sizes` needs to be a string");
|
|
178
168
|
for (const a in l) {
|
|
179
|
-
const u = parseInt(
|
|
180
|
-
let
|
|
181
|
-
const $ =
|
|
182
|
-
if (!$ && /^\d+$/.test(
|
|
169
|
+
const u = parseInt(i[a] || 0), o = l[a], R = w[o] ? o : void 0;
|
|
170
|
+
let p = String(R ? w[o].width : o);
|
|
171
|
+
const $ = p.endsWith("vw");
|
|
172
|
+
if (!$ && /^\d+$/.test(p) && (p = `${p}px`), !$ && !p.endsWith("px"))
|
|
183
173
|
continue;
|
|
184
174
|
const O = {
|
|
185
175
|
media: u ? `(min-width: ${u}px)` : "",
|
|
186
176
|
preset: R,
|
|
187
177
|
screenMinWidth: u,
|
|
188
|
-
size:
|
|
178
|
+
size: p
|
|
189
179
|
};
|
|
190
|
-
|
|
180
|
+
s.push(O);
|
|
191
181
|
}
|
|
192
|
-
return
|
|
182
|
+
return s.sort((a, u) => a.screenMinWidth > u.screenMinWidth ? -1 : 1), s;
|
|
193
183
|
}
|
|
194
|
-
return (r,
|
|
184
|
+
return (r, s) => (L(), M("img", V({
|
|
195
185
|
ref: "img",
|
|
196
186
|
key: h.value,
|
|
197
187
|
"data-test": "stash-image",
|
|
@@ -206,6 +196,6 @@ const St = /* @__PURE__ */ x({
|
|
|
206
196
|
export {
|
|
207
197
|
tt as ImageRadiuses,
|
|
208
198
|
w as PRESET_SIZES,
|
|
209
|
-
|
|
199
|
+
ut as default
|
|
210
200
|
};
|
|
211
201
|
//# sourceMappingURL=Image.js.map
|