@geckou/ui-react 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.
@@ -1,35 +1,37 @@
1
1
  "use client";
2
- import { jsxs as b, jsx as t } from "react/jsx-runtime";
3
- import { useId as h } from "react";
4
- import { CheckBox as p } from "./CheckBox.js";
2
+ import { jsxs as h, jsx as t } from "react/jsx-runtime";
3
+ import { useId as p } from "react";
4
+ import { CheckBox as C } from "./CheckBox.js";
5
5
  import { COLOR as r } from "@geckou/ui-core";
6
- function L({
6
+ function N({
7
7
  name: l,
8
8
  label: d,
9
- checked: i,
10
- onChange: m,
9
+ value: i,
10
+ checked: m,
11
+ onChange: u,
11
12
  isDisabled: e,
12
13
  cssStyle: o,
13
- isDisableAnimation: u
14
+ isDisableAnimation: x
14
15
  }) {
15
- const a = i ?? !1, n = h(), x = e ? o == null ? void 0 : o.disabled : o == null ? void 0 : o.default, c = {
16
+ const a = m ?? !1, n = p(), k = e ? o == null ? void 0 : o.disabled : o == null ? void 0 : o.default, c = {
16
17
  textColor: e ? r.darkGray : r.black,
17
18
  backgroundColor: e ? r.darkGray : r.blue,
18
- ...x ?? {}
19
- }, k = {
19
+ ...k ?? {}
20
+ }, b = {
20
21
  "--text-color": c.textColor,
21
22
  "--checked-color": c.backgroundColor
22
23
  };
23
- return /* @__PURE__ */ b("label", { className: "inline-flex cursor-pointer items-center gap-[.5em] has-[button:disabled]:cursor-auto", children: [
24
+ return /* @__PURE__ */ h("label", { className: "inline-flex cursor-pointer items-center gap-[.5em] has-[button:disabled]:cursor-auto", children: [
24
25
  /* @__PURE__ */ t("span", { className: "pointer-events-none", children: /* @__PURE__ */ t(
25
- p,
26
+ C,
26
27
  {
27
28
  name: l,
29
+ value: i,
28
30
  checked: a,
29
- onChange: m,
31
+ onChange: u,
30
32
  isDisabled: e,
31
33
  cssStyle: o,
32
- isDisableAnimation: u,
34
+ isDisableAnimation: x,
33
35
  ariaLabelledBy: n
34
36
  }
35
37
  ) }),
@@ -37,7 +39,7 @@ function L({
37
39
  "span",
38
40
  {
39
41
  id: n,
40
- style: k,
42
+ style: b,
41
43
  className: a ? "text-(--text-color)" : "text-(--checked-color)",
42
44
  children: d
43
45
  }
@@ -45,5 +47,5 @@ function L({
45
47
  ] });
46
48
  }
47
49
  export {
48
- L as LabeledCheckbox
50
+ N as LabeledCheckbox
49
51
  };
@@ -11,6 +11,7 @@ type Props = {
11
11
  cssStyle?: InputBoxStyleForEachStatus;
12
12
  /** combobox のアクセシブル名。可視ラベルがあるならそちらを ariaLabelledBy で指すこと */
13
13
  ariaLabel?: string;
14
+ ariaLabelledBy?: string;
14
15
  };
15
- export declare function SearchableSelectBox({ options, value, onChange, onSelect, name, placeholder, isDisabled, searchTarget, cssStyle, ariaLabel, }: Props): import("react").JSX.Element;
16
+ export declare function SearchableSelectBox({ options, value, onChange, onSelect, name, placeholder, isDisabled, searchTarget, cssStyle, ariaLabel, ariaLabelledBy, }: Props): import("react").JSX.Element;
16
17
  export {};
@@ -1,77 +1,84 @@
1
1
  "use client";
2
- import { jsxs as N, jsx as m } from "react/jsx-runtime";
3
- import { useState as w, useRef as k, useId as _, useEffect as y } from "react";
4
- import { TextBox as $ } from "./TextBox.js";
5
- function R({
6
- options: v,
2
+ import { jsxs as $, jsx as m } from "react/jsx-runtime";
3
+ import { useState as v, useRef as A, useId as j, useEffect as I } from "react";
4
+ import { TextBox as K } from "./TextBox.js";
5
+ function z({
6
+ options: w,
7
7
  value: o,
8
8
  onChange: s,
9
9
  onSelect: d,
10
- name: A,
11
- placeholder: I = "入力してください",
12
- isDisabled: g,
13
- searchTarget: B = "label",
14
- cssStyle: L,
15
- ariaLabel: O
10
+ name: g,
11
+ placeholder: O = "入力してください",
12
+ isDisabled: B,
13
+ searchTarget: L = "label",
14
+ cssStyle: S,
15
+ ariaLabel: F,
16
+ ariaLabelledBy: N
16
17
  }) {
17
- const [u, f] = w(o), [h, a] = w(!1), [i, n] = w(-1), x = k(null), p = _(), b = (e) => `${p}-option-${e}`, E = k(o);
18
- y(() => {
19
- E.current !== o && (E.current = o, f(o));
20
- }, [o]), y(() => {
18
+ const b = (e) => {
19
+ var r;
20
+ return ((r = w.find((t) => String(t.value) === e)) == null ? void 0 : r.label) ?? e;
21
+ }, [u, f] = v(() => b(o)), [h, a] = v(!1), [i, l] = v(-1), x = A(null), p = j(), D = (e) => `${p}-option-${e}`, E = A(o);
22
+ I(() => {
23
+ E.current !== o && (E.current = o, f(b(o)));
24
+ }, [o]), I(() => {
21
25
  const e = (r) => {
22
26
  const t = x.current;
23
27
  t && !t.contains(r.target) && a(!1);
24
28
  };
25
29
  return document.addEventListener("pointerdown", e), () => document.removeEventListener("pointerdown", e);
26
30
  }, []);
27
- const l = u ? v.filter(
28
- (e) => String(e[B]).toLowerCase().includes(u.toLowerCase())
29
- ) : v, F = (e) => {
31
+ const y = w.filter((e) => !e.isDisabled), n = u ? y.filter(
32
+ (e) => String(e[L]).toLowerCase().includes(u.toLowerCase())
33
+ ) : y, V = (e) => {
30
34
  const r = String(e);
31
- f(r), a(!!r), n(-1), s == null || s(r);
32
- }, D = (e) => {
35
+ f(r), a(!!r), l(-1), s == null || s(r);
36
+ }, k = (e) => {
37
+ if (e.isDisabled)
38
+ return;
33
39
  const r = e.value.toString();
34
- f(r), a(!1), n(-1), s == null || s(r), d == null || d(r);
35
- }, c = h && l.length > 0, S = (e) => {
40
+ f(e.label), a(!1), l(-1), s == null || s(r), d == null || d(r);
41
+ }, c = h && n.length > 0, _ = (e) => {
36
42
  if (e.key === "ArrowDown" || e.key === "ArrowUp") {
37
43
  if (e.preventDefault(), !h) {
38
- a(!0), n(
39
- e.key === "ArrowDown" ? 0 : l.length - 1
44
+ a(!0), l(
45
+ e.key === "ArrowDown" ? 0 : n.length - 1
40
46
  );
41
47
  return;
42
48
  }
43
- if (l.length === 0)
49
+ if (n.length === 0)
44
50
  return;
45
- n((r) => {
46
- const t = l.length - 1;
51
+ l((r) => {
52
+ const t = n.length - 1;
47
53
  return e.key === "ArrowDown" ? r >= t ? 0 : r + 1 : r <= 0 ? t : r - 1;
48
54
  });
49
55
  return;
50
56
  }
51
57
  if (e.key === "Enter") {
52
- const r = c ? l[i] : void 0;
53
- r && (e.preventDefault(), D(r));
58
+ const r = c ? n[i] : void 0;
59
+ r && (e.preventDefault(), k(r));
54
60
  return;
55
61
  }
56
- e.key === "Escape" && c && (e.preventDefault(), a(!1), n(-1));
62
+ e.key === "Escape" && c && (e.preventDefault(), a(!1), l(-1));
57
63
  };
58
- return /* @__PURE__ */ N("div", { ref: x, className: "relative", children: [
64
+ return /* @__PURE__ */ $("div", { ref: x, className: "relative", children: [
59
65
  /* @__PURE__ */ m(
60
- $,
66
+ K,
61
67
  {
62
- name: A,
68
+ name: g,
63
69
  value: u,
64
- onChange: F,
65
- isDisabled: g,
66
- placeholder: I,
67
- cssStyle: L,
70
+ onChange: V,
71
+ isDisabled: B,
72
+ placeholder: O,
73
+ cssStyle: S,
68
74
  role: "combobox",
69
- ariaLabel: O,
75
+ ariaLabel: F,
76
+ ariaLabelledBy: N,
70
77
  ariaAutocomplete: "list",
71
78
  ariaExpanded: c,
72
79
  ariaControls: p,
73
- ariaActivedescendant: c && i >= 0 ? b(i) : void 0,
74
- onKeyDown: S
80
+ ariaActivedescendant: c && i >= 0 ? D(i) : void 0,
81
+ onKeyDown: _
75
82
  }
76
83
  ),
77
84
  c && /* @__PURE__ */ m(
@@ -80,17 +87,17 @@ function R({
80
87
  id: p,
81
88
  role: "listbox",
82
89
  className: "absolute top-[calc(100%-var(--sp-min,0.1875rem))] left-0 z-[2] max-h-[calc(var(--bv,0.375rem)*56)] min-w-full overflow-auto rounded-[var(--radius-small,0.1875rem)] bg-white py-[var(--sp-small,0.375rem)] shadow-[0_0_6px_#33333333]",
83
- children: l.map((e, r) => /* @__PURE__ */ m(
90
+ children: n.map((e, r) => /* @__PURE__ */ m(
84
91
  "div",
85
92
  {
86
- id: b(r),
93
+ id: D(r),
87
94
  role: "option",
88
95
  "aria-selected": r === i,
89
96
  className: `block w-full cursor-pointer p-[var(--sp-medium,0.75rem)] text-left text-[length:var(--fs-small,0.6875rem)] text-[var(--link-color,#1c4ac9)] hover:bg-[var(--hover-color,#EEF7FB)] hover:transition-all hover:duration-100 ${r === i ? "bg-[var(--hover-color,#EEF7FB)]" : ""}`,
90
97
  onPointerDown: (t) => {
91
- t.preventDefault(), D(e);
98
+ t.preventDefault(), k(e);
92
99
  },
93
- onMouseEnter: () => n(r),
100
+ onMouseEnter: () => l(r),
94
101
  children: e.label
95
102
  },
96
103
  e.value
@@ -100,5 +107,5 @@ function R({
100
107
  ] });
101
108
  }
102
109
  export {
103
- R as SearchableSelectBox
110
+ z as SearchableSelectBox
104
111
  };
@@ -1,69 +1,70 @@
1
1
  "use client";
2
- import { jsxs as f, jsx as r } from "react/jsx-runtime";
2
+ import { jsxs as d, jsx as r } from "react/jsx-runtime";
3
3
  import { MESSAGES as I } from "@geckou/ui-core";
4
- import { useState as O, useRef as x, useEffect as V, Fragment as q } from "react";
5
- import { InputBox as w } from "./InputBox.js";
6
- import { ErrorMessage as D } from "./ErrorMessage.js";
4
+ import { useState as N, useRef as p, useEffect as O, Fragment as V } from "react";
5
+ import { InputBox as q } from "./InputBox.js";
6
+ import { ErrorMessage as w } from "./ErrorMessage.js";
7
7
  import { KeyboardArrowDownIcon as F } from "./icons/KeyboardArrowDownIcon.js";
8
- function p(t) {
9
- return typeof t == "object" && t !== null && "label" in t && typeof t.label == "string" && "value" in t;
8
+ function g(l) {
9
+ return typeof l == "object" && l !== null && "label" in l && typeof l.label == "string" && "value" in l;
10
10
  }
11
11
  function P({
12
- options: t,
13
- name: g,
14
- value: E,
12
+ options: l,
13
+ name: E,
14
+ value: M,
15
15
  onChange: u,
16
- cssStyle: a,
17
- placeholder: o = "選択してください",
18
- canOmitSelect: M,
19
- isDisabled: s,
20
- isRequired: m,
21
- arrow: A
16
+ cssStyle: t,
17
+ placeholder: f = "選択してください",
18
+ canOmitSelect: B,
19
+ isDisabled: m,
20
+ isRequired: v,
21
+ arrow: C
22
22
  }) {
23
- var b, h;
24
- const [B, C] = O([]), l = E ?? "", c = () => {
23
+ var b, x;
24
+ const [s, j] = N([]), a = M ?? "", o = () => {
25
25
  const e = [];
26
- l === "" && m && e.push(I.required), C(e);
27
- }, N = x(l), v = x(!1);
28
- V(() => {
29
- if (!v.current) {
30
- if (l === N.current) {
31
- l !== "" && c();
26
+ a === "" && v && e.push(I.required), j(e);
27
+ }, k = p(a), h = p(!1);
28
+ O(() => {
29
+ if (!h.current) {
30
+ if (a === k.current) {
31
+ a !== "" && o();
32
32
  return;
33
33
  }
34
- v.current = !0;
34
+ h.current = !0;
35
35
  }
36
- c();
37
- }, [l]);
38
- const j = t.flatMap(
39
- (e) => p(e) ? [e] : Object.values(e).flat()
40
- ), k = (e) => {
41
- const n = j.find(
42
- (d) => String(d.value) === e
36
+ o();
37
+ }, [a]);
38
+ const A = l.flatMap(
39
+ (e) => g(e) ? [e] : Object.values(e).flat()
40
+ ), D = (e) => {
41
+ const n = A.find(
42
+ (c) => String(c.value) === e
43
43
  );
44
44
  u == null || u(n ? n.value : e);
45
45
  };
46
- return /* @__PURE__ */ f(
47
- w,
46
+ return /* @__PURE__ */ d(
47
+ q,
48
48
  {
49
- cssStyle: a,
49
+ cssStyle: t,
50
50
  className: "inline-flex [&>select]:flex-auto [&>select]:cursor-pointer [&>select]:pe-8",
51
- isDisabled: s,
51
+ isDisabled: m,
52
+ isErrored: !!s.length,
52
53
  children: [
53
- /* @__PURE__ */ f(
54
+ /* @__PURE__ */ d(
54
55
  "select",
55
56
  {
56
- name: g,
57
- value: l,
58
- disabled: s,
59
- required: m,
60
- onChange: (e) => k(e.target.value),
61
- onBlur: () => c(),
57
+ name: E,
58
+ value: a,
59
+ disabled: m,
60
+ required: v,
61
+ "aria-invalid": s.length > 0 || void 0,
62
+ onChange: (e) => D(e.target.value),
63
+ onBlur: () => o(),
62
64
  children: [
63
- M ? /* @__PURE__ */ r("option", { value: "", children: o || "選択しない" }) : /* @__PURE__ */ r("option", { disabled: !0, value: "", children: o || "選択してください" }),
64
- ["0", "NA"].includes(l.toString()) && s && /* @__PURE__ */ r("option", { disabled: !0, value: l, children: o || "選択してください" }),
65
- t.map(
66
- (e) => p(e) ? /* @__PURE__ */ r(
65
+ B ? /* @__PURE__ */ r("option", { value: "", children: f || "選択しない" }) : /* @__PURE__ */ r("option", { disabled: !0, value: "", children: f || "選択してください" }),
66
+ l.map(
67
+ (e) => g(e) ? /* @__PURE__ */ r(
67
68
  "option",
68
69
  {
69
70
  value: e.value,
@@ -71,8 +72,8 @@ function P({
71
72
  children: e.label
72
73
  },
73
74
  e.value
74
- ) : /* @__PURE__ */ f(q, { children: [
75
- Object.entries(e).map(([n, d]) => /* @__PURE__ */ r("optgroup", { label: n, children: d.map((i) => /* @__PURE__ */ r(
75
+ ) : /* @__PURE__ */ d(V, { children: [
76
+ Object.entries(e).map(([n, c]) => /* @__PURE__ */ r("optgroup", { label: n, children: c.map((i) => /* @__PURE__ */ r(
76
77
  "option",
77
78
  {
78
79
  value: i.value,
@@ -87,14 +88,14 @@ function P({
87
88
  ]
88
89
  }
89
90
  ),
90
- /* @__PURE__ */ r("div", { className: "pointer-events-none absolute inset-y-0 end-2 flex items-center [&>*]:h-4 [&>*]:fill-current [&>*]:text-current", children: A ?? /* @__PURE__ */ r(F, {}) }),
91
+ /* @__PURE__ */ r("div", { className: "pointer-events-none absolute inset-y-0 end-2 flex items-center [&>*]:h-4 [&>*]:fill-current [&>*]:text-current", children: C ?? /* @__PURE__ */ r(F, {}) }),
91
92
  /* @__PURE__ */ r(
92
- D,
93
+ w,
93
94
  {
94
- errorMessages: B,
95
+ errorMessages: s,
95
96
  cssStyle: {
96
- textColor: (b = a == null ? void 0 : a.error) == null ? void 0 : b.backgroundColor,
97
- backgroundColor: (h = a == null ? void 0 : a.error) == null ? void 0 : h.textColor
97
+ textColor: (b = t == null ? void 0 : t.error) == null ? void 0 : b.backgroundColor,
98
+ backgroundColor: (x = t == null ? void 0 : t.error) == null ? void 0 : x.textColor
98
99
  }
99
100
  }
100
101
  )
@@ -1,11 +1,11 @@
1
1
  "use client";
2
2
  import { jsxs as v, jsx as i } from "react/jsx-runtime";
3
- import { useState as a, useRef as h, useImperativeHandle as E, useEffect as l } from "react";
3
+ import { useState as a, useRef as p, useImperativeHandle as E, useEffect as l } from "react";
4
4
  import { KeyboardArrowDownIcon as I } from "./icons/KeyboardArrowDownIcon.js";
5
5
  import { COLOR as N } from "@geckou/ui-core";
6
6
  function $({
7
7
  isOpened: n = null,
8
- isHiddenArrow: p = !1,
8
+ isHiddenArrow: h = !1,
9
9
  isDisabled: b = !1,
10
10
  isDisableClickOutside: f = !1,
11
11
  duration: c = 0.3,
@@ -13,7 +13,7 @@ function $({
13
13
  children: w,
14
14
  ref: x
15
15
  }) {
16
- const [t, r] = a(n || !1), [C, u] = a(n || !1), [y, H] = a(0), d = h(null), m = h(null), R = () => r((e) => !e);
16
+ const [t, r] = a(n || !1), [C, u] = a(n || !1), [y, k] = a(0), d = p(null), m = p(null), H = () => r((e) => !e);
17
17
  E(x, () => ({
18
18
  isOpenedContents: () => t,
19
19
  close: () => r(!1)
@@ -31,7 +31,7 @@ function $({
31
31
  const e = m.current;
32
32
  if (!e)
33
33
  return;
34
- const s = () => H(e.clientHeight);
34
+ const s = () => k(e.clientHeight);
35
35
  s();
36
36
  const o = new ResizeObserver(s);
37
37
  return o.observe(e), () => o.disconnect();
@@ -43,8 +43,8 @@ function $({
43
43
  const e = setTimeout(() => u(!0), c * 1e3);
44
44
  return () => clearTimeout(e);
45
45
  }, [t, c]);
46
- const k = { "--link-color": N.blue };
47
- return /* @__PURE__ */ v("div", { ref: d, style: k, children: [
46
+ const R = { "--link-color": N.blue };
47
+ return /* @__PURE__ */ v("div", { ref: d, style: R, children: [
48
48
  /* @__PURE__ */ v(
49
49
  "button",
50
50
  {
@@ -53,11 +53,11 @@ function $({
53
53
  "aria-expanded": t,
54
54
  className: "relative grid w-full cursor-pointer grid-cols-[1fr_auto] items-center justify-items-start text-(--link-color)",
55
55
  onClick: (e) => {
56
- e.preventDefault(), R();
56
+ e.preventDefault(), H();
57
57
  },
58
58
  children: [
59
- /* @__PURE__ */ i("div", { className: "w-full text-left", children: g }),
60
- !p && /* @__PURE__ */ i(
59
+ /* @__PURE__ */ i("span", { className: "block w-full text-left", children: g }),
60
+ !h && /* @__PURE__ */ i(
61
61
  I,
62
62
  {
63
63
  className: `size-[var(--icon-medium,1.125rem)] flex-none text-(--link-color) transition-all duration-100 ${t ? "rotate-180" : ""}`
@@ -1,68 +1,76 @@
1
1
  "use client";
2
- import { jsxs as j, jsx as p } from "react/jsx-runtime";
3
- import { isEmptyValue as k, validateInputValue as B } from "@geckou/ui-core";
4
- import { useState as I, useRef as n, useEffect as A } from "react";
5
- import { InputBox as H } from "./InputBox.js";
6
- import { ErrorMessage as N } from "./ErrorMessage.js";
7
- function z({
8
- name: d,
9
- value: s,
10
- onChange: o,
2
+ import { jsxs as H, jsx as h } from "react/jsx-runtime";
3
+ import { isEmptyValue as M, validateInputValue as T } from "@geckou/ui-core";
4
+ import { useState as j, useRef as m, useEffect as k } from "react";
5
+ import { InputBox as I } from "./InputBox.js";
6
+ import { ErrorMessage as W } from "./ErrorMessage.js";
7
+ function z(n) {
8
+ const e = getComputedStyle(n), t = (...r) => r.reduce((a, i) => a + (parseFloat(i) || 0), 0);
9
+ return e.boxSizing === "border-box" ? n.scrollHeight + t(e.borderTopWidth, e.borderBottomWidth) : n.scrollHeight - t(e.paddingTop, e.paddingBottom);
10
+ }
11
+ function q({
12
+ name: n,
13
+ value: e,
14
+ onChange: t,
11
15
  cssStyle: r,
12
- placeholder: x = "入力してください",
16
+ placeholder: a = "入力してください",
13
17
  isDisabled: i,
14
- isRequired: l,
15
- rows: g,
16
- maxLength: h = 100,
18
+ isRequired: p,
19
+ rows: x,
20
+ maxLength: b = 100,
17
21
  autocomplete: v = "off",
18
22
  validates: E = [],
19
23
  autoAdjustHeight: V
20
24
  }) {
21
- var m, c;
22
- const [u, C] = I([]), t = n(null), e = s ?? "", a = () => {
23
- C(B(e, { isRequired: l, validates: E }));
24
- }, M = n(e), f = n(!1);
25
- return A(() => {
26
- if (V && t.current && (t.current.style.height = "auto", t.current.style.height = `calc(${t.current.scrollHeight}px - 2rem)`), !f.current) {
27
- if (e === M.current) {
28
- k(e) || a();
25
+ var c, g;
26
+ const [l, B] = j([]), d = m(null), o = e ?? "", f = () => {
27
+ B(T(o, { isRequired: p, validates: E }));
28
+ }, C = m(o), s = m(!1);
29
+ return k(() => {
30
+ if (V && d.current) {
31
+ const u = d.current;
32
+ u.style.height = "auto", u.style.height = `${z(u)}px`;
33
+ }
34
+ if (!s.current) {
35
+ if (o === C.current) {
36
+ M(o) || f();
29
37
  return;
30
38
  }
31
- f.current = !0;
39
+ s.current = !0;
32
40
  }
33
- a();
34
- }, [e]), /* @__PURE__ */ j(
35
- H,
41
+ f();
42
+ }, [o]), /* @__PURE__ */ H(
43
+ I,
36
44
  {
37
45
  cssStyle: r,
38
46
  className: "min-h-[4em]",
39
- isErrored: !!u.length,
47
+ isErrored: !!l.length,
40
48
  isDisabled: i,
41
49
  children: [
42
- /* @__PURE__ */ p(
50
+ /* @__PURE__ */ h(
43
51
  "textarea",
44
52
  {
45
- ref: t,
46
- name: d,
47
- value: e,
48
- required: l,
49
- placeholder: x,
53
+ ref: d,
54
+ name: n,
55
+ value: o,
56
+ required: p,
57
+ placeholder: a,
50
58
  disabled: i,
51
59
  autoComplete: v,
52
- rows: g,
53
- maxLength: h,
54
- "aria-invalid": u.length ? "true" : void 0,
55
- onChange: (b) => o == null ? void 0 : o(b.target.value),
56
- onBlur: () => a()
60
+ rows: x,
61
+ maxLength: b,
62
+ "aria-invalid": l.length ? "true" : void 0,
63
+ onChange: (u) => t == null ? void 0 : t(u.target.value),
64
+ onBlur: () => f()
57
65
  }
58
66
  ),
59
- /* @__PURE__ */ p(
60
- N,
67
+ /* @__PURE__ */ h(
68
+ W,
61
69
  {
62
- errorMessages: u,
70
+ errorMessages: l,
63
71
  cssStyle: {
64
- textColor: (m = r == null ? void 0 : r.error) == null ? void 0 : m.backgroundColor,
65
- backgroundColor: (c = r == null ? void 0 : r.error) == null ? void 0 : c.textColor
72
+ textColor: (c = r == null ? void 0 : r.error) == null ? void 0 : c.backgroundColor,
73
+ backgroundColor: (g = r == null ? void 0 : r.error) == null ? void 0 : g.textColor
66
74
  }
67
75
  }
68
76
  )
@@ -71,5 +79,5 @@ function z({
71
79
  );
72
80
  }
73
81
  export {
74
- z as TextArea
82
+ q as TextArea
75
83
  };
@@ -23,11 +23,13 @@ type Props = {
23
23
  */
24
24
  role?: string;
25
25
  ariaLabel?: string;
26
+ /** 可視ラベルがあるなら、その要素の id をここで指す(ariaLabel より優先) */
27
+ ariaLabelledBy?: string;
26
28
  ariaExpanded?: boolean;
27
29
  ariaControls?: string;
28
30
  ariaActivedescendant?: string;
29
31
  ariaAutocomplete?: 'none' | 'inline' | 'list' | 'both';
30
32
  onKeyDown?: (event: KeyboardEvent<HTMLInputElement>) => void;
31
33
  };
32
- export declare function TextBox({ name, value, onChange, cssStyle, inputType, placeholder, isDisabled, isRequired, maxLength, autocomplete, validates, before, after, id, role, ariaLabel, ariaExpanded, ariaControls, ariaActivedescendant, ariaAutocomplete, onKeyDown, }: Props): import("react").JSX.Element;
34
+ export declare function TextBox({ name, value, onChange, cssStyle, inputType, placeholder, isDisabled, isRequired, maxLength, autocomplete, validates, before, after, id, role, ariaLabel, ariaLabelledBy, ariaExpanded, ariaControls, ariaActivedescendant, ariaAutocomplete, onKeyDown, }: Props): import("react").JSX.Element;
33
35
  export {};