@leaflink/stash 46.1.0 → 46.3.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.
Files changed (45) hide show
  1. package/assets/illustrations/spot/digital-payments.svg +8 -13
  2. package/assets/illustrations/vignette/api.svg +1 -0
  3. package/assets/illustrations/vignette/bank.svg +1 -21
  4. package/assets/illustrations/vignette/basket.svg +1 -0
  5. package/assets/illustrations/vignette/brand-menu.svg +1 -0
  6. package/assets/illustrations/vignette/calendar.svg +1 -0
  7. package/assets/illustrations/vignette/dashboard.svg +1 -0
  8. package/assets/illustrations/vignette/deals.svg +1 -0
  9. package/assets/illustrations/vignette/document-search.svg +1 -0
  10. package/assets/illustrations/vignette/edit.svg +1 -0
  11. package/assets/illustrations/vignette/empty-tray.svg +1 -0
  12. package/assets/illustrations/vignette/graph.svg +1 -0
  13. package/assets/illustrations/vignette/integrations.svg +1 -0
  14. package/assets/illustrations/vignette/light-bulb.svg +1 -0
  15. package/assets/illustrations/vignette/map.svg +1 -0
  16. package/assets/illustrations/vignette/megaphone.svg +1 -0
  17. package/assets/illustrations/vignette/messages.svg +1 -0
  18. package/assets/illustrations/vignette/money-bank.svg +1 -0
  19. package/assets/illustrations/vignette/notifications.svg +1 -0
  20. package/assets/illustrations/vignette/orders-empty.svg +1 -0
  21. package/assets/illustrations/vignette/payments.svg +1 -0
  22. package/assets/illustrations/vignette/pie-chart.svg +1 -0
  23. package/assets/illustrations/vignette/products.svg +1 -71
  24. package/assets/illustrations/vignette/search-storefront.svg +1 -1
  25. package/assets/illustrations/vignette/search.svg +1 -0
  26. package/assets/illustrations/vignette/store.svg +1 -0
  27. package/assets/illustrations/vignette/todo.svg +1 -1
  28. package/assets/illustrations/vignette/truck.svg +1 -0
  29. package/assets/illustrations/vignette/users.svg +1 -0
  30. package/assets/illustrations/vignette/warehouse-delivery.svg +1 -0
  31. package/assets/illustrations/vignette/warehouse.svg +1 -38
  32. package/dist/HttpError.js +1 -1
  33. package/dist/Illustration.js +2 -2
  34. package/dist/Illustration.vue.d.ts +27 -1
  35. package/dist/Illustration.vue_vue_type_script_setup_true_lang-664fa82f.js +56 -0
  36. package/dist/Illustration.vue_vue_type_script_setup_true_lang-664fa82f.js.map +1 -0
  37. package/dist/Module.js +10 -10
  38. package/dist/Module.js.map +1 -1
  39. package/dist/Module.vue.d.ts +2 -2
  40. package/dist/ModuleHeader.js +51 -48
  41. package/dist/ModuleHeader.js.map +1 -1
  42. package/dist/ModuleHeader.vue.d.ts +1 -0
  43. package/package.json +1 -1
  44. package/dist/Illustration.vue_vue_type_script_setup_true_lang-d6a94e17.js +0 -56
  45. package/dist/Illustration.vue_vue_type_script_setup_true_lang-d6a94e17.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leaflink/stash",
3
- "version": "46.1.0",
3
+ "version": "46.3.0",
4
4
  "description": "LeafLink's design system.",
5
5
  "homepage": "https://stash.leaflink.com",
6
6
  "main": "./dist/index.ts",
@@ -1,56 +0,0 @@
1
- import { defineComponent as u, inject as d, computed as t, openBlock as h, createBlock as g, unref as y, normalizeClass as k } from "vue";
2
- import f from "lodash-es/uniqueId";
3
- import { I as v } from "./index-79ce320f.js";
4
- var c = /* @__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))(c || {});
5
- const C = Object.values(c);
6
- var l = /* @__PURE__ */ ((i) => (i.Bank = "bank", i.SearchStorefront = "search-storefront", i.Todo = "todo", i.Warehouse = "warehouse", i))(l || {});
7
- const b = Object.values(l);
8
- var r = /* @__PURE__ */ ((i) => (i.Spot = "spot", i.Vignette = "vignette", i.Scene = "scene", i))(r || {});
9
- const B = /* @__PURE__ */ u({
10
- __name: "Illustration",
11
- props: {
12
- id: { default: f("ll-illustration-") },
13
- name: {},
14
- title: { default: "" },
15
- size: { default: 48 },
16
- type: { default: r.Spot },
17
- fillColor: { default: "blue" },
18
- strokeColor: { default: "purple-500" },
19
- staticPath: { default: "" }
20
- },
21
- setup(i) {
22
- const e = i;
23
- if (e.type === r.Scene)
24
- throw new Error(
25
- "Scene illustration types are not supported. Illustrations will need to be uploaded under ./assets/illustrations/scene. Illustrations to be provided by design."
26
- );
27
- if (e.type === r.Spot && !C.includes(e.name) || e.type === r.Vignette && !b.includes(e.name))
28
- throw new Error(
29
- `${e.type} illustration name ${e.name} not found. Did you check that you are using the correct type for your illustration?`
30
- );
31
- const n = d("stashOptions", {
32
- staticPath: "/static"
33
- }), s = t(() => e.type === r.Spot), o = t(() => s.value ? "0" : !1), a = t(() => e.staticPath || (n == null ? void 0 : n.staticPath));
34
- return (w, P) => (h(), g(y(v), {
35
- id: e.id,
36
- class: k(["tw-inline-block tw-align-middle", {
37
- [`tw-text-${e.fillColor}-400 tw-stroke-${e.strokeColor}`]: s.value
38
- }]),
39
- title: e.title,
40
- height: e.size,
41
- width: e.size,
42
- "stroke-width": o.value,
43
- fill: "none",
44
- src: `${a.value}/illustrations/${e.type}/${e.name}.svg`
45
- }, null, 8, ["id", "class", "title", "height", "width", "stroke-width", "src"]));
46
- }
47
- });
48
- export {
49
- r as I,
50
- c as S,
51
- l as V,
52
- B as _,
53
- C as s,
54
- b as v
55
- };
56
- //# sourceMappingURL=Illustration.vue_vue_type_script_setup_true_lang-d6a94e17.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Illustration.vue_vue_type_script_setup_true_lang-d6a94e17.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 } 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 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=\"tw-inline-block tw-align-middle\"\n :class=\"{\n [`tw-text-${props.fillColor}-400 tw-stroke-${props.strokeColor}`]: isSpotIllustration,\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"],"names":["SpotName","spotNames","VignetteName","vignetteNames","IllustrationType","props","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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