@serendie/ui 2.2.2 → 2.2.3-dev.202510020518

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.
@@ -3,6 +3,7 @@ interface DatePickerProps extends DatePickerRootProps {
3
3
  placeholder?: string;
4
4
  label?: string;
5
5
  required?: boolean;
6
+ requiredLabel?: string;
6
7
  invalid?: boolean;
7
8
  invalidMessage?: string;
8
9
  startPlaceholder?: string;
@@ -1,81 +1,82 @@
1
- import { jsx as e, jsxs as a, Fragment as y } from "react/jsx-runtime";
2
- import { SerendieSymbolCalendar as R, SerendieSymbolArrowRight as F, SerendieSymbolChevronDown as I, SerendieSymbolChevronLeft as W, SerendieSymbolChevronRight as O } from "@serendie/symbols";
3
- import { forwardRef as j, useState as H } from "react";
4
- import { datePickerStyles as C } from "./styles.js";
5
- import { textFieldRecipe as A } from "../../styled-system/recipes/text-field-recipe.js";
6
- import { Portal as L } from "../../node_modules/@ark-ui/react/dist/components/portal/portal.js";
7
- import { DatePickerRoot as k } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-root.js";
8
- import { DatePickerLabel as V } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-label.js";
9
- import { DatePickerControl as q } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-control.js";
10
- import { cx as p } from "../../styled-system/css/cx.js";
11
- import { DatePickerTrigger as B } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-trigger.js";
1
+ import { jsx as e, jsxs as a, Fragment as C } from "react/jsx-runtime";
2
+ import { SerendieSymbolCalendar as F, SerendieSymbolArrowRight as I, SerendieSymbolChevronDown as W, SerendieSymbolChevronLeft as O, SerendieSymbolChevronRight as j } from "@serendie/symbols";
3
+ import { forwardRef as H, useState as A } from "react";
4
+ import { datePickerStyles as v } from "./styles.js";
5
+ import { textFieldRecipe as L } from "../../styled-system/recipes/text-field-recipe.js";
6
+ import { Portal as V } from "../../node_modules/@ark-ui/react/dist/components/portal/portal.js";
7
+ import { DatePickerRoot as D } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-root.js";
8
+ import { DatePickerLabel as q } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-label.js";
9
+ import { DatePickerControl as B } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-control.js";
10
+ import { cx as h } from "../../styled-system/css/cx.js";
11
+ import { DatePickerTrigger as J } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-trigger.js";
12
12
  import { css as t } from "../../styled-system/css/css.js";
13
- import { DatePickerInput as h } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-input.js";
14
- import { DatePickerPositioner as J } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-positioner.js";
15
- import { DatePickerContent as Y } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-content.js";
16
- import { DatePickerView as _ } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-view.js";
17
- import { DatePickerContext as z } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-context.js";
18
- import { DatePickerViewControl as E } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-view-control.js";
19
- import { DatePickerYearSelect as G } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-year-select.js";
20
- import { DatePickerPrevTrigger as K } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-prev-trigger.js";
21
- import { DatePickerMonthSelect as Q } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-month-select.js";
22
- import { DatePickerNextTrigger as U } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-next-trigger.js";
23
- import { DatePickerTable as X } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table.js";
24
- import { DatePickerTableHead as Z } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-head.js";
25
- import { DatePickerTableRow as D } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-row.js";
26
- import { DatePickerTableHeader as $ } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-header.js";
27
- import { DatePickerTableBody as M } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-body.js";
28
- import { DatePickerTableCell as ee } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-cell.js";
29
- import { DatePickerTableCellTrigger as re } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-cell-trigger.js";
30
- const Ie = j(
13
+ import { DatePickerInput as f } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-input.js";
14
+ import { DatePickerPositioner as Y } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-positioner.js";
15
+ import { DatePickerContent as _ } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-content.js";
16
+ import { DatePickerView as z } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-view.js";
17
+ import { DatePickerContext as E } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-context.js";
18
+ import { DatePickerViewControl as G } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-view-control.js";
19
+ import { DatePickerYearSelect as K } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-year-select.js";
20
+ import { DatePickerPrevTrigger as Q } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-prev-trigger.js";
21
+ import { DatePickerMonthSelect as U } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-month-select.js";
22
+ import { DatePickerNextTrigger as X } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-next-trigger.js";
23
+ import { DatePickerTable as Z } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table.js";
24
+ import { DatePickerTableHead as $ } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-head.js";
25
+ import { DatePickerTableRow as b } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-row.js";
26
+ import { DatePickerTableHeader as M } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-header.js";
27
+ import { DatePickerTableBody as ee } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-body.js";
28
+ import { DatePickerTableCell as re } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-cell.js";
29
+ import { DatePickerTableCellTrigger as ie } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-cell-trigger.js";
30
+ const We = H(
31
31
  ({
32
32
  placeholder: r = "日付を選択",
33
- label: l,
34
- required: m,
35
- invalid: o,
36
- invalidMessage: n,
37
- selectionMode: s = "single",
38
- startPlaceholder: v = "開始日",
39
- endPlaceholder: x = "終了日",
40
- locale: f = "ja-JP",
41
- isCalendarOnly: S = !1,
42
- ...c
43
- }, N) => {
44
- const T = C(), i = A(), [g, d] = H(!1), w = s === "range";
45
- return S ? /* @__PURE__ */ e(
46
- k,
33
+ label: o,
34
+ required: l,
35
+ requiredLabel: m,
36
+ invalid: n,
37
+ invalidMessage: c,
38
+ selectionMode: p = "single",
39
+ startPlaceholder: x = "開始日",
40
+ endPlaceholder: S = "終了日",
41
+ locale: N = "ja-JP",
42
+ isCalendarOnly: T = !1,
43
+ ...s
44
+ }, g) => {
45
+ const w = v(), i = L(), [u, d] = A(!1), R = p === "range";
46
+ return T ? /* @__PURE__ */ e(
47
+ D,
47
48
  {
48
- locale: f,
49
- ...c,
50
- ref: N,
51
- selectionMode: s,
49
+ locale: N,
50
+ ...s,
51
+ ref: g,
52
+ selectionMode: p,
52
53
  open: !0,
53
54
  className: i.root,
54
- children: /* @__PURE__ */ e(b, {})
55
+ children: /* @__PURE__ */ e(y, {})
55
56
  }
56
57
  ) : /* @__PURE__ */ a(
57
- k,
58
+ D,
58
59
  {
59
- locale: f,
60
- ...c,
61
- ref: N,
62
- selectionMode: s,
60
+ locale: N,
61
+ ...s,
62
+ ref: g,
63
+ selectionMode: p,
63
64
  className: i.root,
64
- open: g,
65
- onOpenChange: (u) => {
66
- var P;
67
- d(u.open), (P = c.onOpenChange) == null || P.call(c, u);
65
+ open: u,
66
+ onOpenChange: (P) => {
67
+ var k;
68
+ d(P.open), (k = s.onOpenChange) == null || k.call(s, P);
68
69
  },
69
70
  children: [
70
- /* @__PURE__ */ a(y, { children: [
71
- l && /* @__PURE__ */ a(V, { className: i.label, children: [
72
- l,
73
- m && /* @__PURE__ */ e("span", { className: i.labelRequired, children: "必須" })
71
+ /* @__PURE__ */ a(C, { children: [
72
+ o && /* @__PURE__ */ a(q, { className: i.label, children: [
73
+ o,
74
+ l && /* @__PURE__ */ e("span", { className: i.labelRequired, children: m ?? "必須" })
74
75
  ] }),
75
76
  /* @__PURE__ */ a(
76
- q,
77
+ B,
77
78
  {
78
- className: p(
79
+ className: h(
79
80
  i.inputWrapper,
80
81
  t({
81
82
  _expanded: {
@@ -84,11 +85,11 @@ const Ie = j(
84
85
  }
85
86
  })
86
87
  ),
87
- "data-expanded": g ? !0 : void 0,
88
- "data-Invalid": o,
88
+ "data-expanded": u ? !0 : void 0,
89
+ "data-Invalid": n,
89
90
  children: [
90
- /* @__PURE__ */ e("div", { className: i.leftContent, children: /* @__PURE__ */ e(B, { className: t({ display: "flex" }), children: /* @__PURE__ */ e(R, {}) }) }),
91
- w ? /* @__PURE__ */ a(
91
+ /* @__PURE__ */ e("div", { className: i.leftContent, children: /* @__PURE__ */ e(J, { className: t({ display: "flex" }), children: /* @__PURE__ */ e(F, {}) }) }),
92
+ R ? /* @__PURE__ */ a(
92
93
  "div",
93
94
  {
94
95
  className: t({
@@ -98,11 +99,11 @@ const Ie = j(
98
99
  }),
99
100
  children: [
100
101
  /* @__PURE__ */ e(
101
- h,
102
+ f,
102
103
  {
103
104
  index: 0,
104
- placeholder: v,
105
- className: p(
105
+ placeholder: x,
106
+ className: h(
106
107
  i.input,
107
108
  t({
108
109
  minWidth: "100%",
@@ -112,13 +113,13 @@ const Ie = j(
112
113
  onFocus: () => d(!0)
113
114
  }
114
115
  ),
115
- /* @__PURE__ */ e(F, {}),
116
+ /* @__PURE__ */ e(I, {}),
116
117
  /* @__PURE__ */ e(
117
- h,
118
+ f,
118
119
  {
119
120
  index: 1,
120
- placeholder: x,
121
- className: p(
121
+ placeholder: S,
122
+ className: h(
122
123
  i.input,
123
124
  t({
124
125
  minWidth: "100%",
@@ -131,7 +132,7 @@ const Ie = j(
131
132
  ]
132
133
  }
133
134
  ) : /* @__PURE__ */ e(
134
- h,
135
+ f,
135
136
  {
136
137
  placeholder: r,
137
138
  className: i.input,
@@ -142,25 +143,25 @@ const Ie = j(
142
143
  ]
143
144
  }
144
145
  ),
145
- o && n && /* @__PURE__ */ e("div", { className: i.messageField, children: /* @__PURE__ */ e("p", { className: i.invalidMessage, children: n }) })
146
+ n && c && /* @__PURE__ */ e("div", { className: i.messageField, children: /* @__PURE__ */ e("p", { className: i.invalidMessage, children: c }) })
146
147
  ] }),
147
- /* @__PURE__ */ e(L, { children: /* @__PURE__ */ e(J, { className: T.positioner, children: /* @__PURE__ */ e(b, {}) }) })
148
+ /* @__PURE__ */ e(V, { children: /* @__PURE__ */ e(Y, { className: w.positioner, children: /* @__PURE__ */ e(y, {}) }) })
148
149
  ]
149
150
  }
150
151
  );
151
152
  }
152
- ), b = () => {
153
- const r = C();
154
- return /* @__PURE__ */ e(Y, { className: r.content, children: /* @__PURE__ */ e(_, { view: "day", className: r.view, children: /* @__PURE__ */ e(z, { children: (l) => /* @__PURE__ */ a(y, { children: [
155
- /* @__PURE__ */ a(E, { className: r.viewControl, children: [
153
+ ), y = () => {
154
+ const r = v();
155
+ return /* @__PURE__ */ e(_, { className: r.content, children: /* @__PURE__ */ e(z, { view: "day", className: r.view, children: /* @__PURE__ */ e(E, { children: (o) => /* @__PURE__ */ a(C, { children: [
156
+ /* @__PURE__ */ a(G, { className: r.viewControl, children: [
156
157
  /* @__PURE__ */ a("div", { className: r.selectWrapper, children: [
157
- /* @__PURE__ */ e(G, { className: r.select }),
158
- /* @__PURE__ */ e(I, { className: r.selectIcon })
158
+ /* @__PURE__ */ e(K, { className: r.select }),
159
+ /* @__PURE__ */ e(W, { className: r.selectIcon })
159
160
  ] }),
160
161
  /* @__PURE__ */ a("div", { className: t({ display: "flex", alignItems: "center" }), children: [
161
- /* @__PURE__ */ e(K, { className: r.prevTrigger, children: /* @__PURE__ */ e(W, {}) }),
162
+ /* @__PURE__ */ e(Q, { className: r.prevTrigger, children: /* @__PURE__ */ e(O, {}) }),
162
163
  /* @__PURE__ */ e(
163
- Q,
164
+ U,
164
165
  {
165
166
  className: t({
166
167
  appearance: "none",
@@ -168,36 +169,36 @@ const Ie = j(
168
169
  })
169
170
  }
170
171
  ),
171
- /* @__PURE__ */ e(U, { className: r.nextTrigger, children: /* @__PURE__ */ e(O, {}) })
172
+ /* @__PURE__ */ e(X, { className: r.nextTrigger, children: /* @__PURE__ */ e(j, {}) })
172
173
  ] })
173
174
  ] }),
174
- /* @__PURE__ */ a(X, { className: r.table, children: [
175
- /* @__PURE__ */ e(Z, { children: /* @__PURE__ */ e(D, { children: l.weekDays.map((m, o) => /* @__PURE__ */ e(
176
- $,
175
+ /* @__PURE__ */ a(Z, { className: r.table, children: [
176
+ /* @__PURE__ */ e($, { children: /* @__PURE__ */ e(b, { children: o.weekDays.map((l, m) => /* @__PURE__ */ e(
177
+ M,
177
178
  {
178
179
  className: r.tableHeader,
179
- children: m.narrow
180
+ children: l.narrow
180
181
  },
181
- o
182
+ m
182
183
  )) }) }),
183
- /* @__PURE__ */ e(M, { children: l.weeks.map((m, o) => /* @__PURE__ */ e(D, { children: m.map((n, s) => /* @__PURE__ */ e(
184
- ee,
184
+ /* @__PURE__ */ e(ee, { children: o.weeks.map((l, m) => /* @__PURE__ */ e(b, { children: l.map((n, c) => /* @__PURE__ */ e(
185
+ re,
185
186
  {
186
187
  value: n,
187
188
  className: r.tableCell,
188
189
  children: /* @__PURE__ */ e(
189
- re,
190
+ ie,
190
191
  {
191
192
  className: r.tableCellTrigger,
192
193
  children: n.day
193
194
  }
194
195
  )
195
196
  },
196
- s
197
- )) }, o)) })
197
+ c
198
+ )) }, m)) })
198
199
  ] })
199
200
  ] }) }) }) });
200
201
  };
201
202
  export {
202
- Ie as DatePicker
203
+ We as DatePicker
203
204
  };
@@ -54,6 +54,7 @@ type Props = {
54
54
  placeholder?: string;
55
55
  label?: string;
56
56
  required?: boolean;
57
+ requiredLabel?: string;
57
58
  invalidMessage?: string;
58
59
  items?: selectItem[];
59
60
  collection?: SelectRootProps<selectItem>["collection"];
@@ -1,21 +1,21 @@
1
1
  import { jsxs as i, jsx as e } from "react/jsx-runtime";
2
- import { SerendieSymbolChevronDown as S } from "@serendie/symbols";
3
- import { List as f } from "../List/List.js";
4
- import { ListItem as v } from "../List/ListItem.js";
5
- import { createListCollection as w } from "../../node_modules/@ark-ui/react/dist/components/collection/list-collection.js";
6
- import { Portal as _ } from "../../node_modules/@ark-ui/react/dist/components/portal/portal.js";
7
- import { sva as C } from "../../styled-system/css/sva.js";
8
- import { SelectRoot as T } from "../../node_modules/@ark-ui/react/dist/components/select/select-root.js";
9
- import { cx as N } from "../../styled-system/css/cx.js";
10
- import { SelectLabel as z } from "../../node_modules/@ark-ui/react/dist/components/select/select-label.js";
2
+ import { SerendieSymbolChevronDown as f } from "@serendie/symbols";
3
+ import { List as v } from "../List/List.js";
4
+ import { ListItem as w } from "../List/ListItem.js";
5
+ import { createListCollection as _ } from "../../node_modules/@ark-ui/react/dist/components/collection/list-collection.js";
6
+ import { Portal as C } from "../../node_modules/@ark-ui/react/dist/components/portal/portal.js";
7
+ import { sva as T } from "../../styled-system/css/sva.js";
8
+ import { SelectRoot as N } from "../../node_modules/@ark-ui/react/dist/components/select/select-root.js";
9
+ import { cx as z } from "../../styled-system/css/cx.js";
10
+ import { SelectLabel as R } from "../../node_modules/@ark-ui/react/dist/components/select/select-label.js";
11
11
  import { css as d } from "../../styled-system/css/css.js";
12
- import { SelectControl as R } from "../../node_modules/@ark-ui/react/dist/components/select/select-control.js";
13
- import { SelectTrigger as V } from "../../node_modules/@ark-ui/react/dist/components/select/select-trigger.js";
14
- import { SelectValueText as L } from "../../node_modules/@ark-ui/react/dist/components/select/select-value-text.js";
15
- import { SelectPositioner as P } from "../../node_modules/@ark-ui/react/dist/components/select/select-positioner.js";
16
- import { SelectContent as B } from "../../node_modules/@ark-ui/react/dist/components/select/select-content.js";
17
- import { SelectItem as I } from "../../node_modules/@ark-ui/react/dist/components/select/select-item.js";
18
- const n = C({
12
+ import { SelectControl as V } from "../../node_modules/@ark-ui/react/dist/components/select/select-control.js";
13
+ import { SelectTrigger as L } from "../../node_modules/@ark-ui/react/dist/components/select/select-trigger.js";
14
+ import { SelectValueText as P } from "../../node_modules/@ark-ui/react/dist/components/select/select-value-text.js";
15
+ import { SelectPositioner as B } from "../../node_modules/@ark-ui/react/dist/components/select/select-positioner.js";
16
+ import { SelectContent as I } from "../../node_modules/@ark-ui/react/dist/components/select/select-content.js";
17
+ import { SelectItem as O } from "../../node_modules/@ark-ui/react/dist/components/select/select-item.js";
18
+ const n = T({
19
19
  slots: ["root", "valueText", "trigger", "content", "item", "iconBox"],
20
20
  base: {
21
21
  root: {
@@ -152,28 +152,29 @@ const n = C({
152
152
  defaultVariants: {
153
153
  size: "medium"
154
154
  }
155
- }), $ = ({
155
+ }), M = ({
156
156
  placeholder: c = "",
157
157
  label: r,
158
158
  required: p,
159
+ requiredLabel: y,
159
160
  invalid: a,
160
161
  invalidMessage: m,
161
- className: y,
162
- items: g = [],
163
- ...u
162
+ className: g,
163
+ items: u = [],
164
+ ...x
164
165
  }) => {
165
- const [t, x] = n.splitVariantProps(u), o = n(t), { collection: O, ...h } = x, l = w({
166
- items: g,
166
+ const [t, h] = n.splitVariantProps(x), o = n(t), { collection: j, ...b } = h, l = _({
167
+ items: u,
167
168
  itemToString: (s) => s.label,
168
169
  itemToValue: (s) => s.value
169
170
  });
170
171
  return /* @__PURE__ */ i(
171
- T,
172
+ N,
172
173
  {
173
- ...h,
174
+ ...b,
174
175
  collection: l,
175
176
  invalid: a,
176
- className: N(o.root, y),
177
+ className: z(o.root, g),
177
178
  positioning: {
178
179
  sameWidth: !0,
179
180
  offset: {
@@ -184,7 +185,7 @@ const n = C({
184
185
  children: [
185
186
  r && t.size != "small" && // smallの場合はラベルを表示しない
186
187
  /* @__PURE__ */ i(
187
- z,
188
+ R,
188
189
  {
189
190
  className: d({
190
191
  textStyle: {
@@ -194,29 +195,28 @@ const n = C({
194
195
  }),
195
196
  children: [
196
197
  r,
197
- p && // とりあえず必須メッセージはハードコード
198
- /* @__PURE__ */ e(
198
+ p && /* @__PURE__ */ e(
199
199
  "span",
200
200
  {
201
201
  className: d({
202
202
  pl: "sd.system.dimension.spacing.extraSmall",
203
203
  color: "sd.system.color.impression.negative"
204
204
  }),
205
- children: "必須"
205
+ children: y ?? "必須"
206
206
  }
207
207
  )
208
208
  ]
209
209
  }
210
210
  ),
211
- /* @__PURE__ */ e(R, { children: /* @__PURE__ */ i(V, { className: o.trigger, children: [
211
+ /* @__PURE__ */ e(V, { children: /* @__PURE__ */ i(L, { className: o.trigger, children: [
212
212
  /* @__PURE__ */ e(
213
- L,
213
+ P,
214
214
  {
215
215
  placeholder: c,
216
216
  className: o.valueText
217
217
  }
218
218
  ),
219
- /* @__PURE__ */ e(S, { className: o.iconBox })
219
+ /* @__PURE__ */ e(f, { className: o.iconBox })
220
220
  ] }) }),
221
221
  a && m && /* @__PURE__ */ e(
222
222
  "div",
@@ -231,20 +231,20 @@ const n = C({
231
231
  children: m
232
232
  }
233
233
  ),
234
- /* @__PURE__ */ e(_, { children: /* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(B, { className: o.content, children: /* @__PURE__ */ e(f, { children: l.items.map((s, b) => /* @__PURE__ */ e(I, { item: s, children: /* @__PURE__ */ e(
235
- v,
234
+ /* @__PURE__ */ e(C, { children: /* @__PURE__ */ e(B, { children: /* @__PURE__ */ e(I, { className: o.content, children: /* @__PURE__ */ e(v, { children: l.items.map((s, S) => /* @__PURE__ */ e(O, { item: s, children: /* @__PURE__ */ e(
235
+ w,
236
236
  {
237
237
  title: s.label,
238
238
  value: s.value,
239
239
  className: o.item,
240
240
  size: t.size == "small" ? "small" : void 0
241
241
  }
242
- ) }, b)) }) }) }) })
242
+ ) }, S)) }) }) }) })
243
243
  ]
244
244
  }
245
245
  );
246
246
  };
247
247
  export {
248
- $ as Select,
248
+ M as Select,
249
249
  n as SelectStyle
250
250
  };
@@ -5,4 +5,5 @@ export declare const TextArea: React.ForwardRefExoticComponent<{
5
5
  invalid?: boolean;
6
6
  invalidMessage?: string;
7
7
  autoAdjustHeight?: boolean;
8
+ requiredLabel?: string;
8
9
  } & Omit<React.DetailedHTMLProps<React.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "ref"> & React.RefAttributes<HTMLTextAreaElement>>;
@@ -1,9 +1,9 @@
1
1
  import { jsxs as i, jsx as s } from "react/jsx-runtime";
2
- import v from "../../node_modules/merge-refs/dist/esm/index.js";
3
- import c, { forwardRef as _ } from "react";
4
- import { sva as w } from "../../styled-system/css/sva.js";
5
- import { cx as C } from "../../styled-system/css/cx.js";
6
- const p = w({
2
+ import _ from "../../node_modules/merge-refs/dist/esm/index.js";
3
+ import c, { forwardRef as w } from "react";
4
+ import { sva as C } from "../../styled-system/css/sva.js";
5
+ import { cx as N } from "../../styled-system/css/cx.js";
6
+ const p = C({
7
7
  slots: [
8
8
  "root",
9
9
  "label",
@@ -95,23 +95,24 @@ const p = w({
95
95
  }
96
96
  }
97
97
  }
98
- }), A = _(
98
+ }), W = w(
99
99
  ({
100
100
  placeholder: y,
101
101
  label: r,
102
102
  description: t,
103
103
  required: d,
104
+ requiredLabel: u,
104
105
  invalidMessage: o,
105
106
  invalid: a,
106
107
  disabled: n,
107
- className: u,
108
+ className: g,
108
109
  ...l
109
- }, g) => {
110
- const x = c.useRef(null), h = v(x, g), [b, f] = p.splitVariantProps(l), e = p(b), S = t || a && o, m = l.id || c.useId();
111
- return /* @__PURE__ */ i("div", { className: C(e.root, u), children: [
110
+ }, x) => {
111
+ const h = c.useRef(null), b = _(h, x), [f, S] = p.splitVariantProps(l), e = p(f), v = t || a && o, m = l.id || c.useId();
112
+ return /* @__PURE__ */ i("div", { className: N(e.root, g), children: [
112
113
  r ? /* @__PURE__ */ i("label", { className: e.label, htmlFor: m, children: [
113
114
  r,
114
- d && /* @__PURE__ */ s("span", { className: e.required, children: "必須" })
115
+ d && /* @__PURE__ */ s("span", { className: e.required, children: u ?? "必須" })
115
116
  ] }) : null,
116
117
  /* @__PURE__ */ s(
117
118
  "div",
@@ -122,18 +123,18 @@ const p = w({
122
123
  children: /* @__PURE__ */ s(
123
124
  "textarea",
124
125
  {
125
- ref: h,
126
+ ref: b,
126
127
  id: m,
127
128
  placeholder: y,
128
129
  required: d,
129
130
  disabled: n,
130
131
  className: e.textarea,
131
- ...f
132
+ ...S
132
133
  }
133
134
  )
134
135
  }
135
136
  ),
136
- S && /* @__PURE__ */ i("div", { className: e.messageField, children: [
137
+ v && /* @__PURE__ */ i("div", { className: e.messageField, children: [
137
138
  t && /* @__PURE__ */ s("p", { className: e.description, children: t }),
138
139
  a && o && /* @__PURE__ */ s("p", { className: e.invalidMessage, children: o })
139
140
  ] })
@@ -141,5 +142,5 @@ const p = w({
141
142
  }
142
143
  );
143
144
  export {
144
- A as TextArea
145
+ W as TextArea
145
146
  };
@@ -6,4 +6,5 @@ export declare const TextField: React.ForwardRefExoticComponent<{
6
6
  invalidMessage?: string;
7
7
  leftContent?: React.ReactNode;
8
8
  rightContent?: React.ReactNode;
9
+ requiredLabel?: string;
9
10
  } & Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
@@ -1,40 +1,41 @@
1
1
  import { jsxs as r, jsx as e } from "react/jsx-runtime";
2
- import { SerendieSymbolAlertCircle as A, SerendieSymbolClose as T } from "@serendie/symbols";
3
- import W from "../../node_modules/merge-refs/dist/esm/index.js";
4
- import m, { forwardRef as q } from "react";
2
+ import { SerendieSymbolAlertCircle as T, SerendieSymbolClose as W } from "@serendie/symbols";
3
+ import q from "../../node_modules/merge-refs/dist/esm/index.js";
4
+ import m, { forwardRef as z } from "react";
5
5
  import { textFieldRecipe as x } from "../../styled-system/recipes/text-field-recipe.js";
6
- import { cx as z } from "../../styled-system/css/cx.js";
6
+ import { cx as B } from "../../styled-system/css/cx.js";
7
7
  import { css as b } from "../../styled-system/css/css.js";
8
- const L = q(
8
+ const M = z(
9
9
  ({
10
10
  placeholder: F,
11
11
  label: d,
12
12
  description: i,
13
13
  required: u,
14
+ requiredLabel: S,
14
15
  invalidMessage: c,
15
16
  invalid: a,
16
- type: S = "text",
17
+ type: V = "text",
17
18
  disabled: n,
18
19
  onChange: h,
19
20
  value: f,
20
- className: V,
21
+ className: w,
21
22
  leftContent: N,
22
23
  rightContent: p,
23
24
  ...l
24
- }, w) => {
25
- const o = m.useRef(null), y = W(o, w), [C, P] = x.splitVariantProps(l), t = x(C), _ = i || a && c, [j, I] = m.useState(l.defaultValue || f), v = l.id || m.useId(), k = () => {
25
+ }, y) => {
26
+ const o = m.useRef(null), C = q(o, y), [P, _] = x.splitVariantProps(l), t = x(P), j = i || a && c, [I, k] = m.useState(l.defaultValue || f), v = l.id || m.useId(), A = () => {
26
27
  var R;
27
28
  const s = {
28
29
  target: { value: "" }
29
30
  };
30
31
  g(s), (R = l.onReset) == null || R.call(l, s), o.current && (o.current.value = "");
31
32
  }, g = (s) => {
32
- I(s.target.value), h && h(s);
33
+ k(s.target.value), h && h(s);
33
34
  };
34
- return /* @__PURE__ */ r("div", { className: z(t.root, V), children: [
35
+ return /* @__PURE__ */ r("div", { className: B(t.root, w), children: [
35
36
  d ? /* @__PURE__ */ r("label", { className: t.label, htmlFor: v, children: [
36
37
  d,
37
- u && /* @__PURE__ */ e("span", { className: t.labelRequired, children: "必須" })
38
+ u && /* @__PURE__ */ e("span", { className: t.labelRequired, children: S ?? "必須" })
38
39
  ] }) : null,
39
40
  /* @__PURE__ */ r(
40
41
  "div",
@@ -47,16 +48,16 @@ const L = q(
47
48
  /* @__PURE__ */ e(
48
49
  "input",
49
50
  {
50
- ref: y,
51
+ ref: C,
51
52
  id: v,
52
53
  placeholder: F,
53
54
  required: u,
54
55
  disabled: n,
55
56
  value: f,
56
- type: S,
57
+ type: V,
57
58
  className: t.input,
58
59
  onChange: g,
59
- ...P
60
+ ..._
60
61
  }
61
62
  ),
62
63
  p ? /* @__PURE__ */ e("div", { className: t.rightContent, children: p }) : /* @__PURE__ */ e("div", { className: t.icon, children: !n && /* disabledの場合はアイコンを表示しない */
@@ -66,21 +67,21 @@ const L = q(
66
67
  className: b({
67
68
  color: "sd.system.color.impression.negative"
68
69
  }),
69
- children: /* @__PURE__ */ e(A, { width: 20, height: 20 })
70
+ children: /* @__PURE__ */ e(T, { width: 20, height: 20 })
70
71
  }
71
- ) : j ? /* @__PURE__ */ e(
72
+ ) : I ? /* @__PURE__ */ e(
72
73
  "button",
73
74
  {
74
75
  className: b({ cursor: "pointer" }),
75
- onClick: k,
76
+ onClick: A,
76
77
  "aria-label": "値をクリア",
77
- children: /* @__PURE__ */ e(T, { width: 20, height: 20 })
78
+ children: /* @__PURE__ */ e(W, { width: 20, height: 20 })
78
79
  }
79
80
  ) : null) })
80
81
  ]
81
82
  }
82
83
  ),
83
- _ && /* @__PURE__ */ r("div", { className: t.messageField, children: [
84
+ j && /* @__PURE__ */ r("div", { className: t.messageField, children: [
84
85
  i && /* @__PURE__ */ e("p", { className: t.description, children: i }),
85
86
  a && c && /* @__PURE__ */ e("p", { className: t.invalidMessage, children: c })
86
87
  ] })
@@ -88,5 +89,5 @@ const L = q(
88
89
  }
89
90
  );
90
91
  export {
91
- L as TextField
92
+ M as TextField
92
93
  };
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@serendie/ui",
3
3
  "description": "Adaptive UI component library as part of Serendie Design System by Mitsubishi Electric",
4
4
  "license": "MIT",
5
- "version": "2.2.2",
5
+ "version": "2.2.3-dev.202510020518",
6
6
  "type": "module",
7
7
  "types": "./dist/index.d.ts",
8
8
  "sideEffects": [