@zenkigen-inc/component-ui 1.15.1 → 1.15.2
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/dist/index.d.mts +434 -0
- package/dist/index.d.ts +434 -27
- package/dist/index.js +1602 -1701
- package/dist/index.mjs +1915 -0
- package/package.json +18 -8
- package/tsup.config.ts +13 -0
- package/vitest.config.ts +11 -0
- package/vitest.setup.ts +1 -0
- package/dist/avatar/avatar.d.ts +0 -10
- package/dist/avatar/index.d.ts +0 -1
- package/dist/breadcrumb/breadcrumb-item.d.ts +0 -2
- package/dist/breadcrumb/breadcrumb.d.ts +0 -5
- package/dist/breadcrumb/index.d.ts +0 -1
- package/dist/button/button.d.ts +0 -22
- package/dist/button/index.d.ts +0 -1
- package/dist/checkbox/checkbox.d.ts +0 -14
- package/dist/checkbox/checked-icon.d.ts +0 -1
- package/dist/checkbox/index.d.ts +0 -1
- package/dist/checkbox/minus-icon.d.ts +0 -1
- package/dist/dropdown/dropdown-context.d.ts +0 -14
- package/dist/dropdown/dropdown-item.d.ts +0 -7
- package/dist/dropdown/dropdown-menu.d.ts +0 -10
- package/dist/dropdown/dropdown.d.ts +0 -26
- package/dist/dropdown/index.d.ts +0 -2
- package/dist/dropdown/type.d.ts +0 -9
- package/dist/evaluation-star/evaluation-star.d.ts +0 -8
- package/dist/evaluation-star/index.d.ts +0 -1
- package/dist/heading/heading.d.ts +0 -10
- package/dist/heading/index.d.ts +0 -1
- package/dist/hooks/index.d.ts +0 -1
- package/dist/hooks/use-outside-click.d.ts +0 -2
- package/dist/icon/icon.d.ts +0 -13
- package/dist/icon/index.d.ts +0 -1
- package/dist/icon-button/icon-button.d.ts +0 -19
- package/dist/icon-button/index.d.ts +0 -1
- package/dist/index.esm.js +0 -2147
- package/dist/index.esm.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/loading/index.d.ts +0 -1
- package/dist/loading/loading.d.ts +0 -7
- package/dist/modal/body-scroll-lock.d.ts +0 -27
- package/dist/modal/index.d.ts +0 -1
- package/dist/modal/modal-body.d.ts +0 -2
- package/dist/modal/modal-context.d.ts +0 -5
- package/dist/modal/modal-footer.d.ts +0 -7
- package/dist/modal/modal-header.d.ts +0 -6
- package/dist/modal/modal.d.ts +0 -18
- package/dist/notification-inline/index.d.ts +0 -1
- package/dist/notification-inline/notification-inline.d.ts +0 -13
- package/dist/pagination/index.d.ts +0 -1
- package/dist/pagination/pagination-button.d.ts +0 -6
- package/dist/pagination/pagination-context.d.ts +0 -6
- package/dist/pagination/pagination.d.ts +0 -12
- package/dist/pagination-select/index.d.ts +0 -1
- package/dist/pagination-select/pagination-select.d.ts +0 -22
- package/dist/radio/index.d.ts +0 -1
- package/dist/radio/radio.d.ts +0 -12
- package/dist/search/index.d.ts +0 -1
- package/dist/search/search.d.ts +0 -12
- package/dist/select/index.d.ts +0 -2
- package/dist/select/select-context.d.ts +0 -11
- package/dist/select/select-item.d.ts +0 -6
- package/dist/select/select-list.d.ts +0 -6
- package/dist/select/select.d.ts +0 -22
- package/dist/select/type.d.ts +0 -7
- package/dist/select-sort/index.d.ts +0 -2
- package/dist/select-sort/select-item.d.ts +0 -7
- package/dist/select-sort/select-list.d.ts +0 -10
- package/dist/select-sort/select-sort.d.ts +0 -15
- package/dist/select-sort/type.d.ts +0 -1
- package/dist/tab/index.d.ts +0 -2
- package/dist/tab/tab-item.d.ts +0 -10
- package/dist/tab/tab.d.ts +0 -15
- package/dist/table/index.d.ts +0 -3
- package/dist/table/table-cell.d.ts +0 -8
- package/dist/table/table-row.d.ts +0 -7
- package/dist/table/table.d.ts +0 -16
- package/dist/tag/delete-icon.d.ts +0 -8
- package/dist/tag/index.d.ts +0 -2
- package/dist/tag/tag.d.ts +0 -17
- package/dist/tag/type.d.ts +0 -3
- package/dist/text-area/index.d.ts +0 -1
- package/dist/text-area/text-area.d.ts +0 -8
- package/dist/text-input/index.d.ts +0 -1
- package/dist/text-input/text-input.d.ts +0 -7
- package/dist/toast/index.d.ts +0 -2
- package/dist/toast/toast-provider.d.ts +0 -13
- package/dist/toast/toast.d.ts +0 -12
- package/dist/toast/type.d.ts +0 -1
- package/dist/toggle/index.d.ts +0 -1
- package/dist/toggle/toggle.d.ts +0 -12
- package/dist/tooltip/index.d.ts +0 -1
- package/dist/tooltip/tail-icon.d.ts +0 -8
- package/dist/tooltip/tooltip-content.d.ts +0 -11
- package/dist/tooltip/tooltip.d.ts +0 -13
- package/dist/tooltip/tooltip.hook.d.ts +0 -11
- package/dist/tooltip/type.d.ts +0 -13
package/dist/index.js
CHANGED
|
@@ -1,148 +1,197 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
function _objectWithoutPropertiesLoose(r, e) {
|
|
18
|
-
if (null == r) return {};
|
|
19
|
-
var t = {};
|
|
20
|
-
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
21
|
-
if (-1 !== e.indexOf(n)) continue;
|
|
22
|
-
t[n] = r[n];
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
23
17
|
}
|
|
24
|
-
return
|
|
25
|
-
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
26
29
|
|
|
27
|
-
|
|
28
|
-
|
|
30
|
+
// src/index.ts
|
|
31
|
+
var index_exports = {};
|
|
32
|
+
__export(index_exports, {
|
|
33
|
+
Avatar: () => Avatar,
|
|
34
|
+
Breadcrumb: () => Breadcrumb,
|
|
35
|
+
Button: () => Button,
|
|
36
|
+
Checkbox: () => Checkbox,
|
|
37
|
+
Dropdown: () => Dropdown,
|
|
38
|
+
EvaluationStar: () => EvaluationStar,
|
|
39
|
+
Heading: () => Heading,
|
|
40
|
+
Icon: () => Icon,
|
|
41
|
+
IconButton: () => IconButton,
|
|
42
|
+
Loading: () => Loading,
|
|
43
|
+
Modal: () => Modal,
|
|
44
|
+
NotificationInline: () => NotificationInline,
|
|
45
|
+
Pagination: () => Pagination,
|
|
46
|
+
PaginationSelect: () => PaginationSelect,
|
|
47
|
+
Radio: () => Radio,
|
|
48
|
+
Search: () => Search,
|
|
49
|
+
Select: () => Select,
|
|
50
|
+
SelectSort: () => SelectSort,
|
|
51
|
+
Tab: () => Tab,
|
|
52
|
+
TabItem: () => TabItem,
|
|
53
|
+
Table: () => Table,
|
|
54
|
+
TableCell: () => TableCell,
|
|
55
|
+
TableRow: () => TableRow,
|
|
56
|
+
Tag: () => Tag,
|
|
57
|
+
TextArea: () => TextArea,
|
|
58
|
+
TextInput: () => TextInput,
|
|
59
|
+
Toast: () => Toast,
|
|
60
|
+
ToastProvider: () => ToastProvider,
|
|
61
|
+
Toggle: () => Toggle,
|
|
62
|
+
Tooltip: () => Tooltip,
|
|
63
|
+
useOutsideClick: () => useOutsideClick,
|
|
64
|
+
useToast: () => useToast
|
|
65
|
+
});
|
|
66
|
+
module.exports = __toCommonJS(index_exports);
|
|
67
|
+
|
|
68
|
+
// src/avatar/avatar.tsx
|
|
69
|
+
var import_component_theme = require("@zenkigen-inc/component-theme");
|
|
70
|
+
var import_clsx = require("clsx");
|
|
71
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
72
|
+
var isAsciiString = (str) => {
|
|
29
73
|
return str.charCodeAt(0) < 256;
|
|
30
74
|
};
|
|
31
|
-
function Avatar(
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
'bg-icon01': props.userId == null,
|
|
45
|
-
[userColors[((_props$userId = props.userId) != null ? _props$userId : 0) % userColors.length]]: props.userId != null && !((_props$isDisabled = props.isDisabled) != null ? _props$isDisabled : false)
|
|
46
|
-
});
|
|
47
|
-
const trimmedFirstName = props.firstName.replace(' ', ' ').trim();
|
|
48
|
-
const trimmedLastName = props.lastName.replace(' ', ' ').trim().trim();
|
|
75
|
+
function Avatar({ size = "medium", ...props }) {
|
|
76
|
+
const classes = (0, import_clsx.clsx)("flex items-center justify-center rounded-full text-textOnColor", {
|
|
77
|
+
"w-16 h-16 typography-label16regular": size === "x-large",
|
|
78
|
+
"w-12 h-12 typography-label14regular": size === "large",
|
|
79
|
+
"w-10 h-10 typography-label14regular": size === "medium",
|
|
80
|
+
"w-8 h-8 typography-label11regular": size === "small",
|
|
81
|
+
"w-6 h-6 typography-label11regular": size === "x-small",
|
|
82
|
+
"bg-disabled01": props.isDisabled,
|
|
83
|
+
"bg-icon01": props.userId == null,
|
|
84
|
+
[import_component_theme.userColors[(props.userId ?? 0) % import_component_theme.userColors.length]]: props.userId != null && !(props.isDisabled ?? false)
|
|
85
|
+
});
|
|
86
|
+
const trimmedFirstName = props.firstName.replace("\u3000", " ").trim();
|
|
87
|
+
const trimmedLastName = props.lastName.replace("\u3000", " ").trim().trim();
|
|
49
88
|
const nameOnIcon = isAsciiString(trimmedLastName) ? trimmedFirstName.slice(0, 1).toUpperCase() + trimmedLastName.slice(0, 1).toUpperCase() : (trimmedLastName + trimmedFirstName).slice(0, 2);
|
|
50
|
-
return
|
|
51
|
-
className: classes,
|
|
52
|
-
children: nameOnIcon
|
|
53
|
-
});
|
|
89
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: classes, children: nameOnIcon });
|
|
54
90
|
}
|
|
55
91
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
}) => {
|
|
59
|
-
return
|
|
60
|
-
className: "flex gap-2 after:content-['/'] last:after:content-none [&_a]:text-interactive02 [&_a]:hover:underline",
|
|
61
|
-
children: children
|
|
62
|
-
});
|
|
92
|
+
// src/breadcrumb/breadcrumb-item.tsx
|
|
93
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
94
|
+
var BreadcrumbItem = ({ children }) => {
|
|
95
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("li", { className: "flex gap-2 after:content-['/'] last:after:content-none [&_a]:text-interactive02 [&_a]:hover:underline", children });
|
|
63
96
|
};
|
|
64
97
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
}) {
|
|
68
|
-
return
|
|
69
|
-
"aria-label": "breadcrumb",
|
|
70
|
-
children: /*#__PURE__*/jsx("ul", {
|
|
71
|
-
className: "typography-label14regular flex flex-wrap gap-2 whitespace-nowrap text-text01",
|
|
72
|
-
children: children
|
|
73
|
-
})
|
|
74
|
-
});
|
|
98
|
+
// src/breadcrumb/breadcrumb.tsx
|
|
99
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
100
|
+
function Breadcrumb({ children }) {
|
|
101
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("nav", { "aria-label": "breadcrumb", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("ul", { className: "typography-label14regular flex flex-wrap gap-2 whitespace-nowrap text-text01", children }) });
|
|
75
102
|
}
|
|
76
103
|
Breadcrumb.Item = BreadcrumbItem;
|
|
77
104
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
}
|
|
105
|
+
// src/button/button.tsx
|
|
106
|
+
var import_component_theme2 = require("@zenkigen-inc/component-theme");
|
|
107
|
+
var import_clsx2 = require("clsx");
|
|
108
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
109
|
+
var Button = ({
|
|
110
|
+
size = "medium",
|
|
111
|
+
variant = "fill",
|
|
112
|
+
isDisabled,
|
|
113
|
+
isSelected = false,
|
|
114
|
+
width,
|
|
115
|
+
borderRadius,
|
|
116
|
+
justifyContent = "center",
|
|
117
|
+
before,
|
|
118
|
+
after,
|
|
119
|
+
elementAs,
|
|
120
|
+
children,
|
|
121
|
+
...props
|
|
122
|
+
}) => {
|
|
123
|
+
const baseClasses = (0, import_clsx2.clsx)(
|
|
124
|
+
"flex shrink-0 items-center gap-1",
|
|
125
|
+
import_component_theme2.buttonColors[variant].hover,
|
|
126
|
+
import_component_theme2.buttonColors[variant].active,
|
|
127
|
+
import_component_theme2.buttonColors[variant].disabled,
|
|
128
|
+
import_component_theme2.focusVisible.normal,
|
|
129
|
+
{
|
|
130
|
+
"h-6 px-2.5": size === "small",
|
|
131
|
+
"h-8 px-3": size === "medium",
|
|
132
|
+
"h-10 px-4 leading-[24px]": size === "large",
|
|
133
|
+
"inline-flex": elementAs === "a",
|
|
134
|
+
[import_component_theme2.buttonColors[variant].selected]: isSelected,
|
|
135
|
+
[import_component_theme2.buttonColors[variant].base]: !isSelected,
|
|
136
|
+
"hover:text-textOnColor active:text-textOnColor [&:hover>*]:fill-iconOnColor [&:active>*]:fill-iconOnColor": isSelected && variant !== "outline" && variant !== "text",
|
|
137
|
+
"pointer-events-none": isDisabled,
|
|
138
|
+
"rounded-button": borderRadius == null,
|
|
139
|
+
"justify-start": justifyContent === "start",
|
|
140
|
+
"justify-center": justifyContent === "center",
|
|
141
|
+
"typography-label16regular": size === "large",
|
|
142
|
+
"typography-label14regular": size !== "large"
|
|
143
|
+
}
|
|
144
|
+
);
|
|
145
|
+
const Component = elementAs ?? "button";
|
|
146
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Component, { className: baseClasses, style: { width, borderRadius }, disabled: isDisabled, ...props, children: [
|
|
147
|
+
before,
|
|
148
|
+
children,
|
|
149
|
+
after
|
|
150
|
+
] });
|
|
120
151
|
};
|
|
121
152
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
153
|
+
// src/checkbox/checkbox.tsx
|
|
154
|
+
var import_component_theme3 = require("@zenkigen-inc/component-theme");
|
|
155
|
+
var import_clsx3 = __toESM(require("clsx"));
|
|
156
|
+
var import_react = require("react");
|
|
157
|
+
|
|
158
|
+
// src/checkbox/checked-icon.tsx
|
|
159
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
160
|
+
var CheckedIcon = () => {
|
|
161
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
162
|
+
"svg",
|
|
163
|
+
{
|
|
164
|
+
viewBox: "0 0 20 20",
|
|
165
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
166
|
+
className: "absolute z-10 size-5 rounded-sm fill-iconOnColor hover:rounded-sm",
|
|
167
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
168
|
+
"path",
|
|
169
|
+
{
|
|
170
|
+
fillRule: "evenodd",
|
|
171
|
+
clipRule: "evenodd",
|
|
172
|
+
d: "M16.2887 5.38099C16.0069 5.09924 15.5518 5.09924 15.2701 5.38099L7.55461 13.0893L4.72993 10.2646C4.44818 9.98283 3.99305 9.98283 3.71131 10.2646C3.42956 10.5463 3.42956 11.0014 3.71131 11.2832L7.04891 14.6208C7.1934 14.7653 7.374 14.8303 7.56183 14.8303C7.74966 14.8303 7.93027 14.7581 8.07475 14.6208L16.2887 6.40683C16.5704 6.12508 16.5704 5.66273 16.2887 5.38099Z"
|
|
173
|
+
}
|
|
174
|
+
)
|
|
175
|
+
}
|
|
176
|
+
);
|
|
133
177
|
};
|
|
134
178
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
179
|
+
// src/checkbox/minus-icon.tsx
|
|
180
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
181
|
+
var MinusIcon = () => {
|
|
182
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
183
|
+
"svg",
|
|
184
|
+
{
|
|
185
|
+
viewBox: "0 0 20 20",
|
|
186
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
187
|
+
className: "absolute z-10 size-5 rounded-sm fill-iconOnColor hover:rounded-sm",
|
|
188
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M4.94723 10.5028H9.49726H10.5028H15.0528C15.3293 10.5028 15.5556 10.2766 15.5556 10C15.5556 9.72352 15.3293 9.49725 15.0528 9.49725H10.5028H9.49726H4.94723C4.67071 9.49725 4.44446 9.72352 4.44446 10C4.44446 10.2766 4.67071 10.5028 4.94723 10.5028Z" })
|
|
189
|
+
}
|
|
190
|
+
);
|
|
144
191
|
};
|
|
145
192
|
|
|
193
|
+
// src/checkbox/checkbox.tsx
|
|
194
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
146
195
|
function Checkbox({
|
|
147
196
|
name,
|
|
148
197
|
value,
|
|
@@ -152,218 +201,223 @@ function Checkbox({
|
|
|
152
201
|
isDisabled = false,
|
|
153
202
|
onChange,
|
|
154
203
|
label,
|
|
155
|
-
color =
|
|
204
|
+
color = "default"
|
|
156
205
|
}) {
|
|
157
|
-
const [isMouseOver, setIsMouseOver] = useState(false);
|
|
158
|
-
const handleMouseOverInput = useCallback(() => {
|
|
206
|
+
const [isMouseOver, setIsMouseOver] = (0, import_react.useState)(false);
|
|
207
|
+
const handleMouseOverInput = (0, import_react.useCallback)(() => {
|
|
159
208
|
setIsMouseOver(true);
|
|
160
209
|
}, []);
|
|
161
|
-
const handleMouseOutInput = useCallback(() => {
|
|
210
|
+
const handleMouseOutInput = (0, import_react.useCallback)(() => {
|
|
162
211
|
setIsMouseOver(false);
|
|
163
212
|
}, []);
|
|
164
|
-
const handleChange =
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
});
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
})
|
|
231
|
-
|
|
213
|
+
const handleChange = (0, import_react.useCallback)(
|
|
214
|
+
(e) => !isDisabled && onChange?.(e),
|
|
215
|
+
[isDisabled, onChange]
|
|
216
|
+
);
|
|
217
|
+
const baseInputClasses = (0, import_clsx3.default)("peer absolute z-[1] size-5 opacity-0", {
|
|
218
|
+
"cursor-not-allowed": isDisabled,
|
|
219
|
+
"cursor-pointer": !isDisabled
|
|
220
|
+
});
|
|
221
|
+
const boxClasses = (0, import_clsx3.default)(
|
|
222
|
+
"inline-flex size-5 items-center justify-center rounded-sm border bg-white",
|
|
223
|
+
import_component_theme3.focusVisible.normalPeer,
|
|
224
|
+
{
|
|
225
|
+
"border-disabled01": isDisabled,
|
|
226
|
+
"border-hoverUiBorder": !isDisabled && isMouseOver && color === "default",
|
|
227
|
+
"border-uiBorder03": !isDisabled && !isMouseOver && color === "default",
|
|
228
|
+
"border-interactive02": !isDisabled && !isMouseOver && color === "gray",
|
|
229
|
+
"border-hoverError": !isDisabled && isMouseOver && color === "error",
|
|
230
|
+
"border-supportError": !isDisabled && !isMouseOver && color === "error"
|
|
231
|
+
}
|
|
232
|
+
);
|
|
233
|
+
const indicatorClasses = (0, import_clsx3.default)("relative flex size-5 flex-[0_0_auto] items-center justify-center", {
|
|
234
|
+
"bg-disabled01": isDisabled && isChecked,
|
|
235
|
+
"border-disabled01": isDisabled
|
|
236
|
+
});
|
|
237
|
+
const afterClasses = (0, import_clsx3.default)("absolute inset-0 m-auto block rounded-sm", {
|
|
238
|
+
"bg-disabled01": isDisabled && isChecked,
|
|
239
|
+
"bg-hover01": !(isDisabled && isChecked) && isMouseOver,
|
|
240
|
+
"bg-interactive01": !(isDisabled && isChecked) && !isMouseOver,
|
|
241
|
+
"bg-hover02Dark": !(isDisabled && isChecked) && isMouseOver && color === "gray",
|
|
242
|
+
"bg-interactive02": !(isDisabled && isChecked) && !isMouseOver && color === "gray",
|
|
243
|
+
"bg-hoverError": !(isDisabled && isChecked) && isMouseOver && color === "error",
|
|
244
|
+
"bg-supportError": !(isDisabled && isChecked) && !isMouseOver && color === "error",
|
|
245
|
+
"scale-0": !isChecked,
|
|
246
|
+
"scale-100": isChecked
|
|
247
|
+
});
|
|
248
|
+
const hoverIndicatorClasses = (0, import_clsx3.default)("inline-block size-3 rounded-[1px]", {
|
|
249
|
+
"bg-hoverUi": !isDisabled && !isChecked && isMouseOver
|
|
250
|
+
});
|
|
251
|
+
const labelClasses = (0, import_clsx3.default)("typography-label14regular ml-2 flex-[1_0_0] break-all", {
|
|
252
|
+
"pointer-events-none cursor-not-allowed text-disabled01": isDisabled,
|
|
253
|
+
"cursor-pointer text-text01": !isDisabled
|
|
254
|
+
});
|
|
255
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex items-center", children: [
|
|
256
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "relative flex size-6 items-center justify-center", children: [
|
|
257
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
258
|
+
"input",
|
|
259
|
+
{
|
|
260
|
+
type: "checkbox",
|
|
261
|
+
value,
|
|
262
|
+
name,
|
|
263
|
+
id,
|
|
264
|
+
checked: isChecked,
|
|
265
|
+
disabled: isDisabled,
|
|
266
|
+
onChange: handleChange,
|
|
267
|
+
onMouseOver: handleMouseOverInput,
|
|
268
|
+
onMouseLeave: handleMouseOutInput,
|
|
269
|
+
className: baseInputClasses
|
|
270
|
+
}
|
|
271
|
+
),
|
|
272
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: boxClasses, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: indicatorClasses, children: [
|
|
273
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: afterClasses, children: [
|
|
274
|
+
isChecked && !isIndeterminate && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(CheckedIcon, {}),
|
|
275
|
+
isIndeterminate && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(MinusIcon, {})
|
|
276
|
+
] }),
|
|
277
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: hoverIndicatorClasses })
|
|
278
|
+
] }) })
|
|
279
|
+
] }),
|
|
280
|
+
label != null && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("label", { htmlFor: id, className: labelClasses, children: label })
|
|
281
|
+
] });
|
|
232
282
|
}
|
|
233
283
|
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
284
|
+
// src/dropdown/dropdown.tsx
|
|
285
|
+
var import_component_theme6 = require("@zenkigen-inc/component-theme");
|
|
286
|
+
var import_clsx7 = __toESM(require("clsx"));
|
|
287
|
+
var import_react6 = require("react");
|
|
288
|
+
var import_react_dom = require("react-dom");
|
|
289
|
+
|
|
290
|
+
// src/hooks/use-outside-click.ts
|
|
291
|
+
var import_react2 = require("react");
|
|
292
|
+
var useOutsideClick = (ref, handler, enabled = true) => {
|
|
293
|
+
(0, import_react2.useEffect)(() => {
|
|
294
|
+
const listener = (event) => {
|
|
295
|
+
const element = ref?.current;
|
|
296
|
+
if (element == null || Boolean(element.contains(event?.target ?? null))) {
|
|
240
297
|
return;
|
|
241
298
|
}
|
|
242
299
|
handler(event);
|
|
243
300
|
};
|
|
244
301
|
if (enabled) {
|
|
245
|
-
document.addEventListener(
|
|
302
|
+
document.addEventListener("click", listener);
|
|
246
303
|
}
|
|
247
|
-
return () => document.removeEventListener(
|
|
304
|
+
return () => document.removeEventListener("click", listener);
|
|
248
305
|
}, [ref, enabled, handler]);
|
|
249
306
|
};
|
|
250
307
|
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
className
|
|
272
|
-
|
|
273
|
-
});
|
|
308
|
+
// src/icon/icon.tsx
|
|
309
|
+
var import_component_icons = require("@zenkigen-inc/component-icons");
|
|
310
|
+
var import_component_theme4 = require("@zenkigen-inc/component-theme");
|
|
311
|
+
var import_clsx4 = require("clsx");
|
|
312
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
313
|
+
var Icon = ({ size = "medium", isDisabled = false, ...props }) => {
|
|
314
|
+
const classes = (0, import_clsx4.clsx)(
|
|
315
|
+
"inline-block shrink-0",
|
|
316
|
+
{
|
|
317
|
+
"fill-disabled01": isDisabled,
|
|
318
|
+
[import_component_theme4.iconColors.icon01]: !isDisabled && props.color === "icon01",
|
|
319
|
+
[import_component_theme4.iconColors.icon02]: !isDisabled && props.color === "icon02",
|
|
320
|
+
[import_component_theme4.iconColors.icon03]: !isDisabled && props.color === "icon03",
|
|
321
|
+
[import_component_theme4.iconColors.iconOnColor]: !isDisabled && props.color === "iconOnColor",
|
|
322
|
+
"w-3 h-3": size === "x-small",
|
|
323
|
+
"w-4 h-4": size === "small",
|
|
324
|
+
"w-6 h-6": size === "medium",
|
|
325
|
+
"w-8 h-8": size === "large",
|
|
326
|
+
"w-10 h-10": size === "x-large"
|
|
327
|
+
},
|
|
328
|
+
props.className
|
|
329
|
+
);
|
|
330
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: classes, children: import_component_icons.iconElements[props.name] });
|
|
274
331
|
};
|
|
275
332
|
|
|
276
|
-
|
|
333
|
+
// src/dropdown/dropdown-context.ts
|
|
334
|
+
var import_react3 = require("react");
|
|
335
|
+
var DropdownContext = (0, import_react3.createContext)({
|
|
277
336
|
isVisible: false,
|
|
278
337
|
setIsVisible: () => false,
|
|
279
338
|
isDisabled: false,
|
|
280
|
-
targetDimensions: {
|
|
281
|
-
|
|
282
|
-
height: 0
|
|
283
|
-
},
|
|
284
|
-
variant: 'outline'
|
|
339
|
+
targetDimensions: { width: 0, height: 0 },
|
|
340
|
+
variant: "outline"
|
|
285
341
|
});
|
|
286
342
|
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
const handleClickItem = event => {
|
|
343
|
+
// src/dropdown/dropdown-item.tsx
|
|
344
|
+
var import_component_theme5 = require("@zenkigen-inc/component-theme");
|
|
345
|
+
var import_clsx5 = __toESM(require("clsx"));
|
|
346
|
+
var import_react4 = require("react");
|
|
347
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
348
|
+
function DropdownItem({ children, color = "gray", onClick }) {
|
|
349
|
+
const { setIsVisible } = (0, import_react4.useContext)(DropdownContext);
|
|
350
|
+
const handleClickItem = (event) => {
|
|
296
351
|
setIsVisible(false);
|
|
297
|
-
onClick
|
|
352
|
+
onClick?.(event);
|
|
298
353
|
};
|
|
299
|
-
const itemClasses =
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
onClick: handleClickItem,
|
|
309
|
-
children: children
|
|
310
|
-
})
|
|
311
|
-
});
|
|
354
|
+
const itemClasses = (0, import_clsx5.default)(
|
|
355
|
+
"typography-label14regular flex h-8 w-full items-center px-3 hover:bg-hover02 active:bg-active02",
|
|
356
|
+
import_component_theme5.focusVisible.inset,
|
|
357
|
+
{
|
|
358
|
+
"bg-uiBackground01 fill-icon01 text-interactive02": color === "gray",
|
|
359
|
+
"fill-supportDanger text-supportDanger": color === "red"
|
|
360
|
+
}
|
|
361
|
+
);
|
|
362
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("li", { className: "flex w-full items-center", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("button", { className: itemClasses, type: "button", onClick: handleClickItem, children }) });
|
|
312
363
|
}
|
|
313
364
|
|
|
365
|
+
// src/dropdown/dropdown-menu.tsx
|
|
366
|
+
var import_clsx6 = __toESM(require("clsx"));
|
|
367
|
+
var import_react5 = require("react");
|
|
368
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
314
369
|
function DropdownMenu({
|
|
315
370
|
children,
|
|
316
371
|
maxHeight,
|
|
317
372
|
isNoPadding = false,
|
|
318
|
-
verticalPosition =
|
|
319
|
-
horizontalAlign =
|
|
373
|
+
verticalPosition = "bottom",
|
|
374
|
+
horizontalAlign = "left"
|
|
320
375
|
}) {
|
|
321
|
-
const {
|
|
322
|
-
|
|
323
|
-
isDisabled,
|
|
324
|
-
targetDimensions,
|
|
325
|
-
variant,
|
|
326
|
-
portalTargetRef
|
|
327
|
-
} = useContext(DropdownContext);
|
|
328
|
-
const wrapperClasses = clsx$1('z-dropdown w-max overflow-y-auto rounded bg-uiBackground01 shadow-floatingShadow', {
|
|
376
|
+
const { isVisible, isDisabled, targetDimensions, variant, portalTargetRef } = (0, import_react5.useContext)(DropdownContext);
|
|
377
|
+
const wrapperClasses = (0, import_clsx6.default)("z-dropdown w-max overflow-y-auto rounded bg-uiBackground01 shadow-floatingShadow", {
|
|
329
378
|
absolute: !portalTargetRef,
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
});
|
|
336
|
-
return isVisible && !isDisabled &&
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
379
|
+
"border-solid border border-uiBorder01": variant === "outline",
|
|
380
|
+
"py-1": !isNoPadding,
|
|
381
|
+
"left-0": horizontalAlign === "left",
|
|
382
|
+
"right-0": horizontalAlign === "right",
|
|
383
|
+
"left-auto": horizontalAlign === "center"
|
|
384
|
+
});
|
|
385
|
+
return isVisible && !isDisabled && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
386
|
+
"ul",
|
|
387
|
+
{
|
|
388
|
+
className: wrapperClasses,
|
|
389
|
+
style: {
|
|
390
|
+
top: !portalTargetRef && verticalPosition === "bottom" ? `${targetDimensions.height + 4}px` : "unset",
|
|
391
|
+
bottom: !portalTargetRef && verticalPosition === "top" ? `${targetDimensions.height + 4}px` : "unset",
|
|
392
|
+
maxHeight
|
|
393
|
+
},
|
|
394
|
+
children
|
|
395
|
+
}
|
|
396
|
+
);
|
|
345
397
|
}
|
|
346
398
|
|
|
399
|
+
// src/dropdown/dropdown.tsx
|
|
400
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
347
401
|
function Dropdown({
|
|
348
402
|
children,
|
|
349
403
|
target,
|
|
350
404
|
label,
|
|
351
405
|
icon,
|
|
352
|
-
size =
|
|
353
|
-
variant =
|
|
406
|
+
size = "medium",
|
|
407
|
+
variant = "outline",
|
|
354
408
|
title,
|
|
355
409
|
isDisabled = false,
|
|
356
410
|
isArrowHidden = false,
|
|
357
411
|
portalTargetRef
|
|
358
412
|
}) {
|
|
359
|
-
const [isVisible, setIsVisible] = useState(false);
|
|
360
|
-
const [targetDimensions, setTargetDimensions] = useState({
|
|
413
|
+
const [isVisible, setIsVisible] = (0, import_react6.useState)(false);
|
|
414
|
+
const [targetDimensions, setTargetDimensions] = (0, import_react6.useState)({
|
|
361
415
|
width: 0,
|
|
362
416
|
height: 0
|
|
363
417
|
});
|
|
364
|
-
const targetRef = useRef(null);
|
|
418
|
+
const targetRef = (0, import_react6.useRef)(null);
|
|
365
419
|
useOutsideClick(targetRef, () => setIsVisible(false));
|
|
366
|
-
const handleToggle = useCallback(() => {
|
|
420
|
+
const handleToggle = (0, import_react6.useCallback)(() => {
|
|
367
421
|
if (targetRef.current === null) {
|
|
368
422
|
return;
|
|
369
423
|
}
|
|
@@ -379,279 +433,228 @@ function Dropdown({
|
|
|
379
433
|
setIsVisible(true);
|
|
380
434
|
}
|
|
381
435
|
}, [isVisible]);
|
|
382
|
-
const wrapperClasses =
|
|
383
|
-
|
|
384
|
-
});
|
|
385
|
-
const childrenButtonClasses =
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
className: labelClasses,
|
|
441
|
-
children:
|
|
442
|
-
}),
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
})
|
|
448
|
-
})]
|
|
449
|
-
}), !portalTargetRef ? children : portalTargetRef != null && portalTargetRef.current && /*#__PURE__*/createPortal(children, portalTargetRef.current)]
|
|
450
|
-
})
|
|
451
|
-
});
|
|
436
|
+
const wrapperClasses = (0, import_clsx7.default)("relative flex shrink-0 items-center gap-1 rounded", {
|
|
437
|
+
"cursor-not-allowed": isDisabled
|
|
438
|
+
});
|
|
439
|
+
const childrenButtonClasses = (0, import_clsx7.default)(
|
|
440
|
+
"flex items-center justify-center rounded bg-uiBackground01 p-1 hover:bg-hover02 active:bg-active02",
|
|
441
|
+
import_component_theme6.focusVisible.normal,
|
|
442
|
+
{
|
|
443
|
+
"pointer-events-none": isDisabled,
|
|
444
|
+
"border border-uiBorder02": variant === "outline"
|
|
445
|
+
}
|
|
446
|
+
);
|
|
447
|
+
const buttonClasses = (0, import_clsx7.default)(
|
|
448
|
+
"flex items-center rounded bg-uiBackground01",
|
|
449
|
+
import_component_theme6.buttonColors[variant].base,
|
|
450
|
+
import_component_theme6.buttonColors[variant].hover,
|
|
451
|
+
import_component_theme6.buttonColors[variant].active,
|
|
452
|
+
import_component_theme6.buttonColors[variant].disabled,
|
|
453
|
+
import_component_theme6.focusVisible.normal,
|
|
454
|
+
{
|
|
455
|
+
"pointer-events-none": isDisabled,
|
|
456
|
+
"h-6 px-2": size === "x-small" || size === "small",
|
|
457
|
+
"h-8 px-4": size === "medium",
|
|
458
|
+
"h-10 px-4": size === "large"
|
|
459
|
+
}
|
|
460
|
+
);
|
|
461
|
+
const labelClasses = (0, import_clsx7.default)("flex items-center", {
|
|
462
|
+
"mr-1": !isArrowHidden && size === "x-small",
|
|
463
|
+
"mr-2": !isArrowHidden && size !== "x-small",
|
|
464
|
+
"typography-label12regular": size === "x-small",
|
|
465
|
+
"typography-label14regular": size === "small" || size === "medium",
|
|
466
|
+
"typography-label16regular": size === "large"
|
|
467
|
+
});
|
|
468
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
469
|
+
DropdownContext.Provider,
|
|
470
|
+
{
|
|
471
|
+
value: { isVisible, setIsVisible, isDisabled, targetDimensions, variant, portalTargetRef },
|
|
472
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { ref: targetRef, className: wrapperClasses, children: [
|
|
473
|
+
target ? /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
474
|
+
"button",
|
|
475
|
+
{
|
|
476
|
+
type: "button",
|
|
477
|
+
title,
|
|
478
|
+
className: childrenButtonClasses,
|
|
479
|
+
onClick: handleToggle,
|
|
480
|
+
disabled: isDisabled,
|
|
481
|
+
children: [
|
|
482
|
+
target,
|
|
483
|
+
!isArrowHidden && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "ml-2 flex items-center fill-icon01", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
484
|
+
Icon,
|
|
485
|
+
{
|
|
486
|
+
name: isVisible ? "angle-small-up" : "angle-small-down",
|
|
487
|
+
size: size === "large" ? "medium" : "small"
|
|
488
|
+
}
|
|
489
|
+
) })
|
|
490
|
+
]
|
|
491
|
+
}
|
|
492
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("button", { type: "button", title, className: buttonClasses, onClick: handleToggle, disabled: isDisabled, children: [
|
|
493
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "mr-1 flex", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Icon, { name: icon, size: size === "large" ? "medium" : "small" }) }),
|
|
494
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: labelClasses, children: label }),
|
|
495
|
+
!isArrowHidden && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "ml-auto flex items-center", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Icon, { name: isVisible ? "angle-small-up" : "angle-small-down", size: "small" }) })
|
|
496
|
+
] }),
|
|
497
|
+
!portalTargetRef ? children : portalTargetRef != null && portalTargetRef.current && (0, import_react_dom.createPortal)(children, portalTargetRef.current)
|
|
498
|
+
] })
|
|
499
|
+
}
|
|
500
|
+
);
|
|
452
501
|
}
|
|
453
502
|
Dropdown.Menu = DropdownMenu;
|
|
454
503
|
Dropdown.Item = DropdownItem;
|
|
455
504
|
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
505
|
+
// src/evaluation-star/evaluation-star.tsx
|
|
506
|
+
var import_component_icons2 = require("@zenkigen-inc/component-icons");
|
|
507
|
+
var import_component_theme7 = require("@zenkigen-inc/component-theme");
|
|
508
|
+
var import_clsx8 = __toESM(require("clsx"));
|
|
509
|
+
var import_react7 = require("react");
|
|
510
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
511
|
+
function EvaluationStar({ value, isEditable = false, onChangeRating, size = "medium" }) {
|
|
462
512
|
const maxRating = 5;
|
|
463
|
-
const [currentRating, setCurrentRating] = useState(value);
|
|
464
|
-
const handleChangeRating = useCallback(
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
onChangeRating
|
|
513
|
+
const [currentRating, setCurrentRating] = (0, import_react7.useState)(value);
|
|
514
|
+
const handleChangeRating = (0, import_react7.useCallback)(
|
|
515
|
+
(newRating) => {
|
|
516
|
+
if (isEditable) {
|
|
517
|
+
setCurrentRating(newRating);
|
|
518
|
+
if (onChangeRating) {
|
|
519
|
+
onChangeRating(newRating);
|
|
520
|
+
}
|
|
469
521
|
}
|
|
470
|
-
}
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
522
|
+
},
|
|
523
|
+
[isEditable, onChangeRating]
|
|
524
|
+
);
|
|
525
|
+
const starClasses = (0, import_clsx8.default)(import_component_theme7.focusVisible.inset, { "w-6 h-6": size === "large", "w-4 h-4": size === "medium" });
|
|
526
|
+
const renderStar = (rating) => {
|
|
527
|
+
const color = rating <= currentRating ? "fill-yellow-yellow50" : "fill-icon03";
|
|
528
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
529
|
+
"button",
|
|
530
|
+
{
|
|
531
|
+
type: "button",
|
|
532
|
+
onClick: () => handleChangeRating(rating),
|
|
533
|
+
className: (0, import_clsx8.default)(color, starClasses),
|
|
534
|
+
disabled: !isEditable,
|
|
535
|
+
children: import_component_icons2.iconElements["star-filled"]
|
|
536
|
+
},
|
|
537
|
+
rating
|
|
538
|
+
);
|
|
486
539
|
};
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
length: maxRating
|
|
490
|
-
}, (_, index) => renderStar(index + 1));
|
|
491
|
-
return /*#__PURE__*/jsx("span", {
|
|
492
|
-
className: "flex flex-row",
|
|
493
|
-
children: ratingStars
|
|
494
|
-
});
|
|
540
|
+
const ratingStars = Array.from({ length: maxRating }, (_, index) => renderStar(index + 1));
|
|
541
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "flex flex-row", children: ratingStars });
|
|
495
542
|
}
|
|
496
543
|
|
|
544
|
+
// src/heading/heading.tsx
|
|
545
|
+
var import_component_theme8 = require("@zenkigen-inc/component-theme");
|
|
546
|
+
var import_clsx9 = require("clsx");
|
|
547
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
497
548
|
function Heading(props) {
|
|
498
549
|
const TagName = `h${props.level}`;
|
|
499
|
-
const classes = clsx(`flex items-center text-text01`, typography.heading[TagName], {
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
});
|
|
503
|
-
return
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
550
|
+
const classes = (0, import_clsx9.clsx)(`flex items-center text-text01`, import_component_theme8.typography.heading[TagName], {
|
|
551
|
+
"gap-2": props.level === 1,
|
|
552
|
+
"gap-1": props.level > 1
|
|
553
|
+
});
|
|
554
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(TagName, { className: classes, children: [
|
|
555
|
+
props.before,
|
|
556
|
+
props.children,
|
|
557
|
+
props.after
|
|
558
|
+
] });
|
|
507
559
|
}
|
|
508
560
|
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
561
|
+
// src/icon-button/icon-button.tsx
|
|
562
|
+
var import_component_theme9 = require("@zenkigen-inc/component-theme");
|
|
563
|
+
var import_clsx10 = require("clsx");
|
|
564
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
565
|
+
function IconButton({
|
|
566
|
+
size = "medium",
|
|
567
|
+
variant = "outline",
|
|
568
|
+
isNoPadding = false,
|
|
569
|
+
isDisabled = false,
|
|
570
|
+
...props
|
|
571
|
+
}) {
|
|
572
|
+
const baseClasses = (0, import_clsx10.clsx)(
|
|
573
|
+
"typography-label16regular flex items-center justify-center gap-1 rounded",
|
|
574
|
+
import_component_theme9.buttonColors[variant].base,
|
|
575
|
+
import_component_theme9.buttonColors[variant].hover,
|
|
576
|
+
import_component_theme9.buttonColors[variant].active,
|
|
577
|
+
import_component_theme9.buttonColors[variant].disabled,
|
|
578
|
+
import_component_theme9.focusVisible.normal,
|
|
579
|
+
{
|
|
580
|
+
"h-4 w-4": size === "small" && isNoPadding,
|
|
581
|
+
"h-6 w-6": size === "small" && !isNoPadding || (size === "medium" || size === "large") && isNoPadding,
|
|
582
|
+
"h-8 w-8": size === "medium" && !isNoPadding,
|
|
583
|
+
"h-10 w-10": size === "large" && !isNoPadding,
|
|
584
|
+
"inline-flex": props.isAnchor,
|
|
585
|
+
"pointer-events-none": isDisabled
|
|
586
|
+
}
|
|
587
|
+
);
|
|
588
|
+
const iconSize = size === "small" ? "small" : "medium";
|
|
527
589
|
if (props.isAnchor === true) {
|
|
528
|
-
return
|
|
529
|
-
className: baseClasses,
|
|
530
|
-
href: props.href,
|
|
531
|
-
target: props.target,
|
|
532
|
-
children: /*#__PURE__*/jsx(Icon, {
|
|
533
|
-
name: props.icon,
|
|
534
|
-
size: iconSize
|
|
535
|
-
})
|
|
536
|
-
});
|
|
590
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("a", { className: baseClasses, href: props.href, target: props.target, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Icon, { name: props.icon, size: iconSize }) });
|
|
537
591
|
} else {
|
|
538
|
-
return
|
|
539
|
-
type: "button",
|
|
540
|
-
className: baseClasses,
|
|
541
|
-
disabled: isDisabled,
|
|
542
|
-
onClick: props.onClick,
|
|
543
|
-
children: /*#__PURE__*/jsx(Icon, {
|
|
544
|
-
name: props.icon,
|
|
545
|
-
size: iconSize
|
|
546
|
-
})
|
|
547
|
-
});
|
|
592
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("button", { type: "button", className: baseClasses, disabled: isDisabled, onClick: props.onClick, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Icon, { name: props.icon, size: iconSize }) });
|
|
548
593
|
}
|
|
549
594
|
}
|
|
550
595
|
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
const
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
}
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
fill: "none"
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
}
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
fill: "none",
|
|
600
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
601
|
-
children: /*#__PURE__*/jsx("circle", {
|
|
602
|
-
className: "origin-center animate-circular-large-move stroke-interactive01",
|
|
603
|
-
cx: "32",
|
|
604
|
-
cy: "32",
|
|
605
|
-
r: "30",
|
|
606
|
-
stroke: "currentColor",
|
|
607
|
-
strokeWidth: "3",
|
|
608
|
-
fill: "none"
|
|
609
|
-
})
|
|
610
|
-
})]
|
|
611
|
-
})
|
|
612
|
-
});
|
|
596
|
+
// src/loading/loading.tsx
|
|
597
|
+
var import_clsx11 = __toESM(require("clsx"));
|
|
598
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
599
|
+
function Loading({ size = "medium", position = "fixed", height = "100%" }) {
|
|
600
|
+
const wrapperClasses = (0, import_clsx11.default)(position, "left-0 top-0 z-20 flex w-full items-center justify-center");
|
|
601
|
+
const svgClasses = (0, import_clsx11.default)({
|
|
602
|
+
"h-4 w-4": size === "small",
|
|
603
|
+
"h-8 w-8": size === "medium",
|
|
604
|
+
"h-16 w-16": size === "large"
|
|
605
|
+
});
|
|
606
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_jsx_runtime15.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: wrapperClasses, style: { height }, children: [
|
|
607
|
+
size === "small" && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("svg", { className: svgClasses, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
608
|
+
"circle",
|
|
609
|
+
{
|
|
610
|
+
className: "origin-center animate-circular-small-move stroke-interactive01",
|
|
611
|
+
cx: "8",
|
|
612
|
+
cy: "8",
|
|
613
|
+
r: "7",
|
|
614
|
+
stroke: "currentColor",
|
|
615
|
+
strokeWidth: "1.5",
|
|
616
|
+
fill: "none"
|
|
617
|
+
}
|
|
618
|
+
) }),
|
|
619
|
+
size === "medium" && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("svg", { className: svgClasses, viewBox: "0 0 32 32", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
620
|
+
"circle",
|
|
621
|
+
{
|
|
622
|
+
className: "origin-center animate-circular-medium-move stroke-interactive01",
|
|
623
|
+
cx: "16",
|
|
624
|
+
cy: "16",
|
|
625
|
+
r: "15",
|
|
626
|
+
stroke: "currentColor",
|
|
627
|
+
strokeWidth: "2",
|
|
628
|
+
fill: "none"
|
|
629
|
+
}
|
|
630
|
+
) }),
|
|
631
|
+
size === "large" && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("svg", { className: svgClasses, viewBox: "0 0 64 64", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
632
|
+
"circle",
|
|
633
|
+
{
|
|
634
|
+
className: "origin-center animate-circular-large-move stroke-interactive01",
|
|
635
|
+
cx: "32",
|
|
636
|
+
cy: "32",
|
|
637
|
+
r: "30",
|
|
638
|
+
stroke: "currentColor",
|
|
639
|
+
strokeWidth: "3",
|
|
640
|
+
fill: "none"
|
|
641
|
+
}
|
|
642
|
+
) })
|
|
643
|
+
] }) });
|
|
613
644
|
}
|
|
614
645
|
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
*
|
|
626
|
-
* @example
|
|
627
|
-
* // モーダルコンポーネント内で使用する例
|
|
628
|
-
* const Modal = ({ isOpen, children }) => {
|
|
629
|
-
* return (
|
|
630
|
-
* <>
|
|
631
|
-
* {isOpen && <BodyScrollLock />}
|
|
632
|
-
* {isOpen && (
|
|
633
|
-
* <div className="modal">
|
|
634
|
-
* {children}
|
|
635
|
-
* </div>
|
|
636
|
-
* )}
|
|
637
|
-
* </>
|
|
638
|
-
* );
|
|
639
|
-
* };
|
|
640
|
-
*/
|
|
641
|
-
const BodyScrollLock = () => {
|
|
642
|
-
useLayoutEffect(() => {
|
|
643
|
-
// 現在の縦横スクロール位置を記録
|
|
644
|
-
const {
|
|
645
|
-
scrollX,
|
|
646
|
-
scrollY
|
|
647
|
-
} = window;
|
|
648
|
-
const {
|
|
649
|
-
body
|
|
650
|
-
} = document;
|
|
651
|
-
// スクロールバーの有無と幅を検出
|
|
646
|
+
// src/modal/modal.tsx
|
|
647
|
+
var import_react11 = require("react");
|
|
648
|
+
var import_react_dom2 = require("react-dom");
|
|
649
|
+
|
|
650
|
+
// src/modal/body-scroll-lock.tsx
|
|
651
|
+
var import_react8 = require("react");
|
|
652
|
+
var BodyScrollLock = () => {
|
|
653
|
+
(0, import_react8.useLayoutEffect)(() => {
|
|
654
|
+
const { scrollX, scrollY } = window;
|
|
655
|
+
const { body } = document;
|
|
652
656
|
const hasVerticalScrollbar = document.documentElement.scrollHeight > document.documentElement.clientHeight;
|
|
653
657
|
const scrollbarWidth = hasVerticalScrollbar ? window.innerWidth - document.documentElement.clientWidth : 0;
|
|
654
|
-
// 元のインラインスタイルの値を保存
|
|
655
658
|
const originalInlineStyles = {
|
|
656
659
|
position: body.style.position,
|
|
657
660
|
top: body.style.top,
|
|
@@ -660,236 +663,182 @@ const BodyScrollLock = () => {
|
|
|
660
663
|
overflow: body.style.overflow,
|
|
661
664
|
paddingRight: body.style.paddingRight
|
|
662
665
|
};
|
|
663
|
-
|
|
664
|
-
body.style.position = 'fixed';
|
|
666
|
+
body.style.position = "fixed";
|
|
665
667
|
body.style.top = `-${scrollY}px`;
|
|
666
668
|
body.style.left = `-${scrollX}px`;
|
|
667
|
-
body.style.width =
|
|
668
|
-
body.style.overflow =
|
|
669
|
-
// スクロールバーがある場合、その幅分だけpadding-rightを調整
|
|
669
|
+
body.style.width = "100%";
|
|
670
|
+
body.style.overflow = "hidden";
|
|
670
671
|
if (hasVerticalScrollbar && scrollbarWidth > 0) {
|
|
671
|
-
|
|
672
|
-
const
|
|
673
|
-
paddingRight
|
|
674
|
-
} = window.getComputedStyle(body);
|
|
675
|
-
const paddingRightValue = paddingRight !== '' ? parseInt(paddingRight, 10) : 0;
|
|
676
|
-
// スクロールバーの幅を加算
|
|
672
|
+
const { paddingRight } = window.getComputedStyle(body);
|
|
673
|
+
const paddingRightValue = paddingRight !== "" ? parseInt(paddingRight, 10) : 0;
|
|
677
674
|
body.style.paddingRight = `${paddingRightValue + scrollbarWidth}px`;
|
|
678
675
|
}
|
|
679
|
-
// クリーンアップ関数
|
|
680
676
|
return () => {
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
paddingRight
|
|
689
|
-
} = originalInlineStyles;
|
|
690
|
-
// プロパティごとに元の値を復元
|
|
691
|
-
restoreProperty(body, 'position', position);
|
|
692
|
-
restoreProperty(body, 'top', top);
|
|
693
|
-
restoreProperty(body, 'left', left);
|
|
694
|
-
restoreProperty(body, 'width', width);
|
|
695
|
-
restoreProperty(body, 'overflow', overflow);
|
|
696
|
-
restoreProperty(body, 'padding-right', paddingRight);
|
|
697
|
-
// スクロール位置を復元
|
|
677
|
+
const { position, top, left, width, overflow, paddingRight } = originalInlineStyles;
|
|
678
|
+
restoreProperty(body, "position", position);
|
|
679
|
+
restoreProperty(body, "top", top);
|
|
680
|
+
restoreProperty(body, "left", left);
|
|
681
|
+
restoreProperty(body, "width", width);
|
|
682
|
+
restoreProperty(body, "overflow", overflow);
|
|
683
|
+
restoreProperty(body, "padding-right", paddingRight);
|
|
698
684
|
window.scrollTo(scrollX, scrollY);
|
|
699
685
|
};
|
|
700
|
-
}, []);
|
|
701
|
-
// DOM要素をレンダリングせず、nullを返す
|
|
686
|
+
}, []);
|
|
702
687
|
return null;
|
|
703
688
|
};
|
|
704
|
-
/**
|
|
705
|
-
* 元のスタイル値を復元するヘルパー関数
|
|
706
|
-
* @param element スタイルを復元する要素
|
|
707
|
-
* @param property 復元するCSSプロパティ名
|
|
708
|
-
* @param value 復元する値
|
|
709
|
-
*/
|
|
710
689
|
function restoreProperty(element, property, value) {
|
|
711
|
-
if (value !==
|
|
690
|
+
if (value !== "") {
|
|
712
691
|
element.style.setProperty(property, value);
|
|
713
692
|
} else {
|
|
714
693
|
element.style.removeProperty(property);
|
|
715
694
|
}
|
|
716
695
|
}
|
|
717
696
|
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
}) {
|
|
721
|
-
return
|
|
722
|
-
className: "overflow-y-auto",
|
|
723
|
-
children: children
|
|
724
|
-
});
|
|
697
|
+
// src/modal/modal-body.tsx
|
|
698
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
699
|
+
function ModalBody({ children }) {
|
|
700
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "overflow-y-auto", children });
|
|
725
701
|
}
|
|
726
702
|
|
|
727
|
-
|
|
703
|
+
// src/modal/modal-context.ts
|
|
704
|
+
var import_react9 = require("react");
|
|
705
|
+
var ModalContext = (0, import_react9.createContext)({
|
|
728
706
|
onClose: () => null
|
|
729
707
|
});
|
|
730
708
|
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
}) {
|
|
735
|
-
const wrapperClasses =
|
|
736
|
-
|
|
737
|
-
});
|
|
738
|
-
return
|
|
739
|
-
className: wrapperClasses,
|
|
740
|
-
children: children
|
|
741
|
-
});
|
|
709
|
+
// src/modal/modal-footer.tsx
|
|
710
|
+
var import_clsx12 = __toESM(require("clsx"));
|
|
711
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
712
|
+
function ModalFooter({ children, isNoBorder = false }) {
|
|
713
|
+
const wrapperClasses = (0, import_clsx12.default)("flex w-full shrink-0 items-center rounded-b-lg px-6 py-4", {
|
|
714
|
+
"border-t-[1px] border-uiBorder01": !isNoBorder
|
|
715
|
+
});
|
|
716
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: wrapperClasses, children });
|
|
742
717
|
}
|
|
743
718
|
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
size: "small",
|
|
763
|
-
variant: "text",
|
|
764
|
-
onClick: onClose
|
|
765
|
-
})]
|
|
766
|
-
});
|
|
719
|
+
// src/modal/modal-header.tsx
|
|
720
|
+
var import_clsx13 = __toESM(require("clsx"));
|
|
721
|
+
var import_react10 = require("react");
|
|
722
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
723
|
+
function ModalHeader({ children, isNoBorder = false }) {
|
|
724
|
+
const { onClose } = (0, import_react10.useContext)(ModalContext);
|
|
725
|
+
const headerClasses = (0, import_clsx13.default)(
|
|
726
|
+
"typography-h5 flex w-full shrink-0 items-center justify-between rounded-t-lg px-6 text-text01",
|
|
727
|
+
{
|
|
728
|
+
"border-b border-uiBorder01": !isNoBorder,
|
|
729
|
+
"h-14": !onClose,
|
|
730
|
+
"h-12": onClose
|
|
731
|
+
}
|
|
732
|
+
);
|
|
733
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: headerClasses, children: [
|
|
734
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { children }),
|
|
735
|
+
onClose && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(IconButton, { icon: "close", size: "small", variant: "text", onClick: onClose })
|
|
736
|
+
] });
|
|
767
737
|
}
|
|
768
738
|
|
|
769
|
-
|
|
770
|
-
|
|
739
|
+
// src/modal/modal.tsx
|
|
740
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
741
|
+
var LIMIT_WIDTH = 320;
|
|
742
|
+
var LIMIT_HEIGHT = 184;
|
|
771
743
|
function Modal({
|
|
772
744
|
children,
|
|
773
745
|
width = 480,
|
|
774
746
|
height,
|
|
747
|
+
maxWidth = "calc(100vw - 40px)",
|
|
775
748
|
isOpen,
|
|
776
749
|
onClose,
|
|
777
750
|
portalTargetRef
|
|
778
751
|
}) {
|
|
779
|
-
const [isMounted, setIsMounted] = useState(false);
|
|
780
|
-
const renderWidth = typeof width ===
|
|
781
|
-
const renderHeight = typeof height ===
|
|
782
|
-
useEffect(() => {
|
|
752
|
+
const [isMounted, setIsMounted] = (0, import_react11.useState)(false);
|
|
753
|
+
const renderWidth = typeof width === "number" ? Math.max(width, LIMIT_WIDTH) : width;
|
|
754
|
+
const renderHeight = typeof height === "number" ? Math.max(height, LIMIT_HEIGHT) : height;
|
|
755
|
+
(0, import_react11.useEffect)(() => {
|
|
783
756
|
setIsMounted(true);
|
|
784
757
|
}, []);
|
|
785
|
-
return isMounted && isOpen ?
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
className: "fixed left-0 top-0 z-overlay flex size-full items-center justify-center bg-backgroundOverlayBlack py-4",
|
|
792
|
-
children: /*#__PURE__*/jsx("div", {
|
|
758
|
+
return isMounted && isOpen ? /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
|
|
759
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(BodyScrollLock, {}),
|
|
760
|
+
(0, import_react_dom2.createPortal)(
|
|
761
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ModalContext.Provider, { value: { onClose }, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "fixed left-0 top-0 z-overlay flex size-full items-center justify-center bg-backgroundOverlayBlack py-4", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
762
|
+
"div",
|
|
763
|
+
{
|
|
793
764
|
className: "grid max-h-full min-h-[120px] grid-rows-[max-content_1fr_max-content] flex-col rounded-lg bg-uiBackground01 shadow-modalShadow",
|
|
794
|
-
style: {
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
}), (portalTargetRef == null ? void 0 : portalTargetRef.current) != null ? portalTargetRef.current : document.body)]
|
|
802
|
-
}) : null;
|
|
765
|
+
style: { width: renderWidth, height: renderHeight, maxWidth },
|
|
766
|
+
children
|
|
767
|
+
}
|
|
768
|
+
) }) }),
|
|
769
|
+
portalTargetRef?.current != null ? portalTargetRef.current : document.body
|
|
770
|
+
)
|
|
771
|
+
] }) : null;
|
|
803
772
|
}
|
|
804
773
|
Modal.Body = ModalBody;
|
|
805
774
|
Modal.Header = ModalHeader;
|
|
806
775
|
Modal.Footer = ModalFooter;
|
|
807
776
|
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
'fill-supportWarning': state === 'warning',
|
|
827
|
-
'fill-blue-blue50': state === 'information',
|
|
828
|
-
'fill-supportSuccess': state === 'success'
|
|
777
|
+
// src/notification-inline/notification-inline.tsx
|
|
778
|
+
var import_clsx14 = require("clsx");
|
|
779
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
780
|
+
function NotificationInline({ state = "default", size = "medium", ...props }) {
|
|
781
|
+
const wrapperClasses = (0, import_clsx14.clsx)("typography-body13regular flex items-center gap-1 rounded text-text01", {
|
|
782
|
+
"bg-uiBackgroundError": state === "attention",
|
|
783
|
+
"bg-uiBackgroundWarning": state === "warning",
|
|
784
|
+
"bg-uiBackgroundBlue": state === "information",
|
|
785
|
+
"bg-uiBackgroundSuccess": state === "success",
|
|
786
|
+
"bg-uiBackgroundGray": state === "default",
|
|
787
|
+
"p-2": size === "small",
|
|
788
|
+
"p-3": size === "medium"
|
|
789
|
+
});
|
|
790
|
+
const iconClasses = (0, import_clsx14.clsx)("flex items-center", {
|
|
791
|
+
"fill-supportError": state === "attention",
|
|
792
|
+
"fill-supportWarning": state === "warning",
|
|
793
|
+
"fill-blue-blue50": state === "information",
|
|
794
|
+
"fill-supportSuccess": state === "success"
|
|
829
795
|
});
|
|
830
796
|
const iconName = {
|
|
831
|
-
attention:
|
|
832
|
-
success:
|
|
833
|
-
warning:
|
|
834
|
-
information:
|
|
797
|
+
attention: "attention",
|
|
798
|
+
success: "success-filled",
|
|
799
|
+
warning: "warning",
|
|
800
|
+
information: "information-filled"
|
|
835
801
|
};
|
|
836
802
|
const iconSize = {
|
|
837
|
-
small:
|
|
838
|
-
medium:
|
|
803
|
+
small: "small",
|
|
804
|
+
medium: "medium"
|
|
839
805
|
};
|
|
840
|
-
return
|
|
841
|
-
className:
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
name: iconName[state],
|
|
846
|
-
size: iconSize[size]
|
|
847
|
-
})
|
|
848
|
-
}), /*#__PURE__*/jsx("p", {
|
|
849
|
-
className: "flex-1",
|
|
850
|
-
children: props.children
|
|
851
|
-
}), props.showClose === true && /*#__PURE__*/jsx("div", {
|
|
852
|
-
className: "flex items-center",
|
|
853
|
-
children: /*#__PURE__*/jsx(IconButton, {
|
|
854
|
-
icon: "close",
|
|
855
|
-
size: "small",
|
|
856
|
-
variant: "text"
|
|
857
|
-
})
|
|
858
|
-
})]
|
|
859
|
-
});
|
|
806
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: wrapperClasses, children: [
|
|
807
|
+
state !== "default" && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: iconClasses, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Icon, { name: iconName[state], size: iconSize[size] }) }),
|
|
808
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "flex-1", children: props.children }),
|
|
809
|
+
props.showClose === true && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "flex items-center", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(IconButton, { icon: "close", size: "small", variant: "text" }) })
|
|
810
|
+
] });
|
|
860
811
|
}
|
|
861
812
|
|
|
862
|
-
|
|
813
|
+
// src/pagination/pagination-button.tsx
|
|
814
|
+
var import_clsx15 = require("clsx");
|
|
815
|
+
var import_react13 = require("react");
|
|
816
|
+
|
|
817
|
+
// src/pagination/pagination-context.ts
|
|
818
|
+
var import_react12 = require("react");
|
|
819
|
+
var PaginationContext = (0, import_react12.createContext)({
|
|
863
820
|
currentPage: 0
|
|
864
821
|
});
|
|
865
822
|
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
})
|
|
870
|
-
const
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
return
|
|
879
|
-
type: "button",
|
|
880
|
-
className: buttonClasses,
|
|
881
|
-
onClick: () => onClick(page),
|
|
882
|
-
children: page
|
|
883
|
-
});
|
|
823
|
+
// src/pagination/pagination-button.tsx
|
|
824
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
825
|
+
function PaginationButton({ page, onClick }) {
|
|
826
|
+
const { currentPage } = (0, import_react13.useContext)(PaginationContext);
|
|
827
|
+
const buttonClasses = (0, import_clsx15.clsx)(
|
|
828
|
+
"flex h-8 min-w-8 items-center justify-center rounded fill-icon01 px-1",
|
|
829
|
+
"typography-label14regular",
|
|
830
|
+
"text-interactive02",
|
|
831
|
+
"hover:bg-hover02",
|
|
832
|
+
{ "border border-uiBorder02": page === currentPage },
|
|
833
|
+
{ "border-transparent": page !== currentPage }
|
|
834
|
+
);
|
|
835
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("button", { type: "button", className: buttonClasses, onClick: () => onClick(page), children: page });
|
|
884
836
|
}
|
|
885
837
|
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
sideNumPagesToShow = 3,
|
|
891
|
-
onClick
|
|
892
|
-
}) {
|
|
838
|
+
// src/pagination/pagination.tsx
|
|
839
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
840
|
+
var START_PAGE = 1;
|
|
841
|
+
function Pagination({ currentPage, totalPage, sideNumPagesToShow = 3, onClick }) {
|
|
893
842
|
let center = Math.max(currentPage, START_PAGE + 1);
|
|
894
843
|
center = Math.min(center, totalPage - 1);
|
|
895
844
|
const start = Math.max(center - sideNumPagesToShow, START_PAGE + 1);
|
|
@@ -900,166 +849,132 @@ function Pagination({
|
|
|
900
849
|
for (let i = start + offsetStart; i <= end + offsetEnd; i++) {
|
|
901
850
|
pageList.push(i);
|
|
902
851
|
}
|
|
903
|
-
const threeDotIconClasses =
|
|
904
|
-
return
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
children:
|
|
911
|
-
className: "flex items-center",
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
})
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
children:
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
size: "small"
|
|
940
|
-
})
|
|
941
|
-
}), /*#__PURE__*/jsx("li", {
|
|
942
|
-
children: /*#__PURE__*/jsx(PaginationButton, {
|
|
943
|
-
onClick: () => onClick(totalPage),
|
|
944
|
-
page: totalPage
|
|
945
|
-
})
|
|
946
|
-
}), /*#__PURE__*/jsx("li", {
|
|
947
|
-
className: "flex items-center",
|
|
948
|
-
children: /*#__PURE__*/jsx(IconButton, {
|
|
949
|
-
isDisabled: currentPage === totalPage,
|
|
950
|
-
variant: "text",
|
|
951
|
-
icon: "angle-right",
|
|
952
|
-
size: "small",
|
|
953
|
-
onClick: () => onClick(currentPage + 1)
|
|
954
|
-
})
|
|
955
|
-
})]
|
|
956
|
-
})
|
|
957
|
-
});
|
|
852
|
+
const threeDotIconClasses = "flex h-8 w-8 items-center justify-center gap-1 fill-icon01";
|
|
853
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
854
|
+
PaginationContext.Provider,
|
|
855
|
+
{
|
|
856
|
+
value: {
|
|
857
|
+
currentPage
|
|
858
|
+
},
|
|
859
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("ul", { className: "flex gap-1", children: [
|
|
860
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("li", { className: "flex items-center", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
861
|
+
IconButton,
|
|
862
|
+
{
|
|
863
|
+
isDisabled: currentPage === START_PAGE,
|
|
864
|
+
variant: "text",
|
|
865
|
+
icon: "angle-left",
|
|
866
|
+
size: "small",
|
|
867
|
+
onClick: () => onClick(currentPage - 1)
|
|
868
|
+
}
|
|
869
|
+
) }),
|
|
870
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(PaginationButton, { onClick: () => onClick(START_PAGE), page: START_PAGE }) }),
|
|
871
|
+
pageList.length !== 0 && pageList[0] !== 2 && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("li", { className: threeDotIconClasses, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Icon, { name: "more", size: "small" }) }),
|
|
872
|
+
pageList.map((page, index) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(PaginationButton, { onClick: () => onClick(page), page }) }, index)),
|
|
873
|
+
pageList.length !== 0 && pageList[pageList.length - 1] !== totalPage - 1 && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("li", { className: threeDotIconClasses, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Icon, { name: "more", size: "small" }) }),
|
|
874
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(PaginationButton, { onClick: () => onClick(totalPage), page: totalPage }) }),
|
|
875
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("li", { className: "flex items-center", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
876
|
+
IconButton,
|
|
877
|
+
{
|
|
878
|
+
isDisabled: currentPage === totalPage,
|
|
879
|
+
variant: "text",
|
|
880
|
+
icon: "angle-right",
|
|
881
|
+
size: "small",
|
|
882
|
+
onClick: () => onClick(currentPage + 1)
|
|
883
|
+
}
|
|
884
|
+
) })
|
|
885
|
+
] })
|
|
886
|
+
}
|
|
887
|
+
);
|
|
958
888
|
}
|
|
959
889
|
|
|
960
|
-
|
|
961
|
-
|
|
890
|
+
// src/select/select.tsx
|
|
891
|
+
var import_component_theme12 = require("@zenkigen-inc/component-theme");
|
|
892
|
+
var import_clsx18 = __toESM(require("clsx"));
|
|
893
|
+
var import_react17 = require("react");
|
|
894
|
+
|
|
895
|
+
// src/select/select-context.ts
|
|
896
|
+
var import_react14 = require("react");
|
|
897
|
+
var SelectContext = (0, import_react14.createContext)({
|
|
898
|
+
size: "medium",
|
|
962
899
|
setIsOptionListOpen: () => false,
|
|
963
|
-
variant:
|
|
900
|
+
variant: "outline"
|
|
964
901
|
});
|
|
965
902
|
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
onChange == null || onChange(option);
|
|
903
|
+
// src/select/select-item.tsx
|
|
904
|
+
var import_component_theme10 = require("@zenkigen-inc/component-theme");
|
|
905
|
+
var import_clsx16 = __toESM(require("clsx"));
|
|
906
|
+
var import_react15 = require("react");
|
|
907
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
908
|
+
function SelectItem({ option }) {
|
|
909
|
+
const { setIsOptionListOpen, selectedOption, onChange } = (0, import_react15.useContext)(SelectContext);
|
|
910
|
+
const handleClickItem = (option2) => {
|
|
911
|
+
onChange?.(option2);
|
|
976
912
|
setIsOptionListOpen(false);
|
|
977
913
|
};
|
|
978
|
-
const itemClasses =
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
size: "small"
|
|
992
|
-
}), /*#__PURE__*/jsx("span", {
|
|
993
|
-
className: "ml-1 mr-6",
|
|
994
|
-
children: option.label
|
|
995
|
-
}), option.id === (selectedOption == null ? void 0 : selectedOption.id) && /*#__PURE__*/jsx("div", {
|
|
996
|
-
className: "ml-auto flex items-center",
|
|
997
|
-
children: /*#__PURE__*/jsx(Icon, {
|
|
998
|
-
name: "check",
|
|
999
|
-
size: "small"
|
|
1000
|
-
})
|
|
1001
|
-
})]
|
|
1002
|
-
})
|
|
1003
|
-
}, option.id);
|
|
914
|
+
const itemClasses = (0, import_clsx16.default)(
|
|
915
|
+
"typography-label14regular flex h-8 w-full items-center px-3 hover:bg-hover02 active:bg-active02",
|
|
916
|
+
import_component_theme10.focusVisible.inset,
|
|
917
|
+
{
|
|
918
|
+
"text-interactive01 fill-interactive01 bg-selectedUi": option.id === selectedOption?.id,
|
|
919
|
+
"text-interactive02 fill-icon01 bg-uiBackground01": option.id !== selectedOption?.id
|
|
920
|
+
}
|
|
921
|
+
);
|
|
922
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("li", { className: "flex w-full items-center", "data-id": option.id, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("button", { className: itemClasses, type: "button", onClick: () => handleClickItem(option), children: [
|
|
923
|
+
option.icon && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Icon, { name: option.icon, size: "small" }),
|
|
924
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "ml-1 mr-6", children: option.label }),
|
|
925
|
+
option.id === selectedOption?.id && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "ml-auto flex items-center", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Icon, { name: "check", size: "small" }) })
|
|
926
|
+
] }) }, option.id);
|
|
1004
927
|
}
|
|
1005
928
|
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
setIsOptionListOpen,
|
|
1015
|
-
variant,
|
|
1016
|
-
placeholder,
|
|
1017
|
-
onChange
|
|
1018
|
-
} = useContext(SelectContext);
|
|
929
|
+
// src/select/select-list.tsx
|
|
930
|
+
var import_component_theme11 = require("@zenkigen-inc/component-theme");
|
|
931
|
+
var import_clsx17 = __toESM(require("clsx"));
|
|
932
|
+
var import_react16 = require("react");
|
|
933
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
934
|
+
function SelectList({ children, maxHeight }) {
|
|
935
|
+
const ref = (0, import_react16.useRef)(null);
|
|
936
|
+
const { size, selectedOption, setIsOptionListOpen, variant, placeholder, onChange } = (0, import_react16.useContext)(SelectContext);
|
|
1019
937
|
const handleClickDeselect = () => {
|
|
1020
|
-
onChange
|
|
938
|
+
onChange?.(null);
|
|
1021
939
|
setIsOptionListOpen(false);
|
|
1022
940
|
};
|
|
1023
|
-
useLayoutEffect(() => {
|
|
941
|
+
(0, import_react16.useLayoutEffect)(() => {
|
|
1024
942
|
if (maxHeight != null && ref.current) {
|
|
1025
|
-
|
|
1026
|
-
|
|
943
|
+
const element = Array.from(ref.current.children ?? []).find(
|
|
944
|
+
(item) => item.getAttribute("data-id") === selectedOption?.id
|
|
945
|
+
);
|
|
1027
946
|
if (element != null && ref.current.scroll != null) {
|
|
1028
947
|
const wrapRect = ref.current.getBoundingClientRect();
|
|
1029
948
|
const rect = element.getBoundingClientRect();
|
|
1030
949
|
ref.current.scroll(0, rect.top - wrapRect.top - wrapRect.height / 2 + rect.height / 2);
|
|
1031
950
|
}
|
|
1032
951
|
}
|
|
1033
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1034
952
|
}, []);
|
|
1035
|
-
const listClasses =
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
onClick: handleClickDeselect,
|
|
1053
|
-
children: "\u9078\u629E\u89E3\u9664"
|
|
1054
|
-
})
|
|
1055
|
-
})]
|
|
1056
|
-
});
|
|
953
|
+
const listClasses = (0, import_clsx17.default)(
|
|
954
|
+
"absolute z-dropdown w-max overflow-y-auto rounded bg-uiBackground01 py-2 shadow-floatingShadow",
|
|
955
|
+
{
|
|
956
|
+
"top-7": size === "x-small" || size === "small",
|
|
957
|
+
"top-9": size === "medium",
|
|
958
|
+
"top-11": size === "large",
|
|
959
|
+
"border-solid border border-uiBorder01": variant === "outline"
|
|
960
|
+
}
|
|
961
|
+
);
|
|
962
|
+
const deselectButtonClasses = (0, import_clsx17.default)(
|
|
963
|
+
"typography-label14regular flex h-8 w-full items-center px-3 text-interactive02 hover:bg-hover02 active:bg-active02",
|
|
964
|
+
import_component_theme11.focusVisible.inset
|
|
965
|
+
);
|
|
966
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("ul", { className: listClasses, style: { maxHeight }, ref, children: [
|
|
967
|
+
children,
|
|
968
|
+
placeholder != null && selectedOption !== null && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("button", { className: deselectButtonClasses, type: "button", onClick: handleClickDeselect, children: "\u9078\u629E\u89E3\u9664" }) })
|
|
969
|
+
] });
|
|
1057
970
|
}
|
|
1058
971
|
|
|
972
|
+
// src/select/select.tsx
|
|
973
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
1059
974
|
function Select({
|
|
1060
975
|
children,
|
|
1061
|
-
size =
|
|
1062
|
-
variant =
|
|
976
|
+
size = "medium",
|
|
977
|
+
variant = "outline",
|
|
1063
978
|
width,
|
|
1064
979
|
maxWidth,
|
|
1065
980
|
placeholder,
|
|
@@ -1070,91 +985,75 @@ function Select({
|
|
|
1070
985
|
onChange,
|
|
1071
986
|
optionListMaxHeight
|
|
1072
987
|
}) {
|
|
1073
|
-
const [isOptionListOpen, setIsOptionListOpen] = useState(false);
|
|
1074
|
-
const targetRef = useRef(null);
|
|
988
|
+
const [isOptionListOpen, setIsOptionListOpen] = (0, import_react17.useState)(false);
|
|
989
|
+
const targetRef = (0, import_react17.useRef)(null);
|
|
1075
990
|
useOutsideClick(targetRef, () => setIsOptionListOpen(false));
|
|
1076
|
-
const handleClickToggle = () => setIsOptionListOpen(prev => !prev);
|
|
1077
|
-
const wrapperClasses =
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
});
|
|
1083
|
-
const buttonClasses =
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
991
|
+
const handleClickToggle = () => setIsOptionListOpen((prev) => !prev);
|
|
992
|
+
const wrapperClasses = (0, import_clsx18.default)("relative flex shrink-0 items-center gap-1 rounded bg-uiBackground01", {
|
|
993
|
+
"h-6": size === "x-small" || size === "small",
|
|
994
|
+
"h-8": size === "medium",
|
|
995
|
+
"h-10": size === "large",
|
|
996
|
+
"cursor-not-allowed": isDisabled
|
|
997
|
+
});
|
|
998
|
+
const buttonClasses = (0, import_clsx18.default)(
|
|
999
|
+
"flex size-full items-center rounded",
|
|
1000
|
+
import_component_theme12.buttonColors[variant].hover,
|
|
1001
|
+
import_component_theme12.buttonColors[variant].active,
|
|
1002
|
+
import_component_theme12.buttonColors[variant].disabled,
|
|
1003
|
+
import_component_theme12.focusVisible.normal,
|
|
1004
|
+
{
|
|
1005
|
+
[import_component_theme12.buttonColors[variant].selected]: isOptionSelected && !isDisabled && selectedOption,
|
|
1006
|
+
[import_component_theme12.buttonColors[variant].base]: !(isOptionSelected && !isDisabled && selectedOption),
|
|
1007
|
+
"px-2": size === "x-small" || size === "small",
|
|
1008
|
+
"px-4": size === "medium" || size === "large",
|
|
1009
|
+
"pointer-events-none": isDisabled
|
|
1010
|
+
}
|
|
1011
|
+
);
|
|
1012
|
+
const labelClasses = (0, import_clsx18.default)("overflow-hidden", {
|
|
1013
|
+
"mr-1": size === "x-small",
|
|
1014
|
+
"mr-2": size !== "x-small",
|
|
1015
|
+
"typography-label12regular": size === "x-small",
|
|
1016
|
+
"typography-label14regular": size === "small" || size === "medium",
|
|
1017
|
+
"typography-label16regular": size === "large"
|
|
1018
|
+
});
|
|
1019
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1020
|
+
SelectContext.Provider,
|
|
1021
|
+
{
|
|
1022
|
+
value: {
|
|
1023
|
+
size,
|
|
1024
|
+
variant,
|
|
1025
|
+
placeholder,
|
|
1026
|
+
setIsOptionListOpen,
|
|
1027
|
+
selectedOption,
|
|
1028
|
+
onChange
|
|
1111
1029
|
},
|
|
1112
|
-
ref: targetRef,
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
size: size === 'large' ? 'medium' : 'small'
|
|
1129
|
-
})
|
|
1130
|
-
}), /*#__PURE__*/jsx("div", {
|
|
1131
|
-
className: labelClasses,
|
|
1132
|
-
children: /*#__PURE__*/jsx("div", {
|
|
1133
|
-
className: "truncate",
|
|
1134
|
-
children: selectedOption ? selectedOption.label : placeholder != null && placeholder
|
|
1135
|
-
})
|
|
1136
|
-
}), /*#__PURE__*/jsx("div", {
|
|
1137
|
-
className: "ml-auto flex items-center",
|
|
1138
|
-
children: /*#__PURE__*/jsx(Icon, {
|
|
1139
|
-
name: isOptionListOpen ? 'angle-small-up' : 'angle-small-down',
|
|
1140
|
-
size: size === 'large' ? 'medium' : 'small'
|
|
1141
|
-
})
|
|
1142
|
-
})]
|
|
1143
|
-
}), isOptionListOpen && !isDisabled && /*#__PURE__*/jsx(SelectList$1, {
|
|
1144
|
-
maxHeight: optionListMaxHeight,
|
|
1145
|
-
children: children
|
|
1146
|
-
})]
|
|
1147
|
-
})
|
|
1148
|
-
});
|
|
1030
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: wrapperClasses, style: { width, maxWidth }, ref: targetRef, children: [
|
|
1031
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("button", { className: buttonClasses, type: "button", onClick: handleClickToggle, disabled: isDisabled, children: [
|
|
1032
|
+
selectedOption?.icon ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "mr-1 flex", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Icon, { name: selectedOption.icon, size: size === "large" ? "medium" : "small" }) }) : placeholder != null && placeholderIcon && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "mr-1 flex", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Icon, { name: placeholderIcon, size: size === "large" ? "medium" : "small" }) }),
|
|
1033
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: labelClasses, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "truncate", children: selectedOption ? selectedOption.label : placeholder != null && placeholder }) }),
|
|
1034
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "ml-auto flex items-center", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1035
|
+
Icon,
|
|
1036
|
+
{
|
|
1037
|
+
name: isOptionListOpen ? "angle-small-up" : "angle-small-down",
|
|
1038
|
+
size: size === "large" ? "medium" : "small"
|
|
1039
|
+
}
|
|
1040
|
+
) })
|
|
1041
|
+
] }),
|
|
1042
|
+
isOptionListOpen && !isDisabled && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(SelectList, { maxHeight: optionListMaxHeight, children })
|
|
1043
|
+
] })
|
|
1044
|
+
}
|
|
1045
|
+
);
|
|
1149
1046
|
}
|
|
1150
|
-
Select.Option = SelectItem
|
|
1047
|
+
Select.Option = SelectItem;
|
|
1151
1048
|
|
|
1049
|
+
// src/pagination-select/pagination-select.tsx
|
|
1050
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
1152
1051
|
function PaginationSelect({
|
|
1153
1052
|
totalSize,
|
|
1154
1053
|
currentPage,
|
|
1155
1054
|
sizePerPage,
|
|
1156
|
-
countLabel =
|
|
1157
|
-
pageLabel =
|
|
1055
|
+
countLabel = "\u4EF6",
|
|
1056
|
+
pageLabel = "\u30DA\u30FC\u30B8",
|
|
1158
1057
|
optionListMaxHeight = 190,
|
|
1159
1058
|
onClickPrevButton,
|
|
1160
1059
|
onClickNextButton,
|
|
@@ -1171,239 +1070,224 @@ function PaginationSelect({
|
|
|
1171
1070
|
});
|
|
1172
1071
|
const minCount = totalSize ? (currentPage - 1) * sizePerPage + 1 : 0;
|
|
1173
1072
|
const maxCount = currentPage * sizePerPage > totalSize ? totalSize : currentPage * sizePerPage;
|
|
1174
|
-
return
|
|
1175
|
-
"
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
}
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1073
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("nav", { "aria-label": "pagination", className: "flex items-center gap-x-1", children: [
|
|
1074
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex items-center gap-x-2", children: [
|
|
1075
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "typography-label14regular text-text01", children: [
|
|
1076
|
+
minCount > 0 && `${minCount} - `,
|
|
1077
|
+
maxCount,
|
|
1078
|
+
countLabel
|
|
1079
|
+
] }),
|
|
1080
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1081
|
+
Select,
|
|
1082
|
+
{
|
|
1083
|
+
size: "medium",
|
|
1084
|
+
variant: "outline",
|
|
1085
|
+
selectedOption: optionsList.find((option) => option.value === currentPage.toString()),
|
|
1086
|
+
optionListMaxHeight,
|
|
1087
|
+
onChange: (option) => option && onChange(Number(option.value)),
|
|
1088
|
+
isDisabled: pageMax === 0,
|
|
1089
|
+
children: optionsList.map((option) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Select.Option, { option }, option.id))
|
|
1090
|
+
}
|
|
1091
|
+
),
|
|
1092
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "typography-label14regular text-text03", children: [
|
|
1093
|
+
"/ ",
|
|
1094
|
+
pageMax,
|
|
1095
|
+
pageLabel
|
|
1096
|
+
] })
|
|
1097
|
+
] }),
|
|
1098
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex items-center", children: [
|
|
1099
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1100
|
+
IconButton,
|
|
1101
|
+
{
|
|
1102
|
+
variant: "text",
|
|
1103
|
+
icon: "angle-left",
|
|
1104
|
+
size: "small",
|
|
1105
|
+
isDisabled: currentPage === 1,
|
|
1106
|
+
onClick: onClickPrevButton
|
|
1107
|
+
}
|
|
1108
|
+
),
|
|
1109
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1110
|
+
IconButton,
|
|
1111
|
+
{
|
|
1112
|
+
variant: "text",
|
|
1113
|
+
icon: "angle-right",
|
|
1114
|
+
size: "small",
|
|
1115
|
+
isDisabled: currentPage === pageMax || pageMax === 0,
|
|
1116
|
+
onClick: onClickNextButton
|
|
1117
|
+
}
|
|
1118
|
+
)
|
|
1119
|
+
] })
|
|
1120
|
+
] });
|
|
1213
1121
|
}
|
|
1214
1122
|
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
}) {
|
|
1224
|
-
const [isMouseOver, setIsMouseOver] = useState(false);
|
|
1225
|
-
const handleMouseOverInput = useCallback(() => {
|
|
1123
|
+
// src/radio/radio.tsx
|
|
1124
|
+
var import_component_theme13 = require("@zenkigen-inc/component-theme");
|
|
1125
|
+
var import_clsx19 = __toESM(require("clsx"));
|
|
1126
|
+
var import_react18 = require("react");
|
|
1127
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
1128
|
+
function Radio({ name, value, id, label, isChecked = false, isDisabled = false, onChange }) {
|
|
1129
|
+
const [isMouseOver, setIsMouseOver] = (0, import_react18.useState)(false);
|
|
1130
|
+
const handleMouseOverInput = (0, import_react18.useCallback)(() => {
|
|
1226
1131
|
setIsMouseOver(true);
|
|
1227
1132
|
}, []);
|
|
1228
|
-
const handleMouseOutInput = useCallback(() => {
|
|
1133
|
+
const handleMouseOutInput = (0, import_react18.useCallback)(() => {
|
|
1229
1134
|
setIsMouseOver(false);
|
|
1230
1135
|
}, []);
|
|
1231
|
-
const handleChange =
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
});
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
});
|
|
1136
|
+
const handleChange = (0, import_react18.useCallback)(
|
|
1137
|
+
(e) => !isDisabled && onChange?.(e),
|
|
1138
|
+
[isDisabled, onChange]
|
|
1139
|
+
);
|
|
1140
|
+
const inputClasses = (0, import_clsx19.default)("peer absolute z-[1] size-6 opacity-0", {
|
|
1141
|
+
"cursor-not-allowed": isDisabled,
|
|
1142
|
+
"cursor-pointer": !isDisabled
|
|
1143
|
+
});
|
|
1144
|
+
const boxClasses = (0, import_clsx19.default)(
|
|
1145
|
+
"inline-flex size-5 items-center justify-center rounded-full border border-solid bg-white",
|
|
1146
|
+
import_component_theme13.focusVisible.normalPeer,
|
|
1147
|
+
{
|
|
1148
|
+
"border-disabled01 hover:border-disabled01": isDisabled && !isMouseOver,
|
|
1149
|
+
"border-hoverUiBorder": !isDisabled && isMouseOver,
|
|
1150
|
+
"border-uiBorder03": !isDisabled,
|
|
1151
|
+
"cursor-not-allowed": isDisabled,
|
|
1152
|
+
"cursor-pointer": !isDisabled
|
|
1153
|
+
}
|
|
1154
|
+
);
|
|
1155
|
+
const afterClasses = (0, import_clsx19.default)("absolute inset-0 m-auto block size-3 rounded-full", {
|
|
1156
|
+
"bg-disabled01": isDisabled && isChecked,
|
|
1157
|
+
"bg-activeSelectedUi": !isDisabled && isChecked,
|
|
1158
|
+
"scale-0": !isChecked,
|
|
1159
|
+
"scale-100": isChecked
|
|
1160
|
+
});
|
|
1161
|
+
const hoverIndicatorClasses = (0, import_clsx19.default)("inline-block size-3 rounded-full", {
|
|
1162
|
+
"bg-hoverUi": !isDisabled && !isChecked && isMouseOver
|
|
1163
|
+
});
|
|
1164
|
+
const labelClasses = (0, import_clsx19.default)("typography-label14regular ml-2 flex-[1_0_0] select-none break-all", {
|
|
1165
|
+
"pointer-events-none cursor-not-allowed text-disabled01": isDisabled,
|
|
1166
|
+
"cursor-pointer text-text01": !isDisabled
|
|
1167
|
+
});
|
|
1168
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "flex items-center", children: [
|
|
1169
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "flex size-6 items-center justify-center", children: [
|
|
1170
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1171
|
+
"input",
|
|
1172
|
+
{
|
|
1173
|
+
type: "checkbox",
|
|
1174
|
+
value,
|
|
1175
|
+
name,
|
|
1176
|
+
id,
|
|
1177
|
+
checked: isChecked,
|
|
1178
|
+
disabled: isDisabled,
|
|
1179
|
+
onChange: handleChange,
|
|
1180
|
+
onMouseOver: handleMouseOverInput,
|
|
1181
|
+
onMouseLeave: handleMouseOutInput,
|
|
1182
|
+
className: inputClasses
|
|
1183
|
+
}
|
|
1184
|
+
),
|
|
1185
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: boxClasses, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "relative flex size-5 flex-[0_0_auto] items-center justify-center", children: [
|
|
1186
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: afterClasses }),
|
|
1187
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: hoverIndicatorClasses })
|
|
1188
|
+
] }) })
|
|
1189
|
+
] }),
|
|
1190
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("label", { htmlFor: id, className: labelClasses, children: label })
|
|
1191
|
+
] });
|
|
1288
1192
|
}
|
|
1289
1193
|
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
className:
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
variant: "text",
|
|
1329
|
-
icon: "close",
|
|
1330
|
-
size: size === 'medium' ? 'small' : 'medium',
|
|
1331
|
-
isNoPadding: true,
|
|
1332
|
-
onClick: props.onClickClearButton
|
|
1333
|
-
})]
|
|
1334
|
-
})
|
|
1335
|
-
})
|
|
1336
|
-
});
|
|
1194
|
+
// src/search/search.tsx
|
|
1195
|
+
var import_clsx20 = require("clsx");
|
|
1196
|
+
var import_react19 = require("react");
|
|
1197
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
1198
|
+
var Search = (0, import_react19.forwardRef)(({ width = "100%", size = "medium", ...props }, ref) => {
|
|
1199
|
+
const classes = (0, import_clsx20.clsx)(
|
|
1200
|
+
"flex items-center rounded-full border border-uiBorder02 bg-uiBackground01 focus-within:border-activeInput",
|
|
1201
|
+
{ "h-8 px-3": size === "medium" },
|
|
1202
|
+
{ "h-10 px-4": size === "large" }
|
|
1203
|
+
);
|
|
1204
|
+
const inputClasses = (0, import_clsx20.clsx)("mx-2 h-full flex-1 text-text01 outline-0 placeholder:text-textPlaceholder", {
|
|
1205
|
+
["typography-label14regular"]: size === "medium",
|
|
1206
|
+
["typography-label16regular"]: size === "large"
|
|
1207
|
+
});
|
|
1208
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "relative", ref, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("form", { onSubmit: props.onSubmit, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: classes, style: { width }, children: [
|
|
1209
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Icon, { name: "search", color: "icon01", size: "medium" }),
|
|
1210
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1211
|
+
"input",
|
|
1212
|
+
{
|
|
1213
|
+
type: "text",
|
|
1214
|
+
size: 1,
|
|
1215
|
+
value: props.value,
|
|
1216
|
+
className: inputClasses,
|
|
1217
|
+
placeholder: props.placeholder,
|
|
1218
|
+
onChange: props.onChange
|
|
1219
|
+
}
|
|
1220
|
+
),
|
|
1221
|
+
props.onClickClearButton && props.value && props.value.length !== 0 && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1222
|
+
IconButton,
|
|
1223
|
+
{
|
|
1224
|
+
variant: "text",
|
|
1225
|
+
icon: "close",
|
|
1226
|
+
size: size === "medium" ? "small" : "medium",
|
|
1227
|
+
isNoPadding: true,
|
|
1228
|
+
onClick: props.onClickClearButton
|
|
1229
|
+
}
|
|
1230
|
+
)
|
|
1231
|
+
] }) }) });
|
|
1337
1232
|
});
|
|
1338
|
-
Search.displayName =
|
|
1233
|
+
Search.displayName = "Search";
|
|
1339
1234
|
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
});
|
|
1235
|
+
// src/select-sort/select-sort.tsx
|
|
1236
|
+
var import_component_theme16 = require("@zenkigen-inc/component-theme");
|
|
1237
|
+
var import_clsx23 = __toESM(require("clsx"));
|
|
1238
|
+
var import_react20 = require("react");
|
|
1239
|
+
|
|
1240
|
+
// src/select-sort/select-list.tsx
|
|
1241
|
+
var import_component_theme15 = require("@zenkigen-inc/component-theme");
|
|
1242
|
+
var import_clsx22 = __toESM(require("clsx"));
|
|
1243
|
+
|
|
1244
|
+
// src/select-sort/select-item.tsx
|
|
1245
|
+
var import_component_theme14 = require("@zenkigen-inc/component-theme");
|
|
1246
|
+
var import_clsx21 = __toESM(require("clsx"));
|
|
1247
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
1248
|
+
function SelectItem2({ children, isSortKey, onClickItem }) {
|
|
1249
|
+
const itemClasses = (0, import_clsx21.default)(
|
|
1250
|
+
"typography-label14regular flex h-8 w-full items-center px-3 hover:bg-hover02 active:bg-active02",
|
|
1251
|
+
import_component_theme14.focusVisible.inset,
|
|
1252
|
+
{
|
|
1253
|
+
"bg-selectedUi fill-interactive01 text-interactive01": isSortKey,
|
|
1254
|
+
"bg-uiBackground01 fill-icon01 text-interactive02": !isSortKey
|
|
1255
|
+
}
|
|
1256
|
+
);
|
|
1257
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("li", { className: "flex w-full items-center", onClick: onClickItem, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("button", { className: itemClasses, type: "button", children: [
|
|
1258
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "ml-1 mr-6", children }),
|
|
1259
|
+
isSortKey && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "ml-auto flex items-center", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Icon, { name: "check", size: "small" }) })
|
|
1260
|
+
] }) });
|
|
1367
1261
|
}
|
|
1368
1262
|
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
isSortKey: sortOrder === 'descend',
|
|
1391
|
-
onClickItem: () => onClickItem('descend'),
|
|
1392
|
-
children: "\u964D\u9806\u3067\u4E26\u3073\u66FF\u3048"
|
|
1393
|
-
}), sortOrder !== null && onClickDeselect && /*#__PURE__*/jsx("li", {
|
|
1394
|
-
children: /*#__PURE__*/jsx("button", {
|
|
1395
|
-
className: deselectButtonClasses,
|
|
1396
|
-
type: "button",
|
|
1397
|
-
onClick: onClickDeselect,
|
|
1398
|
-
children: "\u9078\u629E\u89E3\u9664"
|
|
1399
|
-
})
|
|
1400
|
-
})]
|
|
1401
|
-
});
|
|
1263
|
+
// src/select-sort/select-list.tsx
|
|
1264
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
1265
|
+
function SelectList2({ size, variant, sortOrder, onClickItem, onClickDeselect }) {
|
|
1266
|
+
const listClasses = (0, import_clsx22.default)(
|
|
1267
|
+
"absolute z-dropdown w-max overflow-y-auto rounded bg-uiBackground01 py-2 shadow-floatingShadow",
|
|
1268
|
+
{
|
|
1269
|
+
"top-7": size === "x-small" || size === "small",
|
|
1270
|
+
"top-9": size === "medium",
|
|
1271
|
+
"top-11": size === "large",
|
|
1272
|
+
"border-solid border border-uiBorder01": variant === "outline"
|
|
1273
|
+
}
|
|
1274
|
+
);
|
|
1275
|
+
const deselectButtonClasses = (0, import_clsx22.default)(
|
|
1276
|
+
"typography-label14regular flex h-8 w-full items-center px-3 text-interactive02 hover:bg-hover02 active:bg-active02",
|
|
1277
|
+
import_component_theme15.focusVisible.inset
|
|
1278
|
+
);
|
|
1279
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("ul", { className: listClasses, children: [
|
|
1280
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(SelectItem2, { isSortKey: sortOrder === "ascend", onClickItem: () => onClickItem("ascend"), children: "\u6607\u9806\u3067\u4E26\u3073\u66FF\u3048" }),
|
|
1281
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(SelectItem2, { isSortKey: sortOrder === "descend", onClickItem: () => onClickItem("descend"), children: "\u964D\u9806\u3067\u4E26\u3073\u66FF\u3048" }),
|
|
1282
|
+
sortOrder !== null && onClickDeselect && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("button", { className: deselectButtonClasses, type: "button", onClick: onClickDeselect, children: "\u9078\u629E\u89E3\u9664" }) })
|
|
1283
|
+
] });
|
|
1402
1284
|
}
|
|
1403
1285
|
|
|
1286
|
+
// src/select-sort/select-sort.tsx
|
|
1287
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
1404
1288
|
function SelectSort({
|
|
1405
|
-
size =
|
|
1406
|
-
variant =
|
|
1289
|
+
size = "medium",
|
|
1290
|
+
variant = "outline",
|
|
1407
1291
|
width,
|
|
1408
1292
|
label,
|
|
1409
1293
|
sortOrder,
|
|
@@ -1412,127 +1296,133 @@ function SelectSort({
|
|
|
1412
1296
|
onChange,
|
|
1413
1297
|
onClickDeselect
|
|
1414
1298
|
}) {
|
|
1415
|
-
const [isOptionListOpen, setIsOptionListOpen] = useState(false);
|
|
1416
|
-
const targetRef = useRef(null);
|
|
1299
|
+
const [isOptionListOpen, setIsOptionListOpen] = (0, import_react20.useState)(false);
|
|
1300
|
+
const targetRef = (0, import_react20.useRef)(null);
|
|
1417
1301
|
useOutsideClick(targetRef, () => setIsOptionListOpen(false));
|
|
1418
|
-
const handleClickToggle = () => setIsOptionListOpen(prev => !prev);
|
|
1419
|
-
const handleClickItem = useCallback(
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
const wrapperClasses = clsx$1('relative flex shrink-0 items-center gap-1 rounded', {
|
|
1424
|
-
'h-6': size === 'x-small' || size === 'small',
|
|
1425
|
-
'h-8': size === 'medium',
|
|
1426
|
-
'h-10': size === 'large',
|
|
1427
|
-
'cursor-not-allowed': isDisabled
|
|
1428
|
-
});
|
|
1429
|
-
const buttonClasses = clsx$1('flex size-full items-center rounded', buttonColors[variant].hover, buttonColors[variant].active, buttonColors[variant].disabled, focusVisible.normal, {
|
|
1430
|
-
[buttonColors[variant].selected]: isSortKey,
|
|
1431
|
-
[buttonColors[variant].base]: !isSortKey,
|
|
1432
|
-
'px-2': size === 'x-small' || size === 'small',
|
|
1433
|
-
'px-4': size === 'medium' || size === 'large',
|
|
1434
|
-
'pointer-events-none': isDisabled
|
|
1435
|
-
});
|
|
1436
|
-
const labelClasses = clsx$1('truncate', {
|
|
1437
|
-
'typography-label12regular': size === 'x-small',
|
|
1438
|
-
'typography-label14regular': size === 'small' || size === 'medium',
|
|
1439
|
-
'typography-label16regular': size === 'large',
|
|
1440
|
-
'mr-1': size === 'x-small',
|
|
1441
|
-
'mr-2': size !== 'x-small'
|
|
1442
|
-
});
|
|
1443
|
-
return /*#__PURE__*/jsxs("div", {
|
|
1444
|
-
className: wrapperClasses,
|
|
1445
|
-
style: {
|
|
1446
|
-
width
|
|
1302
|
+
const handleClickToggle = () => setIsOptionListOpen((prev) => !prev);
|
|
1303
|
+
const handleClickItem = (0, import_react20.useCallback)(
|
|
1304
|
+
(value) => {
|
|
1305
|
+
onChange?.(value);
|
|
1306
|
+
setIsOptionListOpen(false);
|
|
1447
1307
|
},
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1308
|
+
[onChange]
|
|
1309
|
+
);
|
|
1310
|
+
const wrapperClasses = (0, import_clsx23.default)("relative flex shrink-0 items-center gap-1 rounded", {
|
|
1311
|
+
"h-6": size === "x-small" || size === "small",
|
|
1312
|
+
"h-8": size === "medium",
|
|
1313
|
+
"h-10": size === "large",
|
|
1314
|
+
"cursor-not-allowed": isDisabled
|
|
1315
|
+
});
|
|
1316
|
+
const buttonClasses = (0, import_clsx23.default)(
|
|
1317
|
+
"flex size-full items-center rounded",
|
|
1318
|
+
import_component_theme16.buttonColors[variant].hover,
|
|
1319
|
+
import_component_theme16.buttonColors[variant].active,
|
|
1320
|
+
import_component_theme16.buttonColors[variant].disabled,
|
|
1321
|
+
import_component_theme16.focusVisible.normal,
|
|
1322
|
+
{
|
|
1323
|
+
[import_component_theme16.buttonColors[variant].selected]: isSortKey,
|
|
1324
|
+
[import_component_theme16.buttonColors[variant].base]: !isSortKey,
|
|
1325
|
+
"px-2": size === "x-small" || size === "small",
|
|
1326
|
+
"px-4": size === "medium" || size === "large",
|
|
1327
|
+
"pointer-events-none": isDisabled
|
|
1328
|
+
}
|
|
1329
|
+
);
|
|
1330
|
+
const labelClasses = (0, import_clsx23.default)("truncate", {
|
|
1331
|
+
"typography-label12regular": size === "x-small",
|
|
1332
|
+
"typography-label14regular": size === "small" || size === "medium",
|
|
1333
|
+
"typography-label16regular": size === "large",
|
|
1334
|
+
"mr-1": size === "x-small",
|
|
1335
|
+
"mr-2": size !== "x-small"
|
|
1336
|
+
});
|
|
1337
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: wrapperClasses, style: { width }, ref: targetRef, children: [
|
|
1338
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("button", { className: buttonClasses, type: "button", onClick: handleClickToggle, disabled: isDisabled, children: [
|
|
1339
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: labelClasses, children: label }),
|
|
1340
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "ml-auto flex items-center", children: isSortKey ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1341
|
+
Icon,
|
|
1342
|
+
{
|
|
1343
|
+
name: sortOrder === "ascend" ? "arrow-up" : "arrow-down",
|
|
1344
|
+
size: size === "large" ? "medium" : "small"
|
|
1345
|
+
}
|
|
1346
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1347
|
+
Icon,
|
|
1348
|
+
{
|
|
1349
|
+
name: isOptionListOpen ? "angle-small-up" : "angle-small-down",
|
|
1350
|
+
size: size === "large" ? "medium" : "small"
|
|
1351
|
+
}
|
|
1352
|
+
) })
|
|
1353
|
+
] }),
|
|
1354
|
+
isOptionListOpen && !isDisabled && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1355
|
+
SelectList2,
|
|
1356
|
+
{
|
|
1357
|
+
size,
|
|
1358
|
+
variant,
|
|
1359
|
+
sortOrder,
|
|
1360
|
+
onClickItem: handleClickItem,
|
|
1361
|
+
onClickDeselect
|
|
1362
|
+
}
|
|
1363
|
+
)
|
|
1364
|
+
] });
|
|
1475
1365
|
}
|
|
1476
1366
|
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1367
|
+
// src/tab/tab-item.tsx
|
|
1368
|
+
var import_clsx24 = require("clsx");
|
|
1369
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
1370
|
+
var TabItem = ({ isSelected = false, ...props }) => {
|
|
1371
|
+
const classes = (0, import_clsx24.clsx)(
|
|
1372
|
+
"relative z-0 flex py-2 leading-[24px] before:absolute before:inset-x-0 before:bottom-0 before:h-px hover:text-text01 disabled:pointer-events-none disabled:text-disabled01",
|
|
1373
|
+
{
|
|
1374
|
+
"typography-label14regular": !isSelected,
|
|
1375
|
+
"text-interactive02 hover:before:bg-uiBorder04": !isSelected,
|
|
1376
|
+
"typography-label14bold": isSelected,
|
|
1377
|
+
"before:bg-interactive01 hover:before:bg-interactive01 pointer-events-none": isSelected
|
|
1378
|
+
}
|
|
1379
|
+
);
|
|
1380
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
1381
|
+
"button",
|
|
1382
|
+
{
|
|
1383
|
+
type: "button",
|
|
1384
|
+
role: "tab",
|
|
1385
|
+
"aria-selected": isSelected,
|
|
1386
|
+
className: classes,
|
|
1387
|
+
disabled: props.isDisabled,
|
|
1388
|
+
onClick: () => props.onClick(props.id),
|
|
1389
|
+
children: props.children
|
|
1390
|
+
}
|
|
1391
|
+
);
|
|
1498
1392
|
};
|
|
1499
1393
|
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
}) {
|
|
1503
|
-
return
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1394
|
+
// src/tab/tab.tsx
|
|
1395
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
1396
|
+
function Tab({ children }) {
|
|
1397
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
1398
|
+
"div",
|
|
1399
|
+
{
|
|
1400
|
+
role: "tablist",
|
|
1401
|
+
className: "relative flex gap-4 px-6 before:absolute before:inset-x-0 before:bottom-0 before:h-px before:bg-uiBorder01",
|
|
1402
|
+
children
|
|
1403
|
+
}
|
|
1404
|
+
);
|
|
1508
1405
|
}
|
|
1509
1406
|
Tab.Item = TabItem;
|
|
1510
1407
|
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
'sticky top-0 z-10 bg-white': isHeader
|
|
1518
|
-
}, className);
|
|
1519
|
-
return /*#__PURE__*/jsx("div", {
|
|
1520
|
-
className: classes,
|
|
1521
|
-
children: children
|
|
1522
|
-
});
|
|
1408
|
+
// src/table/table-cell.tsx
|
|
1409
|
+
var import_clsx25 = __toESM(require("clsx"));
|
|
1410
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
1411
|
+
function TableCell({ children, className, isHeader = false }) {
|
|
1412
|
+
const classes = (0, import_clsx25.default)("border-b border-uiBorder01", { "sticky top-0 z-10 bg-white": isHeader }, className);
|
|
1413
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: classes, children });
|
|
1523
1414
|
}
|
|
1524
1415
|
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
}) {
|
|
1529
|
-
const rowClasses =
|
|
1530
|
-
return
|
|
1531
|
-
className: rowClasses,
|
|
1532
|
-
children: children
|
|
1533
|
-
});
|
|
1416
|
+
// src/table/table-row.tsx
|
|
1417
|
+
var import_clsx26 = __toESM(require("clsx"));
|
|
1418
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
1419
|
+
function TableRow({ children, isHoverBackgroundVisible = false }) {
|
|
1420
|
+
const rowClasses = (0, import_clsx26.default)("contents", isHoverBackgroundVisible && "[&:hover>div]:bg-hoverUi02");
|
|
1421
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: rowClasses, children });
|
|
1534
1422
|
}
|
|
1535
1423
|
|
|
1424
|
+
// src/table/table.tsx
|
|
1425
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
1536
1426
|
function Table({
|
|
1537
1427
|
width,
|
|
1538
1428
|
templateRows,
|
|
@@ -1541,197 +1431,196 @@ function Table({
|
|
|
1541
1431
|
autoRows,
|
|
1542
1432
|
children
|
|
1543
1433
|
}) {
|
|
1544
|
-
return
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1434
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
1435
|
+
"div",
|
|
1436
|
+
{
|
|
1437
|
+
className: "grid",
|
|
1438
|
+
style: {
|
|
1439
|
+
width,
|
|
1440
|
+
gridTemplateRows: templateRows,
|
|
1441
|
+
gridTemplateColumns: templateColumns,
|
|
1442
|
+
gridAutoColumns: autoColumns,
|
|
1443
|
+
gridAutoRows: autoRows
|
|
1444
|
+
},
|
|
1445
|
+
children
|
|
1446
|
+
}
|
|
1447
|
+
);
|
|
1555
1448
|
}
|
|
1556
1449
|
Table.Row = TableRow;
|
|
1557
1450
|
Table.Cell = TableCell;
|
|
1558
1451
|
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1452
|
+
// src/tag/tag.tsx
|
|
1453
|
+
var import_component_theme18 = require("@zenkigen-inc/component-theme");
|
|
1454
|
+
var import_clsx28 = __toESM(require("clsx"));
|
|
1455
|
+
|
|
1456
|
+
// src/tag/delete-icon.tsx
|
|
1457
|
+
var import_component_theme17 = require("@zenkigen-inc/component-theme");
|
|
1458
|
+
var import_clsx27 = __toESM(require("clsx"));
|
|
1459
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
1460
|
+
var DeleteIcon = ({ color, variant, onClick }) => {
|
|
1461
|
+
const deleteButtonClasses = (0, import_clsx27.default)(
|
|
1462
|
+
"group ml-2 size-[14px] rounded-full p-0.5 hover:cursor-pointer hover:bg-iconOnColor focus-visible:bg-iconOnColor",
|
|
1463
|
+
import_component_theme17.focusVisible.normal
|
|
1464
|
+
);
|
|
1465
|
+
const deletePathClasses = (0, import_clsx27.default)({
|
|
1466
|
+
"fill-interactive02": color === "gray" || variant === "light",
|
|
1467
|
+
"group-hover:fill-interactive02 group-focus-visible:fill-interactive02 fill-iconOnColor": color !== "gray"
|
|
1468
|
+
});
|
|
1469
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("button", { type: "button", className: deleteButtonClasses, onClick, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("svg", { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
1470
|
+
"path",
|
|
1471
|
+
{
|
|
1472
|
+
fillRule: "evenodd",
|
|
1473
|
+
clipRule: "evenodd",
|
|
1474
|
+
d: "M19.7745 4.21818C19.384 3.82765 18.7508 3.82765 18.3603 4.21818L11.9963 10.5821L5.6324 4.21818C5.24187 3.82765 4.60871 3.82765 4.21818 4.21818C3.82766 4.6087 3.82766 5.24187 4.21818 5.63239L10.5821 11.9964L4.21818 18.3603C3.82766 18.7508 3.82766 19.384 4.21818 19.7745C4.60871 20.1651 5.24187 20.165 5.6324 19.7745L11.9963 13.4106L18.3603 19.7745C18.7508 20.165 19.384 20.1651 19.7745 19.7745C20.165 19.384 20.165 18.7508 19.7745 18.3603L13.4106 11.9964L19.7745 5.63239C20.165 5.24187 20.165 4.6087 19.7745 4.21818Z",
|
|
1475
|
+
className: deletePathClasses
|
|
1476
|
+
}
|
|
1477
|
+
) }) });
|
|
1584
1478
|
};
|
|
1585
1479
|
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
[tagLightColors[color]]: variant === 'light',
|
|
1598
|
-
'h-[14px] typography-label11regular': !isEditable && size === 'x-small',
|
|
1599
|
-
'h-4 typography-label12regular': !isEditable && size === 'small',
|
|
1600
|
-
'h-[18px] typography-label14regular': !isEditable && size === 'medium',
|
|
1601
|
-
'h-[22px] typography-label14regular': isEditable && size === 'medium',
|
|
1602
|
-
'rounded-full': isEditable,
|
|
1480
|
+
// src/tag/tag.tsx
|
|
1481
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
1482
|
+
function Tag({ id, children, color, variant = "normal", size = "medium", isEditable, onDelete }) {
|
|
1483
|
+
const wrapperClasses = (0, import_clsx28.default)("flex", "items-center", "justify-center", {
|
|
1484
|
+
[import_component_theme18.tagColors[color]]: variant === "normal",
|
|
1485
|
+
[import_component_theme18.tagLightColors[color]]: variant === "light",
|
|
1486
|
+
"h-[14px] typography-label11regular": !isEditable && size === "x-small",
|
|
1487
|
+
"h-4 typography-label12regular": !isEditable && size === "small",
|
|
1488
|
+
"h-[18px] typography-label14regular": !isEditable && size === "medium",
|
|
1489
|
+
"h-[22px] typography-label14regular": isEditable && size === "medium",
|
|
1490
|
+
"rounded-full": isEditable,
|
|
1603
1491
|
rounded: !isEditable,
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
});
|
|
1607
|
-
return /*#__PURE__*/jsxs("div", {
|
|
1608
|
-
className: wrapperClasses,
|
|
1609
|
-
children: [children, isEditable ? /*#__PURE__*/jsx(DeleteIcon, {
|
|
1610
|
-
onClick: () => onDelete(id),
|
|
1611
|
-
color: color,
|
|
1612
|
-
variant: variant
|
|
1613
|
-
}) : null]
|
|
1492
|
+
"py-0.5 px-1": !isEditable,
|
|
1493
|
+
"py-1 px-2": isEditable
|
|
1614
1494
|
});
|
|
1495
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: wrapperClasses, children: [
|
|
1496
|
+
children,
|
|
1497
|
+
isEditable ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(DeleteIcon, { onClick: () => onDelete(id), color, variant }) : null
|
|
1498
|
+
] });
|
|
1615
1499
|
}
|
|
1616
1500
|
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
height: props.height
|
|
1501
|
+
// src/text-area/text-area.tsx
|
|
1502
|
+
var import_clsx29 = require("clsx");
|
|
1503
|
+
var import_react21 = require("react");
|
|
1504
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
1505
|
+
var TextArea = (0, import_react21.forwardRef)(
|
|
1506
|
+
({
|
|
1507
|
+
size = "medium",
|
|
1508
|
+
isResizable = false,
|
|
1509
|
+
autoHeight = false,
|
|
1510
|
+
maxHeight,
|
|
1511
|
+
isError = false,
|
|
1512
|
+
disabled = false,
|
|
1513
|
+
height,
|
|
1514
|
+
...props
|
|
1515
|
+
}, ref) => {
|
|
1516
|
+
const classes = (0, import_clsx29.clsx)(
|
|
1517
|
+
"w-full rounded border outline-0 placeholder:text-textPlaceholder disabled:text-textPlaceholder",
|
|
1518
|
+
{
|
|
1519
|
+
"border-supportError": isError && !disabled,
|
|
1520
|
+
"hover:border-hoverInput": !disabled && !isError,
|
|
1521
|
+
"border-uiBorder02 hover:focus-within:border-activeInput focus-within:border-activeInput text-text01": !isError,
|
|
1522
|
+
"bg-disabled02 border-disabled01": disabled,
|
|
1523
|
+
"typography-body14regular px-2 pt-1.5 pb-2": size === "medium",
|
|
1524
|
+
"text-4 leading-normal px-3.5 py-2.5": size === "large",
|
|
1525
|
+
"field-sizing-content": autoHeight,
|
|
1526
|
+
"text-supportError": isError,
|
|
1527
|
+
"resize-none": !isResizable
|
|
1645
1528
|
}
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
});
|
|
1694
|
-
|
|
1529
|
+
);
|
|
1530
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "flex", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
1531
|
+
"textarea",
|
|
1532
|
+
{
|
|
1533
|
+
ref,
|
|
1534
|
+
className: classes,
|
|
1535
|
+
...props,
|
|
1536
|
+
style: {
|
|
1537
|
+
...{ maxHeight },
|
|
1538
|
+
// 自動高さではない場合で、height 指定がある場合は設定する
|
|
1539
|
+
...!autoHeight && height !== null ? { height } : {},
|
|
1540
|
+
// 自動高さの場合で、height が指定されている場合は、height を minHeight に設定する
|
|
1541
|
+
...autoHeight && height !== null ? { minHeight: height } : {}
|
|
1542
|
+
}
|
|
1543
|
+
}
|
|
1544
|
+
) });
|
|
1545
|
+
}
|
|
1546
|
+
);
|
|
1547
|
+
TextArea.displayName = "TextArea";
|
|
1548
|
+
|
|
1549
|
+
// src/text-input/text-input.tsx
|
|
1550
|
+
var import_clsx30 = require("clsx");
|
|
1551
|
+
var import_react22 = require("react");
|
|
1552
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
1553
|
+
var TextInput = (0, import_react22.forwardRef)(
|
|
1554
|
+
({ size = "medium", isError = false, disabled = false, onClickClearButton, ...props }, ref) => {
|
|
1555
|
+
const isShowClearButton = !!onClickClearButton && props.value.length !== 0 && !disabled;
|
|
1556
|
+
const inputWrapClasses = (0, import_clsx30.clsx)("relative flex items-center gap-2 overflow-hidden rounded border", {
|
|
1557
|
+
"border-uiBorder02": !isError && !disabled,
|
|
1558
|
+
"border-supportError": isError && !disabled,
|
|
1559
|
+
"hover:border-hoverInput": !disabled && !isError,
|
|
1560
|
+
"hover:focus-within:border-activeInput": !isError,
|
|
1561
|
+
"focus-within:border-activeInput": !isError,
|
|
1562
|
+
"bg-disabled02 border-disabled01": disabled,
|
|
1563
|
+
"pr-2": size === "medium" && isShowClearButton,
|
|
1564
|
+
"pr-3": size === "large" && isShowClearButton
|
|
1565
|
+
});
|
|
1566
|
+
const inputClasses = (0, import_clsx30.clsx)("flex-1 outline-0 placeholder:text-textPlaceholder disabled:text-textPlaceholder", {
|
|
1567
|
+
["typography-label14regular min-h-8 px-2"]: size === "medium",
|
|
1568
|
+
["typography-label16regular min-h-10 px-3"]: size === "large",
|
|
1569
|
+
"text-text01": !isError,
|
|
1570
|
+
"text-supportError": isError,
|
|
1571
|
+
"pr-0": isShowClearButton
|
|
1572
|
+
});
|
|
1573
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: inputWrapClasses, children: [
|
|
1574
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("input", { ref, size: 1, className: inputClasses, disabled, onChange: props.onChange, ...props }),
|
|
1575
|
+
isShowClearButton && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(IconButton, { variant: "text", icon: "close", size: "small", onClick: onClickClearButton })
|
|
1576
|
+
] });
|
|
1577
|
+
}
|
|
1578
|
+
);
|
|
1579
|
+
TextInput.displayName = "TextInput";
|
|
1695
1580
|
|
|
1696
|
-
|
|
1581
|
+
// src/toast/toast.tsx
|
|
1582
|
+
var import_clsx31 = __toESM(require("clsx"));
|
|
1583
|
+
var import_react23 = require("react");
|
|
1584
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
1585
|
+
var CLOSE_TIME_MSEC = 5e3;
|
|
1697
1586
|
function Toast({
|
|
1698
|
-
state =
|
|
1699
|
-
width =
|
|
1587
|
+
state = "information",
|
|
1588
|
+
width = "auto",
|
|
1700
1589
|
isAutoClose = false,
|
|
1701
1590
|
isAnimation = false,
|
|
1702
1591
|
children,
|
|
1703
1592
|
onClickClose
|
|
1704
1593
|
}) {
|
|
1705
|
-
const [isRemoving, setIsRemoving] = useState(false);
|
|
1706
|
-
const handleClose = useCallback(() => {
|
|
1594
|
+
const [isRemoving, setIsRemoving] = (0, import_react23.useState)(false);
|
|
1595
|
+
const handleClose = (0, import_react23.useCallback)(() => {
|
|
1707
1596
|
if (isAnimation) {
|
|
1708
1597
|
setIsRemoving(true);
|
|
1709
1598
|
} else {
|
|
1710
1599
|
onClickClose();
|
|
1711
1600
|
}
|
|
1712
1601
|
}, [isAnimation, onClickClose]);
|
|
1713
|
-
const handleAnimationEnd = e => window.getComputedStyle(e.currentTarget).opacity ===
|
|
1714
|
-
const wrapperClasses =
|
|
1715
|
-
[
|
|
1716
|
-
[
|
|
1602
|
+
const handleAnimationEnd = (e) => window.getComputedStyle(e.currentTarget).opacity === "0" && onClickClose();
|
|
1603
|
+
const wrapperClasses = (0, import_clsx31.default)("pointer-events-auto flex items-start gap-1 bg-white p-4 shadow-floatingShadow", {
|
|
1604
|
+
["animate-toast-in"]: isAnimation && !isRemoving,
|
|
1605
|
+
["animate-toast-out opacity-0"]: isAnimation && isRemoving
|
|
1717
1606
|
});
|
|
1718
|
-
const iconClasses =
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1607
|
+
const iconClasses = (0, import_clsx31.default)("flex items-center", {
|
|
1608
|
+
"fill-supportSuccess": state === "success",
|
|
1609
|
+
"fill-supportError": state === "error",
|
|
1610
|
+
"fill-supportWarning": state === "warning",
|
|
1611
|
+
"fill-supportInfo": state === "information"
|
|
1723
1612
|
});
|
|
1724
|
-
const textClasses =
|
|
1725
|
-
|
|
1726
|
-
|
|
1613
|
+
const textClasses = (0, import_clsx31.default)("typography-body13regular flex-1 pt-[3px]", {
|
|
1614
|
+
"text-supportError": state === "error",
|
|
1615
|
+
"text-text01": state === "success" || state === "warning" || state === "information"
|
|
1727
1616
|
});
|
|
1728
1617
|
const iconName = {
|
|
1729
|
-
success:
|
|
1730
|
-
error:
|
|
1731
|
-
warning:
|
|
1732
|
-
information:
|
|
1618
|
+
success: "success-filled",
|
|
1619
|
+
error: "attention",
|
|
1620
|
+
warning: "warning",
|
|
1621
|
+
information: "information-filled"
|
|
1733
1622
|
};
|
|
1734
|
-
useEffect(() => {
|
|
1623
|
+
(0, import_react23.useEffect)(() => {
|
|
1735
1624
|
const timer = window.setTimeout(() => {
|
|
1736
1625
|
if (isAutoClose) {
|
|
1737
1626
|
setIsRemoving(true);
|
|
@@ -1739,344 +1628,356 @@ function Toast({
|
|
|
1739
1628
|
}, CLOSE_TIME_MSEC);
|
|
1740
1629
|
return () => window.clearTimeout(timer);
|
|
1741
1630
|
}, [isAutoClose]);
|
|
1742
|
-
return
|
|
1743
|
-
className:
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
onAnimationEnd: handleAnimationEnd,
|
|
1748
|
-
children: [/*#__PURE__*/jsx("div", {
|
|
1749
|
-
className: iconClasses,
|
|
1750
|
-
children: /*#__PURE__*/jsx(Icon, {
|
|
1751
|
-
name: iconName[state]
|
|
1752
|
-
})
|
|
1753
|
-
}), /*#__PURE__*/jsx("p", {
|
|
1754
|
-
className: textClasses,
|
|
1755
|
-
children: children
|
|
1756
|
-
}), /*#__PURE__*/jsx(IconButton, {
|
|
1757
|
-
icon: "close",
|
|
1758
|
-
size: "medium",
|
|
1759
|
-
variant: "text",
|
|
1760
|
-
onClick: handleClose,
|
|
1761
|
-
isNoPadding: true
|
|
1762
|
-
})]
|
|
1763
|
-
});
|
|
1631
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: wrapperClasses, style: { width }, onAnimationEnd: handleAnimationEnd, children: [
|
|
1632
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: iconClasses, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Icon, { name: iconName[state] }) }),
|
|
1633
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("p", { className: textClasses, children }),
|
|
1634
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(IconButton, { icon: "close", size: "medium", variant: "text", onClick: handleClose, isNoPadding: true })
|
|
1635
|
+
] });
|
|
1764
1636
|
}
|
|
1765
1637
|
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
const
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
setToasts(prev => [...prev, {
|
|
1777
|
-
id: Math.trunc(Math.random() * 100000),
|
|
1778
|
-
message,
|
|
1779
|
-
state
|
|
1780
|
-
}]);
|
|
1638
|
+
// src/toast/toast-provider.tsx
|
|
1639
|
+
var import_react24 = require("react");
|
|
1640
|
+
var import_react_dom3 = require("react-dom");
|
|
1641
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
1642
|
+
var ToastContext = (0, import_react24.createContext)({});
|
|
1643
|
+
var ToastProvider = ({ children }) => {
|
|
1644
|
+
const [isClientRender, setIsClientRender] = (0, import_react24.useState)(false);
|
|
1645
|
+
const [toasts, setToasts] = (0, import_react24.useState)([]);
|
|
1646
|
+
const addToast = (0, import_react24.useCallback)(({ message, state }) => {
|
|
1647
|
+
setToasts((prev) => [...prev, { id: Math.trunc(Math.random() * 1e5), message, state }]);
|
|
1781
1648
|
}, []);
|
|
1782
|
-
const removeToast = useCallback(id => {
|
|
1783
|
-
setToasts(prev => prev.filter(snackbar => snackbar.id !== id));
|
|
1649
|
+
const removeToast = (0, import_react24.useCallback)((id) => {
|
|
1650
|
+
setToasts((prev) => prev.filter((snackbar) => snackbar.id !== id));
|
|
1784
1651
|
}, []);
|
|
1785
|
-
useEffect(() => {
|
|
1652
|
+
(0, import_react24.useEffect)(() => {
|
|
1786
1653
|
setIsClientRender(true);
|
|
1787
1654
|
}, []);
|
|
1788
|
-
return
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
removeToast
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
children: toasts.map(({
|
|
1796
|
-
id,
|
|
1797
|
-
message,
|
|
1798
|
-
state
|
|
1799
|
-
}) => /*#__PURE__*/jsx(Toast, {
|
|
1800
|
-
state: state,
|
|
1801
|
-
isAutoClose: true,
|
|
1802
|
-
isAnimation: true,
|
|
1803
|
-
onClickClose: () => removeToast(id),
|
|
1804
|
-
width: 475,
|
|
1805
|
-
children: message
|
|
1806
|
-
}, id))
|
|
1807
|
-
}), document.body)]
|
|
1808
|
-
});
|
|
1655
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(ToastContext.Provider, { value: { addToast, removeToast }, children: [
|
|
1656
|
+
children,
|
|
1657
|
+
isClientRender && (0, import_react_dom3.createPortal)(
|
|
1658
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "pointer-events-none fixed bottom-0 left-0 z-toast mb-4 ml-4 flex w-full flex-col-reverse gap-[16px]", children: toasts.map(({ id, message, state }) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Toast, { state, isAutoClose: true, isAnimation: true, onClickClose: () => removeToast(id), width: 475, children: message }, id)) }),
|
|
1659
|
+
document.body
|
|
1660
|
+
)
|
|
1661
|
+
] });
|
|
1809
1662
|
};
|
|
1810
|
-
|
|
1811
|
-
return useContext(ToastContext);
|
|
1663
|
+
var useToast = () => {
|
|
1664
|
+
return (0, import_react24.useContext)(ToastContext);
|
|
1812
1665
|
};
|
|
1813
1666
|
|
|
1667
|
+
// src/toggle/toggle.tsx
|
|
1668
|
+
var import_clsx32 = __toESM(require("clsx"));
|
|
1669
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
1814
1670
|
function Toggle({
|
|
1815
1671
|
id,
|
|
1816
|
-
size =
|
|
1672
|
+
size = "medium",
|
|
1817
1673
|
isChecked,
|
|
1818
1674
|
onChange,
|
|
1819
1675
|
label,
|
|
1820
|
-
labelPosition =
|
|
1676
|
+
labelPosition = "right",
|
|
1821
1677
|
isDisabled = false
|
|
1822
1678
|
}) {
|
|
1823
|
-
const baseClasses =
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
});
|
|
1831
|
-
const inputClasses =
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
htmlFor: id,
|
|
1866
|
-
className: labelClasses,
|
|
1867
|
-
children: label
|
|
1868
|
-
})]
|
|
1869
|
-
});
|
|
1679
|
+
const baseClasses = (0, import_clsx32.default)("relative flex items-center rounded-full", {
|
|
1680
|
+
"bg-disabledOn": isDisabled && isChecked,
|
|
1681
|
+
"bg-disabled01": isDisabled && !isChecked,
|
|
1682
|
+
"bg-interactive01 peer-hover:bg-hover01": !isDisabled && isChecked,
|
|
1683
|
+
"bg-interactive02 peer-hover:bg-hoverGray": !isDisabled && !isChecked,
|
|
1684
|
+
"w-8 h-4 px-[3px]": size === "small",
|
|
1685
|
+
"w-12 h-6 px-1": size === "medium" || size === "large"
|
|
1686
|
+
});
|
|
1687
|
+
const inputClasses = (0, import_clsx32.default)(
|
|
1688
|
+
"peer absolute inset-0 z-[1] opacity-0",
|
|
1689
|
+
isDisabled ? "cursor-not-allowed" : "cursor-pointer"
|
|
1690
|
+
);
|
|
1691
|
+
const indicatorClasses = (0, import_clsx32.default)("rounded-full bg-iconOnColor", {
|
|
1692
|
+
"w-2.5 h-2.5": size === "small",
|
|
1693
|
+
"w-4 h-4": size === "medium" || size === "large",
|
|
1694
|
+
"ml-auto": isChecked
|
|
1695
|
+
});
|
|
1696
|
+
const labelClasses = (0, import_clsx32.default)("break-all", {
|
|
1697
|
+
"mr-2": labelPosition === "left",
|
|
1698
|
+
"ml-2": labelPosition === "right",
|
|
1699
|
+
"typography-label14regular": size === "small" || size === "medium",
|
|
1700
|
+
"typography-label16regular": size === "large",
|
|
1701
|
+
"pointer-events-none cursor-not-allowed text-disabled01": isDisabled,
|
|
1702
|
+
"cursor-pointer text-text01": !isDisabled
|
|
1703
|
+
});
|
|
1704
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "relative flex flex-[0_0_auto] items-center", children: [
|
|
1705
|
+
label != null && labelPosition === "left" && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("label", { htmlFor: id, className: labelClasses, children: label }),
|
|
1706
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
1707
|
+
"input",
|
|
1708
|
+
{
|
|
1709
|
+
className: inputClasses,
|
|
1710
|
+
type: "checkbox",
|
|
1711
|
+
name: id,
|
|
1712
|
+
id,
|
|
1713
|
+
checked: isChecked,
|
|
1714
|
+
onChange,
|
|
1715
|
+
disabled: isDisabled
|
|
1716
|
+
}
|
|
1717
|
+
),
|
|
1718
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: baseClasses, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: indicatorClasses }) }),
|
|
1719
|
+
label != null && labelPosition === "right" && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("label", { htmlFor: id, className: labelClasses, children: label })
|
|
1720
|
+
] });
|
|
1870
1721
|
}
|
|
1871
1722
|
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1723
|
+
// src/tooltip/tooltip.tsx
|
|
1724
|
+
var import_react26 = require("react");
|
|
1725
|
+
var import_react_dom4 = require("react-dom");
|
|
1726
|
+
|
|
1727
|
+
// src/tooltip/tooltip.hook.ts
|
|
1728
|
+
var import_react25 = require("react");
|
|
1729
|
+
var useTooltip = () => {
|
|
1730
|
+
const calculatePosition = (0, import_react25.useCallback)(
|
|
1731
|
+
(args) => {
|
|
1732
|
+
const result = {
|
|
1733
|
+
maxWidth: "none",
|
|
1734
|
+
width: "auto",
|
|
1735
|
+
left: "0px",
|
|
1736
|
+
top: "0px",
|
|
1737
|
+
bottom: "0px",
|
|
1738
|
+
translateX: "0",
|
|
1739
|
+
translateY: "0"
|
|
1740
|
+
};
|
|
1741
|
+
result.maxWidth = args.maxWidth ?? "none";
|
|
1742
|
+
const offsetH = args.tooltipSize === "small" ? 11 : 22;
|
|
1743
|
+
const targetHorizontalCenter = args.dimensions.right - (args.dimensions.right - args.dimensions.left) / 2;
|
|
1744
|
+
const targetLeft = args.dimensions.left;
|
|
1745
|
+
const targetRight = args.dimensions.right;
|
|
1746
|
+
const targetWidth = args.dimensions.width;
|
|
1747
|
+
switch (args.horizontalAlign) {
|
|
1748
|
+
case "center":
|
|
1749
|
+
result.left = `${targetHorizontalCenter}px`;
|
|
1750
|
+
result.translateX = "-50%";
|
|
1751
|
+
break;
|
|
1752
|
+
case "left":
|
|
1753
|
+
result.left = `${targetLeft - offsetH}px`;
|
|
1754
|
+
result.translateX = `${targetWidth / 2}px`;
|
|
1755
|
+
break;
|
|
1756
|
+
case "right":
|
|
1757
|
+
result.left = `${targetRight + offsetH}px`;
|
|
1758
|
+
result.translateX = `-${targetWidth / 2}px`;
|
|
1759
|
+
break;
|
|
1760
|
+
}
|
|
1761
|
+
switch (args.verticalPosition) {
|
|
1762
|
+
case "bottom":
|
|
1763
|
+
result.top = `${args.dimensions.top + args.dimensions.height + window.scrollY}px`;
|
|
1764
|
+
result.bottom = "unset";
|
|
1765
|
+
break;
|
|
1766
|
+
case "top":
|
|
1767
|
+
result.top = `${args.dimensions.top + window.scrollY}px`;
|
|
1768
|
+
result.bottom = "unset";
|
|
1769
|
+
result.translateY = "-100%";
|
|
1770
|
+
break;
|
|
1771
|
+
}
|
|
1772
|
+
return result;
|
|
1773
|
+
},
|
|
1774
|
+
[]
|
|
1775
|
+
);
|
|
1917
1776
|
return {
|
|
1918
1777
|
calculatePosition
|
|
1919
1778
|
};
|
|
1920
1779
|
};
|
|
1921
1780
|
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
d: "M4 4L0 0H8L4 4Z"
|
|
1946
|
-
})
|
|
1947
|
-
});
|
|
1781
|
+
// src/tooltip/tooltip-content.tsx
|
|
1782
|
+
var import_clsx34 = __toESM(require("clsx"));
|
|
1783
|
+
|
|
1784
|
+
// src/tooltip/tail-icon.tsx
|
|
1785
|
+
var import_clsx33 = __toESM(require("clsx"));
|
|
1786
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
1787
|
+
var TailIcon = (props) => {
|
|
1788
|
+
const tailClasses = (0, import_clsx33.default)("absolute fill-uiBackgroundTooltip", {
|
|
1789
|
+
"rotate-180": props.verticalPosition === "bottom",
|
|
1790
|
+
"rotate-0": props.verticalPosition !== "bottom",
|
|
1791
|
+
"-top-1": props.verticalPosition === "bottom" && props.size === "small",
|
|
1792
|
+
"-top-2": props.verticalPosition === "bottom" && props.size !== "small",
|
|
1793
|
+
"-bottom-1": props.verticalPosition !== "bottom" && props.size === "small",
|
|
1794
|
+
"-bottom-2": props.verticalPosition !== "bottom" && props.size !== "small",
|
|
1795
|
+
"right-2": props.horizontalAlign === "right" && props.size === "small",
|
|
1796
|
+
"right-4": props.horizontalAlign === "right" && props.size !== "small",
|
|
1797
|
+
"left-2": props.horizontalAlign === "left" && props.size === "small",
|
|
1798
|
+
"left-4": props.horizontalAlign === "left" && props.size !== "small",
|
|
1799
|
+
"left-1/2 -translate-x-1": props.horizontalAlign === "center" && props.size === "small",
|
|
1800
|
+
"left-1/2 -translate-x-2": props.horizontalAlign === "center" && props.size !== "small"
|
|
1801
|
+
});
|
|
1802
|
+
if (props.size === "small") {
|
|
1803
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("svg", { className: tailClasses, width: "8", height: "4", viewBox: "0 0 8 4", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("path", { d: "M4 4L0 0H8L4 4Z" }) });
|
|
1948
1804
|
} else {
|
|
1949
|
-
return
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1805
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
1806
|
+
"svg",
|
|
1807
|
+
{
|
|
1808
|
+
className: tailClasses,
|
|
1809
|
+
width: "14",
|
|
1810
|
+
height: "8",
|
|
1811
|
+
viewBox: "0 0 14 8",
|
|
1812
|
+
fill: "none",
|
|
1813
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1814
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("path", { d: "M7 8L0 0H14L7 8Z" })
|
|
1815
|
+
}
|
|
1816
|
+
);
|
|
1960
1817
|
}
|
|
1961
1818
|
};
|
|
1962
1819
|
|
|
1963
|
-
|
|
1820
|
+
// src/tooltip/tooltip-content.tsx
|
|
1821
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
1822
|
+
var TooltipContent = ({
|
|
1964
1823
|
content,
|
|
1965
1824
|
horizontalAlign,
|
|
1966
1825
|
verticalPosition,
|
|
1967
1826
|
size,
|
|
1968
1827
|
tooltipPosition,
|
|
1969
1828
|
maxWidth,
|
|
1970
|
-
isPortal
|
|
1829
|
+
isPortal = false
|
|
1971
1830
|
}) => {
|
|
1972
|
-
const tooltipWrapperClasses =
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
});
|
|
1981
|
-
const tooltipBodyClasses =
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1831
|
+
const tooltipWrapperClasses = (0, import_clsx34.default)("absolute z-tooltip m-auto flex", {
|
|
1832
|
+
"top-0": !isPortal && verticalPosition === "top",
|
|
1833
|
+
"bottom-0": !isPortal && verticalPosition === "bottom",
|
|
1834
|
+
"justify-start": horizontalAlign === "left",
|
|
1835
|
+
"justify-center": horizontalAlign === "center",
|
|
1836
|
+
"justify-end": horizontalAlign === "right",
|
|
1837
|
+
"w-[24px]": size === "small",
|
|
1838
|
+
"w-[46px]": size !== "small"
|
|
1839
|
+
});
|
|
1840
|
+
const tooltipBodyClasses = (0, import_clsx34.default)(
|
|
1841
|
+
"absolute z-tooltip inline-block w-max rounded bg-uiBackgroundTooltip text-textOnColor",
|
|
1842
|
+
{
|
|
1843
|
+
"typography-body12regular": size === "small",
|
|
1844
|
+
"typography-body13regular": size === "medium",
|
|
1845
|
+
"px-2 pb-1 pt-1.5": size === "small",
|
|
1846
|
+
"px-4 py-3": size === "medium",
|
|
1847
|
+
"bottom-2": verticalPosition !== "bottom" && size === "small",
|
|
1848
|
+
"bottom-3": verticalPosition !== "bottom" && size === "medium",
|
|
1849
|
+
"top-2": verticalPosition === "bottom" && size === "small",
|
|
1850
|
+
"top-3": verticalPosition === "bottom" && size === "medium"
|
|
1851
|
+
}
|
|
1852
|
+
);
|
|
1853
|
+
const tooltipWrapperStyle = isPortal ? {
|
|
1854
|
+
transform: `translate(${tooltipPosition.translateX}, ${tooltipPosition.translateY})`,
|
|
1855
|
+
...tooltipPosition
|
|
1856
|
+
} : {};
|
|
1857
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: tooltipWrapperClasses, style: tooltipWrapperStyle, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
1858
|
+
"div",
|
|
1859
|
+
{
|
|
1998
1860
|
className: tooltipBodyClasses,
|
|
1999
1861
|
style: {
|
|
2000
1862
|
maxWidth
|
|
2001
1863
|
},
|
|
2002
|
-
children: [
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
});
|
|
1864
|
+
children: [
|
|
1865
|
+
content,
|
|
1866
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(TailIcon, { size, verticalPosition, horizontalAlign })
|
|
1867
|
+
]
|
|
1868
|
+
}
|
|
1869
|
+
) });
|
|
2009
1870
|
};
|
|
2010
1871
|
|
|
1872
|
+
// src/tooltip/tooltip.tsx
|
|
1873
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
2011
1874
|
function Tooltip({
|
|
2012
1875
|
children,
|
|
2013
1876
|
content,
|
|
2014
|
-
size =
|
|
1877
|
+
size = "small",
|
|
2015
1878
|
maxWidth,
|
|
2016
|
-
verticalPosition =
|
|
2017
|
-
horizontalAlign =
|
|
1879
|
+
verticalPosition = "bottom",
|
|
1880
|
+
horizontalAlign = "center",
|
|
2018
1881
|
isDisabledHover = false,
|
|
2019
1882
|
portalTarget
|
|
2020
1883
|
}) {
|
|
2021
|
-
const {
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
const targetRef = useRef(null);
|
|
2035
|
-
const handleMouseOverWrapper = useCallback(() => {
|
|
1884
|
+
const { calculatePosition } = useTooltip();
|
|
1885
|
+
const [isVisible, setIsVisible] = (0, import_react26.useState)(false);
|
|
1886
|
+
const [tooltipPosition, setTooltipPosition] = (0, import_react26.useState)({
|
|
1887
|
+
maxWidth: "none",
|
|
1888
|
+
width: "auto",
|
|
1889
|
+
left: "0px",
|
|
1890
|
+
top: "0px",
|
|
1891
|
+
bottom: "0px",
|
|
1892
|
+
translateX: "0",
|
|
1893
|
+
translateY: "0"
|
|
1894
|
+
});
|
|
1895
|
+
const targetRef = (0, import_react26.useRef)(null);
|
|
1896
|
+
const handleMouseOverWrapper = (0, import_react26.useCallback)(() => {
|
|
2036
1897
|
if (isDisabledHover) {
|
|
2037
1898
|
return;
|
|
2038
1899
|
}
|
|
2039
1900
|
setIsVisible(true);
|
|
2040
1901
|
}, [isDisabledHover]);
|
|
2041
|
-
const handleMouseOutWrapper = useCallback(() => {
|
|
1902
|
+
const handleMouseOutWrapper = (0, import_react26.useCallback)(() => {
|
|
2042
1903
|
setIsVisible(false);
|
|
2043
1904
|
}, []);
|
|
2044
|
-
useEffect(() => {
|
|
2045
|
-
var _targetRef$current;
|
|
1905
|
+
(0, import_react26.useEffect)(() => {
|
|
2046
1906
|
if (targetRef.current === null) return;
|
|
2047
|
-
const dimensions =
|
|
2048
|
-
const position = calculatePosition({
|
|
2049
|
-
dimensions,
|
|
2050
|
-
maxWidth,
|
|
2051
|
-
verticalPosition,
|
|
2052
|
-
horizontalAlign,
|
|
2053
|
-
tooltipSize: size
|
|
2054
|
-
});
|
|
1907
|
+
const dimensions = targetRef.current?.getBoundingClientRect();
|
|
1908
|
+
const position = calculatePosition({ dimensions, maxWidth, verticalPosition, horizontalAlign, tooltipSize: size });
|
|
2055
1909
|
setTooltipPosition(position);
|
|
2056
1910
|
}, [calculatePosition, horizontalAlign, maxWidth, size, verticalPosition]);
|
|
2057
|
-
return
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
1911
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
1912
|
+
"div",
|
|
1913
|
+
{
|
|
1914
|
+
ref: targetRef,
|
|
1915
|
+
className: "relative flex items-center justify-center",
|
|
1916
|
+
onMouseOver: handleMouseOverWrapper,
|
|
1917
|
+
onMouseLeave: handleMouseOutWrapper,
|
|
1918
|
+
children: [
|
|
1919
|
+
children,
|
|
1920
|
+
isVisible && (portalTarget == null ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
1921
|
+
TooltipContent,
|
|
1922
|
+
{
|
|
1923
|
+
content,
|
|
1924
|
+
size,
|
|
1925
|
+
maxWidth,
|
|
1926
|
+
verticalPosition,
|
|
1927
|
+
horizontalAlign,
|
|
1928
|
+
tooltipPosition
|
|
1929
|
+
}
|
|
1930
|
+
) : (0, import_react_dom4.createPortal)(
|
|
1931
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
1932
|
+
TooltipContent,
|
|
1933
|
+
{
|
|
1934
|
+
isPortal: true,
|
|
1935
|
+
content,
|
|
1936
|
+
size,
|
|
1937
|
+
maxWidth,
|
|
1938
|
+
verticalPosition,
|
|
1939
|
+
horizontalAlign,
|
|
1940
|
+
tooltipPosition
|
|
1941
|
+
}
|
|
1942
|
+
),
|
|
1943
|
+
portalTarget
|
|
1944
|
+
))
|
|
1945
|
+
]
|
|
1946
|
+
}
|
|
1947
|
+
);
|
|
2079
1948
|
}
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
1949
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
1950
|
+
0 && (module.exports = {
|
|
1951
|
+
Avatar,
|
|
1952
|
+
Breadcrumb,
|
|
1953
|
+
Button,
|
|
1954
|
+
Checkbox,
|
|
1955
|
+
Dropdown,
|
|
1956
|
+
EvaluationStar,
|
|
1957
|
+
Heading,
|
|
1958
|
+
Icon,
|
|
1959
|
+
IconButton,
|
|
1960
|
+
Loading,
|
|
1961
|
+
Modal,
|
|
1962
|
+
NotificationInline,
|
|
1963
|
+
Pagination,
|
|
1964
|
+
PaginationSelect,
|
|
1965
|
+
Radio,
|
|
1966
|
+
Search,
|
|
1967
|
+
Select,
|
|
1968
|
+
SelectSort,
|
|
1969
|
+
Tab,
|
|
1970
|
+
TabItem,
|
|
1971
|
+
Table,
|
|
1972
|
+
TableCell,
|
|
1973
|
+
TableRow,
|
|
1974
|
+
Tag,
|
|
1975
|
+
TextArea,
|
|
1976
|
+
TextInput,
|
|
1977
|
+
Toast,
|
|
1978
|
+
ToastProvider,
|
|
1979
|
+
Toggle,
|
|
1980
|
+
Tooltip,
|
|
1981
|
+
useOutsideClick,
|
|
1982
|
+
useToast
|
|
1983
|
+
});
|