@leaflink/stash 41.6.4 → 42.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/Module.js CHANGED
@@ -1,7 +1,7 @@
1
- import { defineComponent as i, onMounted as l, provide as s, computed as d, openBlock as p, createBlock as u, normalizeClass as b, unref as t, withCtx as m, renderSlot as w } from "vue";
1
+ import { defineComponent as i, onMounted as l, provide as s, computed as d, openBlock as p, createBlock as u, normalizeClass as b, unref as t, withCtx as m, renderSlot as c } from "vue";
2
2
  import o from "@leaflink/snitch";
3
- import { M as c } from "./Module.keys-2cc7d830.js";
4
- import { _ as v } from "./Box.vue_vue_type_script_setup_true_lang-dd4c9bc9.js";
3
+ import { M as w } from "./Module.keys-2cc7d830.js";
4
+ import { _ as v } from "./Box.vue_vue_type_script_setup_true_lang-69e5176b.js";
5
5
  import { M as e } from "./Module.types-3f78f2a0.js";
6
6
  const y = /* @__PURE__ */ i({
7
7
  name: "ll-module",
@@ -17,11 +17,11 @@ const y = /* @__PURE__ */ i({
17
17
  const a = r;
18
18
  return l(() => {
19
19
  a.variant === "card" && o.warn('Card Modules are no longer a thing. You\'re probably looking for `<RadioGroup variant="card">`.'), a.variant === "list" && o.warn("Only used with deprecated ListView component. Use `table` variant with `Table` component instead.");
20
- }), s(c.key, { variant: d(() => a.variant) }), (n, f) => (p(), u(v, {
20
+ }), s(w.key, { variant: d(() => a.variant) }), (n, f) => (p(), u(v, {
21
21
  class: b(["stash-module tw-flex tw-flex-col", {
22
- "tw-shadow-none lg:tw-shadow-low tw-bg-transparent": a.variant === t(e).Table,
22
+ "tw-shadow-none lg:tw-shadow tw-bg-transparent": a.variant === t(e).Table,
23
23
  "tw-border tw-border-ice": a.variant === t(e).Card,
24
- "tw-shadow-none lg:tw-shadow-low tw-bg-transparent tw-mb-6": a.variant === t(e).List
24
+ "tw-shadow-none lg:tw-shadow tw-bg-transparent tw-mb-6": a.variant === t(e).List
25
25
  }]),
26
26
  "data-test": "stash-module",
27
27
  "disable-gutters": a.disableGutters,
@@ -29,14 +29,14 @@ const y = /* @__PURE__ */ i({
29
29
  "disable-elevation": a.disableElevation || a.variant === t(e).Table || a.variant === t(e).Card || a.variant === t(e).List
30
30
  }, {
31
31
  default: m(() => [
32
- w(n.$slots, "default")
32
+ c(n.$slots, "default")
33
33
  ]),
34
34
  _: 3
35
35
  }, 8, ["class", "disable-gutters", "disable-padding", "disable-elevation"]));
36
36
  }
37
37
  });
38
38
  export {
39
- c as MODULE_INJECTION,
39
+ w as MODULE_INJECTION,
40
40
  e as ModuleVariant,
41
41
  y as default
42
42
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Module.js","sources":["../src/components/Module/Module.vue"],"sourcesContent":["<script lang=\"ts\">\n import Box, { type BoxProps } from '../Box/Box.vue';\n import { ModuleVariant, type ModuleVariants } from './Module.types';\n\n export * from './Module.keys';\n export * from './Module.types';\n\n export interface ModuleProps extends BoxProps {\n /**\n * Variant applied.\n *\n * Options: `box`, `card`, `list`.\n */\n variant?: ModuleVariants;\n }\n</script>\n\n<script setup lang=\"ts\">\n import logger from '@leaflink/snitch';\n import { computed, onMounted, provide } from 'vue';\n\n import { MODULE_INJECTION } from './Module.keys';\n\n defineOptions({\n name: 'll-module',\n });\n\n const props = withDefaults(defineProps<ModuleProps>(), {\n variant: ModuleVariant.Box,\n });\n\n onMounted(() => {\n if (props.variant === 'card') {\n logger.warn('Card Modules are no longer a thing. You\\'re probably looking for `<RadioGroup variant=\"card\">`.');\n }\n\n if (props.variant === 'list') {\n logger.warn('Only used with deprecated ListView component. Use `table` variant with `Table` component instead.');\n }\n });\n\n provide(MODULE_INJECTION.key, { variant: computed(() => props.variant) });\n</script>\n\n<template>\n <Box\n class=\"stash-module tw-flex tw-flex-col\"\n data-test=\"stash-module\"\n :class=\"{\n 'tw-shadow-none lg:tw-shadow-low tw-bg-transparent': props.variant === ModuleVariant.Table,\n 'tw-border tw-border-ice': props.variant === ModuleVariant.Card,\n 'tw-shadow-none lg:tw-shadow-low tw-bg-transparent tw-mb-6': props.variant === ModuleVariant.List,\n }\"\n :disable-gutters=\"props.disableGutters\"\n :disable-padding=\"props.disablePadding || ['card', 'list', 'table'].includes(props.variant)\"\n :disable-elevation=\"\n props.disableElevation ||\n props.variant === ModuleVariant.Table ||\n props.variant === ModuleVariant.Card ||\n props.variant === ModuleVariant.List\n \"\n >\n <slot></slot>\n </Box>\n</template>\n"],"names":["onMounted","props","logger","provide","MODULE_INJECTION","computed"],"mappings":";;;;;;;;;;;;;;;;;AA+BE,WAAAA,EAAU,MAAM;AACV,MAAAC,EAAM,YAAY,UACpBC,EAAO,KAAK,iGAAiG,GAG3GD,EAAM,YAAY,UACpBC,EAAO,KAAK,mGAAmG;AAAA,IACjH,CACD,GAEOC,EAAAC,EAAiB,KAAK,EAAE,SAASC,EAAS,MAAMJ,EAAM,OAAO,EAAA,CAAG;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"Module.js","sources":["../src/components/Module/Module.vue"],"sourcesContent":["<script lang=\"ts\">\n import Box, { type BoxProps } from '../Box/Box.vue';\n import { ModuleVariant, type ModuleVariants } from './Module.types';\n\n export * from './Module.keys';\n export * from './Module.types';\n\n export interface ModuleProps extends BoxProps {\n /**\n * Variant applied.\n *\n * Options: `box`, `card`, `list`.\n */\n variant?: ModuleVariants;\n }\n</script>\n\n<script setup lang=\"ts\">\n import logger from '@leaflink/snitch';\n import { computed, onMounted, provide } from 'vue';\n\n import { MODULE_INJECTION } from './Module.keys';\n\n defineOptions({\n name: 'll-module',\n });\n\n const props = withDefaults(defineProps<ModuleProps>(), {\n variant: ModuleVariant.Box,\n });\n\n onMounted(() => {\n if (props.variant === 'card') {\n logger.warn('Card Modules are no longer a thing. You\\'re probably looking for `<RadioGroup variant=\"card\">`.');\n }\n\n if (props.variant === 'list') {\n logger.warn('Only used with deprecated ListView component. Use `table` variant with `Table` component instead.');\n }\n });\n\n provide(MODULE_INJECTION.key, { variant: computed(() => props.variant) });\n</script>\n\n<template>\n <Box\n class=\"stash-module tw-flex tw-flex-col\"\n data-test=\"stash-module\"\n :class=\"{\n 'tw-shadow-none lg:tw-shadow tw-bg-transparent': props.variant === ModuleVariant.Table,\n 'tw-border tw-border-ice': props.variant === ModuleVariant.Card,\n 'tw-shadow-none lg:tw-shadow tw-bg-transparent tw-mb-6': props.variant === ModuleVariant.List,\n }\"\n :disable-gutters=\"props.disableGutters\"\n :disable-padding=\"props.disablePadding || ['card', 'list', 'table'].includes(props.variant)\"\n :disable-elevation=\"\n props.disableElevation ||\n props.variant === ModuleVariant.Table ||\n props.variant === ModuleVariant.Card ||\n props.variant === ModuleVariant.List\n \"\n >\n <slot></slot>\n </Box>\n</template>\n"],"names":["onMounted","props","logger","provide","MODULE_INJECTION","computed"],"mappings":";;;;;;;;;;;;;;;;;AA+BE,WAAAA,EAAU,MAAM;AACV,MAAAC,EAAM,YAAY,UACpBC,EAAO,KAAK,iGAAiG,GAG3GD,EAAM,YAAY,UACpBC,EAAO,KAAK,mGAAmG;AAAA,IACjH,CACD,GAEOC,EAAAC,EAAiB,KAAK,EAAE,SAASC,EAAS,MAAMJ,EAAM,OAAO,EAAA,CAAG;;;;;;;;;;;;;;;;;;"}
@@ -1,19 +1,19 @@
1
- import { defineComponent as n, ref as l, onBeforeMount as w, inject as u, openBlock as d, createElementBlock as s, normalizeClass as p, unref as o, renderSlot as i } from "vue";
1
+ import { defineComponent as n, ref as l, onBeforeMount as u, inject as w, openBlock as d, createElementBlock as s, normalizeClass as p, unref as o, renderSlot as i } from "vue";
2
2
  import { M as a } from "./Module.keys-2cc7d830.js";
3
3
  import { M as r } from "./Module.types-3f78f2a0.js";
4
4
  const h = /* @__PURE__ */ n({
5
5
  __name: "ModuleFooter",
6
6
  setup(m) {
7
7
  const t = l();
8
- return w(() => {
9
- const e = u(a.key, a.defaults);
8
+ return u(() => {
9
+ const e = w(a.key, a.defaults);
10
10
  if (!e.variant)
11
11
  throw new Error("ModuleContent must be used within a Module component.");
12
12
  t.value = e.variant.value;
13
13
  }), (e, f) => (d(), s("div", {
14
14
  class: p(["stash-module-footer tw-flex tw-flex-wrap tw-justify-between", {
15
15
  "tw-px-3 lg:tw-px-6 tw-pb-6 tw-pt-0 tw-border-b tw-border-ice tw-rounded-b": t.value === o(r).Card,
16
- "tw-px-3 lg:tw-px-6 tw-py-3 tw-bg-white tw-rounded lg:tw-rounded-t-none tw-shadow-low lg:tw-shadow-none": t.value === o(r).Table || t.value === o(r).List,
16
+ "tw-px-3 lg:tw-px-6 tw-py-3 tw-bg-white tw-rounded lg:tw-rounded-t-none tw-shadow lg:tw-shadow-none": t.value === o(r).Table || t.value === o(r).List,
17
17
  "tw-pt-3 lg:tw-pt-6 tw-mb-0": t.value === o(r).Box
18
18
  }]),
19
19
  "data-test": "stash-module-footer"
@@ -1 +1 @@
1
- {"version":3,"file":"ModuleFooter.js","sources":["../src/components/ModuleFooter/ModuleFooter.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { inject, onBeforeMount, ref } from 'vue';\n\n import { MODULE_INJECTION } from '../Module/Module.keys';\n import { ModuleVariant } from '../Module/Module.types';\n\n const moduleVariant = ref();\n\n onBeforeMount(() => {\n const moduleInjectedValues = inject(MODULE_INJECTION.key, MODULE_INJECTION.defaults);\n if (!moduleInjectedValues.variant) {\n throw new Error('ModuleContent must be used within a Module component.');\n }\n moduleVariant.value = moduleInjectedValues.variant.value;\n });\n</script>\n\n<template>\n <div\n class=\"stash-module-footer tw-flex tw-flex-wrap tw-justify-between\"\n :class=\"{\n 'tw-px-3 lg:tw-px-6 tw-pb-6 tw-pt-0 tw-border-b tw-border-ice tw-rounded-b': moduleVariant === ModuleVariant.Card,\n 'tw-px-3 lg:tw-px-6 tw-py-3 tw-bg-white tw-rounded lg:tw-rounded-t-none tw-shadow-low lg:tw-shadow-none':\n moduleVariant === ModuleVariant.Table || moduleVariant === ModuleVariant.List,\n 'tw-pt-3 lg:tw-pt-6 tw-mb-0': moduleVariant === ModuleVariant.Box,\n }\"\n data-test=\"stash-module-footer\"\n >\n <slot></slot>\n </div>\n</template>\n"],"names":["moduleVariant","ref","onBeforeMount","moduleInjectedValues","inject","MODULE_INJECTION"],"mappings":";;;;;;AAME,UAAMA,IAAgBC;AAEtB,WAAAC,EAAc,MAAM;AAClB,YAAMC,IAAuBC,EAAOC,EAAiB,KAAKA,EAAiB,QAAQ;AAC/E,UAAA,CAACF,EAAqB;AAClB,cAAA,IAAI,MAAM,uDAAuD;AAE3D,MAAAH,EAAA,QAAQG,EAAqB,QAAQ;AAAA,IAAA,CACpD;;;;;;;;;;;;"}
1
+ {"version":3,"file":"ModuleFooter.js","sources":["../src/components/ModuleFooter/ModuleFooter.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { inject, onBeforeMount, ref } from 'vue';\n\n import { MODULE_INJECTION } from '../Module/Module.keys';\n import { ModuleVariant } from '../Module/Module.types';\n\n const moduleVariant = ref();\n\n onBeforeMount(() => {\n const moduleInjectedValues = inject(MODULE_INJECTION.key, MODULE_INJECTION.defaults);\n if (!moduleInjectedValues.variant) {\n throw new Error('ModuleContent must be used within a Module component.');\n }\n moduleVariant.value = moduleInjectedValues.variant.value;\n });\n</script>\n\n<template>\n <div\n class=\"stash-module-footer tw-flex tw-flex-wrap tw-justify-between\"\n :class=\"{\n 'tw-px-3 lg:tw-px-6 tw-pb-6 tw-pt-0 tw-border-b tw-border-ice tw-rounded-b': moduleVariant === ModuleVariant.Card,\n 'tw-px-3 lg:tw-px-6 tw-py-3 tw-bg-white tw-rounded lg:tw-rounded-t-none tw-shadow lg:tw-shadow-none':\n moduleVariant === ModuleVariant.Table || moduleVariant === ModuleVariant.List,\n 'tw-pt-3 lg:tw-pt-6 tw-mb-0': moduleVariant === ModuleVariant.Box,\n }\"\n data-test=\"stash-module-footer\"\n >\n <slot></slot>\n </div>\n</template>\n"],"names":["moduleVariant","ref","onBeforeMount","moduleInjectedValues","inject","MODULE_INJECTION"],"mappings":";;;;;;AAME,UAAMA,IAAgBC;AAEtB,WAAAC,EAAc,MAAM;AAClB,YAAMC,IAAuBC,EAAOC,EAAiB,KAAKA,EAAiB,QAAQ;AAC/E,UAAA,CAACF,EAAqB;AAClB,cAAA,IAAI,MAAM,uDAAuD;AAE3D,MAAAH,EAAA,QAAQG,EAAqB,QAAQ;AAAA,IAAA,CACpD;;;;;;;;;;;;"}
@@ -50,7 +50,7 @@ const T = { class: "tw-flex tw-items-center" }, $ = {
50
50
  return (e, H) => (l(), r("header", {
51
51
  class: n(["stash-module-header tw-flex tw-flex-wrap tw-justify-between", {
52
52
  "tw-bg-ice-100 tw-px-3 lg:tw-px-6 tw-py-3 tw-border-b tw-border-ice tw-rounded-t": s.value === a(o).Card,
53
- "tw-px-3 lg:tw-px-6 tw-pt-3 lg:tw-pt-6 tw-bg-white tw-mb-6 lg:tw-mb-0 tw-rounded lg:tw-rounded-b-none tw-shadow-low lg:tw-shadow-none": s.value === a(o).Table || s.value === a(o).List,
53
+ "tw-px-3 lg:tw-px-6 tw-pt-3 lg:tw-pt-6 tw-bg-white tw-mb-6 lg:tw-mb-0 tw-rounded lg:tw-rounded-b-none tw-shadow lg:tw-shadow-none": s.value === a(o).Table || s.value === a(o).List,
54
54
  "tw-border-b tw-border-ice-200 tw-mb-3 lg:tw-mb-6": t.underline
55
55
  }]),
56
56
  "data-test": "stash-module-header"
@@ -1 +1 @@
1
- {"version":3,"file":"ModuleHeader.js","sources":["../src/components/ModuleHeader/ModuleHeader.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { computed, inject, onBeforeMount, ref, useCssModule, useSlots } from 'vue';\n\n import { MODULE_INJECTION } from '../Module/Module.keys';\n import { ModuleVariant } from '../Module/Module.types';\n\n defineOptions({\n name: 'll-module-header',\n });\n\n export interface ModuleHeaderProps {\n /**\n * Header title. Will get overridden by the `title` slot if provided.\n */\n title?: string;\n\n /**\n * Size of the header.\n *\n * - `small` = `h4`\n * - `medium` = `h3`\n * - `large` = `h2`\n */\n size?: 'small' | 'medium' | 'large';\n\n /**\n * Header description, aka subtitle. Will get overridden by the `description` slot if provided.\n */\n description?: string;\n\n /**\n * Stop the actions slot from force-wrapping on medium and smalls screens.\n */\n preventActionsWrap?: boolean;\n\n /**\n * Displays a border at the bottom\n */\n underline?: boolean;\n }\n\n const props = withDefaults(defineProps<ModuleHeaderProps>(), {\n title: '',\n size: 'medium',\n description: '',\n preventActionsWrap: false,\n underline: false,\n });\n const classes = useCssModule();\n const slots = useSlots();\n const moduleVariant = ref();\n\n onBeforeMount(() => {\n const moduleInjectedValues = inject(MODULE_INJECTION.key, MODULE_INJECTION.defaults);\n if (!moduleInjectedValues.variant) {\n throw new Error('ModuleHeader must be used within a Module component.');\n }\n moduleVariant.value = moduleInjectedValues.variant.value;\n });\n\n const is = computed(() => {\n let component;\n\n switch (props.size) {\n case 'small':\n component = 'h4';\n break;\n\n case 'medium':\n component = 'h3';\n break;\n\n case 'large':\n component = 'h2';\n break;\n\n default:\n component = 'h3';\n break;\n }\n\n return component;\n });\n\n const marginBottomClasses = computed(() => {\n const isBoxOrTableOrList =\n moduleVariant.value === ModuleVariant.Box ||\n moduleVariant.value === ModuleVariant.Table ||\n moduleVariant.value === ModuleVariant.List;\n\n if (isBoxOrTableOrList && !props.underline) {\n return 'tw-mb-3 lg:tw-mb-6';\n } else if (isBoxOrTableOrList && props.underline) {\n return 'tw-mb-3';\n } else {\n return '';\n }\n });\n</script>\n\n<template>\n <header\n class=\"stash-module-header tw-flex tw-flex-wrap tw-justify-between\"\n :class=\"{\n 'tw-bg-ice-100 tw-px-3 lg:tw-px-6 tw-py-3 tw-border-b tw-border-ice tw-rounded-t':\n moduleVariant === ModuleVariant.Card,\n 'tw-px-3 lg:tw-px-6 tw-pt-3 lg:tw-pt-6 tw-bg-white tw-mb-6 lg:tw-mb-0 tw-rounded lg:tw-rounded-b-none tw-shadow-low lg:tw-shadow-none':\n moduleVariant === ModuleVariant.Table || moduleVariant === ModuleVariant.List,\n 'tw-border-b tw-border-ice-200 tw-mb-3 lg:tw-mb-6': props.underline,\n }\"\n data-test=\"stash-module-header\"\n >\n <div\n class=\"stash-module-header__content tw-mr-6\"\n :class=\"marginBottomClasses\"\n data-test=\"stash-module-header|content\"\n >\n <div class=\"tw-flex tw-items-center\">\n <div\n v-if=\"slots.media && props.size === 'large'\"\n class=\"stash-module-header__content__media tw-mr-3\"\n :class=\"classes.media\"\n data-test=\"stash-module-header|content-media\"\n >\n <slot name=\"media\"></slot>\n </div>\n\n <div class=\"stash-module-header__content__text\" data-test=\"stash-module-header|content-text\">\n <!--\n @slot Header title\n @type String\n @default HTML header element with the `title` prop as the text.\n TODO: this doesn't work...\n -->\n <slot name=\"title\">\n <component :is=\"is\" v-if=\"props.title\" class=\"tw-my-0\">{{ props.title }}</component>\n </slot>\n\n <!--\n @slot Header title\n @type String\n @default HTML <p> element with the `description` prop as the text.\n -->\n <slot name=\"description\">\n <p v-if=\"props.description\" class=\"tw-mt-3 tw-mb-0\">{{ props.description }}</p>\n </slot>\n </div>\n </div>\n </div>\n\n <!-- todo: how can we pass a prop/class to actions in order to top align vs middle align? -->\n <div\n v-if=\"slots.actions\"\n class=\"stash-module-header__actions tw-self-center\"\n :class=\"[\n marginBottomClasses,\n {\n 'tw-w-full lg:tw-w-auto': !props.preventActionsWrap,\n },\n ]\"\n data-test=\"stash-module-header|actions\"\n >\n <slot name=\"actions\"></slot>\n </div>\n </header>\n</template>\n\n<style module>\n /* max size for media/marketing illustration icons we would be passing to the slot */\n .media {\n max-height: 58px;\n max-width: 58px;\n }\n</style>\n"],"names":["classes","useCssModule","slots","useSlots","moduleVariant","ref","onBeforeMount","moduleInjectedValues","inject","MODULE_INJECTION","is","computed","component","props","marginBottomClasses","isBoxOrTableOrList","ModuleVariant"],"mappings":";;;;;;;;;;;;;;;;;;;;;iBAgDQA,IAAUC,KACVC,IAAQC,KACRC,IAAgBC;AAEtB,IAAAC,EAAc,MAAM;AAClB,YAAMC,IAAuBC,EAAOC,EAAiB,KAAKA,EAAiB,QAAQ;AAC/E,UAAA,CAACF,EAAqB;AAClB,cAAA,IAAI,MAAM,sDAAsD;AAE1D,MAAAH,EAAA,QAAQG,EAAqB,QAAQ;AAAA,IAAA,CACpD;AAEK,UAAAG,IAAKC,EAAS,MAAM;AACpB,UAAAC;AAEJ,cAAQC,EAAM,MAAM;AAAA,QAClB,KAAK;AACS,UAAAD,IAAA;AACZ;AAAA,QAEF,KAAK;AACS,UAAAA,IAAA;AACZ;AAAA,QAEF,KAAK;AACS,UAAAA,IAAA;AACZ;AAAA,QAEF;AACc,UAAAA,IAAA;AACZ;AAAA,MACJ;AAEO,aAAAA;AAAA,IAAA,CACR,GAEKE,IAAsBH,EAAS,MAAM;AACnC,YAAAI,IACJX,EAAc,UAAUY,EAAc,OACtCZ,EAAc,UAAUY,EAAc,SACtCZ,EAAc,UAAUY,EAAc;AAEpC,aAAAD,KAAsB,CAACF,EAAM,YACxB,uBACEE,KAAsBF,EAAM,YAC9B,YAEA;AAAA,IACT,CACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"ModuleHeader.js","sources":["../src/components/ModuleHeader/ModuleHeader.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { computed, inject, onBeforeMount, ref, useCssModule, useSlots } from 'vue';\n\n import { MODULE_INJECTION } from '../Module/Module.keys';\n import { ModuleVariant } from '../Module/Module.types';\n\n defineOptions({\n name: 'll-module-header',\n });\n\n export interface ModuleHeaderProps {\n /**\n * Header title. Will get overridden by the `title` slot if provided.\n */\n title?: string;\n\n /**\n * Size of the header.\n *\n * - `small` = `h4`\n * - `medium` = `h3`\n * - `large` = `h2`\n */\n size?: 'small' | 'medium' | 'large';\n\n /**\n * Header description, aka subtitle. Will get overridden by the `description` slot if provided.\n */\n description?: string;\n\n /**\n * Stop the actions slot from force-wrapping on medium and smalls screens.\n */\n preventActionsWrap?: boolean;\n\n /**\n * Displays a border at the bottom\n */\n underline?: boolean;\n }\n\n const props = withDefaults(defineProps<ModuleHeaderProps>(), {\n title: '',\n size: 'medium',\n description: '',\n preventActionsWrap: false,\n underline: false,\n });\n const classes = useCssModule();\n const slots = useSlots();\n const moduleVariant = ref();\n\n onBeforeMount(() => {\n const moduleInjectedValues = inject(MODULE_INJECTION.key, MODULE_INJECTION.defaults);\n if (!moduleInjectedValues.variant) {\n throw new Error('ModuleHeader must be used within a Module component.');\n }\n moduleVariant.value = moduleInjectedValues.variant.value;\n });\n\n const is = computed(() => {\n let component;\n\n switch (props.size) {\n case 'small':\n component = 'h4';\n break;\n\n case 'medium':\n component = 'h3';\n break;\n\n case 'large':\n component = 'h2';\n break;\n\n default:\n component = 'h3';\n break;\n }\n\n return component;\n });\n\n const marginBottomClasses = computed(() => {\n const isBoxOrTableOrList =\n moduleVariant.value === ModuleVariant.Box ||\n moduleVariant.value === ModuleVariant.Table ||\n moduleVariant.value === ModuleVariant.List;\n\n if (isBoxOrTableOrList && !props.underline) {\n return 'tw-mb-3 lg:tw-mb-6';\n } else if (isBoxOrTableOrList && props.underline) {\n return 'tw-mb-3';\n } else {\n return '';\n }\n });\n</script>\n\n<template>\n <header\n class=\"stash-module-header tw-flex tw-flex-wrap tw-justify-between\"\n :class=\"{\n 'tw-bg-ice-100 tw-px-3 lg:tw-px-6 tw-py-3 tw-border-b tw-border-ice tw-rounded-t':\n moduleVariant === ModuleVariant.Card,\n 'tw-px-3 lg:tw-px-6 tw-pt-3 lg:tw-pt-6 tw-bg-white tw-mb-6 lg:tw-mb-0 tw-rounded lg:tw-rounded-b-none tw-shadow lg:tw-shadow-none':\n moduleVariant === ModuleVariant.Table || moduleVariant === ModuleVariant.List,\n 'tw-border-b tw-border-ice-200 tw-mb-3 lg:tw-mb-6': props.underline,\n }\"\n data-test=\"stash-module-header\"\n >\n <div\n class=\"stash-module-header__content tw-mr-6\"\n :class=\"marginBottomClasses\"\n data-test=\"stash-module-header|content\"\n >\n <div class=\"tw-flex tw-items-center\">\n <div\n v-if=\"slots.media && props.size === 'large'\"\n class=\"stash-module-header__content__media tw-mr-3\"\n :class=\"classes.media\"\n data-test=\"stash-module-header|content-media\"\n >\n <slot name=\"media\"></slot>\n </div>\n\n <div class=\"stash-module-header__content__text\" data-test=\"stash-module-header|content-text\">\n <!--\n @slot Header title\n @type String\n @default HTML header element with the `title` prop as the text.\n TODO: this doesn't work...\n -->\n <slot name=\"title\">\n <component :is=\"is\" v-if=\"props.title\" class=\"tw-my-0\">{{ props.title }}</component>\n </slot>\n\n <!--\n @slot Header title\n @type String\n @default HTML <p> element with the `description` prop as the text.\n -->\n <slot name=\"description\">\n <p v-if=\"props.description\" class=\"tw-mt-3 tw-mb-0\">{{ props.description }}</p>\n </slot>\n </div>\n </div>\n </div>\n\n <!-- todo: how can we pass a prop/class to actions in order to top align vs middle align? -->\n <div\n v-if=\"slots.actions\"\n class=\"stash-module-header__actions tw-self-center\"\n :class=\"[\n marginBottomClasses,\n {\n 'tw-w-full lg:tw-w-auto': !props.preventActionsWrap,\n },\n ]\"\n data-test=\"stash-module-header|actions\"\n >\n <slot name=\"actions\"></slot>\n </div>\n </header>\n</template>\n\n<style module>\n /* max size for media/marketing illustration icons we would be passing to the slot */\n .media {\n max-height: 58px;\n max-width: 58px;\n }\n</style>\n"],"names":["classes","useCssModule","slots","useSlots","moduleVariant","ref","onBeforeMount","moduleInjectedValues","inject","MODULE_INJECTION","is","computed","component","props","marginBottomClasses","isBoxOrTableOrList","ModuleVariant"],"mappings":";;;;;;;;;;;;;;;;;;;;;iBAgDQA,IAAUC,KACVC,IAAQC,KACRC,IAAgBC;AAEtB,IAAAC,EAAc,MAAM;AAClB,YAAMC,IAAuBC,EAAOC,EAAiB,KAAKA,EAAiB,QAAQ;AAC/E,UAAA,CAACF,EAAqB;AAClB,cAAA,IAAI,MAAM,sDAAsD;AAE1D,MAAAH,EAAA,QAAQG,EAAqB,QAAQ;AAAA,IAAA,CACpD;AAEK,UAAAG,IAAKC,EAAS,MAAM;AACpB,UAAAC;AAEJ,cAAQC,EAAM,MAAM;AAAA,QAClB,KAAK;AACS,UAAAD,IAAA;AACZ;AAAA,QAEF,KAAK;AACS,UAAAA,IAAA;AACZ;AAAA,QAEF,KAAK;AACS,UAAAA,IAAA;AACZ;AAAA,QAEF;AACc,UAAAA,IAAA;AACZ;AAAA,MACJ;AAEO,aAAAA;AAAA,IAAA,CACR,GAEKE,IAAsBH,EAAS,MAAM;AACnC,YAAAI,IACJX,EAAc,UAAUY,EAAc,OACtCZ,EAAc,UAAUY,EAAc,SACtCZ,EAAc,UAAUY,EAAc;AAEpC,aAAAD,KAAsB,CAACF,EAAM,YACxB,uBACEE,KAAsBF,EAAM,YAC9B,YAEA;AAAA,IACT,CACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,12 +1,12 @@
1
1
  import { defineComponent as l, computed as o, openBlock as u, createBlock as _, resolveDynamicComponent as p, mergeProps as m, withCtx as d, createElementVNode as e, createVNode as s, toDisplayString as r } from "vue";
2
2
  import n from "./Icon.js";
3
- import { _ as w } from "./_plugin-vue_export-helper-dad06003.js";
3
+ import { _ as f } from "./_plugin-vue_export-helper-dad06003.js";
4
4
  import "./Icon.vue_used_vue_type_style_index_0_lang.module-d2507af3.js";
5
5
  import "./uniqueId-847efe53.js";
6
6
  import "./toString-7d5bf363.js";
7
7
  import "./isObjectLike-54341556.js";
8
8
  import "./index-79ce320f.js";
9
- const f = { class: "content tw-flex tw-items-center" }, h = { class: "tw-flex tw-items-center tw-justify-center tw-rounded tw-bg-blue-100 tw-p-3" }, x = { class: "tw-flex-1" }, v = { class: "tw-text-blue" }, b = { class: "subtitle tw-text-xs lg:tw-mb-0 tw-text-ice-700 tw-font-normal" }, k = /* @__PURE__ */ l({
9
+ const w = { class: "content tw-flex tw-items-center" }, h = { class: "tw-flex tw-items-center tw-justify-center tw-rounded tw-bg-blue-100 tw-p-3" }, x = { class: "tw-flex-1" }, b = { class: "tw-text-blue" }, v = { class: "subtitle tw-text-xs lg:tw-mb-0 tw-text-ice-700 tw-font-normal" }, k = /* @__PURE__ */ l({
10
10
  __name: "QuickAction",
11
11
  props: {
12
12
  title: {},
@@ -22,11 +22,11 @@ const f = { class: "content tw-flex tw-items-center" }, h = { class: "tw-flex tw
22
22
  href: t.href
23
23
  } : {});
24
24
  return (g, y) => (u(), _(p(i.value), m(a.value, {
25
- class: "stash-quick-action root tw-p-3 tw-shadow-low tw-rounded",
25
+ class: "stash-quick-action root tw-p-3 tw-shadow tw-rounded",
26
26
  "data-test": "stash-quick-action"
27
27
  }), {
28
28
  default: d(() => [
29
- e("div", f, [
29
+ e("div", w, [
30
30
  e("div", h, [
31
31
  s(n, {
32
32
  name: t.icon,
@@ -34,8 +34,8 @@ const f = { class: "content tw-flex tw-items-center" }, h = { class: "tw-flex tw
34
34
  }, null, 8, ["name"])
35
35
  ]),
36
36
  e("div", x, [
37
- e("h4", v, r(t.title), 1),
38
- e("p", b, r(t.subtitle), 1)
37
+ e("h4", b, r(t.title), 1),
38
+ e("p", v, r(t.subtitle), 1)
39
39
  ]),
40
40
  s(n, {
41
41
  name: "arrow-right",
@@ -47,7 +47,7 @@ const f = { class: "content tw-flex tw-items-center" }, h = { class: "tw-flex tw
47
47
  }, 16));
48
48
  }
49
49
  });
50
- const V = /* @__PURE__ */ w(k, [["__scopeId", "data-v-5688a76c"]]);
50
+ const V = /* @__PURE__ */ f(k, [["__scopeId", "data-v-704bf5c4"]]);
51
51
  export {
52
52
  V as default
53
53
  };
@@ -1 +1 @@
1
- {"version":3,"file":"QuickAction.js","sources":["../src/components/QuickAction/QuickAction.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { computed } from 'vue';\n import { type RouteLocationRaw } from 'vue-router';\n\n import { IconName } from '../Icon/Icon.types';\n import Icon from '../Icon/Icon.vue';\n\n export interface QuickActionProps {\n /**\n * The title prop will show the first line of text\n */\n title: string;\n\n /**\n * The subtitle prop will show the second line of text\n */\n subtitle: string;\n\n /**\n * The `to` prop for vue-router's `RouterLink` component\n */\n to?: RouteLocationRaw;\n /**\n * If defined, the quick action will render as an `<a />` tag.\n */\n href?: string;\n /**\n * Icon to render on the left side\n */\n icon: IconName;\n }\n\n const props = defineProps<QuickActionProps>();\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 linkAttrs = 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\n :is=\"is\"\n v-bind=\"linkAttrs\"\n class=\"stash-quick-action root tw-p-3 tw-shadow-low tw-rounded\"\n data-test=\"stash-quick-action\"\n >\n <div class=\"content tw-flex tw-items-center\">\n <div class=\"tw-flex tw-items-center tw-justify-center tw-rounded tw-bg-blue-100 tw-p-3\">\n <Icon :name=\"props.icon\" class=\"tw-text-blue\" />\n </div>\n <div class=\"tw-flex-1\">\n <h4 class=\"tw-text-blue\">{{ props.title }}</h4>\n <p class=\"subtitle tw-text-xs lg:tw-mb-0 tw-text-ice-700 tw-font-normal\">\n {{ props.subtitle }}\n </p>\n </div>\n <Icon name=\"arrow-right\" class=\"tw-text-blue\" />\n </div>\n </component>\n</template>\n\n<style scoped>\n .root {\n background-color: #fff;\n border: 1px solid transparent; /* it prevents layout size shifting of extra height/width when hover */\n cursor: pointer;\n display: inline-block;\n }\n\n .root:hover,\n .root:active,\n .root:focus {\n border: 1px solid var(--color-blue-500);\n text-decoration: none;\n }\n\n .content {\n gap: 12px;\n }\n</style>\n"],"names":["is","computed","props","linkAttrs"],"mappings":";;;;;;;;;;;;;;;;;;iBAkCQA,IAAKC,EAAS,MACdC,EAAM,KACD,gBAGLA,EAAM,OACD,MAGF,KACR,GAEKC,IAAYF,EAAS,MACrBC,EAAM,KACD;AAAA,MACL,IAAIA,EAAM;AAAA,IAAA,IAIVA,EAAM,OACD;AAAA,MACL,MAAMA,EAAM;AAAA,IAAA,IAIT,EACR;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"QuickAction.js","sources":["../src/components/QuickAction/QuickAction.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { computed } from 'vue';\n import { type RouteLocationRaw } from 'vue-router';\n\n import { IconName } from '../Icon/Icon.types';\n import Icon from '../Icon/Icon.vue';\n\n export interface QuickActionProps {\n /**\n * The title prop will show the first line of text\n */\n title: string;\n\n /**\n * The subtitle prop will show the second line of text\n */\n subtitle: string;\n\n /**\n * The `to` prop for vue-router's `RouterLink` component\n */\n to?: RouteLocationRaw;\n /**\n * If defined, the quick action will render as an `<a />` tag.\n */\n href?: string;\n /**\n * Icon to render on the left side\n */\n icon: IconName;\n }\n\n const props = defineProps<QuickActionProps>();\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 linkAttrs = 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\n :is=\"is\"\n v-bind=\"linkAttrs\"\n class=\"stash-quick-action root tw-p-3 tw-shadow tw-rounded\"\n data-test=\"stash-quick-action\"\n >\n <div class=\"content tw-flex tw-items-center\">\n <div class=\"tw-flex tw-items-center tw-justify-center tw-rounded tw-bg-blue-100 tw-p-3\">\n <Icon :name=\"props.icon\" class=\"tw-text-blue\" />\n </div>\n <div class=\"tw-flex-1\">\n <h4 class=\"tw-text-blue\">{{ props.title }}</h4>\n <p class=\"subtitle tw-text-xs lg:tw-mb-0 tw-text-ice-700 tw-font-normal\">\n {{ props.subtitle }}\n </p>\n </div>\n <Icon name=\"arrow-right\" class=\"tw-text-blue\" />\n </div>\n </component>\n</template>\n\n<style scoped>\n .root {\n background-color: #fff;\n border: 1px solid transparent; /* it prevents layout size shifting of extra height/width when hover */\n cursor: pointer;\n display: inline-block;\n }\n\n .root:hover,\n .root:active,\n .root:focus {\n border: 1px solid var(--color-blue-500);\n text-decoration: none;\n }\n\n .content {\n gap: 12px;\n }\n</style>\n"],"names":["is","computed","props","linkAttrs"],"mappings":";;;;;;;;;;;;;;;;;;iBAkCQA,IAAKC,EAAS,MACdC,EAAM,KACD,gBAGLA,EAAM,OACD,MAGF,KACR,GAEKC,IAAYF,EAAS,MACrBC,EAAM,KACD;AAAA,MACL,IAAIA,EAAM;AAAA,IAAA,IAIVA,EAAM,OACD;AAAA,MACL,MAAMA,EAAM;AAAA,IAAA,IAIT,EACR;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/dist/Select.js CHANGED
@@ -966,7 +966,7 @@ function Cn(e, n, t) {
966
966
  update: E
967
967
  };
968
968
  }
969
- const Rn = (e) => (Mt("data-v-a0f55f2d"), e = e(), Dt(), e), On = ["id", "aria-errormessage", "aria-invalid", "disabled", "multiple", "name"], kn = ["selected", "value"], Bn = /* @__PURE__ */ Rn(() => /* @__PURE__ */ z("option", { value: "" }, null, -1)), Tn = ["aria-controls", "aria-expanded", "aria-label", "aria-disabled", "onKeyup"], An = ["id"], Ln = ["onKeypress", "onMousedown"], Mn = {
969
+ const Rn = (e) => (Mt("data-v-e1beefda"), e = e(), Dt(), e), On = ["id", "aria-errormessage", "aria-invalid", "disabled", "multiple", "name"], kn = ["selected", "value"], Bn = /* @__PURE__ */ Rn(() => /* @__PURE__ */ z("option", { value: "" }, null, -1)), Tn = ["aria-controls", "aria-expanded", "aria-label", "aria-disabled", "onKeyup"], An = ["id"], Ln = ["onKeypress", "onMousedown"], Mn = {
970
970
  key: 0,
971
971
  class: "stash-select__total"
972
972
  }, Dn = {
@@ -1325,7 +1325,7 @@ const Rn = (e) => (Mt("data-v-a0f55f2d"), e = e(), Dt(), e), On = ["id", "aria-e
1325
1325
  de(z("div", {
1326
1326
  ref_key: "optionsWrapperRef",
1327
1327
  ref: u,
1328
- class: "stash-select__border-selector border-selector tw-shadow-low tw-w-full",
1328
+ class: "stash-select__border-selector border-selector tw-shadow tw-w-full",
1329
1329
  style: At(F(C)),
1330
1330
  onClick: m[3] || (m[3] = he(() => {
1331
1331
  }, ["stop"]))
@@ -1409,7 +1409,7 @@ const Rn = (e) => (Mt("data-v-a0f55f2d"), e = e(), Dt(), e), On = ["id", "aria-e
1409
1409
  ]), 1032, ["id", "add-bottom-space", "class", "error-text", "hint-text", "label", "show-optional-in-label"]));
1410
1410
  }
1411
1411
  });
1412
- const So = /* @__PURE__ */ Kt($n, [["__scopeId", "data-v-a0f55f2d"]]);
1412
+ const So = /* @__PURE__ */ Kt($n, [["__scopeId", "data-v-e1beefda"]]);
1413
1413
  export {
1414
1414
  So as default
1415
1415
  };