@tnf-dev/react 1.0.1-7 → 1.0.1-8

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.
Files changed (159) hide show
  1. package/dist/cjs/components/icons/archive-box-icon.cjs +1 -50
  2. package/dist/cjs/components/icons/bell-icon.cjs +1 -50
  3. package/dist/cjs/components/icons/check-circle-icon.cjs +1 -50
  4. package/dist/cjs/components/icons/index.cjs +1 -112
  5. package/dist/cjs/components/inbox/bell.cjs +12 -4714
  6. package/dist/cjs/components/inbox/button.cjs +12 -4654
  7. package/dist/cjs/components/inbox/empty.cjs +12 -4635
  8. package/dist/cjs/components/inbox/inbox.cjs +12 -5291
  9. package/dist/cjs/components/inbox/index.cjs +12 -5309
  10. package/dist/cjs/components/inbox/loader.cjs +12 -4629
  11. package/dist/cjs/components/inbox/notification-header.cjs +12 -4649
  12. package/dist/cjs/components/inbox/notification-item/actions.cjs +12 -4738
  13. package/dist/cjs/components/inbox/notification-item/index.cjs +12 -4865
  14. package/dist/cjs/components/inbox/popover.cjs +12 -4711
  15. package/dist/cjs/components/index.cjs +12 -5309
  16. package/dist/cjs/contexts/StyleProvider.cjs +12 -4645
  17. package/dist/cjs/contexts/TeknifyProvider.cjs +12 -4674
  18. package/dist/cjs/contexts/index.cjs +12 -4677
  19. package/dist/cjs/dto/index.cjs +1 -19
  20. package/dist/cjs/dto/notifications/index.cjs +1 -19
  21. package/dist/cjs/dto/notifications/notification.interface.cjs +1 -19
  22. package/dist/cjs/hooks/index.cjs +1 -145
  23. package/dist/cjs/hooks/useNotifications.cjs +1 -143
  24. package/dist/cjs/index.cjs +12 -5362
  25. package/dist/cjs/utils/const.cjs +1 -31
  26. package/dist/cjs/utils/index.cjs +1 -33
  27. package/dist/esm/components/icons/archive-box-icon.js +1 -8
  28. package/dist/esm/components/icons/bell-icon.js +1 -8
  29. package/dist/esm/components/icons/check-circle-icon.js +1 -8
  30. package/dist/esm/components/icons/index.js +1 -17
  31. package/dist/esm/components/inbox/bell.js +29 -15
  32. package/dist/esm/components/inbox/button.js +29 -11
  33. package/dist/esm/components/inbox/empty.js +29 -11
  34. package/dist/esm/components/inbox/inbox.js +29 -28
  35. package/dist/esm/components/inbox/index.js +29 -50
  36. package/dist/esm/components/inbox/loader.js +29 -9
  37. package/dist/esm/components/inbox/notification-header.js +29 -11
  38. package/dist/esm/components/inbox/notification-item/actions.js +29 -16
  39. package/dist/esm/components/inbox/notification-item/index.js +29 -17
  40. package/dist/esm/components/inbox/popover.js +29 -11
  41. package/dist/esm/components/index.js +29 -51
  42. package/dist/esm/contexts/StyleProvider.js +29 -9
  43. package/dist/esm/contexts/TeknifyProvider.js +29 -12
  44. package/dist/esm/contexts/index.js +29 -13
  45. package/dist/esm/dto/index.js +0 -4
  46. package/dist/esm/dto/notifications/index.js +0 -3
  47. package/dist/esm/dto/notifications/notification.interface.js +0 -2
  48. package/dist/esm/hooks/index.js +1 -13
  49. package/dist/esm/hooks/useNotifications.js +1 -12
  50. package/dist/esm/index.js +29 -62
  51. package/dist/esm/utils/const.js +1 -8
  52. package/dist/esm/utils/index.js +1 -9
  53. package/package.json +2 -2
  54. package/dist/cjs/components/icons/archive-box-icon.cjs.map +0 -1
  55. package/dist/cjs/components/icons/bell-icon.cjs.map +0 -1
  56. package/dist/cjs/components/icons/check-circle-icon.cjs.map +0 -1
  57. package/dist/cjs/components/icons/index.cjs.map +0 -1
  58. package/dist/cjs/components/inbox/bell.cjs.map +0 -1
  59. package/dist/cjs/components/inbox/button.cjs.map +0 -1
  60. package/dist/cjs/components/inbox/empty.cjs.map +0 -1
  61. package/dist/cjs/components/inbox/inbox.cjs.map +0 -1
  62. package/dist/cjs/components/inbox/index.cjs.map +0 -1
  63. package/dist/cjs/components/inbox/loader.cjs.map +0 -1
  64. package/dist/cjs/components/inbox/notification-header.cjs.map +0 -1
  65. package/dist/cjs/components/inbox/notification-item/actions.cjs.map +0 -1
  66. package/dist/cjs/components/inbox/notification-item/index.cjs.map +0 -1
  67. package/dist/cjs/components/inbox/popover.cjs.map +0 -1
  68. package/dist/cjs/components/index.cjs.map +0 -1
  69. package/dist/cjs/contexts/StyleProvider.cjs.map +0 -1
  70. package/dist/cjs/contexts/TeknifyProvider.cjs.map +0 -1
  71. package/dist/cjs/contexts/index.cjs.map +0 -1
  72. package/dist/cjs/dto/index.cjs.map +0 -1
  73. package/dist/cjs/dto/notifications/index.cjs.map +0 -1
  74. package/dist/cjs/dto/notifications/notification.interface.cjs.map +0 -1
  75. package/dist/cjs/hooks/index.cjs.map +0 -1
  76. package/dist/cjs/hooks/useNotifications.cjs.map +0 -1
  77. package/dist/cjs/index.cjs.map +0 -1
  78. package/dist/cjs/utils/const.cjs.map +0 -1
  79. package/dist/cjs/utils/index.cjs.map +0 -1
  80. package/dist/esm/chunk-57PGXW3M.js +0 -2
  81. package/dist/esm/chunk-57PGXW3M.js.map +0 -1
  82. package/dist/esm/chunk-5ZHARJ3G.js +0 -4446
  83. package/dist/esm/chunk-5ZHARJ3G.js.map +0 -1
  84. package/dist/esm/chunk-6FGP2HJW.js +0 -9
  85. package/dist/esm/chunk-6FGP2HJW.js.map +0 -1
  86. package/dist/esm/chunk-ATNNGNAM.js +0 -2
  87. package/dist/esm/chunk-ATNNGNAM.js.map +0 -1
  88. package/dist/esm/chunk-B5I3IFK2.js +0 -113
  89. package/dist/esm/chunk-B5I3IFK2.js.map +0 -1
  90. package/dist/esm/chunk-DC2MKTMP.js +0 -2
  91. package/dist/esm/chunk-DC2MKTMP.js.map +0 -1
  92. package/dist/esm/chunk-EBHNXTGY.js +0 -2
  93. package/dist/esm/chunk-EBHNXTGY.js.map +0 -1
  94. package/dist/esm/chunk-ET4RPLX7.js +0 -32
  95. package/dist/esm/chunk-ET4RPLX7.js.map +0 -1
  96. package/dist/esm/chunk-H3IWAKC5.js +0 -34
  97. package/dist/esm/chunk-H3IWAKC5.js.map +0 -1
  98. package/dist/esm/chunk-H3RCKWE3.js +0 -2
  99. package/dist/esm/chunk-H3RCKWE3.js.map +0 -1
  100. package/dist/esm/chunk-HDKTD2IK.js +0 -49
  101. package/dist/esm/chunk-HDKTD2IK.js.map +0 -1
  102. package/dist/esm/chunk-IXQPSHNR.js +0 -32
  103. package/dist/esm/chunk-IXQPSHNR.js.map +0 -1
  104. package/dist/esm/chunk-MNBHQJKW.js +0 -2
  105. package/dist/esm/chunk-MNBHQJKW.js.map +0 -1
  106. package/dist/esm/chunk-NDUFFQA7.js +0 -24
  107. package/dist/esm/chunk-NDUFFQA7.js.map +0 -1
  108. package/dist/esm/chunk-NQ3CC7OA.js +0 -84
  109. package/dist/esm/chunk-NQ3CC7OA.js.map +0 -1
  110. package/dist/esm/chunk-QILM4R2Q.js +0 -54
  111. package/dist/esm/chunk-QILM4R2Q.js.map +0 -1
  112. package/dist/esm/chunk-RCHW4I55.js +0 -2
  113. package/dist/esm/chunk-RCHW4I55.js.map +0 -1
  114. package/dist/esm/chunk-RLFVKZHT.js +0 -30
  115. package/dist/esm/chunk-RLFVKZHT.js.map +0 -1
  116. package/dist/esm/chunk-S6WUE45S.js +0 -32
  117. package/dist/esm/chunk-S6WUE45S.js.map +0 -1
  118. package/dist/esm/chunk-SSLZWOID.js +0 -97
  119. package/dist/esm/chunk-SSLZWOID.js.map +0 -1
  120. package/dist/esm/chunk-VWQT7XSQ.js +0 -2
  121. package/dist/esm/chunk-VWQT7XSQ.js.map +0 -1
  122. package/dist/esm/chunk-WN4NSHNE.js +0 -32
  123. package/dist/esm/chunk-WN4NSHNE.js.map +0 -1
  124. package/dist/esm/chunk-XVCHU66N.js +0 -40
  125. package/dist/esm/chunk-XVCHU66N.js.map +0 -1
  126. package/dist/esm/chunk-YKV4YNJ4.js +0 -44
  127. package/dist/esm/chunk-YKV4YNJ4.js.map +0 -1
  128. package/dist/esm/chunk-YY3MZBYQ.js +0 -2
  129. package/dist/esm/chunk-YY3MZBYQ.js.map +0 -1
  130. package/dist/esm/chunk-Z4Q2SGNX.js +0 -144
  131. package/dist/esm/chunk-Z4Q2SGNX.js.map +0 -1
  132. package/dist/esm/chunk-ZBV5DZZB.js +0 -104
  133. package/dist/esm/chunk-ZBV5DZZB.js.map +0 -1
  134. package/dist/esm/components/icons/archive-box-icon.js.map +0 -1
  135. package/dist/esm/components/icons/bell-icon.js.map +0 -1
  136. package/dist/esm/components/icons/check-circle-icon.js.map +0 -1
  137. package/dist/esm/components/icons/index.js.map +0 -1
  138. package/dist/esm/components/inbox/bell.js.map +0 -1
  139. package/dist/esm/components/inbox/button.js.map +0 -1
  140. package/dist/esm/components/inbox/empty.js.map +0 -1
  141. package/dist/esm/components/inbox/inbox.js.map +0 -1
  142. package/dist/esm/components/inbox/index.js.map +0 -1
  143. package/dist/esm/components/inbox/loader.js.map +0 -1
  144. package/dist/esm/components/inbox/notification-header.js.map +0 -1
  145. package/dist/esm/components/inbox/notification-item/actions.js.map +0 -1
  146. package/dist/esm/components/inbox/notification-item/index.js.map +0 -1
  147. package/dist/esm/components/inbox/popover.js.map +0 -1
  148. package/dist/esm/components/index.js.map +0 -1
  149. package/dist/esm/contexts/StyleProvider.js.map +0 -1
  150. package/dist/esm/contexts/TeknifyProvider.js.map +0 -1
  151. package/dist/esm/contexts/index.js.map +0 -1
  152. package/dist/esm/dto/index.js.map +0 -1
  153. package/dist/esm/dto/notifications/index.js.map +0 -1
  154. package/dist/esm/dto/notifications/notification.interface.js.map +0 -1
  155. package/dist/esm/hooks/index.js.map +0 -1
  156. package/dist/esm/hooks/useNotifications.js.map +0 -1
  157. package/dist/esm/index.js.map +0 -1
  158. package/dist/esm/utils/const.js.map +0 -1
  159. package/dist/esm/utils/index.js.map +0 -1
