@soul-refiner/design-system 0.0.1 → 0.0.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/dist/index.d.ts DELETED
@@ -1,800 +0,0 @@
1
- import React, { CSSProperties, ReactNode } from 'react';
2
- import { User, Course } from '@soul-refiner/models';
3
- import { ComponentProps } from '@abide/utils/src';
4
-
5
- interface ButtonProps extends React.PropsWithChildren, Omit<React.HTMLProps<HTMLButtonElement | HTMLAnchorElement>, "type" | "size" | "as"> {
6
- as?: React.ElementType;
7
- bold?: boolean;
8
- buttonType?: "primary" | "secondary" | "tertiary" | "quarternary";
9
- buttonColor?: string;
10
- className?: string;
11
- dropdownOpen?: boolean;
12
- icon?: React.ReactElement;
13
- iconPosition?: "left" | "right";
14
- inverted?: boolean;
15
- focus?: boolean;
16
- fluid?: boolean;
17
- loading?: boolean;
18
- padded?: boolean;
19
- shape?: "rectangular" | "rounded";
20
- size?: "default" | "small" | "large" | number;
21
- styles?: React.CSSProperties;
22
- color?: string;
23
- uppercase?: boolean;
24
- }
25
- declare const Button: ({ as: Tag, bold, buttonType, buttonColor, children, className, color, disabled, dropdownOpen, focus, icon, iconPosition, inverted, href, fluid, loading, padded, shape, size, style, uppercase, ...rest }: ButtonProps) => JSX.Element;
26
-
27
- interface DropdownProps extends Partial<Omit<HTMLSelectElement, "options" | "style" | "children">>, React.PropsWithChildren {
28
- className?: string;
29
- closeOnChange?: boolean;
30
- closeOnBlur?: boolean;
31
- defaultValue?: string;
32
- disabled?: boolean;
33
- maintainState?: boolean;
34
- offset?: [number, number];
35
- onChange?: (event: React.MouseEvent, value: string) => void;
36
- open?: "right" | "left";
37
- options?: React.ReactNode[] | Omit<DropdownOptionProps, "selected">[];
38
- style?: React.CSSProperties;
39
- trigger: React.ReactElement;
40
- }
41
- declare const Dropdown: {
42
- ({ className, children, closeOnChange, closeOnBlur, defaultValue, disabled, maintainState, offset, onChange, open: openDirection, options, style, trigger, }: DropdownProps): JSX.Element;
43
- Option: {
44
- ({ checkbox, color, disabled, icon, label, onClick, selected, style, value, }: DropdownOptionProps): JSX.Element;
45
- displayName: string;
46
- };
47
- Spacer: {
48
- ({ style }: DropdownSpacerProps): JSX.Element;
49
- displayName: string;
50
- };
51
- };
52
- interface DropdownOptionProps extends Partial<Omit<HTMLOptionElement, "className" | "style" | "selected">> {
53
- checkbox?: boolean;
54
- color?: string;
55
- icon?: React.ReactNode;
56
- onClick: (event: React.MouseEvent) => void;
57
- selected?: boolean;
58
- style?: React.CSSProperties;
59
- }
60
- interface DropdownSpacerProps {
61
- style?: React.CSSProperties;
62
- }
63
-
64
- interface DropzoneProps extends React.PropsWithChildren {
65
- color?: "pink" | "purple" | "ocean" | "mint" | "blue" | "orange";
66
- id?: string;
67
- fileType?: "video" | "audio" | "image" | "document";
68
- multiple?: boolean;
69
- showGraphic?: boolean;
70
- subtext?: string;
71
- text?: React.ReactNode;
72
- fluid?: boolean;
73
- style?: CSSProperties;
74
- onDrop?: (files: FileList) => void;
75
- ref?: React.RefObject<HTMLInputElement>;
76
- showBrowse?: boolean;
77
- }
78
- declare const Dropzone: ({ children, id, color, fileType, multiple, showGraphic, subtext, text, style, onDrop, showBrowse, ...rest }: DropzoneProps) => JSX.Element;
79
-
80
- interface RateProps {
81
- ownRating?: number;
82
- label?: string;
83
- direction?: "vertical" | "horizontal";
84
- onClickRating: (rating: number) => void;
85
- }
86
- declare const Rate: ({ ownRating, label, direction, onClickRating, }: RateProps) => JSX.Element;
87
-
88
- interface SwitchProps {
89
- optionA: string;
90
- optionB: string;
91
- active: 0 | 1;
92
- fluid?: boolean;
93
- }
94
- declare const Switch: ({ optionA, optionB, active, fluid, }: SwitchProps) => JSX.Element;
95
-
96
- interface CourseCardProps {
97
- description: string;
98
- episodes: number;
99
- favorited: boolean;
100
- href: string;
101
- onAddToCollection: () => void;
102
- onFavorite: () => void;
103
- owner: Partial<User>;
104
- plans: Partial<{
105
- price: number;
106
- type: "rent" | "buy";
107
- }[]>;
108
- ratings: number[];
109
- type: "video" | "audio" | "written";
110
- showAuthor: boolean;
111
- style: React.CSSProperties;
112
- thumbnail: string;
113
- title: string;
114
- }
115
- declare const CourseCard: ({ description, episodes, favorited, href, onAddToCollection, onFavorite, owner, plans, ratings, type, showAuthor, style, thumbnail, title, }: CourseCardProps) => JSX.Element;
116
-
117
- interface EpisodeCardProps {
118
- description: string;
119
- index: number;
120
- /**
121
- * The length of the episode in seconds
122
- */
123
- length: number;
124
- /**
125
- * Enter the progress in seconds watched
126
- * A falsy value does not render the progress bar
127
- */
128
- progress: number;
129
- thumbnail: string;
130
- title: string;
131
- type: "audio" | "video";
132
- }
133
- declare const EpisodeCard: ({ description, index, length, progress, thumbnail, title, type, }: EpisodeCardProps) => JSX.Element;
134
-
135
- interface FeatureCardProps {
136
- onPhotoChange: () => void;
137
- onSubmit: (args: {
138
- thumbnail: string;
139
- title: string;
140
- subtitle: string;
141
- }) => void;
142
- subtitle: string;
143
- thumbnail: string;
144
- title: string;
145
- }
146
- declare const FeatureCard: ({ onPhotoChange, onSubmit, subtitle, thumbnail, title, }: FeatureCardProps) => JSX.Element;
147
-
148
- interface AvatarProps extends React.PropsWithChildren, Omit<React.HTMLProps<HTMLButtonElement | HTMLAnchorElement>, "as" | "title"> {
149
- as?: React.ElementType;
150
- size: 128 | 96 | 64 | 40 | 36 | 32 | 24;
151
- url: string;
152
- title?: string | React.ReactNode;
153
- textPosition?: "left" | "right";
154
- subtitle?: string | React.ReactNode;
155
- presence?: "online" | "busy" | "focus" | "offline";
156
- status?: "approved" | "declined" | "locked";
157
- }
158
- declare const Avatar: ({ as: Tag, size, url, title, subtitle, presence, status, textPosition, ...rest }: AvatarProps) => JSX.Element;
159
-
160
- declare enum Colors {
161
- orange = 0,
162
- purple = 1,
163
- pink = 2,
164
- mint = 3,
165
- blue = 4,
166
- ocean = 5
167
- }
168
- interface ColoredIconProps extends React.PropsWithChildren {
169
- onClick: () => void;
170
- color: Colors;
171
- }
172
- declare const ColoredIcon: ({ color, onClick, children, }: ColoredIconProps) => JSX.Element;
173
-
174
- interface DevicePreviewProps extends Omit<React.DetailedHTMLProps<React.IframeHTMLAttributes<HTMLIFrameElement>, HTMLIFrameElement>, "width" | "height"> {
175
- width: string;
176
- height: string;
177
- statusbar?: boolean;
178
- statusbarTheme?: "light" | "dark";
179
- type?: "phone" | "laptop";
180
- urlbar?: boolean;
181
- }
182
- declare const DevicePreview: ({ width, height, src, statusbar, statusbarTheme, title, type, urlbar, ...rest }: DevicePreviewProps) => JSX.Element;
183
-
184
- interface IconProps extends React.PropsWithChildren, Omit<React.SVGProps<SVGSVGElement>, "width" | "height" | "viewbox" | "onClick"> {
185
- as?: React.ElementType;
186
- className?: string;
187
- dropdownOpen?: boolean;
188
- fill?: string;
189
- iconSize?: number;
190
- iconColor?: string;
191
- inline?: boolean;
192
- onClick?: (event: React.MouseEvent) => void;
193
- size?: number;
194
- style?: React.CSSProperties;
195
- viewbox: string;
196
- }
197
- declare const Icon: ({ as: Tag, children, className, dropdownOpen, iconSize, iconColor, inline, fill, onClick, size, style, viewbox, ...rest }: IconProps) => JSX.Element;
198
-
199
- interface IconHeaderProps {
200
- color: "turquoise" | "green" | "blue" | "purple" | "orange" | "red" | "grey";
201
- icon: React.ReactNode;
202
- title?: string;
203
- subtitle?: string;
204
- as?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
205
- }
206
- declare const IconHeader: ({ color, icon, title, subtitle, as, }: IconHeaderProps) => JSX.Element;
207
-
208
- interface StarRatingProps {
209
- rating: number;
210
- width: number;
211
- outlines?: boolean;
212
- gradient?: boolean;
213
- }
214
- declare const StarRating: ({ rating, width, outlines, gradient, }: StarRatingProps) => JSX.Element;
215
-
216
- declare type Data$2 = {
217
- name: string;
218
- count: number;
219
- };
220
- declare type DataSet$1 = {
221
- groupName?: string;
222
- data: Required<Data$2>[];
223
- };
224
- interface BarProps {
225
- dataSets: DataSet$1[];
226
- iconHeader?: IconHeaderProps;
227
- /**
228
- * Height of the bar graph in pixels, not the height of the overall container
229
- * @note Only supports px or %
230
- */
231
- height?: string;
232
- /**
233
- * Width of the bar graph, not the width of the overall container
234
- * @note Only supports px or %
235
- */
236
- width?: string;
237
- }
238
- declare const Bar: ({ dataSets, iconHeader, height, width, }: BarProps) => JSX.Element;
239
-
240
- declare type Data$1 = {
241
- name: string;
242
- value: number;
243
- };
244
- declare type DataSet = {
245
- groupName?: string;
246
- data: Required<Data$1>[];
247
- };
248
- interface LineProps {
249
- width?: string;
250
- height?: string;
251
- iconHeader: IconHeaderProps;
252
- dataSets: DataSet[];
253
- }
254
- declare const Line: ({ height, width, iconHeader, dataSets, }: LineProps) => JSX.Element;
255
-
256
- declare type Data = {
257
- label: string;
258
- amount: number;
259
- color?: string;
260
- };
261
- interface PieProps {
262
- data: Data[];
263
- iconHeader?: IconHeaderProps;
264
- header?: React.ReactNode;
265
- }
266
- declare const Pie: ({ data, iconHeader, header }: PieProps) => JSX.Element;
267
-
268
- /**********************************************************************
269
- * Types
270
- */
271
- interface EditorProps extends Course {
272
- editable: boolean;
273
- pageName: string;
274
- }
275
- /**********************************************************************
276
- * Function
277
- */
278
- declare const Editor: ({ id, created, modified, title, subtitle, shortDescription, description, categories, tags, plans, trailerVideo, sampleVideo, ownerId, status, thumbnail, ratings, type, outline, hasContent, pageName, editable, }: EditorProps) => JSX.Element;
279
-
280
- interface ChipProps extends React.PropsWithChildren {
281
- chipColor?: string;
282
- disabled?: boolean;
283
- shape?: "rounded" | "rectangular";
284
- style?: React.CSSProperties;
285
- type?: "success" | "pending" | "error" | "regular";
286
- }
287
- declare const Chip: ({ children, chipColor, disabled, shape, style, type, }: ChipProps) => JSX.Element;
288
-
289
- interface LoaderProps {
290
- color?: string;
291
- inline?: boolean;
292
- inverse?: boolean;
293
- size?: number;
294
- styles?: React.CSSProperties;
295
- }
296
- declare const Loader: ({ color, inline, inverse, size, styles, }: LoaderProps) => JSX.Element;
297
-
298
- interface ProgressBarProps {
299
- percent: number;
300
- color?: string;
301
- backgroundColor?: string;
302
- height?: number;
303
- }
304
- declare const ProgressBar: ({ percent, height, backgroundColor, color, }: ProgressBarProps) => JSX.Element;
305
-
306
- interface ToastProps extends React.PropsWithChildren {
307
- icon?: React.ReactNode;
308
- onDismiss: () => void;
309
- type: "success" | "error" | "pending" | "neutral";
310
- visible: boolean;
311
- }
312
- declare const Toast: ({ children, icon: customIcon, onDismiss, type, visible, }: ToastProps) => JSX.Element | null;
313
-
314
- interface TooltipProps {
315
- label: string;
316
- }
317
- declare const Tooltip: ({ label }: TooltipProps) => JSX.Element;
318
-
319
- interface JoinGroupModalProps {
320
- onSubmit: () => void;
321
- rules: {
322
- title: React.ReactNode;
323
- explanation?: React.ReactNode;
324
- }[];
325
- trigger: React.ReactElement;
326
- }
327
- declare const JoinGroupModal: ({ onSubmit, rules, trigger, }: JoinGroupModalProps) => JSX.Element;
328
-
329
- interface CalendarInputProps extends React.HTMLProps<HTMLInputElement> {
330
- icon?: boolean;
331
- }
332
- declare const CalendarInput: ({ icon, ...rest }: CalendarInputProps) => JSX.Element;
333
-
334
- interface FeedInputProps extends React.HTMLProps<HTMLTextAreaElement> {
335
- }
336
- declare const FeedInput: ({ onChange, value, ...rest }: FeedInputProps) => JSX.Element;
337
-
338
- interface InboxInputProps extends React.HTMLProps<HTMLTextAreaElement> {
339
- }
340
- declare const InboxInput: ({ onChange, onSubmit, value }: InboxInputProps) => JSX.Element;
341
-
342
- interface PostInputProps extends React.HTMLProps<HTMLTextAreaElement> {
343
- characterCount?: boolean;
344
- hasShadow?: boolean;
345
- }
346
- declare const PostInput: ({ characterCount, hasShadow, maxLength, value, ...rest }: PostInputProps) => JSX.Element;
347
-
348
- interface RadioInputProps extends Partial<Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "onChange">> {
349
- label?: string | React.ReactNode;
350
- reverse?: boolean;
351
- onChange?: (event: React.ChangeEvent, checked?: boolean) => void;
352
- }
353
- declare const RadioInput: ({ checked, label, onChange, reverse, ...rest }: RadioInputProps) => JSX.Element;
354
-
355
- interface SearchInputProps extends Omit<React.HTMLProps<HTMLInputElement>, "as"> {
356
- as?: React.ElementType;
357
- expandable: boolean;
358
- expanded?: boolean;
359
- onSubmit?: () => void;
360
- width?: number;
361
- }
362
- declare const SearchInput: ({ as, expandable, expanded, onSubmit, width, ...rest }: SearchInputProps) => JSX.Element;
363
-
364
- interface SelectInputProps {
365
- icon?: ReactNode;
366
- name: string;
367
- onSelect?: (value: string) => void;
368
- options: Array<HTMLOptionElement>;
369
- placeholder?: string;
370
- }
371
- declare const SelectInput: ({ icon, name, onSelect, options, placeholder, }: SelectInputProps) => JSX.Element;
372
-
373
- interface TagInputProps {
374
- max?: number;
375
- style?: CSSProperties;
376
- }
377
- declare const TagInput: ({ max, style }: TagInputProps) => JSX.Element;
378
-
379
- interface TextInputProps extends React.HTMLProps<HTMLTextAreaElement> {
380
- characterCount?: boolean;
381
- }
382
- declare const TextInput: ({ className, characterCount, maxLength, value, ...rest }: TextInputProps) => JSX.Element;
383
-
384
- interface ContactDetailsProps {
385
- email?: string;
386
- location?: string;
387
- url?: string;
388
- phone?: string;
389
- onSubmit: (props: {
390
- email: string;
391
- location: string;
392
- url: string;
393
- phone: string;
394
- }) => void;
395
- }
396
- declare const ContactDetails: ({ email, location, url, phone, onSubmit, }: ContactDetailsProps) => JSX.Element;
397
-
398
- interface BreadcrumbsProps {
399
- crumbs: Array<Breadcrumb>;
400
- collapse: boolean;
401
- }
402
- interface Breadcrumb {
403
- label: string;
404
- url: string;
405
- }
406
- declare const Breadcrumbs: ({ crumbs, collapse, }: BreadcrumbsProps) => JSX.Element;
407
-
408
- interface DrawerProps extends React.PropsWithChildren {
409
- activeTab?: number;
410
- background?: string;
411
- className?: string;
412
- heading?: React.ReactNode;
413
- open?: boolean;
414
- toggle?: (open: boolean) => void;
415
- }
416
- declare const Drawer: {
417
- ({ activeTab: controlledActiveTab, background, className, children, open, toggle, }: DrawerProps): JSX.Element;
418
- Heading: {
419
- ({ children, toggleDrawer, }: {
420
- children: React.ReactNode;
421
- toggleDrawer?: (() => void) | undefined;
422
- }): JSX.Element;
423
- displayName: string;
424
- };
425
- Tab: {
426
- ({ children }: DrawerTabProps): JSX.Element;
427
- displayName: string;
428
- };
429
- Item: {
430
- ({ children, header }: DrawerItemProps): JSX.Element;
431
- displayName: string;
432
- };
433
- Action: {
434
- ({ children, ...rest }: Omit<ButtonProps, "size">): JSX.Element;
435
- displayName: string;
436
- };
437
- };
438
- interface DrawerTabProps extends React.PropsWithChildren {
439
- name: string;
440
- }
441
- interface DrawerItemProps extends React.PropsWithChildren {
442
- header: IconHeaderProps;
443
- }
444
-
445
- interface EditorBarProps {
446
- buttonsMenu?: boolean;
447
- mediaMenu?: boolean;
448
- moreMenu?: boolean;
449
- notes?: boolean;
450
- }
451
- declare const EditorBar: ({ buttonsMenu, mediaMenu, moreMenu, notes, }: EditorBarProps) => JSX.Element;
452
-
453
- interface MenuTabsProps extends React.PropsWithChildren {
454
- tabItems?: Array<React.ReactNode>;
455
- activeItem?: number;
456
- onTabClick?: (tabIndex: number) => void;
457
- }
458
- declare const MenuTabs: ({ children, tabItems, activeItem, onTabClick, }: MenuTabsProps) => JSX.Element;
459
-
460
- interface NavigationProps extends React.PropsWithChildren {
461
- logoURI: string;
462
- user: Partial<User>;
463
- }
464
- declare const Navigation: {
465
- ({ children, logoURI, user }: NavigationProps): JSX.Element;
466
- Item: {
467
- ({ as, bottom, children, icon, active, style, title, ...rest }: NavigationItemProps): JSX.Element;
468
- displayName: string;
469
- };
470
- };
471
- interface NavigationItemProps extends Omit<ComponentProps, "as"> {
472
- as?: React.ElementType;
473
- bottom?: boolean;
474
- icon: React.ReactElement;
475
- active?: boolean;
476
- style?: React.CSSProperties;
477
- title?: string;
478
- }
479
-
480
- /********************************************************
481
- * Sub Navigation
482
- */
483
- interface SubNavigationProps extends React.PropsWithChildren {
484
- onSearch: (query: string) => void;
485
- onScrollEnd?: () => void;
486
- show: boolean;
487
- title: string;
488
- }
489
- declare const SubNavigation: {
490
- ({ children, onSearch, onScrollEnd, show, title, }: SubNavigationProps): JSX.Element;
491
- Item: {
492
- ({ as, active, dateCreated, dropdownOptions, dropdownElements, isMessage, onClick, subtitle, title, unread, url, }: SubNavigationItemProps): JSX.Element;
493
- displayName: string;
494
- };
495
- Button: {
496
- ({ active, children, ...rest }: SubNavigationButtonProps): JSX.Element;
497
- displayName: string;
498
- };
499
- Create: {
500
- ({ active, children, ...rest }: SubNavigationCreateProps): JSX.Element;
501
- displayName: string;
502
- };
503
- Tab: {
504
- ({ children }: SubNavigationTabProps): JSX.Element;
505
- displayName: string;
506
- };
507
- SubMenu: {
508
- ({ children }: SubNavigationSubMenuProps): JSX.Element;
509
- displayName: string;
510
- };
511
- SubMenuItem: {
512
- ({ as, children, icon, href, onClick, title, }: SubNavigationSubMenuItemProps): JSX.Element;
513
- displayName: string;
514
- };
515
- };
516
- /********************************************************
517
- * Item - Renders individual items of the sub navigation
518
- */
519
- interface SubNavigationItemProps extends Omit<AvatarProps, "as" | "size"> {
520
- as?: React.ElementType;
521
- active?: boolean;
522
- /**
523
- * The time stamp renders only if isMessage is true
524
- */
525
- dateCreated?: Date;
526
- /**
527
- * Dropdown options render only if isMessage is false
528
- */
529
- dropdownOptions?: DropdownOptionProps[];
530
- dropdownElements?: React.ReactNode[];
531
- isMessage?: boolean;
532
- onClick?: () => void;
533
- submenu?: React.ReactNode;
534
- /**
535
- * The unread props is for messages only
536
- */
537
- unread?: boolean;
538
- }
539
- /********************************************************
540
- * Button - Renders one of the call to actions at the top of the inner drawer navigation
541
- */
542
- interface SubNavigationButtonProps extends Omit<ButtonProps, "size" | "buttonColor" | "bold" | "uppercase"> {
543
- active?: boolean;
544
- }
545
- /********************************************************
546
- * Create - Renders the CTA to create something at the bottom of the inner drawer navigation
547
- */
548
- interface SubNavigationCreateProps extends Omit<ButtonProps, "size" | "buttonColor" | "bold" | "uppercase" | "icon"> {
549
- active?: boolean;
550
- }
551
- /********************************************************
552
- * Tab - Renders both the tabs in the header and the content of each tab
553
- */
554
- interface SubNavigationTabProps extends React.PropsWithChildren {
555
- name: string;
556
- }
557
- /********************************************************
558
- * Sub Menu - Renders a sub menu that navigates to a new page of the inner drawer navigation
559
- */
560
- interface SubNavigationSubMenuProps extends React.PropsWithChildren {
561
- title: string;
562
- }
563
- /********************************************************
564
- * Sub Menu Item - Renders a child element of the sub menu
565
- */
566
- interface SubNavigationSubMenuItemProps extends React.PropsWithChildren {
567
- as?: React.ElementType;
568
- icon?: React.ReactElement;
569
- href?: string;
570
- onClick?: () => void;
571
- title: string;
572
- }
573
-
574
- interface PaginationProps {
575
- currentPage: number;
576
- /**
577
- * The max number of pages visible from which one may select
578
- * @default 3
579
- */
580
- visibilityInterval: number;
581
- numPages: number;
582
- onNavigate: (page: number) => void;
583
- }
584
- declare const Pagination: ({ currentPage, visibilityInterval, numPages, onNavigate, }: PaginationProps) => JSX.Element;
585
-
586
- interface CommentProps {
587
- commenter: Partial<User>;
588
- commentId: string;
589
- content: string;
590
- datePosted: Date;
591
- hasReacted: boolean;
592
- onReact: () => void;
593
- onReply: (reply: string) => void;
594
- onShowReplies: () => void;
595
- reactions: number;
596
- replies?: CommentProps[];
597
- showReplies: boolean;
598
- }
599
- declare const Comment: ({ commentId, commenter, content, datePosted, hasReacted, onReact, onReply, onShowReplies, replies, reactions, showReplies, }: CommentProps) => JSX.Element;
600
-
601
- interface FaqProps {
602
- title: string;
603
- content: string;
604
- editable: boolean;
605
- creationMode: boolean;
606
- onSubmit: (event: React.FormEvent, props: {
607
- title: string;
608
- content: string;
609
- }) => void;
610
- }
611
- declare const Faq: ({ title, content, editable, creationMode, onSubmit, }: FaqProps) => JSX.Element;
612
-
613
- interface MessageProps extends React.PropsWithChildren {
614
- datePosted: Date;
615
- fromSelf: boolean;
616
- sender: User;
617
- }
618
- declare const Message: ({ children, datePosted, fromSelf, sender, }: MessageProps) => JSX.Element;
619
-
620
- interface ModalProps extends React.PropsWithChildren {
621
- /**
622
- * This is to make the Modal a controlled component,
623
- * instead of it managing its own state
624
- */
625
- controlledOpen?: boolean;
626
- }
627
- declare const Modal: {
628
- ({ controlledOpen, ...props }: ModalProps): JSX.Element;
629
- Trigger: {
630
- ({ children: child, }: {
631
- children: React.ReactElement;
632
- }): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
633
- displayName: string;
634
- };
635
- Dismiss: {
636
- ({ children: child, }: {
637
- children: React.ReactElement;
638
- }): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
639
- displayName: string;
640
- };
641
- Content: {
642
- ({ backgroundDark, children, footer, header, ...props }: ModalContentProps): JSX.Element;
643
- displayName: string;
644
- };
645
- };
646
- interface ModalContentProps extends React.PropsWithChildren {
647
- backgroundDark?: boolean;
648
- footer?: React.ReactElement;
649
- header?: React.ReactElement;
650
- }
651
-
652
- interface PlanProps {
653
- annualPrice: number;
654
- monthlyPrice: number;
655
- name: string;
656
- mostPopular: boolean;
657
- description: string;
658
- subscriptionIndex: 0 | 1;
659
- benefits: string[];
660
- }
661
- declare const Plan: ({ annualPrice, monthlyPrice, name, mostPopular, description, subscriptionIndex, benefits, }: PlanProps) => JSX.Element;
662
-
663
- interface PostProps extends React.PropsWithChildren {
664
- comments: CommentProps[];
665
- content: string;
666
- datePosted: Date;
667
- hasReacted: boolean;
668
- locked: boolean;
669
- onComment: (comment: string) => void;
670
- onReact: () => void;
671
- onShare: () => void;
672
- poster: User;
673
- postId: string;
674
- reactions: number;
675
- shares?: number;
676
- userAvatarSrc: string;
677
- }
678
- declare const Post: ({ comments, children, content, datePosted, hasReacted, onComment, onReact, onShare, poster, reactions, shares, userAvatarSrc, }: PostProps) => JSX.Element;
679
-
680
- interface ProfileHeaderProps {
681
- avatarUrl: string;
682
- heroUrl: string;
683
- title: string;
684
- subtitle: string;
685
- isOwner: boolean;
686
- menuItems: Array<React.ReactNode>;
687
- activeMenuItem: number;
688
- actionItems?: React.ReactNode;
689
- statItems?: React.ReactNode;
690
- onChangeAvatar: () => void;
691
- onChangeHero: () => void;
692
- onTabClick: (index: number) => void;
693
- headerType: "group" | "channel" | "profile" | "course";
694
- }
695
- declare const ProfileHeader: ({ avatarUrl, heroUrl, title, subtitle, isOwner, headerType, menuItems, activeMenuItem, actionItems, statItems, onChangeAvatar, onChangeHero, onTabClick, }: ProfileHeaderProps) => JSX.Element;
696
-
697
- interface RatingsOverviewProps {
698
- rating: number;
699
- reviewCount: number;
700
- stars: RatingInterface;
701
- onWriteReview: () => void;
702
- }
703
- interface RatingInterface {
704
- one: number;
705
- two: number;
706
- three: number;
707
- four: number;
708
- five: number;
709
- }
710
- declare const RatingsOverview: ({ rating, reviewCount, stars, onWriteReview, }: RatingsOverviewProps) => JSX.Element;
711
-
712
- interface ReviewProps {
713
- reviewer: string;
714
- reviewDate: Date;
715
- rating: number;
716
- verifiedPurchase: boolean;
717
- title: string;
718
- content: string;
719
- avatarUrl: string;
720
- likes: number;
721
- hasLiked: boolean;
722
- onLike: () => void;
723
- onShare: () => void;
724
- }
725
- declare const Review: ({ reviewer, reviewDate, rating, verifiedPurchase, title, content, avatarUrl, likes, hasLiked, onLike, onShare, }: ReviewProps) => JSX.Element;
726
-
727
- interface FilterProps {
728
- label: string;
729
- open: boolean;
730
- value: string;
731
- }
732
- declare const Filter: ({ label, open, value }: FilterProps) => JSX.Element;
733
-
734
- /********************************************************
735
- * Table
736
- */
737
- interface TableProps extends React.DetailedHTMLProps<React.TableHTMLAttributes<HTMLTableElement>, HTMLTableElement> {
738
- compact?: boolean;
739
- iconHeader?: IconHeaderProps;
740
- footer?: React.ReactNode;
741
- header?: React.ReactNode;
742
- separated?: boolean;
743
- striped?: boolean;
744
- }
745
- declare const Table: {
746
- ({ className, compact, iconHeader, footer, header, separated, striped, children, ...rest }: TableProps): JSX.Element;
747
- Head: {
748
- ({ children, ...rest }: React.PropsWithChildren): JSX.Element;
749
- displayName: string;
750
- };
751
- Body: {
752
- ({ children, ...rest }: React.PropsWithChildren): JSX.Element;
753
- displayName: string;
754
- };
755
- Footer: {
756
- ({ children, ...rest }: React.PropsWithChildren): JSX.Element;
757
- displayName: string;
758
- };
759
- HeaderCell: {
760
- ({ children, lines, style, textAlign, verticalAlign, width, ...rest }: TableHeaderCellProps): JSX.Element;
761
- displayName: string;
762
- };
763
- Row: {
764
- ({ children, href, hoverable, onClick, padding, selected, style, ...rest }: TableRowProps): JSX.Element;
765
- displayName: string;
766
- };
767
- Cell: {
768
- ({ children, lines, style, textAlign, verticalAlign, width, ...rest }: TableCellProps): JSX.Element;
769
- displayName: string;
770
- };
771
- };
772
- /********************************************************
773
- * Table Header Cell
774
- */
775
- interface TableHeaderCellProps extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLTableCellElement>, HTMLTableCellElement> {
776
- lines?: number;
777
- textAlign?: "left" | "center" | "right";
778
- verticalAlign?: "top" | "middle" | "bottom";
779
- width?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16;
780
- }
781
- /********************************************************
782
- * Table Row
783
- */
784
- interface TableRowProps extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement> {
785
- href?: string;
786
- hoverable?: boolean;
787
- padding?: string;
788
- selected?: boolean;
789
- }
790
- /********************************************************
791
- * Table Cell
792
- */
793
- interface TableCellProps extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLTableCellElement>, HTMLTableCellElement> {
794
- lines?: number;
795
- textAlign?: "left" | "center" | "right";
796
- verticalAlign?: "top" | "middle" | "bottom";
797
- width?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16;
798
- }
799
-
800
- export { Avatar, AvatarProps, Bar, BarProps, Breadcrumbs, BreadcrumbsProps, Button, ButtonProps, CalendarInput, CalendarInputProps, Chip, ChipProps, ColoredIcon, ColoredIconProps, Comment, CommentProps, ContactDetails, ContactDetailsProps, CourseCard, CourseCardProps, DevicePreview, DevicePreviewProps, Drawer, DrawerProps, Dropdown, DropdownProps, Dropzone, DropzoneProps, Editor, EditorBar, EditorBarProps, EditorProps, EpisodeCard, EpisodeCardProps, Faq, FaqProps, FeatureCard, FeatureCardProps, FeedInput, FeedInputProps, Filter, FilterProps, Icon, IconHeader, IconHeaderProps, IconProps, InboxInput, InboxInputProps, JoinGroupModal, JoinGroupModalProps, Line, LineProps, Loader, LoaderProps, MenuTabs, MenuTabsProps, Message, MessageProps, Modal, ModalProps, Navigation, NavigationItemProps, NavigationProps, Pagination, PaginationProps, Pie, PieProps, Plan, PlanProps, Post, PostInput, PostInputProps, PostProps, ProfileHeader, ProfileHeaderProps, ProgressBar, ProgressBarProps, RadioInput, RadioInputProps, Rate, RateProps, RatingsOverview, RatingsOverviewProps, Review, ReviewProps, SearchInput, SearchInputProps, SelectInput, SelectInputProps, StarRating, StarRatingProps, SubNavigation, SubNavigationButtonProps, SubNavigationCreateProps, SubNavigationItemProps, SubNavigationProps, SubNavigationSubMenuItemProps, SubNavigationSubMenuProps, SubNavigationTabProps, Switch, SwitchProps, Table, TableCellProps, TableHeaderCellProps, TableProps, TableRowProps, TagInput, TagInputProps, TextInput, TextInputProps, Toast, ToastProps, Tooltip, TooltipProps };