tguikit 0.3.0 → 0.4.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/dist/index.d.ts +121 -3
- package/dist/index.js +918 -432
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { HTMLAttributes, Ref, ReactNode, BlockquoteHTMLAttributes, AllHTMLAttributes, ElementType, InputHTMLAttributes, ImgHTMLAttributes,
|
|
2
|
+
import { HTMLAttributes, Ref, ReactNode, BlockquoteHTMLAttributes, AllHTMLAttributes, ElementType, InputHTMLAttributes, ImgHTMLAttributes, ButtonHTMLAttributes, AnchorHTMLAttributes, SelectHTMLAttributes, TextareaHTMLAttributes } from 'react';
|
|
3
3
|
|
|
4
4
|
interface AccordionProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange'> {
|
|
5
5
|
ref?: Ref<HTMLDivElement>;
|
|
@@ -91,6 +91,21 @@ declare namespace Blockquote {
|
|
|
91
91
|
var displayName: string;
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
+
interface BreadcrumbItem {
|
|
95
|
+
label: ReactNode;
|
|
96
|
+
href?: string;
|
|
97
|
+
onClick?: () => void;
|
|
98
|
+
}
|
|
99
|
+
interface BreadcrumbsProps extends Omit<HTMLAttributes<HTMLElement>, 'children'> {
|
|
100
|
+
ref?: Ref<HTMLElement>;
|
|
101
|
+
items: BreadcrumbItem[];
|
|
102
|
+
maxItems?: number;
|
|
103
|
+
}
|
|
104
|
+
declare function Breadcrumbs({ ref, items, maxItems, className, ...rest }: BreadcrumbsProps): react.JSX.Element;
|
|
105
|
+
declare namespace Breadcrumbs {
|
|
106
|
+
var displayName: string;
|
|
107
|
+
}
|
|
108
|
+
|
|
94
109
|
type TguiPlatform = 'ios' | 'base';
|
|
95
110
|
type Appearance = 'light' | 'dark';
|
|
96
111
|
interface TguiContextValue {
|
|
@@ -292,6 +307,28 @@ declare namespace Image {
|
|
|
292
307
|
var displayName: string;
|
|
293
308
|
}
|
|
294
309
|
|
|
310
|
+
type InlineButtonsMode = 'bezeled' | 'plain' | 'gray';
|
|
311
|
+
|
|
312
|
+
interface InlineButtonsItemProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'children'> {
|
|
313
|
+
ref?: Ref<HTMLButtonElement>;
|
|
314
|
+
icon: ReactNode;
|
|
315
|
+
children: ReactNode;
|
|
316
|
+
}
|
|
317
|
+
declare function InlineButtonsItem({ ref, icon, children, className, ...rest }: InlineButtonsItemProps): react.JSX.Element;
|
|
318
|
+
declare namespace InlineButtonsItem {
|
|
319
|
+
var displayName: string;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
interface InlineButtonsProps extends HTMLAttributes<HTMLDivElement> {
|
|
323
|
+
ref?: Ref<HTMLDivElement>;
|
|
324
|
+
mode?: InlineButtonsMode;
|
|
325
|
+
}
|
|
326
|
+
declare function InlineButtons({ ref, mode, className, children, ...rest }: InlineButtonsProps): react.JSX.Element;
|
|
327
|
+
declare namespace InlineButtons {
|
|
328
|
+
var displayName: string;
|
|
329
|
+
var Item: typeof InlineButtonsItem;
|
|
330
|
+
}
|
|
331
|
+
|
|
295
332
|
type InputStatus = 'default' | 'error' | 'focused';
|
|
296
333
|
interface InputProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
297
334
|
ref?: Ref<HTMLInputElement>;
|
|
@@ -330,6 +367,30 @@ declare namespace List {
|
|
|
330
367
|
var displayName: string;
|
|
331
368
|
}
|
|
332
369
|
|
|
370
|
+
interface CompactPaginationProps extends Omit<HTMLAttributes<HTMLElement>, 'onChange'> {
|
|
371
|
+
ref?: Ref<HTMLElement>;
|
|
372
|
+
page: number;
|
|
373
|
+
count: number;
|
|
374
|
+
onChange: (page: number) => void;
|
|
375
|
+
siblingCount?: number;
|
|
376
|
+
}
|
|
377
|
+
declare function CompactPagination({ ref, page, count, onChange, siblingCount, className, ...rest }: CompactPaginationProps): react.JSX.Element;
|
|
378
|
+
declare namespace CompactPagination {
|
|
379
|
+
var displayName: string;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
interface PaginationProps extends Omit<HTMLAttributes<HTMLElement>, 'onChange'> {
|
|
383
|
+
ref?: Ref<HTMLElement>;
|
|
384
|
+
page: number;
|
|
385
|
+
count: number;
|
|
386
|
+
onChange: (page: number) => void;
|
|
387
|
+
siblingCount?: number;
|
|
388
|
+
}
|
|
389
|
+
declare function Pagination({ ref, page, count, onChange, siblingCount, className, ...rest }: PaginationProps): react.JSX.Element;
|
|
390
|
+
declare namespace Pagination {
|
|
391
|
+
var displayName: string;
|
|
392
|
+
}
|
|
393
|
+
|
|
333
394
|
interface PinInputProps {
|
|
334
395
|
ref?: Ref<HTMLDivElement>;
|
|
335
396
|
length?: number;
|
|
@@ -406,6 +467,19 @@ declare namespace Rating {
|
|
|
406
467
|
var displayName: string;
|
|
407
468
|
}
|
|
408
469
|
|
|
470
|
+
interface SearchBarProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange'> {
|
|
471
|
+
ref?: Ref<HTMLDivElement>;
|
|
472
|
+
value: string;
|
|
473
|
+
onChange: (value: string) => void;
|
|
474
|
+
placeholder?: string;
|
|
475
|
+
onCancel?: () => void;
|
|
476
|
+
label?: string;
|
|
477
|
+
}
|
|
478
|
+
declare function SearchBar({ ref, value, onChange, placeholder, onCancel, label, className, ...rest }: SearchBarProps): react.JSX.Element;
|
|
479
|
+
declare namespace SearchBar {
|
|
480
|
+
var displayName: string;
|
|
481
|
+
}
|
|
482
|
+
|
|
409
483
|
interface SectionFooterProps extends HTMLAttributes<HTMLElement> {
|
|
410
484
|
ref?: Ref<HTMLElement>;
|
|
411
485
|
centered?: boolean;
|
|
@@ -559,6 +633,30 @@ declare namespace Spoiler {
|
|
|
559
633
|
var displayName: string;
|
|
560
634
|
}
|
|
561
635
|
|
|
636
|
+
interface StepperProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange'> {
|
|
637
|
+
ref?: Ref<HTMLDivElement>;
|
|
638
|
+
value: number;
|
|
639
|
+
onChange: (value: number) => void;
|
|
640
|
+
min?: number;
|
|
641
|
+
max?: number;
|
|
642
|
+
step?: number;
|
|
643
|
+
disabled?: boolean;
|
|
644
|
+
}
|
|
645
|
+
declare function Stepper({ ref, value, onChange, min, max, step, disabled, className, ...rest }: StepperProps): react.JSX.Element;
|
|
646
|
+
declare namespace Stepper {
|
|
647
|
+
var displayName: string;
|
|
648
|
+
}
|
|
649
|
+
|
|
650
|
+
interface StepsProps extends HTMLAttributes<HTMLDivElement> {
|
|
651
|
+
ref?: Ref<HTMLDivElement>;
|
|
652
|
+
count: number;
|
|
653
|
+
progress: number;
|
|
654
|
+
}
|
|
655
|
+
declare function Steps({ ref, count, progress, className, ...rest }: StepsProps): react.JSX.Element;
|
|
656
|
+
declare namespace Steps {
|
|
657
|
+
var displayName: string;
|
|
658
|
+
}
|
|
659
|
+
|
|
562
660
|
type SubheadlineLevel = '1' | '2';
|
|
563
661
|
|
|
564
662
|
interface SubheadlineProps extends TypographyProps {
|
|
@@ -632,6 +730,26 @@ declare namespace TguiProvider {
|
|
|
632
730
|
|
|
633
731
|
declare function useTgui(): TguiContextValue;
|
|
634
732
|
|
|
733
|
+
interface TimelineProps extends HTMLAttributes<HTMLOListElement> {
|
|
734
|
+
ref?: Ref<HTMLOListElement>;
|
|
735
|
+
}
|
|
736
|
+
declare function Timeline({ ref, className, children, ...rest }: TimelineProps): react.JSX.Element;
|
|
737
|
+
declare namespace Timeline {
|
|
738
|
+
var displayName: string;
|
|
739
|
+
}
|
|
740
|
+
|
|
741
|
+
interface TimelineItemProps extends Omit<HTMLAttributes<HTMLLIElement>, 'title'> {
|
|
742
|
+
ref?: Ref<HTMLLIElement>;
|
|
743
|
+
title: ReactNode;
|
|
744
|
+
description?: ReactNode;
|
|
745
|
+
time?: ReactNode;
|
|
746
|
+
active?: boolean;
|
|
747
|
+
}
|
|
748
|
+
declare function TimelineItem({ ref, title, description, time, active, className, ...rest }: TimelineItemProps): react.JSX.Element;
|
|
749
|
+
declare namespace TimelineItem {
|
|
750
|
+
var displayName: string;
|
|
751
|
+
}
|
|
752
|
+
|
|
635
753
|
type TitleLevel = '1' | '2' | '3';
|
|
636
754
|
|
|
637
755
|
interface TitleProps extends TypographyProps {
|
|
@@ -658,5 +776,5 @@ declare namespace Tooltip {
|
|
|
658
776
|
var displayName: string;
|
|
659
777
|
}
|
|
660
778
|
|
|
661
|
-
export { Accordion, AccordionItem, Avatar, AvatarStack, Badge, Banner, Blockquote, Button, Caption, Card, CardCell, Cell, Checkbox, Chip, CircularProgress, Divider, FixedLayout, Headline, HorizontalScroll, IconButton, Image, Input, LargeTitle, Link, List, PinInput, Placeholder, Portal, Progress, Radio, Rating, Section, SectionFooter, SectionHeader, SegmentedControl, SegmentedControlItem, Select, Sheet, Skeleton, Slider, SnackbarProvider, Spinner, Spoiler, Subheadline, Switch, TabBar, TabBarItem, Tappable, Text, Textarea, TguiProvider, Title, Tooltip, Typography, useSnackbar, useTgui };
|
|
662
|
-
export type { AccordionItemProps, AccordionProps, AvatarProps, AvatarSize, AvatarStackProps, BadgeMode, BadgeProps, BadgeType, BannerProps, BannerType, BlockquoteProps, ButtonMode, ButtonProps, ButtonSize, CaptionProps, CardCellProps, CardProps, CardType, CellProps, CheckboxProps, ChipMode, ChipProps, CircularProgressProps, CircularProgressSize, DividerProps, FixedLayoutProps, HeadlineProps, HorizontalScrollProps, IconButtonMode, IconButtonProps, IconButtonSize, ImageProps, InputProps, InputStatus, LargeTitleProps, LinkProps, ListProps, PinInputProps, PlaceholderProps, PortalProps, ProgressProps, RadioProps, RatingProps, SectionFooterProps, SectionHeaderProps, SectionProps, SegmentedControlItemProps, SegmentedControlProps, SelectProps, SheetProps, SkeletonProps, SliderProps, SnackbarApi, SnackbarOptions, SnackbarProviderProps, SpinnerProps, SpinnerSize, SpoilerProps, SubheadlineProps, SwitchProps, TabBarItemProps, TabBarProps, TappableProps, TextProps, TextareaProps, TextareaStatus, TguiProviderProps, TitleProps, TooltipPlacement, TooltipProps, TypographyProps };
|
|
779
|
+
export { Accordion, AccordionItem, Avatar, AvatarStack, Badge, Banner, Blockquote, Breadcrumbs, Button, Caption, Card, CardCell, Cell, Checkbox, Chip, CircularProgress, CompactPagination, Divider, FixedLayout, Headline, HorizontalScroll, IconButton, Image, InlineButtons, InlineButtonsItem, Input, LargeTitle, Link, List, Pagination, PinInput, Placeholder, Portal, Progress, Radio, Rating, SearchBar, Section, SectionFooter, SectionHeader, SegmentedControl, SegmentedControlItem, Select, Sheet, Skeleton, Slider, SnackbarProvider, Spinner, Spoiler, Stepper, Steps, Subheadline, Switch, TabBar, TabBarItem, Tappable, Text, Textarea, TguiProvider, Timeline, TimelineItem, Title, Tooltip, Typography, useSnackbar, useTgui };
|
|
780
|
+
export type { AccordionItemProps, AccordionProps, AvatarProps, AvatarSize, AvatarStackProps, BadgeMode, BadgeProps, BadgeType, BannerProps, BannerType, BlockquoteProps, BreadcrumbItem, BreadcrumbsProps, ButtonMode, ButtonProps, ButtonSize, CaptionProps, CardCellProps, CardProps, CardType, CellProps, CheckboxProps, ChipMode, ChipProps, CircularProgressProps, CircularProgressSize, CompactPaginationProps, DividerProps, FixedLayoutProps, HeadlineProps, HorizontalScrollProps, IconButtonMode, IconButtonProps, IconButtonSize, ImageProps, InlineButtonsItemProps, InlineButtonsMode, InlineButtonsProps, InputProps, InputStatus, LargeTitleProps, LinkProps, ListProps, PaginationProps, PinInputProps, PlaceholderProps, PortalProps, ProgressProps, RadioProps, RatingProps, SearchBarProps, SectionFooterProps, SectionHeaderProps, SectionProps, SegmentedControlItemProps, SegmentedControlProps, SelectProps, SheetProps, SkeletonProps, SliderProps, SnackbarApi, SnackbarOptions, SnackbarProviderProps, SpinnerProps, SpinnerSize, SpoilerProps, StepperProps, StepsProps, SubheadlineProps, SwitchProps, TabBarItemProps, TabBarProps, TappableProps, TextProps, TextareaProps, TextareaStatus, TguiProviderProps, TimelineItemProps, TimelineProps, TitleProps, TooltipPlacement, TooltipProps, TypographyProps };
|