@snack-uikit/toaster 0.11.14 → 0.11.15-preview-429495d9.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/README.md CHANGED
@@ -83,6 +83,7 @@ toaster.upload.dismiss(uploadToastId);
83
83
  | containerId | `Id` | - | |
84
84
  | displayCloseAllButton | `boolean` | - | |
85
85
  | type | enum ToasterType: `"system-event"`, `"user-action"`, `"upload"` | system-event | |
86
+ | draggable | `boolean` | - | |
86
87
  ## ToastUpload
87
88
  ### Props
88
89
  | name | type | default value | description |
@@ -7,5 +7,6 @@ export type ToasterContainerProps = {
7
7
  containerId?: RtToastContainerProps['containerId'];
8
8
  displayCloseAllButton?: boolean;
9
9
  type?: ToasterType;
10
+ draggable?: boolean;
10
11
  };
11
- export declare function ToasterContainer({ position, limit, containerId, displayCloseAllButton, type, }: ToasterContainerProps): import("react/jsx-runtime").JSX.Element;
12
+ export declare function ToasterContainer({ position, limit, containerId, displayCloseAllButton, type, draggable, }: ToasterContainerProps): import("react/jsx-runtime").JSX.Element;
@@ -23,7 +23,8 @@ function ToasterContainer(_ref) {
23
23
  limit = 5,
24
24
  containerId,
25
25
  displayCloseAllButton,
26
- type = constants_1.TOASTER_TYPE.SystemEvent
26
+ type = constants_1.TOASTER_TYPE.SystemEvent,
27
+ draggable = false
27
28
  } = _ref;
28
29
  const [notificationCounter, setNotificationCounter] = (0, react_1.useState)(0);
29
30
  const [isCloseAllButtonHidden, setIsCloseAllButtonHidden] = (0, react_1.useState)(false);
@@ -56,7 +57,7 @@ function ToasterContainer(_ref) {
56
57
  closeOnClick: false,
57
58
  autoClose: false,
58
59
  closeButton: false,
59
- draggable: false,
60
+ draggable: draggable,
60
61
  className: (0, classnames_1.default)('osThemeSnack', styles_module_scss_1.default[position], {
61
62
  [styles_module_scss_1.default.containerWithCloseAllButton]: hasCloseAllButton,
62
63
  'osThemeSnack__toast-container__system-event': type === constants_1.TOASTER_TYPE.SystemEvent,
@@ -55,7 +55,9 @@ function getToastOptions(_ref2) {
55
55
  (_a = toastOptions === null || toastOptions === void 0 ? void 0 : toastOptions.onClose) === null || _a === void 0 ? void 0 : _a.call(toastOptions, data === null || data === void 0 ? void 0 : data.id);
56
56
  },
57
57
  autoClose: (toasterProps === null || toasterProps === void 0 ? void 0 : toasterProps.loading) ? false : constants_1.AUTO_CLOSE_TIME[type],
58
- containerId: containerId || `${constants_1.TOASTER_CONTAINER_PREFIX}${type}`
58
+ containerId: containerId || `${constants_1.TOASTER_CONTAINER_PREFIX}${type}`,
59
+ draggable: toastOptions === null || toastOptions === void 0 ? void 0 : toastOptions.draggable,
60
+ draggableDirection: type === constants_1.TOASTER_TYPE.UserAction ? 'y' : 'x'
59
61
  };
60
62
  }
61
63
  function getToastComponent(_ref3) {
@@ -150,7 +152,8 @@ const userAction = {
150
152
  }),
151
153
  toastOptions: {
152
154
  id: options.id,
153
- onClose: options.onClose
155
+ onClose: options.onClose,
156
+ draggable: options.draggable
154
157
  }
155
158
  });
156
159
  },
@@ -162,7 +165,8 @@ const userAction = {
162
165
  }),
163
166
  toastOptions: {
164
167
  id: options.id,
165
- onClose: options.onClose
168
+ onClose: options.onClose,
169
+ draggable: options.draggable
166
170
  }
167
171
  });
168
172
  },
@@ -174,7 +178,8 @@ const userAction = {
174
178
  }),
175
179
  toastOptions: {
176
180
  id: options.id,
177
- onClose: options.onClose
181
+ onClose: options.onClose,
182
+ draggable: options.draggable
178
183
  }
179
184
  });
180
185
  },
@@ -186,7 +191,8 @@ const userAction = {
186
191
  }),
