@geckou/ui-vue 0.4.0 → 0.6.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.
Files changed (175) hide show
  1. package/README.md +52 -2
  2. package/dist/_virtual/_plugin-vue_export-helper.js +9 -0
  3. package/dist/components/ArticleList/Card/Artistic.vue.js +9 -0
  4. package/dist/components/ArticleList/Card/Artistic.vue2.js +105 -0
  5. package/dist/components/ArticleList/Card/Artistic.vue3.js +27 -0
  6. package/dist/components/ArticleList/Card/Entertainment.vue.js +9 -0
  7. package/dist/components/ArticleList/Card/Entertainment.vue2.js +120 -0
  8. package/dist/components/ArticleList/Card/Entertainment.vue3.js +31 -0
  9. package/dist/components/ArticleList/Card/Gallery.vue.js +9 -0
  10. package/dist/components/ArticleList/Card/Gallery.vue2.js +103 -0
  11. package/dist/components/ArticleList/Card/Gallery.vue3.js +23 -0
  12. package/dist/components/ArticleList/Card/Grid.vue.js +9 -0
  13. package/dist/components/ArticleList/Card/Grid.vue2.js +114 -0
  14. package/dist/components/ArticleList/Card/Grid.vue3.js +25 -0
  15. package/dist/components/ArticleList/Card/News.vue.js +9 -0
  16. package/dist/components/ArticleList/Card/News.vue2.js +95 -0
  17. package/dist/components/ArticleList/Card/News.vue3.js +19 -0
  18. package/dist/components/ArticleList/Card/Rounded.vue.js +9 -0
  19. package/dist/components/ArticleList/Card/Rounded.vue2.js +96 -0
  20. package/dist/components/ArticleList/Card/Rounded.vue3.js +15 -0
  21. package/dist/components/ArticleList/Card/Row.vue.js +9 -0
  22. package/dist/components/ArticleList/Card/Row.vue2.js +97 -0
  23. package/dist/components/ArticleList/Card/Row.vue3.js +17 -0
  24. package/dist/components/ArticleList/Card/Simple.vue.js +9 -0
  25. package/dist/components/ArticleList/Card/Simple.vue2.js +98 -0
  26. package/dist/components/ArticleList/Card/Simple.vue3.js +23 -0
  27. package/dist/components/ArticleList/Card/Standard.vue.js +9 -0
  28. package/dist/components/ArticleList/Card/Standard.vue2.js +93 -0
  29. package/dist/components/ArticleList/Card/Standard.vue3.js +21 -0
  30. package/dist/components/ArticleList/Card/Tile.vue.js +9 -0
  31. package/dist/components/ArticleList/Card/Tile.vue2.js +96 -0
  32. package/dist/components/ArticleList/Card/Tile.vue3.js +23 -0
  33. package/dist/components/ArticleList/GenericArticleList.vue.js +9 -0
  34. package/dist/components/ArticleList/GenericArticleList.vue2.js +72 -0
  35. package/dist/components/ArticleList/GenericArticleList.vue3.js +11 -0
  36. package/dist/components/ArticleList/List/Artistic.vue.js +22 -0
  37. package/dist/components/ArticleList/List/Artistic.vue2.js +4 -0
  38. package/dist/components/ArticleList/List/Entertainment.vue.js +22 -0
  39. package/dist/components/ArticleList/List/Entertainment.vue2.js +4 -0
  40. package/dist/components/ArticleList/List/Gallery.vue.js +22 -0
  41. package/dist/components/ArticleList/List/Gallery.vue2.js +4 -0
  42. package/dist/components/ArticleList/List/Grid.vue.js +9 -0
  43. package/dist/components/ArticleList/List/Grid.vue2.js +120 -0
  44. package/dist/components/ArticleList/List/Grid.vue3.js +9 -0
  45. package/dist/components/ArticleList/List/News.vue.js +22 -0
  46. package/dist/components/ArticleList/List/News.vue2.js +4 -0
  47. package/dist/components/ArticleList/List/Rounded.vue.js +22 -0
  48. package/dist/components/ArticleList/List/Rounded.vue2.js +4 -0
  49. package/dist/components/ArticleList/List/Row.vue.js +22 -0
  50. package/dist/components/ArticleList/List/Row.vue2.js +4 -0
  51. package/dist/components/ArticleList/List/Simple.vue.js +22 -0
  52. package/dist/components/ArticleList/List/Simple.vue2.js +4 -0
  53. package/dist/components/ArticleList/List/Standard.vue.js +22 -0
  54. package/dist/components/ArticleList/List/Standard.vue2.js +4 -0
  55. package/dist/components/ArticleList/List/Tile.vue.js +22 -0
  56. package/dist/components/ArticleList/List/Tile.vue2.js +4 -0
  57. package/dist/components/ArticleList/Parts/AuthorInfo.vue.js +9 -0
  58. package/dist/components/ArticleList/Parts/AuthorInfo.vue2.js +64 -0
  59. package/dist/components/ArticleList/Parts/AuthorInfo.vue3.js +11 -0
  60. package/dist/components/ArticleList/Parts/CardContainer.vue.js +9 -0
  61. package/dist/components/ArticleList/Parts/CardContainer.vue2.js +18 -0
  62. package/dist/components/ArticleList/Parts/CardContainer.vue3.js +7 -0
  63. package/dist/components/ArticleList/Parts/CardHeading.vue.js +9 -0
  64. package/dist/components/ArticleList/Parts/CardHeading.vue2.js +25 -0
  65. package/dist/components/ArticleList/Parts/CardHeading.vue3.js +7 -0
  66. package/dist/components/ArticleList/Parts/CategoryList.vue.js +38 -0
  67. package/dist/components/ArticleList/Parts/CategoryList.vue2.js +4 -0
  68. package/dist/components/ArticleList/Parts/ExcerptText.vue.js +9 -0
  69. package/dist/components/ArticleList/Parts/ExcerptText.vue2.js +24 -0
  70. package/dist/components/ArticleList/Parts/ExcerptText.vue3.js +7 -0
  71. package/dist/components/ArticleList/Parts/MetadataList.vue.js +9 -0
  72. package/dist/components/ArticleList/Parts/MetadataList.vue2.js +62 -0
  73. package/dist/components/ArticleList/Parts/MetadataList.vue3.js +17 -0
  74. package/dist/components/ArticleList/Parts/NoImage.vue.js +9 -0
  75. package/dist/components/ArticleList/Parts/NoImage.vue2.js +16 -0
  76. package/dist/components/ArticleList/Parts/NoImage.vue3.js +7 -0
  77. package/dist/components/ArticleList/Parts/PostedDate.vue.js +9 -0
  78. package/dist/components/ArticleList/Parts/PostedDate.vue2.js +28 -0
  79. package/dist/components/ArticleList/Parts/PostedDate.vue3.js +7 -0
  80. package/dist/components/ArticleList/Parts/TagList.vue.js +32 -0
  81. package/dist/components/ArticleList/Parts/TagList.vue2.js +4 -0
  82. package/dist/components/ArticleList/Parts/ThumbnailImage.vue.js +9 -0
  83. package/dist/components/ArticleList/Parts/ThumbnailImage.vue2.js +50 -0
  84. package/dist/components/ArticleList/Parts/ThumbnailImage.vue3.js +7 -0
  85. package/dist/components/BasicButton.vue.js +9 -0
  86. package/dist/components/BasicButton.vue2.js +71 -0
  87. package/dist/components/BasicButton.vue3.js +11 -0
  88. package/dist/components/CheckBox.vue.d.ts +8 -0
  89. package/dist/components/CheckBox.vue.js +9 -0
  90. package/dist/components/CheckBox.vue2.js +76 -0
  91. package/dist/components/CheckBox.vue3.js +11 -0
  92. package/dist/components/CheckBoxes.vue.js +9 -0
  93. package/dist/components/CheckBoxes.vue2.js +104 -0
  94. package/dist/components/CheckBoxes.vue3.js +7 -0
  95. package/dist/components/CheckButton.vue.js +9 -0
  96. package/dist/components/CheckButton.vue2.js +54 -0
  97. package/dist/components/CheckButton.vue3.js +11 -0
  98. package/dist/components/DatePicker.vue.js +9 -0
  99. package/dist/components/DatePicker.vue2.js +137 -0
  100. package/dist/components/DatePicker.vue3.js +15 -0
  101. package/dist/components/DateRangePicker.vue.js +9 -0
  102. package/dist/components/DateRangePicker.vue2.js +74 -0
  103. package/dist/components/DateRangePicker.vue3.js +9 -0
  104. package/dist/components/DateSelector.vue.d.ts +5 -0
  105. package/dist/components/DateSelector.vue.js +9 -0
  106. package/dist/components/DateSelector.vue2.js +174 -0
  107. package/dist/components/DateSelector.vue3.js +13 -0
  108. package/dist/components/DropdownUi.vue.d.ts +1 -0
  109. package/dist/components/DropdownUi.vue.js +9 -0
  110. package/dist/components/DropdownUi.vue2.js +65 -0
  111. package/dist/components/DropdownUi.vue3.js +15 -0
  112. package/dist/components/ErrorMessage.vue.js +9 -0
  113. package/dist/components/ErrorMessage.vue2.js +30 -0
  114. package/dist/components/ErrorMessage.vue3.js +7 -0
  115. package/dist/components/Icon/CalendarIcon.vue.js +15 -0
  116. package/dist/components/Icon/CheckIcon.vue.js +15 -0
  117. package/dist/components/Icon/CloseIcon.vue.js +15 -0
  118. package/dist/components/Icon/Folder.vue.js +15 -0
  119. package/dist/components/Icon/Image.vue.js +21 -0
  120. package/dist/components/Icon/KeyboardArrowDownIcon.vue.js +15 -0
  121. package/dist/components/Icon/Tag.vue.js +15 -0
  122. package/dist/components/InputBox.vue.js +9 -0
  123. package/dist/components/InputBox.vue2.js +62 -0
  124. package/dist/components/InputBox.vue3.js +7 -0
  125. package/dist/components/InputGroup.vue.js +17 -0
  126. package/dist/components/InputGroup.vue2.js +7 -0
  127. package/dist/components/LabeledCheckbox.vue.js +9 -0
  128. package/dist/components/LabeledCheckbox.vue2.js +60 -0
  129. package/dist/components/LabeledCheckbox.vue3.js +9 -0
  130. package/dist/components/LabeledFieldset.vue.js +9 -0
  131. package/dist/components/LabeledFieldset.vue2.js +29 -0
  132. package/dist/components/LabeledFieldset.vue3.js +11 -0
  133. package/dist/components/LoadingSpinner.vue.js +15 -0
  134. package/dist/components/ModalBox.vue.d.ts +22 -16
  135. package/dist/components/ModalBox.vue.js +9 -0
  136. package/dist/components/ModalBox.vue2.js +85 -0
  137. package/dist/components/ModalBox.vue3.js +23 -0
  138. package/dist/components/PopupBox.vue.js +9 -0
  139. package/dist/components/PopupBox.vue2.js +35 -0
  140. package/dist/components/PopupBox.vue3.js +15 -0
  141. package/dist/components/RadioButtons.vue.js +9 -0
  142. package/dist/components/RadioButtons.vue2.js +75 -0
  143. package/dist/components/RadioButtons.vue3.js +11 -0
  144. package/dist/components/SelectBox.vue.js +9 -0
  145. package/dist/components/SelectBox.vue2.js +109 -0
  146. package/dist/components/SelectBox.vue3.js +9 -0
  147. package/dist/components/SlideDownUi.vue.js +9 -0
  148. package/dist/components/SlideDownUi.vue2.js +66 -0
  149. package/dist/components/SlideDownUi.vue3.js +17 -0
  150. package/dist/components/TabUI.vue.d.ts +0 -20
  151. package/dist/components/TabUI.vue.js +9 -0
  152. package/dist/components/TabUI.vue2.js +77 -0
  153. package/dist/components/TabUI.vue3.js +9 -0
  154. package/dist/components/TextArea.vue.js +9 -0
  155. package/dist/components/TextArea.vue2.js +82 -0
  156. package/dist/components/TextArea.vue3.js +7 -0
  157. package/dist/components/TextBox.vue.js +9 -0
  158. package/dist/components/TextBox.vue2.js +76 -0
  159. package/dist/components/TextBox.vue3.js +7 -0
  160. package/dist/components/TextButton.vue.js +9 -0
  161. package/dist/components/TextButton.vue2.js +24 -0
  162. package/dist/components/TextButton.vue3.js +7 -0
  163. package/dist/components/ToggleButton.vue.d.ts +12 -9
  164. package/dist/components/ToggleButton.vue.js +9 -0
  165. package/dist/components/ToggleButton.vue2.js +94 -0
  166. package/dist/components/ToggleButton.vue3.js +13 -0
  167. package/dist/const/list-theme.js +65 -0
  168. package/dist/index.js +112 -3514
  169. package/dist/scripts/form-validation-manager.js +38 -0
  170. package/dist/scripts/unique-id.d.ts +4 -0
  171. package/dist/scripts/unique-id.js +9 -0
  172. package/dist/scripts/use-click-outside.js +13 -0
  173. package/dist/scripts/utils.js +21 -0
  174. package/dist/style.css +1 -1
  175. package/package.json +8 -5
