@geckou/ui-vue 0.10.0 → 0.13.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 +31 -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/BasicButton.vue2.js +51 -43
- package/dist/components/BasicButton.vue3.js +5 -5
- package/dist/components/CheckBoxes.vue.d.ts +8 -0
- package/dist/components/CheckBoxes.vue2.js +56 -45
- package/dist/components/CheckButton.vue.d.ts +9 -0
- package/dist/components/CheckButton.vue2.js +32 -28
- package/dist/components/DateSelector.vue2.js +93 -99
- package/dist/components/ErrorMessage.vue.d.ts +2 -0
- package/dist/components/ErrorMessage.vue2.js +15 -13
- package/dist/components/LoadingSpinner.vue.d.ts +1 -1
- package/dist/components/LoadingSpinner.vue.js +5 -3
- package/dist/components/ModalBox.vue2.js +51 -41
- package/dist/components/PopupBox.vue2.js +17 -17
- package/dist/components/RadioButtons.vue.d.ts +8 -0
- package/dist/components/RadioButtons.vue2.js +55 -44
- package/dist/style.css +1 -1
- package/package.json +2 -2
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { COLOR as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
1
|
+
import { defineComponent as B, ref as p, computed as k, watch as m, openBlock as v, createElementBlock as g, normalizeClass as E, unref as S, Fragment as q, renderList as x, createBlock as M, createVNode as D } from "vue";
|
|
2
|
+
import { COLOR as b, MESSAGES as A } from "@geckou/ui-core";
|
|
3
|
+
import I from "./LabeledCheckbox.vue.js";
|
|
4
|
+
import R from "./ErrorMessage.vue.js";
|
|
5
|
+
import { nextUniqueId as U } from "../scripts/unique-id.js";
|
|
6
|
+
const z = ["aria-label", "aria-labelledby", "aria-describedby"], $ = /* @__PURE__ */ B({
|
|
6
7
|
__name: "CheckBoxes",
|
|
7
8
|
props: {
|
|
8
9
|
name: {},
|
|
@@ -10,12 +11,14 @@ const F = /* @__PURE__ */ V({
|
|
|
10
11
|
modelValue: { default: void 0 },
|
|
11
12
|
isDisabled: { type: Boolean },
|
|
12
13
|
isRequired: { type: Boolean },
|
|
13
|
-
cssStyle: { default: void 0 }
|
|
14
|
+
cssStyle: { default: void 0 },
|
|
15
|
+
ariaLabel: { default: void 0 },
|
|
16
|
+
ariaLabelledBy: { default: void 0 }
|
|
14
17
|
},
|
|
15
18
|
emits: ["update:modelValue"],
|
|
16
|
-
setup(
|
|
17
|
-
var
|
|
18
|
-
const
|
|
19
|
+
setup(s, { emit: C }) {
|
|
20
|
+
var y;
|
|
21
|
+
const V = C, a = s, f = U("check_boxes_error"), u = p(
|
|
19
22
|
a.options.map((e) => {
|
|
20
23
|
var r;
|
|
21
24
|
return {
|
|
@@ -24,22 +27,22 @@ const F = /* @__PURE__ */ V({
|
|
|
24
27
|
checked: ((r = a.modelValue) == null ? void 0 : r.includes(e.value)) || !1
|
|
25
28
|
};
|
|
26
29
|
})
|
|
27
|
-
),
|
|
28
|
-
() =>
|
|
29
|
-
),
|
|
30
|
+
), n = k(
|
|
31
|
+
() => u.value.filter((e) => e.checked).map((e) => e.value)
|
|
32
|
+
), o = p(""), L = () => o.value = a.isRequired && n.value.length === 0 ? A.required : "";
|
|
30
33
|
m(
|
|
31
|
-
|
|
34
|
+
n,
|
|
32
35
|
(e, r) => {
|
|
33
|
-
r && ((l,
|
|
36
|
+
r && ((l, d) => l.length === d.length && l.every((i, c) => i === d[c]))(e, r) || (L(), V("update:modelValue", e));
|
|
34
37
|
},
|
|
35
38
|
{
|
|
36
39
|
deep: !0,
|
|
37
|
-
immediate: !!((
|
|
40
|
+
immediate: !!((y = a.modelValue) != null && y.length)
|
|
38
41
|
}
|
|
39
42
|
), m(
|
|
40
43
|
() => a.modelValue,
|
|
41
44
|
(e) => {
|
|
42
|
-
e &&
|
|
45
|
+
e && u.value.forEach(
|
|
43
46
|
(r) => r.checked = e.includes(r.value)
|
|
44
47
|
);
|
|
45
48
|
},
|
|
@@ -50,15 +53,15 @@ const F = /* @__PURE__ */ V({
|
|
|
50
53
|
), m(
|
|
51
54
|
() => a.options,
|
|
52
55
|
(e) => {
|
|
53
|
-
if (e.length ===
|
|
54
|
-
(l,
|
|
55
|
-
var
|
|
56
|
-
return l.value === ((
|
|
56
|
+
if (e.length === u.value.length && e.every(
|
|
57
|
+
(l, d) => {
|
|
58
|
+
var i, c;
|
|
59
|
+
return l.value === ((i = u.value[d]) == null ? void 0 : i.value) && l.label === ((c = u.value[d]) == null ? void 0 : c.label);
|
|
57
60
|
}
|
|
58
61
|
))
|
|
59
62
|
return;
|
|
60
|
-
const t = new Set(
|
|
61
|
-
|
|
63
|
+
const t = new Set(n.value);
|
|
64
|
+
u.value = e.map((l) => ({
|
|
62
65
|
value: l.value,
|
|
63
66
|
label: l.label,
|
|
64
67
|
checked: a.modelValue ? a.modelValue.includes(l.value) : t.has(l.value)
|
|
@@ -66,39 +69,47 @@ const F = /* @__PURE__ */ V({
|
|
|
66
69
|
},
|
|
67
70
|
{ deep: !0 }
|
|
68
71
|
);
|
|
69
|
-
const h = {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
72
|
+
const h = k(() => {
|
|
73
|
+
var e;
|
|
74
|
+
return {
|
|
75
|
+
...((e = a.cssStyle) == null ? void 0 : e.error) ?? {},
|
|
76
|
+
textColor: b.white,
|
|
77
|
+
backgroundColor: b.red,
|
|
78
|
+
border: {
|
|
79
|
+
color: b.red,
|
|
80
|
+
size: "1px",
|
|
81
|
+
radius: ".25rem"
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
});
|
|
85
|
+
return (e, r) => (v(), g("div", {
|
|
86
|
+
class: E(e.$style.check_boxes),
|
|
87
|
+
role: "group",
|
|
88
|
+
"aria-label": s.ariaLabelledBy ? void 0 : s.ariaLabel,
|
|
89
|
+
"aria-labelledby": s.ariaLabelledBy,
|
|
90
|
+
"aria-describedby": o.value ? S(f) : void 0
|
|
81
91
|
}, [
|
|
82
|
-
(
|
|
92
|
+
(v(!0), g(q, null, x(u.value, (t, l) => (v(), M(I, {
|
|
83
93
|
key: t.value,
|
|
84
|
-
modelValue:
|
|
85
|
-
"onUpdate:modelValue": (
|
|
86
|
-
name:
|
|
94
|
+
modelValue: u.value[l].checked,
|
|
95
|
+
"onUpdate:modelValue": (d) => u.value[l].checked = d,
|
|
96
|
+
name: s.name,
|
|
87
97
|
value: t.value,
|
|
88
98
|
label: t.label,
|
|
89
99
|
isDisabled: a.isDisabled,
|
|
90
100
|
cssStyle: a.cssStyle
|
|
91
101
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "name", "value", "label", "isDisabled", "cssStyle"]))), 128)),
|
|
92
|
-
D(
|
|
93
|
-
|
|
102
|
+
D(R, {
|
|
103
|
+
id: S(f),
|
|
104
|
+
errorMessages: o.value ? [o.value] : [],
|
|
94
105
|
cssStyle: {
|
|
95
|
-
textColor: h.textColor,
|
|
96
|
-
backgroundColor: h.backgroundColor
|
|
106
|
+
textColor: h.value.textColor,
|
|
107
|
+
backgroundColor: h.value.backgroundColor
|
|
97
108
|
}
|
|
98
|
-
}, null, 8, ["errorMessages", "cssStyle"])
|
|
99
|
-
],
|
|
109
|
+
}, null, 8, ["id", "errorMessages", "cssStyle"])
|
|
110
|
+
], 10, z));
|
|
100
111
|
}
|
|
101
112
|
});
|
|
102
113
|
export {
|
|
103
|
-
|
|
114
|
+
$ as default
|
|
104
115
|
};
|
|
@@ -5,6 +5,13 @@ type __VLS_Props = {
|
|
|
5
5
|
isDisabled?: boolean;
|
|
6
6
|
cssStyle?: CheckBoxStyleForEachStatus;
|
|
7
7
|
isDisableAnimation?: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* アクセシブル名。可視ラベルがあるなら ariaLabelledBy でその要素を指すこと。
|
|
10
|
+
* 文言を持たない label で包むだけだったため、
|
|
11
|
+
* スクリーンリーダーでは「チェックボックス」としか読まれなかった
|
|
12
|
+
*/
|
|
13
|
+
ariaLabel?: string;
|
|
14
|
+
ariaLabelledBy?: string;
|
|
8
15
|
};
|
|
9
16
|
declare function __VLS_template(): {
|
|
10
17
|
attrs: Partial<{}>;
|
|
@@ -21,6 +28,8 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}
|
|
|
21
28
|
"onUpdate:modelValue"?: ((newValue: boolean) => any) | undefined;
|
|
22
29
|
}>, {
|
|
23
30
|
cssStyle: CheckBoxStyleForEachStatus;
|
|
31
|
+
ariaLabel: string;
|
|
32
|
+
ariaLabelledBy: string;
|
|
24
33
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLLabelElement>;
|
|
25
34
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
26
35
|
export default _default;
|
|
@@ -1,54 +1,58 @@
|
|
|
1
|
-
import { defineComponent as C, ref as V, computed as
|
|
2
|
-
import
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as C, ref as V, computed as p, watch as b, openBlock as f, createElementBlock as D, normalizeClass as y, normalizeStyle as S, withDirectives as z, createElementVNode as k, vModelCheckbox as L, renderSlot as $, createBlock as g, createCommentVNode as w } from "vue";
|
|
2
|
+
import x from "./Icon/CheckIcon.vue.js";
|
|
3
|
+
const A = ["name", "aria-label", "aria-labelledby", "disabled"], I = /* @__PURE__ */ C({
|
|
4
4
|
__name: "CheckButton",
|
|
5
5
|
props: {
|
|
6
6
|
name: {},
|
|
7
7
|
modelValue: { type: Boolean },
|
|
8
8
|
isDisabled: { type: Boolean },
|
|
9
9
|
cssStyle: { default: () => ({ default: {} }) },
|
|
10
|
-
isDisableAnimation: { type: Boolean }
|
|
10
|
+
isDisableAnimation: { type: Boolean },
|
|
11
|
+
ariaLabel: { default: void 0 },
|
|
12
|
+
ariaLabelledBy: { default: void 0 }
|
|
11
13
|
},
|
|
12
14
|
emits: ["update:modelValue"],
|
|
13
|
-
setup(
|
|
14
|
-
const
|
|
15
|
+
setup(e, { emit: h }) {
|
|
16
|
+
const v = h, l = e, t = V(l.modelValue ?? !1), o = p(() => l.isDisabled ? l.cssStyle.disabled : l.cssStyle.default);
|
|
15
17
|
return b(
|
|
16
18
|
() => t.value,
|
|
17
|
-
(
|
|
19
|
+
(a) => v("update:modelValue", a)
|
|
18
20
|
), b(
|
|
19
21
|
() => l.modelValue,
|
|
20
|
-
(
|
|
22
|
+
(a) => t.value = a,
|
|
21
23
|
{ immediate: !0 }
|
|
22
|
-
), (
|
|
23
|
-
var r, n,
|
|
24
|
-
return
|
|
25
|
-
class:
|
|
24
|
+
), (a, d) => {
|
|
25
|
+
var i, r, n, s, u, c, m;
|
|
26
|
+
return f(), D("label", {
|
|
27
|
+
class: y(a.$style.check_box),
|
|
26
28
|
style: S({
|
|
27
|
-
"--border-color": ((
|
|
28
|
-
"--border-size": ((
|
|
29
|
-
"--radius-size": ((
|
|
30
|
-
"--background-color": ((m =
|
|
31
|
-
"--duration":
|
|
29
|
+
"--border-color": ((r = (i = o.value) == null ? void 0 : i.border) == null ? void 0 : r.color) || "blue",
|
|
30
|
+
"--border-size": ((s = (n = o.value) == null ? void 0 : n.border) == null ? void 0 : s.size) || "1px",
|
|
31
|
+
"--radius-size": ((c = (u = o.value) == null ? void 0 : u.border) == null ? void 0 : c.radius) || "0.25rem",
|
|
32
|
+
"--background-color": ((m = o.value) == null ? void 0 : m.backgroundColor) || "#fff",
|
|
33
|
+
"--duration": e.isDisableAnimation ? "0s" : ".3s"
|
|
32
34
|
})
|
|
33
35
|
}, [
|
|
34
|
-
z(
|
|
35
|
-
"onUpdate:modelValue":
|
|
36
|
+
z(k("input", {
|
|
37
|
+
"onUpdate:modelValue": d[0] || (d[0] = (B) => t.value = B),
|
|
36
38
|
type: "checkbox",
|
|
37
|
-
name:
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
name: e.name,
|
|
40
|
+
"aria-label": e.ariaLabelledBy ? void 0 : e.ariaLabel ?? e.name,
|
|
41
|
+
"aria-labelledby": e.ariaLabelledBy,
|
|
42
|
+
disabled: e.isDisabled
|
|
43
|
+
}, null, 8, A), [
|
|
44
|
+
[L, t.value]
|
|
41
45
|
]),
|
|
42
|
-
|
|
43
|
-
class:
|
|
46
|
+
k("div", {
|
|
47
|
+
class: y(a.$style.check_container)
|
|
44
48
|
}, [
|
|
45
|
-
|
|
46
|
-
|
|
49
|
+
$(a.$slots, "check"),
|
|
50
|
+
a.$slots.check ? w("", !0) : (f(), g(x, { key: 0 }))
|
|
47
51
|
], 2)
|
|
48
52
|
], 6);
|
|
49
53
|
};
|
|
50
54
|
}
|
|
51
55
|
});
|
|
52
56
|
export {
|
|
53
|
-
|
|
57
|
+
I as default
|
|
54
58
|
};
|
|
@@ -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,30 +1,32 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { COLOR as
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as i, withDirectives as d, openBlock as r, createElementBlock as o, normalizeClass as m, normalizeStyle as g, unref as u, Fragment as f, renderList as y, toDisplayString as C, vShow as S } from "vue";
|
|
2
|
+
import { COLOR as h } from "@geckou/ui-core";
|
|
3
|
+
const k = ["id"], b = /* @__PURE__ */ i({
|
|
4
4
|
__name: "ErrorMessage",
|
|
5
5
|
props: {
|
|
6
|
+
id: {},
|
|
6
7
|
cssStyle: {},
|
|
7
8
|
errorMessages: {}
|
|
8
9
|
},
|
|
9
10
|
setup(e) {
|
|
10
|
-
const { red:
|
|
11
|
-
return (
|
|
11
|
+
const { red: l } = h;
|
|
12
|
+
return (n, M) => {
|
|
12
13
|
var s, t;
|
|
13
|
-
return
|
|
14
|
+
return d((r(), o("div", {
|
|
15
|
+
id: e.id,
|
|
14
16
|
role: "alert",
|
|
15
|
-
class: m(
|
|
16
|
-
style:
|
|
17
|
+
class: m(n.$style.error_messages),
|
|
18
|
+
style: g({
|
|
17
19
|
"--error-text-color": ((s = e.cssStyle) == null ? void 0 : s.textColor) || "#fff",
|
|
18
|
-
"--error-background-color": ((t = e.cssStyle) == null ? void 0 : t.backgroundColor) ||
|
|
20
|
+
"--error-background-color": ((t = e.cssStyle) == null ? void 0 : t.backgroundColor) || u(l)
|
|
19
21
|
})
|
|
20
22
|
}, [
|
|
21
|
-
(r(!0), o(f, null, y(e.errorMessages, (
|
|
22
|
-
],
|
|
23
|
-
[
|
|
23
|
+
(r(!0), o(f, null, y(e.errorMessages, (a, c) => (r(), o("span", { key: c }, C(a), 1))), 128))
|
|
24
|
+
], 14, k)), [
|
|
25
|
+
[S, e.errorMessages && e.errorMessages.length]
|
|
24
26
|
]);
|
|
25
27
|
};
|
|
26
28
|
}
|
|
27
29
|
});
|
|
28
30
|
export {
|
|
29
|
-
|
|
31
|
+
b as default
|
|
30
32
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {},
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
2
2
|
export default _default;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import { openBlock as
|
|
1
|
+
import { openBlock as e, createElementBlock as r, createStaticVNode as t } from "vue";
|
|
2
2
|
import i from "../_virtual/_plugin-vue_export-helper.js";
|
|
3
3
|
const o = {}, a = {
|
|
4
4
|
viewBox: "0 0 24 24",
|
|
5
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
5
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6
|
+
"aria-hidden": "true",
|
|
7
|
+
focusable: "false"
|
|
6
8
|
};
|
|
7
9
|
function n(l, c) {
|
|
8
|
-
return
|
|
10
|
+
return e(), r("svg", a, [...c[0] || (c[0] = [
|
|
9
11
|
t('<g><circle cx="12" cy="2.5" r="1.5" opacity=".14"></circle><circle cx="16.75" cy="3.77" r="1.5" opacity=".29"></circle><circle cx="20.23" cy="7.25" r="1.5" opacity=".43"></circle><circle cx="21.50" cy="12.00" r="1.5" opacity=".57"></circle><circle cx="20.23" cy="16.75" r="1.5" opacity=".71"></circle><circle cx="16.75" cy="20.23" r="1.5" opacity=".86"></circle><circle cx="12" cy="21.5" r="1.5"></circle><animateTransform attributeName="transform" type="rotate" calcMode="discrete" dur="0.75s" values="0 12 12;30 12 12;60 12 12;90 12 12;120 12 12;150 12 12;180 12 12;210 12 12;240 12 12;270 12 12;300 12 12;330 12 12;360 12 12" repeatCount="indefinite"></animateTransform></g>', 1)
|
|
10
12
|
])]);
|
|
11
13
|
}
|