@topconsultnpm/sdkui-react 6.22.0-dev3.35 → 6.22.0-dev3.36

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.
Files changed (104) hide show
  1. package/lib/components/NewComponents/ContextMenu/styles.d.ts +45 -43
  2. package/lib/components/NewComponents/FloatingMenuBar/styles.d.ts +67 -60
  3. package/lib/components/base/Styled.d.ts +93 -77
  4. package/lib/components/base/TMCounterBar.d.ts +2 -2
  5. package/lib/components/base/TMCounterContainer.d.ts +2 -1
  6. package/lib/components/base/TMCustomButton.d.ts +1 -1
  7. package/lib/components/base/TMDataGridExportForm.d.ts +2 -1
  8. package/lib/components/base/TMFileManager.d.ts +2 -1
  9. package/lib/components/base/TMFileManagerDataGridView.d.ts +2 -1
  10. package/lib/components/base/TMFileManagerThumbnailItems.d.ts +1 -1
  11. package/lib/components/base/TMFileManagerThumbnailsView.d.ts +1 -1
  12. package/lib/components/base/TMFileManagerUtils.d.ts +4 -6
  13. package/lib/components/base/TMLayout.d.ts +4 -4
  14. package/lib/components/base/TMList.d.ts +2 -1
  15. package/lib/components/base/TMListView.d.ts +1 -1
  16. package/lib/components/base/TMSpinner.d.ts +3 -2
  17. package/lib/components/base/TMTab.d.ts +4 -3
  18. package/lib/components/base/TMTabControl.js +208 -208
  19. package/lib/components/base/TMTooltip.d.ts +1 -1
  20. package/lib/components/base/TMTreeView.d.ts +14 -8
  21. package/lib/components/base/TMUserAvatar.d.ts +2 -1
  22. package/lib/components/base/TMVilViewer.d.ts +2 -1
  23. package/lib/components/base/TMWaitPanel.d.ts +3 -2
  24. package/lib/components/base/waitPanel/TMWaitPanelView.d.ts +2 -1
  25. package/lib/components/choosers/TMDynDataListItemChooser.d.ts +1 -1
  26. package/lib/components/choosers/TMInvoiceRetrieveFormats.d.ts +2 -1
  27. package/lib/components/choosers/TMOrderRetrieveFormats.d.ts +2 -1
  28. package/lib/components/choosers/TMQuickSearchInfo.d.ts +2 -1
  29. package/lib/components/choosers/TMRelationChooser.d.ts +3 -3
  30. package/lib/components/choosers/TMUserChooser.d.ts +2 -2
  31. package/lib/components/editors/TMEditorStyled.d.ts +20 -42
  32. package/lib/components/editors/TMFormulaEditor.d.ts +1 -1
  33. package/lib/components/editors/TMHtmlContentDisplay.d.ts +2 -1
  34. package/lib/components/editors/TMHtmlEditor.d.ts +2 -1
  35. package/lib/components/editors/TMTreeDropDown.d.ts +1 -1
  36. package/lib/components/features/assistant/TMHelpOnLineChat.js +803 -803
  37. package/lib/components/features/assistant/TMToppyDraggableHelpCenter.d.ts +1 -1
  38. package/lib/components/features/blog/TMBlogCommentForm.d.ts +2 -1
  39. package/lib/components/features/documents/TMDcmtFormActionButtons.d.ts +1 -1
  40. package/lib/components/features/documents/TMDcmtIcon.d.ts +2 -1
  41. package/lib/components/features/documents/TMDcmtPreview.d.ts +8 -6
  42. package/lib/components/features/documents/TMDcmtTasks.d.ts +2 -1
  43. package/lib/components/features/documents/TMDragDropOverlay.d.ts +1 -1
  44. package/lib/components/features/documents/TMFileUploader.js +21 -21
  45. package/lib/components/features/documents/TMMasterInfoFields.d.ts +2 -1
  46. package/lib/components/features/documents/TMMergeToPdfForm.d.ts +2 -1
  47. package/lib/components/features/documents/TMMultiMasterDetailDcmtsForm.d.ts +2 -1
  48. package/lib/components/features/documents/TMMultiMasterDetailDcmtsUtils.d.ts +4 -4
  49. package/lib/components/features/search/TMDcmtCheckoutInfoForm.d.ts +2 -1
  50. package/lib/components/features/search/TMMetadataOutputForm.d.ts +2 -1
  51. package/lib/components/features/search/TMMetadataSorterForm.d.ts +2 -1
  52. package/lib/components/features/search/TMSavedQuerySelector.d.ts +2 -2
  53. package/lib/components/features/search/TMSearch.d.ts +2 -1
  54. package/lib/components/features/search/TMSearchQueryPanel.d.ts +9 -3
  55. package/lib/components/features/search/TMSearchResult.js +12 -1
  56. package/lib/components/features/search/TMSearchResultFloatingActionButton.d.ts +1 -1
  57. package/lib/components/features/search/TMSignatureInfoContent.d.ts +2 -1
  58. package/lib/components/features/search/TMViewHistoryDcmt.d.ts +2 -1
  59. package/lib/components/features/tasks/TMTaskForm.d.ts +1 -1
  60. package/lib/components/features/tasks/TMTaskFormUtils.d.ts +10 -10
  61. package/lib/components/features/tasks/TMTasksAgenda.d.ts +1 -1
  62. package/lib/components/features/tasks/TMTasksCalendar.d.ts +1 -1
  63. package/lib/components/features/tasks/TMTasksHeader.d.ts +1 -1
  64. package/lib/components/features/tasks/TMTasksPanelContent.d.ts +1 -1
  65. package/lib/components/features/tasks/TMTasksUtilsView.d.ts +5 -5
  66. package/lib/components/features/tasks/TMTasksView.d.ts +1 -1
  67. package/lib/components/features/wg/TMWGsCopyMoveForm.d.ts +3 -2
  68. package/lib/components/features/workflow/TMWorkflowPopup.d.ts +8 -7
  69. package/lib/components/features/workflow/diagram/WorkitemRecipientsEditor.d.ts +3 -1
  70. package/lib/components/forms/Login/ChangePasswordInputs.d.ts +3 -1
  71. package/lib/components/forms/Login/Chooser.d.ts +2 -2
  72. package/lib/components/forms/TMChooserForm.d.ts +2 -1
  73. package/lib/components/forms/TMSaveForm.d.ts +4 -4
  74. package/lib/components/grids/TMBlogAttachments.d.ts +2 -1
  75. package/lib/components/grids/TMBlogHeader.d.ts +1 -1
  76. package/lib/components/grids/TMBlogsPost.d.ts +1 -1
  77. package/lib/components/grids/TMBlogsPostUtils.d.ts +9 -9
  78. package/lib/components/grids/TMValidationItemsList.d.ts +2 -1
  79. package/lib/components/layout/panelManager/TMPanelManagerContainer.d.ts +2 -1
  80. package/lib/components/layout/panelManager/TMPanelManagerContext.d.ts +2 -2
  81. package/lib/components/layout/panelManager/TMPanelManagerToolbar.d.ts +5 -6
  82. package/lib/components/layout/panelManager/TMPanelManagerWithPersistenceProvider.d.ts +2 -2
  83. package/lib/components/layout/panelManager/TMPanelWrapper.d.ts +2 -2
  84. package/lib/components/pages/TMPage.d.ts +1 -1
  85. package/lib/components/query/TMQueryEditor.d.ts +14 -10
  86. package/lib/components/settings/SettingsAppearance.d.ts +2 -1
  87. package/lib/components/sidebar/TMAboutApp.d.ts +2 -1
  88. package/lib/components/sidebar/TMCommandsPanel.d.ts +4 -4
  89. package/lib/components/sidebar/TMHeader.d.ts +3 -3
  90. package/lib/components/viewers/TMDataListItemViewer.d.ts +3 -2
  91. package/lib/components/viewers/TMDataUserIdItemViewer.d.ts +3 -2
  92. package/lib/components/viewers/TMMidViewer.d.ts +2 -2
  93. package/lib/components/viewers/TMTidViewer.d.ts +2 -2
  94. package/lib/helper/TMAppUpdatedModal.d.ts +2 -1
  95. package/lib/helper/TMAppUpdatedModal.js +93 -93
  96. package/lib/helper/TMCommandsContextMenu.d.ts +1 -1
  97. package/lib/helper/TMIcons.d.ts +280 -280
  98. package/lib/helper/TMPdfViewer.d.ts +2 -1
  99. package/lib/helper/TMToppyMessage.d.ts +2 -2
  100. package/lib/helper/TMUtils.d.ts +10 -4
  101. package/lib/helper/helpers.d.ts +1 -1
  102. package/lib/hooks/useInputDialog.d.ts +2 -1
  103. package/lib/services/platform_services.d.ts +3 -2
  104. package/package.json +1 -1