@@ -0,0 +1,77 @@
1
+ import { defineComponent as L, ref as h, openBlock as a, createElementBlock as s, createElementVNode as S, normalizeClass as p, normalizeStyle as T, unref as A, Fragment as y, renderList as I, renderSlot as g, createTextVNode as D, toDisplayString as N, createCommentVNode as R, withDirectives as V, vShow as z } from "vue";
2
+ import { COLOR as B } from "@geckou/ui-core";
3
+ import { nextUniqueId as E } from "../scripts/unique-id.js";
4
+ const K = ["id", "aria-controls", "aria-selected", "tabindex", "onClick"], O = ["id", "aria-labelledby"], _ = /* @__PURE__ */ L({
5
+ __name: "TabUI",
6
+ props: {
7
+ tabs: {},
8
+ color: { default: void 0 },
9
+ initialIndex: { default: 0 }
10
+ },
11
+ setup(l) {
12
+ const r = l, k = E("tabs"), f = (e) => `${k}_tab_${e}`, b = (e) => `${k}_panel_${e}`, d = r.tabs[r.initialIndex] ?? r.tabs[0], o = h((d == null ? void 0 : d.key) ?? ""), v = h([]), w = (e) => o.value = e, m = (e) => {
13
+ var n;
14
+ o.value = r.tabs[e].key, (n = v.value[e]) == null || n.focus();
15
+ }, x = (e) => {
16
+ if (e.key !== "ArrowLeft" && e.key !== "ArrowRight")
17
+ return;
18
+ const n = r.tabs.findIndex(
19
+ (c) => c.key === o.value
20
+ );
21
+ if (n === -1)
22
+ return;
23
+ e.preventDefault();
24
+ const i = r.tabs.length - 1;
25
+ e.key === "ArrowLeft" ? m(n > 0 ? n - 1 : i) : m(n < i ? n + 1 : 0);
26
+ };
27
+ return (e, n) => {
28
+ var i, c, $;
29
+ return a(), s("div", null, [
30
+ S("div", {
31
+ class: p(e.$style.tabs),
32
+ style: T({
33
+ "--active-color": ((i = l.color) == null ? void 0 : i.active) || A(B).blue,
34
+ "--background-color": ((c = l.color) == null ? void 0 : c.background) || "transparent",
35
+ "--text-color": (($ = l.color) == null ? void 0 : $.text) || "inherit"
36
+ }),
37
+ role: "tablist",
38
+ onKeydown: x
39
+ }, [
40
+ (a(!0), s(y, null, I(l.tabs, (t, C) => (a(), s("button", {
41
+ id: f(t.key),
42
+ key: t.key,
43
+ ref_for: !0,
44
+ ref: (u) => {
45
+ u && (v.value[C] = u);
46
+ },
47
+ type: "button",
48
+ role: "tab",
49
+ "aria-controls": b(t.key),
50
+ "aria-selected": o.value === t.key,
51
+ tabindex: o.value === t.key ? 0 : -1,
52
+ class: p({ [e.$style.active]: o.value === t.key }),
53
+ onClick: (u) => w(t.key)
54
+ }, [
55
+ g(e.$slots, t.key),
56
+ e.$slots[t.key] ? R("", !0) : (a(), s(y, { key: 0 }, [
57
+ D(N(t.label), 1)
58
+ ], 64))
59
+ ], 10, K))), 128))
60
+ ], 38),
61
+ (a(!0), s(y, null, I(l.tabs, (t) => V((a(), s("div", {
62
+ id: b(t.key),
63
+ key: `${t.key}_panel`,
64
+ role: "tabpanel",
65
+ "aria-labelledby": f(t.key)
66
+ }, [
67
+ g(e.$slots, `${t.key}Contents`)
68
+ ], 8, O)), [
69
+ [z, o.value === t.key]
70
+ ])), 128))
71
+ ]);
72
+ };
73
+ }
74
+ });
75
+ export {
76
+ _ as default
77
+ };
@@ -0,0 +1,9 @@
1
+ const t = "_tabs_bthfs_1", s = "_active_bthfs_13", a = {
2
+ tabs: t,
3
+ active: s
4
+ };
5
+ export {
6
+ s as active,
7
+ a as default,
8
+ t as tabs
9
+ };
@@ -0,0 +1,9 @@
1
+ import s from "./TextArea.vue2.js";
2
+ import o from "./TextArea.vue3.js";
3
+ import t from "../_virtual/_plugin-vue_export-helper.js";
4
+ const e = {
5
+ $style: o
6
+ }, f = /* @__PURE__ */ t(s, [["__cssModules", e]]);
7
+ export {
8
+ f as default
9
+ };
@@ -0,0 +1,82 @@
1
+ import { defineComponent as x, computed as y, ref as v, onMounted as V, watch as p, openBlock as b, createBlock as S, normalizeClass as w, withCtx as B, withDirectives as C, createElementVNode as k, vModelText as q, createVNode as D, nextTick as M } from "vue";
2
+ import { isEmptyValue as R, validateInputValue as E } from "@geckou/ui-core";
3
+ import H from "./InputBox.vue.js";
4
+ import T from "./ErrorMessage.vue.js";
5
+ const j = ["name", "required", "placeholder", "disabled", "autocomplete", "rows", "maxlength", "aria-invalid"], N = /* @__PURE__ */ x({
6
+ __name: "TextArea",
7
+ props: {
8
+ name: {},
9
+ modelValue: { default: void 0 },
10
+ cssStyle: { default: void 0 },
11
+ placeholder: { default: "入力してください" },
12
+ isDisabled: { type: Boolean, default: !1 },
13
+ isRequired: { type: Boolean, default: !1 },
14
+ rows: { default: void 0 },
15
+ maxLength: { default: 100 },
16
+ autocomplete: { default: "off" },
17
+ validates: { default: () => [] },
18
+ autoAdjustHeight: { type: Boolean }
19
+ },
20
+ emits: ["update:modelValue"],
21
+ setup(e, { emit: h }) {
22
+ const g = h, t = e, l = y({
23
+ get: () => t.modelValue ?? "",
24
+ set: (r) => g("update:modelValue", r)
25
+ }), o = v([]), a = v(null), u = () => {
26
+ o.value = E(l.value, {
27
+ isRequired: t.isRequired,
28
+ validates: t.validates
29
+ });
30
+ }, d = () => {
31
+ t.autoAdjustHeight && M(() => {
32
+ a.value && (a.value.style.height = "auto", a.value.style.height = `calc(${a.value.scrollHeight}px - 2rem)`);
33
+ });
34
+ };
35
+ return V(d), p(
36
+ l,
37
+ () => {
38
+ u(), d();
39
+ },
40
+ // 数値 0 も初期値として扱うため truthy 判定は使わない
41
+ { immediate: !R(t.modelValue), flush: "post" }
42
+ ), (r, s) => (b(), S(H, {
43
+ cssStyle: e.cssStyle,
44
+ class: w(r.$style.text_area),
45
+ isErrored: !!o.value.length,
46
+ isDisabled: e.isDisabled
47
+ }, {
48
+ default: B(() => {
49
+ var i, n, m, c;
50
+ return [
51
+ C(k("textarea", {
52
+ ref_key: "textareaRef",
53
+ ref: a,
54
+ "onUpdate:modelValue": s[0] || (s[0] = (f) => l.value = f),
55
+ name: e.name,
56
+ required: e.isRequired,
57
+ placeholder: e.placeholder,
58
+ disabled: e.isDisabled,
59
+ autocomplete: e.autocomplete,
60
+ rows: e.rows,
61
+ maxlength: e.maxLength,
62
+ "aria-invalid": o.value.length ? "true" : void 0,
63
+ onBlur: s[1] || (s[1] = (f) => u())
64
+ }, null, 40, j), [
65
+ [q, l.value]
66
+ ]),
67
+ D(T, {
68
+ errorMessages: o.value,
69
+ cssStyle: {
70
+ textColor: (n = (i = e.cssStyle) == null ? void 0 : i.error) == null ? void 0 : n.backgroundColor,
71
+ backgroundColor: (c = (m = e.cssStyle) == null ? void 0 : m.error) == null ? void 0 : c.textColor
72
+ }
73
+ }, null, 8, ["errorMessages", "cssStyle"])
74
+ ];
75
+ }),
76
+ _: 1
77
+ }, 8, ["cssStyle", "class", "isErrored", "isDisabled"]));
78
+ }
79
+ });
80
+ export {
81
+ N as default
82
+ };
@@ -0,0 +1,7 @@
1
+ const t = "_text_area_1f3te_2", e = {
2
+ text_area: t
3
+ };
4
+ export {
5
+ e as default,
6
+ t as text_area
7
+ };
@@ -0,0 +1,9 @@
1
+ import o from "./TextBox.vue2.js";
2
+ import s from "./TextBox.vue3.js";
3
+ import t from "../_virtual/_plugin-vue_export-helper.js";
4
+ const e = {
5
+ $style: s
6
+ }, f = /* @__PURE__ */ t(o, [["__cssModules", e]]);
7
+ export {
8
+ f as default
9
+ };
@@ -0,0 +1,76 @@
1
+ import { defineComponent as y, ref as p, computed as g, watch as h, openBlock as b, createBlock as x, normalizeClass as V, withCtx as S, renderSlot as c, withDirectives as B, createElementVNode as C, vModelDynamic as D, createVNode as q } from "vue";
2
+ import { convertFullWidthToHalfWidth as E, isEmptyValue as M, validateInputValue as k } from "@geckou/ui-core";
3
+ import R from "./InputBox.vue.js";
4
+ import T from "./ErrorMessage.vue.js";
5
+ const $ = ["type", "name", "required", "placeholder", "disabled", "autocomplete", "maxlength", "aria-invalid"], w = /* @__PURE__ */ y({
6
+ __name: "TextBox",
7
+ props: {
8
+ name: {},
9
+ modelValue: { default: void 0 },
10
+ cssStyle: { default: void 0 },
11
+ inputType: { default: "text" },
12
+ placeholder: { default: "入力してください" },
13
+ isDisabled: { type: Boolean },
14
+ isRequired: { type: Boolean },
15
+ maxLength: { default: 30 },
16
+ autocomplete: { default: "off" },
17
+ validates: { default: () => [] }
18
+ },
19
+ emits: ["update:modelValue"],
20
+ setup(e, { emit: f }) {
21
+ const v = f, a = e, o = p([]), s = g({
22
+ get: () => a.modelValue ?? "",
23
+ set: (t) => {
24
+ const l = typeof t == "number" ? t : E(String(t));
25
+ v("update:modelValue", l);
26
+ }
27
+ }), d = () => {
28
+ o.value = k(s.value, {
29
+ isRequired: a.isRequired,
30
+ validates: a.validates
31
+ });
32
+ };
33
+ return h(s, () => d(), {
34
+ immediate: !M(a.modelValue),
35
+ flush: "post"
36
+ }), (t, l) => (b(), x(R, {
37
+ cssStyle: e.cssStyle,
38
+ class: V(t.$style.text_box),
39
+ isErrored: !!o.value.length,
40
+ isDisabled: e.isDisabled
41
+ }, {
42
+ default: S(() => {
43
+ var i, r, u, n;
44
+ return [
45
+ c(t.$slots, "before"),
46
+ B(C("input", {
47
+ "onUpdate:modelValue": l[0] || (l[0] = (m) => s.value = m),
48
+ type: e.inputType,
49
+ name: e.name,
50
+ required: e.isRequired,
51
+ placeholder: e.placeholder,
52
+ disabled: e.isDisabled,
53
+ autocomplete: e.autocomplete,
54
+ maxlength: e.maxLength,
55
+ "aria-invalid": o.value.length ? "true" : void 0,
56
+ onBlur: l[1] || (l[1] = (m) => d())
57
+ }, null, 40, $), [
58
+ [D, s.value]
59
+ ]),
60
+ c(t.$slots, "after"),
61
+ q(T, {
62
+ errorMessages: o.value,
63
+ cssStyle: {
64
+ textColor: (r = (i = e.cssStyle) == null ? void 0 : i.error) == null ? void 0 : r.backgroundColor,
65
+ backgroundColor: (n = (u = e.cssStyle) == null ? void 0 : u.error) == null ? void 0 : n.textColor
66
+ }
67
+ }, null, 8, ["errorMessages", "cssStyle"])
68
+ ];
69
+ }),
70
+ _: 3
71
+ }, 8, ["cssStyle", "class", "isErrored", "isDisabled"]));
72
+ }
73
+ });
74
+ export {
75
+ w as default
76
+ };
@@ -0,0 +1,7 @@
1
+ const t = "_text_box_dqty_1", x = {
2
+ text_box: t
3
+ };
4
+ export {
5
+ x as default,
6
+ t as text_box
7
+ };
@@ -0,0 +1,9 @@
1
+ import o from "./TextButton.vue2.js";
2
+ import s from "./TextButton.vue3.js";
3
+ import t from "../_virtual/_plugin-vue_export-helper.js";
4
+ const e = {
5
+ $style: s
6
+ }, f = /* @__PURE__ */ t(o, [["__cssModules", e]]);
7
+ export {
8
+ f as default
9
+ };
@@ -0,0 +1,24 @@
1
+ import { defineComponent as l, computed as n, openBlock as s, createElementBlock as r, normalizeClass as i, normalizeStyle as c, toDisplayString as u } from "vue";
2
+ import { COLOR as d } from "@geckou/ui-core";
3
+ const m = ["disabled"], x = /* @__PURE__ */ l({
4
+ __name: "TextButton",
5
+ props: {
6
+ text: {},
7
+ variant: { default: "default" },
8
+ isDisabled: { type: Boolean, default: !1 }
9
+ },
10
+ setup(t) {
11
+ const e = t, o = n(
12
+ () => e.variant === "caution" ? d.red : "var(--link-color)"
13
+ );
14
+ return (a, p) => (s(), r("button", {
15
+ type: "button",
16
+ class: i(a.$style.text_button),
17
+ disabled: t.isDisabled,
18
+ style: c({ "--text-button-color": o.value })
19
+ }, u(t.text), 15, m));
20
+ }
21
+ });
22
+ export {
23
+ x as default
24
+ };
@@ -0,0 +1,7 @@
1
+ const t = "_text_button_awtwg_1", e = {
2
+ text_button: t
3
+ };
4
+ export {
5
+ e as default,
6
+ t as text_button
7
+ };
@@ -1,23 +1,26 @@
1
- import { StateVariation, BaseStyle } from '../types';
1
+ import { BaseStyle, StyleForEachStatus } from '../types';
2
+ type ToggleStyle = {
3
+ on: BaseStyle;
4
+ off: BaseStyle;
5
+ };
2
6
  type __VLS_Props = {
3
7
  name: string;
4
8
  label?: Record<'on' | 'off', string>;
5
9
  modelValue?: boolean;
6
10
  isDisabled?: boolean;
7
- cssStyle?: Record<StateVariation, {
8
- on: BaseStyle;
9
- off: BaseStyle;
10
- }>;
11
+ cssStyle?: StyleForEachStatus<ToggleStyle>;
12
+ /** アクセシブル名。可視ラベルがあるなら ariaLabelledBy でその要素を指すこと */
13
+ ariaLabel?: string;
14
+ ariaLabelledBy?: string;
11
15
  };
