@geckou/ui-vue 0.6.0 → 0.7.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 +24 -0
- package/dist/components/ArticleList/Parts/CardHeading.vue.d.ts +6 -1
- package/dist/components/ArticleList/Parts/CardHeading.vue2.js +7 -7
- package/dist/components/CheckBox.vue.d.ts +2 -2
- package/dist/components/CheckBox.vue2.js +43 -41
- package/dist/components/CheckBox.vue3.js +2 -2
- package/dist/components/DatePicker.vue.d.ts +9 -0
- package/dist/components/DatePicker.vue2.js +80 -60
- package/dist/components/DatePicker.vue3.js +14 -12
- package/dist/components/DateSelector.vue.d.ts +9 -0
- package/dist/components/DateSelector.vue2.js +97 -77
- package/dist/components/DateSelector.vue3.js +12 -10
- package/dist/components/LabeledCheckbox.vue3.js +1 -1
- package/dist/components/ModalBox.vue2.js +37 -31
- package/dist/components/ToggleButton.vue.d.ts +1 -1
- package/dist/components/ToggleButton.vue2.js +45 -43
- package/dist/components/ToggleButton.vue3.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -64,6 +64,16 @@ import { TextBox, StandardList } from '@geckou/ui-vue'
|
|
|
64
64
|
|
|
65
65
|
`DatePicker` / `DateRangePicker` / `DateSelector`
|
|
66
66
|
|
|
67
|
+
`DatePicker` / `DateSelector` の年月日欄の読み上げ名は、既定では `name` から作られます
|
|
68
|
+
(`name="startedOn"` なら「startedOnの年」)。`CheckBox` と同じ `ariaLabel` / `ariaLabelledBy`
|
|
69
|
+
を渡すと、そちらを土台に「の年」「の月」「の日」を繋げます。可視ラベルがあるなら
|
|
70
|
+
`ariaLabelledBy` でその要素を指してください(WCAG 2.5.3 Label in Name)。
|
|
71
|
+
|
|
72
|
+
```vue
|
|
73
|
+
<DatePicker v-model="startedOn" name="startedOn" ariaLabel="開始日" />
|
|
74
|
+
<DatePicker v-model="startedOn" name="startedOn" :ariaLabelledBy="labelId" />
|
|
75
|
+
```
|
|
76
|
+
|
|
67
77
|
`FormValidationManager` を渡すと、フォーム内の各入力の検証結果をまとめて追跡できます。
|
|
68
78
|
|
|
69
79
|
```vue
|
|
@@ -291,6 +301,20 @@ const articles = ref<any[]>([])
|
|
|
291
301
|
|
|
292
302
|
定義例はデモの `demo/styles/base.scss` を参照。
|
|
293
303
|
|
|
304
|
+
## 0.7.0 の変更
|
|
305
|
+
|
|
306
|
+
- `DatePicker` / `DateSelector` が `ariaLabel` / `ariaLabelledBy` を受ける
|
|
307
|
+
(未指定なら従来どおり `name` から読み上げ名を作る)
|
|
308
|
+
- `CheckBox` / `ToggleButton` が `<button>` の中に `<input>` を置かなくなった。
|
|
309
|
+
状態は `<button>` の `data-checked` / `disabled` で表し、送信用の入力は
|
|
310
|
+
チェック時だけ `<input type="hidden">` として `<button>` の外に描かれる。
|
|
311
|
+
`:has(input:checked)` などで見た目を上書きしていた場合は追従が要る
|
|
312
|
+
- `CheckBox` が `isDisabled` のとき `<button disabled>` を出す(Tab で止まらなくなる)
|
|
313
|
+
- `ArticleList` の `CardHeading` が `heading` を HTML として描画する
|
|
314
|
+
(WordPress の `title.rendered` のエンティティがそのまま出ていた)。
|
|
315
|
+
WP 以外から渡す場合は埋め込む前にサニタイズすること
|
|
316
|
+
- `ModalBox` が開いている間、Tab / Shift+Tab をダイアログ内で循環させる(フォーカストラップ)
|
|
317
|
+
|
|
294
318
|
## 0.6.0 の破壊的変更
|
|
295
319
|
|
|
296
320
|
- `ModalBox` のイベント名が `closeModal` → `close`(React の `onClose` と揃えた)。
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
type __VLS_Props = {
|
|
2
|
+
/**
|
|
3
|
+
* 見出し。**HTML 文字列として描画する**(WordPress の `title.rendered` は
|
|
4
|
+
* `&` などにエンコード済みなので、テキストのまま出すとエンティティが見えてしまう)。
|
|
5
|
+
* WP 以外から渡す場合は、埋め込む前にサニタイズすること
|
|
6
|
+
*/
|
|
2
7
|
heading: string;
|
|
3
8
|
color?: string;
|
|
4
9
|
fontSize?: string;
|
|
@@ -8,5 +13,5 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
8
13
|
color: string;
|
|
9
14
|
fontSize: string;
|
|
10
15
|
fontWeight: string;
|
|
11
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {},
|
|
16
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
12
17
|
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as t, openBlock as o, createElementBlock as a, normalizeClass as i, normalizeStyle as l, createElementVNode as r } from "vue";
|
|
2
|
+
const d = ["innerHTML"], h = /* @__PURE__ */ t({
|
|
3
3
|
__name: "CardHeading",
|
|
4
4
|
props: {
|
|
5
5
|
heading: {},
|
|
@@ -8,18 +8,18 @@ const g = /* @__PURE__ */ n({
|
|
|
8
8
|
fontWeight: { default: "bold" }
|
|
9
9
|
},
|
|
10
10
|
setup(e) {
|
|
11
|
-
return (
|
|
12
|
-
class:
|
|
13
|
-
style:
|
|
11
|
+
return (n, c) => (o(), a("div", {
|
|
12
|
+
class: i(n.$style.heading),
|
|
13
|
+
style: l({
|
|
14
14
|
"--heading-color": e.color,
|
|
15
15
|
"--heading-font-size": e.fontSize,
|
|
16
16
|
"--heading-font-weight": e.fontWeight
|
|
17
17
|
})
|
|
18
18
|
}, [
|
|
19
|
-
r("h2",
|
|
19
|
+
r("h2", { innerHTML: e.heading }, null, 8, d)
|
|
20
20
|
], 6));
|
|
21
21
|
}
|
|
22
22
|
});
|
|
23
23
|
export {
|
|
24
|
-
|
|
24
|
+
h as default
|
|
25
25
|
};
|
|
@@ -20,7 +20,7 @@ declare function __VLS_template(): {
|
|
|
20
20
|
check?(_: {}): any;
|
|
21
21
|
};
|
|
22
22
|
refs: {};
|
|
23
|
-
rootEl:
|
|
23
|
+
rootEl: any;
|
|
24
24
|
};
|
|
25
25
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
26
26
|
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
@@ -32,7 +32,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}
|
|
|
32
32
|
value: string | number;
|
|
33
33
|
ariaLabel: string;
|
|
34
34
|
ariaLabelledBy: string;
|
|
35
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {},
|
|
35
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
36
36
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
37
37
|
export default _default;
|
|
38
38
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as g, computed as f, openBlock as r, createElementBlock as h, Fragment as L, createElementVNode as v, mergeProps as S, withModifiers as V, normalizeClass as $, renderSlot as z, createBlock as x, createCommentVNode as C } from "vue";
|
|
2
|
+
import p from "./Icon/CheckIcon.vue.js";
|
|
3
3
|
import { COLOR as t } from "@geckou/ui-core";
|
|
4
|
-
const A = ["aria-checked", "aria-labelledby", "aria-label"],
|
|
4
|
+
const A = ["disabled", "data-checked", "aria-checked", "aria-labelledby", "aria-label"], G = ["name", "value", "disabled"], F = /* @__PURE__ */ g({
|
|
5
|
+
inheritAttrs: !1,
|
|
5
6
|
__name: "CheckBox",
|
|
6
7
|
props: {
|
|
7
8
|
name: {},
|
|
@@ -15,12 +16,12 @@ const A = ["aria-checked", "aria-labelledby", "aria-label"], E = ["name", "value
|
|
|
15
16
|
},
|
|
16
17
|
emits: ["update:modelValue"],
|
|
17
18
|
setup(e, { emit: B }) {
|
|
18
|
-
const D = B, l = e,
|
|
19
|
+
const D = B, l = e, d = f({
|
|
19
20
|
get: () => l.modelValue ?? !1,
|
|
20
21
|
set: (a) => D("update:modelValue", a)
|
|
21
|
-
}),
|
|
22
|
-
var o,
|
|
23
|
-
const a = l.isDisabled ? (o = l.cssStyle) == null ? void 0 : o.disabled : (
|
|
22
|
+
}), i = f(() => {
|
|
23
|
+
var o, s;
|
|
24
|
+
const a = l.isDisabled ? (o = l.cssStyle) == null ? void 0 : o.disabled : (s = l.cssStyle) == null ? void 0 : s.default;
|
|
24
25
|
return {
|
|
25
26
|
textColor: l.isDisabled ? t.darkGray : t.blue,
|
|
26
27
|
backgroundColor: l.isDisabled ? t.lightGray : t.white,
|
|
@@ -33,44 +34,45 @@ const A = ["aria-checked", "aria-labelledby", "aria-label"], E = ["name", "value
|
|
|
33
34
|
};
|
|
34
35
|
});
|
|
35
36
|
return (a, o) => {
|
|
36
|
-
var
|
|
37
|
-
return
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
37
|
+
var s, n, u, c, b, m, k, y;
|
|
38
|
+
return r(), h(L, null, [
|
|
39
|
+
v("button", S(a.$attrs, {
|
|
40
|
+
class: a.$style.check_box,
|
|
41
|
+
style: {
|
|
42
|
+
"--text-color": (s = i.value) == null ? void 0 : s.textColor,
|
|
43
|
+
"--border-color": (u = (n = i.value) == null ? void 0 : n.border) == null ? void 0 : u.color,
|
|
44
|
+
"--border-size": (b = (c = i.value) == null ? void 0 : c.border) == null ? void 0 : b.size,
|
|
45
|
+
"--radius-size": (k = (m = i.value) == null ? void 0 : m.border) == null ? void 0 : k.radius,
|
|
46
|
+
"--background-color": (y = i.value) == null ? void 0 : y.backgroundColor,
|
|
47
|
+
"--duration": e.isDisableAnimation ? "0s" : ".3s"
|
|
48
|
+
},
|
|
49
|
+
type: "button",
|
|
50
|
+
role: "checkbox",
|
|
51
|
+
disabled: e.isDisabled,
|
|
52
|
+
"data-checked": d.value,
|
|
53
|
+
"aria-checked": d.value,
|
|
54
|
+
"aria-labelledby": e.ariaLabelledBy,
|
|
55
|
+
"aria-label": e.ariaLabelledBy ? void 0 : e.ariaLabel ?? e.name,
|
|
56
|
+
onClick: o[0] || (o[0] = V((w) => e.isDisabled ? null : d.value = !d.value, ["stop"]))
|
|
57
|
+
}), [
|
|
58
|
+
v("div", {
|
|
59
|
+
class: $(a.$style.check_container)
|
|
60
|
+
}, [
|
|
61
|
+
z(a.$slots, "check"),
|
|
62
|
+
a.$slots.check ? C("", !0) : (r(), x(p, { key: 0 }))
|
|
63
|
+
], 2)
|
|
64
|
+
], 16, A),
|
|
65
|
+
d.value ? (r(), h("input", {
|
|
66
|
+
key: 0,
|
|
67
|
+
type: "hidden",
|
|
58
68
|
name: e.name,
|
|
59
|
-
value: e.value,
|
|
69
|
+
value: e.value ?? "on",
|
|
60
70
|
disabled: e.isDisabled
|
|
61
|
-
}, null, 8,
|
|
62
|
-
|
|
63
|
-
]),
|
|
64
|
-
C("div", {
|
|
65
|
-
class: h(a.$style.check_container)
|
|
66
|
-
}, [
|
|
67
|
-
p(a.$slots, "check"),
|
|
68
|
-
a.$slots.check ? w("", !0) : (v(), $(G, { key: 0 }))
|
|
69
|
-
], 2)
|
|
70
|
-
], 14, A);
|
|
71
|
+
}, null, 8, G)) : C("", !0)
|
|
72
|
+
], 64);
|
|
71
73
|
};
|
|
72
74
|
}
|
|
73
75
|
});
|
|
74
76
|
export {
|
|
75
|
-
|
|
77
|
+
F as default
|
|
76
78
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const c = "
|
|
1
|
+
const c = "_check_box_1flnz_15", _ = "_pop_1flnz_1", o = "_check_container_1flnz_42", n = {
|
|
2
2
|
check_box: c,
|
|
3
3
|
pop: _,
|
|
4
4
|
check_container: o
|
|
@@ -6,6 +6,6 @@ const c = "_check_box_1956i_15", _ = "_pop_1956i_1", o = "_check_container_1956i
|
|
|
6
6
|
export {
|
|
7
7
|
c as check_box,
|
|
8
8
|
o as check_container,
|
|
9
|
-
|
|
9
|
+
n as default,
|
|
10
10
|
_ as pop
|
|
11
11
|
};
|
|
@@ -9,6 +9,13 @@ type __VLS_Props = {
|
|
|
9
9
|
maxDate?: string;
|
|
10
10
|
size?: 'small' | 'medium';
|
|
11
11
|
type?: 'date' | 'month';
|
|
12
|
+
/**
|
|
13
|
+
* 年月日それぞれの読み上げ名の土台。「の年」「の月」「の日」を後ろに繋げる。
|
|
14
|
+
* 可視ラベルがあるなら ariaLabelledBy でその要素を指すこと。
|
|
15
|
+
* どちらも無いときだけ name を使う(機械名でも無いよりはマシ)
|
|
16
|
+
*/
|
|
17
|
+
ariaLabel?: string;
|
|
18
|
+
ariaLabelledBy?: string;
|
|
12
19
|
};
|
|
13
20
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
14
21
|
"update:modelValue": (newValue: string | null) => any;
|
|
@@ -17,6 +24,8 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
17
24
|
}>, {
|
|
18
25
|
isDisabled: boolean;
|
|
19
26
|
type: "date" | "month";
|
|
27
|
+
ariaLabel: string;
|
|
28
|
+
ariaLabelledBy: string;
|
|
20
29
|
size: "small" | "medium";
|
|
21
30
|
formValidationManager: FormValidationManager | null;
|
|
22
31
|
minDate: string;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { MESSAGES as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
1
|
+
import { defineComponent as I, ref as v, reactive as R, watch as D, onBeforeUnmount as N, openBlock as y, createBlock as O, normalizeClass as o, withCtx as z, createElementVNode as n, createVNode as M, withDirectives as b, vModelDynamic as P, vModelText as h, createTextVNode as S, createElementBlock as $, createCommentVNode as g, unref as B } from "vue";
|
|
2
|
+
import { MESSAGES as j, validateDateObject as T, splitDate as w, composeDateValue as A, formatDateValue as G } from "@geckou/ui-core";
|
|
3
|
+
import F from "./InputBox.vue.js";
|
|
4
|
+
import H from "./Icon/CalendarIcon.vue.js";
|
|
5
|
+
import J from "./ErrorMessage.vue.js";
|
|
6
|
+
import { nextUniqueId as K } from "../scripts/unique-id.js";
|
|
7
|
+
const Q = ["type", "name", "max", "min", "required", "disabled"], W = ["aria-label", "aria-labelledby", "disabled"], X = ["aria-label", "aria-labelledby", "disabled"], Y = { key: 0 }, Z = ["aria-label", "aria-labelledby", "disabled"], _ = ["id"], ee = ["id"], ae = ["id"], re = /* @__PURE__ */ I({
|
|
7
8
|
__name: "DatePicker",
|
|
8
9
|
props: {
|
|
9
10
|
name: {},
|
|
@@ -14,71 +15,73 @@ const F = ["type", "name", "max", "min", "required", "disabled"], H = ["aria-lab
|
|
|
14
15
|
minDate: { default: "" },
|
|
15
16
|
maxDate: { default: "" },
|
|
16
17
|
size: { default: "medium" },
|
|
17
|
-
type: { default: "date" }
|
|
18
|
+
type: { default: "date" },
|
|
19
|
+
ariaLabel: { default: void 0 },
|
|
20
|
+
ariaLabelledBy: { default: void 0 }
|
|
18
21
|
},
|
|
19
22
|
emits: ["update:modelValue"],
|
|
20
|
-
setup(t, { emit:
|
|
21
|
-
const
|
|
23
|
+
setup(t, { emit: x }) {
|
|
24
|
+
const L = x, q = v(null), l = t, u = K("date_picker_unit"), f = (e) => l.ariaLabelledBy ? void 0 : `${l.ariaLabel ?? l.name}の${e}`, c = (e) => l.ariaLabelledBy ? `${l.ariaLabelledBy} ${u}_${e}` : void 0, d = R({
|
|
22
25
|
year: "",
|
|
23
26
|
month: "",
|
|
24
27
|
day: ""
|
|
25
|
-
}), s =
|
|
28
|
+
}), s = v(""), r = v(""), m = (e) => {
|
|
26
29
|
l.formValidationManager && l.formValidationManager.setValid(l.name, e);
|
|
27
|
-
},
|
|
30
|
+
}, p = (e) => !e && l.isRequired ? { isValid: !1, message: j.required } : { isValid: !0, message: "" }, E = (e) => T(
|
|
28
31
|
{ year: e.year, month: e.month, day: e.day ?? "" },
|
|
29
32
|
{ type: l.type, isRequired: l.isRequired }
|
|
30
|
-
),
|
|
31
|
-
const { year: a, month: i, day:
|
|
32
|
-
d.year = a, d.month = i, d.day = l.type === "month" ? "" :
|
|
33
|
-
},
|
|
34
|
-
|
|
33
|
+
), V = (e) => {
|
|
34
|
+
const { year: a, month: i, day: C } = w(e);
|
|
35
|
+
d.year = a, d.month = i, d.day = l.type === "month" ? "" : C;
|
|
36
|
+
}, U = () => A({ ...d }, l.type);
|
|
37
|
+
D(
|
|
35
38
|
() => s.value,
|
|
36
39
|
(e) => {
|
|
37
|
-
|
|
38
|
-
const { isValid: a, message: i } =
|
|
39
|
-
|
|
40
|
+
V(e);
|
|
41
|
+
const { isValid: a, message: i } = p(e);
|
|
42
|
+
r.value = i, L("update:modelValue", e), m(a);
|
|
40
43
|
}
|
|
41
|
-
),
|
|
44
|
+
), D(
|
|
42
45
|
() => d,
|
|
43
46
|
(e) => {
|
|
44
|
-
const { isValid: a, message: i } =
|
|
45
|
-
|
|
47
|
+
const { isValid: a, message: i } = E(e);
|
|
48
|
+
r.value = i, m(a), a && (s.value = U());
|
|
46
49
|
},
|
|
47
50
|
{ deep: !0 }
|
|
48
51
|
);
|
|
49
|
-
const
|
|
52
|
+
const k = (e) => {
|
|
50
53
|
if (!e) {
|
|
51
|
-
s.value = "",
|
|
54
|
+
s.value = "", V(""), r.value = "", m(p("").isValid);
|
|
52
55
|
return;
|
|
53
56
|
}
|
|
54
|
-
const a =
|
|
55
|
-
!a || a === s.value || (s.value = a,
|
|
57
|
+
const a = G(e, l.type);
|
|
58
|
+
!a || a === s.value || (s.value = a, V(a));
|
|
56
59
|
};
|
|
57
|
-
return
|
|
60
|
+
return D(
|
|
58
61
|
() => l.modelValue,
|
|
59
|
-
(e) =>
|
|
60
|
-
),
|
|
62
|
+
(e) => k(e)
|
|
63
|
+
), k(l.modelValue), m(p(s.value).isValid), N(() => {
|
|
61
64
|
var e;
|
|
62
65
|
return (e = l.formValidationManager) == null ? void 0 : e.remove(l.name);
|
|
63
|
-
}), (e, a) => (
|
|
66
|
+
}), (e, a) => (y(), O(F, {
|
|
64
67
|
isDisabled: t.isDisabled,
|
|
65
|
-
class:
|
|
68
|
+
class: o([
|
|
66
69
|
e.$style.date_picker,
|
|
67
70
|
e.$style[t.size],
|
|
68
71
|
{ [e.$style.is_disabled]: t.isDisabled }
|
|
69
72
|
]),
|
|
70
|
-
isErrored: !!
|
|
73
|
+
isErrored: !!r.value
|
|
71
74
|
}, {
|
|
72
|
-
default:
|
|
73
|
-
|
|
74
|
-
class:
|
|
75
|
+
default: z(() => [
|
|
76
|
+
n("div", {
|
|
77
|
+
class: o(e.$style.date_input)
|
|
75
78
|
}, [
|
|
76
|
-
|
|
77
|
-
class:
|
|
79
|
+
M(H, {
|
|
80
|
+
class: o(e.$style.icon)
|
|
78
81
|
}, null, 8, ["class"]),
|
|
79
|
-
|
|
82
|
+
b(n("input", {
|
|
80
83
|
ref_key: "datePicker",
|
|
81
|
-
ref:
|
|
84
|
+
ref: q,
|
|
82
85
|
"onUpdate:modelValue": a[0] || (a[0] = (i) => s.value = i),
|
|
83
86
|
type: t.type,
|
|
84
87
|
name: t.name,
|
|
@@ -86,46 +89,63 @@ const F = ["type", "name", "max", "min", "required", "disabled"], H = ["aria-lab
|
|
|
86
89
|
min: t.minDate,
|
|
87
90
|
required: t.isRequired,
|
|
88
91
|
disabled: t.isDisabled
|
|
89
|
-
}, null, 8,
|
|
90
|
-
[
|
|
92
|
+
}, null, 8, Q), [
|
|
93
|
+
[P, s.value]
|
|
91
94
|
])
|
|
92
95
|
], 2),
|
|
93
|
-
|
|
96
|
+
b(n("input", {
|
|
94
97
|
"onUpdate:modelValue": a[1] || (a[1] = (i) => d.year = i),
|
|
95
98
|
placeholder: "年",
|
|
96
|
-
"aria-label":
|
|
99
|
+
"aria-label": f("年"),
|
|
100
|
+
"aria-labelledby": c("年"),
|
|
97
101
|
maxlength: "4",
|
|
98
102
|
type: "text",
|
|
99
103
|
disabled: t.isDisabled,
|
|
100
|
-
class:
|
|
101
|
-
}, null, 10,
|
|
102
|
-
[
|
|
104
|
+
class: o(e.$style.year)
|
|
105
|
+
}, null, 10, W), [
|
|
106
|
+
[h, d.year]
|
|
103
107
|
]),
|
|
104
|
-
a[4] || (a[4] =
|
|
105
|
-
|
|
108
|
+
a[4] || (a[4] = S("/ ", -1)),
|
|
109
|
+
b(n("input", {
|
|
106
110
|
"onUpdate:modelValue": a[2] || (a[2] = (i) => d.month = i),
|
|
107
111
|
placeholder: "月",
|
|
108
|
-
"aria-label":
|
|
112
|
+
"aria-label": f("月"),
|
|
113
|
+
"aria-labelledby": c("月"),
|
|
109
114
|
maxlength: "2",
|
|
110
115
|
type: "text",
|
|
111
116
|
disabled: t.isDisabled
|
|
112
|
-
}, null, 8,
|
|
113
|
-
[
|
|
117
|
+
}, null, 8, X), [
|
|
118
|
+
[h, d.month]
|
|
114
119
|
]),
|
|
115
|
-
t.type === "date" ? (
|
|
116
|
-
t.type === "date" ?
|
|
120
|
+
t.type === "date" ? (y(), $("span", Y, "/")) : g("", !0),
|
|
121
|
+
t.type === "date" ? b((y(), $("input", {
|
|
117
122
|
key: 1,
|
|
118
123
|
"onUpdate:modelValue": a[3] || (a[3] = (i) => d.day = i),
|
|
119
124
|
placeholder: "日",
|
|
120
|
-
"aria-label":
|
|
125
|
+
"aria-label": f("日"),
|
|
126
|
+
"aria-labelledby": c("日"),
|
|
121
127
|
maxlength: "2",
|
|
122
128
|
type: "text",
|
|
123
129
|
disabled: t.isDisabled
|
|
124
|
-
}, null, 8,
|
|
125
|
-
[
|
|
126
|
-
]) :
|
|
127
|
-
|
|
128
|
-
|
|
130
|
+
}, null, 8, Z)), [
|
|
131
|
+
[h, d.day]
|
|
132
|
+
]) : g("", !0),
|
|
133
|
+
t.ariaLabelledBy ? (y(), $("span", {
|
|
134
|
+
key: 2,
|
|
135
|
+
class: o(e.$style.unit_labels)
|
|
136
|
+
}, [
|
|
137
|
+
n("span", {
|
|
138
|
+
id: `${B(u)}_年`
|
|
139
|
+
}, "の年", 8, _),
|
|
140
|
+
n("span", {
|
|
141
|
+
id: `${B(u)}_月`
|
|
142
|
+
}, "の月", 8, ee),
|
|
143
|
+
n("span", {
|
|
144
|
+
id: `${B(u)}_日`
|
|
145
|
+
}, "の日", 8, ae)
|
|
146
|
+
], 2)) : g("", !0),
|
|
147
|
+
M(J, {
|
|
148
|
+
errorMessages: r.value ? [r.value] : []
|
|
129
149
|
}, null, 8, ["errorMessages"])
|
|
130
150
|
]),
|
|
131
151
|
_: 1
|
|
@@ -133,5 +153,5 @@ const F = ["type", "name", "max", "min", "required", "disabled"], H = ["aria-lab
|
|
|
133
153
|
}
|
|
134
154
|
});
|
|
135
155
|
export {
|
|
136
|
-
|
|
156
|
+
re as default
|
|
137
157
|
};
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
const _ = "
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
const _ = "_unit_labels_1r4fv_1", t = "_icon_1r4fv_13", e = "_date_input_1r4fv_26", a = "_date_picker_1r4fv_46", n = "_year_1r4fv_57", s = "_small_1r4fv_63", l = {
|
|
2
|
+
unit_labels: _,
|
|
3
|
+
icon: t,
|
|
4
|
+
date_input: e,
|
|
5
|
+
date_picker: a,
|
|
6
|
+
year: n,
|
|
7
|
+
small: s
|
|
7
8
|
};
|
|
8
9
|
export {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
e as date_input,
|
|
11
|
+
a as date_picker,
|
|
12
|
+
l as default,
|
|
13
|
+
t as icon,
|
|
14
|
+
s as small,
|
|
15
|
+
_ as unit_labels,
|
|
16
|
+
n as year
|
|
15
17
|
};
|
|
@@ -8,6 +8,13 @@ type __VLS_Props = {
|
|
|
8
8
|
/** 選べる年の下限・上限。既定は「今年 -100 〜 今年 -14」(生年月日向け) */
|
|
9
9
|
minYear?: number;
|
|
10
10
|
maxYear?: number;
|
|
11
|
+
/**
|
|
12
|
+
* 年月日それぞれの読み上げ名の土台。「の年」「の月」「の日」を後ろに繋げる。
|
|
13
|
+
* 可視ラベルがあるなら ariaLabelledBy でその要素を指すこと。
|
|
14
|
+
* どちらも無いときだけ name を使う(機械名でも無いよりはマシ)
|
|
15
|
+
*/
|
|
16
|
+
ariaLabel?: string;
|
|
17
|
+
ariaLabelledBy?: string;
|
|
11
18
|
};
|
|
12
19
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
13
20
|
"update:modelValue": (newValue: string) => any;
|
|
@@ -15,6 +22,8 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
15
22
|
"onUpdate:modelValue"?: ((newValue: string) => any) | undefined;
|
|
16
23
|
}>, {
|
|
17
24
|
type: "date" | "month";
|
|
25
|
+
ariaLabel: string;
|
|
26
|
+
ariaLabelledBy: string;
|
|
18
27
|
formValidationManager: FormValidationManager | null;
|
|
19
28
|
minYear: number;
|
|
20
29
|
maxYear: number;
|