187
192
  toastOptions: {
188
193
  id: options.id,
189
- onClose: options.onClose
194
+ onClose: options.onClose,
195
+ draggable: options.draggable
190
196
  }
191
197
  });
192
198
  },
@@ -196,7 +202,10 @@ const userAction = {
196
202
  type: constants_1.TOASTER_TYPE.UserAction,
197
203
  toasterProps: Object.assign(Object.assign({}, options), {
198
204
  appearance: 'success'
199
- })
205
+ }),
206
+ toastOptions: {
207
+ draggable: options.draggable
208
+ }
200
209
  });
201
210
  },
202
211
  neutral(id, options) {
@@ -204,7 +213,10 @@ const userAction = {
204
213
  type: constants_1.TOASTER_TYPE.UserAction,
205
214
  toasterProps: Object.assign(Object.assign({}, options), {
206
215
  appearance: 'neutral'
207
- })
216
+ }),
217
+ toastOptions: {
218
+ draggable: options.draggable
219
+ }
208
220
  });
209
221
  },
210
222
  warning(id, options) {
@@ -212,7 +224,10 @@ const userAction = {
212
224
  type: constants_1.TOASTER_TYPE.UserAction,
213
225
  toasterProps: Object.assign(Object.assign({}, options), {
214
226
  appearance: 'warning'
215
- })
227
+ }),
228
+ toastOptions: {
229
+ draggable: options.draggable
230
+ }
216
231
  });
217
232
  },
218
233
  error(id, options) {
@@ -220,7 +235,10 @@ const userAction = {
220
235
  type: constants_1.TOASTER_TYPE.UserAction,
221
236
  toasterProps: Object.assign(Object.assign({}, options), {
222
237
  appearance: 'error'
223
- })
238
+ }),
239
+ toastOptions: {
240
+ draggable: options.draggable
241
+ }
224
242
  });
225
243
  }
226
244
  },
@@ -237,7 +255,8 @@ const systemEvent = {
237
255
  }),
238
256
  toastOptions: {
239
257
  id: options.id,
240
- onClose: options.onClose
258
+ onClose: options.onClose,
259
+ draggable: options.draggable
241
260
  }
242
261
  });
243
262
  },
@@ -249,7 +268,8 @@ const systemEvent = {
249
268
  }),
250
269
  toastOptions: {
251
270
  id: options.id,
252
- onClose: options.onClose
271
+ onClose: options.onClose,
272
+ draggable: options.draggable
253
273
  }
254
274
  });
255
275
  },
@@ -261,7 +281,8 @@ const systemEvent = {
261
281
  }),
262
282
  toastOptions: {
263
283
  id: options.id,
264
- onClose: options.onClose
284
+ onClose: options.onClose,
285
+ draggable: options.draggable
265
286
  }
266
287
  });
267
288
  },
@@ -273,7 +294,8 @@ const systemEvent = {
273
294
  }),
274
295
  toastOptions: {
275
296
  id: options.id,
276
- onClose: options.onClose
297
+ onClose: options.onClose,
298
+ draggable: options.draggable
277
299
  }
278
300
  });
279
301
  },
@@ -285,7 +307,8 @@ const systemEvent = {
285
307
  }),
286
308
  toastOptions: {
287
309
  id: options.id,
288
- onClose: options.onClose
310
+ onClose: options.onClose,
311
+ draggable: options.draggable
289
312
  }
290
313
  });
291
314
  },
@@ -295,7 +318,10 @@ const systemEvent = {
295
318
  type: constants_1.TOASTER_TYPE.SystemEvent,
296
319
  toasterProps: Object.assign(Object.assign({}, options), {
297
320
  appearance: 'success'
298
- })
321
+ }),
322
+ toastOptions: {
323
+ draggable: options.draggable
324
+ }
299
325
  });
300
326
  },
