@leaflink/stash 51.1.1 → 51.2.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.
@@ -1,4 +1,4 @@
1
- import { defineComponent as p, useCssModule as f, useSlots as _, createElementBlock as o, openBlock as s, createBlock as g, createCommentVNode as n, createElementVNode as u, renderSlot as a, toDisplayString as i, normalizeClass as m, unref as r, createTextVNode as y } from "vue";
1
+ import { defineComponent as f, useCssModule as p, useSlots as g, createElementBlock as o, openBlock as s, createBlock as _, createCommentVNode as i, createElementVNode as u, renderSlot as a, toDisplayString as n, normalizeClass as m, unref as r, createTextVNode as y } from "vue";
2
2
  import { t as w } from "./locale.js";
3
3
  import { _ as b } from "./Illustration.vue_vue_type_script_setup_true_lang-BBqgoJO8.js";
4
4
  import { _ as h } from "./_plugin-vue_export-helper-CHgC5LLL.js";
@@ -6,10 +6,10 @@ const x = {
6
6
  key: "empty",
7
7
  class: "stash-empty-state",
8
8
  "data-test": "stash-empty-state"
9
- }, k = {
9
+ }, v = {
10
10
  key: 0,
11
11
  class: "tw-flex tw-flex-col tw-items-center tw-text-center md:tw-flex-row md:tw-text-left"
12
- }, v = { class: "tw-mb-1.5" }, $ = ["alt", "src"], S = /* @__PURE__ */ p({
12
+ }, k = { class: "tw-mb-1.5" }, S = ["alt", "src"], $ = /* @__PURE__ */ f({
13
13
  name: "ll-empty-state",
14
14
  __name: "EmptyState",
15
15
  props: {
@@ -21,36 +21,37 @@ const x = {
21
21
  title: { default: "" },
22
22
  subtitle: { default: "" },
23
23
  footnote: { default: "" },
24
- vignette: { default: void 0 }
24
+ vignette: { default: void 0 },
25
+ vignetteSize: { default: 300 }
25
26
  },
26
27
  setup(d) {
27
- const t = d, c = f(), e = _();
28
- return (l, N) => (s(), o("div", x, [
29
- t.title || e.title || t.subtitle || e.subtitle || t.vignette ? (s(), o("div", k, [
30
- t.vignette ? (s(), g(b, {
28
+ const t = d, c = p(), e = g();
29
+ return (l, M) => (s(), o("div", x, [
30
+ t.title || e.title || t.subtitle || e.subtitle || t.vignette ? (s(), o("div", v, [
31
+ t.vignette ? (s(), _(b, {
31
32
  key: 0,
32
33
  "data-test": "stash-empty-state|illustration",
33
34
  type: "vignette",
34
35
  class: "tw-mx-3",
35
36
  name: t.vignette,
36
- size: 300
37
- }, null, 8, ["name"])) : n("", !0),
37
+ size: t.vignetteSize
38
+ }, null, 8, ["name", "size"])) : i("", !0),
38
39
  u("section", null, [
39
40
  a(l.$slots, "title", {}, () => [
40
- u("h3", v, i(t.title), 1)
41
+ u("h3", k, n(t.title), 1)
41
42
  ]),
42
43
  a(l.$slots, "subtitle", {}, () => [
43
44
  t.subtitle || e.subtitle ? (s(), o("p", {
44
45
  key: 0,
45
46
  class: m({ "tw-mb-8": e.button, "tw-mb-0": !e.button })
46
- }, i(t.subtitle), 3)) : n("", !0)
47
+ }, n(t.subtitle), 3)) : i("", !0)
47
48
  ]),
48
49
  a(l.$slots, "button"),
49
50
  a(l.$slots, "footnote", {}, () => [
50
51
  t.footnote ? (s(), o("p", {
51
52
  key: 0,
52
53
  class: m(["tw-mb-0 tw-text-xs", { "tw-mt-3": e.button }])
53
- }, i(t.footnote), 3)) : n("", !0)
54
+ }, n(t.footnote), 3)) : i("", !0)
54
55
  ])
55
56
  ])
56
57
  ])) : (s(), o("div", {
@@ -64,18 +65,18 @@ const x = {
64
65
  alt: t.image.alt,
65
66
  src: t.image.src,
66
67
  "data-test": "stash-empty-state__img"
67
- }, null, 10, $)) : n("", !0)
68
+ }, null, 10, S)) : i("", !0)
68
69
  ]),
69
- y(" " + i(t.text || r(w)("ll.emptyState.noResults")), 1)
70
+ y(" " + n(t.text || r(w)("ll.emptyState.noResults")), 1)
70
71
  ], 2))
71
72
  ]));
