@leaflink/stash 45.1.0 → 45.1.2
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 +1 -1
- package/dist/AppTopbar.js +33 -221
- package/dist/AppTopbar.js.map +1 -1
- package/dist/CurrencyInput.js +1 -1
- package/dist/DataViewFilters.js +1 -1
- package/dist/DatePicker.js +1 -1
- package/dist/Field.js +1 -1
- package/dist/Field.vue_vue_type_script_setup_true_lang-e1e4ff03.js +93 -0
- package/dist/Field.vue_vue_type_script_setup_true_lang-e1e4ff03.js.map +1 -0
- package/dist/FilterSelect.js +1 -1
- package/dist/Filters.js +1 -1
- package/dist/InlineEdit.js +1 -1
- package/dist/Input.js +1 -1
- package/dist/InputOptions.js +1 -1
- package/dist/ListView.js +1 -1
- package/dist/Logo.js +7 -0
- package/dist/Logo.js.map +1 -0
- package/dist/Logo.vue.d.ts +78 -0
- package/dist/Logo.vue_vue_type_script_setup_true_lang-d7da48a0.js +196 -0
- package/dist/Logo.vue_vue_type_script_setup_true_lang-d7da48a0.js.map +1 -0
- package/dist/RadioGroup.js +78 -74
- package/dist/RadioGroup.js.map +1 -1
- package/dist/SearchBar.js +1 -1
- package/dist/Select.js +1 -1
- package/dist/SelectStatus.js +1 -1
- package/dist/Textarea.js +1 -1
- package/dist/components.css +1 -1
- package/package.json +1 -2
- package/dist/Field.vue_vue_type_script_setup_true_lang-224ab33a.js +0 -96
- package/dist/Field.vue_vue_type_script_setup_true_lang-224ab33a.js.map +0 -1
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import { defineComponent as x, useAttrs as k, useSlots as T, computed as s, openBlock as l, createBlock as m, resolveDynamicComponent as B, mergeProps as O, unref as f, withCtx as v, normalizeClass as R, createTextVNode as q, toDisplayString as h, createCommentVNode as r, createElementBlock as a, renderSlot as p } from "vue";
|
|
2
|
-
import c from "lodash-es/uniqueId";
|
|
3
|
-
import { _ as E } from "./Label.vue_vue_type_script_setup_true_lang-4b02087f.js";
|
|
4
|
-
const L = ["aria-labelledby"], S = ["id"], C = {
|
|
5
|
-
key: 4,
|
|
6
|
-
class: "tw-mt-1 tw-block tw-whitespace-pre-line tw-text-xs",
|
|
7
|
-
"data-test": "stash-field-hint"
|
|
8
|
-
}, g = { key: 0 }, A = {
|
|
9
|
-
key: 5,
|
|
10
|
-
class: "tw-mt-1 tw-whitespace-pre-line tw-text-xs",
|
|
11
|
-
"data-test": "stash-field-hint"
|
|
12
|
-
}, $ = {
|
|
13
|
-
inheritAttrs: !1
|
|
14
|
-
}, z = /* @__PURE__ */ x({
|
|
15
|
-
...$,
|
|
16
|
-
__name: "Field",
|
|
17
|
-
props: {
|
|
18
|
-
addBottomSpace: { type: Boolean, default: !1 },
|
|
19
|
-
errorText: { default: void 0 },
|
|
20
|
-
hintText: { default: void 0 },
|
|
21
|
-
id: { default: void 0 },
|
|
22
|
-
errorId: { default: void 0 },
|
|
23
|
-
isReadOnly: { type: Boolean },
|
|
24
|
-
isRequired: { type: Boolean, default: !1 },
|
|
25
|
-
label: { default: void 0 },
|
|
26
|
-
showOptionalInLabel: { type: Boolean, default: !1 },
|
|
27
|
-
fieldset: { type: Boolean, default: !1 }
|
|
28
|
-
},
|
|
29
|
-
setup(b) {
|
|
30
|
-
const e = b, y = k(), i = T(), d = s(() => e.id || c("stash-field-")), n = s(() => e.errorId || c("stash-field-error-")), o = s(() => c("stash-field-label-")), u = s(() => !!e.errorText), _ = s(() => e.fieldset ? "fieldset" : "div"), I = s(() => {
|
|
31
|
-
const { placeholder: t, ...w } = y;
|
|
32
|
-
return w;
|
|
33
|
-
});
|
|
34
|
-
return (t, w) => (l(), m(B(_.value), O(I.value, {
|
|
35
|
-
class: ["stash-field", [
|
|
36
|
-
{ "tw-p-0": e.fieldset },
|
|
37
|
-
{ "tw-mb-9": e.addBottomSpace && !e.errorText && !e.hintText && !f(i).hint },
|
|
38
|
-
{ "tw-mb-4": e.addBottomSpace && (e.errorText || e.hintText || f(i).hint) }
|
|
39
|
-
]]
|
|
40
|
-
}), {
|
|
41
|
-
default: v(() => [
|
|
42
|
-
e.label ? (l(), m(E, {
|
|
43
|
-
key: 0,
|
|
44
|
-
id: o.value,
|
|
45
|
-
class: R({ "tw-mb-1.5": !!e.isReadOnly }),
|
|
46
|
-
for: d.value,
|
|
47
|
-
"has-error": u.value,
|
|
48
|
-
"is-required": t.isRequired,
|
|
49
|
-
"show-optional": e.showOptionalInLabel,
|
|
50
|
-
legend: e.fieldset
|
|
51
|
-
}, {
|
|
52
|
-
default: v(() => [
|
|
53
|
-
q(h(e.label), 1)
|
|
54
|
-
]),
|
|
55
|
-
_: 1
|
|
56
|
-
}, 8, ["id", "class", "for", "has-error", "is-required", "show-optional", "legend"])) : r("", !0),
|
|
57
|
-
e.isReadOnly ? (l(), a("div", {
|
|
58
|
-
key: 1,
|
|
59
|
-
"aria-labelledby": o.value
|
|
60
|
-
}, [
|
|
61
|
-
p(t.$slots, "default", {
|
|
62
|
-
fieldId: d.value,
|
|
63
|
-
fieldErrorId: n.value,
|
|
64
|
-
hasError: u.value,
|
|
65
|
-
isRequired: t.isRequired,
|
|
66
|
-
labelId: o.value,
|
|
67
|
-
showOptionalInLabel: e.showOptionalInLabel
|
|
68
|
-
})
|
|
69
|
-
], 8, L)) : p(t.$slots, "default", {
|
|
70
|
-
key: 2,
|
|
71
|
-
fieldId: d.value,
|
|
72
|
-
fieldErrorId: n.value,
|
|
73
|
-
hasError: u.value,
|
|
74
|
-
isRequired: t.isRequired,
|
|
75
|
-
labelId: o.value,
|
|
76
|
-
showOptionalInLabel: e.showOptionalInLabel
|
|
77
|
-
}),
|
|
78
|
-
e.errorText ? (l(), a("span", {
|
|
79
|
-
key: 3,
|
|
80
|
-
id: n.value,
|
|
81
|
-
class: "tw-mt-1 tw-block tw-whitespace-pre-line tw-text-xs tw-text-red-500",
|
|
82
|
-
"data-test": "stash-field-error"
|
|
83
|
-
}, h(e.errorText), 9, S)) : e.hintText ? (l(), a("span", C, [
|
|
84
|
-
e.isReadOnly ? r("", !0) : (l(), a("span", g, h(e.hintText), 1))
|
|
85
|
-
])) : f(i).hint ? (l(), a("div", A, [
|
|
86
|
-
e.isReadOnly ? r("", !0) : p(t.$slots, "hint", { key: 0 })
|
|
87
|
-
])) : r("", !0)
|
|
88
|
-
]),
|
|
89
|
-
_: 3
|
|
90
|
-
}, 16, ["class"]));
|
|
91
|
-
}
|
|
92
|
-
});
|
|
93
|
-
export {
|
|
94
|
-
z as _
|
|
95
|
-
};
|
|
96
|
-
//# sourceMappingURL=Field.vue_vue_type_script_setup_true_lang-224ab33a.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Field.vue_vue_type_script_setup_true_lang-224ab33a.js","sources":["../src/components/Field/Field.vue"],"sourcesContent":["<script lang=\"ts\">\n export default {\n inheritAttrs: false,\n };\n</script>\n\n<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 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 const { placeholder, ...otherAttrs } = attrs;\n\n return otherAttrs;\n });\n</script>\n\n<template>\n <component\n v-bind=\"rootAttrs\"\n :is=\"wrapperElement\"\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 >\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=\"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\"\n class=\"tw-mt-1 tw-block tw-whitespace-pre-line tw-text-xs\"\n data-test=\"stash-field-hint\"\n >\n <span v-if=\"!props.isReadOnly\">{{ props.hintText }}</span>\n </span>\n\n <div v-else-if=\"slots.hint\" class=\"tw-mt-1 tw-whitespace-pre-line tw-text-xs\" data-test=\"stash-field-hint\">\n <!-- @slot for displaying hint text below the field -->\n <slot v-if=\"!props.isReadOnly\" name=\"hint\"></slot>\n </div>\n </component>\n</template>\n"],"names":["attrs","useAttrs","slots","useSlots","fieldId","computed","props","uniqueId","fieldErrorId","labelId","hasError","wrapperElement","rootAttrs","placeholder","otherAttrs"],"mappings":";;;;;;;;;;;OACiB;AAAA,EACb,cAAc;AAChB;;;;;;;;;;;;;;;;iBAwEMA,IAAQC,KACRC,IAAQC,KACRC,IAAUC,EAAS,MAAMC,EAAM,MAAMC,EAAS,cAAc,CAAC,GAC7DC,IAAeH,EAAS,MAAMC,EAAM,WAAWC,EAAS,oBAAoB,CAAC,GAC7EE,IAAUJ,EAAS,MAAME,EAAS,oBAAoB,CAAC,GACvDG,IAAWL,EAAS,MAAM,CAAC,CAACC,EAAM,SAAS,GAC3CK,IAAiBN,EAAS,MAAOC,EAAM,WAAW,aAAa,KAAM,GAIrEM,IAAYP,EAAS,MAAM;AAC/B,YAAM,EAAE,aAAAQ,GAAa,GAAGC,EAAA,IAAed;AAEhC,aAAAc;AAAA,IAAA,CACR;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|