@revolut/ui-kit-miniapp 0.1.0 → 0.1.1
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 +7 -6
- package/types/index.d.ts +45 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@revolut/ui-kit-miniapp",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "",
|
|
6
6
|
"types": "types/index.d.ts",
|
|
@@ -18,13 +18,14 @@
|
|
|
18
18
|
"sideEffects": [
|
|
19
19
|
"*.css"
|
|
20
20
|
],
|
|
21
|
+
"scripts": {
|
|
22
|
+
"prebuild": "rimraf types",
|
|
23
|
+
"prepublishOnly": "pnpm run build",
|
|
24
|
+
"build": "mkdir -p types && cp ../ui-kit-miniapp/dist/index.d.ts ./types/index.d.ts"
|
|
25
|
+
},
|
|
21
26
|
"peerDependencies": {
|
|
22
27
|
"react": "^19.0.0",
|
|
23
28
|
"react-dom": "^19.0.0",
|
|
24
29
|
"react-is": "^19.0.0"
|
|
25
|
-
},
|
|
26
|
-
"scripts": {
|
|
27
|
-
"prebuild": "rimraf types",
|
|
28
|
-
"build": "mkdir -p types && cp ../ui-kit-miniapp/dist/index.d.ts ./types/index.d.ts"
|
|
29
30
|
}
|
|
30
|
-
}
|
|
31
|
+
}
|
package/types/index.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ type MoneyRoundingModeFallback = 'ceil' | 'floor' | 'expand' | 'trunc' | 'halfCe
|
|
|
23
23
|
type MoneyRoundingMode = 'roundingMode' extends keyof Intl.NumberFormatOptions ? Intl.NumberFormatOptions['roundingMode'] : MoneyRoundingModeFallback;
|
|
24
24
|
|
|
25
25
|
declare const DEFAULT_MESSAGES: {
|
|
26
|
+
readonly 'action.add': "Add";
|
|
26
27
|
readonly 'action.apply': "Apply";
|
|
27
28
|
readonly 'action.back': "Back";
|
|
28
29
|
readonly 'action.cancel': "Cancel";
|
|
@@ -35,6 +36,7 @@ declare const DEFAULT_MESSAGES: {
|
|
|
35
36
|
readonly 'action.expand-menu': "Expand menu";
|
|
36
37
|
readonly 'action.fca-disclaimer-learn-more': "Take 2 mins to learn more";
|
|
37
38
|
readonly 'action.hide': "Hide";
|
|
39
|
+
readonly 'action.link': "Link";
|
|
38
40
|
readonly 'action.more': "More";
|
|
39
41
|
readonly 'action.next-slide': "Next slide";
|
|
40
42
|
readonly 'action.next': "Next";
|
|
@@ -52,6 +54,7 @@ declare const DEFAULT_MESSAGES: {
|
|
|
52
54
|
readonly 'action.sort-dsc': "Sort descending";
|
|
53
55
|
readonly 'action.resize-column': "Resize column";
|
|
54
56
|
readonly 'action.remove': "Remove";
|
|
57
|
+
readonly 'action.reorder': "Reorder";
|
|
55
58
|
readonly 'action.play': "Play";
|
|
56
59
|
readonly 'action.pause': "Pause";
|
|
57
60
|
readonly 'action.open-global-search': "Open global search";
|
|
@@ -1918,6 +1921,14 @@ declare const CurrencySymbol: {
|
|
|
1918
1921
|
};
|
|
1919
1922
|
type CurrencySymbol = ValueOf<typeof CurrencySymbol>;
|
|
1920
1923
|
|
|
1924
|
+
declare const ActionsGradient: {
|
|
1925
|
+
readonly None: "none";
|
|
1926
|
+
readonly Low: "low";
|
|
1927
|
+
readonly High: "high";
|
|
1928
|
+
readonly Full: "full";
|
|
1929
|
+
};
|
|
1930
|
+
type ActionsGradient = ValueOf<typeof ActionsGradient>;
|
|
1931
|
+
|
|
1921
1932
|
interface RangeModifier {
|
|
1922
1933
|
from: Date;
|
|
1923
1934
|
to: Date;
|
|
@@ -4330,6 +4341,10 @@ interface PopupActionItem {
|
|
|
4330
4341
|
* Visual style variant of the button.
|
|
4331
4342
|
*/
|
|
4332
4343
|
variant?: ButtonVariant;
|
|
4344
|
+
/**
|
|
4345
|
+
* Whether the action is disabled
|
|
4346
|
+
*/
|
|
4347
|
+
disabled?: boolean;
|
|
4333
4348
|
}
|
|
4334
4349
|
/**
|
|
4335
4350
|
* Props for the Popup component.
|
|
@@ -5746,9 +5761,9 @@ interface PageHeaderActionItem {
|
|
|
5746
5761
|
onClick: () => void;
|
|
5747
5762
|
}
|
|
5748
5763
|
/**
|
|
5749
|
-
*
|
|
5764
|
+
* Base props for the Page.Header component, shared across all variants.
|
|
5750
5765
|
*/
|
|
5751
|
-
interface
|
|
5766
|
+
interface PageHeaderBaseProps extends NativeHeadingProps {
|
|
5752
5767
|
/**
|
|
5753
5768
|
* Callback when the back button is clicked.
|
|
5754
5769
|
*/
|
|
@@ -5782,12 +5797,33 @@ interface PageHeaderProps extends NativeHeadingProps {
|
|
|
5782
5797
|
* Header title content.
|
|
5783
5798
|
*/
|
|
5784
5799
|
children?: React__default.ReactNode;
|
|
5800
|
+
/**
|
|
5801
|
+
* Whether the header is compact.
|
|
5802
|
+
*/
|
|
5803
|
+
compact?: boolean;
|
|
5804
|
+
}
|
|
5805
|
+
/**
|
|
5806
|
+
* Header end content. `actions` and `avatar` are mutually exclusive: a header
|
|
5807
|
+
* shows either a set of actions or a single avatar, never both.
|
|
5808
|
+
*/
|
|
5809
|
+
type PageHeaderEndProps = {
|
|
5785
5810
|
/**
|
|
5786
5811
|
* Header actions.
|
|
5787
5812
|
*/
|
|
5788
5813
|
actions?: PageHeaderActionItem[];
|
|
5789
|
-
|
|
5790
|
-
|
|
5814
|
+
avatar?: never;
|
|
5815
|
+
} | {
|
|
5816
|
+
/**
|
|
5817
|
+
* Header end icon or image
|
|
5818
|
+
*/
|
|
5819
|
+
avatar?: IconName | string;
|
|
5820
|
+
actions?: never;
|
|
5821
|
+
};
|
|
5822
|
+
/**
|
|
5823
|
+
* Props for the Page.Header component.
|
|
5824
|
+
*/
|
|
5825
|
+
type PageHeaderProps = PageHeaderBaseProps & PageHeaderEndProps;
|
|
5826
|
+
declare const PageHeader: ({ onBack, onClose, labelButtonClose, labelButtonBack, subtitle, description, loading, children, actions, compact, avatar, ...rest }: PageHeaderProps) => react_jsx_runtime.JSX.Element;
|
|
5791
5827
|
/**
|
|
5792
5828
|
* Props for the Page.Main component.
|
|
5793
5829
|
*/
|
|
@@ -5800,8 +5836,12 @@ interface PageMainProps extends NativeMainProps {
|
|
|
5800
5836
|
* Action buttons displayed at the bottom of the page.
|
|
5801
5837
|
*/
|
|
5802
5838
|
actions?: React__default.ReactNode;
|
|
5839
|
+
/**
|
|
5840
|
+
* Actions container gradient
|
|
5841
|
+
*/
|
|
5842
|
+
actionsGradient?: ActionsGradient;
|
|
5803
5843
|
}
|
|
5804
|
-
declare const PageMain: ({ children, actions, ...rest }: PageMainProps) => react_jsx_runtime.JSX.Element;
|
|
5844
|
+
declare const PageMain: ({ children, actions, actionsGradient, ...rest }: PageMainProps) => react_jsx_runtime.JSX.Element;
|
|
5805
5845
|
/**
|
|
5806
5846
|
* Props for the Page.Tabs component.
|
|
5807
5847
|
*/
|