@devalok/shilp-sutra 0.27.2 → 0.29.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/dist/_chunks/badge-group.js +299 -0
- package/dist/_chunks/framer.js +1915 -1980
- package/dist/_chunks/keybinding.js +4 -5
- package/dist/_chunks/primitives.js +3198 -3272
- package/dist/_chunks/sonner.js +29 -31
- package/dist/_chunks/stat-row.js +110 -131
- package/dist/_chunks/tiptap.js +42 -78
- package/dist/_chunks/tree-view.js +138 -149
- package/dist/_chunks/typing-indicator.js +565 -0
- package/dist/_chunks/use-calendar.js +416 -439
- package/dist/_chunks/vendor-client.js +977 -814
- package/dist/_chunks/vendor-utils.js +5 -5
- package/dist/ai/block-renderer.js +22 -22
- package/dist/ai/blocks/loading.d.ts.map +1 -1
- package/dist/ai/command-bar.d.ts.map +1 -1
- package/dist/ai/command-bar.js +241 -263
- package/dist/ai/conversation.d.ts.map +1 -1
- package/dist/ai/conversation.js +87 -107
- package/dist/composed/activity-feed.d.ts +2 -0
- package/dist/composed/activity-feed.d.ts.map +1 -1
- package/dist/composed/activity-feed.js +118 -90
- package/dist/composed/avatar-group.d.ts +1 -0
- package/dist/composed/avatar-group.d.ts.map +1 -1
- package/dist/composed/avatar-group.js +91 -67
- package/dist/composed/bulk-action-bar.d.ts.map +1 -1
- package/dist/composed/bulk-action-bar.js +29 -28
- package/dist/composed/command-palette.d.ts.map +1 -1
- package/dist/composed/command-palette.js +99 -113
- package/dist/composed/content-card.js +1 -1
- package/dist/composed/date-picker/calendar-grid.d.ts.map +1 -1
- package/dist/composed/date-picker/date-picker.d.ts.map +1 -1
- package/dist/composed/date-picker/date-range-picker.d.ts.map +1 -1
- package/dist/composed/date-picker/date-time-picker.d.ts.map +1 -1
- package/dist/composed/date-picker/time-picker.d.ts.map +1 -1
- package/dist/composed/deadline-indicator.d.ts.map +1 -1
- package/dist/composed/deadline-indicator.js +29 -28
- package/dist/composed/error-boundary.d.ts.map +1 -1
- package/dist/composed/error-boundary.js +30 -27
- package/dist/composed/extensions/file-attachment.d.ts.map +1 -1
- package/dist/composed/file-preview.d.ts.map +1 -1
- package/dist/composed/file-preview.js +261 -271
- package/dist/composed/filter-bar.d.ts.map +1 -1
- package/dist/composed/filter-bar.js +49 -48
- package/dist/composed/form-section.d.ts.map +1 -1
- package/dist/composed/form-section.js +12 -11
- package/dist/composed/global-loading.js +1 -1
- package/dist/composed/index.js +63 -63
- package/dist/composed/inline-edit.d.ts.map +1 -1
- package/dist/composed/inline-edit.js +55 -54
- package/dist/composed/markdown-viewer.d.ts.map +1 -1
- package/dist/composed/markdown-viewer.js +44 -43
- package/dist/composed/master-detail.d.ts.map +1 -1
- package/dist/composed/master-detail.js +35 -34
- package/dist/composed/multi-select-popover.d.ts.map +1 -1
- package/dist/composed/multi-select-popover.js +64 -64
- package/dist/composed/page-header.d.ts.map +1 -1
- package/dist/composed/page-header.js +31 -37
- package/dist/composed/priority-indicator.d.ts.map +1 -1
- package/dist/composed/priority-indicator.js +37 -36
- package/dist/composed/rich-text-editor.d.ts.map +1 -1
- package/dist/composed/rich-text-editor.js +287 -306
- package/dist/composed/schedule-view.js +62 -62
- package/dist/composed/status-badge.d.ts +4 -2
- package/dist/composed/status-badge.d.ts.map +1 -1
- package/dist/composed/status-badge.js +58 -45
- package/dist/shell/app-command-palette.d.ts.map +1 -1
- package/dist/shell/app-command-palette.js +93 -93
- package/dist/shell/bottom-navbar.d.ts.map +1 -1
- package/dist/shell/bottom-navbar.js +21 -20
- package/dist/shell/index.js +18 -18
- package/dist/shell/notification-center.d.ts.map +1 -1
- package/dist/shell/notification-center.js +96 -95
- package/dist/shell/notification-preferences.d.ts.map +1 -1
- package/dist/shell/notification-preferences.js +82 -85
- package/dist/shell/sidebar.js +59 -60
- package/dist/shell/top-bar.d.ts.map +1 -1
- package/dist/shell/top-bar.js +103 -103
- package/dist/tailwind/index.cjs +37 -4
- package/dist/tailwind/preset.d.ts.map +1 -1
- package/dist/tailwind/preset.js +38 -5
- package/dist/tokens/primitives.css +10 -0
- package/dist/tokens/semantic.css +70 -7
- package/dist/ui/accordion.d.ts +5 -2
- package/dist/ui/accordion.d.ts.map +1 -1
- package/dist/ui/accordion.js +44 -39
- package/dist/ui/alert-dialog.js +57 -57
- package/dist/ui/alert.d.ts +1 -1
- package/dist/ui/alert.d.ts.map +1 -1
- package/dist/ui/alert.js +30 -29
- package/dist/ui/aspect-ratio.js +4 -4
- package/dist/ui/autocomplete.js +56 -56
- package/dist/ui/avatar.js +2 -2
- package/dist/ui/badge-group.d.ts +22 -0
- package/dist/ui/badge-group.d.ts.map +1 -0
- package/dist/ui/badge-group.js +8 -0
- package/dist/ui/badge-indicator.d.ts +32 -0
- package/dist/ui/badge-indicator.d.ts.map +1 -0
- package/dist/ui/badge-indicator.js +54 -0
- package/dist/ui/badge.d.ts +27 -24
- package/dist/ui/badge.d.ts.map +1 -1
- package/dist/ui/badge.js +13 -129
- package/dist/ui/banner.d.ts +1 -1
- package/dist/ui/banner.d.ts.map +1 -1
- package/dist/ui/banner.js +27 -26
- package/dist/ui/breadcrumb.d.ts.map +1 -1
- package/dist/ui/breadcrumb.js +37 -36
- package/dist/ui/button-group.d.ts +12 -6
- package/dist/ui/button-group.d.ts.map +1 -1
- package/dist/ui/button-group.js +18 -18
- package/dist/ui/button-processing.d.ts +15 -0
- package/dist/ui/button-processing.d.ts.map +1 -0
- package/dist/ui/button-processing.js +77 -0
- package/dist/ui/button.d.ts +50 -25
- package/dist/ui/button.d.ts.map +1 -1
- package/dist/ui/button.js +243 -127
- package/dist/ui/card.js +20 -21
- package/dist/ui/charts/index.js +499 -508
- package/dist/ui/chat/date-separator.d.ts +12 -0
- package/dist/ui/chat/date-separator.d.ts.map +1 -0
- package/dist/ui/chat/index.d.ts +9 -0
- package/dist/ui/chat/index.d.ts.map +1 -0
- package/dist/ui/chat/index.js +12 -0
- package/dist/ui/chat/message-input.d.ts +16 -0
- package/dist/ui/chat/message-input.d.ts.map +1 -0
- package/dist/ui/chat/message-list.d.ts +24 -0
- package/dist/ui/chat/message-list.d.ts.map +1 -0
- package/dist/ui/chat/message.d.ts +108 -0
- package/dist/ui/chat/message.d.ts.map +1 -0
- package/dist/ui/chat/system-message.d.ts +11 -0
- package/dist/ui/chat/system-message.d.ts.map +1 -0
- package/dist/ui/chat/typing-indicator.d.ts +14 -0
- package/dist/ui/chat/typing-indicator.d.ts.map +1 -0
- package/dist/ui/chat/unread-separator.d.ts +12 -0
- package/dist/ui/chat/unread-separator.d.ts.map +1 -0
- package/dist/ui/checkbox.js +18 -18
- package/dist/ui/chip.d.ts +13 -62
- package/dist/ui/chip.d.ts.map +1 -1
- package/dist/ui/chip.js +10 -109
- package/dist/ui/collapsible.js +4 -4
- package/dist/ui/color-input.d.ts +19 -5
- package/dist/ui/color-input.d.ts.map +1 -1
- package/dist/ui/color-input.js +371 -79
- package/dist/ui/color-swatch.js +11 -11
- package/dist/ui/combobox.d.ts.map +1 -1
- package/dist/ui/combobox.js +74 -80
- package/dist/ui/context-menu.d.ts.map +1 -1
- package/dist/ui/context-menu.js +86 -85
- package/dist/ui/data-table-toolbar.d.ts.map +1 -1
- package/dist/ui/data-table-toolbar.js +51 -57
- package/dist/ui/data-table.d.ts.map +1 -1
- package/dist/ui/data-table.js +268 -296
- package/dist/ui/devalok-grain.d.ts +81 -0
- package/dist/ui/devalok-grain.d.ts.map +1 -0
- package/dist/ui/devalok-grain.js +69 -0
- package/dist/ui/dialog.d.ts.map +1 -1
- package/dist/ui/dialog.js +73 -72
- package/dist/ui/dropdown-menu.d.ts.map +1 -1
- package/dist/ui/dropdown-menu.js +93 -92
- package/dist/ui/file-upload.d.ts.map +1 -1
- package/dist/ui/file-upload.js +82 -82
- package/dist/ui/hover-card.js +29 -29
- package/dist/ui/icon-button.d.ts +7 -7
- package/dist/ui/icon-button.d.ts.map +1 -1
- package/dist/ui/icon-context.d.ts +15 -0
- package/dist/ui/icon-context.d.ts.map +1 -0
- package/dist/ui/icon-context.js +20 -0
- package/dist/ui/icon-group.d.ts +22 -0
- package/dist/ui/icon-group.d.ts.map +1 -0
- package/dist/ui/icon-group.js +32 -0
- package/dist/ui/icon.d.ts +57 -0
- package/dist/ui/icon.d.ts.map +1 -0
- package/dist/ui/icon.js +122 -0
- package/dist/ui/index.d.ts +8 -1
- package/dist/ui/index.d.ts.map +1 -1
- package/dist/ui/index.js +351 -329
- package/dist/ui/input-otp.d.ts.map +1 -1
- package/dist/ui/input-otp.js +21 -20
- package/dist/ui/input.d.ts +32 -11
- package/dist/ui/input.d.ts.map +1 -1
- package/dist/ui/input.js +149 -44
- package/dist/ui/label.js +1 -1
- package/dist/ui/lib/motion.d.ts +2 -0
- package/dist/ui/lib/motion.d.ts.map +1 -1
- package/dist/ui/lib/motion.js +13 -11
- package/dist/ui/lib/utils.js +1 -1
- package/dist/ui/menubar.d.ts.map +1 -1
- package/dist/ui/menubar.js +87 -86
- package/dist/ui/navigation-menu.d.ts.map +1 -1
- package/dist/ui/navigation-menu.js +23 -28
- package/dist/ui/number-input.d.ts.map +1 -1
- package/dist/ui/number-input.js +54 -53
- package/dist/ui/pagination.d.ts.map +1 -1
- package/dist/ui/pagination.js +45 -44
- package/dist/ui/popover.js +30 -30
- package/dist/ui/progress.d.ts +3 -1
- package/dist/ui/progress.d.ts.map +1 -1
- package/dist/ui/progress.js +43 -39
- package/dist/ui/radio.js +1 -1
- package/dist/ui/search-input.d.ts.map +1 -1
- package/dist/ui/search-input.js +47 -60
- package/dist/ui/segmented-control.js +1 -1
- package/dist/ui/select.d.ts.map +1 -1
- package/dist/ui/select.js +54 -53
- package/dist/ui/separator.js +5 -5
- package/dist/ui/sheet.d.ts.map +1 -1
- package/dist/ui/sheet.js +46 -45
- package/dist/ui/sidebar.d.ts.map +1 -1
- package/dist/ui/sidebar.js +196 -193
- package/dist/ui/skeleton.js +1 -1
- package/dist/ui/slider.js +1 -1
- package/dist/ui/spinner.js +74 -74
- package/dist/ui/stat-card.d.ts.map +1 -1
- package/dist/ui/stat-card.js +85 -86
- package/dist/ui/switch.d.ts +3 -0
- package/dist/ui/switch.d.ts.map +1 -1
- package/dist/ui/switch.js +40 -26
- package/dist/ui/tabs.js +43 -43
- package/dist/ui/text.js +1 -1
- package/dist/ui/textarea.js +10 -10
- package/dist/ui/toast.d.ts.map +1 -1
- package/dist/ui/toast.js +169 -169
- package/dist/ui/toggle-group.js +1 -1
- package/dist/ui/toggle.js +5 -5
- package/dist/ui/tooltip.js +41 -41
- package/dist/ui/tree-view/tree-item.d.ts.map +1 -1
- package/docs/components/_header.md +4 -4
- package/docs/components/composed/activity-feed.md +7 -0
- package/docs/components/composed/avatar-group.md +8 -5
- package/docs/components/composed/status-badge.md +14 -1
- package/docs/components/ui/accordion.md +5 -2
- package/docs/components/ui/badge-group.md +38 -0
- package/docs/components/ui/badge-indicator.md +40 -0
- package/docs/components/ui/badge.md +36 -5
- package/docs/components/ui/button-processing.md +15 -0
- package/docs/components/ui/button.md +40 -11
- package/docs/components/ui/chat.md +214 -0
- package/docs/components/ui/color-input.md +58 -4
- package/docs/components/ui/data-table.md +3 -0
- package/docs/components/ui/devalok-grain.md +55 -0
- package/docs/components/ui/icon-button.md +12 -5
- package/docs/components/ui/icon-context.md +38 -0
- package/docs/components/ui/icon-group.md +36 -0
- package/docs/components/ui/icon.md +47 -0
- package/docs/components/ui/input.md +32 -6
- package/docs/components/ui/progress.md +5 -0
- package/docs/components/ui/spinner.md +3 -0
- package/docs/components/ui/switch.md +13 -0
- package/llms-full.txt +724 -44
- package/llms.txt +38 -19
- package/package.json +8 -2
|
@@ -1,46 +1,47 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as a, jsx as e, Fragment as
|
|
3
|
-
import * as
|
|
4
|
-
import { useRef as B, useCallback as
|
|
2
|
+
import { jsxs as a, jsx as e, Fragment as H } from "react/jsx-runtime";
|
|
3
|
+
import * as $ from "react";
|
|
4
|
+
import { useRef as B, useCallback as b } from "react";
|
|
5
5
|
import { formatRelativeTime as G } from "../ui/lib/date-utils.js";
|
|
6
|
-
import { Popover as
|
|
7
|
-
import { Tooltip as
|
|
6
|
+
import { Popover as M, PopoverTrigger as X, PopoverContent as _ } from "../ui/popover.js";
|
|
7
|
+
import { Tooltip as q, TooltipTrigger as J, TooltipContent as L } from "../ui/tooltip.js";
|
|
8
8
|
import { IconBell as Q, IconChecks as U, IconInbox as V, IconX as W } from "@tabler/icons-react";
|
|
9
|
-
import {
|
|
9
|
+
import { Icon as h } from "../ui/icon.js";
|
|
10
|
+
import { cn as f } from "../ui/lib/utils.js";
|
|
10
11
|
import { Spinner as Z } from "../ui/spinner.js";
|
|
11
12
|
import { m as N } from "../_chunks/framer.js";
|
|
12
|
-
function
|
|
13
|
+
function w(t, d) {
|
|
13
14
|
return t.getFullYear() === d.getFullYear() && t.getMonth() === d.getMonth() && t.getDate() === d.getDate();
|
|
14
15
|
}
|
|
15
|
-
function
|
|
16
|
-
const d = new Date(t),
|
|
17
|
-
return l.setDate(
|
|
16
|
+
function ee(t) {
|
|
17
|
+
const d = new Date(t), o = /* @__PURE__ */ new Date(), l = /* @__PURE__ */ new Date();
|
|
18
|
+
return l.setDate(o.getDate() - 1), w(d, o) ? "Today" : w(d, l) ? "Yesterday" : "Earlier";
|
|
18
19
|
}
|
|
19
|
-
const
|
|
20
|
+
const C = {
|
|
20
21
|
INFO: "bg-info-9",
|
|
21
22
|
IMPORTANT: "bg-warning-9",
|
|
22
23
|
CRITICAL: "bg-error-9"
|
|
23
24
|
};
|
|
24
|
-
function
|
|
25
|
+
function te({
|
|
25
26
|
notification: t,
|
|
26
27
|
onRead: d,
|
|
27
|
-
onNavigate:
|
|
28
|
+
onNavigate: o,
|
|
28
29
|
getRoute: l,
|
|
29
|
-
onDismiss:
|
|
30
|
+
onDismiss: c
|
|
30
31
|
}) {
|
|
31
|
-
const
|
|
32
|
-
t.isRead || d(t.id),
|
|
32
|
+
const p = l(t), g = () => {
|
|
33
|
+
t.isRead || d(t.id), p && o(p);
|
|
33
34
|
};
|
|
34
35
|
return /* @__PURE__ */ a(
|
|
35
36
|
"div",
|
|
36
37
|
{
|
|
37
38
|
role: "button",
|
|
38
39
|
tabIndex: 0,
|
|
39
|
-
onClick:
|
|
40
|
+
onClick: g,
|
|
40
41
|
onKeyDown: (r) => {
|
|
41
|
-
(r.key === "Enter" || r.key === " ") && (r.preventDefault(),
|
|
42
|
+
(r.key === "Enter" || r.key === " ") && (r.preventDefault(), g());
|
|
42
43
|
},
|
|
43
|
-
className:
|
|
44
|
+
className: f(
|
|
44
45
|
"group relative flex w-full cursor-pointer items-start gap-ds-04 px-ds-05 py-ds-04 text-left transition-colors duration-fast-02 ease-productive-standard",
|
|
45
46
|
"hover:bg-surface-raised",
|
|
46
47
|
!t.isRead && "bg-accent-1"
|
|
@@ -49,9 +50,9 @@ function ee({
|
|
|
49
50
|
/* @__PURE__ */ e("div", { className: "mt-ds-02b flex shrink-0", children: /* @__PURE__ */ e(
|
|
50
51
|
"span",
|
|
51
52
|
{
|
|
52
|
-
className:
|
|
53
|
+
className: f(
|
|
53
54
|
"h-[8px] w-[8px] rounded-ds-full transition-opacity duration-fast-02 ease-productive-standard",
|
|
54
|
-
|
|
55
|
+
C[t.tier] || C.INFO,
|
|
55
56
|
t.isRead ? "opacity-20" : "opacity-100"
|
|
56
57
|
)
|
|
57
58
|
}
|
|
@@ -60,7 +61,7 @@ function ee({
|
|
|
60
61
|
/* @__PURE__ */ e(
|
|
61
62
|
"p",
|
|
62
63
|
{
|
|
63
|
-
className:
|
|
64
|
+
className: f(
|
|
64
65
|
"truncate text-ds-md text-surface-fg",
|
|
65
66
|
!t.isRead && "font-semibold"
|
|
66
67
|
),
|
|
@@ -70,7 +71,7 @@ function ee({
|
|
|
70
71
|
t.body && /* @__PURE__ */ e("p", { className: "mt-ds-01 line-clamp-2 text-ds-sm text-surface-fg-subtle", children: t.body }),
|
|
71
72
|
/* @__PURE__ */ a("div", { className: "mt-ds-02 flex items-center gap-ds-03", children: [
|
|
72
73
|
/* @__PURE__ */ e("span", { className: "text-ds-sm text-surface-fg-subtle", children: G(t.createdAt) }),
|
|
73
|
-
t.project && /* @__PURE__ */ a(
|
|
74
|
+
t.project && /* @__PURE__ */ a(H, { children: [
|
|
74
75
|
/* @__PURE__ */ e("span", { className: "text-surface-fg-subtle", children: "·" }),
|
|
75
76
|
/* @__PURE__ */ e("span", { className: "truncate text-ds-sm text-surface-fg-subtle", children: t.project.title })
|
|
76
77
|
] })
|
|
@@ -79,11 +80,11 @@ function ee({
|
|
|
79
80
|
"button",
|
|
80
81
|
{
|
|
81
82
|
type: "button",
|
|
82
|
-
onClick: (
|
|
83
|
-
|
|
83
|
+
onClick: (i) => {
|
|
84
|
+
i.stopPropagation(), r.onClick(t.id);
|
|
84
85
|
},
|
|
85
|
-
onKeyDown: (
|
|
86
|
-
className:
|
|
86
|
+
onKeyDown: (i) => i.stopPropagation(),
|
|
87
|
+
className: f(
|
|
87
88
|
"rounded-ds-md px-ds-03 py-ds-01 text-ds-sm font-medium transition-colors duration-fast-02 ease-productive-standard",
|
|
88
89
|
r.variant === "primary" ? "bg-accent-9 text-accent-fg hover:bg-accent-10" : r.variant === "danger" ? "text-error-11 hover:bg-error-3" : "text-surface-fg-muted hover:bg-surface-raised-hover"
|
|
89
90
|
),
|
|
@@ -92,86 +93,86 @@ function ee({
|
|
|
92
93
|
r.label
|
|
93
94
|
)) })
|
|
94
95
|
] }),
|
|
95
|
-
|
|
96
|
+
c && /* @__PURE__ */ e(
|
|
96
97
|
"button",
|
|
97
98
|
{
|
|
98
99
|
type: "button",
|
|
99
100
|
"aria-label": `Dismiss notification: ${t.title}`,
|
|
100
101
|
onClick: (r) => {
|
|
101
|
-
r.stopPropagation(),
|
|
102
|
+
r.stopPropagation(), c(t.id);
|
|
102
103
|
},
|
|
103
104
|
onKeyDown: (r) => r.stopPropagation(),
|
|
104
105
|
className: "absolute right-ds-03 top-ds-03 hidden rounded-ds-sm p-ds-01 text-surface-fg-subtle transition-[color,background-color,opacity] duration-fast-01 ease-productive-standard hover:bg-surface-raised-hover hover:text-surface-fg-muted group-hover:flex group-focus-within:flex",
|
|
105
|
-
children: /* @__PURE__ */ e(
|
|
106
|
+
children: /* @__PURE__ */ e(h, { icon: W, size: "sm" })
|
|
106
107
|
}
|
|
107
108
|
)
|
|
108
109
|
]
|
|
109
110
|
}
|
|
110
111
|
);
|
|
111
112
|
}
|
|
112
|
-
const
|
|
113
|
+
const se = $.forwardRef(
|
|
113
114
|
({
|
|
114
115
|
notifications: t = [],
|
|
115
116
|
unreadCount: d,
|
|
116
|
-
open:
|
|
117
|
+
open: o,
|
|
117
118
|
onOpenChange: l,
|
|
118
|
-
isLoading:
|
|
119
|
-
hasMore:
|
|
120
|
-
onFetchMore:
|
|
121
|
-
onMarkRead:
|
|
119
|
+
isLoading: c = !1,
|
|
120
|
+
hasMore: p = !1,
|
|
121
|
+
onFetchMore: g,
|
|
122
|
+
onMarkRead: x,
|
|
122
123
|
onMarkAllRead: r,
|
|
123
|
-
onNavigate:
|
|
124
|
+
onNavigate: i,
|
|
124
125
|
getNotificationRoute: D,
|
|
125
126
|
onDismiss: I,
|
|
126
|
-
headerActions:
|
|
127
|
-
emptyState:
|
|
128
|
-
footerSlot:
|
|
129
|
-
popoverClassName:
|
|
130
|
-
className:
|
|
131
|
-
...
|
|
132
|
-
},
|
|
133
|
-
const
|
|
127
|
+
headerActions: R,
|
|
128
|
+
emptyState: k,
|
|
129
|
+
footerSlot: y,
|
|
130
|
+
popoverClassName: T,
|
|
131
|
+
className: j,
|
|
132
|
+
...P
|
|
133
|
+
}, O) => {
|
|
134
|
+
const v = B(null), n = d ?? t.filter((s) => !s.isRead).length, z = D ?? (() => null), K = b(
|
|
134
135
|
(s) => {
|
|
135
|
-
l
|
|
136
|
+
l?.(!1), i?.(s);
|
|
136
137
|
},
|
|
137
|
-
[
|
|
138
|
-
),
|
|
138
|
+
[i, l]
|
|
139
|
+
), Y = b(
|
|
139
140
|
(s) => {
|
|
140
|
-
|
|
141
|
+
x?.(s);
|
|
141
142
|
},
|
|
142
|
-
[
|
|
143
|
-
),
|
|
144
|
-
const s =
|
|
145
|
-
!s ||
|
|
146
|
-
}, [
|
|
147
|
-
(s,
|
|
148
|
-
const
|
|
149
|
-
return s[
|
|
143
|
+
[x]
|
|
144
|
+
), E = b(() => {
|
|
145
|
+
const s = v.current;
|
|
146
|
+
!s || c || !p || s.scrollTop + s.clientHeight >= s.scrollHeight - 50 && g?.();
|
|
147
|
+
}, [c, p, g]), F = t.reduce(
|
|
148
|
+
(s, u) => {
|
|
149
|
+
const m = ee(u.createdAt);
|
|
150
|
+
return s[m] || (s[m] = []), s[m].push(u), s;
|
|
150
151
|
},
|
|
151
152
|
{}
|
|
152
|
-
),
|
|
153
|
-
return /* @__PURE__ */ a(
|
|
154
|
-
/* @__PURE__ */ a(
|
|
155
|
-
/* @__PURE__ */ e(J, { asChild: !0, children: /* @__PURE__ */ e(
|
|
153
|
+
), S = ["Today", "Yesterday", "Earlier"];
|
|
154
|
+
return /* @__PURE__ */ a(M, { open: o, onOpenChange: l, children: [
|
|
155
|
+
/* @__PURE__ */ a(q, { children: [
|
|
156
|
+
/* @__PURE__ */ e(J, { asChild: !0, children: /* @__PURE__ */ e(X, { asChild: !0, children: /* @__PURE__ */ a(
|
|
156
157
|
"button",
|
|
157
158
|
{
|
|
158
|
-
...
|
|
159
|
-
ref:
|
|
160
|
-
"aria-label":
|
|
161
|
-
className:
|
|
159
|
+
...P,
|
|
160
|
+
ref: O,
|
|
161
|
+
"aria-label": n > 0 ? `Notifications, ${n} unread` : "Notifications",
|
|
162
|
+
className: f(
|
|
162
163
|
"relative flex h-ds-sm-plus w-ds-sm-plus items-center justify-center rounded-ds-full border border-surface-border-strong bg-surface-raised text-surface-fg-muted transition-colors ease-productive-standard hover:bg-surface-raised-hover",
|
|
163
|
-
|
|
164
|
+
j
|
|
164
165
|
),
|
|
165
166
|
children: [
|
|
166
|
-
/* @__PURE__ */ e(
|
|
167
|
-
|
|
167
|
+
/* @__PURE__ */ e(h, { icon: Q, size: "sm" }),
|
|
168
|
+
n > 0 && /* @__PURE__ */ e(
|
|
168
169
|
N.span,
|
|
169
170
|
{
|
|
170
171
|
initial: { rotate: 0 },
|
|
171
172
|
animate: { rotate: [0, -3, 3, -1, 1, 0] },
|
|
172
173
|
transition: { duration: 0.4, ease: "easeInOut" },
|
|
173
174
|
className: "absolute -right-ds-01 -top-ds-01 flex h-4 min-w-4 items-center justify-center rounded-ds-full bg-accent-9 px-ds-02 text-ds-xs font-semibold text-accent-fg",
|
|
174
|
-
children:
|
|
175
|
+
children: n > 99 ? "99+" : n
|
|
175
176
|
}
|
|
176
177
|
)
|
|
177
178
|
]
|
|
@@ -180,11 +181,11 @@ const te = z.forwardRef(
|
|
|
180
181
|
/* @__PURE__ */ e(L, { side: "bottom", align: "center", children: "Notifications" })
|
|
181
182
|
] }),
|
|
182
183
|
/* @__PURE__ */ a(
|
|
183
|
-
|
|
184
|
+
_,
|
|
184
185
|
{
|
|
185
|
-
className:
|
|
186
|
+
className: f(
|
|
186
187
|
"w-[380px] rounded-ds-xl border border-surface-border-strong bg-surface-overlay p-0 shadow-floating",
|
|
187
|
-
|
|
188
|
+
T
|
|
188
189
|
),
|
|
189
190
|
sideOffset: 8,
|
|
190
191
|
align: "end",
|
|
@@ -192,72 +193,72 @@ const te = z.forwardRef(
|
|
|
192
193
|
/* @__PURE__ */ a("div", { className: "flex items-center justify-between border-b border-surface-border-strong px-ds-05 py-ds-04", children: [
|
|
193
194
|
/* @__PURE__ */ a("div", { className: "flex items-center gap-ds-03", children: [
|
|
194
195
|
/* @__PURE__ */ e("h3", { className: "text-ds-md font-semibold text-surface-fg", children: "Notifications" }),
|
|
195
|
-
|
|
196
|
+
n > 0 && /* @__PURE__ */ e("span", { className: "flex h-5 min-w-5 items-center justify-center rounded-ds-full bg-accent-2 px-ds-02b text-ds-sm font-semibold text-accent-11", children: n })
|
|
196
197
|
] }),
|
|
197
198
|
/* @__PURE__ */ a("div", { className: "flex items-center gap-ds-03", children: [
|
|
198
|
-
|
|
199
|
+
n > 0 && r && /* @__PURE__ */ a(
|
|
199
200
|
"button",
|
|
200
201
|
{
|
|
201
202
|
type: "button",
|
|
202
203
|
onClick: r,
|
|
203
204
|
className: "flex items-center gap-ds-02 text-ds-sm text-surface-fg-subtle transition-colors hover:text-accent-11",
|
|
204
205
|
children: [
|
|
205
|
-
/* @__PURE__ */ e(
|
|
206
|
+
/* @__PURE__ */ e(h, { icon: U, size: "sm" }),
|
|
206
207
|
"Mark all read"
|
|
207
208
|
]
|
|
208
209
|
}
|
|
209
210
|
),
|
|
210
|
-
|
|
211
|
+
R
|
|
211
212
|
] })
|
|
212
213
|
] }),
|
|
213
214
|
/* @__PURE__ */ a(
|
|
214
215
|
"div",
|
|
215
216
|
{
|
|
216
|
-
ref:
|
|
217
|
-
onScroll:
|
|
217
|
+
ref: v,
|
|
218
|
+
onScroll: E,
|
|
218
219
|
className: "max-h-[420px] overflow-y-auto",
|
|
219
220
|
children: [
|
|
220
|
-
t.length === 0 ?
|
|
221
|
-
/* @__PURE__ */ e("div", { className: "flex h-ds-lg w-ds-lg items-center justify-center rounded-ds-full bg-surface-raised", children: /* @__PURE__ */ e(
|
|
221
|
+
t.length === 0 ? k || /* @__PURE__ */ a("div", { className: "flex flex-col items-center justify-center px-ds-05 py-ds-09", children: [
|
|
222
|
+
/* @__PURE__ */ e("div", { className: "flex h-ds-lg w-ds-lg items-center justify-center rounded-ds-full bg-surface-raised", children: /* @__PURE__ */ e(h, { icon: V, size: "lg", className: "text-surface-fg-subtle" }) }),
|
|
222
223
|
/* @__PURE__ */ e("p", { className: "mt-ds-04 text-ds-md text-surface-fg-subtle", children: "No notifications yet" }),
|
|
223
224
|
/* @__PURE__ */ e("p", { className: "mt-ds-02 text-ds-sm text-surface-fg-subtle", children: "You're all caught up!" })
|
|
224
|
-
] }) :
|
|
225
|
-
const
|
|
226
|
-
return !
|
|
225
|
+
] }) : S.map((s) => {
|
|
226
|
+
const u = F[s];
|
|
227
|
+
return !u || u.length === 0 ? null : /* @__PURE__ */ a("div", { children: [
|
|
227
228
|
/* @__PURE__ */ e("div", { className: "sticky top-0 z-raised bg-surface-overlay px-ds-05 py-ds-02b", children: /* @__PURE__ */ e("span", { className: "text-ds-sm font-medium text-surface-fg-subtle", children: s }) }),
|
|
228
|
-
|
|
229
|
+
u.map((m, A) => /* @__PURE__ */ e(
|
|
229
230
|
N.div,
|
|
230
231
|
{
|
|
231
232
|
initial: { opacity: 0 },
|
|
232
233
|
animate: { opacity: 1 },
|
|
233
|
-
transition: { delay:
|
|
234
|
+
transition: { delay: A * 0.03 },
|
|
234
235
|
children: /* @__PURE__ */ e(
|
|
235
|
-
|
|
236
|
+
te,
|
|
236
237
|
{
|
|
237
|
-
notification:
|
|
238
|
-
onRead:
|
|
239
|
-
onNavigate:
|
|
240
|
-
getRoute:
|
|
238
|
+
notification: m,
|
|
239
|
+
onRead: Y,
|
|
240
|
+
onNavigate: K,
|
|
241
|
+
getRoute: z,
|
|
241
242
|
onDismiss: I
|
|
242
243
|
}
|
|
243
244
|
)
|
|
244
245
|
},
|
|
245
|
-
|
|
246
|
+
m.id
|
|
246
247
|
))
|
|
247
248
|
] }, s);
|
|
248
249
|
}),
|
|
249
|
-
|
|
250
|
+
c && /* @__PURE__ */ e("div", { className: "flex items-center justify-center py-ds-05", children: /* @__PURE__ */ e(Z, {}) })
|
|
250
251
|
]
|
|
251
252
|
}
|
|
252
253
|
),
|
|
253
|
-
|
|
254
|
+
y && /* @__PURE__ */ e("div", { className: "border-t border-surface-border-strong px-ds-05 py-ds-03", children: y })
|
|
254
255
|
]
|
|
255
256
|
}
|
|
256
257
|
)
|
|
257
258
|
] });
|
|
258
259
|
}
|
|
259
260
|
);
|
|
260
|
-
|
|
261
|
+
se.displayName = "NotificationCenter";
|
|
261
262
|
export {
|
|
262
|
-
|
|
263
|
+
se as NotificationCenter
|
|
263
264
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification-preferences.d.ts","sourceRoot":"","sources":["../../src/shell/notification-preferences.tsx"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"notification-preferences.d.ts","sourceRoot":"","sources":["../../src/shell/notification-preferences.tsx"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AA4B9B,MAAM,WAAW,sBAAsB;IACrC,EAAE,EAAE,MAAM,CAAA;IACV,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,OAAO,CAAA;CACf;AAED,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,4BACf,SAAQ,IAAI,CAAC,KAAK,CAAC,qBAAqB,CAAC,KAAK,CAAC,EAAE,QAAQ,CAAC;IAC1D,+BAA+B;IAC/B,WAAW,CAAC,EAAE,sBAAsB,EAAE,CAAA;IACtC,2CAA2C;IAC3C,QAAQ,CAAC,EAAE,mBAAmB,EAAE,CAAA;IAChC,8BAA8B;IAC9B,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,2CAA2C;IAC3C,MAAM,CAAC,EAAE,CAAC,UAAU,EAAE;QACpB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;QACxB,OAAO,EAAE,MAAM,CAAA;QACf,OAAO,EAAE,MAAM,CAAA;QACf,KAAK,EAAE,OAAO,CAAA;KACf,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAC1B,4CAA4C;IAC5C,YAAY,CAAC,EAAE,CAAC,UAAU,EAAE,sBAAsB,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAC3E,gDAAgD;IAChD,YAAY,CAAC,EAAE,CACb,UAAU,EAAE,sBAAsB,EAClC,OAAO,EAAE,MAAM,KACZ,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACzB,oCAAoC;IACpC,QAAQ,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACzD,2BAA2B;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAqBD,QAAA,MAAM,uBAAuB,kHA0P5B,CAAA;AAID,OAAO,EAAE,uBAAuB,EAAE,CAAA"}
|
|
@@ -1,107 +1,104 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import * as
|
|
4
|
-
import { useState as
|
|
2
|
+
import { jsxs as t, Fragment as B, jsx as e } from "react/jsx-runtime";
|
|
3
|
+
import * as U from "react";
|
|
4
|
+
import { useState as n } from "react";
|
|
5
5
|
import { Button as g } from "../ui/button.js";
|
|
6
|
-
import { Select as d, SelectTrigger as o, SelectValue as m, SelectContent as h, SelectItem as
|
|
6
|
+
import { Select as d, SelectTrigger as o, SelectValue as m, SelectContent as h, SelectItem as s } from "../ui/select.js";
|
|
7
7
|
import { Dialog as q, DialogContent as J, DialogHeader as K, DialogTitle as Q, DialogDescription as W } from "../ui/dialog.js";
|
|
8
|
-
import { Switch as
|
|
8
|
+
import { Switch as T } from "../ui/switch.js";
|
|
9
9
|
import { Card as X, CardHeader as Y, CardTitle as Z, CardContent as $ } from "../ui/card.js";
|
|
10
|
-
import { IconPlus as
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
10
|
+
import { IconPlus as ee, IconTrash as le, IconMessage as te, IconBell as ne } from "@tabler/icons-react";
|
|
11
|
+
import { Icon as f } from "../ui/icon.js";
|
|
12
|
+
import { cn as se } from "../ui/lib/utils.js";
|
|
13
|
+
import { Spinner as ie } from "../ui/spinner.js";
|
|
14
|
+
const O = {
|
|
15
|
+
IN_APP: { label: "In-App", icon: /* @__PURE__ */ e(f, { icon: ne, size: "sm" }) },
|
|
16
|
+
GOOGLE_CHAT: { label: "Google Chat", icon: /* @__PURE__ */ e(f, { icon: te, size: "sm" }) }
|
|
17
|
+
}, F = {
|
|
17
18
|
INFO: "All (Info+)",
|
|
18
19
|
IMPORTANT: "Important+",
|
|
19
20
|
CRITICAL: "Critical only"
|
|
20
|
-
},
|
|
21
|
+
}, ce = U.forwardRef(
|
|
21
22
|
function({
|
|
22
|
-
preferences:
|
|
23
|
-
projects:
|
|
24
|
-
isLoading:
|
|
25
|
-
onSave:
|
|
26
|
-
onToggleMute:
|
|
27
|
-
onUpdateTier:
|
|
28
|
-
onDelete:
|
|
29
|
-
className:
|
|
30
|
-
...
|
|
31
|
-
},
|
|
32
|
-
const [
|
|
33
|
-
if (
|
|
34
|
-
|
|
23
|
+
preferences: u = [],
|
|
24
|
+
projects: N = [],
|
|
25
|
+
isLoading: k = !1,
|
|
26
|
+
onSave: x,
|
|
27
|
+
onToggleMute: M,
|
|
28
|
+
onUpdateTier: _,
|
|
29
|
+
onDelete: D,
|
|
30
|
+
className: G,
|
|
31
|
+
...L
|
|
32
|
+
}, R) {
|
|
33
|
+
const [z, i] = n(!1), [p, b] = n("global"), [v, C] = n("IN_APP"), [I, w] = n("INFO"), [A, P] = n(!1), [j, S] = n(!1), E = async () => {
|
|
34
|
+
if (x) {
|
|
35
|
+
S(!0);
|
|
35
36
|
try {
|
|
36
|
-
await
|
|
37
|
-
projectId:
|
|
38
|
-
channel:
|
|
39
|
-
minTier:
|
|
40
|
-
muted:
|
|
41
|
-
}), i(!1),
|
|
37
|
+
await x({
|
|
38
|
+
projectId: p === "global" ? null : p,
|
|
39
|
+
channel: v,
|
|
40
|
+
minTier: I,
|
|
41
|
+
muted: A
|
|
42
|
+
}), i(!1), y();
|
|
42
43
|
} catch (l) {
|
|
43
44
|
console.error("[Preferences] Failed to save:", l);
|
|
44
45
|
} finally {
|
|
45
|
-
|
|
46
|
+
S(!1);
|
|
46
47
|
}
|
|
47
48
|
}
|
|
48
|
-
},
|
|
49
|
-
|
|
50
|
-
},
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
};
|
|
55
|
-
return /* @__PURE__ */ s(D, { children: [
|
|
56
|
-
/* @__PURE__ */ s(X, { ref: E, className: R, ...T, children: [
|
|
57
|
-
/* @__PURE__ */ s(Y, { className: "flex flex-row items-center justify-between space-y-0 pb-ds-04", children: [
|
|
49
|
+
}, y = () => {
|
|
50
|
+
b("global"), C("IN_APP"), w("INFO"), P(!1);
|
|
51
|
+
}, H = (l) => l ? N.find((a) => a.id === l)?.title || "Unknown project" : "Global (all projects)";
|
|
52
|
+
return /* @__PURE__ */ t(B, { children: [
|
|
53
|
+
/* @__PURE__ */ t(X, { ref: R, className: G, ...L, children: [
|
|
54
|
+
/* @__PURE__ */ t(Y, { className: "flex flex-row items-center justify-between space-y-0 pb-ds-04", children: [
|
|
58
55
|
/* @__PURE__ */ e(Z, { className: "text-ds-md font-semibold", children: "Notification Preferences" }),
|
|
59
|
-
/* @__PURE__ */
|
|
56
|
+
/* @__PURE__ */ t(
|
|
60
57
|
g,
|
|
61
58
|
{
|
|
62
59
|
size: "sm",
|
|
63
60
|
variant: "outline",
|
|
64
61
|
onClick: () => i(!0),
|
|
65
62
|
children: [
|
|
66
|
-
/* @__PURE__ */ e(
|
|
63
|
+
/* @__PURE__ */ e(f, { icon: ee, size: "sm", className: "mr-ds-02b" }),
|
|
67
64
|
"Add Rule"
|
|
68
65
|
]
|
|
69
66
|
}
|
|
70
67
|
)
|
|
71
68
|
] }),
|
|
72
|
-
/* @__PURE__ */ e($, { children:
|
|
73
|
-
const a =
|
|
74
|
-
return /* @__PURE__ */
|
|
69
|
+
/* @__PURE__ */ e($, { children: k ? /* @__PURE__ */ e("div", { className: "flex items-center justify-center py-ds-07", children: /* @__PURE__ */ e(ie, {}) }) : u.length === 0 ? /* @__PURE__ */ e("div", { className: "py-ds-07 text-center", children: /* @__PURE__ */ e("p", { className: "text-ds-md text-surface-fg-subtle", children: "No custom preferences set. All notifications are delivered by default." }) }) : /* @__PURE__ */ e("div", { className: "flex flex-col", children: u.map((l, c) => {
|
|
70
|
+
const a = O[l.channel] || O.IN_APP;
|
|
71
|
+
return /* @__PURE__ */ t(
|
|
75
72
|
"div",
|
|
76
73
|
{
|
|
77
|
-
className:
|
|
74
|
+
className: se(
|
|
78
75
|
"flex items-center gap-ds-05 py-ds-04",
|
|
79
|
-
|
|
76
|
+
c < u.length - 1 && "border-b border-surface-border-strong"
|
|
80
77
|
),
|
|
81
78
|
children: [
|
|
82
79
|
/* @__PURE__ */ e("div", { className: "flex h-ds-sm w-ds-sm shrink-0 items-center justify-center rounded-ds-lg bg-surface-raised", children: /* @__PURE__ */ e("span", { className: "[&>svg]:h-ico-sm [&>svg]:w-ico-sm text-surface-fg-muted", "aria-hidden": "true", children: a.icon }) }),
|
|
83
|
-
/* @__PURE__ */
|
|
80
|
+
/* @__PURE__ */ t("div", { className: "min-w-0 flex-1", children: [
|
|
84
81
|
/* @__PURE__ */ e("p", { className: "text-ds-md font-medium text-surface-fg", children: a.label }),
|
|
85
|
-
/* @__PURE__ */ e("p", { className: "text-ds-sm text-surface-fg-subtle", children:
|
|
82
|
+
/* @__PURE__ */ e("p", { className: "text-ds-sm text-surface-fg-subtle", children: H(l.projectId) })
|
|
86
83
|
] }),
|
|
87
|
-
/* @__PURE__ */
|
|
84
|
+
/* @__PURE__ */ t(
|
|
88
85
|
d,
|
|
89
86
|
{
|
|
90
87
|
value: l.minTier,
|
|
91
|
-
onValueChange: (r) =>
|
|
88
|
+
onValueChange: (r) => _?.(l, r),
|
|
92
89
|
children: [
|
|
93
90
|
/* @__PURE__ */ e(o, { className: "h-ds-xs-plus w-[130px] text-ds-sm", children: /* @__PURE__ */ e(m, {}) }),
|
|
94
|
-
/* @__PURE__ */ e(h, { children: Object.entries(
|
|
91
|
+
/* @__PURE__ */ e(h, { children: Object.entries(F).map(([r, V]) => /* @__PURE__ */ e(s, { value: r, children: V }, r)) })
|
|
95
92
|
]
|
|
96
93
|
}
|
|
97
94
|
),
|
|
98
|
-
/* @__PURE__ */
|
|
95
|
+
/* @__PURE__ */ t("div", { className: "flex items-center gap-ds-02b", children: [
|
|
99
96
|
/* @__PURE__ */ e("span", { className: "text-ds-sm text-surface-fg-subtle", children: l.muted ? "Muted" : "Active" }),
|
|
100
97
|
/* @__PURE__ */ e(
|
|
101
|
-
|
|
98
|
+
T,
|
|
102
99
|
{
|
|
103
100
|
checked: !l.muted,
|
|
104
|
-
onCheckedChange: () =>
|
|
101
|
+
onCheckedChange: () => M?.(l)
|
|
105
102
|
}
|
|
106
103
|
)
|
|
107
104
|
] }),
|
|
@@ -109,9 +106,9 @@ const _ = {
|
|
|
109
106
|
"button",
|
|
110
107
|
{
|
|
111
108
|
type: "button",
|
|
112
|
-
onClick: () =>
|
|
109
|
+
onClick: () => D?.(l.id),
|
|
113
110
|
className: "shrink-0 rounded p-ds-02b text-surface-fg-subtle transition-colors hover:bg-surface-raised hover:text-error-11",
|
|
114
|
-
children: /* @__PURE__ */ e(
|
|
111
|
+
children: /* @__PURE__ */ e(f, { icon: le, size: "sm" })
|
|
115
112
|
}
|
|
116
113
|
)
|
|
117
114
|
]
|
|
@@ -120,50 +117,50 @@ const _ = {
|
|
|
120
117
|
);
|
|
121
118
|
}) }) })
|
|
122
119
|
] }),
|
|
123
|
-
/* @__PURE__ */ e(q, { open:
|
|
124
|
-
/* @__PURE__ */
|
|
120
|
+
/* @__PURE__ */ e(q, { open: z, onOpenChange: i, children: /* @__PURE__ */ t(J, { className: "sm:max-w-md", children: [
|
|
121
|
+
/* @__PURE__ */ t(K, { children: [
|
|
125
122
|
/* @__PURE__ */ e(Q, { children: "Add Notification Rule" }),
|
|
126
123
|
/* @__PURE__ */ e(W, { children: "Customize how you receive notifications for a specific channel and project." })
|
|
127
124
|
] }),
|
|
128
|
-
/* @__PURE__ */
|
|
129
|
-
/* @__PURE__ */
|
|
125
|
+
/* @__PURE__ */ t("div", { className: "flex flex-col gap-ds-05 pt-ds-03", children: [
|
|
126
|
+
/* @__PURE__ */ t("div", { className: "flex flex-col gap-ds-02b", children: [
|
|
130
127
|
/* @__PURE__ */ e("label", { htmlFor: "pref-scope", className: "text-ds-sm font-medium text-surface-fg-muted", children: "Scope" }),
|
|
131
|
-
/* @__PURE__ */
|
|
128
|
+
/* @__PURE__ */ t(d, { value: p, onValueChange: b, children: [
|
|
132
129
|
/* @__PURE__ */ e(o, { id: "pref-scope", children: /* @__PURE__ */ e(m, { placeholder: "Select scope" }) }),
|
|
133
|
-
/* @__PURE__ */
|
|
134
|
-
/* @__PURE__ */ e(
|
|
135
|
-
|
|
130
|
+
/* @__PURE__ */ t(h, { children: [
|
|
131
|
+
/* @__PURE__ */ e(s, { value: "global", children: "Global (all projects)" }),
|
|
132
|
+
N.map((l) => /* @__PURE__ */ e(s, { value: l.id, children: l.title }, l.id))
|
|
136
133
|
] })
|
|
137
134
|
] })
|
|
138
135
|
] }),
|
|
139
|
-
/* @__PURE__ */
|
|
136
|
+
/* @__PURE__ */ t("div", { className: "flex flex-col gap-ds-02b", children: [
|
|
140
137
|
/* @__PURE__ */ e("label", { htmlFor: "pref-channel", className: "text-ds-sm font-medium text-surface-fg-muted", children: "Channel" }),
|
|
141
|
-
/* @__PURE__ */
|
|
138
|
+
/* @__PURE__ */ t(d, { value: v, onValueChange: C, children: [
|
|
142
139
|
/* @__PURE__ */ e(o, { id: "pref-channel", children: /* @__PURE__ */ e(m, {}) }),
|
|
143
|
-
/* @__PURE__ */
|
|
144
|
-
/* @__PURE__ */ e(
|
|
145
|
-
/* @__PURE__ */ e(
|
|
140
|
+
/* @__PURE__ */ t(h, { children: [
|
|
141
|
+
/* @__PURE__ */ e(s, { value: "IN_APP", children: "In-App" }),
|
|
142
|
+
/* @__PURE__ */ e(s, { value: "GOOGLE_CHAT", children: "Google Chat" })
|
|
146
143
|
] })
|
|
147
144
|
] })
|
|
148
145
|
] }),
|
|
149
|
-
/* @__PURE__ */
|
|
146
|
+
/* @__PURE__ */ t("div", { className: "flex flex-col gap-ds-02b", children: [
|
|
150
147
|
/* @__PURE__ */ e("label", { htmlFor: "pref-min-tier", className: "text-ds-sm font-medium text-surface-fg-muted", children: "Minimum Tier" }),
|
|
151
|
-
/* @__PURE__ */
|
|
148
|
+
/* @__PURE__ */ t(d, { value: I, onValueChange: w, children: [
|
|
152
149
|
/* @__PURE__ */ e(o, { id: "pref-min-tier", children: /* @__PURE__ */ e(m, {}) }),
|
|
153
|
-
/* @__PURE__ */ e(h, { children: Object.entries(
|
|
150
|
+
/* @__PURE__ */ e(h, { children: Object.entries(F).map(([l, c]) => /* @__PURE__ */ e(s, { value: l, children: c }, l)) })
|
|
154
151
|
] })
|
|
155
152
|
] }),
|
|
156
|
-
/* @__PURE__ */
|
|
153
|
+
/* @__PURE__ */ t("div", { className: "flex items-center justify-between", children: [
|
|
157
154
|
/* @__PURE__ */ e("label", { htmlFor: "pref-muted", className: "text-ds-md text-surface-fg", children: "Mute this channel" }),
|
|
158
|
-
/* @__PURE__ */ e(
|
|
155
|
+
/* @__PURE__ */ e(T, { id: "pref-muted", checked: A, onCheckedChange: P })
|
|
159
156
|
] }),
|
|
160
|
-
/* @__PURE__ */
|
|
157
|
+
/* @__PURE__ */ t("div", { className: "flex justify-end gap-ds-03 pt-ds-03", children: [
|
|
161
158
|
/* @__PURE__ */ e(
|
|
162
159
|
g,
|
|
163
160
|
{
|
|
164
161
|
variant: "ghost",
|
|
165
162
|
onClick: () => {
|
|
166
|
-
i(!1),
|
|
163
|
+
i(!1), y();
|
|
167
164
|
},
|
|
168
165
|
children: "Cancel"
|
|
169
166
|
}
|
|
@@ -171,9 +168,9 @@ const _ = {
|
|
|
171
168
|
/* @__PURE__ */ e(
|
|
172
169
|
g,
|
|
173
170
|
{
|
|
174
|
-
onClick:
|
|
175
|
-
disabled:
|
|
176
|
-
children:
|
|
171
|
+
onClick: E,
|
|
172
|
+
disabled: j,
|
|
173
|
+
children: j ? "Saving..." : "Save Rule"
|
|
177
174
|
}
|
|
178
175
|
)
|
|
179
176
|
] })
|
|
@@ -182,7 +179,7 @@ const _ = {
|
|
|
182
179
|
] });
|
|
183
180
|
}
|
|
184
181
|
);
|
|
185
|
-
|
|
182
|
+
ce.displayName = "NotificationPreferences";
|
|
186
183
|
export {
|
|
187
|
-
|
|
184
|
+
ce as NotificationPreferences
|
|
188
185
|
};
|