@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.
Files changed (176) hide show
  1. package/README.md +4 -2
  2. package/dist/components/BulkBar/index.d.ts +5 -0
  3. package/dist/components/Drawer/classes.js +1 -1
  4. package/dist/components/DropdownMenu/DropdownMenu.d.ts +0 -2
  5. package/dist/components/DropdownMenu/DropdownMenu.js +71 -84
  6. package/dist/components/DropdownMenu/DropdownMenuItemDescription.js +1 -1
  7. package/dist/components/FilterInput/hooks/useFilterInputAutocomplete/useFilterInputAutocomplete.js +1 -1
  8. package/dist/components/NotificationCenter/NotificationCenter.d.ts +20 -0
  9. package/dist/components/NotificationCenter/NotificationCenter.js +65 -0
  10. package/dist/components/NotificationCenter/NotificationCenterBody.d.ts +18 -0
  11. package/dist/components/NotificationCenter/NotificationCenterBody.js +202 -0
  12. package/dist/components/NotificationCenter/NotificationCenterContent.d.ts +5 -0
  13. package/dist/components/NotificationCenter/NotificationCenterContent.js +42 -0
  14. package/dist/components/NotificationCenter/NotificationCenterHeader.d.ts +20 -0
  15. package/dist/components/NotificationCenter/NotificationCenterHeader.js +202 -0
  16. package/dist/components/NotificationCenter/NotificationCenterItem.d.ts +26 -0
  17. package/dist/components/NotificationCenter/NotificationCenterItem.js +211 -0
  18. package/dist/components/NotificationCenter/NotificationCenterItemTime.d.ts +9 -0
  19. package/dist/components/NotificationCenter/NotificationCenterItemTime.js +148 -0
  20. package/dist/components/NotificationCenter/NotificationCenterItemTitle.d.ts +14 -0
  21. package/dist/components/NotificationCenter/NotificationCenterItemTitle.js +115 -0
  22. package/dist/components/NotificationCenter/NotificationCenterTabs.d.ts +10 -0
  23. package/dist/components/NotificationCenter/NotificationCenterTabs.js +77 -0
  24. package/dist/components/NotificationCenter/NotificationCenterTrigger.d.ts +13 -0
  25. package/dist/components/NotificationCenter/NotificationCenterTrigger.js +138 -0
  26. package/dist/components/NotificationCenter/index.d.ts +9 -0
  27. package/dist/components/NotificationCenter/index.js +9 -0
  28. package/dist/components/Overlay/Overlay.js +1 -1
  29. package/dist/components/SearchInput/SearchInput.d.ts +7 -5
  30. package/dist/components/SearchInput/SearchInput.js +119 -101
  31. package/dist/components/Select/SelectSearchInput.d.ts +1 -1
  32. package/dist/components/Table/types.d.ts +1 -1
  33. package/dist/components/Tabs/Tabs.d.ts +1 -0
  34. package/dist/components/Tabs/Tabs.js +30 -28
  35. package/dist/components/Tabs/TabsList/index.d.ts +1 -1
  36. package/dist/components/Tabs/index.d.ts +2 -2
  37. package/dist/components/Tour/TourPositioner.d.ts +3 -0
  38. package/dist/components/Tour/TourPositioner.js +4 -4
  39. package/dist/guidelines/foundations/color.md +157 -0
  40. package/dist/guidelines/foundations/focus.md +122 -0
  41. package/dist/guidelines/foundations/layering.md +131 -0
  42. package/dist/guidelines/foundations/radius-elevation.md +111 -0
  43. package/dist/guidelines/foundations/spacing.md +117 -0
  44. package/dist/guidelines/foundations/typography.md +114 -0
  45. package/dist/guidelines/patterns/app-layout.md +1567 -0
  46. package/dist/guidelines/patterns/auth-page.md +668 -0
  47. package/dist/guidelines/patterns/confirmation-dialogs.md +605 -0
  48. package/dist/guidelines/patterns/create-edit-forms.md +768 -0
  49. package/dist/guidelines/patterns/detail-drawer.md +868 -0
  50. package/dist/guidelines/patterns/empty-states.md +461 -0
  51. package/dist/guidelines/patterns/entity-table.md +533 -0
  52. package/dist/guidelines/patterns/feedback-toasts.md +493 -0
  53. package/dist/guidelines/patterns/filtering.md +630 -0
  54. package/dist/guidelines/patterns/resource-list-page.md +558 -0
  55. package/dist/guidelines/patterns/settings-page.md +752 -0
  56. package/dist/guidelines/rules.md +25 -0
  57. package/dist/index.d.ts +2 -3
  58. package/dist/index.js +1 -2
  59. package/dist/metadata/components.json +12431 -9208
  60. package/dist/metadata/guidelines.json +1705 -0
  61. package/dist/theme/typography.css +5 -0
  62. package/dist/utils/formatDateTime.d.ts +6 -0
  63. package/dist/utils/formatDateTime.js +13 -1
  64. package/package.json +6 -4
  65. package/dist/components/Rules/PointSelector/KeyboardShortcutsDialog.d.ts +0 -14
  66. package/dist/components/Rules/PointSelector/KeyboardShortcutsDialog.js +0 -209
  67. package/dist/components/Rules/PointSelector/MatchStep.d.ts +0 -15
  68. package/dist/components/Rules/PointSelector/MatchStep.js +0 -186
  69. package/dist/components/Rules/PointSelector/MenuFooterHints.d.ts +0 -16
  70. package/dist/components/Rules/PointSelector/MenuFooterHints.js +0 -177
  71. package/dist/components/Rules/PointSelector/PointPreview.d.ts +0 -10
  72. package/dist/components/Rules/PointSelector/PointPreview.js +0 -88
  73. package/dist/components/Rules/PointSelector/PointSelector.d.ts +0 -17
  74. package/dist/components/Rules/PointSelector/PointSelector.js +0 -937
  75. package/dist/components/Rules/PointSelector/PointSelectorEmptyState.d.ts +0 -12
  76. package/dist/components/Rules/PointSelector/PointSelectorEmptyState.js +0 -173
  77. package/dist/components/Rules/PointSelector/PointSelectorError.d.ts +0 -31
  78. package/dist/components/Rules/PointSelector/PointSelectorError.js +0 -275
  79. package/dist/components/Rules/PointSelector/PointSelectorInput.d.ts +0 -20
  80. package/dist/components/Rules/PointSelector/PointSelectorInput.js +0 -130
  81. package/dist/components/Rules/PointSelector/PointSelectorMenu.d.ts +0 -31
  82. package/dist/components/Rules/PointSelector/PointSelectorMenu.js +0 -317
  83. package/dist/components/Rules/PointSelector/PointSelectorSkeleton.d.ts +0 -8
  84. package/dist/components/Rules/PointSelector/PointSelectorSkeleton.js +0 -73
  85. package/dist/components/Rules/PointSelector/SampleRequest.d.ts +0 -14
  86. package/dist/components/Rules/PointSelector/SampleRequest.js +0 -116
  87. package/dist/components/Rules/PointSelector/StepMenu.d.ts +0 -40
  88. package/dist/components/Rules/PointSelector/StepMenu.js +0 -210
  89. package/dist/components/Rules/PointSelector/VersionWarning.d.ts +0 -26
  90. package/dist/components/Rules/PointSelector/VersionWarning.js +0 -231
  91. package/dist/components/Rules/PointSelector/WhereBar.d.ts +0 -48
  92. package/dist/components/Rules/PointSelector/WhereBar.js +0 -263
  93. package/dist/components/Rules/PointSelector/classes.d.ts +0 -28
  94. package/dist/components/Rules/PointSelector/classes.js +0 -22
  95. package/dist/components/Rules/PointSelector/index.d.ts +0 -20
  96. package/dist/components/Rules/PointSelector/index.js +0 -18
  97. package/dist/components/Rules/PointSelector/liftLayer.d.ts +0 -8
  98. package/dist/components/Rules/PointSelector/liftLayer.js +0 -4
  99. package/dist/components/Rules/PointSelector/sampleValue.d.ts +0 -6
  100. package/dist/components/Rules/PointSelector/sampleValue.js +0 -51
  101. package/dist/components/Rules/PointSelector/sdkBridge.d.ts +0 -508
  102. package/dist/components/Rules/PointSelector/sdkBridge.js +0 -339
  103. package/dist/components/Rules/PointSelector/types.d.ts +0 -304
  104. package/dist/components/Rules/PointSelector/types.js +0 -0
  105. package/dist/components/Rules/PointSelector/usePointSelector.d.ts +0 -161
  106. package/dist/components/Rules/PointSelector/usePointSelector.js +0 -1088
  107. package/dist/components/Rules/RuleBuilder/ActionEditor/ActionEditor.d.ts +0 -28
  108. package/dist/components/Rules/RuleBuilder/ActionEditor/ActionEditor.js +0 -208
  109. package/dist/components/Rules/RuleBuilder/ActionEditor/ActionFields.d.ts +0 -23
  110. package/dist/components/Rules/RuleBuilder/ActionEditor/ActionFields.js +0 -950
  111. package/dist/components/Rules/RuleBuilder/ActionEditor/ActionTargetPicker.d.ts +0 -21
  112. package/dist/components/Rules/RuleBuilder/ActionEditor/ActionTargetPicker.js +0 -110
  113. package/dist/components/Rules/RuleBuilder/ActionEditor/ActionTypeSelect.d.ts +0 -20
  114. package/dist/components/Rules/RuleBuilder/ActionEditor/ActionTypeSelect.js +0 -31
  115. package/dist/components/Rules/RuleBuilder/ActionEditor/AttackTypeField.d.ts +0 -23
  116. package/dist/components/Rules/RuleBuilder/ActionEditor/AttackTypeField.js +0 -131
  117. package/dist/components/Rules/RuleBuilder/ActionEditor/classes.d.ts +0 -17
  118. package/dist/components/Rules/RuleBuilder/ActionEditor/classes.js +0 -14
  119. package/dist/components/Rules/RuleBuilder/ActionEditor/index.d.ts +0 -6
  120. package/dist/components/Rules/RuleBuilder/ActionEditor/index.js +0 -6
  121. package/dist/components/Rules/RuleBuilder/ConditionTree/AddConditionMenu.d.ts +0 -24
  122. package/dist/components/Rules/RuleBuilder/ConditionTree/AddConditionMenu.js +0 -245
  123. package/dist/components/Rules/RuleBuilder/ConditionTree/AttackCondition.d.ts +0 -15
  124. package/dist/components/Rules/RuleBuilder/ConditionTree/AttackCondition.js +0 -691
  125. package/dist/components/Rules/RuleBuilder/ConditionTree/ConditionCard.d.ts +0 -19
  126. package/dist/components/Rules/RuleBuilder/ConditionTree/ConditionCard.js +0 -72
  127. package/dist/components/Rules/RuleBuilder/ConditionTree/ConditionTree.d.ts +0 -27
  128. package/dist/components/Rules/RuleBuilder/ConditionTree/ConditionTree.js +0 -407
  129. package/dist/components/Rules/RuleBuilder/ConditionTree/FieldCondition.d.ts +0 -14
  130. package/dist/components/Rules/RuleBuilder/ConditionTree/FieldCondition.js +0 -269
  131. package/dist/components/Rules/RuleBuilder/ConditionTree/GroupCondition.d.ts +0 -25
  132. package/dist/components/Rules/RuleBuilder/ConditionTree/GroupCondition.js +0 -99
  133. package/dist/components/Rules/RuleBuilder/ConditionTree/SampleCondition.d.ts +0 -14
  134. package/dist/components/Rules/RuleBuilder/ConditionTree/SampleCondition.js +0 -118
  135. package/dist/components/Rules/RuleBuilder/ConditionTree/SignalCondition.d.ts +0 -14
  136. package/dist/components/Rules/RuleBuilder/ConditionTree/SignalCondition.js +0 -446
  137. package/dist/components/Rules/RuleBuilder/ConditionTree/TagCondition.d.ts +0 -14
  138. package/dist/components/Rules/RuleBuilder/ConditionTree/TagCondition.js +0 -266
  139. package/dist/components/Rules/RuleBuilder/ConditionTree/classes.d.ts +0 -35
  140. package/dist/components/Rules/RuleBuilder/ConditionTree/classes.js +0 -57
  141. package/dist/components/Rules/RuleBuilder/ConditionTree/index.d.ts +0 -15
  142. package/dist/components/Rules/RuleBuilder/ConditionTree/index.js +0 -10
  143. package/dist/components/Rules/RuleBuilder/RuleBuilder.d.ts +0 -67
  144. package/dist/components/Rules/RuleBuilder/RuleBuilder.js +0 -366
  145. package/dist/components/Rules/RuleBuilder/Summary/ActionSummary.d.ts +0 -32
  146. package/dist/components/Rules/RuleBuilder/Summary/ActionSummary.js +0 -420
  147. package/dist/components/Rules/RuleBuilder/Summary/ConditionSummary.d.ts +0 -27
  148. package/dist/components/Rules/RuleBuilder/Summary/ConditionSummary.js +0 -446
  149. package/dist/components/Rules/RuleBuilder/Summary/index.d.ts +0 -7
  150. package/dist/components/Rules/RuleBuilder/Summary/index.js +0 -2
  151. package/dist/components/Rules/RuleBuilder/classes.d.ts +0 -19
  152. package/dist/components/Rules/RuleBuilder/classes.js +0 -18
  153. package/dist/components/Rules/RuleBuilder/index.d.ts +0 -55
  154. package/dist/components/Rules/RuleBuilder/index.js +0 -11
  155. package/dist/components/Rules/RuleBuilder/models/actionModel.d.ts +0 -31
  156. package/dist/components/Rules/RuleBuilder/models/actionModel.js +0 -276
  157. package/dist/components/Rules/RuleBuilder/models/conditionModel.d.ts +0 -95
  158. package/dist/components/Rules/RuleBuilder/models/conditionModel.js +0 -418
  159. package/dist/components/Rules/RuleBuilder/models/index.d.ts +0 -3
  160. package/dist/components/Rules/RuleBuilder/models/index.js +0 -3
  161. package/dist/components/Rules/RuleBuilder/models/validation.d.ts +0 -176
  162. package/dist/components/Rules/RuleBuilder/models/validation.js +0 -242
  163. package/dist/components/Rules/RuleBuilder/shared/ChoiceSelect.d.ts +0 -27
  164. package/dist/components/Rules/RuleBuilder/shared/ChoiceSelect.js +0 -92
  165. package/dist/components/Rules/RuleBuilder/shared/index.d.ts +0 -1
  166. package/dist/components/Rules/RuleBuilder/shared/index.js +0 -1
  167. package/dist/components/Rules/RuleBuilder/types.d.ts +0 -384
  168. package/dist/components/Rules/RuleBuilder/types.js +0 -0
  169. package/dist/components/Rules/RuleBuilder/utils/constants.d.ts +0 -65
  170. package/dist/components/Rules/RuleBuilder/utils/constants.js +0 -356
  171. package/dist/components/Rules/RuleBuilder/utils/extractBindings.d.ts +0 -48
  172. package/dist/components/Rules/RuleBuilder/utils/extractBindings.js +0 -42
  173. package/dist/components/Rules/RuleBuilder/utils/helpers.d.ts +0 -92
  174. package/dist/components/Rules/RuleBuilder/utils/helpers.js +0 -54
  175. package/dist/components/Rules/RuleBuilder/utils/index.d.ts +0 -2
  176. package/dist/components/Rules/RuleBuilder/utils/index.js +0 -2
