@leaflink/stash 51.5.1 → 51.6.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 (60) hide show
  1. package/assets/icons/bank.svg +1 -0
  2. package/assets/icons/face-id.svg +1 -0
  3. package/assets/icons/face.svg +1 -0
  4. package/assets/icons/fingerprint.svg +3 -0
  5. package/assets/icons/reorder.svg +1 -0
  6. package/assets/illustrations/spot/check-circle.svg +1 -1
  7. package/assets/illustrations/spot/crm.svg +1 -1
  8. package/assets/illustrations/spot/delivery-completed.svg +1 -1
  9. package/assets/illustrations/spot/delivery.svg +1 -1
  10. package/assets/illustrations/spot/discover.svg +1 -1
  11. package/assets/illustrations/spot/money-transfer.svg +1 -1
  12. package/assets/illustrations/vignette/no-filters-result.svg +21 -0
  13. package/assets/spritesheet.svg +1 -1
  14. package/dist/Accordion.vue.d.ts +2 -2
  15. package/dist/AppNavigationItem.vue.d.ts +1 -1
  16. package/dist/Carousel.js +9 -9
  17. package/dist/Carousel.js.map +1 -1
  18. package/dist/DataViewToolbar.js +9 -9
  19. package/dist/DataViewToolbar.js.map +1 -1
  20. package/dist/EmptyState.js +1 -1
  21. package/dist/EmptyState.vue.d.ts +2 -1
  22. package/dist/HttpError.js +1 -1
  23. package/dist/Icon.js +15 -10
  24. package/dist/Icon.js.map +1 -1
  25. package/dist/Icon.vue.d.ts +1 -1
  26. package/dist/IconLabel.vue.d.ts +1 -1
  27. package/dist/Illustration.js +2 -2
  28. package/dist/Illustration.vue.d.ts +1 -0
  29. package/dist/{Illustration.vue_vue_type_script_setup_true_lang-DlY0OGCe.js → Illustration.vue_vue_type_script_setup_true_lang-BrqEF8xe.js} +2 -2
  30. package/dist/Illustration.vue_vue_type_script_setup_true_lang-BrqEF8xe.js.map +1 -0
  31. package/dist/ListView.vue.d.ts +18 -18
  32. package/dist/ObfuscateText.js +5 -5
  33. package/dist/ObfuscateText.js.map +1 -1
  34. package/dist/QuickAction.vue.d.ts +1 -1
  35. package/dist/SectionHeader.vue.d.ts +2 -2
  36. package/dist/SelectStatus.js +13 -13
  37. package/dist/SelectStatus.js.map +1 -1
  38. package/dist/SelectStatus.vue.d.ts +1 -1
  39. package/dist/Switch.js +8 -8
  40. package/dist/Switch.js.map +1 -1
  41. package/dist/Tab.js +5 -5
  42. package/dist/Tab.js.map +1 -1
  43. package/dist/TableCell.js +1 -1
  44. package/dist/TableHeaderCell.js +1 -1
  45. package/dist/TableHeaderRow.js +1 -1
  46. package/dist/TableRow.js +1 -1
  47. package/dist/TextEditor.vue.d.ts +1 -1
  48. package/dist/Toast.js +189 -184
  49. package/dist/Toast.js.map +1 -1
  50. package/dist/Toast.vue.d.ts +4 -0
  51. package/dist/Toasts.js +13 -12
  52. package/dist/Toasts.js.map +1 -1
  53. package/dist/Tooltip.js +8 -8
  54. package/dist/Tooltip.js.map +1 -1
  55. package/dist/components.css +1 -1
  56. package/dist/useToasts.d.ts +6 -0
  57. package/dist/useToasts.js +28 -23
  58. package/dist/useToasts.js.map +1 -1
  59. package/package.json +5 -4
  60. package/dist/Illustration.vue_vue_type_script_setup_true_lang-DlY0OGCe.js.map +0 -1
package/dist/useToasts.js CHANGED
@@ -1,34 +1,39 @@
1
- import p from "lodash-es/merge";
1
+ import l from "lodash-es/merge";
2
2
  import T from "lodash-es/uniqueId";
3
3
  import { ref as h, reactive as y, readonly as b } from "vue";
4
4
  const w = 5e3, n = h([]);