72
73
  }
73
- }), C = "_root_hagg9_2", E = "_image_hagg9_6", B = {
74
- root: C,
75
- image: E
76
- }, M = {
77
- $style: B
78
- }, R = /* @__PURE__ */ h(S, [["__cssModules", M]]);
74
+ }), z = "_root_hagg9_2", C = "_image_hagg9_6", E = {
75
+ root: z,
76
+ image: C
77
+ }, B = {
78
+ $style: E
79
+ }, R = /* @__PURE__ */ h($, [["__cssModules", B]]);
79
80
  export {
80
81
  R as default
81
82
  };
@@ -1 +1 @@
1
- {"version":3,"file":"EmptyState.js","sources":["../src/components/EmptyState/EmptyState.vue"],"sourcesContent":["<script lang=\"ts\" setup>\n import { useCssModule } from 'vue';\n\n import { t } from '../../locale';\n import { VignetteNames } from '../Illustration/Illustration.models';\n import Illustration from '../Illustration/Illustration.vue';\n\n export interface EmptyStateProps {\n /**\n * @deprecated Use illustration instead.\n */\n image?: {\n alt?: string;\n src: string;\n };\n\n /**\n * @deprecated Use title instead.\n */\n text?: string;\n\n /**\n * the title text of the empty state\n */\n title?: string;\n\n /**\n * the subtitle text of the empty state\n */\n subtitle?: string;\n\n /**\n * additional text to place at the bottom of the empty state\n */\n footnote?: string;\n\n /**\n * The name of the vignette illustration to render\n */\n vignette?: VignetteNames;\n }\n\n export interface EmptyStateSlots {\n title?: () => unknown;\n subtitle?: () => unknown;\n footnote?: () => unknown;\n button?: () => unknown;\n image?: () => unknown;\n }\n\n defineOptions({\n name: 'll-empty-state',\n });\n\n const props = withDefaults(defineProps<EmptyStateProps>(), {\n /**\n * An optional image to render\n */\n image: () => ({\n alt: '',\n src: '',\n }),\n\n /**\n * The custom message to render\n */\n text: '',\n\n title: '',\n subtitle: '',\n footnote: '',\n vignette: undefined,\n });\n\n const classes = useCssModule();\n const slots = defineSlots<EmptyStateSlots>();\n</script>\n\n<template>\n <div key=\"empty\" class=\"stash-empty-state\" data-test=\"stash-empty-state\">\n <template v-if=\"props.title || slots.title || props.subtitle || slots.subtitle || props.vignette\">\n <div class=\"tw-flex tw-flex-col tw-items-center tw-text-center md:tw-flex-row md:tw-text-left\">\n <Illustration\n v-if=\"props.vignette\"\n data-test=\"stash-empty-state|illustration\"\n type=\"vignette\"\n class=\"tw-mx-3\"\n :name=\"props.vignette\"\n :size=\"300\"\n />\n <section>\n <slot name=\"title\">\n <h3 class=\"tw-mb-1.5\">\n {{ props.title }}\n </h3>\n </slot>\n\n <slot name=\"subtitle\">\n <p v-if=\"props.subtitle || slots.subtitle\" :class=\"{ 'tw-mb-8': slots.button, 'tw-mb-0': !slots.button }\">\n {{ props.subtitle }}\n </p>\n </slot>\n\n <slot name=\"button\"></slot>\n <slot name=\"footnote\">\n <p v-if=\"props.footnote\" class=\"tw-mb-0 tw-text-xs\" :class=\"{ 'tw-mt-3': slots.button }\">\n {{ props.footnote }}\n </p>\n </slot>\n </section>\n </div>\n </template>\n\n <template v-else>\n <div\n class=\"tw-mx-auto tw-my-0 tw-flex tw-items-center tw-justify-center tw-py-12\"\n :class=\"[classes.root, { 'tw-text-center': !props.image.src && !slots.image }]\"\n >\n <slot name=\"image\">\n <img\n v-if=\"props.image.src\"\n class=\"tw-mr-6\"\n :alt=\"props.image.alt\"\n :class=\"classes.image\"\n :src=\"props.image.src\"\n data-test=\"stash-empty-state__img\"\n />\n </slot>\n\n {{ props.text || t('ll.emptyState.noResults') }}\n </div>\n </template>\n </div>\n</template>\n\n<style module>\n .root {\n max-width: 600px;\n }\n\n .image {\n max-width: 60px;\n }\n</style>\n"],"names":["props","__props","classes","useCssModule","slots","_useSlots"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAsDE,UAAMA,IAAQC,GAoBRC,IAAUC,EAAa,GACvBC,IAAQC,EAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"EmptyState.js","sources":["../src/components/EmptyState/EmptyState.vue"],"sourcesContent":["<script lang=\"ts\" setup>\n import { useCssModule } from 'vue';\n\n import { t } from '../../locale';\n import { VignetteNames } from '../Illustration/Illustration.models';\n import Illustration from '../Illustration/Illustration.vue';\n\n export interface EmptyStateProps {\n /**\n * @deprecated Use illustration instead.\n */\n image?: {\n alt?: string;\n src: string;\n };\n\n /**\n * @deprecated Use title instead.\n */\n text?: string;\n\n /**\n * the title text of the empty state\n */\n title?: string;\n\n /**\n * the subtitle text of the empty state\n */\n subtitle?: string;\n\n /**\n * additional text to place at the bottom of the empty state\n */\n footnote?: string;\n\n /**\n * The name of the vignette illustration to render\n */\n vignette?: VignetteNames;\n\n /**\n * The size in pixels of the vignette illustration. Defaults to 300.\n */\n vignetteSize?: number;\n }\n\n export interface EmptyStateSlots {\n title?: () => unknown;\n subtitle?: () => unknown;\n footnote?: () => unknown;\n button?: () => unknown;\n image?: () => unknown;\n }\n\n defineOptions({\n name: 'll-empty-state',\n });\n\n const props = withDefaults(defineProps<EmptyStateProps>(), {\n /**\n * An optional image to render\n */\n image: () => ({\n alt: '',\n src: '',\n }),\n\n /**\n * The custom message to render\n */\n text: '',\n\n title: '',\n subtitle: '',\n footnote: '',\n vignette: undefined,\n vignetteSize: 300,\n });\n\n const classes = useCssModule();\n const slots = defineSlots<EmptyStateSlots>();\n</script>\n\n<template>\n <div key=\"empty\" class=\"stash-empty-state\" data-test=\"stash-empty-state\">\n <template v-if=\"props.title || slots.title || props.subtitle || slots.subtitle || props.vignette\">\n <div class=\"tw-flex tw-flex-col tw-items-center tw-text-center md:tw-flex-row md:tw-text-left\">\n <Illustration\n v-if=\"props.vignette\"\n data-test=\"stash-empty-state|illustration\"\n type=\"vignette\"\n class=\"tw-mx-3\"\n :name=\"props.vignette\"\n :size=\"props.vignetteSize\"\n />\n <section>\n <slot name=\"title\">\n <h3 class=\"tw-mb-1.5\">\n {{ props.title }}\n </h3>\n </slot>\n\n <slot name=\"subtitle\">\n <p v-if=\"props.subtitle || slots.subtitle\" :class=\"{ 'tw-mb-8': slots.button, 'tw-mb-0': !slots.button }\">\n {{ props.subtitle }}\n </p>\n </slot>\n\n <slot name=\"button\"></slot>\n <slot name=\"footnote\">\n <p v-if=\"props.footnote\" class=\"tw-mb-0 tw-text-xs\" :class=\"{ 'tw-mt-3': slots.button }\">\n {{ props.footnote }}\n </p>\n </slot>\n </section>\n </div>\n </template>\n\n <template v-else>\n <div\n class=\"tw-mx-auto tw-my-0 tw-flex tw-items-center tw-justify-center tw-py-12\"\n :class=\"[classes.root, { 'tw-text-center': !props.image.src && !slots.image }]\"\n >\n <slot name=\"image\">\n <img\n v-if=\"props.image.src\"\n class=\"tw-mr-6\"\n :alt=\"props.image.alt\"\n :class=\"classes.image\"\n :src=\"props.image.src\"\n data-test=\"stash-empty-state__img\"\n />\n </slot>\n\n {{ props.text || t('ll.emptyState.noResults') }}\n </div>\n </template>\n </div>\n</template>\n\n<style module>\n .root {\n max-width: 600px;\n }\n\n .image {\n max-width: 60px;\n }\n</style>\n"],"names":["props","__props","classes","useCssModule","slots","_useSlots"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AA2DE,UAAMA,IAAQC,GAqBRC,IAAUC,EAAa,GACvBC,IAAQC,EAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -48,6 +48,7 @@ title: string;
48
48
  subtitle: string;
49
49
  footnote: string;
50
50
  vignette: undefined;
51
+ vignetteSize: number;
51
52
  }>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<EmptyStateProps>, {
52
53
  /**
53
54
  * An optional image to render
@@ -64,6 +65,7 @@ title: string;
64
65
  subtitle: string;
65
66
  footnote: string;
66
67
  vignette: undefined;
68
+ vignetteSize: number;
67
69
  }>>> & Readonly<{}>, {
68
70
  title: string;
69
71
  image: {
@@ -74,6 +76,7 @@ text: string;
74
76
  subtitle: string;
75
77
  vignette: "map" | "search" | "calendar" | "dashboard" | "edit" | "megaphone" | "truck" | "warehouse" | "payments" | "light-bulb" | "messages" | "pie-chart" | "api" | "bank" | "basket" | "brand-menu" | "deals" | "document-search" | "empty-tray" | "graph" | "integrations" | "money-bank" | "notifications" | "orders-empty" | "product-cards" | "product-display" | "search-storefront" | "store" | "todo" | "users" | "warehouse-delivery";
76
78
  footnote: string;
79
+ vignetteSize: number;
77
80
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>, Readonly<EmptyStateSlots> & EmptyStateSlots>;
78
81
  export default _default;
79
82
 
@@ -105,6 +108,10 @@ export declare interface EmptyStateProps {
105
108
  * The name of the vignette illustration to render
106
109
  */
107
110
  vignette?: VignetteNames;
111
+ /**
112
+ * The size in pixels of the vignette illustration. Defaults to 300.
113
+ */
114
+ vignetteSize?: number;
108
115
  }
109
116
 
110
117
  export declare interface EmptyStateSlots {
@@ -3520,6 +3520,10 @@ footnote: {
3520
3520
  type: PropType<string>;
3521
3521
  default: string;
3522
3522
  };
3523
+ vignetteSize: {
3524
+ type: PropType<number>;
3525
+ default: number;
3526
+ };
3523
3527
  }>> & Readonly<{}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {
3524
3528
  title: string;
3525
3529
  image: {
@@ -3530,6 +3534,7 @@ text: string;
3530
3534
  subtitle: string;
3531
3535
  vignette: "map" | "search" | "calendar" | "dashboard" | "edit" | "megaphone" | "truck" | "warehouse" | "payments" | "light-bulb" | "messages" | "pie-chart" | "api" | "bank" | "basket" | "brand-menu" | "deals" | "document-search" | "empty-tray" | "graph" | "integrations" | "money-bank" | "notifications" | "orders-empty" | "product-cards" | "product-display" | "search-storefront" | "store" | "todo" | "users" | "warehouse-delivery";
3532
3536
  footnote: string;
3537
+ vignetteSize: number;
3533
3538
  }, true, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
3534
3539
  P: {};
3535
3540
  B: {};
@@ -3568,6 +3573,10 @@ footnote: {
3568
3573
  type: PropType<string>;
3569
3574
  default: string;
3570
3575
  };
3576
+ vignetteSize: {
3577
+ type: PropType<number>;
3578
+ default: number;
3579
+ };
3571
3580
  }>> & Readonly<{}>, {}, {}, {}, {}, {
3572
3581
  title: string;
3573
3582
  image: {
@@ -3578,6 +3587,7 @@ text: string;
3578
3587
  subtitle: string;
3579
3588
  vignette: "map" | "search" | "calendar" | "dashboard" | "edit" | "megaphone" | "truck" | "warehouse" | "payments" | "light-bulb" | "messages" | "pie-chart" | "api" | "bank" | "basket" | "brand-menu" | "deals" | "document-search" | "empty-tray" | "graph" | "integrations" | "money-bank" | "notifications" | "orders-empty" | "product-cards" | "product-display" | "search-storefront" | "store" | "todo" | "users" | "warehouse-delivery";
3580
3589
  footnote: string;
3590
+ vignetteSize: number;
3581
3591
  }>;
3582
3592
  __isFragment?: undefined;
3583
3593
  __isTeleport?: undefined;
@@ -3613,6 +3623,10 @@ footnote: {
3613
3623
  type: PropType<string>;
3614
3624
  default: string;
3615
3625
  };
3626
+ vignetteSize: {
3627
+ type: PropType<number>;
3628
+ default: number;
3629
+ };
3616
3630
  }>> & Readonly<{}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {
3617
3631
  title: string;
3618
3632
  image: {
@@ -3623,6 +3637,7 @@ text: string;
3623
3637
  subtitle: string;
3624
3638
  vignette: "map" | "search" | "calendar" | "dashboard" | "edit" | "megaphone" | "truck" | "warehouse" | "payments" | "light-bulb" | "messages" | "pie-chart" | "api" | "bank" | "basket" | "brand-menu" | "deals" | "document-search" | "empty-tray" | "graph" | "integrations" | "money-bank" | "notifications" | "orders-empty" | "product-cards" | "product-display" | "search-storefront" | "store" | "todo" | "users" | "warehouse-delivery";
3625
3639
  footnote: string;
3640
+ vignetteSize: number;
3626
3641
  }, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
3627
3642
  $slots: Readonly<EmptyStateSlots> & EmptyStateSlots;
3628
3643
  });
@@ -5300,6 +5315,10 @@ footnote: {
5300
5315
  type: PropType<string>;
5301
5316
  default: string;
5302
5317
  };
5318
+ vignetteSize: {
5319
+ type: PropType<number>;
5320
+ default: number;
5321
+ };
5303
5322
  }>> & Readonly<{}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {
5304
5323
  title: string;
5305
5324
  image: {
@@ -5310,6 +5329,7 @@ text: string;
5310
5329
  subtitle: string;
5311
5330
  vignette: "map" | "search" | "calendar" | "dashboard" | "edit" | "megaphone" | "truck" | "warehouse" | "payments" | "light-bulb" | "messages" | "pie-chart" | "api" | "bank" | "basket" | "brand-menu" | "deals" | "document-search" | "empty-tray" | "graph" | "integrations" | "money-bank" | "notifications" | "orders-empty" | "product-cards" | "product-display" | "search-storefront" | "store" | "todo" | "users" | "warehouse-delivery";
5312
5331
  footnote: string;
5332
+ vignetteSize: number;
5313
5333
  }, true, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
5314
5334
  P: {};
5315
5335
  B: {};
@@ -5348,6 +5368,10 @@ footnote: {
5348
5368
  type: PropType<string>;
5349
5369
  default: string;
5350
5370
  };
5371
+ vignetteSize: {
5372
+ type: PropType<number>;
5373
+ default: number;
5374
+ };
5351
5375
  }>> & Readonly<{}>, {}, {}, {}, {}, {
5352
5376
  title: string;
5353
5377
  image: {
@@ -5358,6 +5382,7 @@ text: string;
5358
5382
  subtitle: string;
5359
5383
  vignette: "map" | "search" | "calendar" | "dashboard" | "edit" | "megaphone" | "truck" | "warehouse" | "payments" | "light-bulb" | "messages" | "pie-chart" | "api" | "bank" | "basket" | "brand-menu" | "deals" | "document-search" | "empty-tray" | "graph" | "integrations" | "money-bank" | "notifications" | "orders-empty" | "product-cards" | "product-display" | "search-storefront" | "store" | "todo" | "users" | "warehouse-delivery";
5360
5384
  footnote: string;
5385
+ vignetteSize: number;
5361
5386
  }>;
5362
5387
  __isFragment?: undefined;
5363
5388
  __isTeleport?: undefined;
@@ -5393,6 +5418,10 @@ footnote: {
5393
5418
  type: PropType<string>;
5394
5419
  default: string;
5395
5420
  };
5421
+ vignetteSize: {
5422
+ type: PropType<number>;
5423
+ default: number;
5424
+ };
5396
5425
  }>> & Readonly<{}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {
5397
5426
  title: string;
5398
5427
  image: {
@@ -5403,6 +5432,7 @@ text: string;
5403
5432
  subtitle: string;
5404
5433
  vignette: "map" | "search" | "calendar" | "dashboard" | "edit" | "megaphone" | "truck" | "warehouse" | "payments" | "light-bulb" | "messages" | "pie-chart" | "api" | "bank" | "basket" | "brand-menu" | "deals" | "document-search" | "empty-tray" | "graph" | "integrations" | "money-bank" | "notifications" | "orders-empty" | "product-cards" | "product-display" | "search-storefront" | "store" | "todo" | "users" | "warehouse-delivery";
5405
5434
  footnote: string;
5435
+ vignetteSize: number;
5406
5436
  }, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
5407
5437
  $slots: Readonly<EmptyStateSlots> & EmptyStateSlots;
5408
5438
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leaflink/stash",
3
- "version": "51.1.1",
3
+ "version": "51.2.0",
4
4
  "description": "LeafLink's design system.",
5
5
  "homepage": "https://stash.leaflink.com",
6
6
  "main": "./dist/index.ts",