301
327
  neutral(id, options) {
@@ -8,6 +8,7 @@ export type ToastOptions = {
8
8
  id?: ToasterId;
9
9
  autoClose?: RtToastOptions['autoClose'];
10
10
  onClose?(id?: ToasterId): void;
11
+ draggable?: boolean;
11
12
  };
12
13
  export type ToasterType = ValueOf<typeof TOASTER_TYPE>;
13
14
  export type ToasterPropsMap = {
@@ -34,8 +35,8 @@ export type UpdateToast = <T extends keyof ToasterPropsMap>(id: string | number,
34
35
  toastOptions?: ToastOptions;
35
36
  containerId?: ToasterContainerProps['containerId'];
36
37
  }) => void;
37
- export type UserActionOptions = Omit<ToastUserActionProps, 'appearance'> & Pick<ToastOptions, 'id' | 'onClose'>;
38
- export type SystemEventOptions = Omit<ToastSystemEventProps, 'appearance'> & Pick<ToastOptions, 'id' | 'onClose'>;
38
+ export type UserActionOptions = Omit<ToastUserActionProps, 'appearance'> & Pick<ToastOptions, 'id' | 'onClose' | 'draggable'>;
39
+ export type SystemEventOptions = Omit<ToastSystemEventProps, 'appearance'> & Pick<ToastOptions, 'id' | 'onClose' | 'draggable'>;
39
40
  export type UploadOptions = ToastUploadProps & Pick<ToastOptions, 'id' | 'onClose'>;
40
41
  export type Toaster = {
41
42
  userAction: {
@@ -7,5 +7,6 @@ export type ToasterContainerProps = {
7
7
  containerId?: RtToastContainerProps['containerId'];
8
8
  displayCloseAllButton?: boolean;
9
9
  type?: ToasterType;
10
+ draggable?: boolean;
10
11
  };
11
- export declare function ToasterContainer({ position, limit, containerId, displayCloseAllButton, type, }: ToasterContainerProps): import("react/jsx-runtime").JSX.Element;
12
+ export declare function ToasterContainer({ position, limit, containerId, displayCloseAllButton, type, draggable, }: ToasterContainerProps): import("react/jsx-runtime").JSX.Element;
@@ -6,7 +6,7 @@ import { toast, ToastContainer as RtToastContainer, } from 'react-toastify';
6
6
  import { TOASTER_CONTAINER_PREFIX, TOASTER_TYPE } from '../../constants';
7
7
  import { TOAST_SYSTEM_EVENT_TEST_IDS } from '../../testIds';
8
8
  import styles from './styles.module.css';
9
- export function ToasterContainer({ position = 'bottom-right', limit = 5, containerId, displayCloseAllButton, type = TOASTER_TYPE.SystemEvent, }) {
9
+ export function ToasterContainer({ position = 'bottom-right', limit = 5, containerId, displayCloseAllButton, type = TOASTER_TYPE.SystemEvent, draggable = false, }) {
10
10
  const [notificationCounter, setNotificationCounter] = useState(0);
11
11
  const [isCloseAllButtonHidden, setIsCloseAllButtonHidden] = useState(false);
12
12
  const closeAll = () => {
@@ -28,7 +28,7 @@ export function ToasterContainer({ position = 'bottom-right', limit = 5, contain
28
28
  return unsubscribe;
29
29
  }, []);
30
30
  const hasCloseAllButton = displayCloseAllButton && notificationCounter > 2 && !isCloseAllButtonHidden;
31
- return (_jsxs(_Fragment, { children: [_jsx(RtToastContainer, { hideProgressBar: true, closeOnClick: false, autoClose: false, closeButton: false, draggable: false, className: cn('osThemeSnack', styles[position], {
31
+ return (_jsxs(_Fragment, { children: [_jsx(RtToastContainer, { hideProgressBar: true, closeOnClick: false, autoClose: false, closeButton: false, draggable: draggable, className: cn('osThemeSnack', styles[position], {
32
32
  [styles.containerWithCloseAllButton]: hasCloseAllButton,
33
33
  'osThemeSnack__toast-container__system-event': type === TOASTER_TYPE.SystemEvent,
34
34
  'osThemeSnack__toast-container__user-action': type === TOASTER_TYPE.UserAction,
@@ -40,6 +40,8 @@ function getToastOptions({ type, toastOptions, containerId, toasterProps, }) {
40
40
  }),
41
41
  autoClose: (toasterProps === null || toasterProps === void 0 ? void 0 : toasterProps.loading) ? false : AUTO_CLOSE_TIME[type],
42
42
  containerId: containerId || `${TOASTER_CONTAINER_PREFIX}${type}`,
43
+ draggable: toastOptions === null || toastOptions === void 0 ? void 0 : toastOptions.draggable,
44
+ draggableDirection: type === TOASTER_TYPE.UserAction ? 'y' : 'x',
43
45
  };
44
46
  }
45
47
  function getToastComponent({ type, toasterProps, }) {
@@ -100,6 +102,7 @@ const userAction = {
100
102
  toastOptions: {
101
103
  id: options.id,
102
104
  onClose: options.onClose,
105
+ draggable: options.draggable,
103
106
  },
104
107
  });
105
108
  },
@@ -110,6 +113,7 @@ const userAction = {
110
113
  toastOptions: {
111
114
  id: options.id,
112
115
  onClose: options.onClose,
116
+ draggable: options.draggable,
113
117
  },
114
118
  });
115
119
  },
@@ -120,6 +124,7 @@ const userAction = {
120
124
  toastOptions: {
121
125
  id: options.id,
122
126
  onClose: options.onClose,
127
+ draggable: options.draggable,
123
128
  },
124
129
  });
125
130
  },
@@ -130,6 +135,7 @@ const userAction = {
130
135
  toastOptions: {
131
136
  id: options.id,
132
137
  onClose: options.onClose,
138
+ draggable: options.draggable,
133
139
  },
134
140
  });
135
141
  },
@@ -138,24 +144,36 @@ const userAction = {
138
144
  updateToast(id, {
139
145
  type: TOASTER_TYPE.UserAction,
140
146
  toasterProps: Object.assign(Object.assign({}, options), { appearance: 'success' }),
147
+ toastOptions: {
148
+ draggable: options.draggable,
149
+ },
141
150
  });
142
151
  },
143
152
  neutral(id, options) {
144
153
  updateToast(id, {
145
154
  type: TOASTER_TYPE.UserAction,
146
155
  toasterProps: Object.assign(Object.assign({}, options), { appearance: 'neutral' }),
156
+ toastOptions: {
157
+ draggable: options.draggable,
158
+ },
147
159
  });
148
160
  },
149
161
  warning(id, options) {
150
162
  updateToast(id, {
151
163
  type: TOASTER_TYPE.UserAction,
152
164
  toasterProps: Object.assign(Object.assign({}, options), { appearance: 'warning' }),
165
+ toastOptions: {
166
+ draggable: options.draggable,
167
+ },
153
168
  });
154
169
  },
155
170
  error(id, options) {
156
171
  updateToast(id, {
157
172
  type: TOASTER_TYPE.UserAction,
158
173
  toasterProps: Object.assign(Object.assign({}, options), { appearance: 'error' }),
174
+ toastOptions: {
175
+ draggable: options.draggable,
176
+ },
159
177
  });
160
178
  },
161
179
  },
@@ -171,6 +189,7 @@ const systemEvent = {
171
189
  toastOptions: {
172
190
  id: options.id,
173
191
  onClose: options.onClose,
192
+ draggable: options.draggable,
174
193
  },
175
194
  });
176
195
  },
@@ -181,6 +200,7 @@ const systemEvent = {
181
200
  toastOptions: {
182
201
  id: options.id,
183
202
  onClose: options.onClose,
203
+ draggable: options.draggable,
184
204
  },
185
205
  });
186
206
  },
@@ -191,6 +211,7 @@ const systemEvent = {
191
211
  toastOptions: {
192
212
  id: options.id,
193
213
  onClose: options.onClose,
214
+ draggable: options.draggable,
194
215
  },
195
216
  });
196
217
  },
@@ -201,6 +222,7 @@ const systemEvent = {
201
222
  toastOptions: {
202
223
  id: options.id,
203
224
  onClose: options.onClose,
225
+ draggable: options.draggable,
204
226
  },
205
227
  });
206
228
  },
@@ -211,6 +233,7 @@ const systemEvent = {
211
233
  toastOptions: {
212
234
  id: options.id,
213
235
  onClose: options.onClose,
236
+ draggable: options.draggable,
214
237
  },
215
238
  });
216
239
  },
@@ -219,6 +242,9 @@ const systemEvent = {
219
242
  return updateToast(id, {
220
243
  type: TOASTER_TYPE.SystemEvent,
221
244
  toasterProps: Object.assign(Object.assign({}, options), { appearance: 'success' }),
245
+ toastOptions: {
246
+ draggable: options.draggable,
247
+ },
222
248
  });
223
249
  },
224
250
  neutral(id, options) {
@@ -8,6 +8,7 @@ export type ToastOptions = {
8
8
  id?: ToasterId;
9
9
  autoClose?: RtToastOptions['autoClose'];
10
10
  onClose?(id?: ToasterId): void;
11
+ draggable?: boolean;
11
12
  };
12
13
  export type ToasterType = ValueOf<typeof TOASTER_TYPE>;
13
14
  export type ToasterPropsMap = {
@@ -34,8 +35,8 @@ export type UpdateToast = <T extends keyof ToasterPropsMap>(id: string | number,
34
35
  toastOptions?: ToastOptions;
35
36
  containerId?: ToasterContainerProps['containerId'];
36
37
  }) => void;
37
- export type UserActionOptions = Omit<ToastUserActionProps, 'appearance'> & Pick<ToastOptions, 'id' | 'onClose'>;
38
- export type SystemEventOptions = Omit<ToastSystemEventProps, 'appearance'> & Pick<ToastOptions, 'id' | 'onClose'>;
38
+ export type UserActionOptions = Omit<ToastUserActionProps, 'appearance'> & Pick<ToastOptions, 'id' | 'onClose' | 'draggable'>;
39
+ export type SystemEventOptions = Omit<ToastSystemEventProps, 'appearance'> & Pick<ToastOptions, 'id' | 'onClose' | 'draggable'>;
39
40
  export type UploadOptions = ToastUploadProps & Pick<ToastOptions, 'id' | 'onClose'>;
40
41
  export type Toaster = {
41
42
  userAction: {
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "access": "public"
5
5
  },
6
6
  "title": "Toaster",
7
- "version": "0.11.14",
7
+ "version": "0.11.15-preview-429495d9.0",
8
8
  "sideEffects": [
9
9
  "*.css",
10
10
  "*.woff",
@@ -49,5 +49,5 @@
49
49
  "react-toastify": "10.0.5",
50
50
  "uncontrollable": "9.0.0"
51
51
  },
52
- "gitHead": "6f4dbbdf91fdd49fc8a49ecf0be7a2e7e56ae73b"
52
+ "gitHead": "dece1f4303310a63303681e2f5c0f36d2597b65a"
53
53
  }
@@ -21,6 +21,7 @@ export type ToasterContainerProps = {
21
21
  containerId?: RtToastContainerProps['containerId'];
22
22
  displayCloseAllButton?: boolean;
23
23
  type?: ToasterType;
24
+ draggable?: boolean;
24
25
  };
25
26
 
26
27
  export function ToasterContainer({
@@ -29,6 +30,7 @@ export function ToasterContainer({
29
30
  containerId,
30
31
  displayCloseAllButton,
31
32
  type = TOASTER_TYPE.SystemEvent,
33
+ draggable = false,
32
34
  }: ToasterContainerProps) {
33
35
  const [notificationCounter, setNotificationCounter] = useState(0);
34
36
  const [isCloseAllButtonHidden, setIsCloseAllButtonHidden] = useState(false);
@@ -62,7 +64,7 @@ export function ToasterContainer({
62
64
  closeOnClick={false}
63
65
  autoClose={false}
64
66
  closeButton={false}
65
- draggable={false}
67
+ draggable={draggable}
66
68
  className={cn('osThemeSnack', styles[position], {
67
69
  [styles.containerWithCloseAllButton]: hasCloseAllButton,
68
70
  'osThemeSnack__toast-container__system-event': type === TOASTER_TYPE.SystemEvent,
package/src/helpers.tsx CHANGED
@@ -85,6 +85,8 @@ function getToastOptions<T extends keyof ToasterPropsMap>({
85
85
  }) as RtToastOptions['onClose'],
86
86
  autoClose: toasterProps?.loading ? false : AUTO_CLOSE_TIME[type],
87
87
  containerId: containerId || `${TOASTER_CONTAINER_PREFIX}${type}`,
88
+ draggable: toastOptions?.draggable,
89
+ draggableDirection: type === TOASTER_TYPE.UserAction ? 'y' : 'x',
88
90
  };
89
91
  }
90
92
 
@@ -172,6 +174,7 @@ const userAction = {
172
174
  toastOptions: {
173
175
  id: options.id,
174
176
  onClose: options.onClose,
177
+ draggable: options.draggable,
175
178
  },
176
179
  });
177
180
  },
@@ -183,6 +186,7 @@ const userAction = {
183
186
  toastOptions: {
184
187
  id: options.id,
185
188
  onClose: options.onClose,
189
+ draggable: options.draggable,
186
190
  },
187
191
  });
188
192
  },
@@ -194,6 +198,7 @@ const userAction = {
194
198
  toastOptions: {
195
199
  id: options.id,
196
200
  onClose: options.onClose,
201
+ draggable: options.draggable,
197
202
  },
198
203
  });
199
204
  },
@@ -205,6 +210,7 @@ const userAction = {
205
210
  toastOptions: {
206
211
  id: options.id,
207
212
  onClose: options.onClose,
213
+ draggable: options.draggable,
208
214
  },
209
215
  });
210
216
  },
