@wallarm-org/design-system 4.7.0 → 4.8.0-rc-fix-claude-code.1

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 (60) hide show
  1. package/README.md +4 -2
  2. package/dist/components/BulkBar/index.d.ts +5 -0
  3. package/dist/components/Drawer/classes.js +1 -1
  4. package/dist/components/NotificationCenter/NotificationCenter.d.ts +20 -0
  5. package/dist/components/NotificationCenter/NotificationCenter.js +65 -0
  6. package/dist/components/NotificationCenter/NotificationCenterBody.d.ts +18 -0
  7. package/dist/components/NotificationCenter/NotificationCenterBody.js +202 -0
  8. package/dist/components/NotificationCenter/NotificationCenterContent.d.ts +5 -0
  9. package/dist/components/NotificationCenter/NotificationCenterContent.js +42 -0
  10. package/dist/components/NotificationCenter/NotificationCenterHeader.d.ts +20 -0
  11. package/dist/components/NotificationCenter/NotificationCenterHeader.js +202 -0
  12. package/dist/components/NotificationCenter/NotificationCenterItem.d.ts +26 -0
  13. package/dist/components/NotificationCenter/NotificationCenterItem.js +211 -0
  14. package/dist/components/NotificationCenter/NotificationCenterItemTime.d.ts +9 -0
  15. package/dist/components/NotificationCenter/NotificationCenterItemTime.js +148 -0
  16. package/dist/components/NotificationCenter/NotificationCenterItemTitle.d.ts +14 -0
  17. package/dist/components/NotificationCenter/NotificationCenterItemTitle.js +115 -0
  18. package/dist/components/NotificationCenter/NotificationCenterTabs.d.ts +10 -0
  19. package/dist/components/NotificationCenter/NotificationCenterTabs.js +77 -0
  20. package/dist/components/NotificationCenter/NotificationCenterTrigger.d.ts +13 -0
  21. package/dist/components/NotificationCenter/NotificationCenterTrigger.js +138 -0
  22. package/dist/components/NotificationCenter/index.d.ts +9 -0
  23. package/dist/components/NotificationCenter/index.js +9 -0
  24. package/dist/components/Overlay/Overlay.js +1 -1
  25. package/dist/components/SearchInput/SearchInput.d.ts +7 -5
  26. package/dist/components/SearchInput/SearchInput.js +119 -101
  27. package/dist/components/Select/SelectSearchInput.d.ts +1 -1
  28. package/dist/components/Table/types.d.ts +1 -1
  29. package/dist/components/Tabs/Tabs.d.ts +1 -0
  30. package/dist/components/Tabs/Tabs.js +30 -28
  31. package/dist/components/Tabs/TabsList/index.d.ts +1 -1
  32. package/dist/components/Tabs/index.d.ts +2 -2
  33. package/dist/components/Tour/TourPositioner.d.ts +3 -0
  34. package/dist/components/Tour/TourPositioner.js +4 -4
  35. package/dist/guidelines/foundations/color.md +157 -0
  36. package/dist/guidelines/foundations/focus.md +122 -0
  37. package/dist/guidelines/foundations/layering.md +131 -0
  38. package/dist/guidelines/foundations/radius-elevation.md +111 -0
  39. package/dist/guidelines/foundations/spacing.md +117 -0
  40. package/dist/guidelines/foundations/typography.md +114 -0
  41. package/dist/guidelines/patterns/app-layout.md +1567 -0
  42. package/dist/guidelines/patterns/auth-page.md +668 -0
  43. package/dist/guidelines/patterns/confirmation-dialogs.md +605 -0
  44. package/dist/guidelines/patterns/create-edit-forms.md +768 -0
  45. package/dist/guidelines/patterns/detail-drawer.md +868 -0
  46. package/dist/guidelines/patterns/empty-states.md +461 -0
  47. package/dist/guidelines/patterns/entity-table.md +533 -0
  48. package/dist/guidelines/patterns/feedback-toasts.md +493 -0
  49. package/dist/guidelines/patterns/filtering.md +630 -0
  50. package/dist/guidelines/patterns/resource-list-page.md +558 -0
  51. package/dist/guidelines/patterns/settings-page.md +752 -0
  52. package/dist/guidelines/rules.md +25 -0
  53. package/dist/index.d.ts +2 -1
  54. package/dist/index.js +1 -0
  55. package/dist/metadata/components.json +12641 -9320
  56. package/dist/metadata/guidelines.json +1705 -0
  57. package/dist/theme/typography.css +5 -0
  58. package/dist/utils/formatDateTime.d.ts +6 -0
  59. package/dist/utils/formatDateTime.js +13 -1
  60. package/package.json +6 -1