@@ -1,9 +0,0 @@
1
- "use client"
2
-
3
- // src/utils/const.ts
4
- var COMPONENT_PREFIX = "teknify";
5
-
6
- export {
7
- COMPONENT_PREFIX
8
- };
9
- //# sourceMappingURL=chunk-6FGP2HJW.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/utils/const.ts"],"sourcesContent":["export const COMPONENT_PREFIX = 'teknify';\n"],"mappings":";;;AAAO,IAAM,mBAAmB;","names":[]}
@@ -1,2 +0,0 @@
1
- "use client"
2
- //# sourceMappingURL=chunk-ATNNGNAM.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,113 +0,0 @@
1
- "use client"
2
- import {
3
- TeknifyContext
4
- } from "./chunk-H3IWAKC5.js";
5
-
6
- // src/hooks/useNotifications.ts
7
- import { useCallback, useContext, useEffect, useState } from "react";
8
- var useNotifications = () => {
9
- const { client } = useContext(TeknifyContext);
10
- const [notifications, setNotifications] = useState([]);
11
- const [isError, setIsError] = useState(false);
12
- const [error, setError] = useState(null);
13
- const [isLoading, setIsLoading] = useState(false);
14
- const [isFirstLoad, setIsFirstLoad] = useState(true);
15
- const [hasMore, setHasMore] = useState(true);
16
- const [nextCursor, setNextCursor] = useState();
17
- const [unread, setUnread] = useState(0);
18
- const handleMarkAsRead = useCallback(async (id) => {
19
- try {
20
- await client.notification.markAsRead(id);
21
- setNotifications((prev) => {
22
- return prev.map((notification) => {
23
- if (notification._id === id) {
24
- return {
25
- ...notification,
26
- isRead: true
27
- };
28
- }
29
- return notification;
30
- });
31
- });
32
- } catch (error2) {
33
- }
34
- }, []);
35
- const fetchNotifications = useCallback(async () => {
36
- if (isLoading) return;
37
- try {
38
- setIsLoading(true);
39
- const res = await client.notification.getNotifications({
40
- ...nextCursor ? { cursor: nextCursor } : {}
41
- });
42
- setNotifications((prev) => {
43
- return [
44
- ...prev,
45
- ...res.data.filter((notification) => !prev.find((n) => n._id === notification._id)).map((notification) => ({
46
- ...notification,
47
- markAsRead: () => handleMarkAsRead(notification._id)
48
- }))
49
- ];
50
- });
51
- setHasMore(!!res.pagination.continueCursor);
52
- setNextCursor(res.pagination.continueCursor);
53
- setUnread(res.unread);
54
- } catch (error2) {
55
- setIsError(true);
56
- if (error2 instanceof Error) {
57
- setError(error2);
58
- } else {
59
- setError(new Error("Unknown error"));
60
- }
61
- } finally {
62
- setIsLoading(false);
63
- setIsFirstLoad(false);
64
- }
65
- }, [isLoading, nextCursor, handleMarkAsRead]);
66
- useEffect(() => {
67
- fetchNotifications();
68
- }, []);
69
- useEffect(() => {
70
- const handler = (notifications2) => {
71
- setNotifications((prev) => {
72
- return [
73
- ...notifications2.filter((notification) => {
74
- const foundIndex = prev.findIndex((n) => n._id === notification._id);
75
- if (foundIndex) {
76
- prev[foundIndex] = {
77
- ...notification,
78
- markAsRead: () => handleMarkAsRead(notification._id)
79
- };
80
- }
81
- return foundIndex === -1;
82
- }).map((notification) => ({
83
- ...notification,
84
- markAsRead: () => handleMarkAsRead(notification._id)
85
- })),
86
- ...prev
87
- ];
88
- });
89
- };
90
- client.notification.on(handler);
91
- return () => {
92
- client.notification.off(handler);
93
- };
94
- }, [handleMarkAsRead]);
95
- const fetchMore = useCallback(() => {
96
- fetchNotifications();
97
- }, [fetchNotifications]);
98
- return {
99
- notifications,
100
- isLoading,
101
- isFirstLoad,
102
- isError,
103
- error,
104
- hasMore,
105
- unread,
106
- fetchMore
107
- };
108
- };
109
-
110
- export {
111
- useNotifications
112
- };
113
- //# sourceMappingURL=chunk-B5I3IFK2.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/hooks/useNotifications.ts"],"sourcesContent":["import { useCallback, useContext, useEffect, useState } from 'react';\nimport { TeknifyContext } from '../contexts';\nimport { Notification } from '../dto';\n\nexport const useNotifications = () => {\n const { client } = useContext(TeknifyContext);\n const [notifications, setNotifications] = useState<Notification[]>([]);\n const [isError, setIsError] = useState(false);\n const [error, setError] = useState<Error | null>(null);\n const [isLoading, setIsLoading] = useState(false);\n const [isFirstLoad, setIsFirstLoad] = useState(true);\n const [hasMore, setHasMore] = useState(true);\n const [nextCursor, setNextCursor] = useState<string | undefined>();\n const [unread, setUnread] = useState(0);\n\n const handleMarkAsRead = useCallback(async (id: string) => {\n try {\n await client.notification.markAsRead(id);\n setNotifications((prev) => {\n return prev.map((notification) => {\n if (notification._id === id) {\n return {\n ...notification,\n isRead: true,\n };\n }\n return notification;\n });\n });\n } catch (error) {}\n }, []);\n\n const fetchNotifications = useCallback(async () => {\n if (isLoading) return;\n try {\n setIsLoading(true);\n const res = await client.notification.getNotifications({\n ...(nextCursor ? { cursor: nextCursor } : {}),\n });\n\n setNotifications((prev) => {\n return [\n ...prev,\n ...res.data\n .filter((notification) => !prev.find((n) => n._id === notification._id))\n .map((notification) => ({\n ...notification,\n markAsRead: () => handleMarkAsRead(notification._id),\n })),\n ];\n });\n setHasMore(!!res.pagination.continueCursor);\n setNextCursor(res.pagination.continueCursor);\n setUnread(res.unread);\n } catch (error) {\n setIsError(true);\n if (error instanceof Error) {\n setError(error);\n } else {\n setError(new Error('Unknown error'));\n }\n } finally {\n setIsLoading(false);\n setIsFirstLoad(false);\n }\n }, [isLoading, nextCursor, handleMarkAsRead]);\n\n useEffect(() => {\n fetchNotifications();\n }, []);\n\n useEffect(() => {\n const handler = (notifications: Array<Omit<Notification, 'markAsRead'>>) => {\n setNotifications((prev) => {\n return [\n ...notifications\n .filter((notification) => {\n const foundIndex = prev.findIndex((n) => n._id === notification._id);\n if (foundIndex) {\n prev[foundIndex] = {\n ...notification,\n markAsRead: () => handleMarkAsRead(notification._id),\n };\n }\n return foundIndex === -1;\n })\n .map((notification) => ({\n ...notification,\n markAsRead: () => handleMarkAsRead(notification._id),\n })),\n ...prev,\n ];\n });\n };\n client.notification.on(handler);\n return () => {\n client.notification.off(handler);\n };\n }, [handleMarkAsRead]);\n\n const fetchMore = useCallback(() => {\n fetchNotifications();\n }, [fetchNotifications]);\n\n return {\n notifications,\n isLoading,\n isFirstLoad,\n isError,\n error,\n hasMore,\n unread,\n fetchMore,\n };\n};\n"],"mappings":";;;;;;AAAA,SAAS,aAAa,YAAY,WAAW,gBAAgB;AAItD,IAAM,mBAAmB,MAAM;AACpC,QAAM,EAAE,OAAO,IAAI,WAAW,cAAc;AAC5C,QAAM,CAAC,eAAe,gBAAgB,IA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AA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;","names":["error","notifications"]}
@@ -1,2 +0,0 @@
1
- "use client"
2
- //# sourceMappingURL=chunk-DC2MKTMP.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,2 +0,0 @@
1
- "use client"
2
- //# sourceMappingURL=chunk-EBHNXTGY.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,32 +0,0 @@
1
- "use client"
2
-
3
- // src/components/icons/bell-icon.tsx
4
- import { jsx } from "react/jsx-runtime";
5
- var BellIcon = (props) => {
6
- return /* @__PURE__ */ jsx(
7
- "svg",
8
- {
9
- xmlns: "http://www.w3.org/2000/svg",
10
- fill: "none",
11
- viewBox: "0 0 24 24",
12
- strokeWidth: 1.5,
13
- stroke: "currentColor",
14
- className: "size-6",
15
- ...props,
16
- children: /* @__PURE__ */ jsx(
17
- "path",
18
- {
19
- strokeLinecap: "round",
20
- strokeLinejoin: "round",
21
- d: "M14.857 17.082a23.848 23.848 0 0 0 5.454-1.31A8.967 8.967 0 0 1 18 9.75V9A6 6 0 0 0 6 9v.75a8.967 8.967 0 0 1-2.312 6.022c1.733.64 3.56 1.085 5.455 1.31m5.714 0a24.255 24.255 0 0 1-5.714 0m5.714 0a3 3 0 1 1-5.714 0"
22
- }
23
- )
24
- }
25
- );
26
- };
27
- var bell_icon_default = BellIcon;
28
-
29
- export {
30
- bell_icon_default
31
- };
32
- //# sourceMappingURL=chunk-ET4RPLX7.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/components/icons/bell-icon.tsx"],"sourcesContent":["import { FC } from 'react';\n\ninterface BellIconProps extends React.SVGProps<SVGSVGElement> {}\n\nconst BellIcon: FC<BellIconProps> = (props) => {\n return (\n <svg\n xmlns='http://www.w3.org/2000/svg'\n fill='none'\n viewBox='0 0 24 24'\n strokeWidth={1.5}\n stroke='currentColor'\n className='size-6'\n {...props}\n >\n <path\n strokeLinecap='round'\n strokeLinejoin='round'\n d='M14.857 17.082a23.848 23.848 0 0 0 5.454-1.31A8.967 8.967 0 0 1 18 9.75V9A6 6 0 0 0 6 9v.75a8.967 8.967 0 0 1-2.312 6.022c1.733.64 3.56 1.085 5.455 1.31m5.714 0a24.255 24.255 0 0 1-5.714 0m5.714 0a3 3 0 1 1-5.714 0'\n />\n </svg>\n );\n};\n\nexport default BellIcon;\n"],"mappings":";;;AAeM;AAXN,IAAM,WAA8B,CAAC,UAAU;AAC7C,SACE;AAAA,IAAC;AAAA;AAAA,MACC,OAAM;AAAA,MACN,MAAK;AAAA,MACL,SAAQ;AAAA,MACR,aAAa;AAAA,MACb,QAAO;AAAA,MACP,WAAU;AAAA,MACT,GAAG;AAAA,MAEJ;AAAA,QAAC;AAAA;AAAA,UACC,eAAc;AAAA,UACd,gBAAe;AAAA,UACf,GAAE;AAAA;AAAA,MACJ;AAAA;AAAA,EACF;AAEJ;AAEA,IAAO,oBAAQ;","names":[]}
@@ -1,34 +0,0 @@
1
- "use client"
2
- import {
3
- StyleProvider_default
4
- } from "./chunk-XVCHU66N.js";
5
-
6
- // src/contexts/TeknifyProvider.tsx
7
- import { TeknifyClient } from "@tnf-dev/js";
8
- import { createContext, useMemo } from "react";
9
- import { jsx } from "react/jsx-runtime";
10
- var TeknifyContext = createContext({
11
- applicationId: "",
12
- subscriberId: ""
13
- });
14
- var NotekProvider = ({ applicationId, subscriberId, children, ...props }) => {
15
- const values = useMemo(
16
- () => ({
17
- applicationId,
18
- subscriberId,
19
- client: new TeknifyClient({
20
- applicationId,
21
- subscriberId
22
- })
23
- }),
24
- [applicationId, subscriberId]
25
- );
26
- return /* @__PURE__ */ jsx(TeknifyContext.Provider, { value: values, children: /* @__PURE__ */ jsx(StyleProvider_default, { children }) });
27
- };
28
- var TeknifyProvider_default = NotekProvider;
29
-
30
- export {
31
- TeknifyContext,
32
- TeknifyProvider_default
33
- };
34
- //# sourceMappingURL=chunk-H3IWAKC5.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/contexts/TeknifyProvider.tsx"],"sourcesContent":["import { TeknifyClient } from '@tnf-dev/js';\nimport { createContext, FC, PropsWithChildren, useMemo } from 'react';\nimport StyleProvider from './StyleProvider';\ninterface NotekProviderProps extends PropsWithChildren {\n applicationId: string;\n subscriberId: string;\n}\n\ninterface NotekContextValues {\n applicationId: string;\n subscriberId: string;\n client: TeknifyClient;\n}\n\nexport const TeknifyContext = createContext<NotekContextValues>({\n applicationId: '',\n subscriberId: '',\n} as any);\n\nconst NotekProvider: FC<NotekProviderProps> = ({ applicationId, subscriberId, children, ...props }) => {\n const values: NotekContextValues = useMemo(\n () => ({\n applicationId,\n subscriberId,\n client: new TeknifyClient({\n applicationId,\n subscriberId,\n }),\n }),\n [applicationId, subscriberId],\n );\n\n return (\n <TeknifyContext.Provider value={values}>\n <StyleProvider>{children}</StyleProvider>\n </TeknifyContext.Provider>\n );\n};\n\nexport default NotekProvider;\n"],"mappings":";;;;;;AAAA,SAAS,qBAAqB;AAC9B,SAAS,eAAsC,eAAe;AAiCxD;AApBC,IAAM,iBAAiB,cAAkC;AAAA,EAC9D,eAAe;AAAA,EACf,cAAc;AAChB,CAAQ;AAER,IAAM,gBAAwC,CAAC,EAAE,eAAe,cAAc,UAAU,GAAG,MAAM,MAAM;AACrG,QAAM,SAA6B;AAAA,IACjC,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA,QAAQ,IAAI,cAAc;AAAA,QACxB;AAAA,QACA;AAAA,MACF,CAAC;AAAA,IACH;AAAA,IACA,CAAC,eAAe,YAAY;AAAA,EAC9B;AAEA,SACE,oBAAC,eAAe,UAAf,EAAwB,OAAO,QAC9B,8BAAC,yBAAe,UAAS,GAC3B;AAEJ;AAEA,IAAO,0BAAQ;","names":[]}
@@ -1,2 +0,0 @@
1
- "use client"
2
- //# sourceMappingURL=chunk-H3RCKWE3.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,49 +0,0 @@
1
- "use client"
2
- import {
3
- COMPONENT_PREFIX
4
- } from "./chunk-6FGP2HJW.js";
5
- import {
6
- clsx_default,
7
- createUseStyles
8
- } from "./chunk-5ZHARJ3G.js";
9
-
10
- // src/components/inbox/button.tsx
11
- import { jsx } from "react/jsx-runtime";
12
- var useStyles = createUseStyles(
13
- {
14
- button: (props) => ({
15
- textDecoration: "none",
16
- background: `var(--${props.variant}-color)`,
17
- borderRadius: "var(--border-radius)",
18
- color: props.variant === "tertiary" ? "#000" : "#fff",
19
- fontWeight: 500,
20
- border: "none",
21
- cursor: "pointer",
22
- fontSize: 12,
23
- ...props.icon ? {
24
- width: 24,
25
- height: 24,
26
- display: "flex",
27
- alignItems: "center",
28
- justifyContent: "center"
29
- } : {
30
- minWidth: 100,
31
- padding: "8px 12px"
32
- },
33
- "&:hover": {
34
- background: `var(--${props.variant}-color-darker)`
35
- }
36
- })
37
- },
38
- { name: COMPONENT_PREFIX }
39
- );
40
- var Button = ({ className, variant = "tertiary", icon = false, ...props }) => {
41
- const styles = useStyles({ variant, icon });
42
- return /* @__PURE__ */ jsx("button", { ...props, className: clsx_default(styles.button, className) });
43
- };
44
- var button_default = Button;
45
-
46
- export {
47
- button_default
48
- };
49
- //# sourceMappingURL=chunk-HDKTD2IK.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/components/inbox/button.tsx"],"sourcesContent":["import clsx from 'clsx';\nimport React, { FC } from 'react';\nimport { createUseStyles } from 'react-jss';\nimport { COMPONENT_PREFIX } from '../../utils';\n\nexport interface ButtonProps extends React.ComponentProps<'button'> {\n variant?: 'primary' | 'secondary' | 'tertiary';\n icon?: boolean;\n}\n\nconst useStyles = createUseStyles<'button', ButtonProps>(\n {\n button: (props) => ({\n textDecoration: 'none',\n background: `var(--${props.variant}-color)`,\n borderRadius: 'var(--border-radius)',\n color: props.variant === 'tertiary' ? '#000' : '#fff',\n fontWeight: 500,\n border: 'none',\n cursor: 'pointer',\n fontSize: 12,\n ...(props.icon\n ? {\n width: 24,\n height: 24,\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n }\n : {\n minWidth: 100,\n padding: '8px 12px',\n }),\n\n '&:hover': {\n background: `var(--${props.variant}-color-darker)`,\n },\n }),\n },\n { name: COMPONENT_PREFIX },\n);\n\nconst Button: FC<ButtonProps> = ({ className, variant = 'tertiary', icon = false, ...props }) => {\n const styles = useStyles({ variant, icon });\n return <button {...props} className={clsx(styles.button, className)} />;\n};\n\nexport default Button;\n"],"mappings":";;;;;;;;;;AA4CS;AAlCT,IAAM,YAAY;AAAA,EAChB;AAAA,IACE,QAAQ,CAAC,WAAW;AAAA,MAClB,gBAAgB;AAAA,MAChB,YAAY,SAAS,MAAM,OAAO;AAAA,MAClC,cAAc;AAAA,MACd,OAAO,MAAM,YAAY,aAAa,SAAS;AAAA,MAC/C,YAAY;AAAA,MACZ,QAAQ;AAAA,MACR,QAAQ;AAAA,MACR,UAAU;AAAA,MACV,GAAI,MAAM,OACN;AAAA,QACE,OAAO;AAAA,QACP,QAAQ;AAAA,QACR,SAAS;AAAA,QACT,YAAY;AAAA,QACZ,gBAAgB;AAAA,MAClB,IACA;AAAA,QACE,UAAU;AAAA,QACV,SAAS;AAAA,MACX;AAAA,MAEJ,WAAW;AAAA,QACT,YAAY,SAAS,MAAM,OAAO;AAAA,MACpC;AAAA,IACF;AAAA,EACF;AAAA,EACA,EAAE,MAAM,iBAAiB;AAC3B;AAEA,IAAM,SAA0B,CAAC,EAAE,WAAW,UAAU,YAAY,OAAO,OAAO,GAAG,MAAM,MAAM;AAC/F,QAAM,SAAS,UAAU,EAAE,SAAS,KAAK,CAAC;AAC1C,SAAO,oBAAC,YAAQ,GAAG,OAAO,WAAW,aAAK,OAAO,QAAQ,SAAS,GAAG;AACvE;AAEA,IAAO,iBAAQ;","names":[]}
@@ -1,32 +0,0 @@
1
- "use client"
2
-
3
- // src/components/icons/check-circle-icon.tsx
4
- import { jsx } from "react/jsx-runtime";
5
- var CheckCircleIcon = (props) => {
6
- return /* @__PURE__ */ jsx(
7
- "svg",
8
- {
9
- xmlns: "http://www.w3.org/2000/svg",
10
- fill: "none",
11
- viewBox: "0 0 24 24",
12
- strokeWidth: 1.5,
13
- stroke: "currentColor",
14
- className: "size-6",
15
- ...props,
16
- children: /* @__PURE__ */ jsx(
17
- "path",
18
- {
19
- strokeLinecap: "round",
20
- strokeLinejoin: "round",
21
- d: "M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"
22
- }
23
- )
24
- }
25
- );
26
- };
27
- var check_circle_icon_default = CheckCircleIcon;
28
-
29
- export {
30
- check_circle_icon_default
31
- };
32
- //# sourceMappingURL=chunk-IXQPSHNR.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/components/icons/check-circle-icon.tsx"],"sourcesContent":["import { FC } from 'react';\n\ninterface CheckCircleIconProps extends React.ComponentProps<'svg'> {}\n\nconst CheckCircleIcon: FC<CheckCircleIconProps> = (props) => {\n return (\n <svg\n xmlns='http://www.w3.org/2000/svg'\n fill='none'\n viewBox='0 0 24 24'\n strokeWidth={1.5}\n stroke='currentColor'\n className='size-6'\n {...props}\n >\n <path\n strokeLinecap='round'\n strokeLinejoin='round'\n d='M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z'\n />\n </svg>\n );\n};\n\nexport default CheckCircleIcon;\n"],"mappings":";;;AAeM;AAXN,IAAM,kBAA4C,CAAC,UAAU;AAC3D,SACE;AAAA,IAAC;AAAA;AAAA,MACC,OAAM;AAAA,MACN,MAAK;AAAA,MACL,SAAQ;AAAA,MACR,aAAa;AAAA,MACb,QAAO;AAAA,MACP,WAAU;AAAA,MACT,GAAG;AAAA,MAEJ;AAAA,QAAC;AAAA;AAAA,UACC,eAAc;AAAA,UACd,gBAAe;AAAA,UACf,GAAE;AAAA;AAAA,MACJ;AAAA;AAAA,EACF;AAEJ;AAEA,IAAO,4BAAQ;","names":[]}
@@ -1,2 +0,0 @@
1
- "use client"
2
- //# sourceMappingURL=chunk-MNBHQJKW.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,24 +0,0 @@
1
- "use client"
2
- import {
3
- clsx_default,
4
- createUseStyles
5
- } from "./chunk-5ZHARJ3G.js";
6
-
7
- // src/components/inbox/loader.tsx
8
- import { jsx } from "react/jsx-runtime";
9
- var useStyles = createUseStyles({
10
- loader: {
11
- textAlign: "center",
12
- padding: "20px 0"
13
- }
14
- });
15
- var Loader = () => {
16
- const styles = useStyles();
17
- return /* @__PURE__ */ jsx("div", { className: clsx_default(styles.loader), children: "Loading..." });
18
- };
19
- var loader_default = Loader;
20
-
21
- export {
22
- loader_default
23
- };
24
- //# sourceMappingURL=chunk-NDUFFQA7.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/components/inbox/loader.tsx"],"sourcesContent":["import clsx from 'clsx';\nimport { FC } from 'react';\nimport { createUseStyles } from 'react-jss';\n\nexport interface LoaderProps {}\n\nconst useStyles = createUseStyles({\n loader: {\n textAlign: 'center',\n padding: '20px 0',\n },\n});\n\nconst Loader: FC<LoaderProps> = () => {\n const styles = useStyles();\n return <div className={clsx(styles.loader)}>Loading...</div>;\n};\n\nexport default Loader;\n"],"mappings":";;;;;;;AAeS;AATT,IAAM,YAAY,gBAAgB;AAAA,EAChC,QAAQ;AAAA,IACN,WAAW;AAAA,IACX,SAAS;AAAA,EACX;AACF,CAAC;AAED,IAAM,SAA0B,MAAM;AACpC,QAAM,SAAS,UAAU;AACzB,SAAO,oBAAC,SAAI,WAAW,aAAK,OAAO,MAAM,GAAG,wBAAU;AACxD;AAEA,IAAO,iBAAQ;","names":[]}
@@ -1,84 +0,0 @@
1
- "use client"
2
- import {
3
- bell_icon_default
4
- } from "./chunk-ET4RPLX7.js";
5
- import {
6
- COMPONENT_PREFIX
7
- } from "./chunk-6FGP2HJW.js";
8
- import {
9
- clsx_default,
10
- createUseStyles
11
- } from "./chunk-5ZHARJ3G.js";
12
-
13
- // src/components/inbox/bell.tsx
14
- import { useMemo } from "react";
15
- import { jsx, jsxs } from "react/jsx-runtime";
16
- var useStyles = createUseStyles(
17
- {
18
- button: (props) => ({
19
- width: 40,
20
- height: 40,
21
- display: "flex",
22
- justifyContent: "center",
23
- alignItems: "center",
24
- borderRadius: "50%",
25
- backgroundColor: "#fff",
26
- border: "none",
27
- cursor: "pointer",
28
- transition: "all 0.2s ease-in-out",
29
- position: "relative",
30
- "&:hover": {
31
- backgroundColor: "#f5f5f5"
32
- },
33
- ...props.active && {
34
- backgroundColor: "#f1f1f1"
35
- }
36
- }),
37
- badge: {
38
- position: "absolute",
39
- top: 0,
40
- right: 0,
41
- padding: "2px 6px",
42
- height: 18,
43
- minWidth: 18,
44
- backgroundColor: "red",
45
- display: "flex",
46
- justifyContent: "center",
47
- alignItems: "center",
48
- borderRadius: 100,
49
- color: "#fff",
50
- fontSize: 10,
51
- visibility: "hidden",
52
- opacity: 0,
53
- transition: "all 0.2s ease-in-out",
54
- scale: 0.8,
55
- userSelect: "none"
56
- },
57
- badgeOpen: {
58
- visibility: "visible",
59
- opacity: 1,
60
- scale: 1
61
- }
62
- },
63
- { name: COMPONENT_PREFIX }
64
- );
65
- var Bell = ({ className, counts, active, ...props }) => {
66
- const styles = useStyles({ counts, active });
67
- const countsText = useMemo(() => {
68
- if (counts <= 99) return `${counts}`;
69
- return "99+";
70
- }, [counts]);
71
- const shouldShowBadge = useMemo(() => {
72
- return counts > 0;
73
- }, [counts]);
74
- return /* @__PURE__ */ jsxs("button", { ...props, className: `${styles.button} ${className}`, children: [
75
- /* @__PURE__ */ jsx(bell_icon_default, { width: 24, height: 24 }),
76
- /* @__PURE__ */ jsx("div", { className: clsx_default(styles.badge, shouldShowBadge && styles.badgeOpen), children: countsText })
77
- ] });
78
- };
79
- var bell_default = Bell;
80
-
81
- export {
82
- bell_default
83
- };
84
- //# sourceMappingURL=chunk-NQ3CC7OA.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/components/inbox/bell.tsx"],"sourcesContent":["import clsx from 'clsx';\nimport { useMemo } from 'react';\nimport { createUseStyles } from 'react-jss';\nimport { COMPONENT_PREFIX } from '../../utils';\nimport { BellIcon } from '../icons';\n\nexport interface BellProps extends React.ComponentProps<'button'> {\n counts: number;\n active?: boolean;\n}\n\nconst useStyles = createUseStyles<'button' | 'badge' | 'badgeOpen', BellProps>(\n {\n button: (props) => ({\n width: 40,\n height: 40,\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n borderRadius: '50%',\n backgroundColor: '#fff',\n border: 'none',\n cursor: 'pointer',\n transition: 'all 0.2s ease-in-out',\n position: 'relative',\n '&:hover': {\n backgroundColor: '#f5f5f5',\n },\n ...(props.active && {\n backgroundColor: '#f1f1f1',\n }),\n }),\n badge: {\n position: 'absolute',\n top: 0,\n right: 0,\n padding: '2px 6px',\n height: 18,\n minWidth: 18,\n backgroundColor: 'red',\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n borderRadius: 100,\n color: '#fff',\n fontSize: 10,\n visibility: 'hidden',\n opacity: 0,\n transition: 'all 0.2s ease-in-out',\n scale: 0.8,\n userSelect: 'none',\n },\n badgeOpen: {\n visibility: 'visible',\n opacity: 1,\n scale: 1,\n },\n },\n { name: COMPONENT_PREFIX },\n);\n\nconst Bell: React.FC<BellProps> = ({ className, counts, active, ...props }) => {\n const styles = useStyles({ counts, active });\n\n const countsText = useMemo(() => {\n if (counts <= 99) return `${counts}`;\n return '99+';\n }, [counts]);\n const shouldShowBadge = useMemo(() => {\n return counts > 0;\n }, [counts]);\n\n return (\n <button {...props} className={`${styles.button} ${className}`}>\n <BellIcon width={24} height={24} />\n <div className={clsx(styles.badge, shouldShowBadge && styles.badgeOpen)}>{countsText}</div>\n </button>\n );\n};\n\nexport default Bell;\n"],"mappings":";;;;;;;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SACE,qBAAC,YAAQ,GAAG,OAAO,WAAW,GAAG,OAAO,MAAM,IAAI,SAAS,IACzD;AAAA,wBAAC,qBAAS,OAAO,IAAI,QAAQ,IAAI;AAAA,IACjC,oBAAC,SAAI,WAAW,aAAK,OAAO,OAAO,mBAAmB,OAAO,SAAS,GAAI,sBAAW;AAAA,KACvF;AAEJ;AAEA,IAAO,eAAQ;","names":[]}
@@ -1,54 +0,0 @@
1
- "use client"
2
- import {
3
- archive_box_icon_default
4
- } from "./chunk-S6WUE45S.js";
5
- import {
6
- check_circle_icon_default
7
- } from "./chunk-IXQPSHNR.js";
8
- import {
9
- button_default
10
- } from "./chunk-HDKTD2IK.js";
11
- import {
12
- COMPONENT_PREFIX
13
- } from "./chunk-6FGP2HJW.js";
14
- import {
15
- clsx_default,
16
- createUseStyles
17
- } from "./chunk-5ZHARJ3G.js";
18
-
19
- // src/components/inbox/notification-item/actions.tsx
20
- import { jsx, jsxs } from "react/jsx-runtime";
21
- var useStyles = createUseStyles(
22
- {
23
- actions: {
24
- position: "absolute",
25
- top: 5,
26
- right: 5,
27
- display: "flex",
28
- gap: 5,
29
- padding: 0,
30
- background: "#fafafa",
31
- borderRadius: 5
32
- },
33
- button: {
34
- background: "transparent",
35
- "&:hover": {
36
- background: "#fafafa"
37
- }
38
- }
39
- },
40
- { name: COMPONENT_PREFIX }
41
- );
42
- var NotificationItemActions = ({ notification }) => {
43
- const styles = useStyles();
44
- return /* @__PURE__ */ jsxs("div", { className: clsx_default(styles.actions, `${COMPONENT_PREFIX}-actions`), children: [
45
- !notification.isRead && /* @__PURE__ */ jsx(button_default, { icon: true, onClick: notification.markAsRead, className: clsx_default(styles.button), children: /* @__PURE__ */ jsx(check_circle_icon_default, { width: 12, height: 12 }) }),
46
- /* @__PURE__ */ jsx(button_default, { icon: true, className: clsx_default(styles.button), children: /* @__PURE__ */ jsx(archive_box_icon_default, { width: 12, height: 12 }) })
47
- ] });
48
- };
49
- var actions_default = NotificationItemActions;
50
-
51
- export {
52
- actions_default
53
- };
54
- //# sourceMappingURL=chunk-QILM4R2Q.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/components/inbox/notification-item/actions.tsx"],"sourcesContent":["import clsx from 'clsx';\nimport { FC } from 'react';\nimport { createUseStyles } from 'react-jss';\nimport { Notification } from '../../../dto';\nimport { COMPONENT_PREFIX } from '../../../utils';\nimport { ArchiveBoxIcon, CheckCircleIcon } from '../../icons';\nimport Button from '../button';\n\ninterface NotificationItemActionsProps {\n notification: Notification;\n}\n\nconst useStyles = createUseStyles(\n {\n actions: {\n position: 'absolute',\n top: 5,\n right: 5,\n display: 'flex',\n gap: 5,\n padding: 0,\n background: '#fafafa',\n borderRadius: 5,\n },\n button: {\n background: 'transparent',\n '&:hover': {\n background: '#fafafa',\n },\n },\n },\n { name: COMPONENT_PREFIX },\n);\n\nconst NotificationItemActions: FC<NotificationItemActionsProps> = ({ notification }) => {\n const styles = useStyles();\n\n return (\n <div className={clsx(styles.actions, `${COMPONENT_PREFIX}-actions`)}>\n {!notification.isRead && (\n <Button icon onClick={notification.markAsRead} className={clsx(styles.button)}>\n <CheckCircleIcon width={12} height={12} />\n </Button>\n )}\n\n <Button icon className={clsx(styles.button)}>\n <ArchiveBoxIcon width={12} height={12} />\n </Button>\n </div>\n );\n};\n\nexport default NotificationItemActions;\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAsCI,SAGM,KAHN;AA1BJ,IAAM,YAAY;AAAA,EAChB;AAAA,IACE,SAAS;AAAA,MACP,UAAU;AAAA,MACV,KAAK;AAAA,MACL,OAAO;AAAA,MACP,SAAS;AAAA,MACT,KAAK;AAAA,MACL,SAAS;AAAA,MACT,YAAY;AAAA,MACZ,cAAc;AAAA,IAChB;AAAA,IACA,QAAQ;AAAA,MACN,YAAY;AAAA,MACZ,WAAW;AAAA,QACT,YAAY;AAAA,MACd;AAAA,IACF;AAAA,EACF;AAAA,EACA,EAAE,MAAM,iBAAiB;AAC3B;AAEA,IAAM,0BAA4D,CAAC,EAAE,aAAa,MAAM;AACtF,QAAM,SAAS,UAAU;AAEzB,SACE,qBAAC,SAAI,WAAW,aAAK,OAAO,SAAS,GAAG,gBAAgB,UAAU,GAC/D;AAAA,KAAC,aAAa,UACb,oBAAC,kBAAO,MAAI,MAAC,SAAS,aAAa,YAAY,WAAW,aAAK,OAAO,MAAM,GAC1E,8BAAC,6BAAgB,OAAO,IAAI,QAAQ,IAAI,GAC1C;AAAA,IAGF,oBAAC,kBAAO,MAAI,MAAC,WAAW,aAAK,OAAO,MAAM,GACxC,8BAAC,4BAAe,OAAO,IAAI,QAAQ,IAAI,GACzC;AAAA,KACF;AAEJ;AAEA,IAAO,kBAAQ;","names":[]}
@@ -1,2 +0,0 @@
1
- "use client"
2
- //# sourceMappingURL=chunk-RCHW4I55.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,30 +0,0 @@
1
- "use client"
2
- import {
3
- COMPONENT_PREFIX
4
- } from "./chunk-6FGP2HJW.js";
5
- import {
6
- clsx_default,
7
- createUseStyles
8
- } from "./chunk-5ZHARJ3G.js";
9
-
10
- // src/components/inbox/empty.tsx
11
- import { jsx } from "react/jsx-runtime";
12
- var useStyles = createUseStyles(
13
- {
14
- empty: {
15
- textAlign: "center",
16
- padding: "20px 0"
17
- }
18
- },
19
- { name: COMPONENT_PREFIX }
20
- );
21
- var Empty = () => {
22
- const styles = useStyles();
23
- return /* @__PURE__ */ jsx("div", { className: clsx_default(styles.empty), children: "No notifications" });
24
- };
25
- var empty_default = Empty;
26
-
27
- export {
28
- empty_default
29
- };
30
- //# sourceMappingURL=chunk-RLFVKZHT.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/components/inbox/empty.tsx"],"sourcesContent":["import clsx from 'clsx';\nimport { FC } from 'react';\nimport { createUseStyles } from 'react-jss';\nimport { COMPONENT_PREFIX } from '../../utils';\n\nexport interface EmptyProps {}\n\nconst useStyles = createUseStyles(\n {\n empty: {\n textAlign: 'center',\n padding: '20px 0',\n },\n },\n { name: COMPONENT_PREFIX },\n);\n\nconst Empty: FC<EmptyProps> = () => {\n const styles = useStyles();\n return <div className={clsx(styles.empty)}>No notifications</div>;\n};\n\nexport default Empty;\n"],"mappings":";;;;;;;;;;AAmBS;AAZT,IAAM,YAAY;AAAA,EAChB;AAAA,IACE,OAAO;AAAA,MACL,WAAW;AAAA,MACX,SAAS;AAAA,IACX;AAAA,EACF;AAAA,EACA,EAAE,MAAM,iBAAiB;AAC3B;AAEA,IAAM,QAAwB,MAAM;AAClC,QAAM,SAAS,UAAU;AACzB,SAAO,oBAAC,SAAI,WAAW,aAAK,OAAO,KAAK,GAAG,8BAAgB;AAC7D;AAEA,IAAO,gBAAQ;","names":[]}
@@ -1,32 +0,0 @@
1
- "use client"
2
-
3
- // src/components/icons/archive-box-icon.tsx
4
- import { jsx } from "react/jsx-runtime";
5
- var ArchiveBoxIcon = (props) => {
6
- return /* @__PURE__ */ jsx(
7
- "svg",
8
- {
9
- xmlns: "http://www.w3.org/2000/svg",
10
- fill: "none",
11
- viewBox: "0 0 24 24",
12
- strokeWidth: 1.5,
13
- stroke: "currentColor",
14
- className: "size-6",
15
- ...props,
16
- children: /* @__PURE__ */ jsx(
17
- "path",
18
- {
19
- strokeLinecap: "round",
20
- strokeLinejoin: "round",
21
- d: "m20.25 7.5-.625 10.632a2.25 2.25 0 0 1-2.247 2.118H6.622a2.25 2.25 0 0 1-2.247-2.118L3.75 7.5M10 11.25h4M3.375 7.5h17.25c.621 0 1.125-.504 1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125Z"
22
- }
23
- )
24
- }
25
- );
26
- };
27
- var archive_box_icon_default = ArchiveBoxIcon;
28
-
29
- export {
30
- archive_box_icon_default
31
- };
32
- //# sourceMappingURL=chunk-S6WUE45S.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/components/icons/archive-box-icon.tsx"],"sourcesContent":["import { FC } from 'react';\n\ninterface ArchiveBoxIconProps extends React.ComponentProps<'svg'> {}\n\nconst ArchiveBoxIcon: FC<ArchiveBoxIconProps> = (props) => {\n return (\n <svg\n xmlns='http://www.w3.org/2000/svg'\n fill='none'\n viewBox='0 0 24 24'\n strokeWidth={1.5}\n stroke='currentColor'\n className='size-6'\n {...props}\n >\n <path\n strokeLinecap='round'\n strokeLinejoin='round'\n d='m20.25 7.5-.625 10.632a2.25 2.25 0 0 1-2.247 2.118H6.622a2.25 2.25 0 0 1-2.247-2.118L3.75 7.5M10 11.25h4M3.375 7.5h17.25c.621 0 1.125-.504 1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125Z'\n />\n </svg>\n );\n};\n\nexport default ArchiveBoxIcon;\n"],"mappings":";;;AAeM;AAXN,IAAM,iBAA0C,CAAC,UAAU;AACzD,SACE;AAAA,IAAC;AAAA;AAAA,MACC,OAAM;AAAA,MACN,MAAK;AAAA,MACL,SAAQ;AAAA,MACR,aAAa;AAAA,MACb,QAAO;AAAA,MACP,WAAU;AAAA,MACT,GAAG;AAAA,MAEJ;AAAA,QAAC;AAAA;AAAA,UACC,eAAc;AAAA,UACd,gBAAe;AAAA,UACf,GAAE;AAAA;AAAA,MACJ;AAAA;AAAA,EACF;AAEJ;AAEA,IAAO,2BAAQ;","names":[]}