@revolut/ui-kit-miniapp 0.0.4 → 0.0.6
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/package.json +1 -1
- package/types/index.d.ts +58 -13
package/package.json
CHANGED
package/types/index.d.ts
CHANGED
|
@@ -394,7 +394,7 @@ declare const Avatar: ({ name, children, image, icon, size, uuid, ...rest }: Ava
|
|
|
394
394
|
/**
|
|
395
395
|
* Visual style variant of the button.
|
|
396
396
|
*/
|
|
397
|
-
type ButtonVariant = 'primary' | 'secondary' | 'negative';
|
|
397
|
+
type ButtonVariant = 'primary' | 'secondary' | 'negative' | 'text';
|
|
398
398
|
/**
|
|
399
399
|
* Props for the Button component.
|
|
400
400
|
*
|
|
@@ -1541,6 +1541,10 @@ interface InputProps extends NativeInputProps$3 {
|
|
|
1541
1541
|
* Icon to render at the end of the input content.
|
|
1542
1542
|
*/
|
|
1543
1543
|
endIcon?: IconName;
|
|
1544
|
+
/**
|
|
1545
|
+
* Avatar image displayed at the start of the input.
|
|
1546
|
+
*/
|
|
1547
|
+
avatar?: string;
|
|
1544
1548
|
}
|
|
1545
1549
|
/**
|
|
1546
1550
|
* Input component for text entry.
|
|
@@ -1636,7 +1640,7 @@ interface InputProps extends NativeInputProps$3 {
|
|
|
1636
1640
|
* }
|
|
1637
1641
|
* ```
|
|
1638
1642
|
*/
|
|
1639
|
-
declare const Input: ({ value, defaultValue, onChange, label, placeholder, type, disabled, readOnly, invalid, description, errorMessage, labelButtonClear, onClear, icon, endIcon, ...rest }: InputProps) => react_jsx_runtime.JSX.Element;
|
|
1643
|
+
declare const Input: ({ value, defaultValue, onChange, label, placeholder, type, disabled, readOnly, invalid, description, errorMessage, labelButtonClear, onClear, icon, endIcon, avatar, ...rest }: InputProps) => react_jsx_runtime.JSX.Element;
|
|
1640
1644
|
|
|
1641
1645
|
type NativeAnchorProps = Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, 'className' | 'style'>;
|
|
1642
1646
|
/**
|
|
@@ -1727,14 +1731,18 @@ declare const Link: ({ href, target, children, ...rest }: LinkProps) => react_js
|
|
|
1727
1731
|
* List item definition.
|
|
1728
1732
|
*/
|
|
1729
1733
|
interface ListItem {
|
|
1734
|
+
/**
|
|
1735
|
+
* Content to show
|
|
1736
|
+
*/
|
|
1737
|
+
content: React.ReactNode;
|
|
1730
1738
|
/**
|
|
1731
1739
|
* Icon to show at the start
|
|
1732
1740
|
*/
|
|
1733
1741
|
icon: IconName;
|
|
1734
1742
|
/**
|
|
1735
|
-
*
|
|
1743
|
+
* Unique id identifier for the item
|
|
1736
1744
|
*/
|
|
1737
|
-
|
|
1745
|
+
id: string;
|
|
1738
1746
|
}
|
|
1739
1747
|
/**
|
|
1740
1748
|
* Props for the List component.
|
|
@@ -1743,8 +1751,8 @@ interface ListItem {
|
|
|
1743
1751
|
* ```tsx
|
|
1744
1752
|
* <List
|
|
1745
1753
|
* items={[
|
|
1746
|
-
* {
|
|
1747
|
-
* {
|
|
1754
|
+
* { id: 'item-1', content: 'First item completed', icon: 'Check' },
|
|
1755
|
+
* { id: 'item-2', content: <><Text color="success">Free cancellation</Text> until January</>, icon: 'Time' },
|
|
1748
1756
|
* ]}
|
|
1749
1757
|
* />
|
|
1750
1758
|
* ```
|
|
@@ -1762,14 +1770,14 @@ interface ListProps {
|
|
|
1762
1770
|
*
|
|
1763
1771
|
* @example
|
|
1764
1772
|
* ```tsx
|
|
1765
|
-
* import { List } from '@revolut/ui-kit-miniapp'
|
|
1773
|
+
* import { List, Text } from '@revolut/ui-kit-miniapp'
|
|
1766
1774
|
*
|
|
1767
1775
|
* function ListExample() {
|
|
1768
1776
|
* return (
|
|
1769
1777
|
* <List
|
|
1770
1778
|
* items={[
|
|
1771
|
-
* {
|
|
1772
|
-
* {
|
|
1779
|
+
* { id: 'item-1', content: 'First item completed', icon: 'Check' },
|
|
1780
|
+
* { id: 'item-2', content: <><Text color="success">Free cancellation</Text> until January</>, icon: 'Time' },
|
|
1773
1781
|
* ]}
|
|
1774
1782
|
* />
|
|
1775
1783
|
* )
|
|
@@ -2561,6 +2569,43 @@ interface SwitchProps extends NativeInputProps {
|
|
|
2561
2569
|
*/
|
|
2562
2570
|
declare const Switch: ({ checked, defaultChecked, disabled, onChange, ...rest }: SwitchProps) => react_jsx_runtime.JSX.Element;
|
|
2563
2571
|
|
|
2572
|
+
/**
|
|
2573
|
+
* Props for the Badge component.
|
|
2574
|
+
*
|
|
2575
|
+
* @example
|
|
2576
|
+
* ```tsx
|
|
2577
|
+
* <Badge icon="Time">Best offer</Badge>
|
|
2578
|
+
* ```
|
|
2579
|
+
*/
|
|
2580
|
+
interface BadgeProps extends NativeSpanProps {
|
|
2581
|
+
/**
|
|
2582
|
+
* Badge icon.
|
|
2583
|
+
*/
|
|
2584
|
+
icon?: IconName;
|
|
2585
|
+
/**
|
|
2586
|
+
* Badge content.
|
|
2587
|
+
*/
|
|
2588
|
+
children: string | number;
|
|
2589
|
+
}
|
|
2590
|
+
/**
|
|
2591
|
+
* Badge component for categorisation or markup.
|
|
2592
|
+
*
|
|
2593
|
+
* Renders text in a coloured background that highlights some extra details for a content.
|
|
2594
|
+
*
|
|
2595
|
+
* @example
|
|
2596
|
+
* ```tsx
|
|
2597
|
+
* import { Badge } from '@revolut/ui-kit-miniapp'
|
|
2598
|
+
*
|
|
2599
|
+
* // Basic usage
|
|
2600
|
+
* function BasicExample() {
|
|
2601
|
+
* return (
|
|
2602
|
+
* <Badge icon="Time">Best offer</Badge>
|
|
2603
|
+
* )
|
|
2604
|
+
* }
|
|
2605
|
+
* ```
|
|
2606
|
+
*/
|
|
2607
|
+
declare const Badge: ({ icon, children }: BadgeProps) => react_jsx_runtime.JSX.Element;
|
|
2608
|
+
|
|
2564
2609
|
/**
|
|
2565
2610
|
* TabBar variant options.
|
|
2566
2611
|
*/
|
|
@@ -3377,13 +3422,13 @@ declare const BottomSheet: BottomSheetComponent;
|
|
|
3377
3422
|
*/
|
|
3378
3423
|
interface PageHeaderActionItem {
|
|
3379
3424
|
/**
|
|
3380
|
-
* Label for the action (not
|
|
3425
|
+
* Label for the action (only visible if icon is not defined)
|
|
3381
3426
|
*/
|
|
3382
3427
|
label: string;
|
|
3383
3428
|
/**
|
|
3384
3429
|
* Icon to show
|
|
3385
3430
|
*/
|
|
3386
|
-
icon
|
|
3431
|
+
icon?: IconName;
|
|
3387
3432
|
/**
|
|
3388
3433
|
* Callback when the button is clicked
|
|
3389
3434
|
*/
|
|
@@ -3749,5 +3794,5 @@ declare const Token: {
|
|
|
3749
3794
|
};
|
|
3750
3795
|
};
|
|
3751
3796
|
|
|
3752
|
-
export { Action, ActionButton, Avatar, BottomSheet, Button, Calendar, Cell, CellSkeleton, Checkbox, Copyable, DetailsCell, Dropdown, FilterButton, Footnote, Group, HStack, Icon, Image, Input, Link, List, Page, Placeholder, Popup, ProgressSteps, Radio, RootProvider, Search, Spacer, Subheader, Switch, TabBar, Text, TextArea, ToggleButton, Token, VStack, VisuallyHidden, useStatusSheet };
|
|
3753
|
-
export type { ActionButtonProps, ActionButtonVariant, ActionProps, AvatarProps, AvatarSize, BottomSheetActionsProps, BottomSheetContentProps, BottomSheetHeaderProps, BottomSheetProps, ButtonProps, ButtonVariant, CalendarDateProps, CalendarProps, CalendarRangeProps, CalendarVariant, CellProps, CellVariant, CheckboxProps, CopyableProps, DateRange, DetailsCellProps, DropdownProps, FilterButtonProps, FootnoteProps, GroupProps, GroupVariant, HStackProps, IconProps, ImageFit, ImageProp, ImageProps, InputProps, InputType, LinkProps, ListProps, PageHeaderProps, PageMainProps, PageProps, PageTabsProps, PlaceholderProps, PopupProps, ProgressStepsProps, RadioProps, RootProviderProps, SearchProps, Space, SpacerProps, StackAlignment, StatusSheetAction, StatusSheetInstance, StatusSheetOptions, StatusSheetVariant, SubheaderProps, SubheaderVariant, SwitchProps, TabBarItem, TabBarProps, TabBarVariant, TextAreaProps, TextProps, TextVariant, ThemeBackground, ThemeMode, ToggleButtonProps, VStackProps, VisuallyHiddenProps };
|
|
3797
|
+
export { Action, ActionButton, Avatar, Badge, BottomSheet, Button, Calendar, Cell, CellSkeleton, Checkbox, Copyable, DetailsCell, Dropdown, FilterButton, Footnote, Group, HStack, Icon, Image, Input, Link, List, Page, Placeholder, Popup, ProgressSteps, Radio, RootProvider, Search, Spacer, Subheader, Switch, TabBar, Text, TextArea, ToggleButton, Token, VStack, VisuallyHidden, useStatusSheet };
|
|
3798
|
+
export type { ActionButtonProps, ActionButtonVariant, ActionProps, AvatarProps, AvatarSize, BadgeProps, BottomSheetActionsProps, BottomSheetContentProps, BottomSheetHeaderProps, BottomSheetProps, ButtonProps, ButtonVariant, CalendarDateProps, CalendarProps, CalendarRangeProps, CalendarVariant, CellProps, CellVariant, CheckboxProps, CopyableProps, DateRange, DetailsCellProps, DropdownProps, FilterButtonProps, FootnoteProps, GroupProps, GroupVariant, HStackProps, IconProps, ImageFit, ImageProp, ImageProps, InputProps, InputType, LinkProps, ListProps, PageHeaderProps, PageMainProps, PageProps, PageTabsProps, PlaceholderProps, PopupProps, ProgressStepsProps, RadioProps, RootProviderProps, SearchProps, Space, SpacerProps, StackAlignment, StatusSheetAction, StatusSheetInstance, StatusSheetOptions, StatusSheetVariant, SubheaderProps, SubheaderVariant, SwitchProps, TabBarItem, TabBarProps, TabBarVariant, TextAreaProps, TextProps, TextVariant, ThemeBackground, ThemeMode, ToggleButtonProps, VStackProps, VisuallyHiddenProps };
|