@pingux/astro 2.120.0 → 2.121.0-alpha.0
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/lib/cjs/components/AIComponents/Attachment/Attachment.d.ts +1 -6
- package/lib/cjs/components/AIComponents/Attachment/Attachment.js +10 -15
- package/lib/cjs/components/AIComponents/Attachment/Attachment.test.d.ts +1 -0
- package/lib/cjs/components/AIComponents/Attachment/Attachment.test.js +67 -0
- package/lib/cjs/components/AIComponents/Attachment/constants.d.ts +38 -0
- package/lib/cjs/components/AIComponents/Attachment/constants.js +51 -0
- package/lib/cjs/components/AIComponents/PromptInput/PromptInput.stories.js +2 -4
- package/lib/cjs/components/Text/Text.styles.d.ts +840 -0
- package/lib/cjs/components/Text/Text.styles.js +5 -1
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/colors.d.ts +11 -0
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/colors.js +14 -3
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/buttons.d.ts +7 -0
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/buttons.js +7 -0
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/variants.d.ts +6 -0
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/variants.js +7 -0
- package/lib/cjs/styles/themes/next-gen/colors/colors.d.ts +10 -0
- package/lib/cjs/styles/themes/next-gen/colors/iconWrapper.d.ts +10 -0
- package/lib/cjs/styles/themes/next-gen/colors/iconWrapper.js +12 -2
- package/lib/cjs/styles/themes/next-gen/next-gen.d.ts +13 -6
- package/lib/cjs/styles/themes/next-gen/variants/button.d.ts +3 -6
- package/lib/cjs/styles/themes/next-gen/variants/button.js +5 -2
- package/lib/components/AIComponents/Attachment/Attachment.js +10 -15
- package/lib/components/AIComponents/Attachment/Attachment.test.js +64 -0
- package/lib/components/AIComponents/Attachment/constants.js +42 -0
- package/lib/components/AIComponents/PromptInput/PromptInput.stories.js +3 -5
- package/lib/components/Text/Text.styles.js +5 -1
- package/lib/styles/themeOverrides/nextGenDarkMode/colors.js +14 -3
- package/lib/styles/themeOverrides/nextGenDarkMode/variants/buttons.js +7 -0
- package/lib/styles/themeOverrides/nextGenDarkMode/variants/variants.js +7 -0
- package/lib/styles/themes/next-gen/colors/iconWrapper.js +12 -2
- package/lib/styles/themes/next-gen/variants/button.js +5 -2
- package/package.json +1 -1
@@ -129,6 +129,9 @@ var HTags = {
|
|
129
129
|
lineHeight: '16px'
|
130
130
|
})
|
131
131
|
};
|
132
|
+
var attachmentTitle = _objectSpread(_objectSpread(_objectSpread({}, base), textEllipsis), {}, {
|
133
|
+
fontWeight: 2
|
134
|
+
});
|
132
135
|
var text = _objectSpread(_objectSpread(_objectSpread({
|
133
136
|
base: base,
|
134
137
|
bodyStrong: bodyStrong,
|
@@ -235,6 +238,7 @@ var text = _objectSpread(_objectSpread(_objectSpread({
|
|
235
238
|
fontFamily: 'standard'
|
236
239
|
}),
|
237
240
|
textEllipsis: textEllipsis,
|
238
|
-
title: title
|
241
|
+
title: title,
|
242
|
+
attachmentTitle: attachmentTitle
|
239
243
|
});
|
240
244
|
exports.text = text;
|
@@ -49,6 +49,7 @@ export declare const colors: {
|
|
49
49
|
dark: string;
|
50
50
|
input: string;
|
51
51
|
separator: string;
|
52
|
+
attachment: string;
|
52
53
|
};
|
53
54
|
iconWrapper: {
|
54
55
|
wrapper: {
|
@@ -60,6 +61,11 @@ export declare const colors: {
|
|
60
61
|
red: string;
|
61
62
|
yellow: string;
|
62
63
|
teal: string;
|
64
|
+
lightBlue: string;
|
65
|
+
lightPink: string;
|
66
|
+
lightGreen: string;
|
67
|
+
lightYellow: string;
|
68
|
+
lightIndigo: string;
|
63
69
|
};
|
64
70
|
icon: {
|
65
71
|
orange: string;
|
@@ -70,6 +76,11 @@ export declare const colors: {
|
|
70
76
|
red: string;
|
71
77
|
yellow: string;
|
72
78
|
teal: string;
|
79
|
+
lightBlue: string;
|
80
|
+
lightPink: string;
|
81
|
+
lightGreen: string;
|
82
|
+
lightYellow: string;
|
83
|
+
lightIndigo: string;
|
73
84
|
};
|
74
85
|
};
|
75
86
|
};
|
@@ -30,7 +30,8 @@ var border = {
|
|
30
30
|
base: _chromaJs["default"].mix('#23282e', 'white', 0.15, 'rgb').hex(),
|
31
31
|
dark: _chromaJs["default"].mix('#23282e', 'white', 0.25, 'rgb').hex(),
|
32
32
|
input: _colorTokens.nextGenColors['gray-500'],
|
33
|
-
separator: _chromaJs["default"].mix('#23282e', 'white', 0.15, 'rgb').hex()
|
33
|
+
separator: _chromaJs["default"].mix('#23282e', 'white', 0.15, 'rgb').hex(),
|
34
|
+
attachment: '#39414b'
|
34
35
|
};
|
35
36
|
var iconWrapper = {
|
36
37
|
wrapper: {
|
@@ -41,7 +42,12 @@ var iconWrapper = {
|
|
41
42
|
pink: _colorTokens.nextGenColors['pink-500'],
|
42
43
|
red: _colorTokens.nextGenColors['red-500'],
|
43
44
|
yellow: _colorTokens.nextGenColors['yellow-500'],
|
44
|
-
teal: _colorTokens.nextGenColors['teal-500']
|
45
|
+
teal: _colorTokens.nextGenColors['teal-500'],
|
46
|
+
lightBlue: _colorTokens.nextGenColors['blue-600'],
|
47
|
+
lightPink: _colorTokens.nextGenColors['pink-600'],
|
48
|
+
lightGreen: _colorTokens.nextGenColors['green-800'],
|
49
|
+
lightYellow: _colorTokens.nextGenColors['yellow-800'],
|
50
|
+
lightIndigo: _colorTokens.nextGenColors['indigo-700']
|
45
51
|
},
|
46
52
|
icon: {
|
47
53
|
orange: 'black',
|
@@ -51,7 +57,12 @@ var iconWrapper = {
|
|
51
57
|
pink: 'black',
|
52
58
|
red: 'black',
|
53
59
|
yellow: 'black',
|
54
|
-
teal: 'black'
|
60
|
+
teal: 'black',
|
61
|
+
lightBlue: _colorTokens.nextGenColors['blue-100'],
|
62
|
+
lightPink: _colorTokens.nextGenColors['pink-100'],
|
63
|
+
lightGreen: _colorTokens.nextGenColors['green-100'],
|
64
|
+
lightYellow: _colorTokens.nextGenColors['yellow-100'],
|
65
|
+
lightIndigo: _colorTokens.nextGenColors['indigo-100']
|
55
66
|
}
|
56
67
|
};
|
57
68
|
var colors = _objectSpread(_objectSpread({
|
@@ -62,7 +62,14 @@ var modal = {
|
|
62
62
|
bg: 'background.base'
|
63
63
|
}
|
64
64
|
};
|
65
|
+
var attachment = {
|
66
|
+
container: {
|
67
|
+
backgroundColor: 'background.secondary',
|
68
|
+
borderColor: 'border.attachment'
|
69
|
+
}
|
70
|
+
};
|
65
71
|
var _default = {
|
72
|
+
attachment: attachment,
|
66
73
|
avatar: _avatar.avatar,
|
67
74
|
message: _message.message,
|
68
75
|
menu: _menu.menu,
|
@@ -62,6 +62,11 @@ declare const colors: {
|
|
62
62
|
red: string;
|
63
63
|
yellow: string;
|
64
64
|
teal: string;
|
65
|
+
lightBlue: string;
|
66
|
+
lightPink: string;
|
67
|
+
lightGreen: string;
|
68
|
+
lightYellow: string;
|
69
|
+
lightIndigo: string;
|
65
70
|
};
|
66
71
|
icon: {
|
67
72
|
orange: string;
|
@@ -72,6 +77,11 @@ declare const colors: {
|
|
72
77
|
red: string;
|
73
78
|
yellow: string;
|
74
79
|
teal: string;
|
80
|
+
lightBlue: string;
|
81
|
+
lightPink: string;
|
82
|
+
lightGreen: string;
|
83
|
+
lightYellow: string;
|
84
|
+
lightIndigo: string;
|
75
85
|
};
|
76
86
|
};
|
77
87
|
neutral: {
|
@@ -8,6 +8,11 @@ export declare const iconWrapper: {
|
|
8
8
|
red: string;
|
9
9
|
yellow: string;
|
10
10
|
teal: string;
|
11
|
+
lightBlue: string;
|
12
|
+
lightPink: string;
|
13
|
+
lightGreen: string;
|
14
|
+
lightYellow: string;
|
15
|
+
lightIndigo: string;
|
11
16
|
};
|
12
17
|
icon: {
|
13
18
|
orange: string;
|
@@ -18,5 +23,10 @@ export declare const iconWrapper: {
|
|
18
23
|
red: string;
|
19
24
|
yellow: string;
|
20
25
|
teal: string;
|
26
|
+
lightBlue: string;
|
27
|
+
lightPink: string;
|
28
|
+
lightGreen: string;
|
29
|
+
lightYellow: string;
|
30
|
+
lightIndigo: string;
|
21
31
|
};
|
22
32
|
};
|
@@ -15,7 +15,12 @@ var iconWrapper = {
|
|
15
15
|
pink: _colorTokens.nextGenColors['pink-100'],
|
16
16
|
red: _colorTokens.nextGenColors['red-100'],
|
17
17
|
yellow: _colorTokens.nextGenColors['yellow-100'],
|
18
|
-
teal: _colorTokens.nextGenColors['teal-100']
|
18
|
+
teal: _colorTokens.nextGenColors['teal-100'],
|
19
|
+
lightBlue: _colorTokens.nextGenColors['blue-100'],
|
20
|
+
lightPink: _colorTokens.nextGenColors['pink-100'],
|
21
|
+
lightGreen: _colorTokens.nextGenColors['green-100'],
|
22
|
+
lightYellow: _colorTokens.nextGenColors['yellow-100'],
|
23
|
+
lightIndigo: _colorTokens.nextGenColors['indigo-100']
|
19
24
|
},
|
20
25
|
icon: {
|
21
26
|
orange: _colorTokens.nextGenColors['orange-800'],
|
@@ -25,7 +30,12 @@ var iconWrapper = {
|
|
25
30
|
pink: _colorTokens.nextGenColors['pink-800'],
|
26
31
|
red: _colorTokens.nextGenColors['red-800'],
|
27
32
|
yellow: _colorTokens.nextGenColors['yellow-800'],
|
28
|
-
teal: _colorTokens.nextGenColors['teal-800']
|
33
|
+
teal: _colorTokens.nextGenColors['teal-800'],
|
34
|
+
lightBlue: _colorTokens.nextGenColors['blue-500'],
|
35
|
+
lightPink: _colorTokens.nextGenColors['pink-600'],
|
36
|
+
lightGreen: _colorTokens.nextGenColors['green-800'],
|
37
|
+
lightYellow: _colorTokens.nextGenColors['yellow-800'],
|
38
|
+
lightIndigo: _colorTokens.nextGenColors['indigo-700']
|
29
39
|
}
|
30
40
|
};
|
31
41
|
exports.iconWrapper = iconWrapper;
|
@@ -50,6 +50,11 @@ declare const _default: {
|
|
50
50
|
red: string;
|
51
51
|
yellow: string;
|
52
52
|
teal: string;
|
53
|
+
lightBlue: string;
|
54
|
+
lightPink: string;
|
55
|
+
lightGreen: string;
|
56
|
+
lightYellow: string;
|
57
|
+
lightIndigo: string;
|
53
58
|
};
|
54
59
|
icon: {
|
55
60
|
orange: string;
|
@@ -60,6 +65,11 @@ declare const _default: {
|
|
60
65
|
red: string;
|
61
66
|
yellow: string;
|
62
67
|
teal: string;
|
68
|
+
lightBlue: string;
|
69
|
+
lightPink: string;
|
70
|
+
lightGreen: string;
|
71
|
+
lightYellow: string;
|
72
|
+
lightIndigo: string;
|
63
73
|
};
|
64
74
|
};
|
65
75
|
neutral: {
|
@@ -953,6 +963,9 @@ declare const _default: {
|
|
953
963
|
borderColor: string;
|
954
964
|
size: string;
|
955
965
|
p: string;
|
966
|
+
'&.is-hovered': {
|
967
|
+
backgroundColor: string;
|
968
|
+
};
|
956
969
|
cursor: string;
|
957
970
|
transition: string;
|
958
971
|
outline: string;
|
@@ -965,12 +978,6 @@ declare const _default: {
|
|
965
978
|
outlineColor: string;
|
966
979
|
outlineOffset: string;
|
967
980
|
};
|
968
|
-
'&.is-hovered': {
|
969
|
-
backgroundColor: string;
|
970
|
-
path: {
|
971
|
-
fill: string;
|
972
|
-
};
|
973
|
-
};
|
974
981
|
'&.is-pressed': {
|
975
982
|
backgroundColor: string;
|
976
983
|
borderColor: string;
|
@@ -720,6 +720,9 @@ declare const buttons: {
|
|
720
720
|
borderColor: string;
|
721
721
|
size: string;
|
722
722
|
p: string;
|
723
|
+
'&.is-hovered': {
|
724
|
+
backgroundColor: string;
|
725
|
+
};
|
723
726
|
cursor: string;
|
724
727
|
transition: string;
|
725
728
|
outline: string;
|
@@ -732,12 +735,6 @@ declare const buttons: {
|
|
732
735
|
outlineColor: string;
|
733
736
|
outlineOffset: string;
|
734
737
|
};
|
735
|
-
'&.is-hovered': {
|
736
|
-
backgroundColor: string;
|
737
|
-
path: {
|
738
|
-
fill: string;
|
739
|
-
};
|
740
|
-
};
|
741
738
|
'&.is-pressed': {
|
742
739
|
backgroundColor: string;
|
743
740
|
borderColor: string;
|
@@ -307,11 +307,14 @@ var iconButtons = {
|
|
307
307
|
}),
|
308
308
|
copyButton: _codeView.copyButton,
|
309
309
|
deleteAttachment: _objectSpread(_objectSpread({}, baseIconButton), {}, {
|
310
|
-
backgroundColor: '
|
310
|
+
backgroundColor: 'light',
|
311
311
|
border: '1px solid',
|
312
312
|
borderColor: 'gray-300',
|
313
313
|
size: '24px',
|
314
|
-
p: '4px'
|
314
|
+
p: '4px',
|
315
|
+
'&.is-hovered': {
|
316
|
+
backgroundColor: '#dde5ec'
|
317
|
+
}
|
315
318
|
}),
|
316
319
|
inverted: {
|
317
320
|
cursor: 'pointer',
|
@@ -15,6 +15,7 @@ import CloseIcon from '@pingux/mdi-react/CloseIcon';
|
|
15
15
|
import PaperOutlineIcon from '@pingux/mdi-react/PaperOutlineIcon';
|
16
16
|
import { useStatusClasses } from '../../../hooks';
|
17
17
|
import { Box, Icon, IconButton, IconWrapper, Text } from '../../../index';
|
18
|
+
import { fileTypeConfig } from './constants';
|
18
19
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
19
20
|
export var getFileExtension = function getFileExtension(fullString) {
|
20
21
|
var fileExtensionPattern = /\.([0-9a-z]+)(?:[?#]|$)/i;
|
@@ -33,12 +34,16 @@ var Attachment = function Attachment(props) {
|
|
33
34
|
id = props.id,
|
34
35
|
containerProps = props.containerProps,
|
35
36
|
iconWrapperProps = props.iconWrapperProps,
|
36
|
-
icon = props.icon,
|
37
37
|
deleteButtonProps = props.deleteButtonProps;
|
38
38
|
var _useStatusClasses = useStatusClasses(className, {
|
39
39
|
isFullScreen: isFullScreen
|
40
40
|
}),
|
41
41
|
classNames = _useStatusClasses.classNames;
|
42
|
+
var defaultIconProps = {
|
43
|
+
icon: PaperOutlineIcon,
|
44
|
+
color: 'lightBlue'
|
45
|
+
};
|
46
|
+
var iconProps = fileTypeConfig[fileType] || defaultIconProps;
|
42
47
|
return ___EmotionJSX(Box, _extends({
|
43
48
|
variant: "attachment.container",
|
44
49
|
className: classNames
|
@@ -47,13 +52,11 @@ var Attachment = function Attachment(props) {
|
|
47
52
|
alignItems: "center",
|
48
53
|
px: "lg",
|
49
54
|
py: "md"
|
50
|
-
}, ___EmotionJSX(IconWrapper, {
|
55
|
+
}, ___EmotionJSX(IconWrapper, _extends({
|
51
56
|
isCircle: true,
|
52
57
|
title: {
|
53
|
-
name:
|
58
|
+
name: "".concat(fileType, " File Icon")
|
54
59
|
},
|
55
|
-
icon: icon,
|
56
|
-
color: "red",
|
57
60
|
size: "sm",
|
58
61
|
wrapperProps: _objectSpread({
|
59
62
|
size: '36px',
|
@@ -61,18 +64,13 @@ var Attachment = function Attachment(props) {
|
|
61
64
|
minWidth: '36px',
|
62
65
|
p: '9px'
|
63
66
|
}, iconWrapperProps)
|
64
|
-
}), ___EmotionJSX(Box, {
|
67
|
+
}, iconProps)), ___EmotionJSX(Box, {
|
65
68
|
sx: {
|
66
69
|
ml: 'md'
|
67
70
|
}
|
68
71
|
}, ___EmotionJSX(Text, {
|
69
72
|
as: "h5",
|
70
|
-
|
71
|
-
fontWeight: 2,
|
72
|
-
textOverflow: 'ellipsis',
|
73
|
-
whiteSpace: 'nowrap',
|
74
|
-
overflow: 'hidden'
|
75
|
-
}
|
73
|
+
variant: "attachmentTitle"
|
76
74
|
}, title), ___EmotionJSX(Text, {
|
77
75
|
sx: {
|
78
76
|
textOverflow: 'ellipsis'
|
@@ -94,7 +92,4 @@ var Attachment = function Attachment(props) {
|
|
94
92
|
icon: CloseIcon
|
95
93
|
}))));
|
96
94
|
};
|
97
|
-
Attachment.defaultProps = {
|
98
|
-
icon: PaperOutlineIcon
|
99
|
-
};
|
100
95
|
export default Attachment;
|
@@ -0,0 +1,64 @@
|
|
1
|
+
import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
|
2
|
+
import React from 'react';
|
3
|
+
import { render, screen } from '../../../utils/testUtils/testWrapper';
|
4
|
+
import Attachment from './Attachment';
|
5
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
6
|
+
var mockFileName = 'sampleFile';
|
7
|
+
var defaultProps = {
|
8
|
+
key: 'file_key',
|
9
|
+
title: mockFileName,
|
10
|
+
fileType: 'PPT',
|
11
|
+
removeFile: function removeFile() {
|
12
|
+
return false;
|
13
|
+
},
|
14
|
+
id: 'Example Title'
|
15
|
+
};
|
16
|
+
var getComponent = function getComponent() {
|
17
|
+
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
18
|
+
return render(___EmotionJSX(Attachment, _extends({}, defaultProps, props)));
|
19
|
+
};
|
20
|
+
describe('Attachment', function () {
|
21
|
+
test('renders with PPT file format ', function () {
|
22
|
+
getComponent();
|
23
|
+
screen.getByRole('img', {
|
24
|
+
name: /ppt file icon/i
|
25
|
+
});
|
26
|
+
screen.getByRole('heading', {
|
27
|
+
name: mockFileName
|
28
|
+
});
|
29
|
+
screen.getAllByText(/ppt/i);
|
30
|
+
screen.getByRole('button', {
|
31
|
+
name: /remove attachment/i
|
32
|
+
});
|
33
|
+
});
|
34
|
+
test('renders with PDF file format', function () {
|
35
|
+
getComponent({
|
36
|
+
fileType: 'pdf'
|
37
|
+
});
|
38
|
+
screen.getByRole('img', {
|
39
|
+
name: /pdf file icon/i
|
40
|
+
});
|
41
|
+
screen.getByRole('heading', {
|
42
|
+
name: mockFileName
|
43
|
+
});
|
44
|
+
screen.getAllByText(/pdf/i);
|
45
|
+
});
|
46
|
+
test('renders with CSV file format', function () {
|
47
|
+
getComponent({
|
48
|
+
fileType: 'csv'
|
49
|
+
});
|
50
|
+
screen.getAllByText(/csv/i);
|
51
|
+
});
|
52
|
+
test('renders with JS file format', function () {
|
53
|
+
getComponent({
|
54
|
+
fileType: 'js'
|
55
|
+
});
|
56
|
+
screen.getAllByText(/js/i);
|
57
|
+
});
|
58
|
+
test('renders with ZIP file format', function () {
|
59
|
+
getComponent({
|
60
|
+
fileType: 'zip'
|
61
|
+
});
|
62
|
+
screen.getAllByText(/zip/i);
|
63
|
+
});
|
64
|
+
});
|
@@ -0,0 +1,42 @@
|
|
1
|
+
import CodeTagsIcon from '@pingux/mdi-react/CodeTagsIcon';
|
2
|
+
import FileDocumentOutlineIcon from '@pingux/mdi-react/FileDocumentOutlineIcon';
|
3
|
+
import FolderZipOutlineIcon from '@pingux/mdi-react/FolderZipOutlineIcon';
|
4
|
+
import TableLargeIcon from '@pingux/mdi-react/TableLargeIcon';
|
5
|
+
export var fileTypeConfig = {
|
6
|
+
pdf: {
|
7
|
+
icon: FileDocumentOutlineIcon,
|
8
|
+
color: 'lightPink'
|
9
|
+
},
|
10
|
+
doc: {
|
11
|
+
icon: FileDocumentOutlineIcon,
|
12
|
+
color: 'lightPink'
|
13
|
+
},
|
14
|
+
docx: {
|
15
|
+
icon: FileDocumentOutlineIcon,
|
16
|
+
color: 'lightPink'
|
17
|
+
},
|
18
|
+
text: {
|
19
|
+
icon: FileDocumentOutlineIcon,
|
20
|
+
color: 'lightPink'
|
21
|
+
},
|
22
|
+
csv: {
|
23
|
+
icon: TableLargeIcon,
|
24
|
+
color: 'lightGreen'
|
25
|
+
},
|
26
|
+
xls: {
|
27
|
+
icon: TableLargeIcon,
|
28
|
+
color: 'lightGreen'
|
29
|
+
},
|
30
|
+
xlsx: {
|
31
|
+
icon: TableLargeIcon,
|
32
|
+
color: 'lightGreen'
|
33
|
+
},
|
34
|
+
js: {
|
35
|
+
icon: CodeTagsIcon,
|
36
|
+
color: 'lightYellow'
|
37
|
+
},
|
38
|
+
zip: {
|
39
|
+
icon: FolderZipOutlineIcon,
|
40
|
+
color: 'lightIndigo'
|
41
|
+
}
|
42
|
+
};
|
@@ -13,7 +13,7 @@ function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (
|
|
13
13
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
14
14
|
import React, { useState } from 'react';
|
15
15
|
import DocsLayout from '../../../../.storybook/storybookDocsLayout';
|
16
|
-
import {
|
16
|
+
import { Box } from '../../..';
|
17
17
|
import { booleanArg } from '../../../utils/docUtils/docArgTypes';
|
18
18
|
import PromptInput from './PromptInput';
|
19
19
|
import PromptInputReadMe from './PromptInputReadMe.mdx';
|
@@ -54,9 +54,7 @@ export var Default = function Default(args) {
|
|
54
54
|
console.log('submit');
|
55
55
|
setValue('');
|
56
56
|
};
|
57
|
-
return ___EmotionJSX(
|
58
|
-
themeOverrides: [NextGenTheme]
|
59
|
-
}, ___EmotionJSX(Box, {
|
57
|
+
return ___EmotionJSX(Box, {
|
60
58
|
maxWidth: "768px"
|
61
59
|
}, ___EmotionJSX(PromptInput, _extends({}, args, {
|
62
60
|
placeholder: "Enter a prompt here",
|
@@ -68,5 +66,5 @@ export var Default = function Default(args) {
|
|
68
66
|
onFileChange: onFileChange,
|
69
67
|
onSubmit: onSubmit,
|
70
68
|
onCancel: onCancel
|
71
|
-
})))
|
69
|
+
})));
|
72
70
|
};
|
@@ -120,6 +120,9 @@ var HTags = {
|
|
120
120
|
lineHeight: '16px'
|
121
121
|
})
|
122
122
|
};
|
123
|
+
var attachmentTitle = _objectSpread(_objectSpread(_objectSpread({}, base), textEllipsis), {}, {
|
124
|
+
fontWeight: 2
|
125
|
+
});
|
123
126
|
export var text = _objectSpread(_objectSpread(_objectSpread({
|
124
127
|
base: base,
|
125
128
|
bodyStrong: bodyStrong,
|
@@ -226,5 +229,6 @@ export var text = _objectSpread(_objectSpread(_objectSpread({
|
|
226
229
|
fontFamily: 'standard'
|
227
230
|
}),
|
228
231
|
textEllipsis: textEllipsis,
|
229
|
-
title: title
|
232
|
+
title: title,
|
233
|
+
attachmentTitle: attachmentTitle
|
230
234
|
});
|
@@ -22,7 +22,8 @@ var border = {
|
|
22
22
|
base: chroma.mix('#23282e', 'white', 0.15, 'rgb').hex(),
|
23
23
|
dark: chroma.mix('#23282e', 'white', 0.25, 'rgb').hex(),
|
24
24
|
input: nextGenColors['gray-500'],
|
25
|
-
separator: chroma.mix('#23282e', 'white', 0.15, 'rgb').hex()
|
25
|
+
separator: chroma.mix('#23282e', 'white', 0.15, 'rgb').hex(),
|
26
|
+
attachment: '#39414b'
|
26
27
|
};
|
27
28
|
var iconWrapper = {
|
28
29
|
wrapper: {
|
@@ -33,7 +34,12 @@ var iconWrapper = {
|
|
33
34
|
pink: nextGenColors['pink-500'],
|
34
35
|
red: nextGenColors['red-500'],
|
35
36
|
yellow: nextGenColors['yellow-500'],
|
36
|
-
teal: nextGenColors['teal-500']
|
37
|
+
teal: nextGenColors['teal-500'],
|
38
|
+
lightBlue: nextGenColors['blue-600'],
|
39
|
+
lightPink: nextGenColors['pink-600'],
|
40
|
+
lightGreen: nextGenColors['green-800'],
|
41
|
+
lightYellow: nextGenColors['yellow-800'],
|
42
|
+
lightIndigo: nextGenColors['indigo-700']
|
37
43
|
},
|
38
44
|
icon: {
|
39
45
|
orange: 'black',
|
@@ -43,7 +49,12 @@ var iconWrapper = {
|
|
43
49
|
pink: 'black',
|
44
50
|
red: 'black',
|
45
51
|
yellow: 'black',
|
46
|
-
teal: 'black'
|
52
|
+
teal: 'black',
|
53
|
+
lightBlue: nextGenColors['blue-100'],
|
54
|
+
lightPink: nextGenColors['pink-100'],
|
55
|
+
lightGreen: nextGenColors['green-100'],
|
56
|
+
lightYellow: nextGenColors['yellow-100'],
|
57
|
+
lightIndigo: nextGenColors['indigo-100']
|
47
58
|
}
|
48
59
|
};
|
49
60
|
export var colors = _objectSpread(_objectSpread({
|
@@ -54,7 +54,14 @@ var modal = {
|
|
54
54
|
bg: 'background.base'
|
55
55
|
}
|
56
56
|
};
|
57
|
+
var attachment = {
|
58
|
+
container: {
|
59
|
+
backgroundColor: 'background.secondary',
|
60
|
+
borderColor: 'border.attachment'
|
61
|
+
}
|
62
|
+
};
|
57
63
|
export default {
|
64
|
+
attachment: attachment,
|
58
65
|
avatar: avatar,
|
59
66
|
message: message,
|
60
67
|
menu: menu,
|
@@ -8,7 +8,12 @@ export var iconWrapper = {
|
|
8
8
|
pink: nextGenColors['pink-100'],
|
9
9
|
red: nextGenColors['red-100'],
|
10
10
|
yellow: nextGenColors['yellow-100'],
|
11
|
-
teal: nextGenColors['teal-100']
|
11
|
+
teal: nextGenColors['teal-100'],
|
12
|
+
lightBlue: nextGenColors['blue-100'],
|
13
|
+
lightPink: nextGenColors['pink-100'],
|
14
|
+
lightGreen: nextGenColors['green-100'],
|
15
|
+
lightYellow: nextGenColors['yellow-100'],
|
16
|
+
lightIndigo: nextGenColors['indigo-100']
|
12
17
|
},
|
13
18
|
icon: {
|
14
19
|
orange: nextGenColors['orange-800'],
|
@@ -18,6 +23,11 @@ export var iconWrapper = {
|
|
18
23
|
pink: nextGenColors['pink-800'],
|
19
24
|
red: nextGenColors['red-800'],
|
20
25
|
yellow: nextGenColors['yellow-800'],
|
21
|
-
teal: nextGenColors['teal-800']
|
26
|
+
teal: nextGenColors['teal-800'],
|
27
|
+
lightBlue: nextGenColors['blue-500'],
|
28
|
+
lightPink: nextGenColors['pink-600'],
|
29
|
+
lightGreen: nextGenColors['green-800'],
|
30
|
+
lightYellow: nextGenColors['yellow-800'],
|
31
|
+
lightIndigo: nextGenColors['indigo-700']
|
22
32
|
}
|
23
33
|
};
|
@@ -300,11 +300,14 @@ var iconButtons = {
|
|
300
300
|
}),
|
301
301
|
copyButton: copyButton,
|
302
302
|
deleteAttachment: _objectSpread(_objectSpread({}, baseIconButton), {}, {
|
303
|
-
backgroundColor: '
|
303
|
+
backgroundColor: 'light',
|
304
304
|
border: '1px solid',
|
305
305
|
borderColor: 'gray-300',
|
306
306
|
size: '24px',
|
307
|
-
p: '4px'
|
307
|
+
p: '4px',
|
308
|
+
'&.is-hovered': {
|
309
|
+
backgroundColor: '#dde5ec'
|
310
|
+
}
|
308
311
|
}),
|
309
312
|
inverted: {
|
310
313
|
cursor: 'pointer',
|