@serendie/ui 2.3.0-dev.202512090236 → 2.3.0-dev.202601080645
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 +2 -2
- package/dist/components/Button/Button.d.ts +12 -1
- package/dist/components/DatePicker/DatePicker.js +107 -106
- package/dist/components/ModalDialog/ModalDialog.d.ts +2 -0
- package/dist/components/ModalDialog/ModalDialog.js +30 -28
- package/dist/components/Pagination/Pagination.js +66 -63
- package/dist/components/PasswordField/PasswordField.js +30 -29
- package/dist/components/Select/Select.js +38 -37
- package/dist/components/TextArea/TextArea.js +23 -22
- package/dist/components/TextField/TextField.js +31 -31
- package/dist/i18n/dictionary.d.ts +24 -0
- package/dist/i18n/dictionary.js +28 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -79,7 +79,7 @@ export default function ClientComponent() {
|
|
|
79
79
|
|
|
80
80
|
### テーマ切り替え
|
|
81
81
|
|
|
82
|
-
Serendie Design Systemには5つのカラーテーマがあり、デザイントークンもそれに対応します。htmlタグなどに、`data-panda-theme`属性 (`konjo`, `asagi`, `sumire`, `
|
|
82
|
+
Serendie Design Systemには5つのカラーテーマがあり、デザイントークンもそれに対応します。htmlタグなどに、`data-panda-theme`属性 (`konjo`, `asagi`, `sumire`, `tsutsuji`, `kurikawa`)を付与することでカラーテーマを切り替えることができます。
|
|
83
83
|
各テーマについては[こちら](https://serendie.design/foundations/theming/)を参照してください。
|
|
84
84
|
|
|
85
85
|
```html
|
|
@@ -214,7 +214,7 @@ export const dictionary = {
|
|
|
214
214
|
```env
|
|
215
215
|
FIGMA_ACCESS_TOKEN="YOUR_TOKEN"
|
|
216
216
|
FIGMA_FILE_KEY="YOUR_FILE_KEY"
|
|
217
|
-
# FIGMA_TRANSLATION_COLLECTION="
|
|
217
|
+
# FIGMA_TRANSLATION_COLLECTION="_i18n" # オプション(デフォルト: _i18n)
|
|
218
218
|
```
|
|
219
219
|
|
|
220
220
|
#### 翻訳管理コマンド
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
1
|
+
import { default as React, ComponentProps } from 'react';
|
|
2
|
+
import { RecipeVariantProps } from '../../../styled-system/types';
|
|
2
3
|
export declare const ButtonStyle: import('../../../styled-system/types').RecipeRuntimeFn<{
|
|
3
4
|
styleType: {
|
|
4
5
|
filled: {
|
|
@@ -112,9 +113,19 @@ export declare const ButtonStyle: import('../../../styled-system/types').RecipeR
|
|
|
112
113
|
};
|
|
113
114
|
};
|
|
114
115
|
}>;
|
|
116
|
+
type ExclusiveIconProps = ({
|
|
117
|
+
leftIcon?: React.ReactElement;
|
|
118
|
+
} & {
|
|
119
|
+
rightIcon?: never;
|
|
120
|
+
}) | ({
|
|
121
|
+
leftIcon?: never;
|
|
122
|
+
} & {
|
|
123
|
+
rightIcon?: React.ReactElement;
|
|
124
|
+
});
|
|
115
125
|
type ButtonLoadingProps = {
|
|
116
126
|
isLoading?: boolean;
|
|
117
127
|
};
|
|
128
|
+
export type ButtonProps = ComponentProps<"button"> & RecipeVariantProps<typeof ButtonStyle> & ExclusiveIconProps & ButtonLoadingProps;
|
|
118
129
|
export declare const Button: React.ForwardRefExoticComponent<(Omit<React.ClassAttributes<HTMLButtonElement> & React.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
119
130
|
styleType?: "filled" | "outlined" | "ghost" | "rectangle" | undefined;
|
|
120
131
|
size?: "small" | "medium" | undefined;
|
|
@@ -1,85 +1,86 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
2
|
-
import { SerendieSymbolCalendar as
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
import { datePickerStyles as
|
|
5
|
-
import { textFieldRecipe as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
1
|
+
import { jsx as e, jsxs as i, Fragment as x } from "react/jsx-runtime";
|
|
2
|
+
import { SerendieSymbolCalendar as q, SerendieSymbolArrowRight as A, SerendieSymbolChevronDown as L, SerendieSymbolChevronLeft as B, SerendieSymbolChevronRight as J } from "@serendie/symbols";
|
|
3
|
+
import { forwardRef as Y, useState as _ } from "react";
|
|
4
|
+
import { datePickerStyles as T } from "./styles.js";
|
|
5
|
+
import { textFieldRecipe as b } from "../../recipes/textFieldRecipe.js";
|
|
6
|
+
import { useTranslations as z } from "../../i18n/index.js";
|
|
7
|
+
import { Portal as E } from "../../node_modules/@ark-ui/react/dist/components/portal/portal.js";
|
|
8
|
+
import { DatePickerRoot as y } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-root.js";
|
|
9
|
+
import { DatePickerLabel as G } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-label.js";
|
|
10
|
+
import { DatePickerControl as K } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-control.js";
|
|
11
|
+
import { cx as f } from "../../styled-system/css/cx.js";
|
|
12
|
+
import { DatePickerTrigger as Q } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-trigger.js";
|
|
12
13
|
import { css as t } from "../../styled-system/css/css.js";
|
|
13
|
-
import { DatePickerInput as
|
|
14
|
-
import { DatePickerPositioner as
|
|
15
|
-
import { DatePickerContent as
|
|
16
|
-
import { DatePickerView as
|
|
17
|
-
import { DatePickerContext as
|
|
18
|
-
import { DatePickerViewControl as
|
|
19
|
-
import { DatePickerYearSelect as
|
|
20
|
-
import { DatePickerPrevTrigger as
|
|
21
|
-
import { DatePickerMonthSelect as
|
|
22
|
-
import { DatePickerNextTrigger as
|
|
23
|
-
import { DatePickerTable as
|
|
24
|
-
import { DatePickerTableHead as
|
|
25
|
-
import { DatePickerTableRow as
|
|
26
|
-
import { DatePickerTableHeader as
|
|
27
|
-
import { DatePickerTableBody as
|
|
28
|
-
import { DatePickerTableCell as
|
|
29
|
-
import { DatePickerTableCellTrigger as
|
|
30
|
-
const
|
|
14
|
+
import { DatePickerInput as P } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-input.js";
|
|
15
|
+
import { DatePickerPositioner as U } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-positioner.js";
|
|
16
|
+
import { DatePickerContent as X } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-content.js";
|
|
17
|
+
import { DatePickerView as Z } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-view.js";
|
|
18
|
+
import { DatePickerContext as $ } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-context.js";
|
|
19
|
+
import { DatePickerViewControl as M } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-view-control.js";
|
|
20
|
+
import { DatePickerYearSelect as ee } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-year-select.js";
|
|
21
|
+
import { DatePickerPrevTrigger as re } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-prev-trigger.js";
|
|
22
|
+
import { DatePickerMonthSelect as ae } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-month-select.js";
|
|
23
|
+
import { DatePickerNextTrigger as ie } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-next-trigger.js";
|
|
24
|
+
import { DatePickerTable as te } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table.js";
|
|
25
|
+
import { DatePickerTableHead as oe } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-head.js";
|
|
26
|
+
import { DatePickerTableRow as C } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-row.js";
|
|
27
|
+
import { DatePickerTableHeader as le } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-header.js";
|
|
28
|
+
import { DatePickerTableBody as se } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-body.js";
|
|
29
|
+
import { DatePickerTableCell as ne } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-cell.js";
|
|
30
|
+
import { DatePickerTableCellTrigger as ce } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-cell-trigger.js";
|
|
31
|
+
const Be = Y(
|
|
31
32
|
({
|
|
32
|
-
placeholder: r
|
|
33
|
+
placeholder: r,
|
|
33
34
|
label: o,
|
|
34
35
|
required: l,
|
|
35
36
|
requiredLabel: s,
|
|
36
37
|
invalid: n,
|
|
37
|
-
invalidMessage:
|
|
38
|
-
selectionMode:
|
|
39
|
-
startPlaceholder: S
|
|
40
|
-
endPlaceholder:
|
|
41
|
-
locale:
|
|
42
|
-
isCalendarOnly:
|
|
43
|
-
...
|
|
44
|
-
},
|
|
45
|
-
const
|
|
46
|
-
...
|
|
47
|
-
}),
|
|
48
|
-
return
|
|
49
|
-
|
|
38
|
+
invalidMessage: m,
|
|
39
|
+
selectionMode: h = "single",
|
|
40
|
+
startPlaceholder: S,
|
|
41
|
+
endPlaceholder: w,
|
|
42
|
+
locale: u = "ja-JP",
|
|
43
|
+
isCalendarOnly: R = !1,
|
|
44
|
+
...c
|
|
45
|
+
}, k) => {
|
|
46
|
+
const d = z(), F = r ?? d("datePicker.selectDate"), I = S ?? d("datePicker.startDate"), W = w ?? d("datePicker.endDate"), O = T(), [j, H] = b.splitVariantProps({
|
|
47
|
+
...c
|
|
48
|
+
}), a = b(j), [N, p] = _(!1), V = h === "range";
|
|
49
|
+
return R ? /* @__PURE__ */ e(
|
|
50
|
+
y,
|
|
50
51
|
{
|
|
51
|
-
locale:
|
|
52
|
-
...
|
|
53
|
-
ref:
|
|
54
|
-
selectionMode:
|
|
52
|
+
locale: u,
|
|
53
|
+
...H,
|
|
54
|
+
ref: k,
|
|
55
|
+
selectionMode: h,
|
|
55
56
|
open: !0,
|
|
56
|
-
className:
|
|
57
|
-
children: /* @__PURE__ */ e(
|
|
57
|
+
className: a.root,
|
|
58
|
+
children: /* @__PURE__ */ e(v, {})
|
|
58
59
|
}
|
|
59
|
-
) : /* @__PURE__ */
|
|
60
|
-
|
|
60
|
+
) : /* @__PURE__ */ i(
|
|
61
|
+
y,
|
|
61
62
|
{
|
|
62
|
-
locale:
|
|
63
|
-
...
|
|
64
|
-
ref:
|
|
65
|
-
selectionMode:
|
|
66
|
-
className:
|
|
67
|
-
open:
|
|
68
|
-
onOpenChange: (
|
|
69
|
-
var
|
|
70
|
-
|
|
63
|
+
locale: u,
|
|
64
|
+
...c,
|
|
65
|
+
ref: k,
|
|
66
|
+
selectionMode: h,
|
|
67
|
+
className: a.root,
|
|
68
|
+
open: N,
|
|
69
|
+
onOpenChange: (g) => {
|
|
70
|
+
var D;
|
|
71
|
+
p(g.open), (D = c.onOpenChange) == null || D.call(c, g);
|
|
71
72
|
},
|
|
72
73
|
children: [
|
|
73
|
-
/* @__PURE__ */
|
|
74
|
-
o && /* @__PURE__ */
|
|
74
|
+
/* @__PURE__ */ i(x, { children: [
|
|
75
|
+
o && /* @__PURE__ */ i(G, { className: a.label, children: [
|
|
75
76
|
o,
|
|
76
|
-
l && /* @__PURE__ */ e("span", { className:
|
|
77
|
+
l && /* @__PURE__ */ e("span", { className: a.labelRequired, children: s ?? d("common.required") })
|
|
77
78
|
] }),
|
|
78
|
-
/* @__PURE__ */
|
|
79
|
-
|
|
79
|
+
/* @__PURE__ */ i(
|
|
80
|
+
K,
|
|
80
81
|
{
|
|
81
|
-
className:
|
|
82
|
-
|
|
82
|
+
className: f(
|
|
83
|
+
a.inputWrapper,
|
|
83
84
|
t({
|
|
84
85
|
_expanded: {
|
|
85
86
|
outlineWidth: "sd.system.dimension.border.thick",
|
|
@@ -87,11 +88,11 @@ const je = L(
|
|
|
87
88
|
}
|
|
88
89
|
})
|
|
89
90
|
),
|
|
90
|
-
"data-expanded":
|
|
91
|
+
"data-expanded": N ? !0 : void 0,
|
|
91
92
|
"data-Invalid": n,
|
|
92
93
|
children: [
|
|
93
|
-
/* @__PURE__ */ e("div", { className:
|
|
94
|
-
|
|
94
|
+
/* @__PURE__ */ e("div", { className: a.leftContent, children: /* @__PURE__ */ e(Q, { className: t({ display: "flex" }), children: /* @__PURE__ */ e(q, {}) }) }),
|
|
95
|
+
V ? /* @__PURE__ */ i(
|
|
95
96
|
"div",
|
|
96
97
|
{
|
|
97
98
|
className: t({
|
|
@@ -101,69 +102,69 @@ const je = L(
|
|
|
101
102
|
}),
|
|
102
103
|
children: [
|
|
103
104
|
/* @__PURE__ */ e(
|
|
104
|
-
|
|
105
|
+
P,
|
|
105
106
|
{
|
|
106
107
|
index: 0,
|
|
107
|
-
placeholder:
|
|
108
|
-
className:
|
|
109
|
-
|
|
108
|
+
placeholder: I,
|
|
109
|
+
className: f(
|
|
110
|
+
a.input,
|
|
110
111
|
t({
|
|
111
112
|
minWidth: "100%",
|
|
112
113
|
borderRadius: "sd.system.dimension.radius.medium"
|
|
113
114
|
})
|
|
114
115
|
),
|
|
115
|
-
onFocus: () =>
|
|
116
|
+
onFocus: () => p(!0)
|
|
116
117
|
}
|
|
117
118
|
),
|
|
118
|
-
/* @__PURE__ */ e(
|
|
119
|
+
/* @__PURE__ */ e(A, {}),
|
|
119
120
|
/* @__PURE__ */ e(
|
|
120
|
-
|
|
121
|
+
P,
|
|
121
122
|
{
|
|
122
123
|
index: 1,
|
|
123
|
-
placeholder:
|
|
124
|
-
className:
|
|
125
|
-
|
|
124
|
+
placeholder: W,
|
|
125
|
+
className: f(
|
|
126
|
+
a.input,
|
|
126
127
|
t({
|
|
127
128
|
minWidth: "100%",
|
|
128
129
|
borderRadius: "sd.system.dimension.radius.medium"
|
|
129
130
|
})
|
|
130
131
|
),
|
|
131
|
-
onFocus: () =>
|
|
132
|
+
onFocus: () => p(!0)
|
|
132
133
|
}
|
|
133
134
|
)
|
|
134
135
|
]
|
|
135
136
|
}
|
|
136
137
|
) : /* @__PURE__ */ e(
|
|
137
|
-
|
|
138
|
+
P,
|
|
138
139
|
{
|
|
139
|
-
placeholder:
|
|
140
|
-
className:
|
|
141
|
-
onFocus: () =>
|
|
140
|
+
placeholder: F,
|
|
141
|
+
className: a.input,
|
|
142
|
+
onFocus: () => p(!0)
|
|
142
143
|
}
|
|
143
144
|
),
|
|
144
145
|
/* @__PURE__ */ e("div", {})
|
|
145
146
|
]
|
|
146
147
|
}
|
|
147
148
|
),
|
|
148
|
-
n &&
|
|
149
|
+
n && m && /* @__PURE__ */ e("div", { className: a.messageField, children: /* @__PURE__ */ e("p", { className: a.invalidMessage, children: m }) })
|
|
149
150
|
] }),
|
|
150
|
-
/* @__PURE__ */ e(
|
|
151
|
+
/* @__PURE__ */ e(E, { children: /* @__PURE__ */ e(U, { className: O.positioner, children: /* @__PURE__ */ e(v, {}) }) })
|
|
151
152
|
]
|
|
152
153
|
}
|
|
153
154
|
);
|
|
154
155
|
}
|
|
155
|
-
),
|
|
156
|
-
const r =
|
|
157
|
-
return /* @__PURE__ */ e(
|
|
158
|
-
/* @__PURE__ */
|
|
159
|
-
/* @__PURE__ */
|
|
160
|
-
/* @__PURE__ */ e(
|
|
161
|
-
/* @__PURE__ */ e(
|
|
156
|
+
), v = () => {
|
|
157
|
+
const r = T();
|
|
158
|
+
return /* @__PURE__ */ e(X, { className: r.content, children: /* @__PURE__ */ e(Z, { view: "day", className: r.view, children: /* @__PURE__ */ e($, { children: (o) => /* @__PURE__ */ i(x, { children: [
|
|
159
|
+
/* @__PURE__ */ i(M, { className: r.viewControl, children: [
|
|
160
|
+
/* @__PURE__ */ i("div", { className: r.selectWrapper, children: [
|
|
161
|
+
/* @__PURE__ */ e(ee, { className: r.select }),
|
|
162
|
+
/* @__PURE__ */ e(L, { className: r.selectIcon })
|
|
162
163
|
] }),
|
|
163
|
-
/* @__PURE__ */
|
|
164
|
-
/* @__PURE__ */ e(
|
|
164
|
+
/* @__PURE__ */ i("div", { className: t({ display: "flex", alignItems: "center" }), children: [
|
|
165
|
+
/* @__PURE__ */ e(re, { className: r.prevTrigger, children: /* @__PURE__ */ e(B, {}) }),
|
|
165
166
|
/* @__PURE__ */ e(
|
|
166
|
-
|
|
167
|
+
ae,
|
|
167
168
|
{
|
|
168
169
|
className: t({
|
|
169
170
|
appearance: "none",
|
|
@@ -171,36 +172,36 @@ const je = L(
|
|
|
171
172
|
})
|
|
172
173
|
}
|
|
173
174
|
),
|
|
174
|
-
/* @__PURE__ */ e(
|
|
175
|
+
/* @__PURE__ */ e(ie, { className: r.nextTrigger, children: /* @__PURE__ */ e(J, {}) })
|
|
175
176
|
] })
|
|
176
177
|
] }),
|
|
177
|
-
/* @__PURE__ */
|
|
178
|
-
/* @__PURE__ */ e(
|
|
179
|
-
|
|
178
|
+
/* @__PURE__ */ i(te, { className: r.table, children: [
|
|
179
|
+
/* @__PURE__ */ e(oe, { children: /* @__PURE__ */ e(C, { children: o.weekDays.map((l, s) => /* @__PURE__ */ e(
|
|
180
|
+
le,
|
|
180
181
|
{
|
|
181
182
|
className: r.tableHeader,
|
|
182
183
|
children: l.narrow
|
|
183
184
|
},
|
|
184
185
|
s
|
|
185
186
|
)) }) }),
|
|
186
|
-
/* @__PURE__ */ e(
|
|
187
|
-
|
|
187
|
+
/* @__PURE__ */ e(se, { children: o.weeks.map((l, s) => /* @__PURE__ */ e(C, { children: l.map((n, m) => /* @__PURE__ */ e(
|
|
188
|
+
ne,
|
|
188
189
|
{
|
|
189
190
|
value: n,
|
|
190
191
|
className: r.tableCell,
|
|
191
192
|
children: /* @__PURE__ */ e(
|
|
192
|
-
|
|
193
|
+
ce,
|
|
193
194
|
{
|
|
194
195
|
className: r.tableCellTrigger,
|
|
195
196
|
children: n.day
|
|
196
197
|
}
|
|
197
198
|
)
|
|
198
199
|
},
|
|
199
|
-
|
|
200
|
+
m
|
|
200
201
|
)) }, s)) })
|
|
201
202
|
] })
|
|
202
203
|
] }) }) }) });
|
|
203
204
|
};
|
|
204
205
|
export {
|
|
205
|
-
|
|
206
|
+
Be as DatePicker
|
|
206
207
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { DialogRootProps } from '@ark-ui/react';
|
|
2
2
|
import { RecipeVariantProps } from '../../../styled-system/css';
|
|
3
|
+
import { ButtonProps } from '../Button';
|
|
3
4
|
declare const ModalDialogStyle: import('../../../styled-system/types').SlotRecipeRuntimeFn<"title" | "description" | "content" | "backdrop" | "contentInner" | "closeTrigger" | "buttonWrapper", import('../../../styled-system/types').SlotRecipeVariantRecord<"title" | "description" | "content" | "backdrop" | "contentInner" | "closeTrigger" | "buttonWrapper">>;
|
|
4
5
|
type Props = {
|
|
5
6
|
isOpen: boolean;
|
|
@@ -9,6 +10,7 @@ type Props = {
|
|
|
9
10
|
cancelButtonLabel?: string;
|
|
10
11
|
submitButtonLabel: string;
|
|
11
12
|
onButtonClick: () => void;
|
|
13
|
+
submitButtonProps?: ButtonProps;
|
|
12
14
|
};
|
|
13
15
|
export type ModalDialogProps = Props & DialogRootProps & RecipeVariantProps<typeof ModalDialogStyle>;
|
|
14
16
|
export declare const ModalDialog: React.FC<ModalDialogProps>;
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
1
|
+
import { jsx as e, jsxs as o } from "react/jsx-runtime";
|
|
2
2
|
import { Button as i } from "../Button/Button.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
|
|
3
|
+
import { useTranslations as y } from "../../i18n/index.js";
|
|
4
|
+
import { Portal as x } from "../../node_modules/@ark-ui/react/dist/components/portal/portal.js";
|
|
5
|
+
import { sva as f } from "../../styled-system/css/sva.js";
|
|
6
|
+
import { DialogRoot as h } from "../../node_modules/@ark-ui/react/dist/components/dialog/dialog-root.js";
|
|
7
|
+
import { DialogBackdrop as u } from "../../node_modules/@ark-ui/react/dist/components/dialog/dialog-backdrop.js";
|
|
8
|
+
import { DialogPositioner as b } from "../../node_modules/@ark-ui/react/dist/components/dialog/dialog-positioner.js";
|
|
9
|
+
import { DialogContent as D } from "../../node_modules/@ark-ui/react/dist/components/dialog/dialog-content.js";
|
|
10
|
+
import { cx as v } from "../../styled-system/css/cx.js";
|
|
11
|
+
import { DialogTitle as I } from "../../node_modules/@ark-ui/react/dist/components/dialog/dialog-title.js";
|
|
12
|
+
import { DialogDescription as k } from "../../node_modules/@ark-ui/react/dist/components/dialog/dialog-description.js";
|
|
13
|
+
import { DialogCloseTrigger as C } from "../../node_modules/@ark-ui/react/dist/components/dialog/dialog-close-trigger.js";
|
|
14
|
+
const N = f({
|
|
14
15
|
slots: [
|
|
15
16
|
"backdrop",
|
|
16
17
|
"content",
|
|
@@ -74,31 +75,32 @@ const I = g({
|
|
|
74
75
|
}
|
|
75
76
|
}
|
|
76
77
|
}
|
|
77
|
-
}),
|
|
78
|
+
}), q = ({
|
|
78
79
|
isOpen: n,
|
|
79
|
-
title:
|
|
80
|
-
cancelButtonLabel:
|
|
80
|
+
title: a,
|
|
81
|
+
cancelButtonLabel: d,
|
|
81
82
|
submitButtonLabel: r,
|
|
82
83
|
onButtonClick: m,
|
|
84
|
+
submitButtonProps: l,
|
|
83
85
|
children: p,
|
|
84
|
-
className:
|
|
85
|
-
...
|
|
86
|
+
className: c,
|
|
87
|
+
...t
|
|
86
88
|
}) => {
|
|
87
|
-
const s =
|
|
88
|
-
return /* @__PURE__ */ e(
|
|
89
|
-
/* @__PURE__ */ e(
|
|
90
|
-
/* @__PURE__ */ e(
|
|
91
|
-
/* @__PURE__ */
|
|
92
|
-
/* @__PURE__ */ e(
|
|
93
|
-
/* @__PURE__ */ e(
|
|
89
|
+
const g = y(), s = N(t);
|
|
90
|
+
return /* @__PURE__ */ e(h, { open: n, ...t, children: /* @__PURE__ */ o(x, { children: [
|
|
91
|
+
/* @__PURE__ */ e(u, { className: s.backdrop }),
|
|
92
|
+
/* @__PURE__ */ e(b, { children: /* @__PURE__ */ o(D, { className: v(s.content, c), children: [
|
|
93
|
+
/* @__PURE__ */ o("div", { className: s.contentInner, children: [
|
|
94
|
+
/* @__PURE__ */ e(I, { className: s.title, children: a }),
|
|
95
|
+
/* @__PURE__ */ e(k, { className: s.description, children: p })
|
|
94
96
|
] }),
|
|
95
|
-
/* @__PURE__ */
|
|
96
|
-
/* @__PURE__ */ e(i, { onClick: m, children: r }),
|
|
97
|
-
/* @__PURE__ */ e(
|
|
97
|
+
/* @__PURE__ */ o("div", { className: s.buttonWrapper, children: [
|
|
98
|
+
/* @__PURE__ */ e(i, { ...l, onClick: m, children: r }),
|
|
99
|
+
/* @__PURE__ */ e(C, { asChild: !0, children: /* @__PURE__ */ e(i, { styleType: "ghost", children: d || g("modalDialog.close") }) })
|
|
98
100
|
] })
|
|
99
101
|
] }) })
|
|
100
102
|
] }) });
|
|
101
103
|
};
|
|
102
104
|
export {
|
|
103
|
-
|
|
105
|
+
q as ModalDialog
|
|
104
106
|
};
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
2
|
-
import { SerendieSymbolChevronLeft as
|
|
3
|
-
import
|
|
1
|
+
import { jsx as e, jsxs as C, Fragment as c } from "react/jsx-runtime";
|
|
2
|
+
import { SerendieSymbolChevronLeft as _, SerendieSymbolChevronRight as I } from "@serendie/symbols";
|
|
3
|
+
import N, { useState as j } from "react";
|
|
4
4
|
import { IconButton as m } from "../IconButton/IconButton.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
|
|
5
|
+
import { useTranslations as z } from "../../i18n/index.js";
|
|
6
|
+
import { sva as R } from "../../styled-system/css/sva.js";
|
|
7
|
+
import { PaginationRoot as w } from "../../node_modules/@ark-ui/react/dist/components/pagination/pagination-root.js";
|
|
8
|
+
import { cx as O } from "../../styled-system/css/cx.js";
|
|
9
|
+
import { PaginationContext as W } from "../../node_modules/@ark-ui/react/dist/components/pagination/pagination-context.js";
|
|
10
|
+
import { PaginationPrevTrigger as F } from "../../node_modules/@ark-ui/react/dist/components/pagination/pagination-prev-trigger.js";
|
|
11
|
+
import { PaginationItem as L } from "../../node_modules/@ark-ui/react/dist/components/pagination/pagination-item.js";
|
|
12
|
+
import { PaginationEllipsis as B } from "../../node_modules/@ark-ui/react/dist/components/pagination/pagination-ellipsis.js";
|
|
13
|
+
import { PaginationNextTrigger as E } from "../../node_modules/@ark-ui/react/dist/components/pagination/pagination-next-trigger.js";
|
|
14
|
+
const M = R({
|
|
14
15
|
slots: ["root", "item", "ellipsis", "prevTrigger", "nextTrigger"],
|
|
15
16
|
base: {
|
|
16
17
|
root: {
|
|
@@ -80,102 +81,104 @@ const L = N({
|
|
|
80
81
|
defaultVariants: {
|
|
81
82
|
size: "medium"
|
|
82
83
|
}
|
|
83
|
-
}),
|
|
84
|
+
}), Z = N.forwardRef(
|
|
84
85
|
({
|
|
85
86
|
count: d,
|
|
86
|
-
pageSize:
|
|
87
|
-
page:
|
|
88
|
-
onPageChange:
|
|
89
|
-
siblingCount:
|
|
90
|
-
className:
|
|
91
|
-
size:
|
|
92
|
-
...
|
|
93
|
-
},
|
|
94
|
-
const [b,
|
|
87
|
+
pageSize: p = 1,
|
|
88
|
+
page: r,
|
|
89
|
+
onPageChange: l,
|
|
90
|
+
siblingCount: h = 2,
|
|
91
|
+
className: y,
|
|
92
|
+
size: f = "medium",
|
|
93
|
+
...u
|
|
94
|
+
}, P) => {
|
|
95
|
+
const [b, v] = j(1), a = M({ size: f }), x = (t) => {
|
|
96
|
+
r || v(t.page), l == null || l(t);
|
|
97
|
+
}, i = z(), T = {
|
|
95
98
|
count: d,
|
|
96
|
-
pageSize:
|
|
97
|
-
siblingCount:
|
|
98
|
-
...
|
|
99
|
-
onPageChange:
|
|
100
|
-
o || P(t.page), n == null || n(t);
|
|
101
|
-
}
|
|
99
|
+
pageSize: p,
|
|
100
|
+
siblingCount: h,
|
|
101
|
+
...r ? { page: r } : { page: b },
|
|
102
|
+
onPageChange: x
|
|
102
103
|
};
|
|
103
104
|
return /* @__PURE__ */ e(
|
|
104
|
-
|
|
105
|
+
w,
|
|
105
106
|
{
|
|
106
|
-
ref:
|
|
107
|
-
className:
|
|
108
|
-
...
|
|
109
|
-
...
|
|
110
|
-
children: /* @__PURE__ */ e(
|
|
111
|
-
const
|
|
112
|
-
return /* @__PURE__ */
|
|
107
|
+
ref: P,
|
|
108
|
+
className: O(a.root, y),
|
|
109
|
+
...T,
|
|
110
|
+
...u,
|
|
111
|
+
children: /* @__PURE__ */ e(W, { children: (t) => {
|
|
112
|
+
const n = t.page <= 1, S = Math.ceil(d / p), o = t.page >= S;
|
|
113
|
+
return /* @__PURE__ */ C(c, { children: [
|
|
113
114
|
/* @__PURE__ */ e(
|
|
114
|
-
|
|
115
|
+
F,
|
|
115
116
|
{
|
|
116
|
-
className:
|
|
117
|
-
disabled:
|
|
117
|
+
className: a.prevTrigger,
|
|
118
|
+
disabled: n,
|
|
118
119
|
asChild: !0,
|
|
119
120
|
children: /* @__PURE__ */ e(
|
|
120
121
|
m,
|
|
121
122
|
{
|
|
122
|
-
icon: /* @__PURE__ */ e(
|
|
123
|
+
icon: /* @__PURE__ */ e(_, {}),
|
|
123
124
|
shape: "rectangle",
|
|
124
125
|
styleType: "ghost",
|
|
125
126
|
size: "small",
|
|
126
|
-
"aria-label":
|
|
127
|
-
disabled:
|
|
128
|
-
title:
|
|
127
|
+
"aria-label": i(n ? "pagination.firstPage" : "pagination.previousPage"),
|
|
128
|
+
disabled: n,
|
|
129
|
+
title: i(n ? "pagination.firstPage" : "pagination.previousPage")
|
|
129
130
|
}
|
|
130
131
|
)
|
|
131
132
|
}
|
|
132
133
|
),
|
|
133
134
|
t.pages.map(
|
|
134
|
-
(s,
|
|
135
|
-
|
|
135
|
+
(s, g) => s.type === "page" ? /* @__PURE__ */ e(
|
|
136
|
+
L,
|
|
136
137
|
{
|
|
137
138
|
...s,
|
|
138
|
-
className:
|
|
139
|
+
className: a.item,
|
|
139
140
|
asChild: !0,
|
|
140
141
|
children: /* @__PURE__ */ e(
|
|
141
142
|
m,
|
|
142
143
|
{
|
|
143
|
-
icon: /* @__PURE__ */ e(
|
|
144
|
+
icon: /* @__PURE__ */ e(c, { children: s.value }),
|
|
144
145
|
shape: "rectangle",
|
|
145
146
|
styleType: "ghost",
|
|
146
147
|
size: "small",
|
|
147
|
-
"aria-label":
|
|
148
|
-
|
|
148
|
+
"aria-label": i("pagination.goToPage", {
|
|
149
|
+
page: s.value
|
|
150
|
+
}),
|
|
151
|
+
title: i("pagination.goToPage", { page: s.value })
|
|
149
152
|
}
|
|
150
153
|
)
|
|
151
154
|
},
|
|
152
|
-
|
|
155
|
+
g
|
|
153
156
|
) : /* @__PURE__ */ e(
|
|
154
|
-
|
|
157
|
+
B,
|
|
155
158
|
{
|
|
156
|
-
index:
|
|
157
|
-
className:
|
|
159
|
+
index: g,
|
|
160
|
+
className: a.ellipsis,
|
|
158
161
|
children: "…"
|
|
159
162
|
},
|
|
160
|
-
|
|
163
|
+
g
|
|
161
164
|
)
|
|
162
165
|
),
|
|
163
166
|
/* @__PURE__ */ e(
|
|
164
|
-
|
|
167
|
+
E,
|
|
165
168
|
{
|
|
166
|
-
className:
|
|
167
|
-
disabled:
|
|
169
|
+
className: a.nextTrigger,
|
|
170
|
+
disabled: o,
|
|
168
171
|
asChild: !0,
|
|
169
172
|
children: /* @__PURE__ */ e(
|
|
170
173
|
m,
|
|
171
174
|
{
|
|
172
|
-
icon: /* @__PURE__ */ e(
|
|
175
|
+
icon: /* @__PURE__ */ e(I, {}),
|
|
173
176
|
shape: "rectangle",
|
|
174
177
|
styleType: "ghost",
|
|
175
178
|
size: "small",
|
|
176
|
-
"aria-label":
|
|
177
|
-
disabled:
|
|
178
|
-
title:
|
|
179
|
+
"aria-label": i(o ? "pagination.lastPage" : "pagination.nextPage"),
|
|
180
|
+
disabled: o,
|
|
181
|
+
title: i(o ? "pagination.lastPage" : "pagination.nextPage")
|
|
179
182
|
}
|
|
180
183
|
)
|
|
181
184
|
}
|
|
@@ -187,6 +190,6 @@ const L = N({
|
|
|
187
190
|
}
|
|
188
191
|
);
|
|
189
192
|
export {
|
|
190
|
-
|
|
191
|
-
|
|
193
|
+
Z as Pagination,
|
|
194
|
+
M as PaginationStyle
|
|
192
195
|
};
|
|
@@ -1,38 +1,39 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { TextField as
|
|
4
|
-
import { SerendieSymbolEyeHidden as
|
|
5
|
-
import { IconButton as
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
import { forwardRef as m, useState as p } from "react";
|
|
3
|
+
import { TextField as w } from "../TextField/TextField.js";
|
|
4
|
+
import { SerendieSymbolEyeHidden as y, SerendieSymbolEye as c } from "@serendie/symbols";
|
|
5
|
+
import { IconButton as f } from "../IconButton/IconButton.js";
|
|
6
|
+
import { useTranslations as g } from "../../i18n/index.js";
|
|
7
|
+
const P = m(
|
|
8
|
+
({ disableToggle: r = !1, disabled: t, ...i }, a) => {
|
|
9
|
+
const e = g(), [s, d] = p(!1), l = r ? void 0 : /* @__PURE__ */ o(
|
|
10
|
+
f,
|
|
11
|
+
{
|
|
12
|
+
type: "button",
|
|
13
|
+
onClick: () => {
|
|
14
|
+
d((n) => !n);
|
|
15
|
+
},
|
|
16
|
+
styleType: "ghost",
|
|
17
|
+
size: "small",
|
|
18
|
+
shape: "circle",
|
|
19
|
+
"aria-label": e(s ? "passwordField.hidePassword" : "passwordField.showPassword"),
|
|
20
|
+
disabled: t,
|
|
21
|
+
icon: s ? /* @__PURE__ */ o(y, {}) : /* @__PURE__ */ o(c, {})
|
|
22
|
+
}
|
|
23
|
+
);
|
|
9
24
|
return /* @__PURE__ */ o(
|
|
10
|
-
|
|
25
|
+
w,
|
|
11
26
|
{
|
|
12
|
-
type:
|
|
13
|
-
rightContent:
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
onClick: () => {
|
|
18
|
-
l((a) => !a);
|
|
19
|
-
},
|
|
20
|
-
styleType: "ghost",
|
|
21
|
-
size: "small",
|
|
22
|
-
shape: "circle",
|
|
23
|
-
"aria-label": t ? "パスワードを隠す" : "パスワードを表示",
|
|
24
|
-
disabled: e,
|
|
25
|
-
icon: t ? /* @__PURE__ */ o(p, {}) : /* @__PURE__ */ o(y, {})
|
|
26
|
-
}
|
|
27
|
-
),
|
|
28
|
-
disabled: e,
|
|
29
|
-
...r,
|
|
30
|
-
ref: i
|
|
27
|
+
type: s ? "text" : "password",
|
|
28
|
+
rightContent: l,
|
|
29
|
+
disabled: t,
|
|
30
|
+
...i,
|
|
31
|
+
ref: a
|
|
31
32
|
}
|
|
32
33
|
);
|
|
33
34
|
}
|
|
34
35
|
);
|
|
35
|
-
|
|
36
|
+
P.displayName = "PasswordField";
|
|
36
37
|
export {
|
|
37
|
-
|
|
38
|
+
P as PasswordField
|
|
38
39
|
};
|
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
import { jsxs as i, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { SerendieSymbolChevronDown as
|
|
3
|
-
import { List as
|
|
4
|
-
import { ListItem as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
|
|
2
|
+
import { SerendieSymbolChevronDown as v } from "@serendie/symbols";
|
|
3
|
+
import { List as w } from "../List/List.js";
|
|
4
|
+
import { ListItem as _ } from "../List/ListItem.js";
|
|
5
|
+
import { useTranslations as T } from "../../i18n/index.js";
|
|
6
|
+
import { createListCollection as C } from "../../node_modules/@ark-ui/react/dist/components/collection/list-collection.js";
|
|
7
|
+
import { Portal as N } from "../../node_modules/@ark-ui/react/dist/components/portal/portal.js";
|
|
8
|
+
import { sva as z } from "../../styled-system/css/sva.js";
|
|
9
|
+
import { SelectRoot as R } from "../../node_modules/@ark-ui/react/dist/components/select/select-root.js";
|
|
10
|
+
import { cx as V } from "../../styled-system/css/cx.js";
|
|
11
|
+
import { SelectLabel as L } from "../../node_modules/@ark-ui/react/dist/components/select/select-label.js";
|
|
12
|
+
import { css as r } from "../../styled-system/css/css.js";
|
|
13
|
+
import { SelectControl as P } from "../../node_modules/@ark-ui/react/dist/components/select/select-control.js";
|
|
14
|
+
import { SelectTrigger as B } from "../../node_modules/@ark-ui/react/dist/components/select/select-trigger.js";
|
|
15
|
+
import { SelectValueText as I } from "../../node_modules/@ark-ui/react/dist/components/select/select-value-text.js";
|
|
16
|
+
import { SelectPositioner as O } from "../../node_modules/@ark-ui/react/dist/components/select/select-positioner.js";
|
|
17
|
+
import { SelectContent as j } from "../../node_modules/@ark-ui/react/dist/components/select/select-content.js";
|
|
18
|
+
import { SelectItem as A } from "../../node_modules/@ark-ui/react/dist/components/select/select-item.js";
|
|
19
|
+
const l = z({
|
|
19
20
|
slots: ["root", "valueText", "trigger", "content", "item", "iconBox"],
|
|
20
21
|
base: {
|
|
21
22
|
root: {
|
|
@@ -156,9 +157,9 @@ const l = T({
|
|
|
156
157
|
defaultVariants: {
|
|
157
158
|
size: "medium"
|
|
158
159
|
}
|
|
159
|
-
}),
|
|
160
|
+
}), oe = ({
|
|
160
161
|
placeholder: c = "",
|
|
161
|
-
label:
|
|
162
|
+
label: d,
|
|
162
163
|
required: p,
|
|
163
164
|
requiredLabel: y,
|
|
164
165
|
invalid: a,
|
|
@@ -167,18 +168,18 @@ const l = T({
|
|
|
167
168
|
items: u = [],
|
|
168
169
|
...x
|
|
169
170
|
}) => {
|
|
170
|
-
const [t,
|
|
171
|
+
const h = T(), [t, b] = l.splitVariantProps(x), o = l(t), { collection: W, ...f } = b, n = C({
|
|
171
172
|
items: u,
|
|
172
173
|
itemToString: (s) => s.label,
|
|
173
174
|
itemToValue: (s) => s.value
|
|
174
175
|
});
|
|
175
176
|
return /* @__PURE__ */ i(
|
|
176
|
-
|
|
177
|
+
R,
|
|
177
178
|
{
|
|
178
|
-
...
|
|
179
|
+
...f,
|
|
179
180
|
collection: n,
|
|
180
181
|
invalid: a,
|
|
181
|
-
className:
|
|
182
|
+
className: V(o.root, g),
|
|
182
183
|
positioning: {
|
|
183
184
|
sameWidth: !0,
|
|
184
185
|
offset: {
|
|
@@ -187,45 +188,45 @@ const l = T({
|
|
|
187
188
|
}
|
|
188
189
|
},
|
|
189
190
|
children: [
|
|
190
|
-
|
|
191
|
+
d && t.size != "small" && // smallの場合はラベルを表示しない
|
|
191
192
|
/* @__PURE__ */ i(
|
|
192
|
-
|
|
193
|
+
L,
|
|
193
194
|
{
|
|
194
|
-
className:
|
|
195
|
+
className: r({
|
|
195
196
|
textStyle: {
|
|
196
197
|
base: "sd.system.typography.label.medium_compact",
|
|
197
198
|
expanded: "sd.system.typography.label.medium_expanded"
|
|
198
199
|
}
|
|
199
200
|
}),
|
|
200
201
|
children: [
|
|
201
|
-
|
|
202
|
+
d,
|
|
202
203
|
p && /* @__PURE__ */ e(
|
|
203
204
|
"span",
|
|
204
205
|
{
|
|
205
|
-
className:
|
|
206
|
+
className: r({
|
|
206
207
|
pl: "sd.system.dimension.spacing.extraSmall",
|
|
207
208
|
color: "sd.system.color.impression.negative"
|
|
208
209
|
}),
|
|
209
|
-
children: y ?? "
|
|
210
|
+
children: y ?? h("common.required")
|
|
210
211
|
}
|
|
211
212
|
)
|
|
212
213
|
]
|
|
213
214
|
}
|
|
214
215
|
),
|
|
215
|
-
/* @__PURE__ */ e(
|
|
216
|
+
/* @__PURE__ */ e(P, { children: /* @__PURE__ */ i(B, { className: o.trigger, children: [
|
|
216
217
|
/* @__PURE__ */ e(
|
|
217
|
-
|
|
218
|
+
I,
|
|
218
219
|
{
|
|
219
220
|
placeholder: c,
|
|
220
221
|
className: o.valueText
|
|
221
222
|
}
|
|
222
223
|
),
|
|
223
|
-
/* @__PURE__ */ e(
|
|
224
|
+
/* @__PURE__ */ e(v, { className: o.iconBox })
|
|
224
225
|
] }) }),
|
|
225
226
|
a && m && /* @__PURE__ */ e(
|
|
226
227
|
"div",
|
|
227
228
|
{
|
|
228
|
-
className:
|
|
229
|
+
className: r({
|
|
229
230
|
textStyle: {
|
|
230
231
|
base: "sd.system.typography.body.extraSmall_compact",
|
|
231
232
|
expanded: "sd.system.typography.body.extraSmall_expanded"
|
|
@@ -235,20 +236,20 @@ const l = T({
|
|
|
235
236
|
children: m
|
|
236
237
|
}
|
|
237
238
|
),
|
|
238
|
-
/* @__PURE__ */ e(
|
|
239
|
-
|
|
239
|
+
/* @__PURE__ */ e(N, { children: /* @__PURE__ */ e(O, { children: /* @__PURE__ */ e(j, { className: o.content, children: /* @__PURE__ */ e(w, { children: n.items.map((s, S) => /* @__PURE__ */ e(A, { item: s, children: /* @__PURE__ */ e(
|
|
240
|
+
_,
|
|
240
241
|
{
|
|
241
242
|
title: s.label,
|
|
242
243
|
value: s.value,
|
|
243
244
|
className: o.item,
|
|
244
245
|
size: t.size == "small" ? "small" : void 0
|
|
245
246
|
}
|
|
246
|
-
) },
|
|
247
|
+
) }, S)) }) }) }) })
|
|
247
248
|
]
|
|
248
249
|
}
|
|
249
250
|
);
|
|
250
251
|
};
|
|
251
252
|
export {
|
|
252
|
-
|
|
253
|
+
oe as Select,
|
|
253
254
|
l as SelectStyle
|
|
254
255
|
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import c, { forwardRef as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
1
|
+
import { jsxs as a, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import w from "../../node_modules/merge-refs/dist/esm/index.js";
|
|
3
|
+
import c, { forwardRef as C } from "react";
|
|
4
|
+
import { useTranslations as N } from "../../i18n/index.js";
|
|
5
|
+
import { sva as R } from "../../styled-system/css/sva.js";
|
|
6
|
+
import { cx as T } from "../../styled-system/css/cx.js";
|
|
7
|
+
const p = R({
|
|
7
8
|
slots: [
|
|
8
9
|
"root",
|
|
9
10
|
"label",
|
|
@@ -102,7 +103,7 @@ const p = C({
|
|
|
102
103
|
}
|
|
103
104
|
}
|
|
104
105
|
}
|
|
105
|
-
}),
|
|
106
|
+
}), I = C(
|
|
106
107
|
({
|
|
107
108
|
placeholder: y,
|
|
108
109
|
label: r,
|
|
@@ -110,44 +111,44 @@ const p = C({
|
|
|
110
111
|
required: d,
|
|
111
112
|
requiredLabel: u,
|
|
112
113
|
invalidMessage: o,
|
|
113
|
-
invalid:
|
|
114
|
-
disabled:
|
|
114
|
+
invalid: i,
|
|
115
|
+
disabled: n,
|
|
115
116
|
className: g,
|
|
116
|
-
...
|
|
117
|
+
...l
|
|
117
118
|
}, h) => {
|
|
118
|
-
const x = c.useRef(null),
|
|
119
|
-
return /* @__PURE__ */
|
|
120
|
-
r ? /* @__PURE__ */
|
|
119
|
+
const x = N(), b = c.useRef(null), f = w(b, h), [S, v] = p.splitVariantProps(l), e = p(S), _ = t || i && o, m = l.id || c.useId();
|
|
120
|
+
return /* @__PURE__ */ a("div", { className: T(e.root, g), children: [
|
|
121
|
+
r ? /* @__PURE__ */ a("label", { className: e.label, htmlFor: m, children: [
|
|
121
122
|
r,
|
|
122
|
-
d && /* @__PURE__ */ s("span", { className: e.required, children: u ?? "
|
|
123
|
+
d && /* @__PURE__ */ s("span", { className: e.required, children: u ?? x("common.required") })
|
|
123
124
|
] }) : null,
|
|
124
125
|
/* @__PURE__ */ s(
|
|
125
126
|
"div",
|
|
126
127
|
{
|
|
127
128
|
className: e.wrapper,
|
|
128
|
-
"data-invalid":
|
|
129
|
-
"data-disabled":
|
|
129
|
+
"data-invalid": i ? !0 : void 0,
|
|
130
|
+
"data-disabled": n ? !0 : void 0,
|
|
130
131
|
children: /* @__PURE__ */ s(
|
|
131
132
|
"textarea",
|
|
132
133
|
{
|
|
133
|
-
ref:
|
|
134
|
+
ref: f,
|
|
134
135
|
id: m,
|
|
135
136
|
placeholder: y,
|
|
136
137
|
required: d,
|
|
137
|
-
disabled:
|
|
138
|
+
disabled: n,
|
|
138
139
|
className: e.textarea,
|
|
139
|
-
...
|
|
140
|
+
...v
|
|
140
141
|
}
|
|
141
142
|
)
|
|
142
143
|
}
|
|
143
144
|
),
|
|
144
|
-
|
|
145
|
+
_ && /* @__PURE__ */ a("div", { className: e.messageField, children: [
|
|
145
146
|
t && /* @__PURE__ */ s("p", { className: e.description, children: t }),
|
|
146
|
-
|
|
147
|
+
i && o && /* @__PURE__ */ s("p", { className: e.invalidMessage, children: o })
|
|
147
148
|
] })
|
|
148
149
|
] });
|
|
149
150
|
}
|
|
150
151
|
);
|
|
151
152
|
export {
|
|
152
|
-
|
|
153
|
+
I as TextArea
|
|
153
154
|
};
|
|
@@ -2,72 +2,72 @@ import { jsxs as a, jsx as e } from "react/jsx-runtime";
|
|
|
2
2
|
import { SerendieSymbolAlertCircle as A, SerendieSymbolClose as W } from "@serendie/symbols";
|
|
3
3
|
import z from "../../node_modules/merge-refs/dist/esm/index.js";
|
|
4
4
|
import m, { forwardRef as B } from "react";
|
|
5
|
-
import { textFieldRecipe as
|
|
5
|
+
import { textFieldRecipe as F } from "../../recipes/textFieldRecipe.js";
|
|
6
6
|
import { useTranslations as D } from "../../i18n/index.js";
|
|
7
7
|
import { cx as E } from "../../styled-system/css/cx.js";
|
|
8
|
-
import { css as
|
|
8
|
+
import { css as V } from "../../styled-system/css/css.js";
|
|
9
9
|
const U = B(
|
|
10
10
|
({
|
|
11
|
-
placeholder:
|
|
11
|
+
placeholder: b,
|
|
12
12
|
label: d,
|
|
13
13
|
description: i,
|
|
14
14
|
required: u,
|
|
15
15
|
requiredLabel: S,
|
|
16
|
-
invalidMessage:
|
|
16
|
+
invalidMessage: c,
|
|
17
17
|
invalid: r,
|
|
18
|
-
type:
|
|
19
|
-
disabled:
|
|
18
|
+
type: w = "text",
|
|
19
|
+
disabled: n,
|
|
20
20
|
onChange: h,
|
|
21
21
|
value: f,
|
|
22
|
-
className:
|
|
22
|
+
className: y,
|
|
23
23
|
leftContent: N,
|
|
24
24
|
rightContent: p,
|
|
25
|
-
...
|
|
26
|
-
},
|
|
27
|
-
const
|
|
28
|
-
...
|
|
29
|
-
}), t =
|
|
30
|
-
var
|
|
31
|
-
const
|
|
25
|
+
...l
|
|
26
|
+
}, C) => {
|
|
27
|
+
const v = D(), o = m.useRef(null), P = z(o, C), [_, j] = F.splitVariantProps({
|
|
28
|
+
...l
|
|
29
|
+
}), t = F(_), I = i || r && c, [T, k] = m.useState(l.defaultValue || f), g = l.id || m.useId(), q = () => {
|
|
30
|
+
var x;
|
|
31
|
+
const s = {
|
|
32
32
|
target: { value: "" }
|
|
33
33
|
};
|
|
34
|
-
|
|
35
|
-
},
|
|
36
|
-
k(
|
|
34
|
+
R(s), (x = l.onReset) == null || x.call(l, s), o.current && (o.current.value = "");
|
|
35
|
+
}, R = (s) => {
|
|
36
|
+
k(s.target.value), h && h(s);
|
|
37
37
|
};
|
|
38
|
-
return /* @__PURE__ */ a("div", { className: E(t.root,
|
|
39
|
-
d ? /* @__PURE__ */ a("label", { className: t.label, htmlFor:
|
|
38
|
+
return /* @__PURE__ */ a("div", { className: E(t.root, y), children: [
|
|
39
|
+
d ? /* @__PURE__ */ a("label", { className: t.label, htmlFor: g, children: [
|
|
40
40
|
d,
|
|
41
|
-
u && /* @__PURE__ */ e("span", { className: t.labelRequired, children: S ??
|
|
41
|
+
u && /* @__PURE__ */ e("span", { className: t.labelRequired, children: S ?? v("common.required") })
|
|
42
42
|
] }) : null,
|
|
43
43
|
/* @__PURE__ */ a(
|
|
44
44
|
"div",
|
|
45
45
|
{
|
|
46
46
|
className: t.inputWrapper,
|
|
47
47
|
"data-invalid": r ? !0 : void 0,
|
|
48
|
-
"data-disabled":
|
|
48
|
+
"data-disabled": n ? !0 : void 0,
|
|
49
49
|
children: [
|
|
50
50
|
N ? /* @__PURE__ */ e("div", { className: t.leftContent, children: N }) : /* @__PURE__ */ e("div", {}),
|
|
51
51
|
/* @__PURE__ */ e(
|
|
52
52
|
"input",
|
|
53
53
|
{
|
|
54
54
|
ref: P,
|
|
55
|
-
id:
|
|
56
|
-
placeholder:
|
|
55
|
+
id: g,
|
|
56
|
+
placeholder: b,
|
|
57
57
|
required: u,
|
|
58
|
-
disabled:
|
|
58
|
+
disabled: n,
|
|
59
59
|
value: f,
|
|
60
|
-
type:
|
|
60
|
+
type: w,
|
|
61
61
|
className: t.input,
|
|
62
|
-
onChange:
|
|
62
|
+
onChange: R,
|
|
63
63
|
...j
|
|
64
64
|
}
|
|
65
65
|
),
|
|
66
|
-
p ? /* @__PURE__ */ e("div", { className: t.rightContent, children: p }) : /* @__PURE__ */ e("div", { className: t.icon, children: !
|
|
66
|
+
p ? /* @__PURE__ */ e("div", { className: t.rightContent, children: p }) : /* @__PURE__ */ e("div", { className: t.icon, children: !n && /* disabledの場合はアイコンを表示しない */
|
|
67
67
|
(r ? /* @__PURE__ */ e(
|
|
68
68
|
"span",
|
|
69
69
|
{
|
|
70
|
-
className:
|
|
70
|
+
className: V({
|
|
71
71
|
color: "sd.system.color.impression.negative"
|
|
72
72
|
}),
|
|
73
73
|
children: /* @__PURE__ */ e(A, { width: 20, height: 20 })
|
|
@@ -75,9 +75,9 @@ const U = B(
|
|
|
75
75
|
) : T ? /* @__PURE__ */ e(
|
|
76
76
|
"button",
|
|
77
77
|
{
|
|
78
|
-
className:
|
|
78
|
+
className: V({ cursor: "pointer" }),
|
|
79
79
|
onClick: q,
|
|
80
|
-
"aria-label": "
|
|
80
|
+
"aria-label": v("textField.clearValue"),
|
|
81
81
|
children: /* @__PURE__ */ e(W, { width: 20, height: 20 })
|
|
82
82
|
}
|
|
83
83
|
) : null) })
|
|
@@ -86,7 +86,7 @@ const U = B(
|
|
|
86
86
|
),
|
|
87
87
|
I && /* @__PURE__ */ a("div", { className: t.messageField, children: [
|
|
88
88
|
i && /* @__PURE__ */ e("p", { className: t.description, children: i }),
|
|
89
|
-
r &&
|
|
89
|
+
r && c && /* @__PURE__ */ e("p", { className: t.invalidMessage, children: c })
|
|
90
90
|
] })
|
|
91
91
|
] });
|
|
92
92
|
}
|
|
@@ -1,10 +1,34 @@
|
|
|
1
1
|
export declare const dictionary: {
|
|
2
2
|
readonly ja: {
|
|
3
3
|
readonly "common.required": "必須";
|
|
4
|
+
readonly "textField.clearValue": "値をクリア";
|
|
5
|
+
readonly "passwordField.hidePassword": "パスワードを隠す";
|
|
6
|
+
readonly "passwordField.showPassword": "パスワードを表示";
|
|
7
|
+
readonly "datePicker.selectDate": "日付を選択";
|
|
8
|
+
readonly "datePicker.startDate": "開始日";
|
|
9
|
+
readonly "datePicker.endDate": "終了日";
|
|
4
10
|
readonly "pagination.page": "{{page}}ページ目";
|
|
11
|
+
readonly "pagination.firstPage": "最初のページです";
|
|
12
|
+
readonly "pagination.previousPage": "前のページへ";
|
|
13
|
+
readonly "pagination.lastPage": "最後のページです";
|
|
14
|
+
readonly "pagination.nextPage": "次のページへ";
|
|
15
|
+
readonly "pagination.goToPage": "ページ{{page}}へ移動";
|
|
16
|
+
readonly "modalDialog.close": "閉じる";
|
|
5
17
|
};
|
|
6
18
|
readonly en: {
|
|
7
19
|
readonly "common.required": "Required";
|
|
20
|
+
readonly "textField.clearValue": "Clear value";
|
|
21
|
+
readonly "passwordField.hidePassword": "Hide password";
|
|
22
|
+
readonly "passwordField.showPassword": "Show password";
|
|
23
|
+
readonly "datePicker.selectDate": "Select date";
|
|
24
|
+
readonly "datePicker.startDate": "Start date";
|
|
25
|
+
readonly "datePicker.endDate": "End date";
|
|
8
26
|
readonly "pagination.page": "Page {{page}}";
|
|
27
|
+
readonly "pagination.firstPage": "This is the first page";
|
|
28
|
+
readonly "pagination.previousPage": "Go to previous page";
|
|
29
|
+
readonly "pagination.lastPage": "This is the last page";
|
|
30
|
+
readonly "pagination.nextPage": "Go to next page";
|
|
31
|
+
readonly "pagination.goToPage": "Go to page {{page}}";
|
|
32
|
+
readonly "modalDialog.close": "Close";
|
|
9
33
|
};
|
|
10
34
|
};
|
package/dist/i18n/dictionary.js
CHANGED
|
@@ -1,13 +1,37 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a = {
|
|
2
2
|
ja: {
|
|
3
3
|
"common.required": "必須",
|
|
4
|
-
"
|
|
4
|
+
"textField.clearValue": "値をクリア",
|
|
5
|
+
"passwordField.hidePassword": "パスワードを隠す",
|
|
6
|
+
"passwordField.showPassword": "パスワードを表示",
|
|
7
|
+
"datePicker.selectDate": "日付を選択",
|
|
8
|
+
"datePicker.startDate": "開始日",
|
|
9
|
+
"datePicker.endDate": "終了日",
|
|
10
|
+
"pagination.page": "{{page}}ページ目",
|
|
11
|
+
"pagination.firstPage": "最初のページです",
|
|
12
|
+
"pagination.previousPage": "前のページへ",
|
|
13
|
+
"pagination.lastPage": "最後のページです",
|
|
14
|
+
"pagination.nextPage": "次のページへ",
|
|
15
|
+
"pagination.goToPage": "ページ{{page}}へ移動",
|
|
16
|
+
"modalDialog.close": "閉じる"
|
|
5
17
|
},
|
|
6
18
|
en: {
|
|
7
19
|
"common.required": "Required",
|
|
8
|
-
"
|
|
20
|
+
"textField.clearValue": "Clear value",
|
|
21
|
+
"passwordField.hidePassword": "Hide password",
|
|
22
|
+
"passwordField.showPassword": "Show password",
|
|
23
|
+
"datePicker.selectDate": "Select date",
|
|
24
|
+
"datePicker.startDate": "Start date",
|
|
25
|
+
"datePicker.endDate": "End date",
|
|
26
|
+
"pagination.page": "Page {{page}}",
|
|
27
|
+
"pagination.firstPage": "This is the first page",
|
|
28
|
+
"pagination.previousPage": "Go to previous page",
|
|
29
|
+
"pagination.lastPage": "This is the last page",
|
|
30
|
+
"pagination.nextPage": "Go to next page",
|
|
31
|
+
"pagination.goToPage": "Go to page {{page}}",
|
|
32
|
+
"modalDialog.close": "Close"
|
|
9
33
|
}
|
|
10
34
|
};
|
|
11
35
|
export {
|
|
12
|
-
|
|
36
|
+
a as dictionary
|
|
13
37
|
};
|
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.3.0-dev.
|
|
5
|
+
"version": "2.3.0-dev.202601080645",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
8
8
|
"sideEffects": [
|