@remit/web-client 0.0.23 → 0.0.24

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remit/web-client",
3
- "version": "0.0.23",
3
+ "version": "0.0.24",
4
4
  "type": "module",
5
5
  "description": "Remit web client, published as composable primitives — the app shell, auth shells, and runtime config. A distributor imports what it composes and bundles it.",
6
6
  "exports": {
@@ -103,6 +103,7 @@
103
103
  "@remit/drizzle-service": "*",
104
104
  "@remit/electrodb-entities": "*",
105
105
  "@remit/secrets-service": "*",
106
+ "@storybook/react-vite": "^9",
106
107
  "@tailwindcss/vite": "^4",
107
108
  "@tanstack/router-generator": "^1",
108
109
  "@tanstack/router-plugin": "^1",
@@ -802,7 +802,11 @@ export const MessageList = ({
802
802
  onDelete={handleDelete}
803
803
  onMarkRead={onMarkAsRead ? handleMarkAsRead : undefined}
804
804
  isBusy={isDeleting || isMoving}
805
- moveDisabledHint={moveDisabledHint}
805
+ notice={
806
+ moveDisabledHint
807
+ ? { tone: "warning", text: moveDisabledHint }
808
+ : undefined
809
+ }
806
810
  moveSlot={
807
811
  onMoveMessages && accountId && mailboxId ? (
808
812
  <>
@@ -0,0 +1,54 @@
1
+ import type { Meta, StoryObj } from "@storybook/react-vite";
2
+ import { ConfirmDialog } from "./ConfirmDialog";
3
+
4
+ const meta: Meta<typeof ConfirmDialog> = {
5
+ title: "Screens/WebClient/ConfirmDialog",
6
+ component: ConfirmDialog,
7
+ parameters: { layout: "centered" },
8
+ args: {
9
+ isOpen: true,
10
+ title: "Move 3,412 messages to Trash?",
11
+ description: "You can restore them from Trash later.",
12
+ confirmLabel: "Move to Trash",
13
+ destructive: true,
14
+ onConfirm: () => undefined,
15
+ onCancel: () => undefined,
16
+ },
17
+ };
18
+ export default meta;
19
+
20
+ type Story = StoryObj<typeof ConfirmDialog>;
21
+
22
+ /**
23
+ * A single corner tap on the bar's delete icon used to fall straight through
24
+ * to a delete with nothing in between — this is what now sits in the way.
25
+ * Wording says "Move … to Trash", not "Delete": the operation is reversible
26
+ * (IMAP delete moves to Trash), and the confirmation copy says so rather than
27
+ * reading as final.
28
+ */
29
+ export const Default: Story = {};
30
+
31
+ export const OneMessage: Story = {
32
+ args: {
33
+ title: "Move 1 message to Trash?",
34
+ },
35
+ };
36
+
37
+ /** The mutation is in flight: the confirm button disables rather than
38
+ * allowing a second concurrent delete request. */
39
+ export const Busy: Story = {
40
+ args: {
41
+ isBusy: true,
42
+ },
43
+ };
44
+
45
+ /** A non-destructive confirmation (no `destructive`) uses the accent
46
+ * affirmative styling instead of danger. */
47
+ export const NonDestructive: Story = {
48
+ args: {
49
+ title: "Archive 12 messages?",
50
+ description: undefined,
51
+ confirmLabel: "Archive",
52
+ destructive: false,
53
+ },
54
+ };