@snack-uikit/toaster 0.11.15-preview-b2ccf94a.0 → 0.11.15

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