@transferwise/components 46.164.0 → 46.165.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/build/ListItem/ListItem.js +2 -0
- package/build/ListItem/ListItem.js.map +1 -1
- package/build/ListItem/ListItem.mjs +2 -0
- package/build/ListItem/ListItem.mjs.map +1 -1
- package/build/Snackbar/Snackbar.js +98 -101
- package/build/Snackbar/Snackbar.js.map +1 -1
- package/build/Snackbar/Snackbar.mjs +99 -102
- package/build/Snackbar/Snackbar.mjs.map +1 -1
- package/build/main.css +5 -0
- package/build/styles/ListItem/ListItem.css +5 -0
- package/build/styles/main.css +5 -0
- package/build/types/Body/Body.d.ts +2 -2
- package/build/types/Carousel/_stories/constants.d.ts +25 -0
- package/build/types/Carousel/_stories/constants.d.ts.map +1 -1
- package/build/types/IconButton/IconButton.d.ts +1 -1
- package/build/types/ListItem/ListItem.d.ts +6 -1
- package/build/types/ListItem/ListItem.d.ts.map +1 -1
- package/build/types/ListItem/_stories/variants/helpers.d.ts +38 -1
- package/build/types/ListItem/_stories/variants/helpers.d.ts.map +1 -1
- package/build/types/MoneyInput/MoneyInput.d.ts +1 -1
- package/build/types/MoneyInput/MoneyInput.d.ts.map +1 -1
- package/build/types/Snackbar/Snackbar.d.ts +1 -15
- package/build/types/Snackbar/Snackbar.d.ts.map +1 -1
- package/build/types/Title/Title.d.ts +2 -2
- package/build/types/Upload/Steps/UploadImageStep/UploadImageStep.d.ts +1 -1
- package/build/types/UploadInput/UploadItem/UploadItemLink.d.ts +1 -1
- package/package.json +1 -1
- package/src/Accordion/_stories/Accordion.test.story.tsx +74 -48
- package/src/AvatarLayout/_stories/AvatarLayout.test.story.tsx +46 -30
- package/src/Button/LegacyButton/_stories/LegacyButton.test.story.tsx +29 -19
- package/src/Button/_stories/Button.test.story.tsx +96 -62
- package/src/Calendar/_stories/Calendar.test.story.tsx +34 -21
- package/src/Carousel/_stories/Carousel.test.story.tsx +18 -8
- package/src/Carousel/_stories/constants.tsx +29 -4
- package/src/Checkbox/_stories/Checkbox.test.story.tsx +22 -13
- package/src/CheckboxButton/_stories/CheckboxButton.test.story.tsx +23 -14
- package/src/Chips/_stories/Chips.test.story.tsx +51 -36
- package/src/DateInput/_stories/DateInput.rtl.test.story.tsx +62 -12
- package/src/DateLookup/_stories/DateLookup.rtl.test.story.tsx +2 -2
- package/src/Decision/_stories/Decision.test.story.tsx +74 -58
- package/src/DefinitionList/_stories/DefinitionList.test.story.tsx +58 -42
- package/src/Drawer/_stories/Drawer.rtl.test.story.tsx +65 -38
- package/src/ExpressiveMoneyInput/_stories/ExpressiveMoneyInput.rtl.test.story.tsx +107 -74
- package/src/Field/_stories/Field.test.story.tsx +18 -18
- package/src/FlowNavigation/_stories/FlowNavigation.rtl.test.story.tsx +81 -51
- package/src/Header/_stories/Header.test.story.tsx +30 -18
- package/src/Info/_stories/Info.rtl.test.story.tsx +124 -50
- package/src/InputWithDisplayFormat/_stories/InputWithDisplayFormat.test.story.tsx +4 -4
- package/src/Inputs/InputGroup/_stories/InputGroup.test.story.tsx +9 -8
- package/src/Inputs/SearchInput/_stories/SearchInput.test.story.tsx +5 -3
- package/src/Inputs/SelectInput/_stories/SelectInput.rtl.test.story.tsx +108 -79
- package/src/Inputs/TextArea/_stories/TextArea.test.story.tsx +10 -10
- package/src/InstructionsList/_stories/InstructionsList.test.story.tsx +43 -16
- package/src/Label/_stories/Label.test.story.tsx +7 -7
- package/src/Link/_stories/Link.test.story.tsx +27 -13
- package/src/ListItem/ListItem.css +5 -0
- package/src/ListItem/ListItem.less +4 -0
- package/src/ListItem/ListItem.test.tsx +17 -0
- package/src/ListItem/ListItem.tsx +7 -0
- package/src/ListItem/_stories/ListItem.layout.test.story.tsx +23 -0
- package/src/ListItem/_stories/ListItem.rtl.test.story.tsx +126 -6
- package/src/ListItem/_stories/ListItem.story.tsx +8 -0
- package/src/ListItem/_stories/variants/helpers.tsx +174 -126
- package/src/Loader/_stories/Loader.test.story.tsx +17 -10
- package/src/Modal/_stories/Modal.rtl.test.story.tsx +58 -39
- package/src/MoneyInput/_stories/MoneyInput.rtl.test.story.tsx +21 -3
- package/src/Nudge/_stories/Nudge.test.story.tsx +70 -21
- package/src/PhoneNumberInput/_stories/PhoneNumberInput.rtl.test.story.tsx +1 -1
- package/src/Popover/_stories/Popover.rtl.test.story.tsx +92 -49
- package/src/ProgressBar/_stories/ProgressBar.test.story.tsx +6 -6
- package/src/PromoCard/_stories/PromoCard.test.story.tsx +53 -29
- package/src/PromoCard/_stories/PromoCardGroup.test.story.tsx +60 -36
- package/src/Prompt/ActionPrompt/_stories/ActionPrompt.test.story.tsx +74 -38
- package/src/Prompt/CriticalBanner/_stories/CriticalBanner.test.story.tsx +68 -31
- package/src/Prompt/InfoPrompt/_stories/InfoPrompt.test.story.tsx +52 -22
- package/src/Prompt/InlinePrompt/_stories/InlinePrompt.test.story.tsx +36 -21
- package/src/Radio/_stories/Radio.test.story.tsx +60 -46
- package/src/RadioGroup/_stories/RadioGroup.test.story.tsx +70 -51
- package/src/Section/_stories/Section.test.story.tsx +30 -14
- package/src/SegmentedControl/_stories/SegmentedControl.test.story.tsx +38 -15
- package/src/SlidingPanel/_stories/SlidingPanel.rtl.test.story.tsx +58 -34
- package/src/Snackbar/Snackbar.test.tsx +16 -0
- package/src/Snackbar/Snackbar.tsx +91 -88
- package/src/Snackbar/_stories/Snackbar.rtl.test.story.tsx +24 -12
- package/src/Stepper/_stories/Stepper.test.story.tsx +27 -9
- package/src/Switch/_stories/Switch.test.story.tsx +20 -12
- package/src/Table/_stories/Table.test.story.tsx +107 -86
- package/src/Tabs/_stories/Tabs.test.story.tsx +92 -52
- package/src/Tag/_stories/Tag.test.story.tsx +27 -16
- package/src/TextareaWithDisplayFormat/_stories/TextareaWithDisplayFormat.test.story.tsx +4 -4
- package/src/Tooltip/_stories/Tooltip.rtl.test.story.tsx +68 -25
- package/src/Typeahead/_stories/Typeahead.rtl.test.story.tsx +4 -4
- package/src/Upload/_stories/Upload.rtl.test.story.tsx +49 -26
- package/src/UploadInput/_stories/UploadInput.test.story.tsx +63 -41
- package/src/_deprecated/Alert/_stories/Alert.test.story.tsx +45 -24
- package/src/_deprecated/Card/_stories/Card.test.story.tsx +47 -23
- package/src/_deprecated/CriticalBanner/_stories/CriticalCommsBanner.test.story.tsx +21 -15
- package/src/_deprecated/InlineAlert/_stories/InlineAlert.test.story.tsx +23 -12
- package/src/_deprecated/Select/_stories/Select.rtl.test.story.tsx +78 -42
- package/src/common/BottomSheet/_stories/BottomSheet.test.story.tsx +38 -20
- package/src/common/Panel/_stories/Panel.rtl.test.story.tsx +135 -51
- package/src/main.css +5 -0
|
@@ -1,125 +1,122 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useRef, useState, useEffect, useLayoutEffect } from 'react';
|
|
2
2
|
import { CSSTransition } from 'react-transition-group';
|
|
3
3
|
import Button from '../Button/Button.resolver.mjs';
|
|
4
4
|
import Body from '../Body/Body.mjs';
|
|
5
|
-
import { DirectionContext } from '../Provider/Direction/DirectionProvider.mjs';
|
|
6
5
|
import withNextPortalWrapper from '../WithNextPortal/WithNextPortal.mjs';
|
|
7
6
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
8
7
|
|
|
9
8
|
const CSS_TRANSITION_DURATION = 400;
|
|
10
|
-
|
|
11
|
-
bodyRef =
|
|
12
|
-
|
|
13
|
-
transitionTimeout = 0;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
window.clearTimeout(
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}
|
|
34
|
-
setLeaveTimeout = () => {
|
|
35
|
-
const {
|
|
36
|
-
timeout
|
|
37
|
-
} = this.props;
|
|
38
|
-
this.timeout = window.setTimeout(() => {
|
|
39
|
-
this.setState({
|
|
40
|
-
visible: false
|
|
41
|
-
});
|
|
42
|
-
}, timeout);
|
|
43
|
-
};
|
|
44
|
-
componentDidUpdate(previousProps) {
|
|
9
|
+
const Snackbar = props => {
|
|
10
|
+
const bodyRef = useRef(null);
|
|
11
|
+
const leaveTimeout = useRef(0);
|
|
12
|
+
const transitionTimeout = useRef(0);
|
|
13
|
+
/** The props of the last committed render, as `this.props` was in the class component. */
|
|
14
|
+
const committedProps = useRef(props);
|
|
15
|
+
const [state, setState] = useState({
|
|
16
|
+
visible: false,
|
|
17
|
+
text: ''
|
|
18
|
+
});
|
|
19
|
+
useEffect(() => () => {
|
|
20
|
+
window.clearTimeout(leaveTimeout.current);
|
|
21
|
+
window.clearTimeout(transitionTimeout.current);
|
|
22
|
+
}, []);
|
|
23
|
+
// Runs after every render to mirror the componentDidUpdate lifecycle this component previously
|
|
24
|
+
// relied on, including the shouldComponentUpdate guard that ignored every update without text.
|
|
25
|
+
// Layout, not passive, so a notification is shown or replaced before the browser paints, as
|
|
26
|
+
// componentDidUpdate did. Both rules below are disabled on purpose: the dependency-less effect
|
|
27
|
+
// and its synchronous state updates are what keep this conversion behaviour-identical.
|
|
28
|
+
/* eslint-disable react-hooks/exhaustive-deps, react-hooks/set-state-in-effect */
|
|
29
|
+
useLayoutEffect(() => {
|
|
30
|
+
const previousProps = committedProps.current;
|
|
31
|
+
committedProps.current = props;
|
|
45
32
|
const {
|
|
46
33
|
action,
|
|
47
34
|
text,
|
|
48
35
|
timestamp
|
|
49
|
-
} =
|
|
50
|
-
|
|
51
|
-
|
|
36
|
+
} = props;
|
|
37
|
+
// shouldComponentUpdate bailed out whenever the incoming text was empty. That also blocked the
|
|
38
|
+
// updates scheduled below, so a Snackbar whose text is cleared stays on screen until it is
|
|
39
|
+
// given text again. Preserved here deliberately to keep this refactor behaviour-identical.
|
|
40
|
+
const updateWhileTextIsPresent = update => {
|
|
41
|
+
if (committedProps.current.text) {
|
|
42
|
+
update();
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
const setLeaveTimeout = () => {
|
|
46
|
+
leaveTimeout.current = window.setTimeout(() => {
|
|
47
|
+
updateWhileTextIsPresent(() => setState(current => ({
|
|
48
|
+
...current,
|
|
49
|
+
visible: false
|
|
50
|
+
})));
|
|
51
|
+
}, committedProps.current.timeout);
|
|
52
|
+
};
|
|
53
|
+
const show = () => {
|
|
54
|
+
setState(current => ({
|
|
55
|
+
...current,
|
|
52
56
|
visible: true,
|
|
53
57
|
action,
|
|
54
58
|
text
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
|
|
59
|
+
}));
|
|
60
|
+
setLeaveTimeout();
|
|
61
|
+
};
|
|
62
|
+
if (!text) {
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
if (!previousProps.text) {
|
|
66
|
+
show();
|
|
58
67
|
} else if (previousProps.timestamp !== timestamp) {
|
|
59
|
-
window.clearTimeout(
|
|
60
|
-
if (
|
|
61
|
-
|
|
68
|
+
window.clearTimeout(leaveTimeout.current);
|
|
69
|
+
if (state.visible) {
|
|
70
|
+
setState(current => ({
|
|
71
|
+
...current,
|
|
62
72
|
visible: false
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
action,
|
|
68
|
-
text
|
|
69
|
-
});
|
|
70
|
-
this.setLeaveTimeout();
|
|
71
|
-
}, CSS_TRANSITION_DURATION);
|
|
72
|
-
});
|
|
73
|
+
}));
|
|
74
|
+
transitionTimeout.current = window.setTimeout(() => {
|
|
75
|
+
updateWhileTextIsPresent(show);
|
|
76
|
+
}, CSS_TRANSITION_DURATION);
|
|
73
77
|
} else {
|
|
74
|
-
|
|
75
|
-
visible: true,
|
|
76
|
-
action,
|
|
77
|
-
text
|
|
78
|
-
});
|
|
79
|
-
this.setLeaveTimeout();
|
|
78
|
+
show();
|
|
80
79
|
}
|
|
81
80
|
}
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
})
|
|
81
|
+
});
|
|
82
|
+
/* eslint-enable react-hooks/exhaustive-deps, react-hooks/set-state-in-effect */
|
|
83
|
+
const {
|
|
84
|
+
action,
|
|
85
|
+
text,
|
|
86
|
+
visible
|
|
87
|
+
} = state;
|
|
88
|
+
const {
|
|
89
|
+
timeout
|
|
90
|
+
} = props;
|
|
91
|
+
return /*#__PURE__*/jsx("div", {
|
|
92
|
+
className: "snackbar",
|
|
93
|
+
"aria-live": "assertive",
|
|
94
|
+
role: "alert",
|
|
95
|
+
children: /*#__PURE__*/jsx(CSSTransition, {
|
|
96
|
+
nodeRef: bodyRef,
|
|
97
|
+
in: visible,
|
|
98
|
+
classNames: "snackbar__text-container",
|
|
99
|
+
timeout: {
|
|
100
|
+
appear: 0,
|
|
101
|
+
enter: timeout,
|
|
102
|
+
exit: CSS_TRANSITION_DURATION
|
|
103
|
+
},
|
|
104
|
+
unmountOnExit: true,
|
|
105
|
+
children: /*#__PURE__*/jsxs(Body, {
|
|
106
|
+
ref: bodyRef,
|
|
107
|
+
as: "span",
|
|
108
|
+
className: "snackbar__text",
|
|
109
|
+
children: [text, action ? /*#__PURE__*/jsx(Button, {
|
|
110
|
+
className: "snackbar__text__action",
|
|
111
|
+
v2: true,
|
|
112
|
+
size: "sm",
|
|
113
|
+
onClick: action.onClick,
|
|
114
|
+
children: action.label
|
|
115
|
+
}) : null]
|
|
118
116
|
})
|
|
119
|
-
})
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
Snackbar.contextType = DirectionContext;
|
|
117
|
+
})
|
|
118
|
+
});
|
|
119
|
+
};
|
|
123
120
|
var SnackbarPortal = withNextPortalWrapper(Snackbar);
|
|
124
121
|
|
|
125
122
|
export { Snackbar, SnackbarPortal as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Snackbar.mjs","sources":["../../src/Snackbar/Snackbar.tsx"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"Snackbar.mjs","sources":["../../src/Snackbar/Snackbar.tsx"],"sourcesContent":["import { useEffect, useLayoutEffect, useRef, useState } from 'react';\nimport { CSSTransition } from 'react-transition-group';\n\nimport Button from '../Button';\nimport Body from '../Body';\nimport type { ThemeDark, ThemeLight } from '../common';\nimport withNextPortal from '../WithNextPortal/WithNextPortal';\n\nconst CSS_TRANSITION_DURATION = 400;\n\nexport interface SnackbarProps {\n action?: {\n label: string;\n onClick?: React.MouseEventHandler<HTMLButtonElement>;\n };\n text: React.ReactNode;\n /** @deprecated */\n theme?: ThemeLight | ThemeDark;\n timeout: number;\n timestamp: number;\n}\n\ninterface SnackbarState extends Pick<SnackbarProps, 'action' | 'text' | 'theme'> {\n visible: boolean;\n}\n\nexport const Snackbar = (props: SnackbarProps) => {\n const bodyRef = useRef<HTMLSpanElement>(null);\n const leaveTimeout = useRef(0);\n const transitionTimeout = useRef(0);\n /** The props of the last committed render, as `this.props` was in the class component. */\n const committedProps = useRef(props);\n\n const [state, setState] = useState<SnackbarState>({\n visible: false,\n text: '',\n });\n\n useEffect(\n () => () => {\n window.clearTimeout(leaveTimeout.current);\n window.clearTimeout(transitionTimeout.current);\n },\n [],\n );\n\n // Runs after every render to mirror the componentDidUpdate lifecycle this component previously\n // relied on, including the shouldComponentUpdate guard that ignored every update without text.\n // Layout, not passive, so a notification is shown or replaced before the browser paints, as\n // componentDidUpdate did. Both rules below are disabled on purpose: the dependency-less effect\n // and its synchronous state updates are what keep this conversion behaviour-identical.\n /* eslint-disable react-hooks/exhaustive-deps, react-hooks/set-state-in-effect */\n useLayoutEffect(() => {\n const previousProps = committedProps.current;\n committedProps.current = props;\n\n const { action, text, timestamp } = props;\n\n // shouldComponentUpdate bailed out whenever the incoming text was empty. That also blocked the\n // updates scheduled below, so a Snackbar whose text is cleared stays on screen until it is\n // given text again. Preserved here deliberately to keep this refactor behaviour-identical.\n const updateWhileTextIsPresent = (update: () => void) => {\n if (committedProps.current.text) {\n update();\n }\n };\n\n const setLeaveTimeout = () => {\n leaveTimeout.current = window.setTimeout(() => {\n updateWhileTextIsPresent(() => setState((current) => ({ ...current, visible: false })));\n }, committedProps.current.timeout);\n };\n\n const show = () => {\n setState((current) => ({ ...current, visible: true, action, text }));\n setLeaveTimeout();\n };\n\n if (!text) {\n return;\n }\n\n if (!previousProps.text) {\n show();\n } else if (previousProps.timestamp !== timestamp) {\n window.clearTimeout(leaveTimeout.current);\n\n if (state.visible) {\n setState((current) => ({ ...current, visible: false }));\n transitionTimeout.current = window.setTimeout(() => {\n updateWhileTextIsPresent(show);\n }, CSS_TRANSITION_DURATION);\n } else {\n show();\n }\n }\n });\n /* eslint-enable react-hooks/exhaustive-deps, react-hooks/set-state-in-effect */\n\n const { action, text, visible } = state;\n const { timeout } = props;\n\n return (\n <div className=\"snackbar\" aria-live=\"assertive\" role=\"alert\">\n <CSSTransition\n nodeRef={bodyRef}\n in={visible}\n classNames=\"snackbar__text-container\"\n timeout={{\n appear: 0,\n enter: timeout,\n exit: CSS_TRANSITION_DURATION,\n }}\n unmountOnExit\n >\n <Body ref={bodyRef} as=\"span\" className=\"snackbar__text\">\n {text}\n {action ? (\n <Button className=\"snackbar__text__action\" v2 size=\"sm\" onClick={action.onClick}>\n {action.label}\n </Button>\n ) : null}\n </Body>\n </CSSTransition>\n </div>\n );\n};\n\nexport default withNextPortal(Snackbar);\n"],"names":["CSS_TRANSITION_DURATION","Snackbar","props","bodyRef","useRef","leaveTimeout","transitionTimeout","committedProps","state","setState","useState","visible","text","useEffect","window","clearTimeout","current","useLayoutEffect","previousProps","action","timestamp","updateWhileTextIsPresent","update","setLeaveTimeout","setTimeout","timeout","show","_jsx","className","role","children","CSSTransition","nodeRef","in","classNames","appear","enter","exit","unmountOnExit","_jsxs","Body","ref","as","Button","v2","size","onClick","label","withNextPortal"],"mappings":";;;;;;;AAQA,MAAMA,uBAAuB,GAAG,GAAG;AAkB5B,MAAMC,QAAQ,GAAIC,KAAoB,IAAI;AAC/C,EAAA,MAAMC,OAAO,GAAGC,MAAM,CAAkB,IAAI,CAAC;AAC7C,EAAA,MAAMC,YAAY,GAAGD,MAAM,CAAC,CAAC,CAAC;AAC9B,EAAA,MAAME,iBAAiB,GAAGF,MAAM,CAAC,CAAC,CAAC;AACnC;AACA,EAAA,MAAMG,cAAc,GAAGH,MAAM,CAACF,KAAK,CAAC;AAEpC,EAAA,MAAM,CAACM,KAAK,EAAEC,QAAQ,CAAC,GAAGC,QAAQ,CAAgB;AAChDC,IAAAA,OAAO,EAAE,KAAK;AACdC,IAAAA,IAAI,EAAE;AACP,GAAA,CAAC;EAEFC,SAAS,CACP,MAAM,MAAK;AACTC,IAAAA,MAAM,CAACC,YAAY,CAACV,YAAY,CAACW,OAAO,CAAC;AACzCF,IAAAA,MAAM,CAACC,YAAY,CAACT,iBAAiB,CAACU,OAAO,CAAC;EAChD,CAAC,EACD,EAAE,CACH;AAED;AACA;AACA;AACA;AACA;AACA;AACAC,EAAAA,eAAe,CAAC,MAAK;AACnB,IAAA,MAAMC,aAAa,GAAGX,cAAc,CAACS,OAAO;IAC5CT,cAAc,CAACS,OAAO,GAAGd,KAAK;IAE9B,MAAM;MAAEiB,MAAM;MAAEP,IAAI;AAAEQ,MAAAA;AAAS,KAAE,GAAGlB,KAAK;AAEzC;AACA;AACA;IACA,MAAMmB,wBAAwB,GAAIC,MAAkB,IAAI;AACtD,MAAA,IAAIf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,IAAA;AACF,EAAA,CAAC,CAAC;AACF;EAEA,MAAM;IAAEP,MAAM;IAAEP,IAAI;AAAED,IAAAA;AAAO,GAAE,GAAGH,KAAK;EACvC,MAAM;AAAEiB,IAAAA;AAAO,GAAE,GAAGvB,KAAK;AAEzB,EAAA,oBACEyB,GAAA,CAAA,KAAA,EAAA;AAAKC,IAAAA,SAAS,EAAC,UAAU;AAAC,IAAA,WAAA,EAAU,WAAW;AAACC,IAAAA,IAAI,EAAC,OAAO;IAAAC,QAAA,eAC1DH,GAAA,CAACI,aAAa,EAAA;AACZC,MAAAA,OAAO,EAAE7B,OAAQ;AACjB8B,MAAAA,EAAE,EAAEtB,OAAQ;AACZuB,MAAAA,UAAU,EAAC,0BAA0B;AACrCT,MAAAA,OAAO,EAAE;AACPU,QAAAA,MAAM,EAAE,CAAC;AACTC,QAAAA,KAAK,EAAEX,OAAO;AACdY,QAAAA,IAAI,EAAErC;OACN;MACFsC,aAAa,EAAA,IAAA;MAAAR,QAAA,eAEbS,IAAA,CAACC,IAAI,EAAA;AAACC,QAAAA,GAAG,EAAEtC,OAAQ;AAACuC,QAAAA,EAAE,EAAC,MAAM;AAACd,QAAAA,SAAS,EAAC,gBAAgB;AAAAE,QAAAA,QAAA,GACrDlB,IAAI,EACJO,MAAM,gBACLQ,GAAA,CAACgB,MAAM,EAAA;AAACf,UAAAA,SAAS,EAAC,wBAAwB;UAACgB,EAAE,EAAA,IAAA;AAACC,UAAAA,IAAI,EAAC,IAAI;UAACC,OAAO,EAAE3B,MAAM,CAAC2B,OAAQ;UAAAhB,QAAA,EAC7EX,MAAM,CAAC4B;SACF,CAAC,GACP,IAAI;OACJ;KACO;AACjB,GAAK,CAAC;AAEV;AAEA,qBAAeC,qBAAc,CAAC/C,QAAQ,CAAC;;"}
|
package/build/main.css
CHANGED
|
@@ -23806,6 +23806,11 @@ button.np-option {
|
|
|
23806
23806
|
padding-inline: 0;
|
|
23807
23807
|
container-type: inline-size;
|
|
23808
23808
|
}
|
|
23809
|
+
.wds-list-item-paddingY-24 {
|
|
23810
|
+
padding-block: 24px;
|
|
23811
|
+
padding-block: var(--size-24);
|
|
23812
|
+
padding-inline: 0;
|
|
23813
|
+
}
|
|
23809
23814
|
.wds-list-item + .wds-list-item-spotlight,
|
|
23810
23815
|
.wds-list-item-spotlight + .wds-list-item {
|
|
23811
23816
|
margin-block-start: 16px;
|
|
@@ -397,6 +397,11 @@
|
|
|
397
397
|
padding-inline: 0;
|
|
398
398
|
container-type: inline-size;
|
|
399
399
|
}
|
|
400
|
+
.wds-list-item-paddingY-24 {
|
|
401
|
+
padding-block: 24px;
|
|
402
|
+
padding-block: var(--size-24);
|
|
403
|
+
padding-inline: 0;
|
|
404
|
+
}
|
|
400
405
|
.wds-list-item + .wds-list-item-spotlight,
|
|
401
406
|
.wds-list-item-spotlight + .wds-list-item {
|
|
402
407
|
margin-block-start: 16px;
|
package/build/styles/main.css
CHANGED
|
@@ -23806,6 +23806,11 @@ button.np-option {
|
|
|
23806
23806
|
padding-inline: 0;
|
|
23807
23807
|
container-type: inline-size;
|
|
23808
23808
|
}
|
|
23809
|
+
.wds-list-item-paddingY-24 {
|
|
23810
|
+
padding-block: 24px;
|
|
23811
|
+
padding-block: var(--size-24);
|
|
23812
|
+
padding-inline: 0;
|
|
23813
|
+
}
|
|
23809
23814
|
.wds-list-item + .wds-list-item-spotlight,
|
|
23810
23815
|
.wds-list-item-spotlight + .wds-list-item {
|
|
23811
23816
|
margin-block-start: 16px;
|
|
@@ -11,7 +11,7 @@ export type BodyProps = HTMLAttributes<HTMLSpanElement | HTMLParagraphElement> &
|
|
|
11
11
|
*/
|
|
12
12
|
preserveNewlines?: boolean;
|
|
13
13
|
};
|
|
14
|
-
declare const Body: import("react").ForwardRefExoticComponent<HTMLAttributes<
|
|
14
|
+
declare const Body: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLParagraphElement | HTMLSpanElement> & {
|
|
15
15
|
/** @default 'body-default' */
|
|
16
16
|
type?: BodyTypes;
|
|
17
17
|
/** @default 'div' */
|
|
@@ -21,6 +21,6 @@ declare const Body: import("react").ForwardRefExoticComponent<HTMLAttributes<HTM
|
|
|
21
21
|
* @default false
|
|
22
22
|
*/
|
|
23
23
|
preserveNewlines?: boolean;
|
|
24
|
-
} & import("react").RefAttributes<HTMLDivElement |
|
|
24
|
+
} & import("react").RefAttributes<HTMLDivElement | HTMLParagraphElement | HTMLSpanElement | null>>;
|
|
25
25
|
export default Body;
|
|
26
26
|
//# sourceMappingURL=Body.d.ts.map
|
|
@@ -1,3 +1,28 @@
|
|
|
1
1
|
import type { CarouselCard } from '../Carousel';
|
|
2
|
+
/**
|
|
3
|
+
* Every string the stubbed cards render, shaped as a `withRTLDiff({ i18n })` map so the RTL diff
|
|
4
|
+
* can spread it — that call site is what type-checks the shape against `I18nMap`. The type is not
|
|
5
|
+
* imported here: this file is part of the Rollup build, which cannot emit declarations that
|
|
6
|
+
* reference `.storybook/`. The promo card's `Wise` title is a brand name and stays in Latin script.
|
|
7
|
+
*/
|
|
8
|
+
export declare const carouselCardsI18n: {
|
|
9
|
+
globeCardTitle: {
|
|
10
|
+
en: string;
|
|
11
|
+
ar: string;
|
|
12
|
+
};
|
|
13
|
+
promoDescription: {
|
|
14
|
+
en: string;
|
|
15
|
+
ar: string;
|
|
16
|
+
};
|
|
17
|
+
quickPayCardTitle: {
|
|
18
|
+
en: string;
|
|
19
|
+
ar: string;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Takes copy already resolved for one language — exactly what `useRtlDiffI18n()` returns — so the
|
|
24
|
+
* same fixture serves the single-direction stories and the RTL diff.
|
|
25
|
+
*/
|
|
26
|
+
export declare const getStubbedCarouselCards: (i18n: Record<string, string>) => CarouselCard[];
|
|
2
27
|
export declare const stubbedCarouselCards: CarouselCard[];
|
|
3
28
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/Carousel/_stories/constants.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/Carousel/_stories/constants.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;CAO7B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,uBAAuB,GAAI,MAAM,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAAG,YAAY,EAyClF,CAAC;AAMF,eAAO,MAAM,oBAAoB,gBAAuC,CAAC"}
|
|
@@ -16,6 +16,6 @@ declare const IconButton: import("react").ForwardRefExoticComponent<{
|
|
|
16
16
|
/** @default 'default' */
|
|
17
17
|
type?: "default" | "negative";
|
|
18
18
|
'data-testid'?: string;
|
|
19
|
-
} & Pick<AnchorHTMLAttributes<HTMLAnchorElement>, "onClick" | "target" | "href"> & Pick<ButtonHTMLAttributes<HTMLButtonElement>, "disabled" | "onClick"> & Pick<HTMLAttributes<HTMLDivElement>, "
|
|
19
|
+
} & Pick<AnchorHTMLAttributes<HTMLAnchorElement>, "onClick" | "target" | "href"> & Pick<ButtonHTMLAttributes<HTMLButtonElement>, "disabled" | "onClick"> & Pick<HTMLAttributes<HTMLDivElement>, "id" | "className" | "tabIndex" | "role" | "aria-label" | "children"> & import("react").RefAttributes<unknown>>;
|
|
20
20
|
export default IconButton;
|
|
21
21
|
//# sourceMappingURL=IconButton.d.ts.map
|
|
@@ -28,6 +28,11 @@ export type ListItemProps = {
|
|
|
28
28
|
* Highlights the list item as an action to be taken or already taken. <br />
|
|
29
29
|
*/
|
|
30
30
|
spotlight?: 'active' | 'inactive';
|
|
31
|
+
/**
|
|
32
|
+
* Vertical padding of the list item, in pixels.
|
|
33
|
+
* @default 12
|
|
34
|
+
*/
|
|
35
|
+
paddingY?: 12 | 24;
|
|
31
36
|
title: ReactNode;
|
|
32
37
|
subtitle?: ReactNode;
|
|
33
38
|
/**
|
|
@@ -72,7 +77,7 @@ export type ListItemProps = {
|
|
|
72
77
|
* @see [Storybook documentation](https://storybook.wise.design/?path=/docs/content-listitem--docs)
|
|
73
78
|
*/
|
|
74
79
|
export declare const ListItem: {
|
|
75
|
-
({ as: ListItemElement, title, subtitle, additionalInfo, prompt, inverted, media, spotlight, valueTitle, valueSubtitle, control, disabled, disabledPromptMessage, className, valueColumnWidth, id, }: ListItemProps): import("react").JSX.Element;
|
|
80
|
+
({ as: ListItemElement, title, subtitle, additionalInfo, prompt, inverted, media, spotlight, paddingY, valueTitle, valueSubtitle, control, disabled, disabledPromptMessage, className, valueColumnWidth, id, }: ListItemProps): import("react").JSX.Element;
|
|
76
81
|
Image: {
|
|
77
82
|
({ alt, size, className, ...props }: import("./Image").ListItemImageProps): import("react").JSX.Element;
|
|
78
83
|
displayName: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListItem.d.ts","sourceRoot":"","sources":["../../../src/ListItem/ListItem.tsx"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAIf,OAAO,EAAc,KAAK,uBAAuB,EAAE,MAAM,cAAc,CAAC;AACxE,OAAO,EAAY,KAAK,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAClE,OAAO,EAAc,KAAK,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAExE,OAAO,EAAU,KAAK,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAC5D,OAAO,EAAS,KAAK,kBAAkB,EAAE,MAAM,SAAS,CAAC;AACzD,OAAO,EAAU,KAAK,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAY5D,MAAM,MAAM,aAAa,GACvB,iBAAiB,GAAG,YAAY,GAAG,OAAO,GAAG,UAAU,GAAG,QAA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B;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,EAAE,CAAC,EAAE,MAAM,CAAC;CACb,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,QAAQ;oNAkBlB,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0Of,CAAC;AA6GF,eAAe,QAAQ,CAAC"}
|
|
@@ -1,10 +1,47 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
1
2
|
import { StoryObj } from '@storybook/react-webpack5';
|
|
3
|
+
import { type ListItemProps } from '../../ListItem';
|
|
2
4
|
import { SB_ListItem_ControlType as ControlType } from '../subcomponents';
|
|
5
|
+
type VariantPartial = {
|
|
6
|
+
title: string;
|
|
7
|
+
} & Partial<ListItemProps>;
|
|
3
8
|
type Variant = 'default' | 'dark' | 'rtl' | 'forest-green' | 'bright-green' | 'mobile' | '400%';
|
|
4
|
-
type
|
|
9
|
+
export type VariantText = {
|
|
10
|
+
title: string;
|
|
11
|
+
subtitle: string;
|
|
12
|
+
valueTitle: string;
|
|
13
|
+
valueSubtitle: string;
|
|
14
|
+
longTitle: string;
|
|
15
|
+
longSubtitle: string;
|
|
16
|
+
longValueTitle: ReactNode;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Every piece of copy and every slot the instance matrix is built from. Extracted so a story can
|
|
20
|
+
* render the same matrix with different content — the RTL diff swaps in localised versions.
|
|
21
|
+
*/
|
|
22
|
+
export type VariantContent = {
|
|
23
|
+
text: VariantText;
|
|
24
|
+
media: ReactNode;
|
|
25
|
+
additionalInfo: {
|
|
26
|
+
interactive: ReactNode;
|
|
27
|
+
nonInteractive: ReactNode;
|
|
28
|
+
};
|
|
29
|
+
prompt: {
|
|
30
|
+
interactive: ReactNode;
|
|
31
|
+
nonInteractive: ReactNode;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
export declare const DEFAULT_VARIANT_CONTENT: VariantContent;
|
|
35
|
+
export declare const getVariantInstances: (controlType: ControlType, { text, media, additionalInfo: info, prompt: prompts }: VariantContent) => VariantPartial[];
|
|
36
|
+
export type VariantStoryProps = {
|
|
5
37
|
controlType: ControlType;
|
|
6
38
|
variant?: Variant;
|
|
7
39
|
};
|
|
40
|
+
type VariantListProps = VariantStoryProps & {
|
|
41
|
+
content?: VariantContent;
|
|
42
|
+
controls?: Record<ControlType, ReactNode>;
|
|
43
|
+
};
|
|
44
|
+
export declare const VariantList: ({ controlType, variant, content, controls, }: VariantListProps) => import("react").JSX.Element;
|
|
8
45
|
type VariantStory = StoryObj<VariantStoryProps>;
|
|
9
46
|
export declare const VariantStory: VariantStory;
|
|
10
47
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../../src/ListItem/_stories/variants/helpers.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../../src/ListItem/_stories/variants/helpers.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAErD,OAAO,EAAY,KAAK,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EAML,uBAAuB,IAAI,WAAW,EACvC,MAAM,kBAAkB,CAAC;AAE1B,KAAK,cAAc,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;AACjE,KAAK,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,KAAK,GAAG,cAAc,GAAG,cAAc,GAAG,QAAQ,GAAG,MAAM,CAAC;AAShG,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,SAAS,CAAC;CAC3B,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,EAAE,WAAW,CAAC;IAClB,KAAK,EAAE,SAAS,CAAC;IACjB,cAAc,EAAE;QAAE,WAAW,EAAE,SAAS,CAAC;QAAC,cAAc,EAAE,SAAS,CAAA;KAAE,CAAC;IACtE,MAAM,EAAE;QAAE,WAAW,EAAE,SAAS,CAAC;QAAC,cAAc,EAAE,SAAS,CAAA;KAAE,CAAC;CAC/D,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,cAKrC,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAC9B,aAAa,WAAW,EACxB,wDAAwD,cAAc,KACrE,cAAc,EA8GhB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,WAAW,EAAE,WAAW,CAAC;IACzB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,KAAK,gBAAgB,GAAG,iBAAiB,GAAG;IAC1C,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;CAC3C,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,8CAKzB,gBAAgB,gCAUlB,CAAC;AAEF,KAAK,YAAY,GAAG,QAAQ,CAAC,iBAAiB,CAAC,CAAC;AAEhD,eAAO,MAAM,YAAY,EAAE,YAK1B,CAAC"}
|
|
@@ -55,6 +55,7 @@ declare const _default: import("react").FC<{
|
|
|
55
55
|
selectProps?: Partial<SelectInputProps<CurrencyOptionItem>> | undefined;
|
|
56
56
|
amount: number | null;
|
|
57
57
|
searchPlaceholder?: string | undefined;
|
|
58
|
+
decimals?: number | undefined;
|
|
58
59
|
currencies: readonly CurrencyItem[];
|
|
59
60
|
selectedCurrency: CurrencyOptionItem;
|
|
60
61
|
onCurrencyChange?: ((value: CurrencyOptionItem) => void) | undefined;
|
|
@@ -66,7 +67,6 @@ declare const _default: import("react").FC<{
|
|
|
66
67
|
}) => void) | undefined;
|
|
67
68
|
customActionLabel?: import("react").ReactNode;
|
|
68
69
|
onCustomAction?: (() => void) | undefined;
|
|
69
|
-
decimals?: number | undefined;
|
|
70
70
|
}>;
|
|
71
71
|
export default _default;
|
|
72
72
|
//# sourceMappingURL=MoneyInput.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MoneyInput.d.ts","sourceRoot":"","sources":["../../../src/MoneyInput/MoneyInput.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAc,KAAK,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAE9E,OAAO,EAGL,SAAS,EACT,UAAU,EACV,SAAS,EAEV,MAAM,WAAW,CAAC;AACnB,OAAO,EAAuB,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAEnF,OAAO,EAKL,gBAAgB,EACjB,MAAM,uBAAuB,CAAC;AAO/B,MAAM,WAAW,kBAAkB;IACjC,MAAM,CAAC,EAAE,KAAK,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,MAAM,YAAY,GAAG,kBAAkB,GAAG,kBAAkB,CAAC;AAoDnE,MAAM,WAAW,eAAgB,SAAQ,qBAAqB;IAC5D,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,UAAU,EAAE,SAAS,YAAY,EA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H,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,WAAW,EAAE,MAAM,CAAC;QAAC,eAAe,EAAE,YAAY,EAAE,CAAA;KAAE,KAAK,IAAI,CAAC;IAC3F,iBAAiB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACpC,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,WAAW,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,kBAAkB,CAAC,CAAC,CAAC;IAC5D;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,MAAM,kCAAkC,GAAG,eAAe,GAC9D,OAAO,CAAC,wBAAwB,CAAC,CAAC;;SA5B7B,MAAM;wBACS,MAAM;YAMnB,SAAS,GAAG,UAAU,GAAG,SAAS;kBAF3B,MAAM;iBAYP,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;kBACrB,OAAO,CAAC,gBAAgB,CAAC,kBAAkB,CAAC,CAAC;YAZnD,MAAM,GAAG,IAAI;wBAID,MAAM;eAcf,MAAM;gBAtBL,SAAS,YAAY,EAAE;sBACjB,kBAAkB;wBACjB,CAAC,KAAK,EAAE,kBAAkB,KAAK,IAAI;sBAIrC,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI;;sBAM9B,CAAC,KAAK,EAAE;QAAE,WAAW,EAAE,MAAM,CAAC;QAAC,eAAe,EAAE,YAAY,EAAE,CAAA;KAAE,KAAK,IAAI;;sBAEzE,MAAM,IAAI;;AAkb7B,wBAA2F"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Component } from 'react';
|
|
2
1
|
import type { ThemeDark, ThemeLight } from '../common';
|
|
3
2
|
export interface SnackbarProps {
|
|
4
3
|
action?: {
|
|
@@ -11,20 +10,7 @@ export interface SnackbarProps {
|
|
|
11
10
|
timeout: number;
|
|
12
11
|
timestamp: number;
|
|
13
12
|
}
|
|
14
|
-
|
|
15
|
-
visible: boolean;
|
|
16
|
-
}
|
|
17
|
-
export declare class Snackbar extends Component<SnackbarProps, SnackbarState> {
|
|
18
|
-
bodyRef: import("react").RefObject<HTMLSpanElement>;
|
|
19
|
-
timeout: number;
|
|
20
|
-
transitionTimeout: number;
|
|
21
|
-
constructor(props: SnackbarProps);
|
|
22
|
-
componentWillUnmount(): void;
|
|
23
|
-
shouldComponentUpdate(nextProps: SnackbarProps, nextState: SnackbarState): boolean;
|
|
24
|
-
setLeaveTimeout: () => void;
|
|
25
|
-
componentDidUpdate(previousProps: SnackbarProps): void;
|
|
26
|
-
render(): import("react").JSX.Element;
|
|
27
|
-
}
|
|
13
|
+
export declare const Snackbar: (props: SnackbarProps) => import("react").JSX.Element;
|
|
28
14
|
declare const _default: (props: SnackbarProps) => import("react").ReactPortal | null;
|
|
29
15
|
export default _default;
|
|
30
16
|
//# sourceMappingURL=Snackbar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Snackbar.d.ts","sourceRoot":"","sources":["../../../src/Snackbar/Snackbar.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Snackbar.d.ts","sourceRoot":"","sources":["../../../src/Snackbar/Snackbar.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAKvD,MAAM,WAAW,aAAa;IAC5B,MAAM,CAAC,EAAE;QACP,KAAK,EAAE,MAAM,CAAC;QACd,OAAO,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;KACtD,CAAC;IACF,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC;IACtB,kBAAkB;IAClB,KAAK,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;CACnB;AAMD,eAAO,MAAM,QAAQ,GAAI,OAAO,aAAa,gCAoG5C,CAAC;;AAEF,wBAAwC"}
|
|
@@ -10,7 +10,7 @@ export type TitleProps = LabelHTMLAttributes<HTMLHeadingElement | HTMLSpanElemen
|
|
|
10
10
|
*/
|
|
11
11
|
type?: TitleTypes;
|
|
12
12
|
};
|
|
13
|
-
declare const Title: React.ForwardRefExoticComponent<React.LabelHTMLAttributes<
|
|
13
|
+
declare const Title: React.ForwardRefExoticComponent<React.LabelHTMLAttributes<HTMLHeadingElement | HTMLLabelElement | HTMLSpanElement> & React.LiHTMLAttributes<HTMLLIElement> & {
|
|
14
14
|
/**
|
|
15
15
|
* Default value will based one `type` prop
|
|
16
16
|
*/
|
|
@@ -19,6 +19,6 @@ declare const Title: React.ForwardRefExoticComponent<React.LabelHTMLAttributes<H
|
|
|
19
19
|
* Default value: {@link DEFAULT_TYPE}
|
|
20
20
|
*/
|
|
21
21
|
type?: TitleTypes;
|
|
22
|
-
} & React.RefAttributes<
|
|
22
|
+
} & React.RefAttributes<HTMLHeadingElement | HTMLLabelElement | HTMLLegendElement | HTMLLIElement | HTMLSpanElement>>;
|
|
23
23
|
export default Title;
|
|
24
24
|
//# sourceMappingURL=Title.d.ts.map
|
|
@@ -15,7 +15,7 @@ export default class UploadImageStep extends PureComponent<UploadImageStepProps>
|
|
|
15
15
|
uploadInputRef: import("react").RefObject<HTMLInputElement>;
|
|
16
16
|
onManualUpload: () => void;
|
|
17
17
|
onKeyDown: (event: React.KeyboardEvent<HTMLLabelElement>) => void;
|
|
18
|
-
getImage: () => number | true | import("react").
|
|
18
|
+
getImage: () => number | true | Iterable<import("react").ReactNode> | import("react").JSX.Element;
|
|
19
19
|
render(): import("react").JSX.Element;
|
|
20
20
|
}
|
|
21
21
|
//# sourceMappingURL=UploadImageStep.d.ts.map
|
|
@@ -5,5 +5,5 @@ export declare const UploadItemLink: import("react").ForwardRefExoticComponent<{
|
|
|
5
5
|
singleFileUpload: boolean;
|
|
6
6
|
} & {
|
|
7
7
|
children?: import("react").ReactNode | undefined;
|
|
8
|
-
} & import("react").RefAttributes<
|
|
8
|
+
} & import("react").RefAttributes<HTMLAnchorElement | HTMLDivElement>>;
|
|
9
9
|
//# sourceMappingURL=UploadItemLink.d.ts.map
|