@geckou/ui-vue 0.5.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 +76 -2
- package/dist/_virtual/_plugin-vue_export-helper.js +9 -0
- package/dist/components/ArticleList/Card/Artistic.vue.js +9 -0
- package/dist/components/ArticleList/Card/Artistic.vue2.js +105 -0
- package/dist/components/ArticleList/Card/Artistic.vue3.js +27 -0
- package/dist/components/ArticleList/Card/Entertainment.vue.js +9 -0
- package/dist/components/ArticleList/Card/Entertainment.vue2.js +120 -0
- package/dist/components/ArticleList/Card/Entertainment.vue3.js +31 -0
- package/dist/components/ArticleList/Card/Gallery.vue.js +9 -0
- package/dist/components/ArticleList/Card/Gallery.vue2.js +103 -0
- package/dist/components/ArticleList/Card/Gallery.vue3.js +23 -0
- package/dist/components/ArticleList/Card/Grid.vue.js +9 -0
- package/dist/components/ArticleList/Card/Grid.vue2.js +114 -0
- package/dist/components/ArticleList/Card/Grid.vue3.js +25 -0
- package/dist/components/ArticleList/Card/News.vue.js +9 -0
- package/dist/components/ArticleList/Card/News.vue2.js +95 -0
- package/dist/components/ArticleList/Card/News.vue3.js +19 -0
- package/dist/components/ArticleList/Card/Rounded.vue.js +9 -0
- package/dist/components/ArticleList/Card/Rounded.vue2.js +96 -0
- package/dist/components/ArticleList/Card/Rounded.vue3.js +15 -0
- package/dist/components/ArticleList/Card/Row.vue.js +9 -0
- package/dist/components/ArticleList/Card/Row.vue2.js +97 -0
- package/dist/components/ArticleList/Card/Row.vue3.js +17 -0
- package/dist/components/ArticleList/Card/Simple.vue.js +9 -0
- package/dist/components/ArticleList/Card/Simple.vue2.js +98 -0
- package/dist/components/ArticleList/Card/Simple.vue3.js +23 -0
- package/dist/components/ArticleList/Card/Standard.vue.js +9 -0
- package/dist/components/ArticleList/Card/Standard.vue2.js +93 -0
- package/dist/components/ArticleList/Card/Standard.vue3.js +21 -0
- package/dist/components/ArticleList/Card/Tile.vue.js +9 -0
- package/dist/components/ArticleList/Card/Tile.vue2.js +96 -0
- package/dist/components/ArticleList/Card/Tile.vue3.js +23 -0
- package/dist/components/ArticleList/GenericArticleList.vue.js +9 -0
- package/dist/components/ArticleList/GenericArticleList.vue2.js +72 -0
- package/dist/components/ArticleList/GenericArticleList.vue3.js +11 -0
- package/dist/components/ArticleList/List/Artistic.vue.js +22 -0
- package/dist/components/ArticleList/List/Artistic.vue2.js +4 -0
- package/dist/components/ArticleList/List/Entertainment.vue.js +22 -0
- package/dist/components/ArticleList/List/Entertainment.vue2.js +4 -0
- package/dist/components/ArticleList/List/Gallery.vue.js +22 -0
- package/dist/components/ArticleList/List/Gallery.vue2.js +4 -0
- package/dist/components/ArticleList/List/Grid.vue.js +9 -0
- package/dist/components/ArticleList/List/Grid.vue2.js +120 -0
- package/dist/components/ArticleList/List/Grid.vue3.js +9 -0
- package/dist/components/ArticleList/List/News.vue.js +22 -0
- package/dist/components/ArticleList/List/News.vue2.js +4 -0
- package/dist/components/ArticleList/List/Rounded.vue.js +22 -0
- package/dist/components/ArticleList/List/Rounded.vue2.js +4 -0
- package/dist/components/ArticleList/List/Row.vue.js +22 -0
- package/dist/components/ArticleList/List/Row.vue2.js +4 -0
- package/dist/components/ArticleList/List/Simple.vue.js +22 -0
- package/dist/components/ArticleList/List/Simple.vue2.js +4 -0
- package/dist/components/ArticleList/List/Standard.vue.js +22 -0
- package/dist/components/ArticleList/List/Standard.vue2.js +4 -0
- package/dist/components/ArticleList/List/Tile.vue.js +22 -0
- package/dist/components/ArticleList/List/Tile.vue2.js +4 -0
- package/dist/components/ArticleList/Parts/AuthorInfo.vue.js +9 -0
- package/dist/components/ArticleList/Parts/AuthorInfo.vue2.js +64 -0
- package/dist/components/ArticleList/Parts/AuthorInfo.vue3.js +11 -0
- package/dist/components/ArticleList/Parts/CardContainer.vue.js +9 -0
- package/dist/components/ArticleList/Parts/CardContainer.vue2.js +18 -0
- package/dist/components/ArticleList/Parts/CardContainer.vue3.js +7 -0
- package/dist/components/ArticleList/Parts/CardHeading.vue.d.ts +6 -1
- package/dist/components/ArticleList/Parts/CardHeading.vue.js +9 -0
- package/dist/components/ArticleList/Parts/CardHeading.vue2.js +25 -0
- package/dist/components/ArticleList/Parts/CardHeading.vue3.js +7 -0
- package/dist/components/ArticleList/Parts/CategoryList.vue.js +38 -0
- package/dist/components/ArticleList/Parts/CategoryList.vue2.js +4 -0
- package/dist/components/ArticleList/Parts/ExcerptText.vue.js +9 -0
- package/dist/components/ArticleList/Parts/ExcerptText.vue2.js +24 -0
- package/dist/components/ArticleList/Parts/ExcerptText.vue3.js +7 -0
- package/dist/components/ArticleList/Parts/MetadataList.vue.js +9 -0
- package/dist/components/ArticleList/Parts/MetadataList.vue2.js +62 -0
- package/dist/components/ArticleList/Parts/MetadataList.vue3.js +17 -0
- package/dist/components/ArticleList/Parts/NoImage.vue.js +9 -0
- package/dist/components/ArticleList/Parts/NoImage.vue2.js +16 -0
- package/dist/components/ArticleList/Parts/NoImage.vue3.js +7 -0
- package/dist/components/ArticleList/Parts/PostedDate.vue.js +9 -0
- package/dist/components/ArticleList/Parts/PostedDate.vue2.js +28 -0
- package/dist/components/ArticleList/Parts/PostedDate.vue3.js +7 -0
- package/dist/components/ArticleList/Parts/TagList.vue.js +32 -0
- package/dist/components/ArticleList/Parts/TagList.vue2.js +4 -0
- package/dist/components/ArticleList/Parts/ThumbnailImage.vue.js +9 -0
- package/dist/components/ArticleList/Parts/ThumbnailImage.vue2.js +50 -0
- package/dist/components/ArticleList/Parts/ThumbnailImage.vue3.js +7 -0
- package/dist/components/BasicButton.vue.js +9 -0
- package/dist/components/BasicButton.vue2.js +71 -0
- package/dist/components/BasicButton.vue3.js +11 -0
- package/dist/components/CheckBox.vue.d.ts +10 -2
- package/dist/components/CheckBox.vue.js +9 -0
- package/dist/components/CheckBox.vue2.js +78 -0
- package/dist/components/CheckBox.vue3.js +11 -0
- package/dist/components/CheckBoxes.vue.js +9 -0
- package/dist/components/CheckBoxes.vue2.js +104 -0
- package/dist/components/CheckBoxes.vue3.js +7 -0
- package/dist/components/CheckButton.vue.js +9 -0
- package/dist/components/CheckButton.vue2.js +54 -0
- package/dist/components/CheckButton.vue3.js +11 -0
- package/dist/components/DatePicker.vue.d.ts +9 -0
- package/dist/components/DatePicker.vue.js +9 -0
- package/dist/components/DatePicker.vue2.js +157 -0
- package/dist/components/DatePicker.vue3.js +17 -0
- package/dist/components/DateRangePicker.vue.js +9 -0
- package/dist/components/DateRangePicker.vue2.js +74 -0
- package/dist/components/DateRangePicker.vue3.js +9 -0
- package/dist/components/DateSelector.vue.d.ts +14 -0
- package/dist/components/DateSelector.vue.js +9 -0
- package/dist/components/DateSelector.vue2.js +194 -0
- package/dist/components/DateSelector.vue3.js +15 -0
- package/dist/components/DropdownUi.vue.d.ts +1 -0
- package/dist/components/DropdownUi.vue.js +9 -0
- package/dist/components/DropdownUi.vue2.js +65 -0
- package/dist/components/DropdownUi.vue3.js +15 -0
- package/dist/components/ErrorMessage.vue.js +9 -0
- package/dist/components/ErrorMessage.vue2.js +30 -0
- package/dist/components/ErrorMessage.vue3.js +7 -0
- package/dist/components/Icon/CalendarIcon.vue.js +15 -0
- package/dist/components/Icon/CheckIcon.vue.js +15 -0
- package/dist/components/Icon/CloseIcon.vue.js +15 -0
- package/dist/components/Icon/Folder.vue.js +15 -0
- package/dist/components/Icon/Image.vue.js +21 -0
- package/dist/components/Icon/KeyboardArrowDownIcon.vue.js +15 -0
- package/dist/components/Icon/Tag.vue.js +15 -0
- package/dist/components/InputBox.vue.js +9 -0
- package/dist/components/InputBox.vue2.js +62 -0
- package/dist/components/InputBox.vue3.js +7 -0
- package/dist/components/InputGroup.vue.js +17 -0
- package/dist/components/InputGroup.vue2.js +7 -0
- package/dist/components/LabeledCheckbox.vue.js +9 -0
- package/dist/components/LabeledCheckbox.vue2.js +60 -0
- package/dist/components/LabeledCheckbox.vue3.js +9 -0
- package/dist/components/LabeledFieldset.vue.js +9 -0
- package/dist/components/LabeledFieldset.vue2.js +29 -0
- package/dist/components/LabeledFieldset.vue3.js +11 -0
- package/dist/components/LoadingSpinner.vue.js +15 -0
- package/dist/components/ModalBox.vue.d.ts +22 -16
- package/dist/components/ModalBox.vue.js +9 -0
- package/dist/components/ModalBox.vue2.js +91 -0
- package/dist/components/ModalBox.vue3.js +23 -0
- package/dist/components/PopupBox.vue.js +9 -0
- package/dist/components/PopupBox.vue2.js +35 -0
- package/dist/components/PopupBox.vue3.js +15 -0
- package/dist/components/RadioButtons.vue.js +9 -0
- package/dist/components/RadioButtons.vue2.js +75 -0
- package/dist/components/RadioButtons.vue3.js +11 -0
- package/dist/components/SelectBox.vue.js +9 -0
- package/dist/components/SelectBox.vue2.js +109 -0
- package/dist/components/SelectBox.vue3.js +9 -0
- package/dist/components/SlideDownUi.vue.js +9 -0
- package/dist/components/SlideDownUi.vue2.js +66 -0
- package/dist/components/SlideDownUi.vue3.js +17 -0
- package/dist/components/TabUI.vue.d.ts +0 -18
- package/dist/components/TabUI.vue.js +9 -0
- package/dist/components/TabUI.vue2.js +77 -0
- package/dist/components/TabUI.vue3.js +9 -0
- package/dist/components/TextArea.vue.js +9 -0
- package/dist/components/TextArea.vue2.js +82 -0
- package/dist/components/TextArea.vue3.js +7 -0
- package/dist/components/TextBox.vue.js +9 -0
- package/dist/components/TextBox.vue2.js +76 -0
- package/dist/components/TextBox.vue3.js +7 -0
- package/dist/components/TextButton.vue.js +9 -0
- package/dist/components/TextButton.vue2.js +24 -0
- package/dist/components/TextButton.vue3.js +7 -0
- package/dist/components/ToggleButton.vue.d.ts +13 -10
- package/dist/components/ToggleButton.vue.js +9 -0
- package/dist/components/ToggleButton.vue2.js +96 -0
- package/dist/components/ToggleButton.vue3.js +13 -0
- package/dist/const/list-theme.js +65 -0
- package/dist/index.js +112 -3513
- package/dist/scripts/form-validation-manager.js +38 -0
- package/dist/scripts/unique-id.d.ts +4 -0
- package/dist/scripts/unique-id.js +9 -0
- package/dist/scripts/use-click-outside.js +13 -0
- package/dist/scripts/utils.js +21 -0
- package/dist/style.css +1 -1
- package/package.json +8 -5
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { defineComponent as K, computed as M, openBlock as A, createElementBlock as P, normalizeClass as F, normalizeStyle as Q, unref as l, withDirectives as U, createElementVNode as H, renderSlot as J, createBlock as W, vShow as X } from "vue";
|
|
2
|
+
import Y from "./LoadingSpinner.vue.js";
|
|
3
|
+
import { COLOR as s } from "@geckou/ui-core";
|
|
4
|
+
const Z = ["type", "disabled"], ro = /* @__PURE__ */ K({
|
|
5
|
+
__name: "BasicButton",
|
|
6
|
+
props: {
|
|
7
|
+
cssStyle: {},
|
|
8
|
+
duration: {},
|
|
9
|
+
isLoading: { type: Boolean },
|
|
10
|
+
isDisabled: { type: Boolean },
|
|
11
|
+
buttonType: {}
|
|
12
|
+
},
|
|
13
|
+
setup(r) {
|
|
14
|
+
var i;
|
|
15
|
+
const d = r, o = M(() => {
|
|
16
|
+
var n, t;
|
|
17
|
+
const e = d.isDisabled ? (n = d.cssStyle) == null ? void 0 : n.disabled : (t = d.cssStyle) == null ? void 0 : t.default;
|
|
18
|
+
return {
|
|
19
|
+
textColor: s.white,
|
|
20
|
+
backgroundColor: d.isDisabled ? s.darkGray : s.blue,
|
|
21
|
+
backgroundImage: "none",
|
|
22
|
+
border: {
|
|
23
|
+
color: d.isDisabled ? s.darkGray : s.blue,
|
|
24
|
+
size: "1px",
|
|
25
|
+
radius: ".25rem"
|
|
26
|
+
},
|
|
27
|
+
boxShadow: "0 0 0 0 transparent",
|
|
28
|
+
...e
|
|
29
|
+
};
|
|
30
|
+
}), a = ((i = d.cssStyle) == null ? void 0 : i.hover) || {};
|
|
31
|
+
return (e, n) => {
|
|
32
|
+
var t, u, b, c, g, v, m, y, h, k, S, C, f, z, p, w, x, $, B, D, L, I, E, G, O, T, N, R, V, j, q;
|
|
33
|
+
return A(), P("button", {
|
|
34
|
+
class: F([e.$style.button, { [e.$style.loading]: r.isLoading }]),
|
|
35
|
+
style: Q({
|
|
36
|
+
"--text-color": (t = o.value) == null ? void 0 : t.textColor,
|
|
37
|
+
"--background-color": (u = o.value) == null ? void 0 : u.backgroundColor,
|
|
38
|
+
"--background-image": (b = o.value) == null ? void 0 : b.backgroundImage,
|
|
39
|
+
"--border-color": (g = (c = o.value) == null ? void 0 : c.border) == null ? void 0 : g.color,
|
|
40
|
+
"--border-size": (m = (v = o.value) == null ? void 0 : v.border) == null ? void 0 : m.size,
|
|
41
|
+
"--radius-size": (h = (y = o.value) == null ? void 0 : y.border) == null ? void 0 : h.radius,
|
|
42
|
+
"--box-shadow": (k = o.value) == null ? void 0 : k.boxShadow,
|
|
43
|
+
"--hover-text-color": ((S = l(a)) == null ? void 0 : S.textColor) || ((C = o.value) == null ? void 0 : C.textColor),
|
|
44
|
+
"--hover-background-color": ((f = l(a)) == null ? void 0 : f.backgroundColor) || ((z = o.value) == null ? void 0 : z.backgroundColor) && `${(p = o.value) == null ? void 0 : p.backgroundColor}cc`,
|
|
45
|
+
"--hover-background-image": ((w = l(a)) == null ? void 0 : w.backgroundImage) || ((x = o.value) == null ? void 0 : x.backgroundImage),
|
|
46
|
+
"--hover-border-color": ((B = ($ = l(a)) == null ? void 0 : $.border) == null ? void 0 : B.color) || ((L = (D = o.value) == null ? void 0 : D.border) == null ? void 0 : L.color),
|
|
47
|
+
"--hover-border-size": ((E = (I = l(a)) == null ? void 0 : I.border) == null ? void 0 : E.size) || ((O = (G = o.value) == null ? void 0 : G.border) == null ? void 0 : O.size),
|
|
48
|
+
"--hover-radius-size": ((N = (T = l(a)) == null ? void 0 : T.border) == null ? void 0 : N.radius) || ((V = (R = o.value) == null ? void 0 : R.border) == null ? void 0 : V.radius),
|
|
49
|
+
"--hover-box-shadow": ((j = l(a)) == null ? void 0 : j.boxShadow) || ((q = o.value) == null ? void 0 : q.boxShadow),
|
|
50
|
+
"--duration": `${r.duration || 0.3}s`
|
|
51
|
+
}),
|
|
52
|
+
type: r.buttonType || "button",
|
|
53
|
+
disabled: r.isDisabled || r.isLoading
|
|
54
|
+
}, [
|
|
55
|
+
U(H("div", {
|
|
56
|
+
class: F(e.$style.loading_animation)
|
|
57
|
+
}, [
|
|
58
|
+
e.$slots.loading ? J(e.$slots, "loading", {}, void 0, void 0, 0) : (A(), W(Y, { key: 1 }))
|
|
59
|
+
], 2), [
|
|
60
|
+
[X, r.isLoading]
|
|
61
|
+
]),
|
|
62
|
+
H("div", null, [
|
|
63
|
+
J(e.$slots, "default")
|
|
64
|
+
])
|
|
65
|
+
], 14, Z);
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
export {
|
|
70
|
+
ro as default
|
|
71
|
+
};
|
|
@@ -7,6 +7,12 @@ type __VLS_Props = {
|
|
|
7
7
|
isDisabled?: boolean;
|
|
8
8
|
cssStyle?: CheckBoxStyleForEachStatus;
|
|
9
9
|
isDisableAnimation?: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* アクセシブル名。可視ラベルがあるなら ariaLabelledBy でその要素を指すこと。
|
|
12
|
+
* どちらも無いときだけ name を名前として使う(機械名でも無いよりはマシ)
|
|
13
|
+
*/
|
|
14
|
+
ariaLabel?: string;
|
|
15
|
+
ariaLabelledBy?: string;
|
|
10
16
|
};
|
|
11
17
|
declare function __VLS_template(): {
|
|
12
18
|
attrs: Partial<{}>;
|
|
@@ -14,7 +20,7 @@ declare function __VLS_template(): {
|
|
|
14
20
|
check?(_: {}): any;
|
|
15
21
|
};
|
|
16
22
|
refs: {};
|
|
17
|
-
rootEl:
|
|
23
|
+
rootEl: any;
|
|
18
24
|
};
|
|
19
25
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
20
26
|
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
@@ -24,7 +30,9 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}
|
|
|
24
30
|
}>, {
|
|
25
31
|
cssStyle: CheckBoxStyleForEachStatus;
|
|
26
32
|
value: string | number;
|
|
27
|
-
|
|
33
|
+
ariaLabel: string;
|
|
34
|
+
ariaLabelledBy: string;
|
|
35
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
28
36
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
29
37
|
export default _default;
|
|
30
38
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
@@ -0,0 +1,78 @@
|
|
|
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
|
+
import { COLOR as t } from "@geckou/ui-core";
|
|
4
|
+
const A = ["disabled", "data-checked", "aria-checked", "aria-labelledby", "aria-label"], G = ["name", "value", "disabled"], F = /* @__PURE__ */ g({
|
|
5
|
+
inheritAttrs: !1,
|
|
6
|
+
__name: "CheckBox",
|
|
7
|
+
props: {
|
|
8
|
+
name: {},
|
|
9
|
+
value: { default: void 0 },
|
|
10
|
+
modelValue: { type: Boolean },
|
|
11
|
+
isDisabled: { type: Boolean },
|
|
12
|
+
cssStyle: { default: void 0 },
|
|
13
|
+
isDisableAnimation: { type: Boolean },
|
|
14
|
+
ariaLabel: { default: void 0 },
|
|
15
|
+
ariaLabelledBy: { default: void 0 }
|
|
16
|
+
},
|
|
17
|
+
emits: ["update:modelValue"],
|
|
18
|
+
setup(e, { emit: B }) {
|
|
19
|
+
const D = B, l = e, d = f({
|
|
20
|
+
get: () => l.modelValue ?? !1,
|
|
21
|
+
set: (a) => D("update:modelValue", a)
|
|
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;
|
|
25
|
+
return {
|
|
26
|
+
textColor: l.isDisabled ? t.darkGray : t.blue,
|
|
27
|
+
backgroundColor: l.isDisabled ? t.lightGray : t.white,
|
|
28
|
+
border: {
|
|
29
|
+
color: l.isDisabled ? t.darkGray : t.blue,
|
|
30
|
+
size: "1px",
|
|
31
|
+
radius: ".25rem"
|
|
32
|
+
},
|
|
33
|
+
...a
|
|
34
|
+
};
|
|
35
|
+
});
|
|
36
|
+
return (a, o) => {
|
|
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",
|
|
68
|
+
name: e.name,
|
|
69
|
+
value: e.value ?? "on",
|
|
70
|
+
disabled: e.isDisabled
|
|
71
|
+
}, null, 8, G)) : C("", !0)
|
|
72
|
+
], 64);
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
export {
|
|
77
|
+
F as default
|
|
78
|
+
};
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { defineComponent as V, ref as k, computed as E, watch as m, openBlock as i, createElementBlock as y, normalizeClass as q, Fragment as M, renderList as x, createBlock as B, createVNode as D } from "vue";
|
|
2
|
+
import { COLOR as v, MESSAGES as _ } from "@geckou/ui-core";
|
|
3
|
+
import A from "./LabeledCheckbox.vue.js";
|
|
4
|
+
import L from "./ErrorMessage.vue.js";
|
|
5
|
+
const F = /* @__PURE__ */ V({
|
|
6
|
+
__name: "CheckBoxes",
|
|
7
|
+
props: {
|
|
8
|
+
name: {},
|
|
9
|
+
options: {},
|
|
10
|
+
modelValue: { default: void 0 },
|
|
11
|
+
isDisabled: { type: Boolean },
|
|
12
|
+
isRequired: { type: Boolean },
|
|
13
|
+
cssStyle: { default: void 0 }
|
|
14
|
+
},
|
|
15
|
+
emits: ["update:modelValue"],
|
|
16
|
+
setup(p, { emit: g }) {
|
|
17
|
+
var b, f;
|
|
18
|
+
const S = g, a = p, s = k(
|
|
19
|
+
a.options.map((e) => {
|
|
20
|
+
var r;
|
|
21
|
+
return {
|
|
22
|
+
value: e.value,
|
|
23
|
+
label: e.label,
|
|
24
|
+
checked: ((r = a.modelValue) == null ? void 0 : r.includes(e.value)) || !1
|
|
25
|
+
};
|
|
26
|
+
})
|
|
27
|
+
), c = E(
|
|
28
|
+
() => s.value.filter((e) => e.checked).map((e) => e.value)
|
|
29
|
+
), n = k(""), C = () => n.value = a.isRequired && c.value.length === 0 ? _.required : "";
|
|
30
|
+
m(
|
|
31
|
+
c,
|
|
32
|
+
(e, r) => {
|
|
33
|
+
r && ((l, u) => l.length === u.length && l.every((o, d) => o === u[d]))(e, r) || (C(), S("update:modelValue", e));
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
deep: !0,
|
|
37
|
+
immediate: !!((b = a.modelValue) != null && b.length)
|
|
38
|
+
}
|
|
39
|
+
), m(
|
|
40
|
+
() => a.modelValue,
|
|
41
|
+
(e) => {
|
|
42
|
+
e && s.value.forEach(
|
|
43
|
+
(r) => r.checked = e.includes(r.value)
|
|
44
|
+
);
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
deep: !0,
|
|
48
|
+
immediate: !0
|
|
49
|
+
}
|
|
50
|
+
), m(
|
|
51
|
+
() => a.options,
|
|
52
|
+
(e) => {
|
|
53
|
+
if (e.length === s.value.length && e.every(
|
|
54
|
+
(l, u) => {
|
|
55
|
+
var o, d;
|
|
56
|
+
return l.value === ((o = s.value[u]) == null ? void 0 : o.value) && l.label === ((d = s.value[u]) == null ? void 0 : d.label);
|
|
57
|
+
}
|
|
58
|
+
))
|
|
59
|
+
return;
|
|
60
|
+
const t = new Set(c.value);
|
|
61
|
+
s.value = e.map((l) => ({
|
|
62
|
+
value: l.value,
|
|
63
|
+
label: l.label,
|
|
64
|
+
checked: a.modelValue ? a.modelValue.includes(l.value) : t.has(l.value)
|
|
65
|
+
}));
|
|
66
|
+
},
|
|
67
|
+
{ deep: !0 }
|
|
68
|
+
);
|
|
69
|
+
const h = {
|
|
70
|
+
...((f = a.cssStyle) == null ? void 0 : f.error) ?? {},
|
|
71
|
+
textColor: v.white,
|
|
72
|
+
backgroundColor: v.red,
|
|
73
|
+
border: {
|
|
74
|
+
color: v.red,
|
|
75
|
+
size: "1px",
|
|
76
|
+
radius: ".25rem"
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
return (e, r) => (i(), y("div", {
|
|
80
|
+
class: q(e.$style.check_boxes)
|
|
81
|
+
}, [
|
|
82
|
+
(i(!0), y(M, null, x(s.value, (t, l) => (i(), B(A, {
|
|
83
|
+
key: t.value,
|
|
84
|
+
modelValue: s.value[l].checked,
|
|
85
|
+
"onUpdate:modelValue": (u) => s.value[l].checked = u,
|
|
86
|
+
name: p.name,
|
|
87
|
+
value: t.value,
|
|
88
|
+
label: t.label,
|
|
89
|
+
isDisabled: a.isDisabled,
|
|
90
|
+
cssStyle: a.cssStyle
|
|
91
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "name", "value", "label", "isDisabled", "cssStyle"]))), 128)),
|
|
92
|
+
D(L, {
|
|
93
|
+
errorMessages: n.value ? [n.value] : [],
|
|
94
|
+
cssStyle: {
|
|
95
|
+
textColor: h.textColor,
|
|
96
|
+
backgroundColor: h.backgroundColor
|
|
97
|
+
}
|
|
98
|
+
}, null, 8, ["errorMessages", "cssStyle"])
|
|
99
|
+
], 2));
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
export {
|
|
103
|
+
F as default
|
|
104
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { defineComponent as C, ref as V, computed as B, watch as b, openBlock as k, createElementBlock as D, normalizeClass as f, normalizeStyle as S, withDirectives as z, createElementVNode as p, vModelCheckbox as $, renderSlot as g, createBlock as w, createCommentVNode as x } from "vue";
|
|
2
|
+
import A from "./Icon/CheckIcon.vue.js";
|
|
3
|
+
const E = ["name", "disabled"], M = /* @__PURE__ */ C({
|
|
4
|
+
__name: "CheckButton",
|
|
5
|
+
props: {
|
|
6
|
+
name: {},
|
|
7
|
+
modelValue: { type: Boolean },
|
|
8
|
+
isDisabled: { type: Boolean },
|
|
9
|
+
cssStyle: { default: () => ({ default: {} }) },
|
|
10
|
+
isDisableAnimation: { type: Boolean }
|
|
11
|
+
},
|
|
12
|
+
emits: ["update:modelValue"],
|
|
13
|
+
setup(o, { emit: y }) {
|
|
14
|
+
const h = y, l = o, t = V(l.modelValue ?? !1), a = B(() => l.isDisabled ? l.cssStyle.disabled : l.cssStyle.default);
|
|
15
|
+
return b(
|
|
16
|
+
() => t.value,
|
|
17
|
+
(e) => h("update:modelValue", e)
|
|
18
|
+
), b(
|
|
19
|
+
() => l.modelValue,
|
|
20
|
+
(e) => t.value = e,
|
|
21
|
+
{ immediate: !0 }
|
|
22
|
+
), (e, s) => {
|
|
23
|
+
var r, n, i, d, c, u, m;
|
|
24
|
+
return k(), D("label", {
|
|
25
|
+
class: f(e.$style.check_box),
|
|
26
|
+
style: S({
|
|
27
|
+
"--border-color": ((n = (r = a.value) == null ? void 0 : r.border) == null ? void 0 : n.color) || "blue",
|
|
28
|
+
"--border-size": ((d = (i = a.value) == null ? void 0 : i.border) == null ? void 0 : d.size) || "1px",
|
|
29
|
+
"--radius-size": ((u = (c = a.value) == null ? void 0 : c.border) == null ? void 0 : u.radius) || "0.25rem",
|
|
30
|
+
"--background-color": ((m = a.value) == null ? void 0 : m.backgroundColor) || "#fff",
|
|
31
|
+
"--duration": o.isDisableAnimation ? "0s" : ".3s"
|
|
32
|
+
})
|
|
33
|
+
}, [
|
|
34
|
+
z(p("input", {
|
|
35
|
+
"onUpdate:modelValue": s[0] || (s[0] = (v) => t.value = v),
|
|
36
|
+
type: "checkbox",
|
|
37
|
+
name: o.name,
|
|
38
|
+
disabled: o.isDisabled
|
|
39
|
+
}, null, 8, E), [
|
|
40
|
+
[$, t.value]
|
|
41
|
+
]),
|
|
42
|
+
p("div", {
|
|
43
|
+
class: f(e.$style.check_container)
|
|
44
|
+
}, [
|
|
45
|
+
g(e.$slots, "check"),
|
|
46
|
+
e.$slots.check ? x("", !0) : (k(), w(A, { key: 0 }))
|
|
47
|
+
], 2)
|
|
48
|
+
], 6);
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
export {
|
|
53
|
+
M as default
|
|
54
|
+
};
|
|
@@ -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;
|
|
@@ -0,0 +1,157 @@
|
|
|
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({
|
|
8
|
+
__name: "DatePicker",
|
|
9
|
+
props: {
|
|
10
|
+
name: {},
|
|
11
|
+
modelValue: {},
|
|
12
|
+
isDisabled: { type: Boolean, default: !1 },
|
|
13
|
+
isRequired: { type: Boolean },
|
|
14
|
+
formValidationManager: { default: null },
|
|
15
|
+
minDate: { default: "" },
|
|
16
|
+
maxDate: { default: "" },
|
|
17
|
+
size: { default: "medium" },
|
|
18
|
+
type: { default: "date" },
|
|
19
|
+
ariaLabel: { default: void 0 },
|
|
20
|
+
ariaLabelledBy: { default: void 0 }
|
|
21
|
+
},
|
|
22
|
+
emits: ["update:modelValue"],
|
|
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({
|
|
25
|
+
year: "",
|
|
26
|
+
month: "",
|
|
27
|
+
day: ""
|
|
28
|
+
}), s = v(""), r = v(""), m = (e) => {
|
|
29
|
+
l.formValidationManager && l.formValidationManager.setValid(l.name, e);
|
|
30
|
+
}, p = (e) => !e && l.isRequired ? { isValid: !1, message: j.required } : { isValid: !0, message: "" }, E = (e) => T(
|
|
31
|
+
{ year: e.year, month: e.month, day: e.day ?? "" },
|
|
32
|
+
{ type: l.type, isRequired: l.isRequired }
|
|
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(
|
|
38
|
+
() => s.value,
|
|
39
|
+
(e) => {
|
|
40
|
+
V(e);
|
|
41
|
+
const { isValid: a, message: i } = p(e);
|
|
42
|
+
r.value = i, L("update:modelValue", e), m(a);
|
|
43
|
+
}
|
|
44
|
+
), D(
|
|
45
|
+
() => d,
|
|
46
|
+
(e) => {
|
|
47
|
+
const { isValid: a, message: i } = E(e);
|
|
48
|
+
r.value = i, m(a), a && (s.value = U());
|
|
49
|
+
},
|
|
50
|
+
{ deep: !0 }
|
|
51
|
+
);
|
|
52
|
+
const k = (e) => {
|
|
53
|
+
if (!e) {
|
|
54
|
+
s.value = "", V(""), r.value = "", m(p("").isValid);
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
const a = G(e, l.type);
|
|
58
|
+
!a || a === s.value || (s.value = a, V(a));
|
|
59
|
+
};
|
|
60
|
+
return D(
|
|
61
|
+
() => l.modelValue,
|
|
62
|
+
(e) => k(e)
|
|
63
|
+
), k(l.modelValue), m(p(s.value).isValid), N(() => {
|
|
64
|
+
var e;
|
|
65
|
+
return (e = l.formValidationManager) == null ? void 0 : e.remove(l.name);
|
|
66
|
+
}), (e, a) => (y(), O(F, {
|
|
67
|
+
isDisabled: t.isDisabled,
|
|
68
|
+
class: o([
|
|
69
|
+
e.$style.date_picker,
|
|
70
|
+
e.$style[t.size],
|
|
71
|
+
{ [e.$style.is_disabled]: t.isDisabled }
|
|
72
|
+
]),
|
|
73
|
+
isErrored: !!r.value
|
|
74
|
+
}, {
|
|
75
|
+
default: z(() => [
|
|
76
|
+
n("div", {
|
|
77
|
+
class: o(e.$style.date_input)
|
|
78
|
+
}, [
|
|
79
|
+
M(H, {
|
|
80
|
+
class: o(e.$style.icon)
|
|
81
|
+
}, null, 8, ["class"]),
|
|
82
|
+
b(n("input", {
|
|
83
|
+
ref_key: "datePicker",
|
|
84
|
+
ref: q,
|
|
85
|
+
"onUpdate:modelValue": a[0] || (a[0] = (i) => s.value = i),
|
|
86
|
+
type: t.type,
|
|
87
|
+
name: t.name,
|
|
88
|
+
max: t.maxDate,
|
|
89
|
+
min: t.minDate,
|
|
90
|
+
required: t.isRequired,
|
|
91
|
+
disabled: t.isDisabled
|
|
92
|
+
}, null, 8, Q), [
|
|
93
|
+
[P, s.value]
|
|
94
|
+
])
|
|
95
|
+
], 2),
|
|
96
|
+
b(n("input", {
|
|
97
|
+
"onUpdate:modelValue": a[1] || (a[1] = (i) => d.year = i),
|
|
98
|
+
placeholder: "年",
|
|
99
|
+
"aria-label": f("年"),
|
|
100
|
+
"aria-labelledby": c("年"),
|
|
101
|
+
maxlength: "4",
|
|
102
|
+
type: "text",
|
|
103
|
+
disabled: t.isDisabled,
|
|
104
|
+
class: o(e.$style.year)
|
|
105
|
+
}, null, 10, W), [
|
|
106
|
+
[h, d.year]
|
|
107
|
+
]),
|
|
108
|
+
a[4] || (a[4] = S("/ ", -1)),
|
|
109
|
+
b(n("input", {
|
|
110
|
+
"onUpdate:modelValue": a[2] || (a[2] = (i) => d.month = i),
|
|
111
|
+
placeholder: "月",
|
|
112
|
+
"aria-label": f("月"),
|
|
113
|
+
"aria-labelledby": c("月"),
|
|
114
|
+
maxlength: "2",
|
|
115
|
+
type: "text",
|
|
116
|
+
disabled: t.isDisabled
|
|
117
|
+
}, null, 8, X), [
|
|
118
|
+
[h, d.month]
|
|
119
|
+
]),
|
|
120
|
+
t.type === "date" ? (y(), $("span", Y, "/")) : g("", !0),
|
|
121
|
+
t.type === "date" ? b((y(), $("input", {
|
|
122
|
+
key: 1,
|
|
123
|
+
"onUpdate:modelValue": a[3] || (a[3] = (i) => d.day = i),
|
|
124
|
+
placeholder: "日",
|
|
125
|
+
"aria-label": f("日"),
|
|
126
|
+
"aria-labelledby": c("日"),
|
|
127
|
+
maxlength: "2",
|
|
128
|
+
type: "text",
|
|
129
|
+
disabled: t.isDisabled
|
|
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] : []
|
|
149
|
+
}, null, 8, ["errorMessages"])
|
|
150
|
+
]),
|
|
151
|
+
_: 1
|
|
152
|
+
}, 8, ["isDisabled", "class", "isErrored"]));
|
|
153
|
+
}
|
|
154
|
+
});
|
|
155
|
+
export {
|
|
156
|
+
re as default
|
|
157
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
|
8
|
+
};
|
|
9
|
+
export {
|
|
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
|
|
17
|
+
};
|