@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.
- package/README.md +2 -4
- package/dist/components/BulkBar/index.d.ts +0 -5
- package/dist/components/Drawer/classes.js +1 -1
- package/dist/components/DropdownMenu/DropdownMenu.d.ts +2 -0
- package/dist/components/DropdownMenu/DropdownMenu.js +84 -71
- package/dist/components/DropdownMenu/DropdownMenuItemDescription.js +1 -1
- package/dist/components/FilterInput/hooks/useFilterInputAutocomplete/useFilterInputAutocomplete.js +1 -1
- package/dist/components/Overlay/Overlay.js +1 -1
- package/dist/components/Rules/PointSelector/KeyboardShortcutsDialog.d.ts +14 -0
- package/dist/components/Rules/PointSelector/KeyboardShortcutsDialog.js +209 -0
- package/dist/components/Rules/PointSelector/MatchStep.d.ts +15 -0
- package/dist/components/Rules/PointSelector/MatchStep.js +186 -0
- package/dist/components/Rules/PointSelector/MenuFooterHints.d.ts +16 -0
- package/dist/components/Rules/PointSelector/MenuFooterHints.js +177 -0
- package/dist/components/Rules/PointSelector/PointPreview.d.ts +10 -0
- package/dist/components/Rules/PointSelector/PointPreview.js +88 -0
- package/dist/components/Rules/PointSelector/PointSelector.d.ts +17 -0
- package/dist/components/Rules/PointSelector/PointSelector.js +937 -0
- package/dist/components/Rules/PointSelector/PointSelectorEmptyState.d.ts +12 -0
- package/dist/components/Rules/PointSelector/PointSelectorEmptyState.js +173 -0
- package/dist/components/Rules/PointSelector/PointSelectorError.d.ts +31 -0
- package/dist/components/Rules/PointSelector/PointSelectorError.js +275 -0
- package/dist/components/Rules/PointSelector/PointSelectorInput.d.ts +20 -0
- package/dist/components/Rules/PointSelector/PointSelectorInput.js +130 -0
- package/dist/components/Rules/PointSelector/PointSelectorMenu.d.ts +31 -0
- package/dist/components/Rules/PointSelector/PointSelectorMenu.js +317 -0
- package/dist/components/Rules/PointSelector/PointSelectorSkeleton.d.ts +8 -0
- package/dist/components/Rules/PointSelector/PointSelectorSkeleton.js +73 -0
- package/dist/components/Rules/PointSelector/SampleRequest.d.ts +14 -0
- package/dist/components/Rules/PointSelector/SampleRequest.js +116 -0
- package/dist/components/Rules/PointSelector/StepMenu.d.ts +40 -0
- package/dist/components/Rules/PointSelector/StepMenu.js +210 -0
- package/dist/components/Rules/PointSelector/VersionWarning.d.ts +26 -0
- package/dist/components/Rules/PointSelector/VersionWarning.js +231 -0
- package/dist/components/Rules/PointSelector/WhereBar.d.ts +48 -0
- package/dist/components/Rules/PointSelector/WhereBar.js +263 -0
- package/dist/components/Rules/PointSelector/classes.d.ts +28 -0
- package/dist/components/Rules/PointSelector/classes.js +22 -0
- package/dist/components/Rules/PointSelector/index.d.ts +20 -0
- package/dist/components/Rules/PointSelector/index.js +18 -0
- package/dist/components/Rules/PointSelector/liftLayer.d.ts +8 -0
- package/dist/components/Rules/PointSelector/liftLayer.js +4 -0
- package/dist/components/Rules/PointSelector/sampleValue.d.ts +6 -0
- package/dist/components/Rules/PointSelector/sampleValue.js +51 -0
- package/dist/components/Rules/PointSelector/sdkBridge.d.ts +508 -0
- package/dist/components/Rules/PointSelector/sdkBridge.js +339 -0
- package/dist/components/Rules/PointSelector/types.d.ts +304 -0
- package/dist/components/Rules/PointSelector/types.js +0 -0
- package/dist/components/Rules/PointSelector/usePointSelector.d.ts +161 -0
- package/dist/components/Rules/PointSelector/usePointSelector.js +1088 -0
- package/dist/components/Rules/RuleBuilder/ActionEditor/ActionEditor.d.ts +28 -0
- package/dist/components/Rules/RuleBuilder/ActionEditor/ActionEditor.js +208 -0
- package/dist/components/Rules/RuleBuilder/ActionEditor/ActionFields.d.ts +23 -0
- package/dist/components/Rules/RuleBuilder/ActionEditor/ActionFields.js +950 -0
- package/dist/components/Rules/RuleBuilder/ActionEditor/ActionTargetPicker.d.ts +21 -0
- package/dist/components/Rules/RuleBuilder/ActionEditor/ActionTargetPicker.js +110 -0
- package/dist/components/Rules/RuleBuilder/ActionEditor/ActionTypeSelect.d.ts +20 -0
- package/dist/components/Rules/RuleBuilder/ActionEditor/ActionTypeSelect.js +31 -0
- package/dist/components/Rules/RuleBuilder/ActionEditor/AttackTypeField.d.ts +23 -0
- package/dist/components/Rules/RuleBuilder/ActionEditor/AttackTypeField.js +131 -0
- package/dist/components/Rules/RuleBuilder/ActionEditor/classes.d.ts +17 -0
- package/dist/components/Rules/RuleBuilder/ActionEditor/classes.js +14 -0
- package/dist/components/Rules/RuleBuilder/ActionEditor/index.d.ts +6 -0
- package/dist/components/Rules/RuleBuilder/ActionEditor/index.js +6 -0
- package/dist/components/Rules/RuleBuilder/ConditionTree/AddConditionMenu.d.ts +24 -0
- package/dist/components/Rules/RuleBuilder/ConditionTree/AddConditionMenu.js +245 -0
- package/dist/components/Rules/RuleBuilder/ConditionTree/AttackCondition.d.ts +15 -0
- package/dist/components/Rules/RuleBuilder/ConditionTree/AttackCondition.js +691 -0
- package/dist/components/Rules/RuleBuilder/ConditionTree/ConditionCard.d.ts +19 -0
- package/dist/components/Rules/RuleBuilder/ConditionTree/ConditionCard.js +72 -0
- package/dist/components/Rules/RuleBuilder/ConditionTree/ConditionTree.d.ts +27 -0
- package/dist/components/Rules/RuleBuilder/ConditionTree/ConditionTree.js +407 -0
- package/dist/components/Rules/RuleBuilder/ConditionTree/FieldCondition.d.ts +14 -0
- package/dist/components/Rules/RuleBuilder/ConditionTree/FieldCondition.js +269 -0
- package/dist/components/Rules/RuleBuilder/ConditionTree/GroupCondition.d.ts +25 -0
- package/dist/components/Rules/RuleBuilder/ConditionTree/GroupCondition.js +99 -0
- package/dist/components/Rules/RuleBuilder/ConditionTree/SampleCondition.d.ts +14 -0
- package/dist/components/Rules/RuleBuilder/ConditionTree/SampleCondition.js +118 -0
- package/dist/components/Rules/RuleBuilder/ConditionTree/SignalCondition.d.ts +14 -0
- package/dist/components/Rules/RuleBuilder/ConditionTree/SignalCondition.js +446 -0
- package/dist/components/Rules/RuleBuilder/ConditionTree/TagCondition.d.ts +14 -0
- package/dist/components/Rules/RuleBuilder/ConditionTree/TagCondition.js +266 -0
- package/dist/components/Rules/RuleBuilder/ConditionTree/classes.d.ts +35 -0
- package/dist/components/Rules/RuleBuilder/ConditionTree/classes.js +57 -0
- package/dist/components/Rules/RuleBuilder/ConditionTree/index.d.ts +15 -0
- package/dist/components/Rules/RuleBuilder/ConditionTree/index.js +10 -0
- package/dist/components/Rules/RuleBuilder/RuleBuilder.d.ts +67 -0
- package/dist/components/Rules/RuleBuilder/RuleBuilder.js +366 -0
- package/dist/components/Rules/RuleBuilder/Summary/ActionSummary.d.ts +32 -0
- package/dist/components/Rules/RuleBuilder/Summary/ActionSummary.js +420 -0
- package/dist/components/Rules/RuleBuilder/Summary/ConditionSummary.d.ts +27 -0
- package/dist/components/Rules/RuleBuilder/Summary/ConditionSummary.js +446 -0
- package/dist/components/Rules/RuleBuilder/Summary/index.d.ts +7 -0
- package/dist/components/Rules/RuleBuilder/Summary/index.js +2 -0
- package/dist/components/Rules/RuleBuilder/classes.d.ts +19 -0
- package/dist/components/Rules/RuleBuilder/classes.js +18 -0
- package/dist/components/Rules/RuleBuilder/index.d.ts +55 -0
- package/dist/components/Rules/RuleBuilder/index.js +11 -0
- package/dist/components/Rules/RuleBuilder/models/actionModel.d.ts +31 -0
- package/dist/components/Rules/RuleBuilder/models/actionModel.js +276 -0
- package/dist/components/Rules/RuleBuilder/models/conditionModel.d.ts +95 -0
- package/dist/components/Rules/RuleBuilder/models/conditionModel.js +418 -0
- package/dist/components/Rules/RuleBuilder/models/index.d.ts +3 -0
- package/dist/components/Rules/RuleBuilder/models/index.js +3 -0
- package/dist/components/Rules/RuleBuilder/models/validation.d.ts +176 -0
- package/dist/components/Rules/RuleBuilder/models/validation.js +242 -0
- package/dist/components/Rules/RuleBuilder/shared/ChoiceSelect.d.ts +27 -0
- package/dist/components/Rules/RuleBuilder/shared/ChoiceSelect.js +92 -0
- package/dist/components/Rules/RuleBuilder/shared/index.d.ts +1 -0
- package/dist/components/Rules/RuleBuilder/shared/index.js +1 -0
- package/dist/components/Rules/RuleBuilder/types.d.ts +384 -0
- package/dist/components/Rules/RuleBuilder/types.js +0 -0
- package/dist/components/Rules/RuleBuilder/utils/constants.d.ts +65 -0
- package/dist/components/Rules/RuleBuilder/utils/constants.js +356 -0
- package/dist/components/Rules/RuleBuilder/utils/extractBindings.d.ts +48 -0
- package/dist/components/Rules/RuleBuilder/utils/extractBindings.js +42 -0
- package/dist/components/Rules/RuleBuilder/utils/helpers.d.ts +92 -0
- package/dist/components/Rules/RuleBuilder/utils/helpers.js +54 -0
- package/dist/components/Rules/RuleBuilder/utils/index.d.ts +2 -0
- package/dist/components/Rules/RuleBuilder/utils/index.js +2 -0
- package/dist/components/SearchInput/SearchInput.d.ts +5 -7
- package/dist/components/SearchInput/SearchInput.js +101 -119
- 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 +0 -1
- package/dist/components/Tabs/Tabs.js +28 -30
- 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 +0 -3
- package/dist/components/Tour/TourPositioner.js +4 -4
- package/dist/index.d.ts +3 -2
- package/dist/index.js +2 -1
- package/dist/metadata/components.json +9077 -12300
- package/dist/theme/typography.css +0 -5
- package/dist/utils/formatDateTime.d.ts +0 -6
- package/dist/utils/formatDateTime.js +1 -13
- package/package.json +4 -6
- package/dist/components/NotificationCenter/NotificationCenter.d.ts +0 -20
- package/dist/components/NotificationCenter/NotificationCenter.js +0 -65
- package/dist/components/NotificationCenter/NotificationCenterBody.d.ts +0 -18
- package/dist/components/NotificationCenter/NotificationCenterBody.js +0 -202
- package/dist/components/NotificationCenter/NotificationCenterContent.d.ts +0 -5
- package/dist/components/NotificationCenter/NotificationCenterContent.js +0 -42
- package/dist/components/NotificationCenter/NotificationCenterHeader.d.ts +0 -20
- package/dist/components/NotificationCenter/NotificationCenterHeader.js +0 -202
- package/dist/components/NotificationCenter/NotificationCenterItem.d.ts +0 -26
- package/dist/components/NotificationCenter/NotificationCenterItem.js +0 -211
- package/dist/components/NotificationCenter/NotificationCenterItemTime.d.ts +0 -9
- package/dist/components/NotificationCenter/NotificationCenterItemTime.js +0 -148
- package/dist/components/NotificationCenter/NotificationCenterItemTitle.d.ts +0 -14
- package/dist/components/NotificationCenter/NotificationCenterItemTitle.js +0 -115
- package/dist/components/NotificationCenter/NotificationCenterTabs.d.ts +0 -10
- package/dist/components/NotificationCenter/NotificationCenterTabs.js +0 -77
- package/dist/components/NotificationCenter/NotificationCenterTrigger.d.ts +0 -13
- package/dist/components/NotificationCenter/NotificationCenterTrigger.js +0 -138
- package/dist/components/NotificationCenter/index.d.ts +0 -9
- package/dist/components/NotificationCenter/index.js +0 -9
- package/dist/guidelines/foundations/color.md +0 -157
- package/dist/guidelines/foundations/focus.md +0 -122
- package/dist/guidelines/foundations/layering.md +0 -131
- package/dist/guidelines/foundations/radius-elevation.md +0 -111
- package/dist/guidelines/foundations/spacing.md +0 -117
- package/dist/guidelines/foundations/typography.md +0 -114
- package/dist/guidelines/patterns/app-layout.md +0 -1567
- package/dist/guidelines/patterns/auth-page.md +0 -668
- package/dist/guidelines/patterns/confirmation-dialogs.md +0 -605
- package/dist/guidelines/patterns/create-edit-forms.md +0 -768
- package/dist/guidelines/patterns/detail-drawer.md +0 -868
- package/dist/guidelines/patterns/empty-states.md +0 -461
- package/dist/guidelines/patterns/entity-table.md +0 -533
- package/dist/guidelines/patterns/feedback-toasts.md +0 -493
- package/dist/guidelines/patterns/filtering.md +0 -630
- package/dist/guidelines/patterns/resource-list-page.md +0 -558
- package/dist/guidelines/patterns/settings-page.md +0 -752
- package/dist/guidelines/rules.md +0 -25
- package/dist/metadata/guidelines.json +0 -1705
|
@@ -1,138 +0,0 @@
|
|
|
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 };
|
|
@@ -1,9 +0,0 @@
|
|
|
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';
|
|
@@ -1,9 +0,0 @@
|
|
|
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";
|
|
@@ -1,157 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Color
|
|
3
|
-
description: Use when choosing a background, text, icon, border or hover color, so the value switches correctly between light and dark themes.
|
|
4
|
-
components: [Alert, AlertTitle, Badge, Banner, Button, Card, CardContent, Drawer, DropdownMenu, Link, Popover, Radio, SegmentedControl, Slider, Tag, Text, ThemeProvider]
|
|
5
|
-
keywords: [color, colour, token, background, bg, text color, border, surface, elevation, status, danger, warning, success, info, brand, ai, hover, pressed, states, dark mode, theme, palette, opacity]
|
|
6
|
-
order: 20
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
# Color
|
|
10
|
-
|
|
11
|
-
Use semantic tokens; all but `-fixed` switch with the theme. The prefix repeats: `bg-bg-surface-1`, `text-text-primary`.
|
|
12
|
-
|
|
13
|
-
## What you use
|
|
14
|
-
|
|
15
|
-
| Need | Use | Not |
|
|
16
|
-
|---|---|---|
|
|
17
|
-
| Body text | `text-text-primary` | `text-slate-900` |
|
|
18
|
-
| Supporting text | `text-text-secondary` | `text-text-primary/60`, `text-muted` |
|
|
19
|
-
| Placeholder or hint | `text-text-hint` | `text-text-tertiary` |
|
|
20
|
-
| Error text | `text-text-danger` | `text-red-600` |
|
|
21
|
-
| Text on a solid fill | `text-text-primary-alt` | `text-white` |
|
|
22
|
-
| Icon ink | `text-icon-secondary` | `text-text-secondary` |
|
|
23
|
-
| Page | `bg-bg-page-bg` | `bg-white` |
|
|
24
|
-
| Card or panel | `bg-bg-surface-1` | `bg-white` |
|
|
25
|
-
| Popover, menu, drawer | `bg-bg-surface-2` | `bg-bg-surface-1` |
|
|
26
|
-
| Neutral tinted area | `bg-bg-light-primary`, `bg-bg-primary` | `bg-slate-50` |
|
|
27
|
-
| Soft status box | `bg-bg-light-danger` + `border-border-danger` | `bg-red-50 border-red-300` |
|
|
28
|
-
| Solid status block | `bg-bg-fill-danger` | `bg-red-600` |
|
|
29
|
-
| Divider | `border-border-primary-light` | `border-gray-200` |
|
|
30
|
-
| Control outline | `border-border-primary` | `border-border-primary-light` |
|
|
31
|
-
| Hover, transparent item | `hover:bg-states-primary-hover` | `hover:bg-slate-100` |
|
|
32
|
-
| Hover, solid fill | `overlay hover:overlay-states-on-fill-hover` | `hover:bg-bg-fill-brand/90`, `hover:brightness-110` |
|
|
33
|
-
| Categorical color | `Badge` `color` | `bg-violet-100` on a `div` |
|
|
34
|
-
| Status notice | `Alert` `color` | A `div` with status classes |
|
|
35
|
-
|
|
36
|
-
## Rules
|
|
37
|
-
|
|
38
|
-
**Surfaces**
|
|
39
|
-
|
|
40
|
-
- If it sits in page flow (`Card`), use `bg-bg-surface-1`.
|
|
41
|
-
- If it floats over content (`Popover`, `DropdownMenu`, `Drawer`), use `bg-bg-surface-2`.
|
|
42
|
-
- If it is a raised thumb or indicator (`Slider`, `SegmentedControl`, `Radio`), use `bg-bg-surface-3`.
|
|
43
|
-
- If it is a control track, use `bg-bg-primary`, never `bg-bg-surface-3`.
|
|
44
|
-
- Use `bg-bg-surface-5` only for a raised strip like `Banner`.
|
|
45
|
-
- Pick the level by elevation: levels 1–4 are all white in light. Separate them with borders and shadows.
|
|
46
|
-
|
|
47
|
-
**Status**
|
|
48
|
-
|
|
49
|
-
- If the area holds dark text, use `bg-bg-light-<status>` or `bg-bg-<status>` with `border-border-<status>`.
|
|
50
|
-
- If it holds `text-text-primary-alt`, use `bg-bg-fill-<status>`.
|
|
51
|
-
- Use `brand` only for the primary action, `ai` only for assistant content.
|
|
52
|
-
- Pair status color with an icon or word.
|
|
53
|
-
- Use `danger` for errors. `destructive` is only an `Alert`/`Button` prop and `ring-focus-destructive`.
|
|
54
|
-
|
|
55
|
-
**States**
|
|
56
|
-
|
|
57
|
-
- Transparent item: `hover:bg-states-primary-hover`, `active:bg-states-primary-pressed`. Selected: `bg-states-primary-active`.
|
|
58
|
-
- Solid fill: add `overlay`, then `hover:overlay-states-on-fill-hover`, `active:overlay-states-on-fill-pressed`.
|
|
59
|
-
- Brand/danger item: `bg-states-brand-*`, `bg-states-danger-*`. Inverted surface: `bg-states-primary-alt-*`.
|
|
60
|
-
- `states-*` tokens are translucent layers over a resting fill.
|
|
61
|
-
- Prefer components with built-in states, like `Button`.
|
|
62
|
-
|
|
63
|
-
**Theme**
|
|
64
|
-
|
|
65
|
-
- Switch themes with `useTheme().setTheme()`, never by setting `data-theme`.
|
|
66
|
-
- Use `-alt` tokens on inverted surfaces; `-fixed` tokens only on fixed surfaces.
|
|
67
|
-
- **Never** use the `dark:` variant. It follows the OS, not `ThemeProvider`.
|
|
68
|
-
- **Never** use raw palette classes (`bg-red-500`), which ignore the theme, or opacity modifiers (`/90`).
|
|
69
|
-
- **Never** reuse `bg-component-*` outside its component. Exception: an auth page paints `bg-component-app-shell-bg`; see [Auth page](../patterns/auth-page.md).
|
|
70
|
-
- **Never** edit `--color-syntax-*` mappings.
|
|
71
|
-
|
|
72
|
-
**These do not exist**
|
|
73
|
-
|
|
74
|
-
- `bg-primary`, `text-primary`, `border-primary` → `bg-bg-primary`, `text-text-primary`, `border-border-primary`.
|
|
75
|
-
- `text-muted`, `text-subtle`, `text-disabled` → `text-text-secondary`, `text-text-hint`, `text-text-disable-primary`.
|
|
76
|
-
- `bg-surface`, `bg-card`, `bg-background`, `bg-muted` → `bg-bg-surface-1`, `bg-bg-light-primary`.
|
|
77
|
-
- `bg-bg-surface-0`, `bg-bg-surface-6` → levels run 1–5.
|
|
78
|
-
- `error` tokens → `danger`. `bg-bg-fill-primary` → no neutral solid fill. `border-border-secondary` → `border-border-primary-light`.
|
|
79
|
-
- `Badge` `color='purple'` → `violet`. `Tag` has no `color` prop.
|
|
80
|
-
|
|
81
|
-
## Examples
|
|
82
|
-
|
|
83
|
-
A soft danger box in a card.
|
|
84
|
-
|
|
85
|
-
```tsx
|
|
86
|
-
import { Card, CardContent, Text } from '@wallarm-org/design-system';
|
|
87
|
-
|
|
88
|
-
export const BlockedRequests = () => (
|
|
89
|
-
<Card>
|
|
90
|
-
<CardContent className='flex flex-col gap-8'>
|
|
91
|
-
<Text size='sm' color='secondary'>Blocked requests</Text>
|
|
92
|
-
<div className='rounded-8 border-1 border-border-danger bg-bg-light-danger px-12 py-8 text-text-danger'>
|
|
93
|
-
1 204 attacks blocked
|
|
94
|
-
</div>
|
|
95
|
-
</CardContent>
|
|
96
|
-
</Card>
|
|
97
|
-
);
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
Notices and labels are components.
|
|
101
|
-
|
|
102
|
-
```tsx
|
|
103
|
-
import { Alert, AlertTitle, Badge } from '@wallarm-org/design-system';
|
|
104
|
-
|
|
105
|
-
export const QuotaNotice = () => (
|
|
106
|
-
<>
|
|
107
|
-
<Alert color='warning'><AlertTitle>Quota at 90%</AlertTitle></Alert>
|
|
108
|
-
<Badge color='violet' type='secondary'>API abuse</Badge>
|
|
109
|
-
</>
|
|
110
|
-
);
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
A custom solid fill keeps its color on hover.
|
|
114
|
-
|
|
115
|
-
```tsx
|
|
116
|
-
export const DeployTile = () => (
|
|
117
|
-
<button
|
|
118
|
-
type='button'
|
|
119
|
-
className='overlay bg-bg-fill-brand text-text-primary-alt hover:overlay-states-on-fill-hover active:overlay-states-on-fill-pressed'
|
|
120
|
-
>
|
|
121
|
-
Deploy
|
|
122
|
-
</button>
|
|
123
|
-
);
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
Switch themes with `useTheme`.
|
|
127
|
-
|
|
128
|
-
```tsx
|
|
129
|
-
import { Button, useTheme } from '@wallarm-org/design-system';
|
|
130
|
-
|
|
131
|
-
export const DarkModeButton = () => {
|
|
132
|
-
const { setTheme } = useTheme();
|
|
133
|
-
const handleDark = () => setTheme('dark');
|
|
134
|
-
|
|
135
|
-
return <Button onClick={handleDark}>Dark</Button>;
|
|
136
|
-
};
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
## Reference
|
|
140
|
-
|
|
141
|
-
`<status>`: `brand`, `danger`, `warning`, `success`, `info`, `ai`.
|
|
142
|
-
|
|
143
|
-
| Family | Classes |
|
|
144
|
-
|---|---|
|
|
145
|
-
| Text | `text-text-` `primary`, `secondary`, `tertiary`, `hint`, `<status>`, `primary-alt`, `secondary-alt`, `tertiary-alt`, `primary-fixed`, `primary-alt-fixed` |
|
|
146
|
-
| Disabled text | `text-text-disable-primary`, `-primary-alt`, `-<status>` (success is spelled `succes`) |
|
|
147
|
-
| Link | `text-text-link-default`, `-hover`, `-default-alt`, `-hover-alt`; prefer `Link` |
|
|
148
|
-
| Icon | `text-icon-` `primary`, `secondary`, `<status>`, `primary-alt`, `secondary-alt`, `primary-fixed`, `primary-alt-fixed`, `primary-disable`, `primary-alt-disable` |
|
|
149
|
-
| Surface | `bg-bg-page-bg`, `bg-bg-surface-1`…`5` |
|
|
150
|
-
| Neutral fill | `bg-bg-light-primary` < `bg-bg-primary` < `bg-bg-strong-primary` |
|
|
151
|
-
| Status fill | `bg-bg-light-<status>` < `bg-bg-<status>` < `bg-bg-strong-<status>`; solid `bg-bg-fill-<status>` |
|
|
152
|
-
| Border | `border-border-primary-light`, `-primary`, `-strong-primary`, `-<status>`, `-strong-<status>` |
|
|
153
|
-
| States | `bg-states-<family>-default-alt`, `-hover`, `-pressed`, `-active`; `bg-states-default-all` |
|
|
154
|
-
| Fill states | `overlay-states-on-fill-hover`, `-pressed`, `-disabled` (need `overlay`) |
|
|
155
|
-
| Focus | `ring-focus-primary`, `-brand`, `-destructive`; see [Focus](./focus.md) |
|
|
156
|
-
|
|
157
|
-
`<family>`: `primary`, `primary-alt`, or a `<status>`. `Text` `color`: `primary`, `primary-alt`, `secondary`, `secondary-alt`, `tertiary-alt`, `danger`, `inherit`. `Badge` `color`: `slate`, `gray`, `zinc`, `neutral`, `stone`, `red`, `w-orange`, `amber`, `yellow`, `lime`, `green`, `emerald`, `teal`, `cyan`, `sky`, `blue`, `indigo`, `violet`, `fuchsia`, `pink`, `rose`.
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Focus
|
|
3
|
-
description: Use when an element must show keyboard focus, to pick the ring recipe, the focus color token, and where no ring goes.
|
|
4
|
-
components: [Button, Card, CardContent, Input, Textarea, InputGroup, Checkbox, Radio, Switch, DropdownMenu, DropdownMenuItem, Select, SelectOption, NavRail, Slider, Link]
|
|
5
|
-
keywords: [focus, focus-visible, ring, focus ring, outline, keyboard, a11y, accessibility, tab, ring-inset, focus-within]
|
|
6
|
-
order: 60
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
# Focus
|
|
10
|
-
|
|
11
|
-
Keyboard focus is a 3px ring in a translucent focus color, shown on `:focus-visible`.
|
|
12
|
-
DS components draw it already. Write a ring only on elements your app builds.
|
|
13
|
-
|
|
14
|
-
## What you use
|
|
15
|
-
|
|
16
|
-
| Need | Use | Not |
|
|
17
|
-
| --- | --- | --- |
|
|
18
|
-
| Ring on an app-built control | `outline-none focus-visible:ring-3 focus-visible:ring-focus-primary` | `focus:ring-*` |
|
|
19
|
-
| Ring on a brand-colored control | `focus-visible:ring-focus-brand` | `ring-focus-primary` |
|
|
20
|
-
| Ring on a destructive control or invalid field | `focus-visible:ring-focus-destructive` | `ring-focus-primary` |
|
|
21
|
-
| Ring inside `overflow-hidden` or flush to a container edge | add `focus-visible:ring-inset` | an outer ring, which gets clipped |
|
|
22
|
-
| Ring on a wrapper around a native input | `has-[input:focus-visible]:ring-3 has-[input:focus-visible]:ring-focus-primary` (or `focus-within:`) | a ring on the inner input |
|
|
23
|
-
| Input with addons | `InputGroup` | a hand-built wrapper ring |
|
|
24
|
-
| Focusable card | `Card` with `onClick` | a `<div tabIndex>` with your own ring |
|
|
25
|
-
| Focus color on a DS button | the `Button` `color` prop (default `brand`) | a `className` override |
|
|
26
|
-
|
|
27
|
-
## Rules
|
|
28
|
-
|
|
29
|
-
- Use `focus-visible:`, not `focus:`. The ring is for keyboard focus only.
|
|
30
|
-
- Pair the ring with `outline-none`, so the browser outline and the ring never show together.
|
|
31
|
-
- Use `ring-3`. **Never** copy `ring-2` from Card, Resizable, CodeEditor or SimpleCharts: it is known drift.
|
|
32
|
-
- Always set a `ring-focus-*` color. `ring-3` alone draws the default color.
|
|
33
|
-
- Keep the element's radius; the ring follows it.
|
|
34
|
-
- If a parent has `overflow-hidden`, add `ring-inset`.
|
|
35
|
-
- If the control is brand-colored (`Button` with `color='brand'` in any variant, a checked or indeterminate Checkbox, a checked Radio or Switch), use `ring-focus-brand`. Neutral controls (`Button` with `color='neutral'` or `'neutral-alt'`, unchecked Checkbox, Radio or Switch, tabs, tags, inputs) use `ring-focus-primary`.
|
|
36
|
-
- If the control is destructive (`Button` with `color='destructive'`, any variant), use `ring-focus-destructive`.
|
|
37
|
-
- If you build a text field, match `Input`: on focus, `focus-visible:not-disabled:border-border-strong-primary` plus `ring-focus-primary`. Invalid: keep `border-border-strong-danger`, ring `ring-focus-destructive`, hover `ring-focus-destructive-hover`.
|
|
38
|
-
- If an input sits inside a styled wrapper, put the ring on the wrapper.
|
|
39
|
-
- If focus moves by arrow keys (menu, listbox), the highlighted row is the indicator. `DropdownMenuItem` and `SelectOption` use `bg-states-primary-hover`; brand and danger items use `bg-states-brand-hover` and `bg-states-danger-hover`.
|
|
40
|
-
- `NavRail` items show an overlay (`overlay-states-primary-hover`); the `Slider` thumb scales up with a shadow. Neither gets a ring.
|
|
41
|
-
- **Never** add a ring to a menu item or listbox option.
|
|
42
|
-
- **Never** add a ring to a popover, dialog or drawer surface (`DropdownMenu`, `Select` content, `Drawer`).
|
|
43
|
-
- **Never** use `outline-none` on an interactive element without a replacement indicator.
|
|
44
|
-
- **Never** use a border color, `ring-border-*` or a raw palette color as a focus ring.
|
|
45
|
-
- **Never** use `ring-focus-ring-primary`. The token exists but nothing uses it.
|
|
46
|
-
- **Never** add `ring-offset-*`. DS rings sit flush.
|
|
47
|
-
- **Never** override a DS component's ring through `className`. Pick the `color` prop.
|
|
48
|
-
|
|
49
|
-
### What does not exist
|
|
50
|
-
|
|
51
|
-
- No bare `ring-focus` token; always add a suffix.
|
|
52
|
-
- No `--ring` or ring-width token. Width is the `ring-3` utility.
|
|
53
|
-
- No `focusRing` prop on any component.
|
|
54
|
-
- No exported focus-ring class helper. Write the class string.
|
|
55
|
-
- `Link` has no focus-visible style, only `outline-none`. This is a known gap.
|
|
56
|
-
|
|
57
|
-
## Examples
|
|
58
|
-
|
|
59
|
-
A DS button picks its ring color from `color`; no class needed.
|
|
60
|
-
|
|
61
|
-
```tsx
|
|
62
|
-
import { Button } from '@wallarm-org/design-system';
|
|
63
|
-
|
|
64
|
-
export const DeleteButton = ({ onDelete }: { onDelete: () => void }) => (
|
|
65
|
-
<Button variant='primary' color='destructive' onClick={onDelete}>
|
|
66
|
-
Delete
|
|
67
|
-
</Button>
|
|
68
|
-
);
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
A card becomes focusable and draws its ring once it has a click handler.
|
|
72
|
-
|
|
73
|
-
```tsx
|
|
74
|
-
import { Card, CardContent } from '@wallarm-org/design-system';
|
|
75
|
-
|
|
76
|
-
export const DetailsCard = ({ onOpen }: { onOpen: () => void }) => (
|
|
77
|
-
<Card onClick={onOpen}>
|
|
78
|
-
<CardContent>Open details</CardContent>
|
|
79
|
-
</Card>
|
|
80
|
-
);
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
An app-built control uses the standard recipe.
|
|
84
|
-
|
|
85
|
-
```tsx
|
|
86
|
-
export const CustomTrigger = ({ onOpen }: { onOpen: () => void }) => (
|
|
87
|
-
<button
|
|
88
|
-
type='button'
|
|
89
|
-
className='rounded-8 outline-none focus-visible:ring-3 focus-visible:ring-focus-primary'
|
|
90
|
-
onClick={onOpen}
|
|
91
|
-
>
|
|
92
|
-
Custom trigger
|
|
93
|
-
</button>
|
|
94
|
-
);
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
A row inside a scroller with `overflow-hidden` uses an inset ring.
|
|
98
|
-
|
|
99
|
-
```tsx
|
|
100
|
-
export const ClippedRow = ({ onSelect }: { onSelect: () => void }) => (
|
|
101
|
-
<div className='overflow-hidden'>
|
|
102
|
-
<button
|
|
103
|
-
type='button'
|
|
104
|
-
className='w-full outline-none focus-visible:ring-3 focus-visible:ring-inset focus-visible:ring-focus-primary'
|
|
105
|
-
onClick={onSelect}
|
|
106
|
-
>
|
|
107
|
-
Row
|
|
108
|
-
</button>
|
|
109
|
-
</div>
|
|
110
|
-
);
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
## Reference
|
|
114
|
-
|
|
115
|
-
`ring-*` widths are px in Tailwind v4 (`ring-3` is 3px) and do not scale with `--spacing`.
|
|
116
|
-
|
|
117
|
-
| Token | Utility | Value |
|
|
118
|
-
| --- | --- | --- |
|
|
119
|
-
| `--color-focus-primary` | `ring-focus-primary` | `slate-400` at 30% |
|
|
120
|
-
| `--color-focus-brand` | `ring-focus-brand` | `w-orange-600` at 30% |
|
|
121
|
-
| `--color-focus-destructive` | `ring-focus-destructive` | `red-600` at 20% |
|
|
122
|
-
| `--color-focus-destructive-hover` | `ring-focus-destructive-hover` | `red-600` at 30% |
|
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Layering
|
|
3
|
-
description: Use when an overlay must paint above another one, or when you consider adding a z-index class to app code.
|
|
4
|
-
components: [Drawer, Dialog, DropdownMenu, Select, Popover, Calendar, FilterCascade, Tooltip, Toaster, SearchModal, Tour, SelectionBulkBar, TableActionBar, FeedbackPulse, PageHeader]
|
|
5
|
-
keywords: [z-index, z, stacking, layer, portal, overlay, modal, nested drawer, dialog over drawer, dropdown in dialog, tooltip above, toast above, sticky header, popper]
|
|
6
|
-
order: 50
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
# Layering
|
|
10
|
-
|
|
11
|
-
Overlays stack themselves by nesting depth. App code never sets z-index on a design-system overlay.
|
|
12
|
-
|
|
13
|
-
## What you use
|
|
14
|
-
|
|
15
|
-
| Need | Use | Not |
|
|
16
|
-
| --- | --- | --- |
|
|
17
|
-
| A panel over the page | `Drawer` | A `fixed` div with `z-50` |
|
|
18
|
-
| A modal over the page or over a drawer | `Dialog` from `@wallarm-org/design-system/Dialog` | A second `Drawer` styled as a modal |
|
|
19
|
-
| A menu, select, popover or date picker inside a drawer or dialog | `DropdownMenu`, `Select`, `Popover`, `Calendar`, `FilterCascade` as-is | A `z-[100]` class on the content |
|
|
20
|
-
| A hint above everything | `Tooltip` | A `Popover` with a raised z-index |
|
|
21
|
-
| A notification above every drawer and dialog | `useToast()` from `@wallarm-org/design-system/Toast`, plus one `Toaster` | A `Drawer` without overlay |
|
|
22
|
-
| A sticky page header | `PageHeader` with `sticky` | `sticky top-0 z-50` in app code |
|
|
23
|
-
| Bulk actions for a table in a drawer or dialog | Buttons in `DrawerFooter` or `DialogFooter` | `TableActionBar` |
|
|
24
|
-
|
|
25
|
-
What does not exist:
|
|
26
|
-
|
|
27
|
-
- No z-index token scale and no `z-overlay`, `z-modal`, `z-popover` or `z-toast` utility.
|
|
28
|
-
- No `zIndex` prop on any overlay.
|
|
29
|
-
- No `portal={false}` or container prop on `Drawer`, `Dialog`, `DropdownMenu`, `Select`, `Popover` or `Tooltip`.
|
|
30
|
-
- No `Overlay` export. The backdrop comes from `Drawer` and `Dialog` when `overlay` is `true`.
|
|
31
|
-
- No `Dialog` in the package root. Import it from `@wallarm-org/design-system/Dialog`.
|
|
32
|
-
|
|
33
|
-
## Rules
|
|
34
|
-
|
|
35
|
-
- If an overlay opens from inside another overlay, render it as a React child of the parent's content. Depth comes from the React tree.
|
|
36
|
-
- If you open a `Dialog` from a `Drawer`, put the `Dialog` inside `DrawerContent`. Only a React-ancestor drawer or dialog dismisses the nested one.
|
|
37
|
-
- If you nest a `Drawer` in a `Drawer`, or a `Dialog` in a `Dialog`, expect the parent to scale back. A `Dialog` over a `Drawer` does not scale the drawer.
|
|
38
|
-
- If a dropdown, select, popover, calendar or tooltip sits in any overlay, use it as-is. It already paints above its host.
|
|
39
|
-
- If your app has its own fixed element (chat widget), keep its z-index below 40. At 40 or higher it paints over the drawer backdrop.
|
|
40
|
-
- If your app has its own sticky element inside a scroll area, use `z-10`.
|
|
41
|
-
- **Never** add a `z-*` class or `style={{ zIndex }}` to `DrawerContent`, `DropdownMenuContent`, `SelectPositioner`, `PopoverContent`, `CalendarContent` or `TooltipContent`.
|
|
42
|
-
- If chrome you can't change (a framework or docs-site header) sits at z-index 40 or higher, raise `--drawer-overlay-z-index` and `--drawer-positioner-z-index` together on `:root` above it, positioner 10 higher. Keep both under 900.
|
|
43
|
-
- **Never** override `--tooltip-z-index` or `--toast-z-index`, and never change only one of the two drawer variables.
|
|
44
|
-
- **Never** wrap an overlay trigger in `transform`, `filter` or `isolation: isolate` to fix stacking. Overlay content is portaled to `document.body`.
|
|
45
|
-
- **Never** open `SearchModal` from inside a `Drawer` or `Dialog`. The backdrops cover the search box.
|
|
46
|
-
- **Never** start a `Tour` while a `Drawer` or `Dialog` is open. The drawer ties with or covers the tour.
|
|
47
|
-
- **Never** show `TableActionBar` for a table inside a `Drawer` or `Dialog`. The drawer ties with or covers the bar.
|
|
48
|
-
|
|
49
|
-
## Examples
|
|
50
|
-
|
|
51
|
-
A menu inside a drawer paints above the drawer with no z-index class.
|
|
52
|
-
|
|
53
|
-
```tsx
|
|
54
|
-
<DrawerContent>
|
|
55
|
-
<DrawerBody>
|
|
56
|
-
<DropdownMenu>
|
|
57
|
-
<DropdownMenuTrigger asChild>
|
|
58
|
-
<Button variant='outline' color='neutral'>Actions</Button>
|
|
59
|
-
</DropdownMenuTrigger>
|
|
60
|
-
<DropdownMenuContent>
|
|
61
|
-
<DropdownMenuItem>Duplicate</DropdownMenuItem>
|
|
62
|
-
</DropdownMenuContent>
|
|
63
|
-
</DropdownMenu>
|
|
64
|
-
</DrawerBody>
|
|
65
|
-
</DrawerContent>
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
A confirm dialog opened from a drawer is a React child of `DrawerContent`.
|
|
69
|
-
|
|
70
|
-
```tsx
|
|
71
|
-
import { Dialog, DialogContent, DialogTitle, DialogTrigger } from '@wallarm-org/design-system/Dialog';
|
|
72
|
-
|
|
73
|
-
<DrawerFooter>
|
|
74
|
-
<Dialog>
|
|
75
|
-
<DialogTrigger asChild>
|
|
76
|
-
<Button variant='primary' color='brand'>Delete</Button>
|
|
77
|
-
</DialogTrigger>
|
|
78
|
-
<DialogContent>
|
|
79
|
-
<DialogTitle>Delete rule?</DialogTitle>
|
|
80
|
-
</DialogContent>
|
|
81
|
-
</Dialog>
|
|
82
|
-
</DrawerFooter>
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
An app-owned floating widget stays below the drawer backdrop.
|
|
86
|
-
|
|
87
|
-
```tsx
|
|
88
|
-
<div className='fixed right-16 bottom-16 z-30'>{chat}</div>
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
## Reference
|
|
92
|
-
|
|
93
|
-
### Depth-based overlays
|
|
94
|
-
|
|
95
|
-
`Drawer`, `Dialog`, `DropdownMenu`, `Select`, `Popover`, `Calendar` and `FilterCascade`. Each level adds 20.
|
|
96
|
-
|
|
97
|
-
| Depth | Backdrop | Content |
|
|
98
|
-
| --- | --- | --- |
|
|
99
|
-
| 0 | 40 | 50 |
|
|
100
|
-
| 1 | 60 | 70 |
|
|
101
|
-
| 2 | 80 | 90 |
|
|
102
|
-
| 3 | 100 | 110 |
|
|
103
|
-
|
|
104
|
-
### Fixed overlays
|
|
105
|
-
|
|
106
|
-
| Component | z-index |
|
|
107
|
-
| --- | --- |
|
|
108
|
-
| `Tooltip` | 1000 |
|
|
109
|
-
| `Toaster` | 900 |
|
|
110
|
-
| `SelectionBulkBar` (`placement='floating'`) | 200 |
|
|
111
|
-
| `TableActionBar`, `Tour`, `FeedbackPulse` | 50 |
|
|
112
|
-
| `SearchModal` | 41 |
|
|
113
|
-
| `Tour` backdrop | 40 |
|
|
114
|
-
|
|
115
|
-
### Variables
|
|
116
|
-
|
|
117
|
-
| Variable | Value |
|
|
118
|
-
| --- | --- |
|
|
119
|
-
| `--drawer-overlay-z-index` | 40 |
|
|
120
|
-
| `--drawer-positioner-z-index` | 50 |
|
|
121
|
-
| `--toast-z-index` | 900 |
|
|
122
|
-
| `--tooltip-z-index` | 1000 |
|
|
123
|
-
|
|
124
|
-
### In-flow values
|
|
125
|
-
|
|
126
|
-
In-component only; never competes with overlays.
|
|
127
|
-
|
|
128
|
-
| Value | Where |
|
|
129
|
-
| --- | --- |
|
|
130
|
-
| `z-10` | `PageHeader` `sticky`, sticky menu group labels, pinned table body cells |
|
|
131
|
-
| `z-30` to `z-40` | Table headers |
|