@charcoal-ui/react-sandbox 3.8.0 → 3.9.1
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.cjs.js +518 -1089
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +521 -1106
- package/dist/index.esm.js.map +1 -1
- package/package.json +8 -7
package/dist/index.cjs.js
CHANGED
|
@@ -79,17 +79,7 @@ var FilterButton = React.forwardRef(function FilterButton2({
|
|
|
79
79
|
hover,
|
|
80
80
|
reactive = false
|
|
81
81
|
}, ref) {
|
|
82
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
83
|
-
ButtonLike,
|
|
84
|
-
{
|
|
85
|
-
active,
|
|
86
|
-
reactive,
|
|
87
|
-
hover,
|
|
88
|
-
onClick: active && !reactive ? void 0 : onClick,
|
|
89
|
-
ref,
|
|
90
|
-
children
|
|
91
|
-
}
|
|
92
|
-
);
|
|
82
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ButtonLike, { active, reactive, hover, onClick: active && !reactive ? void 0 : onClick, ref, children });
|
|
93
83
|
});
|
|
94
84
|
var FilterIconButton = React.forwardRef(function FilterIconButton2({
|
|
95
85
|
onClick,
|
|
@@ -100,19 +90,7 @@ var FilterIconButton = React.forwardRef(function FilterIconButton2({
|
|
|
100
90
|
width,
|
|
101
91
|
height
|
|
102
92
|
}, ref) {
|
|
103
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
104
|
-
StyledButtonLike,
|
|
105
|
-
{
|
|
106
|
-
active,
|
|
107
|
-
reactive,
|
|
108
|
-
hover,
|
|
109
|
-
onClick: active && !reactive ? void 0 : onClick,
|
|
110
|
-
ref,
|
|
111
|
-
buttonWidth: width,
|
|
112
|
-
buttonHeight: height,
|
|
113
|
-
children
|
|
114
|
-
}
|
|
115
|
-
);
|
|
93
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(StyledButtonLike, { active, reactive, hover, onClick: active && !reactive ? void 0 : onClick, ref, buttonWidth: width, buttonHeight: height, children });
|
|
116
94
|
});
|
|
117
95
|
var FilterLink = React.forwardRef(function FilterLink2({
|
|
118
96
|
onClick,
|
|
@@ -122,79 +100,50 @@ var FilterLink = React.forwardRef(function FilterLink2({
|
|
|
122
100
|
reactive = false,
|
|
123
101
|
...props
|
|
124
102
|
}, ref) {
|
|
125
|
-
const {
|
|
103
|
+
const {
|
|
104
|
+
Link
|
|
105
|
+
} = (0, import_react.useComponentAbstraction)();
|
|
126
106
|
if (active && !reactive) {
|
|
127
107
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PlainElement, { active: true, hover, ref, children });
|
|
128
108
|
} else {
|
|
129
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Link, { ...props, onClick, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
130
|
-
PlainElement,
|
|
131
|
-
{
|
|
132
|
-
active,
|
|
133
|
-
reactive,
|
|
134
|
-
hover,
|
|
135
|
-
ref,
|
|
136
|
-
children
|
|
137
|
-
}
|
|
138
|
-
) });
|
|
109
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Link, { ...props, onClick, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PlainElement, { active, reactive, hover, ref, children }) });
|
|
139
110
|
}
|
|
140
111
|
});
|
|
141
|
-
var buttonCss = import_styled_components.css
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
`;
|
|
177
|
-
var padding0Css = import_styled_components.css`
|
|
178
|
-
padding: 0;
|
|
179
|
-
|
|
180
|
-
@media ${({ theme: theme2 }) => (0, import_utils.maxWidth)(theme2.breakpoint.screen1)} {
|
|
181
|
-
padding: 0;
|
|
182
|
-
}
|
|
183
|
-
`;
|
|
184
|
-
var ButtonLike = import_styled_components.default.button`
|
|
185
|
-
${buttonCss}
|
|
186
|
-
`;
|
|
187
|
-
var PlainElement = import_styled_components.default.span`
|
|
188
|
-
${buttonCss}
|
|
189
|
-
`;
|
|
190
|
-
var StyledButtonLike = (0, import_styled_components.default)(ButtonLike)`
|
|
191
|
-
${padding0Css};
|
|
192
|
-
${(p) => p.buttonWidth !== void 0 && `width: ${p.buttonWidth}px;`}
|
|
193
|
-
${(p) => p.buttonHeight !== void 0 && `height: ${p.buttonHeight}px;`}
|
|
194
|
-
`;
|
|
195
|
-
var Filter = import_styled_components.default.div`
|
|
196
|
-
display: flex;
|
|
197
|
-
`;
|
|
112
|
+
var buttonCss = (0, import_styled_components.css)(["display:block;outline:none;border:none;padding:9px 24px;font-size:14px;line-height:22px;font-weight:bold;border-radius:2000px;transition:color 0.2s;color:", ";cursor:pointer;user-select:none;background-color:transparent;&:hover{color:", ";}", " ", " ", " @media ", "{padding:5px 16px;}"], ({
|
|
113
|
+
theme: theme2
|
|
114
|
+
}) => theme2.color.text3, ({
|
|
115
|
+
theme: theme2
|
|
116
|
+
}) => theme2.color.text2, ({
|
|
117
|
+
hover = false
|
|
118
|
+
}) => hover && (0, import_styled_components.css)(["color:", ";"], ({
|
|
119
|
+
theme: theme2
|
|
120
|
+
}) => theme2.color.text2), ({
|
|
121
|
+
active = false
|
|
122
|
+
}) => active && (0, import_styled_components.css)(["background-color:", ";color:", ";"], ({
|
|
123
|
+
theme: theme2
|
|
124
|
+
}) => theme2.color.surface3, ({
|
|
125
|
+
theme: theme2
|
|
126
|
+
}) => theme2.color.text2), ({
|
|
127
|
+
active = false,
|
|
128
|
+
reactive = false
|
|
129
|
+
}) => active && !reactive && (0, import_styled_components.css)(["cursor:default;"]), ({
|
|
130
|
+
theme: theme2
|
|
131
|
+
}) => (0, import_utils.maxWidth)(theme2.breakpoint.screen1));
|
|
132
|
+
var padding0Css = (0, import_styled_components.css)(["padding:0;@media ", "{padding:0;}"], ({
|
|
133
|
+
theme: theme2
|
|
134
|
+
}) => (0, import_utils.maxWidth)(theme2.breakpoint.screen1));
|
|
135
|
+
var ButtonLike = import_styled_components.default.button.withConfig({
|
|
136
|
+
componentId: "ccl__sc-g0cfzt-0"
|
|
137
|
+
})(["", ""], buttonCss);
|
|
138
|
+
var PlainElement = import_styled_components.default.span.withConfig({
|
|
139
|
+
componentId: "ccl__sc-g0cfzt-1"
|
|
140
|
+
})(["", ""], buttonCss);
|
|
141
|
+
var StyledButtonLike = (0, import_styled_components.default)(ButtonLike).withConfig({
|
|
142
|
+
componentId: "ccl__sc-g0cfzt-2"
|
|
143
|
+
})(["", ";", " ", ""], padding0Css, (p) => p.buttonWidth !== void 0 && `width: ${p.buttonWidth}px;`, (p) => p.buttonHeight !== void 0 && `height: ${p.buttonHeight}px;`);
|
|
144
|
+
var Filter = import_styled_components.default.div.withConfig({
|
|
145
|
+
componentId: "ccl__sc-g0cfzt-3"
|
|
146
|
+
})(["display:flex;"]);
|
|
198
147
|
var Filter_default = Filter;
|
|
199
148
|
|
|
200
149
|
// src/components/HintText/index.tsx
|
|
@@ -220,33 +169,14 @@ function IconBase({
|
|
|
220
169
|
fillRule,
|
|
221
170
|
clipRule
|
|
222
171
|
}) {
|
|
223
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
224
|
-
Icon,
|
|
225
|
-
{
|
|
226
|
-
viewBox: `0 0 ${viewBoxSize} ${viewBoxSize}`,
|
|
227
|
-
size: size3,
|
|
228
|
-
currentColor,
|
|
229
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
230
|
-
IconBasePath,
|
|
231
|
-
{
|
|
232
|
-
path: path2,
|
|
233
|
-
transform,
|
|
234
|
-
fillRule,
|
|
235
|
-
clipRule
|
|
236
|
-
}
|
|
237
|
-
)
|
|
238
|
-
}
|
|
239
|
-
);
|
|
172
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Icon, { viewBox: `0 0 ${viewBoxSize} ${viewBoxSize}`, size: size3, currentColor, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(IconBasePath, { path: path2, transform, fillRule, clipRule }) });
|
|
240
173
|
}
|
|
241
|
-
var Icon = import_styled_components3.default.svg
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
font-size: 0;
|
|
248
|
-
vertical-align: middle;
|
|
249
|
-
`;
|
|
174
|
+
var Icon = import_styled_components3.default.svg.withConfig({
|
|
175
|
+
componentId: "ccl__sc-ifc22c-0"
|
|
176
|
+
})(["stroke:none;fill:", ";width:", "px;height:", "px;line-height:0;font-size:0;vertical-align:middle;"], ({
|
|
177
|
+
currentColor = false,
|
|
178
|
+
theme: theme2
|
|
179
|
+
}) => currentColor ? "currentColor" : theme2.color.text2, (props) => props.size, (props) => props.size);
|
|
250
180
|
var IconBasePath = ({
|
|
251
181
|
path: path2,
|
|
252
182
|
transform,
|
|
@@ -254,15 +184,7 @@ var IconBasePath = ({
|
|
|
254
184
|
clipRule
|
|
255
185
|
}) => {
|
|
256
186
|
if (typeof path2 === "string") {
|
|
257
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
258
|
-
"path",
|
|
259
|
-
{
|
|
260
|
-
d: path2,
|
|
261
|
-
transform,
|
|
262
|
-
fillRule,
|
|
263
|
-
clipRule
|
|
264
|
-
}
|
|
265
|
-
);
|
|
187
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: path2, transform, fillRule, clipRule });
|
|
266
188
|
} else {
|
|
267
189
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_jsx_runtime2.Fragment, { children: path2 });
|
|
268
190
|
}
|
|
@@ -273,71 +195,46 @@ var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
|
273
195
|
var size = 16;
|
|
274
196
|
function InfoIcon() {
|
|
275
197
|
const path2 = /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
276
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
277
|
-
|
|
278
|
-
{
|
|
279
|
-
d: "M8 16C3.58172 16 0 12.4183 0 8C0 3.58172 3.58172 0 8 0C12.4183\n 0 16 3.58172 16 8C16 12.4183 12.4183 16 8 16Z"
|
|
280
|
-
}
|
|
281
|
-
),
|
|
282
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
283
|
-
Path,
|
|
284
|
-
{
|
|
285
|
-
d: "M14 8C14 11.3137 11.3137 14 8 14C4.68629 14 2 11.3137 2 8C2 4.68629\n 4.68629 2 8 2C11.3137 2 14 4.68629 14 8ZM8 6.25C8.69036 6.25 9.25 5.69036\n 9.25 5C9.25 4.30964 8.69036 3.75 8 3.75C7.30964 3.75 6.75 4.30964 6.75\n 5C6.75 5.69036 7.30964 6.25 8 6.25ZM7 7.75V11.25C7 11.8023 7.44772 12.25\n 8 12.25C8.55228 12.25 9 11.8023 9 11.25V7.75C9 7.19772 8.55228 6.75 8\n 6.75C7.44772 6.75 7 7.19772 7 7.75Z"
|
|
286
|
-
}
|
|
287
|
-
)
|
|
198
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M8 16C3.58172 16 0 12.4183 0 8C0 3.58172 3.58172 0 8 0C12.4183\n 0 16 3.58172 16 8C16 12.4183 12.4183 16 8 16Z" }),
|
|
199
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Path, { d: "M14 8C14 11.3137 11.3137 14 8 14C4.68629 14 2 11.3137 2 8C2 4.68629\n 4.68629 2 8 2C11.3137 2 14 4.68629 14 8ZM8 6.25C8.69036 6.25 9.25 5.69036\n 9.25 5C9.25 4.30964 8.69036 3.75 8 3.75C7.30964 3.75 6.75 4.30964 6.75\n 5C6.75 5.69036 7.30964 6.25 8 6.25ZM7 7.75V11.25C7 11.8023 7.44772 12.25\n 8 12.25C8.55228 12.25 9 11.8023 9 11.25V7.75C9 7.19772 8.55228 6.75 8\n 6.75C7.44772 6.75 7 7.19772 7 7.75Z" })
|
|
288
200
|
] });
|
|
289
201
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(IconBase, { viewBoxSize: size, size, currentColor: true, path: path2 });
|
|
290
202
|
}
|
|
291
|
-
var Path = import_styled_components4.default.path
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
203
|
+
var Path = import_styled_components4.default.path.withConfig({
|
|
204
|
+
componentId: "ccl__sc-1yb63qx-0"
|
|
205
|
+
})(["fill:", ";fill-rule:evenodd;"], ({
|
|
206
|
+
theme: theme2
|
|
207
|
+
}) => theme2.color.surface1);
|
|
295
208
|
|
|
296
209
|
// src/components/HintText/index.tsx
|
|
297
210
|
var import_utils2 = require("@charcoal-ui/utils");
|
|
298
211
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
299
|
-
function HintText({
|
|
212
|
+
function HintText({
|
|
213
|
+
children,
|
|
214
|
+
context,
|
|
215
|
+
className
|
|
216
|
+
}) {
|
|
300
217
|
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Container, { className, context, children: [
|
|
301
218
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(IconWrap, { children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(InfoIcon, {}) }),
|
|
302
219
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { children })
|
|
303
220
|
] });
|
|
304
221
|
}
|
|
305
|
-
var Container = import_styled_components5.default.div.attrs(
|
|
306
|
-
|
|
307
|
-
)
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
${(p) => theme((o) => [
|
|
317
|
-
o.padding.vertical(p.screen1.vertical),
|
|
318
|
-
o.padding.horizontal(p.screen1.horizontal)
|
|
319
|
-
])}
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
display: flex;
|
|
323
|
-
align-items: flex-start;
|
|
324
|
-
${(p) => p.context === "page" && import_styled_components5.css`
|
|
325
|
-
justify-content: center;
|
|
326
|
-
`}
|
|
327
|
-
`;
|
|
328
|
-
var IconWrap = import_styled_components5.default.div`
|
|
329
|
-
display: flex;
|
|
330
|
-
align-items: center;
|
|
331
|
-
color: ${(p) => p.theme.color.text4};
|
|
332
|
-
height: 22px;
|
|
333
|
-
margin: -4px 4px -4px 0;
|
|
334
|
-
`;
|
|
335
|
-
var Text = import_styled_components5.default.p`
|
|
336
|
-
${theme((o) => [o.font.text2, o.typography(14)])}
|
|
337
|
-
margin: 0;
|
|
338
|
-
`;
|
|
222
|
+
var Container = import_styled_components5.default.div.attrs(styledProps).withConfig({
|
|
223
|
+
componentId: "ccl__sc-nb0aj3-0"
|
|
224
|
+
})(["", " @media ", "{", "}display:flex;align-items:flex-start;", ""], (p) => theme((o) => [o.bg.surface3, o.borderRadius(8), o.padding.vertical(p.default.vertical), o.padding.horizontal(p.default.horizontal)]), ({
|
|
225
|
+
theme: t
|
|
226
|
+
}) => (0, import_utils2.maxWidth)(t.breakpoint.screen1), (p) => theme((o) => [o.padding.vertical(p.screen1.vertical), o.padding.horizontal(p.screen1.horizontal)]), (p) => p.context === "page" && (0, import_styled_components5.css)(["justify-content:center;"]));
|
|
227
|
+
var IconWrap = import_styled_components5.default.div.withConfig({
|
|
228
|
+
componentId: "ccl__sc-nb0aj3-1"
|
|
229
|
+
})(["display:flex;align-items:center;color:", ";height:22px;margin:-4px 4px -4px 0;"], (p) => p.theme.color.text4);
|
|
230
|
+
var Text = import_styled_components5.default.p.withConfig({
|
|
231
|
+
componentId: "ccl__sc-nb0aj3-2"
|
|
232
|
+
})(["", " margin:0;"], theme((o) => [o.font.text2, o.typography(14)]));
|
|
339
233
|
function styledProps(props) {
|
|
340
|
-
return {
|
|
234
|
+
return {
|
|
235
|
+
...props,
|
|
236
|
+
...contextToProps(props.context)
|
|
237
|
+
};
|
|
341
238
|
}
|
|
342
239
|
function contextToProps(context) {
|
|
343
240
|
switch (context) {
|
|
@@ -375,11 +272,7 @@ var import_styled_components7 = __toESM(require("styled-components"));
|
|
|
375
272
|
var import_foundation = require("@charcoal-ui/foundation");
|
|
376
273
|
var MAIN_COLUMN_HORIZONTAL_MIN_MARGIN = 72;
|
|
377
274
|
var RESPONSIVE_LEFT_WIDTH = (0, import_foundation.columnSystem)(2, import_foundation.COLUMN_UNIT, import_foundation.GUTTER_UNIT) + import_foundation.GUTTER_UNIT;
|
|
378
|
-
var RESPONSIVE_MAIN_MAX_WIDTH = (0, import_foundation.columnSystem)(
|
|
379
|
-
12,
|
|
380
|
-
import_foundation.COLUMN_UNIT,
|
|
381
|
-
import_foundation.GUTTER_UNIT
|
|
382
|
-
);
|
|
275
|
+
var RESPONSIVE_MAIN_MAX_WIDTH = (0, import_foundation.columnSystem)(12, import_foundation.COLUMN_UNIT, import_foundation.GUTTER_UNIT);
|
|
383
276
|
|
|
384
277
|
// src/foundation/hooks.ts
|
|
385
278
|
var import_react2 = require("react");
|
|
@@ -390,16 +283,13 @@ function useMediaScreen1() {
|
|
|
390
283
|
return useMedia((0, import_utils3.maxWidth)((0, import_styled_components6.useTheme)().breakpoint.screen1));
|
|
391
284
|
}
|
|
392
285
|
function useMedia(query) {
|
|
393
|
-
const matcher = (0, import_react2.useMemo)(
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
} : matchMedia(query),
|
|
401
|
-
[query]
|
|
402
|
-
);
|
|
286
|
+
const matcher = (0, import_react2.useMemo)(() => __TEST__ ? {
|
|
287
|
+
matches: false,
|
|
288
|
+
addListener: () => {
|
|
289
|
+
},
|
|
290
|
+
removeListener: () => {
|
|
291
|
+
}
|
|
292
|
+
} : matchMedia(query), [query]);
|
|
403
293
|
const [matches, setMatches] = (0, import_react2.useState)(matcher.matches);
|
|
404
294
|
if (matcher.matches !== matches) {
|
|
405
295
|
setMatches(matcher.matches);
|
|
@@ -427,18 +317,15 @@ function measure(ref) {
|
|
|
427
317
|
return ref !== null ? ref.getBoundingClientRect() : void 0;
|
|
428
318
|
}
|
|
429
319
|
function useElementSize(ref, deps = []) {
|
|
430
|
-
const [size3, setSize] = (0, import_react2.useReducer)(
|
|
431
|
-
(state
|
|
432
|
-
if (state === void 0 || next === void 0) {
|
|
433
|
-
return next;
|
|
434
|
-
}
|
|
435
|
-
if (state.height === next.height && state.width === next.width) {
|
|
436
|
-
return state;
|
|
437
|
-
}
|
|
320
|
+
const [size3, setSize] = (0, import_react2.useReducer)((state, next) => {
|
|
321
|
+
if (state === void 0 || next === void 0) {
|
|
438
322
|
return next;
|
|
439
|
-
}
|
|
440
|
-
|
|
441
|
-
|
|
323
|
+
}
|
|
324
|
+
if (state.height === next.height && state.width === next.width) {
|
|
325
|
+
return state;
|
|
326
|
+
}
|
|
327
|
+
return next;
|
|
328
|
+
}, void 0);
|
|
442
329
|
const [watch, setWatch] = (0, import_react2.useState)(null);
|
|
443
330
|
(0, import_react2.useLayoutEffect)(() => {
|
|
444
331
|
if (watch === null) {
|
|
@@ -522,149 +409,91 @@ function Layout({
|
|
|
522
409
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(GlobalStyle, {})
|
|
523
410
|
] });
|
|
524
411
|
}
|
|
525
|
-
var HeaderTopMenuContainer = import_styled_components7.default.div
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
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
|
-
grid-auto-rows: auto;
|
|
600
|
-
|
|
601
|
-
@media ${({ theme: theme2 }) => (0, import_utils4.maxWidth)(theme2.breakpoint.screen1)} {
|
|
602
|
-
gap: 0;
|
|
603
|
-
background-color: ${({ theme: theme2 }) => theme2.color.background1};
|
|
604
|
-
padding-bottom: 60px;
|
|
605
|
-
}
|
|
606
|
-
`;
|
|
607
|
-
var LayoutItem = React2.forwardRef(
|
|
608
|
-
function LayoutItem2({ span, children }, ref) {
|
|
609
|
-
const { withLeft } = (0, import_react3.useContext)(LayoutConfigContext);
|
|
610
|
-
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(StyledLayoutItem, { span, withLeft, ref, children });
|
|
611
|
-
}
|
|
612
|
-
);
|
|
613
|
-
var StyledLayoutItem = import_styled_components7.default.div`
|
|
614
|
-
grid-column-start: auto;
|
|
615
|
-
grid-column-end: span ${(p) => p.span};
|
|
616
|
-
border-radius: 24px;
|
|
617
|
-
color: ${({ theme: theme2 }) => theme2.color.text2};
|
|
618
|
-
background-color: ${({ theme: theme2 }) => theme2.color.background1};
|
|
619
|
-
/* https://www.w3.org/TR/css-grid-1/#min-size-auto */
|
|
620
|
-
min-width: 0;
|
|
621
|
-
|
|
622
|
-
@media ${(p) => p.withLeft ? p.theme.breakpoint.screen4 : p.theme.breakpoint.screen3} {
|
|
623
|
-
${(p) => p.span > 2 && import_styled_components7.css`
|
|
624
|
-
grid-column-end: span 2;
|
|
625
|
-
`}
|
|
626
|
-
}
|
|
627
|
-
|
|
628
|
-
@media ${({ theme: theme2 }) => (0, import_utils4.maxWidth)(theme2.breakpoint.screen1)} {
|
|
629
|
-
${(p) => p.span > 1 && import_styled_components7.css`
|
|
630
|
-
grid-column-end: span 1;
|
|
631
|
-
`}
|
|
632
|
-
|
|
633
|
-
border-radius: 0;
|
|
634
|
-
padding-bottom: 40px;
|
|
635
|
-
}
|
|
636
|
-
`;
|
|
637
|
-
function LayoutItemHeader({ children }) {
|
|
638
|
-
const { wide, center } = (0, import_react3.useContext)(LayoutConfigContext);
|
|
412
|
+
var HeaderTopMenuContainer = import_styled_components7.default.div.withConfig({
|
|
413
|
+
componentId: "ccl__sc-j6bt5m-0"
|
|
414
|
+
})(["margin-bottom:40px;overflow-x:auto;word-break:keep-all;@media ", "{margin-bottom:0;padding-left:16px;padding-bottom:16px;background-color:", ";}"], ({
|
|
415
|
+
theme: theme2
|
|
416
|
+
}) => (0, import_utils4.maxWidth)(theme2.breakpoint.screen1), ({
|
|
417
|
+
theme: theme2
|
|
418
|
+
}) => theme2.color.surface2);
|
|
419
|
+
var GlobalStyle = (0, import_styled_components7.createGlobalStyle)([":root{background-color:", ";@media ", "{background-color:", ";}}"], ({
|
|
420
|
+
theme: theme2
|
|
421
|
+
}) => theme2.color.background2, ({
|
|
422
|
+
theme: theme2
|
|
423
|
+
}) => (0, import_utils4.maxWidth)(theme2.breakpoint.screen1), ({
|
|
424
|
+
theme: theme2
|
|
425
|
+
}) => theme2.color.background1);
|
|
426
|
+
var LayoutRoot = import_styled_components7.default.div.withConfig({
|
|
427
|
+
componentId: "ccl__sc-j6bt5m-1"
|
|
428
|
+
})(["display:flex;background-color:", ";@media ", "{background-color:", ";}"], ({
|
|
429
|
+
theme: theme2
|
|
430
|
+
}) => theme2.color.background2, ({
|
|
431
|
+
theme: theme2
|
|
432
|
+
}) => (0, import_utils4.maxWidth)(theme2.breakpoint.screen1), ({
|
|
433
|
+
theme: theme2
|
|
434
|
+
}) => theme2.color.background1);
|
|
435
|
+
var LeftArea = import_styled_components7.default.div.withConfig({
|
|
436
|
+
componentId: "ccl__sc-j6bt5m-2"
|
|
437
|
+
})(["min-width:", "px;padding:40px 0 40px ", "px;box-sizing:border-box;@media ", "{display:none;}"], RESPONSIVE_LEFT_WIDTH, import_foundation2.GUTTER_UNIT, ({
|
|
438
|
+
theme: theme2
|
|
439
|
+
}) => theme2.breakpoint.screen3);
|
|
440
|
+
var MainArea = import_styled_components7.default.div.withConfig({
|
|
441
|
+
componentId: "ccl__sc-j6bt5m-3"
|
|
442
|
+
})(["flex-grow:1;min-width:0;max-width:", "px;padding:40px ", "px;margin:0 auto;display:flex;flex-direction:column;@media ", "{padding:0;}"], (p) => p.center ? (0, import_foundation2.columnSystem)(6, import_foundation2.COLUMN_UNIT, import_foundation2.GUTTER_UNIT) : RESPONSIVE_MAIN_MAX_WIDTH, MAIN_COLUMN_HORIZONTAL_MIN_MARGIN, ({
|
|
443
|
+
theme: theme2
|
|
444
|
+
}) => (0, import_utils4.maxWidth)(theme2.breakpoint.screen1));
|
|
445
|
+
var Header = import_styled_components7.default.div.withConfig({
|
|
446
|
+
componentId: "ccl__sc-j6bt5m-4"
|
|
447
|
+
})(["font-weight:bold;margin-bottom:12px;font-size:20px;line-height:28px;color:", ";@media ", "{margin-bottom:0;padding:12px;font-size:16px;line-height:24px;display:flex;justify-content:center;background-color:", ";}"], ({
|
|
448
|
+
theme: theme2
|
|
449
|
+
}) => theme2.color.text2, ({
|
|
450
|
+
theme: theme2
|
|
451
|
+
}) => (0, import_utils4.maxWidth)(theme2.breakpoint.screen1), ({
|
|
452
|
+
theme: theme2
|
|
453
|
+
}) => theme2.color.surface2);
|
|
454
|
+
var Grid = import_styled_components7.default.div.withConfig({
|
|
455
|
+
componentId: "ccl__sc-j6bt5m-5"
|
|
456
|
+
})(["display:grid;gap:", "px;grid-template-columns:1fr;grid-auto-columns:1fr;grid-auto-rows:auto;@media ", "{gap:0;background-color:", ";padding-bottom:60px;}"], import_foundation2.GUTTER_UNIT, ({
|
|
457
|
+
theme: theme2
|
|
458
|
+
}) => (0, import_utils4.maxWidth)(theme2.breakpoint.screen1), ({
|
|
459
|
+
theme: theme2
|
|
460
|
+
}) => theme2.color.background1);
|
|
461
|
+
var LayoutItem = React2.forwardRef(function LayoutItem2({
|
|
462
|
+
span,
|
|
463
|
+
children
|
|
464
|
+
}, ref) {
|
|
465
|
+
const {
|
|
466
|
+
withLeft
|
|
467
|
+
} = (0, import_react3.useContext)(LayoutConfigContext);
|
|
468
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(StyledLayoutItem, { span, withLeft, ref, children });
|
|
469
|
+
});
|
|
470
|
+
var StyledLayoutItem = import_styled_components7.default.div.withConfig({
|
|
471
|
+
componentId: "ccl__sc-j6bt5m-6"
|
|
472
|
+
})(["grid-column-start:auto;grid-column-end:span ", ";border-radius:24px;color:", ";background-color:", ";min-width:0;@media ", "{", "}@media ", "{", " border-radius:0;padding-bottom:40px;}"], (p) => p.span, ({
|
|
473
|
+
theme: theme2
|
|
474
|
+
}) => theme2.color.text2, ({
|
|
475
|
+
theme: theme2
|
|
476
|
+
}) => theme2.color.background1, (p) => p.withLeft ? p.theme.breakpoint.screen4 : p.theme.breakpoint.screen3, (p) => p.span > 2 && (0, import_styled_components7.css)(["grid-column-end:span 2;"]), ({
|
|
477
|
+
theme: theme2
|
|
478
|
+
}) => (0, import_utils4.maxWidth)(theme2.breakpoint.screen1), (p) => p.span > 1 && (0, import_styled_components7.css)(["grid-column-end:span 1;"]));
|
|
479
|
+
function LayoutItemHeader({
|
|
480
|
+
children
|
|
481
|
+
}) {
|
|
482
|
+
const {
|
|
483
|
+
wide,
|
|
484
|
+
center
|
|
485
|
+
} = (0, import_react3.useContext)(LayoutConfigContext);
|
|
639
486
|
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(StyledLayoutItemHeader, { wide, center, children });
|
|
640
487
|
}
|
|
641
|
-
var StyledLayoutItemHeader = import_styled_components7.default.div
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
color: ${({ theme: theme2 }) => theme2.color.text2};
|
|
651
|
-
border-radius: 24px 24px 0 0;
|
|
652
|
-
${(p) => p.center && import_styled_components7.css`
|
|
653
|
-
justify-content: center;
|
|
654
|
-
`}
|
|
655
|
-
|
|
656
|
-
@media ${({ theme: theme2 }) => (0, import_utils4.maxWidth)(theme2.breakpoint.screen1)} {
|
|
657
|
-
margin-top: 4px;
|
|
658
|
-
padding: 0 16px;
|
|
659
|
-
background: none;
|
|
660
|
-
overflow-x: auto;
|
|
661
|
-
border-radius: unset;
|
|
662
|
-
${(p) => p.wide && import_styled_components7.css`
|
|
663
|
-
height: 48px;
|
|
664
|
-
margin-top: 0;
|
|
665
|
-
`}
|
|
666
|
-
}
|
|
667
|
-
`;
|
|
488
|
+
var StyledLayoutItemHeader = import_styled_components7.default.div.withConfig({
|
|
489
|
+
componentId: "ccl__sc-j6bt5m-7"
|
|
490
|
+
})(["padding:0 ", "px;height:", "px;display:grid;align-items:center;font-size:16px;line-height:24px;font-weight:bold;background-color:", ";color:", ";border-radius:24px 24px 0 0;", " @media ", "{margin-top:4px;padding:0 16px;background:none;overflow-x:auto;border-radius:unset;", "}"], (p) => p.wide ? 40 : 24, (p) => p.wide ? 64 : 48, ({
|
|
491
|
+
theme: theme2
|
|
492
|
+
}) => theme2.color.surface2, ({
|
|
493
|
+
theme: theme2
|
|
494
|
+
}) => theme2.color.text2, (p) => p.center && (0, import_styled_components7.css)(["justify-content:center;"]), ({
|
|
495
|
+
theme: theme2
|
|
496
|
+
}) => (0, import_utils4.maxWidth)(theme2.breakpoint.screen1), (p) => p.wide && (0, import_styled_components7.css)(["height:48px;margin-top:0;"]));
|
|
668
497
|
var LAYOUT_ITEM_BODY_PADDING = {
|
|
669
498
|
wide: {
|
|
670
499
|
x: 40,
|
|
@@ -694,39 +523,41 @@ function LayoutItemBody({
|
|
|
694
523
|
horizontal = false,
|
|
695
524
|
narrow = false
|
|
696
525
|
}) {
|
|
697
|
-
const {
|
|
526
|
+
const {
|
|
527
|
+
wide
|
|
528
|
+
} = (0, import_react3.useContext)(LayoutConfigContext);
|
|
698
529
|
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(StyledLayoutItemBody, { wide, horizontal, narrow, children });
|
|
699
530
|
}
|
|
700
|
-
var StyledLayoutItemBody = import_styled_components7.default.div
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
}
|
|
706
|
-
|
|
707
|
-
width: 100%;
|
|
708
|
-
box-sizing: border-box;
|
|
709
|
-
`;
|
|
531
|
+
var StyledLayoutItemBody = import_styled_components7.default.div.withConfig({
|
|
532
|
+
componentId: "ccl__sc-j6bt5m-8"
|
|
533
|
+
})(["padding:", ";@media ", "{padding:", ";}width:100%;box-sizing:border-box;"], (p) => p.narrow ? `${LAYOUT_ITEM_BODY_PADDING.narrow.yTop}px ${p.horizontal ? 0 : LAYOUT_ITEM_BODY_PADDING.narrow.x}px ${LAYOUT_ITEM_BODY_PADDING.narrow.yBottom}px` : p.wide ? `${p.horizontal ? 0 : LAYOUT_ITEM_BODY_PADDING.wide.y}px ${LAYOUT_ITEM_BODY_PADDING.wide.x}px` : `${p.horizontal ? 0 : LAYOUT_ITEM_BODY_PADDING.default.y}px ${LAYOUT_ITEM_BODY_PADDING.default.x}px`, ({
|
|
534
|
+
theme: theme2
|
|
535
|
+
}) => (0, import_utils4.maxWidth)(theme2.breakpoint.screen1), (p) => p.narrow ? `${LAYOUT_ITEM_BODY_PADDING.narrowColumn1.yTop}px ${p.horizontal ? 0 : LAYOUT_ITEM_BODY_PADDING.narrowColumn1.x}px ${LAYOUT_ITEM_BODY_PADDING.narrowColumn1.yBottom}px` : `${LAYOUT_ITEM_BODY_PADDING.column1.y}px ${LAYOUT_ITEM_BODY_PADDING.column1.x}px ${0}`);
|
|
710
536
|
function useLayoutItemBodyPadding() {
|
|
711
|
-
const {
|
|
537
|
+
const {
|
|
538
|
+
wide
|
|
539
|
+
} = (0, import_react3.useContext)(LayoutConfigContext);
|
|
712
540
|
return useMediaScreen1() ? LAYOUT_ITEM_BODY_PADDING.column1 : wide ? LAYOUT_ITEM_BODY_PADDING.wide : LAYOUT_ITEM_BODY_PADDING.default;
|
|
713
541
|
}
|
|
714
542
|
function CancelLayoutItemBodyPadding({
|
|
715
543
|
children,
|
|
716
544
|
cancelTop
|
|
717
545
|
}) {
|
|
718
|
-
const {
|
|
546
|
+
const {
|
|
547
|
+
wide
|
|
548
|
+
} = (0, import_react3.useContext)(LayoutConfigContext);
|
|
719
549
|
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(StyledCancelLayoutItemBodyPadding, { wide, cancelTop, children });
|
|
720
550
|
}
|
|
721
|
-
var StyledCancelLayoutItemBodyPadding = import_styled_components7.default.div
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
551
|
+
var StyledCancelLayoutItemBodyPadding = import_styled_components7.default.div.withConfig({
|
|
552
|
+
componentId: "ccl__sc-j6bt5m-9"
|
|
553
|
+
})(["margin:0 -", "px;margin-top:-", "px;@media ", "{margin:0 -", "px;margin-top:-", "px;}"], (p) => p.wide ? LAYOUT_ITEM_BODY_PADDING.wide.x : LAYOUT_ITEM_BODY_PADDING.default.x, ({
|
|
554
|
+
cancelTop = false,
|
|
555
|
+
wide
|
|
556
|
+
}) => !cancelTop ? 0 : wide ? LAYOUT_ITEM_BODY_PADDING.wide.y : LAYOUT_ITEM_BODY_PADDING.default.y, ({
|
|
557
|
+
theme: theme2
|
|
558
|
+
}) => (0, import_utils4.maxWidth)(theme2.breakpoint.screen1), LAYOUT_ITEM_BODY_PADDING.column1.x, ({
|
|
559
|
+
cancelTop = false
|
|
560
|
+
}) => !cancelTop ? 0 : LAYOUT_ITEM_BODY_PADDING.column1.x);
|
|
730
561
|
|
|
731
562
|
// src/components/LeftMenu/index.tsx
|
|
732
563
|
var import_styled_components10 = __toESM(require("styled-components"));
|
|
@@ -755,50 +586,39 @@ var onlyText = (children) => {
|
|
|
755
586
|
if (!Array.isArray(children) && !(0, import_react4.isValidElement)(children)) {
|
|
756
587
|
return childToString(children);
|
|
757
588
|
}
|
|
758
|
-
return import_react4.Children.toArray(children).reduce(
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
},
|
|
770
|
-
""
|
|
771
|
-
);
|
|
589
|
+
return import_react4.Children.toArray(children).reduce((text, child) => {
|
|
590
|
+
let newText = "";
|
|
591
|
+
if ((0, import_react4.isValidElement)(child) && hasChildren(child)) {
|
|
592
|
+
newText = onlyText(child.props.children);
|
|
593
|
+
} else if ((0, import_react4.isValidElement)(child) && !hasChildren(child)) {
|
|
594
|
+
newText = "";
|
|
595
|
+
} else {
|
|
596
|
+
newText = childToString(child);
|
|
597
|
+
}
|
|
598
|
+
return text.concat(newText);
|
|
599
|
+
}, "");
|
|
772
600
|
};
|
|
773
601
|
|
|
774
602
|
// src/components/TextEllipsis/index.tsx
|
|
775
|
-
var TextEllipsis = import_styled_components8.default.div.attrs(
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
text-overflow: ellipsis;
|
|
787
|
-
white-space: nowrap;
|
|
788
|
-
` : import_styled_components8.css`
|
|
789
|
-
display: -webkit-box;
|
|
790
|
-
-webkit-box-orient: vertical;
|
|
791
|
-
-webkit-line-clamp: ${lineLimit};
|
|
792
|
-
/* Fallback for -webkit-line-clamp */
|
|
793
|
-
max-height: ${lineHeight * lineLimit}px;
|
|
794
|
-
`}
|
|
795
|
-
`;
|
|
603
|
+
var TextEllipsis = import_styled_components8.default.div.attrs(({
|
|
604
|
+
children,
|
|
605
|
+
title = onlyText(children)
|
|
606
|
+
}) => ({
|
|
607
|
+
title: title !== "" ? title : void 0
|
|
608
|
+
})).withConfig({
|
|
609
|
+
componentId: "ccl__sc-1pyqrbe-0"
|
|
610
|
+
})(["overflow:hidden;line-height:", "px;overflow-wrap:break-word;", ""], (props) => props.lineHeight, ({
|
|
611
|
+
lineLimit = 1,
|
|
612
|
+
lineHeight
|
|
613
|
+
}) => lineLimit === 1 ? (0, import_styled_components8.css)(["text-overflow:ellipsis;white-space:nowrap;"]) : (0, import_styled_components8.css)(["display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:", ";max-height:", "px;"], lineLimit, lineHeight * lineLimit));
|
|
796
614
|
|
|
797
615
|
// src/components/MenuListItem/index.tsx
|
|
798
616
|
var import_react6 = require("@charcoal-ui/react");
|
|
799
617
|
var import_utils5 = require("@charcoal-ui/utils");
|
|
800
618
|
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
801
|
-
var MenuListItemContext = React3.createContext({
|
|
619
|
+
var MenuListItemContext = React3.createContext({
|
|
620
|
+
padding: 24
|
|
621
|
+
});
|
|
802
622
|
function MenuListItem({
|
|
803
623
|
primary,
|
|
804
624
|
secondary,
|
|
@@ -808,70 +628,31 @@ function MenuListItem({
|
|
|
808
628
|
gtmClass,
|
|
809
629
|
children
|
|
810
630
|
}) {
|
|
811
|
-
const {
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
role: onClick !== void 0 ? "button" : void 0,
|
|
822
|
-
className: gtmClass !== void 0 ? `gtm-${gtmClass}` : void 0,
|
|
823
|
-
children: [
|
|
824
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Labels, { children: [
|
|
825
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PrimaryText, { children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(TextEllipsis, { lineHeight: 22, lineLimit: 1, children: primary }) }),
|
|
826
|
-
secondary !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SecondaryText, { children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(TextEllipsis, { lineHeight: 22, lineLimit: 1, children: secondary }) })
|
|
827
|
-
] }),
|
|
828
|
-
children
|
|
829
|
-
]
|
|
830
|
-
}
|
|
831
|
-
);
|
|
631
|
+
const {
|
|
632
|
+
padding
|
|
633
|
+
} = (0, import_react5.useContext)(MenuListItemContext);
|
|
634
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Item, { hasSubLabel: secondary !== void 0, onClick: (e) => !disabled && onClick && onClick(e), sidePadding: padding, noHover, noClick: onClick === void 0, "aria-disabled": disabled, role: onClick !== void 0 ? "button" : void 0, className: gtmClass !== void 0 ? `gtm-${gtmClass}` : void 0, children: [
|
|
635
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Labels, { children: [
|
|
636
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PrimaryText, { children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(TextEllipsis, { lineHeight: 22, lineLimit: 1, children: primary }) }),
|
|
637
|
+
secondary !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SecondaryText, { children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(TextEllipsis, { lineHeight: 22, lineLimit: 1, children: secondary }) })
|
|
638
|
+
] }),
|
|
639
|
+
children
|
|
640
|
+
] });
|
|
832
641
|
}
|
|
833
|
-
var Item = import_styled_components9.default.div
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
}
|
|
848
|
-
|
|
849
|
-
${theme((o) => o.disabled)}
|
|
850
|
-
|
|
851
|
-
${import_utils5.disabledSelector} {
|
|
852
|
-
cursor: default;
|
|
853
|
-
pointer-events: none;
|
|
854
|
-
|
|
855
|
-
&:hover {
|
|
856
|
-
background-color: unset;
|
|
857
|
-
}
|
|
858
|
-
}
|
|
859
|
-
`;
|
|
860
|
-
var Labels = import_styled_components9.default.div`
|
|
861
|
-
display: flex;
|
|
862
|
-
flex-direction: column;
|
|
863
|
-
`;
|
|
864
|
-
var PrimaryText = import_styled_components9.default.div`
|
|
865
|
-
color: ${(p) => p.theme.color.text2};
|
|
866
|
-
line-height: 22px;
|
|
867
|
-
font-size: 14px;
|
|
868
|
-
display: grid;
|
|
869
|
-
`;
|
|
870
|
-
var SecondaryText = import_styled_components9.default.div`
|
|
871
|
-
color: ${(p) => p.theme.color.text3};
|
|
872
|
-
line-height: 18px;
|
|
873
|
-
font-size: 10px;
|
|
874
|
-
`;
|
|
642
|
+
var Item = import_styled_components9.default.div.withConfig({
|
|
643
|
+
componentId: "ccl__sc-1sufjh-0"
|
|
644
|
+
})(["display:flex;height:", "px;align-items:center;justify-content:space-between;padding:0 ", "px;user-select:none;cursor:", ";transition:0.2s background-color;&:hover{", "}", " ", "{cursor:default;pointer-events:none;&:hover{background-color:unset;}}"], (p) => p.hasSubLabel ? 56 : 40, (p) => p.sidePadding, (p) => p.noClick ? "default" : "pointer", (p) => !p.noHover && (0, import_styled_components9.css)(["background-color:", ";"], ({
|
|
645
|
+
theme: theme2
|
|
646
|
+
}) => theme2.color.surface3), theme((o) => o.disabled), import_utils5.disabledSelector);
|
|
647
|
+
var Labels = import_styled_components9.default.div.withConfig({
|
|
648
|
+
componentId: "ccl__sc-1sufjh-1"
|
|
649
|
+
})(["display:flex;flex-direction:column;"]);
|
|
650
|
+
var PrimaryText = import_styled_components9.default.div.withConfig({
|
|
651
|
+
componentId: "ccl__sc-1sufjh-2"
|
|
652
|
+
})(["color:", ";line-height:22px;font-size:14px;display:grid;"], (p) => p.theme.color.text2);
|
|
653
|
+
var SecondaryText = import_styled_components9.default.div.withConfig({
|
|
654
|
+
componentId: "ccl__sc-1sufjh-3"
|
|
655
|
+
})(["color:", ";line-height:18px;font-size:10px;"], (p) => p.theme.color.text3);
|
|
875
656
|
function MenuListLinkItem({
|
|
876
657
|
link,
|
|
877
658
|
onClick,
|
|
@@ -883,7 +664,9 @@ function MenuListLinkItem({
|
|
|
883
664
|
children,
|
|
884
665
|
...linkProps
|
|
885
666
|
}) {
|
|
886
|
-
const {
|
|
667
|
+
const {
|
|
668
|
+
Link
|
|
669
|
+
} = (0, import_react6.useComponentAbstraction)();
|
|
887
670
|
const props = {
|
|
888
671
|
disabled,
|
|
889
672
|
primary,
|
|
@@ -894,9 +677,9 @@ function MenuListLinkItem({
|
|
|
894
677
|
};
|
|
895
678
|
return disabled ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { onClick, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(MenuListItem, { ...props }) }) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(A, { as: Link, to: link, onClick, ...linkProps, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(MenuListItem, { onClick: () => void 0, ...props }) });
|
|
896
679
|
}
|
|
897
|
-
var A = import_styled_components9.default.a
|
|
898
|
-
|
|
899
|
-
|
|
680
|
+
var A = import_styled_components9.default.a.withConfig({
|
|
681
|
+
componentId: "ccl__sc-1sufjh-4"
|
|
682
|
+
})(["display:block;"]);
|
|
900
683
|
function MenuListLinkItemWithIcon({
|
|
901
684
|
icon,
|
|
902
685
|
primary: text,
|
|
@@ -919,27 +702,22 @@ function MenuListItemWithIcon({
|
|
|
919
702
|
] });
|
|
920
703
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(MenuListItem, { primary, ...props });
|
|
921
704
|
}
|
|
922
|
-
var IconContainer = import_styled_components9.default.div
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
line-height: 16px;
|
|
939
|
-
color: ${({ theme: theme2 }) => theme2.color.text3};
|
|
940
|
-
margin-top: -2px;
|
|
941
|
-
margin-bottom: 6px;
|
|
942
|
-
`;
|
|
705
|
+
var IconContainer = import_styled_components9.default.div.withConfig({
|
|
706
|
+
componentId: "ccl__sc-1sufjh-5"
|
|
707
|
+
})(["display:grid;gap:8px;grid-auto-flow:column;align-items:center;"]);
|
|
708
|
+
var Icon2 = import_styled_components9.default.div.withConfig({
|
|
709
|
+
componentId: "ccl__sc-1sufjh-6"
|
|
710
|
+
})(["color:", ";display:flex;"], ({
|
|
711
|
+
theme: theme2
|
|
712
|
+
}) => theme2.color.text3);
|
|
713
|
+
var MenuListSpacer = import_styled_components9.default.div.withConfig({
|
|
714
|
+
componentId: "ccl__sc-1sufjh-7"
|
|
715
|
+
})(["height:24px;"]);
|
|
716
|
+
var MenuListLabel = import_styled_components9.default.div.withConfig({
|
|
717
|
+
componentId: "ccl__sc-1sufjh-8"
|
|
718
|
+
})(["padding:0 16px;font-size:12px;line-height:16px;color:", ";margin-top:-2px;margin-bottom:6px;"], ({
|
|
719
|
+
theme: theme2
|
|
720
|
+
}) => theme2.color.text3);
|
|
943
721
|
|
|
944
722
|
// src/components/LeftMenu/index.tsx
|
|
945
723
|
var import_react7 = require("@charcoal-ui/react");
|
|
@@ -948,37 +726,30 @@ function LeftMenu({
|
|
|
948
726
|
links,
|
|
949
727
|
active
|
|
950
728
|
}) {
|
|
951
|
-
const {
|
|
729
|
+
const {
|
|
730
|
+
Link
|
|
731
|
+
} = (0, import_react7.useComponentAbstraction)();
|
|
952
732
|
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Container2, { children: links.map((link, index) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Link, { to: link.to, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(LinkItem, { "aria-current": link.id === active || void 0, children: link.text }) }, index)) });
|
|
953
733
|
}
|
|
954
|
-
function LeftMenuContent({
|
|
734
|
+
function LeftMenuContent({
|
|
735
|
+
links
|
|
736
|
+
}) {
|
|
955
737
|
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_jsx_runtime7.Fragment, { children: links.map((link, index) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(MenuListLinkItem, { link: link.to, primary: link.text }, index)) });
|
|
956
738
|
}
|
|
957
|
-
var Container2 = import_styled_components10.default.div
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
height: 40px;
|
|
972
|
-
transition: 0.2s color;
|
|
973
|
-
&:hover {
|
|
974
|
-
transition: 0.2s color;
|
|
975
|
-
color: ${({ theme: theme2 }) => theme2.color.text2};
|
|
976
|
-
}
|
|
977
|
-
&[aria-current] {
|
|
978
|
-
color: ${({ theme: theme2 }) => theme2.color.text2};
|
|
979
|
-
background-color: ${({ theme: theme2 }) => theme2.color.surface3};
|
|
980
|
-
}
|
|
981
|
-
`;
|
|
739
|
+
var Container2 = import_styled_components10.default.div.withConfig({
|
|
740
|
+
componentId: "ccl__sc-t7vwxn-0"
|
|
741
|
+
})(["display:flex;flex-direction:column;align-items:flex-start;"]);
|
|
742
|
+
var LinkItem = import_styled_components10.default.div.withConfig({
|
|
743
|
+
componentId: "ccl__sc-t7vwxn-1"
|
|
744
|
+
})(["display:flex;align-items:center;color:", ";border-radius:24px;font-weight:bold;font-size:14px;line-height:22px;padding:0 16px;height:40px;transition:0.2s color;&:hover{transition:0.2s color;color:", ";}&[aria-current]{color:", ";background-color:", ";}"], ({
|
|
745
|
+
theme: theme2
|
|
746
|
+
}) => theme2.color.text3, ({
|
|
747
|
+
theme: theme2
|
|
748
|
+
}) => theme2.color.text2, ({
|
|
749
|
+
theme: theme2
|
|
750
|
+
}) => theme2.color.text2, ({
|
|
751
|
+
theme: theme2
|
|
752
|
+
}) => theme2.color.surface3);
|
|
982
753
|
|
|
983
754
|
// src/components/SwitchCheckbox/index.tsx
|
|
984
755
|
var React4 = __toESM(require("react"));
|
|
@@ -993,116 +764,48 @@ var SwitchCheckbox_default = React4.forwardRef(function SwitchCheckbox({
|
|
|
993
764
|
disabled,
|
|
994
765
|
...props
|
|
995
766
|
}, ref) {
|
|
996
|
-
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
children: [
|
|
1004
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(SwitchOuter, { children: [
|
|
1005
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SwitchInput, { ...props, disabled, ref }),
|
|
1006
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SwitchInner, { children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SwitchInnerKnob, {}) })
|
|
1007
|
-
] }),
|
|
1008
|
-
children != null && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Children2, { rowReverse, children })
|
|
1009
|
-
]
|
|
1010
|
-
}
|
|
1011
|
-
);
|
|
767
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(Label, { className: gtmClass !== void 0 ? `gtm-${gtmClass}` : "", flex, rowReverse, "aria-disabled": disabled, children: [
|
|
768
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(SwitchOuter, { children: [
|
|
769
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SwitchInput, { ...props, disabled, ref }),
|
|
770
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SwitchInner, { children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SwitchInnerKnob, {}) })
|
|
771
|
+
] }),
|
|
772
|
+
children != null && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Children2, { rowReverse, children })
|
|
773
|
+
] });
|
|
1012
774
|
});
|
|
1013
|
-
var Children2 = import_styled_components11.default.span
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
`;
|
|
1037
|
-
var SwitchOuter = import_styled_components11.default.span`
|
|
1038
|
-
display: inline-flex;
|
|
1039
|
-
position: relative;
|
|
1040
|
-
z-index: 0;
|
|
1041
|
-
`;
|
|
1042
|
-
var SwitchInner = import_styled_components11.default.div`
|
|
1043
|
-
position: relative;
|
|
1044
|
-
box-sizing: border-box;
|
|
1045
|
-
width: 28px;
|
|
1046
|
-
height: 16px;
|
|
1047
|
-
border-radius: 16px;
|
|
1048
|
-
border: 2px solid transparent;
|
|
1049
|
-
background: ${({ theme: theme2 }) => theme2.color.text4};
|
|
1050
|
-
transition: box-shadow 0.2s, background-color 0.2s;
|
|
1051
|
-
`;
|
|
1052
|
-
var SwitchInnerKnob = import_styled_components11.default.div`
|
|
1053
|
-
position: absolute;
|
|
1054
|
-
display: block;
|
|
1055
|
-
top: 0;
|
|
1056
|
-
left: 0;
|
|
1057
|
-
width: 12px;
|
|
1058
|
-
height: 12px;
|
|
1059
|
-
background-color: ${({ theme: theme2 }) => theme2.color.text5};
|
|
1060
|
-
border-radius: 50%;
|
|
1061
|
-
transform: translateX(0);
|
|
1062
|
-
transition: transform 0.2s;
|
|
1063
|
-
`;
|
|
775
|
+
var Children2 = import_styled_components11.default.span.withConfig({
|
|
776
|
+
componentId: "ccl__sc-vg0z5k-0"
|
|
777
|
+
})(["", ""], (p) => p.rowReverse ? (0, import_styled_components11.css)(["margin-right:8px;"]) : (0, import_styled_components11.css)(["margin-left:8px;"]));
|
|
778
|
+
var Label = import_styled_components11.default.label.withConfig({
|
|
779
|
+
componentId: "ccl__sc-vg0z5k-1"
|
|
780
|
+
})(["display:inline-flex;align-items:center;", " ", " cursor:pointer;outline:0;&[aria-disabled='true']{cursor:auto;}"], ({
|
|
781
|
+
flex
|
|
782
|
+
}) => flex && (0, import_styled_components11.css)(["display:flex;justify-content:space-between;"]), ({
|
|
783
|
+
rowReverse
|
|
784
|
+
}) => (0, import_styled_components11.css)(["flex-direction:", ";"], rowReverse ? "row-reverse" : "row"));
|
|
785
|
+
var SwitchOuter = import_styled_components11.default.span.withConfig({
|
|
786
|
+
componentId: "ccl__sc-vg0z5k-2"
|
|
787
|
+
})(["display:inline-flex;position:relative;z-index:0;"]);
|
|
788
|
+
var SwitchInner = import_styled_components11.default.div.withConfig({
|
|
789
|
+
componentId: "ccl__sc-vg0z5k-3"
|
|
790
|
+
})(["position:relative;box-sizing:border-box;width:28px;height:16px;border-radius:16px;border:2px solid transparent;background:", ";transition:box-shadow 0.2s,background-color 0.2s;"], ({
|
|
791
|
+
theme: theme2
|
|
792
|
+
}) => theme2.color.text4);
|
|
793
|
+
var SwitchInnerKnob = import_styled_components11.default.div.withConfig({
|
|
794
|
+
componentId: "ccl__sc-vg0z5k-4"
|
|
795
|
+
})(["position:absolute;display:block;top:0;left:0;width:12px;height:12px;background-color:", ";border-radius:50%;transform:translateX(0);transition:transform 0.2s;"], ({
|
|
796
|
+
theme: theme2
|
|
797
|
+
}) => theme2.color.text5);
|
|
1064
798
|
var SwitchInput = import_styled_components11.default.input.attrs({
|
|
1065
799
|
type: "checkbox"
|
|
1066
|
-
})
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
border-radius: 16px;
|
|
1076
|
-
opacity: 0;
|
|
1077
|
-
appearance: none;
|
|
1078
|
-
outline: none;
|
|
1079
|
-
cursor: pointer;
|
|
1080
|
-
|
|
1081
|
-
&:checked {
|
|
1082
|
-
~ ${SwitchInner} {
|
|
1083
|
-
background-color: ${({ theme: theme2 }) => theme2.color.brand};
|
|
1084
|
-
|
|
1085
|
-
${SwitchInnerKnob} {
|
|
1086
|
-
transform: translateX(12px);
|
|
1087
|
-
}
|
|
1088
|
-
}
|
|
1089
|
-
}
|
|
1090
|
-
|
|
1091
|
-
&:disabled {
|
|
1092
|
-
cursor: auto;
|
|
1093
|
-
|
|
1094
|
-
~ ${SwitchInner} {
|
|
1095
|
-
opacity: ${({ theme: theme2 }) => theme2.elementEffect.disabled.opacity};
|
|
1096
|
-
}
|
|
1097
|
-
}
|
|
1098
|
-
|
|
1099
|
-
&:not(:disabled):focus {
|
|
1100
|
-
~ ${SwitchInner} {
|
|
1101
|
-
box-shadow: 0 0 0 4px
|
|
1102
|
-
${({ theme: theme2 }) => (0, import_utils6.applyEffect)(theme2.color.brand, theme2.elementEffect.disabled)};
|
|
1103
|
-
}
|
|
1104
|
-
}
|
|
1105
|
-
`;
|
|
800
|
+
}).withConfig({
|
|
801
|
+
componentId: "ccl__sc-vg0z5k-5"
|
|
802
|
+
})(["position:absolute;z-index:1;top:0;left:0;width:100%;height:100%;border-radius:16px;opacity:0;appearance:none;outline:none;cursor:pointer;&:checked{~ ", "{background-color:", ";", "{transform:translateX(12px);}}}&:disabled{cursor:auto;~ ", "{opacity:", ";}}&:not(:disabled):focus{~ ", "{box-shadow:0 0 0 4px ", ";}}"], SwitchInner, ({
|
|
803
|
+
theme: theme2
|
|
804
|
+
}) => theme2.color.brand, SwitchInnerKnob, SwitchInner, ({
|
|
805
|
+
theme: theme2
|
|
806
|
+
}) => theme2.elementEffect.disabled.opacity, SwitchInner, ({
|
|
807
|
+
theme: theme2
|
|
808
|
+
}) => (0, import_utils6.applyEffect)(theme2.color.brand, theme2.elementEffect.disabled));
|
|
1106
809
|
|
|
1107
810
|
// src/components/WithIcon/index.tsx
|
|
1108
811
|
var import_react8 = require("react");
|
|
@@ -1125,18 +828,12 @@ var WithIcon_default = React5.memo(function WithIcon({
|
|
|
1125
828
|
!pre && node
|
|
1126
829
|
] });
|
|
1127
830
|
});
|
|
1128
|
-
var Root = import_styled_components12.default.div
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
min-width: 0;
|
|
1135
|
-
overflow: hidden;
|
|
1136
|
-
`}
|
|
1137
|
-
white-space: nowrap;
|
|
1138
|
-
text-overflow: ellipsis;
|
|
1139
|
-
`;
|
|
831
|
+
var Root = import_styled_components12.default.div.withConfig({
|
|
832
|
+
componentId: "ccl__sc-12w6fz6-0"
|
|
833
|
+
})(["display:flex;align-items:center;"]);
|
|
834
|
+
var Text2 = import_styled_components12.default.div.withConfig({
|
|
835
|
+
componentId: "ccl__sc-12w6fz6-1"
|
|
836
|
+
})(["", " white-space:nowrap;text-overflow:ellipsis;"], (p) => !p.fixed && (0, import_styled_components12.css)(["min-width:0;overflow:hidden;"]));
|
|
1140
837
|
function AutoWidthIconAnchor({
|
|
1141
838
|
children,
|
|
1142
839
|
show,
|
|
@@ -1146,51 +843,20 @@ function AutoWidthIconAnchor({
|
|
|
1146
843
|
const width = useElementSize(ref, [null])?.width ?? 0;
|
|
1147
844
|
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(IconAnchor, { width, show, pre, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Icon3, { ref, children }) });
|
|
1148
845
|
}
|
|
1149
|
-
var forceCenteringCss = import_styled_components12.css
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
var
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
margin-left: 4px;
|
|
1164
|
-
`}
|
|
1165
|
-
`;
|
|
1166
|
-
var IconAnchorNaive = import_styled_components12.default.div`
|
|
1167
|
-
display: flex;
|
|
1168
|
-
align-items: center;
|
|
1169
|
-
|
|
1170
|
-
${iconAnchorCss}
|
|
1171
|
-
`;
|
|
1172
|
-
var IconNaive = import_styled_components12.default.div`
|
|
1173
|
-
display: inline-flex;
|
|
1174
|
-
|
|
1175
|
-
${forceCenteringCss}
|
|
1176
|
-
`;
|
|
1177
|
-
var IconAnchor = import_styled_components12.default.div`
|
|
1178
|
-
display: flex;
|
|
1179
|
-
position: relative;
|
|
1180
|
-
/* Iconをline-heightに関与させない */
|
|
1181
|
-
height: 0;
|
|
1182
|
-
/* 横方向の領域は確保する */
|
|
1183
|
-
width: ${(p) => p.width}px;
|
|
1184
|
-
|
|
1185
|
-
${iconAnchorCss}
|
|
1186
|
-
`;
|
|
1187
|
-
var Icon3 = import_styled_components12.default.div`
|
|
1188
|
-
display: inline-flex;
|
|
1189
|
-
position: absolute;
|
|
1190
|
-
transform: translateY(-50%);
|
|
1191
|
-
|
|
1192
|
-
${forceCenteringCss}
|
|
1193
|
-
`;
|
|
846
|
+
var forceCenteringCss = (0, import_styled_components12.css)(["> svg{display:block;}"]);
|
|
847
|
+
var iconAnchorCss = (0, import_styled_components12.css)(["", ";", ""], (p) => p.show === "collapse" ? (0, import_styled_components12.css)(["display:none;"]) : (0, import_styled_components12.css)(["visibility:", ";"], p.show ? "visible" : "hidden"), (p) => p.pre ? (0, import_styled_components12.css)(["margin-right:4px;"]) : (0, import_styled_components12.css)(["margin-left:4px;"]));
|
|
848
|
+
var IconAnchorNaive = import_styled_components12.default.div.withConfig({
|
|
849
|
+
componentId: "ccl__sc-12w6fz6-2"
|
|
850
|
+
})(["display:flex;align-items:center;", ""], iconAnchorCss);
|
|
851
|
+
var IconNaive = import_styled_components12.default.div.withConfig({
|
|
852
|
+
componentId: "ccl__sc-12w6fz6-3"
|
|
853
|
+
})(["display:inline-flex;", ""], forceCenteringCss);
|
|
854
|
+
var IconAnchor = import_styled_components12.default.div.withConfig({
|
|
855
|
+
componentId: "ccl__sc-12w6fz6-4"
|
|
856
|
+
})(["display:flex;position:relative;height:0;width:", "px;", ""], (p) => p.width, iconAnchorCss);
|
|
857
|
+
var Icon3 = import_styled_components12.default.div.withConfig({
|
|
858
|
+
componentId: "ccl__sc-12w6fz6-5"
|
|
859
|
+
})(["display:inline-flex;position:absolute;transform:translateY(-50%);", ""], forceCenteringCss);
|
|
1194
860
|
|
|
1195
861
|
// src/index.ts
|
|
1196
862
|
var import_react13 = require("@charcoal-ui/react");
|
|
@@ -1232,27 +898,18 @@ var import_styled_components13 = __toESM(require("styled-components"));
|
|
|
1232
898
|
|
|
1233
899
|
// src/foundation/utils.ts
|
|
1234
900
|
function unreachable(value) {
|
|
1235
|
-
throw new Error(
|
|
1236
|
-
arguments.length === 0 ? "unreachable" : `unreachable (${JSON.stringify(value)})`
|
|
1237
|
-
);
|
|
901
|
+
throw new Error(arguments.length === 0 ? "unreachable" : `unreachable (${JSON.stringify(value)})`);
|
|
1238
902
|
}
|
|
1239
903
|
|
|
1240
904
|
// src/components/icons/NextIcon.tsx
|
|
1241
905
|
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
1242
906
|
var path = `M8.08579 16.5858C7.30474 17.3668 7.30474 18.6332 8.08579 19.4142C8.86684 20.1953 10.1332 20.1953 10.9142 19.4142L18.3284 12L10.9142 4.58579C10.1332 3.80474 8.86684 3.80474 8.08579 4.58579C7.30474 5.36684 7.30474 6.63317 8.08579 7.41421L12.6716 12L8.08579 16.5858Z`;
|
|
1243
907
|
var size2 = 24;
|
|
1244
|
-
function NextIcon({
|
|
908
|
+
function NextIcon({
|
|
909
|
+
direction
|
|
910
|
+
}) {
|
|
1245
911
|
const transform = directionToTransform(direction);
|
|
1246
|
-
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
1247
|
-
IconBase,
|
|
1248
|
-
{
|
|
1249
|
-
viewBoxSize: size2,
|
|
1250
|
-
size: size2,
|
|
1251
|
-
currentColor: true,
|
|
1252
|
-
path,
|
|
1253
|
-
transform
|
|
1254
|
-
}
|
|
1255
|
-
);
|
|
912
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(IconBase, { viewBoxSize: size2, size: size2, currentColor: true, path, transform });
|
|
1256
913
|
}
|
|
1257
914
|
function directionToTransform(direction) {
|
|
1258
915
|
switch (direction) {
|
|
@@ -1290,86 +947,42 @@ function CarouselButton({
|
|
|
1290
947
|
paddingRight: Math.max(padding, 0),
|
|
1291
948
|
paddingBottom: bottom
|
|
1292
949
|
};
|
|
1293
|
-
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1294
|
-
Button,
|
|
1295
|
-
{
|
|
1296
|
-
type: "button",
|
|
1297
|
-
onClick,
|
|
1298
|
-
hide: !show,
|
|
1299
|
-
style: offsetStyle,
|
|
1300
|
-
css: onlyNonTouchDevice,
|
|
1301
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(CarouselButtonIcon, { children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1302
|
-
NextIcon,
|
|
1303
|
-
{
|
|
1304
|
-
direction: direction === "right" /* Right */ ? "right" /* Right */ : direction === "left" /* Left */ ? "left" /* Left */ : unreachable()
|
|
1305
|
-
}
|
|
1306
|
-
) })
|
|
1307
|
-
}
|
|
1308
|
-
);
|
|
950
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(_StyledButton, { type: "button", onClick, hide: !show, style: offsetStyle, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(CarouselButtonIcon, { children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(NextIcon, { direction: direction === "right" /* Right */ ? "right" /* Right */ : direction === "left" /* Left */ ? "left" /* Left */ : unreachable() }) }) });
|
|
1309
951
|
}
|
|
1310
952
|
var CAROUSEL_BUTTON_SIZE = 40;
|
|
1311
|
-
var CarouselButtonIcon = import_styled_components13.default.div
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
&:active ${CarouselButtonIcon} {
|
|
1345
|
-
background-color: ${({ theme: theme2 }) => (0, import_utils9.applyEffect)(theme2.color.surface4, theme2.effect.press)};
|
|
1346
|
-
color: ${({ theme: theme2 }) => (0, import_utils9.applyEffect)(theme2.color.text5, theme2.effect.press)};
|
|
1347
|
-
}
|
|
1348
|
-
|
|
1349
|
-
${(p) => p.hide && import_styled_components13.css`
|
|
1350
|
-
visibility: hidden;
|
|
1351
|
-
opacity: 0;
|
|
1352
|
-
pointer-events: none;
|
|
1353
|
-
`}
|
|
1354
|
-
`;
|
|
1355
|
-
var ScrollHintIcon = (0, import_styled_components13.default)(CarouselButtonIcon)`
|
|
1356
|
-
cursor: pointer;
|
|
1357
|
-
|
|
1358
|
-
&:hover {
|
|
1359
|
-
background-color: ${({ theme: theme2 }) => (0, import_utils9.applyEffect)(theme2.color.surface4, theme2.effect.hover)};
|
|
1360
|
-
color: ${({ theme: theme2 }) => (0, import_utils9.applyEffect)(theme2.color.text5, theme2.effect.hover)};
|
|
1361
|
-
}
|
|
1362
|
-
|
|
1363
|
-
&:active {
|
|
1364
|
-
background-color: ${({ theme: theme2 }) => (0, import_utils9.applyEffect)(theme2.color.surface4, theme2.effect.press)};
|
|
1365
|
-
color: ${({ theme: theme2 }) => (0, import_utils9.applyEffect)(theme2.color.text5, theme2.effect.press)};
|
|
1366
|
-
}
|
|
1367
|
-
`;
|
|
1368
|
-
var onlyNonTouchDevice = import_styled_components13.css`
|
|
1369
|
-
@media (hover: none) and (pointer: coarse) {
|
|
1370
|
-
display: none;
|
|
1371
|
-
}
|
|
1372
|
-
`;
|
|
953
|
+
var CarouselButtonIcon = import_styled_components13.default.div.withConfig({
|
|
954
|
+
componentId: "ccl__sc-gjlnt0-0"
|
|
955
|
+
})(["display:flex;align-items:center;justify-content:center;width:", "px;height:", "px;border-radius:50%;background-color:", ";transition:0.4s visibility,0.4s opacity,0.2s background-color,0.2s color;color:", ";"], CAROUSEL_BUTTON_SIZE, CAROUSEL_BUTTON_SIZE, ({
|
|
956
|
+
theme: theme2
|
|
957
|
+
}) => theme2.color.surface4, ({
|
|
958
|
+
theme: theme2
|
|
959
|
+
}) => theme2.color.text5);
|
|
960
|
+
var Button = import_styled_components13.default.button.withConfig({
|
|
961
|
+
componentId: "ccl__sc-gjlnt0-1"
|
|
962
|
+
})(["position:absolute;top:0;bottom:0;display:flex;align-items:center;padding:0;min-width:40px;border:none;outline:0;background:transparent;cursor:pointer;transition:0.4s visibility,0.4s opacity;z-index:1;&:hover ", "{background-color:", ";color:", ";}&:active ", "{background-color:", ";color:", ";}", ""], CarouselButtonIcon, ({
|
|
963
|
+
theme: theme2
|
|
964
|
+
}) => (0, import_utils9.applyEffect)(theme2.color.surface4, theme2.effect.hover), ({
|
|
965
|
+
theme: theme2
|
|
966
|
+
}) => (0, import_utils9.applyEffect)(theme2.color.text5, theme2.effect.hover), CarouselButtonIcon, ({
|
|
967
|
+
theme: theme2
|
|
968
|
+
}) => (0, import_utils9.applyEffect)(theme2.color.surface4, theme2.effect.press), ({
|
|
969
|
+
theme: theme2
|
|
970
|
+
}) => (0, import_utils9.applyEffect)(theme2.color.text5, theme2.effect.press), (p) => p.hide && (0, import_styled_components13.css)(["visibility:hidden;opacity:0;pointer-events:none;"]));
|
|
971
|
+
var _StyledButton = (0, import_styled_components13.default)(Button).withConfig({
|
|
972
|
+
componentId: "ccl__sc-gjlnt0-2"
|
|
973
|
+
})(["", ""], onlyNonTouchDevice);
|
|
974
|
+
var ScrollHintIcon = (0, import_styled_components13.default)(CarouselButtonIcon).withConfig({
|
|
975
|
+
componentId: "ccl__sc-gjlnt0-3"
|
|
976
|
+
})(["cursor:pointer;&:hover{background-color:", ";color:", ";}&:active{background-color:", ";color:", ";}"], ({
|
|
977
|
+
theme: theme2
|
|
978
|
+
}) => (0, import_utils9.applyEffect)(theme2.color.surface4, theme2.effect.hover), ({
|
|
979
|
+
theme: theme2
|
|
980
|
+
}) => (0, import_utils9.applyEffect)(theme2.color.text5, theme2.effect.hover), ({
|
|
981
|
+
theme: theme2
|
|
982
|
+
}) => (0, import_utils9.applyEffect)(theme2.color.surface4, theme2.effect.press), ({
|
|
983
|
+
theme: theme2
|
|
984
|
+
}) => (0, import_utils9.applyEffect)(theme2.color.text5, theme2.effect.press));
|
|
985
|
+
var onlyNonTouchDevice = (0, import_styled_components13.css)(["@media (hover:none) and (pointer:coarse){display:none;}"]);
|
|
1373
986
|
|
|
1374
987
|
// src/components/Carousel/index.tsx
|
|
1375
988
|
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
@@ -1379,7 +992,10 @@ function Carousel({
|
|
|
1379
992
|
buttonOffset = 0,
|
|
1380
993
|
buttonPadding = 16,
|
|
1381
994
|
bottomOffset = 0,
|
|
1382
|
-
defaultScroll: {
|
|
995
|
+
defaultScroll: {
|
|
996
|
+
align = "left",
|
|
997
|
+
offset: scrollOffset = 0
|
|
998
|
+
} = {},
|
|
1383
999
|
onScroll,
|
|
1384
1000
|
onResize,
|
|
1385
1001
|
children,
|
|
@@ -1393,7 +1009,9 @@ function Carousel({
|
|
|
1393
1009
|
const [maxScrollLeft, setMaxScrollLeft] = (0, import_react10.useState)(0);
|
|
1394
1010
|
const [leftShow, setLeftShow] = (0, import_react10.useState)(false);
|
|
1395
1011
|
const [rightShow, setRightShow] = (0, import_react10.useState)(false);
|
|
1396
|
-
const [styles, set] = (0, import_react_spring.useSpring)(() => ({
|
|
1012
|
+
const [styles, set] = (0, import_react_spring.useSpring)(() => ({
|
|
1013
|
+
scroll: 0
|
|
1014
|
+
}));
|
|
1397
1015
|
const ref = (0, import_react10.useRef)(null);
|
|
1398
1016
|
const visibleAreaRef = (0, import_react10.useRef)(null);
|
|
1399
1017
|
const innerRef = (0, import_react10.useRef)(null);
|
|
@@ -1401,30 +1019,36 @@ function Carousel({
|
|
|
1401
1019
|
if (visibleAreaRef.current === null) {
|
|
1402
1020
|
return;
|
|
1403
1021
|
}
|
|
1404
|
-
const {
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
);
|
|
1022
|
+
const {
|
|
1023
|
+
clientWidth
|
|
1024
|
+
} = visibleAreaRef.current;
|
|
1025
|
+
const scroll = Math.min(scrollLeft + clientWidth * scrollAmountCoef, maxScrollLeft);
|
|
1409
1026
|
setScrollLeft(scroll, true);
|
|
1410
|
-
set({
|
|
1027
|
+
set({
|
|
1028
|
+
scroll,
|
|
1029
|
+
from: {
|
|
1030
|
+
scroll: scrollLeft
|
|
1031
|
+
},
|
|
1032
|
+
reset: !animation.current
|
|
1033
|
+
});
|
|
1411
1034
|
animation.current = true;
|
|
1412
|
-
}, [
|
|
1413
|
-
animation,
|
|
1414
|
-
maxScrollLeft,
|
|
1415
|
-
scrollLeft,
|
|
1416
|
-
set,
|
|
1417
|
-
scrollAmountCoef,
|
|
1418
|
-
setScrollLeft
|
|
1419
|
-
]);
|
|
1035
|
+
}, [animation, maxScrollLeft, scrollLeft, set, scrollAmountCoef, setScrollLeft]);
|
|
1420
1036
|
const handleLeft = (0, import_react10.useCallback)(() => {
|
|
1421
1037
|
if (visibleAreaRef.current === null) {
|
|
1422
1038
|
return;
|
|
1423
1039
|
}
|
|
1424
|
-
const {
|
|
1040
|
+
const {
|
|
1041
|
+
clientWidth
|
|
1042
|
+
} = visibleAreaRef.current;
|
|
1425
1043
|
const scroll = Math.max(scrollLeft - clientWidth * scrollAmountCoef, 0);
|
|
1426
1044
|
setScrollLeft(scroll, true);
|
|
1427
|
-
set({
|
|
1045
|
+
set({
|
|
1046
|
+
scroll,
|
|
1047
|
+
from: {
|
|
1048
|
+
scroll: scrollLeft
|
|
1049
|
+
},
|
|
1050
|
+
reset: !animation.current
|
|
1051
|
+
});
|
|
1428
1052
|
animation.current = true;
|
|
1429
1053
|
}, [animation, scrollLeft, set, scrollAmountCoef, setScrollLeft]);
|
|
1430
1054
|
(0, import_react10.useEffect)(() => {
|
|
@@ -1451,7 +1075,10 @@ function Carousel({
|
|
|
1451
1075
|
if (ref.current === null) {
|
|
1452
1076
|
return;
|
|
1453
1077
|
}
|
|
1454
|
-
const {
|
|
1078
|
+
const {
|
|
1079
|
+
clientWidth,
|
|
1080
|
+
scrollWidth
|
|
1081
|
+
} = ref.current;
|
|
1455
1082
|
const newMaxScrollLeft = scrollWidth - clientWidth;
|
|
1456
1083
|
setMaxScrollLeft(newMaxScrollLeft);
|
|
1457
1084
|
if (onResize) {
|
|
@@ -1464,11 +1091,9 @@ function Carousel({
|
|
|
1464
1091
|
if (elm === null || innerElm === null) {
|
|
1465
1092
|
return;
|
|
1466
1093
|
}
|
|
1467
|
-
elm.addEventListener(
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
passiveEvents() && { passive: true }
|
|
1471
|
-
);
|
|
1094
|
+
elm.addEventListener("wheel", handleScroll, passiveEvents() && {
|
|
1095
|
+
passive: true
|
|
1096
|
+
});
|
|
1472
1097
|
const resizeObserver = new ResizeObserver(handleResize);
|
|
1473
1098
|
resizeObserver.observe(elm);
|
|
1474
1099
|
const resizeObserverInner = new ResizeObserver(handleResize);
|
|
@@ -1483,13 +1108,7 @@ function Carousel({
|
|
|
1483
1108
|
if (align !== "left" || scrollOffset !== 0) {
|
|
1484
1109
|
const scroll = ref.current;
|
|
1485
1110
|
if (scroll !== null) {
|
|
1486
|
-
const scrollLength = Math.max(
|
|
1487
|
-
0,
|
|
1488
|
-
Math.min(
|
|
1489
|
-
align === "left" && scrollOffset > 0 ? scrollOffset : align === "center" ? maxScrollLeft / 2 + scrollOffset : align === "right" && scrollOffset <= maxScrollLeft ? maxScrollLeft - scrollOffset / 2 : 0,
|
|
1490
|
-
maxScrollLeft
|
|
1491
|
-
)
|
|
1492
|
-
);
|
|
1111
|
+
const scrollLength = Math.max(0, Math.min(align === "left" && scrollOffset > 0 ? scrollOffset : align === "center" ? maxScrollLeft / 2 + scrollOffset : align === "right" && scrollOffset <= maxScrollLeft ? maxScrollLeft - scrollOffset / 2 : 0, maxScrollLeft));
|
|
1493
1112
|
scroll.scrollLeft = scrollLength;
|
|
1494
1113
|
setScrollLeft(scrollLength, true);
|
|
1495
1114
|
}
|
|
@@ -1513,40 +1132,10 @@ function Carousel({
|
|
|
1513
1132
|
const fadeInGradient = options.fadeInGradient ?? false;
|
|
1514
1133
|
const overflowGradient = !fadeInGradient;
|
|
1515
1134
|
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(Container3, { ref: visibleAreaRef, children: [
|
|
1516
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(GradientContainer, { fadeInGradient, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(RightGradient, { children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(LeftGradient, { show: overflowGradient || scrollLeft > 0, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1517
|
-
ScrollArea,
|
|
1518
|
-
{
|
|
1519
|
-
ref,
|
|
1520
|
-
scrollLeft: styles.scroll,
|
|
1521
|
-
onScroll: handleScrollMove,
|
|
1522
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(CarouselContainer, { ref: innerRef, centerItems, children })
|
|
1523
|
-
}
|
|
1524
|
-
) }) }) }),
|
|
1135
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(GradientContainer, { fadeInGradient, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(RightGradient, { children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(LeftGradient, { show: overflowGradient || scrollLeft > 0, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(ScrollArea, { ref, scrollLeft: styles.scroll, onScroll: handleScrollMove, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(CarouselContainer, { ref: innerRef, centerItems, children }) }) }) }) }),
|
|
1525
1136
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(ButtonsContainer, { children: [
|
|
1526
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1527
|
-
|
|
1528
|
-
{
|
|
1529
|
-
direction: "left" /* Left */,
|
|
1530
|
-
show: leftShow,
|
|
1531
|
-
offset: buttonOffset,
|
|
1532
|
-
bottomOffset,
|
|
1533
|
-
padding: buttonPadding,
|
|
1534
|
-
gradient: overflowGradient,
|
|
1535
|
-
onClick: handleLeft
|
|
1536
|
-
}
|
|
1537
|
-
),
|
|
1538
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1539
|
-
CarouselButton,
|
|
1540
|
-
{
|
|
1541
|
-
direction: "right" /* Right */,
|
|
1542
|
-
show: rightShow,
|
|
1543
|
-
offset: buttonOffset,
|
|
1544
|
-
bottomOffset,
|
|
1545
|
-
padding: buttonPadding,
|
|
1546
|
-
gradient: true,
|
|
1547
|
-
onClick: handleRight
|
|
1548
|
-
}
|
|
1549
|
-
)
|
|
1137
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(CarouselButton, { direction: "left" /* Left */, show: leftShow, offset: buttonOffset, bottomOffset, padding: buttonPadding, gradient: overflowGradient, onClick: handleLeft }),
|
|
1138
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(CarouselButton, { direction: "right" /* Right */, show: rightShow, offset: buttonOffset, bottomOffset, padding: buttonPadding, gradient: true, onClick: handleRight })
|
|
1550
1139
|
] })
|
|
1551
1140
|
] });
|
|
1552
1141
|
}
|
|
@@ -1561,106 +1150,34 @@ function Carousel({
|
|
|
1561
1150
|
}
|
|
1562
1151
|
),
|
|
1563
1152
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(ButtonsContainer, { children: [
|
|
1564
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1565
|
-
|
|
1566
|
-
{
|
|
1567
|
-
direction: "left" /* Left */,
|
|
1568
|
-
show: leftShow,
|
|
1569
|
-
offset: buttonOffset,
|
|
1570
|
-
bottomOffset,
|
|
1571
|
-
padding: buttonPadding,
|
|
1572
|
-
onClick: handleLeft
|
|
1573
|
-
}
|
|
1574
|
-
),
|
|
1575
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1576
|
-
CarouselButton,
|
|
1577
|
-
{
|
|
1578
|
-
direction: "right" /* Right */,
|
|
1579
|
-
show: rightShow,
|
|
1580
|
-
offset: buttonOffset,
|
|
1581
|
-
bottomOffset,
|
|
1582
|
-
padding: buttonPadding,
|
|
1583
|
-
onClick: handleRight
|
|
1584
|
-
}
|
|
1585
|
-
)
|
|
1153
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(CarouselButton, { direction: "left" /* Left */, show: leftShow, offset: buttonOffset, bottomOffset, padding: buttonPadding, onClick: handleLeft }),
|
|
1154
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(CarouselButton, { direction: "right" /* Right */, show: rightShow, offset: buttonOffset, bottomOffset, padding: buttonPadding, onClick: handleRight })
|
|
1586
1155
|
] })
|
|
1587
1156
|
] });
|
|
1588
1157
|
}
|
|
1589
|
-
var CarouselContainer = import_styled_components14.default.ul
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
var Container3 = import_styled_components14.default.div`
|
|
1613
|
-
&:hover ${ButtonsContainer} {
|
|
1614
|
-
opacity: 1;
|
|
1615
|
-
}
|
|
1616
|
-
|
|
1617
|
-
/* CarouselButtonの中にz-index:1があるのでここでコンテキストを切る */
|
|
1618
|
-
position: relative;
|
|
1619
|
-
z-index: 0;
|
|
1620
|
-
`;
|
|
1621
|
-
var ScrollArea = (0, import_styled_components14.default)(import_react_spring.animated.div)`
|
|
1622
|
-
overflow-x: auto;
|
|
1623
|
-
padding: 0;
|
|
1624
|
-
margin: 0;
|
|
1625
|
-
|
|
1626
|
-
&::-webkit-scrollbar {
|
|
1627
|
-
display: none;
|
|
1628
|
-
}
|
|
1629
|
-
|
|
1630
|
-
scrollbar-width: none;
|
|
1631
|
-
`;
|
|
1632
|
-
var GradientContainer = import_styled_components14.default.div`
|
|
1633
|
-
/* NOTE: LeftGradientがはみ出るためhidden */
|
|
1634
|
-
overflow: hidden;
|
|
1635
|
-
${(p) => !p.fadeInGradient && import_styled_components14.css`
|
|
1636
|
-
margin-left: ${-GRADIENT_WIDTH}px;
|
|
1637
|
-
${CarouselContainer} {
|
|
1638
|
-
padding-left: ${GRADIENT_WIDTH}px;
|
|
1639
|
-
}
|
|
1640
|
-
`}
|
|
1641
|
-
|
|
1642
|
-
margin-right: ${-GRADIENT_WIDTH}px;
|
|
1643
|
-
/* stylelint-disable-next-line no-duplicate-selectors */
|
|
1644
|
-
${CarouselContainer} {
|
|
1645
|
-
padding-right: ${GRADIENT_WIDTH}px;
|
|
1646
|
-
}
|
|
1647
|
-
`;
|
|
1648
|
-
var RightGradient = import_styled_components14.default.div`
|
|
1649
|
-
mask-image: linear-gradient(
|
|
1650
|
-
to right,
|
|
1651
|
-
#000 calc(100% - ${GRADIENT_WIDTH}px),
|
|
1652
|
-
transparent
|
|
1653
|
-
);
|
|
1654
|
-
`;
|
|
1655
|
-
var LeftGradient = import_styled_components14.default.div`
|
|
1656
|
-
/* NOTE: mask-position が left → negative px の時、right → abs(negative px) の位置に表示されるため */
|
|
1657
|
-
margin-right: ${-GRADIENT_WIDTH}px;
|
|
1658
|
-
padding-right: ${GRADIENT_WIDTH}px;
|
|
1659
|
-
/* NOTE: mask-position に transition をつけたいが vender prefixes 対策で all につける */
|
|
1660
|
-
transition: 0.2s all ease-in;
|
|
1661
|
-
mask: linear-gradient(to right, transparent, #000 ${GRADIENT_WIDTH}px)
|
|
1662
|
-
${(p) => p.show ? 0 : -GRADIENT_WIDTH}px 0;
|
|
1663
|
-
`;
|
|
1158
|
+
var CarouselContainer = import_styled_components14.default.ul.withConfig({
|
|
1159
|
+
componentId: "ccl__sc-1qkjnfo-0"
|
|
1160
|
+
})(["vertical-align:top;overflow:hidden;list-style:none;padding:0;min-width:100%;box-sizing:border-box;", ""], ({
|
|
1161
|
+
centerItems = false
|
|
1162
|
+
}) => centerItems ? (0, import_styled_components14.css)(["display:flex;width:max-content;margin:0 auto;"]) : (0, import_styled_components14.css)(["display:inline-flex;margin:0;"]));
|
|
1163
|
+
var ButtonsContainer = import_styled_components14.default.div.withConfig({
|
|
1164
|
+
componentId: "ccl__sc-1qkjnfo-1"
|
|
1165
|
+
})(["opacity:0;transition:0.4s opacity;"]);
|
|
1166
|
+
var Container3 = import_styled_components14.default.div.withConfig({
|
|
1167
|
+
componentId: "ccl__sc-1qkjnfo-2"
|
|
1168
|
+
})(["&:hover ", "{opacity:1;}position:relative;z-index:0;"], ButtonsContainer);
|
|
1169
|
+
var ScrollArea = (0, import_styled_components14.default)(import_react_spring.animated.div).withConfig({
|
|
1170
|
+
componentId: "ccl__sc-1qkjnfo-3"
|
|
1171
|
+
})(["overflow-x:auto;padding:0;margin:0;&::-webkit-scrollbar{display:none;}scrollbar-width:none;"]);
|
|
1172
|
+
var GradientContainer = import_styled_components14.default.div.withConfig({
|
|
1173
|
+
componentId: "ccl__sc-1qkjnfo-4"
|
|
1174
|
+
})(["overflow:hidden;", " margin-right:", "px;", "{padding-right:", "px;}"], (p) => !p.fadeInGradient && (0, import_styled_components14.css)(["margin-left:", "px;", "{padding-left:", "px;}"], -GRADIENT_WIDTH, CarouselContainer, GRADIENT_WIDTH), -GRADIENT_WIDTH, CarouselContainer, GRADIENT_WIDTH);
|
|
1175
|
+
var RightGradient = import_styled_components14.default.div.withConfig({
|
|
1176
|
+
componentId: "ccl__sc-1qkjnfo-5"
|
|
1177
|
+
})(["mask-image:linear-gradient( to right,#000 calc(100% - ", "px),transparent );"], GRADIENT_WIDTH);
|
|
1178
|
+
var LeftGradient = import_styled_components14.default.div.withConfig({
|
|
1179
|
+
componentId: "ccl__sc-1qkjnfo-6"
|
|
1180
|
+
})(["margin-right:", "px;padding-right:", "px;transition:0.2s all ease-in;mask:linear-gradient(to right,transparent,#000 ", "px) ", "px 0;"], -GRADIENT_WIDTH, GRADIENT_WIDTH, GRADIENT_WIDTH, (p) => p.show ? 0 : -GRADIENT_WIDTH);
|
|
1664
1181
|
|
|
1665
1182
|
// src/components/Pager/index.tsx
|
|
1666
1183
|
var import_react11 = require("react");
|
|
@@ -1670,40 +1187,31 @@ var import_warning = __toESM(require("warning"));
|
|
|
1670
1187
|
// src/components/icons/DotsIcon.tsx
|
|
1671
1188
|
var import_styled_components15 = __toESM(require("styled-components"));
|
|
1672
1189
|
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
1673
|
-
function DotsIcon({
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
fillRule: "evenodd",
|
|
1678
|
-
d: `M5,14.5 C3.61928813,14.5 2.5,13.3807119 2.5,12 C2.5,10.6192881 3.61928813,9.5 5,9.5
|
|
1190
|
+
function DotsIcon({
|
|
1191
|
+
size: size3
|
|
1192
|
+
}) {
|
|
1193
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(StyledSVG, { viewBox: "0 0 20 6", width: size3, height: size3, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("path", { fillRule: "evenodd", d: `M5,14.5 C3.61928813,14.5 2.5,13.3807119 2.5,12 C2.5,10.6192881 3.61928813,9.5 5,9.5
|
|
1679
1194
|
C6.38071187,9.5 7.5,10.6192881 7.5,12 C7.5,13.3807119 6.38071187,14.5 5,14.5 Z M12,14.5
|
|
1680
1195
|
C10.6192881,14.5 9.5,13.3807119 9.5,12 C9.5,10.6192881 10.6192881,9.5 12,9.5
|
|
1681
1196
|
C13.3807119,9.5 14.5,10.6192881 14.5,12 C14.5,13.3807119 13.3807119,14.5 12,14.5 Z M19,14.5
|
|
1682
1197
|
C17.6192881,14.5 16.5,13.3807119 16.5,12 C16.5,10.6192881 17.6192881,9.5 19,9.5
|
|
1683
|
-
C20.3807119,9.5 21.5,10.6192881 21.5,12 C21.5,13.3807119 20.3807119,14.5 19,14.5 Z`,
|
|
1684
|
-
transform: "translate(-2 -9)"
|
|
1685
|
-
}
|
|
1686
|
-
) });
|
|
1198
|
+
C20.3807119,9.5 21.5,10.6192881 21.5,12 C21.5,13.3807119 20.3807119,14.5 19,14.5 Z`, transform: "translate(-2 -9)" }) });
|
|
1687
1199
|
}
|
|
1688
1200
|
DotsIcon.defaultProps = {
|
|
1689
1201
|
size: 16
|
|
1690
1202
|
};
|
|
1691
|
-
var StyledSVG = import_styled_components15.default.svg
|
|
1692
|
-
|
|
1693
|
-
|
|
1203
|
+
var StyledSVG = import_styled_components15.default.svg.withConfig({
|
|
1204
|
+
componentId: "ccl__sc-1ma336a-0"
|
|
1205
|
+
})(["fill:currentColor;"]);
|
|
1694
1206
|
|
|
1695
1207
|
// src/components/icons/WedgeIcon.tsx
|
|
1696
1208
|
var import_styled_components16 = __toESM(require("styled-components"));
|
|
1697
1209
|
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
1698
|
-
function WedgeIcon({
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
points: "1,2 5,6 9,2",
|
|
1704
|
-
transform: directionToTransform2(direction)
|
|
1705
|
-
}
|
|
1706
|
-
) });
|
|
1210
|
+
function WedgeIcon({
|
|
1211
|
+
size: size3,
|
|
1212
|
+
direction
|
|
1213
|
+
}) {
|
|
1214
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("svg", { viewBox: "0 0 10 8", width: size3, height: size3, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(StyledPolyline, { strokeWidth: "2", points: "1,2 5,6 9,2", transform: directionToTransform2(direction) }) });
|
|
1707
1215
|
}
|
|
1708
1216
|
WedgeIcon.defaultProps = {
|
|
1709
1217
|
size: 16,
|
|
@@ -1724,12 +1232,9 @@ function directionToTransform2(direction) {
|
|
|
1724
1232
|
return unreachable(direction);
|
|
1725
1233
|
}
|
|
1726
1234
|
}
|
|
1727
|
-
var StyledPolyline = import_styled_components16.default.polyline
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
stroke-linecap: round;
|
|
1731
|
-
stroke: currentColor;
|
|
1732
|
-
`;
|
|
1235
|
+
var StyledPolyline = import_styled_components16.default.polyline.withConfig({
|
|
1236
|
+
componentId: "ccl__sc-617sjj-0"
|
|
1237
|
+
})(["fill:none;stroke-linejoin:round;stroke-linecap:round;stroke:currentColor;"]);
|
|
1733
1238
|
|
|
1734
1239
|
// src/components/Pager/index.tsx
|
|
1735
1240
|
var import_react12 = require("@charcoal-ui/react");
|
|
@@ -1737,36 +1242,25 @@ var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
|
1737
1242
|
function usePagerWindow(page, pageCount, pageRangeDisplayed = 7) {
|
|
1738
1243
|
if (process.env.NODE_ENV !== "production") {
|
|
1739
1244
|
(0, import_warning.default)((page | 0) === page, `\`page\` must be integer (${page})`);
|
|
1740
|
-
(0, import_warning.default)(
|
|
1741
|
-
|
|
1742
|
-
`\`pageCount\` must be integer (${pageCount})`
|
|
1743
|
-
);
|
|
1744
|
-
(0, import_warning.default)(
|
|
1745
|
-
(pageRangeDisplayed | 0) === pageRangeDisplayed,
|
|
1746
|
-
`\`pageRangeDisplayed\` must be integer (${pageRangeDisplayed})`
|
|
1747
|
-
);
|
|
1245
|
+
(0, import_warning.default)((pageCount | 0) === pageCount, `\`pageCount\` must be integer (${pageCount})`);
|
|
1246
|
+
(0, import_warning.default)((pageRangeDisplayed | 0) === pageRangeDisplayed, `\`pageRangeDisplayed\` must be integer (${pageRangeDisplayed})`);
|
|
1748
1247
|
(0, import_warning.default)(pageRangeDisplayed > 2, `\`windowSize\` must be greater than 2`);
|
|
1749
1248
|
}
|
|
1750
1249
|
const window2 = (0, import_react11.useMemo)(() => {
|
|
1751
1250
|
const visibleFirstPage = 1;
|
|
1752
|
-
const visibleLastPage = Math.min(
|
|
1753
|
-
pageCount,
|
|
1754
|
-
Math.max(page + Math.floor(pageRangeDisplayed / 2), pageRangeDisplayed)
|
|
1755
|
-
);
|
|
1251
|
+
const visibleLastPage = Math.min(pageCount, Math.max(page + Math.floor(pageRangeDisplayed / 2), pageRangeDisplayed));
|
|
1756
1252
|
if (visibleLastPage <= pageRangeDisplayed) {
|
|
1757
|
-
return Array.from(
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
);
|
|
1253
|
+
return Array.from({
|
|
1254
|
+
length: 1 + visibleLastPage - visibleFirstPage
|
|
1255
|
+
}, (_, i) => visibleFirstPage + i);
|
|
1761
1256
|
} else {
|
|
1762
1257
|
const start = visibleLastPage - (pageRangeDisplayed - 1) + 2;
|
|
1763
1258
|
return [
|
|
1764
1259
|
visibleFirstPage,
|
|
1765
1260
|
"...",
|
|
1766
|
-
...Array.from(
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
)
|
|
1261
|
+
...Array.from({
|
|
1262
|
+
length: 1 + visibleLastPage - start
|
|
1263
|
+
}, (_, i) => start + i)
|
|
1770
1264
|
];
|
|
1771
1265
|
}
|
|
1772
1266
|
}, [page, pageCount, pageRangeDisplayed]);
|
|
@@ -1780,40 +1274,15 @@ var Pager_default = (0, import_react11.memo)(function Pager({
|
|
|
1780
1274
|
onChange
|
|
1781
1275
|
}) {
|
|
1782
1276
|
const window2 = usePagerWindow(page, pageCount, pageRangeDisplayed);
|
|
1783
|
-
const makeClickHandler = (0, import_react11.useCallback)(
|
|
1784
|
-
(value)
|
|
1785
|
-
|
|
1786
|
-
},
|
|
1787
|
-
[onChange]
|
|
1788
|
-
);
|
|
1277
|
+
const makeClickHandler = (0, import_react11.useCallback)((value) => () => {
|
|
1278
|
+
onChange(value);
|
|
1279
|
+
}, [onChange]);
|
|
1789
1280
|
const hasNext = page < pageCount;
|
|
1790
1281
|
const hasPrev = page > 1;
|
|
1791
1282
|
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(PagerContainer, { children: [
|
|
1792
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
type: "button",
|
|
1796
|
-
hidden: !hasPrev,
|
|
1797
|
-
disabled: !hasPrev,
|
|
1798
|
-
onClick: makeClickHandler(Math.max(1, page - 1)),
|
|
1799
|
-
noBackground: true,
|
|
1800
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(WedgeIcon, { size: 16, direction: "left" /* Left */ })
|
|
1801
|
-
}
|
|
1802
|
-
),
|
|
1803
|
-
window2.map(
|
|
1804
|
-
(p) => p === "..." ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Spacer, { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DotsIcon, { size: 20 }) }, p) : p === page ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(CircleButton, { type: "button", "aria-current": true, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text3, { children: p }) }, p) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(CircleButton, { type: "button", onClick: makeClickHandler(p), children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text3, { children: p }) }, p)
|
|
1805
|
-
),
|
|
1806
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1807
|
-
CircleButton,
|
|
1808
|
-
{
|
|
1809
|
-
type: "button",
|
|
1810
|
-
hidden: !hasNext,
|
|
1811
|
-
disabled: !hasNext,
|
|
1812
|
-
onClick: makeClickHandler(Math.min(pageCount, page + 1)),
|
|
1813
|
-
noBackground: true,
|
|
1814
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(WedgeIcon, { size: 16, direction: "right" /* Right */ })
|
|
1815
|
-
}
|
|
1816
|
-
)
|
|
1283
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(CircleButton, { type: "button", hidden: !hasPrev, disabled: !hasPrev, onClick: makeClickHandler(Math.max(1, page - 1)), noBackground: true, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(WedgeIcon, { size: 16, direction: "left" /* Left */ }) }),
|
|
1284
|
+
window2.map((p) => p === "..." ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Spacer, { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DotsIcon, { size: 20 }) }, p) : p === page ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(CircleButton, { type: "button", "aria-current": true, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text3, { children: p }) }, p) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(CircleButton, { type: "button", onClick: makeClickHandler(p), children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text3, { children: p }) }, p)),
|
|
1285
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(CircleButton, { type: "button", hidden: !hasNext, disabled: !hasNext, onClick: makeClickHandler(Math.min(pageCount, page + 1)), noBackground: true, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(WedgeIcon, { size: 16, direction: "right" /* Right */ }) })
|
|
1817
1286
|
] });
|
|
1818
1287
|
});
|
|
1819
1288
|
function LinkPager({
|
|
@@ -1822,88 +1291,48 @@ function LinkPager({
|
|
|
1822
1291
|
pageRangeDisplayed,
|
|
1823
1292
|
makeUrl
|
|
1824
1293
|
}) {
|
|
1825
|
-
const {
|
|
1294
|
+
const {
|
|
1295
|
+
Link
|
|
1296
|
+
} = (0, import_react12.useComponentAbstraction)();
|
|
1826
1297
|
const window2 = usePagerWindow(page, pageCount, pageRangeDisplayed);
|
|
1827
1298
|
const hasNext = page < pageCount;
|
|
1828
1299
|
const hasPrev = page > 1;
|
|
1829
1300
|
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(PagerContainer, { children: [
|
|
1830
1301
|
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Link, { to: makeUrl(Math.max(1, page - 1)), children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(CircleButton, { hidden: !hasPrev, "aria-disabled": !hasPrev, noBackground: true, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(WedgeIcon, { size: 16, direction: "left" /* Left */ }) }) }),
|
|
1831
|
-
window2.map(
|
|
1832
|
-
(p) => p === "..." ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Spacer, { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DotsIcon, { size: 20, subLink: true }) }, p) : p === page ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(CircleButton, { type: "button", "aria-current": true, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text3, { children: p }) }, p) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Link, { to: makeUrl(p), children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(CircleButton, { type: "button", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text3, { children: p }) }) }, p)
|
|
1833
|
-
),
|
|
1302
|
+
window2.map((p) => p === "..." ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Spacer, { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DotsIcon, { size: 20, subLink: true }) }, p) : p === page ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(CircleButton, { type: "button", "aria-current": true, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text3, { children: p }) }, p) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Link, { to: makeUrl(p), children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(CircleButton, { type: "button", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text3, { children: p }) }) }, p)),
|
|
1834
1303
|
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Link, { to: makeUrl(Math.min(pageCount, page + 1)), children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(CircleButton, { hidden: !hasNext, "aria-disabled": !hasNext, noBackground: true, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(WedgeIcon, { size: 16, direction: "right" /* Right */ }) }) })
|
|
1835
1304
|
] });
|
|
1836
1305
|
}
|
|
1837
|
-
var PagerContainer = import_styled_components17.default.nav
|
|
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
|
-
|
|
1866
|
-
|
|
1867
|
-
-webkit-transform: translateZ(0);
|
|
1868
|
-
|
|
1869
|
-
&[hidden] {
|
|
1870
|
-
visibility: hidden;
|
|
1871
|
-
display: block;
|
|
1872
|
-
}
|
|
1873
|
-
|
|
1874
|
-
border-radius: 48px;
|
|
1875
|
-
|
|
1876
|
-
background: transparent;
|
|
1877
|
-
color: ${({ theme: theme2 }) => theme2.color.text3};
|
|
1878
|
-
|
|
1879
|
-
&:hover {
|
|
1880
|
-
background: ${({ theme: theme2 }) => theme2.color.surface3};
|
|
1881
|
-
color: ${({ theme: theme2 }) => theme2.color.text2};
|
|
1882
|
-
}
|
|
1883
|
-
|
|
1884
|
-
&[aria-current] {
|
|
1885
|
-
background-color: ${({ theme: theme2 }) => theme2.color.surface6};
|
|
1886
|
-
color: ${({ theme: theme2 }) => theme2.color.text5};
|
|
1887
|
-
}
|
|
1888
|
-
|
|
1889
|
-
&[aria-current]:hover {
|
|
1890
|
-
background-color: ${({ theme: theme2 }) => theme2.color.surface6};
|
|
1891
|
-
color: ${({ theme: theme2 }) => theme2.color.text5};
|
|
1892
|
-
}
|
|
1893
|
-
|
|
1894
|
-
${({ noBackground = false }) => noBackground && import_styled_components17.css`
|
|
1895
|
-
/* stylelint-disable-next-line no-duplicate-selectors */
|
|
1896
|
-
&:hover {
|
|
1897
|
-
background: transparent;
|
|
1898
|
-
}
|
|
1899
|
-
`}
|
|
1900
|
-
`;
|
|
1901
|
-
var Spacer = (0, import_styled_components17.default)(CircleButton).attrs({ type: "button", disabled: true })`
|
|
1902
|
-
&& {
|
|
1903
|
-
color: ${({ theme: theme2 }) => theme2.color.text3};
|
|
1904
|
-
background: none;
|
|
1905
|
-
}
|
|
1906
|
-
`;
|
|
1306
|
+
var PagerContainer = import_styled_components17.default.nav.withConfig({
|
|
1307
|
+
componentId: "ccl__sc-1bh6g9v-0"
|
|
1308
|
+
})(["display:flex;justify-content:center;align-items:center;"]);
|
|
1309
|
+
var CircleButton = import_styled_components17.default.button.withConfig({
|
|
1310
|
+
componentId: "ccl__sc-1bh6g9v-1"
|
|
1311
|
+
})(["font-size:1rem;line-height:calc(1em + 8px);text-decoration:none;border:none;outline:none;touch-action:manipulation;user-select:none;transition:box-shadow 0.2s ease 0s,color 0.2s ease 0s,background 0.2s ease 0s,opacity 0.2s ease 0s;display:flex;justify-content:center;align-items:center;box-sizing:content-box;min-width:24px;min-height:24px;padding:8px;cursor:pointer;font-weight:bold;-webkit-transform:translateZ(0);&[hidden]{visibility:hidden;display:block;}border-radius:48px;background:transparent;color:", ";&:hover{background:", ";color:", ";}&[aria-current]{background-color:", ";color:", ";}&[aria-current]:hover{background-color:", ";color:", ";}", ""], ({
|
|
1312
|
+
theme: theme2
|
|
1313
|
+
}) => theme2.color.text3, ({
|
|
1314
|
+
theme: theme2
|
|
1315
|
+
}) => theme2.color.surface3, ({
|
|
1316
|
+
theme: theme2
|
|
1317
|
+
}) => theme2.color.text2, ({
|
|
1318
|
+
theme: theme2
|
|
1319
|
+
}) => theme2.color.surface6, ({
|
|
1320
|
+
theme: theme2
|
|
1321
|
+
}) => theme2.color.text5, ({
|
|
1322
|
+
theme: theme2
|
|
1323
|
+
}) => theme2.color.surface6, ({
|
|
1324
|
+
theme: theme2
|
|
1325
|
+
}) => theme2.color.text5, ({
|
|
1326
|
+
noBackground = false
|
|
1327
|
+
}) => noBackground && (0, import_styled_components17.css)(["&:hover{background:transparent;}"]));
|
|
1328
|
+
var Spacer = (0, import_styled_components17.default)(CircleButton).attrs({
|
|
1329
|
+
type: "button",
|
|
1330
|
+
disabled: true
|
|
1331
|
+
}).withConfig({
|
|
1332
|
+
componentId: "ccl__sc-1bh6g9v-2"
|
|
1333
|
+
})(["&&{color:", ";background:none;}"], ({
|
|
1334
|
+
theme: theme2
|
|
1335
|
+
}) => theme2.color.text3);
|
|
1907
1336
|
var Text3 = "span";
|
|
1908
1337
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1909
1338
|
0 && (module.exports = {
|