@wallarm-org/design-system 4.11.0-rc-feat-review.1 → 4.12.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/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/Logo/WordmarkPath.js +2 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/metadata/components.json +14 -2
- package/dist/metadata/guidelines.json +1 -1
- package/package.json +1 -1
|
@@ -20,6 +20,8 @@ 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;
|
|
23
25
|
/**
|
|
24
26
|
* Called when another layer asks this menu to dismiss — e.g. a layer below it in the stack is
|
|
25
27
|
* removed. Call `event.preventDefault()` to keep the menu open.
|
|
@@ -16,9 +16,10 @@ const SUB_POSITIONING = {
|
|
|
16
16
|
}
|
|
17
17
|
};
|
|
18
18
|
const DropdownMenu = (t0)=>{
|
|
19
|
-
const $ = c(
|
|
19
|
+
const $ = c(43);
|
|
20
20
|
let anchorPoint;
|
|
21
21
|
let children;
|
|
22
|
+
let closeOnInteractOutside;
|
|
22
23
|
let closeOnSelect;
|
|
23
24
|
let defaultOpen;
|
|
24
25
|
let highlightedValue;
|
|
@@ -30,33 +31,35 @@ const DropdownMenu = (t0)=>{
|
|
|
30
31
|
let props;
|
|
31
32
|
let testIdProp;
|
|
32
33
|
if ($[0] !== t0) {
|
|
33
|
-
({ children, open, defaultOpen, onOpenChange, anchorPoint, positioning, highlightedValue, onHighlightChange, closeOnSelect, ids, "data-testid": testIdProp, ...props } = t0);
|
|
34
|
+
({ children, open, defaultOpen, onOpenChange, anchorPoint, positioning, highlightedValue, onHighlightChange, closeOnSelect, closeOnInteractOutside, ids, "data-testid": testIdProp, ...props } = t0);
|
|
34
35
|
$[0] = t0;
|
|
35
36
|
$[1] = anchorPoint;
|
|
36
37
|
$[2] = children;
|
|
37
|
-
$[3] =
|
|
38
|
-
$[4] =
|
|
39
|
-
$[5] =
|
|
40
|
-
$[6] =
|
|
41
|
-
$[7] =
|
|
42
|
-
$[8] =
|
|
43
|
-
$[9] =
|
|
44
|
-
$[10] =
|
|
45
|
-
$[11] =
|
|
46
|
-
$[12] =
|
|
38
|
+
$[3] = closeOnInteractOutside;
|
|
39
|
+
$[4] = closeOnSelect;
|
|
40
|
+
$[5] = defaultOpen;
|
|
41
|
+
$[6] = highlightedValue;
|
|
42
|
+
$[7] = ids;
|
|
43
|
+
$[8] = onHighlightChange;
|
|
44
|
+
$[9] = onOpenChange;
|
|
45
|
+
$[10] = open;
|
|
46
|
+
$[11] = positioning;
|
|
47
|
+
$[12] = props;
|
|
48
|
+
$[13] = testIdProp;
|
|
47
49
|
} else {
|
|
48
50
|
anchorPoint = $[1];
|
|
49
51
|
children = $[2];
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
52
|
+
closeOnInteractOutside = $[3];
|
|
53
|
+
closeOnSelect = $[4];
|
|
54
|
+
defaultOpen = $[5];
|
|
55
|
+
highlightedValue = $[6];
|
|
56
|
+
ids = $[7];
|
|
57
|
+
onHighlightChange = $[8];
|
|
58
|
+
onOpenChange = $[9];
|
|
59
|
+
open = $[10];
|
|
60
|
+
positioning = $[11];
|
|
61
|
+
props = $[12];
|
|
62
|
+
testIdProp = $[13];
|
|
60
63
|
}
|
|
61
64
|
const inheritedTestId = useTestId();
|
|
62
65
|
const testId = testIdProp ?? inheritedTestId;
|
|
@@ -64,64 +67,73 @@ const DropdownMenu = (t0)=>{
|
|
|
64
67
|
const isNested = null !== parent;
|
|
65
68
|
const defaultPositioning = isNested ? SUB_POSITIONING : ROOT_POSITIONING;
|
|
66
69
|
let t1;
|
|
67
|
-
if ($[
|
|
70
|
+
if ($[14] !== onOpenChange) {
|
|
68
71
|
t1 = (details)=>{
|
|
69
72
|
onOpenChange?.(details.open);
|
|
70
73
|
};
|
|
71
|
-
$[
|
|
72
|
-
$[
|
|
73
|
-
} else t1 = $[
|
|
74
|
+
$[14] = onOpenChange;
|
|
75
|
+
$[15] = t1;
|
|
76
|
+
} else t1 = $[15];
|
|
74
77
|
const handleOpenChange = t1;
|
|
75
78
|
let t2;
|
|
76
|
-
if ($[
|
|
79
|
+
if ($[16] === Symbol.for("react.memo_cache_sentinel")) {
|
|
77
80
|
t2 = {
|
|
78
81
|
isNested: true
|
|
79
82
|
};
|
|
80
|
-
$[
|
|
81
|
-
} else t2 = $[
|
|
83
|
+
$[16] = t2;
|
|
84
|
+
} else t2 = $[16];
|
|
82
85
|
const ctx = t2;
|
|
83
86
|
const t3 = positioning ?? defaultPositioning;
|
|
84
87
|
let t4;
|
|
85
|
-
if ($[
|
|
88
|
+
if ($[17] !== anchorPoint) {
|
|
86
89
|
t4 = null != anchorPoint && {
|
|
87
90
|
anchorPoint
|
|
88
91
|
};
|
|
89
|
-
$[
|
|
90
|
-
$[
|
|
91
|
-
} else t4 = $[
|
|
92
|
+
$[17] = anchorPoint;
|
|
93
|
+
$[18] = t4;
|
|
94
|
+
} else t4 = $[18];
|
|
92
95
|
let t5;
|
|
93
|
-
if ($[
|
|
96
|
+
if ($[19] !== highlightedValue) {
|
|
94
97
|
t5 = null != highlightedValue && {
|
|
95
98
|
highlightedValue
|
|
96
99
|
};
|
|
97
|
-
$[
|
|
98
|
-
$[
|
|
99
|
-
} else t5 = $[
|
|
100
|
+
$[19] = highlightedValue;
|
|
101
|
+
$[20] = t5;
|
|
102
|
+
} else t5 = $[20];
|
|
100
103
|
let t6;
|
|
101
|
-
if ($[
|
|
104
|
+
if ($[21] !== closeOnSelect) {
|
|
102
105
|
t6 = null != closeOnSelect && {
|
|
103
106
|
closeOnSelect
|
|
104
107
|
};
|
|
105
|
-
$[
|
|
106
|
-
$[
|
|
107
|
-
} else t6 = $[
|
|
108
|
+
$[21] = closeOnSelect;
|
|
109
|
+
$[22] = t6;
|
|
110
|
+
} else t6 = $[22];
|
|
108
111
|
let t7;
|
|
109
|
-
if ($[
|
|
110
|
-
t7 = null !=
|
|
111
|
-
|
|
112
|
+
if ($[23] !== closeOnInteractOutside) {
|
|
113
|
+
t7 = null != closeOnInteractOutside && {
|
|
114
|
+
closeOnInteractOutside
|
|
112
115
|
};
|
|
113
|
-
$[
|
|
114
|
-
$[
|
|
115
|
-
} else t7 = $[
|
|
116
|
+
$[23] = closeOnInteractOutside;
|
|
117
|
+
$[24] = t7;
|
|
118
|
+
} else t7 = $[24];
|
|
116
119
|
let t8;
|
|
117
|
-
if ($[
|
|
118
|
-
t8 =
|
|
120
|
+
if ($[25] !== onHighlightChange) {
|
|
121
|
+
t8 = null != onHighlightChange && {
|
|
122
|
+
onHighlightChange
|
|
123
|
+
};
|
|
124
|
+
$[25] = onHighlightChange;
|
|
125
|
+
$[26] = t8;
|
|
126
|
+
} else t8 = $[26];
|
|
127
|
+
let t9;
|
|
128
|
+
if ($[27] !== children || $[28] !== defaultOpen || $[29] !== handleOpenChange || $[30] !== ids || $[31] !== open || $[32] !== props || $[33] !== t3 || $[34] !== t4 || $[35] !== t5 || $[36] !== t6 || $[37] !== t7 || $[38] !== t8) {
|
|
129
|
+
t9 = /*#__PURE__*/ jsx(Menu.Root, {
|
|
119
130
|
...props,
|
|
120
131
|
positioning: t3,
|
|
121
132
|
...t4,
|
|
122
133
|
...t5,
|
|
123
134
|
...t6,
|
|
124
135
|
...t7,
|
|
136
|
+
...t8,
|
|
125
137
|
open: open,
|
|
126
138
|
defaultOpen: defaultOpen,
|
|
127
139
|
onOpenChange: handleOpenChange,
|
|
@@ -130,34 +142,35 @@ const DropdownMenu = (t0)=>{
|
|
|
130
142
|
unmountOnExit: true,
|
|
131
143
|
children: children
|
|
132
144
|
});
|
|
133
|
-
$[
|
|
134
|
-
$[
|
|
135
|
-
$[
|
|
136
|
-
$[
|
|
137
|
-
$[
|
|
138
|
-
$[
|
|
139
|
-
$[
|
|
140
|
-
$[
|
|
141
|
-
$[
|
|
142
|
-
$[
|
|
143
|
-
$[
|
|
144
|
-
$[
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
145
|
+
$[27] = children;
|
|
146
|
+
$[28] = defaultOpen;
|
|
147
|
+
$[29] = handleOpenChange;
|
|
148
|
+
$[30] = ids;
|
|
149
|
+
$[31] = open;
|
|
150
|
+
$[32] = props;
|
|
151
|
+
$[33] = t3;
|
|
152
|
+
$[34] = t4;
|
|
153
|
+
$[35] = t5;
|
|
154
|
+
$[36] = t6;
|
|
155
|
+
$[37] = t7;
|
|
156
|
+
$[38] = t8;
|
|
157
|
+
$[39] = t9;
|
|
158
|
+
} else t9 = $[39];
|
|
159
|
+
const root = t9;
|
|
160
|
+
let t10;
|
|
161
|
+
if ($[40] !== root || $[41] !== testId) {
|
|
162
|
+
t10 = /*#__PURE__*/ jsx(DropdownMenuContext.Provider, {
|
|
150
163
|
value: ctx,
|
|
151
164
|
children: /*#__PURE__*/ jsx(TestIdProvider, {
|
|
152
165
|
value: testId,
|
|
153
166
|
children: root
|
|
154
167
|
})
|
|
155
168
|
});
|
|
156
|
-
$[
|
|
157
|
-
$[
|
|
158
|
-
$[
|
|
159
|
-
} else
|
|
160
|
-
return
|
|
169
|
+
$[40] = root;
|
|
170
|
+
$[41] = testId;
|
|
171
|
+
$[42] = t10;
|
|
172
|
+
} else t10 = $[42];
|
|
173
|
+
return t10;
|
|
161
174
|
};
|
|
162
175
|
DropdownMenu.displayName = "DropdownMenu";
|
|
163
176
|
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: "xs",
|
|
13
13
|
color: "secondary",
|
|
14
14
|
"data-slot": "dropdown-menu-item-description",
|
|
15
15
|
"data-testid": testId,
|
|
@@ -5,8 +5,8 @@ const LogoWordmarkPath = ()=>{
|
|
|
5
5
|
let t0;
|
|
6
6
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
7
7
|
t0 = /*#__PURE__*/ jsx("path", {
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
fillRule: "evenodd",
|
|
9
|
+
clipRule: "evenodd",
|
|
10
10
|
d: "M7.39274 6.09793H9.499L12.137 14.012L14.2433 6.09793H16.8813L13.1902 17.7032H11.0839L8.44587 9.78909L5.80784 17.7032H3.70158L0 6.09793H2.63803L4.74428 14.012L7.38232 6.09793H7.39274ZM21.2502 15.9827C22.9811 15.9827 24.2741 15.013 24.2741 13.5845V12.8651C23.6067 12.6044 22.6787 12.4063 21.6569 12.4063C20.0198 12.4063 19.0397 13.0736 19.0397 14.2414V14.2831C19.0397 15.3675 20.0094 15.9723 21.2398 15.9723L21.2502 15.9827ZM18.4662 6.69227C19.4359 6.34818 20.4995 6.12922 21.8967 6.12922C25.2646 6.12922 26.9121 7.80796 26.9121 10.8526V17.7136H24.2741V16.3164C23.492 17.2444 22.3555 17.9534 20.6246 17.9534C18.4662 17.9534 16.5685 16.723 16.5685 14.4291V14.3874C16.5685 11.9266 18.5392 10.7171 21.1877 10.7171C22.5745 10.7171 23.3878 10.9152 24.2741 11.1967V10.9152C24.2741 9.34073 23.3461 8.47529 21.5318 8.47529C20.3535 8.47529 19.4151 8.72554 18.4662 9.10091V6.71313V6.69227ZM28.497 17.7032V1.875H31.135V17.7032H28.497ZM32.7199 17.7032V1.875H35.358L35.4101 17.7032H32.7199ZM41.3118 15.9827C43.0427 15.9827 44.3356 15.013 44.3356 13.5845V12.8651C43.6683 12.6044 42.7403 12.4063 41.7184 12.4063C40.0814 12.4063 39.1012 13.0736 39.1012 14.2414V14.2831C39.1012 15.3675 40.071 15.9723 41.3013 15.9723L41.3118 15.9827ZM38.5278 6.69227C39.487 6.34818 40.561 6.12922 41.9582 6.12922C45.3262 6.12922 46.9632 7.80796 46.9632 10.8526V17.7136H44.3252V16.3164C43.5431 17.2444 42.4066 17.9534 40.6757 17.9534C38.5173 17.9534 36.6196 16.723 36.6196 14.4291V14.3874C36.6196 11.9266 38.5903 10.7171 41.2388 10.7171C42.6256 10.7171 43.4389 10.9152 44.3252 11.1967V10.9152C44.3252 9.34073 43.3972 8.47529 41.5829 8.47529C40.4046 8.47529 39.4662 8.72554 38.5173 9.10091V6.71313L38.5278 6.69227ZM48.5481 17.7032V6.09793H51.1861V8.6734C51.8952 6.96338 53.1881 5.79555 55.1901 5.88939V8.65255H55.0441C52.7502 8.65255 51.1861 10.1436 51.1861 13.1674V17.7136H48.5481V17.7032ZM73.8857 10.227V17.7136H71.2477V11.1759C71.2477 9.36159 70.4344 8.23547 68.9642 8.23547C67.494 8.23547 66.5034 9.34073 66.5034 11.1759V17.7136H63.8654V11.0091C63.8654 9.23646 63.0521 8.23547 61.6027 8.23547C60.1534 8.23547 59.1107 9.40329 59.1107 11.1759V17.7136H56.4726V6.09793H59.1107V7.82882C59.851 6.8174 60.8832 5.85811 62.635 5.85811C64.272 5.85811 65.419 6.66099 66.0238 7.87052C66.9518 6.66099 68.1613 5.85811 69.8922 5.85811C72.3738 5.85811 73.8857 7.43259 73.8857 10.227Z",
|
|
11
11
|
fill: "currentColor"
|
|
12
12
|
});
|
package/dist/index.d.ts
CHANGED
|
@@ -118,4 +118,5 @@ export { UtilityPage, type UtilityPageProps } from './components/UtilityPage/ind
|
|
|
118
118
|
export { ApprovalCardView, type ApprovalCardViewProps, ChainOfThoughtView, type ChainOfThoughtViewProps, type ChatApprovalOption, type ChatApprovalOptionKind, type ChatApprovalPart, type ChatApprovalResponse, type ChatApprovalStatus, type ChatAssistantMessage, type ChatAssistantPart, type ChatChainOfThoughtPart, type ChatContextItem, type ChatCustomPart, type ChatErrorPart, type ChatFeedback, type ChatIconKey, type ChatId, type ChatLabels, type ChatMarkdownProps, type ChatMessage, type ChatMessageActionNodes, ChatMessageView, type ChatMessageViewProps, type ChatMeta, type ChatOpen, type ChatPart, type ChatPartRenderContext, ChatPartView, type ChatPartViewProps, type ChatSnapshot, type ChatStatus, type ChatStep, type ChatStepKind, type ChatStepRenderContext, type ChatStepStatus, type ChatSuggestionItem, type ChatTextPart, type ChatToolPermission, type ChatUserMessage, type ChatUserPart, type ChatViewConfig, ChatViewProvider, type ChatViewProviderProps, type ChatViewState, copyTextOf, DEFAULT_CHAT_LABELS, deriveChatState, WallyAssistant, type WallyAssistantProps, } from './components/WallyAssistant/index.js';
|
|
119
119
|
export { WallyIcon, type WallyIconProps, type WallyIconSize, type WallyIconStyle, } from './components/WallyIcon/index.js';
|
|
120
120
|
export { WallySkeleton, type WallySkeletonProps } from './components/WallySkeleton/index.js';
|
|
121
|
+
export { cn } from './utils/cn.js';
|
|
121
122
|
export { type TestableProps, TestIdProvider, useTestId } from './utils/testId.js';
|
package/dist/index.js
CHANGED
|
@@ -107,4 +107,5 @@ export { UtilityPage } from "./components/UtilityPage/index.js";
|
|
|
107
107
|
export { ApprovalCardView, ChainOfThoughtView, ChatMessageView, ChatPartView, ChatViewProvider, DEFAULT_CHAT_LABELS, WallyAssistant, copyTextOf, deriveChatState } from "./components/WallyAssistant/index.js";
|
|
108
108
|
export { WallyIcon } from "./components/WallyIcon/index.js";
|
|
109
109
|
export { WallySkeleton } from "./components/WallySkeleton/index.js";
|
|
110
|
+
export { cn } from "./utils/cn.js";
|
|
110
111
|
export { TestIdProvider, useTestId } from "./utils/testId.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "4.
|
|
3
|
-
"generatedAt": "2026-11-
|
|
2
|
+
"version": "4.11.0",
|
|
3
|
+
"generatedAt": "2026-11-09T11:06:07.225Z",
|
|
4
4
|
"components": [
|
|
5
5
|
{
|
|
6
6
|
"name": "Accordion",
|
|
@@ -2758,6 +2758,12 @@
|
|
|
2758
2758
|
"required": false,
|
|
2759
2759
|
"description": "Whether selecting an item closes the menu (default true)"
|
|
2760
2760
|
},
|
|
2761
|
+
{
|
|
2762
|
+
"name": "closeOnInteractOutside",
|
|
2763
|
+
"type": "boolean | undefined",
|
|
2764
|
+
"required": false,
|
|
2765
|
+
"description": "Whether to close the menu when clicking/interacting outside (default true)"
|
|
2766
|
+
},
|
|
2761
2767
|
{
|
|
2762
2768
|
"name": "onRequestDismiss",
|
|
2763
2769
|
"type": "((event: LayerDismissEvent) => void) | undefined",
|
|
@@ -12683,6 +12689,12 @@
|
|
|
12683
12689
|
"required": false,
|
|
12684
12690
|
"description": "Whether selecting an item closes the menu (default true)"
|
|
12685
12691
|
},
|
|
12692
|
+
{
|
|
12693
|
+
"name": "closeOnInteractOutside",
|
|
12694
|
+
"type": "boolean | undefined",
|
|
12695
|
+
"required": false,
|
|
12696
|
+
"description": "Whether to close the menu when clicking/interacting outside (default true)"
|
|
12697
|
+
},
|
|
12686
12698
|
{
|
|
12687
12699
|
"name": "onRequestDismiss",
|
|
12688
12700
|
"type": "((event: LayerDismissEvent) => void) | undefined",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "4.
|
|
2
|
+
"version": "4.11.0",
|
|
3
3
|
"rules": "Every numeric utility is in px, not 4px steps: p-16 is 16px, p-4 is 4px. Translate Tailwind habits (p-4 → p-16, gap-6 → gap-24, w-64 → w-256).\n\nBefore composing a screen, call get_guideline for the pattern (app shell, list page, table, drawer, form, dialog, filters, empty state, settings, auth). Wrong → right:\n\n- p-5, gap-3, p-10 → stay on the scale: 1, 2, 4, 6, 8, 12, 16, 20, 24, 28, 32, 40, 48, 64…\n- space-y-4, margins per child → <VStack gap={16}>, <HStack gap={8}>\n- Padded page wrapper → PageHeader / PageToolbar / PageContent own the 24px gutter\n- p-* on Card, DrawerBody, DialogBody, PageToolbar, Table → none; they own their padding\n- className on Text, Heading, Field, Drawer/Dialog Header/Body/Footer → wrap in your own element\n- Raw <h1>, <p>, <label> → <Heading as=\"h2\" size=\"lg\">, <Text size=\"sm\">, Field\n- <Text> default (16px) for body → size=\"sm\"\n- leading-none (0px), leading-5 (5px) → leading-sm, leading-20\n- weight=\"semibold\" → weight is light|regular|medium|bold (medium = 450)\n- bg-primary, text-muted, bg-card, bg-white → bg-bg-primary, text-text-secondary, bg-bg-surface-1\n- text-error, bg-red-500 → danger tokens; categorical color → Badge color\n- dark: variant, setting data-theme → semantic tokens, useTheme().setTheme()\n- rounded-lg, rounded, rounded-[15px] → rounded-8 (controls), rounded-12 (panels)\n- shadow-* on DS components, z-* on overlays → never; they own both\n- focus:ring → focus-visible:ring-3 ring-focus-primary outline-none\n- size, DIALOG/DRAWER_SIZES → width: Dialog 400 confirm, 560 default, 960 picker; Drawer 640 default, 700 Timeline form\n- Dialog, useToast from the root → @wallarm-org/design-system/Dialog, /Toast\n- Field invalid → error on the control + FieldError\n- Table actions column → meta.renderMenuAction on the master column\n- Hand-built side menu → RemoteShell config={NavConfig}\n- ConfirmDialog, FilterBar, Combobox → compose Dialog parts, PageToolbar + FilterDropdown, Select + useSelectSearch\n- data-slot in tests → data-testid\n",
|
|
4
4
|
"guidelines": [
|
|
5
5
|
{
|
package/package.json
CHANGED