@snack-uikit/toaster 0.6.9-preview-7ee1f9de.0 → 0.6.9-preview-61555bbb.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.
@@ -28,7 +28,9 @@ 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[`container-${type}`], styles[position], {
31
+ return (_jsxs(_Fragment, { children: [_jsx(RtToastContainer, { hideProgressBar: true, closeOnClick: false, autoClose: false, closeButton: false, draggable: false, className: cn('osThemeSnack', styles[position], {
32
32
  [styles.containerWithCloseAllButton]: hasCloseAllButton,
33
+ 'osThemeSnack__toast-container__system-event': type === TOASTER_TYPE.SystemEvent,
34
+ 'osThemeSnack__toast-container__user-action': type === TOASTER_TYPE.UserAction,
33
35
  }), toastClassName: styles.toaster, bodyClassName: styles.toaster, position: position, limit: limit, containerId: containerId }), hasCloseAllButton && (_jsx("div", { className: cn(styles.buttonCloseColumnWrapper, styles[position]), children: _jsx("button", { className: styles.buttonCloseColumn, onClick: closeAll, "data-test-id": TOAST_SYSTEM_EVENT_TEST_IDS.buttonCloseColumn, children: "\u0417\u0430\u043A\u0440\u044B\u0442\u044C \u0432\u0441\u0435" }) }))] }));
34
36
  }
@@ -38,24 +38,6 @@
38
38
  color:var(--sys-invert-neutral-text-light, #868892);
39
39
  }
40
40
 
41
- .container-system-event{
42
- gap:var(--space-toaster-system-event-gap, 8px);
43
- padding:var(--space-toaster-system-event-padding, 8px);
44
- width:var(--size-toaster-toast-system-event-container, 320px);
45
- display:flex;
46
- flex-direction:column;
47
- }
48
-
49
- .container-user-action{
50
- padding-bottom:var(--space-toaster-user-action-padding-bottom, 8px);
51
- gap:var(--space-toaster-user-action-gap, 8px);
52
- display:flex;
53
- flex-direction:column;
54
- align-items:center;
55
- width:-moz-fit-content;
56
- width:fit-content;
57
- }
58
-
59
41
  .bottom-right{
60
42
  right:0;
61
43
  bottom:0;
@@ -79,6 +61,7 @@
79
61
  :global .osThemeSnack.Toastify__toast-container{
80
62
  position:fixed;
81
63
  box-sizing:border-box;
64
+ padding:0;
82
65
  }
83
66
  :global .osThemeSnack.Toastify__toast-container .Toastify__toast{
84
67
  --y:0;
@@ -90,6 +73,25 @@
90
73
  display:flex;
91
74
  justify-content:space-between;
92
75
  box-sizing:border-box;
76
+ min-height:unset;
77
+ margin:0;
78
+ padding:0;
79
+ background-color:transparent;
80
+ border-radius:unset;
81
+ box-shadow:none;
82
+ }
83
+ :global .osThemeSnack.Toastify__toast-container .Toastify__toast-body{
84
+ margin:0;
85
+ padding:0;
86
+ }
87
+ :global .osThemeSnack.Toastify__toast-container .container-user-action{
88
+ padding-bottom:var(--space-toaster-user-action-padding-bottom, 8px);
89
+ gap:var(--space-toaster-user-action-gap, 8px);
90
+ display:flex;
91
+ flex-direction:column;
92
+ align-items:center;
93
+ width:-moz-fit-content;
94
+ width:fit-content;
93
95
  }
94
96
  :global .osThemeSnack.Toastify__toast-container .Toastify--animate{
95
97
  animation-duration:0.5s;
@@ -101,6 +103,13 @@
101
103
  border:none;
102
104
  outline:none;
103
105
  }
106
+ :global .osThemeSnack.Toastify__toast-container .Toastify__toast-container{
107
+ margin:0;
108
+ padding:0;
109
+ }
110
+ :global .osThemeSnack.Toastify__toast-container .Toastify__progress-bar{
111
+ background:transparent;
112
+ }
104
113
  :global .osThemeSnack.Toastify__toast-container .Toastify__progress-bar--animated{
105
114
  animation:osSnackTheme__toast__trackProgress linear 1 forwards;
106
115
  }
@@ -118,6 +127,22 @@
118
127
  :global .osThemeSnack.Toastify__toast-container .Toastify__bounce-exit--bottom-center{
119
128
  animation-name:osSnackTheme__toast__bounceOutDown;
120
129
  }
130
+ :global .osThemeSnack.Toastify__toast-container.osThemeSnack__toast-container__system-event{
131
+ gap:var(--space-toaster-system-event-gap, 8px);
132
+ padding:var(--space-toaster-system-event-padding, 8px);
133
+ width:var(--size-toaster-toast-system-event-container, 320px);
134
+ display:flex;
135
+ flex-direction:column;
136
+ }
137
+ :global .osThemeSnack.Toastify__toast-container.osThemeSnack__toast-container__user-action{
138
+ padding-bottom:var(--space-toaster-user-action-padding-bottom, 8px);
139
+ gap:var(--space-toaster-user-action-gap, 8px);
140
+ display:flex;
141
+ flex-direction:column;
142
+ align-items:center;
143
+ width:-moz-fit-content;
144
+ width:fit-content;
145
+ }
121
146
  :global .osThemeSnack.Toastify__toast-container--bottom-right{
122
147
  right:0;
123
148
  bottom:0;
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  export { toaster, openToast, updateToast, dismissToast } from './helpers';
2
2
  export type { ToastSystemEventProps, ToastUserActionProps, ToasterContainerProps } from './components';
3
- export type { Toaster, UpdateToast, OpenToast, UserActionOptions, SystemEventOptions } from './types';
3
+ export type { Toaster, UpdateToast, OpenToast, UserActionOptions, SystemEventOptions, ToasterId, ToastOptions, } from './types';
4
4
  export { TOASTER_TYPE } from './constants';
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "access": "public"
5
5
  },
6
6
  "title": "Toaster",
7
- "version": "0.6.9-preview-7ee1f9de.0",
7
+ "version": "0.6.9-preview-61555bbb.0",
8
8
  "sideEffects": [
9
9
  "*.css",
10
10
  "*.woff",
@@ -40,5 +40,5 @@
40
40
  "classnames": "2.3.2",
41
41
  "react-toastify": "10.0.5"
42
42
  },
43
- "gitHead": "f8b6458096955f7299ec438ddf060d426af43faf"
43
+ "gitHead": "dd0e097ea5b5a22cbb9fa42c81f5ff966e60aa02"
44
44
  }