package/README.md CHANGED
@@ -119,8 +119,10 @@ The command writes the component files, `src/icons/index.ts`, the gallery catego
119
119
 
120
120
  Choose **Wallarm Design System** in Claude Design to prototype with the generated component
121
121
  bundle, tokens, fonts and icons. See the [designer guide](https://wallarm.github.io/design-system/ai/claude-design).
122
- The export is built by the private [`@wallarm-org/claude-design`](../claude-design/README.md)
123
- package; its README lists the build, test and verify commands. The repository's
122
+ The export is built by [`@wallarm-org/claude-design`](../claude-design/README.md), which
123
+ `deploy-site.yml` publishes to npm at each stable release so anyone can install the system from one
124
+ prompt (`npx -y @wallarm-org/claude-design@latest export`); its README lists the build, test and
125
+ verify commands. The repository's
124
126
  `/claude-design-sync` skill previews and manually publishes release changes; the first sync and
125
127
  remote deletions require confirmation. The npm package remains React 19; the separate canvas
126
128
  bundle uses React 18.
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Building blocks of a bulk-action bar summary ("3 selected · Select all · Clear"). Not a bar to
3
+ * mount yourself: for Table rows use `TableActionBar` (from Table; pass `rowSelection` and
4
+ * `onRowSelectionChange`), for cards and list items use `SelectionBulkBar` (from Selection).
5
+ */
1
6
  export { BulkBarSummary, type BulkBarSummaryProps } from './BulkBarSummary.js';
2
7
  export { BulkBarSummaryClear, type BulkBarSummaryClearProps } from './BulkBarSummaryClear.js';
3
8
  export { BulkBarSummaryCount, type BulkBarSummaryCountProps } from './BulkBarSummaryCount.js';
@@ -7,7 +7,7 @@ const drawerContentVariants = cva(cn('relative', 'bg-bg-surface-2', 'border bord
7
7
  }
8
8
  }
9
9
  });