@@ -565,807 +565,807 @@ function IconCheck(props) {
565
565
  }
566
566
  //#endregion
567
567
  //#region Styled Components
568
- const fadeIn = keyframes `
569
- from { opacity: 0; }
570
- to { opacity: 1; }
571
- `;
572
- const slideInRight = keyframes `
573
- from { transform: translateX(100%); }
574
- to { transform: translateX(0); }
575
- `;
576
- const phraseIn = keyframes `
577
- from { opacity: 0; transform: translateY(4px); }
578
- to { opacity: 1; transform: translateY(0); }
579
- `;
580
- const suggestionIn = keyframes `
581
- from { opacity: 0; transform: translateY(6px); }
582
- to { opacity: 1; transform: translateY(0); }
583
- `;
584
- const feedbackIn = keyframes `
585
- from { opacity: 0; transform: translateY(-4px); }
586
- to { opacity: 1; transform: translateY(0); }
587
- `;
588
- const badgeIn = keyframes `
589
- 0% { opacity: 0; transform: scale(0.85); }
590
- 60% { opacity: 1; transform: scale(1.05); }
591
- 100% { opacity: 1; transform: scale(1); }
592
- `;
593
- const dotCycle = keyframes `
594
- 0% { opacity: 0; }
595
- 25%, 75% { opacity: 1; }
596
- 100% { opacity: 0; }
597
- `;
598
- const ToppyHeaderButton = styled.button `
599
- display: flex;
600
- align-items: center;
601
- gap: 8px;
602
- height: 36px;
603
- padding: 0 14px 0 5px;
604
- border-radius: 18px;
605
- border: 1px solid ${TMColors.primary}35;
606
- background: ${TMColors.primary}0d;
607
- color: ${TMColors.primary};
608
- font-size: 13px;
609
- font-weight: 600;
610
- white-space: nowrap;
611
- cursor: pointer;
612
- flex-shrink: 0;
613
- transition: all 0.2s ease;
614
-
615
- &:hover {
616
- background: ${TMColors.primary}1a;
617
- border-color: ${TMColors.primary}66;
618
- transform: translateY(-1px);
619
- box-shadow: 0 4px 12px ${TMColors.primary}25;
620
- }
621
- &:active { transform: translateY(0); }
622
- `;
623
- const ToppyHeaderAvatar = styled.img `
624
- width: 28px;
625
- height: 28px;
626
- border-radius: 50%;
627
- object-fit: contain;
628
- pointer-events: none;
629
- `;
630
- const ToppyHeaderText = styled.span `
631
- line-height: 1;
632
- `;
633
- const Fab = styled.button `
634
- position: fixed;
635
- bottom: 24px;
636
- right: 24px;
637
- width: 60px;
638
- height: 60px;
639
- border-radius: 50%;
640
- border: none;
641
- padding: 0;
642
- cursor: pointer;
643
- display: flex;
644
- align-items: center;
645
- justify-content: center;
646
- background: white;
647
- box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
648
- z-index: 100000;
649
- transition: transform 0.2s ease, box-shadow 0.2s ease;
650
- animation: ${fadeIn} 0.3s ease-out;
651
-
652
- &:hover { transform: scale(1.08); box-shadow: 0 8px 26px rgba(0, 0, 0, 0.3); }
653
- &:active { transform: scale(0.96); }
654
- `;
655
- const FabAvatar = styled.img `
656
- width: 52px;
657
- height: 52px;
658
- border-radius: 50%;
659
- object-fit: contain;
660
- pointer-events: none;
661
- `;
662
- const Overlay = styled.div `
663
- position: fixed;
664
- inset: 0;
665
- background: rgba(0, 0, 0, 0.45);
666
- z-index: 100000;
667
- animation: ${fadeIn} 0.2s ease-out;
668
- `;
669
- const PanelContainer = styled.div `
670
- position: fixed;
671
- top: 0;
672
- right: 0;
673
- height: 100vh;
674
- width: ${props => props.$width}px;
675
- max-width: 100vw;
676
- background: white;
677
- display: flex;
678
- flex-direction: column;
679
- box-shadow: -8px 0 32px rgba(0, 0, 0, 0.28);
680
- z-index: 100001;
681
- animation: ${slideInRight} 0.25s ease-out;
682
- `;
683
- const ResizeHandle = styled.div `
684
- position: absolute;
685
- left: 0;
686
- top: 0;
687
- bottom: 0;
688
- width: 6px;
689
- cursor: col-resize;
690
- background: transparent;
691
- z-index: 2;
692
- transition: background 0.2s ease;
693
-
694
- &:hover { background: ${TMColors.primary}55; }
695
- `;
696
- const ChatHeader = styled.div `
697
- display: flex;
698
- align-items: center;
699
- justify-content: space-between;
700
- padding: 16px 20px;
701
- background: linear-gradient(135deg, ${TMColors.primary} 0%, ${TMColors.primary}dd 100%);
702
- color: white;
703
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
704
- `;
705
- const HeaderLeft = styled.div `
706
- display: flex;
707
- align-items: center;
708
- gap: 12px;
709
- flex: 1;
710
- min-width: 0;
711
- `;
712
- const HeaderRight = styled.div `
713
- display: flex;
714
- align-items: center;
715
- gap: 8px;
716
- margin-left: 12px;
717
- flex-shrink: 0;
718
- `;
719
- const ToppyAvatar = styled.img `
720
- width: 44px;
721
- height: 44px;
722
- border-radius: 50%;
723
- background: white;
724
- padding: 4px;
725
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
726
- flex-shrink: 0;
727
- object-fit: contain;
728
- `;
729
- const HeaderText = styled.div `
730
- display: flex;
731
- flex-direction: column;
732
- gap: 2px;
733
- min-width: 0;
734
- `;
735
- const HeaderGreeting = styled.h2 `
736
- margin: 0;
737
- font-size: 17px;
738
- font-weight: 600;
739
- color: white;
740
- white-space: nowrap;
741
- overflow: hidden;
742
- text-overflow: ellipsis;
743
- `;
744
- const HeaderQuestion = styled.p `
745
- margin: 0;
746
- font-size: 13px;
747
- color: rgba(255, 255, 255, 0.9);
748
- `;
749
- const HeaderButton = styled.button `
750
- width: 32px;
751
- height: 32px;
752
- border-radius: 50%;
753
- background: rgba(255, 255, 255, 0.2);
754
- border: 1px solid rgba(255, 255, 255, 0.3);
755
- color: white;
756
- cursor: pointer;
757
- display: flex;
758
- align-items: center;
759
- justify-content: center;
760
- flex-shrink: 0;
761
- transition: all 0.2s ease;
762
-
763
- &:hover:not(:disabled) { background: rgba(255, 255, 255, 0.3); transform: scale(1.05); }
764
- &:active:not(:disabled) { transform: scale(0.95); }
765
- &:disabled { opacity: 0.45; cursor: default; }
766
- `;
767
- const ChatBody = styled.div `
768
- flex: 1;
769
- padding: 20px;
770
- overflow-y: auto;
771
- background: linear-gradient(to bottom, #f8f9fa 0%, #ffffff 100%);
772
- `;
773
- const WelcomeMessage = styled.div `
774
- display: flex;
775
- gap: 16px;
776
- padding: 18px;
777
- background: white;
778
- border-radius: 12px;
779
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
780
- border-left: 4px solid ${TMColors.primary};
781
- animation: ${fadeIn} 0.5s ease-out;
782
- `;
783
- const WelcomeIcon = styled.div `
784
- font-size: 30px;
785
- flex-shrink: 0;
786
- `;
787
- const WelcomeText = styled.p `
788
- margin: 0;
789
- font-size: 14px;
790
- line-height: 1.6;
791
- color: #242424;
792
-
793
- strong { color: ${TMColors.primary}; font-weight: 600; }
794
- `;
795
- const MessageBubble = styled.div `
796
- display: flex;
797
- gap: 10px;
798
- margin-bottom: 16px;
799
- align-items: flex-start;
800
- justify-content: ${props => (props.$isUser ? 'flex-end' : 'flex-start')};
801
- animation: ${fadeIn} 0.3s ease-out;
802
- `;
803
- const BotAvatar = styled.img `
804
- width: 32px;
805
- height: 32px;
806
- border-radius: 50%;
807
- background: white;
808
- padding: 2px;
809
- box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
810
- flex-shrink: 0;
811
- object-fit: contain;
812
- `;
813
- const MessageContent = styled.div `
814
- max-width: 80%;
815
- padding: 10px 14px;
816
- border-radius: 12px;
817
- font-size: 14px;
818
- line-height: 1.5;
819
- background: ${props => (props.$isUser ? TMColors.primary : '#f0f2f5')};
820
- color: ${props => (props.$isUser ? 'white' : '#242424')};
821
- box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
822
- word-wrap: break-word;
823
- overflow-wrap: anywhere;
824
- white-space: ${props => (props.$isUser ? 'pre-wrap' : 'normal')};
825
- border-bottom-${props => (props.$isUser ? 'right' : 'left')}-radius: 4px;
826
- `;
827
- const BotMessageColumn = styled.div `
828
- display: flex;
829
- flex-direction: column;
830
- align-items: flex-start;
831
- width: 80%;
832
- min-width: 0;
833
- `;
834
- const BotMessageContent = styled(MessageContent) `
835
- max-width: 100%;
836
- `;
837
- const FeedbackContainer = styled.div `
838
- width: 100%;
839
- margin-top: 4px;
840
- `;
841
- const FeedbackActions = styled.div `
842
- display: flex;
843
- align-items: center;
844
- gap: 2px;
845
- `;
846
- const FeedbackActionButton = styled.button `
847
- display: flex;
848
- align-items: center;
849
- justify-content: center;
850
- width: 28px;
851
- height: 28px;
852
- padding: 0;
853
- border-radius: 8px;
854
- border: 1px solid ${props => (props.$active ? `${TMColors.primary}55` : 'transparent')};
855
- background: ${props => (props.$active ? `${TMColors.primary}12` : 'transparent')};
856
- color: ${props => (props.$success ? '#2e7d32' : props.$active ? TMColors.primary : '#8a8f98')};
857
- cursor: ${props => (props.$locked ? 'default' : 'pointer')};
858
- transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
859
-
860
- &:hover:not(:disabled) {
861
- background: ${props => (props.$active ? `${TMColors.primary}12` : 'rgba(0, 0, 0, 0.05)')};
862
- color: ${props => (props.$success ? '#2e7d32' : props.$active ? TMColors.primary : '#242424')};
863
- }
864
-
865
- &:focus-visible {
866
- outline: 2px solid ${TMColors.primary}55;
867
- outline-offset: 1px;
868
- }
869
-
870
- &:disabled {
871
- opacity: 0.35;
872
- cursor: default;
873
- }
874
- `;
875
- const SentBadge = styled.span `
876
- display: inline-flex;
877
- align-items: center;
878
- gap: 4px;
879
- margin-left: 6px;
880
- padding: 3px 9px 3px 7px;
881
- border-radius: 999px;
882
- background: #e8f5e9;
883
- border: 1px solid #c8e6c9;
884
- color: #2e7d32;
885
- font-size: 11px;
886
- font-weight: 600;
887
- line-height: 1;
888
- letter-spacing: 0.02em;
889
- animation: ${badgeIn} 0.35s ease-out;
890
-
891
- @media (prefers-reduced-motion: reduce) {
892
- animation: none;
893
- }
894
- `;
895
- const FeedbackPanel = styled.div `
896
- margin-top: 6px;
897
- padding: 14px 16px;
898
- border: 1px solid #e5e7eb;
899
- border-radius: 12px;
900
- background: white;
901
- box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
902
- scroll-margin: 12px;
903
- animation: ${feedbackIn} 0.2s ease-out;
904
- `;
905
- const FeedbackPanelHeader = styled.div `
906
- display: flex;
907
- align-items: flex-start;
908
- justify-content: space-between;
909
- gap: 12px;
910
- margin-bottom: 10px;
911
- `;
912
- const FeedbackPanelTitle = styled.div `
913
- font-size: 14px;
914
- font-weight: 600;
915
- color: #242424;
916
- line-height: 1.35;
917
- `;
918
- const FeedbackCloseButton = styled.button `
919
- display: flex;
920
- align-items: center;
921
- justify-content: center;
922
- width: 24px;
923
- height: 24px;
924
- padding: 0;
925
- border: none;
926
- border-radius: 6px;
927
- background: transparent;
928
- color: #6b7280;
929
- cursor: pointer;
930
- flex-shrink: 0;
931
- transition: background 0.2s ease, color 0.2s ease;
932
-
933
- &:hover { background: rgba(0, 0, 0, 0.06); color: #242424; }
934
- `;
935
- const FeedbackLabel = styled.div `
936
- margin: 0 0 8px 0;
937
- font-size: 12px;
938
- font-weight: 600;
939
- color: #6b7280;
940
- `;
941
- const FeedbackTags = styled.div `
942
- display: flex;
943
- flex-wrap: wrap;
944
- gap: 8px;
945
- margin-bottom: 14px;
946
- `;
947
- const FeedbackTag = styled.button `
948
- padding: 6px 12px;
949
- border-radius: 8px;
950
- border: 1px solid ${props => (props.$selected ? TMColors.primary : '#dcdfe3')};
951
- background: ${props => (props.$selected ? `${TMColors.primary}10` : 'white')};
952
- color: ${props => (props.$selected ? TMColors.primary : '#242424')};
953
- font-family: inherit;
954
- font-size: 13px;
955
- font-weight: ${props => (props.$selected ? 600 : 400)};
956
- line-height: 1.2;
957
- cursor: pointer;
958
- transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
959
-
960
- &:hover { border-color: ${TMColors.primary}88; }
961
-
962
- &:focus-visible {
963
- outline: 2px solid ${TMColors.primary}55;
964
- outline-offset: 1px;
965
- }
966
- `;
967
- const FeedbackTextarea = styled.textarea `
968
- display: block;
969
- width: 100%;
970
- min-height: 70px;
971
- padding: 9px 11px;
972
- border: 1px solid #dcdfe3;
973
- border-radius: 8px;
974
- font-family: inherit;
975
- font-size: 13px;
976
- line-height: 1.45;
977
- color: #242424;
978
- background: white;
979
- resize: none;
980
- box-sizing: border-box;
981
- transition: border-color 0.2s ease, box-shadow 0.2s ease;
982
-
983
- &::placeholder { color: #9ca3af; }
984
-
985
- &:focus {
986
- outline: none;
987
- border-color: ${TMColors.primary};
988
- box-shadow: 0 0 0 3px ${TMColors.primary}15;
989
- }
990
- `;
991
- const FeedbackPanelFooter = styled.div `
992
- display: flex;
993
- align-items: center;
994
- justify-content: space-between;
995
- margin-top: 10px;
996
- `;
997
- const FeedbackCounter = styled.span `
998
- font-size: 11px;
999
- color: ${props => (props.$full ? '#c62828' : '#9ca3af')};
1000
- font-variant-numeric: tabular-nums;
1001
- `;
1002
- const FeedbackSubmitButton = styled.button `
1003
- padding: 7px 18px;
1004
- border: none;
1005
- border-radius: 8px;
1006
- background: ${TMColors.primary};
1007
- color: white;
1008
- font-family: inherit;
1009
- font-size: 13px;
1010
- font-weight: 600;
1011
- cursor: pointer;
1012
- transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
1013
-
1014
- &:hover:not(:disabled) {
1015
- box-shadow: 0 4px 12px ${TMColors.primary}40;
1016
- transform: translateY(-1px);
1017
- }
1018
-
1019
- &:active:not(:disabled) { transform: translateY(0); }
1020
-
1021
- &:disabled {
1022
- opacity: 0.4;
1023
- cursor: default;
1024
- }
1025
- `;
1026
- const MarkdownContent = styled.div `
1027
- & > *:first-child { margin-top: 0; }
1028
- & > *:last-child { margin-bottom: 0; }
1029
-
1030
- a { color: ${TMColors.primary}; text-decoration: underline; }
1031
- strong { font-weight: 600; }
1032
- `;
1033
- const MdParagraph = styled.p `
1034
- margin: 0 0 8px 0;
1035
- line-height: 1.55;
1036
- `;
1037
- const MdHeading = styled.div `
1038
- margin: 12px 0 6px 0;
1039
- font-weight: 700;
1040
- line-height: 1.3;
1041
- font-size: ${props => `${Math.max(14, 20 - (props.$level - 1) * 2)}px`};
1042
- `;
1043
- const MdUl = styled.ul `
1044
- margin: 4px 0 8px 0;
1045
- padding-left: 20px;
1046
- li { margin: 2px 0; line-height: 1.5; }
1047
- `;
1048
- const MdOl = styled.ol `
1049
- margin: 4px 0 8px 0;
1050
- padding-left: 22px;
1051
- li { margin: 2px 0; line-height: 1.5; }
1052
- `;
1053
- const MdCode = styled.code `
1054
- background: rgba(0, 0, 0, 0.06);
1055
- padding: 1px 5px;
1056
- border-radius: 4px;
1057
- font-family: 'Consolas', 'Monaco', monospace;
1058
- font-size: 0.9em;
1059
- `;
1060
- const MdPre = styled.pre `
1061
- background: rgba(0, 0, 0, 0.06);
1062
- padding: 10px 12px;
1063
- border-radius: 8px;
1064
- overflow-x: auto;
1065
- margin: 8px 0;
1066
- font-family: 'Consolas', 'Monaco', monospace;
1067
- font-size: 0.88em;
1068
- white-space: pre;
1069
- `;
1070
- const MdTableWrapper = styled.div `
1071
- margin: 8px 0;
1072
- max-width: 100%;
1073
- overflow-x: auto;
1074
- border: 1px solid #dcdfe3;
1075
- border-radius: 8px;
1076
-
1077
- &::-webkit-scrollbar { height: 6px; }
1078
- &::-webkit-scrollbar-track { background: transparent; }
1079
- &::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }
1080
- &::-webkit-scrollbar-thumb:hover { background: #999; }
1081
- `;
1082
- const MdTable = styled.table `
1083
- border-collapse: collapse;
1084
- width: 100%;
1085
- font-size: 0.92em;
1086
- background: white;
1087
- `;
1088
- const MdTh = styled.th `
1089
- padding: 7px 10px;
1090
- background: ${TMColors.primary}14;
1091
- color: #242424;
1092
- font-weight: 600;
1093
- text-align: ${props => props.$align ?? 'left'};
1094
- border-bottom: 1px solid #dcdfe3;
1095
- white-space: nowrap;
1096
-
1097
- &:not(:last-child) { border-right: 1px solid #e6e8eb; }
1098
- `;
1099
- const MdTd = styled.td `
1100
- padding: 7px 10px;
1101
- text-align: ${props => props.$align ?? 'left'};
1102
- vertical-align: top;
1103
- border-top: 1px solid #eceef0;
1104
-
1105
- &:not(:last-child) { border-right: 1px solid #eceef0; }
1106
-
1107
- tr:nth-child(even) & { background: #fafbfc; }
1108
- `;
1109
- const MdBlockquote = styled.blockquote `
1110
- margin: 8px 0;
1111
- padding: 6px 12px;
1112
- border-left: 3px solid ${TMColors.primary}66;
1113
- background: ${TMColors.primary}0a;
1114
- border-radius: 0 6px 6px 0;
1115
- color: #444;
1116
-
1117
- & > *:first-child { margin-top: 0; }
1118
- & > *:last-child { margin-bottom: 0; }
1119
- `;
1120
- const MdHr = styled.hr `
1121
- border: none;
1122
- border-top: 1px solid #dcdfe3;
1123
- margin: 12px 0;
1124
- `;
1125
- const ThinkingIndicator = styled.div `
1126
- display: flex;
1127
- align-items: center;
1128
- gap: 10px;
1129
- max-width: 80%;
1130
- padding: 7px 12px;
1131
- background: #f0f2f5;
1132
- border-radius: 12px;
1133
- border-bottom-left-radius: 4px;
1134
- box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
1135
- `;
1136
- const ThinkingCaption = styled.div `
1137
- display: flex;
1138
- flex-direction: column;
1139
- align-items: flex-start;
1140
- gap: 0;
1141
- min-width: 0;
1142
- `;
1143
- const ThinkingPhrase = styled.span `
1144
- display: inline-flex;
1145
- align-items: center;
1146
- min-width: 0;
1147
- font-size: 12px;
1148
- font-style: italic;
1149
- line-height: 1.15;
1150
- color: #6b7280;
1151
- animation: ${phraseIn} 0.25s ease-out;
1152
- `;
1153
- const ThinkingDots = styled.span `
1154
- display: inline-flex;
1155
- width: 12px;
1156
- flex-shrink: 0;
1157
- `;
1158
- const ThinkingDot = styled.span `
1159
- animation: ${dotCycle} 1.2s linear infinite;
1160
- animation-delay: ${props => props.$delay}s;
1161
- will-change: opacity;
1162
-
1163
- @media (prefers-reduced-motion: reduce) {
1164
- animation: none;
1165
- opacity: 1;
1166
- }
1167
- `;
1168
- const ThinkingCounter = styled.span `
1169
- margin-top: 2px;
1170
- font-size: 10px;
1171
- font-weight: 600;
1172
- line-height: 1.1;
1173
- letter-spacing: 0.02em;
1174
- color: ${TMColors.primary}b3;
1175
- font-variant-numeric: tabular-nums;
1176
- font-feature-settings: 'tnum';
1177
- opacity: ${props => (props.$visible ? 1 : 0)};
1178
- transition: opacity 0.3s ease;
1179
- `;
1180
- const ChatFooter = styled.div `
1181
- padding: 16px 20px;
1182
- background: white;
1183
- border-top: 1px solid #e1e5e9;
1184
- box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
1185
- `;
1186
- const SuggestionsSection = styled.div `
1187
- margin-bottom: 14px;
1188
- `;
1189
- const SuggestionsTitle = styled.div `
1190
- display: flex;
1191
- align-items: center;
1192
- gap: 6px;
1193
- margin: 0 0 8px 2px;
1194
- font-size: 11px;
1195
- font-weight: 600;
1196
- letter-spacing: 0.06em;
1197
- text-transform: uppercase;
1198
- color: #6b7280;
1199
-
1200
- svg { color: ${TMColors.primary}; }
1201
- `;
1202
- const SuggestionsGrid = styled.div `
1203
- display: grid;
1204
- grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
1205
- gap: 8px;
1206
- `;
1207
- const SuggestionIcon = styled.span `
1208
- display: flex;
1209
- align-items: center;
1210
- justify-content: center;
1211
- width: 28px;
1212
- height: 28px;
1213
- border-radius: 8px;
1214
- flex-shrink: 0;
1215
- background: ${TMColors.primary}14;
1216
- color: ${TMColors.primary};
1217
- transition: background 0.2s ease, color 0.2s ease;
1218
- `;
1219
- const SuggestionText = styled.span `
1220
- flex: 1;
1221
- min-width: 0;
1222
- display: -webkit-box;
1223
- -webkit-line-clamp: 2;
1224
- -webkit-box-orient: vertical;
1225
- overflow: hidden;
1226
- `;
1227
- const SuggestionArrow = styled.span `
1228
- display: flex;
1229
- flex-shrink: 0;
1230
- color: ${TMColors.primary};
1231
- opacity: 0;
1232
- transform: translateX(-4px);
1233
- transition: opacity 0.2s ease, transform 0.2s ease;
1234
- `;
1235
- const SuggestionCard = styled.button `
1236
- display: flex;
1237
- align-items: center;
1238
- gap: 10px;
1239
- width: 100%;
1240
- min-height: 52px;
1241
- padding: 9px 12px;
1242
- border: 1px solid ${TMColors.primary}22;
1243
- border-radius: 12px;
1244
- background: linear-gradient(135deg, #ffffff 0%, ${TMColors.primary}08 100%);
1245
- box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
1246
- color: #242424;
1247
- font-family: inherit;
1248
- font-size: 13px;
1249
- line-height: 1.35;
1250
- text-align: left;
1251
- cursor: pointer;
1252
- opacity: 0;
1253
- animation: ${suggestionIn} 0.35s ease-out forwards;
1254
- animation-delay: ${props => props.$index * 70}ms;
1255
- transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
1256
-
1257
- &:hover, &:focus-visible {
1258
- border-color: ${TMColors.primary}66;
1259
- background: ${TMColors.primary}0d;
1260
- box-shadow: 0 4px 14px ${TMColors.primary}1f;
1261
- transform: translateY(-1px);
1262
- }
1263
-
1264
- &:hover ${SuggestionIcon}, &:focus-visible ${SuggestionIcon} {
1265
- background: ${TMColors.primary};
1266
- color: white;
1267
- }
1268
-
1269
- &:hover ${SuggestionArrow}, &:focus-visible ${SuggestionArrow} {
1270
- opacity: 1;
1271
- transform: translateX(0);
1272
- }
1273
-
1274
- &:focus-visible {
1275
- outline: 2px solid ${TMColors.primary}55;
1276
- outline-offset: 2px;
1277
- }
1278
-
1279
- &:active {
1280
- transform: translateY(0) scale(0.99);
1281
- }
1282
-
1283
- @media (prefers-reduced-motion: reduce) {
1284
- animation: none;
1285
- opacity: 1;
1286
- transition: none;
1287
- }
1288
- `;
1289
- const FooterHint = styled.p `
1290
- margin: 6px 0 0 0;
1291
- font-size: 11px;
1292
- color: #999;
1293
- text-align: center;
1294
- `;
1295
- const ChatInputWrapper = styled.div `
1296
- position: relative;
1297
- flex: 1;
1298
- display: flex;
1299
- `;
1300
- const ChatInputTextarea = styled.textarea `
1301
- width: 100%;
1302
- padding: 14px 60px 14px 16px;
1303
- border: 2px solid #e1e5e9;
1304
- border-radius: 12px;
1305
- font-size: 15px;
1306
- font-family: inherit;
1307
- line-height: 1.5;
1308
- transition: all 0.2s ease;
1309
- background: #f8f9fa;
1310
- resize: none;
1311
- min-height: 100px;
1312
- max-height: 120px;
1313
- overflow-y: hidden;
1314
-
1315
- &:focus {
1316
- outline: none;
1317
- border-color: ${TMColors.primary};
1318
- background: white;
1319
- box-shadow: 0 0 0 4px ${TMColors.primary}15;
1320
- }
1321
-
1322
- &::placeholder {
1323
- color: #999;
1324
- }
1325
-
1326
- &::-webkit-scrollbar {
1327
- width: 6px;
1328
- }
1329
-
1330
- &::-webkit-scrollbar-track {
1331
- background: transparent;
1332
- }
1333
-
1334
- &::-webkit-scrollbar-thumb {
1335
- background: #ccc;
1336
- border-radius: 3px;
1337
- }
1338
-
1339
- &::-webkit-scrollbar-thumb:hover {
1340
- background: #999;
1341
- }
1342
- `;
1343
- const InlineSendButton = styled.button `
1344
- position: absolute;
1345
- bottom: 8px;
1346
- right: 8px;
1347
- width: 40px;
1348
- height: 40px;
1349
- border-radius: 10px;
1350
- background: ${props => props.$disabled ? '#ccc' : '#4caf50'};
1351
- border: none;
1352
- color: white;
1353
- cursor: ${props => props.$disabled ? 'default' : 'pointer'};
1354
- display: flex;
1355
- align-items: center;
1356
- justify-content: center;
1357
- transition: all 0.2s ease;
1358
-
1359
- &:hover:not(:disabled) {
1360
- background: #45a049;
1361
- transform: scale(1.05);
1362
- }
1363
-
1364
- &:active:not(:disabled) {
1365
- transform: scale(0.95);
1366
- }
1367
-
1368
- &:disabled {
1369
- opacity: 0.6;
1370
- }
568
+ const fadeIn = keyframes `
569
+ from { opacity: 0; }
570
+ to { opacity: 1; }
571
+ `;
572
+ const slideInRight = keyframes `
573
+ from { transform: translateX(100%); }
574
+ to { transform: translateX(0); }
575
+ `;
576
+ const phraseIn = keyframes `
577
+ from { opacity: 0; transform: translateY(4px); }
578
+ to { opacity: 1; transform: translateY(0); }
579
+ `;
580
+ const suggestionIn = keyframes `
581
+ from { opacity: 0; transform: translateY(6px); }
582
+ to { opacity: 1; transform: translateY(0); }
583
+ `;
584
+ const feedbackIn = keyframes `
585
+ from { opacity: 0; transform: translateY(-4px); }
586
+ to { opacity: 1; transform: translateY(0); }
587
+ `;
588
+ const badgeIn = keyframes `
589
+ 0% { opacity: 0; transform: scale(0.85); }
590
+ 60% { opacity: 1; transform: scale(1.05); }
591
+ 100% { opacity: 1; transform: scale(1); }
592
+ `;
593
+ const dotCycle = keyframes `
594
+ 0% { opacity: 0; }
595
+ 25%, 75% { opacity: 1; }
596
+ 100% { opacity: 0; }
597
+ `;
598
+ const ToppyHeaderButton = styled.button `
599
+ display: flex;
600
+ align-items: center;
601
+ gap: 8px;
602
+ height: 36px;
603
+ padding: 0 14px 0 5px;
604
+ border-radius: 18px;
605
+ border: 1px solid ${TMColors.primary}35;
606
+ background: ${TMColors.primary}0d;
607
+ color: ${TMColors.primary};
608
+ font-size: 13px;
609
+ font-weight: 600;
610
+ white-space: nowrap;
611
+ cursor: pointer;
612
+ flex-shrink: 0;
613
+ transition: all 0.2s ease;
614
+
615
+ &:hover {
616
+ background: ${TMColors.primary}1a;
617
+ border-color: ${TMColors.primary}66;
618
+ transform: translateY(-1px);
619
+ box-shadow: 0 4px 12px ${TMColors.primary}25;
620
+ }
621
+ &:active { transform: translateY(0); }
622
+ `;
623
+ const ToppyHeaderAvatar = styled.img `
624
+ width: 28px;
625
+ height: 28px;
626
+ border-radius: 50%;
627
+ object-fit: contain;
628
+ pointer-events: none;
629
+ `;
630
+ const ToppyHeaderText = styled.span `
631
+ line-height: 1;
632
+ `;
633
+ const Fab = styled.button `
634
+ position: fixed;
635
+ bottom: 24px;
636
+ right: 24px;
637
+ width: 60px;
638
+ height: 60px;
639
+ border-radius: 50%;
640
+ border: none;
641
+ padding: 0;
642
+ cursor: pointer;
643
+ display: flex;
644
+ align-items: center;
645
+ justify-content: center;
646
+ background: white;
647
+ box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
648
+ z-index: 100000;
649
+ transition: transform 0.2s ease, box-shadow 0.2s ease;
650
+ animation: ${fadeIn} 0.3s ease-out;
651
+
652
+ &:hover { transform: scale(1.08); box-shadow: 0 8px 26px rgba(0, 0, 0, 0.3); }
653
+ &:active { transform: scale(0.96); }
654
+ `;
655
+ const FabAvatar = styled.img `
656
+ width: 52px;
657
+ height: 52px;
658
+ border-radius: 50%;
659
+ object-fit: contain;
660
+ pointer-events: none;
661
+ `;
662
+ const Overlay = styled.div `
663
+ position: fixed;
664
+ inset: 0;
665
+ background: rgba(0, 0, 0, 0.45);
666
+ z-index: 100000;
667
+ animation: ${fadeIn} 0.2s ease-out;
668
+ `;
669
+ const PanelContainer = styled.div `
670
+ position: fixed;
671
+ top: 0;
672
+ right: 0;
673
+ height: 100vh;
674
+ width: ${props => props.$width}px;
675
+ max-width: 100vw;
676
+ background: white;
677
+ display: flex;
678
+ flex-direction: column;
679
+ box-shadow: -8px 0 32px rgba(0, 0, 0, 0.28);
680
+ z-index: 100001;
681
+ animation: ${slideInRight} 0.25s ease-out;
682
+ `;
683
+ const ResizeHandle = styled.div `
684
+ position: absolute;
685
+ left: 0;
686
+ top: 0;
687
+ bottom: 0;
688
+ width: 6px;
689
+ cursor: col-resize;
690
+ background: transparent;
691
+ z-index: 2;
692
+ transition: background 0.2s ease;
693
+
694
+ &:hover { background: ${TMColors.primary}55; }
695
+ `;
696
+ const ChatHeader = styled.div `
697
+ display: flex;
698
+ align-items: center;
699
+ justify-content: space-between;
700
+ padding: 16px 20px;
701
+ background: linear-gradient(135deg, ${TMColors.primary} 0%, ${TMColors.primary}dd 100%);
702
+ color: white;
703
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
704
+ `;
705
+ const HeaderLeft = styled.div `
706
+ display: flex;
707
+ align-items: center;
708
+ gap: 12px;
709
+ flex: 1;
710
+ min-width: 0;
711
+ `;
712
+ const HeaderRight = styled.div `
713
+ display: flex;
714
+ align-items: center;
715
+ gap: 8px;
716
+ margin-left: 12px;
717
+ flex-shrink: 0;
718
+ `;
719
+ const ToppyAvatar = styled.img `
720
+ width: 44px;
721
+ height: 44px;
722
+ border-radius: 50%;
723
+ background: white;
724
+ padding: 4px;
725
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
726
+ flex-shrink: 0;
727
+ object-fit: contain;
728
+ `;
729
+ const HeaderText = styled.div `
730
+ display: flex;
731
+ flex-direction: column;
732
+ gap: 2px;
733
+ min-width: 0;
734
+ `;
735
+ const HeaderGreeting = styled.h2 `
736
+ margin: 0;
737
+ font-size: 17px;
738
+ font-weight: 600;
739
+ color: white;
740
+ white-space: nowrap;
741
+ overflow: hidden;
742
+ text-overflow: ellipsis;
743
+ `;
744
+ const HeaderQuestion = styled.p `
745
+ margin: 0;
746
+ font-size: 13px;
747
+ color: rgba(255, 255, 255, 0.9);
748
+ `;
749
+ const HeaderButton = styled.button `
750
+ width: 32px;
751
+ height: 32px;
752
+ border-radius: 50%;
753
+ background: rgba(255, 255, 255, 0.2);
754
+ border: 1px solid rgba(255, 255, 255, 0.3);
755
+ color: white;
756
+ cursor: pointer;
757
+ display: flex;
758
+ align-items: center;
759
+ justify-content: center;
760
+ flex-shrink: 0;
761
+ transition: all 0.2s ease;
762
+
763
+ &:hover:not(:disabled) { background: rgba(255, 255, 255, 0.3); transform: scale(1.05); }
764
+ &:active:not(:disabled) { transform: scale(0.95); }
765
+ &:disabled { opacity: 0.45; cursor: default; }
766
+ `;
767
+ const ChatBody = styled.div `
768
+ flex: 1;
769
+ padding: 20px;
770
+ overflow-y: auto;
771
+ background: linear-gradient(to bottom, #f8f9fa 0%, #ffffff 100%);
772
+ `;
773
+ const WelcomeMessage = styled.div `
774
+ display: flex;
775
+ gap: 16px;
776
+ padding: 18px;
777
+ background: white;
778
+ border-radius: 12px;
779
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
780
+ border-left: 4px solid ${TMColors.primary};
781
+ animation: ${fadeIn} 0.5s ease-out;
782
+ `;
783
+ const WelcomeIcon = styled.div `
784
+ font-size: 30px;
785
+ flex-shrink: 0;
786
+ `;
787
+ const WelcomeText = styled.p `
788
+ margin: 0;
789
+ font-size: 14px;
790
+ line-height: 1.6;
791
+ color: #242424;
792
+
793
+ strong { color: ${TMColors.primary}; font-weight: 600; }
794
+ `;
795
+ const MessageBubble = styled.div `
796
+ display: flex;
797
+ gap: 10px;
798
+ margin-bottom: 16px;
799
+ align-items: flex-start;
800
+ justify-content: ${props => (props.$isUser ? 'flex-end' : 'flex-start')};
801
+ animation: ${fadeIn} 0.3s ease-out;
802
+ `;
803
+ const BotAvatar = styled.img `
804
+ width: 32px;
805
+ height: 32px;
806
+ border-radius: 50%;
807
+ background: white;
808
+ padding: 2px;
809
+ box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
810
+ flex-shrink: 0;
811
+ object-fit: contain;
812
+ `;
813
+ const MessageContent = styled.div `
814
+ max-width: 80%;
815
+ padding: 10px 14px;
816
+ border-radius: 12px;
817
+ font-size: 14px;
818
+ line-height: 1.5;
819
+ background: ${props => (props.$isUser ? TMColors.primary : '#f0f2f5')};
820
+ color: ${props => (props.$isUser ? 'white' : '#242424')};
821
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
822
+ word-wrap: break-word;
823
+ overflow-wrap: anywhere;
824
+ white-space: ${props => (props.$isUser ? 'pre-wrap' : 'normal')};
825
+ border-bottom-${props => (props.$isUser ? 'right' : 'left')}-radius: 4px;
826
+ `;
827
+ const BotMessageColumn = styled.div `
828
+ display: flex;
829
+ flex-direction: column;
830
+ align-items: flex-start;
831
+ width: 80%;
832
+ min-width: 0;
833
+ `;
834
+ const BotMessageContent = styled(MessageContent) `
835
+ max-width: 100%;
836
+ `;
837
+ const FeedbackContainer = styled.div `
838
+ width: 100%;
839
+ margin-top: 4px;
840
+ `;
841
+ const FeedbackActions = styled.div `
842
+ display: flex;
843
+ align-items: center;
844
+ gap: 2px;
845
+ `;
846
+ const FeedbackActionButton = styled.button `
847
+ display: flex;
848
+ align-items: center;
849
+ justify-content: center;
850
+ width: 28px;
851
+ height: 28px;
852
+ padding: 0;
853
+ border-radius: 8px;
854
+ border: 1px solid ${props => (props.$active ? `${TMColors.primary}55` : 'transparent')};
855
+ background: ${props => (props.$active ? `${TMColors.primary}12` : 'transparent')};
856
+ color: ${props => (props.$success ? '#2e7d32' : props.$active ? TMColors.primary : '#8a8f98')};
857
+ cursor: ${props => (props.$locked ? 'default' : 'pointer')};
858
+ transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
859
+
860
+ &:hover:not(:disabled) {
861
+ background: ${props => (props.$active ? `${TMColors.primary}12` : 'rgba(0, 0, 0, 0.05)')};
862
+ color: ${props => (props.$success ? '#2e7d32' : props.$active ? TMColors.primary : '#242424')};
863
+ }
864
+
865
+ &:focus-visible {
866
+ outline: 2px solid ${TMColors.primary}55;
867
+ outline-offset: 1px;
868
+ }
869
+
870
+ &:disabled {
871
+ opacity: 0.35;
872
+ cursor: default;
873
+ }
874
+ `;
875
+ const SentBadge = styled.span `
876
+ display: inline-flex;
877
+ align-items: center;
878
+ gap: 4px;
879
+ margin-left: 6px;
880
+ padding: 3px 9px 3px 7px;
881
+ border-radius: 999px;
882
+ background: #e8f5e9;
883
+ border: 1px solid #c8e6c9;
884
+ color: #2e7d32;
885
+ font-size: 11px;
886
+ font-weight: 600;
887
+ line-height: 1;
888
+ letter-spacing: 0.02em;
889
+ animation: ${badgeIn} 0.35s ease-out;
890
+
891
+ @media (prefers-reduced-motion: reduce) {
892
+ animation: none;
893
+ }
894
+ `;
895
+ const FeedbackPanel = styled.div `
896
+ margin-top: 6px;
897
+ padding: 14px 16px;
898
+ border: 1px solid #e5e7eb;
899
+ border-radius: 12px;
900
+ background: white;
901
+ box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
902
+ scroll-margin: 12px;
903
+ animation: ${feedbackIn} 0.2s ease-out;
904
+ `;
905
+ const FeedbackPanelHeader = styled.div `
906
+ display: flex;
907
+ align-items: flex-start;
908
+ justify-content: space-between;
909
+ gap: 12px;
910
+ margin-bottom: 10px;
911
+ `;
912
+ const FeedbackPanelTitle = styled.div `
913
+ font-size: 14px;
914
+ font-weight: 600;
915
+ color: #242424;
916
+ line-height: 1.35;
917
+ `;
918
+ const FeedbackCloseButton = styled.button `
919
+ display: flex;
920
+ align-items: center;
921
+ justify-content: center;
922
+ width: 24px;
923
+ height: 24px;
924
+ padding: 0;
925
+ border: none;
926
+ border-radius: 6px;
927
+ background: transparent;
928
+ color: #6b7280;
929
+ cursor: pointer;
930
+ flex-shrink: 0;
931
+ transition: background 0.2s ease, color 0.2s ease;
932
+
933
+ &:hover { background: rgba(0, 0, 0, 0.06); color: #242424; }
934
+ `;
935
+ const FeedbackLabel = styled.div `
936
+ margin: 0 0 8px 0;
937
+ font-size: 12px;
938
+ font-weight: 600;
939
+ color: #6b7280;
940
+ `;
941
+ const FeedbackTags = styled.div `
942
+ display: flex;
943
+ flex-wrap: wrap;
944
+ gap: 8px;
945
+ margin-bottom: 14px;
946
+ `;
947
+ const FeedbackTag = styled.button `
948
+ padding: 6px 12px;
949
+ border-radius: 8px;
950
+ border: 1px solid ${props => (props.$selected ? TMColors.primary : '#dcdfe3')};
951
+ background: ${props => (props.$selected ? `${TMColors.primary}10` : 'white')};
952
+ color: ${props => (props.$selected ? TMColors.primary : '#242424')};
953
+ font-family: inherit;
954
+ font-size: 13px;
955
+ font-weight: ${props => (props.$selected ? 600 : 400)};
956
+ line-height: 1.2;
957
+ cursor: pointer;
958
+ transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
959
+
960
+ &:hover { border-color: ${TMColors.primary}88; }
961
+
962
+ &:focus-visible {
963
+ outline: 2px solid ${TMColors.primary}55;
964
+ outline-offset: 1px;
965
+ }
966
+ `;
967
+ const FeedbackTextarea = styled.textarea `
968
+ display: block;
969
+ width: 100%;
970
+ min-height: 70px;
971
+ padding: 9px 11px;
972
+ border: 1px solid #dcdfe3;
973
+ border-radius: 8px;
974
+ font-family: inherit;
975
+ font-size: 13px;
976
+ line-height: 1.45;
977
+ color: #242424;
978
+ background: white;
979
+ resize: none;
980
+ box-sizing: border-box;
981
+ transition: border-color 0.2s ease, box-shadow 0.2s ease;
982
+
983
+ &::placeholder { color: #9ca3af; }
984
+
985
+ &:focus {
986
+ outline: none;
987
+ border-color: ${TMColors.primary};
988
+ box-shadow: 0 0 0 3px ${TMColors.primary}15;
989
+ }
990
+ `;
991
+ const FeedbackPanelFooter = styled.div `
992
+ display: flex;
993
+ align-items: center;
994
+ justify-content: space-between;
995
+ margin-top: 10px;
996
+ `;
997
+ const FeedbackCounter = styled.span `
998
+ font-size: 11px;
999
+ color: ${props => (props.$full ? '#c62828' : '#9ca3af')};
1000
+ font-variant-numeric: tabular-nums;
1001
+ `;
1002
+ const FeedbackSubmitButton = styled.button `
1003
+ padding: 7px 18px;
1004
+ border: none;
1005
+ border-radius: 8px;
1006
+ background: ${TMColors.primary};
1007
+ color: white;
1008
+ font-family: inherit;
1009
+ font-size: 13px;
1010
+ font-weight: 600;
1011
+ cursor: pointer;
1012
+ transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
1013
+
1014
+ &:hover:not(:disabled) {
1015
+ box-shadow: 0 4px 12px ${TMColors.primary}40;
1016
+ transform: translateY(-1px);
1017
+ }
1018
+
1019
+ &:active:not(:disabled) { transform: translateY(0); }
1020
+
1021
+ &:disabled {
1022
+ opacity: 0.4;
1023
+ cursor: default;
1024
+ }
1025
+ `;
1026
+ const MarkdownContent = styled.div `
1027
+ & > *:first-child { margin-top: 0; }
1028
+ & > *:last-child { margin-bottom: 0; }
1029
+
1030
+ a { color: ${TMColors.primary}; text-decoration: underline; }
1031
+ strong { font-weight: 600; }
1032
+ `;
1033
+ const MdParagraph = styled.p `
1034
+ margin: 0 0 8px 0;
1035
+ line-height: 1.55;
1036
+ `;
1037
+ const MdHeading = styled.div `
1038
+ margin: 12px 0 6px 0;
1039
+ font-weight: 700;
1040
+ line-height: 1.3;
1041
+ font-size: ${props => `${Math.max(14, 20 - (props.$level - 1) * 2)}px`};
1042
+ `;
1043
+ const MdUl = styled.ul `
1044
+ margin: 4px 0 8px 0;
1045
+ padding-left: 20px;
1046
+ li { margin: 2px 0; line-height: 1.5; }
1047
+ `;
1048
+ const MdOl = styled.ol `
1049
+ margin: 4px 0 8px 0;
1050
+ padding-left: 22px;
1051
+ li { margin: 2px 0; line-height: 1.5; }
1052
+ `;
1053
+ const MdCode = styled.code `
1054
+ background: rgba(0, 0, 0, 0.06);
1055
+ padding: 1px 5px;
1056
+ border-radius: 4px;
1057
+ font-family: 'Consolas', 'Monaco', monospace;
1058
+ font-size: 0.9em;
1059
+ `;
1060
+ const MdPre = styled.pre `
1061
+ background: rgba(0, 0, 0, 0.06);
1062
+ padding: 10px 12px;
1063
+ border-radius: 8px;
1064
+ overflow-x: auto;
1065
+ margin: 8px 0;
1066
+ font-family: 'Consolas', 'Monaco', monospace;
1067
+ font-size: 0.88em;
1068
+ white-space: pre;
1069
+ `;
1070
+ const MdTableWrapper = styled.div `
1071
+ margin: 8px 0;
1072
+ max-width: 100%;
1073
+ overflow-x: auto;
1074
+ border: 1px solid #dcdfe3;
1075
+ border-radius: 8px;
1076
+
1077
+ &::-webkit-scrollbar { height: 6px; }
1078
+ &::-webkit-scrollbar-track { background: transparent; }
1079
+ &::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }
1080
+ &::-webkit-scrollbar-thumb:hover { background: #999; }
1081
+ `;
1082
+ const MdTable = styled.table `
1083
+ border-collapse: collapse;
1084
+ width: 100%;
1085
+ font-size: 0.92em;
1086
+ background: white;
1087
+ `;
1088
+ const MdTh = styled.th `
1089
+ padding: 7px 10px;
1090
+ background: ${TMColors.primary}14;
1091
+ color: #242424;
1092
+ font-weight: 600;
1093
+ text-align: ${props => props.$align ?? 'left'};
1094
+ border-bottom: 1px solid #dcdfe3;
1095
+ white-space: nowrap;
1096
+
1097
+ &:not(:last-child) { border-right: 1px solid #e6e8eb; }
1098
+ `;
1099
+ const MdTd = styled.td `
1100
+ padding: 7px 10px;
1101
+ text-align: ${props => props.$align ?? 'left'};
1102
+ vertical-align: top;
1103
+ border-top: 1px solid #eceef0;
1104
+
1105
+ &:not(:last-child) { border-right: 1px solid #eceef0; }
1106
+
1107
+ tr:nth-child(even) & { background: #fafbfc; }
1108
+ `;
1109
+ const MdBlockquote = styled.blockquote `
1110
+ margin: 8px 0;
1111
+ padding: 6px 12px;
1112
+ border-left: 3px solid ${TMColors.primary}66;
1113
+ background: ${TMColors.primary}0a;
1114
+ border-radius: 0 6px 6px 0;
1115
+ color: #444;
1116
+
1117
+ & > *:first-child { margin-top: 0; }
1118
+ & > *:last-child { margin-bottom: 0; }
1119
+ `;
1120
+ const MdHr = styled.hr `
1121
+ border: none;
1122
+ border-top: 1px solid #dcdfe3;
1123
+ margin: 12px 0;
1124
+ `;
1125
+ const ThinkingIndicator = styled.div `
1126
+ display: flex;
1127
+ align-items: center;
1128
+ gap: 10px;
1129
+ max-width: 80%;
1130
+ padding: 7px 12px;
1131
+ background: #f0f2f5;
1132
+ border-radius: 12px;
1133
+ border-bottom-left-radius: 4px;
1134
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
1135
+ `;
1136
+ const ThinkingCaption = styled.div `
1137
+ display: flex;
1138
+ flex-direction: column;
1139
+ align-items: flex-start;
1140
+ gap: 0;
1141
+ min-width: 0;
1142
+ `;
1143
+ const ThinkingPhrase = styled.span `
1144
+ display: inline-flex;
1145
+ align-items: center;
1146
+ min-width: 0;
1147
+ font-size: 12px;
1148
+ font-style: italic;
1149
+ line-height: 1.15;
1150
+ color: #6b7280;
1151
+ animation: ${phraseIn} 0.25s ease-out;
1152
+ `;
1153
+ const ThinkingDots = styled.span `
1154
+ display: inline-flex;
1155
+ width: 12px;
1156
+ flex-shrink: 0;
1157
+ `;
1158
+ const ThinkingDot = styled.span `
1159
+ animation: ${dotCycle} 1.2s linear infinite;
1160
+ animation-delay: ${props => props.$delay}s;
1161
+ will-change: opacity;
1162
+
1163
+ @media (prefers-reduced-motion: reduce) {
1164
+ animation: none;
1165
+ opacity: 1;
1166
+ }
1167
+ `;
1168
+ const ThinkingCounter = styled.span `
1169
+ margin-top: 2px;
1170
+ font-size: 10px;
1171
+ font-weight: 600;
1172
+ line-height: 1.1;
1173
+ letter-spacing: 0.02em;
1174
+ color: ${TMColors.primary}b3;
1175
+ font-variant-numeric: tabular-nums;
1176
+ font-feature-settings: 'tnum';
1177
+ opacity: ${props => (props.$visible ? 1 : 0)};
1178
+ transition: opacity 0.3s ease;
1179
+ `;
1180
+ const ChatFooter = styled.div `
1181
+ padding: 16px 20px;
1182
+ background: white;
1183
+ border-top: 1px solid #e1e5e9;
1184
+ box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
1185
+ `;
1186
+ const SuggestionsSection = styled.div `
1187
+ margin-bottom: 14px;
1188
+ `;
1189
+ const SuggestionsTitle = styled.div `
1190
+ display: flex;
1191
+ align-items: center;
1192
+ gap: 6px;
1193
+ margin: 0 0 8px 2px;
1194
+ font-size: 11px;
1195
+ font-weight: 600;
1196
+ letter-spacing: 0.06em;
1197
+ text-transform: uppercase;
1198
+ color: #6b7280;
1199
+
1200
+ svg { color: ${TMColors.primary}; }
1201
+ `;
1202
+ const SuggestionsGrid = styled.div `
1203
+ display: grid;
1204
+ grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
1205
+ gap: 8px;
1206
+ `;
1207
+ const SuggestionIcon = styled.span `
1208
+ display: flex;
1209
+ align-items: center;
1210
+ justify-content: center;
1211
+ width: 28px;
1212
+ height: 28px;
1213
+ border-radius: 8px;
1214
+ flex-shrink: 0;
1215
+ background: ${TMColors.primary}14;
1216
+ color: ${TMColors.primary};
1217
+ transition: background 0.2s ease, color 0.2s ease;
1218
+ `;
1219
+ const SuggestionText = styled.span `
1220
+ flex: 1;
1221
+ min-width: 0;
1222
+ display: -webkit-box;
1223
+ -webkit-line-clamp: 2;
1224
+ -webkit-box-orient: vertical;
1225
+ overflow: hidden;
1226
+ `;
1227
+ const SuggestionArrow = styled.span `
1228
+ display: flex;
1229
+ flex-shrink: 0;
1230
+ color: ${TMColors.primary};
1231
+ opacity: 0;
1232
+ transform: translateX(-4px);
1233
+ transition: opacity 0.2s ease, transform 0.2s ease;
1234
+ `;
1235
+ const SuggestionCard = styled.button `
1236
+ display: flex;
1237
+ align-items: center;
1238
+ gap: 10px;
1239
+ width: 100%;
1240
+ min-height: 52px;
1241
+ padding: 9px 12px;
1242
+ border: 1px solid ${TMColors.primary}22;
1243
+ border-radius: 12px;
1244
+ background: linear-gradient(135deg, #ffffff 0%, ${TMColors.primary}08 100%);
1245
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
1246
+ color: #242424;
1247
+ font-family: inherit;
1248
+ font-size: 13px;
1249
+ line-height: 1.35;
1250
+ text-align: left;
1251
+ cursor: pointer;
1252
+ opacity: 0;
1253
+ animation: ${suggestionIn} 0.35s ease-out forwards;
1254
+ animation-delay: ${props => props.$index * 70}ms;
1255
+ transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
1256
+
1257
+ &:hover, &:focus-visible {
1258
+ border-color: ${TMColors.primary}66;
1259
+ background: ${TMColors.primary}0d;
1260
+ box-shadow: 0 4px 14px ${TMColors.primary}1f;
1261
+ transform: translateY(-1px);
1262
+ }
1263
+
1264
+ &:hover ${SuggestionIcon}, &:focus-visible ${SuggestionIcon} {
1265
+ background: ${TMColors.primary};
1266
+ color: white;
1267
+ }
1268
+
1269
+ &:hover ${SuggestionArrow}, &:focus-visible ${SuggestionArrow} {
1270
+ opacity: 1;
1271
+ transform: translateX(0);
1272
+ }
1273
+
1274
+ &:focus-visible {
1275
+ outline: 2px solid ${TMColors.primary}55;
1276
+ outline-offset: 2px;
1277
+ }
1278
+
1279
+ &:active {
1280
+ transform: translateY(0) scale(0.99);
1281
+ }
1282
+
1283
+ @media (prefers-reduced-motion: reduce) {
1284
+ animation: none;
1285
+ opacity: 1;
1286
+ transition: none;
1287
+ }
1288
+ `;
1289
+ const FooterHint = styled.p `
1290
+ margin: 6px 0 0 0;
1291
+ font-size: 11px;
1292
+ color: #999;
1293
+ text-align: center;
1294
+ `;
1295
+ const ChatInputWrapper = styled.div `
1296
+ position: relative;
1297
+ flex: 1;
1298
+ display: flex;
1299
+ `;
1300
+ const ChatInputTextarea = styled.textarea `
1301
+ width: 100%;
1302
+ padding: 14px 60px 14px 16px;
1303
+ border: 2px solid #e1e5e9;
1304
+ border-radius: 12px;
1305
+ font-size: 15px;
1306
+ font-family: inherit;
1307
+ line-height: 1.5;
1308
+ transition: all 0.2s ease;
1309
+ background: #f8f9fa;
1310
+ resize: none;
1311
+ min-height: 100px;
1312
+ max-height: 120px;
1313
+ overflow-y: hidden;
1314
+
1315
+ &:focus {
1316
+ outline: none;
1317
+ border-color: ${TMColors.primary};
1318
+ background: white;
1319
+ box-shadow: 0 0 0 4px ${TMColors.primary}15;
1320
+ }
1321
+
1322
+ &::placeholder {
1323
+ color: #999;
1324
+ }
1325
+
1326
+ &::-webkit-scrollbar {
1327
+ width: 6px;
1328
+ }
1329
+
1330
+ &::-webkit-scrollbar-track {
1331
+ background: transparent;
1332
+ }
1333
+
1334
+ &::-webkit-scrollbar-thumb {
1335
+ background: #ccc;
1336
+ border-radius: 3px;
1337
+ }
1338
+
1339
+ &::-webkit-scrollbar-thumb:hover {
1340
+ background: #999;
1341
+ }
1342
+ `;
1343
+ const InlineSendButton = styled.button `
1344
+ position: absolute;
1345
+ bottom: 8px;
1346
+ right: 8px;
1347
+ width: 40px;
1348
+ height: 40px;
1349
+ border-radius: 10px;
1350
+ background: ${props => props.$disabled ? '#ccc' : '#4caf50'};
1351
+ border: none;
1352
+ color: white;
1353
+ cursor: ${props => props.$disabled ? 'default' : 'pointer'};
1354
+ display: flex;
1355
+ align-items: center;
1356
+ justify-content: center;
1357
+ transition: all 0.2s ease;
1358
+
1359
+ &:hover:not(:disabled) {
1360
+ background: #45a049;
1361
+ transform: scale(1.05);
1362
+ }
1363
+
1364
+ &:active:not(:disabled) {
1365
+ transform: scale(0.95);
1366
+ }
1367
+
1368
+ &:disabled {
1369
+ opacity: 0.6;
1370
+ }
1371
1371
  `;