@leaflink/stash 49.3.2 → 49.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/dist/AddressSelect.js +2 -2
  2. package/dist/Badge.vue.d.ts +1 -1
  3. package/dist/CurrencyInput.js +4 -3
  4. package/dist/CurrencyInput.js.map +1 -1
  5. package/dist/CurrencyInput.vue.d.ts +4 -0
  6. package/dist/DataViewFilters.js +2 -2
  7. package/dist/DatePicker.js +2 -2
  8. package/dist/Field.js +2 -2
  9. package/dist/Field.vue.d.ts +7 -0
  10. package/dist/{Field.vue_vue_type_script_setup_true_lang-e1e4ff03.js → Field.vue_vue_type_script_setup_true_lang-3ea26741.js} +22 -19
  11. package/dist/Field.vue_vue_type_script_setup_true_lang-3ea26741.js.map +1 -0
  12. package/dist/FilterSelect.js +2 -2
  13. package/dist/Filters.js +2 -2
  14. package/dist/Filters.vue.d.ts +38 -0
  15. package/dist/InlineEdit.js +2 -2
  16. package/dist/Input.js +61 -59
  17. package/dist/Input.js.map +1 -1
  18. package/dist/Input.vue.d.ts +7 -0
  19. package/dist/InputOptions.js +52 -49
  20. package/dist/InputOptions.js.map +1 -1
  21. package/dist/InputOptions.vue.d.ts +7 -0
  22. package/dist/Label.js +1 -1
  23. package/dist/Label.vue.d.ts +6 -0
  24. package/dist/Label.vue_vue_type_script_setup_true_lang-b6ba2f02.js +43 -0
  25. package/dist/Label.vue_vue_type_script_setup_true_lang-b6ba2f02.js.map +1 -0
  26. package/dist/ListView.js +2 -2
  27. package/dist/ListView.vue.d.ts +76 -19
  28. package/dist/Module.js +12 -12
  29. package/dist/Module.js.map +1 -1
  30. package/dist/ModuleHeader.js +13 -12
  31. package/dist/ModuleHeader.js.map +1 -1
  32. package/dist/RadioGroup.js +2 -2
  33. package/dist/SearchBar.js +2 -2
  34. package/dist/Select.js +82 -81
  35. package/dist/Select.js.map +1 -1
  36. package/dist/SelectStatus.js +2 -2
  37. package/dist/Table.js +50 -47
  38. package/dist/Table.js.map +1 -1
  39. package/dist/TextEditor.js +6 -6
  40. package/dist/TextEditor.js.map +1 -1
  41. package/dist/Textarea.js +38 -34
  42. package/dist/Textarea.js.map +1 -1
  43. package/dist/Textarea.vue.d.ts +7 -0
  44. package/dist/components.css +2 -2
  45. package/package.json +1 -1
  46. package/dist/Field.vue_vue_type_script_setup_true_lang-e1e4ff03.js.map +0 -1
  47. package/dist/Label.vue_vue_type_script_setup_true_lang-4b02087f.js +0 -38
  48. package/dist/Label.vue_vue_type_script_setup_true_lang-4b02087f.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"InputOptions.js","sources":["../src/components/InputOptions/InputOptions.vue"],"sourcesContent":["<script lang=\"ts\">\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n type Option = any;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n type SelectedOption = any;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n interface InputOptionsProps {\n /**\n * Error text to display. Replaces `hintText` (if provided) & adds error styling\n */\n errorText?: string;\n\n /**\n * Hint text to display below the input\n */\n hintText?: string;\n\n /**\n * Label to render for the datepicker\n */\n label?: string;\n\n /**\n * The current value inclusive of the input & select\n */\n modelValue?: { value: string; option?: SelectedOption };\n\n /**\n * Input type\n */\n type?: string extends 'button' | 'checkbox' | 'radio' | 'submit' ? never : string;\n\n /**\n * Prevents the Selected Option from being truncated, if true\n */\n noTruncate?: boolean;\n\n /**\n * Options for the select\n */\n options?: Option[];\n }\n</script>\n\n<script lang=\"ts\" setup>\n import { computed, ref, useAttrs, useCssModule, useSlots, watch, watchEffect } from 'vue';\n\n import Field from '../Field/Field.vue';\n import Input from '../Input/Input.vue';\n import Select from '../Select/Select.vue';\n\n defineOptions({\n name: 'll-input-options',\n });\n\n const props = withDefaults(defineProps<InputOptionsProps>(), {\n modelValue: () => ({ value: '', option: undefined }),\n noTruncate: false,\n options: () => [],\n errorText: undefined,\n hintText: undefined,\n label: undefined,\n type: 'text',\n });\n\n const emit = defineEmits<{\n /**\n * Emitted when the model value changes\n */\n (\n e: 'update:model-value',\n v: { value?: string; option?: SelectedOption; isValueChange: boolean; type: 'input' | 'select' },\n ): void;\n /**\n * Emitted when either the input or select changes\n */\n (\n e: 'change',\n v: { value?: string; option?: SelectedOption; isValueChange: boolean; type: 'input' | 'select' },\n ): void;\n }>();\n\n const attrs = useAttrs();\n const slots = useSlots();\n const classes = useCssModule();\n const internalInput = ref<string>();\n const isInputFocused = ref(false);\n const selectedOption = ref<Option | undefined>();\n\n const inputAttrs = computed(() => {\n const { disabled, placeholder } = attrs;\n\n return { disabled, placeholder } as { disabled: boolean; placeholder: string };\n });\n\n const selectAttrs = computed(() => {\n const { disabled, displayBy, trackBy } = attrs;\n\n return { disabled, displayBy, trackBy } as { disabled: boolean; displayBy: string; trackBy: string };\n });\n\n // Input value changed\n function handleInput(val?: string | number) {\n internalInput.value = String(val);\n\n emit('update:model-value', {\n value: internalInput.value,\n option: selectedOption.value,\n isValueChange: true,\n type: 'input',\n });\n }\n\n // Input blurred\n function handleInputChange() {\n emit('change', {\n value: internalInput.value,\n option: selectedOption.value,\n isValueChange: true,\n type: 'input',\n });\n }\n\n function handleSelectChange(val?: Option) {\n selectedOption.value = val;\n\n emit('change', {\n value: internalInput.value,\n option: selectedOption.value,\n isValueChange: false,\n type: 'select',\n });\n emit('update:model-value', {\n value: internalInput.value,\n option: selectedOption.value,\n isValueChange: false,\n type: 'select',\n });\n }\n\n watchEffect(() => {\n if (!selectedOption.value) {\n selectedOption.value = props.options[0];\n }\n });\n\n watch(\n () => props.modelValue.value,\n () => {\n internalInput.value = props.modelValue.value;\n },\n { immediate: true },\n );\n\n watch(\n () => props.modelValue.option,\n () => {\n selectedOption.value = props.modelValue.option;\n },\n { immediate: true },\n );\n\n if (attrs.value) {\n throw new Error('ll-input-options: use :model-value or v-model instead of :value.');\n }\n\n if (attrs.onInput) {\n throw new Error('ll-input-options: use the @update:model-value event instead of @input');\n }\n</script>\n\n<template>\n <Field v-bind=\"props\" class=\"stash-input-options\" data-test=\"stash-input-options\">\n <template #default=\"{ fieldId }\">\n <div class=\"tw-flex\" :class=\"{ [classes['has-error']]: !!props.errorText }\">\n <Input\n v-bind=\"inputAttrs\"\n :id=\"fieldId\"\n class=\"stash-input-options__input -tw-mr-[1px] tw-inline-block tw-flex-1\"\n :class=\"[classes.input, { 'tw-z-control': isInputFocused }]\"\n data-test=\"stash-input-options|input\"\n :type=\"props.type\"\n :model-value=\"internalInput\"\n @change=\"handleInputChange\"\n @update:model-value=\"handleInput\"\n @blur=\"isInputFocused = false\"\n @focus=\"isInputFocused = true\"\n />\n\n <Select\n v-bind=\"selectAttrs\"\n single\n hide-search\n prevent-empty\n class=\"stash-input-options__select tw-min-w-20\"\n data-test=\"stash-input-options|select\"\n :class=\"classes.select\"\n :no-truncate=\"noTruncate\"\n :options=\"options\"\n :model-value=\"selectedOption\"\n @update:model-value=\"handleSelectChange\"\n />\n </div>\n </template>\n <template v-if=\"slots.hint\" #hint>\n <!-- @slot Hint slot for rendering text below the input -->\n <slot name=\"hint\"></slot>\n </template>\n </Field>\n</template>\n\n<style module>\n .input input {\n border-bottom-right-radius: 0;\n border-top-right-radius: 0;\n }\n\n .select :global(.stash-select__content) {\n border-bottom-left-radius: 0;\n border-top-left-radius: 0;\n }\n\n .select:global(.stash-select--active .stash-select__content) {\n min-width: 0;\n }\n\n .has-error input,\n .has-error input:hover:not(:focus),\n .has-error :global(.stash-select__content),\n .has-error :global(.stash-select__content:hover:not(:focus)) {\n border-color: var(--color-red-500);\n }\n</style>\n"],"names":["props","__props","emit","__emit","attrs","useAttrs","slots","useSlots","classes","useCssModule","internalInput","ref","isInputFocused","selectedOption","inputAttrs","computed","disabled","placeholder","selectAttrs","displayBy","trackBy","handleInput","val","handleInputChange","handleSelectChange","watchEffect","watch"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyDE,UAAMA,IAAQC,GAURC,IAAOC,GAiBPC,IAAQC,KACRC,IAAQC,KACRC,IAAUC,KACVC,IAAgBC,KAChBC,IAAiBD,EAAI,EAAK,GAC1BE,IAAiBF,KAEjBG,IAAaC,EAAS,MAAM;AAC1B,YAAA,EAAE,UAAAC,GAAU,aAAAC,EAAgB,IAAAb;AAE3B,aAAA,EAAE,UAAAY,GAAU,aAAAC;IAAY,CAChC,GAEKC,IAAcH,EAAS,MAAM;AACjC,YAAM,EAAE,UAAAC,GAAU,WAAAG,GAAW,SAAAC,EAAA,IAAYhB;AAElC,aAAA,EAAE,UAAAY,GAAU,WAAAG,GAAW,SAAAC;IAAQ,CACvC;AAGD,aAASC,EAAYC,GAAuB;AAC5B,MAAAZ,EAAA,QAAQ,OAAOY,CAAG,GAEhCpB,EAAK,sBAAsB;AAAA,QACzB,OAAOQ,EAAc;AAAA,QACrB,QAAQG,EAAe;AAAA,QACvB,eAAe;AAAA,QACf,MAAM;AAAA,MAAA,CACP;AAAA,IACH;AAGA,aAASU,IAAoB;AAC3B,MAAArB,EAAK,UAAU;AAAA,QACb,OAAOQ,EAAc;AAAA,QACrB,QAAQG,EAAe;AAAA,QACvB,eAAe;AAAA,QACf,MAAM;AAAA,MAAA,CACP;AAAA,IACH;AAEA,aAASW,EAAmBF,GAAc;AACxC,MAAAT,EAAe,QAAQS,GAEvBpB,EAAK,UAAU;AAAA,QACb,OAAOQ,EAAc;AAAA,QACrB,QAAQG,EAAe;AAAA,QACvB,eAAe;AAAA,QACf,MAAM;AAAA,MAAA,CACP,GACDX,EAAK,sBAAsB;AAAA,QACzB,OAAOQ,EAAc;AAAA,QACrB,QAAQG,EAAe;AAAA,QACvB,eAAe;AAAA,QACf,MAAM;AAAA,MAAA,CACP;AAAA,IACH;AAwBA,QAtBAY,EAAY,MAAM;AACZ,MAACZ,EAAe,UACHA,EAAA,QAAQb,EAAM,QAAQ,CAAC;AAAA,IACxC,CACD,GAED0B;AAAA,MACE,MAAM1B,EAAM,WAAW;AAAA,MACvB,MAAM;AACU,QAAAU,EAAA,QAAQV,EAAM,WAAW;AAAA,MACzC;AAAA,MACA,EAAE,WAAW,GAAK;AAAA,IAAA,GAGpB0B;AAAA,MACE,MAAM1B,EAAM,WAAW;AAAA,MACvB,MAAM;AACW,QAAAa,EAAA,QAAQb,EAAM,WAAW;AAAA,MAC1C;AAAA,MACA,EAAE,WAAW,GAAK;AAAA,IAAA,GAGhBI,EAAM;AACF,YAAA,IAAI,MAAM,kEAAkE;AAGpF,QAAIA,EAAM;AACF,YAAA,IAAI,MAAM,uEAAuE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"InputOptions.js","sources":["../src/components/InputOptions/InputOptions.vue"],"sourcesContent":["<script lang=\"ts\">\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n type Option = any;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n type SelectedOption = any;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n interface InputOptionsProps {\n /**\n * Error text to display. Replaces `hintText` (if provided) & adds error styling\n */\n errorText?: string;\n\n /**\n * Hint text to display below the input\n */\n hintText?: string;\n\n /**\n * Label to render for the datepicker\n */\n label?: string;\n\n /**\n * The current value inclusive of the input & select\n */\n modelValue?: { value: string; option?: SelectedOption };\n\n /**\n * Input type\n */\n type?: string extends 'button' | 'checkbox' | 'radio' | 'submit' ? never : string;\n\n /**\n * Prevents the Selected Option from being truncated, if true\n */\n noTruncate?: boolean;\n\n /**\n * Options for the select\n */\n options?: Option[];\n /**\n * Indicates whether the inputOptions is disabled.\n */\n disabled?: boolean;\n }\n</script>\n\n<script lang=\"ts\" setup>\n import { computed, ref, useAttrs, useCssModule, useSlots, watch, watchEffect } from 'vue';\n\n import Field from '../Field/Field.vue';\n import Input from '../Input/Input.vue';\n import Select from '../Select/Select.vue';\n\n defineOptions({\n name: 'll-input-options',\n });\n\n const props = withDefaults(defineProps<InputOptionsProps>(), {\n modelValue: () => ({ value: '', option: undefined }),\n noTruncate: false,\n options: () => [],\n errorText: undefined,\n hintText: undefined,\n label: undefined,\n type: 'text',\n disabled: false,\n });\n\n const emit = defineEmits<{\n /**\n * Emitted when the model value changes\n */\n (\n e: 'update:model-value',\n v: { value?: string; option?: SelectedOption; isValueChange: boolean; type: 'input' | 'select' },\n ): void;\n /**\n * Emitted when either the input or select changes\n */\n (\n e: 'change',\n v: { value?: string; option?: SelectedOption; isValueChange: boolean; type: 'input' | 'select' },\n ): void;\n }>();\n\n const attrs = useAttrs();\n const slots = useSlots();\n const classes = useCssModule();\n const internalInput = ref<string>();\n const isInputFocused = ref(false);\n const selectedOption = ref<Option | undefined>();\n\n const inputAttrs = computed(() => {\n const { disabled, placeholder } = attrs;\n\n return { disabled, placeholder } as { disabled: boolean; placeholder: string };\n });\n\n const selectAttrs = computed(() => {\n const { disabled, displayBy, trackBy } = attrs;\n\n return { disabled, displayBy, trackBy } as { disabled: boolean; displayBy: string; trackBy: string };\n });\n\n // Input value changed\n function handleInput(val?: string | number) {\n internalInput.value = String(val);\n\n emit('update:model-value', {\n value: internalInput.value,\n option: selectedOption.value,\n isValueChange: true,\n type: 'input',\n });\n }\n\n // Input blurred\n function handleInputChange() {\n emit('change', {\n value: internalInput.value,\n option: selectedOption.value,\n isValueChange: true,\n type: 'input',\n });\n }\n\n function handleSelectChange(val?: Option) {\n selectedOption.value = val;\n\n emit('change', {\n value: internalInput.value,\n option: selectedOption.value,\n isValueChange: false,\n type: 'select',\n });\n emit('update:model-value', {\n value: internalInput.value,\n option: selectedOption.value,\n isValueChange: false,\n type: 'select',\n });\n }\n\n watchEffect(() => {\n if (!selectedOption.value) {\n selectedOption.value = props.options[0];\n }\n });\n\n watch(\n () => props.modelValue.value,\n () => {\n internalInput.value = props.modelValue.value;\n },\n { immediate: true },\n );\n\n watch(\n () => props.modelValue.option,\n () => {\n selectedOption.value = props.modelValue.option;\n },\n { immediate: true },\n );\n\n if (attrs.value) {\n throw new Error('ll-input-options: use :model-value or v-model instead of :value.');\n }\n\n if (attrs.onInput) {\n throw new Error('ll-input-options: use the @update:model-value event instead of @input');\n }\n</script>\n\n<template>\n <Field v-bind=\"props\" class=\"stash-input-options\" data-test=\"stash-input-options\">\n <template #default=\"{ fieldId }\">\n <div class=\"tw-flex\" :class=\"{ [classes['has-error']]: !!props.errorText }\">\n <Input\n v-bind=\"inputAttrs\"\n :id=\"fieldId\"\n class=\"stash-input-options__input -tw-mr-[1px] tw-inline-block tw-flex-1\"\n :class=\"[classes.input, { 'tw-z-control': isInputFocused }]\"\n data-test=\"stash-input-options|input\"\n :type=\"props.type\"\n :model-value=\"internalInput\"\n :disabled=\"props.disabled\"\n @change=\"handleInputChange\"\n @update:model-value=\"handleInput\"\n @blur=\"isInputFocused = false\"\n @focus=\"isInputFocused = true\"\n />\n\n <Select\n v-bind=\"selectAttrs\"\n single\n hide-search\n prevent-empty\n class=\"stash-input-options__select tw-min-w-20\"\n data-test=\"stash-input-options|select\"\n :class=\"classes.select\"\n :no-truncate=\"noTruncate\"\n :options=\"options\"\n :model-value=\"selectedOption\"\n :disabled=\"props.disabled\"\n @update:model-value=\"handleSelectChange\"\n />\n </div>\n </template>\n <template v-if=\"slots.hint\" #hint>\n <!-- @slot Hint slot for rendering text below the input -->\n <slot name=\"hint\"></slot>\n </template>\n </Field>\n</template>\n\n<style module>\n .input input {\n border-bottom-right-radius: 0;\n border-top-right-radius: 0;\n }\n\n .select :global(.stash-select__content) {\n border-bottom-left-radius: 0;\n border-top-left-radius: 0;\n }\n\n .select:global(.stash-select--active .stash-select__content) {\n min-width: 0;\n }\n\n .has-error input,\n .has-error input:hover:not(:focus),\n .has-error :global(.stash-select__content),\n .has-error :global(.stash-select__content:hover:not(:focus)) {\n border-color: var(--color-red-500);\n }\n</style>\n"],"names":["props","__props","emit","__emit","attrs","useAttrs","slots","useSlots","classes","useCssModule","internalInput","ref","isInputFocused","selectedOption","inputAttrs","computed","disabled","placeholder","selectAttrs","displayBy","trackBy","handleInput","val","handleInputChange","handleSelectChange","watchEffect","watch"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6DE,UAAMA,IAAQC,GAWRC,IAAOC,GAiBPC,IAAQC,KACRC,IAAQC,KACRC,IAAUC,KACVC,IAAgBC,KAChBC,IAAiBD,EAAI,EAAK,GAC1BE,IAAiBF,KAEjBG,IAAaC,EAAS,MAAM;AAC1B,YAAA,EAAE,UAAAC,GAAU,aAAAC,EAAgB,IAAAb;AAE3B,aAAA,EAAE,UAAAY,GAAU,aAAAC;IAAY,CAChC,GAEKC,IAAcH,EAAS,MAAM;AACjC,YAAM,EAAE,UAAAC,GAAU,WAAAG,GAAW,SAAAC,EAAA,IAAYhB;AAElC,aAAA,EAAE,UAAAY,GAAU,WAAAG,GAAW,SAAAC;IAAQ,CACvC;AAGD,aAASC,EAAYC,GAAuB;AAC5B,MAAAZ,EAAA,QAAQ,OAAOY,CAAG,GAEhCpB,EAAK,sBAAsB;AAAA,QACzB,OAAOQ,EAAc;AAAA,QACrB,QAAQG,EAAe;AAAA,QACvB,eAAe;AAAA,QACf,MAAM;AAAA,MAAA,CACP;AAAA,IACH;AAGA,aAASU,IAAoB;AAC3B,MAAArB,EAAK,UAAU;AAAA,QACb,OAAOQ,EAAc;AAAA,QACrB,QAAQG,EAAe;AAAA,QACvB,eAAe;AAAA,QACf,MAAM;AAAA,MAAA,CACP;AAAA,IACH;AAEA,aAASW,EAAmBF,GAAc;AACxC,MAAAT,EAAe,QAAQS,GAEvBpB,EAAK,UAAU;AAAA,QACb,OAAOQ,EAAc;AAAA,QACrB,QAAQG,EAAe;AAAA,QACvB,eAAe;AAAA,QACf,MAAM;AAAA,MAAA,CACP,GACDX,EAAK,sBAAsB;AAAA,QACzB,OAAOQ,EAAc;AAAA,QACrB,QAAQG,EAAe;AAAA,QACvB,eAAe;AAAA,QACf,MAAM;AAAA,MAAA,CACP;AAAA,IACH;AAwBA,QAtBAY,EAAY,MAAM;AACZ,MAACZ,EAAe,UACHA,EAAA,QAAQb,EAAM,QAAQ,CAAC;AAAA,IACxC,CACD,GAED0B;AAAA,MACE,MAAM1B,EAAM,WAAW;AAAA,MACvB,MAAM;AACU,QAAAU,EAAA,QAAQV,EAAM,WAAW;AAAA,MACzC;AAAA,MACA,EAAE,WAAW,GAAK;AAAA,IAAA,GAGpB0B;AAAA,MACE,MAAM1B,EAAM,WAAW;AAAA,MACvB,MAAM;AACW,QAAAa,EAAA,QAAQb,EAAM,WAAW;AAAA,MAC1C;AAAA,MACA,EAAE,WAAW,GAAK;AAAA,IAAA,GAGhBI,EAAM;AACF,YAAA,IAAI,MAAM,kEAAkE;AAGpF,QAAIA,EAAM;AACF,YAAA,IAAI,MAAM,uEAAuE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -43,6 +43,7 @@ declare const _default: __VLS_WithTemplateSlots<DefineComponent<ExtractPropTypes
43
43
  hintText: undefined;
44
44
  label: undefined;
45
45
  type: string;
46
+ disabled: boolean;
46
47
  }>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
47
48
  "update:model-value": (v: {
48
49
  value?: string | undefined;
@@ -67,6 +68,7 @@ declare const _default: __VLS_WithTemplateSlots<DefineComponent<ExtractPropTypes
67
68
  hintText: undefined;
68
69
  label: undefined;
69
70
  type: string;
71
+ disabled: boolean;
70
72
  }>>> & Readonly<{
71
73
  onChange?: ((v: {
72
74
  value?: string | undefined;
@@ -82,6 +84,7 @@ declare const _default: __VLS_WithTemplateSlots<DefineComponent<ExtractPropTypes
82
84
  }) => any) | undefined;
83
85
  }>, {
84
86
  type: string;
87
+ disabled: boolean;
85
88
  label: string;
86
89
  errorText: string;
87
90
  hintText: string;
@@ -128,6 +131,10 @@ declare interface InputOptionsProps {
128
131
  * Options for the select
129
132
  */
130
133
  options?: Option_2[];
134
+ /**
135
+ * Indicates whether the inputOptions is disabled.
136
+ */
137
+ disabled?: boolean;
131
138
  }
132
139
 
133
140
  declare type Option_2 = any;
package/dist/Label.js CHANGED
@@ -1,4 +1,4 @@
1
- import { _ as o } from "./Label.vue_vue_type_script_setup_true_lang-4b02087f.js";
1
+ import { _ as o } from "./Label.vue_vue_type_script_setup_true_lang-b6ba2f02.js";
2
2
  import "vue";
3
3
  import "./locale.js";
4
4
  import "lodash-es/get";
@@ -38,12 +38,14 @@ declare const _default: __VLS_WithTemplateSlots<DefineComponent<ExtractPropTypes
38
38
  isRequired: boolean;
39
39
  showOptional: boolean;
40
40
  legend: boolean;
41
+ isDisabled: boolean;
41
42
  }>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<LabelProps>, {
42
43
  for: undefined;
43
44
  hasError: boolean;
44
45
  isRequired: boolean;
45
46
  showOptional: boolean;
46
47
  legend: boolean;
48
+ isDisabled: boolean;
47
49
  }>>> & Readonly<{}>, {
48
50
  legend: boolean;
49
51
  for: string;
@@ -76,6 +78,10 @@ export declare interface LabelProps {
76
78
  * Indicates whether the wrapper element to be rendered should be a label or a legend.
77
79
  */
78
80
  legend?: boolean;
81
+ /**
82
+ * Indicates whether the label is disabled.
83
+ */
84
+ disabled?: boolean;
79
85
  }
80
86
 
81
87
  export { }
@@ -0,0 +1,43 @@
1
+ import { defineComponent as n, computed as r, openBlock as t, createBlock as i, resolveDynamicComponent as d, normalizeClass as c, withCtx as p, renderSlot as f, createElementBlock as a, toDisplayString as u, unref as m, createCommentVNode as w } from "vue";
2
+ import { t as b } from "./locale.js";
3
+ const h = {
4
+ key: 0,
5
+ class: "tw-font-semibold tw-text-red-500",
6
+ title: "Required",
7
+ "aria-label": "required"
8
+ }, _ = {
9
+ key: 1,
10
+ class: "tw-text-ice-700"
11
+ }, x = /* @__PURE__ */ n({
12
+ __name: "Label",
13
+ props: {
14
+ for: { default: void 0 },
15
+ hasError: { type: Boolean, default: !1 },
16
+ isRequired: { type: Boolean, default: !1 },
17
+ showOptional: { type: Boolean, default: !1 },
18
+ legend: { type: Boolean, default: !1 },
19
+ disabled: { type: Boolean }
20
+ },
21
+ setup(l) {
22
+ const e = l, o = r(() => e.legend ? "legend" : "label");
23
+ return (s, y) => (t(), i(d(o.value), {
24
+ class: c(["stash-label tw-block tw-truncate tw-text-sm tw-font-medium tw-leading-6", {
25
+ "tw-animate-shake": e.hasError,
26
+ "stash-label--disabled tw-text-ice-700": e.disabled,
27
+ "tw-text-ice-900": !e.disabled
28
+ }]),
29
+ for: e.for,
30
+ "data-test": "stash-label"
31
+ }, {
32
+ default: p(() => [
33
+ f(s.$slots, "default"),
34
+ e.isRequired ? (t(), a("span", h, " * ")) : e.showOptional ? (t(), a("span", _, " (" + u(m(b)("ll.optional")) + ")", 1)) : w("", !0)
35
+ ]),
36
+ _: 3
37
+ }, 8, ["class", "for"]));
38
+ }
39
+ });
40
+ export {
41
+ x as _
42
+ };
43
+ //# sourceMappingURL=Label.vue_vue_type_script_setup_true_lang-b6ba2f02.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Label.vue_vue_type_script_setup_true_lang-b6ba2f02.js","sources":["../src/components/Label/Label.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { computed } from 'vue';\n\n import { t } from '../../locale';\n\n export interface LabelProps {\n /**\n * The `id` of the input element that this label is associated with.\n */\n for?: string;\n\n /**\n * Indicates whether the label should be styled as an error.\n */\n hasError?: boolean;\n\n /**\n * Indicates whether the input element that this label is associated with is required.\n */\n isRequired?: boolean;\n\n /**\n * Indicates whether the label should show that the input is optional.\n */\n showOptional?: boolean;\n\n /**\n * Indicates whether the wrapper element to be rendered should be a label or a legend.\n */\n legend?: boolean;\n\n /**\n * Indicates whether the label is disabled.\n */\n disabled?: boolean;\n }\n\n const props = withDefaults(defineProps<LabelProps>(), {\n for: undefined,\n hasError: false,\n isRequired: false,\n showOptional: false,\n legend: false,\n isDisabled: false,\n });\n\n const is = computed(() => {\n return props.legend ? 'legend' : 'label';\n });\n</script>\n\n<template>\n <component\n :is=\"is\"\n class=\"stash-label tw-block tw-truncate tw-text-sm tw-font-medium tw-leading-6\"\n :class=\"{\n 'tw-animate-shake': props.hasError,\n 'stash-label--disabled tw-text-ice-700': props.disabled,\n 'tw-text-ice-900': !props.disabled,\n }\"\n :for=\"props.for\"\n data-test=\"stash-label\"\n >\n <!-- @slot The label text -->\n <slot></slot>\n <span v-if=\"props.isRequired\" class=\"tw-font-semibold tw-text-red-500\" title=\"Required\" aria-label=\"required\">\n *\n </span>\n <span v-else-if=\"props.showOptional\" class=\"tw-text-ice-700\"> ({{ t('ll.optional') }})</span>\n </component>\n</template>\n"],"names":["props","__props","is","computed"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAqCE,UAAMA,IAAQC,GASRC,IAAKC,EAAS,MACXH,EAAM,SAAS,WAAW,OAClC;;;;;;;;;;;;;;;;;;"}
package/dist/ListView.js CHANGED
@@ -46,8 +46,8 @@ 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-e1e4ff03.js";
50
- import "./Label.vue_vue_type_script_setup_true_lang-4b02087f.js";
49
+ import "./Field.vue_vue_type_script_setup_true_lang-3ea26741.js";
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";
53
53
  import "lodash-es/isEmpty";
@@ -1555,6 +1555,10 @@ declare const _default: DefineComponent<any, {}, {
1555
1555
  type: PropType<string>;
1556
1556
  default: string;
1557
1557
  };
1558
+ disabled: {
1559
+ type: PropType<boolean>;
1560
+ default: boolean;
1561
+ };
1558
1562
  label: {
1559
1563
  type: PropType<string>;
1560
1564
  default: undefined;
@@ -1606,6 +1610,10 @@ declare const _default: DefineComponent<any, {}, {
1606
1610
  type: PropType<string>;
1607
1611
  default: string;
1608
1612
  };
1613
+ disabled: {
1614
+ type: PropType<boolean>;
1615
+ default: boolean;
1616
+ };
1609
1617
  label: {
1610
1618
  type: PropType<string>;
1611
1619
  default: undefined;
@@ -1647,6 +1655,7 @@ declare const _default: DefineComponent<any, {}, {
1647
1655
  "onUpdate:model-value"?: ((v: string | number) => any) | undefined;
1648
1656
  }>, {
1649
1657
  type: string;
1658
+ disabled: boolean;
1650
1659
  label: string;
1651
1660
  id: string;
1652
1661
  errorText: string;
@@ -1666,6 +1675,10 @@ declare const _default: DefineComponent<any, {}, {
1666
1675
  type: PropType<string>;
1667
1676
  default: string;
1668
1677
  };
1678
+ disabled: {
1679
+ type: PropType<boolean>;
1680
+ default: boolean;
1681
+ };
1669
1682
  label: {
1670
1683
  type: PropType<string>;
1671
1684
  default: undefined;
@@ -1709,6 +1722,7 @@ declare const _default: DefineComponent<any, {}, {
1709
1722
  inputEl: Ref<HTMLInputElement | undefined, HTMLInputElement | undefined>;
1710
1723
  }, {}, {}, {}, {
1711
1724
  type: string;
1725
+ disabled: boolean;
1712
1726
  label: string;
1713
1727
  id: string;
1714
1728
  errorText: string;
@@ -1725,6 +1739,10 @@ declare const _default: DefineComponent<any, {}, {
1725
1739
  type: PropType<string>;
1726
1740
  default: string;
1727
1741
  };
1742
+ disabled: {
1743
+ type: PropType<boolean>;
1744
+ default: boolean;
1745
+ };
1728
1746
  label: {
1729
1747
  type: PropType<string>;
1730
1748
  default: undefined;
@@ -1773,6 +1791,7 @@ declare const _default: DefineComponent<any, {}, {
1773
1791
  blur: (evt: Event) => void;
1774
1792
  }, string, {
1775
1793
  type: string;
1794
+ disabled: boolean;
1776
1795
  label: string;
1777
1796
  id: string;
1778
1797
  errorText: string;
@@ -1793,6 +1812,10 @@ declare const _default: DefineComponent<any, {}, {
1793
1812
  type: PropType<string>;
1794
1813
  default: string;
1795
1814
  };
1815
+ disabled: {
1816
+ type: PropType<boolean>;
1817
+ default: boolean;
1818
+ };
1796
1819
  label: {
1797
1820
  type: PropType<string>;
1798
1821
  default: undefined;
@@ -1854,6 +1877,10 @@ declare const _default: DefineComponent<any, {}, {
1854
1877
  type: PropType<string>;
1855
1878
  default: string;
1856
1879
  };
1880
+ disabled: {
1881
+ type: PropType<boolean>;
1882
+ default: boolean;
1883
+ };
1857
1884
  label: {
1858
1885
  type: PropType<string>;
1859
1886
  default: undefined;
@@ -1899,6 +1926,7 @@ declare const _default: DefineComponent<any, {}, {
1899
1926
  }) => any) | undefined;
1900
1927
  }>, {
1901
1928
  type: string;
1929
+ disabled: boolean;
1902
1930
  label: string;
1903
1931
  errorText: string;
1904
1932
  hintText: string;
@@ -1920,6 +1948,10 @@ declare const _default: DefineComponent<any, {}, {
1920
1948
  type: PropType<string>;
1921
1949
  default: string;
1922
1950
  };
1951
+ disabled: {
1952
+ type: PropType<boolean>;
1953
+ default: boolean;
1954
+ };
1923
1955
  label: {
1924
1956
  type: PropType<string>;
1925
1957
  default: undefined;
@@ -1965,6 +1997,7 @@ declare const _default: DefineComponent<any, {}, {
1965
1997
  }) => any) | undefined;
1966
1998
  }>, {}, {}, {}, {}, {
1967
1999
  type: string;
2000
+ disabled: boolean;
1968
2001
  label: string;
1969
2002
  errorText: string;
1970
2003
  hintText: string;
@@ -1983,6 +2016,10 @@ declare const _default: DefineComponent<any, {}, {
1983
2016
  type: PropType<string>;
1984
2017
  default: string;
1985
2018
  };
2019
+ disabled: {
2020
+ type: PropType<boolean>;
2021
+ default: boolean;
2022
+ };
1986
2023
  label: {
1987
2024
  type: PropType<string>;
1988
2025
  default: undefined;
@@ -2041,6 +2078,7 @@ declare const _default: DefineComponent<any, {}, {
2041
2078
  }) => void;
2042
2079
  }, string, {
2043
2080
  type: string;
2081
+ disabled: boolean;
2044
2082
  label: string;
2045
2083
  errorText: string;
2046
2084
  hintText: string;
@@ -3562,6 +3600,10 @@ declare const _default: DefineComponent<any, {}, {
3562
3600
  type: PropType<string | number>;
3563
3601
  default: undefined;
3564
3602
  };
3603
+ isDisabled: {
3604
+ type: PropType<boolean>;
3605
+ default: boolean;
3606
+ };
3565
3607
  position: {
3566
3608
  type: PropType<"inline" | "top-right">;
3567
3609
  default: string;
@@ -3570,10 +3612,6 @@ declare const _default: DefineComponent<any, {}, {
3570
3612
  type: PropType<"standard" | "dot">;
3571
3613
  default: string;
3572
3614
  };
3573
- isDisabled: {
3574
- type: PropType<boolean>;
3575
- default: boolean;
3576
- };
3577
3615
  showZero: {
3578
3616
  type: PropType<boolean>;
3579
3617
  default: boolean;
@@ -3605,6 +3643,10 @@ declare const _default: DefineComponent<any, {}, {
3605
3643
  type: PropType<string | number>;
3606
3644
  default: undefined;
3607
3645
  };
3646
+ isDisabled: {
3647
+ type: PropType<boolean>;
3648
+ default: boolean;
3649
+ };
3608
3650
  position: {
3609
3651
  type: PropType<"inline" | "top-right">;
3610
3652
  default: string;
@@ -3613,10 +3655,6 @@ declare const _default: DefineComponent<any, {}, {
3613
3655
  type: PropType<"standard" | "dot">;
3614
3656
  default: string;
3615
3657
  };
3616
- isDisabled: {
3617
- type: PropType<boolean>;
3618
- default: boolean;
3619
- };
3620
3658
  showZero: {
3621
3659
  type: PropType<boolean>;
3622
3660
  default: boolean;
@@ -3630,9 +3668,9 @@ declare const _default: DefineComponent<any, {}, {
3630
3668
  right?: number | undefined;
3631
3669
  };
3632
3670
  content: string | number;
3671
+ isDisabled: boolean;
3633
3672
  position: "inline" | "top-right";
3634
3673
  variant: "standard" | "dot";
3635
- isDisabled: boolean;
3636
3674
  showZero: boolean;
3637
3675
  }, true, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
3638
3676
  P: {};
@@ -3668,6 +3706,10 @@ declare const _default: DefineComponent<any, {}, {
3668
3706
  type: PropType<string | number>;
3669
3707
  default: undefined;
3670
3708
  };
3709
+ isDisabled: {
3710
+ type: PropType<boolean>;
3711
+ default: boolean;
3712
+ };
3671
3713
  position: {
3672
3714
  type: PropType<"inline" | "top-right">;
3673
3715
  default: string;
@@ -3676,10 +3718,6 @@ declare const _default: DefineComponent<any, {}, {
3676
3718
  type: PropType<"standard" | "dot">;
3677
3719
  default: string;
3678
3720
  };
3679
- isDisabled: {
3680
- type: PropType<boolean>;
3681
- default: boolean;
3682
- };
3683
3721
  showZero: {
3684
3722
  type: PropType<boolean>;
3685
3723
  default: boolean;
@@ -3693,9 +3731,9 @@ declare const _default: DefineComponent<any, {}, {
3693
3731
  right?: number | undefined;
3694
3732
  };
3695
3733
  content: string | number;
3734
+ isDisabled: boolean;
3696
3735
  position: "inline" | "top-right";
3697
3736
  variant: "standard" | "dot";
3698
- isDisabled: boolean;
3699
3737
  showZero: boolean;
3700
3738
  }>;
3701
3739
  __isFragment?: undefined;
@@ -3728,6 +3766,10 @@ declare const _default: DefineComponent<any, {}, {
3728
3766
  type: PropType<string | number>;
3729
3767
  default: undefined;
3730
3768
  };
3769
+ isDisabled: {
3770
+ type: PropType<boolean>;
3771
+ default: boolean;
3772
+ };
3731
3773
  position: {
3732
3774
  type: PropType<"inline" | "top-right">;
3733
3775
  default: string;
@@ -3736,10 +3778,6 @@ declare const _default: DefineComponent<any, {}, {
3736
3778
  type: PropType<"standard" | "dot">;
3737
3779
  default: string;
3738
3780
  };
3739
- isDisabled: {
3740
- type: PropType<boolean>;
3741
- default: boolean;
3742
- };
3743
3781
  showZero: {
3744
3782
  type: PropType<boolean>;
3745
3783
  default: boolean;
@@ -3753,9 +3791,9 @@ declare const _default: DefineComponent<any, {}, {
3753
3791
  right?: number | undefined;
3754
3792
  };
3755
3793
  content: string | number;
3794
+ isDisabled: boolean;
3756
3795
  position: "inline" | "top-right";
3757
3796
  variant: "standard" | "dot";
3758
- isDisabled: boolean;
3759
3797
  showZero: boolean;
3760
3798
  }, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
3761
3799
  $slots: {
@@ -4541,6 +4579,10 @@ declare const _default: DefineComponent<any, {}, {
4541
4579
  type: PropType<string>;
4542
4580
  default: string;
4543
4581
  };
4582
+ disabled: {
4583
+ type: PropType<boolean>;
4584
+ default: boolean;
4585
+ };
4544
4586
  label: {
4545
4587
  type: PropType<string>;
4546
4588
  default: undefined;
@@ -4592,6 +4634,10 @@ declare const _default: DefineComponent<any, {}, {
4592
4634
  type: PropType<string>;
4593
4635
  default: string;
4594
4636
  };
4637
+ disabled: {
4638
+ type: PropType<boolean>;
4639
+ default: boolean;
4640
+ };
4595
4641
  label: {
4596
4642
  type: PropType<string>;
4597
4643
  default: undefined;
@@ -4633,6 +4679,7 @@ declare const _default: DefineComponent<any, {}, {
4633
4679
  "onUpdate:model-value"?: ((v: string | number) => any) | undefined;
4634
4680
  }>, {
4635
4681
  type: string;
4682
+ disabled: boolean;
4636
4683
  label: string;
4637
4684
  id: string;
4638
4685
  errorText: string;
@@ -4652,6 +4699,10 @@ declare const _default: DefineComponent<any, {}, {
4652
4699
  type: PropType<string>;
4653
4700
  default: string;
4654
4701
  };
4702
+ disabled: {
4703
+ type: PropType<boolean>;
4704
+ default: boolean;
4705
+ };
4655
4706
  label: {
4656
4707
  type: PropType<string>;
4657
4708
  default: undefined;
@@ -4695,6 +4746,7 @@ declare const _default: DefineComponent<any, {}, {
4695
4746
  inputEl: Ref<HTMLInputElement | undefined, HTMLInputElement | undefined>;
4696
4747
  }, {}, {}, {}, {
4697
4748
  type: string;
4749
+ disabled: boolean;
4698
4750
  label: string;
4699
4751
  id: string;
4700
4752
  errorText: string;
@@ -4711,6 +4763,10 @@ declare const _default: DefineComponent<any, {}, {
4711
4763
  type: PropType<string>;
4712
4764
  default: string;
4713
4765
  };
4766
+ disabled: {
4767
+ type: PropType<boolean>;
4768
+ default: boolean;
4769
+ };
4714
4770
  label: {
4715
4771
  type: PropType<string>;
4716
4772
  default: undefined;
@@ -4759,6 +4815,7 @@ declare const _default: DefineComponent<any, {}, {
4759
4815
  blur: (evt: Event) => void;
4760
4816
  }, string, {
4761
4817
  type: string;
4818
+ disabled: boolean;
4762
4819
  label: string;
4763
4820
  id: string;
4764
4821
  errorText: string;
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 = {