@wallarm-org/design-system 4.8.0-rc-feat-parser.1 → 4.8.0-rc-fix-claude-code.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -2
- package/dist/components/BulkBar/index.d.ts +5 -0
- package/dist/components/Drawer/classes.js +1 -1
- package/dist/components/DropdownMenu/DropdownMenu.d.ts +0 -2
- package/dist/components/DropdownMenu/DropdownMenu.js +71 -84
- package/dist/components/DropdownMenu/DropdownMenuItemDescription.js +1 -1
- package/dist/components/FilterInput/hooks/useFilterInputAutocomplete/useFilterInputAutocomplete.js +1 -1
- package/dist/components/NotificationCenter/NotificationCenter.d.ts +20 -0
- package/dist/components/NotificationCenter/NotificationCenter.js +65 -0
- package/dist/components/NotificationCenter/NotificationCenterBody.d.ts +18 -0
- package/dist/components/NotificationCenter/NotificationCenterBody.js +202 -0
- package/dist/components/NotificationCenter/NotificationCenterContent.d.ts +5 -0
- package/dist/components/NotificationCenter/NotificationCenterContent.js +42 -0
- package/dist/components/NotificationCenter/NotificationCenterHeader.d.ts +20 -0
- package/dist/components/NotificationCenter/NotificationCenterHeader.js +202 -0
- package/dist/components/NotificationCenter/NotificationCenterItem.d.ts +26 -0
- package/dist/components/NotificationCenter/NotificationCenterItem.js +211 -0
- package/dist/components/NotificationCenter/NotificationCenterItemTime.d.ts +9 -0
- package/dist/components/NotificationCenter/NotificationCenterItemTime.js +148 -0
- package/dist/components/NotificationCenter/NotificationCenterItemTitle.d.ts +14 -0
- package/dist/components/NotificationCenter/NotificationCenterItemTitle.js +115 -0
- package/dist/components/NotificationCenter/NotificationCenterTabs.d.ts +10 -0
- package/dist/components/NotificationCenter/NotificationCenterTabs.js +77 -0
- package/dist/components/NotificationCenter/NotificationCenterTrigger.d.ts +13 -0
- package/dist/components/NotificationCenter/NotificationCenterTrigger.js +138 -0
- package/dist/components/NotificationCenter/index.d.ts +9 -0
- package/dist/components/NotificationCenter/index.js +9 -0
- package/dist/components/Overlay/Overlay.js +1 -1
- package/dist/components/SearchInput/SearchInput.d.ts +7 -5
- package/dist/components/SearchInput/SearchInput.js +119 -101
- package/dist/components/Select/SelectSearchInput.d.ts +1 -1
- package/dist/components/Table/types.d.ts +1 -1
- package/dist/components/Tabs/Tabs.d.ts +1 -0
- package/dist/components/Tabs/Tabs.js +30 -28
- package/dist/components/Tabs/TabsList/index.d.ts +1 -1
- package/dist/components/Tabs/index.d.ts +2 -2
- package/dist/components/Tour/TourPositioner.d.ts +3 -0
- package/dist/components/Tour/TourPositioner.js +4 -4
- package/dist/guidelines/foundations/color.md +157 -0
- package/dist/guidelines/foundations/focus.md +122 -0
- package/dist/guidelines/foundations/layering.md +131 -0
- package/dist/guidelines/foundations/radius-elevation.md +111 -0
- package/dist/guidelines/foundations/spacing.md +117 -0
- package/dist/guidelines/foundations/typography.md +114 -0
- package/dist/guidelines/patterns/app-layout.md +1567 -0
- package/dist/guidelines/patterns/auth-page.md +668 -0
- package/dist/guidelines/patterns/confirmation-dialogs.md +605 -0
- package/dist/guidelines/patterns/create-edit-forms.md +768 -0
- package/dist/guidelines/patterns/detail-drawer.md +868 -0
- package/dist/guidelines/patterns/empty-states.md +461 -0
- package/dist/guidelines/patterns/entity-table.md +533 -0
- package/dist/guidelines/patterns/feedback-toasts.md +493 -0
- package/dist/guidelines/patterns/filtering.md +630 -0
- package/dist/guidelines/patterns/resource-list-page.md +558 -0
- package/dist/guidelines/patterns/settings-page.md +752 -0
- package/dist/guidelines/rules.md +25 -0
- package/dist/index.d.ts +2 -3
- package/dist/index.js +1 -2
- package/dist/metadata/components.json +12431 -9208
- package/dist/metadata/guidelines.json +1705 -0
- package/dist/theme/typography.css +5 -0
- package/dist/utils/formatDateTime.d.ts +6 -0
- package/dist/utils/formatDateTime.js +13 -1
- package/package.json +6 -4
- package/dist/components/Rules/PointSelector/KeyboardShortcutsDialog.d.ts +0 -14
- package/dist/components/Rules/PointSelector/KeyboardShortcutsDialog.js +0 -209
- package/dist/components/Rules/PointSelector/MatchStep.d.ts +0 -15
- package/dist/components/Rules/PointSelector/MatchStep.js +0 -186
- package/dist/components/Rules/PointSelector/MenuFooterHints.d.ts +0 -16
- package/dist/components/Rules/PointSelector/MenuFooterHints.js +0 -177
- package/dist/components/Rules/PointSelector/PointPreview.d.ts +0 -10
- package/dist/components/Rules/PointSelector/PointPreview.js +0 -88
- package/dist/components/Rules/PointSelector/PointSelector.d.ts +0 -17
- package/dist/components/Rules/PointSelector/PointSelector.js +0 -937
- package/dist/components/Rules/PointSelector/PointSelectorEmptyState.d.ts +0 -12
- package/dist/components/Rules/PointSelector/PointSelectorEmptyState.js +0 -173
- package/dist/components/Rules/PointSelector/PointSelectorError.d.ts +0 -31
- package/dist/components/Rules/PointSelector/PointSelectorError.js +0 -275
- package/dist/components/Rules/PointSelector/PointSelectorInput.d.ts +0 -20
- package/dist/components/Rules/PointSelector/PointSelectorInput.js +0 -130
- package/dist/components/Rules/PointSelector/PointSelectorMenu.d.ts +0 -31
- package/dist/components/Rules/PointSelector/PointSelectorMenu.js +0 -317
- package/dist/components/Rules/PointSelector/PointSelectorSkeleton.d.ts +0 -8
- package/dist/components/Rules/PointSelector/PointSelectorSkeleton.js +0 -73
- package/dist/components/Rules/PointSelector/SampleRequest.d.ts +0 -14
- package/dist/components/Rules/PointSelector/SampleRequest.js +0 -116
- package/dist/components/Rules/PointSelector/StepMenu.d.ts +0 -40
- package/dist/components/Rules/PointSelector/StepMenu.js +0 -210
- package/dist/components/Rules/PointSelector/VersionWarning.d.ts +0 -26
- package/dist/components/Rules/PointSelector/VersionWarning.js +0 -231
- package/dist/components/Rules/PointSelector/WhereBar.d.ts +0 -48
- package/dist/components/Rules/PointSelector/WhereBar.js +0 -263
- package/dist/components/Rules/PointSelector/classes.d.ts +0 -28
- package/dist/components/Rules/PointSelector/classes.js +0 -22
- package/dist/components/Rules/PointSelector/index.d.ts +0 -20
- package/dist/components/Rules/PointSelector/index.js +0 -18
- package/dist/components/Rules/PointSelector/liftLayer.d.ts +0 -8
- package/dist/components/Rules/PointSelector/liftLayer.js +0 -4
- package/dist/components/Rules/PointSelector/sampleValue.d.ts +0 -6
- package/dist/components/Rules/PointSelector/sampleValue.js +0 -51
- package/dist/components/Rules/PointSelector/sdkBridge.d.ts +0 -508
- package/dist/components/Rules/PointSelector/sdkBridge.js +0 -339
- package/dist/components/Rules/PointSelector/types.d.ts +0 -304
- package/dist/components/Rules/PointSelector/types.js +0 -0
- package/dist/components/Rules/PointSelector/usePointSelector.d.ts +0 -161
- package/dist/components/Rules/PointSelector/usePointSelector.js +0 -1088
- package/dist/components/Rules/RuleBuilder/ActionEditor/ActionEditor.d.ts +0 -28
- package/dist/components/Rules/RuleBuilder/ActionEditor/ActionEditor.js +0 -208
- package/dist/components/Rules/RuleBuilder/ActionEditor/ActionFields.d.ts +0 -23
- package/dist/components/Rules/RuleBuilder/ActionEditor/ActionFields.js +0 -950
- package/dist/components/Rules/RuleBuilder/ActionEditor/ActionTargetPicker.d.ts +0 -21
- package/dist/components/Rules/RuleBuilder/ActionEditor/ActionTargetPicker.js +0 -110
- package/dist/components/Rules/RuleBuilder/ActionEditor/ActionTypeSelect.d.ts +0 -20
- package/dist/components/Rules/RuleBuilder/ActionEditor/ActionTypeSelect.js +0 -31
- package/dist/components/Rules/RuleBuilder/ActionEditor/AttackTypeField.d.ts +0 -23
- package/dist/components/Rules/RuleBuilder/ActionEditor/AttackTypeField.js +0 -131
- package/dist/components/Rules/RuleBuilder/ActionEditor/classes.d.ts +0 -17
- package/dist/components/Rules/RuleBuilder/ActionEditor/classes.js +0 -14
- package/dist/components/Rules/RuleBuilder/ActionEditor/index.d.ts +0 -6
- package/dist/components/Rules/RuleBuilder/ActionEditor/index.js +0 -6
- package/dist/components/Rules/RuleBuilder/ConditionTree/AddConditionMenu.d.ts +0 -24
- package/dist/components/Rules/RuleBuilder/ConditionTree/AddConditionMenu.js +0 -245
- package/dist/components/Rules/RuleBuilder/ConditionTree/AttackCondition.d.ts +0 -15
- package/dist/components/Rules/RuleBuilder/ConditionTree/AttackCondition.js +0 -691
- package/dist/components/Rules/RuleBuilder/ConditionTree/ConditionCard.d.ts +0 -19
- package/dist/components/Rules/RuleBuilder/ConditionTree/ConditionCard.js +0 -72
- package/dist/components/Rules/RuleBuilder/ConditionTree/ConditionTree.d.ts +0 -27
- package/dist/components/Rules/RuleBuilder/ConditionTree/ConditionTree.js +0 -407
- package/dist/components/Rules/RuleBuilder/ConditionTree/FieldCondition.d.ts +0 -14
- package/dist/components/Rules/RuleBuilder/ConditionTree/FieldCondition.js +0 -269
- package/dist/components/Rules/RuleBuilder/ConditionTree/GroupCondition.d.ts +0 -25
- package/dist/components/Rules/RuleBuilder/ConditionTree/GroupCondition.js +0 -99
- package/dist/components/Rules/RuleBuilder/ConditionTree/SampleCondition.d.ts +0 -14
- package/dist/components/Rules/RuleBuilder/ConditionTree/SampleCondition.js +0 -118
- package/dist/components/Rules/RuleBuilder/ConditionTree/SignalCondition.d.ts +0 -14
- package/dist/components/Rules/RuleBuilder/ConditionTree/SignalCondition.js +0 -446
- package/dist/components/Rules/RuleBuilder/ConditionTree/TagCondition.d.ts +0 -14
- package/dist/components/Rules/RuleBuilder/ConditionTree/TagCondition.js +0 -266
- package/dist/components/Rules/RuleBuilder/ConditionTree/classes.d.ts +0 -35
- package/dist/components/Rules/RuleBuilder/ConditionTree/classes.js +0 -57
- package/dist/components/Rules/RuleBuilder/ConditionTree/index.d.ts +0 -15
- package/dist/components/Rules/RuleBuilder/ConditionTree/index.js +0 -10
- package/dist/components/Rules/RuleBuilder/RuleBuilder.d.ts +0 -67
- package/dist/components/Rules/RuleBuilder/RuleBuilder.js +0 -366
- package/dist/components/Rules/RuleBuilder/Summary/ActionSummary.d.ts +0 -32
- package/dist/components/Rules/RuleBuilder/Summary/ActionSummary.js +0 -420
- package/dist/components/Rules/RuleBuilder/Summary/ConditionSummary.d.ts +0 -27
- package/dist/components/Rules/RuleBuilder/Summary/ConditionSummary.js +0 -446
- package/dist/components/Rules/RuleBuilder/Summary/index.d.ts +0 -7
- package/dist/components/Rules/RuleBuilder/Summary/index.js +0 -2
- package/dist/components/Rules/RuleBuilder/classes.d.ts +0 -19
- package/dist/components/Rules/RuleBuilder/classes.js +0 -18
- package/dist/components/Rules/RuleBuilder/index.d.ts +0 -55
- package/dist/components/Rules/RuleBuilder/index.js +0 -11
- package/dist/components/Rules/RuleBuilder/models/actionModel.d.ts +0 -31
- package/dist/components/Rules/RuleBuilder/models/actionModel.js +0 -276
- package/dist/components/Rules/RuleBuilder/models/conditionModel.d.ts +0 -95
- package/dist/components/Rules/RuleBuilder/models/conditionModel.js +0 -418
- package/dist/components/Rules/RuleBuilder/models/index.d.ts +0 -3
- package/dist/components/Rules/RuleBuilder/models/index.js +0 -3
- package/dist/components/Rules/RuleBuilder/models/validation.d.ts +0 -176
- package/dist/components/Rules/RuleBuilder/models/validation.js +0 -242
- package/dist/components/Rules/RuleBuilder/shared/ChoiceSelect.d.ts +0 -27
- package/dist/components/Rules/RuleBuilder/shared/ChoiceSelect.js +0 -92
- package/dist/components/Rules/RuleBuilder/shared/index.d.ts +0 -1
- package/dist/components/Rules/RuleBuilder/shared/index.js +0 -1
- package/dist/components/Rules/RuleBuilder/types.d.ts +0 -384
- package/dist/components/Rules/RuleBuilder/types.js +0 -0
- package/dist/components/Rules/RuleBuilder/utils/constants.d.ts +0 -65
- package/dist/components/Rules/RuleBuilder/utils/constants.js +0 -356
- package/dist/components/Rules/RuleBuilder/utils/extractBindings.d.ts +0 -48
- package/dist/components/Rules/RuleBuilder/utils/extractBindings.js +0 -42
- package/dist/components/Rules/RuleBuilder/utils/helpers.d.ts +0 -92
- package/dist/components/Rules/RuleBuilder/utils/helpers.js +0 -54
- package/dist/components/Rules/RuleBuilder/utils/index.d.ts +0 -2
- package/dist/components/Rules/RuleBuilder/utils/index.js +0 -2
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
|
|
123
|
-
|
|
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'
|
|
@@ -20,8 +20,6 @@ interface DropdownMenuProps extends TestableProps {
|
|
|
20
20
|
onHighlightChange?: (details: Menu.HighlightChangeDetails) => void;
|
|
21
21
|
/** Whether selecting an item closes the menu (default true) */
|
|
22
22
|
closeOnSelect?: boolean;
|
|
23
|
-
/** Whether to close the menu when clicking/interacting outside (default true) */
|
|
24
|
-
closeOnInteractOutside?: boolean;
|
|
25
23
|
/**
|
|
26
24
|
* Called when another layer asks this menu to dismiss — e.g. a layer below it in the stack is
|
|
27
25
|
* removed. Call `event.preventDefault()` to keep the menu open.
|
|
@@ -16,10 +16,9 @@ const SUB_POSITIONING = {
|
|
|
16
16
|
}
|
|
17
17
|
};
|
|
18
18
|
const DropdownMenu = (t0)=>{
|
|
19
|
-
const $ = c(
|
|
19
|
+
const $ = c(39);
|
|
20
20
|
let anchorPoint;
|
|
21
21
|
let children;
|
|
22
|
-
let closeOnInteractOutside;
|
|
23
22
|
let closeOnSelect;
|
|
24
23
|
let defaultOpen;
|
|
25
24
|
let highlightedValue;
|
|
@@ -31,35 +30,33 @@ const DropdownMenu = (t0)=>{
|
|
|
31
30
|
let props;
|
|
32
31
|
let testIdProp;
|
|
33
32
|
if ($[0] !== t0) {
|
|
34
|
-
({ children, open, defaultOpen, onOpenChange, anchorPoint, positioning, highlightedValue, onHighlightChange, closeOnSelect,
|
|
33
|
+
({ children, open, defaultOpen, onOpenChange, anchorPoint, positioning, highlightedValue, onHighlightChange, closeOnSelect, ids, "data-testid": testIdProp, ...props } = t0);
|
|
35
34
|
$[0] = t0;
|
|
36
35
|
$[1] = anchorPoint;
|
|
37
36
|
$[2] = children;
|
|
38
|
-
$[3] =
|
|
39
|
-
$[4] =
|
|
40
|
-
$[5] =
|
|
41
|
-
$[6] =
|
|
42
|
-
$[7] =
|
|
43
|
-
$[8] =
|
|
44
|
-
$[9] =
|
|
45
|
-
$[10] =
|
|
46
|
-
$[11] =
|
|
47
|
-
$[12] =
|
|
48
|
-
$[13] = testIdProp;
|
|
37
|
+
$[3] = closeOnSelect;
|
|
38
|
+
$[4] = defaultOpen;
|
|
39
|
+
$[5] = highlightedValue;
|
|
40
|
+
$[6] = ids;
|
|
41
|
+
$[7] = onHighlightChange;
|
|
42
|
+
$[8] = onOpenChange;
|
|
43
|
+
$[9] = open;
|
|
44
|
+
$[10] = positioning;
|
|
45
|
+
$[11] = props;
|
|
46
|
+
$[12] = testIdProp;
|
|
49
47
|
} else {
|
|
50
48
|
anchorPoint = $[1];
|
|
51
49
|
children = $[2];
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
testIdProp = $[13];
|
|
50
|
+
closeOnSelect = $[3];
|
|
51
|
+
defaultOpen = $[4];
|
|
52
|
+
highlightedValue = $[5];
|
|
53
|
+
ids = $[6];
|
|
54
|
+
onHighlightChange = $[7];
|
|
55
|
+
onOpenChange = $[8];
|
|
56
|
+
open = $[9];
|
|
57
|
+
positioning = $[10];
|
|
58
|
+
props = $[11];
|
|
59
|
+
testIdProp = $[12];
|
|
63
60
|
}
|
|
64
61
|
const inheritedTestId = useTestId();
|
|
65
62
|
const testId = testIdProp ?? inheritedTestId;
|
|
@@ -67,73 +64,64 @@ const DropdownMenu = (t0)=>{
|
|
|
67
64
|
const isNested = null !== parent;
|
|
68
65
|
const defaultPositioning = isNested ? SUB_POSITIONING : ROOT_POSITIONING;
|
|
69
66
|
let t1;
|
|
70
|
-
if ($[
|
|
67
|
+
if ($[13] !== onOpenChange) {
|
|
71
68
|
t1 = (details)=>{
|
|
72
69
|
onOpenChange?.(details.open);
|
|
73
70
|
};
|
|
74
|
-
$[
|
|
75
|
-
$[
|
|
76
|
-
} else t1 = $[
|
|
71
|
+
$[13] = onOpenChange;
|
|
72
|
+
$[14] = t1;
|
|
73
|
+
} else t1 = $[14];
|
|
77
74
|
const handleOpenChange = t1;
|
|
78
75
|
let t2;
|
|
79
|
-
if ($[
|
|
76
|
+
if ($[15] === Symbol.for("react.memo_cache_sentinel")) {
|
|
80
77
|
t2 = {
|
|
81
78
|
isNested: true
|
|
82
79
|
};
|
|
83
|
-
$[
|
|
84
|
-
} else t2 = $[
|
|
80
|
+
$[15] = t2;
|
|
81
|
+
} else t2 = $[15];
|
|
85
82
|
const ctx = t2;
|
|
86
83
|
const t3 = positioning ?? defaultPositioning;
|
|
87
84
|
let t4;
|
|
88
|
-
if ($[
|
|
85
|
+
if ($[16] !== anchorPoint) {
|
|
89
86
|
t4 = null != anchorPoint && {
|
|
90
87
|
anchorPoint
|
|
91
88
|
};
|
|
92
|
-
$[
|
|
93
|
-
$[
|
|
94
|
-
} else t4 = $[
|
|
89
|
+
$[16] = anchorPoint;
|
|
90
|
+
$[17] = t4;
|
|
91
|
+
} else t4 = $[17];
|
|
95
92
|
let t5;
|
|
96
|
-
if ($[
|
|
93
|
+
if ($[18] !== highlightedValue) {
|
|
97
94
|
t5 = null != highlightedValue && {
|
|
98
95
|
highlightedValue
|
|
99
96
|
};
|
|
100
|
-
$[
|
|
101
|
-
$[
|
|
102
|
-
} else t5 = $[
|
|
97
|
+
$[18] = highlightedValue;
|
|
98
|
+
$[19] = t5;
|
|
99
|
+
} else t5 = $[19];
|
|
103
100
|
let t6;
|
|
104
|
-
if ($[
|
|
101
|
+
if ($[20] !== closeOnSelect) {
|
|
105
102
|
t6 = null != closeOnSelect && {
|
|
106
103
|
closeOnSelect
|
|
107
104
|
};
|
|
108
|
-
$[
|
|
109
|
-
$[
|
|
110
|
-
} else t6 = $[
|
|
105
|
+
$[20] = closeOnSelect;
|
|
106
|
+
$[21] = t6;
|
|
107
|
+
} else t6 = $[21];
|
|
111
108
|
let t7;
|
|
112
|
-
if ($[
|
|
113
|
-
t7 = null !=
|
|
114
|
-
closeOnInteractOutside
|
|
115
|
-
};
|
|
116
|
-
$[23] = closeOnInteractOutside;
|
|
117
|
-
$[24] = t7;
|
|
118
|
-
} else t7 = $[24];
|
|
119
|
-
let t8;
|
|
120
|
-
if ($[25] !== onHighlightChange) {
|
|
121
|
-
t8 = null != onHighlightChange && {
|
|
109
|
+
if ($[22] !== onHighlightChange) {
|
|
110
|
+
t7 = null != onHighlightChange && {
|
|
122
111
|
onHighlightChange
|
|
123
112
|
};
|
|
124
|
-
$[
|
|
125
|
-
$[
|
|
126
|
-
} else
|
|
127
|
-
let
|
|
128
|
-
if ($[
|
|
129
|
-
|
|
113
|
+
$[22] = onHighlightChange;
|
|
114
|
+
$[23] = t7;
|
|
115
|
+
} else t7 = $[23];
|
|
116
|
+
let t8;
|
|
117
|
+
if ($[24] !== children || $[25] !== defaultOpen || $[26] !== handleOpenChange || $[27] !== ids || $[28] !== open || $[29] !== props || $[30] !== t3 || $[31] !== t4 || $[32] !== t5 || $[33] !== t6 || $[34] !== t7) {
|
|
118
|
+
t8 = /*#__PURE__*/ jsx(Menu.Root, {
|
|
130
119
|
...props,
|
|
131
120
|
positioning: t3,
|
|
132
121
|
...t4,
|
|
133
122
|
...t5,
|
|
134
123
|
...t6,
|
|
135
124
|
...t7,
|
|
136
|
-
...t8,
|
|
137
125
|
open: open,
|
|
138
126
|
defaultOpen: defaultOpen,
|
|
139
127
|
onOpenChange: handleOpenChange,
|
|
@@ -142,35 +130,34 @@ const DropdownMenu = (t0)=>{
|
|
|
142
130
|
unmountOnExit: true,
|
|
143
131
|
children: children
|
|
144
132
|
});
|
|
145
|
-
$[
|
|
146
|
-
$[
|
|
147
|
-
$[
|
|
148
|
-
$[
|
|
149
|
-
$[
|
|
150
|
-
$[
|
|
151
|
-
$[
|
|
152
|
-
$[
|
|
153
|
-
$[
|
|
154
|
-
$[
|
|
155
|
-
$[
|
|
156
|
-
$[
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
t10 = /*#__PURE__*/ jsx(DropdownMenuContext.Provider, {
|
|
133
|
+
$[24] = children;
|
|
134
|
+
$[25] = defaultOpen;
|
|
135
|
+
$[26] = handleOpenChange;
|
|
136
|
+
$[27] = ids;
|
|
137
|
+
$[28] = open;
|
|
138
|
+
$[29] = props;
|
|
139
|
+
$[30] = t3;
|
|
140
|
+
$[31] = t4;
|
|
141
|
+
$[32] = t5;
|
|
142
|
+
$[33] = t6;
|
|
143
|
+
$[34] = t7;
|
|
144
|
+
$[35] = t8;
|
|
145
|
+
} else t8 = $[35];
|
|
146
|
+
const root = t8;
|
|
147
|
+
let t9;
|
|
148
|
+
if ($[36] !== root || $[37] !== testId) {
|
|
149
|
+
t9 = /*#__PURE__*/ jsx(DropdownMenuContext.Provider, {
|
|
163
150
|
value: ctx,
|
|
164
151
|
children: /*#__PURE__*/ jsx(TestIdProvider, {
|
|
165
152
|
value: testId,
|
|
166
153
|
children: root
|
|
167
154
|
})
|
|
168
155
|
});
|
|
169
|
-
$[
|
|
170
|
-
$[
|
|
171
|
-
$[
|
|
172
|
-
} else
|
|
173
|
-
return
|
|
156
|
+
$[36] = root;
|
|
157
|
+
$[37] = testId;
|
|
158
|
+
$[38] = t9;
|
|
159
|
+
} else t9 = $[38];
|
|
160
|
+
return t9;
|
|
174
161
|
};
|
|
175
162
|
DropdownMenu.displayName = "DropdownMenu";
|
|
176
163
|
export { DropdownMenu };
|
|
@@ -9,7 +9,7 @@ const DropdownMenuItemDescription = (t0)=>{
|
|
|
9
9
|
let t1;
|
|
10
10
|
if ($[0] !== children || $[1] !== testId) {
|
|
11
11
|
t1 = /*#__PURE__*/ jsx(Text, {
|
|
12
|
-
size: "
|
|
12
|
+
size: "sm",
|
|
13
13
|
color: "secondary",
|
|
14
14
|
"data-slot": "dropdown-menu-item-description",
|
|
15
15
|
"data-testid": testId,
|
package/dist/components/FilterInput/hooks/useFilterInputAutocomplete/useFilterInputAutocomplete.js
CHANGED
|
@@ -19,7 +19,7 @@ const useFilterInputAutocomplete = ({ fields, conditions, chips, upsertCondition
|
|
|
19
19
|
const state = useAutocompleteState({
|
|
20
20
|
conditions
|
|
21
21
|
});
|
|
22
|
-
const { inputText, setInputText, menuState, setMenuState, selectedField, setSelectedField, selectedOperator, setSelectedOperator, isFocused, setIsFocused, buildingMultiValue, setBuildingMultiValue, buildingSide, setBuildingSide, buildingBase, setBuildingBase, insertIndex
|
|
22
|
+
const { inputText, setInputText, menuState, setMenuState, selectedField, setSelectedField, selectedOperator, setSelectedOperator, isFocused, setIsFocused, buildingMultiValue, setBuildingMultiValue, buildingSide, setBuildingSide, buildingBase, setBuildingBase, insertIndex, setInsertIndex, insertAfterConnector, setInsertAfterConnector, effectiveInsertIndex, effectiveInsertIndexRef, conditionsRef, conditionsLengthRef, blurCommitRef, segmentAttributeInputRef, segmentOperatorInputRef, segmentValueInputRef, commitBuildingOnBlurRef, commitBuildingForceRef } = state;
|
|
23
23
|
const { menuPositioning, setMenuAnchor, resetMenuAnchor } = useMenuPositioning({
|
|
24
24
|
containerRef,
|
|
25
25
|
buildingChipRef,
|
|
@@ -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>;
|