@leaflink/stash 49.3.3 → 49.3.5

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.
@@ -25,7 +25,7 @@ import "./Icon.js";
25
25
  import "./index-9e1095ef.js";
26
26
  import "./Icon.vue_used_vue_type_style_index_0_lang.module-eb359559.js";
27
27
  import "./_plugin-vue_export-helper-dad06003.js";
28
- import "./Field.vue_vue_type_script_setup_true_lang-3ea26741.js";
28
+ import "./Field.vue_vue_type_script_setup_true_lang-fded4f75.js";
29
29
  import "./Label.vue_vue_type_script_setup_true_lang-b6ba2f02.js";
30
30
  import "./locale.js";
31
31
  const _ = "address-select-", ye = /* @__PURE__ */ S({
@@ -11,7 +11,7 @@ import "./utils/i18n.js";
11
11
  import "./constants.js";
12
12
  import "./locale.js";
13
13
  import "lodash-es/get";
14
- import "./Field.vue_vue_type_script_setup_true_lang-3ea26741.js";
14
+ import "./Field.vue_vue_type_script_setup_true_lang-fded4f75.js";
15
15
  import "./Label.vue_vue_type_script_setup_true_lang-b6ba2f02.js";
16
16
  /**
17
17
  * Vue Currency Input 3.1.0
@@ -26,7 +26,7 @@ import "./Backdrop.js";
26
26
  import "./Input.js";
27
27
  import "lodash-es/isNil";
28
28
  import "./utils/i18n.js";
29
- import "./Field.vue_vue_type_script_setup_true_lang-3ea26741.js";
29
+ import "./Field.vue_vue_type_script_setup_true_lang-fded4f75.js";
30
30
  var re = /* @__PURE__ */ ((l) => (l.Cascade = "cascade", l.Nested = "nested", l))(re || {});
31
31
  function Pe({
32
32
  schema: l,
@@ -22,7 +22,7 @@ import "./index-9e1095ef.js";
22
22
  import "./Icon.vue_used_vue_type_style_index_0_lang.module-eb359559.js";
23
23
  import "lodash-es/isNil";
24
24
  import "./utils/i18n.js";
25
- import "./Field.vue_vue_type_script_setup_true_lang-3ea26741.js";
25
+ import "./Field.vue_vue_type_script_setup_true_lang-fded4f75.js";
26
26
  import "./Label.vue_vue_type_script_setup_true_lang-b6ba2f02.js";
27
27
  function so(e, t) {
28
28
  const r = Ae(e);
package/dist/Field.js CHANGED
@@ -1,4 +1,4 @@
1
- import { _ as o } from "./Field.vue_vue_type_script_setup_true_lang-3ea26741.js";
1
+ import { _ as o } from "./Field.vue_vue_type_script_setup_true_lang-fded4f75.js";
2
2
  import "vue";
3
3
  import "lodash-es/uniqueId";
4
4
  import "./Label.vue_vue_type_script_setup_true_lang-b6ba2f02.js";
@@ -1,7 +1,7 @@
1
- import { defineComponent as _, useAttrs as B, useSlots as T, computed as l, openBlock as s, createBlock as w, resolveDynamicComponent as k, mergeProps as O, unref as f, withCtx as b, normalizeClass as R, createTextVNode as q, toDisplayString as h, createCommentVNode as m, createElementBlock as o, renderSlot as u } from "vue";
1
+ import { defineComponent as _, useAttrs as B, useSlots as T, computed as l, openBlock as a, createBlock as w, resolveDynamicComponent as k, mergeProps as O, unref as f, withCtx as b, createTextVNode as R, toDisplayString as h, createCommentVNode as m, createElementBlock as o, renderSlot as u } from "vue";
2
2
  import p from "lodash-es/uniqueId";
3
- import { _ as E } from "./Label.vue_vue_type_script_setup_true_lang-b6ba2f02.js";
4
- const L = ["aria-labelledby"], S = ["id"], C = {
3
+ import { _ as q } from "./Label.vue_vue_type_script_setup_true_lang-b6ba2f02.js";
4
+ const E = ["aria-labelledby"], L = ["id"], S = {
5
5
  key: 4,
6
6
  class: "stash-field-hint tw-mt-1 tw-block tw-whitespace-pre-line tw-text-xs",
7
7
  "data-test": "stash-field-hint"
@@ -9,7 +9,7 @@ const L = ["aria-labelledby"], S = ["id"], C = {
9
9
  key: 5,
10
10
  class: "stash-field-hint tw-mt-1 tw-whitespace-pre-line tw-text-xs",
11
11
  "data-test": "stash-field-hint"
12
- }, N = /* @__PURE__ */ _({
12
+ }, D = /* @__PURE__ */ _({
13
13
  inheritAttrs: !1,
14
14
  __name: "Field",
15
15
  props: {
@@ -26,11 +26,11 @@ const L = ["aria-labelledby"], S = ["id"], C = {
26
26
  disabled: { type: Boolean, default: !1 }
27
27
  },
28
28
  setup(v) {
29
- const e = v, y = B(), r = T(), d = l(() => e.id || p("stash-field-")), i = l(() => e.errorId || p("stash-field-error-")), a = l(() => p("stash-field-label-")), n = l(() => !!e.errorText), I = l(() => e.fieldset ? "fieldset" : "div"), x = l(() => {
29
+ const e = v, y = B(), r = T(), d = l(() => e.id || p("stash-field-")), i = l(() => e.errorId || p("stash-field-error-")), s = l(() => p("stash-field-label-")), n = l(() => !!e.errorText), I = l(() => e.fieldset ? "fieldset" : "div"), x = l(() => {
30
30
  const { placeholder: t, ...c } = y;
31
31
  return c;
32
32
  });
33
- return (t, c) => (s(), w(k(I.value), O({
33
+ return (t, c) => (a(), w(k(I.value), O({
34
34
  "data-test": "stash-field",
35
35
  class: ["stash-field", [
36
36
  { "tw-p-0": e.fieldset },
@@ -40,10 +40,9 @@ const L = ["aria-labelledby"], S = ["id"], C = {
40
40
  ]]
41
41
  }, x.value), {
42
42
  default: b(() => [
43
- e.label ? (s(), w(E, {
43
+ e.label ? (a(), w(q, {
44
44
  key: 0,
45
- id: a.value,
46
- class: R({ "tw-mb-1.5": !!e.isReadOnly }),
45
+ id: s.value,
47
46
  for: d.value,
48
47
  "has-error": n.value,
49
48
  "is-required": t.isRequired,
@@ -52,37 +51,37 @@ const L = ["aria-labelledby"], S = ["id"], C = {
52
51
  disabled: e.disabled
53
52
  }, {
54
53
  default: b(() => [
55
- q(h(e.label), 1)
54
+ R(h(e.label), 1)
56
55
  ]),
57
56
  _: 1
58
- }, 8, ["id", "class", "for", "has-error", "is-required", "show-optional", "legend", "disabled"])) : m("", !0),
59
- e.isReadOnly ? (s(), o("div", {
57
+ }, 8, ["id", "for", "has-error", "is-required", "show-optional", "legend", "disabled"])) : m("", !0),
58
+ e.isReadOnly ? (a(), o("div", {
60
59
  key: 1,
61
- "aria-labelledby": a.value
60
+ "aria-labelledby": s.value
62
61
  }, [
63
62
  u(t.$slots, "default", {
64
63
  fieldId: d.value,
65
64
  fieldErrorId: i.value,
66
65
  hasError: n.value,
67
66
  isRequired: t.isRequired,
68
- labelId: a.value,
67
+ labelId: s.value,
69
68
  showOptionalInLabel: e.showOptionalInLabel
70
69
  })
71
- ], 8, L)) : u(t.$slots, "default", {
70
+ ], 8, E)) : u(t.$slots, "default", {
72
71
  key: 2,
73
72
  fieldId: d.value,
74
73
  fieldErrorId: i.value,
75
74
  hasError: n.value,
76
75
  isRequired: t.isRequired,
77
- labelId: a.value,
76
+ labelId: s.value,
78
77
  showOptionalInLabel: e.showOptionalInLabel
79
78
  }),
80
- e.errorText ? (s(), o("span", {
79
+ e.errorText ? (a(), o("span", {
81
80
  key: 3,
82
81
  id: i.value,
83
82
  class: "stash-field-error tw-mt-1 tw-block tw-whitespace-pre-line tw-text-xs tw-text-red-500",
84
83
  "data-test": "stash-field-error"
85
- }, h(e.errorText), 9, S)) : e.hintText && !e.isReadOnly ? (s(), o("span", C, h(e.hintText), 1)) : f(r).hint && !e.isReadOnly ? (s(), o("div", g, [
84
+ }, h(e.errorText), 9, L)) : e.hintText && !e.isReadOnly ? (a(), o("span", S, h(e.hintText), 1)) : f(r).hint && !e.isReadOnly ? (a(), o("div", g, [
86
85
  u(t.$slots, "hint")
87
86
  ])) : m("", !0)
88
87
  ]),
@@ -91,6 +90,6 @@ const L = ["aria-labelledby"], S = ["id"], C = {
91
90
  }
92
91
  });
93
92
  export {
94
- N as _
93
+ D as _
95
94
  };
96
- //# sourceMappingURL=Field.vue_vue_type_script_setup_true_lang-3ea26741.js.map
95
+ //# sourceMappingURL=Field.vue_vue_type_script_setup_true_lang-fded4f75.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Field.vue_vue_type_script_setup_true_lang-3ea26741.js","sources":["../src/components/Field/Field.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import uniqueId from 'lodash-es/uniqueId';\n import { computed, useAttrs, useSlots } from 'vue';\n\n import Label from '../Label/Label.vue';\n\n defineOptions({\n inheritAttrs: false,\n });\n\n export interface FieldProps {\n /**\n * Adds spacing under the field that is consistent whether hint/error text is displayed.\n */\n addBottomSpace?: boolean;\n\n /**\n * Error text to display. Replaces `hintText` (if provided) & adds error styling.\n */\n errorText?: string;\n\n /**\n * Displays text below the input; hidden when the isReadOnly prop is truthy.\n */\n hintText?: string;\n\n /**\n * ID for the Label and Input; must be unique\n */\n id?: string;\n\n /**\n * ID for the error text element; useful for aria-errormessage\n */\n errorId?: string;\n\n /**\n * Whether it's a readonly field.\n */\n isReadOnly?: boolean;\n\n /**\n * Whether the field is required.\n */\n isRequired?: boolean;\n\n /**\n * Label to render above the input.\n */\n label?: string;\n\n /**\n * Show \"(optional)\" to the right of the label text\n */\n showOptionalInLabel?: boolean;\n\n /**\n * Indicates wheter the field is a fieldset or not\n */\n fieldset?: boolean;\n\n /**\n * Indicates whether the field is disabled.\n */\n disabled?: boolean;\n }\n\n const props = withDefaults(defineProps<FieldProps>(), {\n addBottomSpace: false,\n errorText: undefined,\n hintText: undefined,\n id: undefined,\n errorId: undefined,\n isRequired: false,\n label: undefined,\n showOptionalInLabel: false,\n fieldset: false,\n disabled: false,\n });\n const attrs = useAttrs();\n const slots = useSlots();\n const fieldId = computed(() => props.id || uniqueId('stash-field-'));\n const fieldErrorId = computed(() => props.errorId || uniqueId('stash-field-error-'));\n const labelId = computed(() => uniqueId('stash-field-label-'));\n const hasError = computed(() => !!props.errorText);\n const wrapperElement = computed(() => (props.fieldset ? 'fieldset' : 'div'));\n\n // Any attributes that are unique to form elements, you want to exclude from\n // being bound from the root element.\n const rootAttrs = computed(() => {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { placeholder, ...otherAttrs } = attrs;\n\n return otherAttrs;\n });\n</script>\n\n<template>\n <component\n :is=\"wrapperElement\"\n data-test=\"stash-field\"\n class=\"stash-field\"\n :class=\"[\n { 'tw-p-0': props.fieldset },\n { 'tw-mb-9': props.addBottomSpace && !props.errorText && !props.hintText && !slots.hint },\n { 'tw-mb-4': props.addBottomSpace && (props.errorText || props.hintText || slots.hint) },\n { 'stash-field--disabled': props.disabled },\n ]\"\n v-bind=\"rootAttrs\"\n >\n <Label\n v-if=\"props.label\"\n :id=\"labelId\"\n :class=\"{ 'tw-mb-1.5': !!props.isReadOnly }\"\n :for=\"fieldId\"\n :has-error=\"hasError\"\n :is-required=\"isRequired\"\n :show-optional=\"props.showOptionalInLabel\"\n :legend=\"props.fieldset\"\n :disabled=\"props.disabled\"\n >\n {{ props.label }}\n </Label>\n\n <!-- @slot for the form field; the Label can also be rendered here instead of using the label prop -->\n <template v-if=\"props.isReadOnly\">\n <div :aria-labelledby=\"labelId\">\n <slot\n :field-id=\"fieldId\"\n :field-error-id=\"fieldErrorId\"\n :has-error=\"hasError\"\n :is-required=\"isRequired\"\n :label-id=\"labelId\"\n :show-optional-in-label=\"props.showOptionalInLabel\"\n ></slot>\n </div>\n </template>\n <template v-else>\n <slot\n :field-id=\"fieldId\"\n :field-error-id=\"fieldErrorId\"\n :has-error=\"hasError\"\n :is-required=\"isRequired\"\n :label-id=\"labelId\"\n :show-optional-in-label=\"props.showOptionalInLabel\"\n ></slot>\n </template>\n\n <span\n v-if=\"props.errorText\"\n :id=\"fieldErrorId\"\n class=\"stash-field-error tw-mt-1 tw-block tw-whitespace-pre-line tw-text-xs tw-text-red-500\"\n data-test=\"stash-field-error\"\n >\n {{ props.errorText }}\n </span>\n\n <span\n v-else-if=\"props.hintText && !props.isReadOnly\"\n class=\"stash-field-hint tw-mt-1 tw-block tw-whitespace-pre-line tw-text-xs\"\n data-test=\"stash-field-hint\"\n >\n {{ props.hintText }}\n </span>\n\n <div\n v-else-if=\"slots.hint && !props.isReadOnly\"\n class=\"stash-field-hint tw-mt-1 tw-whitespace-pre-line tw-text-xs\"\n data-test=\"stash-field-hint\"\n >\n <!-- @slot for displaying hint text below the field -->\n <slot name=\"hint\"></slot>\n </div>\n </component>\n</template>\n"],"names":["props","__props","attrs","useAttrs","slots","useSlots","fieldId","computed","uniqueId","fieldErrorId","labelId","hasError","wrapperElement","rootAttrs","placeholder","otherAttrs"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmEE,UAAMA,IAAQC,GAYRC,IAAQC,KACRC,IAAQC,KACRC,IAAUC,EAAS,MAAMP,EAAM,MAAMQ,EAAS,cAAc,CAAC,GAC7DC,IAAeF,EAAS,MAAMP,EAAM,WAAWQ,EAAS,oBAAoB,CAAC,GAC7EE,IAAUH,EAAS,MAAMC,EAAS,oBAAoB,CAAC,GACvDG,IAAWJ,EAAS,MAAM,CAAC,CAACP,EAAM,SAAS,GAC3CY,IAAiBL,EAAS,MAAOP,EAAM,WAAW,aAAa,KAAM,GAIrEa,IAAYN,EAAS,MAAM;AAE/B,YAAM,EAAE,aAAAO,GAAa,GAAGC,EAAA,IAAeb;AAEhC,aAAAa;AAAA,IAAA,CACR;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"Field.vue_vue_type_script_setup_true_lang-fded4f75.js","sources":["../src/components/Field/Field.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import uniqueId from 'lodash-es/uniqueId';\n import { computed, useAttrs, useSlots } from 'vue';\n\n import Label from '../Label/Label.vue';\n\n defineOptions({\n inheritAttrs: false,\n });\n\n export interface FieldProps {\n /**\n * Adds spacing under the field that is consistent whether hint/error text is displayed.\n */\n addBottomSpace?: boolean;\n\n /**\n * Error text to display. Replaces `hintText` (if provided) & adds error styling.\n */\n errorText?: string;\n\n /**\n * Displays text below the input; hidden when the isReadOnly prop is truthy.\n */\n hintText?: string;\n\n /**\n * ID for the Label and Input; must be unique\n */\n id?: string;\n\n /**\n * ID for the error text element; useful for aria-errormessage\n */\n errorId?: string;\n\n /**\n * Whether it's a readonly field.\n */\n isReadOnly?: boolean;\n\n /**\n * Whether the field is required.\n */\n isRequired?: boolean;\n\n /**\n * Label to render above the input.\n */\n label?: string;\n\n /**\n * Show \"(optional)\" to the right of the label text\n */\n showOptionalInLabel?: boolean;\n\n /**\n * Indicates wheter the field is a fieldset or not\n */\n fieldset?: boolean;\n\n /**\n * Indicates whether the field is disabled.\n */\n disabled?: boolean;\n }\n\n const props = withDefaults(defineProps<FieldProps>(), {\n addBottomSpace: false,\n errorText: undefined,\n hintText: undefined,\n id: undefined,\n errorId: undefined,\n isRequired: false,\n label: undefined,\n showOptionalInLabel: false,\n fieldset: false,\n disabled: false,\n });\n const attrs = useAttrs();\n const slots = useSlots();\n const fieldId = computed(() => props.id || uniqueId('stash-field-'));\n const fieldErrorId = computed(() => props.errorId || uniqueId('stash-field-error-'));\n const labelId = computed(() => uniqueId('stash-field-label-'));\n const hasError = computed(() => !!props.errorText);\n const wrapperElement = computed(() => (props.fieldset ? 'fieldset' : 'div'));\n\n // Any attributes that are unique to form elements, you want to exclude from\n // being bound from the root element.\n const rootAttrs = computed(() => {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { placeholder, ...otherAttrs } = attrs;\n\n return otherAttrs;\n });\n</script>\n\n<template>\n <component\n :is=\"wrapperElement\"\n data-test=\"stash-field\"\n class=\"stash-field\"\n :class=\"[\n { 'tw-p-0': props.fieldset },\n { 'tw-mb-9': props.addBottomSpace && !props.errorText && !props.hintText && !slots.hint },\n { 'tw-mb-4': props.addBottomSpace && (props.errorText || props.hintText || slots.hint) },\n { 'stash-field--disabled': props.disabled },\n ]\"\n v-bind=\"rootAttrs\"\n >\n <Label\n v-if=\"props.label\"\n :id=\"labelId\"\n :for=\"fieldId\"\n :has-error=\"hasError\"\n :is-required=\"isRequired\"\n :show-optional=\"props.showOptionalInLabel\"\n :legend=\"props.fieldset\"\n :disabled=\"props.disabled\"\n >\n {{ props.label }}\n </Label>\n\n <!-- @slot for the form field; the Label can also be rendered here instead of using the label prop -->\n <template v-if=\"props.isReadOnly\">\n <div :aria-labelledby=\"labelId\">\n <slot\n :field-id=\"fieldId\"\n :field-error-id=\"fieldErrorId\"\n :has-error=\"hasError\"\n :is-required=\"isRequired\"\n :label-id=\"labelId\"\n :show-optional-in-label=\"props.showOptionalInLabel\"\n ></slot>\n </div>\n </template>\n <template v-else>\n <slot\n :field-id=\"fieldId\"\n :field-error-id=\"fieldErrorId\"\n :has-error=\"hasError\"\n :is-required=\"isRequired\"\n :label-id=\"labelId\"\n :show-optional-in-label=\"props.showOptionalInLabel\"\n ></slot>\n </template>\n\n <span\n v-if=\"props.errorText\"\n :id=\"fieldErrorId\"\n class=\"stash-field-error tw-mt-1 tw-block tw-whitespace-pre-line tw-text-xs tw-text-red-500\"\n data-test=\"stash-field-error\"\n >\n {{ props.errorText }}\n </span>\n\n <span\n v-else-if=\"props.hintText && !props.isReadOnly\"\n class=\"stash-field-hint tw-mt-1 tw-block tw-whitespace-pre-line tw-text-xs\"\n data-test=\"stash-field-hint\"\n >\n {{ props.hintText }}\n </span>\n\n <div\n v-else-if=\"slots.hint && !props.isReadOnly\"\n class=\"stash-field-hint tw-mt-1 tw-whitespace-pre-line tw-text-xs\"\n data-test=\"stash-field-hint\"\n >\n <!-- @slot for displaying hint text below the field -->\n <slot name=\"hint\"></slot>\n </div>\n </component>\n</template>\n"],"names":["props","__props","attrs","useAttrs","slots","useSlots","fieldId","computed","uniqueId","fieldErrorId","labelId","hasError","wrapperElement","rootAttrs","placeholder","otherAttrs"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmEE,UAAMA,IAAQC,GAYRC,IAAQC,KACRC,IAAQC,KACRC,IAAUC,EAAS,MAAMP,EAAM,MAAMQ,EAAS,cAAc,CAAC,GAC7DC,IAAeF,EAAS,MAAMP,EAAM,WAAWQ,EAAS,oBAAoB,CAAC,GAC7EE,IAAUH,EAAS,MAAMC,EAAS,oBAAoB,CAAC,GACvDG,IAAWJ,EAAS,MAAM,CAAC,CAACP,EAAM,SAAS,GAC3CY,IAAiBL,EAAS,MAAOP,EAAM,WAAW,aAAa,KAAM,GAIrEa,IAAYN,EAAS,MAAM;AAE/B,YAAM,EAAE,aAAAO,GAAa,GAAGC,EAAA,IAAeb;AAEhC,aAAAa;AAAA,IAAA,CACR;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as $, computed as p, openBlock as r, createBlock as C, withCtx as u, createElementVNode as s, createElementBlock as d, withDirectives as f, vModelCheckbox as v, createVNode as _, withKeys as h, createTextVNode as b, toDisplayString as x, unref as A, createCommentVNode as B, Fragment as E, renderList as K } from "vue";
2
2
  import { t as N } from "./locale.js";
3
- import { _ as F } from "./Field.vue_vue_type_script_setup_true_lang-3ea26741.js";
3
+ import { _ as F } from "./Field.vue_vue_type_script_setup_true_lang-fded4f75.js";
4
4
  import y from "./FilterChip.js";
5
5
  import "lodash-es/get";
6
6
  import "lodash-es/uniqueId";
package/dist/Filters.js CHANGED
@@ -37,7 +37,7 @@ import "./utils/normalizeDate.js";
37
37
  import "./toTimeZone-a2ed6470.js";
38
38
  import "lodash-es/isNil";
39
39
  import "./utils/i18n.js";
40
- import "./Field.vue_vue_type_script_setup_true_lang-3ea26741.js";
40
+ import "./Field.vue_vue_type_script_setup_true_lang-fded4f75.js";
41
41
  import "./Label.vue_vue_type_script_setup_true_lang-b6ba2f02.js";
42
42
  import "./floating-ui.vue-8d7f7932.js";
43
43
  import "lodash-es/isEmpty";
@@ -5,7 +5,7 @@ import "./constants.js";
5
5
  import "./locale.js";
6
6
  import "lodash-es/get";
7
7
  import "lodash-es/isNil";
8
- import "./Field.vue_vue_type_script_setup_true_lang-3ea26741.js";
8
+ import "./Field.vue_vue_type_script_setup_true_lang-fded4f75.js";
9
9
  import "lodash-es/uniqueId";
10
10
  import "./Label.vue_vue_type_script_setup_true_lang-b6ba2f02.js";
11
11
  import "./Icon.js";
package/dist/Input.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as U, useSlots as G, useCssModule as L, useAttrs as O, ref as f, computed as v, watchEffect as W, onMounted as j, openBlock as m, createBlock as V, mergeProps as k, unref as a, createSlots as q, withCtx as N, createElementVNode as x, withDirectives as H, vModelDynamic as J, createElementBlock as B, normalizeClass as y, renderSlot as b, createCommentVNode as C } from "vue";
2
2
  import I from "lodash-es/isNil";
3
3
  import { convertDecimal as $, sanitizeDecimal as K, decimalSeparator as _ } from "./utils/i18n.js";
4
- import { _ as Q } from "./Field.vue_vue_type_script_setup_true_lang-3ea26741.js";
4
+ import { _ as Q } from "./Field.vue_vue_type_script_setup_true_lang-fded4f75.js";
5
5
  import R from "./Icon.js";
6
6
  import { _ as X } from "./_plugin-vue_export-helper-dad06003.js";
7
7
  import "./constants.js";
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as B, useAttrs as S, useSlots as k, useCssModule as T, ref as d, computed as c, watchEffect as $, watch as v, openBlock as E, createBlock as A, mergeProps as m, createSlots as M, withCtx as f, createElementVNode as O, normalizeClass as z, unref as i, createVNode as h, renderSlot as F } from "vue";
2
- import { _ as N } from "./Field.vue_vue_type_script_setup_true_lang-3ea26741.js";
2
+ import { _ as N } from "./Field.vue_vue_type_script_setup_true_lang-fded4f75.js";
3
3
  import U from "./Input.js";
4
4
  import P from "./Select.js";
5
5
  import { _ as j } from "./_plugin-vue_export-helper-dad06003.js";
package/dist/ListView.js CHANGED
@@ -46,7 +46,7 @@ import "./formatDateTime-a5e70901.js";
46
46
  import "./utils/normalizeDate.js";
47
47
  import "./toTimeZone-a2ed6470.js";
48
48
  import "./InputOptions.js";
49
- import "./Field.vue_vue_type_script_setup_true_lang-3ea26741.js";
49
+ import "./Field.vue_vue_type_script_setup_true_lang-fded4f75.js";
50
50
  import "./Label.vue_vue_type_script_setup_true_lang-b6ba2f02.js";
51
51
  import "./Select.js";
52
52
  import "./floating-ui.vue-8d7f7932.js";
package/dist/Module.js CHANGED
@@ -1,9 +1,9 @@
1
- import { defineComponent as i, onMounted as l, provide as s, computed as d, openBlock as p, createBlock as b, normalizeClass as u, unref as e, withCtx as m, renderSlot as c } from "vue";
2
- import o from "@leaflink/snitch";
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";
1
+ import { defineComponent as n, onMounted as l, provide as s, computed as d, openBlock as p, createBlock as b, normalizeClass as u, unref as e, withCtx as m, renderSlot as c } from "vue";
2
+ import r from "@leaflink/snitch";
3
+ import { M as v } from "./Module.keys-2cc7d830.js";
4
+ import { _ as w } from "./Box.vue_vue_type_script_setup_true_lang-69e5176b.js";
5
5
  import { M as t } from "./Module.types-3f78f2a0.js";
6
- const y = /* @__PURE__ */ i({
6
+ const y = /* @__PURE__ */ n({
7
7
  name: "ll-module",
8
8
  __name: "Module",
9
9
  props: {
@@ -13,13 +13,13 @@ const y = /* @__PURE__ */ i({
13
13
  disableElevation: { type: Boolean },
14
14
  radius: {}
15
15
  },
16
- setup(r) {
17
- const a = r;
16
+ setup(o) {
17
+ const a = o;
18
18
  return l(() => {
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(w.key, { variant: d(() => a.variant) }), (n, f) => (p(), b(v, {
19
+ a.variant === "card" && r.warn('Card Modules are no longer a thing. You\'re probably looking for `<RadioGroup variant="card">`.'), a.variant === "list" && r.warn("Only used with deprecated ListView component. Use `table` variant with `Table` component instead.");
20
+ }), s(v.key, { variant: d(() => a.variant) }), (i, f) => (p(), b(w, {
21
21
  class: u(["stash-module tw-flex tw-flex-col", {
22
- "tw-bg-transparent tw-shadow-none lg:tw-shadow": a.variant === e(t).Table,
22
+ "tw-bg-transparent tw-shadow": a.variant === e(t).Table,
23
23
  "tw-border tw-border-ice-500": a.variant === e(t).Card,
24
24
  "tw-mb-6 tw-bg-transparent tw-shadow-none lg:tw-shadow": a.variant === e(t).List
25
25
  }]),
@@ -29,14 +29,14 @@ const y = /* @__PURE__ */ i({
29
29
  "disable-elevation": a.disableElevation || a.variant === e(t).Table || a.variant === e(t).Card || a.variant === e(t).List
30
30
  }, {
31
31
  default: m(() => [
32
- c(n.$slots, "default")
32
+ c(i.$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
- w as MODULE_INJECTION,
39
+ v as MODULE_INJECTION,
40
40
  t 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: '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-bg-transparent tw-shadow-none lg:tw-shadow': props.variant === ModuleVariant.Table,\n 'tw-border tw-border-ice-500': props.variant === ModuleVariant.Card,\n 'tw-mb-6 tw-bg-transparent tw-shadow-none lg:tw-shadow': 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":["props","__props","onMounted","logger","provide","MODULE_INJECTION","computed"],"mappings":";;;;;;;;;;;;;;;;AA2BE,UAAMA,IAAQC;AAId,WAAAC,EAAU,MAAM;AACV,MAAAF,EAAM,YAAY,UACpBG,EAAO,KAAK,iGAAiG,GAG3GH,EAAM,YAAY,UACpBG,EAAO,KAAK,mGAAmG;AAAA,IACjH,CACD,GAEOC,EAAAC,EAAiB,KAAK,EAAE,SAASC,EAAS,MAAMN,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: '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-bg-transparent tw-shadow': props.variant === ModuleVariant.Table,\n 'tw-border tw-border-ice-500': props.variant === ModuleVariant.Card,\n 'tw-mb-6 tw-bg-transparent tw-shadow-none lg:tw-shadow': 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":["props","__props","onMounted","logger","provide","MODULE_INJECTION","computed"],"mappings":";;;;;;;;;;;;;;;;AA2BE,UAAMA,IAAQC;AAId,WAAAC,EAAU,MAAM;AACV,MAAAF,EAAM,YAAY,UACpBG,EAAO,KAAK,iGAAiG,GAG3GH,EAAM,YAAY,UACpBG,EAAO,KAAK,mGAAmG;AAAA,IACjH,CACD,GAEOC,EAAAC,EAAiB,KAAK,EAAE,SAASC,EAAS,MAAMN,EAAM,OAAO,EAAA,CAAG;;;;;;;;;;;;;;;;;;"}
@@ -1,6 +1,6 @@
1
- import { defineComponent as M, useCssModule as C, useSlots as S, ref as B, inject as $, computed as u, openBlock as l, createElementBlock as r, normalizeClass as n, unref as a, createElementVNode as i, renderSlot as o, createCommentVNode as c, createBlock as p, resolveDynamicComponent as _, withCtx as b, createTextVNode as V, toDisplayString as v } from "vue";
2
- import { M as y } from "./Module.keys-2cc7d830.js";
3
- import { M as m } from "./Module.types-3f78f2a0.js";
1
+ import { defineComponent as M, useCssModule as C, useSlots as S, ref as B, inject as $, computed as u, openBlock as l, createElementBlock as r, normalizeClass as n, unref as a, createElementVNode as i, renderSlot as o, createCommentVNode as m, createBlock as p, resolveDynamicComponent as _, withCtx as b, createTextVNode as V, toDisplayString as g } from "vue";
2
+ import { M as v } from "./Module.keys-2cc7d830.js";
3
+ import { M as c } from "./Module.types-3f78f2a0.js";
4
4
  import { _ as E } from "./_plugin-vue_export-helper-dad06003.js";
5
5
  const N = { class: "tw-flex tw-items-center" }, z = {
6
6
  class: "stash-module-header__content__text",
@@ -18,8 +18,8 @@ const N = { class: "tw-flex tw-items-center" }, z = {
18
18
  preventActionsWrap: { type: Boolean, default: !1 },
19
19
  underline: { type: Boolean, default: !1 }
20
20
  },
21
- setup(g) {
22
- const t = g, k = C(), s = S(), d = B(), w = $(y.key, y.defaults);
21
+ setup(y) {
22
+ const t = y, k = C(), s = S(), d = B(), w = $(v.key, v.defaults);
23
23
  if (!w.variant)
24
24
  throw new Error("<ModuleHeader> must be used within a <Module> component.");
25
25
  d.value = w.variant.value;
@@ -46,9 +46,10 @@ const N = { class: "tw-flex tw-items-center" }, z = {
46
46
  });
47
47
  return (e, I) => (l(), r("header", {
48
48
  class: n(["stash-module-header tw-flex tw-flex-wrap tw-justify-between", {
49
- "tw-rounded-t tw-border-b tw-border-ice-500 tw-bg-ice-100 tw-p-3 lg:tw-px-6": d.value === a(m).Card,
50
- "tw-mb-6 tw-rounded tw-bg-white tw-px-3 tw-pt-3 tw-shadow lg:tw-mb-0 lg:tw-rounded-b-none lg:tw-px-6 lg:tw-pt-6 lg:tw-shadow-none": d.value === a(m).Table || d.value === a(m).List,
51
- "tw-mb-3 tw-border-b tw-border-ice-200 lg:tw-mb-6": t.underline
49
+ "tw-rounded-t tw-border-b tw-border-ice-500 tw-bg-ice-100 tw-p-3 lg:tw-px-6": d.value === a(c).Card,
50
+ "tw-mb-6 tw-rounded tw-bg-white tw-px-3 tw-pt-3 tw-shadow lg:tw-mb-0 lg:tw-rounded-b-none lg:tw-px-6 lg:tw-pt-6 lg:tw-shadow-none": d.value === a(c).List,
51
+ "tw-mb-3 tw-border-b tw-border-ice-200 lg:tw-mb-6": t.underline,
52
+ "tw-mb-6 tw-rounded-t tw-bg-white tw-px-3 tw-pt-3 lg:tw-mb-0 lg:tw-px-6 lg:tw-pt-6": d.value === a(c).Table
52
53
  }]),
53
54
  "data-test": "stash-module-header"
54
55
  }, [
@@ -63,7 +64,7 @@ const N = { class: "tw-flex tw-items-center" }, z = {
63
64
  "data-test": "stash-module-header|content-media"
64
65
  }, [
65
66
  o(e.$slots, "media")
66
- ], 2)) : c("", !0),
67
+ ], 2)) : m("", !0),
67
68
  i("div", z, [
68
69
  a(s).title ? o(e.$slots, "title", { key: 0 }) : x.value ? (l(), p(_(f.value), {
69
70
  key: 1,
@@ -77,13 +78,13 @@ const N = { class: "tw-flex tw-items-center" }, z = {
77
78
  })) : o(e.$slots, "default", { key: 2 }, () => [
78
79
  (l(), p(_(f.value), { class: "tw-my-0" }, {
79
80
  default: b(() => [
80
- V(v(t.title), 1)
81
+ V(g(t.title), 1)
81
82
  ]),
82
83
  _: 1
83
84
  }))
84
85
  ]),
85
86
  o(e.$slots, "description", {}, () => [
86
- t.description ? (l(), r("p", D, v(t.description), 1)) : c("", !0)
87
+ t.description ? (l(), r("p", D, g(t.description), 1)) : m("", !0)
87
88
  ])
88
89
  ])
89
90
  ])
@@ -99,7 +100,7 @@ const N = { class: "tw-flex tw-items-center" }, z = {
99
100
  "data-test": "stash-module-header|actions"
100
101
  }, [
101
102
  o(e.$slots, "actions")
102
- ], 2)) : c("", !0)
103
+ ], 2)) : m("", !0)
103
104
  ], 2));
104
105
  }
105
106
  }), T = "_media_ktx8r_3", j = {
@@ -1 +1 @@
1
- {"version":3,"file":"ModuleHeader.js","sources":["../src/components/ModuleHeader/ModuleHeader.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { computed, inject, 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\n // get the module variant from the parent module\n const moduleVariant = ref();\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 const is = computed(() => {\n let component: string;\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 isDefaultSlotSimpleString = computed(() => {\n if (!slots.default) {\n return false;\n }\n\n const defaultSlot = slots.default();\n return (\n defaultSlot.length === 1 &&\n typeof slots.default()[0].children === 'string' &&\n typeof slots.default()[0].type === 'symbol'\n );\n });\n\n const marginBottomClasses = computed(() => {\n const isBoxOrTableOrList = ['box', 'table', 'list'].includes(moduleVariant.value);\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-rounded-t tw-border-b tw-border-ice-500 tw-bg-ice-100 tw-p-3 lg:tw-px-6':\n moduleVariant === ModuleVariant.Card,\n 'tw-mb-6 tw-rounded tw-bg-white tw-px-3 tw-pt-3 tw-shadow lg:tw-mb-0 lg:tw-rounded-b-none lg:tw-px-6 lg:tw-pt-6 lg:tw-shadow-none':\n moduleVariant === ModuleVariant.Table || moduleVariant === ModuleVariant.List,\n 'tw-mb-3 tw-border-b tw-border-ice-200 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 Place an illustration that sits next to the header title & description. -->\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. **Deprecated**: Use the default slot or the `title` prop instead.\n -->\n <slot v-if=\"slots.title\" name=\"title\"></slot>\n\n <template v-else-if=\"isDefaultSlotSimpleString\">\n <component\n :is=\"is\"\n class=\"stash-module-header__default_slot_string tw-my-0\"\n data-test=\"stash-module-header|default-slot-text\"\n >\n <!-- @slot Header title. -->\n <slot></slot>\n </component>\n </template>\n <!-- @slot Header title. Falls back to the `title` prop. -->\n <slot v-else>\n <component :is=\"is\" class=\"tw-my-0\">{{ props.title }}</component>\n </slot>\n\n <!--\n @slot Header description, aka subtitle. Falls back to the `description` prop.\n -->\n <slot name=\"description\">\n <p v-if=\"props.description\" class=\"tw-mb-0 tw-mt-3\">{{ 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 Add action buttons or other CTAs. -->\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":["props","__props","classes","useCssModule","slots","useSlots","moduleVariant","ref","moduleInjectedValues","inject","MODULE_INJECTION","is","computed","component","isDefaultSlotSimpleString","marginBottomClasses","isBoxOrTableOrList"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAyCE,UAAMA,IAAQC,GAORC,IAAUC,KACVC,IAAQC,KAGRC,IAAgBC,KAChBC,IAAuBC,EAAOC,EAAiB,KAAKA,EAAiB,QAAQ;AAC/E,QAAA,CAACF,EAAqB;AAClB,YAAA,IAAI,MAAM,0DAA0D;AAE9D,IAAAF,EAAA,QAAQE,EAAqB,QAAQ;AAE7C,UAAAG,IAAKC,EAAS,MAAM;AACpB,UAAAC;AAEJ,cAAQb,EAAM,MAAM;AAAA,QAClB,KAAK;AACS,UAAAa,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,GAEKC,IAA4BF,EAAS,MACpCR,EAAM,UAISA,EAAM,UAEZ,WAAW,KACvB,OAAOA,EAAM,QAAU,EAAA,CAAC,EAAE,YAAa,YACvC,OAAOA,EAAM,UAAU,CAAC,EAAE,QAAS,WAP5B,EASV,GAEKW,IAAsBH,EAAS,MAAM;AACnC,YAAAI,IAAqB,CAAC,OAAO,SAAS,MAAM,EAAE,SAASV,EAAc,KAAK;AAE5E,aAAAU,KAAsB,CAAChB,EAAM,YACxB,uBACEgB,KAAsBhB,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, 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\n // get the module variant from the parent module\n const moduleVariant = ref();\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 const is = computed(() => {\n let component: string;\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 isDefaultSlotSimpleString = computed(() => {\n if (!slots.default) {\n return false;\n }\n\n const defaultSlot = slots.default();\n return (\n defaultSlot.length === 1 &&\n typeof slots.default()[0].children === 'string' &&\n typeof slots.default()[0].type === 'symbol'\n );\n });\n\n const marginBottomClasses = computed(() => {\n const isBoxOrTableOrList = ['box', 'table', 'list'].includes(moduleVariant.value);\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-rounded-t tw-border-b tw-border-ice-500 tw-bg-ice-100 tw-p-3 lg:tw-px-6':\n moduleVariant === ModuleVariant.Card,\n 'tw-mb-6 tw-rounded tw-bg-white tw-px-3 tw-pt-3 tw-shadow lg:tw-mb-0 lg:tw-rounded-b-none lg:tw-px-6 lg:tw-pt-6 lg:tw-shadow-none':\n moduleVariant === ModuleVariant.List,\n 'tw-mb-3 tw-border-b tw-border-ice-200 lg:tw-mb-6': props.underline,\n 'tw-mb-6 tw-rounded-t tw-bg-white tw-px-3 tw-pt-3 lg:tw-mb-0 lg:tw-px-6 lg:tw-pt-6':\n moduleVariant === ModuleVariant.Table,\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 Place an illustration that sits next to the header title & description. -->\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. **Deprecated**: Use the default slot or the `title` prop instead.\n -->\n <slot v-if=\"slots.title\" name=\"title\"></slot>\n\n <template v-else-if=\"isDefaultSlotSimpleString\">\n <component\n :is=\"is\"\n class=\"stash-module-header__default_slot_string tw-my-0\"\n data-test=\"stash-module-header|default-slot-text\"\n >\n <!-- @slot Header title. -->\n <slot></slot>\n </component>\n </template>\n <!-- @slot Header title. Falls back to the `title` prop. -->\n <slot v-else>\n <component :is=\"is\" class=\"tw-my-0\">{{ props.title }}</component>\n </slot>\n\n <!--\n @slot Header description, aka subtitle. Falls back to the `description` prop.\n -->\n <slot name=\"description\">\n <p v-if=\"props.description\" class=\"tw-mb-0 tw-mt-3\">{{ 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 Add action buttons or other CTAs. -->\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":["props","__props","classes","useCssModule","slots","useSlots","moduleVariant","ref","moduleInjectedValues","inject","MODULE_INJECTION","is","computed","component","isDefaultSlotSimpleString","marginBottomClasses","isBoxOrTableOrList"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAyCE,UAAMA,IAAQC,GAORC,IAAUC,KACVC,IAAQC,KAGRC,IAAgBC,KAChBC,IAAuBC,EAAOC,EAAiB,KAAKA,EAAiB,QAAQ;AAC/E,QAAA,CAACF,EAAqB;AAClB,YAAA,IAAI,MAAM,0DAA0D;AAE9D,IAAAF,EAAA,QAAQE,EAAqB,QAAQ;AAE7C,UAAAG,IAAKC,EAAS,MAAM;AACpB,UAAAC;AAEJ,cAAQb,EAAM,MAAM;AAAA,QAClB,KAAK;AACS,UAAAa,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,GAEKC,IAA4BF,EAAS,MACpCR,EAAM,UAISA,EAAM,UAEZ,WAAW,KACvB,OAAOA,EAAM,QAAU,EAAA,CAAC,EAAE,YAAa,YACvC,OAAOA,EAAM,UAAU,CAAC,EAAE,QAAS,WAP5B,EASV,GAEKW,IAAsBH,EAAS,MAAM;AACnC,YAAAI,IAAqB,CAAC,OAAO,SAAS,MAAM,EAAE,SAASV,EAAc,KAAK;AAE5E,aAAAU,KAAsB,CAAChB,EAAM,YACxB,uBACEgB,KAAsBhB,EAAM,YAC9B,YAEA;AAAA,IACT,CACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as $, inject as k, useCssModule as V, openBlock as l, createElementBlock as n, normalizeClass as p, unref as e, Fragment as B, renderList as R, createElementVNode as i, toDisplayString as h, provide as C, computed as v, createBlock as I, withCtx as M, renderSlot as T, resolveDynamicComponent as G } from "vue";
2
2
  import E from "lodash-es/uniqueId";
3
- import { _ as O } from "./Field.vue_vue_type_script_setup_true_lang-3ea26741.js";
3
+ import { _ as O } from "./Field.vue_vue_type_script_setup_true_lang-fded4f75.js";
4
4
  import { R as y } from "./RadioGroup.keys-974818d6.js";
5
5
  import { _ as x } from "./_plugin-vue_export-helper-dad06003.js";
6
6
  import "./Label.vue_vue_type_script_setup_true_lang-b6ba2f02.js";
@@ -29,7 +29,7 @@ const W = ["id", "name", "value", "checked", "disabled"], j = ["for"], q = /* @_
29
29
  checked: e(d) === t.value,
30
30
  disabled: e(a) || t.disabled,
31
31
  onInput: _[0] || (_[0] = //@ts-ignore
32
- (...b) => e(o) && e(o)(...b))
32
+ (...w) => e(o) && e(o)(...w))
33
33
  }, null, 40, W),
34
34
  i("label", {
35
35
  for: `${e(s)}-${t.id}`
@@ -64,7 +64,7 @@ const W = ["id", "name", "value", "checked", "disabled"], j = ["for"], q = /* @_
64
64
  checked: e(d) === t.value,
65
65
  disabled: e(a) || t.disabled,
66
66
  onInput: _[0] || (_[0] = //@ts-ignore
67
- (...b) => e(o) && e(o)(...b))
67
+ (...w) => e(o) && e(o)(...w))
68
68
  }, null, 40, z),
69
69
  i("label", {
70
70
  for: `${e(s)}-${t.id}`
@@ -98,7 +98,7 @@ const W = ["id", "name", "value", "checked", "disabled"], j = ["for"], q = /* @_
98
98
  checked: e(d) === t.value,
99
99
  disabled: e(a) || t.disabled,
100
100
  onInput: _[0] || (_[0] = //@ts-ignore
101
- (...b) => e(o) && e(o)(...b))
101
+ (...w) => e(o) && e(o)(...w))
102
102
  }, null, 40, K),
103
103
  i("label", {
104
104
  for: `${e(s)}-${t.id}`
@@ -143,7 +143,7 @@ const W = ["id", "name", "value", "checked", "disabled"], j = ["for"], q = /* @_
143
143
  checked: e(d) === t.value,
144
144
  disabled: e(a) || t.disabled,
145
145
  onInput: _[0] || (_[0] = //@ts-ignore
146
- (...b) => e(o) && e(o)(...b))
146
+ (...w) => e(o) && e(o)(...w))
147
147
  }, null, 40, se),
148
148
  i("div", null, [
149
149
  i("span", null, h(t.text), 1)
@@ -172,7 +172,7 @@ const W = ["id", "name", "value", "checked", "disabled"], j = ["for"], q = /* @_
172
172
  }, ne = {
173
173
  $style: ie
174
174
  }, ue = /* @__PURE__ */ x(re, [["__cssModules", ne]]);
175
- var w = /* @__PURE__ */ ((u) => (u.Radio = "radio", u.Button = "button", u.Chip = "chip", u.Tile = "tile", u))(w || {});
175
+ var b = /* @__PURE__ */ ((u) => (u.Radio = "radio", u.Button = "button", u.Chip = "chip", u.Tile = "tile", u))(b || {});
176
176
  const ce = /* @__PURE__ */ $({
177
177
  __name: "RadioGroup",
178
178
  props: {
@@ -193,10 +193,10 @@ const ce = /* @__PURE__ */ $({
193
193
  emits: ["update:modelValue"],
194
194
  setup(u, { emit: r }) {
195
195
  const s = {
196
- [w.Button]: N,
197
- [w.Chip]: H,
198
- [w.Radio]: te,
199
- [w.Tile]: ue
196
+ [b.Button]: N,
197
+ [b.Chip]: H,
198
+ [b.Radio]: te,
199
+ [b.Tile]: ue
200
200
  }, a = u, f = r;
201
201
  function d(o) {
202
202
  f("update:modelValue", o.target.value);
@@ -232,9 +232,9 @@ const ce = /* @__PURE__ */ $({
232
232
  ], !0) : (l(), n("div", {
233
233
  key: 1,
234
234
  class: p(["tw-flex", {
235
- "tw-flex-wrap": a.variant !== e(w).Button,
236
- "tw-gap-x-1.5 tw-gap-y-3": a.variant === e(w).Chip,
237
- "tw-gap-6": a.variant === e(w).Radio || a.variant === e(w).Tile
235
+ "tw-flex-wrap": a.variant !== e(b).Button,
236
+ "tw-gap-x-1.5 tw-gap-y-3": a.variant === e(b).Chip,
237
+ "tw-gap-6": a.variant === e(b).Radio || a.variant === e(b).Tile
238
238
  }])
239
239
  }, [
240
240
  T(o.$slots, "default", {}, void 0, !0)
@@ -244,10 +244,10 @@ const ce = /* @__PURE__ */ $({
244
244
  }, 8, ["aria-errormessage", "aria-invalid", "label", "add-bottom-space", "error-id", "error-text", "hint-text", "show-optional-in-label", "is-required", "is-read-only"]));
245
245
  }
246
246
  });
247
- const $e = /* @__PURE__ */ x(ce, [["__scopeId", "data-v-f44396f6"]]);
247
+ const $e = /* @__PURE__ */ x(ce, [["__scopeId", "data-v-b73c0b83"]]);
248
248
  export {
249
249
  y as RADIO_GROUP_INJECTION,
250
- w as RadioGroupVariant,
250
+ b as RadioGroupVariant,
251
251
  $e as default
252
252
  };
253
253
  //# sourceMappingURL=RadioGroup.js.map