@wallarm-org/design-system 4.8.0-rc-fix-claude-code.1 → 4.8.0-rc-feat-parser.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 (176) hide show
  1. package/README.md +2 -4
  2. package/dist/components/BulkBar/index.d.ts +0 -5
  3. package/dist/components/Drawer/classes.js +1 -1
  4. package/dist/components/DropdownMenu/DropdownMenu.d.ts +2 -0
  5. package/dist/components/DropdownMenu/DropdownMenu.js +84 -71
  6. package/dist/components/DropdownMenu/DropdownMenuItemDescription.js +1 -1
  7. package/dist/components/FilterInput/hooks/useFilterInputAutocomplete/useFilterInputAutocomplete.js +1 -1
  8. package/dist/components/Overlay/Overlay.js +1 -1
  9. package/dist/components/Rules/PointSelector/KeyboardShortcutsDialog.d.ts +14 -0
  10. package/dist/components/Rules/PointSelector/KeyboardShortcutsDialog.js +209 -0
  11. package/dist/components/Rules/PointSelector/MatchStep.d.ts +15 -0
  12. package/dist/components/Rules/PointSelector/MatchStep.js +186 -0
  13. package/dist/components/Rules/PointSelector/MenuFooterHints.d.ts +16 -0
  14. package/dist/components/Rules/PointSelector/MenuFooterHints.js +177 -0
  15. package/dist/components/Rules/PointSelector/PointPreview.d.ts +10 -0
  16. package/dist/components/Rules/PointSelector/PointPreview.js +88 -0
  17. package/dist/components/Rules/PointSelector/PointSelector.d.ts +17 -0
  18. package/dist/components/Rules/PointSelector/PointSelector.js +937 -0
  19. package/dist/components/Rules/PointSelector/PointSelectorEmptyState.d.ts +12 -0
  20. package/dist/components/Rules/PointSelector/PointSelectorEmptyState.js +173 -0
  21. package/dist/components/Rules/PointSelector/PointSelectorError.d.ts +31 -0
  22. package/dist/components/Rules/PointSelector/PointSelectorError.js +275 -0
  23. package/dist/components/Rules/PointSelector/PointSelectorInput.d.ts +20 -0
  24. package/dist/components/Rules/PointSelector/PointSelectorInput.js +130 -0
  25. package/dist/components/Rules/PointSelector/PointSelectorMenu.d.ts +31 -0
  26. package/dist/components/Rules/PointSelector/PointSelectorMenu.js +317 -0
  27. package/dist/components/Rules/PointSelector/PointSelectorSkeleton.d.ts +8 -0
  28. package/dist/components/Rules/PointSelector/PointSelectorSkeleton.js +73 -0
  29. package/dist/components/Rules/PointSelector/SampleRequest.d.ts +14 -0
  30. package/dist/components/Rules/PointSelector/SampleRequest.js +116 -0
  31. package/dist/components/Rules/PointSelector/StepMenu.d.ts +40 -0
  32. package/dist/components/Rules/PointSelector/StepMenu.js +210 -0
  33. package/dist/components/Rules/PointSelector/VersionWarning.d.ts +26 -0
  34. package/dist/components/Rules/PointSelector/VersionWarning.js +231 -0
  35. package/dist/components/Rules/PointSelector/WhereBar.d.ts +48 -0
  36. package/dist/components/Rules/PointSelector/WhereBar.js +263 -0
  37. package/dist/components/Rules/PointSelector/classes.d.ts +28 -0
  38. package/dist/components/Rules/PointSelector/classes.js +22 -0
  39. package/dist/components/Rules/PointSelector/index.d.ts +20 -0
  40. package/dist/components/Rules/PointSelector/index.js +18 -0
  41. package/dist/components/Rules/PointSelector/liftLayer.d.ts +8 -0
  42. package/dist/components/Rules/PointSelector/liftLayer.js +4 -0
  43. package/dist/components/Rules/PointSelector/sampleValue.d.ts +6 -0
  44. package/dist/components/Rules/PointSelector/sampleValue.js +51 -0
  45. package/dist/components/Rules/PointSelector/sdkBridge.d.ts +508 -0
  46. package/dist/components/Rules/PointSelector/sdkBridge.js +339 -0
  47. package/dist/components/Rules/PointSelector/types.d.ts +304 -0
  48. package/dist/components/Rules/PointSelector/types.js +0 -0
  49. package/dist/components/Rules/PointSelector/usePointSelector.d.ts +161 -0
  50. package/dist/components/Rules/PointSelector/usePointSelector.js +1088 -0
  51. package/dist/components/Rules/RuleBuilder/ActionEditor/ActionEditor.d.ts +28 -0
  52. package/dist/components/Rules/RuleBuilder/ActionEditor/ActionEditor.js +208 -0
  53. package/dist/components/Rules/RuleBuilder/ActionEditor/ActionFields.d.ts +23 -0
  54. package/dist/components/Rules/RuleBuilder/ActionEditor/ActionFields.js +950 -0
  55. package/dist/components/Rules/RuleBuilder/ActionEditor/ActionTargetPicker.d.ts +21 -0
  56. package/dist/components/Rules/RuleBuilder/ActionEditor/ActionTargetPicker.js +110 -0
  57. package/dist/components/Rules/RuleBuilder/ActionEditor/ActionTypeSelect.d.ts +20 -0
  58. package/dist/components/Rules/RuleBuilder/ActionEditor/ActionTypeSelect.js +31 -0
  59. package/dist/components/Rules/RuleBuilder/ActionEditor/AttackTypeField.d.ts +23 -0
  60. package/dist/components/Rules/RuleBuilder/ActionEditor/AttackTypeField.js +131 -0
  61. package/dist/components/Rules/RuleBuilder/ActionEditor/classes.d.ts +17 -0
  62. package/dist/components/Rules/RuleBuilder/ActionEditor/classes.js +14 -0
  63. package/dist/components/Rules/RuleBuilder/ActionEditor/index.d.ts +6 -0
  64. package/dist/components/Rules/RuleBuilder/ActionEditor/index.js +6 -0
  65. package/dist/components/Rules/RuleBuilder/ConditionTree/AddConditionMenu.d.ts +24 -0
  66. package/dist/components/Rules/RuleBuilder/ConditionTree/AddConditionMenu.js +245 -0
  67. package/dist/components/Rules/RuleBuilder/ConditionTree/AttackCondition.d.ts +15 -0
  68. package/dist/components/Rules/RuleBuilder/ConditionTree/AttackCondition.js +691 -0
  69. package/dist/components/Rules/RuleBuilder/ConditionTree/ConditionCard.d.ts +19 -0
  70. package/dist/components/Rules/RuleBuilder/ConditionTree/ConditionCard.js +72 -0
  71. package/dist/components/Rules/RuleBuilder/ConditionTree/ConditionTree.d.ts +27 -0
  72. package/dist/components/Rules/RuleBuilder/ConditionTree/ConditionTree.js +407 -0
  73. package/dist/components/Rules/RuleBuilder/ConditionTree/FieldCondition.d.ts +14 -0
  74. package/dist/components/Rules/RuleBuilder/ConditionTree/FieldCondition.js +269 -0
  75. package/dist/components/Rules/RuleBuilder/ConditionTree/GroupCondition.d.ts +25 -0
  76. package/dist/components/Rules/RuleBuilder/ConditionTree/GroupCondition.js +99 -0
  77. package/dist/components/Rules/RuleBuilder/ConditionTree/SampleCondition.d.ts +14 -0
  78. package/dist/components/Rules/RuleBuilder/ConditionTree/SampleCondition.js +118 -0
  79. package/dist/components/Rules/RuleBuilder/ConditionTree/SignalCondition.d.ts +14 -0
  80. package/dist/components/Rules/RuleBuilder/ConditionTree/SignalCondition.js +446 -0
  81. package/dist/components/Rules/RuleBuilder/ConditionTree/TagCondition.d.ts +14 -0
  82. package/dist/components/Rules/RuleBuilder/ConditionTree/TagCondition.js +266 -0
  83. package/dist/components/Rules/RuleBuilder/ConditionTree/classes.d.ts +35 -0
  84. package/dist/components/Rules/RuleBuilder/ConditionTree/classes.js +57 -0
  85. package/dist/components/Rules/RuleBuilder/ConditionTree/index.d.ts +15 -0
  86. package/dist/components/Rules/RuleBuilder/ConditionTree/index.js +10 -0
  87. package/dist/components/Rules/RuleBuilder/RuleBuilder.d.ts +67 -0
  88. package/dist/components/Rules/RuleBuilder/RuleBuilder.js +366 -0
  89. package/dist/components/Rules/RuleBuilder/Summary/ActionSummary.d.ts +32 -0
  90. package/dist/components/Rules/RuleBuilder/Summary/ActionSummary.js +420 -0
  91. package/dist/components/Rules/RuleBuilder/Summary/ConditionSummary.d.ts +27 -0
  92. package/dist/components/Rules/RuleBuilder/Summary/ConditionSummary.js +446 -0
  93. package/dist/components/Rules/RuleBuilder/Summary/index.d.ts +7 -0
  94. package/dist/components/Rules/RuleBuilder/Summary/index.js +2 -0
  95. package/dist/components/Rules/RuleBuilder/classes.d.ts +19 -0
  96. package/dist/components/Rules/RuleBuilder/classes.js +18 -0
  97. package/dist/components/Rules/RuleBuilder/index.d.ts +55 -0
  98. package/dist/components/Rules/RuleBuilder/index.js +11 -0
  99. package/dist/components/Rules/RuleBuilder/models/actionModel.d.ts +31 -0
  100. package/dist/components/Rules/RuleBuilder/models/actionModel.js +276 -0
  101. package/dist/components/Rules/RuleBuilder/models/conditionModel.d.ts +95 -0
  102. package/dist/components/Rules/RuleBuilder/models/conditionModel.js +418 -0
  103. package/dist/components/Rules/RuleBuilder/models/index.d.ts +3 -0
  104. package/dist/components/Rules/RuleBuilder/models/index.js +3 -0
  105. package/dist/components/Rules/RuleBuilder/models/validation.d.ts +176 -0
  106. package/dist/components/Rules/RuleBuilder/models/validation.js +242 -0
  107. package/dist/components/Rules/RuleBuilder/shared/ChoiceSelect.d.ts +27 -0
  108. package/dist/components/Rules/RuleBuilder/shared/ChoiceSelect.js +92 -0
  109. package/dist/components/Rules/RuleBuilder/shared/index.d.ts +1 -0
  110. package/dist/components/Rules/RuleBuilder/shared/index.js +1 -0
  111. package/dist/components/Rules/RuleBuilder/types.d.ts +384 -0
  112. package/dist/components/Rules/RuleBuilder/types.js +0 -0
  113. package/dist/components/Rules/RuleBuilder/utils/constants.d.ts +65 -0
  114. package/dist/components/Rules/RuleBuilder/utils/constants.js +356 -0
  115. package/dist/components/Rules/RuleBuilder/utils/extractBindings.d.ts +48 -0
  116. package/dist/components/Rules/RuleBuilder/utils/extractBindings.js +42 -0
  117. package/dist/components/Rules/RuleBuilder/utils/helpers.d.ts +92 -0
  118. package/dist/components/Rules/RuleBuilder/utils/helpers.js +54 -0
  119. package/dist/components/Rules/RuleBuilder/utils/index.d.ts +2 -0
  120. package/dist/components/Rules/RuleBuilder/utils/index.js +2 -0
  121. package/dist/components/SearchInput/SearchInput.d.ts +5 -7
  122. package/dist/components/SearchInput/SearchInput.js +101 -119
  123. package/dist/components/Select/SelectSearchInput.d.ts +1 -1
  124. package/dist/components/Table/types.d.ts +1 -1
  125. package/dist/components/Tabs/Tabs.d.ts +0 -1
  126. package/dist/components/Tabs/Tabs.js +28 -30
  127. package/dist/components/Tabs/TabsList/index.d.ts +1 -1
  128. package/dist/components/Tabs/index.d.ts +2 -2
  129. package/dist/components/Tour/TourPositioner.d.ts +0 -3
  130. package/dist/components/Tour/TourPositioner.js +4 -4
  131. package/dist/index.d.ts +3 -2
  132. package/dist/index.js +2 -1
  133. package/dist/metadata/components.json +9077 -12300
  134. package/dist/theme/typography.css +0 -5
  135. package/dist/utils/formatDateTime.d.ts +0 -6
  136. package/dist/utils/formatDateTime.js +1 -13
  137. package/package.json +4 -6
  138. package/dist/components/NotificationCenter/NotificationCenter.d.ts +0 -20
  139. package/dist/components/NotificationCenter/NotificationCenter.js +0 -65
  140. package/dist/components/NotificationCenter/NotificationCenterBody.d.ts +0 -18
  141. package/dist/components/NotificationCenter/NotificationCenterBody.js +0 -202
  142. package/dist/components/NotificationCenter/NotificationCenterContent.d.ts +0 -5
  143. package/dist/components/NotificationCenter/NotificationCenterContent.js +0 -42
  144. package/dist/components/NotificationCenter/NotificationCenterHeader.d.ts +0 -20
  145. package/dist/components/NotificationCenter/NotificationCenterHeader.js +0 -202
  146. package/dist/components/NotificationCenter/NotificationCenterItem.d.ts +0 -26
  147. package/dist/components/NotificationCenter/NotificationCenterItem.js +0 -211
  148. package/dist/components/NotificationCenter/NotificationCenterItemTime.d.ts +0 -9
  149. package/dist/components/NotificationCenter/NotificationCenterItemTime.js +0 -148
  150. package/dist/components/NotificationCenter/NotificationCenterItemTitle.d.ts +0 -14
  151. package/dist/components/NotificationCenter/NotificationCenterItemTitle.js +0 -115
  152. package/dist/components/NotificationCenter/NotificationCenterTabs.d.ts +0 -10
  153. package/dist/components/NotificationCenter/NotificationCenterTabs.js +0 -77
  154. package/dist/components/NotificationCenter/NotificationCenterTrigger.d.ts +0 -13
  155. package/dist/components/NotificationCenter/NotificationCenterTrigger.js +0 -138
  156. package/dist/components/NotificationCenter/index.d.ts +0 -9
  157. package/dist/components/NotificationCenter/index.js +0 -9
  158. package/dist/guidelines/foundations/color.md +0 -157
  159. package/dist/guidelines/foundations/focus.md +0 -122
  160. package/dist/guidelines/foundations/layering.md +0 -131
  161. package/dist/guidelines/foundations/radius-elevation.md +0 -111
  162. package/dist/guidelines/foundations/spacing.md +0 -117
  163. package/dist/guidelines/foundations/typography.md +0 -114
  164. package/dist/guidelines/patterns/app-layout.md +0 -1567
  165. package/dist/guidelines/patterns/auth-page.md +0 -668
  166. package/dist/guidelines/patterns/confirmation-dialogs.md +0 -605
  167. package/dist/guidelines/patterns/create-edit-forms.md +0 -768
  168. package/dist/guidelines/patterns/detail-drawer.md +0 -868
  169. package/dist/guidelines/patterns/empty-states.md +0 -461
  170. package/dist/guidelines/patterns/entity-table.md +0 -533
  171. package/dist/guidelines/patterns/feedback-toasts.md +0 -493
  172. package/dist/guidelines/patterns/filtering.md +0 -630
  173. package/dist/guidelines/patterns/resource-list-page.md +0 -558
  174. package/dist/guidelines/patterns/settings-page.md +0 -752
  175. package/dist/guidelines/rules.md +0 -25
  176. package/dist/metadata/guidelines.json +0 -1705
