@bynder/compact-view 4.3.0 → 4.3.2

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 CHANGED
@@ -1,6 +1,9 @@
1
- /// <reference types="react" />
2
- import React from "react";
3
- import { BrowserClient } from "@sentry/browser";
1
+ import React from 'react';
2
+ import { SelectionMode } from '@src/app-config/appConfig.type';
3
+ import { Theme } from '@src/style/Theming';
4
+ export { Button, Card, Checkbox } from '@bynder/design-system';
5
+ import { BrowserClient } from '@sentry/browser';
6
+
4
7
  interface MetapropertyOptionType {
5
8
  id: string;
6
9
  label: string;
@@ -14,8 +17,9 @@ interface MetapropertyOptionProps {
14
17
  onRemoveOption: () => void;
15
18
  }
16
19
  declare function MetapropertyOptionComponent(props: MetapropertyOptionProps): React.JSX.Element;
20
+
17
21
  interface MetapropertyType {
18
- __typename: "Metaproperty";
22
+ __typename: 'Metaproperty';
19
23
  id: string;
20
24
  label: string;
21
25
  zIndex: number;
@@ -31,6 +35,7 @@ interface MetapropertyProps {
31
35
  onRemoveOption: (metapropertyOption: MetapropertyOptionType) => void;
32
36
  }
33
37
  declare function MetaPropertyFilterContent(props: MetapropertyProps): React.JSX.Element;
38
+
34
39
  interface File {
35
40
  url: string;
36
41
  width?: number;
@@ -38,11 +43,12 @@ interface File {
38
43
  fileSize?: number;
39
44
  isFakeOriginal?: boolean;
40
45
  }
46
+
41
47
  type AssetData = {
42
- tag: "Loading";
48
+ tag: 'Loading';
43
49
  value: undefined | Asset[];
44
50
  } | {
45
- tag: "Loaded";
51
+ tag: 'Loaded';
46
52
  value: Asset[];
47
53
  };
48
54
  interface Derivatives {
@@ -72,7 +78,8 @@ interface Asset {
72
78
  textMetaproperties?: TextMetapropertiesType[];
73
79
  files: Record<string, File>;
74
80
  }
75
- interface Props {
81
+
82
+ interface Props$a {
76
83
  className?: string;
77
84
  fadeIn?: boolean;
78
85
  asset: Asset;
@@ -81,17 +88,9 @@ interface Props {
81
88
  isOutlined: boolean;
82
89
  children?: React.ReactNode;
83
90
  }
84
- declare function AssetCard({ className, fadeIn, asset, isSelected, isOutlined, onClick, children }: Props): React.JSX.Element;
85
- interface Theme {
86
- colorPrimary?: string;
87
- colorButtonPrimary?: string;
88
- colorButtonPrimaryLabel?: string;
89
- colorButtonPrimaryActive?: string;
90
- colorButtonPrimaryHover?: string;
91
- colorButtonPrimaryHoverLabel?: string;
92
- }
93
- type SelectionMode = "SingleSelect" | "SingleSelectFile" | "MultiSelect";
94
- interface Props$0 {
91
+ declare function AssetCard({ className, fadeIn, asset, isSelected, isOutlined, onClick, children, }: Props$a): React.JSX.Element;
92
+
93
+ interface Props$9 {
95
94
  assets: AssetData;
96
95
  count?: number;
97
96
  hasNextPage?: boolean;
@@ -105,26 +104,29 @@ interface Props$0 {
105
104
  theme?: Theme;
106
105
  children?: React.ReactNode;
107
106
  }
108
- declare function AssetList({ assets, count, hasNextPage, isLoading, loadMore, onSelect, onToggle, emptyStateElement, selectedAssetIds, selectionMode, theme, children }: Props$0): React.JSX.Element;
109
- interface Props$1 {
107
+ declare function AssetList({ assets, count, hasNextPage, isLoading, loadMore, onSelect, onToggle, emptyStateElement, selectedAssetIds, selectionMode, theme, children, }: Props$9): React.JSX.Element;
108
+
109
+ interface Props$8 {
110
110
  className?: string;
111
111
  onClick?: () => void;
112
112
  children: React.ReactNode;
113
- ["data-testid"]?: string;
113
+ ['data-testid']?: string;
114
114
  }
115
- declare function Chip(props: Props$1): React.JSX.Element;
116
- interface Props$2 {
115
+ declare function Chip(props: Props$8): React.JSX.Element;
116
+
117
+ interface Props$7 {
117
118
  className?: string;
118
119
  fadeIn?: boolean;
119
- buttonKind?: "clean" | "secondary";
120
+ buttonKind?: 'clean' | 'secondary';
120
121
  isSmall?: boolean;
121
- direction?: "Down" | "Up";
122
+ direction?: 'Down' | 'Up';
122
123
  title: React.ReactNode;
123
124
  alt?: string;
124
125
  disabled?: boolean;
125
126
  children: (toggle: () => void) => React.ReactNode;
126
127
  }
127
- declare function Dropdown({ buttonKind, direction, isSmall, fadeIn, ...props }: Props$2): React.JSX.Element;
128
+ declare function Dropdown({ buttonKind, direction, isSmall, fadeIn, ...props }: Props$7): React.JSX.Element;
129
+
128
130
  interface ListItemProps {
129
131
  className?: string;
130
132
  onClick?: () => void;
@@ -132,8 +134,9 @@ interface ListItemProps {
132
134
  children: React.ReactNode;
133
135
  }
134
136
  declare function DropdownListItem({ selected, ...props }: ListItemProps): React.JSX.Element;
137
+
135
138
  interface SmartfilterType {
136
- __typename: "Smartfilter";
139
+ __typename: 'Smartfilter';
137
140
  id: string;
138
141
  label: string;
139
142
  metaproperties: MetapropertyType[];
@@ -148,36 +151,42 @@ interface SmartfilterProps {
148
151
  onRemoveOption: (metapropertyOption: MetapropertyOptionType) => void;
149
152
  }
150
153
  declare function SmartFilterContent(props: SmartfilterProps): React.JSX.Element;
151
- interface Props$3 {
154
+
155
+ interface Props$6 {
152
156
  static?: React.ReactNode;
153
157
  className: string;
154
158
  children: React.ReactNode;
155
159
  }
156
- declare function HorizontalScroll(props: Props$3): React.JSX.Element;
157
- interface Props$4 {
160
+ declare function HorizontalScroll(props: Props$6): React.JSX.Element;
161
+
162
+ interface Props$5 {
158
163
  isLoading: boolean;
159
164
  hasNextPage: boolean;
160
165
  loadMore: () => void;
161
166
  children: React.ReactNode;
162
167
  }
163
- declare function InfiniteScroll(props: Props$4): React.JSX.Element;
164
- interface Props$5 {
168
+ declare function InfiniteScroll(props: Props$5): React.JSX.Element;
169
+
170
+ interface Props$4 {
165
171
  children: React.ReactNode;
166
172
  isOpen?: boolean;
167
173
  style?: React.CSSProperties;
168
174
  onClose?: () => void;
169
175
  }
170
- declare function Modal({ children, isOpen, style, onClose }: Props$5): React.JSX.Element | null;
171
- interface Props$6 {
176
+ declare function Modal({ children, isOpen, style, onClose, }: Props$4): React.JSX.Element | null;
177
+
178
+ interface Props$3 {
172
179
  onReset: () => void;
173
180
  }
174
- declare function NoResults(props: Props$6): React.JSX.Element;
175
- interface Props$7 {
181
+ declare function NoResults(props: Props$3): React.JSX.Element;
182
+
183
+ interface Props$2 {
176
184
  error: Error;
177
185
  onRetry: () => void;
178
186
  sentryClient?: BrowserClient;
179
187
  }
180
- declare function Oops({ error, onRetry, sentryClient }: Props$7): React.JSX.Element;
188
+ declare function Oops({ error, onRetry, sentryClient }: Props$2): React.JSX.Element;
189
+
181
190
  interface ShadowRootProps {
182
191
  children: React.ReactNode;
183
192
  isContainerMode?: boolean;
@@ -189,14 +198,16 @@ interface ShadowRootProps {
189
198
  * externally from the npm package.
190
199
  */
191
200
  declare function ShadowRoot({ children, isContainerMode }: ShadowRootProps): React.JSX.Element;
192
- interface Props$8 {
201
+
202
+ interface Props$1 {
193
203
  width?: number;
194
204
  className?: string;
195
205
  }
196
- declare function Skeleton({ width, className }: Props$8): React.JSX.Element;
197
- interface Props$9 {
206
+ declare function Skeleton({ width, className }: Props$1): React.JSX.Element;
207
+
208
+ interface Props {
198
209
  className?: string;
199
210
  }
200
- declare function Spinner(props: Props$9): React.JSX.Element;
201
- 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 };
202
- export { Button, Card, Checkbox } from '@bynder/design-system';
211
+ declare function Spinner(props: Props): React.JSX.Element;
212
+
213
+ export { AssetCard as Asset, AssetList, Chip, Dropdown, DropdownListItem, HorizontalScroll, InfiniteScroll, MetaPropertyFilterContent as Metaproperty, MetapropertyOptionComponent as MetapropertyOption, Modal, NoResults, Oops, ShadowRoot, Skeleton, SmartFilterContent as Smartfilter, Spinner, type Asset as displayAsset, type MetapropertyType as metaproperty, type MetapropertyOptionType as metapropertyOption, type SmartfilterType as smartfilter };