@leaflink/stash 50.0.5 → 50.0.7
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/CurrencyInput.js +55 -50
- package/dist/CurrencyInput.js.map +1 -1
- package/dist/CurrencyInput.vue.d.ts +31 -6
- package/dist/DatePicker.js +7 -7
- package/dist/DatePicker.js.map +1 -1
- package/dist/Field.js +1 -1
- package/dist/Field.vue.d.ts +11 -0
- package/dist/Field.vue_vue_type_script_setup_true_lang-DEizIcDo.js +88 -0
- package/dist/Field.vue_vue_type_script_setup_true_lang-DEizIcDo.js.map +1 -0
- package/dist/FilterSelect.js +67 -56
- package/dist/FilterSelect.js.map +1 -1
- package/dist/FilterSelect.vue.d.ts +54 -2
- package/dist/Filters.vue.d.ts +162 -96
- package/dist/Input.js +97 -91
- package/dist/Input.js.map +1 -1
- package/dist/Input.vue.d.ts +31 -21
- package/dist/InputOptions.js +83 -62
- package/dist/InputOptions.js.map +1 -1
- package/dist/InputOptions.vue.d.ts +49 -16
- package/dist/ListView.vue.d.ts +231 -134
- package/dist/RadioGroup.js +67 -70
- package/dist/RadioGroup.js.map +1 -1
- package/dist/RadioGroup.vue.d.ts +54 -45
- package/dist/Select.js +350 -336
- package/dist/Select.js.map +1 -1
- package/dist/Select.vue.d.ts +54 -47
- package/dist/TextEditor.js +671 -684
- package/dist/TextEditor.js.map +1 -1
- package/dist/TextEditor.vue.d.ts +54 -61
- package/dist/Textarea.js +65 -59
- package/dist/Textarea.js.map +1 -1
- package/dist/Textarea.vue.d.ts +50 -32
- package/dist/components.css +2 -2
- package/package.json +1 -1
- package/styles/backwards-compat.css +3 -3
- package/dist/Field.vue_vue_type_script_setup_true_lang-DjxUvSRF.js +0 -95
- package/dist/Field.vue_vue_type_script_setup_true_lang-DjxUvSRF.js.map +0 -1
package/package.json
CHANGED
|
@@ -4396,7 +4396,7 @@
|
|
|
4396
4396
|
/* ---------------------------------------
|
|
4397
4397
|
Base
|
|
4398
4398
|
---------------------------------------- */
|
|
4399
|
-
input[disabled]
|
|
4399
|
+
input[disabled] {
|
|
4400
4400
|
background-color: #E8E9EE !important;
|
|
4401
4401
|
background-color: var(--color-ice-200) !important;
|
|
4402
4402
|
border-color: #C5C9D4 !important;
|
|
@@ -4404,10 +4404,10 @@ input[disabled], input[readonly] {
|
|
|
4404
4404
|
color: #76797F !important;
|
|
4405
4405
|
color: var(--color-ice-700) !important;
|
|
4406
4406
|
}
|
|
4407
|
-
input[disabled]
|
|
4407
|
+
input[disabled] {
|
|
4408
4408
|
pointer-events: none;
|
|
4409
4409
|
}
|
|
4410
|
-
input[disabled]:active, input[disabled]:focus
|
|
4410
|
+
input[disabled]:active, input[disabled]:focus {
|
|
4411
4411
|
-webkit-box-shadow: none !important;
|
|
4412
4412
|
box-shadow: none !important;
|
|
4413
4413
|
}
|
|
@@ -1,95 +0,0 @@
|
|
|
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
|
-
import p from "lodash-es/uniqueId";
|
|
3
|
-
import { _ as q } from "./Label.vue_vue_type_script_setup_true_lang-C4JKdqvC.js";
|
|
4
|
-
const E = ["aria-labelledby"], L = ["id"], S = {
|
|
5
|
-
key: 4,
|
|
6
|
-
class: "stash-field-hint tw-mt-1 tw-block tw-whitespace-pre-line tw-text-xs",
|
|
7
|
-
"data-test": "stash-field-hint"
|
|
8
|
-
}, g = {
|
|
9
|
-
key: 5,
|
|
10
|
-
class: "stash-field-hint tw-mt-1 tw-whitespace-pre-line tw-text-xs",
|
|
11
|
-
"data-test": "stash-field-hint"
|
|
12
|
-
}, D = /* @__PURE__ */ _({
|
|
13
|
-
inheritAttrs: !1,
|
|
14
|
-
__name: "Field",
|
|
15
|
-
props: {
|
|
16
|
-
addBottomSpace: { type: Boolean, default: !1 },
|
|
17
|
-
errorText: { default: void 0 },
|
|
18
|
-
hintText: { default: void 0 },
|
|
19
|
-
id: { default: void 0 },
|
|
20
|
-
errorId: { default: void 0 },
|
|
21
|
-
isReadOnly: { type: Boolean },
|
|
22
|
-
isRequired: { type: Boolean, default: !1 },
|
|
23
|
-
label: { default: void 0 },
|
|
24
|
-
showOptionalInLabel: { type: Boolean, default: !1 },
|
|
25
|
-
fieldset: { type: Boolean, default: !1 },
|
|
26
|
-
disabled: { type: Boolean, default: !1 }
|
|
27
|
-
},
|
|
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-")), s = l(() => p("stash-field-label-")), n = l(() => !!e.errorText), I = l(() => e.fieldset ? "fieldset" : "div"), x = l(() => {
|
|
30
|
-
const { placeholder: t, ...c } = y;
|
|
31
|
-
return c;
|
|
32
|
-
});
|
|
33
|
-
return (t, c) => (a(), w(k(I.value), O({
|
|
34
|
-
"data-test": "stash-field",
|
|
35
|
-
class: ["stash-field", [
|
|
36
|
-
{ "tw-p-0": e.fieldset },
|
|
37
|
-
{ "tw-mb-9": e.addBottomSpace && !e.errorText && !e.hintText && !f(r).hint },
|
|
38
|
-
{ "tw-mb-4": e.addBottomSpace && (e.errorText || e.hintText || f(r).hint) },
|
|
39
|
-
{ "stash-field--disabled": e.disabled }
|
|
40
|
-
]]
|
|
41
|
-
}, x.value), {
|
|
42
|
-
default: b(() => [
|
|
43
|
-
e.label ? (a(), w(q, {
|
|
44
|
-
key: 0,
|
|
45
|
-
id: s.value,
|
|
46
|
-
for: d.value,
|
|
47
|
-
"has-error": n.value,
|
|
48
|
-
"is-required": t.isRequired,
|
|
49
|
-
"show-optional": e.showOptionalInLabel,
|
|
50
|
-
legend: e.fieldset,
|
|
51
|
-
disabled: e.disabled
|
|
52
|
-
}, {
|
|
53
|
-
default: b(() => [
|
|
54
|
-
R(h(e.label), 1)
|
|
55
|
-
]),
|
|
56
|
-
_: 1
|
|
57
|
-
}, 8, ["id", "for", "has-error", "is-required", "show-optional", "legend", "disabled"])) : m("", !0),
|
|
58
|
-
e.isReadOnly ? (a(), o("div", {
|
|
59
|
-
key: 1,
|
|
60
|
-
"aria-labelledby": s.value
|
|
61
|
-
}, [
|
|
62
|
-
u(t.$slots, "default", {
|
|
63
|
-
fieldId: d.value,
|
|
64
|
-
fieldErrorId: i.value,
|
|
65
|
-
hasError: n.value,
|
|
66
|
-
isRequired: t.isRequired,
|
|
67
|
-
labelId: s.value,
|
|
68
|
-
showOptionalInLabel: e.showOptionalInLabel
|
|
69
|
-
})
|
|
70
|
-
], 8, E)) : u(t.$slots, "default", {
|
|
71
|
-
key: 2,
|
|
72
|
-
fieldId: d.value,
|
|
73
|
-
fieldErrorId: i.value,
|
|
74
|
-
hasError: n.value,
|
|
75
|
-
isRequired: t.isRequired,
|
|
76
|
-
labelId: s.value,
|
|
77
|
-
showOptionalInLabel: e.showOptionalInLabel
|
|
78
|
-
}),
|
|
79
|
-
e.errorText ? (a(), o("span", {
|
|
80
|
-
key: 3,
|
|
81
|
-
id: i.value,
|
|
82
|
-
class: "stash-field-error tw-mt-1 tw-block tw-whitespace-pre-line tw-text-xs tw-text-red-500",
|
|
83
|
-
"data-test": "stash-field-error"
|
|
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, [
|
|
85
|
-
u(t.$slots, "hint")
|
|
86
|
-
])) : m("", !0)
|
|
87
|
-
]),
|
|
88
|
-
_: 3
|
|
89
|
-
}, 16, ["class"]));
|
|
90
|
-
}
|
|
91
|
-
});
|
|
92
|
-
export {
|
|
93
|
-
D as _
|
|
94
|
-
};
|
|
95
|
-
//# sourceMappingURL=Field.vue_vue_type_script_setup_true_lang-DjxUvSRF.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Field.vue_vue_type_script_setup_true_lang-DjxUvSRF.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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|