@@ -32,11 +32,6 @@
32
32
  --text-sm: 14px;
33
33
  --text-sm--line-height: 20px;
34
34
 
35
- /* Text size="md" and CardContent's step. Same metrics as sm: both render inside
36
- Card's text-sm today, so the alias keeps them unchanged where they are used. */
37
- --text-md: 14px;
38
- --text-md--line-height: 20px;
39
-
40
35
  --text-base: 16px;
41
36
  --text-base--line-height: 24px;
42
37
 
@@ -29,12 +29,6 @@ export interface DateTimeFormatOptions {
29
29
  * Future dates are treated as "Just now" (clock skew tolerance).
30
30
  */
31
31
  export declare const formatRelativeTime: (date: Date, now?: Date, options?: DateTimeFormatOptions) => string;
32
- /**
33
- * Compact relative time for space-constrained lists (the notification inbox):
34
- * "now", "3m", "2h", "5d", "1w", then the short date ("11 Feb" / "11 Feb, 2025").
35
- * No "ago" suffix. Future dates read "now" (clock skew tolerance).
36
- */
37
- export declare const formatCompactRelativeTime: (date: Date, now?: Date, options?: DateTimeFormatOptions) => string;
38
32
  /**
39
33
  * Format a date as absolute time for tooltips.
40
34
  *
@@ -25,18 +25,6 @@ const formatRelativeTime = (date, now = new Date(), options = {})=>{
25
25
  if (differenceInYears(now, date) < 1) return format(date, dayMonth(options.order));
26
26
  return format(date, dayMonthYear(options.order));
27
27
  };
28
- const formatCompactRelativeTime = (date, now = new Date(), options = {})=>{
29
- if (!isValid(date)) return '—';
30
- const minutes = differenceInMinutes(now, date);
31
- if (minutes < 1) return 'now';
32
- if (minutes < 60) return `${minutes}m`;
33
- const hours = differenceInHours(now, date);
34
- if (hours < 24) return `${hours}h`;
35
- const days = differenceInDays(now, date);
36
- if (days < 7) return `${days}d`;
37
- if (days < 28) return `${differenceInWeeks(now, date)}w`;
38
- return formatAbsoluteDate(date, now, options);
39
- };
40
28
  const formatAbsoluteTime = (date, options = {})=>{
41
29
  if (!isValid(date)) return '—';
42
30
  const { showSeconds = true } = options;
@@ -61,4 +49,4 @@ const formatTimezone = (date)=>{
61
49
  const minutes = Math.abs(offset) % 60;
62
50
  return 0 === minutes ? `GMT${sign}${hours}` : `GMT${sign}${hours}:${String(minutes).padStart(2, '0')}`;
63
51
  };
64
- export { formatAbsoluteDate, formatAbsoluteTime, formatCompactRelativeTime, formatRelativeTime, formatTimeOnly, formatTimezone };
52
+ export { formatAbsoluteDate, formatAbsoluteTime, formatRelativeTime, formatTimeOnly, formatTimezone };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wallarm-org/design-system",
3
- "version": "4.8.0-rc-fix-claude-code.1",
3
+ "version": "4.8.0-rc-feat-parser.1",
4
4
  "description": "Core design system library with React components and Storybook documentation",
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -40,11 +40,6 @@
40
40
  "require": "./dist/metadata/components.json",
41
41
  "default": "./dist/metadata/components.json"
42
42
  },
43
- "./guidelines": {
44
- "import": "./dist/metadata/guidelines.json",
45
- "require": "./dist/metadata/guidelines.json",
46
- "default": "./dist/metadata/guidelines.json"
47
- },
48
43
  "./utils/*": {
49
44
  "types": "./dist/utils/*.d.ts",
50
45
  "import": "./dist/utils/*.js",
@@ -95,6 +90,7 @@
95
90
  "code-connect:publish": "node --env-file-if-exists=../../.env.local node_modules/@figma/code-connect/bin/figma connect publish --exit-on-unreadable-files"
96
91
  },
97
92
  "devDependencies": {
93
+ "@axe-core/playwright": "4.14.0",
98
94
  "@babel/core": "7.29.7",
99
95
  "@babel/preset-typescript": "7.29.7",
100
96
  "@figma/code-connect": "2.0.2",
@@ -124,8 +120,10 @@
124
120
  "@wallarm-org/publish-scripts": "workspace:*",
125
121
  "@wallarm-org/rsbuild-config": "workspace:*",
126
122
  "@wallarm-org/rstest-config": "workspace:*",
123
+ "@wallarm-org/rules-lib": "workspace:*",
127
124
  "@wallarm-org/tailwind-config": "workspace:*",
128
125
  "@wallarm-org/typescript-config": "workspace:*",
126
+ "axe-playwright": "2.2.2",
129
127
  "babel-plugin-react-compiler": "1.0.0",
130
128
  "glob": "13.0.6",
131
129
  "jsdom": "catalog:",
@@ -1,20 +0,0 @@
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 {};
@@ -1,65 +0,0 @@
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 };
@@ -1,18 +0,0 @@
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>;
@@ -1,202 +0,0 @@
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 };
@@ -1,5 +0,0 @@
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>;
@@ -1,42 +0,0 @@
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 };
@@ -1,20 +0,0 @@
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>;
@@ -1,202 +0,0 @@
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 };