@leaflink/stash 50.0.4 → 50.0.6
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 +37 -36
- package/dist/CurrencyInput.js.map +1 -1
- package/dist/CurrencyInput.vue.d.ts +4 -0
- 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 +2 -0
- package/dist/Field.vue_vue_type_script_setup_true_lang--tBfZB2K.js +85 -0
- package/dist/{Field.vue_vue_type_script_setup_true_lang-DjxUvSRF.js.map → Field.vue_vue_type_script_setup_true_lang--tBfZB2K.js.map} +1 -1
- package/dist/FilterSelect.js +1 -1
- package/dist/Filters.vue.d.ts +39 -0
- package/dist/Input.js +84 -81
- package/dist/Input.js.map +1 -1
- package/dist/Input.vue.d.ts +7 -0
- package/dist/InputOptions.js +82 -68
- package/dist/InputOptions.js.map +1 -1
- package/dist/InputOptions.vue.d.ts +7 -0
- package/dist/ListView.vue.d.ts +54 -0
- package/dist/RadioGroup.js +1 -1
- package/dist/Select.js +291 -276
- package/dist/Select.js.map +1 -1
- package/dist/Select.vue.d.ts +4 -0
- package/dist/TextEditor.js +1 -1
- package/dist/Textarea.js +67 -64
- package/dist/Textarea.js.map +1 -1
- package/dist/Textarea.vue.d.ts +7 -0
- package/dist/components.css +1 -1
- package/package.json +4 -1
- package/styles/backwards-compat.css +3 -3
- package/dist/Field.vue_vue_type_script_setup_true_lang-DjxUvSRF.js +0 -95
package/dist/InputOptions.js
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { _ as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { _ as
|
|
6
|
-
const
|
|
1
|
+
import { defineComponent as O, useAttrs as T, useSlots as $, useCssModule as M, ref as r, computed as z, watchEffect as A, watch as m, openBlock as c, createBlock as F, mergeProps as f, createSlots as N, withCtx as h, createElementBlock as y, createElementVNode as R, toDisplayString as _, normalizeClass as w, unref as u, createVNode as g, renderSlot as U } from "vue";
|
|
2
|
+
import { _ as D } from "./Field.vue_vue_type_script_setup_true_lang--tBfZB2K.js";
|
|
3
|
+
import P from "./Input.js";
|
|
4
|
+
import j from "./Select.js";
|
|
5
|
+
import { _ as q } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
6
|
+
const G = {
|
|
7
|
+
key: 0,
|
|
8
|
+
class: "tw-flex tw-h-input tw-items-center tw-text-sm"
|
|
9
|
+
}, H = ["id", "aria-labelledby"], J = /* @__PURE__ */ O({
|
|
7
10
|
name: "ll-input-options",
|
|
8
11
|
__name: "InputOptions",
|
|
9
12
|
props: {
|
|
@@ -15,115 +18,126 @@ const j = /* @__PURE__ */ I({
|
|
|
15
18
|
noTruncate: { type: Boolean, default: !1 },
|
|
16
19
|
options: { default: () => [] },
|
|
17
20
|
placeholder: { default: void 0 },
|
|
18
|
-
disabled: { type: Boolean, default: !1 }
|
|
21
|
+
disabled: { type: Boolean, default: !1 },
|
|
22
|
+
isReadOnly: { type: Boolean, default: !1 }
|
|
19
23
|
},
|
|
20
24
|
emits: ["update:model-value", "change"],
|
|
21
|
-
setup(
|
|
22
|
-
const e =
|
|
23
|
-
const { disabled: l, displayBy:
|
|
24
|
-
return { disabled: l, displayBy:
|
|
25
|
+
setup(b, { emit: V }) {
|
|
26
|
+
const e = b, n = V, i = T(), C = $(), p = M(), a = r(), d = r(!1), t = r(), x = z(() => {
|
|
27
|
+
const { disabled: l, displayBy: o, trackBy: s } = i;
|
|
28
|
+
return { disabled: l, displayBy: o, trackBy: s };
|
|
25
29
|
});
|
|
26
|
-
function
|
|
27
|
-
|
|
28
|
-
value:
|
|
30
|
+
function B(l) {
|
|
31
|
+
a.value = String(l), n("update:model-value", {
|
|
32
|
+
value: a.value,
|
|
29
33
|
option: t.value,
|
|
30
34
|
isValueChange: !0,
|
|
31
35
|
type: "input"
|
|
32
36
|
});
|
|
33
37
|
}
|
|
34
|
-
function
|
|
38
|
+
function k() {
|
|
35
39
|
n("change", {
|
|
36
|
-
value:
|
|
40
|
+
value: a.value,
|
|
37
41
|
option: t.value,
|
|
38
42
|
isValueChange: !0,
|
|
39
43
|
type: "input"
|
|
40
44
|
});
|
|
41
45
|
}
|
|
42
|
-
function
|
|
46
|
+
function I(l) {
|
|
43
47
|
t.value = l, n("change", {
|
|
44
|
-
value:
|
|
48
|
+
value: a.value,
|
|
45
49
|
option: t.value,
|
|
46
50
|
isValueChange: !1,
|
|
47
51
|
type: "select"
|
|
48
52
|
}), n("update:model-value", {
|
|
49
|
-
value:
|
|
53
|
+
value: a.value,
|
|
50
54
|
option: t.value,
|
|
51
55
|
isValueChange: !1,
|
|
52
56
|
type: "select"
|
|
53
57
|
});
|
|
54
58
|
}
|
|
55
|
-
if (
|
|
59
|
+
if (A(() => {
|
|
56
60
|
t.value || (t.value = e.options[0]);
|
|
57
|
-
}),
|
|
61
|
+
}), m(
|
|
58
62
|
() => e.modelValue.value,
|
|
59
63
|
() => {
|
|
60
|
-
|
|
64
|
+
a.value = e.modelValue.value;
|
|
61
65
|
},
|
|
62
66
|
{ immediate: !0 }
|
|
63
|
-
),
|
|
67
|
+
), m(
|
|
64
68
|
() => e.modelValue.option,
|
|
65
69
|
() => {
|
|
66
70
|
t.value = e.modelValue.option;
|
|
67
71
|
},
|
|
68
72
|
{ immediate: !0 }
|
|
69
|
-
),
|
|
73
|
+
), i.value)
|
|
70
74
|
throw new Error("ll-input-options: use :model-value or v-model instead of :value.");
|
|
71
|
-
if (
|
|
75
|
+
if (i.onInput)
|
|
72
76
|
throw new Error("ll-input-options: use the @update:model-value event instead of @input");
|
|
73
|
-
return (l,
|
|
77
|
+
return (l, o) => (c(), F(D, f(e, {
|
|
74
78
|
class: "stash-input-options",
|
|
75
79
|
"data-test": "stash-input-options"
|
|
76
|
-
}),
|
|
77
|
-
default:
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
"model-value"
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
80
|
+
}), N({
|
|
81
|
+
default: h(({ fieldId: s, labelId: S }) => {
|
|
82
|
+
var v;
|
|
83
|
+
return [
|
|
84
|
+
e.isReadOnly ? (c(), y("div", G, [
|
|
85
|
+
R("span", {
|
|
86
|
+
id: s,
|
|
87
|
+
"aria-labelledby": S,
|
|
88
|
+
class: "tw-h-min"
|
|
89
|
+
}, _(a.value || 0) + " " + _((v = t.value) == null ? void 0 : v.name), 9, H)
|
|
90
|
+
])) : (c(), y("div", {
|
|
91
|
+
key: 1,
|
|
92
|
+
class: w(["tw-flex", { [u(p)["has-error"]]: !!e.errorText }])
|
|
93
|
+
}, [
|
|
94
|
+
g(P, {
|
|
95
|
+
id: s,
|
|
96
|
+
class: w(["stash-input-options__input -tw-mr-[1px] tw-inline-block tw-flex-1", [u(p).input, { "tw-z-control": d.value }]]),
|
|
97
|
+
"data-test": "stash-input-options|input",
|
|
98
|
+
type: e.type,
|
|
99
|
+
"model-value": a.value,
|
|
100
|
+
disabled: e.disabled,
|
|
101
|
+
placeholder: e.placeholder,
|
|
102
|
+
onChange: k,
|
|
103
|
+
"onUpdate:modelValue": B,
|
|
104
|
+
onBlur: o[0] || (o[0] = (E) => d.value = !1),
|
|
105
|
+
onFocus: o[1] || (o[1] = (E) => d.value = !0)
|
|
106
|
+
}, null, 8, ["id", "class", "type", "model-value", "disabled", "placeholder"]),
|
|
107
|
+
g(j, f(x.value, {
|
|
108
|
+
single: "",
|
|
109
|
+
"hide-search": "",
|
|
110
|
+
"prevent-empty": "",
|
|
111
|
+
class: ["stash-input-options__select tw-min-w-20", u(p).select],
|
|
112
|
+
"data-test": "stash-input-options|select",
|
|
113
|
+
"no-truncate": l.noTruncate,
|
|
114
|
+
options: l.options,
|
|
115
|
+
"model-value": t.value,
|
|
116
|
+
disabled: e.disabled,
|
|
117
|
+
"onUpdate:modelValue": I
|
|
118
|
+
}), null, 16, ["class", "no-truncate", "options", "model-value", "disabled"])
|
|
119
|
+
], 2))
|
|
120
|
+
];
|
|
121
|
+
}),
|
|
108
122
|
_: 2
|
|
109
123
|
}, [
|
|
110
|
-
|
|
124
|
+
u(C).hint ? {
|
|
111
125
|
name: "hint",
|
|
112
|
-
fn:
|
|
113
|
-
|
|
126
|
+
fn: h(() => [
|
|
127
|
+
U(l.$slots, "hint")
|
|
114
128
|
]),
|
|
115
129
|
key: "0"
|
|
116
130
|
} : void 0
|
|
117
131
|
]), 1040));
|
|
118
132
|
}
|
|
119
|
-
}),
|
|
120
|
-
input:
|
|
121
|
-
select:
|
|
133
|
+
}), K = "_input_gn7he_2", L = "_select_gn7he_7", Q = {
|
|
134
|
+
input: K,
|
|
135
|
+
select: L,
|
|
122
136
|
"has-error": "_has-error_gn7he_16"
|
|
123
|
-
},
|
|
124
|
-
$style:
|
|
125
|
-
},
|
|
137
|
+
}, W = {
|
|
138
|
+
$style: Q
|
|
139
|
+
}, le = /* @__PURE__ */ q(J, [["__cssModules", W]]);
|
|
126
140
|
export {
|
|
127
|
-
|
|
141
|
+
le as default
|
|
128
142
|
};
|
|
129
143
|
//# sourceMappingURL=InputOptions.js.map
|
package/dist/InputOptions.js.map
CHANGED
|
@@ -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 export 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 /**\n * Placeholder text for the input\n * **Note:** placeholders should be used to display examples; they should not be used as labels because they are not accessible as labels. If a real label cannot be used, use the `aria-label` attribute.\n */\n placeholder?: string;\n\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 placeholder: undefined,\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 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 :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 :placeholder=\"props.placeholder\"\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","selectAttrs","computed","disabled","displayBy","trackBy","handleInput","val","handleInputChange","handleSelectChange","watchEffect","watch"],"mappings":"
|
|
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 export 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 /**\n * Placeholder text for the input\n * **Note:** placeholders should be used to display examples; they should not be used as labels because they are not accessible as labels. If a real label cannot be used, use the `aria-label` attribute.\n */\n placeholder?: string;\n\n /**\n * Indicates whether the inputOptions is disabled.\n */\n disabled?: boolean;\n\n /**\n * Indicates whether the inputOptions is read-only.\n */\n isReadOnly?: 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 placeholder: undefined,\n disabled: false,\n isReadOnly: 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 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, labelId }\">\n <div v-if=\"props.isReadOnly\" class=\"tw-flex tw-h-input tw-items-center tw-text-sm\">\n <span :id=\"fieldId\" :aria-labelledby=\"labelId\" class=\"tw-h-min\"\n >{{ internalInput || 0 }} {{ selectedOption?.name }}</span\n >\n </div>\n <div v-else class=\"tw-flex\" :class=\"{ [classes['has-error']]: !!props.errorText }\">\n <Input\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 :placeholder=\"props.placeholder\"\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","selectAttrs","computed","disabled","displayBy","trackBy","handleInput","val","handleInputChange","handleSelectChange","watchEffect","watch"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAyEE,UAAMA,IAAQC,GAaRC,IAAOC,GAiBPC,IAAQC,KACRC,IAAQC,KACRC,IAAUC,KACVC,IAAgBC,KAChBC,IAAiBD,EAAI,EAAK,GAC1BE,IAAiBF,KAEjBG,IAAcC,EAAS,MAAM;AACjC,YAAM,EAAE,UAAAC,GAAU,WAAAC,GAAW,SAAAC,EAAA,IAAYd;AAElC,aAAA,EAAE,UAAAY,GAAU,WAAAC,GAAW,SAAAC;IAAQ,CACvC;AAGD,aAASC,EAAYC,GAAuB;AAC5B,MAAAV,EAAA,QAAQ,OAAOU,CAAG,GAEhClB,EAAK,sBAAsB;AAAA,QACzB,OAAOQ,EAAc;AAAA,QACrB,QAAQG,EAAe;AAAA,QACvB,eAAe;AAAA,QACf,MAAM;AAAA,MAAA,CACP;AAAA,IACH;AAGA,aAASQ,IAAoB;AAC3B,MAAAnB,EAAK,UAAU;AAAA,QACb,OAAOQ,EAAc;AAAA,QACrB,QAAQG,EAAe;AAAA,QACvB,eAAe;AAAA,QACf,MAAM;AAAA,MAAA,CACP;AAAA,IACH;AAEA,aAASS,EAAmBF,GAAc;AACxC,MAAAP,EAAe,QAAQO,GAEvBlB,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,QAtBAU,EAAY,MAAM;AACZ,MAACV,EAAe,UACHA,EAAA,QAAQb,EAAM,QAAQ,CAAC;AAAA,IACxC,CACD,GAEDwB;AAAA,MACE,MAAMxB,EAAM,WAAW;AAAA,MACvB,MAAM;AACU,QAAAU,EAAA,QAAQV,EAAM,WAAW;AAAA,MACzC;AAAA,MACA,EAAE,WAAW,GAAK;AAAA,IAAA,GAGpBwB;AAAA,MACE,MAAMxB,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -45,6 +45,7 @@ label: undefined;
|
|
|
45
45
|
type: string;
|
|
46
46
|
placeholder: undefined;
|
|
47
47
|
disabled: boolean;
|
|
48
|
+
isReadOnly: boolean;
|
|
48
49
|
}>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
49
50
|
"update:model-value": (v: {
|
|
50
51
|
value?: string | undefined;
|
|
@@ -71,6 +72,7 @@ label: undefined;
|
|
|
71
72
|
type: string;
|
|
72
73
|
placeholder: undefined;
|
|
73
74
|
disabled: boolean;
|
|
75
|
+
isReadOnly: boolean;
|
|
74
76
|
}>>> & Readonly<{
|
|
75
77
|
onChange?: ((v: {
|
|
76
78
|
value?: string | undefined;
|
|
@@ -90,6 +92,7 @@ disabled: boolean;
|
|
|
90
92
|
label: string;
|
|
91
93
|
errorText: string;
|
|
92
94
|
hintText: string;
|
|
95
|
+
isReadOnly: boolean;
|
|
93
96
|
placeholder: string;
|
|
94
97
|
options: any[];
|
|
95
98
|
modelValue: {
|
|
@@ -143,6 +146,10 @@ export declare interface InputOptionsProps {
|
|
|
143
146
|
* Indicates whether the inputOptions is disabled.
|
|
144
147
|
*/
|
|
145
148
|
disabled?: boolean;
|
|
149
|
+
/**
|
|
150
|
+
* Indicates whether the inputOptions is read-only.
|
|
151
|
+
*/
|
|
152
|
+
isReadOnly?: boolean;
|
|
146
153
|
}
|
|
147
154
|
|
|
148
155
|
declare type Option_2 = any;
|
package/dist/ListView.vue.d.ts
CHANGED
|
@@ -1788,6 +1788,10 @@ hintText: {
|
|
|
1788
1788
|
type: PropType<string>;
|
|
1789
1789
|
default: undefined;
|
|
1790
1790
|
};
|
|
1791
|
+
isReadOnly: {
|
|
1792
|
+
type: PropType<boolean>;
|
|
1793
|
+
default: boolean;
|
|
1794
|
+
};
|
|
1791
1795
|
showOptionalInLabel: {
|
|
1792
1796
|
type: PropType<boolean>;
|
|
1793
1797
|
};
|
|
@@ -1826,6 +1830,7 @@ label: string;
|
|
|
1826
1830
|
id: string;
|
|
1827
1831
|
errorText: string;
|
|
1828
1832
|
hintText: string;
|
|
1833
|
+
isReadOnly: boolean;
|
|
1829
1834
|
placeholder: string;
|
|
1830
1835
|
modelValue: string | number;
|
|
1831
1836
|
value: string | number | null;
|
|
@@ -1865,6 +1870,10 @@ hintText: {
|
|
|
1865
1870
|
type: PropType<string>;
|
|
1866
1871
|
default: undefined;
|
|
1867
1872
|
};
|
|
1873
|
+
isReadOnly: {
|
|
1874
|
+
type: PropType<boolean>;
|
|
1875
|
+
default: boolean;
|
|
1876
|
+
};
|
|
1868
1877
|
showOptionalInLabel: {
|
|
1869
1878
|
type: PropType<boolean>;
|
|
1870
1879
|
};
|
|
@@ -1898,6 +1907,7 @@ label: string;
|
|
|
1898
1907
|
id: string;
|
|
1899
1908
|
errorText: string;
|
|
1900
1909
|
hintText: string;
|
|
1910
|
+
isReadOnly: boolean;
|
|
1901
1911
|
placeholder: string;
|
|
1902
1912
|
modelValue: string | number;
|
|
1903
1913
|
value: string | number | null;
|
|
@@ -1934,6 +1944,10 @@ hintText: {
|
|
|
1934
1944
|
type: PropType<string>;
|
|
1935
1945
|
default: undefined;
|
|
1936
1946
|
};
|
|
1947
|
+
isReadOnly: {
|
|
1948
|
+
type: PropType<boolean>;
|
|
1949
|
+
default: boolean;
|
|
1950
|
+
};
|
|
1937
1951
|
showOptionalInLabel: {
|
|
1938
1952
|
type: PropType<boolean>;
|
|
1939
1953
|
};
|
|
@@ -1972,6 +1986,7 @@ label: string;
|
|
|
1972
1986
|
id: string;
|
|
1973
1987
|
errorText: string;
|
|
1974
1988
|
hintText: string;
|
|
1989
|
+
isReadOnly: boolean;
|
|
1975
1990
|
placeholder: string;
|
|
1976
1991
|
modelValue: string | number;
|
|
1977
1992
|
value: string | number | null;
|
|
@@ -2005,6 +2020,10 @@ hintText: {
|
|
|
2005
2020
|
type: PropType<string>;
|
|
2006
2021
|
default: undefined;
|
|
2007
2022
|
};
|
|
2023
|
+
isReadOnly: {
|
|
2024
|
+
type: PropType<boolean>;
|
|
2025
|
+
default: boolean;
|
|
2026
|
+
};
|
|
2008
2027
|
placeholder: {
|
|
2009
2028
|
type: PropType<string>;
|
|
2010
2029
|
default: undefined;
|
|
@@ -2059,6 +2078,7 @@ disabled: boolean;
|
|
|
2059
2078
|
label: string;
|
|
2060
2079
|
errorText: string;
|
|
2061
2080
|
hintText: string;
|
|
2081
|
+
isReadOnly: boolean;
|
|
2062
2082
|
placeholder: string;
|
|
2063
2083
|
options: any[];
|
|
2064
2084
|
modelValue: {
|
|
@@ -2094,6 +2114,10 @@ hintText: {
|
|
|
2094
2114
|
type: PropType<string>;
|
|
2095
2115
|
default: undefined;
|
|
2096
2116
|
};
|
|
2117
|
+
isReadOnly: {
|
|
2118
|
+
type: PropType<boolean>;
|
|
2119
|
+
default: boolean;
|
|
2120
|
+
};
|
|
2097
2121
|
placeholder: {
|
|
2098
2122
|
type: PropType<string>;
|
|
2099
2123
|
default: undefined;
|
|
@@ -2135,6 +2159,7 @@ disabled: boolean;
|
|
|
2135
2159
|
label: string;
|
|
2136
2160
|
errorText: string;
|
|
2137
2161
|
hintText: string;
|
|
2162
|
+
isReadOnly: boolean;
|
|
2138
2163
|
placeholder: string;
|
|
2139
2164
|
options: any[];
|
|
2140
2165
|
modelValue: {
|
|
@@ -2167,6 +2192,10 @@ hintText: {
|
|
|
2167
2192
|
type: PropType<string>;
|
|
2168
2193
|
default: undefined;
|
|
2169
2194
|
};
|
|
2195
|
+
isReadOnly: {
|
|
2196
|
+
type: PropType<boolean>;
|
|
2197
|
+
default: boolean;
|
|
2198
|
+
};
|
|
2170
2199
|
placeholder: {
|
|
2171
2200
|
type: PropType<string>;
|
|
2172
2201
|
default: undefined;
|
|
@@ -2221,6 +2250,7 @@ disabled: boolean;
|
|
|
2221
2250
|
label: string;
|
|
2222
2251
|
errorText: string;
|
|
2223
2252
|
hintText: string;
|
|
2253
|
+
isReadOnly: boolean;
|
|
2224
2254
|
placeholder: string;
|
|
2225
2255
|
options: any[];
|
|
2226
2256
|
modelValue: {
|
|
@@ -2332,6 +2362,9 @@ hintText: {
|
|
|
2332
2362
|
type: PropType<string>;
|
|
2333
2363
|
default: string;
|
|
2334
2364
|
};
|
|
2365
|
+
isReadOnly: {
|
|
2366
|
+
type: PropType<boolean>;
|
|
2367
|
+
};
|
|
2335
2368
|
showOptionalInLabel: {
|
|
2336
2369
|
type: PropType<boolean>;
|
|
2337
2370
|
default: boolean;
|
|
@@ -2540,6 +2573,9 @@ hintText: {
|
|
|
2540
2573
|
type: PropType<string>;
|
|
2541
2574
|
default: string;
|
|
2542
2575
|
};
|
|
2576
|
+
isReadOnly: {
|
|
2577
|
+
type: PropType<boolean>;
|
|
2578
|
+
};
|
|
2543
2579
|
showOptionalInLabel: {
|
|
2544
2580
|
type: PropType<boolean>;
|
|
2545
2581
|
default: boolean;
|
|
@@ -2738,6 +2774,9 @@ hintText: {
|
|
|
2738
2774
|
type: PropType<string>;
|
|
2739
2775
|
default: string;
|
|
2740
2776
|
};
|
|
2777
|
+
isReadOnly: {
|
|
2778
|
+
type: PropType<boolean>;
|
|
2779
|
+
};
|
|
2741
2780
|
showOptionalInLabel: {
|
|
2742
2781
|
type: PropType<boolean>;
|
|
2743
2782
|
default: boolean;
|
|
@@ -4364,6 +4403,10 @@ hintText: {
|
|
|
4364
4403
|
type: PropType<string>;
|
|
4365
4404
|
default: undefined;
|
|
4366
4405
|
};
|
|
4406
|
+
isReadOnly: {
|
|
4407
|
+
type: PropType<boolean>;
|
|
4408
|
+
default: boolean;
|
|
4409
|
+
};
|
|
4367
4410
|
showOptionalInLabel: {
|
|
4368
4411
|
type: PropType<boolean>;
|
|
4369
4412
|
};
|
|
@@ -4402,6 +4445,7 @@ label: string;
|
|
|
4402
4445
|
id: string;
|
|
4403
4446
|
errorText: string;
|
|
4404
4447
|
hintText: string;
|
|
4448
|
+
isReadOnly: boolean;
|
|
4405
4449
|
placeholder: string;
|
|
4406
4450
|
modelValue: string | number;
|
|
4407
4451
|
value: string | number | null;
|
|
@@ -4441,6 +4485,10 @@ hintText: {
|
|
|
4441
4485
|
type: PropType<string>;
|
|
4442
4486
|
default: undefined;
|
|
4443
4487
|
};
|
|
4488
|
+
isReadOnly: {
|
|
4489
|
+
type: PropType<boolean>;
|
|
4490
|
+
default: boolean;
|
|
4491
|
+
};
|
|
4444
4492
|
showOptionalInLabel: {
|
|
4445
4493
|
type: PropType<boolean>;
|
|
4446
4494
|
};
|
|
@@ -4474,6 +4522,7 @@ label: string;
|
|
|
4474
4522
|
id: string;
|
|
4475
4523
|
errorText: string;
|
|
4476
4524
|
hintText: string;
|
|
4525
|
+
isReadOnly: boolean;
|
|
4477
4526
|
placeholder: string;
|
|
4478
4527
|
modelValue: string | number;
|
|
4479
4528
|
value: string | number | null;
|
|
@@ -4510,6 +4559,10 @@ hintText: {
|
|
|
4510
4559
|
type: PropType<string>;
|
|
4511
4560
|
default: undefined;
|
|
4512
4561
|
};
|
|
4562
|
+
isReadOnly: {
|
|
4563
|
+
type: PropType<boolean>;
|
|
4564
|
+
default: boolean;
|
|
4565
|
+
};
|
|
4513
4566
|
showOptionalInLabel: {
|
|
4514
4567
|
type: PropType<boolean>;
|
|
4515
4568
|
};
|
|
@@ -4548,6 +4601,7 @@ label: string;
|
|
|
4548
4601
|
id: string;
|
|
4549
4602
|
errorText: string;
|
|
4550
4603
|
hintText: string;
|
|
4604
|
+
isReadOnly: boolean;
|
|
4551
4605
|
placeholder: string;
|
|
4552
4606
|
modelValue: string | number;
|
|
4553
4607
|
value: string | number | null;
|
package/dist/RadioGroup.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as $, inject as k, useCssModule as V, openBlock as o, createElementBlock as n, normalizeClass as p, unref as e, Fragment as B, renderList as I, createElementVNode as i, toDisplayString as h, provide as C, computed as v, createBlock as g, 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
|
|
3
|
+
import { _ as O } from "./Field.vue_vue_type_script_setup_true_lang--tBfZB2K.js";
|
|
4
4
|
import { R as y } from "./RadioGroup.keys-CqfiKkNz.js";
|
|
5
5
|
import { _ as x } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
6
6
|
const W = ["id", "name", "value", "checked", "disabled"], j = ["for"], q = /* @__PURE__ */ $({
|