@geckou/ui-vue 0.9.0 → 0.12.0
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/README.md +27 -0
- package/dist/components/ArticleList/Card/News.vue.d.ts +1 -0
- package/dist/components/ArticleList/Card/News.vue2.js +5 -4
- package/dist/components/ArticleList/Card/Row.vue.d.ts +1 -0
- package/dist/components/ArticleList/Card/Row.vue2.js +8 -7
- package/dist/components/ArticleList/GenericArticleList.vue2.js +16 -13
- package/dist/components/ArticleList/GenericArticleList.vue3.js +8 -8
- package/dist/components/ArticleList/Parts/CategoryList.vue.js +12 -12
- package/dist/components/ArticleList/Parts/MetadataList.vue2.js +16 -14
- package/dist/components/DatePicker.vue2.js +93 -95
- package/dist/components/DateRangePicker.vue2.js +35 -33
- package/dist/components/DateSelector.vue2.js +93 -99
- package/dist/components/SelectBox.vue2.js +47 -51
- package/dist/components/TextArea.vue2.js +38 -35
- package/dist/style.css +1 -1
- package/package.json +2 -2
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { MESSAGES as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
const
|
|
1
|
+
import { defineComponent as b, computed as l, watch as q, onBeforeUnmount as x, openBlock as S, createElementBlock as k, normalizeClass as v, createVNode as s, createElementVNode as B, unref as $ } from "vue";
|
|
2
|
+
import { formatDateValue as M, MESSAGES as N } from "@geckou/ui-core";
|
|
3
|
+
import y from "./DatePicker.vue.js";
|
|
4
|
+
import U from "./ErrorMessage.vue.js";
|
|
5
|
+
const w = /* @__PURE__ */ b({
|
|
6
6
|
__name: "DateRangePicker",
|
|
7
7
|
props: {
|
|
8
8
|
name: {},
|
|
@@ -16,59 +16,61 @@ const A = /* @__PURE__ */ R({
|
|
|
16
16
|
type: { default: "date" }
|
|
17
17
|
},
|
|
18
18
|
emits: ["update:modelValue"],
|
|
19
|
-
setup(e, { emit:
|
|
20
|
-
const
|
|
21
|
-
() =>
|
|
22
|
-
),
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
19
|
+
setup(e, { emit: z }) {
|
|
20
|
+
const f = z, t = e, n = l(() => t.modelValue.start), i = l(() => t.modelValue.end), d = l(
|
|
21
|
+
() => M(n.value, t.type)
|
|
22
|
+
), m = l(() => M(i.value, t.type)), V = l(
|
|
23
|
+
() => !(d.value && m.value && d.value > m.value)
|
|
24
|
+
), c = l(() => `${t.name}Range`);
|
|
25
|
+
q(
|
|
26
|
+
[V, c],
|
|
27
|
+
([a, o], r) => {
|
|
28
|
+
var D, g;
|
|
29
|
+
const u = r == null ? void 0 : r[1];
|
|
30
|
+
u && u !== o && ((D = t.formValidationManager) == null || D.remove(u)), (g = t.formValidationManager) == null || g.setValid(o, a);
|
|
29
31
|
},
|
|
30
32
|
{ immediate: !0 }
|
|
31
|
-
),
|
|
33
|
+
), x(() => {
|
|
32
34
|
var a;
|
|
33
|
-
return (a = t.formValidationManager) == null ? void 0 : a.remove(
|
|
35
|
+
return (a = t.formValidationManager) == null ? void 0 : a.remove(c.value);
|
|
34
36
|
});
|
|
35
|
-
const
|
|
36
|
-
return (a,
|
|
37
|
-
class:
|
|
37
|
+
const R = (a) => f("update:modelValue", { start: a ?? "", end: i.value }), E = (a) => f("update:modelValue", { start: n.value, end: a ?? "" });
|
|
38
|
+
return (a, o) => (S(), k("div", {
|
|
39
|
+
class: v(a.$style.date_range_picker)
|
|
38
40
|
}, [
|
|
39
|
-
|
|
41
|
+
s(y, {
|
|
40
42
|
name: `${e.name}Start`,
|
|
41
|
-
modelValue:
|
|
43
|
+
modelValue: n.value,
|
|
42
44
|
isDisabled: e.isDisabled,
|
|
43
45
|
isRequired: e.isRequired,
|
|
44
46
|
formValidationManager: e.formValidationManager,
|
|
45
47
|
minDate: e.minDate,
|
|
46
|
-
maxDate:
|
|
48
|
+
maxDate: m.value || e.maxDate,
|
|
47
49
|
size: e.size,
|
|
48
50
|
type: e.type,
|
|
49
|
-
"onUpdate:modelValue":
|
|
51
|
+
"onUpdate:modelValue": R
|
|
50
52
|
}, null, 8, ["name", "modelValue", "isDisabled", "isRequired", "formValidationManager", "minDate", "maxDate", "size", "type"]),
|
|
51
|
-
|
|
52
|
-
class:
|
|
53
|
+
B("div", {
|
|
54
|
+
class: v(a.$style.range)
|
|
53
55
|
}, "〜", 2),
|
|
54
|
-
|
|
56
|
+
s(y, {
|
|
55
57
|
name: `${e.name}End`,
|
|
56
|
-
modelValue:
|
|
58
|
+
modelValue: i.value,
|
|
57
59
|
isDisabled: e.isDisabled,
|
|
58
60
|
isRequired: e.isRequired,
|
|
59
61
|
formValidationManager: e.formValidationManager,
|
|
60
|
-
minDate:
|
|
62
|
+
minDate: d.value || e.minDate,
|
|
61
63
|
maxDate: e.maxDate,
|
|
62
64
|
size: e.size,
|
|
63
65
|
type: e.type,
|
|
64
|
-
"onUpdate:modelValue":
|
|
66
|
+
"onUpdate:modelValue": E
|
|
65
67
|
}, null, 8, ["name", "modelValue", "isDisabled", "isRequired", "formValidationManager", "minDate", "maxDate", "size", "type"]),
|
|
66
|
-
|
|
67
|
-
errorMessages:
|
|
68
|
+
s(U, {
|
|
69
|
+
errorMessages: V.value ? void 0 : [$(N).startAfterEnd]
|
|
68
70
|
}, null, 8, ["errorMessages"])
|
|
69
71
|
], 2));
|
|
70
72
|
}
|
|
71
73
|
});
|
|
72
74
|
export {
|
|
73
|
-
|
|
75
|
+
w as default
|
|
74
76
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { daysInMonth as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { nextUniqueId as
|
|
7
|
-
const
|
|
1
|
+
import { defineComponent as F, ref as x, computed as y, watch as I, watchEffect as A, onBeforeUnmount as O, openBlock as d, createBlock as T, normalizeClass as u, withCtx as _, createElementVNode as o, createElementBlock as s, Fragment as h, renderList as g, toDisplayString as $, createVNode as c, createCommentVNode as M, unref as B } from "vue";
|
|
2
|
+
import { daysInMonth as j, splitDate as U } from "@geckou/ui-core";
|
|
3
|
+
import z from "./InputBox.vue.js";
|
|
4
|
+
import q from "./Icon/KeyboardArrowDownIcon.vue.js";
|
|
5
|
+
import H from "./TextButton.vue.js";
|
|
6
|
+
import { nextUniqueId as P } from "../scripts/unique-id.js";
|
|
7
|
+
const G = ["value", "name", "aria-label", "aria-labelledby", "required"], J = ["value"], K = ["value", "name", "aria-label", "aria-labelledby", "required"], Q = ["value"], W = ["value", "name", "aria-label", "aria-labelledby", "required"], X = ["value"], Z = ["id"], w = ["id"], ee = ["id"], de = /* @__PURE__ */ F({
|
|
8
8
|
__name: "DateSelector",
|
|
9
9
|
props: {
|
|
10
10
|
name: {},
|
|
@@ -18,67 +18,64 @@ const K = ["value", "name", "aria-label", "aria-labelledby", "required"], Q = ["
|
|
|
18
18
|
ariaLabelledBy: { default: void 0 }
|
|
19
19
|
},
|
|
20
20
|
emits: ["update:modelValue"],
|
|
21
|
-
setup(i, { emit:
|
|
22
|
-
const
|
|
21
|
+
setup(i, { emit: Y }) {
|
|
22
|
+
const S = Y, l = i, m = P("date_selector_unit"), v = (e) => l.ariaLabelledBy ? void 0 : `${l.ariaLabel ?? l.name}の${e}`, b = (e) => l.ariaLabelledBy ? `${l.ariaLabelledBy} ${m}_${e}` : void 0, n = x({
|
|
23
23
|
year: "",
|
|
24
24
|
month: "",
|
|
25
25
|
day: ""
|
|
26
|
-
}),
|
|
27
|
-
const e = (/* @__PURE__ */ new Date()).getFullYear(),
|
|
28
|
-
return Array.from({ length: r }, (
|
|
29
|
-
}),
|
|
30
|
-
const
|
|
26
|
+
}), D = y(() => {
|
|
27
|
+
const e = (/* @__PURE__ */ new Date()).getFullYear(), t = l.minYear ?? e - 100, a = l.maxYear ?? e - 14, r = Math.max(a - t + 1, 0);
|
|
28
|
+
return Array.from({ length: r }, (p, V) => (t + V).toString()).map((p) => ({ label: p, value: p }));
|
|
29
|
+
}), E = y(() => Array.from({ length: 12 }, (e, t) => {
|
|
30
|
+
const a = (t + 1).toString();
|
|
31
31
|
return {
|
|
32
|
-
label:
|
|
33
|
-
value:
|
|
32
|
+
label: a,
|
|
33
|
+
value: a.padStart(2, "0")
|
|
34
34
|
};
|
|
35
|
-
})),
|
|
36
|
-
var
|
|
37
|
-
const e = Number((
|
|
35
|
+
})), L = y(() => {
|
|
36
|
+
var a, r;
|
|
37
|
+
const e = Number((a = n.value) == null ? void 0 : a.month);
|
|
38
38
|
if (!e)
|
|
39
39
|
return 31;
|
|
40
|
-
const
|
|
41
|
-
return
|
|
42
|
-
}),
|
|
43
|
-
const e = [],
|
|
44
|
-
for (let
|
|
45
|
-
const r =
|
|
40
|
+
const t = Number((r = n.value) == null ? void 0 : r.year) || 2e3;
|
|
41
|
+
return j(t, e);
|
|
42
|
+
}), N = y(() => {
|
|
43
|
+
const e = [], t = L.value;
|
|
44
|
+
for (let a = 1; a <= t; a++) {
|
|
45
|
+
const r = a.toString();
|
|
46
46
|
e.push(r);
|
|
47
47
|
}
|
|
48
|
-
return e.map((
|
|
49
|
-
label:
|
|
50
|
-
value: String(
|
|
48
|
+
return e.map((a) => ({
|
|
49
|
+
label: a,
|
|
50
|
+
value: String(a).padStart(2, "0")
|
|
51
51
|
}));
|
|
52
|
-
}),
|
|
53
|
-
const
|
|
54
|
-
t
|
|
55
|
-
}, p = (e, a) => {
|
|
56
|
-
const t = e.target, { value: r } = t;
|
|
57
|
-
n.value = { ...n.value, [a]: r };
|
|
52
|
+
}), f = (e, t) => {
|
|
53
|
+
const a = e.target, { value: r } = a;
|
|
54
|
+
n.value = { ...n.value, [t]: r };
|
|
58
55
|
};
|
|
59
|
-
|
|
60
|
-
const
|
|
61
|
-
|
|
56
|
+
I(L, (e) => {
|
|
57
|
+
const t = Number(n.value.day);
|
|
58
|
+
t && t > e && (n.value = { ...n.value, day: String(e).padStart(2, "0") });
|
|
62
59
|
});
|
|
63
|
-
const
|
|
60
|
+
const R = { year: "", month: "", day: "" };
|
|
64
61
|
A(() => {
|
|
65
|
-
n.value = l.modelValue ?
|
|
62
|
+
n.value = l.modelValue ? U(l.modelValue) : { ...R };
|
|
66
63
|
});
|
|
67
|
-
const
|
|
64
|
+
const k = (e) => {
|
|
68
65
|
l.formValidationManager && l.formValidationManager.setValid(l.name, e);
|
|
69
|
-
},
|
|
70
|
-
const
|
|
71
|
-
return l.isRequired ?
|
|
66
|
+
}, C = (e) => {
|
|
67
|
+
const t = !!(e.year && e.month && (l.type === "month" || e.day)), a = !e.year && !e.month && !e.day;
|
|
68
|
+
return l.isRequired ? t : t || a;
|
|
72
69
|
};
|
|
73
|
-
return
|
|
70
|
+
return k(C(n.value)), I(
|
|
74
71
|
() => n.value,
|
|
75
72
|
(e) => {
|
|
76
|
-
const
|
|
77
|
-
if (
|
|
78
|
-
|
|
79
|
-
else if (
|
|
73
|
+
const t = !!(e.year && e.month && (l.type === "month" || e.day)), a = !e.year && !e.month && !e.day;
|
|
74
|
+
if (k(C(e)), a)
|
|
75
|
+
S("update:modelValue", "");
|
|
76
|
+
else if (t) {
|
|
80
77
|
const r = l.type === "month" ? [e.year, e.month] : [e.year, e.month, e.day];
|
|
81
|
-
|
|
78
|
+
S("update:modelValue", r.filter(Boolean).join("-"));
|
|
82
79
|
} else
|
|
83
80
|
return;
|
|
84
81
|
},
|
|
@@ -86,103 +83,100 @@ const K = ["value", "name", "aria-label", "aria-labelledby", "required"], Q = ["
|
|
|
86
83
|
), O(() => {
|
|
87
84
|
var e;
|
|
88
85
|
return (e = l.formValidationManager) == null ? void 0 : e.remove(l.name);
|
|
89
|
-
}), (e,
|
|
86
|
+
}), (e, t) => (d(), T(z, {
|
|
90
87
|
class: u(e.$style.date_selector)
|
|
91
88
|
}, {
|
|
92
|
-
default:
|
|
89
|
+
default: _(() => [
|
|
93
90
|
o("div", {
|
|
94
|
-
class: u([e.$style.selector_wrapper])
|
|
95
|
-
onClick: a[1] || (a[1] = (t) => b(t))
|
|
91
|
+
class: u([e.$style.selector_wrapper])
|
|
96
92
|
}, [
|
|
97
93
|
o("select", {
|
|
98
94
|
value: n.value.year,
|
|
99
95
|
name: `${i.name}-year`,
|
|
100
|
-
"aria-label":
|
|
101
|
-
"aria-labelledby":
|
|
96
|
+
"aria-label": v("年"),
|
|
97
|
+
"aria-labelledby": b("年"),
|
|
102
98
|
required: i.isRequired,
|
|
103
99
|
class: u(e.$style.year),
|
|
104
|
-
onChange:
|
|
100
|
+
onChange: t[0] || (t[0] = (a) => f(a, "year"))
|
|
105
101
|
}, [
|
|
106
|
-
|
|
102
|
+
t[4] || (t[4] = o("option", {
|
|
107
103
|
disabled: "",
|
|
108
104
|
selected: "",
|
|
109
105
|
value: ""
|
|
110
106
|
}, "年", -1)),
|
|
111
|
-
(
|
|
112
|
-
key:
|
|
113
|
-
value:
|
|
114
|
-
},
|
|
115
|
-
], 42,
|
|
116
|
-
c(
|
|
107
|
+
(d(!0), s(h, null, g(D.value, (a) => (d(), s("option", {
|
|
108
|
+
key: a.value,
|
|
109
|
+
value: a.value
|
|
110
|
+
}, $(a.label), 9, J))), 128))
|
|
111
|
+
], 42, G),
|
|
112
|
+
c(q)
|
|
117
113
|
], 2),
|
|
118
114
|
o("div", {
|
|
119
|
-
class: u([e.$style.selector_wrapper])
|
|
120
|
-
onClick: a[3] || (a[3] = (t) => b(t))
|
|
115
|
+
class: u([e.$style.selector_wrapper])
|
|
121
116
|
}, [
|
|
122
117
|
o("select", {
|
|
123
118
|
value: n.value.month,
|
|
124
119
|
name: `${i.name}-month`,
|
|
125
|
-
"aria-label":
|
|
126
|
-
"aria-labelledby":
|
|
120
|
+
"aria-label": v("月"),
|
|
121
|
+
"aria-labelledby": b("月"),
|
|
127
122
|
required: i.isRequired,
|
|
128
|
-
onChange:
|
|
123
|
+
onChange: t[1] || (t[1] = (a) => f(a, "month"))
|
|
129
124
|
}, [
|
|
130
|
-
|
|
125
|
+
t[5] || (t[5] = o("option", {
|
|
131
126
|
disabled: "",
|
|
132
127
|
selected: "",
|
|
133
128
|
value: ""
|
|
134
129
|
}, "月", -1)),
|
|
135
|
-
(
|
|
136
|
-
key:
|
|
137
|
-
value:
|
|
138
|
-
},
|
|
139
|
-
], 40,
|
|
140
|
-
c(
|
|
130
|
+
(d(!0), s(h, null, g(E.value, (a) => (d(), s("option", {
|
|
131
|
+
key: a.value,
|
|
132
|
+
value: a.value
|
|
133
|
+
}, $(a.label), 9, Q))), 128))
|
|
134
|
+
], 40, K),
|
|
135
|
+
c(q)
|
|
141
136
|
], 2),
|
|
142
|
-
i.type === "date" ? (
|
|
137
|
+
i.type === "date" ? (d(), s("div", {
|
|
143
138
|
key: 0,
|
|
144
|
-
class: u([e.$style.selector_wrapper])
|
|
145
|
-
onClick: a[5] || (a[5] = (t) => b(t))
|
|
139
|
+
class: u([e.$style.selector_wrapper])
|
|
146
140
|
}, [
|
|
147
141
|
o("select", {
|
|
148
142
|
value: n.value.day,
|
|
149
143
|
name: `${i.name}-day`,
|
|
150
|
-
"aria-label":
|
|
151
|
-
"aria-labelledby":
|
|
144
|
+
"aria-label": v("日"),
|
|
145
|
+
"aria-labelledby": b("日"),
|
|
152
146
|
required: i.isRequired,
|
|
153
|
-
onChange:
|
|
147
|
+
onChange: t[2] || (t[2] = (a) => f(a, "day"))
|
|
154
148
|
}, [
|
|
155
|
-
|
|
149
|
+
t[6] || (t[6] = o("option", {
|
|
156
150
|
disabled: "",
|
|
157
151
|
selected: "",
|
|
158
152
|
value: ""
|
|
159
153
|
}, "日", -1)),
|
|
160
|
-
(
|
|
161
|
-
key:
|
|
162
|
-
value:
|
|
163
|
-
},
|
|
164
|
-
], 40,
|
|
165
|
-
c(
|
|
166
|
-
], 2)) :
|
|
167
|
-
i.ariaLabelledBy ? (
|
|
154
|
+
(d(!0), s(h, null, g(N.value, (a) => (d(), s("option", {
|
|
155
|
+
key: a.value,
|
|
156
|
+
value: a.value
|
|
157
|
+
}, $(a.label), 9, X))), 128))
|
|
158
|
+
], 40, W),
|
|
159
|
+
c(q)
|
|
160
|
+
], 2)) : M("", !0),
|
|
161
|
+
i.ariaLabelledBy ? (d(), s("span", {
|
|
168
162
|
key: 1,
|
|
169
163
|
class: u(e.$style.unit_labels)
|
|
170
164
|
}, [
|
|
171
165
|
o("span", {
|
|
172
|
-
id: `${
|
|
173
|
-
}, "の年", 8,
|
|
166
|
+
id: `${B(m)}_年`
|
|
167
|
+
}, "の年", 8, Z),
|
|
174
168
|
o("span", {
|
|
175
|
-
id: `${
|
|
176
|
-
}, "の月", 8,
|
|
169
|
+
id: `${B(m)}_月`
|
|
170
|
+
}, "の月", 8, w),
|
|
177
171
|
o("span", {
|
|
178
|
-
id: `${
|
|
179
|
-
}, "の日", 8,
|
|
180
|
-
], 2)) :
|
|
181
|
-
c(
|
|
172
|
+
id: `${B(m)}_日`
|
|
173
|
+
}, "の日", 8, ee)
|
|
174
|
+
], 2)) : M("", !0),
|
|
175
|
+
c(H, {
|
|
182
176
|
text: "削除",
|
|
183
177
|
variant: "caution",
|
|
184
178
|
class: u(e.$style.delete_button),
|
|
185
|
-
onClick:
|
|
179
|
+
onClick: t[3] || (t[3] = (a) => n.value = { year: "", month: "", day: "" })
|
|
186
180
|
}, null, 8, ["class"])
|
|
187
181
|
]),
|
|
188
182
|
_: 1
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { isEmptyValue as
|
|
1
|
+
import { defineComponent as E, ref as $, computed as q, watch as M, openBlock as t, createBlock as p, normalizeClass as u, withCtx as O, withDirectives as N, createElementVNode as v, createElementBlock as a, toDisplayString as c, Fragment as i, renderList as y, vModelSelect as R, renderSlot as x, createCommentVNode as I, createVNode as z } from "vue";
|
|
2
|
+
import { isEmptyValue as D, MESSAGES as A } from "@geckou/ui-core";
|
|
3
3
|
import F from "./InputBox.vue.js";
|
|
4
4
|
import G from "./ErrorMessage.vue.js";
|
|
5
5
|
import L from "./Icon/KeyboardArrowDownIcon.vue.js";
|
|
6
|
-
const U = ["name", "disabled", "required"], H = {
|
|
6
|
+
const U = ["name", "disabled", "required", "aria-invalid"], H = {
|
|
7
7
|
key: 0,
|
|
8
8
|
value: ""
|
|
9
9
|
}, J = {
|
|
@@ -11,7 +11,7 @@ const U = ["name", "disabled", "required"], H = {
|
|
|
11
11
|
disabled: "",
|
|
12
12
|
selected: "",
|
|
13
13
|
value: ""
|
|
14
|
-
}, K = ["value"
|
|
14
|
+
}, K = ["value", "disabled"], P = ["label"], Q = ["value", "disabled"], j = /* @__PURE__ */ E({
|
|
15
15
|
__name: "SelectBox",
|
|
16
16
|
props: {
|
|
17
17
|
options: {},
|
|
@@ -24,86 +24,82 @@ const U = ["name", "disabled", "required"], H = {
|
|
|
24
24
|
isRequired: { type: Boolean }
|
|
25
25
|
},
|
|
26
26
|
emits: ["update:modelValue"],
|
|
27
|
-
setup(
|
|
28
|
-
const
|
|
29
|
-
get: () =>
|
|
30
|
-
set: (
|
|
31
|
-
}), b = (
|
|
32
|
-
|
|
27
|
+
setup(l, { emit: B }) {
|
|
28
|
+
const C = B, m = l, o = $([]), d = q({
|
|
29
|
+
get: () => m.modelValue ?? "",
|
|
30
|
+
set: (e) => C("update:modelValue", e)
|
|
31
|
+
}), b = (e) => typeof e == "object" && e !== null && "label" in e && typeof e.label == "string" && "value" in e, f = () => {
|
|
32
|
+
o.value = [], D(d.value) && m.isRequired && o.value.push(A.required);
|
|
33
33
|
};
|
|
34
|
-
return
|
|
35
|
-
() =>
|
|
34
|
+
return M(
|
|
35
|
+
() => d.value,
|
|
36
36
|
() => f(),
|
|
37
|
-
{ immediate: !
|
|
38
|
-
), (
|
|
39
|
-
cssStyle:
|
|
40
|
-
class:
|
|
41
|
-
isDisabled:
|
|
37
|
+
{ immediate: !D(m.modelValue), flush: "post" }
|
|
38
|
+
), (e, r) => (t(), p(F, {
|
|
39
|
+
cssStyle: l.cssStyle,
|
|
40
|
+
class: u(e.$style.select_box),
|
|
41
|
+
isDisabled: l.isDisabled,
|
|
42
|
+
isErrored: !!o.value.length
|
|
42
43
|
}, {
|
|
43
44
|
default: O(() => {
|
|
44
|
-
var S, h, k
|
|
45
|
+
var S, g, h, k;
|
|
45
46
|
return [
|
|
46
|
-
|
|
47
|
-
"onUpdate:modelValue": r[0] || (r[0] = (s) =>
|
|
48
|
-
name:
|
|
49
|
-
disabled:
|
|
50
|
-
required:
|
|
51
|
-
|
|
47
|
+
N(v("select", {
|
|
48
|
+
"onUpdate:modelValue": r[0] || (r[0] = (s) => d.value = s),
|
|
49
|
+
name: l.name,
|
|
50
|
+
disabled: l.isDisabled,
|
|
51
|
+
required: l.isRequired,
|
|
52
|
+
"aria-invalid": o.value.length > 0 || void 0,
|
|
53
|
+
class: u(e.$style.select),
|
|
52
54
|
onBlur: r[1] || (r[1] = (s) => f())
|
|
53
55
|
}, [
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
key: 2,
|
|
57
|
-
disabled: "",
|
|
58
|
-
selected: "",
|
|
59
|
-
value: o.value
|
|
60
|
-
}, d(e.placeholder || "選択してください"), 9, K)) : B("", !0),
|
|
61
|
-
(t(!0), a(i, null, y(e.options, (s) => (t(), a(i, {
|
|
56
|
+
l.canOmitSelect ? (t(), a("option", H, c(l.placeholder || "選択しない"), 1)) : (t(), a("option", J, c(l.placeholder || "選択してください"), 1)),
|
|
57
|
+
(t(!0), a(i, null, y(l.options, (s) => (t(), a(i, {
|
|
62
58
|
key: b(s) ? s.value : Object.keys(s)[0]
|
|
63
59
|
}, [
|
|
64
60
|
b(s) ? (t(), a("option", {
|
|
65
61
|
key: 0,
|
|
66
62
|
value: s.value,
|
|
67
63
|
disabled: s.isDisabled
|
|
68
|
-
},
|
|
69
|
-
(t(!0), a(i, null, y(s, (
|
|
64
|
+
}, c(s.label), 9, K)) : (t(), a(i, { key: 1 }, [
|
|
65
|
+
(t(!0), a(i, null, y(s, (w, V) => (t(), a("optgroup", {
|
|
70
66
|
key: V,
|
|
71
67
|
label: V
|
|
72
68
|
}, [
|
|
73
|
-
(t(!0), a(i, null, y(
|
|
74
|
-
key:
|
|
75
|
-
value:
|
|
76
|
-
disabled:
|
|
77
|
-
},
|
|
78
|
-
], 8,
|
|
69
|
+
(t(!0), a(i, null, y(w, (n) => (t(), a("option", {
|
|
70
|
+
key: n.value,
|
|
71
|
+
value: n.value,
|
|
72
|
+
disabled: n.isDisabled
|
|
73
|
+
}, c(n.label), 9, Q))), 128))
|
|
74
|
+
], 8, P))), 128)),
|
|
79
75
|
r[2] || (r[2] = v("hr", null, null, -1))
|
|
80
76
|
], 64))
|
|
81
77
|
], 64))), 128))
|
|
82
78
|
], 42, U), [
|
|
83
|
-
[
|
|
79
|
+
[R, d.value]
|
|
84
80
|
]),
|
|
85
81
|
v("div", {
|
|
86
|
-
class:
|
|
82
|
+
class: u(e.$style.arrow_container)
|
|
87
83
|
}, [
|
|
88
|
-
|
|
89
|
-
|
|
84
|
+
x(e.$slots, "arrow"),
|
|
85
|
+
e.$slots.arrow ? I("", !0) : (t(), p(L, {
|
|
90
86
|
key: 0,
|
|
91
|
-
class:
|
|
87
|
+
class: u(e.$style.arrow)
|
|
92
88
|
}, null, 8, ["class"]))
|
|
93
89
|
], 2),
|
|
94
|
-
|
|
95
|
-
errorMessages:
|
|
90
|
+
z(G, {
|
|
91
|
+
errorMessages: o.value,
|
|
96
92
|
cssStyle: {
|
|
97
|
-
textColor: (
|
|
98
|
-
backgroundColor: (
|
|
93
|
+
textColor: (g = (S = l.cssStyle) == null ? void 0 : S.error) == null ? void 0 : g.backgroundColor,
|
|
94
|
+
backgroundColor: (k = (h = l.cssStyle) == null ? void 0 : h.error) == null ? void 0 : k.textColor
|
|
99
95
|
}
|
|
100
96
|
}, null, 8, ["errorMessages", "cssStyle"])
|
|
101
97
|
];
|
|
102
98
|
}),
|
|
103
99
|
_: 3
|
|
104
|
-
}, 8, ["cssStyle", "class", "isDisabled"]));
|
|
100
|
+
}, 8, ["cssStyle", "class", "isDisabled", "isErrored"]));
|
|
105
101
|
}
|
|
106
102
|
});
|
|
107
103
|
export {
|
|
108
|
-
|
|
104
|
+
j as default
|
|
109
105
|
};
|