@@ -63,8 +63,10 @@ export function ToasterContainer({
63
63
  autoClose={false}
64
64
  closeButton={false}
65
65
  draggable={false}
66
- className={cn('osThemeSnack', styles[`container-${type}`], styles[position], {
66
+ className={cn('osThemeSnack', styles[position], {
67
67
  [styles.containerWithCloseAllButton]: hasCloseAllButton,
68
+ 'osThemeSnack__toast-container__system-event': type === TOASTER_TYPE.SystemEvent,
69
+ 'osThemeSnack__toast-container__user-action': type === TOASTER_TYPE.UserAction,
68
70
  })}
69
71
  toastClassName={styles.toaster}
70
72
  bodyClassName={styles.toaster}
@@ -42,22 +42,6 @@
42
42
  }
43
43
  }
44
44
 
45
- .container-system-event {
46
- @include composite-var($toaster-system-event-toaster-container);
47
-
48
- display: flex;
49
- flex-direction: column;
50
- }
51
-
52
- .container-user-action {
53
- @include composite-var($toaster-user-action-toaster-container);
54
-
55
- display: flex;
56
- flex-direction: column;
57
- align-items: center;
58
- width: fit-content;
59
- }
60
-
61
45
  .bottom-right {
62
46
  right: 0;
63
47
  bottom: 0;
@@ -87,6 +71,7 @@ $theme-name: osThemeSnack;
87
71
  .#{$theme-name}.Toastify__toast-container {
88
72
  position: fixed;
89
73
  box-sizing: border-box;
74
+ padding: 0;
90
75
 
91
76
  .Toastify__toast {
92
77
  --y: 0;
@@ -102,6 +87,27 @@ $theme-name: osThemeSnack;
102
87
  justify-content: space-between;
103
88
 
104
89
  box-sizing: border-box;
90
+ min-height: unset;
91
+ margin: 0;
92
+ padding: 0;
93
+
94
+ background-color: transparent;
95
+ border-radius: unset;
96
+ box-shadow: none;
97
+ }
98
+
99
+ .Toastify__toast-body {
100
+ margin: 0;
101
+ padding: 0;
102
+ }
103
+
104
+ .#{container-user-action} {
105
+ @include composite-var($toaster-user-action-toaster-container);
106
+
107
+ display: flex;
108
+ flex-direction: column;
109
+ align-items: center;
110
+ width: fit-content;
105
111
  }
106
112
 
107
113
  .Toastify--animate {
@@ -116,6 +122,15 @@ $theme-name: osThemeSnack;
116
122
  outline: none;
117
123
  }
118
124
 
125
+ .Toastify__toast-container {
126
+ margin: 0;
127
+ padding: 0;
128
+ }
129
+
130
+ .Toastify__progress-bar {
131
+ background: transparent;
132
+ }
133
+
119
134
  .Toastify__progress-bar--animated {
120
135
  animation: osSnackTheme__toast__trackProgress linear 1 forwards;
121
136
  }
@@ -139,6 +154,22 @@ $theme-name: osThemeSnack;
139
154
  }
140
155
  }
141
156
 
157
+ .#{$theme-name}.Toastify__toast-container.osThemeSnack__toast-container__system-event {
158
+ @include composite-var($toaster-system-event-toaster-container);
159
+
160
+ display: flex;
161
+ flex-direction: column;
162
+ }
163
+
164
+ .#{$theme-name}.Toastify__toast-container.osThemeSnack__toast-container__user-action {
165
+ @include composite-var($toaster-user-action-toaster-container);
166
+
167
+ display: flex;
168
+ flex-direction: column;
169
+ align-items: center;
170
+ width: fit-content;
171
+ }
172
+
142
173
  .#{$theme-name}.Toastify__toast-container--bottom-right {
143
174
  right: 0;
144
175
  bottom: 0;
package/src/index.ts CHANGED
@@ -1,4 +1,12 @@
1
1
  export { toaster, openToast, updateToast, dismissToast } from './helpers';
2
2
  export type { ToastSystemEventProps, ToastUserActionProps, ToasterContainerProps } from './components';
3
- export type { Toaster, UpdateToast, OpenToast, UserActionOptions, SystemEventOptions } from './types';
3
+ export type {
4
+ Toaster,
5
+ UpdateToast,
6
+ OpenToast,
7
+ UserActionOptions,
8
+ SystemEventOptions,
9
+ ToasterId,
10
+ ToastOptions,
11
+ } from './types';
4
12
  export { TOASTER_TYPE } from './constants';