@elliemae/ds-notification-badge 2.3.0-alpha.9 → 2.3.0-next.3
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/cjs/NotificationBadge.js +76 -0
- package/cjs/index.js +11 -0
- package/cjs/react-desc-prop-types.js +40 -0
- package/cjs/style.js +100 -0
- package/esm/NotificationBadge.js +66 -0
- package/esm/index.js +1 -0
- package/esm/react-desc-prop-types.js +31 -0
- package/esm/style.js +89 -0
- package/package.json +23 -25
- package/types/NotificationBadge.d.ts +5 -0
- package/{dist/types → types}/index.d.ts +0 -0
- package/types/react-desc-prop-types.d.ts +382 -0
- package/types/style.d.ts +19 -0
- package/dist/cjs/NotificationBadge.js +0 -82
- package/dist/cjs/NotificationBadge.js.map +0 -7
- package/dist/cjs/index.d.js +0 -27
- package/dist/cjs/index.d.js.map +0 -7
- package/dist/cjs/index.js +0 -36
- package/dist/cjs/index.js.map +0 -7
- package/dist/cjs/prop-types.js +0 -50
- package/dist/cjs/prop-types.js.map +0 -7
- package/dist/cjs/style.js +0 -81
- package/dist/cjs/style.js.map +0 -7
- package/dist/esm/NotificationBadge.js +0 -53
- package/dist/esm/NotificationBadge.js.map +0 -7
- package/dist/esm/index.d.js +0 -2
- package/dist/esm/index.d.js.map +0 -7
- package/dist/esm/index.js +0 -7
- package/dist/esm/index.js.map +0 -7
- package/dist/esm/prop-types.js +0 -21
- package/dist/esm/prop-types.js.map +0 -7
- package/dist/esm/style.js +0 -52
- package/dist/esm/style.js.map +0 -7
- package/dist/types/NotificationBadge.d.ts +0 -56
- package/dist/types/index.d.d.ts +0 -9
- package/dist/types/prop-types.d.ts +0 -45
- package/dist/types/style.d.ts +0 -4
|
@@ -0,0 +1,382 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare namespace DSNotificationBadgeT {
|
|
3
|
+
interface ComponentT {
|
|
4
|
+
innerRef: React.RefObject<HTMLSpanElement>;
|
|
5
|
+
}
|
|
6
|
+
interface Props {
|
|
7
|
+
[property: string]: unknown;
|
|
8
|
+
type?: string;
|
|
9
|
+
value?: number;
|
|
10
|
+
size?: string;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
position?: string;
|
|
13
|
+
Component?: (propsT: ComponentT) => JSX.Element;
|
|
14
|
+
color?: string;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
export declare const defaultProps: DSNotificationBadgeT.Props;
|
|
18
|
+
export declare const NotificationBadgePropTypes: {
|
|
19
|
+
type: import("@elliemae/ds-props-helpers/types/propTypes/types").ReactDescT;
|
|
20
|
+
value: import("@elliemae/ds-props-helpers/types/propTypes/types").ReactDescT;
|
|
21
|
+
size: import("@elliemae/ds-props-helpers/types/propTypes/types").ReactDescT;
|
|
22
|
+
disabled: import("@elliemae/ds-props-helpers/types/propTypes/types").ReactDescT;
|
|
23
|
+
position: import("@elliemae/ds-props-helpers/types/propTypes/types").ReactDescT;
|
|
24
|
+
Component: import("@elliemae/ds-props-helpers/types/propTypes/types").ReactDescT;
|
|
25
|
+
color: import("@elliemae/ds-props-helpers/types/propTypes/types").ReactDescT;
|
|
26
|
+
'aria-*': any;
|
|
27
|
+
'on-*': any;
|
|
28
|
+
'data-*': any;
|
|
29
|
+
'all HTML attributes': any;
|
|
30
|
+
about: any;
|
|
31
|
+
accept: any;
|
|
32
|
+
acceptCharset: any;
|
|
33
|
+
accessKey: any;
|
|
34
|
+
action: any;
|
|
35
|
+
allowFullScreen: any;
|
|
36
|
+
allowTransparency: any;
|
|
37
|
+
alt: any;
|
|
38
|
+
'aria-activedescendant': any;
|
|
39
|
+
'aria-atomic': any;
|
|
40
|
+
'aria-autocomplete': any;
|
|
41
|
+
'aria-busy': any;
|
|
42
|
+
'aria-checked': any;
|
|
43
|
+
'aria-colcount': any;
|
|
44
|
+
'aria-colindex': any;
|
|
45
|
+
'aria-colspan': any;
|
|
46
|
+
'aria-controls': any;
|
|
47
|
+
'aria-current': any;
|
|
48
|
+
'aria-describedby': any;
|
|
49
|
+
'aria-details': any;
|
|
50
|
+
'aria-disabled': any;
|
|
51
|
+
'aria-dropeffect': any;
|
|
52
|
+
'aria-errormessage': any;
|
|
53
|
+
'aria-expanded': any;
|
|
54
|
+
'aria-flowto': any;
|
|
55
|
+
'aria-grabbed': any;
|
|
56
|
+
'aria-haspopup': any;
|
|
57
|
+
'aria-hidden': any;
|
|
58
|
+
'aria-invalid': any;
|
|
59
|
+
'aria-keyshortcuts': any;
|
|
60
|
+
'aria-label': any;
|
|
61
|
+
'aria-labelledby': any;
|
|
62
|
+
'aria-level': any;
|
|
63
|
+
'aria-live': any;
|
|
64
|
+
'aria-modal': any;
|
|
65
|
+
'aria-multiline': any;
|
|
66
|
+
'aria-multiselectable': any;
|
|
67
|
+
'aria-orientation': any;
|
|
68
|
+
'aria-owns': any;
|
|
69
|
+
'aria-placeholder': any;
|
|
70
|
+
'aria-posinset': any;
|
|
71
|
+
'aria-pressed': any;
|
|
72
|
+
'aria-readonly': any;
|
|
73
|
+
'aria-relevant': any;
|
|
74
|
+
'aria-required': any;
|
|
75
|
+
'aria-roledescription': any;
|
|
76
|
+
'aria-rowcount': any;
|
|
77
|
+
'aria-rowindex': any;
|
|
78
|
+
'aria-rowspan': any;
|
|
79
|
+
'aria-selected': any;
|
|
80
|
+
'aria-setsize': any;
|
|
81
|
+
'aria-sort': any;
|
|
82
|
+
'aria-valuemax': any;
|
|
83
|
+
'aria-valuemin': any;
|
|
84
|
+
'aria-valuenow': any;
|
|
85
|
+
'aria-valuetext': any;
|
|
86
|
+
as: any;
|
|
87
|
+
async: any;
|
|
88
|
+
autoCapitalize: any;
|
|
89
|
+
autoComplete: any;
|
|
90
|
+
autoCorrect: any;
|
|
91
|
+
autoFocus: any;
|
|
92
|
+
autoPlay: any;
|
|
93
|
+
autoSave: any;
|
|
94
|
+
capture: any;
|
|
95
|
+
cellPadding: any;
|
|
96
|
+
cellSpacing: any;
|
|
97
|
+
challenge: any;
|
|
98
|
+
charSet: any;
|
|
99
|
+
checked: any;
|
|
100
|
+
cite: any;
|
|
101
|
+
classID: any;
|
|
102
|
+
className: any;
|
|
103
|
+
cols: any;
|
|
104
|
+
colSpan: any;
|
|
105
|
+
content: any;
|
|
106
|
+
contentEditable: any;
|
|
107
|
+
contextMenu: any;
|
|
108
|
+
controls: any;
|
|
109
|
+
coords: any;
|
|
110
|
+
crossOrigin: any;
|
|
111
|
+
data: any;
|
|
112
|
+
datatype: any;
|
|
113
|
+
dateTime: any;
|
|
114
|
+
default: any;
|
|
115
|
+
defaultChecked: any;
|
|
116
|
+
defaultValue: any;
|
|
117
|
+
defer: any;
|
|
118
|
+
dir: any;
|
|
119
|
+
download: any;
|
|
120
|
+
draggable: any;
|
|
121
|
+
encType: any;
|
|
122
|
+
form: any;
|
|
123
|
+
formAction: any;
|
|
124
|
+
formEncType: any;
|
|
125
|
+
formMethod: any;
|
|
126
|
+
formNoValidate: any;
|
|
127
|
+
formTarget: any;
|
|
128
|
+
frameBorder: any;
|
|
129
|
+
headers: any;
|
|
130
|
+
height: any;
|
|
131
|
+
hidden: any;
|
|
132
|
+
high: any;
|
|
133
|
+
href: any;
|
|
134
|
+
hrefLang: any;
|
|
135
|
+
htmlFor: any;
|
|
136
|
+
httpEquiv: any;
|
|
137
|
+
id: any;
|
|
138
|
+
inlist: any;
|
|
139
|
+
inputMode: any;
|
|
140
|
+
integrity: any;
|
|
141
|
+
is: any;
|
|
142
|
+
itemID: any;
|
|
143
|
+
itemProp: any;
|
|
144
|
+
itemRef: any;
|
|
145
|
+
itemScope: any;
|
|
146
|
+
itemType: any;
|
|
147
|
+
keyParams: any;
|
|
148
|
+
keyType: any;
|
|
149
|
+
kind: any;
|
|
150
|
+
label: any;
|
|
151
|
+
lang: any;
|
|
152
|
+
list: any;
|
|
153
|
+
loop: any;
|
|
154
|
+
low: any;
|
|
155
|
+
manifest: any;
|
|
156
|
+
marginHeight: any;
|
|
157
|
+
marginWidth: any;
|
|
158
|
+
max: any;
|
|
159
|
+
maxLength: any;
|
|
160
|
+
media: any;
|
|
161
|
+
mediaGroup: any;
|
|
162
|
+
method: any;
|
|
163
|
+
min: any;
|
|
164
|
+
minLength: any;
|
|
165
|
+
multiple: any;
|
|
166
|
+
muted: any;
|
|
167
|
+
name: any;
|
|
168
|
+
nonce: any;
|
|
169
|
+
noValidate: any;
|
|
170
|
+
onAbort: any;
|
|
171
|
+
onAbortCapture: any;
|
|
172
|
+
onAnimationEnd: any;
|
|
173
|
+
onAnimationEndCapture: any;
|
|
174
|
+
onAnimationIteration: any;
|
|
175
|
+
onAnimationIterationCapture: any;
|
|
176
|
+
onAnimationStart: any;
|
|
177
|
+
onAnimationStartCapture: any;
|
|
178
|
+
onAuxClick: any;
|
|
179
|
+
onAuxClickCapture: any;
|
|
180
|
+
onBeforeInput: any;
|
|
181
|
+
onBeforeInputCapture: any;
|
|
182
|
+
onBlur: any;
|
|
183
|
+
onBlurCapture: any;
|
|
184
|
+
onCanPlay: any;
|
|
185
|
+
onCanPlayCapture: any;
|
|
186
|
+
onCanPlayThrough: any;
|
|
187
|
+
onCanPlayThroughCapture: any;
|
|
188
|
+
onChange: any;
|
|
189
|
+
onChangeCapture: any;
|
|
190
|
+
onClick: any;
|
|
191
|
+
onClickCapture: any;
|
|
192
|
+
onCompositionEnd: any;
|
|
193
|
+
onCompositionEndCapture: any;
|
|
194
|
+
onCompositionStart: any;
|
|
195
|
+
onCompositionStartCapture: any;
|
|
196
|
+
onCompositionUpdate: any;
|
|
197
|
+
onCompositionUpdateCapture: any;
|
|
198
|
+
onContextMenu: any;
|
|
199
|
+
onContextMenuCapture: any;
|
|
200
|
+
onCopy: any;
|
|
201
|
+
onCopyCapture: any;
|
|
202
|
+
onCut: any;
|
|
203
|
+
onCutCapture: any;
|
|
204
|
+
onDoubleClick: any;
|
|
205
|
+
onDoubleClickCapture: any;
|
|
206
|
+
onDrag: any;
|
|
207
|
+
onDragCapture: any;
|
|
208
|
+
onDragEnd: any;
|
|
209
|
+
onDragEndCapture: any;
|
|
210
|
+
onDragEnter: any;
|
|
211
|
+
onDragEnterCapture: any;
|
|
212
|
+
onDragExit: any;
|
|
213
|
+
onDragExitCapture: any;
|
|
214
|
+
onDragLeave: any;
|
|
215
|
+
onDragLeaveCapture: any;
|
|
216
|
+
onDragOver: any;
|
|
217
|
+
onDragOverCapture: any;
|
|
218
|
+
onDragStart: any;
|
|
219
|
+
onDragStartCapture: any;
|
|
220
|
+
onDrop: any;
|
|
221
|
+
onDropCapture: any;
|
|
222
|
+
onDurationChange: any;
|
|
223
|
+
onDurationChangeCapture: any;
|
|
224
|
+
onEmptied: any;
|
|
225
|
+
onEmptiedCapture: any;
|
|
226
|
+
onEncrypted: any;
|
|
227
|
+
onEncryptedCapture: any;
|
|
228
|
+
onEnded: any;
|
|
229
|
+
onEndedCapture: any;
|
|
230
|
+
onError: any;
|
|
231
|
+
onErrorCapture: any;
|
|
232
|
+
onFocus: any;
|
|
233
|
+
onFocusCapture: any;
|
|
234
|
+
onGotPointerCapture: any;
|
|
235
|
+
onGotPointerCaptureCapture: any;
|
|
236
|
+
onInput: any;
|
|
237
|
+
onInputCapture: any;
|
|
238
|
+
onInvalid: any;
|
|
239
|
+
onInvalidCapture: any;
|
|
240
|
+
onKeyDown: any;
|
|
241
|
+
onKeyDownCapture: any;
|
|
242
|
+
onKeyPress: any;
|
|
243
|
+
onKeyPressCapture: any;
|
|
244
|
+
onKeyUp: any;
|
|
245
|
+
onKeyUpCapture: any;
|
|
246
|
+
onLoad: any;
|
|
247
|
+
onLoadCapture: any;
|
|
248
|
+
onLoadedData: any;
|
|
249
|
+
onLoadedDataCapture: any;
|
|
250
|
+
onLoadedMetadata: any;
|
|
251
|
+
onLoadedMetadataCapture: any;
|
|
252
|
+
onLoadStart: any;
|
|
253
|
+
onLoadStartCapture: any;
|
|
254
|
+
onLostPointerCapture: any;
|
|
255
|
+
onLostPointerCaptureCapture: any;
|
|
256
|
+
onMouseDown: any;
|
|
257
|
+
onMouseDownCapture: any;
|
|
258
|
+
onMouseEnter: any;
|
|
259
|
+
onMouseLeave: any;
|
|
260
|
+
onMouseMove: any;
|
|
261
|
+
onMouseMoveCapture: any;
|
|
262
|
+
onMouseOut: any;
|
|
263
|
+
onMouseOutCapture: any;
|
|
264
|
+
onMouseOver: any;
|
|
265
|
+
onMouseOverCapture: any;
|
|
266
|
+
onMouseUp: any;
|
|
267
|
+
onMouseUpCapture: any;
|
|
268
|
+
onPaste: any;
|
|
269
|
+
onPasteCapture: any;
|
|
270
|
+
onPause: any;
|
|
271
|
+
onPauseCapture: any;
|
|
272
|
+
onPlay: any;
|
|
273
|
+
onPlayCapture: any;
|
|
274
|
+
onPlaying: any;
|
|
275
|
+
onPlayingCapture: any;
|
|
276
|
+
onPointerCancel: any;
|
|
277
|
+
onPointerCancelCapture: any;
|
|
278
|
+
onPointerDown: any;
|
|
279
|
+
onPointerDownCapture: any;
|
|
280
|
+
onPointerEnter: any;
|
|
281
|
+
onPointerEnterCapture: any;
|
|
282
|
+
onPointerLeave: any;
|
|
283
|
+
onPointerLeaveCapture: any;
|
|
284
|
+
onPointerMove: any;
|
|
285
|
+
onPointerMoveCapture: any;
|
|
286
|
+
onPointerOut: any;
|
|
287
|
+
onPointerOutCapture: any;
|
|
288
|
+
onPointerOver: any;
|
|
289
|
+
onPointerOverCapture: any;
|
|
290
|
+
onPointerUp: any;
|
|
291
|
+
onPointerUpCapture: any;
|
|
292
|
+
onProgress: any;
|
|
293
|
+
onProgressCapture: any;
|
|
294
|
+
onRateChange: any;
|
|
295
|
+
onRateChangeCapture: any;
|
|
296
|
+
onReset: any;
|
|
297
|
+
onResetCapture: any;
|
|
298
|
+
onScroll: any;
|
|
299
|
+
onScrollCapture: any;
|
|
300
|
+
onSeeked: any;
|
|
301
|
+
onSeekedCapture: any;
|
|
302
|
+
onSeeking: any;
|
|
303
|
+
onSeekingCapture: any;
|
|
304
|
+
onSelect: any;
|
|
305
|
+
onSelectCapture: any;
|
|
306
|
+
onStalled: any;
|
|
307
|
+
onStalledCapture: any;
|
|
308
|
+
onSubmit: any;
|
|
309
|
+
onSubmitCapture: any;
|
|
310
|
+
onSuspend: any;
|
|
311
|
+
onSuspendCapture: any;
|
|
312
|
+
onTimeUpdate: any;
|
|
313
|
+
onTimeUpdateCapture: any;
|
|
314
|
+
onTouchCancel: any;
|
|
315
|
+
onTouchCancelCapture: any;
|
|
316
|
+
onTouchEnd: any;
|
|
317
|
+
onTouchEndCapture: any;
|
|
318
|
+
onTouchMove: any;
|
|
319
|
+
onTouchMoveCapture: any;
|
|
320
|
+
onTouchStart: any;
|
|
321
|
+
onTouchStartCapture: any;
|
|
322
|
+
onTransitionEnd: any;
|
|
323
|
+
onTransitionEndCapture: any;
|
|
324
|
+
onVolumeChange: any;
|
|
325
|
+
onVolumeChangeCapture: any;
|
|
326
|
+
onWaiting: any;
|
|
327
|
+
onWaitingCapture: any;
|
|
328
|
+
onWheel: any;
|
|
329
|
+
onWheelCapture: any;
|
|
330
|
+
open: any;
|
|
331
|
+
optimum: any;
|
|
332
|
+
pattern: any;
|
|
333
|
+
placeholder: any;
|
|
334
|
+
playsInline: any;
|
|
335
|
+
poster: any;
|
|
336
|
+
prefix: any;
|
|
337
|
+
preload: any;
|
|
338
|
+
property: any;
|
|
339
|
+
radioGroup: any;
|
|
340
|
+
readOnly: any;
|
|
341
|
+
rel: any;
|
|
342
|
+
required: any;
|
|
343
|
+
resource: any;
|
|
344
|
+
results: any;
|
|
345
|
+
reversed: any;
|
|
346
|
+
role: any;
|
|
347
|
+
rows: any;
|
|
348
|
+
rowSpan: any;
|
|
349
|
+
sandbox: any;
|
|
350
|
+
scope: any;
|
|
351
|
+
scoped: any;
|
|
352
|
+
scrolling: any;
|
|
353
|
+
seamless: any;
|
|
354
|
+
security: any;
|
|
355
|
+
selected: any;
|
|
356
|
+
shape: any;
|
|
357
|
+
sizes: any;
|
|
358
|
+
slot: any;
|
|
359
|
+
span: any;
|
|
360
|
+
spellCheck: any;
|
|
361
|
+
src: any;
|
|
362
|
+
srcDoc: any;
|
|
363
|
+
srcLang: any;
|
|
364
|
+
srcSet: any;
|
|
365
|
+
start: any;
|
|
366
|
+
step: any;
|
|
367
|
+
style: any;
|
|
368
|
+
summary: any;
|
|
369
|
+
suppressContentEditableWarning: any;
|
|
370
|
+
suppressHydrationWarning: any;
|
|
371
|
+
tabIndex: any;
|
|
372
|
+
target: any;
|
|
373
|
+
title: any;
|
|
374
|
+
translate: any;
|
|
375
|
+
typeof: any;
|
|
376
|
+
unselectable: any;
|
|
377
|
+
useMap: any;
|
|
378
|
+
vocab: any;
|
|
379
|
+
width: any;
|
|
380
|
+
wmode: any;
|
|
381
|
+
wrap: any;
|
|
382
|
+
};
|
package/types/style.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { DSNotificationBadgeT } from './react-desc-prop-types';
|
|
2
|
+
interface StyledGenericBadgeT {
|
|
3
|
+
top: number;
|
|
4
|
+
left: number;
|
|
5
|
+
right: number;
|
|
6
|
+
}
|
|
7
|
+
export declare const Wrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
8
|
+
export declare const GenericBadge: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, DSNotificationBadgeT.Props & StyledGenericBadgeT, never>;
|
|
9
|
+
export declare const NumericBadge: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, DSNotificationBadgeT.Props & StyledGenericBadgeT & {
|
|
10
|
+
top: number;
|
|
11
|
+
left: number;
|
|
12
|
+
right: number;
|
|
13
|
+
size?: string | undefined;
|
|
14
|
+
disabled?: boolean | undefined;
|
|
15
|
+
value?: number | undefined;
|
|
16
|
+
color?: string | undefined;
|
|
17
|
+
}, never>;
|
|
18
|
+
export declare const DotBadge: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, DSNotificationBadgeT.Props & StyledGenericBadgeT, never>;
|
|
19
|
+
export {};
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __reExport = (target, module2, copyDefault, desc) => {
|
|
13
|
-
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(module2))
|
|
15
|
-
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
16
|
-
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return target;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (module2, isNodeMode) => {
|
|
21
|
-
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
22
|
-
};
|
|
23
|
-
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
-
return (module2, temp) => {
|
|
25
|
-
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
-
};
|
|
27
|
-
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
-
var NotificationBadge_exports = {};
|
|
29
|
-
__export(NotificationBadge_exports, {
|
|
30
|
-
NotificationBadge: () => NotificationBadge,
|
|
31
|
-
NotificationBadgeWithSchema: () => NotificationBadgeWithSchema
|
|
32
|
-
});
|
|
33
|
-
var React = __toESM(require("react"));
|
|
34
|
-
var import_react = __toESM(require("react"));
|
|
35
|
-
var import_react_desc = require("react-desc");
|
|
36
|
-
var import_prop_types = require("./prop-types");
|
|
37
|
-
var import_style = require("./style");
|
|
38
|
-
const NotificationBadge = ({
|
|
39
|
-
type,
|
|
40
|
-
value,
|
|
41
|
-
size,
|
|
42
|
-
disabled,
|
|
43
|
-
position,
|
|
44
|
-
Component
|
|
45
|
-
}) => {
|
|
46
|
-
const Badge = type === "number" ? import_style.NumericBadge : import_style.DotBadge;
|
|
47
|
-
const relatedComponentRef = (0, import_react.useRef)(null);
|
|
48
|
-
const renderBadge = relatedComponentRef?.current || !Component;
|
|
49
|
-
const [relatedComponentHeight, setRelatedComponentHeight] = (0, import_react.useState)(0);
|
|
50
|
-
const [relatedComponentWidth, setRelatedComponentWidth] = (0, import_react.useState)(0);
|
|
51
|
-
(0, import_react.useEffect)(() => {
|
|
52
|
-
const relatedComponent = relatedComponentRef?.current;
|
|
53
|
-
setRelatedComponentHeight(relatedComponent?.offsetHeight);
|
|
54
|
-
setRelatedComponentWidth(relatedComponent?.offsetWidth);
|
|
55
|
-
}, [relatedComponentRef]);
|
|
56
|
-
let top;
|
|
57
|
-
let right;
|
|
58
|
-
let left;
|
|
59
|
-
if (Component) {
|
|
60
|
-
if (position === "right")
|
|
61
|
-
left = relatedComponentWidth / 2;
|
|
62
|
-
if (position === "left")
|
|
63
|
-
right = relatedComponentWidth / 2;
|
|
64
|
-
top = relatedComponentHeight / 2;
|
|
65
|
-
}
|
|
66
|
-
return /* @__PURE__ */ import_react.default.createElement(import_style.Wrapper, null, renderBadge && /* @__PURE__ */ import_react.default.createElement(Badge, {
|
|
67
|
-
size,
|
|
68
|
-
value,
|
|
69
|
-
disabled,
|
|
70
|
-
top,
|
|
71
|
-
left,
|
|
72
|
-
right
|
|
73
|
-
}, type === "number" && value), Component && /* @__PURE__ */ import_react.default.createElement(Component, {
|
|
74
|
-
innerRef: relatedComponentRef
|
|
75
|
-
}));
|
|
76
|
-
};
|
|
77
|
-
NotificationBadge.defaultProps = import_prop_types.defaultProps;
|
|
78
|
-
NotificationBadge.propTypes = import_prop_types.notificationBadgeProps;
|
|
79
|
-
const NotificationBadgeWithSchema = (0, import_react_desc.describe)(NotificationBadge);
|
|
80
|
-
NotificationBadgeWithSchema.propTypes = import_prop_types.notificationBadgeProps;
|
|
81
|
-
module.exports = __toCommonJS(NotificationBadge_exports);
|
|
82
|
-
//# sourceMappingURL=NotificationBadge.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/NotificationBadge.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React, { useState, useEffect, useRef } from 'react';\nimport { describe } from 'react-desc';\nimport { notificationBadgeProps, defaultProps } from './prop-types';\nimport { NotificactionBadge as props } from './index.d';\nimport { Wrapper, NumericBadge, DotBadge } from './style';\n\nconst NotificationBadge = ({\n type,\n value,\n size,\n disabled,\n position,\n Component,\n}: props): JSX.Element => {\n const Badge = type === 'number' ? NumericBadge : DotBadge;\n const relatedComponentRef = useRef(null);\n const renderBadge = relatedComponentRef?.current || !Component;\n const [relatedComponentHeight, setRelatedComponentHeight] = useState(0);\n const [relatedComponentWidth, setRelatedComponentWidth] = useState(0);\n\n useEffect(() => {\n const relatedComponent = relatedComponentRef?.current;\n setRelatedComponentHeight(relatedComponent?.offsetHeight);\n setRelatedComponentWidth(relatedComponent?.offsetWidth);\n }, [relatedComponentRef]);\n\n let top;\n let right;\n let left;\n\n if (Component) {\n if (position === 'right') left = relatedComponentWidth / 2;\n if (position === 'left') right = relatedComponentWidth / 2;\n top = relatedComponentHeight / 2;\n }\n\n return (\n <Wrapper>\n {renderBadge && (\n <Badge\n size={size}\n value={value}\n disabled={disabled}\n top={top}\n left={left}\n right={right}\n >\n {type === 'number' && value}\n </Badge>\n )}\n {Component && <Component innerRef={relatedComponentRef} />}\n </Wrapper>\n );\n};\n\nNotificationBadge.defaultProps = defaultProps;\nNotificationBadge.propTypes = notificationBadgeProps;\nconst NotificationBadgeWithSchema = describe(NotificationBadge);\nNotificationBadgeWithSchema.propTypes = notificationBadgeProps;\n\nexport { NotificationBadge, NotificationBadgeWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAmD;AACnD,wBAAyB;AACzB,wBAAqD;AAErD,mBAAgD;AAEhD,MAAM,oBAAoB,CAAC;AAAA,EACzB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,MACwB;AACxB,QAAM,QAAQ,SAAS,WAAW,4BAAe;AACjD,QAAM,sBAAsB,yBAAO;AACnC,QAAM,cAAc,qBAAqB,WAAW,CAAC;AACrD,QAAM,CAAC,wBAAwB,6BAA6B,2BAAS;AACrE,QAAM,CAAC,uBAAuB,4BAA4B,2BAAS;AAEnE,8BAAU,MAAM;AACd,UAAM,mBAAmB,qBAAqB;AAC9C,8BAA0B,kBAAkB;AAC5C,6BAAyB,kBAAkB;AAAA,KAC1C,CAAC;AAEJ,MAAI;AACJ,MAAI;AACJ,MAAI;AAEJ,MAAI,WAAW;AACb,QAAI,aAAa;AAAS,aAAO,wBAAwB;AACzD,QAAI,aAAa;AAAQ,cAAQ,wBAAwB;AACzD,UAAM,yBAAyB;AAAA;AAGjC,SACE,mDAAC,sBAAD,MACG,eACC,mDAAC,OAAD;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,KAEC,SAAS,YAAY,QAGzB,aAAa,mDAAC,WAAD;AAAA,IAAW,UAAU;AAAA;AAAA;AAKzC,kBAAkB,eAAe;AACjC,kBAAkB,YAAY;AAC9B,MAAM,8BAA8B,gCAAS;AAC7C,4BAA4B,YAAY;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
package/dist/cjs/index.d.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
-
var __reExport = (target, module2, copyDefault, desc) => {
|
|
9
|
-
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
10
|
-
for (let key of __getOwnPropNames(module2))
|
|
11
|
-
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
12
|
-
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
13
|
-
}
|
|
14
|
-
return target;
|
|
15
|
-
};
|
|
16
|
-
var __toESM = (module2, isNodeMode) => {
|
|
17
|
-
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
18
|
-
};
|
|
19
|
-
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
20
|
-
return (module2, temp) => {
|
|
21
|
-
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
22
|
-
};
|
|
23
|
-
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
24
|
-
var index_d_exports = {};
|
|
25
|
-
var React = __toESM(require("react"));
|
|
26
|
-
module.exports = __toCommonJS(index_d_exports);
|
|
27
|
-
//# sourceMappingURL=index.d.js.map
|
package/dist/cjs/index.d.js.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/index.d.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["export interface NotificactionBadge {\n type?: string;\n value?: number;\n size?: string;\n disabled?: boolean;\n position?: string;\n Component?: () => JSX.Element;\n}\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA;ACAA,YAAuB;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
package/dist/cjs/index.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __reExport = (target, module2, copyDefault, desc) => {
|
|
13
|
-
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(module2))
|
|
15
|
-
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
16
|
-
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return target;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (module2, isNodeMode) => {
|
|
21
|
-
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
22
|
-
};
|
|
23
|
-
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
-
return (module2, temp) => {
|
|
25
|
-
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
-
};
|
|
27
|
-
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
-
var src_exports = {};
|
|
29
|
-
__export(src_exports, {
|
|
30
|
-
default: () => import_NotificationBadge.NotificationBadge
|
|
31
|
-
});
|
|
32
|
-
var React = __toESM(require("react"));
|
|
33
|
-
__reExport(src_exports, require("./NotificationBadge"));
|
|
34
|
-
var import_NotificationBadge = require("./NotificationBadge");
|
|
35
|
-
module.exports = __toCommonJS(src_exports);
|
|
36
|
-
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/index.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["export * from './NotificationBadge';\nexport { NotificationBadge as default } from './NotificationBadge';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAAc;AACd,+BAA6C;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
package/dist/cjs/prop-types.js
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __reExport = (target, module2, copyDefault, desc) => {
|
|
13
|
-
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(module2))
|
|
15
|
-
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
16
|
-
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return target;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (module2, isNodeMode) => {
|
|
21
|
-
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
22
|
-
};
|
|
23
|
-
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
-
return (module2, temp) => {
|
|
25
|
-
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
-
};
|
|
27
|
-
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
-
var prop_types_exports = {};
|
|
29
|
-
__export(prop_types_exports, {
|
|
30
|
-
defaultProps: () => defaultProps,
|
|
31
|
-
notificationBadgeProps: () => notificationBadgeProps
|
|
32
|
-
});
|
|
33
|
-
var React = __toESM(require("react"));
|
|
34
|
-
var import_react_desc = require("react-desc");
|
|
35
|
-
const notificationBadgeProps = {
|
|
36
|
-
type: import_react_desc.PropTypes.oneOf(["number", "dot"]).description("type of badge: number or dot"),
|
|
37
|
-
value: import_react_desc.PropTypes.number.description("value of the numeric badge"),
|
|
38
|
-
size: import_react_desc.PropTypes.oneOf(["s", "l"]).description("size of the badge: s or l"),
|
|
39
|
-
disabled: import_react_desc.PropTypes.bool.description("whether the badge is disabled"),
|
|
40
|
-
position: import_react_desc.PropTypes.oneOf(["left", "right"]).description("position of the badge with the related component"),
|
|
41
|
-
Component: import_react_desc.PropTypes.func.description("Related component")
|
|
42
|
-
};
|
|
43
|
-
const defaultProps = {
|
|
44
|
-
type: "number",
|
|
45
|
-
size: "s",
|
|
46
|
-
disabled: false,
|
|
47
|
-
position: "right"
|
|
48
|
-
};
|
|
49
|
-
module.exports = __toCommonJS(prop_types_exports);
|
|
50
|
-
//# sourceMappingURL=prop-types.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/prop-types.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import { PropTypes } from 'react-desc';\n\nexport const notificationBadgeProps = {\n type: PropTypes.oneOf(['number', 'dot']).description(\n 'type of badge: number or dot',\n ),\n value: PropTypes.number.description('value of the numeric badge'),\n size: PropTypes.oneOf(['s', 'l']).description('size of the badge: s or l'),\n disabled: PropTypes.bool.description('whether the badge is disabled'),\n position: PropTypes.oneOf(['left', 'right']).description(\n 'position of the badge with the related component',\n ),\n Component: PropTypes.func.description('Related component'),\n};\n\nexport const defaultProps = {\n type: 'number',\n size: 's',\n disabled: false,\n position: 'right',\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAA0B;AAEnB,MAAM,yBAAyB;AAAA,EACpC,MAAM,4BAAU,MAAM,CAAC,UAAU,QAAQ,YACvC;AAAA,EAEF,OAAO,4BAAU,OAAO,YAAY;AAAA,EACpC,MAAM,4BAAU,MAAM,CAAC,KAAK,MAAM,YAAY;AAAA,EAC9C,UAAU,4BAAU,KAAK,YAAY;AAAA,EACrC,UAAU,4BAAU,MAAM,CAAC,QAAQ,UAAU,YAC3C;AAAA,EAEF,WAAW,4BAAU,KAAK,YAAY;AAAA;AAGjC,MAAM,eAAe;AAAA,EAC1B,MAAM;AAAA,EACN,MAAM;AAAA,EACN,UAAU;AAAA,EACV,UAAU;AAAA;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|