@inertiaui/notifications-vue 0.0.0-stage → 1.0.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/LICENSE.md +21 -0
- package/dist/inertiaui-notifications.d.ts +1756 -0
- package/dist/inertiaui-notifications.js +5531 -0
- package/package.json +57 -3
- package/shadcn.css +37 -0
- package/theme.css +410 -0
- package/README.md +0 -3
package/package.json
CHANGED
|
@@ -1,6 +1,60 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inertiaui/notifications-vue",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Vue components for Inertia Notifications",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"inertia",
|
|
7
|
+
"inertiajs",
|
|
8
|
+
"laravel",
|
|
9
|
+
"vue",
|
|
10
|
+
"notifications",
|
|
11
|
+
"notification-center",
|
|
12
|
+
"toast",
|
|
13
|
+
"toasts",
|
|
14
|
+
"tailwindcss"
|
|
15
|
+
],
|
|
16
|
+
"homepage": "https://inertiaui.com/inertia-notifications/docs",
|
|
17
|
+
"bugs": {
|
|
18
|
+
"url": "https://github.com/inertiaui/notifications/issues"
|
|
19
|
+
},
|
|
20
|
+
"author": "Pascal Baljet <pascal@protone.media>",
|
|
21
|
+
"license": "MIT",
|
|
22
|
+
"private": false,
|
|
23
|
+
"repository": {
|
|
24
|
+
"type": "git",
|
|
25
|
+
"url": "git+https://github.com/inertiaui/notifications.git",
|
|
26
|
+
"directory": "vue"
|
|
27
|
+
},
|
|
28
|
+
"type": "module",
|
|
29
|
+
"files": [
|
|
30
|
+
"dist",
|
|
31
|
+
"shadcn.css",
|
|
32
|
+
"theme.css"
|
|
33
|
+
],
|
|
34
|
+
"module": "./dist/inertiaui-notifications.js",
|
|
35
|
+
"types": "./dist/inertiaui-notifications.d.ts",
|
|
36
|
+
"exports": {
|
|
37
|
+
".": {
|
|
38
|
+
"types": "./dist/inertiaui-notifications.d.ts",
|
|
39
|
+
"import": "./dist/inertiaui-notifications.js"
|
|
40
|
+
},
|
|
41
|
+
"./theme.css": "./theme.css",
|
|
42
|
+
"./shadcn.css": "./shadcn.css"
|
|
43
|
+
},
|
|
44
|
+
"dependencies": {
|
|
45
|
+
"@inertiaui/vanilla": "^1.7.0",
|
|
46
|
+
"tailwind-merge": "^3.7.0"
|
|
47
|
+
},
|
|
48
|
+
"peerDependencies": {
|
|
49
|
+
"@inertiajs/vue3": "^3.11.0",
|
|
50
|
+
"vue": "^3.5.0"
|
|
51
|
+
},
|
|
52
|
+
"sideEffects": [
|
|
53
|
+
"*.css"
|
|
54
|
+
],
|
|
55
|
+
"scripts": {
|
|
56
|
+
"dev": "vp build --watch",
|
|
57
|
+
"build": "vp build",
|
|
58
|
+
"typecheck": "vue-tsc --noEmit"
|
|
59
|
+
}
|
|
6
60
|
}
|
package/shadcn.css
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Maps the Notifications tokens to the shadcn/ui variables of the Laravel starter kits, such as --popover, --border,
|
|
3
|
+
* and --radius. Import after theme.css. The variables switch under .dark, so the tokens switch with them, and an
|
|
4
|
+
* override in :root still wins, as :where() has no specificity. The info, success, and warning colors have no shadcn
|
|
5
|
+
* equivalent and keep the theme's values. So does the focus ring, as --ring is too faint on the surface for a 2px ring.
|
|
6
|
+
*/
|
|
7
|
+
:where(:root, :host, .dark) {
|
|
8
|
+
--color-iui-toast-surface: var(--popover);
|
|
9
|
+
--color-iui-toast-foreground: var(--popover-foreground);
|
|
10
|
+
--color-iui-toast-muted-foreground: var(--muted-foreground);
|
|
11
|
+
--color-iui-toast-border: var(--border);
|
|
12
|
+
--color-iui-toast-icon: var(--muted-foreground);
|
|
13
|
+
--color-iui-toast-icon-hover: var(--accent-foreground);
|
|
14
|
+
--color-iui-toast-control-hover: var(--accent);
|
|
15
|
+
--color-iui-toast-action: var(--primary);
|
|
16
|
+
--color-iui-toast-default: var(--muted-foreground);
|
|
17
|
+
--color-iui-toast-error: var(--destructive-foreground, var(--destructive));
|
|
18
|
+
--color-iui-toast-loading: var(--muted-foreground);
|
|
19
|
+
|
|
20
|
+
--radius-iui-toast: var(--radius);
|
|
21
|
+
|
|
22
|
+
--color-iui-inbox-surface: var(--popover);
|
|
23
|
+
--color-iui-inbox-foreground: var(--popover-foreground);
|
|
24
|
+
--color-iui-inbox-muted-foreground: var(--muted-foreground);
|
|
25
|
+
--color-iui-inbox-border: var(--border);
|
|
26
|
+
--color-iui-inbox-icon: var(--muted-foreground);
|
|
27
|
+
--color-iui-inbox-icon-hover: var(--accent-foreground);
|
|
28
|
+
--color-iui-inbox-control-hover: var(--accent);
|
|
29
|
+
--color-iui-inbox-accent: var(--primary);
|
|
30
|
+
--color-iui-inbox-accent-subtle: var(--accent);
|
|
31
|
+
--color-iui-inbox-badge: var(--destructive);
|
|
32
|
+
--color-iui-inbox-unread: var(--primary);
|
|
33
|
+
--color-iui-inbox-tooltip: var(--foreground);
|
|
34
|
+
--color-iui-inbox-tooltip-foreground: var(--background);
|
|
35
|
+
|
|
36
|
+
--radius-iui-inbox: calc(var(--radius) - 2px);
|
|
37
|
+
}
|
package/theme.css
ADDED
|
@@ -0,0 +1,410 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Semantic Notifications tokens and the toast stack layout. Import after Tailwind and override the tokens in
|
|
3
|
+
* :root, .dark, or a local wrapper. Dark defaults follow the application's Tailwind dark variant: the media query
|
|
4
|
+
* by default, or a configured selector such as &:where(.dark, .dark *) or &:is(.dark *).
|
|
5
|
+
*/
|
|
6
|
+
@theme {
|
|
7
|
+
--color-iui-toast-surface: #ffffff;
|
|
8
|
+
--color-iui-toast-foreground: var(--color-gray-900);
|
|
9
|
+
--color-iui-toast-muted-foreground: var(--color-gray-600);
|
|
10
|
+
--color-iui-toast-border: var(--color-gray-200);
|
|
11
|
+
--color-iui-toast-icon: var(--color-gray-500);
|
|
12
|
+
--color-iui-toast-icon-hover: var(--color-gray-600);
|
|
13
|
+
--color-iui-toast-control-hover: var(--color-gray-100);
|
|
14
|
+
--color-iui-toast-ring: var(--color-blue-500);
|
|
15
|
+
--color-iui-toast-action: var(--color-blue-600);
|
|
16
|
+
--color-iui-toast-default: var(--color-gray-500);
|
|
17
|
+
--color-iui-toast-info: var(--color-blue-500);
|
|
18
|
+
--color-iui-toast-success: var(--color-emerald-600);
|
|
19
|
+
--color-iui-toast-warning: var(--color-amber-600);
|
|
20
|
+
--color-iui-toast-error: var(--color-red-500);
|
|
21
|
+
--color-iui-toast-loading: var(--color-gray-500);
|
|
22
|
+
|
|
23
|
+
--radius-iui-toast: 0.5rem;
|
|
24
|
+
|
|
25
|
+
--color-iui-inbox-surface: #ffffff;
|
|
26
|
+
--color-iui-inbox-foreground: var(--color-gray-900);
|
|
27
|
+
--color-iui-inbox-muted-foreground: var(--color-gray-600);
|
|
28
|
+
--color-iui-inbox-border: var(--color-gray-200);
|
|
29
|
+
--color-iui-inbox-icon: var(--color-gray-500);
|
|
30
|
+
--color-iui-inbox-icon-hover: var(--color-gray-700);
|
|
31
|
+
--color-iui-inbox-control-hover: var(--color-gray-100);
|
|
32
|
+
--color-iui-inbox-ring: var(--color-blue-500);
|
|
33
|
+
--color-iui-inbox-accent: var(--color-blue-600);
|
|
34
|
+
--color-iui-inbox-accent-subtle: var(--color-blue-50);
|
|
35
|
+
--color-iui-inbox-badge: var(--color-red-600);
|
|
36
|
+
--color-iui-inbox-badge-foreground: #ffffff;
|
|
37
|
+
--color-iui-inbox-unread: var(--color-blue-600);
|
|
38
|
+
--color-iui-inbox-tooltip: var(--color-gray-900);
|
|
39
|
+
--color-iui-inbox-tooltip-foreground: #ffffff;
|
|
40
|
+
|
|
41
|
+
--radius-iui-inbox: 0.5rem;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/*
|
|
45
|
+
* Dark defaults. The dark variant applies to the children of the root, a .dark wrapper, or a shadow host, and the
|
|
46
|
+
* tokens go on that parent, so they also switch under a selector that needs a .dark ancestor, such as &:is(.dark *),
|
|
47
|
+
* which never matches the root itself. :where() leaves the specificity of an override in :root ahead.
|
|
48
|
+
*/
|
|
49
|
+
@layer base {
|
|
50
|
+
* {
|
|
51
|
+
@variant dark {
|
|
52
|
+
:where(:root:has(> &), .dark:has(> &)),
|
|
53
|
+
:host:has(> &) {
|
|
54
|
+
--iui-color-scheme: dark;
|
|
55
|
+
|
|
56
|
+
--color-iui-toast-surface: var(--color-zinc-900);
|
|
57
|
+
--color-iui-toast-foreground: var(--color-zinc-100);
|
|
58
|
+
--color-iui-toast-muted-foreground: var(--color-zinc-400);
|
|
59
|
+
--color-iui-toast-border: var(--color-zinc-700);
|
|
60
|
+
--color-iui-toast-icon: var(--color-zinc-500);
|
|
61
|
+
--color-iui-toast-icon-hover: var(--color-zinc-300);
|
|
62
|
+
--color-iui-toast-control-hover: var(--color-zinc-800);
|
|
63
|
+
--color-iui-toast-ring: var(--color-blue-400);
|
|
64
|
+
--color-iui-toast-action: var(--color-blue-400);
|
|
65
|
+
--color-iui-toast-default: var(--color-zinc-500);
|
|
66
|
+
--color-iui-toast-info: var(--color-blue-400);
|
|
67
|
+
--color-iui-toast-success: var(--color-emerald-400);
|
|
68
|
+
--color-iui-toast-warning: var(--color-amber-400);
|
|
69
|
+
--color-iui-toast-error: var(--color-red-400);
|
|
70
|
+
--color-iui-toast-loading: var(--color-zinc-400);
|
|
71
|
+
|
|
72
|
+
--color-iui-inbox-surface: var(--color-zinc-900);
|
|
73
|
+
--color-iui-inbox-foreground: var(--color-zinc-100);
|
|
74
|
+
--color-iui-inbox-muted-foreground: var(--color-zinc-400);
|
|
75
|
+
--color-iui-inbox-border: var(--color-zinc-700);
|
|
76
|
+
--color-iui-inbox-icon: var(--color-zinc-500);
|
|
77
|
+
--color-iui-inbox-icon-hover: var(--color-zinc-200);
|
|
78
|
+
--color-iui-inbox-control-hover: var(--color-zinc-800);
|
|
79
|
+
--color-iui-inbox-ring: var(--color-blue-400);
|
|
80
|
+
--color-iui-inbox-accent: var(--color-blue-400);
|
|
81
|
+
--color-iui-inbox-accent-subtle: color-mix(in oklab, var(--color-blue-400) 15%, transparent);
|
|
82
|
+
--color-iui-inbox-badge: var(--color-red-500);
|
|
83
|
+
--color-iui-inbox-badge-foreground: #ffffff;
|
|
84
|
+
--color-iui-inbox-unread: var(--color-blue-400);
|
|
85
|
+
--color-iui-inbox-tooltip: var(--color-zinc-700);
|
|
86
|
+
--color-iui-inbox-tooltip-foreground: var(--color-zinc-100);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/*
|
|
93
|
+
* The distance between the bell and the notification center panel, and the panel's smallest distance from the edges of
|
|
94
|
+
* the screen. Registered as lengths, so the NotificationCenter reads them in pixels.
|
|
95
|
+
*/
|
|
96
|
+
@property --inbox-gap {
|
|
97
|
+
syntax: '<length>';
|
|
98
|
+
inherits: true;
|
|
99
|
+
initial-value: 8px;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
@property --inbox-offset {
|
|
103
|
+
syntax: '<length>';
|
|
104
|
+
inherits: true;
|
|
105
|
+
initial-value: 8px;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/*
|
|
109
|
+
* The stack. The Toaster measures each toast and sets these variables:
|
|
110
|
+
* on each list: --toast-count, --toast-visible, --toast-front-height, --toast-heights (all open toasts);
|
|
111
|
+
* on each toast: --toast-index (0 is the newest), --toast-height, --toast-before (heights of newer toasts),
|
|
112
|
+
* and --toast-swipe while it is dragged.
|
|
113
|
+
*/
|
|
114
|
+
@layer components {
|
|
115
|
+
.iui-toast-list {
|
|
116
|
+
--toast-offset: 1rem;
|
|
117
|
+
--toast-gap: 0.5rem;
|
|
118
|
+
--toast-peek: 0.875rem;
|
|
119
|
+
--toast-width: min(24rem, 100vw - max(var(--toast-offset), env(safe-area-inset-left)) - max(var(--toast-offset), env(safe-area-inset-right)));
|
|
120
|
+
--toast-duration: 400ms;
|
|
121
|
+
--toast-easing: cubic-bezier(0.21, 1.02, 0.73, 1);
|
|
122
|
+
|
|
123
|
+
position: fixed;
|
|
124
|
+
z-index: 50;
|
|
125
|
+
width: var(--toast-width);
|
|
126
|
+
height: calc(var(--toast-front-height, 0px) + (var(--toast-visible, 1) - 1) * var(--toast-peek));
|
|
127
|
+
margin: 0;
|
|
128
|
+
padding: 0;
|
|
129
|
+
list-style: none;
|
|
130
|
+
transition: height var(--toast-duration) var(--toast-easing);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.iui-toast-list[data-expanded='true'] {
|
|
134
|
+
height: calc(var(--toast-heights, 0px) + (var(--toast-count, 1) - 1) * var(--toast-gap));
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.iui-toast-list[data-position^='top'] {
|
|
138
|
+
--toast-dir: 1;
|
|
139
|
+
top: max(var(--toast-offset), env(safe-area-inset-top));
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.iui-toast-list[data-position^='bottom'] {
|
|
143
|
+
--toast-dir: -1;
|
|
144
|
+
bottom: max(var(--toast-offset), env(safe-area-inset-bottom));
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.iui-toast-list[data-position$='left'] {
|
|
148
|
+
left: max(var(--toast-offset), env(safe-area-inset-left));
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.iui-toast-list[data-position$='right'] {
|
|
152
|
+
right: max(var(--toast-offset), env(safe-area-inset-right));
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.iui-toast-list[data-position$='center'] {
|
|
156
|
+
left: calc(50% - var(--toast-width) / 2);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.iui-toast {
|
|
160
|
+
--toast-y: calc(var(--toast-dir) * var(--toast-index, 0) * var(--toast-peek));
|
|
161
|
+
--toast-scale: calc(1 - var(--toast-index, 0) * 0.05);
|
|
162
|
+
|
|
163
|
+
position: absolute;
|
|
164
|
+
inset-inline: 0;
|
|
165
|
+
/* Toasts behind the newest one take its height, so the stack looks even. */
|
|
166
|
+
height: var(--toast-front-height, auto);
|
|
167
|
+
overflow: hidden;
|
|
168
|
+
transform: translateX(var(--toast-swipe, 0px)) translateY(var(--toast-y)) scale(var(--toast-scale));
|
|
169
|
+
transition:
|
|
170
|
+
transform var(--toast-duration) var(--toast-easing),
|
|
171
|
+
opacity var(--toast-duration) var(--toast-easing),
|
|
172
|
+
height var(--toast-duration) var(--toast-easing);
|
|
173
|
+
touch-action: pan-y;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.iui-toast-list[data-position^='top'] > .iui-toast {
|
|
177
|
+
top: 0;
|
|
178
|
+
transform-origin: 50% 100%;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.iui-toast-list[data-position^='bottom'] > .iui-toast {
|
|
182
|
+
bottom: 0;
|
|
183
|
+
transform-origin: 50% 0;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.iui-toast > [data-toast-body] {
|
|
187
|
+
transition: opacity var(--toast-duration) var(--toast-easing);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.iui-toast-list[data-expanded='false'] > .iui-toast[data-front='false'] > [data-toast-body] {
|
|
191
|
+
opacity: 0;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.iui-toast-list[data-expanded='false'] > .iui-toast[data-overflow='true'] {
|
|
195
|
+
opacity: 0;
|
|
196
|
+
pointer-events: none;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.iui-toast-list[data-expanded='true'] > .iui-toast {
|
|
200
|
+
--toast-y: calc(var(--toast-dir) * (var(--toast-before, 0px) + var(--toast-index, 0) * var(--toast-gap)));
|
|
201
|
+
--toast-scale: 1;
|
|
202
|
+
|
|
203
|
+
height: var(--toast-height, auto);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.iui-toast[data-swiping='true'] {
|
|
207
|
+
transition: none;
|
|
208
|
+
user-select: none;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.iui-toast[data-state='closing'] {
|
|
212
|
+
--toast-scale: 0.95;
|
|
213
|
+
|
|
214
|
+
opacity: 0;
|
|
215
|
+
pointer-events: none;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.iui-toast[data-swipe-out='right'] {
|
|
219
|
+
--toast-swipe: 110%;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.iui-toast[data-swipe-out='left'] {
|
|
223
|
+
--toast-swipe: -110%;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
@starting-style {
|
|
227
|
+
.iui-toast {
|
|
228
|
+
opacity: 0;
|
|
229
|
+
transform: translateY(calc(var(--toast-dir) * -100%));
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.iui-toast-progress {
|
|
234
|
+
position: absolute;
|
|
235
|
+
inset-inline: 0;
|
|
236
|
+
bottom: 0;
|
|
237
|
+
height: 2px;
|
|
238
|
+
background: currentColor;
|
|
239
|
+
opacity: 0.5;
|
|
240
|
+
transform-origin: left;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
/* Like Tailwind's rtl variant, as the build turns :dir() into a list of right-to-left languages. */
|
|
244
|
+
.iui-toast-progress:where(:dir(rtl), [dir='rtl'], [dir='rtl'] *) {
|
|
245
|
+
transform-origin: right;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
@media (prefers-reduced-motion: reduce) {
|
|
249
|
+
.iui-toast,
|
|
250
|
+
.iui-toast-list {
|
|
251
|
+
transition-property: opacity;
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
/*
|
|
256
|
+
* The notification center panel, a popover in the top layer. The NotificationCenter places it next to the bell
|
|
257
|
+
* with inline styles and sets data-side to the side it opened on. On narrow screens, where --inbox-layout is sheet,
|
|
258
|
+
* it is a sheet at the bottom of the screen and the NotificationCenter leaves its position to these rules. Its body
|
|
259
|
+
* caps the height at --inbox-max-height, since the placement sets the panel's max-height to the room it has.
|
|
260
|
+
*/
|
|
261
|
+
.iui-inbox-panel {
|
|
262
|
+
--inbox-offset: 0.5rem;
|
|
263
|
+
--inbox-gap: 0.5rem;
|
|
264
|
+
--inbox-width: min(26rem, 100vw - 2 * var(--inbox-offset));
|
|
265
|
+
--inbox-max-height: 36rem;
|
|
266
|
+
--inbox-duration: 150ms;
|
|
267
|
+
--inbox-enter: translateY(-0.25rem);
|
|
268
|
+
|
|
269
|
+
position: fixed;
|
|
270
|
+
inset: auto;
|
|
271
|
+
width: var(--inbox-width);
|
|
272
|
+
margin: 0;
|
|
273
|
+
padding: 0;
|
|
274
|
+
overflow: hidden;
|
|
275
|
+
border-width: 1px;
|
|
276
|
+
border-radius: var(--radius-iui-inbox);
|
|
277
|
+
flex-direction: column;
|
|
278
|
+
/* Native scrollbars follow the tokens. */
|
|
279
|
+
color-scheme: var(--iui-color-scheme, light);
|
|
280
|
+
opacity: 0;
|
|
281
|
+
transform: var(--inbox-enter);
|
|
282
|
+
transition:
|
|
283
|
+
opacity var(--inbox-duration) ease-out,
|
|
284
|
+
transform var(--inbox-duration) ease-out,
|
|
285
|
+
display var(--inbox-duration) allow-discrete,
|
|
286
|
+
overlay var(--inbox-duration) allow-discrete;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
.iui-inbox-panel[data-side='top'] {
|
|
290
|
+
--inbox-enter: translateY(0.25rem);
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
.iui-inbox-panel[data-side='left'] {
|
|
294
|
+
--inbox-enter: translateX(0.25rem);
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
.iui-inbox-panel[data-side='right'] {
|
|
298
|
+
--inbox-enter: translateX(-0.25rem);
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
.iui-inbox-panel:popover-open {
|
|
302
|
+
display: flex;
|
|
303
|
+
opacity: 1;
|
|
304
|
+
transform: none;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
@starting-style {
|
|
308
|
+
.iui-inbox-panel:popover-open {
|
|
309
|
+
opacity: 0;
|
|
310
|
+
transform: var(--inbox-enter);
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
.iui-inbox-panel-body {
|
|
315
|
+
max-height: var(--inbox-max-height);
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
/*
|
|
319
|
+
* While another list loads with nothing to show yet, its spinner keeps the height of the list before it, which the
|
|
320
|
+
* NotificationCenter keeps in --inbox-list-height, so the panel does not shrink and grow back.
|
|
321
|
+
*/
|
|
322
|
+
.iui-inbox-panel [data-inbox-scroller] > [role='status'] {
|
|
323
|
+
min-height: var(--inbox-list-height, auto);
|
|
324
|
+
justify-content: center;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
@media (width < 40rem) {
|
|
328
|
+
.iui-inbox-panel {
|
|
329
|
+
--inbox-layout: sheet;
|
|
330
|
+
--inbox-enter: translateY(1rem);
|
|
331
|
+
|
|
332
|
+
inset-inline: 0;
|
|
333
|
+
top: auto;
|
|
334
|
+
bottom: 0;
|
|
335
|
+
width: 100%;
|
|
336
|
+
/* A fixed height, so the tabs at its top stay under the finger when the next list is shorter. */
|
|
337
|
+
height: 85dvh;
|
|
338
|
+
/* Clear of the home indicator in applications with viewport-fit=cover. */
|
|
339
|
+
padding-bottom: env(safe-area-inset-bottom);
|
|
340
|
+
border-bottom-width: 0;
|
|
341
|
+
border-radius: calc(var(--radius-iui-inbox) * 2) calc(var(--radius-iui-inbox) * 2) 0 0;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
.iui-inbox-panel-body {
|
|
345
|
+
max-height: none;
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
/* The loading, empty, and error states sit in the middle of the sheet. */
|
|
349
|
+
.iui-inbox-panel [data-inbox-scroller] > :is([role='status'], [data-inbox-empty], [data-inbox-error]) {
|
|
350
|
+
min-height: 100%;
|
|
351
|
+
justify-content: center;
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
@media (prefers-reduced-motion: reduce) {
|
|
356
|
+
.iui-inbox-panel,
|
|
357
|
+
.iui-inbox-panel[data-side] {
|
|
358
|
+
--inbox-enter: none;
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
/*
|
|
363
|
+
* The tabs and the categories scroll sideways without a scrollbar, so they fade out at their edges to show that more
|
|
364
|
+
* follows. Their padding is as wide as the fade, so nothing fades until they overflow. The last 2px stay, so their
|
|
365
|
+
* bottom border and the line under the selected tab do not fade.
|
|
366
|
+
*/
|
|
367
|
+
.iui-inbox-fade {
|
|
368
|
+
--inbox-fade: linear-gradient(to right, transparent, #000 0.5rem, #000 calc(100% - 2rem), transparent);
|
|
369
|
+
|
|
370
|
+
mask:
|
|
371
|
+
var(--inbox-fade),
|
|
372
|
+
linear-gradient(#000 0 0) bottom / 100% 2px no-repeat;
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
.iui-inbox-fade:where(:dir(rtl), [dir='rtl'], [dir='rtl'] *) {
|
|
376
|
+
--inbox-fade: linear-gradient(to left, transparent, #000 0.5rem, #000 calc(100% - 2rem), transparent);
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
/*
|
|
380
|
+
* The buttons of a notification. On devices that hover, they float over the end of its title, so the text keeps the
|
|
381
|
+
* full width; while notifications are selected, they sit next to the text instead, so they cover no titles. Touch
|
|
382
|
+
* screens show them in a row below the text, lined up with it.
|
|
383
|
+
*/
|
|
384
|
+
.iui-inbox-controls {
|
|
385
|
+
position: relative;
|
|
386
|
+
margin-inline-end: -0.5rem;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
@media (hover: hover) {
|
|
390
|
+
.iui-inbox-controls {
|
|
391
|
+
position: absolute;
|
|
392
|
+
inset-inline-end: 0.5rem;
|
|
393
|
+
top: 0.375rem;
|
|
394
|
+
margin: 0;
|
|
395
|
+
padding: 0.125rem;
|
|
396
|
+
border-width: 1px;
|
|
397
|
+
background-color: var(--color-iui-inbox-surface);
|
|
398
|
+
box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
@media (hover: none) {
|
|
403
|
+
.iui-inbox-controls {
|
|
404
|
+
/* The row and its indent together take the width of the notification, so the list does not scroll sideways. */
|
|
405
|
+
flex-basis: calc(100% - 2.625rem);
|
|
406
|
+
margin-top: -0.375rem;
|
|
407
|
+
margin-inline: 2.625rem 0;
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
}
|
package/README.md
DELETED