@leaflink/stash 49.3.2 → 49.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AddressSelect.js +2 -2
- package/dist/Badge.vue.d.ts +1 -1
- package/dist/CurrencyInput.js +4 -3
- package/dist/CurrencyInput.js.map +1 -1
- package/dist/CurrencyInput.vue.d.ts +4 -0
- package/dist/DataViewFilters.js +2 -2
- package/dist/DatePicker.js +2 -2
- package/dist/Field.js +2 -2
- package/dist/Field.vue.d.ts +7 -0
- package/dist/{Field.vue_vue_type_script_setup_true_lang-e1e4ff03.js → Field.vue_vue_type_script_setup_true_lang-3ea26741.js} +22 -19
- package/dist/Field.vue_vue_type_script_setup_true_lang-3ea26741.js.map +1 -0
- package/dist/FilterSelect.js +2 -2
- package/dist/Filters.js +2 -2
- package/dist/Filters.vue.d.ts +38 -0
- package/dist/InlineEdit.js +2 -2
- package/dist/Input.js +61 -59
- package/dist/Input.js.map +1 -1
- package/dist/Input.vue.d.ts +7 -0
- package/dist/InputOptions.js +52 -49
- package/dist/InputOptions.js.map +1 -1
- package/dist/InputOptions.vue.d.ts +7 -0
- package/dist/Label.js +1 -1
- package/dist/Label.vue.d.ts +6 -0
- package/dist/Label.vue_vue_type_script_setup_true_lang-b6ba2f02.js +43 -0
- package/dist/Label.vue_vue_type_script_setup_true_lang-b6ba2f02.js.map +1 -0
- package/dist/ListView.js +2 -2
- package/dist/ListView.vue.d.ts +76 -19
- package/dist/RadioGroup.js +2 -2
- package/dist/SearchBar.js +2 -2
- package/dist/Select.js +82 -81
- package/dist/Select.js.map +1 -1
- package/dist/SelectStatus.js +2 -2
- package/dist/TextEditor.js +6 -6
- package/dist/TextEditor.js.map +1 -1
- package/dist/Textarea.js +38 -34
- package/dist/Textarea.js.map +1 -1
- package/dist/Textarea.vue.d.ts +7 -0
- package/dist/components.css +2 -2
- package/package.json +1 -1
- package/dist/Field.vue_vue_type_script_setup_true_lang-e1e4ff03.js.map +0 -1
- package/dist/Label.vue_vue_type_script_setup_true_lang-4b02087f.js +0 -38
- package/dist/Label.vue_vue_type_script_setup_true_lang-4b02087f.js.map +0 -1
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Field.vue_vue_type_script_setup_true_lang-e1e4ff03.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 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 });\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 ]\"\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 >\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":";;;;;;;;;;;;;;;;;;;;;;;;;;;AA8DE,UAAMA,IAAQC,GAWRC,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,38 +0,0 @@
|
|
|
1
|
-
import { defineComponent as r, computed as n, openBlock as t, createBlock as i, resolveDynamicComponent as d, normalizeClass as c, withCtx as f, renderSlot as p, createElementBlock as o, toDisplayString as u, unref as m, createCommentVNode as w } from "vue";
|
|
2
|
-
import { t as h } from "./locale.js";
|
|
3
|
-
const _ = {
|
|
4
|
-
key: 0,
|
|
5
|
-
class: "tw-font-semibold tw-text-red-500",
|
|
6
|
-
title: "Required",
|
|
7
|
-
"aria-label": "required"
|
|
8
|
-
}, y = {
|
|
9
|
-
key: 1,
|
|
10
|
-
class: "tw-text-ice-700"
|
|
11
|
-
}, x = /* @__PURE__ */ r({
|
|
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
|
-
},
|
|
20
|
-
setup(a) {
|
|
21
|
-
const e = a, l = n(() => e.legend ? "legend" : "label");
|
|
22
|
-
return (s, b) => (t(), i(d(l.value), {
|
|
23
|
-
class: c(["stash-label tw-block tw-truncate tw-text-sm tw-font-medium tw-leading-6 tw-text-ice-900", { "tw-animate-shake": e.hasError }]),
|
|
24
|
-
for: e.for,
|
|
25
|
-
"data-test": "stash-label"
|
|
26
|
-
}, {
|
|
27
|
-
default: f(() => [
|
|
28
|
-
p(s.$slots, "default"),
|
|
29
|
-
e.isRequired ? (t(), o("span", _, " * ")) : e.showOptional ? (t(), o("span", y, " (" + u(m(h)("ll.optional")) + ")", 1)) : w("", !0)
|
|
30
|
-
]),
|
|
31
|
-
_: 3
|
|
32
|
-
}, 8, ["class", "for"]));
|
|
33
|
-
}
|
|
34
|
-
});
|
|
35
|
-
export {
|
|
36
|
-
x as _
|
|
37
|
-
};
|
|
38
|
-
//# sourceMappingURL=Label.vue_vue_type_script_setup_true_lang-4b02087f.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Label.vue_vue_type_script_setup_true_lang-4b02087f.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 const props = withDefaults(defineProps<LabelProps>(), {\n for: undefined,\n hasError: false,\n isRequired: false,\n showOptional: false,\n legend: 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 tw-text-ice-900\"\n :class=\"{ 'tw-animate-shake': props.hasError }\"\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":";;;;;;;;;;;;;;;;;;;;AAgCE,UAAMA,IAAQC,GAQRC,IAAKC,EAAS,MACXH,EAAM,SAAS,WAAW,OAClC;;;;;;;;;;;;;;"}
|