@transferwise/components 0.0.0-experimental-a7cfdf1 → 0.0.0-experimental-18ef249
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/build/es/no-polyfill/checkboxButton/CheckboxButton.story.js +2 -1
- package/build/es/no-polyfill/criticalBanner/CriticalCommsBanner.story.js +1 -1
- package/build/es/no-polyfill/emphasis/Emphasis.story.js +1 -0
- package/build/es/no-polyfill/markdown/Markdown.story.js +1 -0
- package/build/es/no-polyfill/processIndicator/ProcessIndicator.story.js +1 -0
- package/build/es/polyfill/checkboxButton/CheckboxButton.story.js +2 -1
- package/build/es/polyfill/criticalBanner/CriticalCommsBanner.story.js +1 -1
- package/build/es/polyfill/emphasis/Emphasis.story.js +1 -0
- package/build/es/polyfill/markdown/Markdown.story.js +1 -0
- package/build/es/polyfill/processIndicator/ProcessIndicator.story.js +1 -0
- package/build/types/checkboxButton/CheckboxButton.story.d.ts +14 -4
- package/build/types/criticalBanner/CriticalCommsBanner.story.d.ts +4 -2
- package/build/types/emphasis/Emphasis.story.d.ts +13 -0
- package/build/types/markdown/Markdown.story.d.ts +39 -0
- package/build/types/processIndicator/ProcessIndicator.story.d.ts +10 -0
- package/package.json +9 -9
- package/build/types/test-utils/VariantDecorator.d.ts +0 -18
|
@@ -1 +1,2 @@
|
|
|
1
|
-
import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import{
|
|
1
|
+
import _defineProperty from"@babel/runtime/helpers/defineProperty";import _slicedToArray from"@babel/runtime/helpers/slicedToArray";function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}import{action}from"@storybook/addon-actions";import{useState}from"react";import CheckboxButton from"./CheckboxButton";import{jsx as _jsx}from"react/jsx-runtime";export default{component:CheckboxButton,title:"Actions/CheckboxButton",tags:["autodocs"],args:{onBlur:action("blur"),onClick:action("click"),onFocus:action("focus")}};export var Basic={args:{"aria-label":"Toggle email updates",disabled:!1},render:function render(a){// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
2
|
+
var b=useState(!0),c=_slicedToArray(b,2),d=c[0],e=c[1];return/*#__PURE__*/_jsx(CheckboxButton,_objectSpread(_objectSpread({},a),{},{checked:d,onChange:function onChange(){return e(!d)}}))}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import CriticalCommsBanner from".";export default{component:CriticalCommsBanner,title:"Feedback/CriticalCommsBanner",tags:["autodocs"]};export var Basic={args:{title:"Your account is overdrawn",subtitle:"Add money within the next 30 days",action:{label:"Take action",href:"https://wise.com"}}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import Emphasis from"./Emphasis";export default{component:Emphasis,title:"Typography/Emphasis",tags:["autodocs"]};export var Basic={args:{text:"This is <important>important</important>.\\nThis is <positive>positive</positive>.\\nThis is <negative>negative</negative>.\\nThis is a <warning>warning</warning>.\\n<script>alert(\"nice try!\")</script>"}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import Markdown from"./Markdown";export default{component:Markdown,title:"Typography/Markdown",tags:["autodocs"]};export var Basic={args:{children:"# Heading\n 1. item one\n 2. item two\n - sublist\n - sublist"}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Size,Status}from"../common";import ProcessIndicator from"./ProcessIndicator";export default{component:ProcessIndicator,title:"Loading/ProcessIndicator",tags:["autodocs"]};export var Basic={args:{size:Size.EXTRA_SMALL,status:Status.PROCESSING}};
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import{
|
|
1
|
+
import _defineProperty from"@babel/runtime/helpers/defineProperty";import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import"core-js/modules/es.object.keys.js";import"core-js/modules/es.symbol.js";import"core-js/modules/es.array.filter.js";import"core-js/modules/es.object.to-string.js";import"core-js/modules/es.object.get-own-property-descriptor.js";import"core-js/modules/web.dom-collections.for-each.js";import"core-js/modules/es.object.get-own-property-descriptors.js";function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}import{action}from"@storybook/addon-actions";import{useState}from"react";import CheckboxButton from"./CheckboxButton";import{jsx as _jsx}from"react/jsx-runtime";export default{component:CheckboxButton,title:"Actions/CheckboxButton",tags:["autodocs"],args:{onBlur:action("blur"),onClick:action("click"),onFocus:action("focus")}};export var Basic={args:{"aria-label":"Toggle email updates",disabled:!1},render:function render(a){// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
2
|
+
var b=useState(!0),c=_slicedToArray(b,2),d=c[0],e=c[1];return/*#__PURE__*/_jsx(CheckboxButton,_objectSpread(_objectSpread({},a),{},{checked:d,onChange:function onChange(){return e(!d)}}))}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import CriticalCommsBanner from".";export default{component:CriticalCommsBanner,title:"Feedback/CriticalCommsBanner",tags:["autodocs"]};export var Basic={args:{title:"Your account is overdrawn",subtitle:"Add money within the next 30 days",action:{label:"Take action",href:"https://wise.com"}}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import Emphasis from"./Emphasis";export default{component:Emphasis,title:"Typography/Emphasis",tags:["autodocs"]};export var Basic={args:{text:"This is <important>important</important>.\\nThis is <positive>positive</positive>.\\nThis is <negative>negative</negative>.\\nThis is a <warning>warning</warning>.\\n<script>alert(\"nice try!\")</script>"}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import Markdown from"./Markdown";export default{component:Markdown,title:"Typography/Markdown",tags:["autodocs"]};export var Basic={args:{children:"# Heading\n 1. item one\n 2. item two\n - sublist\n - sublist"}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Size,Status}from"../common";import ProcessIndicator from"./ProcessIndicator";export default{component:ProcessIndicator,title:"Loading/ProcessIndicator",tags:["autodocs"]};export var Basic={args:{size:Size.EXTRA_SMALL,status:Status.PROCESSING}};
|
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
2
|
+
import { StoryObj } from '@storybook/react';
|
|
3
3
|
import CheckboxButton from './CheckboxButton';
|
|
4
|
-
declare const
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
declare const _default: {
|
|
5
|
+
component: import("react").ForwardRefExoticComponent<import("./CheckboxButton").CheckboxButtonProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
6
|
+
title: string;
|
|
7
|
+
tags: string[];
|
|
8
|
+
args: {
|
|
9
|
+
onBlur: import("@storybook/addon-actions/*").HandlerFunction;
|
|
10
|
+
onClick: import("@storybook/addon-actions/*").HandlerFunction;
|
|
11
|
+
onFocus: import("@storybook/addon-actions/*").HandlerFunction;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
export default _default;
|
|
15
|
+
type Story = StoryObj<typeof CheckboxButton>;
|
|
16
|
+
export declare const Basic: Story;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
2
|
import CriticalCommsBanner from '.';
|
|
3
3
|
declare const _default: {
|
|
4
4
|
component: typeof CriticalCommsBanner;
|
|
5
5
|
title: string;
|
|
6
|
+
tags: string[];
|
|
6
7
|
};
|
|
7
8
|
export default _default;
|
|
8
|
-
|
|
9
|
+
type Story = StoryObj<typeof CriticalCommsBanner>;
|
|
10
|
+
export declare const Basic: Story;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { StoryObj } from '@storybook/react';
|
|
3
|
+
import Emphasis from './Emphasis';
|
|
4
|
+
declare const _default: {
|
|
5
|
+
component: ({ text }: {
|
|
6
|
+
text?: string | undefined;
|
|
7
|
+
}) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | null;
|
|
8
|
+
title: string;
|
|
9
|
+
tags: string[];
|
|
10
|
+
};
|
|
11
|
+
export default _default;
|
|
12
|
+
type Story = StoryObj<typeof Emphasis>;
|
|
13
|
+
export declare const Basic: Story;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { StoryObj } from '@storybook/react';
|
|
3
|
+
import Markdown from './Markdown';
|
|
4
|
+
declare const _default: {
|
|
5
|
+
component: {
|
|
6
|
+
({ as: Element, children, className, allowList, blockList, config }: {
|
|
7
|
+
as: any;
|
|
8
|
+
children: any;
|
|
9
|
+
className: any;
|
|
10
|
+
allowList: any;
|
|
11
|
+
blockList: any;
|
|
12
|
+
config: any;
|
|
13
|
+
}): JSX.Element | null;
|
|
14
|
+
propTypes: {
|
|
15
|
+
children: any;
|
|
16
|
+
as: any;
|
|
17
|
+
className: any;
|
|
18
|
+
allowList: any;
|
|
19
|
+
blockList: any;
|
|
20
|
+
config: any;
|
|
21
|
+
};
|
|
22
|
+
defaultProps: {
|
|
23
|
+
as: string;
|
|
24
|
+
className: undefined;
|
|
25
|
+
allowList: null;
|
|
26
|
+
blockList: null;
|
|
27
|
+
config: {
|
|
28
|
+
link: {
|
|
29
|
+
target: string;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
title: string;
|
|
35
|
+
tags: string[];
|
|
36
|
+
};
|
|
37
|
+
export default _default;
|
|
38
|
+
type Story = StoryObj<typeof Markdown>;
|
|
39
|
+
export declare const Basic: Story;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
import ProcessIndicator from './ProcessIndicator';
|
|
3
|
+
declare const _default: {
|
|
4
|
+
component: typeof ProcessIndicator;
|
|
5
|
+
title: string;
|
|
6
|
+
tags: string[];
|
|
7
|
+
};
|
|
8
|
+
export default _default;
|
|
9
|
+
type Story = StoryObj<typeof ProcessIndicator>;
|
|
10
|
+
export declare const Basic: Story;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@transferwise/components",
|
|
3
|
-
"version": "0.0.0-experimental-
|
|
3
|
+
"version": "0.0.0-experimental-18ef249",
|
|
4
4
|
"description": "Neptune React components",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "./build/umd/polyfill/main.js",
|
|
@@ -69,12 +69,12 @@
|
|
|
69
69
|
"rollup-plugin-uglify": "^6.0.4",
|
|
70
70
|
"storybook": "^7.0.6",
|
|
71
71
|
"@transferwise/less-config": "3.0.6",
|
|
72
|
-
"@transferwise/neptune-css": "0.0.0-experimental-
|
|
72
|
+
"@transferwise/neptune-css": "0.0.0-experimental-18ef249",
|
|
73
73
|
"@wise/components-theming": "0.7.5"
|
|
74
74
|
},
|
|
75
75
|
"peerDependencies": {
|
|
76
76
|
"@transferwise/icons": "^3.6.0",
|
|
77
|
-
"@transferwise/neptune-css": "0.0.0-experimental-
|
|
77
|
+
"@transferwise/neptune-css": "0.0.0-experimental-18ef249",
|
|
78
78
|
"@wise/art": "^2",
|
|
79
79
|
"@wise/components-theming": "0.5 - 0.7",
|
|
80
80
|
"currency-flags": "^4.0.2",
|
|
@@ -124,12 +124,12 @@
|
|
|
124
124
|
"access": "public"
|
|
125
125
|
},
|
|
126
126
|
"scripts": {
|
|
127
|
-
"dev": "npm-run-all --parallel dev:*
|
|
128
|
-
"dev:less
|
|
127
|
+
"dev": "npm-run-all --parallel dev:* sb:dev",
|
|
128
|
+
"dev:watch-less": "gulp watchLess --dest=src",
|
|
129
129
|
"dev:translations": "npx npm-watch",
|
|
130
|
-
"
|
|
131
|
-
"
|
|
132
|
-
"build
|
|
130
|
+
"sb:dev": "storybook dev -p 3001",
|
|
131
|
+
"sb:build": "storybook build",
|
|
132
|
+
"build-css": "gulp compileLess --dest=src",
|
|
133
133
|
"build": "npm-run-all build:*",
|
|
134
134
|
"build:clean": "rm -rf lib build",
|
|
135
135
|
"build:crowdin-source-file": "formatjs extract 'src/**/*.messages.+(js|ts|tsx)' --out-file src/i18n/en.json --format simple && prettier --find-config-path --write src/i18n/*.json",
|
|
@@ -144,7 +144,7 @@
|
|
|
144
144
|
"docs": "pnpm build",
|
|
145
145
|
"test": "jest --env=jsdom --maxWorkers=4",
|
|
146
146
|
"test:watch": "jest --watch --env=jsdom",
|
|
147
|
-
"test:visual": "
|
|
147
|
+
"test:visual": "build-storybook && percy storybook ./storybook-static",
|
|
148
148
|
"lint": "pnpm run lint:check",
|
|
149
149
|
"lint:check": "npm-run-all --parallel lint:check:*",
|
|
150
150
|
"lint:check:format": "prettier --check --ignore-path ../../.prettierignore . || echo \"Prettier failed. Remove this to make this a failure\"",
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Decorator } from '@storybook/react';
|
|
2
|
-
import { ChromaticParameters } from './ChromaticParameters';
|
|
3
|
-
declare module '@storybook/types' {
|
|
4
|
-
interface Parameters {
|
|
5
|
-
/** Prefer using `storyConfig` for configuring variants */
|
|
6
|
-
variants?: ('default' | 'light' | 'dark' | 'rtl' | (string & Record<string, unknown>))[];
|
|
7
|
-
/** Used by Chromatic */
|
|
8
|
-
chromatic?: ChromaticParameters;
|
|
9
|
-
viewport?: {
|
|
10
|
-
viewports?: unknown[];
|
|
11
|
-
defaultViewport?: string;
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Creates multiple variants of a component in a single story.
|
|
17
|
-
*/
|
|
18
|
-
export declare const VariantDecorator: Decorator;
|