@@ -1,266 +0,0 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
2
- import { c } from "react/compiler-runtime";
3
- import { Checkbox, CheckboxIndicator, CheckboxLabel } from "../../../Checkbox/index.js";
4
- import { Field, FieldDescription, FieldLabel } from "../../../Field/index.js";
5
- import { Input } from "../../../Input/index.js";
6
- import { Text } from "../../../Text/index.js";
7
- import { ConditionCard } from "./ConditionCard.js";
8
- const TagCondition = (t0)=>{
9
- const $ = c(51);
10
- const { condition, onChange, onRemove } = t0;
11
- let t1;
12
- if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
13
- t1 = /*#__PURE__*/ jsx(Text, {
14
- size: "sm",
15
- children: "The request has"
16
- });
17
- $[0] = t1;
18
- } else t1 = $[0];
19
- const t2 = condition.absent ? "no tag" : "tag";
20
- let t3;
21
- if ($[1] !== t2) {
22
- t3 = /*#__PURE__*/ jsxs("div", {
23
- className: "flex flex-wrap items-center gap-8",
24
- children: [
25
- t1,
26
- /*#__PURE__*/ jsx(Text, {
27
- size: "sm",
28
- weight: "medium",
29
- children: t2
30
- })
31
- ]
32
- });
33
- $[1] = t2;
34
- $[2] = t3;
35
- } else t3 = $[2];
36
- let t4;
37
- if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
38
- t4 = {
39
- width: 220
40
- };
41
- $[3] = t4;
42
- } else t4 = $[3];
43
- let t5;
44
- if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
45
- t5 = /*#__PURE__*/ jsx(FieldLabel, {
46
- children: "Tag key"
47
- });
48
- $[4] = t5;
49
- } else t5 = $[4];
50
- let t6;
51
- if ($[5] !== condition || $[6] !== onChange) {
52
- t6 = (e)=>onChange({
53
- ...condition,
54
- tagKey: e.target.value
55
- });
56
- $[5] = condition;
57
- $[6] = onChange;
58
- $[7] = t6;
59
- } else t6 = $[7];
60
- let t7;
61
- if ($[8] !== condition.tagKey || $[9] !== t6) {
62
- t7 = /*#__PURE__*/ jsx("div", {
63
- style: t4,
64
- children: /*#__PURE__*/ jsxs(Field, {
65
- children: [
66
- t5,
67
- /*#__PURE__*/ jsx(Input, {
68
- value: condition.tagKey,
69
- onChange: t6,
70
- placeholder: "my-tag-key"
71
- })
72
- ]
73
- })
74
- });
75
- $[8] = condition.tagKey;
76
- $[9] = t6;
77
- $[10] = t7;
78
- } else t7 = $[10];
79
- let t8;
80
- if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
81
- t8 = {
82
- width: 220
83
- };
84
- $[11] = t8;
85
- } else t8 = $[11];
86
- let t9;
87
- if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
88
- t9 = /*#__PURE__*/ jsx(FieldLabel, {
89
- children: "Tag value (optional)"
90
- });
91
- $[12] = t9;
92
- } else t9 = $[12];
93
- let t10;
94
- if ($[13] !== condition || $[14] !== onChange) {
95
- t10 = (e_0)=>onChange({
96
- ...condition,
97
- tagValue: e_0.target.value
98
- });
99
- $[13] = condition;
100
- $[14] = onChange;
101
- $[15] = t10;
102
- } else t10 = $[15];
103
- let t11;
104
- if ($[16] !== condition.tagValue || $[17] !== t10) {
105
- t11 = /*#__PURE__*/ jsx(Input, {
106
- value: condition.tagValue,
107
- onChange: t10,
108
- placeholder: "Any value"
109
- });
110
- $[16] = condition.tagValue;
111
- $[17] = t10;
112
- $[18] = t11;
113
- } else t11 = $[18];
114
- let t12;
115
- if ($[19] === Symbol.for("react.memo_cache_sentinel")) {
116
- t12 = /*#__PURE__*/ jsx(FieldDescription, {
117
- children: "Leave empty to match any value"
118
- });
119
- $[19] = t12;
120
- } else t12 = $[19];
121
- let t13;
122
- if ($[20] !== t11) {
123
- t13 = /*#__PURE__*/ jsx("div", {
124
- style: t8,
125
- children: /*#__PURE__*/ jsxs(Field, {
126
- children: [
127
- t9,
128
- t11,
129
- t12
130
- ]
131
- })
132
- });
133
- $[20] = t11;
134
- $[21] = t13;
135
- } else t13 = $[21];
136
- let t14;
137
- if ($[22] !== t13 || $[23] !== t7) {
138
- t14 = /*#__PURE__*/ jsxs("div", {
139
- className: "flex flex-wrap gap-12",
140
- children: [
141
- t7,
142
- t13
143
- ]
144
- });
145
- $[22] = t13;
146
- $[23] = t7;
147
- $[24] = t14;
148
- } else t14 = $[24];
149
- let t15;
150
- if ($[25] === Symbol.for("react.memo_cache_sentinel")) {
151
- t15 = /*#__PURE__*/ jsx(FieldLabel, {
152
- children: "Point"
153
- });
154
- $[25] = t15;
155
- } else t15 = $[25];
156
- let t16;
157
- if ($[26] !== condition || $[27] !== onChange) {
158
- t16 = (e_1)=>onChange({
159
- ...condition,
160
- point: e_1.target.value
161
- });
162
- $[26] = condition;
163
- $[27] = onChange;
164
- $[28] = t16;
165
- } else t16 = $[28];
166
- let t17;
167
- if ($[29] !== condition.point || $[30] !== t16) {
168
- t17 = /*#__PURE__*/ jsx(Input, {
169
- value: condition.point,
170
- onChange: t16,
171
- placeholder: "flow",
172
- className: "font-mono text-sm"
173
- });
174
- $[29] = condition.point;
175
- $[30] = t16;
176
- $[31] = t17;
177
- } else t17 = $[31];
178
- let t18;
179
- if ($[32] === Symbol.for("react.memo_cache_sentinel")) {
180
- t18 = /*#__PURE__*/ jsx(FieldDescription, {
181
- children: 'Use "flow" for anywhere in the request, or a specific point'
182
- });
183
- $[32] = t18;
184
- } else t18 = $[32];
185
- let t19;
186
- if ($[33] !== t17) {
187
- t19 = /*#__PURE__*/ jsxs(Field, {
188
- children: [
189
- t15,
190
- t17,
191
- t18
192
- ]
193
- });
194
- $[33] = t17;
195
- $[34] = t19;
196
- } else t19 = $[34];
197
- const t20 = true === condition.absent;
198
- let t21;
199
- if ($[35] !== condition || $[36] !== onChange) {
200
- t21 = (d)=>onChange({
201
- ...condition,
202
- absent: true === d.checked || void 0
203
- });
204
- $[35] = condition;
205
- $[36] = onChange;
206
- $[37] = t21;
207
- } else t21 = $[37];
208
- let t22;
209
- let t23;
210
- if ($[38] === Symbol.for("react.memo_cache_sentinel")) {
211
- t22 = /*#__PURE__*/ jsx(CheckboxIndicator, {});
212
- t23 = /*#__PURE__*/ jsx(CheckboxLabel, {
213
- children: "Check that tag is NOT present (tag_absent)"
214
- });
215
- $[38] = t22;
216
- $[39] = t23;
217
- } else {
218
- t22 = $[38];
219
- t23 = $[39];
220
- }
221
- let t24;
222
- if ($[40] !== t20 || $[41] !== t21) {
223
- t24 = /*#__PURE__*/ jsxs(Checkbox, {
224
- checked: t20,
225
- onCheckedChange: t21,
226
- children: [
227
- t22,
228
- t23
229
- ]
230
- });
231
- $[40] = t20;
232
- $[41] = t21;
233
- $[42] = t24;
234
- } else t24 = $[42];
235
- let t25;
236
- if ($[43] !== t14 || $[44] !== t19 || $[45] !== t24 || $[46] !== t3) {
237
- t25 = /*#__PURE__*/ jsxs("div", {
238
- className: "flex flex-col gap-12",
239
- children: [
240
- t3,
241
- t14,
242
- t19,
243
- t24
244
- ]
245
- });
246
- $[43] = t14;
247
- $[44] = t19;
248
- $[45] = t24;
249
- $[46] = t3;
250
- $[47] = t25;
251
- } else t25 = $[47];
252
- let t26;
253
- if ($[48] !== onRemove || $[49] !== t25) {
254
- t26 = /*#__PURE__*/ jsx(ConditionCard, {
255
- onRemove: onRemove,
256
- removeLabel: "Remove tag condition",
257
- children: t25
258
- });
259
- $[48] = onRemove;
260
- $[49] = t25;
261
- $[50] = t26;
262
- } else t26 = $[50];
263
- return t26;
264
- };
265
- TagCondition.displayName = "TagCondition";
266
- export { TagCondition };
@@ -1,35 +0,0 @@
1
- /**
2
- * ConditionTree CVA Classes
3
- *
4
- * Variant definitions for condition tree components.
5
- */
6
- /**
7
- * Container for condition tree groups.
8
- */
9
- export declare const conditionTreeVariants: (props?: ({
10
- variant?: "nested" | "root" | null | undefined;
11
- } & import("class-variance-authority/types").ClassProp) | undefined) => string;
12
- /**
13
- * Condition card wrapper (for individual conditions).
14
- */
15
- export declare const conditionCardVariants: (props?: ({
16
- variant?: "default" | "error" | null | undefined;
17
- } & import("class-variance-authority/types").ClassProp) | undefined) => string;
18
- /**
19
- * Left border for nested groups (visual hierarchy).
20
- */
21
- export declare const groupBorderVariants: (props?: ({
22
- color?: "primary" | "secondary" | null | undefined;
23
- } & import("class-variance-authority/types").ClassProp) | undefined) => string;
24
- /**
25
- * Operator selector wrapper.
26
- */
27
- export declare const operatorSelectVariants: (props?: ({
28
- size?: "compact" | "default" | null | undefined;
29
- } & import("class-variance-authority/types").ClassProp) | undefined) => string;
30
- /**
31
- * Add condition button variants.
32
- */
33
- export declare const addConditionButtonVariants: (props?: ({
34
- state?: "default" | "disabled" | null | undefined;
35
- } & import("class-variance-authority/types").ClassProp) | undefined) => string;
@@ -1,57 +0,0 @@
1
- import { cva } from "class-variance-authority";
2
- const conditionTreeVariants = cva('flex flex-col gap-8', {
3
- variants: {
4
- variant: {
5
- root: '',
6
- nested: 'rounded-12 border border-border-primary-light p-12 pl-16 relative'
7
- }
8
- },
9
- defaultVariants: {
10
- variant: 'root'
11
- }
12
- });
13
- const conditionCardVariants = cva('flex items-start gap-8 rounded-12 border border-border-primary-light p-12', {
14
- variants: {
15
- variant: {
16
- default: '',
17
- error: 'border-border-danger-light'
18
- }
19
- },
20
- defaultVariants: {
21
- variant: 'default'
22
- }
23
- });
24
- const groupBorderVariants = cva('absolute left-0 top-0 bottom-0 w-4 rounded-l-12', {
25
- variants: {
26
- color: {
27
- primary: 'bg-bg-accent-primary',
28
- secondary: 'bg-bg-accent-secondary'
29
- }
30
- },
31
- defaultVariants: {
32
- color: 'primary'
33
- }
34
- });
35
- const operatorSelectVariants = cva('', {
36
- variants: {
37
- size: {
38
- default: 'w-96',
39
- compact: 'w-80'
40
- }
41
- },
42
- defaultVariants: {
43
- size: 'default'
44
- }
45
- });
46
- const addConditionButtonVariants = cva('', {
47
- variants: {
48
- state: {
49
- default: '',
50
- disabled: 'opacity-50 cursor-not-allowed'
51
- }
52
- },
53
- defaultVariants: {
54
- state: 'default'
55
- }
56
- });
57
- export { addConditionButtonVariants, conditionCardVariants, conditionTreeVariants, groupBorderVariants, operatorSelectVariants };
@@ -1,15 +0,0 @@
1
- /**
2
- * ConditionTree Components
3
- *
4
- * Exports for condition tree UI components.
5
- */
6
- export { AddConditionMenu, type AddConditionMenuProps } from './AddConditionMenu.js';
7
- export { AttackCondition, type AttackConditionProps } from './AttackCondition.js';
8
- export { ConditionCard, type ConditionCardProps } from './ConditionCard.js';
9
- export { ConditionTree, type ConditionTreeProps } from './ConditionTree.js';
10
- export { addConditionButtonVariants, conditionCardVariants, conditionTreeVariants, groupBorderVariants, operatorSelectVariants, } from './classes.js';
11
- export { FieldCondition, type FieldConditionProps } from './FieldCondition.js';
12
- export { GroupCondition, type GroupConditionProps } from './GroupCondition.js';
13
- export { SampleCondition, type SampleConditionProps } from './SampleCondition.js';
14
- export { SignalCondition, type SignalConditionProps } from './SignalCondition.js';
15
- export { TagCondition, type TagConditionProps } from './TagCondition.js';
@@ -1,10 +0,0 @@
1
- export { AddConditionMenu } from "./AddConditionMenu.js";
2
- export { AttackCondition } from "./AttackCondition.js";
3
- export { ConditionCard } from "./ConditionCard.js";
4
- export { ConditionTree } from "./ConditionTree.js";
5
- export { addConditionButtonVariants, conditionCardVariants, conditionTreeVariants, groupBorderVariants, operatorSelectVariants } from "./classes.js";
6
- export { FieldCondition } from "./FieldCondition.js";
7
- export { GroupCondition } from "./GroupCondition.js";
8
- export { SampleCondition } from "./SampleCondition.js";
9
- export { SignalCondition } from "./SignalCondition.js";
10
- export { TagCondition } from "./TagCondition.js";
@@ -1,67 +0,0 @@
1
- /**
2
- * RuleBuilder - Main orchestrator component
3
- *
4
- * Combines ConditionTree, ActionEditor, and code output into a complete
5
- * rule authoring interface. Manages validation display and section control.
6
- */
7
- import type { FC, ReactNode, Ref } from 'react';
8
- import { type Proton } from '@wallarm-org/rules-lib';
9
- import { type TestableProps } from '../../../utils/testId.js';
10
- import type { ActionDraft, Choice, GroupCondition } from './types.js';
11
- export type RuleBuilderSection = 'conditions' | 'action' | 'code';
12
- export interface RuleBuilderProps extends TestableProps {
13
- ref?: Ref<HTMLDivElement>;
14
- /** Rule ID (required, non-empty) — ruleset meta.id field */
15
- ruleId: string;
16
- /** Rule description (optional) — ruleset meta.desc field */
17
- ruleDescription?: string;
18
- /** Application scope (optional) — restricts rule to specific application_id */
19
- scope?: {
20
- application_id?: string;
21
- };
22
- /** Current condition tree (empty group = unconditional rule) */
23
- condition: GroupCondition;
24
- /** Current action configuration */
25
- action: ActionDraft;
26
- /** Called when condition tree changes */
27
- onConditionChange: (condition: GroupCondition) => void;
28
- /** Called when action changes */
29
- onActionChange: (action: ActionDraft) => void;
30
- /** Available attack types for selection */
31
- attackTypes: Choice[];
32
- /** Show validation errors (after first save attempt) */
33
- showProblems?: boolean;
34
- /** Which sections to render (default: all) */
35
- sections?: readonly RuleBuilderSection[];
36
- /** Content to render after conditions section */
37
- afterConditions?: ReactNode;
38
- /** Additional CSS class */
39
- className?: string;
40
- /** Proton SDK instance (optional, will use useProton if not provided) */
41
- proton?: Proton | null;
42
- }
43
- /**
44
- * Main RuleBuilder orchestrator component.
45
- *
46
- * Combines condition tree editing, action configuration, and JSON code output
47
- * into a complete rule authoring interface.
48
- *
49
- * @example
50
- * ```tsx
51
- * const [condition, setCondition] = useState(newGroup('and'));
52
- * const [action, setAction] = useState(newAction('add_attack'));
53
- *
54
- * <RuleBuilder
55
- * ruleId="my-rule-1"
56
- * ruleDescription="Block SQL injection attempts"
57
- * scope={{ application_id: 'app-123' }}
58
- * condition={condition}
59
- * action={action}
60
- * onConditionChange={setCondition}
61
- * onActionChange={setAction}
62
- * attackTypes={attackTypeChoices}
63
- * showProblems={showValidation}
64
- * />
65
- * ```
66
- */
67
- export declare const RuleBuilder: FC<RuleBuilderProps>;