@@ -214,6 +220,9 @@ const userAction = {
214
220
  updateToast(id, {
215
221
  type: TOASTER_TYPE.UserAction,
216
222
  toasterProps: { ...options, appearance: 'success' },
223
+ toastOptions: {
224
+ draggable: options.draggable,
225
+ },
217
226
  });
218
227
  },
219
228
 
@@ -221,6 +230,9 @@ const userAction = {
221
230
  updateToast(id, {
222
231
  type: TOASTER_TYPE.UserAction,
223
232
  toasterProps: { ...options, appearance: 'neutral' },
233
+ toastOptions: {
234
+ draggable: options.draggable,
235
+ },
224
236
  });
225
237
  },
226
238
 
@@ -228,6 +240,9 @@ const userAction = {
228
240
  updateToast(id, {
229
241
  type: TOASTER_TYPE.UserAction,
230
242
  toasterProps: { ...options, appearance: 'warning' },
243
+ toastOptions: {
244
+ draggable: options.draggable,
245
+ },
231
246
  });
232
247
  },
233
248
 
@@ -235,6 +250,9 @@ const userAction = {
235
250
  updateToast(id, {
236
251
  type: TOASTER_TYPE.UserAction,
237
252
  toasterProps: { ...options, appearance: 'error' },
253
+ toastOptions: {
254
+ draggable: options.draggable,
255
+ },
238
256
  });
239
257
  },