10
- const drawerPositionerVariants = cva(cn('flex w-full', 'origin-[right center]', 'z-[calc(var(--drawer-positioner-z-index)+(var(--layer-index)*var(--drawer-level-ratio)))]'), {
10
+ const drawerPositionerVariants = cva(cn('flex w-full', 'origin-[right center]', 'z-[calc(var(--drawer-positioner-z-index)+(var(--layer-index,0)*var(--drawer-level-ratio)))]'), {
11
11
  variants: {
12
12
  isResizing: {
13
13
  true: 'transition-transform'
@@ -0,0 +1,20 @@
1
+ import { type FC, type ReactNode } from 'react';
2
+ import type { TestableProps } from '../../utils/testId.js';
3
+ import { type PopoverProps } from '../Popover/index.js';
4
+ interface NotificationCenterContextValue {
5
+ /** Shared so the bell's Tooltip and the Popover anchor on one button. */
6
+ triggerId?: string;
7
+ /** The root `data-testid`. Body hands it back to its children, so the tabs' cascade does not prefix them. */
8
+ testId?: string;
9
+ }
10
+ export declare const useNotificationCenterContext: () => NotificationCenterContextValue;
11
+ export interface NotificationCenterProps extends TestableProps {
12
+ children: ReactNode;
13
+ /** Controlled open state. Omit for uncontrolled. */
14
+ open?: boolean;
15
+ onOpenChange?: (open: boolean) => void;
16
+ /** Default: right-aligned under the bell with a 4px gap. */
17
+ positioning?: PopoverProps['positioning'];
18
+ }
19
+ export declare const NotificationCenter: FC<NotificationCenterProps>;
20
+ export {};
@@ -0,0 +1,65 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { c } from "react/compiler-runtime";
3
+ import { createContext, useContext, useId } from "react";
4
+ import { Popover } from "../Popover/index.js";
5
+ const NotificationCenterContext = /*#__PURE__*/ createContext({});
6
+ const useNotificationCenterContext = ()=>useContext(NotificationCenterContext);
7
+ const POSITIONING_DEFAULT = {
8
+ placement: "bottom-end",
9
+ gutter: 4
10
+ };
11
+ const NotificationCenter = (t0)=>{
12
+ const $ = c(15);
13
+ const { children, open, onOpenChange, positioning: t1, "data-testid": testId } = t0;
14
+ const positioning = void 0 === t1 ? POSITIONING_DEFAULT : t1;
15
+ const triggerId = useId();
16
+ let t2;
17
+ if ($[0] !== testId || $[1] !== triggerId) {
18
+ t2 = {
19
+ triggerId,
20
+ testId
21
+ };
22
+ $[0] = testId;
23
+ $[1] = triggerId;
24
+ $[2] = t2;
25
+ } else t2 = $[2];
26
+ let t3;
27
+ if ($[3] !== triggerId) {
28
+ t3 = {
29
+ trigger: triggerId
30
+ };
31
+ $[3] = triggerId;
32
+ $[4] = t3;
33
+ } else t3 = $[4];
34
+ let t4;
35
+ if ($[5] !== children || $[6] !== onOpenChange || $[7] !== open || $[8] !== positioning || $[9] !== t3 || $[10] !== testId) {
36
+ t4 = /*#__PURE__*/ jsx(Popover, {
37
+ open: open,
38
+ onOpenChange: onOpenChange,
39
+ ids: t3,
40
+ positioning: positioning,
41
+ "data-testid": testId,
42
+ children: children
43
+ });
44
+ $[5] = children;
45
+ $[6] = onOpenChange;
46
+ $[7] = open;
47
+ $[8] = positioning;
48
+ $[9] = t3;
49
+ $[10] = testId;
50
+ $[11] = t4;
51
+ } else t4 = $[11];
52
+ let t5;
53
+ if ($[12] !== t2 || $[13] !== t4) {
54
+ t5 = /*#__PURE__*/ jsx(NotificationCenterContext.Provider, {
55
+ value: t2,
56
+ children: t4
57
+ });
58
+ $[12] = t2;
59
+ $[13] = t4;
60
+ $[14] = t5;
61
+ } else t5 = $[14];
62
+ return t5;
63
+ };
64
+ NotificationCenter.displayName = "NotificationCenter";
65
+ export { NotificationCenter, useNotificationCenterContext };
@@ -0,0 +1,18 @@
1
+ import type { FC, HTMLAttributes, ReactNode, Ref } from 'react';
2
+ import { type TestableProps } from '../../utils/testId.js';
3
+ import { type EmptyStateProps } from '../EmptyState/index.js';
4
+ import { type ScrollAreaProps } from '../ScrollArea/index.js';
5
+ export type NotificationCenterBodyProps = Omit<ScrollAreaProps, 'children'> & {
6
+ children: ReactNode;
7
+ };
8
+ /** The scrolling area under the header (or tabs). Holds a list, an empty state or a skeleton. */
9
+ export declare const NotificationCenterBody: FC<NotificationCenterBodyProps>;
10
+ export type NotificationCenterEmptyProps = Omit<EmptyStateProps, 'type'>;
11
+ /** Empty (and error) state for a body. Compose it from `EmptyState` parts. */
12
+ export declare const NotificationCenterEmpty: FC<NotificationCenterEmptyProps>;
13
+ export interface NotificationCenterSkeletonProps extends HTMLAttributes<HTMLDivElement>, TestableProps {
14
+ ref?: Ref<HTMLDivElement>;
15
+ /** Number of placeholder rows. */
16
+ rows?: number;
17
+ }
18
+ export declare const NotificationCenterSkeleton: FC<NotificationCenterSkeletonProps>;
@@ -0,0 +1,202 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { c } from "react/compiler-runtime";
3
+ import { cn } from "../../utils/cn.js";
4
+ import { TestIdProvider, useTestId } from "../../utils/testId.js";
5
+ import { EmptyState } from "../EmptyState/index.js";
6
+ import { ScrollArea, ScrollAreaContent, ScrollAreaScrollbar, ScrollAreaViewport } from "../ScrollArea/index.js";
7
+ import { Skeleton } from "../Skeleton/index.js";
8
+ import { useNotificationCenterContext } from "./NotificationCenter.js";
9
+ const NotificationCenterBody = (t0)=>{
10
+ const $ = c(16);
11
+ let children;
12
+ let className;
13
+ let props;
14
+ let testIdProp;
15
+ if ($[0] !== t0) {
16
+ ({ className, children, "data-testid": testIdProp, ...props } = t0);
17
+ $[0] = t0;
18
+ $[1] = children;
19
+ $[2] = className;
20
+ $[3] = props;
21
+ $[4] = testIdProp;
22
+ } else {
23
+ children = $[1];
24
+ className = $[2];
25
+ props = $[3];
26
+ testIdProp = $[4];
27
+ }
28
+ const { testId: rootTestId } = useNotificationCenterContext();
29
+ const testId = useTestId("body", testIdProp ?? (rootTestId && `${rootTestId}--body`));
30
+ let t1;
31
+ if ($[5] !== className) {
32
+ t1 = cn("flex min-h-0 flex-1 flex-col [&>[data-part=viewport]]:min-h-0 [&>[data-part=viewport]]:flex-1", className);
33
+ $[5] = className;
34
+ $[6] = t1;
35
+ } else t1 = $[6];
36
+ let t2;
37
+ if ($[7] !== children || $[8] !== rootTestId) {
38
+ t2 = /*#__PURE__*/ jsx(ScrollAreaViewport, {
39
+ children: /*#__PURE__*/ jsx(ScrollAreaContent, {
40
+ className: "h-auto min-w-0! px-12 pt-4 pb-16",
41
+ children: /*#__PURE__*/ jsx(TestIdProvider, {
42
+ value: rootTestId,
43
+ children: children
44
+ })
45
+ })
46
+ });
47
+ $[7] = children;
48
+ $[8] = rootTestId;
49
+ $[9] = t2;
50
+ } else t2 = $[9];
51
+ let t3;
52
+ if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
53
+ t3 = /*#__PURE__*/ jsx(ScrollAreaScrollbar, {});
54
+ $[10] = t3;
55
+ } else t3 = $[10];
56
+ let t4;
57
+ if ($[11] !== props || $[12] !== t1 || $[13] !== t2 || $[14] !== testId) {
58
+ t4 = /*#__PURE__*/ jsxs(ScrollArea, {
59
+ ...props,
60
+ "data-slot": "notification-center-body",
61
+ "data-testid": testId,
62
+ className: t1,
63
+ children: [
64
+ t2,
65
+ t3
66
+ ]
67
+ });
68
+ $[11] = props;
69
+ $[12] = t1;
70
+ $[13] = t2;
71
+ $[14] = testId;
72
+ $[15] = t4;
73
+ } else t4 = $[15];
74
+ return t4;
75
+ };
76
+ NotificationCenterBody.displayName = "NotificationCenterBody";
77
+ const NotificationCenterEmpty = (t0)=>{
78
+ const $ = c(10);
79
+ let className;
80
+ let props;
81
+ let testIdProp;
82
+ if ($[0] !== t0) {
83
+ ({ className, "data-testid": testIdProp, ...props } = t0);
84
+ $[0] = t0;
85
+ $[1] = className;
86
+ $[2] = props;
87
+ $[3] = testIdProp;
88
+ } else {
89
+ className = $[1];
90
+ props = $[2];
91
+ testIdProp = $[3];
92
+ }
93
+ const t1 = useTestId("empty", testIdProp);
94
+ let t2;
95
+ if ($[4] !== className) {
96
+ t2 = cn("pt-24 pb-40", className);
97
+ $[4] = className;
98
+ $[5] = t2;
99
+ } else t2 = $[5];
100
+ let t3;
101
+ if ($[6] !== props || $[7] !== t1 || $[8] !== t2) {
102
+ t3 = /*#__PURE__*/ jsx(EmptyState, {
103
+ ...props,
104
+ type: "collection-empty",
105
+ "data-testid": t1,
106
+ className: t2
107
+ });
108
+ $[6] = props;
109
+ $[7] = t1;
110
+ $[8] = t2;
111
+ $[9] = t3;
112
+ } else t3 = $[9];
113
+ return t3;
114
+ };
115
+ NotificationCenterEmpty.displayName = "NotificationCenterEmpty";
116
+ const NotificationCenterSkeleton = (t0)=>{
117
+ const $ = c(16);
118
+ let className;
119
+ let props;
120
+ let ref;
121
+ let t1;
122
+ let testIdProp;
123
+ if ($[0] !== t0) {
124
+ ({ ref, rows: t1, className, "data-testid": testIdProp, ...props } = t0);
125
+ $[0] = t0;
126
+ $[1] = className;
127
+ $[2] = props;
128
+ $[3] = ref;
129
+ $[4] = t1;
130
+ $[5] = testIdProp;
131
+ } else {
132
+ className = $[1];
133
+ props = $[2];
134
+ ref = $[3];
135
+ t1 = $[4];
136
+ testIdProp = $[5];
137
+ }
138
+ const rows = void 0 === t1 ? 4 : t1;
139
+ const t2 = useTestId("skeleton", testIdProp);
140
+ let t3;
141
+ if ($[6] !== className) {
142
+ t3 = cn("flex flex-col gap-4", className);
143
+ $[6] = className;
144
+ $[7] = t3;
145
+ } else t3 = $[7];
146
+ let t4;
147
+ if ($[8] !== rows) {
148
+ t4 = Array.from({
149
+ length: rows
150
+ }, _temp);
151
+ $[8] = rows;
152
+ $[9] = t4;
153
+ } else t4 = $[9];
154
+ let t5;
155
+ if ($[10] !== props || $[11] !== ref || $[12] !== t2 || $[13] !== t3 || $[14] !== t4) {
156
+ t5 = /*#__PURE__*/ jsx("div", {
157
+ "aria-busy": true,
158
+ ...props,
159
+ ref: ref,
160
+ "data-slot": "notification-center-skeleton",
161
+ "data-testid": t2,
162
+ className: t3,
163
+ children: t4
164
+ });
165
+ $[10] = props;
166
+ $[11] = ref;
167
+ $[12] = t2;
168
+ $[13] = t3;
169
+ $[14] = t4;
170
+ $[15] = t5;
171
+ } else t5 = $[15];
172
+ return t5;
173
+ };
174
+ NotificationCenterSkeleton.displayName = "NotificationCenterSkeleton";
175
+ function _temp(_, index) {
176
+ return /*#__PURE__*/ jsxs("div", {
177
+ className: "flex flex-col gap-2 p-6",
178
+ children: [
179
+ /*#__PURE__*/ jsxs("div", {
180
+ className: "flex items-center justify-between gap-8",
181
+ children: [
182
+ /*#__PURE__*/ jsx(Skeleton, {
183
+ width: "60%",
184
+ height: "14px",
185
+ rounded: 4
186
+ }),
187
+ /*#__PURE__*/ jsx(Skeleton, {
188
+ width: "32px",
189
+ height: "12px",
190
+ rounded: 4
191
+ })
192
+ ]
193
+ }),
194
+ /*#__PURE__*/ jsx(Skeleton, {
195
+ width: "90%",
196
+ height: "12px",
197
+ rounded: 4
198
+ })
199
+ ]
200
+ }, index);
201
+ }
202
+ export { NotificationCenterBody, NotificationCenterEmpty, NotificationCenterSkeleton };
@@ -0,0 +1,5 @@
1
+ import type { FC } from 'react';
2
+ import { type PopoverContentProps } from '../Popover/index.js';
3
+ export type NotificationCenterContentProps = Omit<PopoverContentProps, 'minWidth' | 'maxWidth' | 'minHeight' | 'maxHeight'>;
4
+ /** The 400px panel. Header and tabs stay put; `NotificationCenterBody` scrolls. */
5
+ export declare const NotificationCenterContent: FC<NotificationCenterContentProps>;
@@ -0,0 +1,42 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { c } from "react/compiler-runtime";
3
+ import { cn } from "../../utils/cn.js";
4
+ import { PopoverContent } from "../Popover/index.js";
5
+ const NotificationCenterContent = (t0)=>{
6
+ const $ = c(8);
7
+ let className;
8
+ let props;
9
+ if ($[0] !== t0) {
10
+ ({ className, ...props } = t0);
11
+ $[0] = t0;
12
+ $[1] = className;
13
+ $[2] = props;
14
+ } else {
15
+ className = $[1];
16
+ props = $[2];
17
+ }
18
+ let t1;
19
+ if ($[3] !== className) {
20
+ t1 = cn("p-0 overflow-hidden", className);
21
+ $[3] = className;
22
+ $[4] = t1;
23
+ } else t1 = $[4];
24
+ let t2;
25
+ if ($[5] !== props || $[6] !== t1) {
26
+ t2 = /*#__PURE__*/ jsx(PopoverContent, {
27
+ "aria-label": "Notifications",
28
+ "data-slot": "notification-center-content",
29
+ ...props,
30
+ minWidth: "400px",
31
+ maxWidth: "400px",
32
+ maxHeight: "640px",
33
+ className: t1
34
+ });
35
+ $[5] = props;
36
+ $[6] = t1;
37
+ $[7] = t2;
38
+ } else t2 = $[7];
39
+ return t2;
40
+ };
41
+ NotificationCenterContent.displayName = "NotificationCenterContent";
42
+ export { NotificationCenterContent };
@@ -0,0 +1,20 @@
1
+ import { type FC, type HTMLAttributes, type Ref } from 'react';
2
+ import { type TestableProps } from '../../utils/testId.js';
3
+ import { type ButtonProps } from '../Button/index.js';
4
+ export interface NotificationCenterHeaderProps extends HTMLAttributes<HTMLDivElement>, TestableProps {
5
+ ref?: Ref<HTMLDivElement>;
6
+ }
7
+ export declare const NotificationCenterHeader: FC<NotificationCenterHeaderProps>;
8
+ export interface NotificationCenterTitleProps extends HTMLAttributes<HTMLHeadingElement>, TestableProps {
9
+ ref?: Ref<HTMLHeadingElement>;
10
+ }
11
+ /** An `<h2>` that labels the popover. Defaults to "Notifications". */
12
+ export declare const NotificationCenterTitle: FC<NotificationCenterTitleProps>;
13
+ export interface NotificationCenterHeaderActionsProps extends HTMLAttributes<HTMLDivElement>, TestableProps {
14
+ ref?: Ref<HTMLDivElement>;
15
+ }
16
+ /** Lays out header actions with a vertical separator between each pair. */
17
+ export declare const NotificationCenterHeaderActions: FC<NotificationCenterHeaderActionsProps>;
18
+ export type NotificationCenterHeaderActionProps = Omit<ButtonProps, 'variant' | 'color' | 'size'>;
19
+ /** A ghost header button: "Mark all as read", or the settings link via `asChild`. */
20
+ export declare const NotificationCenterHeaderAction: FC<NotificationCenterHeaderActionProps>;
@@ -0,0 +1,202 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { c } from "react/compiler-runtime";
3
+ import { Children, Fragment } from "react";
4
+ import { Popover } from "@ark-ui/react/popover";
5
+ import { cn } from "../../utils/cn.js";
6
+ import { useTestId } from "../../utils/testId.js";
7
+ import { Button } from "../Button/index.js";
8
+ import { Separator } from "../Separator/index.js";
9
+ const NotificationCenterHeader = (t0)=>{
10
+ const $ = c(12);
11
+ let className;
12
+ let props;
13
+ let ref;
14
+ let testIdProp;
15
+ if ($[0] !== t0) {
16
+ ({ ref, className, "data-testid": testIdProp, ...props } = t0);
17
+ $[0] = t0;
18
+ $[1] = className;
19
+ $[2] = props;
20
+ $[3] = ref;
21
+ $[4] = testIdProp;
22
+ } else {
23
+ className = $[1];
24
+ props = $[2];
25
+ ref = $[3];
26
+ testIdProp = $[4];
27
+ }
28
+ const t1 = useTestId("header", testIdProp);
29
+ let t2;
30
+ if ($[5] !== className) {
31
+ t2 = cn("flex items-center justify-between gap-8 px-12 pt-12", className);
32
+ $[5] = className;
33
+ $[6] = t2;
34
+ } else t2 = $[6];
35
+ let t3;
36
+ if ($[7] !== props || $[8] !== ref || $[9] !== t1 || $[10] !== t2) {
37
+ t3 = /*#__PURE__*/ jsx("div", {
38
+ ...props,
39
+ ref: ref,
40
+ "data-slot": "notification-center-header",
41
+ "data-testid": t1,
42
+ className: t2
43
+ });
44
+ $[7] = props;
45
+ $[8] = ref;
46
+ $[9] = t1;
47
+ $[10] = t2;
48
+ $[11] = t3;
49
+ } else t3 = $[11];
50
+ return t3;
51
+ };
52
+ NotificationCenterHeader.displayName = "NotificationCenterHeader";
53
+ const NotificationCenterTitle = (t0)=>{
54
+ const $ = c(14);
55
+ let className;
56
+ let props;
57
+ let ref;
58
+ let t1;
59
+ let testIdProp;
60
+ if ($[0] !== t0) {
61
+ ({ ref, className, children: t1, "data-testid": testIdProp, ...props } = t0);
62
+ $[0] = t0;
63
+ $[1] = className;
64
+ $[2] = props;
65
+ $[3] = ref;
66
+ $[4] = t1;
67
+ $[5] = testIdProp;
68
+ } else {
69
+ className = $[1];
70
+ props = $[2];
71
+ ref = $[3];
72
+ t1 = $[4];
73
+ testIdProp = $[5];
74
+ }
75
+ const children = void 0 === t1 ? "Notifications" : t1;
76
+ const t2 = useTestId("title", testIdProp);
77
+ let t3;
78
+ if ($[6] !== className) {
79
+ t3 = cn("font-sans-display text-md font-medium text-text-primary", className);
80
+ $[6] = className;
81
+ $[7] = t3;
82
+ } else t3 = $[7];
83
+ let t4;
84
+ if ($[8] !== children || $[9] !== props || $[10] !== ref || $[11] !== t2 || $[12] !== t3) {
85
+ t4 = /*#__PURE__*/ jsx(Popover.Title, {
86
+ asChild: true,
87
+ children: /*#__PURE__*/ jsx("h2", {
88
+ ...props,
89
+ ref: ref,
90
+ "data-slot": "notification-center-title",
91
+ "data-testid": t2,
92
+ className: t3,
93
+ children: children
94
+ })
95
+ });
96
+ $[8] = children;
97
+ $[9] = props;
98
+ $[10] = ref;
99
+ $[11] = t2;
100
+ $[12] = t3;
101
+ $[13] = t4;
102
+ } else t4 = $[13];
103
+ return t4;
104
+ };
105
+ NotificationCenterTitle.displayName = "NotificationCenterTitle";
106
+ const NotificationCenterHeaderActions = (t0)=>{
107
+ const $ = c(16);
108
+ let children;
109
+ let className;
110
+ let props;
111
+ let ref;
112
+ let testIdProp;
113
+ if ($[0] !== t0) {
114
+ ({ ref, className, children, "data-testid": testIdProp, ...props } = t0);
115
+ $[0] = t0;
116
+ $[1] = children;
117
+ $[2] = className;
118
+ $[3] = props;
119
+ $[4] = ref;
120
+ $[5] = testIdProp;
121
+ } else {
122
+ children = $[1];
123
+ className = $[2];
124
+ props = $[3];
125
+ ref = $[4];
126
+ testIdProp = $[5];
127
+ }
128
+ const t1 = useTestId("header-actions", testIdProp);
129
+ let t2;
130
+ if ($[6] !== className) {
131
+ t2 = cn("flex items-center gap-4", className);
132
+ $[6] = className;
133
+ $[7] = t2;
134
+ } else t2 = $[7];
135
+ let t3;
136
+ if ($[8] !== children) {
137
+ t3 = Children.toArray(children).map(_temp);
138
+ $[8] = children;
139
+ $[9] = t3;
140
+ } else t3 = $[9];
141
+ let t4;
142
+ if ($[10] !== props || $[11] !== ref || $[12] !== t1 || $[13] !== t2 || $[14] !== t3) {
143
+ t4 = /*#__PURE__*/ jsx("div", {
144
+ ...props,
145
+ ref: ref,
146
+ "data-slot": "notification-center-header-actions",
147
+ "data-testid": t1,
148
+ className: t2,
149
+ children: t3
150
+ });
151
+ $[10] = props;
152
+ $[11] = ref;
153
+ $[12] = t1;
154
+ $[13] = t2;
155
+ $[14] = t3;
156
+ $[15] = t4;
157
+ } else t4 = $[15];
158
+ return t4;
159
+ };
160
+ NotificationCenterHeaderActions.displayName = "NotificationCenterHeaderActions";
161
+ const NotificationCenterHeaderAction = (t0)=>{
162
+ const $ = c(6);
163
+ let props;
164
+ let testIdProp;
165
+ if ($[0] !== t0) {
166
+ ({ "data-testid": testIdProp, ...props } = t0);
167
+ $[0] = t0;
168
+ $[1] = props;
169
+ $[2] = testIdProp;
170
+ } else {
171
+ props = $[1];
172
+ testIdProp = $[2];
173
+ }
174
+ const t1 = useTestId("header-action", testIdProp);
175
+ let t2;
176
+ if ($[3] !== props || $[4] !== t1) {
177
+ t2 = /*#__PURE__*/ jsx(Button, {
178
+ "data-slot": "notification-center-header-action",
179
+ ...props,
180
+ "data-testid": t1,
181
+ variant: "ghost",
182
+ color: "neutral",
183
+ size: "small"
184
+ });
185
+ $[3] = props;
186
+ $[4] = t1;
187
+ $[5] = t2;
188
+ } else t2 = $[5];
189
+ return t2;
190
+ };
191
+ NotificationCenterHeaderAction.displayName = "NotificationCenterHeaderAction";
192
+ function _temp(child, index) {
193
+ return /*#__PURE__*/ jsxs(Fragment, {
194
+ children: [
195
+ index > 0 && /*#__PURE__*/ jsx(Separator, {
196
+ orientation: "vertical"
197
+ }),
198
+ child
199
+ ]
200
+ }, index);
201
+ }
202
+ export { NotificationCenterHeader, NotificationCenterHeaderAction, NotificationCenterHeaderActions, NotificationCenterTitle };
@@ -0,0 +1,26 @@
1
+ import { type FC, type HTMLAttributes, type Ref } from 'react';
2
+ import { type TestableProps } from '../../utils/testId.js';
3
+ export interface NotificationCenterListProps extends HTMLAttributes<HTMLUListElement>, TestableProps {
4
+ ref?: Ref<HTMLUListElement>;
5
+ }
6
+ export declare const NotificationCenterList: FC<NotificationCenterListProps>;
7
+ export declare const useNotificationCenterItemUnread: () => boolean;
8
+ export interface NotificationCenterItemProps extends HTMLAttributes<HTMLLIElement>, TestableProps {
9
+ ref?: Ref<HTMLLIElement>;
10
+ /** Shows the unread dot and prefixes the title's accessible name with "Unread". */
11
+ unread?: boolean;
12
+ }
13
+ /**
14
+ * One notification. `NotificationCenterItemTitle` is the card's click target;
15
+ * actions sit above it as separate buttons.
16
+ */
17
+ export declare const NotificationCenterItem: FC<NotificationCenterItemProps>;
18
+ export interface NotificationCenterItemDescriptionProps extends HTMLAttributes<HTMLParagraphElement>, TestableProps {
19
+ ref?: Ref<HTMLParagraphElement>;
20
+ }
21
+ export declare const NotificationCenterItemDescription: FC<NotificationCenterItemDescriptionProps>;
22
+ export interface NotificationCenterItemActionsProps extends HTMLAttributes<HTMLDivElement>, TestableProps {
23
+ ref?: Ref<HTMLDivElement>;
24
+ }
25
+ /** Holds the item's buttons. They sit above the title's card-wide click area. */
26
+ export declare const NotificationCenterItemActions: FC<NotificationCenterItemActionsProps>;