5
- function M(a = { timeout: w }) {
6
- function f(e) {
7
- const t = typeof e == "string" ? e : void 0, { group: i = void 0, status: r = void 0 } = typeof e == "object" ? e : {};
8
- if (!t && (!i || !r))
5
+ function M(s = { timeout: w }) {
6
+ function c(e) {
7
+ const o = typeof e == "string" ? e : void 0, { group: i = void 0, status: t = void 0 } = typeof e == "object" ? e : {};
8
+ if (!o && (!i || !t))
9
9
  throw new Error("Must provide either a toast ID or both group and type");
10
- const o = i && r ? `toast-${r}-${i}` : String(t), c = n.value.findIndex(({ id: l }) => l === o);
11
- c !== -1 && n.value.splice(c, 1);
10
+ const r = i && t ? `toast-${t}-${i}` : String(o), f = n.value.findIndex(({ id: g }) => g === r);
11
+ f !== -1 && n.value.splice(f, 1);
12
12
  }
13
- function u(e, t, i) {
14
- const r = p({}, a, i), o = r != null && r.group ? `toast-${t}-${r.group}` : T("toast-");
15
- if (!(r != null && r.group && n.value.some(({ id: c }) => c === o)))
16
- return n.value.push({ text: e, id: o, status: t }), typeof r.timeout == "number" && setTimeout(() => f(o), Math.abs(r.timeout)), o;
13
+ function u(e, o, i) {
14
+ const t = l({}, s, i), r = t != null && t.group ? `toast-${o}-${t.group}` : T("toast-");
15
+ if (!(t != null && t.group && n.value.some(({ id: f }) => f === r)))
16
+ return n.value.push({
17
+ text: e,
18
+ id: r,
19
+ status: o,
20
+ offsetTop: t.offsetTop
21
+ }), typeof t.timeout == "number" && setTimeout(() => c(r), Math.abs(t.timeout)), r;
17
22
  }
18
- function s() {
23
+ function a() {
19
24
  n.value = [];
20
25
  }
21
- function m(e, t) {
22
- return u(e, "error", t);
26
+ function m(e, o) {
27
+ return u(e, "error", o);
23
28
  }
24
- function v(e, t) {
25
- return u(e, "info", t);
29
+ function v(e, o) {
30
+ return u(e, "info", o);
26
31
  }
27
- function d(e, t) {
28
- return u(e, "success", t);
32
+ function d(e, o) {
33
+ return u(e, "success", o);
29
34
  }
30
- function g(e, t) {
31
- return u(e, "warning", t);
35
+ function p(e, o) {
36
+ return u(e, "warning", o);
32
37
  }
33
38
  return y({
34
39
  /**
@@ -38,7 +43,7 @@ function M(a = { timeout: w }) {
38
43
  /**
39
44
  * Removes an active/visible toast by id or by group and type.
40
45
  */
41
- remove: f,
46
+ remove: c,
42
47
  /**
43
48
  * Creates a new toast and makes it active/visible.
44
49
  */
@@ -46,7 +51,7 @@ function M(a = { timeout: w }) {
46
51
  /**
47
52
  * Removes all active/visible toasts.
48
53
  */
49
- removeAll: s,
54
+ removeAll: a,
50
55
  /**
51
56
  * Creates a new "error" toast.
52
57
  */
@@ -62,7 +67,7 @@ function M(a = { timeout: w }) {
62
67
  /**
63
68
  * Creates a new "warning" toast.
64
69
  */
65
- warning: g
70
+ warning: p
66
71
  });
67
72
  }
68
73
  export {
@@ -1 +1 @@
1
- {"version":3,"file":"useToasts.js","sources":["../src/composables/useToasts/useToasts.ts"],"sourcesContent":["import merge from 'lodash-es/merge';\nimport uniqueId from 'lodash-es/uniqueId';\nimport { reactive, readonly, ref, RenderFunction } from 'vue';\n\nimport { StatusSeverity } from '../../../types/statusLevels';\n\nexport const DEFAULT_TIMEOUT = 5000;\n\nexport type Toast = {\n id: string;\n text: string | RenderFunction;\n status: StatusSeverity;\n};\n\nexport interface ToastOptions {\n /**\n * The timeout in milliseconds before the toast is automatically dismissed. If set to `false`, the toast will persist until the user clicks on it.\n * @default DEFAULT_TIMEOUT\n */\n timeout?: number | boolean;\n /**\n * A group name ensures only one toast with the same group and status is visible at any given time.\n * Toasts with the same group but different statuses will be treated as separate and will display concurrently.\n */\n group?: string;\n}\n\ntype ToastIdOrUndefined<O extends ToastOptions | undefined> = O extends { id: string }\n ? Toast['id'] | undefined\n : Toast['id'];\n\nconst active = ref<Toast[]>([]);\n\nexport default function useToasts(globalOptions: Omit<ToastOptions, 'group'> = { timeout: DEFAULT_TIMEOUT }) {\n // method overloads\n function remove(toastId: Toast['id']): void;\n function remove(options: { group: string; status: StatusSeverity }): void;\n function remove(toastIdOrOptions: Toast['id'] | { group: string; status: StatusSeverity }) {\n const toastId = typeof toastIdOrOptions === 'string' ? toastIdOrOptions : undefined;\n const { group = undefined, status = undefined } = typeof toastIdOrOptions === 'object' ? toastIdOrOptions : {};\n\n if (!toastId && (!group || !status)) {\n throw new Error('Must provide either a toast ID or both group and type');\n }\n\n const idToRemove = group && status ? `toast-${status}-${group}` : String(toastId);\n const index = active.value.findIndex(({ id }) => id === idToRemove);\n if (index === -1) {\n return;\n }\n\n active.value.splice(index, 1);\n }\n\n // method overloads\n function create(text: Toast['text'], status: StatusSeverity, options?: Omit<ToastOptions, 'group'>): Toast['id'];\n function create(\n text: Toast['text'],\n status: StatusSeverity,\n options: ToastOptions & { id: string },\n ): Toast['id'] | undefined;\n function create(text: Toast['text'], status: StatusSeverity, localOptions?: ToastOptions): Toast['id'] | undefined {\n const options = merge({}, globalOptions, localOptions);\n\n const id = options?.group ? `toast-${status}-${options.group}` : uniqueId('toast-');\n if (options?.group && active.value.some(({ id: existingId }) => existingId === id)) {\n return;\n }\n\n active.value.push({ text, id, status });\n\n if (typeof options.timeout === 'number') {\n setTimeout(() => remove(id), Math.abs(options.timeout));\n }\n\n return id;\n }\n\n function removeAll() {\n active.value = [];\n }\n\n function error<O extends ToastOptions>(text: Toast['text'], options?: O): ToastIdOrUndefined<O> {\n return create(text, 'error', options);\n }\n\n function info<O extends ToastOptions>(text: Toast['text'], options?: O): ToastIdOrUndefined<O> {\n return create(text, 'info', options);\n }\n\n function success<O extends ToastOptions>(text: Toast['text'], options?: O): ToastIdOrUndefined<O> {\n return create(text, 'success', options);\n }\n\n function warning<O extends ToastOptions>(text: Toast['text'], options?: O): ToastIdOrUndefined<O> {\n return create(text, 'warning', options);\n }\n\n return reactive({\n /**\n * The list of toasts that are currently visible.\n */\n active: readonly(active),\n\n /**\n * Removes an active/visible toast by id or by group and type.\n */\n remove,\n\n /**\n * Creates a new toast and makes it active/visible.\n */\n create,\n\n /**\n * Removes all active/visible toasts.\n */\n removeAll,\n\n /**\n * Creates a new \"error\" toast.\n */\n error,\n\n /**\n * Creates a new \"info\" toast.\n */\n info,\n\n /**\n * Creates a new \"success\" toast.\n */\n success,\n\n /**\n * Creates a new \"warning\" toast.\n */\n warning,\n });\n}\n"],"names":["DEFAULT_TIMEOUT","active","ref","useToasts","globalOptions","remove","toastIdOrOptions","toastId","group","status","idToRemove","index","id","create","text","localOptions","options","merge","uniqueId","existingId","removeAll","error","info","success","warning","reactive","readonly"],"mappings":";;;AAMO,MAAMA,IAAkB,KAyBzBC,IAASC,EAAa,EAAE;AAE9B,SAAwBC,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AAA;AAG5B,WAAAO,EAAgCT,GAAqBE,GAAoC;AACzF,WAAAH,EAAOC,GAAM,WAAWE,CAAO;AAAA,EAAA;AAG/B,WAAAQ,EAAgCV,GAAqBE,GAAoC;AACzF,WAAAH,EAAOC,GAAM,WAAWE,CAAO;AAAA,EAAA;AAGxC,SAAOS,EAAS;AAAA;AAAA;AAAA;AAAA,IAId,QAAQC,EAASzB,CAAM;AAAA;AAAA;AAAA;AAAA,IAKvB,QAAAI;AAAA;AAAA;AAAA;AAAA,IAKA,QAAAQ;AAAA;AAAA;AAAA;AAAA,IAKA,WAAAO;AAAA;AAAA;AAAA;AAAA,IAKA,OAAAC;AAAA;AAAA;AAAA;AAAA,IAKA,MAAAC;AAAA;AAAA;AAAA;AAAA,IAKA,SAAAC;AAAA;AAAA;AAAA;AAAA,IAKA,SAAAC;AAAA,EAAA,CACD;AACH;"}
1
+ {"version":3,"file":"useToasts.js","sources":["../src/composables/useToasts/useToasts.ts"],"sourcesContent":["import merge from 'lodash-es/merge';\nimport uniqueId from 'lodash-es/uniqueId';\nimport { reactive, readonly, ref, RenderFunction } from 'vue';\n\nimport { StatusSeverity } from '../../../types/statusLevels';\n\nexport const DEFAULT_TIMEOUT = 5000;\n\nexport type Toast = {\n id: string;\n text: string | RenderFunction;\n status: StatusSeverity;\n offsetTop?: string;\n};\n\nexport interface ToastOptions {\n /**\n * The timeout in milliseconds before the toast is automatically dismissed. If set to `false`, the toast will persist until the user clicks on it.\n * @default DEFAULT_TIMEOUT\n */\n timeout?: number | boolean;\n /**\n * A group name ensures only one toast with the same group and status is visible at any given time.\n * Toasts with the same group but different statuses will be treated as separate and will display concurrently.\n */\n group?: string;\n /**\n * The container distance from the top of the viewport.\n */\n offsetTop?: string;\n}\n\ntype ToastIdOrUndefined<O extends ToastOptions | undefined> = O extends { id: string }\n ? Toast['id'] | undefined\n : Toast['id'];\n\nconst active = ref<Toast[]>([]);\n\nexport default function useToasts(globalOptions: Omit<ToastOptions, 'group'> = { timeout: DEFAULT_TIMEOUT }) {\n // method overloads\n function remove(toastId: Toast['id']): void;\n function remove(options: { group: string; status: StatusSeverity }): void;\n function remove(toastIdOrOptions: Toast['id'] | { group: string; status: StatusSeverity }) {\n const toastId = typeof toastIdOrOptions === 'string' ? toastIdOrOptions : undefined;\n const { group = undefined, status = undefined } = typeof toastIdOrOptions === 'object' ? toastIdOrOptions : {};\n\n if (!toastId && (!group || !status)) {\n throw new Error('Must provide either a toast ID or both group and type');\n }\n\n const idToRemove = group && status ? `toast-${status}-${group}` : String(toastId);\n const index = active.value.findIndex(({ id }) => id === idToRemove);\n if (index === -1) {\n return;\n }\n\n active.value.splice(index, 1);\n }\n\n // method overloads\n function create(text: Toast['text'], status: StatusSeverity, options?: Omit<ToastOptions, 'group'>): Toast['id'];\n function create(\n text: Toast['text'],\n status: StatusSeverity,\n options: ToastOptions & { id: string },\n ): Toast['id'] | undefined;\n function create(text: Toast['text'], status: StatusSeverity, localOptions?: ToastOptions): Toast['id'] | undefined {\n const options = merge({}, globalOptions, localOptions);\n\n const id = options?.group ? `toast-${status}-${options.group}` : uniqueId('toast-');\n if (options?.group && active.value.some(({ id: existingId }) => existingId === id)) {\n return;\n }\n\n active.value.push({\n text,\n id,\n status,\n offsetTop: options.offsetTop,\n });\n\n if (typeof options.timeout === 'number') {\n setTimeout(() => remove(id), Math.abs(options.timeout));\n }\n\n return id;\n }\n\n function removeAll() {\n active.value = [];\n }\n\n function error<O extends ToastOptions>(text: Toast['text'], options?: O): ToastIdOrUndefined<O> {\n return create(text, 'error', options);\n }\n\n function info<O extends ToastOptions>(text: Toast['text'], options?: O): ToastIdOrUndefined<O> {\n return create(text, 'info', options);\n }\n\n function success<O extends ToastOptions>(text: Toast['text'], options?: O): ToastIdOrUndefined<O> {\n return create(text, 'success', options);\n }\n\n function warning<O extends ToastOptions>(text: Toast['text'], options?: O): ToastIdOrUndefined<O> {\n return create(text, 'warning', options);\n }\n\n return reactive({\n /**\n * The list of toasts that are currently visible.\n */\n active: readonly(active),\n\n /**\n * Removes an active/visible toast by id or by group and type.\n */\n remove,\n\n /**\n * Creates a new toast and makes it active/visible.\n */\n create,\n\n /**\n * Removes all active/visible toasts.\n */\n removeAll,\n\n /**\n * Creates a new \"error\" toast.\n */\n error,\n\n /**\n * Creates a new \"info\" toast.\n */\n info,\n\n /**\n * Creates a new \"success\" toast.\n */\n success,\n\n /**\n * Creates a new \"warning\" toast.\n */\n warning,\n });\n}\n"],"names":["DEFAULT_TIMEOUT","active","ref","useToasts","globalOptions","remove","toastIdOrOptions","toastId","group","status","idToRemove","index","id","create","text","localOptions","options","merge","uniqueId","existingId","removeAll","error","info","success","warning","reactive","readonly"],"mappings":";;;AAMO,MAAMA,IAAkB,KA8BzBC,IAASC,EAAa,EAAE;AAE9B,SAAwBC,EAAUC,IAA6C,EAAE,SAASJ,KAAmB;AAI3G,WAASK,EAAOC,GAA2E;AACzF,UAAMC,IAAU,OAAOD,KAAqB,WAAWA,IAAmB,QACpE,EAAE,OAAAE,IAAQ,QAAW,QAAAC,IAAS,WAAc,OAAOH,KAAqB,WAAWA,IAAmB,CAAC;AAE7G,QAAI,CAACC,MAAY,CAACC,KAAS,CAACC;AACpB,YAAA,IAAI,MAAM,uDAAuD;AAGnE,UAAAC,IAAaF,KAASC,IAAS,SAASA,CAAM,IAAID,CAAK,KAAK,OAAOD,CAAO,GAC1EI,IAAQV,EAAO,MAAM,UAAU,CAAC,EAAE,IAAAW,EAAA,MAASA,MAAOF,CAAU;AAClE,IAAIC,MAAU,MAIPV,EAAA,MAAM,OAAOU,GAAO,CAAC;AAAA,EAAA;AAUrB,WAAAE,EAAOC,GAAqBL,GAAwBM,GAAsD;AACjH,UAAMC,IAAUC,EAAM,IAAIb,GAAeW,CAAY,GAE/CH,IAAKI,KAAA,QAAAA,EAAS,QAAQ,SAASP,CAAM,IAAIO,EAAQ,KAAK,KAAKE,EAAS,QAAQ;AAClF,QAAI,EAAAF,KAAA,QAAAA,EAAS,SAASf,EAAO,MAAM,KAAK,CAAC,EAAE,IAAIkB,EAAW,MAAMA,MAAeP,CAAE;AAIjF,aAAAX,EAAO,MAAM,KAAK;AAAA,QAChB,MAAAa;AAAA,QACA,IAAAF;AAAA,QACA,QAAAH;AAAA,QACA,WAAWO,EAAQ;AAAA,MAAA,CACpB,GAEG,OAAOA,EAAQ,WAAY,YAClB,WAAA,MAAMX,EAAOO,CAAE,GAAG,KAAK,IAAII,EAAQ,OAAO,CAAC,GAGjDJ;AAAA,EAAA;AAGT,WAASQ,IAAY;AACnB,IAAAnB,EAAO,QAAQ,CAAC;AAAA,EAAA;AAGT,WAAAoB,EAA8BP,GAAqBE,GAAoC;AACvF,WAAAH,EAAOC,GAAM,SAASE,CAAO;AAAA,EAAA;AAG7B,WAAAM,EAA6BR,GAAqBE,GAAoC;AACtF,WAAAH,EAAOC,GAAM,QAAQE,CAAO;AAAA,EAAA;AAG5B,WAAAO,EAAgCT,GAAqBE,GAAoC;AACzF,WAAAH,EAAOC,GAAM,WAAWE,CAAO;AAAA,EAAA;AAG/B,WAAAQ,EAAgCV,GAAqBE,GAAoC;AACzF,WAAAH,EAAOC,GAAM,WAAWE,CAAO;AAAA,EAAA;AAGxC,SAAOS,EAAS;AAAA;AAAA;AAAA;AAAA,IAId,QAAQC,EAASzB,CAAM;AAAA;AAAA;AAAA;AAAA,IAKvB,QAAAI;AAAA;AAAA;AAAA;AAAA,IAKA,QAAAQ;AAAA;AAAA;AAAA;AAAA,IAKA,WAAAO;AAAA;AAAA;AAAA;AAAA,IAKA,OAAAC;AAAA;AAAA;AAAA;AAAA,IAKA,MAAAC;AAAA;AAAA;AAAA;AAAA,IAKA,SAAAC;AAAA;AAAA;AAAA;AAAA,IAKA,SAAAC;AAAA,EAAA,CACD;AACH;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leaflink/stash",
3
- "version": "51.5.1",
3
+ "version": "51.6.0",
4
4
  "description": "LeafLink's design system.",
5
5
  "homepage": "https://stash.leaflink.com",
6
6
  "main": "./dist/index.ts",
@@ -118,7 +118,7 @@
118
118
  "@babel/core": "7.26.10",
119
119
  "@babel/preset-env": "7.26.9",
120
120
  "@babel/preset-typescript": "7.26.0",
121
- "@leaflink/eslint-config": "^4.1.0",
121
+ "@leaflink/eslint-config": "^4.1.4",
122
122
  "@rollup/pluginutils": "^5.1.1",
123
123
  "@testing-library/jest-dom": "^6.6.3",
124
124
  "@testing-library/user-event": "^14.5.2",
@@ -134,7 +134,8 @@
134
134
  "@vue/test-utils": "^2.4.6",
135
135
  "autoprefixer": "^10.4.20",
136
136
  "doctoc": "^2.2.1",
137
- "eslint": "^9.17.0",
137
+ "eslint": "^9.31.0",
138
+ "globals": "^16.3.0",
138
139
  "husky": "^9.1.6",
139
140
  "jsdom": "^25.0.1",
140
141
  "lint-staged": "^15.2.10",
@@ -146,7 +147,7 @@
146
147
  "quill": "^2.0.2",
147
148
  "rollup-plugin-copy": "^3.5.0",
148
149
  "stylelint": "^16.12.0",
149
- "stylelint-config-standard-scss": "^14.0.0",
150
+ "stylelint-config-standard-scss": "^15.0.1",
150
151
  "stylelint-config-standard-vue": "^1.0.0",
151
152
  "svg-sprite": "^2.0.4",
152
153
  "tailwindcss": "^3.4.13",
@@ -1 +0,0 @@
1
- {"version":3,"file":"Illustration.vue_vue_type_script_setup_true_lang-DlY0OGCe.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 ExtendDate = 'extend-date',\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 Messages = 'messages',\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 Api = 'api',\n Bank = 'bank',\n Basket = 'basket',\n BrandMenu = 'brand-menu',\n Calendar = 'calendar',\n Dashboard = 'dashboard',\n Deals = 'deals',\n DocumentSearch = 'document-search',\n Edit = 'edit',\n EmptyTray = 'empty-tray',\n Graph = 'graph',\n Integrations = 'integrations',\n LightBulb = 'light-bulb',\n Map = 'map',\n Megaphone = 'megaphone',\n Messages = 'messages',\n MoneyBank = 'money-bank',\n Notifications = 'notifications',\n OrdersEmpty = 'orders-empty',\n Payments = 'payments',\n PieChart = 'pie-chart',\n ProductCards = 'product-cards',\n ProductDetails = 'product-details',\n ProductDisplay = 'product-display',\n Search = 'search',\n SearchStorefront = 'search-storefront',\n Store = 'store',\n Todo = 'todo',\n Truck = 'truck',\n Users = 'users',\n Warehouse = 'warehouse',\n WarehouseDelivery = 'warehouse-delivery',\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","__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,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,aAAa,eACbA,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,WAAW,YACXA,EAAA,YAAY,aACZA,EAAA,cAAc,gBACdA,EAAA,gBAAgB,kBAChBA,EAAA,QAAQ,SACRA,EAAA,oBAAoB,uBACpBA,EAAA,cAAc,gBACdA,EA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