240
258
  },
@@ -252,6 +270,7 @@ const systemEvent = {
252
270
  toastOptions: {
253
271
  id: options.id,
254
272
  onClose: options.onClose,
273
+ draggable: options.draggable,
255
274
  },
256
275
  });
257
276
  },
@@ -263,6 +282,7 @@ const systemEvent = {
263
282
  toastOptions: {
264
283
  id: options.id,
265
284
  onClose: options.onClose,
285
+ draggable: options.draggable,
266
286
  },
267
287
  });
268
288
  },
@@ -274,6 +294,7 @@ const systemEvent = {
274
294
  toastOptions: {
275
295
  id: options.id,
276
296
  onClose: options.onClose,
297
+ draggable: options.draggable,
277
298
  },
278
299
  });
279
300
  },
@@ -285,6 +306,7 @@ const systemEvent = {
285
306
  toastOptions: {
286
307
  id: options.id,
287
308
  onClose: options.onClose,
309
+ draggable: options.draggable,
288
310
  },
289
311
  });
290
312
  },
@@ -296,6 +318,7 @@ const systemEvent = {
296
318
  toastOptions: {
297
319
  id: options.id,
298
320
  onClose: options.onClose,
321
+ draggable: options.draggable,
299
322
  },
300
323
  });
301
324
  },
