@vue-interface/select-field 1.0.0-beta.9 → 2.0.1
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/LICENSE +22 -0
- package/README.md +34 -0
- package/dist/index.d.ts +1 -1
- package/dist/select-field.js +128 -112
- package/dist/select-field.js.map +1 -1
- package/dist/select-field.umd.cjs +1 -1
- package/dist/select-field.umd.cjs.map +1 -1
- package/dist/src/SelectField.vue.d.ts +80 -588
- package/index.css +3 -0
- package/package.json +24 -36
- package/dist/style.css +0 -1
package/LICENSE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Justin Kimbrell
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
22
|
+
|
package/README.md
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Select Field
|
|
2
|
+
|
|
3
|
+
The `select-field` component provides flexible and customizable select dropdown fields with customizable sizes and states.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pnpm i @vue-interface/select-field
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
yarn add @vue-interface/select-field
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm i @vue-interface/select-field
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
bun i @vue-interface/select-field
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Basic Usage
|
|
24
|
+
|
|
25
|
+
```vue
|
|
26
|
+
<SelectField v-model="value" label="Regular Field" tabindex="1">
|
|
27
|
+
<option value="1">Option 1</option>
|
|
28
|
+
<option value="2">Option 2</option>
|
|
29
|
+
<option value="3">Option 3</option>
|
|
30
|
+
</SelectField>
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
For more comprehensive documentation and examples, please visit the [online documentation](https://vue-interface.github.io/packages/select-field/).
|
|
34
|
+
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import SelectField from './src/SelectField.vue';
|
|
1
|
+
import { default as SelectField } from './src/SelectField.vue';
|
|
2
2
|
export { SelectField };
|
package/dist/select-field.js
CHANGED
|
@@ -1,125 +1,141 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
const
|
|
5
|
-
name: "SelectField",
|
|
6
|
-
components: {
|
|
7
|
-
ActivityIndicator: g
|
|
8
|
-
},
|
|
9
|
-
extends: S,
|
|
10
|
-
props: {
|
|
11
|
-
/**
|
|
12
|
-
* The default class name assigned to the control element
|
|
13
|
-
*
|
|
14
|
-
* @param {String}
|
|
15
|
-
* @default 'form-select'
|
|
16
|
-
*/
|
|
17
|
-
formControlClass: {
|
|
18
|
-
type: String,
|
|
19
|
-
default: "form-select"
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
computed: {
|
|
23
|
-
controlClass() {
|
|
24
|
-
return this.plaintext ? `${this.formControlClass}-plaintext` : this.formControlClass;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
const P = (e, s) => {
|
|
29
|
-
const d = e.__vccOpts || e;
|
|
30
|
-
for (const [u, v] of s)
|
|
31
|
-
d[u] = v;
|
|
32
|
-
return d;
|
|
33
|
-
}, w = ["for"], O = { class: "form-group-inner" }, j = {
|
|
1
|
+
import { defineComponent as M, mergeModels as h, useModel as T, ref as F, onMounted as A, useSlots as N, createElementBlock as c, openBlock as n, normalizeClass as C, unref as t, renderSlot as r, createElementVNode as a, createCommentVNode as s, toDisplayString as u, normalizeProps as m, guardReactiveProps as f, withDirectives as E, mergeProps as P, vModelSelect as x, createVNode as S, Transition as D, withCtx as k, createBlock as V, createTextVNode as G } from "vue";
|
|
2
|
+
import { ActivityIndicator as I } from "@vue-interface/activity-indicator";
|
|
3
|
+
import { useFormControl as L, FormControlErrors as R, FormControlFeedback as U } from "@vue-interface/form-control";
|
|
4
|
+
const j = ["for"], p = { class: "form-control-inner" }, q = { class: "form-control-activity-indicator" }, H = {
|
|
34
5
|
invalid: "",
|
|
35
6
|
class: "invalid-feedback"
|
|
36
|
-
},
|
|
7
|
+
}, J = {
|
|
37
8
|
valid: "",
|
|
38
9
|
class: "valid-feedback"
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
10
|
+
}, W = /* @__PURE__ */ M({
|
|
11
|
+
inheritAttrs: !1,
|
|
12
|
+
__name: "SelectField",
|
|
13
|
+
props: /* @__PURE__ */ h({
|
|
14
|
+
activity: { type: Boolean },
|
|
15
|
+
disabled: { type: Boolean },
|
|
16
|
+
error: {},
|
|
17
|
+
errors: {},
|
|
18
|
+
feedback: {},
|
|
19
|
+
formControlClass: { default: "form-select" },
|
|
20
|
+
helpText: {},
|
|
21
|
+
id: {},
|
|
22
|
+
indicator: {},
|
|
23
|
+
indicatorSize: {},
|
|
24
|
+
invalid: { type: Boolean },
|
|
25
|
+
label: {},
|
|
26
|
+
labelClass: { default: "form-label" },
|
|
27
|
+
modelValue: {},
|
|
28
|
+
name: {},
|
|
29
|
+
plaintext: { type: Boolean },
|
|
30
|
+
size: {},
|
|
31
|
+
color: {},
|
|
32
|
+
readonly: { type: Boolean },
|
|
33
|
+
valid: { type: Boolean },
|
|
34
|
+
value: {}
|
|
35
|
+
}, {
|
|
36
|
+
modelValue: {},
|
|
37
|
+
modelModifiers: {}
|
|
38
|
+
}),
|
|
39
|
+
emits: /* @__PURE__ */ h(["update:modelValue", "blur", "focus", "focusin", "focusout", "click", "doubleclick", "contextmenu", "mousedown", "mouseup", "mouseover", "mouseout", "mouseenter", "mouseleave", "mousemove", "keydown", "keyup", "keypress", "select", "selectionchange", "invalid", "submit", "reset", "scroll", "wheel", "copy", "cut", "paste", "touchstart", "touchend", "touchmove", "touchcancel", "change", "input", "beforeinput"], ["update:modelValue"]),
|
|
40
|
+
setup(e, { emit: $ }) {
|
|
41
|
+
const B = e, d = T(e, "modelValue"), g = $, {
|
|
42
|
+
controlAttributes: v,
|
|
43
|
+
formGroupClasses: w,
|
|
44
|
+
listeners: b
|
|
45
|
+
} = L({ model: d, props: B, emit: g }), y = F();
|
|
46
|
+
function z(o) {
|
|
47
|
+
b.onClick(o), y.value?.focus();
|
|
48
|
+
}
|
|
49
|
+
return A(() => {
|
|
50
|
+
const o = N().default;
|
|
51
|
+
if (o)
|
|
52
|
+
for (const l of o()) {
|
|
53
|
+
if (!l.props)
|
|
54
|
+
return;
|
|
55
|
+
"selected" in l.props && (l.props.value ?? l.children) && (d.value = l.props.value ?? l.children);
|
|
56
|
+
}
|
|
57
|
+
}), (o, l) => (n(), c("div", {
|
|
58
|
+
class: C(["select-field", t(w)])
|
|
59
|
+
}, [
|
|
60
|
+
r(o.$slots, "label", {}, () => [
|
|
61
|
+
e.label ? (n(), c("label", {
|
|
56
62
|
key: 0,
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
63
|
+
ref: "label",
|
|
64
|
+
for: t(v).id,
|
|
65
|
+
class: C(e.labelClass),
|
|
66
|
+
onMousedown: z
|
|
67
|
+
}, u(e.label), 43, j)) : s("", !0)
|
|
68
|
+
]),
|
|
69
|
+
a("div", p, [
|
|
70
|
+
r(o.$slots, "control", m(f({ controlAttributes: t(v), listeners: t(b) })), () => [
|
|
71
|
+
o.$slots.icon ? (n(), c("div", {
|
|
72
|
+
key: 0,
|
|
73
|
+
class: "form-control-inner-icon",
|
|
74
|
+
onClick: l[0] || (l[0] = (i) => y.value?.focus())
|
|
75
|
+
}, [
|
|
76
|
+
r(o.$slots, "icon")
|
|
77
|
+
])) : s("", !0),
|
|
78
|
+
E(a("select", P({
|
|
79
|
+
ref_key: "field",
|
|
80
|
+
ref: y,
|
|
81
|
+
"onUpdate:modelValue": l[1] || (l[1] = (i) => d.value = i)
|
|
82
|
+
}, { ...t(v), ...t(b) }), [
|
|
83
|
+
r(o.$slots, "default")
|
|
84
|
+
], 16), [
|
|
85
|
+
[x, d.value]
|
|
86
|
+
])
|
|
87
|
+
]),
|
|
88
|
+
a("div", q, [
|
|
89
|
+
r(o.$slots, "activity", {}, () => [
|
|
90
|
+
S(D, { name: "select-field-fade" }, {
|
|
91
|
+
default: k(() => [
|
|
92
|
+
e.activity && e.indicator ? (n(), V(t(I), {
|
|
93
|
+
key: "activity",
|
|
94
|
+
ref: "activity",
|
|
95
|
+
type: e.indicator,
|
|
96
|
+
size: e.indicatorSize
|
|
97
|
+
}, null, 8, ["type", "size"])) : s("", !0)
|
|
98
|
+
]),
|
|
99
|
+
_: 1
|
|
100
|
+
})
|
|
101
|
+
])
|
|
72
102
|
])
|
|
73
103
|
]),
|
|
74
|
-
o
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
104
|
+
r(o.$slots, "errors", m(f({ error: e.error, errors: e.errors, id: e.id, name: e.name })), () => [
|
|
105
|
+
e.error || e.errors ? (n(), V(t(R), {
|
|
106
|
+
key: 0,
|
|
107
|
+
id: e.id && String(e.id),
|
|
108
|
+
name: e.name && String(e.name),
|
|
109
|
+
error: e.error,
|
|
110
|
+
errors: e.errors
|
|
111
|
+
}, {
|
|
112
|
+
default: k(({ error: i }) => [
|
|
113
|
+
a("div", H, [
|
|
114
|
+
G(u(i), 1),
|
|
115
|
+
l[2] || (l[2] = a("br", null, null, -1))
|
|
116
|
+
])
|
|
83
117
|
]),
|
|
84
118
|
_: 1
|
|
85
|
-
})
|
|
119
|
+
}, 8, ["id", "name", "error", "errors"])) : s("", !0)
|
|
120
|
+
]),
|
|
121
|
+
r(o.$slots, "feedback", m(f({ feedback: e.feedback })), () => [
|
|
122
|
+
S(t(U), { feedback: e.feedback }, {
|
|
123
|
+
default: k(({ feedback: i }) => [
|
|
124
|
+
a("div", J, u(i), 1)
|
|
125
|
+
]),
|
|
126
|
+
_: 1
|
|
127
|
+
}, 8, ["feedback"])
|
|
128
|
+
]),
|
|
129
|
+
r(o.$slots, "help", m(f({ helpText: e.helpText })), () => [
|
|
130
|
+
e.helpText ? (n(), c("small", {
|
|
131
|
+
key: 0,
|
|
132
|
+
ref: "help"
|
|
133
|
+
}, u(e.helpText), 513)) : s("", !0)
|
|
86
134
|
])
|
|
87
|
-
])
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
key: 0,
|
|
91
|
-
id: e.$attrs.id,
|
|
92
|
-
name: e.$attrs.name,
|
|
93
|
-
error: e.error,
|
|
94
|
-
errors: e.errors
|
|
95
|
-
}, {
|
|
96
|
-
default: p(({ error: r }) => [
|
|
97
|
-
a("div", j, [
|
|
98
|
-
B(i(r), 1),
|
|
99
|
-
G
|
|
100
|
-
])
|
|
101
|
-
]),
|
|
102
|
-
_: 1
|
|
103
|
-
}, 8, ["id", "name", "error", "errors"])) : n("", !0)
|
|
104
|
-
]),
|
|
105
|
-
o(e.$slots, "feedback", c(f({ feedback: e.feedback })), () => [
|
|
106
|
-
k(h, { feedback: e.feedback }, {
|
|
107
|
-
default: p(({ feedback: r }) => [
|
|
108
|
-
a("div", I, i(r), 1)
|
|
109
|
-
]),
|
|
110
|
-
_: 1
|
|
111
|
-
}, 8, ["feedback"])
|
|
112
|
-
]),
|
|
113
|
-
o(e.$slots, "help", {}, () => [
|
|
114
|
-
e.helpText ? (t(), l("small", {
|
|
115
|
-
key: 0,
|
|
116
|
-
ref: "help"
|
|
117
|
-
}, i(e.helpText), 513)) : n("", !0)
|
|
118
|
-
])
|
|
119
|
-
], 2);
|
|
120
|
-
}
|
|
121
|
-
const J = /* @__PURE__ */ P(D, [["render", M]]);
|
|
135
|
+
], 2));
|
|
136
|
+
}
|
|
137
|
+
});
|
|
122
138
|
export {
|
|
123
|
-
|
|
139
|
+
W as SelectField
|
|
124
140
|
};
|
|
125
141
|
//# sourceMappingURL=select-field.js.map
|
package/dist/select-field.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select-field.js","sources":["../src/SelectField.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { ActivityIndicator } from '@vue-interface/activity-indicator';\nimport {
|
|
1
|
+
{"version":3,"file":"select-field.js","sources":["../src/SelectField.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"ModelValue, Value\">\nimport { ActivityIndicator } from '@vue-interface/activity-indicator';\nimport type { FormControlEvents, FormControlProps, FormControlSlots } from '@vue-interface/form-control';\nimport { FormControlErrors, FormControlFeedback, useFormControl } from '@vue-interface/form-control';\nimport { InputHTMLAttributes, onMounted, ref, SelectHTMLAttributes, useSlots } from 'vue';\n\nconst props = withDefaults(defineProps<SelectFieldProps<ModelValue,Value>>(), {\n formControlClass: 'form-select',\n labelClass: 'form-label'\n});\n\ndefineOptions({\n inheritAttrs: false\n});\n\nconst model = defineModel<ModelValue>();\n\ndefineSlots<FormControlSlots<SelectFieldControlSizePrefix,ModelValue> & {\n default: () => unknown\n}>();\n\nconst emit = defineEmits<FormControlEvents<ModelValue>>();\n\nconst {\n controlAttributes,\n formGroupClasses,\n listeners,\n} = useFormControl<InputHTMLAttributes, SelectFieldControlSizePrefix, ModelValue, Value>({ model, props, emit });\n\nconst field = ref<HTMLSelectElement>();\n\nfunction onMousedownLabel(e: MouseEvent) {\n listeners.onClick(e);\n\n field.value?.focus();\n}\n\n// Check the option slots for selected options. If the field has hardcoded\n// selected options, this will ensure the value of the field is always set to\n// the property. This will ensure the model is updated to the selected value.\nonMounted(() => {\n const slot = useSlots().default;\n\n if(!slot) {\n return;\n }\n\n for(const child of slot()) {\n if(!child.props) {\n return;\n }\n \n if('selected' in child.props && (child.props.value ?? child.children)) {\n model.value = child.props.value ?? child.children;\n }\n }\n});\n</script>\n\n<script lang=\"ts\">\nexport type SelectFieldControlSizePrefix = 'form-select';\n\nexport type SelectFieldProps<ModelValue, Value> = FormControlProps<\n SelectHTMLAttributes, \n SelectFieldControlSizePrefix, \n ModelValue, \n Value\n>;\n</script>\n\n<template>\n <div\n class=\"select-field\"\n :class=\"formGroupClasses\">\n <slot name=\"label\">\n <label\n v-if=\"label\"\n ref=\"label\"\n :for=\"controlAttributes.id\"\n :class=\"labelClass\"\n @mousedown=\"onMousedownLabel\">\n {{ label }}\n </label>\n </slot>\n\n <div class=\"form-control-inner\">\n <slot\n name=\"control\"\n v-bind=\"{ controlAttributes, listeners }\">\n <div\n v-if=\"$slots.icon\"\n class=\"form-control-inner-icon\"\n @click=\"field?.focus()\">\n <slot name=\"icon\" />\n </div>\n <select\n ref=\"field\"\n v-model=\"model\"\n v-bind=\"{...controlAttributes, ...listeners}\">\n <slot />\n </select>\n </slot>\n \n <div class=\"form-control-activity-indicator\">\n <slot name=\"activity\">\n <Transition name=\"select-field-fade\">\n <ActivityIndicator\n v-if=\"activity && indicator\"\n key=\"activity\"\n ref=\"activity\"\n :type=\"indicator\"\n :size=\"indicatorSize\" />\n </Transition>\n </slot>\n </div> \n </div>\n\n <slot\n name=\"errors\"\n v-bind=\"{ error, errors, id, name }\"> \n <FormControlErrors\n v-if=\"!!(error || errors)\"\n :id=\"id && String(id)\"\n v-slot=\"{ error }\"\n :name=\"name && String(name)\"\n :error=\"error\"\n :errors=\"errors\">\n <div\n invalid\n class=\"invalid-feedback\">\n {{ error }}<br>\n </div>\n </FormControlErrors>\n </slot>\n \n <slot\n name=\"feedback\"\n v-bind=\"{ feedback }\">\n <FormControlFeedback\n v-slot=\"{ feedback }\"\n :feedback=\"feedback\">\n <div\n valid\n class=\"valid-feedback\">\n {{ feedback }}\n </div>\n </FormControlFeedback>\n </slot>\n\n <slot\n name=\"help\"\n v-bind=\"{ helpText }\">\n <small\n v-if=\"helpText\"\n ref=\"help\">\n {{ helpText }}\n </small>\n </slot>\n </div>\n</template>"],"names":["props","__props","model","_useModel","emit","__emit","controlAttributes","formGroupClasses","listeners","useFormControl","field","ref","onMousedownLabel","e","onMounted","slot","useSlots","child","_createElementBlock","_normalizeClass","_unref","_renderSlot","_ctx","_hoisted_1","_createElementVNode","_hoisted_2","_normalizeProps","_guardReactiveProps","$slots","_cache","$event","_withDirectives","_mergeProps","_hoisted_3","_createVNode","_Transition","_createBlock","ActivityIndicator","FormControlErrors","_withCtx","error","_hoisted_4","FormControlFeedback","fe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H,EAYOC,EAAA,QAAA,YAAAI,EAAAC,EAAA,EAAA,UAVO1B,EAAA,SAAA,CAAQ,CAAA,GAFtB,MAYO;AAAA,QATHiC,EAQsBd,EAAAsB,CAAA,GAAA,EANjB,UAAUzC,EAAA,YAAQ;AAAA,UACnB,SAAAsC,EAAA,CAIM,EANI,UAAAI,QAAQ;AAAA,YAElBnB,EAIM,OAJNoB,GAIMC,EADCF,CAAQ,GAAA,CAAA;AAAA,UAAA;;;;MAKvBtB,EAQOC,EAAA,QAAA,QAAAI,EAAAC,EAAA,EAAA,UANO1B,EAAA,SAAA,CAAQ,CAAA,GAFtB,MAQO;AAAA,QAJOA,EAAA,iBADViB,EAIQ,SAAA;AAAA;UAFJ,KAAI;AAAA,QAAA,KACDjB,EAAA,QAAQ,GAAA,GAAA;;;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(l,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("@vue-interface/activity-indicator"),require("@vue-interface/form-control")):typeof define=="function"&&define.amd?define(["exports","vue","@vue-interface/activity-indicator","@vue-interface/form-control"],e):(l=typeof globalThis<"u"?globalThis:l||self,e(l.SelectField={},l.Vue,l.VueInterfaceActivityIndicator,l.VueInterfaceFormControl))})(this,(function(l,e,f,a){"use strict";const m=["for"],u={class:"form-control-inner"},y={class:"form-control-activity-indicator"},k={invalid:"",class:"invalid-feedback"},b={valid:"",class:"valid-feedback"},h=e.defineComponent({inheritAttrs:!1,__name:"SelectField",props:e.mergeModels({activity:{type:Boolean},disabled:{type:Boolean},error:{},errors:{},feedback:{},formControlClass:{default:"form-select"},helpText:{},id:{},indicator:{},indicatorSize:{},invalid:{type:Boolean},label:{},labelClass:{default:"form-label"},modelValue:{},name:{},plaintext:{type:Boolean},size:{},color:{},readonly:{type:Boolean},valid:{type:Boolean},value:{}},{modelValue:{},modelModifiers:{}}),emits:e.mergeModels(["update:modelValue","blur","focus","focusin","focusout","click","doubleclick","contextmenu","mousedown","mouseup","mouseover","mouseout","mouseenter","mouseleave","mousemove","keydown","keyup","keypress","select","selectionchange","invalid","submit","reset","scroll","wheel","copy","cut","paste","touchstart","touchend","touchmove","touchcancel","change","input","beforeinput"],["update:modelValue"]),setup(t,{emit:S}){const V=t,i=e.useModel(t,"modelValue"),C=S,{controlAttributes:c,formGroupClasses:B,listeners:d}=a.useFormControl({model:i,props:V,emit:C}),s=e.ref();function p(o){d.onClick(o),s.value?.focus()}return e.onMounted(()=>{const o=e.useSlots().default;if(o)for(const r of o()){if(!r.props)return;"selected"in r.props&&(r.props.value??r.children)&&(i.value=r.props.value??r.children)}}),(o,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["select-field",e.unref(B)])},[e.renderSlot(o.$slots,"label",{},()=>[t.label?(e.openBlock(),e.createElementBlock("label",{key:0,ref:"label",for:e.unref(c).id,class:e.normalizeClass(t.labelClass),onMousedown:p},e.toDisplayString(t.label),43,m)):e.createCommentVNode("",!0)]),e.createElementVNode("div",u,[e.renderSlot(o.$slots,"control",e.normalizeProps(e.guardReactiveProps({controlAttributes:e.unref(c),listeners:e.unref(d)})),()=>[o.$slots.icon?(e.openBlock(),e.createElementBlock("div",{key:0,class:"form-control-inner-icon",onClick:r[0]||(r[0]=n=>s.value?.focus())},[e.renderSlot(o.$slots,"icon")])):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("select",e.mergeProps({ref_key:"field",ref:s,"onUpdate:modelValue":r[1]||(r[1]=n=>i.value=n)},{...e.unref(c),...e.unref(d)}),[e.renderSlot(o.$slots,"default")],16),[[e.vModelSelect,i.value]])]),e.createElementVNode("div",y,[e.renderSlot(o.$slots,"activity",{},()=>[e.createVNode(e.Transition,{name:"select-field-fade"},{default:e.withCtx(()=>[t.activity&&t.indicator?(e.openBlock(),e.createBlock(e.unref(f.ActivityIndicator),{key:"activity",ref:"activity",type:t.indicator,size:t.indicatorSize},null,8,["type","size"])):e.createCommentVNode("",!0)]),_:1})])])]),e.renderSlot(o.$slots,"errors",e.normalizeProps(e.guardReactiveProps({error:t.error,errors:t.errors,id:t.id,name:t.name})),()=>[t.error||t.errors?(e.openBlock(),e.createBlock(e.unref(a.FormControlErrors),{key:0,id:t.id&&String(t.id),name:t.name&&String(t.name),error:t.error,errors:t.errors},{default:e.withCtx(({error:n})=>[e.createElementVNode("div",k,[e.createTextVNode(e.toDisplayString(n),1),r[2]||(r[2]=e.createElementVNode("br",null,null,-1))])]),_:1},8,["id","name","error","errors"])):e.createCommentVNode("",!0)]),e.renderSlot(o.$slots,"feedback",e.normalizeProps(e.guardReactiveProps({feedback:t.feedback})),()=>[e.createVNode(e.unref(a.FormControlFeedback),{feedback:t.feedback},{default:e.withCtx(({feedback:n})=>[e.createElementVNode("div",b,e.toDisplayString(n),1)]),_:1},8,["feedback"])]),e.renderSlot(o.$slots,"help",e.normalizeProps(e.guardReactiveProps({helpText:t.helpText})),()=>[t.helpText?(e.openBlock(),e.createElementBlock("small",{key:0,ref:"help"},e.toDisplayString(t.helpText),513)):e.createCommentVNode("",!0)])],2))}});l.SelectField=h,Object.defineProperty(l,Symbol.toStringTag,{value:"Module"})}));
|
|
2
2
|
//# sourceMappingURL=select-field.umd.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select-field.umd.cjs","sources":["../src/SelectField.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { ActivityIndicator } from '@vue-interface/activity-indicator';\nimport {
|
|
1
|
+
{"version":3,"file":"select-field.umd.cjs","sources":["../src/SelectField.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"ModelValue, Value\">\nimport { ActivityIndicator } from '@vue-interface/activity-indicator';\nimport type { FormControlEvents, FormControlProps, FormControlSlots } from '@vue-interface/form-control';\nimport { FormControlErrors, FormControlFeedback, useFormControl } from '@vue-interface/form-control';\nimport { InputHTMLAttributes, onMounted, ref, SelectHTMLAttributes, useSlots } from 'vue';\n\nconst props = withDefaults(defineProps<SelectFieldProps<ModelValue,Value>>(), {\n formControlClass: 'form-select',\n labelClass: 'form-label'\n});\n\ndefineOptions({\n inheritAttrs: false\n});\n\nconst model = defineModel<ModelValue>();\n\ndefineSlots<FormControlSlots<SelectFieldControlSizePrefix,ModelValue> & {\n default: () => unknown\n}>();\n\nconst emit = defineEmits<FormControlEvents<ModelValue>>();\n\nconst {\n controlAttributes,\n formGroupClasses,\n listeners,\n} = useFormControl<InputHTMLAttributes, SelectFieldControlSizePrefix, ModelValue, Value>({ model, props, emit });\n\nconst field = ref<HTMLSelectElement>();\n\nfunction onMousedownLabel(e: MouseEvent) {\n listeners.onClick(e);\n\n field.value?.focus();\n}\n\n// Check the option slots for selected options. If the field has hardcoded\n// selected options, this will ensure the value of the field is always set to\n// the property. This will ensure the model is updated to the selected value.\nonMounted(() => {\n const slot = useSlots().default;\n\n if(!slot) {\n return;\n }\n\n for(const child of slot()) {\n if(!child.props) {\n return;\n }\n \n if('selected' in child.props && (child.props.value ?? child.children)) {\n model.value = child.props.value ?? child.children;\n }\n }\n});\n</script>\n\n<script lang=\"ts\">\nexport type SelectFieldControlSizePrefix = 'form-select';\n\nexport type SelectFieldProps<ModelValue, Value> = FormControlProps<\n SelectHTMLAttributes, \n SelectFieldControlSizePrefix, \n ModelValue, \n Value\n>;\n</script>\n\n<template>\n <div\n class=\"select-field\"\n :class=\"formGroupClasses\">\n <slot name=\"label\">\n <label\n v-if=\"label\"\n ref=\"label\"\n :for=\"controlAttributes.id\"\n :class=\"labelClass\"\n @mousedown=\"onMousedownLabel\">\n {{ label }}\n </label>\n </slot>\n\n <div class=\"form-control-inner\">\n <slot\n name=\"control\"\n v-bind=\"{ controlAttributes, listeners }\">\n <div\n v-if=\"$slots.icon\"\n class=\"form-control-inner-icon\"\n @click=\"field?.focus()\">\n <slot name=\"icon\" />\n </div>\n <select\n ref=\"field\"\n v-model=\"model\"\n v-bind=\"{...controlAttributes, ...listeners}\">\n <slot />\n </select>\n </slot>\n \n <div class=\"form-control-activity-indicator\">\n <slot name=\"activity\">\n <Transition name=\"select-field-fade\">\n <ActivityIndicator\n v-if=\"activity && indicator\"\n key=\"activity\"\n ref=\"activity\"\n :type=\"indicator\"\n :size=\"indicatorSize\" />\n </Transition>\n </slot>\n </div> \n </div>\n\n <slot\n name=\"errors\"\n v-bind=\"{ error, errors, id, name }\"> \n <FormControlErrors\n v-if=\"!!(error || errors)\"\n :id=\"id && String(id)\"\n v-slot=\"{ error }\"\n :name=\"name && String(name)\"\n :error=\"error\"\n :errors=\"errors\">\n <div\n invalid\n class=\"invalid-feedback\">\n {{ error }}<br>\n </div>\n </FormControlErrors>\n </slot>\n \n <slot\n name=\"feedback\"\n v-bind=\"{ feedback }\">\n <FormControlFeedback\n v-slot=\"{ feedback }\"\n :feedback=\"feedback\">\n <div\n valid\n class=\"valid-feedback\">\n {{ feedback }}\n </div>\n </FormControlFeedback>\n </slot>\n\n <slot\n name=\"help\"\n v-bind=\"{ helpText }\">\n <small\n v-if=\"helpText\"\n ref=\"help\">\n {{ helpText }}\n </small>\n </slot>\n </div>\n</template>"],"names":["props","__props","model","_useModel","emit","__emit","controlAttributes","formGroupClasses","listeners","useFormControl","field","ref","onMousedownLabel","e","onMounted","slot","useSlots","child","_createElementBlock","_normalizeClass","_unref","_renderSlot","_ctx","_hoisted_1","_createElementVNode","_hoisted_2","_normalizeProps","_guardReactiveProps","$slots","_cache","$event","_withDirectives","_mergeProps","_hoisted_3","_createVNode","_Transition","_createBlock","ActivityIndicator","FormControlErrors","_withCtx","error","_hoisted_4","FormControlFeedback","feedback","_hoisted_5","_toDisplayString"],"mappings":"ugDAMA,MAAMA,EAAQC,EASRC,EAAQC,EAAAA,SAAuBF,EAAA,YAAC,EAMhCG,EAAOC,EAEP,CACF,kBAAAC,EACA,iBAAAC,EACA,UAAAC,CAAA,EACAC,EAAAA,eAAqF,CAAE,MAAAP,EAAO,MAAAF,EAAO,KAAAI,EAAM,EAEzGM,EAAQC,EAAAA,IAAA,EAEd,SAASC,EAAiBC,EAA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,eAAAC,EAAAA,mBAAA,CAAA,SANO1B,EAAA,QAAA,CAAQ,CAAA,EAFtB,IAQO,CAJOA,EAAA,wBADViB,EAAAA,mBAIQ,QAAA,OAFJ,IAAI,MAAA,oBACDjB,EAAA,QAAQ,EAAA,GAAA"}
|
|
@@ -1,589 +1,81 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
group: {
|
|
45
|
-
type: BooleanConstructor;
|
|
46
|
-
default: () => any;
|
|
47
|
-
};
|
|
48
|
-
helpText: {
|
|
49
|
-
type: (StringConstructor | NumberConstructor)[];
|
|
50
|
-
default: undefined;
|
|
51
|
-
};
|
|
52
|
-
indicator: {
|
|
53
|
-
type: (BooleanConstructor | StringConstructor | ObjectConstructor)[];
|
|
54
|
-
default: () => any;
|
|
55
|
-
};
|
|
56
|
-
indicatorSize: {
|
|
57
|
-
type: StringConstructor;
|
|
58
|
-
default: undefined;
|
|
59
|
-
};
|
|
60
|
-
invalid: BooleanConstructor;
|
|
61
|
-
label: {
|
|
62
|
-
type: (StringConstructor | NumberConstructor)[];
|
|
63
|
-
default: undefined;
|
|
64
|
-
};
|
|
65
|
-
labelClass: {
|
|
66
|
-
type: (StringConstructor | ObjectConstructor)[];
|
|
67
|
-
default: () => any;
|
|
68
|
-
};
|
|
69
|
-
modelValue: {
|
|
70
|
-
type: (BooleanConstructor | StringConstructor | ObjectConstructor | NumberConstructor | ArrayConstructor)[];
|
|
71
|
-
default: () => undefined;
|
|
72
|
-
};
|
|
73
|
-
plaintext: BooleanConstructor;
|
|
74
|
-
size: {
|
|
75
|
-
type: StringConstructor;
|
|
76
|
-
default: undefined;
|
|
77
|
-
};
|
|
78
|
-
valid: BooleanConstructor;
|
|
79
|
-
}, unknown, {
|
|
80
|
-
currentValue: undefined;
|
|
81
|
-
hasChanged: boolean;
|
|
82
|
-
hasFocus: boolean;
|
|
83
|
-
isDirty: import("vue").CreateComponentPublicInstance<Readonly<import("vue").ExtractPropTypes<{
|
|
84
|
-
activity: {
|
|
85
|
-
type: BooleanConstructor;
|
|
86
|
-
default: boolean;
|
|
87
|
-
};
|
|
88
|
-
animated: {
|
|
89
|
-
type: BooleanConstructor;
|
|
90
|
-
default: () => any;
|
|
91
|
-
};
|
|
92
|
-
error: {
|
|
93
|
-
type: (BooleanConstructor | StringConstructor | ArrayConstructor)[];
|
|
94
|
-
default: undefined;
|
|
95
|
-
};
|
|
96
|
-
errors: {
|
|
97
|
-
type: (BooleanConstructor | ObjectConstructor | ArrayConstructor)[];
|
|
98
|
-
default: undefined;
|
|
99
|
-
};
|
|
100
|
-
feedback: {
|
|
101
|
-
type: (StringConstructor | ArrayConstructor)[];
|
|
102
|
-
default: undefined;
|
|
103
|
-
};
|
|
104
|
-
formControlClass: {
|
|
105
|
-
type: (StringConstructor | ObjectConstructor | ArrayConstructor)[];
|
|
106
|
-
default: () => any;
|
|
107
|
-
};
|
|
108
|
-
group: {
|
|
109
|
-
type: BooleanConstructor;
|
|
110
|
-
default: () => any;
|
|
111
|
-
};
|
|
112
|
-
helpText: {
|
|
113
|
-
type: (StringConstructor | NumberConstructor)[];
|
|
114
|
-
default: undefined;
|
|
115
|
-
};
|
|
116
|
-
indicator: {
|
|
117
|
-
type: (BooleanConstructor | StringConstructor | ObjectConstructor)[];
|
|
118
|
-
default: () => any;
|
|
119
|
-
};
|
|
120
|
-
indicatorSize: {
|
|
121
|
-
type: StringConstructor;
|
|
122
|
-
default: undefined;
|
|
123
|
-
};
|
|
124
|
-
invalid: BooleanConstructor;
|
|
125
|
-
label: {
|
|
126
|
-
type: (StringConstructor | NumberConstructor)[];
|
|
127
|
-
default: undefined;
|
|
128
|
-
};
|
|
129
|
-
labelClass: {
|
|
130
|
-
type: (StringConstructor | ObjectConstructor)[];
|
|
131
|
-
default: () => any;
|
|
132
|
-
};
|
|
133
|
-
modelValue: {
|
|
134
|
-
type: (BooleanConstructor | StringConstructor | ObjectConstructor | NumberConstructor | ArrayConstructor)[];
|
|
135
|
-
default: () => undefined;
|
|
136
|
-
};
|
|
137
|
-
plaintext: BooleanConstructor;
|
|
138
|
-
size: {
|
|
139
|
-
type: StringConstructor;
|
|
140
|
-
default: undefined;
|
|
141
|
-
};
|
|
142
|
-
valid: BooleanConstructor;
|
|
143
|
-
}>> & {
|
|
144
|
-
onFocus?: ((...args: any[]) => any) | undefined;
|
|
145
|
-
onBlur?: ((...args: any[]) => any) | undefined;
|
|
146
|
-
onChange?: ((...args: any[]) => any) | undefined;
|
|
147
|
-
onClick?: ((...args: any[]) => any) | undefined;
|
|
148
|
-
onKeypress?: ((...args: any[]) => any) | undefined;
|
|
149
|
-
onKeyup?: ((...args: any[]) => any) | undefined;
|
|
150
|
-
onKeydown?: ((...args: any[]) => any) | undefined;
|
|
151
|
-
onProgress?: ((...args: any[]) => any) | undefined;
|
|
152
|
-
onPaste?: ((...args: any[]) => any) | undefined;
|
|
153
|
-
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
154
|
-
}, {}, {}, {}, import("vue").MethodOptions, import("vue").DefineComponent<{
|
|
155
|
-
dropShadow: {
|
|
156
|
-
type: (BooleanConstructor | StringConstructor)[];
|
|
157
|
-
default: undefined;
|
|
158
|
-
};
|
|
159
|
-
dropShadowableClassPrefix: {
|
|
160
|
-
type: StringConstructor;
|
|
161
|
-
default: string;
|
|
162
|
-
};
|
|
163
|
-
shadow: {
|
|
164
|
-
type: (BooleanConstructor | StringConstructor)[];
|
|
165
|
-
default: undefined;
|
|
166
|
-
};
|
|
167
|
-
shadowableClassPrefix: {
|
|
168
|
-
type: StringConstructor;
|
|
169
|
-
default: string;
|
|
170
|
-
};
|
|
171
|
-
}, unknown, unknown, {
|
|
172
|
-
shadowableClass(): {
|
|
173
|
-
[x: string]: boolean;
|
|
174
|
-
};
|
|
175
|
-
}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
176
|
-
dropShadow: {
|
|
177
|
-
type: (BooleanConstructor | StringConstructor)[];
|
|
178
|
-
default: undefined;
|
|
179
|
-
};
|
|
180
|
-
dropShadowableClassPrefix: {
|
|
181
|
-
type: StringConstructor;
|
|
182
|
-
default: string;
|
|
183
|
-
};
|
|
184
|
-
shadow: {
|
|
185
|
-
type: (BooleanConstructor | StringConstructor)[];
|
|
186
|
-
default: undefined;
|
|
187
|
-
};
|
|
188
|
-
shadowableClassPrefix: {
|
|
189
|
-
type: StringConstructor;
|
|
190
|
-
default: string;
|
|
191
|
-
};
|
|
192
|
-
}>>, {
|
|
193
|
-
shadow: string | boolean;
|
|
194
|
-
dropShadow: string | boolean;
|
|
195
|
-
dropShadowableClassPrefix: string;
|
|
196
|
-
shadowableClassPrefix: string;
|
|
197
|
-
}>, import("vue").ComponentOptionsMixin, {}, Readonly<import("vue").ExtractPropTypes<{
|
|
198
|
-
activity: {
|
|
199
|
-
type: BooleanConstructor;
|
|
200
|
-
default: boolean;
|
|
201
|
-
};
|
|
202
|
-
animated: {
|
|
203
|
-
type: BooleanConstructor;
|
|
204
|
-
default: () => any;
|
|
205
|
-
};
|
|
206
|
-
error: {
|
|
207
|
-
type: (BooleanConstructor | StringConstructor | ArrayConstructor)[];
|
|
208
|
-
default: undefined;
|
|
209
|
-
};
|
|
210
|
-
errors: {
|
|
211
|
-
type: (BooleanConstructor | ObjectConstructor | ArrayConstructor)[];
|
|
212
|
-
default: undefined;
|
|
213
|
-
};
|
|
214
|
-
feedback: {
|
|
215
|
-
type: (StringConstructor | ArrayConstructor)[];
|
|
216
|
-
default: undefined;
|
|
217
|
-
};
|
|
218
|
-
formControlClass: {
|
|
219
|
-
type: (StringConstructor | ObjectConstructor | ArrayConstructor)[];
|
|
220
|
-
default: () => any;
|
|
221
|
-
};
|
|
222
|
-
group: {
|
|
223
|
-
type: BooleanConstructor;
|
|
224
|
-
default: () => any;
|
|
225
|
-
};
|
|
226
|
-
helpText: {
|
|
227
|
-
type: (StringConstructor | NumberConstructor)[];
|
|
228
|
-
default: undefined;
|
|
229
|
-
};
|
|
230
|
-
indicator: {
|
|
231
|
-
type: (BooleanConstructor | StringConstructor | ObjectConstructor)[];
|
|
232
|
-
default: () => any;
|
|
233
|
-
};
|
|
234
|
-
indicatorSize: {
|
|
235
|
-
type: StringConstructor;
|
|
236
|
-
default: undefined;
|
|
237
|
-
};
|
|
238
|
-
invalid: BooleanConstructor;
|
|
239
|
-
label: {
|
|
240
|
-
type: (StringConstructor | NumberConstructor)[];
|
|
241
|
-
default: undefined;
|
|
242
|
-
};
|
|
243
|
-
labelClass: {
|
|
244
|
-
type: (StringConstructor | ObjectConstructor)[];
|
|
245
|
-
default: () => any;
|
|
246
|
-
};
|
|
247
|
-
modelValue: {
|
|
248
|
-
type: (BooleanConstructor | StringConstructor | ObjectConstructor | NumberConstructor | ArrayConstructor)[];
|
|
249
|
-
default: () => undefined;
|
|
250
|
-
};
|
|
251
|
-
plaintext: BooleanConstructor;
|
|
252
|
-
size: {
|
|
253
|
-
type: StringConstructor;
|
|
254
|
-
default: undefined;
|
|
255
|
-
};
|
|
256
|
-
valid: BooleanConstructor;
|
|
257
|
-
}>> & {
|
|
258
|
-
onFocus?: ((...args: any[]) => any) | undefined;
|
|
259
|
-
onBlur?: ((...args: any[]) => any) | undefined;
|
|
260
|
-
onChange?: ((...args: any[]) => any) | undefined;
|
|
261
|
-
onClick?: ((...args: any[]) => any) | undefined;
|
|
262
|
-
onKeypress?: ((...args: any[]) => any) | undefined;
|
|
263
|
-
onKeyup?: ((...args: any[]) => any) | undefined;
|
|
264
|
-
onKeydown?: ((...args: any[]) => any) | undefined;
|
|
265
|
-
onProgress?: ((...args: any[]) => any) | undefined;
|
|
266
|
-
onPaste?: ((...args: any[]) => any) | undefined;
|
|
267
|
-
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
268
|
-
}, {}, false, {}, {
|
|
269
|
-
P: Readonly<import("vue").ExtractPropTypes<{
|
|
270
|
-
dropShadow: {
|
|
271
|
-
type: (BooleanConstructor | StringConstructor)[];
|
|
272
|
-
default: undefined;
|
|
273
|
-
};
|
|
274
|
-
dropShadowableClassPrefix: {
|
|
275
|
-
type: StringConstructor;
|
|
276
|
-
default: string;
|
|
277
|
-
};
|
|
278
|
-
shadow: {
|
|
279
|
-
type: (BooleanConstructor | StringConstructor)[];
|
|
280
|
-
default: undefined;
|
|
281
|
-
};
|
|
282
|
-
shadowableClassPrefix: {
|
|
283
|
-
type: StringConstructor;
|
|
284
|
-
default: string;
|
|
285
|
-
};
|
|
286
|
-
}>>;
|
|
287
|
-
B: {};
|
|
288
|
-
D: {};
|
|
289
|
-
C: {
|
|
290
|
-
shadowableClass(): {
|
|
291
|
-
[x: string]: boolean;
|
|
292
|
-
};
|
|
293
|
-
};
|
|
294
|
-
M: {};
|
|
295
|
-
Defaults: {
|
|
296
|
-
shadow: string | boolean;
|
|
297
|
-
dropShadow: string | boolean;
|
|
298
|
-
dropShadowableClassPrefix: string;
|
|
299
|
-
shadowableClassPrefix: string;
|
|
300
|
-
};
|
|
1
|
+
import { FormControlProps, FormControlSlots } from '@vue-interface/form-control';
|
|
2
|
+
import { SelectHTMLAttributes } from 'vue';
|
|
3
|
+
export type SelectFieldControlSizePrefix = 'form-select';
|
|
4
|
+
export type SelectFieldProps<ModelValue, Value> = FormControlProps<SelectHTMLAttributes, SelectFieldControlSizePrefix, ModelValue, Value>;
|
|
5
|
+
declare const _default: <ModelValue, Value>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
6
|
+
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
7
|
+
readonly onInput?: ((event: Event) => any) | undefined;
|
|
8
|
+
readonly onSelect?: ((event: Event) => any) | undefined;
|
|
9
|
+
readonly "onUpdate:modelValue"?: ((...args: unknown[]) => any) | undefined;
|
|
10
|
+
readonly onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
11
|
+
readonly onFocus?: ((event: FocusEvent) => any) | undefined;
|
|
12
|
+
readonly onFocusin?: ((event: FocusEvent) => any) | undefined;
|
|
13
|
+
readonly onFocusout?: ((event: FocusEvent) => any) | undefined;
|
|
14
|
+
readonly onClick?: ((event: MouseEvent) => any) | undefined;
|
|
15
|
+
readonly onDoubleclick?: ((event: MouseEvent) => any) | undefined;
|
|
16
|
+
readonly onContextmenu?: ((event: MouseEvent) => any) | undefined;
|
|
17
|
+
readonly onMousedown?: ((event: MouseEvent) => any) | undefined;
|
|
18
|
+
readonly onMouseup?: ((event: MouseEvent) => any) | undefined;
|
|
19
|
+
readonly onMouseover?: ((event: MouseEvent) => any) | undefined;
|
|
20
|
+
readonly onMouseout?: ((event: MouseEvent) => any) | undefined;
|
|
21
|
+
readonly onMouseenter?: ((event: MouseEvent) => any) | undefined;
|
|
22
|
+
readonly onMouseleave?: ((event: MouseEvent) => any) | undefined;
|
|
23
|
+
readonly onMousemove?: ((event: MouseEvent) => any) | undefined;
|
|
24
|
+
readonly onKeydown?: ((event: KeyboardEvent) => any) | undefined;
|
|
25
|
+
readonly onKeyup?: ((event: KeyboardEvent) => any) | undefined;
|
|
26
|
+
readonly onKeypress?: ((event: KeyboardEvent) => any) | undefined;
|
|
27
|
+
readonly onSelectionchange?: ((event: Event) => any) | undefined;
|
|
28
|
+
readonly onInvalid?: ((event: Event) => any) | undefined;
|
|
29
|
+
readonly onSubmit?: ((event: Event) => any) | undefined;
|
|
30
|
+
readonly onReset?: ((event: Event) => any) | undefined;
|
|
31
|
+
readonly onScroll?: ((event: Event) => any) | undefined;
|
|
32
|
+
readonly onWheel?: ((event: WheelEvent) => any) | undefined;
|
|
33
|
+
readonly onCopy?: ((event: ClipboardEvent) => any) | undefined;
|
|
34
|
+
readonly onCut?: ((event: ClipboardEvent) => any) | undefined;
|
|
35
|
+
readonly onPaste?: ((event: ClipboardEvent) => any) | undefined;
|
|
36
|
+
readonly onTouchstart?: ((event: TouchEvent) => any) | undefined;
|
|
37
|
+
readonly onTouchend?: ((event: TouchEvent) => any) | undefined;
|
|
38
|
+
readonly onTouchmove?: ((event: TouchEvent) => any) | undefined;
|
|
39
|
+
readonly onTouchcancel?: ((event: TouchEvent) => any) | undefined;
|
|
40
|
+
readonly onChange?: ((event: Event) => any) | undefined;
|
|
41
|
+
readonly onBeforeinput?: ((event: Event) => any) | undefined;
|
|
42
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onCopy" | "onCut" | "onPaste" | "onFocus" | "onFocusin" | "onFocusout" | "onBlur" | "onChange" | "onBeforeinput" | "onInput" | "onReset" | "onSubmit" | "onInvalid" | "onKeydown" | "onKeypress" | "onKeyup" | "onMousedown" | "onMouseenter" | "onMouseleave" | "onMousemove" | "onMouseout" | "onMouseover" | "onMouseup" | "onSelect" | "onScroll" | "onTouchcancel" | "onTouchend" | "onTouchmove" | "onTouchstart" | "onClick" | "onContextmenu" | "onWheel" | "onDoubleclick" | "onSelectionchange" | "onUpdate:modelValue"> & ({
|
|
43
|
+
modelValue?: ModelValue;
|
|
301
44
|
} & {
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
type: (BooleanConstructor | ObjectConstructor | ArrayConstructor)[];
|
|
340
|
-
default: undefined;
|
|
341
|
-
};
|
|
342
|
-
feedback: {
|
|
343
|
-
type: (StringConstructor | ArrayConstructor)[];
|
|
344
|
-
default: undefined;
|
|
345
|
-
};
|
|
346
|
-
formControlClass: {
|
|
347
|
-
type: (StringConstructor | ObjectConstructor | ArrayConstructor)[];
|
|
348
|
-
default: () => any;
|
|
349
|
-
};
|
|
350
|
-
group: {
|
|
351
|
-
type: BooleanConstructor;
|
|
352
|
-
default: () => any;
|
|
353
|
-
};
|
|
354
|
-
helpText: {
|
|
355
|
-
type: (StringConstructor | NumberConstructor)[];
|
|
356
|
-
default: undefined;
|
|
357
|
-
};
|
|
358
|
-
indicator: {
|
|
359
|
-
type: (BooleanConstructor | StringConstructor | ObjectConstructor)[];
|
|
360
|
-
default: () => any;
|
|
361
|
-
};
|
|
362
|
-
indicatorSize: {
|
|
363
|
-
type: StringConstructor;
|
|
364
|
-
default: undefined;
|
|
365
|
-
};
|
|
366
|
-
invalid: BooleanConstructor;
|
|
367
|
-
label: {
|
|
368
|
-
type: (StringConstructor | NumberConstructor)[];
|
|
369
|
-
default: undefined;
|
|
370
|
-
};
|
|
371
|
-
labelClass: {
|
|
372
|
-
type: (StringConstructor | ObjectConstructor)[];
|
|
373
|
-
default: () => any;
|
|
374
|
-
};
|
|
375
|
-
modelValue: {
|
|
376
|
-
type: (BooleanConstructor | StringConstructor | ObjectConstructor | NumberConstructor | ArrayConstructor)[];
|
|
377
|
-
default: () => undefined;
|
|
378
|
-
};
|
|
379
|
-
plaintext: BooleanConstructor;
|
|
380
|
-
size: {
|
|
381
|
-
type: StringConstructor;
|
|
382
|
-
default: undefined;
|
|
383
|
-
};
|
|
384
|
-
valid: BooleanConstructor;
|
|
385
|
-
}>> & {
|
|
386
|
-
onFocus?: ((...args: any[]) => any) | undefined;
|
|
387
|
-
onBlur?: ((...args: any[]) => any) | undefined;
|
|
388
|
-
onChange?: ((...args: any[]) => any) | undefined;
|
|
389
|
-
onClick?: ((...args: any[]) => any) | undefined;
|
|
390
|
-
onKeypress?: ((...args: any[]) => any) | undefined;
|
|
391
|
-
onKeyup?: ((...args: any[]) => any) | undefined;
|
|
392
|
-
onKeydown?: ((...args: any[]) => any) | undefined;
|
|
393
|
-
onProgress?: ((...args: any[]) => any) | undefined;
|
|
394
|
-
onPaste?: ((...args: any[]) => any) | undefined;
|
|
395
|
-
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
396
|
-
}, {}, {}, {
|
|
397
|
-
shadowableClass(): {
|
|
398
|
-
[x: string]: boolean;
|
|
399
|
-
};
|
|
400
|
-
}, import("vue").MethodOptions, {
|
|
401
|
-
shadow: string | boolean;
|
|
402
|
-
dropShadow: string | boolean;
|
|
403
|
-
dropShadowableClassPrefix: string;
|
|
404
|
-
shadowableClassPrefix: string;
|
|
405
|
-
}>;
|
|
406
|
-
}, {
|
|
407
|
-
model: {
|
|
408
|
-
get(): any;
|
|
409
|
-
set(value: any): void;
|
|
410
|
-
};
|
|
411
|
-
id(): string | undefined;
|
|
412
|
-
isEmpty(): boolean;
|
|
413
|
-
isInvalid(): boolean;
|
|
414
|
-
isValid(): boolean;
|
|
415
|
-
componentName(): any;
|
|
416
|
-
controlClass(): any;
|
|
417
|
-
controlAttributes(): any;
|
|
418
|
-
controlClasses(): any;
|
|
419
|
-
controlSizeClass(): string;
|
|
420
|
-
formGroupClasses(): {
|
|
421
|
-
[x: number]: boolean;
|
|
422
|
-
animated: any;
|
|
423
|
-
'form-group': any;
|
|
424
|
-
'has-activity': any;
|
|
425
|
-
'has-changed': any;
|
|
426
|
-
'has-focus': any;
|
|
427
|
-
'has-icon': boolean;
|
|
428
|
-
'is-dirty': any;
|
|
429
|
-
'is-empty': any;
|
|
430
|
-
'is-invalid': any;
|
|
431
|
-
'is-valid': any;
|
|
432
|
-
} & (false | {
|
|
433
|
-
[x: string]: boolean;
|
|
434
|
-
});
|
|
435
|
-
plaintextClass(): "form-control-plaintext";
|
|
436
|
-
}, {
|
|
437
|
-
bindEvents(el: HTMLElement): void;
|
|
438
|
-
blur(): void;
|
|
439
|
-
focus(): void;
|
|
440
|
-
getFieldErrors(): any;
|
|
441
|
-
getModelValue(): any;
|
|
442
|
-
setModelValue(value: any): void;
|
|
443
|
-
}, import("vue").DefineComponent<{
|
|
444
|
-
dropShadow: {
|
|
445
|
-
type: (BooleanConstructor | StringConstructor)[];
|
|
446
|
-
default: undefined;
|
|
447
|
-
};
|
|
448
|
-
dropShadowableClassPrefix: {
|
|
449
|
-
type: StringConstructor;
|
|
450
|
-
default: string;
|
|
451
|
-
};
|
|
452
|
-
shadow: {
|
|
453
|
-
type: (BooleanConstructor | StringConstructor)[];
|
|
454
|
-
default: undefined;
|
|
455
|
-
};
|
|
456
|
-
shadowableClassPrefix: {
|
|
457
|
-
type: StringConstructor;
|
|
458
|
-
default: string;
|
|
459
|
-
};
|
|
460
|
-
}, unknown, unknown, {
|
|
461
|
-
shadowableClass(): {
|
|
462
|
-
[x: string]: boolean;
|
|
463
|
-
};
|
|
464
|
-
}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
465
|
-
dropShadow: {
|
|
466
|
-
type: (BooleanConstructor | StringConstructor)[];
|
|
467
|
-
default: undefined;
|
|
468
|
-
};
|
|
469
|
-
dropShadowableClassPrefix: {
|
|
470
|
-
type: StringConstructor;
|
|
471
|
-
default: string;
|
|
472
|
-
};
|
|
473
|
-
shadow: {
|
|
474
|
-
type: (BooleanConstructor | StringConstructor)[];
|
|
475
|
-
default: undefined;
|
|
476
|
-
};
|
|
477
|
-
shadowableClassPrefix: {
|
|
478
|
-
type: StringConstructor;
|
|
479
|
-
default: string;
|
|
480
|
-
};
|
|
481
|
-
}>>, {
|
|
482
|
-
shadow: string | boolean;
|
|
483
|
-
dropShadow: string | boolean;
|
|
484
|
-
dropShadowableClassPrefix: string;
|
|
485
|
-
shadowableClassPrefix: string;
|
|
486
|
-
}>, import("vue").ComponentOptionsMixin, ("focus" | "blur" | "change" | "click" | "keypress" | "keyup" | "keydown" | "progress" | "paste" | "update:modelValue")[], "focus" | "blur" | "change" | "click" | "keypress" | "keyup" | "keydown" | "progress" | "paste" | "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
487
|
-
activity: {
|
|
488
|
-
type: BooleanConstructor;
|
|
489
|
-
default: boolean;
|
|
490
|
-
};
|
|
491
|
-
animated: {
|
|
492
|
-
type: BooleanConstructor;
|
|
493
|
-
default: () => any;
|
|
494
|
-
};
|
|
495
|
-
error: {
|
|
496
|
-
type: (BooleanConstructor | StringConstructor | ArrayConstructor)[];
|
|
497
|
-
default: undefined;
|
|
498
|
-
};
|
|
499
|
-
errors: {
|
|
500
|
-
type: (BooleanConstructor | ObjectConstructor | ArrayConstructor)[];
|
|
501
|
-
default: undefined;
|
|
502
|
-
};
|
|
503
|
-
feedback: {
|
|
504
|
-
type: (StringConstructor | ArrayConstructor)[];
|
|
505
|
-
default: undefined;
|
|
506
|
-
};
|
|
507
|
-
formControlClass: {
|
|
508
|
-
type: (StringConstructor | ObjectConstructor | ArrayConstructor)[];
|
|
509
|
-
default: () => any;
|
|
510
|
-
};
|
|
511
|
-
group: {
|
|
512
|
-
type: BooleanConstructor;
|
|
513
|
-
default: () => any;
|
|
514
|
-
};
|
|
515
|
-
helpText: {
|
|
516
|
-
type: (StringConstructor | NumberConstructor)[];
|
|
517
|
-
default: undefined;
|
|
518
|
-
};
|
|
519
|
-
indicator: {
|
|
520
|
-
type: (BooleanConstructor | StringConstructor | ObjectConstructor)[];
|
|
521
|
-
default: () => any;
|
|
522
|
-
};
|
|
523
|
-
indicatorSize: {
|
|
524
|
-
type: StringConstructor;
|
|
525
|
-
default: undefined;
|
|
526
|
-
};
|
|
527
|
-
invalid: BooleanConstructor;
|
|
528
|
-
label: {
|
|
529
|
-
type: (StringConstructor | NumberConstructor)[];
|
|
530
|
-
default: undefined;
|
|
531
|
-
};
|
|
532
|
-
labelClass: {
|
|
533
|
-
type: (StringConstructor | ObjectConstructor)[];
|
|
534
|
-
default: () => any;
|
|
535
|
-
};
|
|
536
|
-
modelValue: {
|
|
537
|
-
type: (BooleanConstructor | StringConstructor | ObjectConstructor | NumberConstructor | ArrayConstructor)[];
|
|
538
|
-
default: () => undefined;
|
|
539
|
-
};
|
|
540
|
-
plaintext: BooleanConstructor;
|
|
541
|
-
size: {
|
|
542
|
-
type: StringConstructor;
|
|
543
|
-
default: undefined;
|
|
544
|
-
};
|
|
545
|
-
valid: BooleanConstructor;
|
|
546
|
-
}>> & {
|
|
547
|
-
onFocus?: ((...args: any[]) => any) | undefined;
|
|
548
|
-
onBlur?: ((...args: any[]) => any) | undefined;
|
|
549
|
-
onChange?: ((...args: any[]) => any) | undefined;
|
|
550
|
-
onClick?: ((...args: any[]) => any) | undefined;
|
|
551
|
-
onKeypress?: ((...args: any[]) => any) | undefined;
|
|
552
|
-
onKeyup?: ((...args: any[]) => any) | undefined;
|
|
553
|
-
onKeydown?: ((...args: any[]) => any) | undefined;
|
|
554
|
-
onProgress?: ((...args: any[]) => any) | undefined;
|
|
555
|
-
onPaste?: ((...args: any[]) => any) | undefined;
|
|
556
|
-
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
557
|
-
}, {
|
|
558
|
-
error: string | boolean | unknown[];
|
|
559
|
-
errors: boolean | unknown[] | Record<string, any>;
|
|
560
|
-
feedback: string | unknown[];
|
|
561
|
-
activity: boolean;
|
|
562
|
-
animated: boolean;
|
|
563
|
-
formControlClass: string | unknown[] | Record<string, any>;
|
|
564
|
-
group: boolean;
|
|
565
|
-
helpText: string | number;
|
|
566
|
-
indicator: string | boolean | Record<string, any>;
|
|
567
|
-
indicatorSize: string;
|
|
568
|
-
invalid: boolean;
|
|
569
|
-
label: string | number;
|
|
570
|
-
labelClass: string | Record<string, any>;
|
|
571
|
-
modelValue: string | number | boolean | unknown[] | Record<string, any>;
|
|
572
|
-
plaintext: boolean;
|
|
573
|
-
size: string;
|
|
574
|
-
valid: boolean;
|
|
575
|
-
}>, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
576
|
-
/**
|
|
577
|
-
* The default class name assigned to the control element
|
|
578
|
-
*
|
|
579
|
-
* @param {String}
|
|
580
|
-
* @default 'form-select'
|
|
581
|
-
*/
|
|
582
|
-
formControlClass: {
|
|
583
|
-
type: StringConstructor;
|
|
584
|
-
default: string;
|
|
585
|
-
};
|
|
586
|
-
}>>, {
|
|
587
|
-
formControlClass: string;
|
|
588
|
-
}>;
|
|
589
|
-
export default _sfc_main;
|
|
45
|
+
activity?: boolean;
|
|
46
|
+
disabled?: boolean;
|
|
47
|
+
error?: import('@vue-interface/form-control').FormControlErrorProp;
|
|
48
|
+
errors?: import('@vue-interface/form-control').FormControlErrorPropArray | import('@vue-interface/form-control').FormControlErrorPropRecord;
|
|
49
|
+
feedback?: import('@vue-interface/form-control').FormControlFeedbackProp;
|
|
50
|
+
formControlClass?: string;
|
|
51
|
+
helpText?: string;
|
|
52
|
+
id?: string;
|
|
53
|
+
indicator?: import('vue').Component;
|
|
54
|
+
indicatorSize?: import('@vue-interface/activity-indicator').ActivityIndicatorSize;
|
|
55
|
+
invalid?: boolean;
|
|
56
|
+
label?: string;
|
|
57
|
+
labelClass?: string;
|
|
58
|
+
modelValue?: ModelValue | undefined;
|
|
59
|
+
name?: string;
|
|
60
|
+
plaintext?: boolean;
|
|
61
|
+
size?: import('@vue-interface/form-control').FormControlSize<"form-select", import('@vue-interface/form-control').PredeterminedSize> | undefined;
|
|
62
|
+
color?: string;
|
|
63
|
+
readonly?: boolean;
|
|
64
|
+
valid?: boolean;
|
|
65
|
+
value?: Value | undefined;
|
|
66
|
+
} & SelectHTMLAttributes) & Partial<{}>> & import('vue').PublicProps;
|
|
67
|
+
expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
|
|
68
|
+
attrs: any;
|
|
69
|
+
slots: Readonly<FormControlSlots<"form-select", ModelValue> & {
|
|
70
|
+
default: () => unknown;
|
|
71
|
+
}> & FormControlSlots<"form-select", ModelValue> & {
|
|
72
|
+
default: () => unknown;
|
|
73
|
+
};
|
|
74
|
+
emit: (((evt: "input", event: Event) => void) & ((evt: "select", event: Event) => void) & ((evt: "update:modelValue", value: ModelValue) => void) & ((evt: "blur", event: FocusEvent) => void) & ((evt: "focus", event: FocusEvent) => void) & ((evt: "focusin", event: FocusEvent) => void) & ((evt: "focusout", event: FocusEvent) => void) & ((evt: "click", event: MouseEvent) => void) & ((evt: "doubleclick", event: MouseEvent) => void) & ((evt: "contextmenu", event: MouseEvent) => void) & ((evt: "mousedown", event: MouseEvent) => void) & ((evt: "mouseup", event: MouseEvent) => void) & ((evt: "mouseover", event: MouseEvent) => void) & ((evt: "mouseout", event: MouseEvent) => void) & ((evt: "mouseenter", event: MouseEvent) => void) & ((evt: "mouseleave", event: MouseEvent) => void) & ((evt: "mousemove", event: MouseEvent) => void) & ((evt: "keydown", event: KeyboardEvent) => void) & ((evt: "keyup", event: KeyboardEvent) => void) & ((evt: "keypress", event: KeyboardEvent) => void) & ((evt: "selectionchange", event: Event) => void) & ((evt: "invalid", event: Event) => void) & ((evt: "submit", event: Event) => void) & ((evt: "reset", event: Event) => void) & ((evt: "scroll", event: Event) => void) & ((evt: "wheel", event: WheelEvent) => void) & ((evt: "copy", event: ClipboardEvent) => void) & ((evt: "cut", event: ClipboardEvent) => void) & ((evt: "paste", event: ClipboardEvent) => void) & ((evt: "touchstart", event: TouchEvent) => void) & ((evt: "touchend", event: TouchEvent) => void) & ((evt: "touchmove", event: TouchEvent) => void) & ((evt: "touchcancel", event: TouchEvent) => void) & ((evt: "change", event: Event) => void) & ((evt: "beforeinput", event: Event) => void)) & ((evt: "update:modelValue", value: ModelValue) => void);
|
|
75
|
+
}>) => import('vue').VNode & {
|
|
76
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
77
|
+
};
|
|
78
|
+
export default _default;
|
|
79
|
+
type __VLS_PrettifyLocal<T> = {
|
|
80
|
+
[K in keyof T]: T[K];
|
|
81
|
+
} & {};
|
package/index.css
ADDED
package/package.json
CHANGED
|
@@ -1,32 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue-interface/select-field",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"description": "A Vue select field component.",
|
|
5
|
-
"files": [
|
|
6
|
-
"dist"
|
|
7
|
-
],
|
|
8
5
|
"type": "module",
|
|
9
6
|
"main": "./dist/select-field.umd.js",
|
|
10
7
|
"module": "./dist/select-field.js",
|
|
11
|
-
"style": "./dist/style.css",
|
|
12
8
|
"types": "./dist/index.d.ts",
|
|
13
9
|
"exports": {
|
|
14
10
|
".": {
|
|
11
|
+
"source": "./index.ts",
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
15
13
|
"import": "./dist/select-field.js",
|
|
16
|
-
"require": "./dist/select-field.umd.js"
|
|
17
|
-
|
|
18
|
-
},
|
|
19
|
-
"./dist/style.css": "./dist/style.css"
|
|
14
|
+
"require": "./dist/select-field.umd.js"
|
|
15
|
+
}
|
|
20
16
|
},
|
|
21
17
|
"browserslist": "last 2 versions, > 0.5%, ie >= 11",
|
|
22
|
-
"scripts": {
|
|
23
|
-
"dev": "vite",
|
|
24
|
-
"build": "vite build",
|
|
25
|
-
"preview": "vite preview"
|
|
26
|
-
},
|
|
27
18
|
"repository": {
|
|
28
19
|
"type": "git",
|
|
29
|
-
"url": "git+https://github.com/vue-interface/
|
|
20
|
+
"url": "git+https://github.com/vue-interface/vue-interface.github.io"
|
|
30
21
|
},
|
|
31
22
|
"keywords": [
|
|
32
23
|
"Select",
|
|
@@ -37,29 +28,26 @@
|
|
|
37
28
|
"Bootstrap"
|
|
38
29
|
],
|
|
39
30
|
"author": "Justin Kimbrell",
|
|
40
|
-
"license": "
|
|
31
|
+
"license": "MIT",
|
|
41
32
|
"bugs": {
|
|
42
|
-
"url": "https://github.com/vue-interface/
|
|
43
|
-
},
|
|
44
|
-
"homepage": "https://github.com/vue-interface/select-field/docs#readme",
|
|
45
|
-
"dependencies": {
|
|
46
|
-
"@vue-interface/activity-indicator": "^2.0.0-beta.11",
|
|
47
|
-
"@vue-interface/form-control": "^1.0.0-beta.15"
|
|
33
|
+
"url": "https://github.com/vue-interface/vue-interface.github.io"
|
|
48
34
|
},
|
|
35
|
+
"homepage": "https://github.com/vue-interface/vue-interface",
|
|
36
|
+
"readme": "README.md",
|
|
37
|
+
"files": [
|
|
38
|
+
"dist",
|
|
39
|
+
"index.css",
|
|
40
|
+
"README.md",
|
|
41
|
+
"LICENSE"
|
|
42
|
+
],
|
|
49
43
|
"peerDependencies": {
|
|
50
|
-
"vue": "^3.
|
|
44
|
+
"vue": "^3.3.4",
|
|
45
|
+
"@vue-interface/activity-indicator": "3.0.1",
|
|
46
|
+
"@vue-interface/form-control": "2.0.1"
|
|
51
47
|
},
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"eslint": "^8.34.0",
|
|
57
|
-
"eslint-plugin-vue": "^9.9.0",
|
|
58
|
-
"pascalcase": "^2.0.0",
|
|
59
|
-
"postcss": "^8.4.21",
|
|
60
|
-
"tailwindcss": "^3.2.7",
|
|
61
|
-
"vite": "^4.1.4",
|
|
62
|
-
"vite-plugin-dts": "^1.7.3",
|
|
63
|
-
"vue": "^3.2.47"
|
|
48
|
+
"scripts": {
|
|
49
|
+
"dev": "vite",
|
|
50
|
+
"build": "vue-tsc && vite build",
|
|
51
|
+
"preview": "vite preview"
|
|
64
52
|
}
|
|
65
|
-
}
|
|
53
|
+
}
|
package/dist/style.css
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.select-field,.select-field .form-group-inner{position:relative;-webkit-transition:all .25s ease-in-out;transition:all .25s ease-in-out}.select-field .activity-indicator{position:absolute;right:1.25em;top:50%;-webkit-transform:translate(-1rem,-50%);transform:translate(-1rem,-50%);-webkit-transition:all .15s ease-in;transition:all .15s ease-in}.select-field .activity-indicator-xs{font-size:.5em;right:2em}.select-field.has-activity .form-control-xs{padding-right:3.75em}.select-field .activity-indicator-sm{font-size:.5em;right:2em}.select-field.has-activity .form-control-sm{padding-right:3em}.select-field .activity-indicator-md{font-size:.666em}.select-field.has-activity .form-control-md{padding-right:3em}.select-field .activity-indicator-lg{font-size:.75em}.select-field.has-activity .form-control-lg{padding-right:3em}.select-field .activity-indicator-xl{font-size:1em}.select-field.has-activity .activity-indicator-xl~.form-control-xl{padding-right:3.75em}.select-field.is-valid .valid-feedback,.select-field.is-invalid .invalid-feedback{display:-webkit-box;display:-ms-flexbox;display:flex}.select-field .form-control-icon{padding-left:2em}.select-field .form-group-inner-icon{position:absolute;top:50%;left:.666em;width:1rem;font-size:1em;-webkit-transform:translateY(-50%);transform:translateY(-50%);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.select-field-sm .form-group-inner-icon{position:absolute;top:50%;left:.666rem;width:.75em;font-size:1.5em;-webkit-transform:translateY(-50%);transform:translateY(-50%);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.select-field-lg .form-group-inner-icon{position:absolute;top:50%;left:.666rem;width:1.25em;font-size:1em;-webkit-transform:translateY(-50%);transform:translateY(-50%);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.select-field .activity-indicator{opacity:1}.select-field .select-field-fade-enter,.select-field .select-field-fade-leave-to{opacity:0}
|