paris 0.17.9 → 0.18.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/CHANGELOG.md +16 -0
- package/package.json +139 -150
- package/src/helpers/renderEnhancer.tsx +4 -5
- package/src/helpers/useResizeObserver.ts +17 -23
- package/src/pages/_document.tsx +1 -3
- package/src/pages/index.tsx +8 -24
- package/src/stories/Pagination.mdx +1 -1
- package/src/stories/Tokens.mdx +1 -1
- package/src/stories/Welcome.mdx +1 -1
- package/src/stories/accordion/Accordion.stories.ts +1 -1
- package/src/stories/accordion/Accordion.tsx +14 -35
- package/src/stories/accordionselect/AccordionSelect.stories.ts +2 -5
- package/src/stories/accordionselect/AccordionSelect.tsx +26 -50
- package/src/stories/avatar/Avatar.stories.ts +1 -1
- package/src/stories/avatar/Avatar.tsx +14 -13
- package/src/stories/button/Button.stories.ts +18 -15
- package/src/stories/button/Button.tsx +44 -48
- package/src/stories/callout/Callout.stories.ts +3 -7
- package/src/stories/callout/Callout.tsx +4 -8
- package/src/stories/card/Card.stories.ts +1 -1
- package/src/stories/card/Card.tsx +4 -11
- package/src/stories/cardbutton/CardButton.stories.tsx +1 -1
- package/src/stories/cardbutton/CardButton.tsx +16 -18
- package/src/stories/checkbox/Checkbox.stories.ts +1 -1
- package/src/stories/checkbox/Checkbox.tsx +37 -49
- package/src/stories/combobox/Combobox.stories.ts +65 -71
- package/src/stories/combobox/Combobox.tsx +80 -89
- package/src/stories/dialog/Dialog.stories.tsx +2 -2
- package/src/stories/dialog/Dialog.tsx +45 -68
- package/src/stories/drawer/Drawer.stories.tsx +63 -105
- package/src/stories/drawer/Drawer.tsx +93 -90
- package/src/stories/field/Field.stories.ts +1 -1
- package/src/stories/field/Field.tsx +25 -30
- package/src/stories/icon/Ellipsis.tsx +4 -1
- package/src/stories/icon/Icon.stories.ts +2 -2
- package/src/stories/icon/Icon.tsx +16 -26
- package/src/stories/icon/Info.tsx +4 -1
- package/src/stories/icon/Spinner.tsx +4 -2
- package/src/stories/icon/index.ts +6 -6
- package/src/stories/informationaltooltip/InformationalTooltip.stories.tsx +12 -11
- package/src/stories/informationaltooltip/InformationalTooltip.tsx +23 -28
- package/src/stories/input/Input.stories.ts +14 -15
- package/src/stories/input/Input.tsx +119 -95
- package/src/stories/markdown/Markdown.module.scss +384 -0
- package/src/stories/markdown/Markdown.stories.ts +203 -0
- package/src/stories/markdown/Markdown.tsx +293 -0
- package/src/stories/markdown/index.ts +1 -0
- package/src/stories/menu/Menu.module.scss +9 -0
- package/src/stories/menu/Menu.stories.tsx +4 -10
- package/src/stories/menu/Menu.tsx +27 -29
- package/src/stories/pagination/usePagination.ts +8 -8
- package/src/stories/popover/Popover.stories.ts +2 -2
- package/src/stories/popover/Popover.tsx +4 -10
- package/src/stories/select/Select.stories.ts +10 -10
- package/src/stories/select/Select.tsx +268 -240
- package/src/stories/styledlink/StyledLink.stories.ts +1 -1
- package/src/stories/styledlink/StyledLink.tsx +11 -17
- package/src/stories/table/Table.stories.ts +1 -1
- package/src/stories/table/Table.tsx +55 -65
- package/src/stories/tabs/Tabs.stories.tsx +2 -2
- package/src/stories/tabs/Tabs.tsx +15 -21
- package/src/stories/tag/Tag.stories.ts +1 -4
- package/src/stories/tag/Tag.tsx +9 -17
- package/src/stories/text/Text.stories.ts +1 -1
- package/src/stories/text/Text.tsx +49 -31
- package/src/stories/text/Typography.module.css +120 -120
- package/src/stories/textarea/TextArea.stories.ts +2 -5
- package/src/stories/textarea/TextArea.tsx +91 -84
- package/src/stories/theme/index.ts +1 -1
- package/src/stories/theme/themes.ts +423 -424
- package/src/stories/theme/tokens.ts +3 -3
- package/src/stories/theme/tw-preflight.css +4 -3
- package/src/stories/tilt/Tilt.stories.tsx +3 -6
- package/src/stories/tilt/Tilt.tsx +160 -126
- package/src/stories/toast/Toast.stories.tsx +2 -2
- package/src/stories/toast/Toast.tsx +3 -6
- package/src/stories/utility/RemoveFromDOM.tsx +9 -13
- package/src/stories/utility/TextWhenString.tsx +3 -16
- package/src/stories/utility/VisuallyHidden.tsx +10 -17
- package/src/styles/Home.module.css +185 -195
- package/src/styles/globals.css +0 -2
|
@@ -1,21 +1,17 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import
|
|
4
|
-
ComponentPropsWithoutRef, FC, MouseEventHandler, PropsWithChildren, ReactNode,
|
|
5
|
-
} from 'react';
|
|
6
|
-
import { useEffect, useMemo, useState } from 'react';
|
|
3
|
+
import { DialogPanel, DialogTitle, Dialog as HDialog, Transition, TransitionChild } from '@headlessui/react';
|
|
7
4
|
import type { CSSLength } from '@ssh/csstypes';
|
|
8
|
-
import {
|
|
9
|
-
Dialog as HDialog, DialogPanel, DialogTitle, Transition, TransitionChild,
|
|
10
|
-
} from '@headlessui/react';
|
|
11
5
|
import { clsx } from 'clsx';
|
|
12
|
-
import
|
|
13
|
-
import {
|
|
6
|
+
import type { ComponentPropsWithoutRef, FC, MouseEventHandler, PropsWithChildren, ReactNode } from 'react';
|
|
7
|
+
import { useEffect, useMemo, useState } from 'react';
|
|
14
8
|
import { Button } from '../button';
|
|
9
|
+
import { Close, Icon } from '../icon';
|
|
10
|
+
import { Text } from '../text';
|
|
11
|
+
import { RemoveFromDOM } from '../utility/RemoveFromDOM';
|
|
15
12
|
import { TextWhenString } from '../utility/TextWhenString';
|
|
16
13
|
import { VisuallyHidden } from '../utility/VisuallyHidden';
|
|
17
|
-
import
|
|
18
|
-
import { Close, Icon } from '../icon';
|
|
14
|
+
import styles from './Dialog.module.scss';
|
|
19
15
|
|
|
20
16
|
export const DialogWidthPresets = ['compact', 'default', 'large', 'full'] as const;
|
|
21
17
|
|
|
@@ -55,7 +51,7 @@ export type DialogProps = {
|
|
|
55
51
|
* @see DialogWidthPresets
|
|
56
52
|
* @default 'default'
|
|
57
53
|
*/
|
|
58
|
-
width?: typeof DialogWidthPresets[number] | CSSLength;
|
|
54
|
+
width?: (typeof DialogWidthPresets)[number] | CSSLength;
|
|
59
55
|
/**
|
|
60
56
|
* The height of the dialog.
|
|
61
57
|
*
|
|
@@ -87,38 +83,38 @@ export type DialogProps = {
|
|
|
87
83
|
*/
|
|
88
84
|
overrides?: {
|
|
89
85
|
/** The root element containing all elements */
|
|
90
|
-
root?: ComponentPropsWithoutRef<'div'
|
|
86
|
+
root?: ComponentPropsWithoutRef<'div'>;
|
|
91
87
|
/** The container for the backdrop overlay */
|
|
92
|
-
overlayContainer?: ComponentPropsWithoutRef<'div'
|
|
88
|
+
overlayContainer?: ComponentPropsWithoutRef<'div'>;
|
|
93
89
|
/** The backdrop overlay */
|
|
94
|
-
overlay?: ComponentPropsWithoutRef<'div'
|
|
90
|
+
overlay?: ComponentPropsWithoutRef<'div'>;
|
|
95
91
|
/** The container for the dialog panel */
|
|
96
|
-
panelContainer?: ComponentPropsWithoutRef<'div'
|
|
92
|
+
panelContainer?: ComponentPropsWithoutRef<'div'>;
|
|
97
93
|
/** The dialog panel */
|
|
98
|
-
panel?: ComponentPropsWithoutRef<'div'
|
|
94
|
+
panel?: ComponentPropsWithoutRef<'div'>;
|
|
99
95
|
/** The header of the dialog panel, which contains the title and close button */
|
|
100
|
-
panelHeader?: ComponentPropsWithoutRef<'div'
|
|
96
|
+
panelHeader?: ComponentPropsWithoutRef<'div'>;
|
|
101
97
|
/** The title within the dialog panel */
|
|
102
|
-
panelTitle?: ComponentPropsWithoutRef<'h1'
|
|
98
|
+
panelTitle?: ComponentPropsWithoutRef<'h1'>;
|
|
103
99
|
/** The close button within the dialog panel */
|
|
104
|
-
panelCloseButton?: ComponentPropsWithoutRef<'button'
|
|
105
|
-
}
|
|
100
|
+
panelCloseButton?: ComponentPropsWithoutRef<'button'>;
|
|
101
|
+
};
|
|
106
102
|
};
|
|
107
103
|
|
|
108
104
|
/**
|
|
109
|
-
* Dialogs are modal components that appear on top of the main content and require user interaction to dismiss.
|
|
110
|
-
*
|
|
111
|
-
* They render to a Portal, so they can be used anywhere in the DOM.
|
|
112
|
-
*
|
|
113
|
-
* <hr />
|
|
114
|
-
*
|
|
115
|
-
* To use this component, import it as follows:
|
|
116
|
-
*
|
|
117
|
-
* ```js
|
|
118
|
-
* import { Dialog } from 'paris/dialog';
|
|
119
|
-
* ```
|
|
120
|
-
* @constructor
|
|
121
|
-
*/
|
|
105
|
+
* Dialogs are modal components that appear on top of the main content and require user interaction to dismiss.
|
|
106
|
+
*
|
|
107
|
+
* They render to a Portal, so they can be used anywhere in the DOM.
|
|
108
|
+
*
|
|
109
|
+
* <hr />
|
|
110
|
+
*
|
|
111
|
+
* To use this component, import it as follows:
|
|
112
|
+
*
|
|
113
|
+
* ```js
|
|
114
|
+
* import { Dialog } from 'paris/dialog';
|
|
115
|
+
* ```
|
|
116
|
+
* @constructor
|
|
117
|
+
*/
|
|
122
118
|
export const Dialog: FC<PropsWithChildren<DialogProps>> = ({
|
|
123
119
|
isOpen = false,
|
|
124
120
|
onClose = () => {},
|
|
@@ -172,18 +168,12 @@ export const Dialog: FC<PropsWithChildren<DialogProps>> = ({
|
|
|
172
168
|
}, [isOpen]);
|
|
173
169
|
|
|
174
170
|
return (
|
|
175
|
-
<Transition
|
|
176
|
-
appear
|
|
177
|
-
show={isOpen}
|
|
178
|
-
>
|
|
171
|
+
<Transition appear show={isOpen}>
|
|
179
172
|
<HDialog
|
|
180
173
|
as="div"
|
|
181
174
|
onClose={onClose}
|
|
182
175
|
{...overrides.root}
|
|
183
|
-
className={clsx(
|
|
184
|
-
styles.root,
|
|
185
|
-
overrides.root?.className,
|
|
186
|
-
)}
|
|
176
|
+
className={clsx(styles.root, overrides.root?.className)}
|
|
187
177
|
role="dialog"
|
|
188
178
|
>
|
|
189
179
|
<div
|
|
@@ -216,10 +206,7 @@ export const Dialog: FC<PropsWithChildren<DialogProps>> = ({
|
|
|
216
206
|
|
|
217
207
|
<div
|
|
218
208
|
{...overrides.panelContainer}
|
|
219
|
-
className={clsx(
|
|
220
|
-
styles.panelContainer,
|
|
221
|
-
overrides.panelContainer?.className,
|
|
222
|
-
)}
|
|
209
|
+
className={clsx(styles.panelContainer, overrides.panelContainer?.className)}
|
|
223
210
|
>
|
|
224
211
|
<TransitionChild
|
|
225
212
|
enter={styles.enter}
|
|
@@ -251,28 +238,22 @@ export const Dialog: FC<PropsWithChildren<DialogProps>> = ({
|
|
|
251
238
|
<VisuallyHidden when={hideTitle && hideCloseButton}>
|
|
252
239
|
<div
|
|
253
240
|
{...overrides.panelHeader}
|
|
254
|
-
className={clsx(
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
241
|
+
className={clsx(styles.header, overrides.panelHeader?.className)}
|
|
242
|
+
style={
|
|
243
|
+
(hideTitle && !hideCloseButton) || (!hideTitle && hideCloseButton)
|
|
244
|
+
? {
|
|
245
|
+
marginBottom: '-16px',
|
|
246
|
+
}
|
|
247
|
+
: {}
|
|
248
|
+
}
|
|
261
249
|
>
|
|
262
250
|
<VisuallyHidden when={hideTitle}>
|
|
263
251
|
<DialogTitle
|
|
264
252
|
{...overrides.panelTitle}
|
|
265
253
|
as="h1"
|
|
266
|
-
className={clsx(
|
|
267
|
-
styles.title,
|
|
268
|
-
overrides.panelTitle?.className,
|
|
269
|
-
)}
|
|
254
|
+
className={clsx(styles.title, overrides.panelTitle?.className)}
|
|
270
255
|
>
|
|
271
|
-
<TextWhenString
|
|
272
|
-
kind="headingXSmall"
|
|
273
|
-
>
|
|
274
|
-
{title}
|
|
275
|
-
</TextWhenString>
|
|
256
|
+
<TextWhenString kind="headingXSmall">{title}</TextWhenString>
|
|
276
257
|
</DialogTitle>
|
|
277
258
|
</VisuallyHidden>
|
|
278
259
|
<RemoveFromDOM when={hideCloseButton}>
|
|
@@ -281,14 +262,10 @@ export const Dialog: FC<PropsWithChildren<DialogProps>> = ({
|
|
|
281
262
|
kind="tertiary"
|
|
282
263
|
shape="circle"
|
|
283
264
|
onClick={() => onClose(false)}
|
|
284
|
-
startEnhancer={
|
|
285
|
-
<Icon size={20} icon={Close} />
|
|
286
|
-
)}
|
|
265
|
+
startEnhancer={<Icon size={20} icon={Close} />}
|
|
287
266
|
{...overrides.panelCloseButton}
|
|
288
267
|
data-title-hidden={hideTitle}
|
|
289
|
-
className={clsx(
|
|
290
|
-
overrides.panelCloseButton?.className,
|
|
291
|
-
)}
|
|
268
|
+
className={clsx(overrides.panelCloseButton?.className)}
|
|
292
269
|
>
|
|
293
270
|
Close dialog
|
|
294
271
|
</Button>
|
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/nextjs-vite';
|
|
2
2
|
import { useState } from 'react';
|
|
3
|
-
|
|
4
|
-
import { Drawer } from './Drawer';
|
|
5
3
|
import { Button } from '../button';
|
|
6
4
|
import { Callout } from '../callout';
|
|
7
|
-
import {
|
|
8
|
-
Menu, MenuButton, MenuItems, MenuItem,
|
|
9
|
-
} from '../menu';
|
|
10
|
-
import { usePagination } from '../pagination';
|
|
11
5
|
import { ChevronRight, Ellipsis } from '../icon';
|
|
6
|
+
import { Menu, MenuButton, MenuItem, MenuItems } from '../menu';
|
|
7
|
+
import { usePagination } from '../pagination';
|
|
8
|
+
import { Drawer } from './Drawer';
|
|
12
9
|
|
|
13
10
|
const meta: Meta<typeof Drawer> = {
|
|
14
11
|
title: 'Surfaces/Drawer',
|
|
@@ -22,8 +19,7 @@ type Story = StoryObj<typeof Drawer>;
|
|
|
22
19
|
export const Default: Story = {
|
|
23
20
|
args: {
|
|
24
21
|
title: 'Transaction details',
|
|
25
|
-
children:
|
|
26
|
-
'This was a transaction for $22.89 at Il Tramezzino in Beverly Hills, CA.',
|
|
22
|
+
children: 'This was a transaction for $22.89 at Il Tramezzino in Beverly Hills, CA.',
|
|
27
23
|
size: 'default',
|
|
28
24
|
},
|
|
29
25
|
render: function Render(args) {
|
|
@@ -35,14 +31,10 @@ export const Default: Story = {
|
|
|
35
31
|
{...args}
|
|
36
32
|
isOpen={isOpen}
|
|
37
33
|
onClose={setIsOpen}
|
|
38
|
-
additionalActions={
|
|
34
|
+
additionalActions={
|
|
39
35
|
<Menu as="div">
|
|
40
36
|
<MenuButton>
|
|
41
|
-
<Button
|
|
42
|
-
kind="tertiary"
|
|
43
|
-
shape="circle"
|
|
44
|
-
startEnhancer={<Ellipsis size={20} />}
|
|
45
|
-
>
|
|
37
|
+
<Button kind="tertiary" shape="circle" startEnhancer={<Ellipsis size={20} />}>
|
|
46
38
|
Action menu
|
|
47
39
|
</Button>
|
|
48
40
|
</MenuButton>
|
|
@@ -54,7 +46,7 @@ export const Default: Story = {
|
|
|
54
46
|
</MenuItem>
|
|
55
47
|
</MenuItems>
|
|
56
48
|
</Menu>
|
|
57
|
-
|
|
49
|
+
}
|
|
58
50
|
>
|
|
59
51
|
{args.children}
|
|
60
52
|
</Drawer>
|
|
@@ -87,14 +79,10 @@ export const Paginated: Story = {
|
|
|
87
79
|
onClose={setIsOpen}
|
|
88
80
|
pagination={pagination}
|
|
89
81
|
title={currentPageTitle}
|
|
90
|
-
additionalActions={
|
|
82
|
+
additionalActions={
|
|
91
83
|
<Menu as="div">
|
|
92
84
|
<MenuButton>
|
|
93
|
-
<Button
|
|
94
|
-
kind="tertiary"
|
|
95
|
-
shape="circle"
|
|
96
|
-
startEnhancer={<Ellipsis size={20} />}
|
|
97
|
-
>
|
|
85
|
+
<Button kind="tertiary" shape="circle" startEnhancer={<Ellipsis size={20} />}>
|
|
98
86
|
Action menu
|
|
99
87
|
</Button>
|
|
100
88
|
</MenuButton>
|
|
@@ -106,33 +94,18 @@ export const Paginated: Story = {
|
|
|
106
94
|
</MenuItem>
|
|
107
95
|
</MenuItems>
|
|
108
96
|
</Menu>
|
|
109
|
-
|
|
97
|
+
}
|
|
110
98
|
>
|
|
111
|
-
<div
|
|
112
|
-
key="step1"
|
|
113
|
-
style={{ display: 'flex', flexDirection: 'column', gap: '8px' }}
|
|
114
|
-
>
|
|
99
|
+
<div key="step1" style={{ display: 'flex', flexDirection: 'column', gap: '8px' }}>
|
|
115
100
|
Step 1: Enter your name
|
|
116
|
-
<Button onClick={() => pagination.open('step2')}>
|
|
117
|
-
|
|
118
|
-
</Button>
|
|
119
|
-
<Button onClick={() => pagination.open('step3')}>
|
|
120
|
-
Go to step 3
|
|
121
|
-
</Button>
|
|
101
|
+
<Button onClick={() => pagination.open('step2')}>Go to step 2</Button>
|
|
102
|
+
<Button onClick={() => pagination.open('step3')}>Go to step 3</Button>
|
|
122
103
|
</div>
|
|
123
|
-
<div
|
|
124
|
-
key="step2"
|
|
125
|
-
style={{ display: 'flex', flexDirection: 'column', gap: '8px' }}
|
|
126
|
-
>
|
|
104
|
+
<div key="step2" style={{ display: 'flex', flexDirection: 'column', gap: '8px' }}>
|
|
127
105
|
Step 2: Enter your address
|
|
128
|
-
<Button onClick={() => pagination.open('step3')}>
|
|
129
|
-
Go to step 3
|
|
130
|
-
</Button>
|
|
106
|
+
<Button onClick={() => pagination.open('step3')}>Go to step 3</Button>
|
|
131
107
|
</div>
|
|
132
|
-
<div
|
|
133
|
-
key="step3"
|
|
134
|
-
style={{ display: 'flex', flexDirection: 'column', gap: '8px' }}
|
|
135
|
-
>
|
|
108
|
+
<div key="step3" style={{ display: 'flex', flexDirection: 'column', gap: '8px' }}>
|
|
136
109
|
Step 3: Enter your credit card information
|
|
137
110
|
</div>
|
|
138
111
|
</Drawer>
|
|
@@ -156,30 +129,24 @@ export const BottomPanel: Story = {
|
|
|
156
129
|
<h1>Transfer Policies:</h1>
|
|
157
130
|
<Button kind="secondary">Read more...</Button>
|
|
158
131
|
<p>
|
|
159
|
-
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
lacus, ac posuere sapien feugiat et. Nulla dignissim bibendum gravida.
|
|
168
|
-
Donec pharetra, erat et semper luctus, dolor enim elementum est, eget
|
|
169
|
-
cursus nisi libero sit amet purus.
|
|
132
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla dignissim bibendum gravida. Donec
|
|
133
|
+
pharetra, erat et semper luctus, dolor enim elementum est, eget cursus nisi libero sit amet purus.
|
|
134
|
+
Fusce blandit leo in lectus blandit, sed elementum enim accumsan. Vestibulum ante ipsum primis in
|
|
135
|
+
faucibus orci luctus et ultrices posuere cubilia curae; Pellentesque pretium erat at lacus ultricies
|
|
136
|
+
tincidunt. Praesent non luctus magna, ac efficitur ligula. Sed a justo fermentum, feugiat mauris
|
|
137
|
+
vel, ultrices turpis. Ut interdum malesuada lacus, ac posuere sapien feugiat et. Nulla dignissim
|
|
138
|
+
bibendum gravida. Donec pharetra, erat et semper luctus, dolor enim elementum est, eget cursus nisi
|
|
139
|
+
libero sit amet purus.
|
|
170
140
|
</p>
|
|
171
141
|
<p>
|
|
172
|
-
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
lacus, ac posuere sapien feugiat et. Nulla dignissim bibendum gravida.
|
|
181
|
-
Donec pharetra, erat et semper luctus, dolor enim elementum est, eget
|
|
182
|
-
cursus nisi libero sit amet purus.
|
|
142
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla dignissim bibendum gravida. Donec
|
|
143
|
+
pharetra, erat et semper luctus, dolor enim elementum est, eget cursus nisi libero sit amet purus.
|
|
144
|
+
Fusce blandit leo in lectus blandit, sed elementum enim accumsan. Vestibulum ante ipsum primis in
|
|
145
|
+
faucibus orci luctus et ultrices posuere cubilia curae; Pellentesque pretium erat at lacus ultricies
|
|
146
|
+
tincidunt. Praesent non luctus magna, ac efficitur ligula. Sed a justo fermentum, feugiat mauris
|
|
147
|
+
vel, ultrices turpis. Ut interdum malesuada lacus, ac posuere sapien feugiat et. Nulla dignissim
|
|
148
|
+
bibendum gravida. Donec pharetra, erat et semper luctus, dolor enim elementum est, eget cursus nisi
|
|
149
|
+
libero sit amet purus.
|
|
183
150
|
</p>
|
|
184
151
|
</div>
|
|
185
152
|
),
|
|
@@ -192,9 +159,7 @@ export const BottomPanel: Story = {
|
|
|
192
159
|
gap: '12px',
|
|
193
160
|
}}
|
|
194
161
|
>
|
|
195
|
-
<Callout>
|
|
196
|
-
Transfer should arrive in your account within 2-3 business days.
|
|
197
|
-
</Callout>
|
|
162
|
+
<Callout>Transfer should arrive in your account within 2-3 business days.</Callout>
|
|
198
163
|
<Button>Initiate</Button>
|
|
199
164
|
<Button kind="secondary" theme="negative">
|
|
200
165
|
Cancel
|
|
@@ -211,14 +176,10 @@ export const BottomPanel: Story = {
|
|
|
211
176
|
{...args}
|
|
212
177
|
isOpen={isOpen}
|
|
213
178
|
onClose={setIsOpen}
|
|
214
|
-
additionalActions={
|
|
179
|
+
additionalActions={
|
|
215
180
|
<Menu as="div">
|
|
216
181
|
<MenuButton>
|
|
217
|
-
<Button
|
|
218
|
-
kind="tertiary"
|
|
219
|
-
shape="circle"
|
|
220
|
-
startEnhancer={<Ellipsis size={20} />}
|
|
221
|
-
>
|
|
182
|
+
<Button kind="tertiary" shape="circle" startEnhancer={<Ellipsis size={20} />}>
|
|
222
183
|
Action menu
|
|
223
184
|
</Button>
|
|
224
185
|
</MenuButton>
|
|
@@ -230,7 +191,7 @@ export const BottomPanel: Story = {
|
|
|
230
191
|
</MenuItem>
|
|
231
192
|
</MenuItems>
|
|
232
193
|
</Menu>
|
|
233
|
-
|
|
194
|
+
}
|
|
234
195
|
>
|
|
235
196
|
{args.children}
|
|
236
197
|
</Drawer>
|
|
@@ -243,9 +204,13 @@ export const BottomPanelMultiSection: Story = {
|
|
|
243
204
|
args: {
|
|
244
205
|
title: 'Order summary',
|
|
245
206
|
children: (
|
|
246
|
-
<div
|
|
247
|
-
|
|
248
|
-
|
|
207
|
+
<div
|
|
208
|
+
style={{
|
|
209
|
+
width: '100%',
|
|
210
|
+
display: 'flex',
|
|
211
|
+
flexDirection: 'column',
|
|
212
|
+
gap: '12px',
|
|
213
|
+
}}
|
|
249
214
|
>
|
|
250
215
|
<p>Review your order before confirming.</p>
|
|
251
216
|
</div>
|
|
@@ -253,27 +218,27 @@ export const BottomPanelMultiSection: Story = {
|
|
|
253
218
|
bottomPanelPadding: false,
|
|
254
219
|
bottomPanel: (
|
|
255
220
|
<div style={{ display: 'flex', flexDirection: 'column' }}>
|
|
256
|
-
<div
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
221
|
+
<div
|
|
222
|
+
style={{
|
|
223
|
+
display: 'flex',
|
|
224
|
+
justifyContent: 'space-between',
|
|
225
|
+
padding: '12px 20px',
|
|
226
|
+
borderBottom: '1px solid var(--pte-new-colors-borderMedium)',
|
|
227
|
+
background: 'var(--pte-new-colors-overlaySubtle)',
|
|
228
|
+
}}
|
|
263
229
|
>
|
|
264
230
|
<span>Total</span>
|
|
265
231
|
<strong>$249.00</strong>
|
|
266
232
|
</div>
|
|
267
|
-
<div
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
233
|
+
<div
|
|
234
|
+
style={{
|
|
235
|
+
display: 'flex',
|
|
236
|
+
flexDirection: 'column',
|
|
237
|
+
gap: '12px',
|
|
238
|
+
padding: '20px',
|
|
239
|
+
}}
|
|
273
240
|
>
|
|
274
|
-
<Button>
|
|
275
|
-
Confirm order
|
|
276
|
-
</Button>
|
|
241
|
+
<Button>Confirm order</Button>
|
|
277
242
|
<Button kind="secondary" theme="negative">
|
|
278
243
|
Cancel
|
|
279
244
|
</Button>
|
|
@@ -285,14 +250,8 @@ export const BottomPanelMultiSection: Story = {
|
|
|
285
250
|
const [isOpen, setIsOpen] = useState(false);
|
|
286
251
|
return (
|
|
287
252
|
<>
|
|
288
|
-
<Button onClick={() => setIsOpen(true)}>
|
|
289
|
-
|
|
290
|
-
</Button>
|
|
291
|
-
<Drawer
|
|
292
|
-
{...args}
|
|
293
|
-
isOpen={isOpen}
|
|
294
|
-
onClose={setIsOpen}
|
|
295
|
-
>
|
|
253
|
+
<Button onClick={() => setIsOpen(true)}>Review order</Button>
|
|
254
|
+
<Drawer {...args} isOpen={isOpen} onClose={setIsOpen}>
|
|
296
255
|
{args.children}
|
|
297
256
|
</Drawer>
|
|
298
257
|
</>
|
|
@@ -303,8 +262,7 @@ export const BottomPanelMultiSection: Story = {
|
|
|
303
262
|
export const Full: Story = {
|
|
304
263
|
args: {
|
|
305
264
|
title: 'Transaction details',
|
|
306
|
-
children:
|
|
307
|
-
'This was a transaction for $22.89 at Il Tramezzino in Beverly Hills, CA.',
|
|
265
|
+
children: 'This was a transaction for $22.89 at Il Tramezzino in Beverly Hills, CA.',
|
|
308
266
|
size: 'full',
|
|
309
267
|
},
|
|
310
268
|
render: function Render(args) {
|