@zenkigen-inc/component-ui 1.18.5 → 1.19.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.d.mts +70 -4
- package/dist/index.d.ts +70 -4
- package/dist/index.js +1324 -860
- package/dist/index.mjs +1219 -746
- package/package.json +6 -5
package/dist/index.js
CHANGED
|
@@ -34,6 +34,7 @@ __export(index_exports, {
|
|
|
34
34
|
Breadcrumb: () => Breadcrumb,
|
|
35
35
|
Button: () => Button,
|
|
36
36
|
Checkbox: () => Checkbox,
|
|
37
|
+
DatePicker: () => DatePicker,
|
|
37
38
|
Dropdown: () => Dropdown,
|
|
38
39
|
EvaluationStar: () => EvaluationStar,
|
|
39
40
|
FileInput: () => FileInput,
|
|
@@ -341,16 +342,707 @@ function Checkbox({
|
|
|
341
342
|
] });
|
|
342
343
|
}
|
|
343
344
|
|
|
344
|
-
// src/
|
|
345
|
+
// src/date-picker/date-picker.tsx
|
|
346
|
+
var import_style = require("react-day-picker/style.css");
|
|
347
|
+
var import_react10 = require("react");
|
|
348
|
+
var import_react_day_picker4 = require("react-day-picker");
|
|
349
|
+
|
|
350
|
+
// src/icon-button/icon-button.tsx
|
|
351
|
+
var import_component_theme5 = require("@zenkigen-inc/component-theme");
|
|
352
|
+
var import_clsx5 = require("clsx");
|
|
353
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
354
|
+
function IconButton({
|
|
355
|
+
icon,
|
|
356
|
+
size = "medium",
|
|
357
|
+
variant = "outline",
|
|
358
|
+
isNoPadding = false,
|
|
359
|
+
isDisabled = false,
|
|
360
|
+
isSelected = false,
|
|
361
|
+
iconAccentColor,
|
|
362
|
+
...props
|
|
363
|
+
}) {
|
|
364
|
+
const baseClasses = (0, import_clsx5.clsx)(
|
|
365
|
+
"typography-label16regular flex items-center justify-center gap-1 rounded",
|
|
366
|
+
import_component_theme5.buttonColors[variant].hover,
|
|
367
|
+
import_component_theme5.buttonColors[variant].active,
|
|
368
|
+
import_component_theme5.buttonColors[variant].disabled,
|
|
369
|
+
import_component_theme5.focusVisible.normal,
|
|
370
|
+
{
|
|
371
|
+
"h-4 w-4": size === "small" && isNoPadding,
|
|
372
|
+
"h-6 w-6": size === "small" && !isNoPadding || (size === "medium" || size === "large") && isNoPadding,
|
|
373
|
+
"h-8 w-8": size === "medium" && !isNoPadding,
|
|
374
|
+
"h-10 w-10": size === "large" && !isNoPadding,
|
|
375
|
+
"inline-flex": props.isAnchor,
|
|
376
|
+
"pointer-events-none": isDisabled,
|
|
377
|
+
[import_component_theme5.buttonColors[variant].selected]: isSelected,
|
|
378
|
+
[import_component_theme5.buttonColors[variant].base]: !isSelected
|
|
379
|
+
}
|
|
380
|
+
);
|
|
381
|
+
const iconSize = size === "small" ? "small" : "medium";
|
|
382
|
+
const iconAccentColorProps = !isSelected && iconAccentColor ? { accentColor: iconAccentColor } : {};
|
|
383
|
+
if (props.isAnchor === true) {
|
|
384
|
+
const buttonProps = Object.fromEntries(Object.entries(props).filter(([key]) => key !== "isAnchor"));
|
|
385
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("a", { className: baseClasses, ...buttonProps, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Icon, { name: icon, size: iconSize, ...iconAccentColorProps }) });
|
|
386
|
+
} else {
|
|
387
|
+
const buttonProps = Object.fromEntries(Object.entries(props).filter(([key]) => key !== "isAnchor"));
|
|
388
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("button", { type: "button", className: baseClasses, disabled: isDisabled, ...buttonProps, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Icon, { name: icon, size: iconSize, ...iconAccentColorProps }) });
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
// src/popover/popover.tsx
|
|
393
|
+
var import_react6 = require("@floating-ui/react");
|
|
394
|
+
var import_react7 = require("react");
|
|
395
|
+
|
|
396
|
+
// src/popover/popover-content.tsx
|
|
397
|
+
var import_react3 = require("@floating-ui/react");
|
|
398
|
+
var React = __toESM(require("react"));
|
|
399
|
+
var import_react4 = require("react");
|
|
400
|
+
|
|
401
|
+
// src/utils/react-utils.ts
|
|
402
|
+
function composeRefs(...refs) {
|
|
403
|
+
return (node) => {
|
|
404
|
+
for (const ref of refs) {
|
|
405
|
+
if (ref == null) {
|
|
406
|
+
continue;
|
|
407
|
+
}
|
|
408
|
+
if (typeof ref === "function") {
|
|
409
|
+
ref(node);
|
|
410
|
+
} else {
|
|
411
|
+
ref.current = node;
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
};
|
|
415
|
+
}
|
|
416
|
+
function isElement(node) {
|
|
417
|
+
return node != null && typeof node === "object" && "type" in node;
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
// src/popover/popover-context.ts
|
|
421
|
+
var import_react2 = require("react");
|
|
422
|
+
var PopoverContext = (0, import_react2.createContext)(null);
|
|
423
|
+
var usePopoverContext = () => {
|
|
424
|
+
const context = (0, import_react2.useContext)(PopoverContext);
|
|
425
|
+
if (context == null) {
|
|
426
|
+
throw new Error("Popover components must be used inside <Popover.Root>");
|
|
427
|
+
}
|
|
428
|
+
return context;
|
|
429
|
+
};
|
|
430
|
+
|
|
431
|
+
// src/popover/popover-content.tsx
|
|
432
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
433
|
+
var PopoverContent = (0, import_react4.forwardRef)(function PopoverContent2({ children }, ref) {
|
|
434
|
+
const { isOpen, triggerRef, floating, panelId, onClose } = usePopoverContext();
|
|
435
|
+
const shouldCloseOnOutsidePress = (0, import_react4.useCallback)(
|
|
436
|
+
(event) => {
|
|
437
|
+
const target = event.target;
|
|
438
|
+
if (!(target instanceof Element)) {
|
|
439
|
+
return true;
|
|
440
|
+
}
|
|
441
|
+
const floatingElement = floating.refs.floating.current;
|
|
442
|
+
const closestOverlay = target.closest(".z-overlay, .z-dropdown");
|
|
443
|
+
if (closestOverlay !== null && floatingElement instanceof Element) {
|
|
444
|
+
const isInsideOwnFloating = floatingElement.contains(closestOverlay);
|
|
445
|
+
return isInsideOwnFloating;
|
|
446
|
+
}
|
|
447
|
+
return true;
|
|
448
|
+
},
|
|
449
|
+
[floating.refs.floating]
|
|
450
|
+
);
|
|
451
|
+
const dismiss = (0, import_react3.useDismiss)(floating.context, {
|
|
452
|
+
outsidePressEvent: "pointerdown",
|
|
453
|
+
outsidePress: shouldCloseOnOutsidePress,
|
|
454
|
+
escapeKey: false
|
|
455
|
+
});
|
|
456
|
+
const interactions = (0, import_react3.useInteractions)([dismiss, (0, import_react3.useRole)(floating.context, { role: "dialog" })]);
|
|
457
|
+
(0, import_react4.useEffect)(() => {
|
|
458
|
+
if (isOpen) {
|
|
459
|
+
const element = floating.refs.floating.current;
|
|
460
|
+
element?.focus?.({ preventScroll: true });
|
|
461
|
+
}
|
|
462
|
+
}, [isOpen, floating.refs.floating]);
|
|
463
|
+
const prevIsOpenRef = (0, import_react4.useRef)(isOpen);
|
|
464
|
+
(0, import_react4.useEffect)(() => {
|
|
465
|
+
const hasPreviouslyBeenOpen = prevIsOpenRef.current;
|
|
466
|
+
prevIsOpenRef.current = isOpen;
|
|
467
|
+
if (hasPreviouslyBeenOpen && !isOpen) {
|
|
468
|
+
triggerRef.current?.focus({ preventScroll: true });
|
|
469
|
+
}
|
|
470
|
+
}, [isOpen, triggerRef]);
|
|
471
|
+
const handleKeyDown = (0, import_react4.useCallback)(
|
|
472
|
+
(event) => {
|
|
473
|
+
if (event.key === "Escape") {
|
|
474
|
+
event.stopPropagation();
|
|
475
|
+
if (onClose != null) {
|
|
476
|
+
onClose({ reason: "escape-key-down" });
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
},
|
|
480
|
+
[onClose]
|
|
481
|
+
);
|
|
482
|
+
let wrappedChildren = children;
|
|
483
|
+
if (isElement(children)) {
|
|
484
|
+
const childProps = children.props;
|
|
485
|
+
wrappedChildren = React.cloneElement(children, {
|
|
486
|
+
...childProps,
|
|
487
|
+
...childProps.id == null && { id: panelId },
|
|
488
|
+
...childProps.role == null && { role: "dialog" }
|
|
489
|
+
});
|
|
490
|
+
}
|
|
491
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react3.FloatingPortal, { children: isOpen ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
492
|
+
"div",
|
|
493
|
+
{
|
|
494
|
+
...interactions.getFloatingProps({
|
|
495
|
+
ref: composeRefs(floating.refs.setFloating, ref),
|
|
496
|
+
tabIndex: -1,
|
|
497
|
+
onKeyDown: handleKeyDown,
|
|
498
|
+
style: {
|
|
499
|
+
position: floating.strategy,
|
|
500
|
+
top: floating.y ?? 0,
|
|
501
|
+
left: floating.x ?? 0,
|
|
502
|
+
outline: "0"
|
|
503
|
+
}
|
|
504
|
+
}),
|
|
505
|
+
children: wrappedChildren
|
|
506
|
+
}
|
|
507
|
+
) : null });
|
|
508
|
+
});
|
|
509
|
+
|
|
510
|
+
// src/popover/popover-trigger.tsx
|
|
511
|
+
var React2 = __toESM(require("react"));
|
|
512
|
+
var import_react5 = require("react");
|
|
513
|
+
var PopoverTrigger = (0, import_react5.forwardRef)(function PopoverTrigger2({ children }, ref) {
|
|
514
|
+
const { isOpen, floating, triggerRef, anchorRef, panelId } = usePopoverContext();
|
|
515
|
+
if (!isElement(children)) {
|
|
516
|
+
return null;
|
|
517
|
+
}
|
|
518
|
+
const handleTriggerRef = (node) => {
|
|
519
|
+
triggerRef.current = node;
|
|
520
|
+
if (anchorRef == null) {
|
|
521
|
+
floating.refs.setReference(node);
|
|
522
|
+
}
|
|
523
|
+
if (typeof ref === "function") {
|
|
524
|
+
ref(node);
|
|
525
|
+
} else if (ref != null) {
|
|
526
|
+
ref.current = node;
|
|
527
|
+
}
|
|
528
|
+
};
|
|
529
|
+
const childProps = children.props;
|
|
530
|
+
const childRef = childProps.ref;
|
|
531
|
+
return React2.cloneElement(children, {
|
|
532
|
+
...childProps,
|
|
533
|
+
ref: composeRefs(childRef, handleTriggerRef),
|
|
534
|
+
"aria-haspopup": "dialog",
|
|
535
|
+
"aria-expanded": isOpen,
|
|
536
|
+
"aria-controls": panelId
|
|
537
|
+
});
|
|
538
|
+
});
|
|
539
|
+
|
|
540
|
+
// src/popover/popover.tsx
|
|
541
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
542
|
+
function Popover({
|
|
543
|
+
isOpen,
|
|
544
|
+
children,
|
|
545
|
+
placement = "top",
|
|
546
|
+
offset: offsetValue = 8,
|
|
547
|
+
onClose,
|
|
548
|
+
anchorRef
|
|
549
|
+
}) {
|
|
550
|
+
const triggerRef = (0, import_react7.useRef)(null);
|
|
551
|
+
const floating = (0, import_react6.useFloating)({
|
|
552
|
+
open: isOpen,
|
|
553
|
+
onOpenChange: (open) => {
|
|
554
|
+
if (!open && onClose != null) {
|
|
555
|
+
onClose({ reason: "outside-click" });
|
|
556
|
+
}
|
|
557
|
+
},
|
|
558
|
+
placement,
|
|
559
|
+
middleware: [(0, import_react6.offset)(offsetValue)],
|
|
560
|
+
whileElementsMounted: import_react6.autoUpdate,
|
|
561
|
+
strategy: "fixed"
|
|
562
|
+
});
|
|
563
|
+
(0, import_react7.useEffect)(() => {
|
|
564
|
+
if (anchorRef?.current) {
|
|
565
|
+
floating.refs.setReference(anchorRef.current);
|
|
566
|
+
}
|
|
567
|
+
}, [anchorRef, floating.refs]);
|
|
568
|
+
const contentId = (0, import_react6.useId)() ?? "";
|
|
569
|
+
const panelId = `${contentId}-panel`;
|
|
570
|
+
const contextValue = (0, import_react7.useMemo)(
|
|
571
|
+
() => ({
|
|
572
|
+
isOpen,
|
|
573
|
+
triggerRef,
|
|
574
|
+
anchorRef,
|
|
575
|
+
floating,
|
|
576
|
+
contentId,
|
|
577
|
+
panelId,
|
|
578
|
+
onClose
|
|
579
|
+
}),
|
|
580
|
+
[isOpen, triggerRef, anchorRef, floating, contentId, panelId, onClose]
|
|
581
|
+
);
|
|
582
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(PopoverContext.Provider, { value: contextValue, children });
|
|
583
|
+
}
|
|
584
|
+
Popover.Trigger = PopoverTrigger;
|
|
585
|
+
Popover.Content = PopoverContent;
|
|
586
|
+
|
|
587
|
+
// src/date-picker/date-picker-context.tsx
|
|
588
|
+
var import_react8 = require("react");
|
|
589
|
+
var DatePickerCompoundContext = (0, import_react8.createContext)(null);
|
|
590
|
+
var useDatePickerCompoundContext = (componentName) => {
|
|
591
|
+
const context = (0, import_react8.useContext)(DatePickerCompoundContext);
|
|
592
|
+
if (context == null) {
|
|
593
|
+
throw new Error(`${componentName} \u3092\u4F7F\u7528\u3059\u308B\u306B\u306F DatePicker \u306E\u5B50\u8981\u7D20\u3068\u3057\u3066\u914D\u7F6E\u3059\u308B\u5FC5\u8981\u304C\u3042\u308B\u3002`);
|
|
594
|
+
}
|
|
595
|
+
return context;
|
|
596
|
+
};
|
|
597
|
+
|
|
598
|
+
// src/date-picker/date-picker-day-button.tsx
|
|
345
599
|
var import_component_theme6 = require("@zenkigen-inc/component-theme");
|
|
346
|
-
var import_clsx7 =
|
|
347
|
-
var
|
|
600
|
+
var import_clsx7 = require("clsx");
|
|
601
|
+
var import_react_day_picker2 = require("react-day-picker");
|
|
602
|
+
|
|
603
|
+
// src/date-picker/date-picker-styles.ts
|
|
604
|
+
var import_clsx6 = require("clsx");
|
|
605
|
+
var import_react_day_picker = require("react-day-picker");
|
|
606
|
+
var defaultDayPickerClassNames = (0, import_react_day_picker.getDefaultClassNames)();
|
|
607
|
+
var DAY_PICKER_FONT_SIZE = "12px";
|
|
608
|
+
var dayPickerStyle = {
|
|
609
|
+
"--rdp-nav-height": "30px",
|
|
610
|
+
"--rdp-day-width": "30px",
|
|
611
|
+
"--rdp-day-height": "30px",
|
|
612
|
+
"--rdp-day_button-width": "28px",
|
|
613
|
+
"--rdp-day_button-height": "28px",
|
|
614
|
+
"--rdp-day_button-border": "1px solid transparent",
|
|
615
|
+
"--rdp-weekday-padding": "0px",
|
|
616
|
+
fontFamily: "Arial, 'Noto Sans JP', sans-serif",
|
|
617
|
+
fontSize: DAY_PICKER_FONT_SIZE,
|
|
618
|
+
fontWeight: 700
|
|
619
|
+
};
|
|
620
|
+
var dayPickerClassNames = {
|
|
621
|
+
month: (0, import_clsx6.clsx)(defaultDayPickerClassNames.month, "flex flex-col px-[7px] py-2")
|
|
622
|
+
};
|
|
623
|
+
var dayButtonBaseClass = "relative grid size-full place-items-center rounded-full !border !border-solid";
|
|
624
|
+
|
|
625
|
+
// src/date-picker/date-picker-day-button.tsx
|
|
626
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
627
|
+
var CustomDayButton = ({ day, modifiers, className, style, ...buttonProps }) => {
|
|
628
|
+
const isSelected = Boolean(modifiers.selected);
|
|
629
|
+
const isOutside = Boolean(modifiers.outside);
|
|
630
|
+
const isMinMaxDisabled = Boolean(modifiers.minMaxDisabled);
|
|
631
|
+
const now = /* @__PURE__ */ new Date();
|
|
632
|
+
const isToday = day.date.getFullYear() === now.getFullYear() && day.date.getMonth() === now.getMonth() && day.date.getDate() === now.getDate();
|
|
633
|
+
const isDisabledDay = isMinMaxDisabled;
|
|
634
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
635
|
+
import_react_day_picker2.DayButton,
|
|
636
|
+
{
|
|
637
|
+
...buttonProps,
|
|
638
|
+
day,
|
|
639
|
+
modifiers,
|
|
640
|
+
style: { ...style, fontSize: DAY_PICKER_FONT_SIZE },
|
|
641
|
+
className: (0, import_clsx7.clsx)(
|
|
642
|
+
className,
|
|
643
|
+
dayButtonBaseClass,
|
|
644
|
+
// 共通: フォーカスリング(有効な日のみ)
|
|
645
|
+
// react-day-picker の rdp-day_button クラスが outline: none を設定しているため、!important で上書き
|
|
646
|
+
!isDisabledDay && import_component_theme6.focusVisible.normalImportant,
|
|
647
|
+
// minDate/maxDate 制限日
|
|
648
|
+
isMinMaxDisabled && "!cursor-not-allowed !border-transparent !text-disabled01",
|
|
649
|
+
// 範囲外の日(前後月)
|
|
650
|
+
isOutside && !isMinMaxDisabled && "!border-transparent !text-interactive04",
|
|
651
|
+
// 通常の日
|
|
652
|
+
!isDisabledDay && !isSelected && "!border-transparent",
|
|
653
|
+
!isDisabledDay && !isToday && "!text-interactive02 hover:!bg-hoverUi",
|
|
654
|
+
// 今日
|
|
655
|
+
!isDisabledDay && isToday && !isSelected && "!border-selectedUiBorder !bg-interactive01 !text-textOnColor",
|
|
656
|
+
// 選択された日
|
|
657
|
+
isSelected && "!border-selectedUiBorder !bg-uiBackgroundBlue"
|
|
658
|
+
)
|
|
659
|
+
}
|
|
660
|
+
);
|
|
661
|
+
};
|
|
662
|
+
|
|
663
|
+
// src/date-picker/date-picker-error-message.tsx
|
|
664
|
+
var import_clsx8 = require("clsx");
|
|
665
|
+
var import_react9 = require("react");
|
|
666
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
667
|
+
var DatePickerErrorMessage = (0, import_react9.forwardRef)(
|
|
668
|
+
({ "aria-live": ariaLive = "assertive", ...props }, ref) => {
|
|
669
|
+
const { size, isError } = useDatePickerCompoundContext("DatePicker.ErrorMessage");
|
|
670
|
+
const typographyClass = size === "large" ? "typography-label12regular" : "typography-label11regular";
|
|
671
|
+
if (isError !== true) {
|
|
672
|
+
return null;
|
|
673
|
+
}
|
|
674
|
+
const errorMessageClassName = (0, import_clsx8.clsx)(typographyClass, "text-supportError");
|
|
675
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { ref, className: errorMessageClassName, "aria-live": ariaLive, ...props });
|
|
676
|
+
}
|
|
677
|
+
);
|
|
678
|
+
DatePickerErrorMessage.displayName = "DatePicker.ErrorMessage";
|
|
679
|
+
|
|
680
|
+
// src/date-picker/date-picker-month-caption.tsx
|
|
681
|
+
var import_clsx9 = require("clsx");
|
|
682
|
+
var import_react_day_picker3 = require("react-day-picker");
|
|
683
|
+
|
|
684
|
+
// src/date-picker/date-picker-utils.ts
|
|
685
|
+
var localDateFormatter = new Intl.DateTimeFormat("en-CA", {
|
|
686
|
+
year: "numeric",
|
|
687
|
+
month: "2-digit",
|
|
688
|
+
day: "2-digit"
|
|
689
|
+
});
|
|
690
|
+
var timeZoneFormatters = {
|
|
691
|
+
UTC: new Intl.DateTimeFormat("en-CA", {
|
|
692
|
+
timeZone: "UTC",
|
|
693
|
+
year: "numeric",
|
|
694
|
+
month: "2-digit",
|
|
695
|
+
day: "2-digit"
|
|
696
|
+
}),
|
|
697
|
+
"Asia/Tokyo": new Intl.DateTimeFormat("en-CA", {
|
|
698
|
+
timeZone: "Asia/Tokyo",
|
|
699
|
+
year: "numeric",
|
|
700
|
+
month: "2-digit",
|
|
701
|
+
day: "2-digit"
|
|
702
|
+
})
|
|
703
|
+
};
|
|
704
|
+
var toIsoOffset = (timeZone) => timeZone === "UTC" ? "Z" : "+09:00";
|
|
705
|
+
var formatDateKey = (date, timeZone) => {
|
|
706
|
+
const parts = timeZoneFormatters[timeZone].formatToParts(date);
|
|
707
|
+
const year = parts.find((p) => p.type === "year")?.value;
|
|
708
|
+
const month = parts.find((p) => p.type === "month")?.value;
|
|
709
|
+
const day = parts.find((p) => p.type === "day")?.value;
|
|
710
|
+
return `${year}-${month}-${day}`;
|
|
711
|
+
};
|
|
712
|
+
var formatLocalDateKey = (date = /* @__PURE__ */ new Date()) => {
|
|
713
|
+
return localDateFormatter.format(date);
|
|
714
|
+
};
|
|
715
|
+
var createDateFromKey = (dateKey, timeZone) => {
|
|
716
|
+
return /* @__PURE__ */ new Date(`${dateKey}T00:00:00${toIsoOffset(timeZone)}`);
|
|
717
|
+
};
|
|
718
|
+
var createLocalDateFromKey = (dateKey) => {
|
|
719
|
+
const parts = dateKey.split("-");
|
|
720
|
+
const year = parts[0];
|
|
721
|
+
const month = parts[1];
|
|
722
|
+
const day = parts[2];
|
|
723
|
+
if (year == null || month == null || day == null) {
|
|
724
|
+
throw new Error(`Invalid dateKey format: "${dateKey}". Expected "YYYY-MM-DD".`);
|
|
725
|
+
}
|
|
726
|
+
return new Date(Number(year), Number(month) - 1, Number(day));
|
|
727
|
+
};
|
|
728
|
+
var getMonthStartDate = (date, timeZone) => {
|
|
729
|
+
const parts = formatDateKey(date, timeZone).split("-");
|
|
730
|
+
const year = parts[0];
|
|
731
|
+
const month = parts[1];
|
|
732
|
+
if (year == null || month == null) {
|
|
733
|
+
throw new Error("Invalid date format from formatDateKey.");
|
|
734
|
+
}
|
|
735
|
+
return new Date(Number(year), Number(month) - 1, 1);
|
|
736
|
+
};
|
|
737
|
+
var formatDisplayDate = (date, timeZone) => {
|
|
738
|
+
const [year, month, day] = formatDateKey(date, timeZone).split("-");
|
|
739
|
+
return `${year}\u5E74${month}\u6708${day}\u65E5`;
|
|
740
|
+
};
|
|
741
|
+
var formatMonthLabel = (date) => {
|
|
742
|
+
const [year, month] = formatLocalDateKey(date).split("-");
|
|
743
|
+
return `${year}\u5E74${month}\u6708`;
|
|
744
|
+
};
|
|
745
|
+
|
|
746
|
+
// src/date-picker/date-picker-month-caption.tsx
|
|
747
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
748
|
+
var CustomMonthCaption = ({ calendarMonth, className, displayIndex, style, ...props }) => {
|
|
749
|
+
void displayIndex;
|
|
750
|
+
const { goToMonth, nextMonth, previousMonth } = (0, import_react_day_picker3.useDayPicker)();
|
|
751
|
+
const captionMonth = calendarMonth.date;
|
|
752
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
753
|
+
"div",
|
|
754
|
+
{
|
|
755
|
+
className: (0, import_clsx9.clsx)("flex items-center justify-between px-1 pb-0.5", className),
|
|
756
|
+
style: { ...style, fontSize: "inherit", fontWeight: "inherit" },
|
|
757
|
+
...props,
|
|
758
|
+
children: [
|
|
759
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
760
|
+
IconButton,
|
|
761
|
+
{
|
|
762
|
+
icon: "angle-left",
|
|
763
|
+
size: "small",
|
|
764
|
+
variant: "text",
|
|
765
|
+
isDisabled: !previousMonth,
|
|
766
|
+
"aria-label": "\u524D\u306E\u6708",
|
|
767
|
+
onClick: () => previousMonth && goToMonth(previousMonth)
|
|
768
|
+
}
|
|
769
|
+
),
|
|
770
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "typography-label12bold text-text02", children: formatMonthLabel(captionMonth) }),
|
|
771
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
772
|
+
IconButton,
|
|
773
|
+
{
|
|
774
|
+
icon: "angle-right",
|
|
775
|
+
size: "small",
|
|
776
|
+
variant: "text",
|
|
777
|
+
isDisabled: !nextMonth,
|
|
778
|
+
"aria-label": "\u6B21\u306E\u6708",
|
|
779
|
+
onClick: () => nextMonth && goToMonth(nextMonth)
|
|
780
|
+
}
|
|
781
|
+
)
|
|
782
|
+
]
|
|
783
|
+
}
|
|
784
|
+
);
|
|
785
|
+
};
|
|
786
|
+
|
|
787
|
+
// src/date-picker/date-picker-weekday.tsx
|
|
788
|
+
var import_clsx10 = require("clsx");
|
|
789
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
790
|
+
var CustomWeekday = ({ className, children, style, ...props }) => {
|
|
791
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
792
|
+
"th",
|
|
793
|
+
{
|
|
794
|
+
...props,
|
|
795
|
+
className: (0, import_clsx10.clsx)(className, "m-0 size-7 p-0 text-center align-middle text-text02"),
|
|
796
|
+
style: { ...style, fontSize: "inherit", fontWeight: "bold" },
|
|
797
|
+
children
|
|
798
|
+
}
|
|
799
|
+
);
|
|
800
|
+
};
|
|
801
|
+
|
|
802
|
+
// src/date-picker/date-picker.tsx
|
|
803
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
804
|
+
var DatePicker = ({
|
|
805
|
+
value,
|
|
806
|
+
onChange,
|
|
807
|
+
isDisabled = false,
|
|
808
|
+
isError = false,
|
|
809
|
+
minDate,
|
|
810
|
+
maxDate,
|
|
811
|
+
placeholder = "\u65E5\u4ED8\u3092\u9078\u629E",
|
|
812
|
+
size = "medium",
|
|
813
|
+
timeZone = "Asia/Tokyo",
|
|
814
|
+
children,
|
|
815
|
+
onClick,
|
|
816
|
+
type,
|
|
817
|
+
...restProps
|
|
818
|
+
}) => {
|
|
819
|
+
const autoGeneratedId = (0, import_react10.useId)();
|
|
820
|
+
const describedByBaseId = restProps.id ?? autoGeneratedId;
|
|
821
|
+
const [isOpen, setIsOpen] = (0, import_react10.useState)(false);
|
|
822
|
+
const [displayMonth, setDisplayMonth] = (0, import_react10.useState)(() => {
|
|
823
|
+
if (value == null) {
|
|
824
|
+
const todayKey = formatLocalDateKey(/* @__PURE__ */ new Date());
|
|
825
|
+
return createLocalDateFromKey(`${todayKey.slice(0, 7)}-01`);
|
|
826
|
+
}
|
|
827
|
+
return getMonthStartDate(value, timeZone);
|
|
828
|
+
});
|
|
829
|
+
const calendarRef = (0, import_react10.useRef)(null);
|
|
830
|
+
const selectedKey = (0, import_react10.useMemo)(() => value == null ? null : formatDateKey(value, timeZone), [value, timeZone]);
|
|
831
|
+
const selectedDate = (0, import_react10.useMemo)(() => {
|
|
832
|
+
if (selectedKey == null) {
|
|
833
|
+
return;
|
|
834
|
+
}
|
|
835
|
+
return createLocalDateFromKey(selectedKey);
|
|
836
|
+
}, [selectedKey]);
|
|
837
|
+
const minKey = (0, import_react10.useMemo)(() => minDate == null ? null : formatDateKey(minDate, timeZone), [minDate, timeZone]);
|
|
838
|
+
const maxKey = (0, import_react10.useMemo)(() => maxDate == null ? null : formatDateKey(maxDate, timeZone), [maxDate, timeZone]);
|
|
839
|
+
const currentMonthKey = (0, import_react10.useMemo)(() => formatLocalDateKey(displayMonth).slice(0, 7), [displayMonth]);
|
|
840
|
+
const isOutsideMonth = (0, import_react10.useCallback)(
|
|
841
|
+
(date) => formatLocalDateKey(date).slice(0, 7) !== currentMonthKey,
|
|
842
|
+
[currentMonthKey]
|
|
843
|
+
);
|
|
844
|
+
const isMinMaxDisabled = (0, import_react10.useCallback)(
|
|
845
|
+
(date) => {
|
|
846
|
+
const dateKey = formatLocalDateKey(date);
|
|
847
|
+
if (minKey != null && dateKey < minKey) {
|
|
848
|
+
return true;
|
|
849
|
+
}
|
|
850
|
+
if (maxKey != null && dateKey > maxKey) {
|
|
851
|
+
return true;
|
|
852
|
+
}
|
|
853
|
+
return false;
|
|
854
|
+
},
|
|
855
|
+
[maxKey, minKey]
|
|
856
|
+
);
|
|
857
|
+
const disabledDays = (0, import_react10.useCallback)(
|
|
858
|
+
(date) => {
|
|
859
|
+
if (isOutsideMonth(date)) {
|
|
860
|
+
return true;
|
|
861
|
+
}
|
|
862
|
+
return isMinMaxDisabled(date);
|
|
863
|
+
},
|
|
864
|
+
[isOutsideMonth, isMinMaxDisabled]
|
|
865
|
+
);
|
|
866
|
+
const todayForCalendar = (0, import_react10.useMemo)(() => createLocalDateFromKey(formatLocalDateKey()), []);
|
|
867
|
+
(0, import_react10.useEffect)(() => {
|
|
868
|
+
if (value == null) {
|
|
869
|
+
const todayKey = formatLocalDateKey(/* @__PURE__ */ new Date());
|
|
870
|
+
setDisplayMonth(createLocalDateFromKey(`${todayKey.slice(0, 7)}-01`));
|
|
871
|
+
return;
|
|
872
|
+
}
|
|
873
|
+
setDisplayMonth(getMonthStartDate(value, timeZone));
|
|
874
|
+
}, [value, timeZone]);
|
|
875
|
+
(0, import_react10.useEffect)(() => {
|
|
876
|
+
if (!isOpen) {
|
|
877
|
+
return;
|
|
878
|
+
}
|
|
879
|
+
const frame = requestAnimationFrame(() => {
|
|
880
|
+
const container = calendarRef.current;
|
|
881
|
+
if (!container) {
|
|
882
|
+
return;
|
|
883
|
+
}
|
|
884
|
+
const selected = container.querySelector('button[aria-selected="true"]');
|
|
885
|
+
const today = container.querySelector('button[aria-current="date"]');
|
|
886
|
+
const focusTarget = selected ?? today;
|
|
887
|
+
focusTarget?.focus({ preventScroll: true });
|
|
888
|
+
});
|
|
889
|
+
return () => cancelAnimationFrame(frame);
|
|
890
|
+
}, [displayMonth, isOpen, value]);
|
|
891
|
+
(0, import_react10.useEffect)(() => {
|
|
892
|
+
if (isDisabled) {
|
|
893
|
+
setIsOpen(false);
|
|
894
|
+
}
|
|
895
|
+
}, [isDisabled]);
|
|
896
|
+
const handleTriggerClick = (event) => {
|
|
897
|
+
if (isDisabled) {
|
|
898
|
+
event.preventDefault();
|
|
899
|
+
return;
|
|
900
|
+
}
|
|
901
|
+
onClick?.(event);
|
|
902
|
+
setIsOpen((prev) => !prev);
|
|
903
|
+
};
|
|
904
|
+
const handleClose = () => {
|
|
905
|
+
setIsOpen(false);
|
|
906
|
+
};
|
|
907
|
+
const handleSelect = (selected) => {
|
|
908
|
+
if (!selected) {
|
|
909
|
+
return;
|
|
910
|
+
}
|
|
911
|
+
const selectedKey2 = formatLocalDateKey(selected);
|
|
912
|
+
onChange(createDateFromKey(selectedKey2, timeZone));
|
|
913
|
+
setIsOpen(false);
|
|
914
|
+
};
|
|
915
|
+
const handleClear = () => {
|
|
916
|
+
onChange(null);
|
|
917
|
+
setIsOpen(false);
|
|
918
|
+
};
|
|
919
|
+
const handleClickToday = () => {
|
|
920
|
+
const todayKey = formatLocalDateKey(/* @__PURE__ */ new Date());
|
|
921
|
+
setDisplayMonth(createLocalDateFromKey(`${todayKey.slice(0, 7)}-01`));
|
|
922
|
+
};
|
|
923
|
+
const formatters = (0, import_react10.useMemo)(() => {
|
|
924
|
+
const weekdayFormatter = new Intl.DateTimeFormat("ja-JP", { weekday: "short" });
|
|
925
|
+
return {
|
|
926
|
+
formatCaption: (date) => formatMonthLabel(date),
|
|
927
|
+
formatDay: (date) => String(date.getDate()),
|
|
928
|
+
formatWeekdayName: (date) => weekdayFormatter.format(date)
|
|
929
|
+
};
|
|
930
|
+
}, []);
|
|
931
|
+
const iconSize = size === "large" ? "medium" : "small";
|
|
932
|
+
const displayText = value ? formatDisplayDate(value, timeZone) : placeholder;
|
|
933
|
+
const displayTextClasses = "min-w-0 truncate";
|
|
934
|
+
const errorIds = [];
|
|
935
|
+
const enhancedChildren = import_react10.Children.map(children, (child) => {
|
|
936
|
+
if (!(0, import_react10.isValidElement)(child)) {
|
|
937
|
+
return child;
|
|
938
|
+
}
|
|
939
|
+
if (child.type === DatePickerErrorMessage && isError) {
|
|
940
|
+
const errorChild = child;
|
|
941
|
+
const assignedId = errorChild.props.id ?? `${describedByBaseId}-error-${errorIds.length + 1}`;
|
|
942
|
+
errorIds.push(assignedId);
|
|
943
|
+
return (0, import_react10.cloneElement)(errorChild, { id: assignedId });
|
|
944
|
+
}
|
|
945
|
+
return child;
|
|
946
|
+
});
|
|
947
|
+
const describedByFromProps = typeof restProps["aria-describedby"] === "string" ? restProps["aria-describedby"] : null;
|
|
948
|
+
const describedByList = [describedByFromProps, ...errorIds].filter(
|
|
949
|
+
(id) => typeof id === "string" && id.trim().length > 0
|
|
950
|
+
);
|
|
951
|
+
const describedByProps = describedByList.length > 0 ? {
|
|
952
|
+
"aria-describedby": describedByList.join(" ")
|
|
953
|
+
} : {};
|
|
954
|
+
const shouldMarkInvalid = isError === true || errorIds.length > 0;
|
|
955
|
+
const ariaInvalidFromProps = restProps["aria-invalid"];
|
|
956
|
+
const ariaInvalidValue = ariaInvalidFromProps != null ? ariaInvalidFromProps : shouldMarkInvalid ? true : null;
|
|
957
|
+
const ariaInvalidProps = ariaInvalidValue == null ? {} : { "aria-invalid": ariaInvalidValue };
|
|
958
|
+
const mergedButtonProps = {
|
|
959
|
+
...restProps,
|
|
960
|
+
...describedByProps,
|
|
961
|
+
...ariaInvalidProps
|
|
962
|
+
};
|
|
963
|
+
const contextValue = (0, import_react10.useMemo)(
|
|
964
|
+
() => ({
|
|
965
|
+
size,
|
|
966
|
+
isError
|
|
967
|
+
}),
|
|
968
|
+
[isError, size]
|
|
969
|
+
);
|
|
970
|
+
const popoverContent = /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(Popover, { isOpen, placement: "bottom-start", onClose: handleClose, children: [
|
|
971
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Popover.Trigger, { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
972
|
+
InternalButton,
|
|
973
|
+
{
|
|
974
|
+
...mergedButtonProps,
|
|
975
|
+
type: type ?? "button",
|
|
976
|
+
size,
|
|
977
|
+
variant: isError ? "outlineDanger" : "outline",
|
|
978
|
+
isDisabled,
|
|
979
|
+
before: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Icon, { name: "calendar", size: iconSize }),
|
|
980
|
+
justifyContent: "start",
|
|
981
|
+
onClick: handleTriggerClick,
|
|
982
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: displayTextClasses, children: displayText })
|
|
983
|
+
}
|
|
984
|
+
) }),
|
|
985
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Popover.Content, { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { ref: calendarRef, className: "rounded bg-uiBackground01 shadow-floatingShadow", "aria-label": "\u65E5\u4ED8\u9078\u629E", children: [
|
|
986
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
987
|
+
import_react_day_picker4.DayPicker,
|
|
988
|
+
{
|
|
989
|
+
mode: "single",
|
|
990
|
+
showOutsideDays: true,
|
|
991
|
+
hideNavigation: true,
|
|
992
|
+
weekStartsOn: 0,
|
|
993
|
+
style: dayPickerStyle,
|
|
994
|
+
month: displayMonth,
|
|
995
|
+
onMonthChange: setDisplayMonth,
|
|
996
|
+
selected: selectedDate,
|
|
997
|
+
onSelect: handleSelect,
|
|
998
|
+
today: todayForCalendar,
|
|
999
|
+
disabled: disabledDays,
|
|
1000
|
+
modifiers: { minMaxDisabled: isMinMaxDisabled },
|
|
1001
|
+
classNames: dayPickerClassNames,
|
|
1002
|
+
formatters,
|
|
1003
|
+
fixedWeeks: true,
|
|
1004
|
+
components: { MonthCaption: CustomMonthCaption, DayButton: CustomDayButton, Weekday: CustomWeekday }
|
|
1005
|
+
}
|
|
1006
|
+
),
|
|
1007
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex items-center justify-between border-t border-uiBorder01 px-2 py-1", children: [
|
|
1008
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1009
|
+
IconButton,
|
|
1010
|
+
{
|
|
1011
|
+
icon: "calendar-today",
|
|
1012
|
+
size: "medium",
|
|
1013
|
+
variant: "text",
|
|
1014
|
+
"aria-label": "\u4ECA\u65E5\u306B\u623B\u308B",
|
|
1015
|
+
iconAccentColor: "supportInfo",
|
|
1016
|
+
onClick: handleClickToday
|
|
1017
|
+
}
|
|
1018
|
+
),
|
|
1019
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Button, { type: "button", size: "small", variant: "text", onClick: handleClear, children: "\u30AF\u30EA\u30A2" })
|
|
1020
|
+
] })
|
|
1021
|
+
] }) })
|
|
1022
|
+
] });
|
|
1023
|
+
const stackedChildren = enhancedChildren == null ? [] : import_react10.Children.toArray(enhancedChildren);
|
|
1024
|
+
const hasMessageChildren = stackedChildren.length > 0;
|
|
1025
|
+
if (!hasMessageChildren) {
|
|
1026
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(DatePickerCompoundContext.Provider, { value: contextValue, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "flex flex-col", children: popoverContent }) });
|
|
1027
|
+
}
|
|
1028
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(DatePickerCompoundContext.Provider, { value: contextValue, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
1029
|
+
popoverContent,
|
|
1030
|
+
stackedChildren
|
|
1031
|
+
] }) });
|
|
1032
|
+
};
|
|
1033
|
+
DatePicker.ErrorMessage = DatePickerErrorMessage;
|
|
1034
|
+
DatePicker.displayName = "DatePicker";
|
|
1035
|
+
|
|
1036
|
+
// src/dropdown/dropdown.tsx
|
|
1037
|
+
var import_component_theme8 = require("@zenkigen-inc/component-theme");
|
|
1038
|
+
var import_clsx13 = __toESM(require("clsx"));
|
|
1039
|
+
var import_react15 = require("react");
|
|
348
1040
|
var import_react_dom = require("react-dom");
|
|
349
1041
|
|
|
350
1042
|
// src/hooks/use-outside-click.ts
|
|
351
|
-
var
|
|
1043
|
+
var import_react11 = require("react");
|
|
352
1044
|
var useOutsideClick = (ref, handler, enabled = true) => {
|
|
353
|
-
(0,
|
|
1045
|
+
(0, import_react11.useEffect)(() => {
|
|
354
1046
|
const listener = (event) => {
|
|
355
1047
|
const element = ref?.current;
|
|
356
1048
|
if (element == null || Boolean(element.contains(event?.target ?? null))) {
|
|
@@ -366,8 +1058,8 @@ var useOutsideClick = (ref, handler, enabled = true) => {
|
|
|
366
1058
|
};
|
|
367
1059
|
|
|
368
1060
|
// src/dropdown/dropdown-context.ts
|
|
369
|
-
var
|
|
370
|
-
var DropdownContext = (0,
|
|
1061
|
+
var import_react12 = require("react");
|
|
1062
|
+
var DropdownContext = (0, import_react12.createContext)({
|
|
371
1063
|
isVisible: false,
|
|
372
1064
|
setIsVisible: () => false,
|
|
373
1065
|
isDisabled: false,
|
|
@@ -376,31 +1068,31 @@ var DropdownContext = (0, import_react3.createContext)({
|
|
|
376
1068
|
});
|
|
377
1069
|
|
|
378
1070
|
// src/dropdown/dropdown-item.tsx
|
|
379
|
-
var
|
|
380
|
-
var
|
|
381
|
-
var
|
|
382
|
-
var
|
|
1071
|
+
var import_component_theme7 = require("@zenkigen-inc/component-theme");
|
|
1072
|
+
var import_clsx11 = __toESM(require("clsx"));
|
|
1073
|
+
var import_react13 = require("react");
|
|
1074
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
383
1075
|
function DropdownItem({ children, color = "gray", onClick }) {
|
|
384
|
-
const { setIsVisible } = (0,
|
|
1076
|
+
const { setIsVisible } = (0, import_react13.useContext)(DropdownContext);
|
|
385
1077
|
const handleClickItem = (event) => {
|
|
386
1078
|
setIsVisible(false);
|
|
387
1079
|
onClick?.(event);
|
|
388
1080
|
};
|
|
389
|
-
const itemClasses = (0,
|
|
1081
|
+
const itemClasses = (0, import_clsx11.default)(
|
|
390
1082
|
"typography-label14regular flex h-8 w-full items-center px-3 hover:bg-hover02 active:bg-active02",
|
|
391
|
-
|
|
1083
|
+
import_component_theme7.focusVisible.inset,
|
|
392
1084
|
{
|
|
393
1085
|
"bg-uiBackground01 fill-icon01 text-interactive02": color === "gray",
|
|
394
1086
|
"fill-supportDanger text-supportDanger": color === "red"
|
|
395
1087
|
}
|
|
396
1088
|
);
|
|
397
|
-
return /* @__PURE__ */ (0,
|
|
1089
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("li", { className: "flex w-full items-center", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("button", { className: itemClasses, type: "button", onClick: handleClickItem, children }) });
|
|
398
1090
|
}
|
|
399
1091
|
|
|
400
1092
|
// src/dropdown/dropdown-menu.tsx
|
|
401
|
-
var
|
|
402
|
-
var
|
|
403
|
-
var
|
|
1093
|
+
var import_clsx12 = __toESM(require("clsx"));
|
|
1094
|
+
var import_react14 = require("react");
|
|
1095
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
404
1096
|
function DropdownMenu({
|
|
405
1097
|
children,
|
|
406
1098
|
maxHeight,
|
|
@@ -408,8 +1100,8 @@ function DropdownMenu({
|
|
|
408
1100
|
verticalPosition = "bottom",
|
|
409
1101
|
horizontalAlign = "left"
|
|
410
1102
|
}) {
|
|
411
|
-
const { isVisible, isDisabled, targetDimensions, variant, portalTargetRef } = (0,
|
|
412
|
-
const wrapperClasses = (0,
|
|
1103
|
+
const { isVisible, isDisabled, targetDimensions, variant, portalTargetRef } = (0, import_react14.useContext)(DropdownContext);
|
|
1104
|
+
const wrapperClasses = (0, import_clsx12.default)("z-dropdown w-max overflow-y-auto rounded bg-uiBackground01 shadow-floatingShadow", {
|
|
413
1105
|
absolute: !portalTargetRef,
|
|
414
1106
|
"border-solid border border-uiBorder01": variant === "outline",
|
|
415
1107
|
"py-1": !isNoPadding,
|
|
@@ -417,7 +1109,7 @@ function DropdownMenu({
|
|
|
417
1109
|
"right-0": horizontalAlign === "right",
|
|
418
1110
|
"left-auto": horizontalAlign === "center"
|
|
419
1111
|
});
|
|
420
|
-
return isVisible && !isDisabled && /* @__PURE__ */ (0,
|
|
1112
|
+
return isVisible && !isDisabled && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
421
1113
|
"ul",
|
|
422
1114
|
{
|
|
423
1115
|
className: wrapperClasses,
|
|
@@ -432,7 +1124,7 @@ function DropdownMenu({
|
|
|
432
1124
|
}
|
|
433
1125
|
|
|
434
1126
|
// src/dropdown/dropdown.tsx
|
|
435
|
-
var
|
|
1127
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
436
1128
|
function Dropdown({
|
|
437
1129
|
children,
|
|
438
1130
|
target,
|
|
@@ -445,14 +1137,14 @@ function Dropdown({
|
|
|
445
1137
|
isArrowHidden = false,
|
|
446
1138
|
portalTargetRef
|
|
447
1139
|
}) {
|
|
448
|
-
const [isVisible, setIsVisible] = (0,
|
|
449
|
-
const [targetDimensions, setTargetDimensions] = (0,
|
|
1140
|
+
const [isVisible, setIsVisible] = (0, import_react15.useState)(false);
|
|
1141
|
+
const [targetDimensions, setTargetDimensions] = (0, import_react15.useState)({
|
|
450
1142
|
width: 0,
|
|
451
1143
|
height: 0
|
|
452
1144
|
});
|
|
453
|
-
const targetRef = (0,
|
|
1145
|
+
const targetRef = (0, import_react15.useRef)(null);
|
|
454
1146
|
useOutsideClick(targetRef, () => setIsVisible(false));
|
|
455
|
-
const handleToggle = (0,
|
|
1147
|
+
const handleToggle = (0, import_react15.useCallback)(() => {
|
|
456
1148
|
if (targetRef.current === null) {
|
|
457
1149
|
return;
|
|
458
1150
|
}
|
|
@@ -468,24 +1160,24 @@ function Dropdown({
|
|
|
468
1160
|
setIsVisible(true);
|
|
469
1161
|
}
|
|
470
1162
|
}, [isVisible]);
|
|
471
|
-
const wrapperClasses = (0,
|
|
1163
|
+
const wrapperClasses = (0, import_clsx13.default)("relative flex shrink-0 items-center gap-1 rounded", {
|
|
472
1164
|
"cursor-not-allowed": isDisabled
|
|
473
1165
|
});
|
|
474
|
-
const childrenButtonClasses = (0,
|
|
1166
|
+
const childrenButtonClasses = (0, import_clsx13.default)(
|
|
475
1167
|
"flex items-center justify-center rounded bg-uiBackground01 p-1 hover:bg-hover02 active:bg-active02",
|
|
476
|
-
|
|
1168
|
+
import_component_theme8.focusVisible.normal,
|
|
477
1169
|
{
|
|
478
1170
|
"pointer-events-none": isDisabled,
|
|
479
1171
|
"border border-uiBorder02": variant === "outline"
|
|
480
1172
|
}
|
|
481
1173
|
);
|
|
482
|
-
const buttonClasses = (0,
|
|
1174
|
+
const buttonClasses = (0, import_clsx13.default)(
|
|
483
1175
|
"flex items-center rounded bg-uiBackground01",
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
1176
|
+
import_component_theme8.buttonColors[variant].base,
|
|
1177
|
+
import_component_theme8.buttonColors[variant].hover,
|
|
1178
|
+
import_component_theme8.buttonColors[variant].active,
|
|
1179
|
+
import_component_theme8.buttonColors[variant].disabled,
|
|
1180
|
+
import_component_theme8.focusVisible.normal,
|
|
489
1181
|
{
|
|
490
1182
|
"pointer-events-none": isDisabled,
|
|
491
1183
|
"h-6 px-2": size === "x-small" || size === "small",
|
|
@@ -493,19 +1185,19 @@ function Dropdown({
|
|
|
493
1185
|
"h-10 px-4": size === "large"
|
|
494
1186
|
}
|
|
495
1187
|
);
|
|
496
|
-
const labelClasses = (0,
|
|
1188
|
+
const labelClasses = (0, import_clsx13.default)("flex items-center", {
|
|
497
1189
|
"mr-1": !isArrowHidden && size === "x-small",
|
|
498
1190
|
"mr-2": !isArrowHidden && size !== "x-small",
|
|
499
1191
|
"typography-label12regular": size === "x-small",
|
|
500
1192
|
"typography-label14regular": size === "small" || size === "medium",
|
|
501
1193
|
"typography-label16regular": size === "large"
|
|
502
1194
|
});
|
|
503
|
-
return /* @__PURE__ */ (0,
|
|
1195
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
504
1196
|
DropdownContext.Provider,
|
|
505
1197
|
{
|
|
506
1198
|
value: { isVisible, setIsVisible, isDisabled, targetDimensions, variant, portalTargetRef },
|
|
507
|
-
children: /* @__PURE__ */ (0,
|
|
508
|
-
target ? /* @__PURE__ */ (0,
|
|
1199
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { ref: targetRef, className: wrapperClasses, children: [
|
|
1200
|
+
target ? /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
509
1201
|
"button",
|
|
510
1202
|
{
|
|
511
1203
|
type: "button",
|
|
@@ -515,7 +1207,7 @@ function Dropdown({
|
|
|
515
1207
|
disabled: isDisabled,
|
|
516
1208
|
children: [
|
|
517
1209
|
target,
|
|
518
|
-
!isArrowHidden && /* @__PURE__ */ (0,
|
|
1210
|
+
!isArrowHidden && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "ml-2 flex items-center fill-icon01", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
519
1211
|
Icon,
|
|
520
1212
|
{
|
|
521
1213
|
name: isVisible ? "angle-small-up" : "angle-small-down",
|
|
@@ -524,10 +1216,10 @@ function Dropdown({
|
|
|
524
1216
|
) })
|
|
525
1217
|
]
|
|
526
1218
|
}
|
|
527
|
-
) : /* @__PURE__ */ (0,
|
|
528
|
-
icon && /* @__PURE__ */ (0,
|
|
529
|
-
/* @__PURE__ */ (0,
|
|
530
|
-
!isArrowHidden && /* @__PURE__ */ (0,
|
|
1219
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("button", { type: "button", title, className: buttonClasses, onClick: handleToggle, disabled: isDisabled, children: [
|
|
1220
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "mr-1 flex", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Icon, { name: icon, size: size === "large" ? "medium" : "small" }) }),
|
|
1221
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: labelClasses, children: label }),
|
|
1222
|
+
!isArrowHidden && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "ml-auto flex items-center", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Icon, { name: isVisible ? "angle-small-up" : "angle-small-down", size: "small" }) })
|
|
531
1223
|
] }),
|
|
532
1224
|
!portalTargetRef ? children : portalTargetRef != null && portalTargetRef.current && (0, import_react_dom.createPortal)(children, portalTargetRef.current)
|
|
533
1225
|
] })
|
|
@@ -539,14 +1231,14 @@ Dropdown.Item = DropdownItem;
|
|
|
539
1231
|
|
|
540
1232
|
// src/evaluation-star/evaluation-star.tsx
|
|
541
1233
|
var import_component_icons2 = require("@zenkigen-inc/component-icons");
|
|
542
|
-
var
|
|
543
|
-
var
|
|
544
|
-
var
|
|
545
|
-
var
|
|
1234
|
+
var import_component_theme9 = require("@zenkigen-inc/component-theme");
|
|
1235
|
+
var import_clsx14 = __toESM(require("clsx"));
|
|
1236
|
+
var import_react16 = require("react");
|
|
1237
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
546
1238
|
function EvaluationStar({ value, isEditable = false, onChangeRating, size = "medium" }) {
|
|
547
1239
|
const maxRating = 5;
|
|
548
|
-
const [currentRating, setCurrentRating] = (0,
|
|
549
|
-
const handleChangeRating = (0,
|
|
1240
|
+
const [currentRating, setCurrentRating] = (0, import_react16.useState)(value);
|
|
1241
|
+
const handleChangeRating = (0, import_react16.useCallback)(
|
|
550
1242
|
(newRating) => {
|
|
551
1243
|
if (isEditable) {
|
|
552
1244
|
setCurrentRating(newRating);
|
|
@@ -557,72 +1249,30 @@ function EvaluationStar({ value, isEditable = false, onChangeRating, size = "med
|
|
|
557
1249
|
},
|
|
558
1250
|
[isEditable, onChangeRating]
|
|
559
1251
|
);
|
|
560
|
-
const starClasses = (0,
|
|
1252
|
+
const starClasses = (0, import_clsx14.default)(import_component_theme9.focusVisible.inset, { "w-6 h-6": size === "large", "w-4 h-4": size === "medium" });
|
|
561
1253
|
const renderStar = (rating) => {
|
|
562
1254
|
const color = rating <= currentRating ? "fill-yellow-yellow50" : "fill-icon03";
|
|
563
1255
|
const IconComponent = import_component_icons2.iconElements["star-filled"];
|
|
564
|
-
return /* @__PURE__ */ (0,
|
|
1256
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
565
1257
|
"button",
|
|
566
1258
|
{
|
|
567
1259
|
type: "button",
|
|
568
1260
|
onClick: () => handleChangeRating(rating),
|
|
569
|
-
className: (0,
|
|
1261
|
+
className: (0, import_clsx14.default)(color, starClasses),
|
|
570
1262
|
disabled: !isEditable,
|
|
571
|
-
children: /* @__PURE__ */ (0,
|
|
1263
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(IconComponent, {})
|
|
572
1264
|
},
|
|
573
1265
|
rating
|
|
574
1266
|
);
|
|
575
1267
|
};
|
|
576
1268
|
const ratingStars = Array.from({ length: maxRating }, (_, index) => renderStar(index + 1));
|
|
577
|
-
return /* @__PURE__ */ (0,
|
|
578
|
-
}
|
|
579
|
-
|
|
580
|
-
// src/file-input/file-input.tsx
|
|
581
|
-
var import_clsx10 = require("clsx");
|
|
582
|
-
var import_react8 = require("react");
|
|
583
|
-
|
|
584
|
-
// src/icon-button/icon-button.tsx
|
|
585
|
-
var import_component_theme8 = require("@zenkigen-inc/component-theme");
|
|
586
|
-
var import_clsx9 = require("clsx");
|
|
587
|
-
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
588
|
-
function IconButton({
|
|
589
|
-
icon,
|
|
590
|
-
size = "medium",
|
|
591
|
-
variant = "outline",
|
|
592
|
-
isNoPadding = false,
|
|
593
|
-
isDisabled = false,
|
|
594
|
-
isSelected = false,
|
|
595
|
-
...props
|
|
596
|
-
}) {
|
|
597
|
-
const baseClasses = (0, import_clsx9.clsx)(
|
|
598
|
-
"typography-label16regular flex items-center justify-center gap-1 rounded",
|
|
599
|
-
import_component_theme8.buttonColors[variant].hover,
|
|
600
|
-
import_component_theme8.buttonColors[variant].active,
|
|
601
|
-
import_component_theme8.buttonColors[variant].disabled,
|
|
602
|
-
import_component_theme8.focusVisible.normal,
|
|
603
|
-
{
|
|
604
|
-
"h-4 w-4": size === "small" && isNoPadding,
|
|
605
|
-
"h-6 w-6": size === "small" && !isNoPadding || (size === "medium" || size === "large") && isNoPadding,
|
|
606
|
-
"h-8 w-8": size === "medium" && !isNoPadding,
|
|
607
|
-
"h-10 w-10": size === "large" && !isNoPadding,
|
|
608
|
-
"inline-flex": props.isAnchor,
|
|
609
|
-
"pointer-events-none": isDisabled,
|
|
610
|
-
[import_component_theme8.buttonColors[variant].selected]: isSelected,
|
|
611
|
-
[import_component_theme8.buttonColors[variant].base]: !isSelected
|
|
612
|
-
}
|
|
613
|
-
);
|
|
614
|
-
const iconSize = size === "small" ? "small" : "medium";
|
|
615
|
-
if (props.isAnchor === true) {
|
|
616
|
-
const buttonProps = Object.fromEntries(Object.entries(props).filter(([key]) => key !== "isAnchor"));
|
|
617
|
-
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("a", { className: baseClasses, ...buttonProps, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Icon, { name: icon, size: iconSize }) });
|
|
618
|
-
} else {
|
|
619
|
-
const buttonProps = Object.fromEntries(Object.entries(props).filter(([key]) => key !== "isAnchor"));
|
|
620
|
-
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("button", { type: "button", className: baseClasses, disabled: isDisabled, ...buttonProps, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Icon, { name: icon, size: iconSize }) });
|
|
621
|
-
}
|
|
1269
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "flex flex-row", children: ratingStars });
|
|
622
1270
|
}
|
|
623
1271
|
|
|
624
1272
|
// src/file-input/file-input.tsx
|
|
625
|
-
var
|
|
1273
|
+
var import_clsx15 = require("clsx");
|
|
1274
|
+
var import_react17 = require("react");
|
|
1275
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
626
1276
|
var ERROR_TYPES = {
|
|
627
1277
|
SIZE_TOO_LARGE: "SIZE_TOO_LARGE",
|
|
628
1278
|
UNSUPPORTED_FORMAT: "UNSUPPORTED_FORMAT"
|
|
@@ -631,16 +1281,16 @@ var ERROR_MESSAGES = {
|
|
|
631
1281
|
SIZE_TOO_LARGE: "\u30D5\u30A1\u30A4\u30EB\u30B5\u30A4\u30BA\u304C\u5927\u304D\u904E\u304E\u307E\u3059\u3002",
|
|
632
1282
|
UNSUPPORTED_FORMAT: "\u30D5\u30A1\u30A4\u30EB\u5F62\u5F0F\u304C\u6B63\u3057\u304F\u3042\u308A\u307E\u305B\u3093\u3002"
|
|
633
1283
|
};
|
|
634
|
-
var FileInput = (0,
|
|
1284
|
+
var FileInput = (0, import_react17.forwardRef)(
|
|
635
1285
|
({ id, variant, accept, maxSize, isDisabled = false, isError = false, onSelect, onError, errorMessages, ...rest }, ref) => {
|
|
636
1286
|
const size = variant === "button" ? rest.size ?? "medium" : "medium";
|
|
637
|
-
const [selectedFile, setSelectedFile] = (0,
|
|
638
|
-
const [isDragOver, setIsDragOver] = (0,
|
|
639
|
-
const fileInputRef = (0,
|
|
640
|
-
const errorId = (0,
|
|
641
|
-
const fallbackId = (0,
|
|
1287
|
+
const [selectedFile, setSelectedFile] = (0, import_react17.useState)(null);
|
|
1288
|
+
const [isDragOver, setIsDragOver] = (0, import_react17.useState)(false);
|
|
1289
|
+
const fileInputRef = (0, import_react17.useRef)(null);
|
|
1290
|
+
const errorId = (0, import_react17.useId)();
|
|
1291
|
+
const fallbackId = (0, import_react17.useId)();
|
|
642
1292
|
const inputId = id ?? fallbackId;
|
|
643
|
-
const validateFile = (0,
|
|
1293
|
+
const validateFile = (0, import_react17.useCallback)(
|
|
644
1294
|
(file) => {
|
|
645
1295
|
const errors = [];
|
|
646
1296
|
if (maxSize != null && maxSize > 0 && file.size > maxSize) {
|
|
@@ -679,7 +1329,7 @@ var FileInput = (0, import_react8.forwardRef)(
|
|
|
679
1329
|
},
|
|
680
1330
|
[accept, maxSize, onError]
|
|
681
1331
|
);
|
|
682
|
-
const handleFileSelect = (0,
|
|
1332
|
+
const handleFileSelect = (0, import_react17.useCallback)(
|
|
683
1333
|
(file) => {
|
|
684
1334
|
if (file && !validateFile(file)) {
|
|
685
1335
|
return;
|
|
@@ -689,7 +1339,7 @@ var FileInput = (0, import_react8.forwardRef)(
|
|
|
689
1339
|
},
|
|
690
1340
|
[validateFile, onSelect]
|
|
691
1341
|
);
|
|
692
|
-
const handleFileInputChange = (0,
|
|
1342
|
+
const handleFileInputChange = (0, import_react17.useCallback)(
|
|
693
1343
|
(event) => {
|
|
694
1344
|
if (isDisabled) {
|
|
695
1345
|
return;
|
|
@@ -705,7 +1355,7 @@ var FileInput = (0, import_react8.forwardRef)(
|
|
|
705
1355
|
},
|
|
706
1356
|
[isDisabled, handleFileSelect]
|
|
707
1357
|
);
|
|
708
|
-
const handleDragOver = (0,
|
|
1358
|
+
const handleDragOver = (0, import_react17.useCallback)(
|
|
709
1359
|
(event) => {
|
|
710
1360
|
event.preventDefault();
|
|
711
1361
|
if (!isDisabled) {
|
|
@@ -714,11 +1364,11 @@ var FileInput = (0, import_react8.forwardRef)(
|
|
|
714
1364
|
},
|
|
715
1365
|
[isDisabled]
|
|
716
1366
|
);
|
|
717
|
-
const handleDragLeave = (0,
|
|
1367
|
+
const handleDragLeave = (0, import_react17.useCallback)((event) => {
|
|
718
1368
|
event.preventDefault();
|
|
719
1369
|
setIsDragOver(false);
|
|
720
1370
|
}, []);
|
|
721
|
-
const handleDrop = (0,
|
|
1371
|
+
const handleDrop = (0, import_react17.useCallback)(
|
|
722
1372
|
(event) => {
|
|
723
1373
|
event.preventDefault();
|
|
724
1374
|
setIsDragOver(false);
|
|
@@ -730,19 +1380,19 @@ var FileInput = (0, import_react8.forwardRef)(
|
|
|
730
1380
|
},
|
|
731
1381
|
[isDisabled, handleFileSelect]
|
|
732
1382
|
);
|
|
733
|
-
const handleButtonClick = (0,
|
|
1383
|
+
const handleButtonClick = (0, import_react17.useCallback)(() => {
|
|
734
1384
|
if (!isDisabled) {
|
|
735
1385
|
fileInputRef.current?.click();
|
|
736
1386
|
}
|
|
737
1387
|
}, [isDisabled]);
|
|
738
|
-
const handleClear = (0,
|
|
1388
|
+
const handleClear = (0, import_react17.useCallback)(() => {
|
|
739
1389
|
setSelectedFile(null);
|
|
740
1390
|
if (fileInputRef.current) {
|
|
741
1391
|
fileInputRef.current.value = "";
|
|
742
1392
|
}
|
|
743
1393
|
onSelect?.(null);
|
|
744
1394
|
}, [onSelect]);
|
|
745
|
-
(0,
|
|
1395
|
+
(0, import_react17.useImperativeHandle)(
|
|
746
1396
|
ref,
|
|
747
1397
|
() => ({
|
|
748
1398
|
reset: handleClear
|
|
@@ -751,7 +1401,7 @@ var FileInput = (0, import_react8.forwardRef)(
|
|
|
751
1401
|
);
|
|
752
1402
|
const hasErrorMessages = !isDisabled && errorMessages != null && errorMessages.length > 0;
|
|
753
1403
|
const hasErrors = !isDisabled && isError === true;
|
|
754
|
-
const dropzoneClasses = (0,
|
|
1404
|
+
const dropzoneClasses = (0, import_clsx15.clsx)(
|
|
755
1405
|
"flex flex-1 flex-col items-center justify-center gap-4 rounded border border-dashed px-6 text-center",
|
|
756
1406
|
selectedFile ? "py-[52px]" : "py-4",
|
|
757
1407
|
{
|
|
@@ -798,8 +1448,8 @@ var FileInput = (0, import_react8.forwardRef)(
|
|
|
798
1448
|
return normalized.join(", ");
|
|
799
1449
|
})();
|
|
800
1450
|
if (variant === "button") {
|
|
801
|
-
return /* @__PURE__ */ (0,
|
|
802
|
-
/* @__PURE__ */ (0,
|
|
1451
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
1452
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: hasErrors ? "flex-1" : "min-w-0 flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
803
1453
|
InternalButton,
|
|
804
1454
|
{
|
|
805
1455
|
size,
|
|
@@ -807,14 +1457,14 @@ var FileInput = (0, import_react8.forwardRef)(
|
|
|
807
1457
|
isDisabled,
|
|
808
1458
|
width: "100%",
|
|
809
1459
|
onClick: handleButtonClick,
|
|
810
|
-
before: /* @__PURE__ */ (0,
|
|
811
|
-
after: /* @__PURE__ */ (0,
|
|
812
|
-
children: /* @__PURE__ */ (0,
|
|
1460
|
+
before: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Icon, { name: "upload", size: "small" }),
|
|
1461
|
+
after: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_jsx_runtime21.Fragment, { children: selectedFile ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: (0, import_clsx15.clsx)("typography-label12regular truncate", !isDisabled && "text-text01"), children: selectedFile.name }) : "" }),
|
|
1462
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "truncate", children: "\u30D5\u30A1\u30A4\u30EB\u3092\u9078\u629E" })
|
|
813
1463
|
}
|
|
814
1464
|
) }),
|
|
815
|
-
selectedFile && !isDisabled && /* @__PURE__ */ (0,
|
|
816
|
-
hasErrors && hasErrorMessages && /* @__PURE__ */ (0,
|
|
817
|
-
/* @__PURE__ */ (0,
|
|
1465
|
+
selectedFile && !isDisabled && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(IconButton, { variant: "text", icon: "close", size: "small", onClick: handleClear }) }),
|
|
1466
|
+
hasErrors && hasErrorMessages && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { id: errorId, "data-testid": "error-messages", className: "typography-label12regular text-supportError", children: errorMessages.map((message, index) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "break-all", children: message }, index)) }),
|
|
1467
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
818
1468
|
"input",
|
|
819
1469
|
{
|
|
820
1470
|
id: inputId,
|
|
@@ -829,8 +1479,8 @@ var FileInput = (0, import_react8.forwardRef)(
|
|
|
829
1479
|
)
|
|
830
1480
|
] });
|
|
831
1481
|
}
|
|
832
|
-
return /* @__PURE__ */ (0,
|
|
833
|
-
/* @__PURE__ */ (0,
|
|
1482
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex min-w-[320px] flex-col gap-2", children: [
|
|
1483
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
834
1484
|
"div",
|
|
835
1485
|
{
|
|
836
1486
|
className: dropzoneClasses,
|
|
@@ -850,25 +1500,25 @@ var FileInput = (0, import_react8.forwardRef)(
|
|
|
850
1500
|
"aria-disabled": isDisabled,
|
|
851
1501
|
...hasErrors && hasErrorMessages && { "aria-describedby": errorId },
|
|
852
1502
|
children: [
|
|
853
|
-
/* @__PURE__ */ (0,
|
|
854
|
-
!selectedFile && /* @__PURE__ */ (0,
|
|
1503
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Icon, { name: "upload-document", size: "large", color: isDisabled ? "icon03" : "icon01" }),
|
|
1504
|
+
!selectedFile && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "flex flex-col gap-1", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "typography-body13regular select-none", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_jsx_runtime21.Fragment, { children: [
|
|
855
1505
|
"\u3053\u3053\u306B\u30D5\u30A1\u30A4\u30EB\u3092\u30C9\u30ED\u30C3\u30D7\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
|
|
856
|
-
/* @__PURE__ */ (0,
|
|
1506
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("br", {}),
|
|
857
1507
|
"\u307E\u305F\u306F\u3001",
|
|
858
|
-
/* @__PURE__ */ (0,
|
|
1508
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: (0, import_clsx15.clsx)(!isDisabled ? "text-link01" : ""), children: "\u30D5\u30A1\u30A4\u30EB\u3092\u9078\u629E" }),
|
|
859
1509
|
"\u3057\u3066\u304F\u3060\u3055\u3044\u3002"
|
|
860
1510
|
] }) }) }),
|
|
861
|
-
!selectedFile && /* @__PURE__ */ (0,
|
|
862
|
-
/* @__PURE__ */ (0,
|
|
863
|
-
/* @__PURE__ */ (0,
|
|
864
|
-
/* @__PURE__ */ (0,
|
|
865
|
-
/* @__PURE__ */ (0,
|
|
1511
|
+
!selectedFile && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex flex-col gap-1", children: [
|
|
1512
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: (0, import_clsx15.clsx)("typography-label11regular", isDisabled ? "text-textPlaceholder" : "text-text02"), children: "\u5BFE\u5FDC\u5F62\u5F0F" }),
|
|
1513
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: (0, import_clsx15.clsx)("typography-body12regular", isDisabled ? "text-textPlaceholder" : "text-text01"), children: acceptLabel }),
|
|
1514
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: (0, import_clsx15.clsx)("typography-label11regular", isDisabled ? "text-textPlaceholder" : "text-text02"), children: "\u30B5\u30A4\u30BA" }),
|
|
1515
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: (0, import_clsx15.clsx)("typography-body12regular", isDisabled ? "text-textPlaceholder" : "text-text01"), children: maxSizeLabel })
|
|
866
1516
|
] }),
|
|
867
|
-
selectedFile && /* @__PURE__ */ (0,
|
|
868
|
-
/* @__PURE__ */ (0,
|
|
869
|
-
/* @__PURE__ */ (0,
|
|
870
|
-
/* @__PURE__ */ (0,
|
|
871
|
-
!isDisabled && /* @__PURE__ */ (0,
|
|
1517
|
+
selectedFile && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "mt-2 flex flex-col items-center gap-1", children: [
|
|
1518
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "typography-label11regular text-text02", children: "\u30D5\u30A1\u30A4\u30EB\u540D" }),
|
|
1519
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
1520
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "typography-label14regular", children: selectedFile.name }),
|
|
1521
|
+
!isDisabled && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
872
1522
|
IconButton,
|
|
873
1523
|
{
|
|
874
1524
|
variant: "text",
|
|
@@ -882,7 +1532,7 @@ var FileInput = (0, import_react8.forwardRef)(
|
|
|
882
1532
|
)
|
|
883
1533
|
] })
|
|
884
1534
|
] }),
|
|
885
|
-
/* @__PURE__ */ (0,
|
|
1535
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
886
1536
|
"input",
|
|
887
1537
|
{
|
|
888
1538
|
id: inputId,
|
|
@@ -898,13 +1548,13 @@ var FileInput = (0, import_react8.forwardRef)(
|
|
|
898
1548
|
]
|
|
899
1549
|
}
|
|
900
1550
|
),
|
|
901
|
-
hasErrors && hasErrorMessages && /* @__PURE__ */ (0,
|
|
1551
|
+
hasErrors && hasErrorMessages && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
902
1552
|
"div",
|
|
903
1553
|
{
|
|
904
1554
|
id: errorId,
|
|
905
1555
|
"data-testid": "error-messages",
|
|
906
1556
|
className: "typography-body13regular flex flex-col text-supportDanger",
|
|
907
|
-
children: errorMessages.map((message, index) => /* @__PURE__ */ (0,
|
|
1557
|
+
children: errorMessages.map((message, index) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { children: message }, index))
|
|
908
1558
|
}
|
|
909
1559
|
)
|
|
910
1560
|
] });
|
|
@@ -913,16 +1563,16 @@ var FileInput = (0, import_react8.forwardRef)(
|
|
|
913
1563
|
FileInput.displayName = "FileInput";
|
|
914
1564
|
|
|
915
1565
|
// src/heading/heading.tsx
|
|
916
|
-
var
|
|
917
|
-
var
|
|
918
|
-
var
|
|
1566
|
+
var import_component_theme10 = require("@zenkigen-inc/component-theme");
|
|
1567
|
+
var import_clsx16 = require("clsx");
|
|
1568
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
919
1569
|
function Heading(props) {
|
|
920
1570
|
const TagName = `h${props.level}`;
|
|
921
|
-
const classes = (0,
|
|
1571
|
+
const classes = (0, import_clsx16.clsx)(`flex items-center text-text01`, import_component_theme10.typography.heading[TagName], {
|
|
922
1572
|
"gap-2": props.level === 1,
|
|
923
1573
|
"gap-1": props.level > 1
|
|
924
1574
|
});
|
|
925
|
-
return /* @__PURE__ */ (0,
|
|
1575
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(TagName, { className: classes, children: [
|
|
926
1576
|
props.before,
|
|
927
1577
|
props.children,
|
|
928
1578
|
props.after
|
|
@@ -930,22 +1580,22 @@ function Heading(props) {
|
|
|
930
1580
|
}
|
|
931
1581
|
|
|
932
1582
|
// src/hooks/use-roving-focus.ts
|
|
933
|
-
var
|
|
1583
|
+
var import_react18 = require("react");
|
|
934
1584
|
var useRovingFocus = ({
|
|
935
1585
|
values,
|
|
936
1586
|
defaultFocusedValue,
|
|
937
1587
|
isDisabled = false
|
|
938
1588
|
}) => {
|
|
939
|
-
const [focusedValue, setFocusedValue] = (0,
|
|
1589
|
+
const [focusedValue, setFocusedValue] = (0, import_react18.useState)(
|
|
940
1590
|
typeof defaultFocusedValue === "undefined" ? null : defaultFocusedValue
|
|
941
1591
|
);
|
|
942
|
-
const handleFocusChange = (0,
|
|
1592
|
+
const handleFocusChange = (0, import_react18.useCallback)((newValue) => {
|
|
943
1593
|
setFocusedValue(newValue);
|
|
944
1594
|
}, []);
|
|
945
|
-
const handleBlur = (0,
|
|
1595
|
+
const handleBlur = (0, import_react18.useCallback)(() => {
|
|
946
1596
|
setFocusedValue(null);
|
|
947
1597
|
}, []);
|
|
948
|
-
const handleKeyDown = (0,
|
|
1598
|
+
const handleKeyDown = (0, import_react18.useCallback)(
|
|
949
1599
|
(event) => {
|
|
950
1600
|
if (isDisabled === true || values.length === 0) return;
|
|
951
1601
|
const currentIndex = focusedValue !== null && focusedValue !== "" ? values.indexOf(focusedValue) : -1;
|
|
@@ -1000,17 +1650,17 @@ var useRovingFocus = ({
|
|
|
1000
1650
|
};
|
|
1001
1651
|
|
|
1002
1652
|
// src/loading/loading.tsx
|
|
1003
|
-
var
|
|
1004
|
-
var
|
|
1653
|
+
var import_clsx17 = __toESM(require("clsx"));
|
|
1654
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
1005
1655
|
function Loading({ size = "medium", position = "fixed", height = "100%" }) {
|
|
1006
|
-
const wrapperClasses = (0,
|
|
1007
|
-
const svgClasses = (0,
|
|
1656
|
+
const wrapperClasses = (0, import_clsx17.default)(position, "left-0 top-0 z-20 flex w-full items-center justify-center");
|
|
1657
|
+
const svgClasses = (0, import_clsx17.default)({
|
|
1008
1658
|
"h-4 w-4": size === "small",
|
|
1009
1659
|
"h-8 w-8": size === "medium",
|
|
1010
1660
|
"h-16 w-16": size === "large"
|
|
1011
1661
|
});
|
|
1012
|
-
return /* @__PURE__ */ (0,
|
|
1013
|
-
size === "small" && /* @__PURE__ */ (0,
|
|
1662
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_jsx_runtime23.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: wrapperClasses, style: { height }, children: [
|
|
1663
|
+
size === "small" && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("svg", { className: svgClasses, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1014
1664
|
"circle",
|
|
1015
1665
|
{
|
|
1016
1666
|
className: "origin-center animate-circular-small-move stroke-interactive01",
|
|
@@ -1022,7 +1672,7 @@ function Loading({ size = "medium", position = "fixed", height = "100%" }) {
|
|
|
1022
1672
|
fill: "none"
|
|
1023
1673
|
}
|
|
1024
1674
|
) }),
|
|
1025
|
-
size === "medium" && /* @__PURE__ */ (0,
|
|
1675
|
+
size === "medium" && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("svg", { className: svgClasses, viewBox: "0 0 32 32", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1026
1676
|
"circle",
|
|
1027
1677
|
{
|
|
1028
1678
|
className: "origin-center animate-circular-medium-move stroke-interactive01",
|
|
@@ -1034,7 +1684,7 @@ function Loading({ size = "medium", position = "fixed", height = "100%" }) {
|
|
|
1034
1684
|
fill: "none"
|
|
1035
1685
|
}
|
|
1036
1686
|
) }),
|
|
1037
|
-
size === "large" && /* @__PURE__ */ (0,
|
|
1687
|
+
size === "large" && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("svg", { className: svgClasses, viewBox: "0 0 64 64", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1038
1688
|
"circle",
|
|
1039
1689
|
{
|
|
1040
1690
|
className: "origin-center animate-circular-large-move stroke-interactive01",
|
|
@@ -1050,13 +1700,13 @@ function Loading({ size = "medium", position = "fixed", height = "100%" }) {
|
|
|
1050
1700
|
}
|
|
1051
1701
|
|
|
1052
1702
|
// src/modal/modal.tsx
|
|
1053
|
-
var
|
|
1703
|
+
var import_react22 = require("react");
|
|
1054
1704
|
var import_react_dom2 = require("react-dom");
|
|
1055
1705
|
|
|
1056
1706
|
// src/modal/body-scroll-lock.tsx
|
|
1057
|
-
var
|
|
1707
|
+
var import_react19 = require("react");
|
|
1058
1708
|
var BodyScrollLock = () => {
|
|
1059
|
-
(0,
|
|
1709
|
+
(0, import_react19.useLayoutEffect)(() => {
|
|
1060
1710
|
const { scrollX, scrollY } = window;
|
|
1061
1711
|
const { body } = document;
|
|
1062
1712
|
const hasVerticalScrollbar = document.documentElement.scrollHeight > document.documentElement.clientHeight;
|
|
@@ -1101,34 +1751,34 @@ function restoreProperty(element, property, value) {
|
|
|
1101
1751
|
}
|
|
1102
1752
|
|
|
1103
1753
|
// src/modal/modal-body.tsx
|
|
1104
|
-
var
|
|
1754
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
1105
1755
|
function ModalBody({ children }) {
|
|
1106
|
-
return /* @__PURE__ */ (0,
|
|
1756
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "overflow-y-auto", children });
|
|
1107
1757
|
}
|
|
1108
1758
|
|
|
1109
1759
|
// src/modal/modal-context.ts
|
|
1110
|
-
var
|
|
1111
|
-
var ModalContext = (0,
|
|
1760
|
+
var import_react20 = require("react");
|
|
1761
|
+
var ModalContext = (0, import_react20.createContext)({
|
|
1112
1762
|
onClose: () => null
|
|
1113
1763
|
});
|
|
1114
1764
|
|
|
1115
1765
|
// src/modal/modal-footer.tsx
|
|
1116
|
-
var
|
|
1117
|
-
var
|
|
1766
|
+
var import_clsx18 = __toESM(require("clsx"));
|
|
1767
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
1118
1768
|
function ModalFooter({ children, isNoBorder = false }) {
|
|
1119
|
-
const wrapperClasses = (0,
|
|
1769
|
+
const wrapperClasses = (0, import_clsx18.default)("flex w-full shrink-0 items-center rounded-b-lg px-6 py-4", {
|
|
1120
1770
|
"border-t-[1px] border-uiBorder01": !isNoBorder
|
|
1121
1771
|
});
|
|
1122
|
-
return /* @__PURE__ */ (0,
|
|
1772
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: wrapperClasses, children });
|
|
1123
1773
|
}
|
|
1124
1774
|
|
|
1125
1775
|
// src/modal/modal-header.tsx
|
|
1126
|
-
var
|
|
1127
|
-
var
|
|
1128
|
-
var
|
|
1776
|
+
var import_clsx19 = __toESM(require("clsx"));
|
|
1777
|
+
var import_react21 = require("react");
|
|
1778
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
1129
1779
|
function ModalHeader({ children, isNoBorder = false }) {
|
|
1130
|
-
const { onClose } = (0,
|
|
1131
|
-
const headerClasses = (0,
|
|
1780
|
+
const { onClose } = (0, import_react21.useContext)(ModalContext);
|
|
1781
|
+
const headerClasses = (0, import_clsx19.default)(
|
|
1132
1782
|
"typography-h5 flex w-full shrink-0 items-center justify-between rounded-t-lg px-6 text-text01",
|
|
1133
1783
|
{
|
|
1134
1784
|
"border-b border-uiBorder01": !isNoBorder,
|
|
@@ -1136,14 +1786,14 @@ function ModalHeader({ children, isNoBorder = false }) {
|
|
|
1136
1786
|
"h-12": onClose
|
|
1137
1787
|
}
|
|
1138
1788
|
);
|
|
1139
|
-
return /* @__PURE__ */ (0,
|
|
1140
|
-
/* @__PURE__ */ (0,
|
|
1141
|
-
onClose && /* @__PURE__ */ (0,
|
|
1789
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: headerClasses, children: [
|
|
1790
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { children }),
|
|
1791
|
+
onClose && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(IconButton, { icon: "close", size: "small", variant: "text", onClick: onClose })
|
|
1142
1792
|
] });
|
|
1143
1793
|
}
|
|
1144
1794
|
|
|
1145
1795
|
// src/modal/modal.tsx
|
|
1146
|
-
var
|
|
1796
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
1147
1797
|
var LIMIT_WIDTH = 320;
|
|
1148
1798
|
var LIMIT_HEIGHT = 184;
|
|
1149
1799
|
function Modal({
|
|
@@ -1155,16 +1805,16 @@ function Modal({
|
|
|
1155
1805
|
onClose,
|
|
1156
1806
|
portalTargetRef
|
|
1157
1807
|
}) {
|
|
1158
|
-
const [isMounted, setIsMounted] = (0,
|
|
1808
|
+
const [isMounted, setIsMounted] = (0, import_react22.useState)(false);
|
|
1159
1809
|
const renderWidth = typeof width === "number" ? Math.max(width, LIMIT_WIDTH) : width;
|
|
1160
1810
|
const renderHeight = typeof height === "number" ? Math.max(height, LIMIT_HEIGHT) : height;
|
|
1161
|
-
(0,
|
|
1811
|
+
(0, import_react22.useEffect)(() => {
|
|
1162
1812
|
setIsMounted(true);
|
|
1163
1813
|
}, []);
|
|
1164
|
-
return isMounted && isOpen ? /* @__PURE__ */ (0,
|
|
1165
|
-
/* @__PURE__ */ (0,
|
|
1814
|
+
return isMounted && isOpen ? /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_jsx_runtime27.Fragment, { children: [
|
|
1815
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(BodyScrollLock, {}),
|
|
1166
1816
|
(0, import_react_dom2.createPortal)(
|
|
1167
|
-
/* @__PURE__ */ (0,
|
|
1817
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(ModalContext.Provider, { value: { onClose }, children: /* @__PURE__ */ (0, import_jsx_runtime27.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_runtime27.jsx)(
|
|
1168
1818
|
"div",
|
|
1169
1819
|
{
|
|
1170
1820
|
className: "grid max-h-full min-h-[120px] grid-rows-[max-content_1fr_max-content] flex-col rounded-lg bg-uiBackground01 shadow-modalShadow",
|
|
@@ -1181,10 +1831,10 @@ Modal.Header = ModalHeader;
|
|
|
1181
1831
|
Modal.Footer = ModalFooter;
|
|
1182
1832
|
|
|
1183
1833
|
// src/notification-inline/notification-inline.tsx
|
|
1184
|
-
var
|
|
1185
|
-
var
|
|
1834
|
+
var import_clsx20 = require("clsx");
|
|
1835
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
1186
1836
|
function NotificationInline({ state = "default", size = "medium", ...props }) {
|
|
1187
|
-
const wrapperClasses = (0,
|
|
1837
|
+
const wrapperClasses = (0, import_clsx20.clsx)("typography-body13regular flex items-center gap-1 rounded text-text01", {
|
|
1188
1838
|
"bg-uiBackgroundError": state === "attention",
|
|
1189
1839
|
"bg-uiBackgroundWarning": state === "warning",
|
|
1190
1840
|
"bg-uiBackgroundBlue": state === "information",
|
|
@@ -1193,7 +1843,7 @@ function NotificationInline({ state = "default", size = "medium", ...props }) {
|
|
|
1193
1843
|
"p-2": size === "small",
|
|
1194
1844
|
"p-3": size === "medium"
|
|
1195
1845
|
});
|
|
1196
|
-
const iconClasses = (0,
|
|
1846
|
+
const iconClasses = (0, import_clsx20.clsx)("flex items-center", {
|
|
1197
1847
|
"fill-supportError": state === "attention",
|
|
1198
1848
|
"fill-supportWarning": state === "warning",
|
|
1199
1849
|
"fill-blue-blue50": state === "information",
|
|
@@ -1209,28 +1859,28 @@ function NotificationInline({ state = "default", size = "medium", ...props }) {
|
|
|
1209
1859
|
small: "small",
|
|
1210
1860
|
medium: "medium"
|
|
1211
1861
|
};
|
|
1212
|
-
return /* @__PURE__ */ (0,
|
|
1213
|
-
state !== "default" && /* @__PURE__ */ (0,
|
|
1214
|
-
/* @__PURE__ */ (0,
|
|
1215
|
-
props.showClose === true && /* @__PURE__ */ (0,
|
|
1862
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: wrapperClasses, children: [
|
|
1863
|
+
state !== "default" && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: iconClasses, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Icon, { name: iconName[state], size: iconSize[size] }) }),
|
|
1864
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "flex-1", children: props.children }),
|
|
1865
|
+
props.showClose === true && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "flex items-center", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(IconButton, { icon: "close", size: "small", variant: "text", onClick: props.onClickClose }) })
|
|
1216
1866
|
] });
|
|
1217
1867
|
}
|
|
1218
1868
|
|
|
1219
1869
|
// src/pagination/pagination-button.tsx
|
|
1220
|
-
var
|
|
1221
|
-
var
|
|
1870
|
+
var import_clsx21 = require("clsx");
|
|
1871
|
+
var import_react24 = require("react");
|
|
1222
1872
|
|
|
1223
1873
|
// src/pagination/pagination-context.ts
|
|
1224
|
-
var
|
|
1225
|
-
var PaginationContext = (0,
|
|
1874
|
+
var import_react23 = require("react");
|
|
1875
|
+
var PaginationContext = (0, import_react23.createContext)({
|
|
1226
1876
|
currentPage: 0
|
|
1227
1877
|
});
|
|
1228
1878
|
|
|
1229
1879
|
// src/pagination/pagination-button.tsx
|
|
1230
|
-
var
|
|
1880
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
1231
1881
|
function PaginationButton({ page, onClick }) {
|
|
1232
|
-
const { currentPage } = (0,
|
|
1233
|
-
const buttonClasses = (0,
|
|
1882
|
+
const { currentPage } = (0, import_react24.useContext)(PaginationContext);
|
|
1883
|
+
const buttonClasses = (0, import_clsx21.clsx)(
|
|
1234
1884
|
"flex h-8 min-w-8 items-center justify-center rounded fill-icon01 px-1",
|
|
1235
1885
|
"typography-label14regular",
|
|
1236
1886
|
"text-interactive02",
|
|
@@ -1238,11 +1888,11 @@ function PaginationButton({ page, onClick }) {
|
|
|
1238
1888
|
{ "border border-uiBorder02": page === currentPage },
|
|
1239
1889
|
{ "border-transparent": page !== currentPage }
|
|
1240
1890
|
);
|
|
1241
|
-
return /* @__PURE__ */ (0,
|
|
1891
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("button", { type: "button", className: buttonClasses, onClick: () => onClick(page), children: page });
|
|
1242
1892
|
}
|
|
1243
1893
|
|
|
1244
1894
|
// src/pagination/pagination.tsx
|
|
1245
|
-
var
|
|
1895
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
1246
1896
|
var START_PAGE = 1;
|
|
1247
1897
|
function Pagination({ currentPage, totalPage, sideNumPagesToShow = 3, onClick }) {
|
|
1248
1898
|
if (totalPage < START_PAGE) {
|
|
@@ -1278,14 +1928,14 @@ function Pagination({ currentPage, totalPage, sideNumPagesToShow = 3, onClick })
|
|
|
1278
1928
|
const hasHeadEllipsis = firstPageInList !== null && firstPageInList > START_PAGE + 1;
|
|
1279
1929
|
const hasTailEllipsis = lastPageInList !== null && lastPageInList < totalPage - 1;
|
|
1280
1930
|
const hasLastPageButton = totalPage > START_PAGE;
|
|
1281
|
-
return /* @__PURE__ */ (0,
|
|
1931
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1282
1932
|
PaginationContext.Provider,
|
|
1283
1933
|
{
|
|
1284
1934
|
value: {
|
|
1285
1935
|
currentPage: clampedCurrentPage
|
|
1286
1936
|
},
|
|
1287
|
-
children: /* @__PURE__ */ (0,
|
|
1288
|
-
/* @__PURE__ */ (0,
|
|
1937
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("ul", { className: "flex gap-1", children: [
|
|
1938
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("li", { className: "flex items-center", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1289
1939
|
IconButton,
|
|
1290
1940
|
{
|
|
1291
1941
|
isDisabled: isFirstPage,
|
|
@@ -1295,12 +1945,12 @@ function Pagination({ currentPage, totalPage, sideNumPagesToShow = 3, onClick })
|
|
|
1295
1945
|
onClick: () => onClick(Math.max(START_PAGE, clampedCurrentPage - 1))
|
|
1296
1946
|
}
|
|
1297
1947
|
) }),
|
|
1298
|
-
/* @__PURE__ */ (0,
|
|
1299
|
-
hasHeadEllipsis && /* @__PURE__ */ (0,
|
|
1300
|
-
pageList.map((page, index) => /* @__PURE__ */ (0,
|
|
1301
|
-
hasTailEllipsis && /* @__PURE__ */ (0,
|
|
1302
|
-
hasLastPageButton && /* @__PURE__ */ (0,
|
|
1303
|
-
/* @__PURE__ */ (0,
|
|
1948
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(PaginationButton, { onClick: () => onClick(START_PAGE), page: START_PAGE }) }),
|
|
1949
|
+
hasHeadEllipsis && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("li", { className: threeDotIconClasses, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Icon, { name: "more", size: "small" }) }),
|
|
1950
|
+
pageList.map((page, index) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(PaginationButton, { onClick: () => onClick(page), page }) }, index)),
|
|
1951
|
+
hasTailEllipsis && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("li", { className: threeDotIconClasses, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Icon, { name: "more", size: "small" }) }),
|
|
1952
|
+
hasLastPageButton && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(PaginationButton, { onClick: () => onClick(totalPage), page: totalPage }) }),
|
|
1953
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("li", { className: "flex items-center", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1304
1954
|
IconButton,
|
|
1305
1955
|
{
|
|
1306
1956
|
isDisabled: isLastPage,
|
|
@@ -1316,14 +1966,14 @@ function Pagination({ currentPage, totalPage, sideNumPagesToShow = 3, onClick })
|
|
|
1316
1966
|
}
|
|
1317
1967
|
|
|
1318
1968
|
// src/select/select.tsx
|
|
1319
|
-
var
|
|
1320
|
-
var
|
|
1321
|
-
var
|
|
1322
|
-
var
|
|
1969
|
+
var import_react28 = require("@floating-ui/react");
|
|
1970
|
+
var import_component_theme13 = require("@zenkigen-inc/component-theme");
|
|
1971
|
+
var import_clsx24 = __toESM(require("clsx"));
|
|
1972
|
+
var import_react29 = require("react");
|
|
1323
1973
|
|
|
1324
1974
|
// src/select/select-context.ts
|
|
1325
|
-
var
|
|
1326
|
-
var SelectContext = (0,
|
|
1975
|
+
var import_react25 = require("react");
|
|
1976
|
+
var SelectContext = (0, import_react25.createContext)({
|
|
1327
1977
|
size: "medium",
|
|
1328
1978
|
setIsOptionListOpen: () => false,
|
|
1329
1979
|
variant: "outline",
|
|
@@ -1331,19 +1981,19 @@ var SelectContext = (0, import_react16.createContext)({
|
|
|
1331
1981
|
});
|
|
1332
1982
|
|
|
1333
1983
|
// src/select/select-item.tsx
|
|
1334
|
-
var
|
|
1335
|
-
var
|
|
1336
|
-
var
|
|
1337
|
-
var
|
|
1984
|
+
var import_component_theme11 = require("@zenkigen-inc/component-theme");
|
|
1985
|
+
var import_clsx22 = __toESM(require("clsx"));
|
|
1986
|
+
var import_react26 = require("react");
|
|
1987
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
1338
1988
|
function SelectItem({ option }) {
|
|
1339
|
-
const { setIsOptionListOpen, selectedOption, onChange, isError } = (0,
|
|
1989
|
+
const { setIsOptionListOpen, selectedOption, onChange, isError } = (0, import_react26.useContext)(SelectContext);
|
|
1340
1990
|
const handleClickItem = (option2) => {
|
|
1341
1991
|
onChange?.(option2);
|
|
1342
1992
|
setIsOptionListOpen(false);
|
|
1343
1993
|
};
|
|
1344
|
-
const itemClasses = (0,
|
|
1994
|
+
const itemClasses = (0, import_clsx22.default)(
|
|
1345
1995
|
"typography-label14regular flex h-8 w-full items-center px-3 hover:bg-hover02 active:bg-active02",
|
|
1346
|
-
|
|
1996
|
+
import_component_theme11.focusVisible.inset,
|
|
1347
1997
|
{
|
|
1348
1998
|
"text-interactive01 fill-interactive01 bg-selectedUi": option.id === selectedOption?.id && !(isError ?? false),
|
|
1349
1999
|
"text-supportError fill-supportError bg-uiBackgroundError": option.id === selectedOption?.id && isError,
|
|
@@ -1351,25 +2001,25 @@ function SelectItem({ option }) {
|
|
|
1351
2001
|
"pr-10": option.id !== selectedOption?.id
|
|
1352
2002
|
}
|
|
1353
2003
|
);
|
|
1354
|
-
return /* @__PURE__ */ (0,
|
|
1355
|
-
option.icon && /* @__PURE__ */ (0,
|
|
1356
|
-
/* @__PURE__ */ (0,
|
|
1357
|
-
option.id === selectedOption?.id && /* @__PURE__ */ (0,
|
|
2004
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("li", { className: "flex w-full items-center", "data-id": option.id, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("button", { className: itemClasses, type: "button", onClick: () => handleClickItem(option), children: [
|
|
2005
|
+
option.icon && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Icon, { name: option.icon, size: "small" }),
|
|
2006
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "ml-1 flex-1 truncate text-left", children: option.label }),
|
|
2007
|
+
option.id === selectedOption?.id && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "ml-2 flex items-center", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Icon, { name: "check", size: "small" }) })
|
|
1358
2008
|
] }) }, option.id);
|
|
1359
2009
|
}
|
|
1360
2010
|
|
|
1361
2011
|
// src/select/select-list.tsx
|
|
1362
|
-
var
|
|
1363
|
-
var
|
|
1364
|
-
var
|
|
1365
|
-
var
|
|
1366
|
-
var SelectList = (0,
|
|
1367
|
-
const { selectedOption, setIsOptionListOpen, variant, placeholder, onChange, floatingStyles, floatingRef } = (0,
|
|
2012
|
+
var import_component_theme12 = require("@zenkigen-inc/component-theme");
|
|
2013
|
+
var import_clsx23 = __toESM(require("clsx"));
|
|
2014
|
+
var import_react27 = require("react");
|
|
2015
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
2016
|
+
var SelectList = (0, import_react27.forwardRef)(({ children, maxHeight }, ref) => {
|
|
2017
|
+
const { selectedOption, setIsOptionListOpen, variant, placeholder, onChange, floatingStyles, floatingRef } = (0, import_react27.useContext)(SelectContext);
|
|
1368
2018
|
const handleClickDeselect = () => {
|
|
1369
2019
|
onChange?.(null);
|
|
1370
2020
|
setIsOptionListOpen(false);
|
|
1371
2021
|
};
|
|
1372
|
-
(0,
|
|
2022
|
+
(0, import_react27.useLayoutEffect)(() => {
|
|
1373
2023
|
if (maxHeight != null && selectedOption != null) {
|
|
1374
2024
|
const container = floatingRef?.current;
|
|
1375
2025
|
if (container != null) {
|
|
@@ -1387,22 +2037,22 @@ var SelectList = (0, import_react18.forwardRef)(({ children, maxHeight }, ref) =
|
|
|
1387
2037
|
}
|
|
1388
2038
|
}
|
|
1389
2039
|
}, [selectedOption, maxHeight, floatingRef]);
|
|
1390
|
-
const listClasses = (0,
|
|
2040
|
+
const listClasses = (0, import_clsx23.default)("z-dropdown overflow-y-auto rounded bg-uiBackground01 py-2 shadow-floatingShadow", {
|
|
1391
2041
|
"border-solid border border-uiBorder01": variant === "outline"
|
|
1392
2042
|
});
|
|
1393
|
-
const deselectButtonClasses = (0,
|
|
2043
|
+
const deselectButtonClasses = (0, import_clsx23.default)(
|
|
1394
2044
|
"typography-label14regular flex h-8 w-full items-center px-3 text-interactive02 hover:bg-hover02 active:bg-active02",
|
|
1395
|
-
|
|
2045
|
+
import_component_theme12.focusVisible.inset
|
|
1396
2046
|
);
|
|
1397
|
-
return /* @__PURE__ */ (0,
|
|
2047
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("ul", { className: listClasses, style: { maxHeight, ...floatingStyles }, ref, children: [
|
|
1398
2048
|
children,
|
|
1399
|
-
placeholder != null && selectedOption !== null && /* @__PURE__ */ (0,
|
|
2049
|
+
placeholder != null && selectedOption !== null && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("button", { className: deselectButtonClasses, type: "button", onClick: handleClickDeselect, children: "\u9078\u629E\u89E3\u9664" }) })
|
|
1400
2050
|
] });
|
|
1401
2051
|
});
|
|
1402
2052
|
SelectList.displayName = "SelectList";
|
|
1403
2053
|
|
|
1404
2054
|
// src/select/select.tsx
|
|
1405
|
-
var
|
|
2055
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
1406
2056
|
var FLOATING_OFFSET = 4;
|
|
1407
2057
|
function Select({
|
|
1408
2058
|
children,
|
|
@@ -1417,59 +2067,64 @@ function Select({
|
|
|
1417
2067
|
isError = false,
|
|
1418
2068
|
isOptionSelected = false,
|
|
1419
2069
|
onChange,
|
|
1420
|
-
optionListMaxHeight
|
|
2070
|
+
optionListMaxHeight,
|
|
2071
|
+
matchListToTrigger = false
|
|
1421
2072
|
}) {
|
|
1422
|
-
const [isOptionListOpen, setIsOptionListOpen] = (0,
|
|
1423
|
-
const targetRef = (0,
|
|
2073
|
+
const [isOptionListOpen, setIsOptionListOpen] = (0, import_react29.useState)(false);
|
|
2074
|
+
const targetRef = (0, import_react29.useRef)(null);
|
|
1424
2075
|
useOutsideClick(targetRef, () => setIsOptionListOpen(false));
|
|
1425
|
-
const { refs, floatingStyles } = (0,
|
|
2076
|
+
const { refs, floatingStyles } = (0, import_react28.useFloating)({
|
|
1426
2077
|
open: isOptionListOpen,
|
|
1427
2078
|
onOpenChange: setIsOptionListOpen,
|
|
1428
2079
|
placement: "bottom-start",
|
|
1429
2080
|
middleware: [
|
|
1430
|
-
(0,
|
|
1431
|
-
(0,
|
|
2081
|
+
(0, import_react28.offset)(FLOATING_OFFSET),
|
|
2082
|
+
(0, import_react28.size)({
|
|
1432
2083
|
apply({ availableWidth, elements, rects }) {
|
|
1433
2084
|
const referenceWidth = rects.reference.width;
|
|
1434
|
-
|
|
1435
|
-
|
|
2085
|
+
if (matchListToTrigger) {
|
|
2086
|
+
elements.floating.style.width = `${referenceWidth}px`;
|
|
2087
|
+
} else {
|
|
2088
|
+
elements.floating.style.minWidth = `${referenceWidth}px`;
|
|
2089
|
+
elements.floating.style.maxWidth = `${availableWidth}px`;
|
|
2090
|
+
}
|
|
1436
2091
|
}
|
|
1437
2092
|
})
|
|
1438
2093
|
],
|
|
1439
|
-
whileElementsMounted:
|
|
2094
|
+
whileElementsMounted: import_react28.autoUpdate
|
|
1440
2095
|
});
|
|
1441
2096
|
const handleClickToggle = () => setIsOptionListOpen((prev) => !prev);
|
|
1442
2097
|
const buttonVariant = isError && !isDisabled ? `${variant}Error` : variant;
|
|
1443
2098
|
const isSelected = isOptionSelected && !isDisabled && selectedOption !== null && !isError;
|
|
1444
|
-
const wrapperClasses = (0,
|
|
2099
|
+
const wrapperClasses = (0, import_clsx24.default)("relative flex shrink-0 items-center gap-1 rounded bg-uiBackground01", {
|
|
1445
2100
|
"h-6": size === "x-small" || size === "small",
|
|
1446
2101
|
"h-8": size === "medium",
|
|
1447
2102
|
"h-10": size === "large",
|
|
1448
2103
|
"cursor-not-allowed": isDisabled
|
|
1449
2104
|
});
|
|
1450
|
-
const buttonClasses = (0,
|
|
2105
|
+
const buttonClasses = (0, import_clsx24.default)(
|
|
1451
2106
|
"flex size-full items-center rounded",
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
2107
|
+
import_component_theme13.selectColors[buttonVariant].hover,
|
|
2108
|
+
import_component_theme13.selectColors[buttonVariant].active,
|
|
2109
|
+
import_component_theme13.selectColors[buttonVariant].disabled,
|
|
2110
|
+
import_component_theme13.focusVisible.normal,
|
|
1456
2111
|
{
|
|
1457
|
-
[
|
|
1458
|
-
[
|
|
2112
|
+
[import_component_theme13.selectColors[buttonVariant].selected]: isSelected,
|
|
2113
|
+
[import_component_theme13.selectColors[buttonVariant].base]: !isSelected,
|
|
1459
2114
|
"px-2": size === "x-small" || size === "small",
|
|
1460
2115
|
"px-4": size === "medium" || size === "large",
|
|
1461
2116
|
"pointer-events-none": isDisabled,
|
|
1462
2117
|
"border-supportError": !isSelected && !isDisabled && isError
|
|
1463
2118
|
}
|
|
1464
2119
|
);
|
|
1465
|
-
const labelClasses = (0,
|
|
2120
|
+
const labelClasses = (0, import_clsx24.default)("overflow-hidden", {
|
|
1466
2121
|
"mr-1": size === "x-small",
|
|
1467
2122
|
"mr-2": size !== "x-small",
|
|
1468
2123
|
"typography-label12regular": size === "x-small",
|
|
1469
2124
|
"typography-label14regular": size === "small" || size === "medium",
|
|
1470
2125
|
"typography-label16regular": size === "large"
|
|
1471
2126
|
});
|
|
1472
|
-
return /* @__PURE__ */ (0,
|
|
2127
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
1473
2128
|
SelectContext.Provider,
|
|
1474
2129
|
{
|
|
1475
2130
|
value: {
|
|
@@ -1483,8 +2138,8 @@ function Select({
|
|
|
1483
2138
|
floatingStyles,
|
|
1484
2139
|
floatingRef: refs.floating
|
|
1485
2140
|
},
|
|
1486
|
-
children: /* @__PURE__ */ (0,
|
|
1487
|
-
/* @__PURE__ */ (0,
|
|
2141
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: wrapperClasses, style: { width, maxWidth }, ref: targetRef, children: [
|
|
2142
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
1488
2143
|
"button",
|
|
1489
2144
|
{
|
|
1490
2145
|
ref: refs.setReference,
|
|
@@ -1493,9 +2148,9 @@ function Select({
|
|
|
1493
2148
|
onClick: handleClickToggle,
|
|
1494
2149
|
disabled: isDisabled,
|
|
1495
2150
|
children: [
|
|
1496
|
-
selectedOption?.icon ? /* @__PURE__ */ (0,
|
|
1497
|
-
/* @__PURE__ */ (0,
|
|
1498
|
-
/* @__PURE__ */ (0,
|
|
2151
|
+
selectedOption?.icon ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "mr-1 flex", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Icon, { name: selectedOption.icon, size: size === "large" ? "medium" : "small" }) }) : placeholder != null && placeholderIcon && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "mr-1 flex", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Icon, { name: placeholderIcon, size: size === "large" ? "medium" : "small" }) }),
|
|
2152
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: labelClasses, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "truncate", children: selectedOption ? selectedOption.label : placeholder != null && placeholder }) }),
|
|
2153
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "ml-auto flex items-center", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
1499
2154
|
Icon,
|
|
1500
2155
|
{
|
|
1501
2156
|
name: isOptionListOpen ? "angle-small-up" : "angle-small-down",
|
|
@@ -1505,7 +2160,7 @@ function Select({
|
|
|
1505
2160
|
]
|
|
1506
2161
|
}
|
|
1507
2162
|
),
|
|
1508
|
-
isOptionListOpen && !isDisabled && /* @__PURE__ */ (0,
|
|
2163
|
+
isOptionListOpen && !isDisabled && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_react28.FloatingPortal, { children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "relative z-overlay", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(SelectList, { ref: refs.setFloating, maxHeight: optionListMaxHeight, children }) }) })
|
|
1509
2164
|
] })
|
|
1510
2165
|
}
|
|
1511
2166
|
);
|
|
@@ -1513,7 +2168,7 @@ function Select({
|
|
|
1513
2168
|
Select.Option = SelectItem;
|
|
1514
2169
|
|
|
1515
2170
|
// src/pagination-select/pagination-select.tsx
|
|
1516
|
-
var
|
|
2171
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
1517
2172
|
function PaginationSelect({
|
|
1518
2173
|
totalSize,
|
|
1519
2174
|
currentPage,
|
|
@@ -1536,20 +2191,20 @@ function PaginationSelect({
|
|
|
1536
2191
|
});
|
|
1537
2192
|
const minCount = totalSize ? (currentPage - 1) * sizePerPage + 1 : 0;
|
|
1538
2193
|
const maxCount = currentPage * sizePerPage > totalSize ? totalSize : currentPage * sizePerPage;
|
|
1539
|
-
return /* @__PURE__ */ (0,
|
|
1540
|
-
/* @__PURE__ */ (0,
|
|
1541
|
-
/* @__PURE__ */ (0,
|
|
1542
|
-
/* @__PURE__ */ (0,
|
|
2194
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("nav", { "aria-label": "pagination", className: "flex items-center gap-x-1", children: [
|
|
2195
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex items-center gap-x-2", children: [
|
|
2196
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "typography-label14regular flex gap-1 text-text01", children: [
|
|
2197
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("span", { className: " ", children: [
|
|
1543
2198
|
minCount > 0 && `${minCount} - `,
|
|
1544
2199
|
maxCount
|
|
1545
2200
|
] }),
|
|
1546
|
-
/* @__PURE__ */ (0,
|
|
2201
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("span", { children: [
|
|
1547
2202
|
"/ ",
|
|
1548
2203
|
totalSize
|
|
1549
2204
|
] }),
|
|
1550
|
-
/* @__PURE__ */ (0,
|
|
2205
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { children: countLabel })
|
|
1551
2206
|
] }),
|
|
1552
|
-
/* @__PURE__ */ (0,
|
|
2207
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1553
2208
|
Select,
|
|
1554
2209
|
{
|
|
1555
2210
|
size: "medium",
|
|
@@ -1558,17 +2213,17 @@ function PaginationSelect({
|
|
|
1558
2213
|
optionListMaxHeight,
|
|
1559
2214
|
onChange: (option) => option && onChange(Number(option.value)),
|
|
1560
2215
|
isDisabled: pageMax === 0,
|
|
1561
|
-
children: optionsList.map((option) => /* @__PURE__ */ (0,
|
|
2216
|
+
children: optionsList.map((option) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Select.Option, { option }, option.id))
|
|
1562
2217
|
}
|
|
1563
2218
|
),
|
|
1564
|
-
/* @__PURE__ */ (0,
|
|
2219
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "typography-label14regular text-text02", children: [
|
|
1565
2220
|
"/ ",
|
|
1566
2221
|
pageMax,
|
|
1567
2222
|
pageLabel
|
|
1568
2223
|
] })
|
|
1569
2224
|
] }),
|
|
1570
|
-
/* @__PURE__ */ (0,
|
|
1571
|
-
/* @__PURE__ */ (0,
|
|
2225
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex items-center", children: [
|
|
2226
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1572
2227
|
IconButton,
|
|
1573
2228
|
{
|
|
1574
2229
|
variant: "text",
|
|
@@ -1578,7 +2233,7 @@ function PaginationSelect({
|
|
|
1578
2233
|
onClick: onClickPrevButton
|
|
1579
2234
|
}
|
|
1580
2235
|
),
|
|
1581
|
-
/* @__PURE__ */ (0,
|
|
2236
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1582
2237
|
IconButton,
|
|
1583
2238
|
{
|
|
1584
2239
|
variant: "text",
|
|
@@ -1593,17 +2248,17 @@ function PaginationSelect({
|
|
|
1593
2248
|
}
|
|
1594
2249
|
|
|
1595
2250
|
// src/password-input/password-input.tsx
|
|
1596
|
-
var
|
|
2251
|
+
var import_react34 = require("react");
|
|
1597
2252
|
|
|
1598
2253
|
// src/text-input/text-input.tsx
|
|
1599
|
-
var
|
|
1600
|
-
var
|
|
2254
|
+
var import_clsx27 = require("clsx");
|
|
2255
|
+
var import_react33 = require("react");
|
|
1601
2256
|
|
|
1602
2257
|
// src/text-input/text-input-context.tsx
|
|
1603
|
-
var
|
|
1604
|
-
var TextInputCompoundContext = (0,
|
|
2258
|
+
var import_react30 = require("react");
|
|
2259
|
+
var TextInputCompoundContext = (0, import_react30.createContext)(null);
|
|
1605
2260
|
var useTextInputCompoundContext = (componentName) => {
|
|
1606
|
-
const context = (0,
|
|
2261
|
+
const context = (0, import_react30.useContext)(TextInputCompoundContext);
|
|
1607
2262
|
if (context == null) {
|
|
1608
2263
|
throw new Error(`${componentName} \u3092\u4F7F\u7528\u3059\u308B\u306B\u306F TextInput \u306E\u5B50\u8981\u7D20\u3068\u3057\u3066\u914D\u7F6E\u3059\u308B\u5FC5\u8981\u304C\u3042\u308B\u3002`);
|
|
1609
2264
|
}
|
|
@@ -1611,10 +2266,10 @@ var useTextInputCompoundContext = (componentName) => {
|
|
|
1611
2266
|
};
|
|
1612
2267
|
|
|
1613
2268
|
// src/text-input/text-input-error-message.tsx
|
|
1614
|
-
var
|
|
1615
|
-
var
|
|
1616
|
-
var
|
|
1617
|
-
var TextInputErrorMessage = (0,
|
|
2269
|
+
var import_clsx25 = require("clsx");
|
|
2270
|
+
var import_react31 = require("react");
|
|
2271
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
2272
|
+
var TextInputErrorMessage = (0, import_react31.forwardRef)(
|
|
1618
2273
|
({ "aria-live": ariaLive = "assertive", ...props }, ref) => {
|
|
1619
2274
|
const { inputProps } = useTextInputCompoundContext("TextInput.ErrorMessage");
|
|
1620
2275
|
const typographyClass = inputProps.size === "large" ? "typography-label12regular" : "typography-label11regular";
|
|
@@ -1622,26 +2277,26 @@ var TextInputErrorMessage = (0, import_react22.forwardRef)(
|
|
|
1622
2277
|
if (!shouldRender) {
|
|
1623
2278
|
return null;
|
|
1624
2279
|
}
|
|
1625
|
-
const errorMessageClassName = (0,
|
|
1626
|
-
return /* @__PURE__ */ (0,
|
|
2280
|
+
const errorMessageClassName = (0, import_clsx25.clsx)(typographyClass, "text-supportError");
|
|
2281
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { ref, className: errorMessageClassName, "aria-live": ariaLive, ...props });
|
|
1627
2282
|
}
|
|
1628
2283
|
);
|
|
1629
2284
|
TextInputErrorMessage.displayName = "TextInput.ErrorMessage";
|
|
1630
2285
|
|
|
1631
2286
|
// src/text-input/text-input-helper-message.tsx
|
|
1632
|
-
var
|
|
1633
|
-
var
|
|
1634
|
-
var
|
|
1635
|
-
var TextInputHelperMessage = (0,
|
|
2287
|
+
var import_clsx26 = require("clsx");
|
|
2288
|
+
var import_react32 = require("react");
|
|
2289
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
2290
|
+
var TextInputHelperMessage = (0, import_react32.forwardRef)((props, ref) => {
|
|
1636
2291
|
const { inputProps } = useTextInputCompoundContext("TextInput.HelperMessage");
|
|
1637
2292
|
const typographyClass = inputProps.size === "large" ? "typography-label12regular" : "typography-label11regular";
|
|
1638
|
-
const helperMessageClassName = (0,
|
|
1639
|
-
return /* @__PURE__ */ (0,
|
|
2293
|
+
const helperMessageClassName = (0, import_clsx26.clsx)(typographyClass, "text-text02");
|
|
2294
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { ref, className: helperMessageClassName, ...props });
|
|
1640
2295
|
});
|
|
1641
2296
|
TextInputHelperMessage.displayName = "TextInput.HelperMessage";
|
|
1642
2297
|
|
|
1643
2298
|
// src/text-input/text-input.tsx
|
|
1644
|
-
var
|
|
2299
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
1645
2300
|
function TextInputInner({
|
|
1646
2301
|
size = "medium",
|
|
1647
2302
|
isError = false,
|
|
@@ -1651,9 +2306,9 @@ function TextInputInner({
|
|
|
1651
2306
|
children,
|
|
1652
2307
|
...props
|
|
1653
2308
|
}, ref) {
|
|
1654
|
-
const autoGeneratedId = (0,
|
|
2309
|
+
const autoGeneratedId = (0, import_react33.useId)();
|
|
1655
2310
|
const { className: _className, ...restInputProps } = props;
|
|
1656
|
-
const inputPropsForContext = (0,
|
|
2311
|
+
const inputPropsForContext = (0, import_react33.useMemo)(
|
|
1657
2312
|
() => ({
|
|
1658
2313
|
...restInputProps,
|
|
1659
2314
|
size,
|
|
@@ -1664,7 +2319,7 @@ function TextInputInner({
|
|
|
1664
2319
|
}),
|
|
1665
2320
|
[restInputProps, size, isError, disabled, onClickClearButton, after]
|
|
1666
2321
|
);
|
|
1667
|
-
const contextValue = (0,
|
|
2322
|
+
const contextValue = (0, import_react33.useMemo)(
|
|
1668
2323
|
() => ({
|
|
1669
2324
|
inputProps: inputPropsForContext,
|
|
1670
2325
|
forwardedRef: ref
|
|
@@ -1674,363 +2329,171 @@ function TextInputInner({
|
|
|
1674
2329
|
const helperMessageIds = [];
|
|
1675
2330
|
const errorIds = [];
|
|
1676
2331
|
const describedByBaseId = restInputProps.id ?? autoGeneratedId;
|
|
1677
|
-
const enhancedChildren =
|
|
1678
|
-
if (!(0,
|
|
2332
|
+
const enhancedChildren = import_react33.Children.map(children, (child) => {
|
|
2333
|
+
if (!(0, import_react33.isValidElement)(child)) {
|
|
1679
2334
|
return child;
|
|
1680
2335
|
}
|
|
1681
2336
|
if (child.type === TextInputHelperMessage) {
|
|
1682
2337
|
const helperChild = child;
|
|
1683
2338
|
const assignedId = helperChild.props.id ?? `${describedByBaseId}-helper-${helperMessageIds.length + 1}`;
|
|
1684
2339
|
helperMessageIds.push(assignedId);
|
|
1685
|
-
return (0,
|
|
1686
|
-
}
|
|
1687
|
-
if (child.type === TextInputErrorMessage && isError) {
|
|
1688
|
-
const errorChild = child;
|
|
1689
|
-
const assignedId = errorChild.props.id ?? `${describedByBaseId}-error-${errorIds.length + 1}`;
|
|
1690
|
-
errorIds.push(assignedId);
|
|
1691
|
-
return (0, import_react24.cloneElement)(errorChild, { id: assignedId });
|
|
1692
|
-
}
|
|
1693
|
-
return child;
|
|
1694
|
-
});
|
|
1695
|
-
const describedByFromProps = typeof restInputProps["aria-describedby"] === "string" ? restInputProps["aria-describedby"] : null;
|
|
1696
|
-
const describedByList = [describedByFromProps, ...helperMessageIds, ...errorIds].filter(
|
|
1697
|
-
(id) => typeof id === "string" && id.trim().length > 0
|
|
1698
|
-
);
|
|
1699
|
-
const describedByProps = describedByList.length > 0 ? {
|
|
1700
|
-
"aria-describedby": describedByList.join(" ")
|
|
1701
|
-
} : {};
|
|
1702
|
-
const shouldMarkInvalid = isError === true || errorIds.length > 0;
|
|
1703
|
-
const ariaInvalidFromProps = restInputProps["aria-invalid"];
|
|
1704
|
-
const ariaInvalidValue = ariaInvalidFromProps != null ? ariaInvalidFromProps : shouldMarkInvalid ? true : null;
|
|
1705
|
-
const ariaInvalidProps = ariaInvalidValue == null ? {} : { "aria-invalid": ariaInvalidValue };
|
|
1706
|
-
const mergedInputProps = {
|
|
1707
|
-
...restInputProps,
|
|
1708
|
-
...describedByProps,
|
|
1709
|
-
...ariaInvalidProps,
|
|
1710
|
-
disabled
|
|
1711
|
-
};
|
|
1712
|
-
const isShowClearButton = !!onClickClearButton && restInputProps.value.length !== 0 && !disabled;
|
|
1713
|
-
const hasTrailingElement = isShowClearButton || after != null;
|
|
1714
|
-
const inputWrapClasses = (0, import_clsx22.clsx)("relative flex items-center gap-2 overflow-hidden rounded border", {
|
|
1715
|
-
"border-uiBorder02": !isError && !disabled,
|
|
1716
|
-
"border-supportError": isError && !disabled,
|
|
1717
|
-
"hover:border-hoverInput": !disabled && !isError,
|
|
1718
|
-
"hover:focus-within:border-activeInput": !isError,
|
|
1719
|
-
"focus-within:border-activeInput": !isError,
|
|
1720
|
-
"bg-disabled02 border-disabled01": disabled,
|
|
1721
|
-
"pr-2": size === "medium" && hasTrailingElement,
|
|
1722
|
-
"pr-3": size === "large" && hasTrailingElement
|
|
1723
|
-
});
|
|
1724
|
-
const inputClasses = (0, import_clsx22.clsx)("flex-1 outline-0 placeholder:text-textPlaceholder disabled:text-textPlaceholder", {
|
|
1725
|
-
["typography-label14regular min-h-8 px-2"]: size === "medium",
|
|
1726
|
-
["typography-label16regular min-h-10 px-3"]: size === "large",
|
|
1727
|
-
"text-text01": !isError,
|
|
1728
|
-
"text-supportError": isError,
|
|
1729
|
-
"pr-0": hasTrailingElement
|
|
1730
|
-
});
|
|
1731
|
-
const inputElement = /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: inputWrapClasses, children: [
|
|
1732
|
-
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("input", { ref, size: 1, className: inputClasses, ...mergedInputProps }),
|
|
1733
|
-
after,
|
|
1734
|
-
isShowClearButton && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(IconButton, { variant: "text", icon: "close", size: "small", onClick: onClickClearButton })
|
|
1735
|
-
] });
|
|
1736
|
-
const stackedChildren = enhancedChildren == null ? [] : import_react24.Children.toArray(enhancedChildren);
|
|
1737
|
-
const hasMessageChildren = stackedChildren.length > 0;
|
|
1738
|
-
if (!hasMessageChildren) {
|
|
1739
|
-
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(TextInputCompoundContext.Provider, { value: contextValue, children: inputElement });
|
|
1740
|
-
}
|
|
1741
|
-
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(TextInputCompoundContext.Provider, { value: contextValue, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
1742
|
-
inputElement,
|
|
1743
|
-
stackedChildren
|
|
1744
|
-
] }) });
|
|
1745
|
-
}
|
|
1746
|
-
var attachStatics = (component) => {
|
|
1747
|
-
component.HelperMessage = TextInputHelperMessage;
|
|
1748
|
-
component.ErrorMessage = TextInputErrorMessage;
|
|
1749
|
-
component.displayName = "TextInput";
|
|
1750
|
-
return component;
|
|
1751
|
-
};
|
|
1752
|
-
var TextInputPublic = (0, import_react24.forwardRef)(function TextInputPublic2(props, ref) {
|
|
1753
|
-
return TextInputInner(props, ref);
|
|
1754
|
-
});
|
|
1755
|
-
var InternalTextInputBase = (0, import_react24.forwardRef)(
|
|
1756
|
-
function InternalTextInputBase2(props, ref) {
|
|
1757
|
-
return TextInputInner(props, ref);
|
|
1758
|
-
}
|
|
1759
|
-
);
|
|
1760
|
-
var TextInput = attachStatics(TextInputPublic);
|
|
1761
|
-
var InternalTextInput = attachStatics(InternalTextInputBase);
|
|
1762
|
-
|
|
1763
|
-
// src/password-input/password-input.tsx
|
|
1764
|
-
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
1765
|
-
var PasswordInputBase = (0, import_react25.forwardRef)(function PasswordInput({ disabled = false, children, ...props }, ref) {
|
|
1766
|
-
const [isPasswordVisible, setIsPasswordVisible] = (0, import_react25.useState)(false);
|
|
1767
|
-
const { className: _className, ...textInputProps } = props;
|
|
1768
|
-
const handlePasswordVisibilityToggle = () => {
|
|
1769
|
-
setIsPasswordVisible((prev) => !prev);
|
|
1770
|
-
};
|
|
1771
|
-
const passwordToggleButton = /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1772
|
-
IconButton,
|
|
1773
|
-
{
|
|
1774
|
-
variant: "text",
|
|
1775
|
-
icon: isPasswordVisible === true ? "visibility-off" : "visibility",
|
|
1776
|
-
size: "small",
|
|
1777
|
-
onClick: handlePasswordVisibilityToggle,
|
|
1778
|
-
isDisabled: disabled,
|
|
1779
|
-
"aria-label": isPasswordVisible === true ? "\u30D1\u30B9\u30EF\u30FC\u30C9\u3092\u975E\u8868\u793A\u306B\u3059\u308B" : "\u30D1\u30B9\u30EF\u30FC\u30C9\u3092\u8868\u793A\u3059\u308B"
|
|
1780
|
-
}
|
|
1781
|
-
);
|
|
1782
|
-
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1783
|
-
InternalTextInput,
|
|
1784
|
-
{
|
|
1785
|
-
ref,
|
|
1786
|
-
type: isPasswordVisible === true ? "text" : "password",
|
|
1787
|
-
disabled,
|
|
1788
|
-
after: passwordToggleButton,
|
|
1789
|
-
...textInputProps,
|
|
1790
|
-
children
|
|
1791
|
-
}
|
|
1792
|
-
);
|
|
1793
|
-
});
|
|
1794
|
-
var PasswordInput2 = Object.assign(PasswordInputBase, {
|
|
1795
|
-
HelperMessage: TextInputHelperMessage,
|
|
1796
|
-
ErrorMessage: TextInputErrorMessage,
|
|
1797
|
-
displayName: "PasswordInput"
|
|
1798
|
-
});
|
|
1799
|
-
|
|
1800
|
-
// src/popover/popover.tsx
|
|
1801
|
-
var import_react30 = require("@floating-ui/react");
|
|
1802
|
-
var import_react31 = require("react");
|
|
1803
|
-
|
|
1804
|
-
// src/popover/popover-content.tsx
|
|
1805
|
-
var import_react27 = require("@floating-ui/react");
|
|
1806
|
-
var React = __toESM(require("react"));
|
|
1807
|
-
var import_react28 = require("react");
|
|
1808
|
-
|
|
1809
|
-
// src/utils/react-utils.ts
|
|
1810
|
-
function composeRefs(...refs) {
|
|
1811
|
-
return (node) => {
|
|
1812
|
-
for (const ref of refs) {
|
|
1813
|
-
if (ref == null) {
|
|
1814
|
-
continue;
|
|
1815
|
-
}
|
|
1816
|
-
if (typeof ref === "function") {
|
|
1817
|
-
ref(node);
|
|
1818
|
-
} else {
|
|
1819
|
-
ref.current = node;
|
|
1820
|
-
}
|
|
1821
|
-
}
|
|
1822
|
-
};
|
|
1823
|
-
}
|
|
1824
|
-
function isElement(node) {
|
|
1825
|
-
return node != null && typeof node === "object" && "type" in node;
|
|
1826
|
-
}
|
|
1827
|
-
|
|
1828
|
-
// src/popover/popover-context.ts
|
|
1829
|
-
var import_react26 = require("react");
|
|
1830
|
-
var PopoverContext = (0, import_react26.createContext)(null);
|
|
1831
|
-
var usePopoverContext = () => {
|
|
1832
|
-
const context = (0, import_react26.useContext)(PopoverContext);
|
|
1833
|
-
if (context == null) {
|
|
1834
|
-
throw new Error("Popover components must be used inside <Popover.Root>");
|
|
1835
|
-
}
|
|
1836
|
-
return context;
|
|
1837
|
-
};
|
|
1838
|
-
|
|
1839
|
-
// src/popover/popover-content.tsx
|
|
1840
|
-
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
1841
|
-
var PopoverContent = (0, import_react28.forwardRef)(function PopoverContent2({ children }, ref) {
|
|
1842
|
-
const { isOpen, triggerRef, floating, panelId, onClose } = usePopoverContext();
|
|
1843
|
-
const shouldCloseOnOutsidePress = (0, import_react28.useCallback)(
|
|
1844
|
-
(event) => {
|
|
1845
|
-
const target = event.target;
|
|
1846
|
-
if (!(target instanceof Element)) {
|
|
1847
|
-
return true;
|
|
1848
|
-
}
|
|
1849
|
-
const floatingElement = floating.refs.floating.current;
|
|
1850
|
-
const closestOverlay = target.closest(".z-overlay, .z-dropdown");
|
|
1851
|
-
if (closestOverlay !== null && floatingElement instanceof Element) {
|
|
1852
|
-
const isInsideOwnFloating = floatingElement.contains(closestOverlay);
|
|
1853
|
-
return isInsideOwnFloating;
|
|
1854
|
-
}
|
|
1855
|
-
return true;
|
|
1856
|
-
},
|
|
1857
|
-
[floating.refs.floating]
|
|
1858
|
-
);
|
|
1859
|
-
const dismiss = (0, import_react27.useDismiss)(floating.context, {
|
|
1860
|
-
outsidePressEvent: "pointerdown",
|
|
1861
|
-
outsidePress: shouldCloseOnOutsidePress,
|
|
1862
|
-
escapeKey: false
|
|
1863
|
-
});
|
|
1864
|
-
const interactions = (0, import_react27.useInteractions)([dismiss, (0, import_react27.useRole)(floating.context, { role: "dialog" })]);
|
|
1865
|
-
(0, import_react28.useEffect)(() => {
|
|
1866
|
-
if (isOpen) {
|
|
1867
|
-
const element = floating.refs.floating.current;
|
|
1868
|
-
element?.focus?.({ preventScroll: true });
|
|
1869
|
-
}
|
|
1870
|
-
}, [isOpen, floating.refs.floating]);
|
|
1871
|
-
(0, import_react28.useEffect)(() => {
|
|
1872
|
-
if (!isOpen) {
|
|
1873
|
-
triggerRef.current?.focus({ preventScroll: true });
|
|
1874
|
-
}
|
|
1875
|
-
}, [isOpen, triggerRef]);
|
|
1876
|
-
const handleKeyDown = (0, import_react28.useCallback)(
|
|
1877
|
-
(event) => {
|
|
1878
|
-
if (event.key === "Escape") {
|
|
1879
|
-
event.stopPropagation();
|
|
1880
|
-
if (onClose != null) {
|
|
1881
|
-
onClose({ reason: "escape-key-down" });
|
|
1882
|
-
}
|
|
1883
|
-
}
|
|
1884
|
-
},
|
|
1885
|
-
[onClose]
|
|
1886
|
-
);
|
|
1887
|
-
let wrappedChildren = children;
|
|
1888
|
-
if (isElement(children)) {
|
|
1889
|
-
const childProps = children.props;
|
|
1890
|
-
wrappedChildren = React.cloneElement(children, {
|
|
1891
|
-
...childProps,
|
|
1892
|
-
...childProps.id == null && { id: panelId },
|
|
1893
|
-
...childProps.role == null && { role: "dialog" }
|
|
1894
|
-
});
|
|
1895
|
-
}
|
|
1896
|
-
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react27.FloatingPortal, { children: isOpen ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
1897
|
-
"div",
|
|
1898
|
-
{
|
|
1899
|
-
...interactions.getFloatingProps({
|
|
1900
|
-
ref: composeRefs(floating.refs.setFloating, ref),
|
|
1901
|
-
tabIndex: -1,
|
|
1902
|
-
onKeyDown: handleKeyDown,
|
|
1903
|
-
style: {
|
|
1904
|
-
position: floating.strategy,
|
|
1905
|
-
top: floating.y ?? 0,
|
|
1906
|
-
left: floating.x ?? 0,
|
|
1907
|
-
outline: "0"
|
|
1908
|
-
}
|
|
1909
|
-
}),
|
|
1910
|
-
children: wrappedChildren
|
|
1911
|
-
}
|
|
1912
|
-
) : null });
|
|
1913
|
-
});
|
|
1914
|
-
|
|
1915
|
-
// src/popover/popover-trigger.tsx
|
|
1916
|
-
var React2 = __toESM(require("react"));
|
|
1917
|
-
var import_react29 = require("react");
|
|
1918
|
-
var PopoverTrigger = (0, import_react29.forwardRef)(function PopoverTrigger2({ children }, ref) {
|
|
1919
|
-
const { isOpen, floating, triggerRef, anchorRef, panelId } = usePopoverContext();
|
|
1920
|
-
if (!isElement(children)) {
|
|
1921
|
-
return null;
|
|
1922
|
-
}
|
|
1923
|
-
const handleTriggerRef = (node) => {
|
|
1924
|
-
triggerRef.current = node;
|
|
1925
|
-
if (anchorRef == null) {
|
|
1926
|
-
floating.refs.setReference(node);
|
|
1927
|
-
}
|
|
1928
|
-
if (typeof ref === "function") {
|
|
1929
|
-
ref(node);
|
|
1930
|
-
} else if (ref != null) {
|
|
1931
|
-
ref.current = node;
|
|
2340
|
+
return (0, import_react33.cloneElement)(helperChild, { id: assignedId });
|
|
1932
2341
|
}
|
|
2342
|
+
if (child.type === TextInputErrorMessage && isError) {
|
|
2343
|
+
const errorChild = child;
|
|
2344
|
+
const assignedId = errorChild.props.id ?? `${describedByBaseId}-error-${errorIds.length + 1}`;
|
|
2345
|
+
errorIds.push(assignedId);
|
|
2346
|
+
return (0, import_react33.cloneElement)(errorChild, { id: assignedId });
|
|
2347
|
+
}
|
|
2348
|
+
return child;
|
|
2349
|
+
});
|
|
2350
|
+
const describedByFromProps = typeof restInputProps["aria-describedby"] === "string" ? restInputProps["aria-describedby"] : null;
|
|
2351
|
+
const describedByList = [describedByFromProps, ...helperMessageIds, ...errorIds].filter(
|
|
2352
|
+
(id) => typeof id === "string" && id.trim().length > 0
|
|
2353
|
+
);
|
|
2354
|
+
const describedByProps = describedByList.length > 0 ? {
|
|
2355
|
+
"aria-describedby": describedByList.join(" ")
|
|
2356
|
+
} : {};
|
|
2357
|
+
const shouldMarkInvalid = isError === true || errorIds.length > 0;
|
|
2358
|
+
const ariaInvalidFromProps = restInputProps["aria-invalid"];
|
|
2359
|
+
const ariaInvalidValue = ariaInvalidFromProps != null ? ariaInvalidFromProps : shouldMarkInvalid ? true : null;
|
|
2360
|
+
const ariaInvalidProps = ariaInvalidValue == null ? {} : { "aria-invalid": ariaInvalidValue };
|
|
2361
|
+
const mergedInputProps = {
|
|
2362
|
+
...restInputProps,
|
|
2363
|
+
...describedByProps,
|
|
2364
|
+
...ariaInvalidProps,
|
|
2365
|
+
disabled
|
|
1933
2366
|
};
|
|
1934
|
-
const
|
|
1935
|
-
const
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
"
|
|
1940
|
-
"
|
|
1941
|
-
"
|
|
2367
|
+
const isShowClearButton = !!onClickClearButton && restInputProps.value.length !== 0 && !disabled;
|
|
2368
|
+
const hasTrailingElement = isShowClearButton || after != null;
|
|
2369
|
+
const inputWrapClasses = (0, import_clsx27.clsx)("relative flex items-center gap-2 overflow-hidden rounded border", {
|
|
2370
|
+
"border-uiBorder02": !isError && !disabled,
|
|
2371
|
+
"border-supportError": isError && !disabled,
|
|
2372
|
+
"hover:border-hoverInput": !disabled && !isError,
|
|
2373
|
+
"hover:focus-within:border-activeInput": !isError,
|
|
2374
|
+
"focus-within:border-activeInput": !isError,
|
|
2375
|
+
"bg-disabled02 border-disabled01": disabled,
|
|
2376
|
+
"pr-2": size === "medium" && hasTrailingElement,
|
|
2377
|
+
"pr-3": size === "large" && hasTrailingElement
|
|
2378
|
+
});
|
|
2379
|
+
const inputClasses = (0, import_clsx27.clsx)("flex-1 outline-0 placeholder:text-textPlaceholder disabled:text-textPlaceholder", {
|
|
2380
|
+
["typography-label14regular min-h-8 px-2"]: size === "medium",
|
|
2381
|
+
["typography-label16regular min-h-10 px-3"]: size === "large",
|
|
2382
|
+
"text-text01": !isError,
|
|
2383
|
+
"text-supportError": isError,
|
|
2384
|
+
"pr-0": hasTrailingElement
|
|
1942
2385
|
});
|
|
2386
|
+
const inputElement = /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: inputWrapClasses, children: [
|
|
2387
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("input", { ref, size: 1, className: inputClasses, ...mergedInputProps }),
|
|
2388
|
+
after,
|
|
2389
|
+
isShowClearButton && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(IconButton, { variant: "text", icon: "close", size: "small", onClick: onClickClearButton })
|
|
2390
|
+
] });
|
|
2391
|
+
const stackedChildren = enhancedChildren == null ? [] : import_react33.Children.toArray(enhancedChildren);
|
|
2392
|
+
const hasMessageChildren = stackedChildren.length > 0;
|
|
2393
|
+
if (!hasMessageChildren) {
|
|
2394
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(TextInputCompoundContext.Provider, { value: contextValue, children: inputElement });
|
|
2395
|
+
}
|
|
2396
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(TextInputCompoundContext.Provider, { value: contextValue, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
2397
|
+
inputElement,
|
|
2398
|
+
stackedChildren
|
|
2399
|
+
] }) });
|
|
2400
|
+
}
|
|
2401
|
+
var attachStatics = (component) => {
|
|
2402
|
+
component.HelperMessage = TextInputHelperMessage;
|
|
2403
|
+
component.ErrorMessage = TextInputErrorMessage;
|
|
2404
|
+
component.displayName = "TextInput";
|
|
2405
|
+
return component;
|
|
2406
|
+
};
|
|
2407
|
+
var TextInputPublic = (0, import_react33.forwardRef)(function TextInputPublic2(props, ref) {
|
|
2408
|
+
return TextInputInner(props, ref);
|
|
1943
2409
|
});
|
|
2410
|
+
var InternalTextInputBase = (0, import_react33.forwardRef)(
|
|
2411
|
+
function InternalTextInputBase2(props, ref) {
|
|
2412
|
+
return TextInputInner(props, ref);
|
|
2413
|
+
}
|
|
2414
|
+
);
|
|
2415
|
+
var TextInput = attachStatics(TextInputPublic);
|
|
2416
|
+
var InternalTextInput = attachStatics(InternalTextInputBase);
|
|
1944
2417
|
|
|
1945
|
-
// src/
|
|
1946
|
-
var
|
|
1947
|
-
function
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
},
|
|
1963
|
-
placement,
|
|
1964
|
-
middleware: [(0, import_react30.offset)(offsetValue)],
|
|
1965
|
-
whileElementsMounted: import_react30.autoUpdate,
|
|
1966
|
-
strategy: "fixed"
|
|
1967
|
-
});
|
|
1968
|
-
(0, import_react31.useEffect)(() => {
|
|
1969
|
-
if (anchorRef?.current) {
|
|
1970
|
-
floating.refs.setReference(anchorRef.current);
|
|
2418
|
+
// src/password-input/password-input.tsx
|
|
2419
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
2420
|
+
var PasswordInputBase = (0, import_react34.forwardRef)(function PasswordInput({ disabled = false, children, ...props }, ref) {
|
|
2421
|
+
const [isPasswordVisible, setIsPasswordVisible] = (0, import_react34.useState)(false);
|
|
2422
|
+
const { className: _className, ...textInputProps } = props;
|
|
2423
|
+
const handlePasswordVisibilityToggle = () => {
|
|
2424
|
+
setIsPasswordVisible((prev) => !prev);
|
|
2425
|
+
};
|
|
2426
|
+
const passwordToggleButton = /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
2427
|
+
IconButton,
|
|
2428
|
+
{
|
|
2429
|
+
variant: "text",
|
|
2430
|
+
icon: isPasswordVisible === true ? "visibility-off" : "visibility",
|
|
2431
|
+
size: "small",
|
|
2432
|
+
onClick: handlePasswordVisibilityToggle,
|
|
2433
|
+
isDisabled: disabled,
|
|
2434
|
+
"aria-label": isPasswordVisible === true ? "\u30D1\u30B9\u30EF\u30FC\u30C9\u3092\u975E\u8868\u793A\u306B\u3059\u308B" : "\u30D1\u30B9\u30EF\u30FC\u30C9\u3092\u8868\u793A\u3059\u308B"
|
|
1971
2435
|
}
|
|
1972
|
-
}, [anchorRef, floating.refs]);
|
|
1973
|
-
const contentId = (0, import_react30.useId)() ?? "";
|
|
1974
|
-
const panelId = `${contentId}-panel`;
|
|
1975
|
-
const contextValue = (0, import_react31.useMemo)(
|
|
1976
|
-
() => ({
|
|
1977
|
-
isOpen,
|
|
1978
|
-
triggerRef,
|
|
1979
|
-
anchorRef,
|
|
1980
|
-
floating,
|
|
1981
|
-
contentId,
|
|
1982
|
-
panelId,
|
|
1983
|
-
onClose
|
|
1984
|
-
}),
|
|
1985
|
-
[isOpen, triggerRef, anchorRef, floating, contentId, panelId, onClose]
|
|
1986
2436
|
);
|
|
1987
|
-
return /* @__PURE__ */ (0,
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
2437
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
2438
|
+
InternalTextInput,
|
|
2439
|
+
{
|
|
2440
|
+
ref,
|
|
2441
|
+
type: isPasswordVisible === true ? "text" : "password",
|
|
2442
|
+
disabled,
|
|
2443
|
+
after: passwordToggleButton,
|
|
2444
|
+
...textInputProps,
|
|
2445
|
+
children
|
|
2446
|
+
}
|
|
2447
|
+
);
|
|
2448
|
+
});
|
|
2449
|
+
var PasswordInput2 = Object.assign(PasswordInputBase, {
|
|
2450
|
+
HelperMessage: TextInputHelperMessage,
|
|
2451
|
+
ErrorMessage: TextInputErrorMessage,
|
|
2452
|
+
displayName: "PasswordInput"
|
|
2453
|
+
});
|
|
1991
2454
|
|
|
1992
2455
|
// src/popup/popup.tsx
|
|
1993
|
-
var
|
|
2456
|
+
var import_react37 = require("react");
|
|
1994
2457
|
|
|
1995
2458
|
// src/popup/popup-body.tsx
|
|
1996
|
-
var
|
|
2459
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
1997
2460
|
function PopupBody({ children }) {
|
|
1998
|
-
return /* @__PURE__ */ (0,
|
|
2461
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "overflow-y-auto", children });
|
|
1999
2462
|
}
|
|
2000
2463
|
|
|
2001
2464
|
// src/popup/popup-context.ts
|
|
2002
|
-
var
|
|
2003
|
-
var PopupContext = (0,
|
|
2465
|
+
var import_react35 = require("react");
|
|
2466
|
+
var PopupContext = (0, import_react35.createContext)({
|
|
2004
2467
|
isOpen: false,
|
|
2005
2468
|
onClose: () => null
|
|
2006
2469
|
});
|
|
2007
2470
|
|
|
2008
2471
|
// src/popup/popup-footer.tsx
|
|
2009
|
-
var
|
|
2472
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
2010
2473
|
function PopupFooter({ children }) {
|
|
2011
|
-
return /* @__PURE__ */ (0,
|
|
2474
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "flex w-full shrink-0 items-center rounded-b-lg px-6 py-3", children });
|
|
2012
2475
|
}
|
|
2013
2476
|
|
|
2014
2477
|
// src/popup/popup-header.tsx
|
|
2015
|
-
var
|
|
2016
|
-
var
|
|
2478
|
+
var import_react36 = require("react");
|
|
2479
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
2017
2480
|
function PopupHeader({ children, before }) {
|
|
2018
|
-
const { onClose } = (0,
|
|
2019
|
-
return /* @__PURE__ */ (0,
|
|
2020
|
-
/* @__PURE__ */ (0,
|
|
2481
|
+
const { onClose } = (0, import_react36.useContext)(PopupContext);
|
|
2482
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "typography-h5 flex h-12 w-full shrink-0 items-start justify-between rounded-t-lg px-6 pt-3 text-text01", children: [
|
|
2483
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "flex items-center gap-1", children: [
|
|
2021
2484
|
before,
|
|
2022
2485
|
children
|
|
2023
2486
|
] }),
|
|
2024
|
-
onClose && /* @__PURE__ */ (0,
|
|
2487
|
+
onClose && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(IconButton, { icon: "close", size: "small", variant: "text", onClick: onClose })
|
|
2025
2488
|
] });
|
|
2026
2489
|
}
|
|
2027
2490
|
|
|
2028
2491
|
// src/popup/popup.tsx
|
|
2029
|
-
var
|
|
2492
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
2030
2493
|
var LIMIT_WIDTH2 = 320;
|
|
2031
2494
|
var LIMIT_HEIGHT2 = 184;
|
|
2032
2495
|
function useOptionalPopoverContext() {
|
|
2033
|
-
return (0,
|
|
2496
|
+
return (0, import_react37.useContext)(PopoverContext);
|
|
2034
2497
|
}
|
|
2035
2498
|
function Popup({ children, isOpen: controlledIsOpen, width = 480, height, onClose }) {
|
|
2036
2499
|
const renderWidth = typeof width === "number" ? Math.max(width, LIMIT_WIDTH2) : width;
|
|
@@ -2041,7 +2504,7 @@ function Popup({ children, isOpen: controlledIsOpen, width = 480, height, onClos
|
|
|
2041
2504
|
if (!isOpen) {
|
|
2042
2505
|
return null;
|
|
2043
2506
|
}
|
|
2044
|
-
return /* @__PURE__ */ (0,
|
|
2507
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(PopupContext.Provider, { value: { isOpen, onClose }, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
2045
2508
|
"div",
|
|
2046
2509
|
{
|
|
2047
2510
|
className: "grid max-h-full grid-rows-[max-content_1fr_max-content] flex-col rounded-lg bg-uiBackground01 shadow-floatingShadow",
|
|
@@ -2055,29 +2518,29 @@ Popup.Header = PopupHeader;
|
|
|
2055
2518
|
Popup.Footer = PopupFooter;
|
|
2056
2519
|
|
|
2057
2520
|
// src/radio/radio.tsx
|
|
2058
|
-
var
|
|
2059
|
-
var
|
|
2060
|
-
var
|
|
2061
|
-
var
|
|
2521
|
+
var import_component_theme14 = require("@zenkigen-inc/component-theme");
|
|
2522
|
+
var import_clsx28 = __toESM(require("clsx"));
|
|
2523
|
+
var import_react38 = require("react");
|
|
2524
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
2062
2525
|
function Radio({ name, value, id, label, isChecked = false, isDisabled = false, onChange }) {
|
|
2063
|
-
const [isMouseOver, setIsMouseOver] = (0,
|
|
2064
|
-
const handleMouseOverInput = (0,
|
|
2526
|
+
const [isMouseOver, setIsMouseOver] = (0, import_react38.useState)(false);
|
|
2527
|
+
const handleMouseOverInput = (0, import_react38.useCallback)(() => {
|
|
2065
2528
|
setIsMouseOver(true);
|
|
2066
2529
|
}, []);
|
|
2067
|
-
const handleMouseOutInput = (0,
|
|
2530
|
+
const handleMouseOutInput = (0, import_react38.useCallback)(() => {
|
|
2068
2531
|
setIsMouseOver(false);
|
|
2069
2532
|
}, []);
|
|
2070
|
-
const handleChange = (0,
|
|
2533
|
+
const handleChange = (0, import_react38.useCallback)(
|
|
2071
2534
|
(e) => !isDisabled && onChange?.(e),
|
|
2072
2535
|
[isDisabled, onChange]
|
|
2073
2536
|
);
|
|
2074
|
-
const inputClasses = (0,
|
|
2537
|
+
const inputClasses = (0, import_clsx28.default)("peer absolute z-[1] size-6 opacity-0", {
|
|
2075
2538
|
"cursor-not-allowed": isDisabled,
|
|
2076
2539
|
"cursor-pointer": !isDisabled
|
|
2077
2540
|
});
|
|
2078
|
-
const boxClasses = (0,
|
|
2541
|
+
const boxClasses = (0, import_clsx28.default)(
|
|
2079
2542
|
"inline-flex size-5 items-center justify-center rounded-full border border-solid bg-white",
|
|
2080
|
-
|
|
2543
|
+
import_component_theme14.focusVisible.normalPeer,
|
|
2081
2544
|
{
|
|
2082
2545
|
"border-disabled01 hover:border-disabled01": isDisabled && !isMouseOver,
|
|
2083
2546
|
"border-hoverUiBorder": !isDisabled && isMouseOver,
|
|
@@ -2086,22 +2549,22 @@ function Radio({ name, value, id, label, isChecked = false, isDisabled = false,
|
|
|
2086
2549
|
"cursor-pointer": !isDisabled
|
|
2087
2550
|
}
|
|
2088
2551
|
);
|
|
2089
|
-
const afterClasses = (0,
|
|
2552
|
+
const afterClasses = (0, import_clsx28.default)("absolute inset-0 m-auto block size-3 rounded-full", {
|
|
2090
2553
|
"bg-disabled01": isDisabled && isChecked,
|
|
2091
2554
|
"bg-activeSelectedUi": !isDisabled && isChecked,
|
|
2092
2555
|
"scale-0": !isChecked,
|
|
2093
2556
|
"scale-100": isChecked
|
|
2094
2557
|
});
|
|
2095
|
-
const hoverIndicatorClasses = (0,
|
|
2558
|
+
const hoverIndicatorClasses = (0, import_clsx28.default)("inline-block size-3 rounded-full", {
|
|
2096
2559
|
"bg-hoverUi": !isDisabled && !isChecked && isMouseOver
|
|
2097
2560
|
});
|
|
2098
|
-
const labelClasses = (0,
|
|
2561
|
+
const labelClasses = (0, import_clsx28.default)("typography-label14regular ml-2 flex-[1_0_0] select-none break-all", {
|
|
2099
2562
|
"pointer-events-none cursor-not-allowed text-disabled01": isDisabled,
|
|
2100
2563
|
"cursor-pointer text-text01": !isDisabled
|
|
2101
2564
|
});
|
|
2102
|
-
return /* @__PURE__ */ (0,
|
|
2103
|
-
/* @__PURE__ */ (0,
|
|
2104
|
-
/* @__PURE__ */ (0,
|
|
2565
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "flex items-center", children: [
|
|
2566
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "flex size-6 items-center justify-center", children: [
|
|
2567
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
2105
2568
|
"input",
|
|
2106
2569
|
{
|
|
2107
2570
|
type: "checkbox",
|
|
@@ -2116,32 +2579,32 @@ function Radio({ name, value, id, label, isChecked = false, isDisabled = false,
|
|
|
2116
2579
|
className: inputClasses
|
|
2117
2580
|
}
|
|
2118
2581
|
),
|
|
2119
|
-
/* @__PURE__ */ (0,
|
|
2120
|
-
/* @__PURE__ */ (0,
|
|
2121
|
-
/* @__PURE__ */ (0,
|
|
2582
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: boxClasses, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "relative flex size-5 flex-[0_0_auto] items-center justify-center", children: [
|
|
2583
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: afterClasses }),
|
|
2584
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: hoverIndicatorClasses })
|
|
2122
2585
|
] }) })
|
|
2123
2586
|
] }),
|
|
2124
|
-
/* @__PURE__ */ (0,
|
|
2587
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("label", { htmlFor: id, className: labelClasses, children: label })
|
|
2125
2588
|
] });
|
|
2126
2589
|
}
|
|
2127
2590
|
|
|
2128
2591
|
// src/search/search.tsx
|
|
2129
|
-
var
|
|
2130
|
-
var
|
|
2131
|
-
var
|
|
2132
|
-
var Search = (0,
|
|
2133
|
-
const classes = (0,
|
|
2592
|
+
var import_clsx29 = require("clsx");
|
|
2593
|
+
var import_react39 = require("react");
|
|
2594
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
2595
|
+
var Search = (0, import_react39.forwardRef)(({ width = "100%", size = "medium", ...props }, ref) => {
|
|
2596
|
+
const classes = (0, import_clsx29.clsx)(
|
|
2134
2597
|
"flex items-center rounded-full border border-uiBorder02 bg-uiBackground01 focus-within:border-activeInput",
|
|
2135
2598
|
{ "h-8 px-3": size === "medium" },
|
|
2136
2599
|
{ "h-10 px-4": size === "large" }
|
|
2137
2600
|
);
|
|
2138
|
-
const inputClasses = (0,
|
|
2601
|
+
const inputClasses = (0, import_clsx29.clsx)("mx-2 h-full flex-1 text-text01 outline-0 placeholder:text-textPlaceholder", {
|
|
2139
2602
|
["typography-label14regular"]: size === "medium",
|
|
2140
2603
|
["typography-label16regular"]: size === "large"
|
|
2141
2604
|
});
|
|
2142
|
-
return /* @__PURE__ */ (0,
|
|
2143
|
-
/* @__PURE__ */ (0,
|
|
2144
|
-
/* @__PURE__ */ (0,
|
|
2605
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "relative", ref, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("form", { onSubmit: props.onSubmit, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: classes, style: { width }, children: [
|
|
2606
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Icon, { name: "search", color: "icon01", size: "medium" }),
|
|
2607
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
2145
2608
|
"input",
|
|
2146
2609
|
{
|
|
2147
2610
|
type: "text",
|
|
@@ -2152,7 +2615,7 @@ var Search = (0, import_react36.forwardRef)(({ width = "100%", size = "medium",
|
|
|
2152
2615
|
onChange: props.onChange
|
|
2153
2616
|
}
|
|
2154
2617
|
),
|
|
2155
|
-
props.onClickClearButton && props.value && props.value.length !== 0 && /* @__PURE__ */ (0,
|
|
2618
|
+
props.onClickClearButton && props.value && props.value.length !== 0 && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
2156
2619
|
IconButton,
|
|
2157
2620
|
{
|
|
2158
2621
|
variant: "text",
|
|
@@ -2167,17 +2630,17 @@ var Search = (0, import_react36.forwardRef)(({ width = "100%", size = "medium",
|
|
|
2167
2630
|
Search.displayName = "Search";
|
|
2168
2631
|
|
|
2169
2632
|
// src/segmented-control/segmented-control.tsx
|
|
2170
|
-
var
|
|
2633
|
+
var import_react42 = __toESM(require("react"));
|
|
2171
2634
|
|
|
2172
2635
|
// src/segmented-control/segmented-control-context.ts
|
|
2173
|
-
var
|
|
2174
|
-
var SegmentedControlContext = (0,
|
|
2636
|
+
var import_react40 = require("react");
|
|
2637
|
+
var SegmentedControlContext = (0, import_react40.createContext)(null);
|
|
2175
2638
|
|
|
2176
2639
|
// src/segmented-control/segmented-control-item.tsx
|
|
2177
|
-
var
|
|
2178
|
-
var
|
|
2179
|
-
var
|
|
2180
|
-
var
|
|
2640
|
+
var import_component_theme15 = require("@zenkigen-inc/component-theme");
|
|
2641
|
+
var import_clsx30 = require("clsx");
|
|
2642
|
+
var import_react41 = require("react");
|
|
2643
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
2181
2644
|
var SegmentedControlItem = ({
|
|
2182
2645
|
label,
|
|
2183
2646
|
value,
|
|
@@ -2186,9 +2649,9 @@ var SegmentedControlItem = ({
|
|
|
2186
2649
|
"aria-label": ariaLabel,
|
|
2187
2650
|
...rest
|
|
2188
2651
|
}) => {
|
|
2189
|
-
const context = (0,
|
|
2190
|
-
const buttonRef = (0,
|
|
2191
|
-
const lastInteractionWasMouse = (0,
|
|
2652
|
+
const context = (0, import_react41.useContext)(SegmentedControlContext);
|
|
2653
|
+
const buttonRef = (0, import_react41.useRef)(null);
|
|
2654
|
+
const lastInteractionWasMouse = (0, import_react41.useRef)(false);
|
|
2192
2655
|
if (context === null) {
|
|
2193
2656
|
throw new Error("SegmentedControl.Item must be used within SegmentedControl");
|
|
2194
2657
|
}
|
|
@@ -2204,7 +2667,7 @@ var SegmentedControlItem = ({
|
|
|
2204
2667
|
const isSelected = value === selectedValue;
|
|
2205
2668
|
const isFocused = value === focusedValue;
|
|
2206
2669
|
const isOptionDisabled = isContextDisabled || itemDisabled === true;
|
|
2207
|
-
(0,
|
|
2670
|
+
(0, import_react41.useEffect)(() => {
|
|
2208
2671
|
if (isFocused === true && buttonRef.current !== null) {
|
|
2209
2672
|
buttonRef.current.focus();
|
|
2210
2673
|
}
|
|
@@ -2226,7 +2689,7 @@ var SegmentedControlItem = ({
|
|
|
2226
2689
|
lastInteractionWasMouse.current = false;
|
|
2227
2690
|
onBlur?.();
|
|
2228
2691
|
};
|
|
2229
|
-
const buttonClasses = (0,
|
|
2692
|
+
const buttonClasses = (0, import_clsx30.clsx)("relative flex items-center justify-center gap-1 rounded", import_component_theme15.focusVisible.normal, {
|
|
2230
2693
|
"px-2 min-h-[24px] typography-label12regular": size === "small",
|
|
2231
2694
|
"px-4 min-h-[32px] typography-label14regular": size === "medium",
|
|
2232
2695
|
// States - Default with hover
|
|
@@ -2236,7 +2699,7 @@ var SegmentedControlItem = ({
|
|
|
2236
2699
|
// States - Disabled
|
|
2237
2700
|
"text-disabled01 bg-transparent": isOptionDisabled === true
|
|
2238
2701
|
});
|
|
2239
|
-
return /* @__PURE__ */ (0,
|
|
2702
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
2240
2703
|
"button",
|
|
2241
2704
|
{
|
|
2242
2705
|
ref: buttonRef,
|
|
@@ -2253,25 +2716,25 @@ var SegmentedControlItem = ({
|
|
|
2253
2716
|
onMouseDown: handleMouseDown,
|
|
2254
2717
|
...rest,
|
|
2255
2718
|
children: [
|
|
2256
|
-
Boolean(icon) === true && icon && /* @__PURE__ */ (0,
|
|
2719
|
+
Boolean(icon) === true && icon && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
2257
2720
|
"span",
|
|
2258
2721
|
{
|
|
2259
|
-
className: (0,
|
|
2722
|
+
className: (0, import_clsx30.clsx)("flex items-center", {
|
|
2260
2723
|
"fill-disabled01": isOptionDisabled === true,
|
|
2261
2724
|
"fill-interactive01": isSelected === true && isOptionDisabled === false,
|
|
2262
2725
|
"fill-icon01": isSelected === false && isOptionDisabled === false
|
|
2263
2726
|
}),
|
|
2264
|
-
children: /* @__PURE__ */ (0,
|
|
2727
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Icon, { name: icon, size: "small" })
|
|
2265
2728
|
}
|
|
2266
2729
|
),
|
|
2267
|
-
Boolean(label) === true && /* @__PURE__ */ (0,
|
|
2730
|
+
Boolean(label) === true && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "whitespace-nowrap", children: label })
|
|
2268
2731
|
]
|
|
2269
2732
|
}
|
|
2270
2733
|
);
|
|
2271
2734
|
};
|
|
2272
2735
|
|
|
2273
2736
|
// src/segmented-control/segmented-control.tsx
|
|
2274
|
-
var
|
|
2737
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
2275
2738
|
var SegmentedControl = ({
|
|
2276
2739
|
children,
|
|
2277
2740
|
value,
|
|
@@ -2281,15 +2744,15 @@ var SegmentedControl = ({
|
|
|
2281
2744
|
"aria-label": ariaLabel,
|
|
2282
2745
|
...rest
|
|
2283
2746
|
}) => {
|
|
2284
|
-
const containerRef = (0,
|
|
2285
|
-
const itemIds =
|
|
2286
|
-
if (!
|
|
2747
|
+
const containerRef = (0, import_react42.useRef)(null);
|
|
2748
|
+
const itemIds = import_react42.Children.toArray(children).filter((child) => {
|
|
2749
|
+
if (!import_react42.default.isValidElement(child) || typeof child.props !== "object" || child.props === null || !("value" in child.props)) {
|
|
2287
2750
|
return false;
|
|
2288
2751
|
}
|
|
2289
2752
|
const props = child.props;
|
|
2290
2753
|
return props.isDisabled !== true;
|
|
2291
2754
|
}).map((child) => child.props.value);
|
|
2292
|
-
const childrenCount =
|
|
2755
|
+
const childrenCount = import_react42.Children.count(children);
|
|
2293
2756
|
const containerStyle = { gridTemplateColumns: `repeat(${childrenCount}, minmax(0,1fr))` };
|
|
2294
2757
|
const {
|
|
2295
2758
|
focusedValue,
|
|
@@ -2316,7 +2779,7 @@ var SegmentedControl = ({
|
|
|
2316
2779
|
onBlur: handleBlurRovingFocus,
|
|
2317
2780
|
values: itemIds
|
|
2318
2781
|
};
|
|
2319
|
-
return /* @__PURE__ */ (0,
|
|
2782
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_jsx_runtime46.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(SegmentedControlContext.Provider, { value: contextValue, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
2320
2783
|
"div",
|
|
2321
2784
|
{
|
|
2322
2785
|
ref: containerRef,
|
|
@@ -2333,37 +2796,37 @@ var SegmentedControl = ({
|
|
|
2333
2796
|
SegmentedControl.Item = SegmentedControlItem;
|
|
2334
2797
|
|
|
2335
2798
|
// src/select-sort/select-sort.tsx
|
|
2336
|
-
var
|
|
2337
|
-
var
|
|
2338
|
-
var
|
|
2799
|
+
var import_component_theme18 = require("@zenkigen-inc/component-theme");
|
|
2800
|
+
var import_clsx33 = __toESM(require("clsx"));
|
|
2801
|
+
var import_react43 = require("react");
|
|
2339
2802
|
|
|
2340
2803
|
// src/select-sort/select-list.tsx
|
|
2341
|
-
var
|
|
2342
|
-
var
|
|
2804
|
+
var import_component_theme17 = require("@zenkigen-inc/component-theme");
|
|
2805
|
+
var import_clsx32 = __toESM(require("clsx"));
|
|
2343
2806
|
|
|
2344
2807
|
// src/select-sort/select-item.tsx
|
|
2345
|
-
var
|
|
2346
|
-
var
|
|
2347
|
-
var
|
|
2808
|
+
var import_component_theme16 = require("@zenkigen-inc/component-theme");
|
|
2809
|
+
var import_clsx31 = __toESM(require("clsx"));
|
|
2810
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
2348
2811
|
function SelectItem2({ children, isSortKey, onClickItem }) {
|
|
2349
|
-
const itemClasses = (0,
|
|
2812
|
+
const itemClasses = (0, import_clsx31.default)(
|
|
2350
2813
|
"typography-label14regular flex h-8 w-full items-center px-3 hover:bg-hover02 active:bg-active02",
|
|
2351
|
-
|
|
2814
|
+
import_component_theme16.focusVisible.inset,
|
|
2352
2815
|
{
|
|
2353
2816
|
"bg-selectedUi fill-interactive01 text-interactive01": isSortKey,
|
|
2354
2817
|
"bg-uiBackground01 fill-icon01 text-interactive02": !isSortKey
|
|
2355
2818
|
}
|
|
2356
2819
|
);
|
|
2357
|
-
return /* @__PURE__ */ (0,
|
|
2358
|
-
/* @__PURE__ */ (0,
|
|
2359
|
-
isSortKey && /* @__PURE__ */ (0,
|
|
2820
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("li", { className: "flex w-full items-center", onClick: onClickItem, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("button", { className: itemClasses, type: "button", children: [
|
|
2821
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "ml-1 mr-6", children }),
|
|
2822
|
+
isSortKey && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "ml-auto flex items-center", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Icon, { name: "check", size: "small" }) })
|
|
2360
2823
|
] }) });
|
|
2361
2824
|
}
|
|
2362
2825
|
|
|
2363
2826
|
// src/select-sort/select-list.tsx
|
|
2364
|
-
var
|
|
2827
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
2365
2828
|
function SelectList2({ size, variant, sortOrder, onClickItem, onClickDeselect }) {
|
|
2366
|
-
const listClasses = (0,
|
|
2829
|
+
const listClasses = (0, import_clsx32.default)(
|
|
2367
2830
|
"absolute z-dropdown w-max overflow-y-auto rounded bg-uiBackground01 py-2 shadow-floatingShadow",
|
|
2368
2831
|
{
|
|
2369
2832
|
"top-7": size === "x-small" || size === "small",
|
|
@@ -2372,19 +2835,19 @@ function SelectList2({ size, variant, sortOrder, onClickItem, onClickDeselect })
|
|
|
2372
2835
|
"border-solid border border-uiBorder01": variant === "outline"
|
|
2373
2836
|
}
|
|
2374
2837
|
);
|
|
2375
|
-
const deselectButtonClasses = (0,
|
|
2838
|
+
const deselectButtonClasses = (0, import_clsx32.default)(
|
|
2376
2839
|
"typography-label14regular flex h-8 w-full items-center px-3 text-interactive02 hover:bg-hover02 active:bg-active02",
|
|
2377
|
-
|
|
2840
|
+
import_component_theme17.focusVisible.inset
|
|
2378
2841
|
);
|
|
2379
|
-
return /* @__PURE__ */ (0,
|
|
2380
|
-
/* @__PURE__ */ (0,
|
|
2381
|
-
/* @__PURE__ */ (0,
|
|
2382
|
-
sortOrder !== null && onClickDeselect && /* @__PURE__ */ (0,
|
|
2842
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("ul", { className: listClasses, children: [
|
|
2843
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(SelectItem2, { isSortKey: sortOrder === "ascend", onClickItem: () => onClickItem("ascend"), children: "\u6607\u9806\u3067\u4E26\u3073\u66FF\u3048" }),
|
|
2844
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(SelectItem2, { isSortKey: sortOrder === "descend", onClickItem: () => onClickItem("descend"), children: "\u964D\u9806\u3067\u4E26\u3073\u66FF\u3048" }),
|
|
2845
|
+
sortOrder !== null && onClickDeselect && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("button", { className: deselectButtonClasses, type: "button", onClick: onClickDeselect, children: "\u9078\u629E\u89E3\u9664" }) })
|
|
2383
2846
|
] });
|
|
2384
2847
|
}
|
|
2385
2848
|
|
|
2386
2849
|
// src/select-sort/select-sort.tsx
|
|
2387
|
-
var
|
|
2850
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
2388
2851
|
function SelectSort({
|
|
2389
2852
|
size = "medium",
|
|
2390
2853
|
variant = "outline",
|
|
@@ -2396,54 +2859,54 @@ function SelectSort({
|
|
|
2396
2859
|
onChange,
|
|
2397
2860
|
onClickDeselect
|
|
2398
2861
|
}) {
|
|
2399
|
-
const [isOptionListOpen, setIsOptionListOpen] = (0,
|
|
2400
|
-
const targetRef = (0,
|
|
2862
|
+
const [isOptionListOpen, setIsOptionListOpen] = (0, import_react43.useState)(false);
|
|
2863
|
+
const targetRef = (0, import_react43.useRef)(null);
|
|
2401
2864
|
useOutsideClick(targetRef, () => setIsOptionListOpen(false));
|
|
2402
2865
|
const handleClickToggle = () => setIsOptionListOpen((prev) => !prev);
|
|
2403
|
-
const handleClickItem = (0,
|
|
2866
|
+
const handleClickItem = (0, import_react43.useCallback)(
|
|
2404
2867
|
(value) => {
|
|
2405
2868
|
onChange?.(value);
|
|
2406
2869
|
setIsOptionListOpen(false);
|
|
2407
2870
|
},
|
|
2408
2871
|
[onChange]
|
|
2409
2872
|
);
|
|
2410
|
-
const wrapperClasses = (0,
|
|
2873
|
+
const wrapperClasses = (0, import_clsx33.default)("relative flex shrink-0 items-center gap-1 rounded", {
|
|
2411
2874
|
"h-6": size === "x-small" || size === "small",
|
|
2412
2875
|
"h-8": size === "medium",
|
|
2413
2876
|
"h-10": size === "large",
|
|
2414
2877
|
"cursor-not-allowed": isDisabled
|
|
2415
2878
|
});
|
|
2416
|
-
const buttonClasses = (0,
|
|
2879
|
+
const buttonClasses = (0, import_clsx33.default)(
|
|
2417
2880
|
"flex size-full items-center rounded",
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2881
|
+
import_component_theme18.buttonColors[variant].hover,
|
|
2882
|
+
import_component_theme18.buttonColors[variant].active,
|
|
2883
|
+
import_component_theme18.buttonColors[variant].disabled,
|
|
2884
|
+
import_component_theme18.focusVisible.normal,
|
|
2422
2885
|
{
|
|
2423
|
-
[
|
|
2424
|
-
[
|
|
2886
|
+
[import_component_theme18.buttonColors[variant].selected]: isSortKey,
|
|
2887
|
+
[import_component_theme18.buttonColors[variant].base]: !isSortKey,
|
|
2425
2888
|
"px-2": size === "x-small" || size === "small",
|
|
2426
2889
|
"px-4": size === "medium" || size === "large",
|
|
2427
2890
|
"pointer-events-none": isDisabled
|
|
2428
2891
|
}
|
|
2429
2892
|
);
|
|
2430
|
-
const labelClasses = (0,
|
|
2893
|
+
const labelClasses = (0, import_clsx33.default)("truncate", {
|
|
2431
2894
|
"typography-label12regular": size === "x-small",
|
|
2432
2895
|
"typography-label14regular": size === "small" || size === "medium",
|
|
2433
2896
|
"typography-label16regular": size === "large",
|
|
2434
2897
|
"mr-1": size === "x-small",
|
|
2435
2898
|
"mr-2": size !== "x-small"
|
|
2436
2899
|
});
|
|
2437
|
-
return /* @__PURE__ */ (0,
|
|
2438
|
-
/* @__PURE__ */ (0,
|
|
2439
|
-
/* @__PURE__ */ (0,
|
|
2440
|
-
/* @__PURE__ */ (0,
|
|
2900
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: wrapperClasses, style: { width }, ref: targetRef, children: [
|
|
2901
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("button", { className: buttonClasses, type: "button", onClick: handleClickToggle, disabled: isDisabled, children: [
|
|
2902
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: labelClasses, children: label }),
|
|
2903
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "ml-auto flex items-center", children: isSortKey ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
2441
2904
|
Icon,
|
|
2442
2905
|
{
|
|
2443
2906
|
name: sortOrder === "ascend" ? "arrow-up" : "arrow-down",
|
|
2444
2907
|
size: size === "large" ? "medium" : "small"
|
|
2445
2908
|
}
|
|
2446
|
-
) : /* @__PURE__ */ (0,
|
|
2909
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
2447
2910
|
Icon,
|
|
2448
2911
|
{
|
|
2449
2912
|
name: isOptionListOpen ? "angle-small-up" : "angle-small-down",
|
|
@@ -2451,7 +2914,7 @@ function SelectSort({
|
|
|
2451
2914
|
}
|
|
2452
2915
|
) })
|
|
2453
2916
|
] }),
|
|
2454
|
-
isOptionListOpen && !isDisabled && /* @__PURE__ */ (0,
|
|
2917
|
+
isOptionListOpen && !isDisabled && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
2455
2918
|
SelectList2,
|
|
2456
2919
|
{
|
|
2457
2920
|
size,
|
|
@@ -2465,10 +2928,10 @@ function SelectSort({
|
|
|
2465
2928
|
}
|
|
2466
2929
|
|
|
2467
2930
|
// src/sort-button/sort-button.tsx
|
|
2468
|
-
var
|
|
2469
|
-
var
|
|
2470
|
-
var
|
|
2471
|
-
var
|
|
2931
|
+
var import_component_theme19 = require("@zenkigen-inc/component-theme");
|
|
2932
|
+
var import_clsx34 = __toESM(require("clsx"));
|
|
2933
|
+
var import_react44 = require("react");
|
|
2934
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
2472
2935
|
function SortButton({
|
|
2473
2936
|
size = "medium",
|
|
2474
2937
|
width,
|
|
@@ -2479,7 +2942,7 @@ function SortButton({
|
|
|
2479
2942
|
"aria-label": ariaLabel,
|
|
2480
2943
|
...rest
|
|
2481
2944
|
}) {
|
|
2482
|
-
const handleClick = (0,
|
|
2945
|
+
const handleClick = (0, import_react44.useCallback)(() => {
|
|
2483
2946
|
if (isDisabled || !onClick) return;
|
|
2484
2947
|
onClick();
|
|
2485
2948
|
}, [isDisabled, onClick]);
|
|
@@ -2488,36 +2951,36 @@ function SortButton({
|
|
|
2488
2951
|
if (sortOrder === "descend") return "arrow-down";
|
|
2489
2952
|
return "angle-small-down";
|
|
2490
2953
|
};
|
|
2491
|
-
const wrapperClasses = (0,
|
|
2954
|
+
const wrapperClasses = (0, import_clsx34.default)("relative flex shrink-0 items-center gap-1 rounded", {
|
|
2492
2955
|
"h-6": size === "x-small" || size === "small",
|
|
2493
2956
|
"h-8": size === "medium",
|
|
2494
2957
|
"h-10": size === "large",
|
|
2495
2958
|
"cursor-not-allowed": isDisabled
|
|
2496
2959
|
});
|
|
2497
|
-
const buttonClasses = (0,
|
|
2960
|
+
const buttonClasses = (0, import_clsx34.default)(
|
|
2498
2961
|
"flex size-full items-center rounded",
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2962
|
+
import_component_theme19.buttonColors.text.hover,
|
|
2963
|
+
import_component_theme19.buttonColors.text.active,
|
|
2964
|
+
import_component_theme19.buttonColors.text.disabled,
|
|
2965
|
+
import_component_theme19.focusVisible.normal,
|
|
2503
2966
|
{
|
|
2504
|
-
[
|
|
2967
|
+
[import_component_theme19.buttonColors.text.selected]: !isDisabled && sortOrder !== null,
|
|
2505
2968
|
// ソート状態時は選択状態のスタイル
|
|
2506
|
-
[
|
|
2969
|
+
[import_component_theme19.buttonColors.text.base]: sortOrder === null,
|
|
2507
2970
|
// ソートなし時は通常のスタイル
|
|
2508
2971
|
"px-2": size === "x-small" || size === "small",
|
|
2509
2972
|
"px-4": size === "medium" || size === "large",
|
|
2510
2973
|
"pointer-events-none": isDisabled
|
|
2511
2974
|
}
|
|
2512
2975
|
);
|
|
2513
|
-
const labelClasses = (0,
|
|
2976
|
+
const labelClasses = (0, import_clsx34.default)("truncate", {
|
|
2514
2977
|
"typography-label12regular": size === "x-small",
|
|
2515
2978
|
"typography-label14regular": size === "small" || size === "medium",
|
|
2516
2979
|
"typography-label16regular": size === "large",
|
|
2517
2980
|
"mr-1": size === "x-small",
|
|
2518
2981
|
"mr-2": size !== "x-small"
|
|
2519
2982
|
});
|
|
2520
|
-
return /* @__PURE__ */ (0,
|
|
2983
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: wrapperClasses, style: { width }, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
|
|
2521
2984
|
"button",
|
|
2522
2985
|
{
|
|
2523
2986
|
className: buttonClasses,
|
|
@@ -2528,22 +2991,22 @@ function SortButton({
|
|
|
2528
2991
|
"aria-label": ariaLabel,
|
|
2529
2992
|
"aria-disabled": isDisabled,
|
|
2530
2993
|
children: [
|
|
2531
|
-
/* @__PURE__ */ (0,
|
|
2532
|
-
/* @__PURE__ */ (0,
|
|
2994
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: labelClasses, children: label }),
|
|
2995
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "ml-auto flex items-center", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Icon, { name: getIconName(), size: size === "large" ? "medium" : "small" }) })
|
|
2533
2996
|
]
|
|
2534
2997
|
}
|
|
2535
2998
|
) });
|
|
2536
2999
|
}
|
|
2537
3000
|
|
|
2538
3001
|
// src/tab/tab.tsx
|
|
2539
|
-
var
|
|
2540
|
-
var
|
|
3002
|
+
var import_clsx36 = require("clsx");
|
|
3003
|
+
var import_react45 = require("react");
|
|
2541
3004
|
|
|
2542
3005
|
// src/tab/tab-item.tsx
|
|
2543
|
-
var
|
|
2544
|
-
var
|
|
3006
|
+
var import_clsx35 = require("clsx");
|
|
3007
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
2545
3008
|
var TabItem = ({ isSelected = false, isDisabled = false, icon, ...props }) => {
|
|
2546
|
-
const classes = (0,
|
|
3009
|
+
const classes = (0, import_clsx35.clsx)(
|
|
2547
3010
|
"group relative z-0 flex items-center justify-center gap-1 py-2 leading-[24px] before:absolute before:inset-x-0 before:bottom-0 before:h-[2px] hover:text-interactive01 disabled:pointer-events-none disabled:text-disabled01",
|
|
2548
3011
|
{
|
|
2549
3012
|
"typography-label14regular text-interactive02": !isSelected,
|
|
@@ -2551,12 +3014,12 @@ var TabItem = ({ isSelected = false, isDisabled = false, icon, ...props }) => {
|
|
|
2551
3014
|
"before:bg-interactive01 hover:before:bg-interactive01 pointer-events-none": isSelected
|
|
2552
3015
|
}
|
|
2553
3016
|
);
|
|
2554
|
-
const iconWrapperClasses = (0,
|
|
3017
|
+
const iconWrapperClasses = (0, import_clsx35.clsx)("flex shrink-0 items-center", {
|
|
2555
3018
|
"fill-disabled01": isDisabled,
|
|
2556
3019
|
"fill-interactive01": !isDisabled && isSelected,
|
|
2557
3020
|
"fill-icon01 group-hover:fill-interactive01": !isDisabled && !isSelected
|
|
2558
3021
|
});
|
|
2559
|
-
return /* @__PURE__ */ (0,
|
|
3022
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
|
|
2560
3023
|
"button",
|
|
2561
3024
|
{
|
|
2562
3025
|
type: "button",
|
|
@@ -2566,7 +3029,7 @@ var TabItem = ({ isSelected = false, isDisabled = false, icon, ...props }) => {
|
|
|
2566
3029
|
disabled: isDisabled,
|
|
2567
3030
|
onClick: () => props.onClick(props.id),
|
|
2568
3031
|
children: [
|
|
2569
|
-
icon != null && /* @__PURE__ */ (0,
|
|
3032
|
+
icon != null && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: iconWrapperClasses, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Icon, { name: icon, size: "small" }) }),
|
|
2570
3033
|
props.children
|
|
2571
3034
|
]
|
|
2572
3035
|
}
|
|
@@ -2574,39 +3037,39 @@ var TabItem = ({ isSelected = false, isDisabled = false, icon, ...props }) => {
|
|
|
2574
3037
|
};
|
|
2575
3038
|
|
|
2576
3039
|
// src/tab/tab.tsx
|
|
2577
|
-
var
|
|
3040
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
2578
3041
|
function Tab({ children, layout = "auto" }) {
|
|
2579
|
-
const childrenCount =
|
|
3042
|
+
const childrenCount = import_react45.Children.count(children);
|
|
2580
3043
|
const containerStyle = layout === "equal" ? { gridTemplateColumns: `repeat(${childrenCount}, minmax(0,1fr))` } : {};
|
|
2581
|
-
const containerClasses = (0,
|
|
3044
|
+
const containerClasses = (0, import_clsx36.clsx)(
|
|
2582
3045
|
"relative gap-4 px-6 before:absolute before:inset-x-0 before:bottom-0 before:h-px before:bg-uiBorder01",
|
|
2583
3046
|
{
|
|
2584
3047
|
flex: layout === "auto",
|
|
2585
3048
|
grid: layout === "equal"
|
|
2586
3049
|
}
|
|
2587
3050
|
);
|
|
2588
|
-
return /* @__PURE__ */ (0,
|
|
3051
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { role: "tablist", className: containerClasses, style: containerStyle, children });
|
|
2589
3052
|
}
|
|
2590
3053
|
Tab.Item = TabItem;
|
|
2591
3054
|
|
|
2592
3055
|
// src/table/table-cell.tsx
|
|
2593
|
-
var
|
|
2594
|
-
var
|
|
3056
|
+
var import_clsx37 = __toESM(require("clsx"));
|
|
3057
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
2595
3058
|
function TableCell({ children, className, isHeader = false }) {
|
|
2596
|
-
const classes = (0,
|
|
2597
|
-
return /* @__PURE__ */ (0,
|
|
3059
|
+
const classes = (0, import_clsx37.default)("border-b border-uiBorder01", { "sticky top-0 z-10 bg-white": isHeader }, className);
|
|
3060
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: classes, children });
|
|
2598
3061
|
}
|
|
2599
3062
|
|
|
2600
3063
|
// src/table/table-row.tsx
|
|
2601
|
-
var
|
|
2602
|
-
var
|
|
3064
|
+
var import_clsx38 = __toESM(require("clsx"));
|
|
3065
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
2603
3066
|
function TableRow({ children, isHoverBackgroundVisible = false }) {
|
|
2604
|
-
const rowClasses = (0,
|
|
2605
|
-
return /* @__PURE__ */ (0,
|
|
3067
|
+
const rowClasses = (0, import_clsx38.default)("contents", isHoverBackgroundVisible && "[&:hover>div]:bg-hoverUi02");
|
|
3068
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: rowClasses, children });
|
|
2606
3069
|
}
|
|
2607
3070
|
|
|
2608
3071
|
// src/table/table.tsx
|
|
2609
|
-
var
|
|
3072
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
2610
3073
|
function Table({
|
|
2611
3074
|
width,
|
|
2612
3075
|
templateRows,
|
|
@@ -2615,7 +3078,7 @@ function Table({
|
|
|
2615
3078
|
autoRows,
|
|
2616
3079
|
children
|
|
2617
3080
|
}) {
|
|
2618
|
-
return /* @__PURE__ */ (0,
|
|
3081
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
2619
3082
|
"div",
|
|
2620
3083
|
{
|
|
2621
3084
|
className: "grid",
|
|
@@ -2634,23 +3097,23 @@ Table.Row = TableRow;
|
|
|
2634
3097
|
Table.Cell = TableCell;
|
|
2635
3098
|
|
|
2636
3099
|
// src/tag/tag.tsx
|
|
2637
|
-
var
|
|
2638
|
-
var
|
|
3100
|
+
var import_component_theme21 = require("@zenkigen-inc/component-theme");
|
|
3101
|
+
var import_clsx40 = __toESM(require("clsx"));
|
|
2639
3102
|
|
|
2640
3103
|
// src/tag/delete-icon.tsx
|
|
2641
|
-
var
|
|
2642
|
-
var
|
|
2643
|
-
var
|
|
3104
|
+
var import_component_theme20 = require("@zenkigen-inc/component-theme");
|
|
3105
|
+
var import_clsx39 = __toESM(require("clsx"));
|
|
3106
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
2644
3107
|
var DeleteIcon = ({ color, variant, onClick }) => {
|
|
2645
|
-
const deleteButtonClasses = (0,
|
|
3108
|
+
const deleteButtonClasses = (0, import_clsx39.default)(
|
|
2646
3109
|
"group ml-2 size-[14px] rounded-full p-0.5 hover:cursor-pointer hover:bg-iconOnColor focus-visible:bg-iconOnColor",
|
|
2647
|
-
|
|
3110
|
+
import_component_theme20.focusVisible.normal
|
|
2648
3111
|
);
|
|
2649
|
-
const deletePathClasses = (0,
|
|
3112
|
+
const deletePathClasses = (0, import_clsx39.default)({
|
|
2650
3113
|
"fill-interactive02": color === "gray" || variant === "light",
|
|
2651
3114
|
"group-hover:fill-interactive02 group-focus-visible:fill-interactive02 fill-iconOnColor": color !== "gray"
|
|
2652
3115
|
});
|
|
2653
|
-
return /* @__PURE__ */ (0,
|
|
3116
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("button", { type: "button", className: deleteButtonClasses, onClick, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("svg", { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
2654
3117
|
"path",
|
|
2655
3118
|
{
|
|
2656
3119
|
fillRule: "evenodd",
|
|
@@ -2662,11 +3125,11 @@ var DeleteIcon = ({ color, variant, onClick }) => {
|
|
|
2662
3125
|
};
|
|
2663
3126
|
|
|
2664
3127
|
// src/tag/tag.tsx
|
|
2665
|
-
var
|
|
3128
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
2666
3129
|
function Tag({ id, children, color, variant = "normal", size = "medium", isEditable, onDelete }) {
|
|
2667
|
-
const wrapperClasses = (0,
|
|
2668
|
-
[
|
|
2669
|
-
[
|
|
3130
|
+
const wrapperClasses = (0, import_clsx40.default)("flex", "items-center", "justify-center", {
|
|
3131
|
+
[import_component_theme21.tagColors[color]]: variant === "normal",
|
|
3132
|
+
[import_component_theme21.tagLightColors[color]]: variant === "light",
|
|
2670
3133
|
"h-[14px] typography-label11regular": !isEditable && size === "x-small",
|
|
2671
3134
|
"h-4 typography-label12regular": !isEditable && size === "small",
|
|
2672
3135
|
"h-[18px] typography-label14regular": !isEditable && size === "medium",
|
|
@@ -2676,21 +3139,21 @@ function Tag({ id, children, color, variant = "normal", size = "medium", isEdita
|
|
|
2676
3139
|
"py-0.5 px-1": !isEditable,
|
|
2677
3140
|
"py-1 px-2": isEditable
|
|
2678
3141
|
});
|
|
2679
|
-
return /* @__PURE__ */ (0,
|
|
3142
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: wrapperClasses, children: [
|
|
2680
3143
|
children,
|
|
2681
|
-
isEditable ? /* @__PURE__ */ (0,
|
|
3144
|
+
isEditable ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(DeleteIcon, { onClick: () => onDelete(id), color, variant }) : null
|
|
2682
3145
|
] });
|
|
2683
3146
|
}
|
|
2684
3147
|
|
|
2685
3148
|
// src/text-area/text-area.tsx
|
|
2686
|
-
var
|
|
2687
|
-
var
|
|
3149
|
+
var import_clsx43 = require("clsx");
|
|
3150
|
+
var import_react49 = require("react");
|
|
2688
3151
|
|
|
2689
3152
|
// src/text-area/text-area-context.tsx
|
|
2690
|
-
var
|
|
2691
|
-
var TextAreaCompoundContext = (0,
|
|
3153
|
+
var import_react46 = require("react");
|
|
3154
|
+
var TextAreaCompoundContext = (0, import_react46.createContext)(null);
|
|
2692
3155
|
var useTextAreaCompoundContext = (componentName) => {
|
|
2693
|
-
const context = (0,
|
|
3156
|
+
const context = (0, import_react46.useContext)(TextAreaCompoundContext);
|
|
2694
3157
|
if (context == null) {
|
|
2695
3158
|
throw new Error(`${componentName} \u3092\u4F7F\u7528\u3059\u308B\u306B\u306F TextArea \u306E\u5B50\u8981\u7D20\u3068\u3057\u3066\u914D\u7F6E\u3059\u308B\u5FC5\u8981\u304C\u3042\u308B\u3002`);
|
|
2696
3159
|
}
|
|
@@ -2698,10 +3161,10 @@ var useTextAreaCompoundContext = (componentName) => {
|
|
|
2698
3161
|
};
|
|
2699
3162
|
|
|
2700
3163
|
// src/text-area/text-area-error-message.tsx
|
|
2701
|
-
var
|
|
2702
|
-
var
|
|
2703
|
-
var
|
|
2704
|
-
var TextAreaErrorMessage = (0,
|
|
3164
|
+
var import_clsx41 = require("clsx");
|
|
3165
|
+
var import_react47 = require("react");
|
|
3166
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
3167
|
+
var TextAreaErrorMessage = (0, import_react47.forwardRef)(
|
|
2705
3168
|
({ "aria-live": ariaLive = "assertive", ...props }, ref) => {
|
|
2706
3169
|
const { textAreaProps } = useTextAreaCompoundContext("TextArea.ErrorMessage");
|
|
2707
3170
|
const typographyClass = textAreaProps.size === "large" ? "typography-label12regular" : "typography-label11regular";
|
|
@@ -2709,26 +3172,26 @@ var TextAreaErrorMessage = (0, import_react44.forwardRef)(
|
|
|
2709
3172
|
if (!shouldRender) {
|
|
2710
3173
|
return null;
|
|
2711
3174
|
}
|
|
2712
|
-
const errorMessageClassName = (0,
|
|
2713
|
-
return /* @__PURE__ */ (0,
|
|
3175
|
+
const errorMessageClassName = (0, import_clsx41.clsx)(typographyClass, "text-supportError");
|
|
3176
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { ref, className: errorMessageClassName, "aria-live": ariaLive, ...props });
|
|
2714
3177
|
}
|
|
2715
3178
|
);
|
|
2716
3179
|
TextAreaErrorMessage.displayName = "TextArea.ErrorMessage";
|
|
2717
3180
|
|
|
2718
3181
|
// src/text-area/text-area-helper-message.tsx
|
|
2719
|
-
var
|
|
2720
|
-
var
|
|
2721
|
-
var
|
|
2722
|
-
var TextAreaHelperMessage = (0,
|
|
3182
|
+
var import_clsx42 = require("clsx");
|
|
3183
|
+
var import_react48 = require("react");
|
|
3184
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
3185
|
+
var TextAreaHelperMessage = (0, import_react48.forwardRef)((props, ref) => {
|
|
2723
3186
|
const { textAreaProps } = useTextAreaCompoundContext("TextArea.HelperMessage");
|
|
2724
3187
|
const typographyClass = textAreaProps.size === "large" ? "typography-label12regular" : "typography-label11regular";
|
|
2725
|
-
const helperMessageClassName = (0,
|
|
2726
|
-
return /* @__PURE__ */ (0,
|
|
3188
|
+
const helperMessageClassName = (0, import_clsx42.clsx)(typographyClass, "text-text02");
|
|
3189
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { ref, className: helperMessageClassName, ...props });
|
|
2727
3190
|
});
|
|
2728
3191
|
TextAreaHelperMessage.displayName = "TextArea.HelperMessage";
|
|
2729
3192
|
|
|
2730
3193
|
// src/text-area/text-area.tsx
|
|
2731
|
-
var
|
|
3194
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
2732
3195
|
function TextAreaInner({
|
|
2733
3196
|
size = "medium",
|
|
2734
3197
|
isResizable = false,
|
|
@@ -2741,15 +3204,15 @@ function TextAreaInner({
|
|
|
2741
3204
|
className,
|
|
2742
3205
|
...props
|
|
2743
3206
|
}, ref) {
|
|
2744
|
-
const autoGeneratedId = (0,
|
|
2745
|
-
const textAreaPropsForContext = (0,
|
|
3207
|
+
const autoGeneratedId = (0, import_react49.useId)();
|
|
3208
|
+
const textAreaPropsForContext = (0, import_react49.useMemo)(
|
|
2746
3209
|
() => ({
|
|
2747
3210
|
size,
|
|
2748
3211
|
isError
|
|
2749
3212
|
}),
|
|
2750
3213
|
[size, isError]
|
|
2751
3214
|
);
|
|
2752
|
-
const contextValue = (0,
|
|
3215
|
+
const contextValue = (0, import_react49.useMemo)(
|
|
2753
3216
|
() => ({
|
|
2754
3217
|
textAreaProps: textAreaPropsForContext,
|
|
2755
3218
|
forwardedRef: ref
|
|
@@ -2759,21 +3222,21 @@ function TextAreaInner({
|
|
|
2759
3222
|
const helperMessageIds = [];
|
|
2760
3223
|
const errorIds = [];
|
|
2761
3224
|
const describedByBaseId = props.id ?? autoGeneratedId;
|
|
2762
|
-
const enhancedChildren =
|
|
2763
|
-
if (!(0,
|
|
3225
|
+
const enhancedChildren = import_react49.Children.map(children, (child) => {
|
|
3226
|
+
if (!(0, import_react49.isValidElement)(child)) {
|
|
2764
3227
|
return child;
|
|
2765
3228
|
}
|
|
2766
3229
|
if (child.type === TextAreaHelperMessage) {
|
|
2767
3230
|
const helperChild = child;
|
|
2768
3231
|
const assignedId = helperChild.props.id ?? `${describedByBaseId}-helper-${helperMessageIds.length + 1}`;
|
|
2769
3232
|
helperMessageIds.push(assignedId);
|
|
2770
|
-
return (0,
|
|
3233
|
+
return (0, import_react49.cloneElement)(helperChild, { id: assignedId });
|
|
2771
3234
|
}
|
|
2772
3235
|
if (child.type === TextAreaErrorMessage && isError) {
|
|
2773
3236
|
const errorChild = child;
|
|
2774
3237
|
const assignedId = errorChild.props.id ?? `${describedByBaseId}-error-${errorIds.length + 1}`;
|
|
2775
3238
|
errorIds.push(assignedId);
|
|
2776
|
-
return (0,
|
|
3239
|
+
return (0, import_react49.cloneElement)(errorChild, { id: assignedId });
|
|
2777
3240
|
}
|
|
2778
3241
|
return child;
|
|
2779
3242
|
});
|
|
@@ -2793,7 +3256,7 @@ function TextAreaInner({
|
|
|
2793
3256
|
...describedByProps,
|
|
2794
3257
|
...ariaInvalidProps
|
|
2795
3258
|
};
|
|
2796
|
-
const textAreaWrapperClassName = (0,
|
|
3259
|
+
const textAreaWrapperClassName = (0, import_clsx43.clsx)(
|
|
2797
3260
|
"box-border flex w-full overflow-hidden rounded border",
|
|
2798
3261
|
{
|
|
2799
3262
|
"border-supportError": isError && !disabled,
|
|
@@ -2805,7 +3268,7 @@ function TextAreaInner({
|
|
|
2805
3268
|
},
|
|
2806
3269
|
className
|
|
2807
3270
|
);
|
|
2808
|
-
const textAreaClassName = (0,
|
|
3271
|
+
const textAreaClassName = (0, import_clsx43.clsx)(
|
|
2809
3272
|
"w-full border-none bg-uiBackground01 outline-0 placeholder:text-textPlaceholder disabled:text-textPlaceholder",
|
|
2810
3273
|
{
|
|
2811
3274
|
"typography-body14regular px-2 py-2": size === "medium",
|
|
@@ -2818,7 +3281,7 @@ function TextAreaInner({
|
|
|
2818
3281
|
}
|
|
2819
3282
|
);
|
|
2820
3283
|
const hasHeight = height != null && String(height).trim().length > 0;
|
|
2821
|
-
const textAreaElement = /* @__PURE__ */ (0,
|
|
3284
|
+
const textAreaElement = /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
2822
3285
|
"div",
|
|
2823
3286
|
{
|
|
2824
3287
|
className: textAreaWrapperClassName,
|
|
@@ -2828,7 +3291,7 @@ function TextAreaInner({
|
|
|
2828
3291
|
...!autoHeight && hasHeight ? { height } : {},
|
|
2829
3292
|
...autoHeight && hasHeight ? { minHeight: height } : {}
|
|
2830
3293
|
},
|
|
2831
|
-
children: /* @__PURE__ */ (0,
|
|
3294
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
2832
3295
|
"textarea",
|
|
2833
3296
|
{
|
|
2834
3297
|
ref,
|
|
@@ -2843,12 +3306,12 @@ function TextAreaInner({
|
|
|
2843
3306
|
)
|
|
2844
3307
|
}
|
|
2845
3308
|
);
|
|
2846
|
-
const stackedChildren = enhancedChildren == null ? [] :
|
|
3309
|
+
const stackedChildren = enhancedChildren == null ? [] : import_react49.Children.toArray(enhancedChildren);
|
|
2847
3310
|
const hasMessageChildren = stackedChildren.length > 0;
|
|
2848
3311
|
if (!hasMessageChildren) {
|
|
2849
|
-
return /* @__PURE__ */ (0,
|
|
3312
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(TextAreaCompoundContext.Provider, { value: contextValue, children: textAreaElement });
|
|
2850
3313
|
}
|
|
2851
|
-
return /* @__PURE__ */ (0,
|
|
3314
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(TextAreaCompoundContext.Provider, { value: contextValue, children: /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
2852
3315
|
textAreaElement,
|
|
2853
3316
|
stackedChildren
|
|
2854
3317
|
] }) });
|
|
@@ -2859,15 +3322,15 @@ var attachStatics2 = (component) => {
|
|
|
2859
3322
|
component.displayName = "TextArea";
|
|
2860
3323
|
return component;
|
|
2861
3324
|
};
|
|
2862
|
-
var TextAreaBase = (0,
|
|
3325
|
+
var TextAreaBase = (0, import_react49.forwardRef)(function TextAreaBase2(props, ref) {
|
|
2863
3326
|
return TextAreaInner(props, ref);
|
|
2864
3327
|
});
|
|
2865
3328
|
var TextArea = attachStatics2(TextAreaBase);
|
|
2866
3329
|
|
|
2867
3330
|
// src/toast/toast.tsx
|
|
2868
|
-
var
|
|
2869
|
-
var
|
|
2870
|
-
var
|
|
3331
|
+
var import_clsx44 = __toESM(require("clsx"));
|
|
3332
|
+
var import_react50 = require("react");
|
|
3333
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
2871
3334
|
var CLOSE_TIME_MSEC = 5e3;
|
|
2872
3335
|
function Toast({
|
|
2873
3336
|
state = "information",
|
|
@@ -2877,8 +3340,8 @@ function Toast({
|
|
|
2877
3340
|
children,
|
|
2878
3341
|
onClickClose
|
|
2879
3342
|
}) {
|
|
2880
|
-
const [isRemoving, setIsRemoving] = (0,
|
|
2881
|
-
const handleClose = (0,
|
|
3343
|
+
const [isRemoving, setIsRemoving] = (0, import_react50.useState)(false);
|
|
3344
|
+
const handleClose = (0, import_react50.useCallback)(() => {
|
|
2882
3345
|
if (isAnimation) {
|
|
2883
3346
|
setIsRemoving(true);
|
|
2884
3347
|
} else {
|
|
@@ -2886,17 +3349,17 @@ function Toast({
|
|
|
2886
3349
|
}
|
|
2887
3350
|
}, [isAnimation, onClickClose]);
|
|
2888
3351
|
const handleAnimationEnd = (e) => window.getComputedStyle(e.currentTarget).opacity === "0" && onClickClose();
|
|
2889
|
-
const wrapperClasses = (0,
|
|
3352
|
+
const wrapperClasses = (0, import_clsx44.default)("pointer-events-auto flex items-start gap-1 bg-white p-4 shadow-floatingShadow", {
|
|
2890
3353
|
["animate-toast-in"]: isAnimation && !isRemoving,
|
|
2891
3354
|
["animate-toast-out opacity-0"]: isAnimation && isRemoving
|
|
2892
3355
|
});
|
|
2893
|
-
const iconClasses = (0,
|
|
3356
|
+
const iconClasses = (0, import_clsx44.default)("flex items-center", {
|
|
2894
3357
|
"fill-supportSuccess": state === "success",
|
|
2895
3358
|
"fill-supportError": state === "error",
|
|
2896
3359
|
"fill-supportWarning": state === "warning",
|
|
2897
3360
|
"fill-supportInfo": state === "information"
|
|
2898
3361
|
});
|
|
2899
|
-
const textClasses = (0,
|
|
3362
|
+
const textClasses = (0, import_clsx44.default)("typography-body13regular flex-1 pt-[3px]", {
|
|
2900
3363
|
"text-supportError": state === "error",
|
|
2901
3364
|
"text-text01": state === "success" || state === "warning" || state === "information"
|
|
2902
3365
|
});
|
|
@@ -2906,7 +3369,7 @@ function Toast({
|
|
|
2906
3369
|
warning: "warning",
|
|
2907
3370
|
information: "information-filled"
|
|
2908
3371
|
};
|
|
2909
|
-
(0,
|
|
3372
|
+
(0, import_react50.useEffect)(() => {
|
|
2910
3373
|
const timer = window.setTimeout(() => {
|
|
2911
3374
|
if (isAutoClose) {
|
|
2912
3375
|
setIsRemoving(true);
|
|
@@ -2914,45 +3377,45 @@ function Toast({
|
|
|
2914
3377
|
}, CLOSE_TIME_MSEC);
|
|
2915
3378
|
return () => window.clearTimeout(timer);
|
|
2916
3379
|
}, [isAutoClose]);
|
|
2917
|
-
return /* @__PURE__ */ (0,
|
|
2918
|
-
/* @__PURE__ */ (0,
|
|
2919
|
-
/* @__PURE__ */ (0,
|
|
2920
|
-
/* @__PURE__ */ (0,
|
|
3380
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: wrapperClasses, style: { width }, onAnimationEnd: handleAnimationEnd, children: [
|
|
3381
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: iconClasses, children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Icon, { name: iconName[state] }) }),
|
|
3382
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("p", { className: textClasses, children }),
|
|
3383
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(IconButton, { icon: "close", size: "medium", variant: "text", onClick: handleClose, isNoPadding: true })
|
|
2921
3384
|
] });
|
|
2922
3385
|
}
|
|
2923
3386
|
|
|
2924
3387
|
// src/toast/toast-provider.tsx
|
|
2925
|
-
var
|
|
3388
|
+
var import_react51 = require("react");
|
|
2926
3389
|
var import_react_dom3 = require("react-dom");
|
|
2927
|
-
var
|
|
2928
|
-
var ToastContext = (0,
|
|
3390
|
+
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
3391
|
+
var ToastContext = (0, import_react51.createContext)({});
|
|
2929
3392
|
var ToastProvider = ({ children }) => {
|
|
2930
|
-
const [isClientRender, setIsClientRender] = (0,
|
|
2931
|
-
const [toasts, setToasts] = (0,
|
|
2932
|
-
const addToast = (0,
|
|
3393
|
+
const [isClientRender, setIsClientRender] = (0, import_react51.useState)(false);
|
|
3394
|
+
const [toasts, setToasts] = (0, import_react51.useState)([]);
|
|
3395
|
+
const addToast = (0, import_react51.useCallback)(({ message, state }) => {
|
|
2933
3396
|
setToasts((prev) => [...prev, { id: Math.trunc(Math.random() * 1e5), message, state }]);
|
|
2934
3397
|
}, []);
|
|
2935
|
-
const removeToast = (0,
|
|
3398
|
+
const removeToast = (0, import_react51.useCallback)((id) => {
|
|
2936
3399
|
setToasts((prev) => prev.filter((snackbar) => snackbar.id !== id));
|
|
2937
3400
|
}, []);
|
|
2938
|
-
(0,
|
|
3401
|
+
(0, import_react51.useEffect)(() => {
|
|
2939
3402
|
setIsClientRender(true);
|
|
2940
3403
|
}, []);
|
|
2941
|
-
return /* @__PURE__ */ (0,
|
|
3404
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(ToastContext.Provider, { value: { addToast, removeToast }, children: [
|
|
2942
3405
|
children,
|
|
2943
3406
|
isClientRender && (0, import_react_dom3.createPortal)(
|
|
2944
|
-
/* @__PURE__ */ (0,
|
|
3407
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.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_runtime62.jsx)(Toast, { state, isAutoClose: true, isAnimation: true, onClickClose: () => removeToast(id), width: 475, children: message }, id)) }),
|
|
2945
3408
|
document.body
|
|
2946
3409
|
)
|
|
2947
3410
|
] });
|
|
2948
3411
|
};
|
|
2949
3412
|
var useToast = () => {
|
|
2950
|
-
return (0,
|
|
3413
|
+
return (0, import_react51.useContext)(ToastContext);
|
|
2951
3414
|
};
|
|
2952
3415
|
|
|
2953
3416
|
// src/toggle/toggle.tsx
|
|
2954
|
-
var
|
|
2955
|
-
var
|
|
3417
|
+
var import_clsx45 = __toESM(require("clsx"));
|
|
3418
|
+
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
2956
3419
|
function Toggle({
|
|
2957
3420
|
id,
|
|
2958
3421
|
size = "medium",
|
|
@@ -2962,7 +3425,7 @@ function Toggle({
|
|
|
2962
3425
|
labelPosition = "right",
|
|
2963
3426
|
isDisabled = false
|
|
2964
3427
|
}) {
|
|
2965
|
-
const baseClasses = (0,
|
|
3428
|
+
const baseClasses = (0, import_clsx45.default)("relative flex items-center rounded-full", {
|
|
2966
3429
|
"bg-disabledOn": isDisabled && isChecked,
|
|
2967
3430
|
"bg-disabled01": isDisabled && !isChecked,
|
|
2968
3431
|
"bg-interactive01 peer-hover:bg-hover01": !isDisabled && isChecked,
|
|
@@ -2970,16 +3433,16 @@ function Toggle({
|
|
|
2970
3433
|
"w-8 h-4 px-[3px]": size === "small",
|
|
2971
3434
|
"w-12 h-6 px-1": size === "medium" || size === "large"
|
|
2972
3435
|
});
|
|
2973
|
-
const inputClasses = (0,
|
|
3436
|
+
const inputClasses = (0, import_clsx45.default)(
|
|
2974
3437
|
"peer absolute inset-0 z-[1] opacity-0",
|
|
2975
3438
|
isDisabled ? "cursor-not-allowed" : "cursor-pointer"
|
|
2976
3439
|
);
|
|
2977
|
-
const indicatorClasses = (0,
|
|
3440
|
+
const indicatorClasses = (0, import_clsx45.default)("rounded-full bg-iconOnColor", {
|
|
2978
3441
|
"w-2.5 h-2.5": size === "small",
|
|
2979
3442
|
"w-4 h-4": size === "medium" || size === "large",
|
|
2980
3443
|
"ml-auto": isChecked
|
|
2981
3444
|
});
|
|
2982
|
-
const labelClasses = (0,
|
|
3445
|
+
const labelClasses = (0, import_clsx45.default)("break-all", {
|
|
2983
3446
|
"mr-2": labelPosition === "left",
|
|
2984
3447
|
"ml-2": labelPosition === "right",
|
|
2985
3448
|
"typography-label14regular": size === "small" || size === "medium",
|
|
@@ -2987,9 +3450,9 @@ function Toggle({
|
|
|
2987
3450
|
"pointer-events-none cursor-not-allowed text-disabled01": isDisabled,
|
|
2988
3451
|
"cursor-pointer text-text01": !isDisabled
|
|
2989
3452
|
});
|
|
2990
|
-
return /* @__PURE__ */ (0,
|
|
2991
|
-
label != null && labelPosition === "left" && /* @__PURE__ */ (0,
|
|
2992
|
-
/* @__PURE__ */ (0,
|
|
3453
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "relative flex flex-[0_0_auto] items-center", children: [
|
|
3454
|
+
label != null && labelPosition === "left" && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("label", { htmlFor: id, className: labelClasses, children: label }),
|
|
3455
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
2993
3456
|
"input",
|
|
2994
3457
|
{
|
|
2995
3458
|
className: inputClasses,
|
|
@@ -3001,23 +3464,23 @@ function Toggle({
|
|
|
3001
3464
|
disabled: isDisabled
|
|
3002
3465
|
}
|
|
3003
3466
|
),
|
|
3004
|
-
/* @__PURE__ */ (0,
|
|
3005
|
-
label != null && labelPosition === "right" && /* @__PURE__ */ (0,
|
|
3467
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: baseClasses, children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { className: indicatorClasses }) }),
|
|
3468
|
+
label != null && labelPosition === "right" && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("label", { htmlFor: id, className: labelClasses, children: label })
|
|
3006
3469
|
] });
|
|
3007
3470
|
}
|
|
3008
3471
|
|
|
3009
3472
|
// src/tooltip/tooltip.tsx
|
|
3010
|
-
var
|
|
3473
|
+
var import_react53 = require("react");
|
|
3011
3474
|
var import_react_dom4 = require("react-dom");
|
|
3012
3475
|
|
|
3013
3476
|
// src/tooltip/tooltip-content.tsx
|
|
3014
|
-
var
|
|
3477
|
+
var import_clsx47 = __toESM(require("clsx"));
|
|
3015
3478
|
|
|
3016
3479
|
// src/tooltip/tail-icon.tsx
|
|
3017
|
-
var
|
|
3018
|
-
var
|
|
3480
|
+
var import_clsx46 = __toESM(require("clsx"));
|
|
3481
|
+
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
3019
3482
|
var TailIcon = (props) => {
|
|
3020
|
-
const tailClasses = (0,
|
|
3483
|
+
const tailClasses = (0, import_clsx46.default)("absolute fill-uiBackgroundTooltip", {
|
|
3021
3484
|
"rotate-180": props.verticalPosition === "bottom",
|
|
3022
3485
|
"rotate-0": props.verticalPosition !== "bottom",
|
|
3023
3486
|
"-top-1": props.verticalPosition === "bottom" && props.size === "small",
|
|
@@ -3032,9 +3495,9 @@ var TailIcon = (props) => {
|
|
|
3032
3495
|
"left-1/2 -translate-x-2": props.horizontalAlign === "center" && props.size !== "small"
|
|
3033
3496
|
});
|
|
3034
3497
|
if (props.size === "small") {
|
|
3035
|
-
return /* @__PURE__ */ (0,
|
|
3498
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.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_runtime64.jsx)("path", { d: "M4 4L0 0H8L4 4Z" }) });
|
|
3036
3499
|
} else {
|
|
3037
|
-
return /* @__PURE__ */ (0,
|
|
3500
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
3038
3501
|
"svg",
|
|
3039
3502
|
{
|
|
3040
3503
|
className: tailClasses,
|
|
@@ -3043,14 +3506,14 @@ var TailIcon = (props) => {
|
|
|
3043
3506
|
viewBox: "0 0 14 8",
|
|
3044
3507
|
fill: "none",
|
|
3045
3508
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3046
|
-
children: /* @__PURE__ */ (0,
|
|
3509
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("path", { d: "M7 8L0 0H14L7 8Z" })
|
|
3047
3510
|
}
|
|
3048
3511
|
);
|
|
3049
3512
|
}
|
|
3050
3513
|
};
|
|
3051
3514
|
|
|
3052
3515
|
// src/tooltip/tooltip-content.tsx
|
|
3053
|
-
var
|
|
3516
|
+
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
3054
3517
|
var TooltipContent = ({
|
|
3055
3518
|
content,
|
|
3056
3519
|
horizontalAlign,
|
|
@@ -3060,7 +3523,7 @@ var TooltipContent = ({
|
|
|
3060
3523
|
maxWidth,
|
|
3061
3524
|
isPortal = false
|
|
3062
3525
|
}) => {
|
|
3063
|
-
const tooltipWrapperClasses = (0,
|
|
3526
|
+
const tooltipWrapperClasses = (0, import_clsx47.default)("absolute z-tooltip m-auto flex", {
|
|
3064
3527
|
"top-0": !isPortal && verticalPosition === "top",
|
|
3065
3528
|
"bottom-0": !isPortal && verticalPosition === "bottom",
|
|
3066
3529
|
"justify-start": horizontalAlign === "left",
|
|
@@ -3069,7 +3532,7 @@ var TooltipContent = ({
|
|
|
3069
3532
|
"w-[24px]": size === "small",
|
|
3070
3533
|
"w-[46px]": size !== "small"
|
|
3071
3534
|
});
|
|
3072
|
-
const tooltipBodyClasses = (0,
|
|
3535
|
+
const tooltipBodyClasses = (0, import_clsx47.default)(
|
|
3073
3536
|
"absolute z-tooltip inline-block w-max rounded bg-uiBackgroundTooltip text-textOnColor",
|
|
3074
3537
|
{
|
|
3075
3538
|
"typography-body12regular": size === "small",
|
|
@@ -3086,7 +3549,7 @@ var TooltipContent = ({
|
|
|
3086
3549
|
transform: `translate(${tooltipPosition.translateX}, ${tooltipPosition.translateY})`,
|
|
3087
3550
|
...tooltipPosition
|
|
3088
3551
|
} : {};
|
|
3089
|
-
return /* @__PURE__ */ (0,
|
|
3552
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: tooltipWrapperClasses, style: tooltipWrapperStyle, children: /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
|
3090
3553
|
"div",
|
|
3091
3554
|
{
|
|
3092
3555
|
className: tooltipBodyClasses,
|
|
@@ -3095,16 +3558,16 @@ var TooltipContent = ({
|
|
|
3095
3558
|
},
|
|
3096
3559
|
children: [
|
|
3097
3560
|
content,
|
|
3098
|
-
/* @__PURE__ */ (0,
|
|
3561
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(TailIcon, { size, verticalPosition, horizontalAlign })
|
|
3099
3562
|
]
|
|
3100
3563
|
}
|
|
3101
3564
|
) });
|
|
3102
3565
|
};
|
|
3103
3566
|
|
|
3104
3567
|
// src/tooltip/tooltip-hook.ts
|
|
3105
|
-
var
|
|
3568
|
+
var import_react52 = require("react");
|
|
3106
3569
|
var useTooltip = () => {
|
|
3107
|
-
const calculatePosition = (0,
|
|
3570
|
+
const calculatePosition = (0, import_react52.useCallback)(
|
|
3108
3571
|
(args) => {
|
|
3109
3572
|
const result = {
|
|
3110
3573
|
maxWidth: "none",
|
|
@@ -3156,7 +3619,7 @@ var useTooltip = () => {
|
|
|
3156
3619
|
};
|
|
3157
3620
|
|
|
3158
3621
|
// src/tooltip/tooltip.tsx
|
|
3159
|
-
var
|
|
3622
|
+
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
3160
3623
|
function Tooltip({
|
|
3161
3624
|
children,
|
|
3162
3625
|
content,
|
|
@@ -3168,8 +3631,8 @@ function Tooltip({
|
|
|
3168
3631
|
portalTarget
|
|
3169
3632
|
}) {
|
|
3170
3633
|
const { calculatePosition } = useTooltip();
|
|
3171
|
-
const [isVisible, setIsVisible] = (0,
|
|
3172
|
-
const [tooltipPosition, setTooltipPosition] = (0,
|
|
3634
|
+
const [isVisible, setIsVisible] = (0, import_react53.useState)(false);
|
|
3635
|
+
const [tooltipPosition, setTooltipPosition] = (0, import_react53.useState)({
|
|
3173
3636
|
maxWidth: "none",
|
|
3174
3637
|
width: "auto",
|
|
3175
3638
|
left: "0px",
|
|
@@ -3178,23 +3641,23 @@ function Tooltip({
|
|
|
3178
3641
|
translateX: "0",
|
|
3179
3642
|
translateY: "0"
|
|
3180
3643
|
});
|
|
3181
|
-
const targetRef = (0,
|
|
3182
|
-
const handleMouseOverWrapper = (0,
|
|
3644
|
+
const targetRef = (0, import_react53.useRef)(null);
|
|
3645
|
+
const handleMouseOverWrapper = (0, import_react53.useCallback)(() => {
|
|
3183
3646
|
if (isDisabledHover) {
|
|
3184
3647
|
return;
|
|
3185
3648
|
}
|
|
3186
3649
|
setIsVisible(true);
|
|
3187
3650
|
}, [isDisabledHover]);
|
|
3188
|
-
const handleMouseOutWrapper = (0,
|
|
3651
|
+
const handleMouseOutWrapper = (0, import_react53.useCallback)(() => {
|
|
3189
3652
|
setIsVisible(false);
|
|
3190
3653
|
}, []);
|
|
3191
|
-
(0,
|
|
3654
|
+
(0, import_react53.useEffect)(() => {
|
|
3192
3655
|
if (targetRef.current === null) return;
|
|
3193
3656
|
const dimensions = targetRef.current?.getBoundingClientRect();
|
|
3194
3657
|
const position = calculatePosition({ dimensions, maxWidth, verticalPosition, horizontalAlign, tooltipSize: size });
|
|
3195
3658
|
setTooltipPosition(position);
|
|
3196
3659
|
}, [calculatePosition, horizontalAlign, maxWidth, size, verticalPosition]);
|
|
3197
|
-
return /* @__PURE__ */ (0,
|
|
3660
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
|
|
3198
3661
|
"div",
|
|
3199
3662
|
{
|
|
3200
3663
|
ref: targetRef,
|
|
@@ -3203,7 +3666,7 @@ function Tooltip({
|
|
|
3203
3666
|
onMouseLeave: handleMouseOutWrapper,
|
|
3204
3667
|
children: [
|
|
3205
3668
|
children,
|
|
3206
|
-
isVisible && (portalTarget == null ? /* @__PURE__ */ (0,
|
|
3669
|
+
isVisible && (portalTarget == null ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
3207
3670
|
TooltipContent,
|
|
3208
3671
|
{
|
|
3209
3672
|
content,
|
|
@@ -3214,7 +3677,7 @@ function Tooltip({
|
|
|
3214
3677
|
tooltipPosition
|
|
3215
3678
|
}
|
|
3216
3679
|
) : (0, import_react_dom4.createPortal)(
|
|
3217
|
-
/* @__PURE__ */ (0,
|
|
3680
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
3218
3681
|
TooltipContent,
|
|
3219
3682
|
{
|
|
3220
3683
|
isPortal: true,
|
|
@@ -3238,6 +3701,7 @@ function Tooltip({
|
|
|
3238
3701
|
Breadcrumb,
|
|
3239
3702
|
Button,
|
|
3240
3703
|
Checkbox,
|
|
3704
|
+
DatePicker,
|
|
3241
3705
|
Dropdown,
|
|
3242
3706
|
EvaluationStar,
|
|
3243
3707
|
FileInput,
|