@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
package/README.md
CHANGED
|
@@ -119,10 +119,8 @@ The command writes the component files, `src/icons/index.ts`, the gallery catego
|
|
|
119
119
|
|
|
120
120
|
Choose **Wallarm Design System** in Claude Design to prototype with the generated component
|
|
121
121
|
bundle, tokens, fonts and icons. See the [designer guide](https://wallarm.github.io/design-system/ai/claude-design).
|
|
122
|
-
The export is built by [`@wallarm-org/claude-design`](../claude-design/README.md)
|
|
123
|
-
|
|
124
|
-
prompt (`npx -y @wallarm-org/claude-design@latest export`); its README lists the build, test and
|
|
125
|
-
verify commands. The repository's
|
|
122
|
+
The export is built by the private [`@wallarm-org/claude-design`](../claude-design/README.md)
|
|
123
|
+
package; its README lists the build, test and verify commands. The repository's
|
|
126
124
|
`/claude-design-sync` skill previews and manually publishes release changes; the first sync and
|
|
127
125
|
remote deletions require confirmation. The npm package remains React 19; the separate canvas
|
|
128
126
|
bundle uses React 18.
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Building blocks of a bulk-action bar summary ("3 selected · Select all · Clear"). Not a bar to
|
|
3
|
-
* mount yourself: for Table rows use `TableActionBar` (from Table; pass `rowSelection` and
|
|
4
|
-
* `onRowSelectionChange`), for cards and list items use `SelectionBulkBar` (from Selection).
|
|
5
|
-
*/
|
|
6
1
|
export { BulkBarSummary, type BulkBarSummaryProps } from './BulkBarSummary.js';
|
|
7
2
|
export { BulkBarSummaryClear, type BulkBarSummaryClearProps } from './BulkBarSummaryClear.js';
|
|
8
3
|
export { BulkBarSummaryCount, type BulkBarSummaryCountProps } from './BulkBarSummaryCount.js';
|
|
@@ -7,7 +7,7 @@ const drawerContentVariants = cva(cn('relative', 'bg-bg-surface-2', 'border bord
|
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
9
|
});
|
|
10
|
-
const drawerPositionerVariants = cva(cn('flex w-full', 'origin-[right center]', 'z-[calc(var(--drawer-positioner-z-index)+(var(--layer-index
|
|
10
|
+
const drawerPositionerVariants = cva(cn('flex w-full', 'origin-[right center]', 'z-[calc(var(--drawer-positioner-z-index)+(var(--layer-index)*var(--drawer-level-ratio)))]'), {
|
|
11
11
|
variants: {
|
|
12
12
|
isResizing: {
|
|
13
13
|
true: 'transition-transform'
|
|
@@ -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,
|
package/dist/components/FilterInput/hooks/useFilterInputAutocomplete/useFilterInputAutocomplete.js
CHANGED
|
@@ -19,7 +19,7 @@ const useFilterInputAutocomplete = ({ fields, conditions, chips, upsertCondition
|
|
|
19
19
|
const state = useAutocompleteState({
|
|
20
20
|
conditions
|
|
21
21
|
});
|
|
22
|
-
const { inputText, setInputText, menuState, setMenuState, selectedField, setSelectedField, selectedOperator, setSelectedOperator, isFocused, setIsFocused, buildingMultiValue, setBuildingMultiValue, buildingSide, setBuildingSide, buildingBase, setBuildingBase, insertIndex, setInsertIndex, insertAfterConnector, setInsertAfterConnector, effectiveInsertIndex, effectiveInsertIndexRef, conditionsRef, conditionsLengthRef, blurCommitRef, segmentAttributeInputRef, segmentOperatorInputRef, segmentValueInputRef, commitBuildingOnBlurRef, commitBuildingForceRef } = state;
|
|
22
|
+
const { inputText, setInputText, menuState, setMenuState, selectedField, setSelectedField, selectedOperator, setSelectedOperator, isFocused, setIsFocused, buildingMultiValue, setBuildingMultiValue, buildingSide, setBuildingSide, buildingBase, setBuildingBase, insertIndex: _insertIndex, setInsertIndex, insertAfterConnector, setInsertAfterConnector, effectiveInsertIndex, effectiveInsertIndexRef, conditionsRef, conditionsLengthRef, blurCommitRef, segmentAttributeInputRef, segmentOperatorInputRef, segmentValueInputRef, commitBuildingOnBlurRef, commitBuildingForceRef } = state;
|
|
23
23
|
const { menuPositioning, setMenuAnchor, resetMenuAnchor } = useMenuPositioning({
|
|
24
24
|
containerRef,
|
|
25
25
|
buildingChipRef,
|
|
@@ -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
|
|
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)))]");
|
|
9
9
|
$[0] = t0;
|
|
10
10
|
} else t0 = $[0];
|
|
11
11
|
let t1;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { FC } from 'react';
|
|
2
|
+
export interface KeyboardShortcutsDialogProps {
|
|
3
|
+
/** Whether dialog is open */
|
|
4
|
+
open: boolean;
|
|
5
|
+
/** Called when dialog should close */
|
|
6
|
+
onOpenChange: (open: boolean) => void;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* KeyboardShortcutsDialog Component
|
|
10
|
+
*
|
|
11
|
+
* Modal showing all available keyboard shortcuts.
|
|
12
|
+
* Triggered by pressing '?' key.
|
|
13
|
+
*/
|
|
14
|
+
export declare const KeyboardShortcutsDialog: FC<KeyboardShortcutsDialogProps>;
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { c } from "react/compiler-runtime";
|
|
3
|
+
import { useTestId } from "../../../utils/testId.js";
|
|
4
|
+
import { Dialog, DialogBody, DialogClose, DialogContent, DialogHeader, DialogPositioner, DialogTitle } from "../../Dialog/index.js";
|
|
5
|
+
import { Kbd } from "../../Kbd/index.js";
|
|
6
|
+
import { Text } from "../../Text/index.js";
|
|
7
|
+
const SHORTCUTS = [
|
|
8
|
+
{
|
|
9
|
+
title: "Navigation",
|
|
10
|
+
shortcuts: [
|
|
11
|
+
{
|
|
12
|
+
keys: [
|
|
13
|
+
"↑",
|
|
14
|
+
"↓"
|
|
15
|
+
],
|
|
16
|
+
description: "Navigate menu items (focus stays in input)"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
keys: [
|
|
20
|
+
"Tab"
|
|
21
|
+
],
|
|
22
|
+
description: "Move to Next button (closes menu)"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
keys: [
|
|
26
|
+
"↵"
|
|
27
|
+
],
|
|
28
|
+
description: "Select highlighted item"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
keys: [
|
|
32
|
+
"Esc"
|
|
33
|
+
],
|
|
34
|
+
description: "Close menu (press again to blur input)"
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
title: "Selection",
|
|
40
|
+
shortcuts: [
|
|
41
|
+
{
|
|
42
|
+
keys: [
|
|
43
|
+
"1",
|
|
44
|
+
"2",
|
|
45
|
+
"…"
|
|
46
|
+
],
|
|
47
|
+
description: 'Choose item by number (type 1-2 digits, e.g. "12" for option 12)'
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
keys: [
|
|
51
|
+
"Space"
|
|
52
|
+
],
|
|
53
|
+
description: "Toggle checkbox (multi-select step only)"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
keys: [
|
|
57
|
+
"↵"
|
|
58
|
+
],
|
|
59
|
+
description: "Apply selected items (multi-select)"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
keys: [
|
|
63
|
+
"Ctrl",
|
|
64
|
+
"↵"
|
|
65
|
+
],
|
|
66
|
+
description: "Jump to condition step"
|
|
67
|
+
}
|
|
68
|
+
]
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
title: "Editing",
|
|
72
|
+
shortcuts: [
|
|
73
|
+
{
|
|
74
|
+
keys: [
|
|
75
|
+
"Backspace"
|
|
76
|
+
],
|
|
77
|
+
description: "Remove last step (when input empty)"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
keys: [
|
|
81
|
+
"⌥C"
|
|
82
|
+
],
|
|
83
|
+
description: "Toggle ignore case (name/value input)"
|
|
84
|
+
}
|
|
85
|
+
]
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
title: "Advanced",
|
|
89
|
+
shortcuts: [
|
|
90
|
+
{
|
|
91
|
+
keys: [
|
|
92
|
+
"?"
|
|
93
|
+
],
|
|
94
|
+
description: "Show this keyboard shortcuts dialog"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
keys: [
|
|
98
|
+
"Esc"
|
|
99
|
+
],
|
|
100
|
+
description: "Close dialog"
|
|
101
|
+
}
|
|
102
|
+
]
|
|
103
|
+
}
|
|
104
|
+
];
|
|
105
|
+
const KeyboardShortcutsDialog = (t0)=>{
|
|
106
|
+
const $ = c(8);
|
|
107
|
+
const { open, onOpenChange } = t0;
|
|
108
|
+
const testId = useTestId("keyboard-shortcuts");
|
|
109
|
+
let t1;
|
|
110
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
111
|
+
t1 = /*#__PURE__*/ jsxs(DialogHeader, {
|
|
112
|
+
children: [
|
|
113
|
+
/*#__PURE__*/ jsx(DialogTitle, {
|
|
114
|
+
children: "Keyboard Shortcuts"
|
|
115
|
+
}),
|
|
116
|
+
/*#__PURE__*/ jsx(DialogClose, {})
|
|
117
|
+
]
|
|
118
|
+
});
|
|
119
|
+
$[0] = t1;
|
|
120
|
+
} else t1 = $[0];
|
|
121
|
+
let t2;
|
|
122
|
+
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
123
|
+
t2 = /*#__PURE__*/ jsx(DialogBody, {
|
|
124
|
+
children: /*#__PURE__*/ jsx("div", {
|
|
125
|
+
className: "flex flex-col gap-24",
|
|
126
|
+
children: SHORTCUTS.map(_temp2)
|
|
127
|
+
})
|
|
128
|
+
});
|
|
129
|
+
$[1] = t2;
|
|
130
|
+
} else t2 = $[1];
|
|
131
|
+
let t3;
|
|
132
|
+
if ($[2] !== testId) {
|
|
133
|
+
t3 = /*#__PURE__*/ jsx(DialogPositioner, {
|
|
134
|
+
children: /*#__PURE__*/ jsxs(DialogContent, {
|
|
135
|
+
"data-slot": "keyboard-shortcuts-dialog",
|
|
136
|
+
"data-testid": testId,
|
|
137
|
+
children: [
|
|
138
|
+
t1,
|
|
139
|
+
t2
|
|
140
|
+
]
|
|
141
|
+
})
|
|
142
|
+
});
|
|
143
|
+
$[2] = testId;
|
|
144
|
+
$[3] = t3;
|
|
145
|
+
} else t3 = $[3];
|
|
146
|
+
let t4;
|
|
147
|
+
if ($[4] !== onOpenChange || $[5] !== open || $[6] !== t3) {
|
|
148
|
+
t4 = /*#__PURE__*/ jsx(Dialog, {
|
|
149
|
+
open: open,
|
|
150
|
+
onOpenChange: onOpenChange,
|
|
151
|
+
children: t3
|
|
152
|
+
});
|
|
153
|
+
$[4] = onOpenChange;
|
|
154
|
+
$[5] = open;
|
|
155
|
+
$[6] = t3;
|
|
156
|
+
$[7] = t4;
|
|
157
|
+
} else t4 = $[7];
|
|
158
|
+
return t4;
|
|
159
|
+
};
|
|
160
|
+
KeyboardShortcutsDialog.displayName = "KeyboardShortcutsDialog";
|
|
161
|
+
function _temp(shortcut) {
|
|
162
|
+
return /*#__PURE__*/ jsxs("div", {
|
|
163
|
+
className: "flex items-center justify-between gap-16",
|
|
164
|
+
children: [
|
|
165
|
+
/*#__PURE__*/ jsx("div", {
|
|
166
|
+
className: "flex-1",
|
|
167
|
+
children: /*#__PURE__*/ jsx(Text, {
|
|
168
|
+
size: "sm",
|
|
169
|
+
children: shortcut.description
|
|
170
|
+
})
|
|
171
|
+
}),
|
|
172
|
+
/*#__PURE__*/ jsx("div", {
|
|
173
|
+
className: "flex items-center gap-4",
|
|
174
|
+
children: shortcut.keys.map((key, j)=>/*#__PURE__*/ jsxs("span", {
|
|
175
|
+
className: "contents",
|
|
176
|
+
children: [
|
|
177
|
+
/*#__PURE__*/ jsx(Kbd, {
|
|
178
|
+
size: "small",
|
|
179
|
+
children: key
|
|
180
|
+
}),
|
|
181
|
+
j < shortcut.keys.length - 1 && /*#__PURE__*/ jsx(Text, {
|
|
182
|
+
size: "xs",
|
|
183
|
+
color: "secondary",
|
|
184
|
+
children: "+"
|
|
185
|
+
})
|
|
186
|
+
]
|
|
187
|
+
}, `${shortcut.description}-${key}`))
|
|
188
|
+
})
|
|
189
|
+
]
|
|
190
|
+
}, shortcut.description);
|
|
191
|
+
}
|
|
192
|
+
function _temp2(section) {
|
|
193
|
+
return /*#__PURE__*/ jsxs("div", {
|
|
194
|
+
className: "flex flex-col gap-12",
|
|
195
|
+
children: [
|
|
196
|
+
/*#__PURE__*/ jsx(Text, {
|
|
197
|
+
size: "sm",
|
|
198
|
+
weight: "bold",
|
|
199
|
+
color: "secondary",
|
|
200
|
+
children: section.title
|
|
201
|
+
}),
|
|
202
|
+
/*#__PURE__*/ jsx("div", {
|
|
203
|
+
className: "flex flex-col gap-8",
|
|
204
|
+
children: section.shortcuts.map(_temp)
|
|
205
|
+
})
|
|
206
|
+
]
|
|
207
|
+
}, section.title);
|
|
208
|
+
}
|
|
209
|
+
export { KeyboardShortcutsDialog };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type FC, type RefObject } from 'react';
|
|
2
|
+
import { type ConditionType } from '@wallarm-org/rules-lib/ui';
|
|
3
|
+
import type { PointSelectorModel } from './usePointSelector.js';
|
|
4
|
+
interface Props {
|
|
5
|
+
model: PointSelectorModel;
|
|
6
|
+
conditionInputRef: RefObject<HTMLInputElement | null>;
|
|
7
|
+
valueInputRef: RefObject<HTMLInputElement | null>;
|
|
8
|
+
conditionChipRef: RefObject<HTMLButtonElement | null>;
|
|
9
|
+
condition: ConditionType | null;
|
|
10
|
+
value: string;
|
|
11
|
+
ignoreCase: boolean;
|
|
12
|
+
}
|
|
13
|
+
/** Step 2: a numbered list of conditions, then the value. */
|
|
14
|
+
export declare const MatchStep: FC<Props>;
|
|
15
|
+
export {};
|