@wallarm-org/design-system 4.8.0-rc-feat-parser.1 → 4.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { c } from "react/compiler-runtime";
|
|
3
|
+
import { usePopoverContext } from "@ark-ui/react/popover";
|
|
4
|
+
import { Slot, Slottable } from "@radix-ui/react-slot";
|
|
5
|
+
import { cn } from "../../utils/cn.js";
|
|
6
|
+
import { useTestId } from "../../utils/testId.js";
|
|
7
|
+
import { useNotificationCenterItemUnread } from "./NotificationCenterItem.js";
|
|
8
|
+
const NotificationCenterItemTitle = (t0)=>{
|
|
9
|
+
const $ = c(29);
|
|
10
|
+
let children;
|
|
11
|
+
let className;
|
|
12
|
+
let onClick;
|
|
13
|
+
let props;
|
|
14
|
+
let ref;
|
|
15
|
+
let t1;
|
|
16
|
+
let t2;
|
|
17
|
+
let testIdProp;
|
|
18
|
+
if ($[0] !== t0) {
|
|
19
|
+
({ ref, asChild: t1, closeOnClick: t2, className, children, onClick, "data-testid": testIdProp, ...props } = t0);
|
|
20
|
+
$[0] = t0;
|
|
21
|
+
$[1] = children;
|
|
22
|
+
$[2] = className;
|
|
23
|
+
$[3] = onClick;
|
|
24
|
+
$[4] = props;
|
|
25
|
+
$[5] = ref;
|
|
26
|
+
$[6] = t1;
|
|
27
|
+
$[7] = t2;
|
|
28
|
+
$[8] = testIdProp;
|
|
29
|
+
} else {
|
|
30
|
+
children = $[1];
|
|
31
|
+
className = $[2];
|
|
32
|
+
onClick = $[3];
|
|
33
|
+
props = $[4];
|
|
34
|
+
ref = $[5];
|
|
35
|
+
t1 = $[6];
|
|
36
|
+
t2 = $[7];
|
|
37
|
+
testIdProp = $[8];
|
|
38
|
+
}
|
|
39
|
+
const asChild = void 0 === t1 ? false : t1;
|
|
40
|
+
const closeOnClick = void 0 === t2 ? true : t2;
|
|
41
|
+
const unread = useNotificationCenterItemUnread();
|
|
42
|
+
const { setOpen } = usePopoverContext();
|
|
43
|
+
const testId = useTestId("title", testIdProp);
|
|
44
|
+
const Comp = asChild ? Slot : "button";
|
|
45
|
+
let t3;
|
|
46
|
+
if ($[9] !== closeOnClick || $[10] !== onClick || $[11] !== setOpen) {
|
|
47
|
+
t3 = (event)=>{
|
|
48
|
+
onClick?.(event);
|
|
49
|
+
if (closeOnClick && !event.defaultPrevented) setOpen(false);
|
|
50
|
+
};
|
|
51
|
+
$[9] = closeOnClick;
|
|
52
|
+
$[10] = onClick;
|
|
53
|
+
$[11] = setOpen;
|
|
54
|
+
$[12] = t3;
|
|
55
|
+
} else t3 = $[12];
|
|
56
|
+
const handleClick = t3;
|
|
57
|
+
const t4 = asChild ? void 0 : "button";
|
|
58
|
+
let t5;
|
|
59
|
+
if ($[13] !== className) {
|
|
60
|
+
t5 = cn("cursor-pointer text-left font-sans-display text-sm font-medium break-words text-text-primary outline-none", "after:absolute after:inset-0 after:rounded-8", "focus-visible:after:ring-3 focus-visible:after:ring-focus-primary", className);
|
|
61
|
+
$[13] = className;
|
|
62
|
+
$[14] = t5;
|
|
63
|
+
} else t5 = $[14];
|
|
64
|
+
let t6;
|
|
65
|
+
if ($[15] !== unread) {
|
|
66
|
+
t6 = unread && /*#__PURE__*/ jsxs(Fragment, {
|
|
67
|
+
children: [
|
|
68
|
+
/*#__PURE__*/ jsx("span", {
|
|
69
|
+
className: "sr-only",
|
|
70
|
+
children: "Unread,"
|
|
71
|
+
}),
|
|
72
|
+
" "
|
|
73
|
+
]
|
|
74
|
+
});
|
|
75
|
+
$[15] = unread;
|
|
76
|
+
$[16] = t6;
|
|
77
|
+
} else t6 = $[16];
|
|
78
|
+
let t7;
|
|
79
|
+
if ($[17] !== children) {
|
|
80
|
+
t7 = /*#__PURE__*/ jsx(Slottable, {
|
|
81
|
+
children: children
|
|
82
|
+
});
|
|
83
|
+
$[17] = children;
|
|
84
|
+
$[18] = t7;
|
|
85
|
+
} else t7 = $[18];
|
|
86
|
+
let t8;
|
|
87
|
+
if ($[19] !== Comp || $[20] !== handleClick || $[21] !== props || $[22] !== ref || $[23] !== t4 || $[24] !== t5 || $[25] !== t6 || $[26] !== t7 || $[27] !== testId) {
|
|
88
|
+
t8 = /*#__PURE__*/ jsxs(Comp, {
|
|
89
|
+
type: t4,
|
|
90
|
+
...props,
|
|
91
|
+
ref: ref,
|
|
92
|
+
onClick: handleClick,
|
|
93
|
+
"data-slot": "notification-center-item-title",
|
|
94
|
+
"data-testid": testId,
|
|
95
|
+
className: t5,
|
|
96
|
+
children: [
|
|
97
|
+
t6,
|
|
98
|
+
t7
|
|
99
|
+
]
|
|
100
|
+
});
|
|
101
|
+
$[19] = Comp;
|
|
102
|
+
$[20] = handleClick;
|
|
103
|
+
$[21] = props;
|
|
104
|
+
$[22] = ref;
|
|
105
|
+
$[23] = t4;
|
|
106
|
+
$[24] = t5;
|
|
107
|
+
$[25] = t6;
|
|
108
|
+
$[26] = t7;
|
|
109
|
+
$[27] = testId;
|
|
110
|
+
$[28] = t8;
|
|
111
|
+
} else t8 = $[28];
|
|
112
|
+
return t8;
|
|
113
|
+
};
|
|
114
|
+
NotificationCenterItemTitle.displayName = "NotificationCenterItemTitle";
|
|
115
|
+
export { NotificationCenterItemTitle };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { FC } from 'react';
|
|
2
|
+
import { type TabsListProps, type TabsProps } from '../Tabs/index.js';
|
|
3
|
+
export type NotificationCenterTabsProps = Omit<TabsProps, 'size' | 'variant' | 'asChild'>;
|
|
4
|
+
/**
|
|
5
|
+
* Small tabs that fill the panel below the header, so the active panel's
|
|
6
|
+
* `NotificationCenterBody` scrolls while the header and tab list stay put.
|
|
7
|
+
*/
|
|
8
|
+
export declare const NotificationCenterTabs: FC<NotificationCenterTabsProps>;
|
|
9
|
+
export type NotificationCenterTabsListProps = TabsListProps;
|
|
10
|
+
export declare const NotificationCenterTabsList: FC<NotificationCenterTabsListProps>;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { c } from "react/compiler-runtime";
|
|
3
|
+
import { cn } from "../../utils/cn.js";
|
|
4
|
+
import { useTestId } from "../../utils/testId.js";
|
|
5
|
+
import { Tabs, TabsList } from "../Tabs/index.js";
|
|
6
|
+
const NotificationCenterTabs = (t0)=>{
|
|
7
|
+
const $ = c(10);
|
|
8
|
+
let className;
|
|
9
|
+
let props;
|
|
10
|
+
let testIdProp;
|
|
11
|
+
if ($[0] !== t0) {
|
|
12
|
+
({ className, "data-testid": testIdProp, ...props } = t0);
|
|
13
|
+
$[0] = t0;
|
|
14
|
+
$[1] = className;
|
|
15
|
+
$[2] = props;
|
|
16
|
+
$[3] = testIdProp;
|
|
17
|
+
} else {
|
|
18
|
+
className = $[1];
|
|
19
|
+
props = $[2];
|
|
20
|
+
testIdProp = $[3];
|
|
21
|
+
}
|
|
22
|
+
const t1 = useTestId("tabs", testIdProp);
|
|
23
|
+
let t2;
|
|
24
|
+
if ($[4] !== className) {
|
|
25
|
+
t2 = cn("flex min-h-0 flex-1 flex-col", "[&>[data-part=content]:not([hidden])]:flex [&>[data-part=content]]:min-h-0 [&>[data-part=content]]:flex-1 [&>[data-part=content]]:flex-col", className);
|
|
26
|
+
$[4] = className;
|
|
27
|
+
$[5] = t2;
|
|
28
|
+
} else t2 = $[5];
|
|
29
|
+
let t3;
|
|
30
|
+
if ($[6] !== props || $[7] !== t1 || $[8] !== t2) {
|
|
31
|
+
t3 = /*#__PURE__*/ jsx(Tabs, {
|
|
32
|
+
...props,
|
|
33
|
+
size: "small",
|
|
34
|
+
"data-testid": t1,
|
|
35
|
+
className: t2
|
|
36
|
+
});
|
|
37
|
+
$[6] = props;
|
|
38
|
+
$[7] = t1;
|
|
39
|
+
$[8] = t2;
|
|
40
|
+
$[9] = t3;
|
|
41
|
+
} else t3 = $[9];
|
|
42
|
+
return t3;
|
|
43
|
+
};
|
|
44
|
+
NotificationCenterTabs.displayName = "NotificationCenterTabs";
|
|
45
|
+
const NotificationCenterTabsList = (t0)=>{
|
|
46
|
+
const $ = c(8);
|
|
47
|
+
let className;
|
|
48
|
+
let props;
|
|
49
|
+
if ($[0] !== t0) {
|
|
50
|
+
({ className, ...props } = t0);
|
|
51
|
+
$[0] = t0;
|
|
52
|
+
$[1] = className;
|
|
53
|
+
$[2] = props;
|
|
54
|
+
} else {
|
|
55
|
+
className = $[1];
|
|
56
|
+
props = $[2];
|
|
57
|
+
}
|
|
58
|
+
let t1;
|
|
59
|
+
if ($[3] !== className) {
|
|
60
|
+
t1 = cn("px-12", className);
|
|
61
|
+
$[3] = className;
|
|
62
|
+
$[4] = t1;
|
|
63
|
+
} else t1 = $[4];
|
|
64
|
+
let t2;
|
|
65
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
66
|
+
t2 = /*#__PURE__*/ jsx(TabsList, {
|
|
67
|
+
...props,
|
|
68
|
+
className: t1
|
|
69
|
+
});
|
|
70
|
+
$[5] = props;
|
|
71
|
+
$[6] = t1;
|
|
72
|
+
$[7] = t2;
|
|
73
|
+
} else t2 = $[7];
|
|
74
|
+
return t2;
|
|
75
|
+
};
|
|
76
|
+
NotificationCenterTabsList.displayName = "NotificationCenterTabsList";
|
|
77
|
+
export { NotificationCenterTabs, NotificationCenterTabsList };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ButtonHTMLAttributes, FC, ReactNode, Ref } from 'react';
|
|
2
|
+
import { type TestableProps } from '../../utils/testId.js';
|
|
3
|
+
export interface NotificationCenterTriggerProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'color' | 'children'>, TestableProps {
|
|
4
|
+
ref?: Ref<HTMLButtonElement>;
|
|
5
|
+
/** Unread count. `0` hides the badge; above 99 the badge shows `99+`. */
|
|
6
|
+
count?: number;
|
|
7
|
+
/** Tooltip text and the base of the accessible name. */
|
|
8
|
+
label?: string;
|
|
9
|
+
/** Replaces the bell icon. */
|
|
10
|
+
children?: ReactNode;
|
|
11
|
+
}
|
|
12
|
+
/** The bell button: icon, unread badge, tooltip and accessible name. */
|
|
13
|
+
export declare const NotificationCenterTrigger: FC<NotificationCenterTriggerProps>;
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { c } from "react/compiler-runtime";
|
|
3
|
+
import { Bell } from "../../icons/index.js";
|
|
4
|
+
import { useTestId } from "../../utils/testId.js";
|
|
5
|
+
import { Button } from "../Button/index.js";
|
|
6
|
+
import { NumericBadge } from "../NumericBadge/index.js";
|
|
7
|
+
import { PopoverTrigger } from "../Popover/index.js";
|
|
8
|
+
import { Tooltip, TooltipContent, TooltipTrigger } from "../Tooltip/index.js";
|
|
9
|
+
import { useNotificationCenterContext } from "./NotificationCenter.js";
|
|
10
|
+
const MAX_BADGE_COUNT = 99;
|
|
11
|
+
const NotificationCenterTrigger = (t0)=>{
|
|
12
|
+
const $ = c(32);
|
|
13
|
+
let children;
|
|
14
|
+
let props;
|
|
15
|
+
let ref;
|
|
16
|
+
let t1;
|
|
17
|
+
let t2;
|
|
18
|
+
let testIdProp;
|
|
19
|
+
if ($[0] !== t0) {
|
|
20
|
+
({ ref, count: t1, label: t2, children, "data-testid": testIdProp, ...props } = t0);
|
|
21
|
+
$[0] = t0;
|
|
22
|
+
$[1] = children;
|
|
23
|
+
$[2] = props;
|
|
24
|
+
$[3] = ref;
|
|
25
|
+
$[4] = t1;
|
|
26
|
+
$[5] = t2;
|
|
27
|
+
$[6] = testIdProp;
|
|
28
|
+
} else {
|
|
29
|
+
children = $[1];
|
|
30
|
+
props = $[2];
|
|
31
|
+
ref = $[3];
|
|
32
|
+
t1 = $[4];
|
|
33
|
+
t2 = $[5];
|
|
34
|
+
testIdProp = $[6];
|
|
35
|
+
}
|
|
36
|
+
const count = void 0 === t1 ? 0 : t1;
|
|
37
|
+
const label = void 0 === t2 ? "Notifications" : t2;
|
|
38
|
+
const { triggerId } = useNotificationCenterContext();
|
|
39
|
+
const testId = useTestId("trigger", testIdProp);
|
|
40
|
+
let t3;
|
|
41
|
+
if ($[7] !== triggerId) {
|
|
42
|
+
t3 = {
|
|
43
|
+
trigger: triggerId
|
|
44
|
+
};
|
|
45
|
+
$[7] = triggerId;
|
|
46
|
+
$[8] = t3;
|
|
47
|
+
} else t3 = $[8];
|
|
48
|
+
const t4 = count > 0 ? `${label}, ${count} unread` : label;
|
|
49
|
+
let t5;
|
|
50
|
+
if ($[9] !== children) {
|
|
51
|
+
t5 = children ?? /*#__PURE__*/ jsx(Bell, {});
|
|
52
|
+
$[9] = children;
|
|
53
|
+
$[10] = t5;
|
|
54
|
+
} else t5 = $[10];
|
|
55
|
+
let t6;
|
|
56
|
+
if ($[11] !== count) {
|
|
57
|
+
t6 = count > 0 && /*#__PURE__*/ jsx(NumericBadge, {
|
|
58
|
+
type: "solid",
|
|
59
|
+
color: "brand",
|
|
60
|
+
size: "small",
|
|
61
|
+
"aria-hidden": true,
|
|
62
|
+
children: count > MAX_BADGE_COUNT ? `${MAX_BADGE_COUNT}+` : count
|
|
63
|
+
});
|
|
64
|
+
$[11] = count;
|
|
65
|
+
$[12] = t6;
|
|
66
|
+
} else t6 = $[12];
|
|
67
|
+
let t7;
|
|
68
|
+
if ($[13] !== props || $[14] !== ref || $[15] !== t4 || $[16] !== t5 || $[17] !== t6) {
|
|
69
|
+
t7 = /*#__PURE__*/ jsxs(Button, {
|
|
70
|
+
"aria-label": t4,
|
|
71
|
+
"data-slot": "notification-center-trigger",
|
|
72
|
+
...props,
|
|
73
|
+
ref: ref,
|
|
74
|
+
variant: "ghost",
|
|
75
|
+
color: "neutral",
|
|
76
|
+
size: "small",
|
|
77
|
+
children: [
|
|
78
|
+
t5,
|
|
79
|
+
t6
|
|
80
|
+
]
|
|
81
|
+
});
|
|
82
|
+
$[13] = props;
|
|
83
|
+
$[14] = ref;
|
|
84
|
+
$[15] = t4;
|
|
85
|
+
$[16] = t5;
|
|
86
|
+
$[17] = t6;
|
|
87
|
+
$[18] = t7;
|
|
88
|
+
} else t7 = $[18];
|
|
89
|
+
let t8;
|
|
90
|
+
if ($[19] !== t7 || $[20] !== testId) {
|
|
91
|
+
t8 = /*#__PURE__*/ jsx(TooltipTrigger, {
|
|
92
|
+
asChild: true,
|
|
93
|
+
"data-testid": testId,
|
|
94
|
+
children: t7
|
|
95
|
+
});
|
|
96
|
+
$[19] = t7;
|
|
97
|
+
$[20] = testId;
|
|
98
|
+
$[21] = t8;
|
|
99
|
+
} else t8 = $[21];
|
|
100
|
+
let t9;
|
|
101
|
+
if ($[22] !== t8 || $[23] !== testId) {
|
|
102
|
+
t9 = /*#__PURE__*/ jsx(PopoverTrigger, {
|
|
103
|
+
asChild: true,
|
|
104
|
+
"data-testid": testId,
|
|
105
|
+
children: t8
|
|
106
|
+
});
|
|
107
|
+
$[22] = t8;
|
|
108
|
+
$[23] = testId;
|
|
109
|
+
$[24] = t9;
|
|
110
|
+
} else t9 = $[24];
|
|
111
|
+
let t10;
|
|
112
|
+
if ($[25] !== label) {
|
|
113
|
+
t10 = /*#__PURE__*/ jsx(TooltipContent, {
|
|
114
|
+
children: label
|
|
115
|
+
});
|
|
116
|
+
$[25] = label;
|
|
117
|
+
$[26] = t10;
|
|
118
|
+
} else t10 = $[26];
|
|
119
|
+
let t11;
|
|
120
|
+
if ($[27] !== t10 || $[28] !== t3 || $[29] !== t9 || $[30] !== testId) {
|
|
121
|
+
t11 = /*#__PURE__*/ jsxs(Tooltip, {
|
|
122
|
+
ids: t3,
|
|
123
|
+
"data-testid": testId,
|
|
124
|
+
children: [
|
|
125
|
+
t9,
|
|
126
|
+
t10
|
|
127
|
+
]
|
|
128
|
+
});
|
|
129
|
+
$[27] = t10;
|
|
130
|
+
$[28] = t3;
|
|
131
|
+
$[29] = t9;
|
|
132
|
+
$[30] = testId;
|
|
133
|
+
$[31] = t11;
|
|
134
|
+
} else t11 = $[31];
|
|
135
|
+
return t11;
|
|
136
|
+
};
|
|
137
|
+
NotificationCenterTrigger.displayName = "NotificationCenterTrigger";
|
|
138
|
+
export { NotificationCenterTrigger };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { NotificationCenter, type NotificationCenterProps } from './NotificationCenter.js';
|
|
2
|
+
export { NotificationCenterBody, type NotificationCenterBodyProps, NotificationCenterEmpty, type NotificationCenterEmptyProps, NotificationCenterSkeleton, type NotificationCenterSkeletonProps, } from './NotificationCenterBody.js';
|
|
3
|
+
export { NotificationCenterContent, type NotificationCenterContentProps, } from './NotificationCenterContent.js';
|
|
4
|
+
export { NotificationCenterHeader, NotificationCenterHeaderAction, type NotificationCenterHeaderActionProps, NotificationCenterHeaderActions, type NotificationCenterHeaderActionsProps, type NotificationCenterHeaderProps, NotificationCenterTitle, type NotificationCenterTitleProps, } from './NotificationCenterHeader.js';
|
|
5
|
+
export { NotificationCenterItem, NotificationCenterItemActions, type NotificationCenterItemActionsProps, NotificationCenterItemDescription, type NotificationCenterItemDescriptionProps, type NotificationCenterItemProps, NotificationCenterList, type NotificationCenterListProps, } from './NotificationCenterItem.js';
|
|
6
|
+
export { NotificationCenterItemTime, type NotificationCenterItemTimeProps, } from './NotificationCenterItemTime.js';
|
|
7
|
+
export { NotificationCenterItemTitle, type NotificationCenterItemTitleProps, } from './NotificationCenterItemTitle.js';
|
|
8
|
+
export { NotificationCenterTabs, NotificationCenterTabsList, type NotificationCenterTabsListProps, type NotificationCenterTabsProps, } from './NotificationCenterTabs.js';
|
|
9
|
+
export { NotificationCenterTrigger, type NotificationCenterTriggerProps, } from './NotificationCenterTrigger.js';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { NotificationCenter } from "./NotificationCenter.js";
|
|
2
|
+
export { NotificationCenterBody, NotificationCenterEmpty, NotificationCenterSkeleton } from "./NotificationCenterBody.js";
|
|
3
|
+
export { NotificationCenterContent } from "./NotificationCenterContent.js";
|
|
4
|
+
export { NotificationCenterHeader, NotificationCenterHeaderAction, NotificationCenterHeaderActions, NotificationCenterTitle } from "./NotificationCenterHeader.js";
|
|
5
|
+
export { NotificationCenterItem, NotificationCenterItemActions, NotificationCenterItemDescription, NotificationCenterList } from "./NotificationCenterItem.js";
|
|
6
|
+
export { NotificationCenterItemTime } from "./NotificationCenterItemTime.js";
|
|
7
|
+
export { NotificationCenterItemTitle } from "./NotificationCenterItemTitle.js";
|
|
8
|
+
export { NotificationCenterTabs, NotificationCenterTabsList } from "./NotificationCenterTabs.js";
|
|
9
|
+
export { NotificationCenterTrigger } from "./NotificationCenterTrigger.js";
|
|
@@ -5,7 +5,7 @@ const Overlay = (props)=>{
|
|
|
5
5
|
const $ = c(3);
|
|
6
6
|
let t0;
|
|
7
7
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
8
|
-
t0 = cn("fixed inset-0", "data-[state=open]:animate-in data-[state=open]:fade-in-0", "data-[state=closed]:animate-out data-[state=closed]:fade-out-0", "transition-opacity duration-200", "backdrop-blur-xs bg-component-dialog-overlay", "z-[calc(var(--drawer-overlay-z-index)+(var(--layer-index)*var(--drawer-level-ratio)))]");
|
|
8
|
+
t0 = cn("fixed inset-0", "data-[state=open]:animate-in data-[state=open]:fade-in-0", "data-[state=closed]:animate-out data-[state=closed]:fade-out-0", "transition-opacity duration-200", "backdrop-blur-xs bg-component-dialog-overlay", "z-[calc(var(--drawer-overlay-z-index)+(var(--layer-index,0)*var(--drawer-level-ratio)))]");
|
|
9
9
|
$[0] = t0;
|
|
10
10
|
} else t0 = $[0];
|
|
11
11
|
let t1;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type FC, type InputHTMLAttributes, type Ref } from 'react';
|
|
2
2
|
import type { TestableProps } from '../../utils/testId.js';
|
|
3
3
|
type SearchInputSize = 'default' | 'medium' | 'small';
|
|
4
|
-
export interface SearchInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'type' | 'onChange'>, TestableProps {
|
|
5
|
-
/** Current search value (controlled). */
|
|
6
|
-
value
|
|
4
|
+
export interface SearchInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'type' | 'value' | 'defaultValue' | 'onChange'>, TestableProps {
|
|
5
|
+
/** Current search value (controlled). Omit it to let the input keep its own value. */
|
|
6
|
+
value?: string;
|
|
7
|
+
/** Initial value when `value` is omitted (uncontrolled). @default '' */
|
|
8
|
+
defaultValue?: string;
|
|
7
9
|
/** Called when the value changes (typing or clearing). */
|
|
8
|
-
onChange
|
|
10
|
+
onChange?: (value: string) => void;
|
|
9
11
|
/** Called when the clear button is clicked. Fires before onChange(''). */
|
|
10
12
|
onClear?: () => void;
|
|
11
13
|
/** Input size variant. @default 'default' */
|