@bacon-pos/ui 0.11.0 → 0.16.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/lib/commonjs/components/CodeInput/CodeInput.js +28 -9
- package/lib/commonjs/components/CodeInput/CodeInput.js.map +1 -1
- package/lib/commonjs/components/CodeInput/CodeInput.stories.js +28 -1
- package/lib/commonjs/components/CodeInput/CodeInput.stories.js.map +1 -1
- package/lib/commonjs/components/CodeInput/CodeInput.test.js +16 -0
- package/lib/commonjs/components/CodeInput/CodeInput.test.js.map +1 -1
- package/lib/commonjs/components/Dialog/Dialog.js +116 -71
- package/lib/commonjs/components/Dialog/Dialog.js.map +1 -1
- package/lib/commonjs/components/Dialog/StepDialog.js +111 -0
- package/lib/commonjs/components/Dialog/StepDialog.js.map +1 -0
- package/lib/commonjs/components/Dialog/StepDialog.stories.js +157 -0
- package/lib/commonjs/components/Dialog/StepDialog.stories.js.map +1 -0
- package/lib/commonjs/components/Dialog/StepDialog.test.js +118 -0
- package/lib/commonjs/components/Dialog/StepDialog.test.js.map +1 -0
- package/lib/commonjs/components/Dialog/index.js +7 -0
- package/lib/commonjs/components/Dialog/index.js.map +1 -1
- package/lib/commonjs/components/Icon/icons.generated.js +9 -1
- package/lib/commonjs/components/Icon/icons.generated.js.map +1 -1
- package/lib/commonjs/components/List/List.js +45 -0
- package/lib/commonjs/components/List/List.js.map +1 -0
- package/lib/commonjs/components/List/List.stories.js +215 -0
- package/lib/commonjs/components/List/List.stories.js.map +1 -0
- package/lib/commonjs/components/List/List.test.js +94 -0
- package/lib/commonjs/components/List/List.test.js.map +1 -0
- package/lib/commonjs/components/List/ListItem.js +210 -0
- package/lib/commonjs/components/List/ListItem.js.map +1 -0
- package/lib/commonjs/components/List/index.js +20 -0
- package/lib/commonjs/components/List/index.js.map +1 -0
- package/lib/commonjs/components/Menu/Menu.js +11 -3
- package/lib/commonjs/components/Menu/Menu.js.map +1 -1
- package/lib/commonjs/components/ProgressBar/ProgressBar.js +4 -3
- package/lib/commonjs/components/ProgressBar/ProgressBar.js.map +1 -1
- package/lib/commonjs/components/SegmentedButton/SegmentedButton.js +217 -0
- package/lib/commonjs/components/SegmentedButton/SegmentedButton.js.map +1 -0
- package/lib/commonjs/components/SegmentedButton/SegmentedButton.stories.js +215 -0
- package/lib/commonjs/components/SegmentedButton/SegmentedButton.stories.js.map +1 -0
- package/lib/commonjs/components/SegmentedButton/SegmentedButton.test.js +97 -0
- package/lib/commonjs/components/SegmentedButton/SegmentedButton.test.js.map +1 -0
- package/lib/commonjs/components/SegmentedButton/index.js +13 -0
- package/lib/commonjs/components/SegmentedButton/index.js.map +1 -0
- package/lib/commonjs/components/Sidebar/Sidebar.js +20 -3
- package/lib/commonjs/components/Sidebar/Sidebar.js.map +1 -1
- package/lib/commonjs/components/Sidebar/Sidebar.stories.js +17 -1
- package/lib/commonjs/components/Sidebar/Sidebar.stories.js.map +1 -1
- package/lib/commonjs/components/Table/Table.js +69 -6
- package/lib/commonjs/components/Table/Table.js.map +1 -1
- package/lib/commonjs/components/Table/Table.stories.js +118 -1
- package/lib/commonjs/components/Table/Table.stories.js.map +1 -1
- package/lib/commonjs/components/Table/Table.test.js +58 -0
- package/lib/commonjs/components/Table/Table.test.js.map +1 -1
- package/lib/commonjs/components/_internal/ModalHostContext.js +21 -0
- package/lib/commonjs/components/_internal/ModalHostContext.js.map +1 -0
- package/lib/commonjs/components/index.js +37 -15
- package/lib/commonjs/components/index.js.map +1 -1
- package/lib/module/components/CodeInput/CodeInput.js +28 -9
- package/lib/module/components/CodeInput/CodeInput.js.map +1 -1
- package/lib/module/components/CodeInput/CodeInput.stories.js +27 -0
- package/lib/module/components/CodeInput/CodeInput.stories.js.map +1 -1
- package/lib/module/components/CodeInput/CodeInput.test.js +16 -0
- package/lib/module/components/CodeInput/CodeInput.test.js.map +1 -1
- package/lib/module/components/Dialog/Dialog.js +116 -71
- package/lib/module/components/Dialog/Dialog.js.map +1 -1
- package/lib/module/components/Dialog/StepDialog.js +107 -0
- package/lib/module/components/Dialog/StepDialog.js.map +1 -0
- package/lib/module/components/Dialog/StepDialog.stories.js +153 -0
- package/lib/module/components/Dialog/StepDialog.stories.js.map +1 -0
- package/lib/module/components/Dialog/StepDialog.test.js +117 -0
- package/lib/module/components/Dialog/StepDialog.test.js.map +1 -0
- package/lib/module/components/Dialog/index.js +1 -0
- package/lib/module/components/Dialog/index.js.map +1 -1
- package/lib/module/components/Icon/icons.generated.js +9 -1
- package/lib/module/components/Icon/icons.generated.js.map +1 -1
- package/lib/module/components/List/List.js +41 -0
- package/lib/module/components/List/List.js.map +1 -0
- package/lib/module/components/List/List.stories.js +211 -0
- package/lib/module/components/List/List.stories.js.map +1 -0
- package/lib/module/components/List/List.test.js +94 -0
- package/lib/module/components/List/List.test.js.map +1 -0
- package/lib/module/components/List/ListItem.js +206 -0
- package/lib/module/components/List/ListItem.js.map +1 -0
- package/lib/module/components/List/index.js +5 -0
- package/lib/module/components/List/index.js.map +1 -0
- package/lib/module/components/Menu/Menu.js +12 -4
- package/lib/module/components/Menu/Menu.js.map +1 -1
- package/lib/module/components/ProgressBar/ProgressBar.js +4 -3
- package/lib/module/components/ProgressBar/ProgressBar.js.map +1 -1
- package/lib/module/components/SegmentedButton/SegmentedButton.js +213 -0
- package/lib/module/components/SegmentedButton/SegmentedButton.js.map +1 -0
- package/lib/module/components/SegmentedButton/SegmentedButton.stories.js +211 -0
- package/lib/module/components/SegmentedButton/SegmentedButton.stories.js.map +1 -0
- package/lib/module/components/SegmentedButton/SegmentedButton.test.js +96 -0
- package/lib/module/components/SegmentedButton/SegmentedButton.test.js.map +1 -0
- package/lib/module/components/SegmentedButton/index.js +4 -0
- package/lib/module/components/SegmentedButton/index.js.map +1 -0
- package/lib/module/components/Sidebar/Sidebar.js +20 -3
- package/lib/module/components/Sidebar/Sidebar.js.map +1 -1
- package/lib/module/components/Sidebar/Sidebar.stories.js +16 -0
- package/lib/module/components/Sidebar/Sidebar.stories.js.map +1 -1
- package/lib/module/components/Table/Table.js +70 -7
- package/lib/module/components/Table/Table.js.map +1 -1
- package/lib/module/components/Table/Table.stories.js +117 -0
- package/lib/module/components/Table/Table.stories.js.map +1 -1
- package/lib/module/components/Table/Table.test.js +58 -0
- package/lib/module/components/Table/Table.test.js.map +1 -1
- package/lib/module/components/_internal/ModalHostContext.js +17 -0
- package/lib/module/components/_internal/ModalHostContext.js.map +1 -0
- package/lib/module/components/index.js +2 -0
- package/lib/module/components/index.js.map +1 -1
- package/lib/typescript/commonjs/components/CodeInput/CodeInput.d.ts +5 -1
- package/lib/typescript/commonjs/components/CodeInput/CodeInput.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/Dialog/Dialog.d.ts +13 -1
- package/lib/typescript/commonjs/components/Dialog/Dialog.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/Dialog/StepDialog.d.ts +63 -0
- package/lib/typescript/commonjs/components/Dialog/StepDialog.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/Dialog/index.d.ts +1 -0
- package/lib/typescript/commonjs/components/Dialog/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/Icon/icons.generated.d.ts +8 -0
- package/lib/typescript/commonjs/components/Icon/icons.generated.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/List/List.d.ts +22 -0
- package/lib/typescript/commonjs/components/List/List.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/List/ListItem.d.ts +61 -0
- package/lib/typescript/commonjs/components/List/ListItem.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/List/index.d.ts +5 -0
- package/lib/typescript/commonjs/components/List/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/Menu/Menu.d.ts +4 -2
- package/lib/typescript/commonjs/components/Menu/Menu.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/ProgressBar/ProgressBar.d.ts +3 -1
- package/lib/typescript/commonjs/components/ProgressBar/ProgressBar.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/SegmentedButton/SegmentedButton.d.ts +68 -0
- package/lib/typescript/commonjs/components/SegmentedButton/SegmentedButton.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/SegmentedButton/index.d.ts +2 -0
- package/lib/typescript/commonjs/components/SegmentedButton/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/Sidebar/Sidebar.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/Table/Table.d.ts +25 -3
- package/lib/typescript/commonjs/components/Table/Table.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/_internal/ModalHostContext.d.ts +11 -0
- package/lib/typescript/commonjs/components/_internal/ModalHostContext.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/index.d.ts +2 -0
- package/lib/typescript/commonjs/components/index.d.ts.map +1 -1
- package/lib/typescript/module/components/CodeInput/CodeInput.d.ts +5 -1
- package/lib/typescript/module/components/CodeInput/CodeInput.d.ts.map +1 -1
- package/lib/typescript/module/components/Dialog/Dialog.d.ts +13 -1
- package/lib/typescript/module/components/Dialog/Dialog.d.ts.map +1 -1
- package/lib/typescript/module/components/Dialog/StepDialog.d.ts +63 -0
- package/lib/typescript/module/components/Dialog/StepDialog.d.ts.map +1 -0
- package/lib/typescript/module/components/Dialog/index.d.ts +1 -0
- package/lib/typescript/module/components/Dialog/index.d.ts.map +1 -1
- package/lib/typescript/module/components/Icon/icons.generated.d.ts +8 -0
- package/lib/typescript/module/components/Icon/icons.generated.d.ts.map +1 -1
- package/lib/typescript/module/components/List/List.d.ts +22 -0
- package/lib/typescript/module/components/List/List.d.ts.map +1 -0
- package/lib/typescript/module/components/List/ListItem.d.ts +61 -0
- package/lib/typescript/module/components/List/ListItem.d.ts.map +1 -0
- package/lib/typescript/module/components/List/index.d.ts +5 -0
- package/lib/typescript/module/components/List/index.d.ts.map +1 -0
- package/lib/typescript/module/components/Menu/Menu.d.ts +4 -2
- package/lib/typescript/module/components/Menu/Menu.d.ts.map +1 -1
- package/lib/typescript/module/components/ProgressBar/ProgressBar.d.ts +3 -1
- package/lib/typescript/module/components/ProgressBar/ProgressBar.d.ts.map +1 -1
- package/lib/typescript/module/components/SegmentedButton/SegmentedButton.d.ts +68 -0
- package/lib/typescript/module/components/SegmentedButton/SegmentedButton.d.ts.map +1 -0
- package/lib/typescript/module/components/SegmentedButton/index.d.ts +2 -0
- package/lib/typescript/module/components/SegmentedButton/index.d.ts.map +1 -0
- package/lib/typescript/module/components/Sidebar/Sidebar.d.ts.map +1 -1
- package/lib/typescript/module/components/Table/Table.d.ts +25 -3
- package/lib/typescript/module/components/Table/Table.d.ts.map +1 -1
- package/lib/typescript/module/components/_internal/ModalHostContext.d.ts +11 -0
- package/lib/typescript/module/components/_internal/ModalHostContext.d.ts.map +1 -0
- package/lib/typescript/module/components/index.d.ts +2 -0
- package/lib/typescript/module/components/index.d.ts.map +1 -1
- package/package.json +16 -14
- package/src/components/CodeInput/CodeInput.tsx +46 -14
- package/src/components/Dialog/Dialog.tsx +92 -31
- package/src/components/Dialog/StepDialog.tsx +173 -0
- package/src/components/Dialog/index.ts +1 -0
- package/src/components/Icon/icons.generated.ts +9 -1
- package/src/components/List/List.tsx +45 -0
- package/src/components/List/ListItem.tsx +214 -0
- package/src/components/List/index.ts +4 -0
- package/src/components/Menu/Menu.tsx +15 -6
- package/src/components/ProgressBar/ProgressBar.tsx +6 -3
- package/src/components/SegmentedButton/SegmentedButton.tsx +269 -0
- package/src/components/SegmentedButton/index.ts +7 -0
- package/src/components/Sidebar/Sidebar.tsx +18 -10
- package/src/components/Table/Table.tsx +93 -8
- package/src/components/_internal/ModalHostContext.tsx +15 -0
- package/src/components/index.ts +2 -0
|
@@ -4,7 +4,9 @@ import { KeyboardAvoidingView, Modal, Platform, Pressable, ScrollView, StyleShee
|
|
|
4
4
|
import { useTheme } from "../../theme/index.js";
|
|
5
5
|
import { Button } from "../Button/Button.js";
|
|
6
6
|
import { Icon } from "../Icon/Icon.js";
|
|
7
|
+
import { IconButton } from "../IconButton/IconButton.js";
|
|
7
8
|
import { Text } from "../Text/Text.js";
|
|
9
|
+
import { ModalHostContext } from "../_internal/ModalHostContext.js";
|
|
8
10
|
import { ScrollArea } from "../_internal/ScrollArea.js";
|
|
9
11
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
12
|
/**
|
|
@@ -20,6 +22,9 @@ export function Dialog({
|
|
|
20
22
|
onClose,
|
|
21
23
|
title,
|
|
22
24
|
subtitle,
|
|
25
|
+
onBack,
|
|
26
|
+
backAccessibilityLabel = 'Back',
|
|
27
|
+
footerAccessory,
|
|
23
28
|
children,
|
|
24
29
|
actions = [],
|
|
25
30
|
cancel,
|
|
@@ -70,59 +75,90 @@ export function Dialog({
|
|
|
70
75
|
},
|
|
71
76
|
children: /*#__PURE__*/_jsxs(View, {
|
|
72
77
|
style: {
|
|
73
|
-
|
|
74
|
-
|
|
78
|
+
flexDirection: 'row',
|
|
79
|
+
alignItems: 'center',
|
|
80
|
+
gap: 20,
|
|
81
|
+
paddingRight: showClose ? 40 : 0
|
|
75
82
|
},
|
|
76
|
-
children: [/*#__PURE__*/_jsx(
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
83
|
+
children: [onBack ? /*#__PURE__*/_jsx(IconButton, {
|
|
84
|
+
icon: "arrow-left",
|
|
85
|
+
accessibilityLabel: backAccessibilityLabel,
|
|
86
|
+
variant: "secondary",
|
|
87
|
+
size: "lg",
|
|
88
|
+
onPress: onBack
|
|
89
|
+
}) : null, /*#__PURE__*/_jsxs(View, {
|
|
90
|
+
style: {
|
|
91
|
+
flex: 1,
|
|
92
|
+
gap: 4
|
|
93
|
+
},
|
|
94
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
95
|
+
variant: "h3",
|
|
96
|
+
weight: "semibold",
|
|
97
|
+
color: "primary",
|
|
98
|
+
children: title
|
|
99
|
+
}), subtitle ? /*#__PURE__*/_jsx(Text, {
|
|
100
|
+
variant: "bodyLarge",
|
|
101
|
+
color: "secondary",
|
|
102
|
+
children: subtitle
|
|
103
|
+
}) : null]
|
|
104
|
+
})]
|
|
86
105
|
})
|
|
87
106
|
});
|
|
107
|
+
const hasButtons = cancel != null || actions.length > 0;
|
|
108
|
+
const hasFooter = hasButtons || footerAccessory != null;
|
|
109
|
+
|
|
110
|
+
// The footer owns the bottom padding; without a footer the content would
|
|
111
|
+
// otherwise hug the bottom edge, so it takes over the bottom padding itself.
|
|
88
112
|
const contentBody = /*#__PURE__*/_jsx(View, {
|
|
89
113
|
style: {
|
|
90
|
-
paddingHorizontal: padding
|
|
114
|
+
paddingHorizontal: padding,
|
|
115
|
+
paddingBottom: hasFooter ? 0 : padding
|
|
91
116
|
},
|
|
92
117
|
children: children
|
|
93
118
|
});
|
|
94
|
-
const hasFooter = cancel != null || actions.length > 0;
|
|
95
119
|
const footer = hasFooter ? /*#__PURE__*/_jsxs(View, {
|
|
96
120
|
style: {
|
|
97
|
-
flexDirection: 'row',
|
|
98
|
-
gap: 12,
|
|
99
121
|
paddingHorizontal: padding,
|
|
100
122
|
paddingBottom: padding,
|
|
101
123
|
paddingTop: contentSpacing
|
|
102
124
|
},
|
|
103
|
-
children: [
|
|
125
|
+
children: [footerAccessory ? /*#__PURE__*/_jsx(View, {
|
|
104
126
|
style: {
|
|
105
|
-
|
|
127
|
+
alignItems: 'center',
|
|
128
|
+
// Figma keeps the accessory (e.g. step progress) closer to the
|
|
129
|
+
// content above it than to the buttons below (~40 vs ~56).
|
|
130
|
+
marginBottom: hasButtons ? Math.round(contentSpacing * 1.4) : 0
|
|
106
131
|
},
|
|
107
|
-
children:
|
|
108
|
-
|
|
109
|
-
variant: cancel.destructive ? 'destructive' : 'secondary',
|
|
110
|
-
label: cancel.label ?? 'Cancel',
|
|
111
|
-
onPress: cancel.onPress ?? onClose
|
|
112
|
-
})
|
|
113
|
-
}) : null, actions.map((action, i) => /*#__PURE__*/_jsx(View, {
|
|
132
|
+
children: footerAccessory
|
|
133
|
+
}) : null, hasButtons ? /*#__PURE__*/_jsxs(View, {
|
|
114
134
|
style: {
|
|
115
|
-
|
|
135
|
+
flexDirection: 'row',
|
|
136
|
+
gap: 12
|
|
116
137
|
},
|
|
117
|
-
children: /*#__PURE__*/_jsx(
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
138
|
+
children: [cancel ? /*#__PURE__*/_jsx(View, {
|
|
139
|
+
style: {
|
|
140
|
+
flex: 1
|
|
141
|
+
},
|
|
142
|
+
children: /*#__PURE__*/_jsx(Button, {
|
|
143
|
+
fullWidth: true,
|
|
144
|
+
variant: cancel.destructive ? 'destructive' : 'secondary',
|
|
145
|
+
label: cancel.label ?? 'Cancel',
|
|
146
|
+
onPress: cancel.onPress ?? onClose
|
|
147
|
+
})
|
|
148
|
+
}) : null, actions.map((action, i) => /*#__PURE__*/_jsx(View, {
|
|
149
|
+
style: {
|
|
150
|
+
flex: 1
|
|
151
|
+
},
|
|
152
|
+
children: /*#__PURE__*/_jsx(Button, {
|
|
153
|
+
fullWidth: true,
|
|
154
|
+
variant: action.variant ?? 'default',
|
|
155
|
+
label: action.label,
|
|
156
|
+
onPress: action.onPress,
|
|
157
|
+
loading: action.loading,
|
|
158
|
+
disabled: action.disabled
|
|
159
|
+
})
|
|
160
|
+
}, i))]
|
|
161
|
+
}) : null]
|
|
126
162
|
}) : null;
|
|
127
163
|
const cardBase = fullscreen ? {
|
|
128
164
|
flex: 1,
|
|
@@ -144,6 +180,9 @@ export function Dialog({
|
|
|
144
180
|
style: {
|
|
145
181
|
flex: 1
|
|
146
182
|
},
|
|
183
|
+
contentContainerStyle: {
|
|
184
|
+
paddingVertical: 8
|
|
185
|
+
},
|
|
147
186
|
keyboardShouldPersistTaps: "handled",
|
|
148
187
|
keyboardDismissMode: "interactive",
|
|
149
188
|
children: [!stickyHeader ? header : null, contentBody, !stickyFooter ? footer : null]
|
|
@@ -162,6 +201,9 @@ export function Dialog({
|
|
|
162
201
|
style: {
|
|
163
202
|
flexShrink: 1
|
|
164
203
|
},
|
|
204
|
+
contentContainerStyle: {
|
|
205
|
+
paddingVertical: 8
|
|
206
|
+
},
|
|
165
207
|
keyboardShouldPersistTaps: "handled",
|
|
166
208
|
keyboardDismissMode: "interactive",
|
|
167
209
|
children: [!stickyHeader ? header : null, contentBody, !stickyFooter ? footer : null]
|
|
@@ -173,55 +215,58 @@ export function Dialog({
|
|
|
173
215
|
animationType: "fade",
|
|
174
216
|
statusBarTranslucent: true,
|
|
175
217
|
onRequestClose: onClose,
|
|
176
|
-
children: /*#__PURE__*/_jsx(
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
},
|
|
181
|
-
children: /*#__PURE__*/_jsx(View, {
|
|
218
|
+
children: /*#__PURE__*/_jsx(ModalHostContext.Provider, {
|
|
219
|
+
value: true,
|
|
220
|
+
children: /*#__PURE__*/_jsx(KeyboardAvoidingView, {
|
|
221
|
+
behavior: Platform.OS === 'ios' ? 'padding' : undefined,
|
|
182
222
|
style: {
|
|
183
|
-
flex: 1
|
|
184
|
-
backgroundColor: 'rgba(16, 18, 20, 0.55)'
|
|
223
|
+
flex: 1
|
|
185
224
|
},
|
|
186
|
-
children:
|
|
225
|
+
children: /*#__PURE__*/_jsx(View, {
|
|
187
226
|
style: {
|
|
188
|
-
flex: 1
|
|
189
|
-
|
|
190
|
-
contentContainerStyle: {
|
|
191
|
-
flexGrow: 1,
|
|
192
|
-
padding: 16
|
|
227
|
+
flex: 1,
|
|
228
|
+
backgroundColor: 'rgba(16, 18, 20, 0.55)'
|
|
193
229
|
},
|
|
194
|
-
|
|
195
|
-
showsVerticalScrollIndicator: false,
|
|
196
|
-
children: /*#__PURE__*/_jsx(Pressable, {
|
|
230
|
+
children: fullscreen ? card : scrollMode === 'page' ? /*#__PURE__*/_jsx(ScrollView, {
|
|
197
231
|
style: {
|
|
232
|
+
flex: 1
|
|
233
|
+
},
|
|
234
|
+
contentContainerStyle: {
|
|
198
235
|
flexGrow: 1,
|
|
199
|
-
|
|
200
|
-
alignItems: 'center'
|
|
236
|
+
padding: 16
|
|
201
237
|
},
|
|
202
|
-
|
|
238
|
+
keyboardShouldPersistTaps: "handled",
|
|
239
|
+
showsVerticalScrollIndicator: false,
|
|
203
240
|
children: /*#__PURE__*/_jsx(Pressable, {
|
|
204
241
|
style: {
|
|
205
|
-
|
|
242
|
+
flexGrow: 1,
|
|
243
|
+
justifyContent: 'center',
|
|
206
244
|
alignItems: 'center'
|
|
207
245
|
},
|
|
208
|
-
onPress:
|
|
209
|
-
children:
|
|
246
|
+
onPress: dismissOnBackdrop ? onClose : undefined,
|
|
247
|
+
children: /*#__PURE__*/_jsx(Pressable, {
|
|
248
|
+
style: {
|
|
249
|
+
width: '100%',
|
|
250
|
+
alignItems: 'center'
|
|
251
|
+
},
|
|
252
|
+
onPress: () => {},
|
|
253
|
+
children: card
|
|
254
|
+
})
|
|
210
255
|
})
|
|
256
|
+
}) : /*#__PURE__*/_jsxs(View, {
|
|
257
|
+
style: {
|
|
258
|
+
flex: 1,
|
|
259
|
+
justifyContent: 'center',
|
|
260
|
+
alignItems: 'center',
|
|
261
|
+
padding: 16
|
|
262
|
+
},
|
|
263
|
+
children: [/*#__PURE__*/_jsx(Pressable, {
|
|
264
|
+
style: StyleSheet.absoluteFill,
|
|
265
|
+
onPress: dismissOnBackdrop ? onClose : undefined,
|
|
266
|
+
accessibilityElementsHidden: true,
|
|
267
|
+
importantForAccessibility: "no-hide-descendants"
|
|
268
|
+
}), card]
|
|
211
269
|
})
|
|
212
|
-
}) : /*#__PURE__*/_jsxs(View, {
|
|
213
|
-
style: {
|
|
214
|
-
flex: 1,
|
|
215
|
-
justifyContent: 'center',
|
|
216
|
-
alignItems: 'center',
|
|
217
|
-
padding: 16
|
|
218
|
-
},
|
|
219
|
-
children: [/*#__PURE__*/_jsx(Pressable, {
|
|
220
|
-
style: StyleSheet.absoluteFill,
|
|
221
|
-
onPress: dismissOnBackdrop ? onClose : undefined,
|
|
222
|
-
accessibilityElementsHidden: true,
|
|
223
|
-
importantForAccessibility: "no-hide-descendants"
|
|
224
|
-
}), card]
|
|
225
270
|
})
|
|
226
271
|
})
|
|
227
272
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["KeyboardAvoidingView","Modal","Platform","Pressable","ScrollView","StyleSheet","useWindowDimensions","View","useTheme","Button","Icon","Text","ScrollArea","jsx","_jsx","jsxs","_jsxs","Dialog","visible","onClose","title","subtitle","children","actions","cancel","showClose","closeDestructive","dismissOnBackdrop","scrollMode","stickyHeader","stickyFooter","padding","contentSpacing","radius","maxWidth","width","fullscreen","maxHeightRatio","scrollbarColor","style","theme","height","indicatorColor","colors","text","tertiary","closeBtn","onPress","hitSlop","accessibilityRole","accessibilityLabel","position","top","right","zIndex","name","size","color","feedback","error","secondary","header","paddingHorizontal","paddingTop","paddingBottom","
|
|
1
|
+
{"version":3,"names":["KeyboardAvoidingView","Modal","Platform","Pressable","ScrollView","StyleSheet","useWindowDimensions","View","useTheme","Button","Icon","IconButton","Text","ModalHostContext","ScrollArea","jsx","_jsx","jsxs","_jsxs","Dialog","visible","onClose","title","subtitle","onBack","backAccessibilityLabel","footerAccessory","children","actions","cancel","showClose","closeDestructive","dismissOnBackdrop","scrollMode","stickyHeader","stickyFooter","padding","contentSpacing","radius","maxWidth","width","fullscreen","maxHeightRatio","scrollbarColor","style","theme","height","indicatorColor","colors","text","tertiary","closeBtn","onPress","hitSlop","accessibilityRole","accessibilityLabel","position","top","right","zIndex","name","size","color","feedback","error","secondary","header","paddingHorizontal","paddingTop","paddingBottom","flexDirection","alignItems","gap","paddingRight","icon","variant","flex","weight","hasButtons","length","hasFooter","contentBody","footer","marginBottom","Math","round","fullWidth","destructive","label","map","action","i","loading","disabled","cardBase","backgroundColor","background","default","borderRadius","undefined","overflow","card","accessibilityViewIsModal","contentContainerStyle","paddingVertical","keyboardShouldPersistTaps","keyboardDismissMode","maxHeight","flexShrink","transparent","animationType","statusBarTranslucent","onRequestClose","Provider","value","behavior","OS","flexGrow","showsVerticalScrollIndicator","justifyContent","absoluteFill","accessibilityElementsHidden","importantForAccessibility"],"sourceRoot":"..\\..\\..\\..\\src","sources":["components/Dialog/Dialog.tsx"],"mappings":";;AACA,SACEA,oBAAoB,EACpBC,KAAK,EACLC,QAAQ,EACRC,SAAS,EACTC,UAAU,EACVC,UAAU,EACVC,mBAAmB,EACnBC,IAAI,QAGC,cAAc;AACrB,SAASC,QAAQ,QAAQ,sBAAa;AACtC,SAASC,MAAM,QAA4B,qBAAkB;AAC7D,SAASC,IAAI,QAAQ,iBAAc;AACnC,SAASC,UAAU,QAAQ,6BAA0B;AACrD,SAASC,IAAI,QAAQ,iBAAc;AACnC,SAASC,gBAAgB,QAAQ,kCAA+B;AAChE,SAASC,UAAU,QAAQ,4BAAyB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAmFrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,MAAMA,CAAC;EACrBC,OAAO;EACPC,OAAO;EACPC,KAAK;EACLC,QAAQ;EACRC,MAAM;EACNC,sBAAsB,GAAG,MAAM;EAC/BC,eAAe;EACfC,QAAQ;EACRC,OAAO,GAAG,EAAE;EACZC,MAAM;EACNC,SAAS,GAAG,IAAI;EAChBC,gBAAgB,GAAG,KAAK;EACxBC,iBAAiB,GAAG,KAAK;EACzBC,UAAU,GAAG,OAAO;EACpBC,YAAY,GAAG,IAAI;EACnBC,YAAY,GAAG,IAAI;EACnBC,OAAO,GAAG,EAAE;EACZC,cAAc,GAAG,EAAE;EACnBC,MAAM,GAAG,EAAE;EACXC,QAAQ,GAAG,GAAG;EACdC,KAAK;EACLC,UAAU,GAAG,KAAK;EAClBC,cAAc,GAAG,GAAG;EACpBC,cAAc;EACdC;AACW,CAAC,EAAE;EACd,MAAMC,KAAK,GAAGrC,QA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,EAAC,SAAS;YACnCa,4BAA4B,EAAE,KAAM;YAAA3F,QAAA,eAEpCX,IAAA,CAACb,SAAS;cACRyC,KAAK,EAAE;gBAAEyE,QAAQ,EAAE,CAAC;gBAAEE,cAAc,EAAE,QAAQ;gBAAEhD,UAAU,EAAE;cAAS,CAAE;cACvEnB,OAAO,EAAEpB,iBAAiB,GAAGX,OAAO,GAAG8E,SAAU;cAAAxE,QAAA,eAEjDX,IAAA,CAACb,SAAS;gBAACyC,KAAK,EAAE;kBAAEJ,KAAK,EAAE,MAAM;kBAAE+B,UAAU,EAAE;gBAAS,CAAE;gBAACnB,OAAO,EAAEA,CAAA,KAAM,CAAC,CAAE;gBAAAzB,QAAA,EAC1E0E;cAAI,CACI;YAAC,CACH;UAAC,CACF,CAAC,gBAEbnF,KAAA,CAACX,IAAI;YAACqC,KAAK,EAAE;cAAEgC,IAAI,EAAE,CAAC;cAAE2C,cAAc,EAAE,QAAQ;cAAEhD,UAAU,EAAE,QAAQ;cAAEnC,OAAO,EAAE;YAAG,CAAE;YAAAT,QAAA,gBACpFX,IAAA,CAACb,SAAS;cACRyC,KAAK,EAAEvC,UAAU,CAACmH,YAAa;cAC/BpE,OAAO,EAAEpB,iBAAiB,GAAGX,OAAO,GAAG8E,SAAU;cACjDsB,2BAA2B;cAC3BC,yBAAyB,EAAC;YAAqB,CAChD,CAAC,EACDrB,IAAI;UAAA,CACD;QACP,CACG;MAAC,CACa;IAAC,CACI;EAAC,CACvB,CAAC;AAEZ","ignoreList":[]}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { useEffect, useState } from 'react';
|
|
4
|
+
import { ProgressBar } from "../ProgressBar/ProgressBar.js";
|
|
5
|
+
import { Dialog } from "./Dialog.js";
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
const clamp = (n, min, max) => n < min ? min : n > max ? max : n;
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* StepDialog — a multi-step (wizard) flow built on `Dialog`. Give it an array of
|
|
11
|
+
* `steps`; it tracks the current one, renders a round back button in the header
|
|
12
|
+
* from step 2 onward, a thin progress bar in the footer, and a
|
|
13
|
+
* secondary (Back / Cancel) + primary (Continue / Finish) button pair. A step's
|
|
14
|
+
* `onNext` can return `false` (sync or async) to block advancing after failed
|
|
15
|
+
* validation. Controlled via `step`/`onStepChange` or fully uncontrolled.
|
|
16
|
+
* Forwards all other `Dialog` props (width, fullscreen, scrollMode, …).
|
|
17
|
+
*/
|
|
18
|
+
export function StepDialog({
|
|
19
|
+
steps,
|
|
20
|
+
step,
|
|
21
|
+
defaultStep = 0,
|
|
22
|
+
onStepChange,
|
|
23
|
+
onFinish,
|
|
24
|
+
finishLabel = 'Finish',
|
|
25
|
+
backLabel = 'Back',
|
|
26
|
+
cancelLabel = 'Cancel',
|
|
27
|
+
showHeaderBack = true,
|
|
28
|
+
showFooterBack = true,
|
|
29
|
+
showProgress = true,
|
|
30
|
+
progressWidth = '62%',
|
|
31
|
+
visible,
|
|
32
|
+
onClose,
|
|
33
|
+
...dialogProps
|
|
34
|
+
}) {
|
|
35
|
+
const total = steps.length;
|
|
36
|
+
const [uncontrolled, setUncontrolled] = useState(defaultStep);
|
|
37
|
+
const isControlled = step !== undefined;
|
|
38
|
+
const index = clamp(isControlled ? step : uncontrolled, 0, Math.max(0, total - 1));
|
|
39
|
+
|
|
40
|
+
// Reset an uncontrolled flow to its first step whenever it is closed.
|
|
41
|
+
useEffect(() => {
|
|
42
|
+
if (!visible && !isControlled) setUncontrolled(defaultStep);
|
|
43
|
+
}, [visible, isControlled, defaultStep]);
|
|
44
|
+
const setIndex = next => {
|
|
45
|
+
const clamped = clamp(next, 0, total - 1);
|
|
46
|
+
if (!isControlled) setUncontrolled(clamped);
|
|
47
|
+
onStepChange?.(clamped);
|
|
48
|
+
};
|
|
49
|
+
const current = steps[index];
|
|
50
|
+
if (!current) return null;
|
|
51
|
+
const isFirst = index === 0;
|
|
52
|
+
const isLast = index === total - 1;
|
|
53
|
+
const goBack = () => {
|
|
54
|
+
if (!isFirst) setIndex(index - 1);
|
|
55
|
+
};
|
|
56
|
+
const advance = () => {
|
|
57
|
+
if (isLast) onFinish?.();else setIndex(index + 1);
|
|
58
|
+
};
|
|
59
|
+
const goNext = () => {
|
|
60
|
+
const result = current.onNext?.();
|
|
61
|
+
// Await only a real promise, so sync steps advance synchronously.
|
|
62
|
+
if (result && typeof result.then === 'function') {
|
|
63
|
+
void result.then(r => {
|
|
64
|
+
if (r !== false) advance();
|
|
65
|
+
});
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
if (result === false) return;
|
|
69
|
+
advance();
|
|
70
|
+
};
|
|
71
|
+
const footerAccessory = showProgress ? /*#__PURE__*/_jsx(ProgressBar, {
|
|
72
|
+
progress: (index + 1) / total,
|
|
73
|
+
showSupporting: false,
|
|
74
|
+
bordered: false,
|
|
75
|
+
height: 6,
|
|
76
|
+
style: {
|
|
77
|
+
width: progressWidth,
|
|
78
|
+
alignSelf: 'center'
|
|
79
|
+
},
|
|
80
|
+
accessibilityLabel: `Step ${index + 1} of ${total}`
|
|
81
|
+
}) : undefined;
|
|
82
|
+
return /*#__PURE__*/_jsx(Dialog, {
|
|
83
|
+
...dialogProps,
|
|
84
|
+
visible: visible,
|
|
85
|
+
onClose: onClose,
|
|
86
|
+
title: current.title,
|
|
87
|
+
subtitle: current.subtitle,
|
|
88
|
+
onBack: !isFirst && showHeaderBack ? goBack : undefined,
|
|
89
|
+
backAccessibilityLabel: backLabel,
|
|
90
|
+
footerAccessory: footerAccessory,
|
|
91
|
+
cancel: showFooterBack ? isFirst ? {
|
|
92
|
+
label: cancelLabel,
|
|
93
|
+
onPress: onClose
|
|
94
|
+
} : {
|
|
95
|
+
label: backLabel,
|
|
96
|
+
onPress: goBack
|
|
97
|
+
} : undefined,
|
|
98
|
+
actions: [{
|
|
99
|
+
label: current.nextLabel ?? (isLast ? finishLabel : 'Continue'),
|
|
100
|
+
onPress: goNext,
|
|
101
|
+
disabled: current.nextDisabled,
|
|
102
|
+
loading: current.nextLoading
|
|
103
|
+
}],
|
|
104
|
+
children: current.content
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
//# sourceMappingURL=StepDialog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useEffect","useState","ProgressBar","Dialog","jsx","_jsx","clamp","n","min","max","StepDialog","steps","step","defaultStep","onStepChange","onFinish","finishLabel","backLabel","cancelLabel","showHeaderBack","showFooterBack","showProgress","progressWidth","visible","onClose","dialogProps","total","length","uncontrolled","setUncontrolled","isControlled","undefined","index","Math","setIndex","next","clamped","current","isFirst","isLast","goBack","advance","goNext","result","onNext","then","r","footerAccessory","progress","showSupporting","bordered","height","style","width","alignSelf","accessibilityLabel","title","subtitle","onBack","backAccessibilityLabel","cancel","label","onPress","actions","nextLabel","disabled","nextDisabled","loading","nextLoading","children","content"],"sourceRoot":"..\\..\\..\\..\\src","sources":["components/Dialog/StepDialog.tsx"],"mappings":";;AAAA,SAASA,SAAS,EAAEC,QAAQ,QAAwB,OAAO;AAC3D,SAASC,WAAW,QAAQ,+BAA4B;AACxD,SAASC,MAAM,QAA0B,aAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA;AA0DpD,MAAMC,KAAK,GAAGA,CAACC,CAAS,EAAEC,GAAW,EAAEC,GAAW,KAAMF,CAAC,GAAGC,GAAG,GAAGA,GAAG,GAAGD,CAAC,GAAGE,GAAG,GAAGA,GAAG,GAAGF,CAAE;;AAE1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASG,UAAUA,CAAC;EACzBC,KAAK;EACLC,IAAI;EACJC,WAAW,GAAG,CAAC;EACfC,YAAY;EACZC,QAAQ;EACRC,WAAW,GAAG,QAAQ;EACtBC,SAAS,GAAG,MAAM;EAClBC,WAAW,GAAG,QAAQ;EACtBC,cAAc,GAAG,IAAI;EACrBC,cAAc,GA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E3C,WAAW;MAAE4C,OAAO,EAAEtC;IAAQ,CAAC,GACxC;MAAEqC,KAAK,EAAE5C,SAAS;MAAE6C,OAAO,EAAEtB;IAAO,CAAC,GACvCT,SACL;IACDgC,OAAO,EAAE,CACP;MACEF,KAAK,EAAExB,OAAO,CAAC2B,SAAS,KAAKzB,MAAM,GAAGvB,WAAW,GAAG,UAAU,CAAC;MAC/D8C,OAAO,EAAEpB,MAAM;MACfuB,QAAQ,EAAE5B,OAAO,CAAC6B,YAAY;MAC9BC,OAAO,EAAE9B,OAAO,CAAC+B;IACnB,CAAC,CACD;IAAAC,QAAA,EAEDhC,OAAO,CAACiC;EAAO,CACV,CAAC;AAEb","ignoreList":[]}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { useState } from 'react';
|
|
4
|
+
import { View } from 'react-native';
|
|
5
|
+
import { StepDialog } from "./StepDialog.js";
|
|
6
|
+
import { Button } from "../Button/Button.js";
|
|
7
|
+
import { Input } from "../Input/Input.js";
|
|
8
|
+
import { Radio } from "../Radio/Radio.js";
|
|
9
|
+
import { Text } from "../Text/Text.js";
|
|
10
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
|
+
const meta = {
|
|
12
|
+
title: 'Components/StepDialog',
|
|
13
|
+
component: StepDialog
|
|
14
|
+
};
|
|
15
|
+
export default meta;
|
|
16
|
+
function Frame({
|
|
17
|
+
render
|
|
18
|
+
}) {
|
|
19
|
+
const [open, setOpen] = useState(false);
|
|
20
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
21
|
+
style: {
|
|
22
|
+
padding: 24
|
|
23
|
+
},
|
|
24
|
+
children: [/*#__PURE__*/_jsx(Button, {
|
|
25
|
+
label: "Start flow",
|
|
26
|
+
onPress: () => setOpen(true)
|
|
27
|
+
}), render(open, () => setOpen(false))]
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/** Three-step flow: pick an option, fill details, confirm. */
|
|
32
|
+
export const Basic = {
|
|
33
|
+
render: () => /*#__PURE__*/_jsx(Frame, {
|
|
34
|
+
render: (open, close) => {
|
|
35
|
+
const [plan, setPlan] = useState('standard');
|
|
36
|
+
const [name, setName] = useState('');
|
|
37
|
+
const steps = [{
|
|
38
|
+
title: 'Choose a plan',
|
|
39
|
+
subtitle: 'Pick the option that fits your venue.',
|
|
40
|
+
content: /*#__PURE__*/_jsx(View, {
|
|
41
|
+
style: {
|
|
42
|
+
gap: 12
|
|
43
|
+
},
|
|
44
|
+
children: ['standard', 'pro', 'enterprise'].map(p => /*#__PURE__*/_jsx(Radio, {
|
|
45
|
+
selected: plan === p,
|
|
46
|
+
onChange: () => setPlan(p),
|
|
47
|
+
label: p[0].toUpperCase() + p.slice(1)
|
|
48
|
+
}, p))
|
|
49
|
+
})
|
|
50
|
+
}, {
|
|
51
|
+
title: 'Your details',
|
|
52
|
+
subtitle: 'Tell us who this is for.',
|
|
53
|
+
content: /*#__PURE__*/_jsx(Input, {
|
|
54
|
+
label: "Full name",
|
|
55
|
+
placeholder: "Jane Doe",
|
|
56
|
+
value: name,
|
|
57
|
+
onChangeText: setName
|
|
58
|
+
}),
|
|
59
|
+
nextDisabled: name.trim().length === 0
|
|
60
|
+
}, {
|
|
61
|
+
title: 'All set',
|
|
62
|
+
subtitle: 'Review and confirm.',
|
|
63
|
+
content: /*#__PURE__*/_jsx(Text, {
|
|
64
|
+
variant: "bodyMedium",
|
|
65
|
+
color: "secondary",
|
|
66
|
+
children: `Plan: ${plan}\nName: ${name || '—'}`
|
|
67
|
+
})
|
|
68
|
+
}];
|
|
69
|
+
return /*#__PURE__*/_jsx(StepDialog, {
|
|
70
|
+
visible: open,
|
|
71
|
+
onClose: close,
|
|
72
|
+
steps: steps,
|
|
73
|
+
onFinish: close
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
})
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
/** Async validation on `onNext` — the primary button spins and can block advancing. */
|
|
80
|
+
export const AsyncValidation = {
|
|
81
|
+
render: () => /*#__PURE__*/_jsx(Frame, {
|
|
82
|
+
render: (open, close) => {
|
|
83
|
+
const [code, setCode] = useState('');
|
|
84
|
+
const [loading, setLoading] = useState(false);
|
|
85
|
+
const steps = [{
|
|
86
|
+
title: 'Enter access code',
|
|
87
|
+
subtitle: 'Try "1234" to pass.',
|
|
88
|
+
content: /*#__PURE__*/_jsx(Input, {
|
|
89
|
+
label: "Code",
|
|
90
|
+
placeholder: "\u2022\u2022\u2022\u2022",
|
|
91
|
+
value: code,
|
|
92
|
+
onChangeText: setCode
|
|
93
|
+
}),
|
|
94
|
+
nextLabel: 'Verify',
|
|
95
|
+
nextLoading: loading,
|
|
96
|
+
onNext: async () => {
|
|
97
|
+
setLoading(true);
|
|
98
|
+
await new Promise(r => setTimeout(r, 700));
|
|
99
|
+
setLoading(false);
|
|
100
|
+
return code === '1234'; // false → stays on step
|
|
101
|
+
}
|
|
102
|
+
}, {
|
|
103
|
+
title: 'Verified',
|
|
104
|
+
content: /*#__PURE__*/_jsx(Text, {
|
|
105
|
+
variant: "bodyMedium",
|
|
106
|
+
color: "secondary",
|
|
107
|
+
children: "You are in."
|
|
108
|
+
})
|
|
109
|
+
}];
|
|
110
|
+
return /*#__PURE__*/_jsx(StepDialog, {
|
|
111
|
+
visible: open,
|
|
112
|
+
onClose: close,
|
|
113
|
+
steps: steps,
|
|
114
|
+
onFinish: close
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
})
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
/** Fullscreen flow for small devices. */
|
|
121
|
+
export const Fullscreen = {
|
|
122
|
+
render: () => /*#__PURE__*/_jsx(Frame, {
|
|
123
|
+
render: (open, close) => {
|
|
124
|
+
const steps = [{
|
|
125
|
+
title: 'Step one',
|
|
126
|
+
content: /*#__PURE__*/_jsx(Text, {
|
|
127
|
+
color: "secondary",
|
|
128
|
+
children: "First screen."
|
|
129
|
+
})
|
|
130
|
+
}, {
|
|
131
|
+
title: 'Step two',
|
|
132
|
+
content: /*#__PURE__*/_jsx(Text, {
|
|
133
|
+
color: "secondary",
|
|
134
|
+
children: "Second screen."
|
|
135
|
+
})
|
|
136
|
+
}, {
|
|
137
|
+
title: 'Step three',
|
|
138
|
+
content: /*#__PURE__*/_jsx(Text, {
|
|
139
|
+
color: "secondary",
|
|
140
|
+
children: "Last screen."
|
|
141
|
+
})
|
|
142
|
+
}];
|
|
143
|
+
return /*#__PURE__*/_jsx(StepDialog, {
|
|
144
|
+
visible: open,
|
|
145
|
+
onClose: close,
|
|
146
|
+
steps: steps,
|
|
147
|
+
onFinish: close,
|
|
148
|
+
fullscreen: true
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
})
|
|
152
|
+
};
|
|
153
|
+
//# sourceMappingURL=StepDialog.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useState","View","StepDialog","Button","Input","Radio","Text","jsx","_jsx","jsxs","_jsxs","meta","title","component","Frame","render","open","setOpen","style","padding","children","label","onPress","Basic","close","plan","setPlan","name","setName","steps","subtitle","content","gap","map","p","selected","onChange","toUpperCase","slice","placeholder","value","onChangeText","nextDisabled","trim","length","variant","color","visible","onClose","onFinish","AsyncValidation","code","setCode","loading","setLoading","nextLabel","nextLoading","onNext","Promise","r","setTimeout","Fullscreen","fullscreen"],"sourceRoot":"..\\..\\..\\..\\src","sources":["components/Dialog/StepDialog.stories.tsx"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,OAAO;AAEhC,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,UAAU,QAA6B,iBAAc;AAC9D,SAASC,MAAM,QAAQ,qBAAkB;AACzC,SAASC,KAAK,QAAQ,mBAAgB;AACtC,SAASC,KAAK,QAAQ,mBAAgB;AACtC,SAASC,IAAI,QAAQ,iBAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAE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