@@ -305,6 +328,9 @@ const systemEvent = {
305
328
  return updateToast(id, {
306
329
  type: TOASTER_TYPE.SystemEvent,
307
330
  toasterProps: { ...options, appearance: 'success' },
331
+ toastOptions: {
332
+ draggable: options.draggable,
333
+ },
308
334
  });
309
335
  },
310
336
 
package/src/types.ts CHANGED
@@ -12,6 +12,7 @@ export type ToastOptions = {
12
12
  id?: ToasterId;
13
13
  autoClose?: RtToastOptions['autoClose'];
14
14
  onClose?(id?: ToasterId): void;
15
+ draggable?: boolean;
15
16
  };
16
17
 
17
18
  export type ToasterType = ValueOf<typeof TOASTER_TYPE>;
@@ -48,8 +49,10 @@ export type UpdateToast = <T extends keyof ToasterPropsMap>(
48
49
  },
49
50
  ) => void;
50
51
 
51
- export type UserActionOptions = Omit<ToastUserActionProps, 'appearance'> & Pick<ToastOptions, 'id' | 'onClose'>;
52
- export type SystemEventOptions = Omit<ToastSystemEventProps, 'appearance'> & Pick<ToastOptions, 'id' | 'onClose'>;
52
+ export type UserActionOptions = Omit<ToastUserActionProps, 'appearance'> &
53
+ Pick<ToastOptions, 'id' | 'onClose' | 'draggable'>;
54
+ export type SystemEventOptions = Omit<ToastSystemEventProps, 'appearance'> &
55
+ Pick<ToastOptions, 'id' | 'onClose' | 'draggable'>;
53
56
  export type UploadOptions = ToastUploadProps & Pick<ToastOptions, 'id' | 'onClose'>;
54
57
 
55
58
  export type Toaster = {