@bynder/compact-view 2.5.0 → 3.0.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/components.d.ts +55 -99
- package/components.js +47 -4
- package/index.d.ts +26 -0
- package/index.js +77 -4
- package/package.json +1 -1
package/components.d.ts
CHANGED
|
@@ -1,5 +1,34 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from "react";
|
|
3
|
+
interface MetapropertyOptionType {
|
|
4
|
+
id: string;
|
|
5
|
+
label: string;
|
|
6
|
+
assetCount: number;
|
|
7
|
+
}
|
|
8
|
+
interface MetapropertyOptionProps {
|
|
9
|
+
metapropertyOption: MetapropertyOptionType;
|
|
10
|
+
selectedOptionIds?: string[];
|
|
11
|
+
isLoading?: boolean;
|
|
12
|
+
onAddOption: () => void;
|
|
13
|
+
onRemoveOption: () => void;
|
|
14
|
+
}
|
|
15
|
+
declare function MetapropertyOptionComponent(props: MetapropertyOptionProps): JSX.Element;
|
|
16
|
+
interface MetapropertyType {
|
|
17
|
+
__typename: "Metaproperty";
|
|
18
|
+
id: string;
|
|
19
|
+
label: string;
|
|
20
|
+
options: MetapropertyOptionType[];
|
|
21
|
+
showInGridView: boolean;
|
|
22
|
+
showInListView: boolean;
|
|
23
|
+
}
|
|
24
|
+
interface MetapropertyProps {
|
|
25
|
+
metaproperty: MetapropertyType;
|
|
26
|
+
selectedOptionIds: string[];
|
|
27
|
+
isLoading: boolean;
|
|
28
|
+
onAddOption: (metapropertyOption: MetapropertyOptionType) => void;
|
|
29
|
+
onRemoveOption: (metapropertyOption: MetapropertyOptionType) => void;
|
|
30
|
+
}
|
|
31
|
+
declare function MetaPropertyFilterContent(props: MetapropertyProps): JSX.Element;
|
|
3
32
|
interface Derivatives {
|
|
4
33
|
thumbnail?: string;
|
|
5
34
|
}
|
|
@@ -11,6 +40,9 @@ interface Asset {
|
|
|
11
40
|
url: string;
|
|
12
41
|
isArchived: boolean;
|
|
13
42
|
isWatermarked: boolean;
|
|
43
|
+
metaproperties?: {
|
|
44
|
+
nodes: MetapropertyType[];
|
|
45
|
+
};
|
|
14
46
|
}
|
|
15
47
|
interface Props {
|
|
16
48
|
className?: string;
|
|
@@ -22,7 +54,6 @@ interface Props {
|
|
|
22
54
|
children?: React.ReactNode;
|
|
23
55
|
}
|
|
24
56
|
declare function AssetCard({ className, fadeIn, asset, isSelected, isOutlined, onClick, children }: Props): JSX.Element;
|
|
25
|
-
type Kind = "Flat" | "Primary" | "Secondary" | "FlatSm" | "PrimarySm" | "SecondarySm";
|
|
26
57
|
interface Theme {
|
|
27
58
|
colorPrimary?: string;
|
|
28
59
|
colorButtonPrimary?: string;
|
|
@@ -55,65 +86,24 @@ interface Props$0 {
|
|
|
55
86
|
}
|
|
56
87
|
declare function AssetList({ assets, count, hasNextPage, isLoading, loadMore, onSelect, onToggle, emptyStateElement, selectedAssetIds, selectionMode, theme, children }: Props$0): JSX.Element;
|
|
57
88
|
interface Props$1 {
|
|
58
|
-
className?: string;
|
|
59
|
-
title?: string;
|
|
60
|
-
isDisabled?: boolean;
|
|
61
|
-
onClick?: React.MouseEventHandler;
|
|
62
|
-
kind?: Kind;
|
|
63
|
-
testId?: string;
|
|
64
|
-
children: React.ReactNode;
|
|
65
|
-
}
|
|
66
|
-
declare const Button: React.ForwardRefExoticComponent<Props$1 & React.RefAttributes<HTMLButtonElement>>;
|
|
67
|
-
interface CardProps {
|
|
68
|
-
alt?: string;
|
|
69
|
-
className?: string;
|
|
70
|
-
fadeIn?: boolean;
|
|
71
|
-
id?: string;
|
|
72
|
-
style?: React.CSSProperties;
|
|
73
|
-
stacked?: boolean;
|
|
74
|
-
title: React.ReactNode;
|
|
75
|
-
onClick?: (e: React.MouseEvent) => void;
|
|
76
|
-
children?: React.ReactNode;
|
|
77
|
-
["aria-selected"]?: boolean;
|
|
78
|
-
}
|
|
79
|
-
declare function Card({ alt, className, fadeIn, id, style, stacked, title, onClick, children, ...props }: CardProps): JSX.Element;
|
|
80
|
-
interface CardImagesProps {
|
|
81
|
-
urls: string[];
|
|
82
|
-
totalCount: number;
|
|
83
|
-
alt: string;
|
|
84
|
-
}
|
|
85
|
-
declare function CardImages({ urls, totalCount, alt }: CardImagesProps): JSX.Element;
|
|
86
|
-
interface ImageProps {
|
|
87
|
-
url?: string;
|
|
88
|
-
cover?: boolean;
|
|
89
|
-
alt?: string;
|
|
90
|
-
}
|
|
91
|
-
declare function CardImage({ url, cover, alt }: ImageProps): JSX.Element;
|
|
92
|
-
interface Props$2 {
|
|
93
|
-
className?: string;
|
|
94
|
-
onClick?: () => void;
|
|
95
|
-
isChecked?: boolean;
|
|
96
|
-
title?: string;
|
|
97
|
-
}
|
|
98
|
-
declare function Checkbox({ className, onClick, isChecked, title }: Props$2): JSX.Element;
|
|
99
|
-
interface Props$3 {
|
|
100
89
|
className?: string;
|
|
101
90
|
onClick?: () => void;
|
|
102
91
|
children: React.ReactNode;
|
|
103
92
|
["data-testid"]?: string;
|
|
104
93
|
}
|
|
105
|
-
declare function Chip(props: Props$
|
|
106
|
-
interface Props$
|
|
94
|
+
declare function Chip(props: Props$1): JSX.Element;
|
|
95
|
+
interface Props$2 {
|
|
107
96
|
className?: string;
|
|
108
|
-
|
|
109
|
-
buttonKind?:
|
|
97
|
+
fadeIn?: boolean;
|
|
98
|
+
buttonKind?: "clean" | "secondary";
|
|
99
|
+
isSmall?: boolean;
|
|
110
100
|
direction?: "Down" | "Up";
|
|
111
101
|
title: React.ReactNode;
|
|
112
102
|
alt?: string;
|
|
113
103
|
disabled?: boolean;
|
|
114
104
|
children: (toggle: () => void) => React.ReactNode;
|
|
115
105
|
}
|
|
116
|
-
declare function Dropdown({ buttonKind, direction, ...props }: Props$
|
|
106
|
+
declare function Dropdown({ buttonKind, direction, isSmall, fadeIn, ...props }: Props$2): JSX.Element;
|
|
117
107
|
interface ListItemProps {
|
|
118
108
|
className?: string;
|
|
119
109
|
onClick?: () => void;
|
|
@@ -121,33 +111,6 @@ interface ListItemProps {
|
|
|
121
111
|
children: React.ReactNode;
|
|
122
112
|
}
|
|
123
113
|
declare function DropdownListItem({ selected, ...props }: ListItemProps): JSX.Element;
|
|
124
|
-
interface MetapropertyOptionType {
|
|
125
|
-
id: string;
|
|
126
|
-
label: string;
|
|
127
|
-
assetCount: number;
|
|
128
|
-
}
|
|
129
|
-
interface MetapropertyOptionProps {
|
|
130
|
-
metapropertyOption: MetapropertyOptionType;
|
|
131
|
-
selectedOptionIds?: string[];
|
|
132
|
-
isLoading?: boolean;
|
|
133
|
-
onAddOption: () => void;
|
|
134
|
-
onRemoveOption: () => void;
|
|
135
|
-
}
|
|
136
|
-
declare function MetapropertyOptionComponent(props: MetapropertyOptionProps): JSX.Element;
|
|
137
|
-
interface MetapropertyType {
|
|
138
|
-
__typename: "Metaproperty";
|
|
139
|
-
id: string;
|
|
140
|
-
label: string;
|
|
141
|
-
options: MetapropertyOptionType[];
|
|
142
|
-
}
|
|
143
|
-
interface MetapropertyProps {
|
|
144
|
-
metaproperty: MetapropertyType;
|
|
145
|
-
selectedOptionIds: string[];
|
|
146
|
-
isLoading: boolean;
|
|
147
|
-
onAddOption: (metapropertyOption: MetapropertyOptionType) => void;
|
|
148
|
-
onRemoveOption: (metapropertyOption: MetapropertyOptionType) => void;
|
|
149
|
-
}
|
|
150
|
-
declare function MetapropertyComponent(props: MetapropertyProps): JSX.Element;
|
|
151
114
|
interface SmartfilterType {
|
|
152
115
|
__typename: "Smartfilter";
|
|
153
116
|
id: string;
|
|
@@ -163,44 +126,36 @@ interface SmartfilterProps {
|
|
|
163
126
|
onAddOption: (metapropertyOption: MetapropertyOptionType) => void;
|
|
164
127
|
onRemoveOption: (metapropertyOption: MetapropertyOptionType) => void;
|
|
165
128
|
}
|
|
166
|
-
declare function
|
|
167
|
-
interface Props$
|
|
129
|
+
declare function SmartFilterContent(props: SmartfilterProps): JSX.Element;
|
|
130
|
+
interface Props$3 {
|
|
168
131
|
static?: React.ReactNode;
|
|
169
132
|
className: string;
|
|
170
133
|
children: React.ReactNode;
|
|
171
134
|
}
|
|
172
|
-
declare function HorizontalScroll(props: Props$
|
|
173
|
-
interface Props$
|
|
135
|
+
declare function HorizontalScroll(props: Props$3): JSX.Element;
|
|
136
|
+
interface Props$4 {
|
|
174
137
|
isLoading: boolean;
|
|
175
138
|
hasNextPage: boolean;
|
|
176
139
|
loadMore: () => void;
|
|
177
140
|
children: React.ReactNode;
|
|
178
141
|
}
|
|
179
|
-
declare function InfiniteScroll(props: Props$
|
|
180
|
-
interface Props$
|
|
142
|
+
declare function InfiniteScroll(props: Props$4): JSX.Element;
|
|
143
|
+
interface Props$5 {
|
|
181
144
|
children: React.ReactNode;
|
|
182
145
|
isOpen?: boolean;
|
|
183
146
|
style?: React.CSSProperties;
|
|
184
147
|
onClose?: () => void;
|
|
185
148
|
}
|
|
186
|
-
declare function Modal({ children, isOpen, style, onClose }: Props$
|
|
187
|
-
interface Props$
|
|
149
|
+
declare function Modal({ children, isOpen, style, onClose }: Props$5): JSX.Element | null;
|
|
150
|
+
interface Props$6 {
|
|
188
151
|
onReset: () => void;
|
|
189
152
|
}
|
|
190
|
-
declare function NoResults(props: Props$
|
|
191
|
-
interface Props$
|
|
153
|
+
declare function NoResults(props: Props$6): JSX.Element;
|
|
154
|
+
interface Props$7 {
|
|
192
155
|
error: Error;
|
|
193
156
|
onRetry: () => void;
|
|
194
157
|
}
|
|
195
|
-
declare function Oops({ error, onRetry }: Props$
|
|
196
|
-
interface Props$10 {
|
|
197
|
-
className?: string;
|
|
198
|
-
active?: boolean;
|
|
199
|
-
onClick?: (e: React.MouseEvent) => void;
|
|
200
|
-
title?: string;
|
|
201
|
-
children: React.ReactNode;
|
|
202
|
-
}
|
|
203
|
-
declare function OverlayButton(props: Props$10): JSX.Element;
|
|
158
|
+
declare function Oops({ error, onRetry }: Props$7): JSX.Element;
|
|
204
159
|
/**
|
|
205
160
|
* This component will create a shadow root if it is the first ShadowRoot in the tree.
|
|
206
161
|
* Otherwise it will just render it's childred. This is useful as we don't always know
|
|
@@ -210,13 +165,14 @@ declare function OverlayButton(props: Props$10): JSX.Element;
|
|
|
210
165
|
declare function ShadowRoot(props: {
|
|
211
166
|
children: React.ReactNode;
|
|
212
167
|
}): JSX.Element;
|
|
213
|
-
interface Props$
|
|
168
|
+
interface Props$8 {
|
|
214
169
|
width?: number;
|
|
215
170
|
className?: string;
|
|
216
171
|
}
|
|
217
|
-
declare function Skeleton({ width, className }: Props$
|
|
218
|
-
interface Props$
|
|
172
|
+
declare function Skeleton({ width, className }: Props$8): JSX.Element;
|
|
173
|
+
interface Props$9 {
|
|
219
174
|
className?: string;
|
|
220
175
|
}
|
|
221
|
-
declare function Spinner(props: Props$
|
|
222
|
-
export { AssetCard as Asset, Asset as displayAsset, AssetList,
|
|
176
|
+
declare function Spinner(props: Props$9): JSX.Element;
|
|
177
|
+
export { AssetCard as Asset, Asset as displayAsset, AssetList, Chip, Dropdown, DropdownListItem, MetaPropertyFilterContent as Metaproperty, MetapropertyType as metaproperty, MetapropertyOptionComponent as MetapropertyOption, MetapropertyOptionType as metapropertyOption, SmartFilterContent as Smartfilter, SmartfilterType as smartfilter, HorizontalScroll, InfiniteScroll, Modal, NoResults, Oops, ShadowRoot, Skeleton, Spinner };
|
|
178
|
+
export { Button, Card, Checkbox } from '@bynder/design-system';
|