@bytexbyte/nxtlinq-ai-agent-sdk 1.6.0 → 1.6.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/components/context/ChatBotContext.d.ts.map +1 -1
- package/dist/components/context/ChatBotContext.js +8 -4
- package/dist/components/ui/BerifyMeModal.d.ts +1 -0
- package/dist/components/ui/BerifyMeModal.d.ts.map +1 -1
- package/dist/components/ui/BerifyMeModal.js +8 -10
- package/dist/components/ui/ChatBotUI.d.ts +1 -0
- package/dist/components/ui/ChatBotUI.d.ts.map +1 -1
- package/dist/components/ui/ChatBotUI.js +58 -213
- package/dist/components/ui/MessageInput.d.ts.map +1 -1
- package/dist/components/ui/MessageInput.js +41 -38
- package/dist/components/ui/MessageList.d.ts +1 -0
- package/dist/components/ui/MessageList.d.ts.map +1 -1
- package/dist/components/ui/MessageList.js +16 -79
- package/dist/components/ui/ModelSelector.d.ts +1 -0
- package/dist/components/ui/ModelSelector.d.ts.map +1 -1
- package/dist/components/ui/ModelSelector.js +51 -45
- package/dist/components/ui/NotificationModal.d.ts +1 -0
- package/dist/components/ui/NotificationModal.d.ts.map +1 -1
- package/dist/components/ui/NotificationModal.js +48 -74
- package/dist/components/ui/PermissionForm.d.ts +1 -1
- package/dist/components/ui/PermissionForm.d.ts.map +1 -1
- package/dist/components/ui/PermissionForm.js +296 -293
- package/dist/components/ui/PresetMessages.d.ts +1 -0
- package/dist/components/ui/PresetMessages.d.ts.map +1 -1
- package/dist/components/ui/PresetMessages.js +26 -27
- package/dist/components/ui/styles/isolatedStyles.d.ts +34 -0
- package/dist/components/ui/styles/isolatedStyles.d.ts.map +1 -0
- package/dist/components/ui/styles/isolatedStyles.js +449 -0
- package/package.json +1 -1
- package/umd/nxtlinq-ai-agent.umd.js +882 -19
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
2
|
+
/** @jsxImportSource @emotion/react */
|
|
2
3
|
import * as React from 'react';
|
|
4
|
+
import { css } from '@emotion/react';
|
|
3
5
|
import { convertUrlsToLinks } from '../../core/utils/urlUtils';
|
|
4
6
|
import { useChatBot } from '../context/ChatBotContext';
|
|
5
7
|
import { AI_MODEL_MAP } from '../types/ChatBotTypes';
|
|
8
|
+
import { messageListContainer, messageBubble, userMessage, messageContent, userMessageContent, retryMessageContent, actionButton, connectedButton, loadingIndicator, modelIndicator, modelBadge, modelDot } from './styles/isolatedStyles';
|
|
6
9
|
export const MessageList = () => {
|
|
7
|
-
const { messages, isLoading, connectWallet, signInWallet, hitAddress,
|
|
10
|
+
const { messages, isLoading, connectWallet, signInWallet, hitAddress, isAutoConnecting, isNeedSignInWithWallet, enableAIT, isAITLoading, isAITEnabling, sendMessage, permissions } = useChatBot();
|
|
8
11
|
const messagesEndRef = React.useRef(null);
|
|
9
12
|
const scrollToBottom = () => {
|
|
10
13
|
messagesEndRef.current?.scrollIntoView({ behavior: 'smooth' });
|
|
@@ -46,28 +49,11 @@ export const MessageList = () => {
|
|
|
46
49
|
return '';
|
|
47
50
|
return AI_MODEL_MAP[modelValue] || modelValue;
|
|
48
51
|
};
|
|
49
|
-
return (_jsxs("div", {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
flexDirection: 'column',
|
|
55
|
-
gap: '10px'
|
|
56
|
-
}, children: [messages.map((message) => (_jsxs("div", { style: {
|
|
57
|
-
alignSelf: message.role === 'user' ? 'flex-end' : 'flex-start',
|
|
58
|
-
maxWidth: '80%',
|
|
59
|
-
marginBottom: '10px'
|
|
60
|
-
}, children: [_jsxs("div", { style: {
|
|
61
|
-
backgroundColor: message.role === 'user' ? '#007bff' :
|
|
62
|
-
message.metadata?.isRetry ? '#fff3cd' : '#f1f1f1',
|
|
63
|
-
color: message.role === 'user' ? 'white' :
|
|
64
|
-
message.metadata?.isRetry ? '#856404' : '#333',
|
|
65
|
-
padding: '10px 15px',
|
|
66
|
-
borderRadius: '15px',
|
|
67
|
-
wordWrap: 'break-word',
|
|
68
|
-
position: 'relative',
|
|
69
|
-
border: message.metadata?.isRetry ? '1px solid #ffeaa7' : 'none'
|
|
70
|
-
}, children: [message.metadata?.isRetry && (_jsx("span", { style: { marginRight: '8px', fontSize: '14px' }, children: "\uD83D\uDD04" })), message.role === 'assistant' ? convertUrlsToLinks(message.content) : message.content, message.button && (_jsx("div", { style: { marginTop: '10px' }, children: _jsx("button", { onClick: () => {
|
|
52
|
+
return (_jsxs("div", { css: messageListContainer, children: [messages.map((message) => (_jsxs("div", { css: message.role === 'user' ? userMessage : messageBubble, children: [_jsxs("div", { css: message.role === 'user'
|
|
53
|
+
? userMessageContent
|
|
54
|
+
: message.metadata?.isRetry
|
|
55
|
+
? retryMessageContent
|
|
56
|
+
: messageContent, children: [message.metadata?.isRetry && (_jsx("span", { css: css `margin-right: 8px !important; font-size: 14px !important;`, children: "\uD83D\uDD04" })), message.role === 'assistant' ? convertUrlsToLinks(message.content) : message.content, message.button && (_jsx("div", { css: css `margin-top: 10px !important;`, children: _jsx("button", { onClick: () => {
|
|
71
57
|
if (message.button && message.button.trim()) {
|
|
72
58
|
handleButtonClick(message.button, message);
|
|
73
59
|
}
|
|
@@ -75,65 +61,16 @@ export const MessageList = () => {
|
|
|
75
61
|
(message.button === 'connectWallet' && Boolean(hitAddress)) ||
|
|
76
62
|
(message.button === 'signIn' && !isNeedSignInWithWallet) ||
|
|
77
63
|
(message.button === 'enableAIT' && (isAITLoading || isAITEnabling ||
|
|
78
|
-
(message.metadata?.toolName && permissions.includes(message.metadata.toolName)))) || false,
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
(message.button === 'signIn' && !isNeedSignInWithWallet) ? '#28a745' :
|
|
84
|
-
(message.button === 'continue') ? '#28a745' :
|
|
85
|
-
(message.button === 'enableAIT' && (isAITLoading || isAITEnabling ||
|
|
86
|
-
(message.metadata?.toolName && permissions.includes(message.metadata.toolName)))) ?
|
|
87
|
-
((message.metadata?.toolName && permissions.includes(message.metadata.toolName)) ? '#28a745' : '#6c757d') : '#007bff',
|
|
88
|
-
color: message.role === 'user' ? 'white' : 'white',
|
|
89
|
-
border: 'none',
|
|
90
|
-
borderRadius: '5px',
|
|
91
|
-
cursor: (message.button !== 'continue' && (isAutoConnecting ||
|
|
92
|
-
(message.button === 'connectWallet' && Boolean(hitAddress)) ||
|
|
93
|
-
(message.button === 'signIn' && !isNeedSignInWithWallet) ||
|
|
94
|
-
(message.button === 'enableAIT' && (isAITLoading || isAITEnabling ||
|
|
95
|
-
(message.metadata?.toolName && permissions.includes(message.metadata.toolName)))))) ? 'not-allowed' : 'pointer',
|
|
96
|
-
fontSize: '14px',
|
|
97
|
-
opacity: (isAutoConnecting ||
|
|
98
|
-
(message.button === 'connectWallet' && Boolean(hitAddress)) ||
|
|
99
|
-
(message.button === 'signIn' && !isNeedSignInWithWallet) ||
|
|
100
|
-
(message.button === 'enableAIT' && (isAITLoading || isAITEnabling ||
|
|
101
|
-
(message.metadata?.toolName && permissions.includes(message.metadata.toolName))))) ? 0.8 : 1
|
|
102
|
-
}, children: isAutoConnecting ? 'Connecting...' :
|
|
64
|
+
(message.metadata?.toolName && permissions.includes(message.metadata.toolName)))) || false, css: (message.button === 'connectWallet' && Boolean(hitAddress)) ? connectedButton :
|
|
65
|
+
(message.button === 'signIn' && !isNeedSignInWithWallet) ? connectedButton :
|
|
66
|
+
(message.button === 'continue') ? connectedButton :
|
|
67
|
+
(message.button === 'enableAIT' && (message.metadata?.toolName && permissions.includes(message.metadata.toolName))) ? connectedButton :
|
|
68
|
+
actionButton, children: isAutoConnecting ? 'Connecting...' :
|
|
103
69
|
message.button === 'connectWallet' ? (Boolean(hitAddress) ? 'Connected' : 'Connect Wallet') :
|
|
104
70
|
message.button === 'signIn' ? (!isNeedSignInWithWallet ? 'Signed In' : 'Sign In') :
|
|
105
71
|
message.button === 'continue' ? 'Continue' :
|
|
106
72
|
message.button === 'enableAIT' ?
|
|
107
73
|
((isAITLoading || isAITEnabling) ? 'Enabling...' :
|
|
108
74
|
(message.metadata?.toolName && permissions.includes(message.metadata.toolName)) ? 'AIT Enabled' : 'Enable AIT Permissions') :
|
|
109
|
-
message.button }) }))] }), message.role === 'assistant' && message.metadata?.model && (_jsx("div", {
|
|
110
|
-
display: 'flex',
|
|
111
|
-
alignItems: 'center',
|
|
112
|
-
marginTop: '4px',
|
|
113
|
-
marginLeft: '8px'
|
|
114
|
-
}, children: _jsxs("div", { style: {
|
|
115
|
-
backgroundColor: '#e3f2fd',
|
|
116
|
-
color: '#1976d2',
|
|
117
|
-
padding: '2px 8px',
|
|
118
|
-
borderRadius: '10px',
|
|
119
|
-
fontSize: '10px',
|
|
120
|
-
fontWeight: '500',
|
|
121
|
-
border: '1px solid #bbdefb',
|
|
122
|
-
display: 'flex',
|
|
123
|
-
alignItems: 'center',
|
|
124
|
-
gap: '4px'
|
|
125
|
-
}, children: [_jsx("span", { style: {
|
|
126
|
-
width: '6px',
|
|
127
|
-
height: '6px',
|
|
128
|
-
backgroundColor: '#1976d2',
|
|
129
|
-
borderRadius: '50%',
|
|
130
|
-
display: 'inline-block'
|
|
131
|
-
} }), getModelDisplayName(message.metadata.model)] }) }))] }, message.id))), isLoading && (_jsx("div", { style: {
|
|
132
|
-
alignSelf: 'flex-start',
|
|
133
|
-
backgroundColor: '#f1f1f1',
|
|
134
|
-
color: '#333',
|
|
135
|
-
padding: '10px 15px',
|
|
136
|
-
borderRadius: '15px',
|
|
137
|
-
maxWidth: '80%'
|
|
138
|
-
}, children: "Thinking..." })), _jsx("div", { ref: messagesEndRef })] }));
|
|
75
|
+
message.button }) }))] }), message.role === 'assistant' && message.metadata?.model && (_jsx("div", { css: modelIndicator, children: _jsxs("div", { css: modelBadge, children: [_jsx("span", { css: modelDot }), getModelDisplayName(message.metadata.model)] }) }))] }, message.id))), isLoading && (_jsx("div", { css: loadingIndicator, children: "Thinking..." })), _jsx("div", { ref: messagesEndRef })] }));
|
|
139
76
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModelSelector.d.ts","sourceRoot":"","sources":["../../../src/components/ui/ModelSelector.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ModelSelector.d.ts","sourceRoot":"","sources":["../../../src/components/ui/ModelSelector.tsx"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAsHjC,CAAC"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
2
|
+
/** @jsxImportSource @emotion/react */
|
|
2
3
|
import * as React from 'react';
|
|
4
|
+
import { css } from '@emotion/react';
|
|
3
5
|
import { useChatBot } from '../context/ChatBotContext';
|
|
4
6
|
export const ModelSelector = () => {
|
|
5
7
|
const { availableModels, selectedModelIndex, showModelSelector, handleModelChange } = useChatBot();
|
|
@@ -22,48 +24,52 @@ export const ModelSelector = () => {
|
|
|
22
24
|
if (!showModelSelector) {
|
|
23
25
|
return null;
|
|
24
26
|
}
|
|
25
|
-
return (_jsxs("div", {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
27
|
+
return (_jsxs("div", { css: css `
|
|
28
|
+
display: flex !important;
|
|
29
|
+
align-items: center !important;
|
|
30
|
+
position: relative !important;
|
|
31
|
+
`, children: [_jsxs("div", { css: css `
|
|
32
|
+
display: flex !important;
|
|
33
|
+
align-items: center !important;
|
|
34
|
+
cursor: pointer !important;
|
|
35
|
+
padding: 4px 8px !important;
|
|
36
|
+
border-radius: 4px !important;
|
|
37
|
+
background-color: rgba(255, 255, 255, 0.1) !important;
|
|
38
|
+
transition: background-color 0.2s !important;
|
|
39
|
+
font-size: 12px !important;
|
|
40
|
+
font-weight: 500 !important;
|
|
41
|
+
|
|
42
|
+
&:hover {
|
|
43
|
+
background-color: rgba(255, 255, 255, 0.2) !important;
|
|
44
|
+
}
|
|
45
|
+
`, onClick: handleClick, title: "Change AI Model", children: [_jsx("span", { css: css `margin-right: 4px !important;`, children: availableModels[safeSelectedModelIndex]?.label || fallbackModelLabel }), _jsx("span", { css: css `font-size: 10px !important;`, children: "\u25BC" })] }), open && (_jsx("div", { css: css `
|
|
46
|
+
position: absolute !important;
|
|
47
|
+
top: 100% !important;
|
|
48
|
+
left: 0 !important;
|
|
49
|
+
background-color: white !important;
|
|
50
|
+
border: 1px solid #ddd !important;
|
|
51
|
+
border-radius: 4px !important;
|
|
52
|
+
box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
|
|
53
|
+
z-index: 1000 !important;
|
|
54
|
+
min-width: 120px !important;
|
|
55
|
+
margin-top: 4px !important;
|
|
56
|
+
`, children: availableModels.map((model, index) => (_jsx("div", { css: css `
|
|
57
|
+
padding: 8px 12px !important;
|
|
58
|
+
cursor: pointer !important;
|
|
59
|
+
background-color: ${index === safeSelectedModelIndex ? '#f0f0f0' : 'transparent'} !important;
|
|
60
|
+
color: ${index === safeSelectedModelIndex ? '#007bff' : '#333'} !important;
|
|
61
|
+
font-size: 12px !important;
|
|
62
|
+
border-bottom: ${index < availableModels.length - 1 ? '1px solid #eee' : 'none'} !important;
|
|
63
|
+
|
|
64
|
+
&:hover {
|
|
65
|
+
background-color: ${index === safeSelectedModelIndex ? '#f0f0f0' : '#f8f9fa'} !important;
|
|
66
|
+
}
|
|
67
|
+
`, onClick: (event) => handleMenuItemClick(event, index), children: model.label }, model.value))) })), open && (_jsx("div", { css: css `
|
|
68
|
+
position: fixed !important;
|
|
69
|
+
top: 0 !important;
|
|
70
|
+
left: 0 !important;
|
|
71
|
+
right: 0 !important;
|
|
72
|
+
bottom: 0 !important;
|
|
73
|
+
z-index: 999 !important;
|
|
74
|
+
`, onClick: handleClose }))] }));
|
|
69
75
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationModal.d.ts","sourceRoot":"","sources":["../../../src/components/ui/NotificationModal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"NotificationModal.d.ts","sourceRoot":"","sources":["../../../src/components/ui/NotificationModal.tsx"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,UAAU,sBAAsB;IAC9B,IAAI,EAAE,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;IAC/C,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CA4F9D,CAAC"}
|
|
@@ -1,79 +1,53 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { css } from '@emotion/react';
|
|
2
3
|
import { createNotification, getNotificationIcon } from '../../core/utils/notificationUtils';
|
|
4
|
+
import { actionButton, modalOverlay } from './styles/isolatedStyles';
|
|
3
5
|
export const NotificationModal = ({ type, title, message, onClose, onConfirm, showConfirm = false, confirmText = 'Confirm', cancelText = 'Cancel' }) => {
|
|
4
6
|
const icon = getNotificationIcon(type);
|
|
5
7
|
const notification = createNotification(type, message);
|
|
6
|
-
return (_jsx("div", {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
transition: 'background-color 0.2s'
|
|
52
|
-
}, onMouseOver: (e) => e.currentTarget.style.backgroundColor = type === 'error' ? '#c82333' : '#0056b3', onMouseOut: (e) => e.currentTarget.style.backgroundColor = type === 'error' ? '#dc3545' : '#007bff', children: confirmText })), _jsx("button", { onClick: onClose, style: {
|
|
53
|
-
padding: '10px 20px',
|
|
54
|
-
backgroundColor: showConfirm ? '#f8f9fa' : '#007bff',
|
|
55
|
-
color: showConfirm ? '#666' : 'white',
|
|
56
|
-
border: showConfirm ? '1px solid #dee2e6' : 'none',
|
|
57
|
-
borderRadius: '8px',
|
|
58
|
-
cursor: 'pointer',
|
|
59
|
-
fontSize: '14px',
|
|
60
|
-
fontWeight: '500',
|
|
61
|
-
transition: 'all 0.2s'
|
|
62
|
-
}, onMouseOver: (e) => {
|
|
63
|
-
if (showConfirm) {
|
|
64
|
-
e.currentTarget.style.backgroundColor = '#e9ecef';
|
|
65
|
-
e.currentTarget.style.borderColor = '#ced4da';
|
|
66
|
-
}
|
|
67
|
-
else {
|
|
68
|
-
e.currentTarget.style.backgroundColor = '#0056b3';
|
|
69
|
-
}
|
|
70
|
-
}, onMouseOut: (e) => {
|
|
71
|
-
if (showConfirm) {
|
|
72
|
-
e.currentTarget.style.backgroundColor = '#f8f9fa';
|
|
73
|
-
e.currentTarget.style.borderColor = '#dee2e6';
|
|
74
|
-
}
|
|
75
|
-
else {
|
|
76
|
-
e.currentTarget.style.backgroundColor = '#007bff';
|
|
77
|
-
}
|
|
78
|
-
}, children: cancelText })] })] }) }));
|
|
8
|
+
return (_jsx("div", { css: modalOverlay, children: _jsxs("div", { css: css `
|
|
9
|
+
background-color: white !important;
|
|
10
|
+
padding: 24px !important;
|
|
11
|
+
border-radius: 12px !important;
|
|
12
|
+
width: 400px !important;
|
|
13
|
+
max-width: 90% !important;
|
|
14
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
|
|
15
|
+
text-align: center !important;
|
|
16
|
+
`, children: [_jsx("div", { css: css `
|
|
17
|
+
font-size: 48px !important;
|
|
18
|
+
margin-bottom: 16px !important;
|
|
19
|
+
`, children: icon }), _jsx("h3", { css: css `
|
|
20
|
+
margin: 0 0 12px 0 !important;
|
|
21
|
+
font-size: 20px !important;
|
|
22
|
+
font-weight: 600 !important;
|
|
23
|
+
color: #1a1a1a !important;
|
|
24
|
+
`, children: title }), _jsx("p", { css: css `
|
|
25
|
+
margin: 0 0 24px 0 !important;
|
|
26
|
+
font-size: 16px !important;
|
|
27
|
+
color: #666 !important;
|
|
28
|
+
line-height: 1.5 !important;
|
|
29
|
+
`, children: message }), _jsxs("div", { css: css `
|
|
30
|
+
display: flex !important;
|
|
31
|
+
justify-content: center !important;
|
|
32
|
+
gap: 12px !important;
|
|
33
|
+
`, children: [showConfirm && onConfirm && (_jsx("button", { onClick: onConfirm, css: css `
|
|
34
|
+
${actionButton}
|
|
35
|
+
background-color: ${type === 'error' ? '#dc3545' : '#007bff'} !important;
|
|
36
|
+
border-radius: 8px !important;
|
|
37
|
+
|
|
38
|
+
&:hover {
|
|
39
|
+
background-color: ${type === 'error' ? '#c82333' : '#0056b3'} !important;
|
|
40
|
+
}
|
|
41
|
+
`, children: confirmText })), _jsx("button", { onClick: onClose, css: css `
|
|
42
|
+
${actionButton}
|
|
43
|
+
background-color: ${showConfirm ? '#f8f9fa' : '#007bff'} !important;
|
|
44
|
+
color: ${showConfirm ? '#666' : 'white'} !important;
|
|
45
|
+
border: ${showConfirm ? '1px solid #dee2e6' : 'none'} !important;
|
|
46
|
+
border-radius: 8px !important;
|
|
47
|
+
|
|
48
|
+
&:hover {
|
|
49
|
+
background-color: ${showConfirm ? '#e9ecef' : '#0056b3'} !important;
|
|
50
|
+
border-color: ${showConfirm ? '#ced4da' : 'none'} !important;
|
|
51
|
+
}
|
|
52
|
+
`, children: cancelText })] })] }) }));
|
|
79
53
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PermissionForm.d.ts","sourceRoot":"","sources":["../../../src/components/ui/PermissionForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"PermissionForm.d.ts","sourceRoot":"","sources":["../../../src/components/ui/PermissionForm.tsx"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,UAAU,mBAAmB;IAC3B,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAgiBxD,CAAC"}
|