@cloud-ru/ds-attachment 1.0.5-preview-04507fc5.0 → 1.1.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/CHANGELOG.md +6 -0
- package/README.md +1 -0
- package/dist/cjs/components/Attachment/Attachment.d.ts +1 -1
- package/dist/cjs/components/Attachment/Attachment.js +2 -2
- package/dist/cjs/components/Attachment/styles.module.css +4 -0
- package/dist/cjs/style.css +4 -0
- package/dist/cjs/types.d.ts +5 -0
- package/dist/esm/components/Attachment/Attachment.d.ts +1 -1
- package/dist/esm/components/Attachment/Attachment.js +2 -2
- package/dist/esm/components/Attachment/styles.module.css +4 -0
- package/dist/esm/style.css +4 -0
- package/dist/esm/types.d.ts +5 -0
- package/dist/tsconfig.cjs.tsbuildinfo +1 -1
- package/dist/tsconfig.esm.tsbuildinfo +1 -1
- package/package.json +10 -10
- package/src/components/Attachment/Attachment.tsx +2 -0
- package/src/components/Attachment/styles.module.scss +5 -0
- package/src/types.ts +5 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloud-ru/ds-attachment",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Пакет компонентов для отображения прикреплённых файлов — Attachment (горизонтальный) и AttachmentSquare (квадратный).",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -34,15 +34,15 @@
|
|
|
34
34
|
],
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"classnames": "^2.5.1",
|
|
37
|
-
"@cloud-ru/ds-button": "1.0.1",
|
|
38
|
-
"@cloud-ru/ds-
|
|
39
|
-
"@cloud-ru/ds-
|
|
40
|
-
"@cloud-ru/ds-
|
|
41
|
-
"@cloud-ru/ds-
|
|
42
|
-
"@cloud-ru/ds-loader": "1.0.1",
|
|
43
|
-
"@cloud-ru/ds-
|
|
44
|
-
"@cloud-ru/ds-
|
|
45
|
-
"@cloud-ru/ds-
|
|
37
|
+
"@cloud-ru/ds-button": "^1.0.1",
|
|
38
|
+
"@cloud-ru/ds-card": "^1.0.5",
|
|
39
|
+
"@cloud-ru/ds-icon-predefined": "^1.0.1",
|
|
40
|
+
"@cloud-ru/ds-field-decorator": "^1.0.3",
|
|
41
|
+
"@cloud-ru/ds-icons": "^1.0.2",
|
|
42
|
+
"@cloud-ru/ds-loader": "^1.0.1",
|
|
43
|
+
"@cloud-ru/ds-materials": "^1.0.1",
|
|
44
|
+
"@cloud-ru/ds-truncate-string": "^1.0.3",
|
|
45
|
+
"@cloud-ru/ds-utils": "^1.1.0"
|
|
46
46
|
},
|
|
47
47
|
"publishConfig": {
|
|
48
48
|
"access": "public"
|
|
@@ -27,6 +27,7 @@ export function Attachment({
|
|
|
27
27
|
onRetry,
|
|
28
28
|
size = 's',
|
|
29
29
|
truncate,
|
|
30
|
+
fullWidth = true,
|
|
30
31
|
className,
|
|
31
32
|
...rest
|
|
32
33
|
}: AttachmentProps) {
|
|
@@ -52,6 +53,7 @@ export function Attachment({
|
|
|
52
53
|
multiSelect
|
|
53
54
|
interactive={interactive}
|
|
54
55
|
className={cn(styles.root, className)}
|
|
56
|
+
data-full-width={fullWidth || undefined}
|
|
55
57
|
data-attachment-error={hasError || undefined}
|
|
56
58
|
aria-busy={isLoading || undefined}
|
|
57
59
|
>
|
package/src/types.ts
CHANGED
|
@@ -54,6 +54,11 @@ export type AttachmentSquareProps = WithSupportProps<{
|
|
|
54
54
|
}>;
|
|
55
55
|
|
|
56
56
|
export type AttachmentProps = AttachmentSquareProps & {
|
|
57
|
+
/**
|
|
58
|
+
* Растянуть карточку на всю ширину контейнера. Выключенная — ужимается по содержимому.
|
|
59
|
+
* @default true
|
|
60
|
+
*/
|
|
61
|
+
fullWidth?: boolean;
|
|
57
62
|
truncate?: {
|
|
58
63
|
/**
|
|
59
64
|
* Максимальное кол-во строк заголовка
|