12
16
  declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
13
17
  "update:modelValue": (newValue: boolean) => any;
14
18
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
15
19
  "onUpdate:modelValue"?: ((newValue: boolean) => any) | undefined;
16
20
  }>, {
17
- cssStyle: Record<StateVariation, {
18
- on: BaseStyle;
19
- off: BaseStyle;
20
- }>;
21
+ cssStyle: StyleForEachStatus<ToggleStyle>;
21
22
  label: Record<"on" | "off", string>;
23
+ ariaLabel: string;
24
+ ariaLabelledBy: string;
22
25
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLButtonElement>;
23
26
  export default _default;
@@ -0,0 +1,9 @@
1
+ import o from "./ToggleButton.vue2.js";
2
+ import s from "./ToggleButton.vue3.js";
3
+ import t from "../_virtual/_plugin-vue_export-helper.js";
4
+ const e = {
5
+ $style: s
6
+ }, f = /* @__PURE__ */ t(o, [["__cssModules", e]]);
7
+ export {
8
+ f as default
9
+ };
@@ -0,0 +1,94 @@
1
+ import { defineComponent as w, computed as r, openBlock as L, createElementBlock as z, normalizeClass as s, normalizeStyle as B, withModifiers as V, withDirectives as $, createElementVNode as b, vModelCheckbox as S } from "vue";
2
+ import { COLOR as l } from "@geckou/ui-core";
3
+ const G = ["disabled", "aria-checked", "aria-labelledby", "aria-label"], O = ["name", "disabled"], p = ["data-on", "data-off"], M = /* @__PURE__ */ w({
4
+ __name: "ToggleButton",
5
+ props: {
6
+ name: {},
7
+ label: { default: () => ({ on: "ON", off: "OFF" }) },
8
+ modelValue: { type: Boolean },
9
+ isDisabled: { type: Boolean },
10
+ cssStyle: { default: void 0 },
11
+ ariaLabel: { default: void 0 },
12
+ ariaLabelledBy: { default: void 0 }
13
+ },
14
+ emits: ["update:modelValue"],
15
+ setup(o, { emit: x }) {
16
+ const C = x, a = o, d = r({
17
+ get: () => a.modelValue ?? !1,
18
+ set: (e) => C("update:modelValue", e)
19
+ }), D = r(() => {
20
+ const e = a.label.on.length, t = a.label.off.length;
21
+ return e > t ? e : t;
22
+ }), i = r(() => {
23
+ var t, n;
24
+ const e = a.isDisabled ? (t = a.cssStyle) == null ? void 0 : t.disabled : (n = a.cssStyle) == null ? void 0 : n.default;
25
+ return {
26
+ on: {
27
+ textColor: a.isDisabled ? l.lightGray : l.white,
28
+ backgroundColor: a.isDisabled ? l.gray : l.blue,
29
+ border: {
30
+ color: a.isDisabled ? l.gray : l.blue,
31
+ size: "1px",
32
+ radius: ".25rem"
33
+ },
34
+ boxShadow: "0 0 0 0 rgba(0, 0, 0, 0)",
35
+ ...e == null ? void 0 : e.on
36
+ },
37
+ off: {
38
+ textColor: a.isDisabled ? l.gray : l.white,
39
+ backgroundColor: a.isDisabled ? l.lightGray : l.darkGray,
40
+ border: {
41
+ color: a.isDisabled ? l.gray : l.darkGray,
42
+ size: "1px",
43
+ radius: ".25rem"
44
+ },
45
+ boxShadow: "0 0 0 0 rgba(0, 0, 0, 0)",
46
+ ...e == null ? void 0 : e.off
47
+ }
48
+ }[d.value ? "on" : "off"];
49
+ });
50
+ return (e, t) => {
51
+ var n, u, c, f, m, y, h, g, v;
52
+ return L(), z("button", {
53
+ class: s(e.$style.toggle_button),
54
+ style: B({
55
+ "--text-color": (n = i.value) == null ? void 0 : n.textColor,
56
+ "--border-color": (c = (u = i.value) == null ? void 0 : u.border) == null ? void 0 : c.color,
57
+ "--border-size": (m = (f = i.value) == null ? void 0 : f.border) == null ? void 0 : m.size,
58
+ "--radius-size": (h = (y = i.value) == null ? void 0 : y.border) == null ? void 0 : h.radius,
59
+ "--background-color": (g = i.value) == null ? void 0 : g.backgroundColor,
60
+ "--box-shadow": (v = i.value) == null ? void 0 : v.boxShadow,
61
+ "--inline-size": `${D.value * 2}ch`
62
+ }),
63
+ type: "button",
64
+ disabled: o.isDisabled,
65
+ role: "switch",
66
+ "aria-checked": d.value,
67
+ "aria-labelledby": o.ariaLabelledBy,
68
+ "aria-label": o.ariaLabelledBy ? void 0 : o.ariaLabel ?? o.name,
69
+ onClick: t[1] || (t[1] = V((k) => o.isDisabled ? null : d.value = !d.value, ["stop"]))
70
+ }, [
71
+ $(b("input", {
72
+ "onUpdate:modelValue": t[0] || (t[0] = (k) => d.value = k),
73
+ type: "checkbox",
74
+ tabindex: "-1",
75
+ name: o.name,
76
+ disabled: o.isDisabled
77
+ }, null, 8, O), [
78
+ [S, d.value]
79
+ ]),
80
+ b("div", {
81
+ class: s([e.$style.text, { [e.$style.on]: d.value }]),
82
+ "data-on": o.label.on,
83
+ "data-off": o.label.off
84
+ }, null, 10, p),
85
+ b("div", {
86
+ class: s(e.$style.handle)
87
+ }, null, 2)
88
+ ], 14, G);
89
+ };
90
+ }
91
+ });
92
+ export {
93
+ M as default
94
+ };
@@ -0,0 +1,13 @@
1
+ const t = "_toggle_button_1phgw_1", o = "_text_1phgw_27", _ = "_on_1phgw_56", n = "_handle_1phgw_62", e = {
2
+ toggle_button: t,
3
+ text: o,
4
+ on: _,
5
+ handle: n
6
+ };
7
+ export {
8
+ e as default,
9
+ n as handle,
10
+ _ as on,
11
+ o as text,
12
+ t as toggle_button
13
+ };
@@ -0,0 +1,65 @@
1
+ const e = {
2
+ standard: {
3
+ jaName: "スタンダード",
4
+ enName: "Standard",
5
+ columnNumber: 3,
6
+ name: "Standard"
7
+ },
8
+ rounded: {
9
+ jaName: "ポップ",
10
+ enName: "Rounded",
11
+ columnNumber: 3,
12
+ name: "Rounded"
13
+ },
14
+ artistic: {
15
+ jaName: "アート",
16
+ enName: "Artistic",
17
+ columnNumber: 3,
18
+ name: "Artistic"
19
+ },
20
+ tile: {
21
+ jaName: "タイル",
22
+ enName: "Tile",
23
+ columnNumber: 3,
24
+ name: "Tile"
25
+ },
26
+ simple: {
27
+ jaName: "シンプル",
28
+ enName: "Simple",
29
+ columnNumber: 3,
30
+ name: "Simple"
31
+ },
32
+ row: {
33
+ jaName: "ワイド",
34
+ enName: "Row",
35
+ columnNumber: 1,
36
+ name: "Row"
37
+ },
38
+ news: {
39
+ jaName: "ニュース",
40
+ enName: "News",
41
+ columnNumber: 1,
42
+ name: "News"
43
+ },
44
+ grid: {
45
+ jaName: "グリッド",
46
+ enName: "Grid",
47
+ columnNumber: 4,
48
+ name: "Grid"
49
+ },
50
+ gallery: {
51
+ jaName: "ギャラリー",
52
+ enName: "Gallery",
53
+ columnNumber: 3,
54
+ name: "Gallery"
55
+ },
56
+ entertainment: {
57
+ jaName: "エンタテインメント",
58
+ enName: "Entertainment",
59
+ columnNumber: 3,
60
+ name: "Entertainment"
61
+ }
62
+ };
63
+ export {
64
+ e as LIST_THEME
65
+ };