doom-design-system 0.5.0 → 0.6.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/Accordion/Accordion.module.css +121 -124
- package/dist/components/ActionRow/ActionRow.module.css +25 -24
- package/dist/components/Alert/Alert.module.css +74 -76
- package/dist/components/Avatar/Avatar.module.css +66 -66
- package/dist/components/Badge/Badge.module.css +50 -48
- package/dist/components/Breadcrumbs/Breadcrumbs.module.css +32 -33
- package/dist/components/Button/Button.d.ts +2 -2
- package/dist/components/Button/Button.js +1 -1
- package/dist/components/Button/Button.module.css +150 -152
- package/dist/components/Card/Card.module.css +37 -39
- package/dist/components/Chart/Chart.module.css +213 -245
- package/dist/components/Chart/behaviors/DraggablePuck.d.ts +36 -0
- package/dist/components/Chart/behaviors/DraggablePuck.js +94 -0
- package/dist/components/Chart/behaviors/Markers.js +6 -4
- package/dist/components/Chart/behaviors/SelectionUpdate.js +2 -4
- package/dist/components/Chart/behaviors/index.d.ts +1 -1
- package/dist/components/Chart/behaviors/index.js +1 -1
- package/dist/components/Chart/engine/CoordinateSystem.d.ts +59 -0
- package/dist/components/Chart/engine/CoordinateSystem.js +126 -0
- package/dist/components/Chart/engine/Engine.d.ts +102 -0
- package/dist/components/Chart/engine/Engine.js +226 -0
- package/dist/components/Chart/engine/Scheduler.d.ts +59 -0
- package/dist/components/Chart/engine/Scheduler.js +139 -0
- package/dist/components/Chart/engine/SpatialMap.d.ts +114 -0
- package/dist/components/Chart/engine/SpatialMap.js +270 -0
- package/dist/components/Chart/engine/index.d.ts +13 -0
- package/dist/components/Chart/engine/index.js +9 -0
- package/dist/components/Chart/engine/types.d.ts +137 -0
- package/dist/components/Chart/engine/types.js +47 -0
- package/dist/components/Chart/hooks/useEngine.d.ts +43 -0
- package/dist/components/Chart/hooks/useEngine.js +128 -0
- package/dist/components/Chart/sensors/DataHoverSensor/DataHoverSensor.d.ts +17 -19
- package/dist/components/Chart/sensors/DataHoverSensor/DataHoverSensor.js +38 -51
- package/dist/components/Chart/sensors/DragSensor/DragSensor.d.ts +38 -0
- package/dist/components/Chart/sensors/DragSensor/DragSensor.js +105 -0
- package/dist/components/Chart/sensors/DragSensor/index.d.ts +2 -0
- package/dist/components/Chart/sensors/DragSensor/index.js +1 -0
- package/dist/components/Chart/sensors/{KeyboardSensor.d.ts → KeyboardSensor/KeyboardSensor.d.ts} +1 -1
- package/dist/components/Chart/sensors/KeyboardSensor/KeyboardSensor.js +86 -0
- package/dist/components/Chart/sensors/KeyboardSensor/index.d.ts +1 -0
- package/dist/components/Chart/sensors/KeyboardSensor/index.js +1 -0
- package/dist/components/Chart/sensors/{SelectionSensor.d.ts → SelectionSensor/SelectionSensor.d.ts} +2 -2
- package/dist/components/Chart/sensors/SelectionSensor/SelectionSensor.js +39 -0
- package/dist/components/Chart/sensors/SelectionSensor/index.d.ts +1 -0
- package/dist/components/Chart/sensors/SelectionSensor/index.js +1 -0
- package/dist/components/Chart/sensors/SensorManager/SensorManager.js +36 -41
- package/dist/components/Chart/sensors/index.d.ts +1 -0
- package/dist/components/Chart/sensors/index.js +3 -2
- package/dist/components/Chart/sensors/utils/search.d.ts +1 -1
- package/dist/components/Chart/sensors/utils/search.js +25 -4
- package/dist/components/Chart/state/store/chart.store.js +18 -0
- package/dist/components/Chart/state/store/slices/series.slice.d.ts +1 -0
- package/dist/components/Chart/state/store/slices/series.slice.js +3 -2
- package/dist/components/Chart/subcomponents/Axis/Axis.module.css +32 -33
- package/dist/components/Chart/subcomponents/BarSeries/BarSeries.js +6 -1
- package/dist/components/Chart/subcomponents/BarSeries/BarSeries.module.css +11 -9
- package/dist/components/Chart/subcomponents/Cursor/Cursor.js +8 -1
- package/dist/components/Chart/subcomponents/Cursor/Cursor.module.css +14 -13
- package/dist/components/Chart/subcomponents/CustomSeries/CustomSeries.js +4 -0
- package/dist/components/Chart/subcomponents/CustomSeries/CustomSeries.module.css +5 -3
- package/dist/components/Chart/subcomponents/Footer/Footer.module.css +5 -3
- package/dist/components/Chart/subcomponents/Grid/Grid.module.css +12 -11
- package/dist/components/Chart/subcomponents/Header/Header.module.css +8 -7
- package/dist/components/Chart/subcomponents/InteractionLayer/InteractionLayer.d.ts +4 -4
- package/dist/components/Chart/subcomponents/InteractionLayer/InteractionLayer.js +39 -76
- package/dist/components/Chart/subcomponents/Legend/Legend.module.css +30 -32
- package/dist/components/Chart/subcomponents/LineSeries/LineSeries.js +9 -3
- package/dist/components/Chart/subcomponents/LineSeries/LineSeries.module.css +21 -21
- package/dist/components/Chart/subcomponents/Root/Root.js +113 -7
- package/dist/components/Chart/subcomponents/Root/Root.module.css +70 -82
- package/dist/components/Chart/subcomponents/ScatterSeries/ScatterSeries.js +6 -1
- package/dist/components/Chart/subcomponents/ScatterSeries/ScatterSeries.module.css +7 -5
- package/dist/components/Chart/subcomponents/Series/Series.module.css +118 -128
- package/dist/components/Chart/subcomponents/SeriesPoint/SeriesPoint.module.css +10 -8
- package/dist/components/Chart/subcomponents/Tooltip/Tooltip.js +2 -3
- package/dist/components/Chart/subcomponents/Tooltip/Tooltip.module.css +52 -67
- package/dist/components/Chart/types/context.d.ts +9 -0
- package/dist/components/Chart/types/events.d.ts +5 -7
- package/dist/components/Chart/types/interaction.d.ts +24 -2
- package/dist/components/Chart/types/interaction.js +1 -0
- package/dist/components/Checkbox/Checkbox.module.css +57 -59
- package/dist/components/Chip/Chip.module.css +105 -115
- package/dist/components/Combobox/Combobox.d.ts +2 -1
- package/dist/components/Combobox/Combobox.js +2 -2
- package/dist/components/Combobox/Combobox.module.css +233 -210
- package/dist/components/CopyButton/CopyButton.module.css +84 -90
- package/dist/components/Drawer/Drawer.module.css +126 -145
- package/dist/components/Dropdown/Dropdown.d.ts +3 -1
- package/dist/components/Dropdown/Dropdown.js +3 -3
- package/dist/components/Dropdown/Dropdown.module.css +52 -32
- package/dist/components/FileUpload/FileUpload.js +24 -0
- package/dist/components/FileUpload/FileUpload.module.css +295 -313
- package/dist/components/Form/Form.module.css +35 -39
- package/dist/components/Image/Image.module.css +53 -54
- package/dist/components/Input/Input.d.ts +4 -2
- package/dist/components/Input/Input.js +2 -2
- package/dist/components/Input/Input.module.css +135 -119
- package/dist/components/Label/Label.module.css +17 -15
- package/dist/components/Layout/Layout.module.css +95 -111
- package/dist/components/Link/Link.module.css +67 -65
- package/dist/components/Modal/Modal.module.css +112 -132
- package/dist/components/Page/Page.module.css +21 -21
- package/dist/components/Pagination/Pagination.module.css +56 -56
- package/dist/components/Popover/Popover.module.css +17 -16
- package/dist/components/ProgressBar/ProgressBar.module.css +36 -37
- package/dist/components/RadioGroup/RadioGroup.module.css +74 -77
- package/dist/components/Select/Select.d.ts +2 -1
- package/dist/components/Select/Select.js +2 -2
- package/dist/components/Select/Select.module.css +133 -98
- package/dist/components/Sheet/Sheet.module.css +134 -154
- package/dist/components/Sidebar/Sidebar.module.css +72 -74
- package/dist/components/Sidebar/subcomponents/Footer/Footer.module.css +7 -5
- package/dist/components/Sidebar/subcomponents/Group/Group.module.css +80 -85
- package/dist/components/Sidebar/subcomponents/Header/Header.module.css +12 -10
- package/dist/components/Sidebar/subcomponents/Item/Item.module.css +54 -55
- package/dist/components/Sidebar/subcomponents/MobileOverlay/MobileOverlay.module.css +38 -38
- package/dist/components/Sidebar/subcomponents/MobileTrigger/MobileTrigger.module.css +5 -3
- package/dist/components/Sidebar/subcomponents/Nav/Nav.module.css +13 -11
- package/dist/components/Sidebar/subcomponents/Rail/Rail.module.css +62 -63
- package/dist/components/Sidebar/subcomponents/Section/Section.module.css +86 -91
- package/dist/components/Skeleton/Skeleton.module.css +28 -26
- package/dist/components/Slat/Slat.module.css +93 -94
- package/dist/components/Slider/Slider.module.css +116 -121
- package/dist/components/Spinner/Spinner.module.css +28 -27
- package/dist/components/SplitButton/SplitButton.d.ts +3 -1
- package/dist/components/SplitButton/SplitButton.js +2 -2
- package/dist/components/SplitButton/SplitButton.module.css +104 -87
- package/dist/components/Switch/Switch.module.css +64 -63
- package/dist/components/Table/FilterBuilder/FilterBuilder.module.css +36 -36
- package/dist/components/Table/FilterBuilder/FilterConditionRow.js +1 -1
- package/dist/components/Table/FilterBuilder/FilterConditionRow.module.css +21 -22
- package/dist/components/Table/FilterBuilder/FilterGroup.js +4 -4
- package/dist/components/Table/FilterBuilder/FilterGroup.module.css +355 -389
- package/dist/components/Table/FilterBuilder/FilterSheet.module.css +68 -71
- package/dist/components/Table/Table.d.ts +4 -2
- package/dist/components/Table/Table.js +50 -13
- package/dist/components/Table/Table.module.css +210 -188
- package/dist/components/Table/TableHeaderFilter.js +1 -1
- package/dist/components/Table/TableHeaderFilter.module.css +51 -57
- package/dist/components/Tabs/Tabs.module.css +79 -80
- package/dist/components/Text/Text.module.css +108 -131
- package/dist/components/Textarea/Textarea.d.ts +3 -1
- package/dist/components/Textarea/Textarea.js +2 -2
- package/dist/components/Textarea/Textarea.module.css +114 -94
- package/dist/components/Toast/Toast.module.css +82 -82
- package/dist/components/Tooltip/Tooltip.module.css +17 -16
- package/dist/styles/globals.css +1677 -1691
- package/dist/styles/palettes.d.ts +0 -5
- package/dist/styles/palettes.js +0 -8
- package/dist/styles/themes/definitions.d.ts +0 -8
- package/dist/styles/themes/definitions.js +117 -5
- package/dist/styles/types.d.ts +2 -0
- package/dist/styles/types.js +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +4 -4
- package/.agent/skills/doom/a2ui/a2ui-examples.md +0 -289
- package/.agent/skills/doom/a2ui/a2ui-principles.md +0 -49
- package/.agent/skills/doom/a2ui/a2ui-protocol.md +0 -191
- package/.agent/skills/doom/components/a2ui.md +0 -46
- package/.agent/skills/doom/components/accordion.md +0 -44
- package/.agent/skills/doom/components/actionrow.md +0 -33
- package/.agent/skills/doom/components/alert.md +0 -35
- package/.agent/skills/doom/components/avatar.md +0 -36
- package/.agent/skills/doom/components/badge.md +0 -29
- package/.agent/skills/doom/components/breadcrumbs.md +0 -33
- package/.agent/skills/doom/components/button.md +0 -43
- package/.agent/skills/doom/components/card.md +0 -41
- package/.agent/skills/doom/components/chart.md +0 -106
- package/.agent/skills/doom/components/checkbox.md +0 -38
- package/.agent/skills/doom/components/chip.md +0 -35
- package/.agent/skills/doom/components/combobox.md +0 -50
- package/.agent/skills/doom/components/copybutton.md +0 -41
- package/.agent/skills/doom/components/drawer.md +0 -69
- package/.agent/skills/doom/components/dropdown.md +0 -33
- package/.agent/skills/doom/components/fileupload.md +0 -49
- package/.agent/skills/doom/components/form.md +0 -55
- package/.agent/skills/doom/components/icon.md +0 -47
- package/.agent/skills/doom/components/image.md +0 -48
- package/.agent/skills/doom/components/input.md +0 -54
- package/.agent/skills/doom/components/label.md +0 -32
- package/.agent/skills/doom/components/layout.md +0 -92
- package/.agent/skills/doom/components/link.md +0 -39
- package/.agent/skills/doom/components/modal.md +0 -71
- package/.agent/skills/doom/components/page.md +0 -41
- package/.agent/skills/doom/components/pagination.md +0 -32
- package/.agent/skills/doom/components/popover.md +0 -45
- package/.agent/skills/doom/components/progressbar.md +0 -37
- package/.agent/skills/doom/components/radiogroup.md +0 -45
- package/.agent/skills/doom/components/select.md +0 -43
- package/.agent/skills/doom/components/sheet.md +0 -71
- package/.agent/skills/doom/components/sidebar.md +0 -92
- package/.agent/skills/doom/components/skeleton.md +0 -35
- package/.agent/skills/doom/components/slat.md +0 -46
- package/.agent/skills/doom/components/slider.md +0 -51
- package/.agent/skills/doom/components/spinner.md +0 -34
- package/.agent/skills/doom/components/splitbutton.md +0 -35
- package/.agent/skills/doom/components/switch.md +0 -40
- package/.agent/skills/doom/components/table.md +0 -82
- package/.agent/skills/doom/components/tabs.md +0 -65
- package/.agent/skills/doom/components/text.md +0 -42
- package/.agent/skills/doom/components/textarea.md +0 -46
- package/.agent/skills/doom/components/toast.md +0 -59
- package/.agent/skills/doom/components/tooltip.md +0 -35
- package/.agent/skills/doom/index.md +0 -167
- package/.agent/skills/doom/styles/aesthetic.md +0 -151
- package/.agent/skills/doom/styles/css-variables.md +0 -80
- package/.agent/skills/doom/styles/mixins.md +0 -97
- package/.agent/skills/doom/styles/tokens.md +0 -129
- package/.agent/skills/doom/styles/utilities.md +0 -84
- package/dist/components/Chart/sensors/KeyboardSensor.js +0 -82
- package/dist/components/Chart/sensors/SelectionSensor.js +0 -41
|
@@ -1,88 +1,105 @@
|
|
|
1
|
-
.
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
.mainButton {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}
|
|
41
|
-
.mainButton:hover {
|
|
42
|
-
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
1
|
+
@layer doom.components {
|
|
2
|
+
.container {
|
|
3
|
+
display: inline-flex;
|
|
4
|
+
border: var(--surface-border-width) solid var(--card-border);
|
|
5
|
+
border-radius: var(--control-radius);
|
|
6
|
+
box-shadow: var(--shadow-md);
|
|
7
|
+
transition: all var(--duration-fast) var(--ease-in-out);
|
|
8
|
+
}
|
|
9
|
+
.container.primary {
|
|
10
|
+
background-color: var(--primary);
|
|
11
|
+
color: var(--primary-foreground);
|
|
12
|
+
}
|
|
13
|
+
.container.secondary {
|
|
14
|
+
background-color: var(--secondary);
|
|
15
|
+
color: var(--secondary-foreground);
|
|
16
|
+
}
|
|
17
|
+
.container:hover {
|
|
18
|
+
transform: translate(calc(-1 * var(--space-0\.5)), calc(-1 * var(--space-0\.5)));
|
|
19
|
+
box-shadow: var(--shadow-lg);
|
|
20
|
+
}
|
|
21
|
+
.container[data-state=open] {
|
|
22
|
+
transform: translate(calc(-1 * var(--space-0\.5)), calc(-1 * var(--space-0\.5)));
|
|
23
|
+
box-shadow: var(--shadow-offset-xl) var(--shadow-primary);
|
|
24
|
+
border: var(--surface-border-width) solid var(--shadow-primary);
|
|
25
|
+
}
|
|
26
|
+
.mainButton {
|
|
27
|
+
border: none;
|
|
28
|
+
background: transparent;
|
|
29
|
+
color: inherit;
|
|
30
|
+
padding: var(--control-padding-y) var(--control-padding-x);
|
|
31
|
+
padding-right: var(--control-padding-y);
|
|
32
|
+
font-weight: 700;
|
|
33
|
+
font-size: var(--control-font-size);
|
|
34
|
+
text-transform: uppercase;
|
|
35
|
+
letter-spacing: 0.05em;
|
|
36
|
+
cursor: pointer;
|
|
37
|
+
border-right: var(--surface-border-width) solid rgba(0, 0, 0, 0.2);
|
|
38
|
+
min-height: var(--control-height);
|
|
39
|
+
box-sizing: border-box;
|
|
40
|
+
}
|
|
41
|
+
.mainButton:hover {
|
|
42
|
+
background-color: rgba(0, 0, 0, 0.25);
|
|
43
|
+
}
|
|
44
|
+
.dropdownTrigger {
|
|
45
|
+
border: none;
|
|
46
|
+
background: transparent;
|
|
47
|
+
color: inherit;
|
|
48
|
+
padding: var(--control-padding-y);
|
|
49
|
+
cursor: pointer;
|
|
50
|
+
display: flex;
|
|
51
|
+
align-items: center;
|
|
52
|
+
min-height: var(--control-height);
|
|
53
|
+
box-sizing: border-box;
|
|
54
|
+
}
|
|
55
|
+
.dropdownTrigger:hover {
|
|
56
|
+
background-color: rgba(0, 0, 0, 0.25);
|
|
57
|
+
}
|
|
58
|
+
.menu {
|
|
59
|
+
background: var(--card-bg);
|
|
60
|
+
border: var(--surface-border-width) solid var(--primary);
|
|
61
|
+
border-radius: var(--control-radius);
|
|
62
|
+
box-shadow: var(--shadow-offset-xl) var(--shadow-primary);
|
|
63
|
+
min-width: 20ch;
|
|
64
|
+
overflow: hidden;
|
|
65
|
+
display: flex;
|
|
66
|
+
flex-direction: column;
|
|
67
|
+
gap: var(--space-1);
|
|
68
|
+
padding: var(--space-1);
|
|
69
|
+
}
|
|
70
|
+
.item {
|
|
71
|
+
text-align: left;
|
|
72
|
+
padding: var(--control-padding-y) var(--control-padding-x);
|
|
73
|
+
background: transparent;
|
|
74
|
+
border: none;
|
|
75
|
+
color: var(--foreground);
|
|
76
|
+
cursor: pointer;
|
|
77
|
+
border-radius: calc(var(--control-radius) - var(--surface-border-width));
|
|
78
|
+
font-size: var(--control-font-size);
|
|
79
|
+
font-weight: 600;
|
|
80
|
+
transition: background-color var(--duration-fast) var(--ease-in-out);
|
|
81
|
+
}
|
|
82
|
+
.item:hover {
|
|
83
|
+
background-color: color-mix(in srgb, var(--primary), transparent 85%);
|
|
84
|
+
color: var(--primary);
|
|
85
|
+
}
|
|
86
|
+
/* Sizes */
|
|
87
|
+
.sm {
|
|
88
|
+
--control-height: var(--size-7);
|
|
89
|
+
--control-padding-x: var(--space-2);
|
|
90
|
+
--control-padding-y: var(--space-1);
|
|
91
|
+
--control-font-size: var(--text-xs);
|
|
92
|
+
--control-icon-size: var(--size-4);
|
|
93
|
+
--control-gap: var(--space-1);
|
|
94
|
+
--control-radius: var(--radius-sm);
|
|
95
|
+
}
|
|
96
|
+
.lg {
|
|
97
|
+
--control-height: var(--size-10);
|
|
98
|
+
--control-padding-x: var(--space-4);
|
|
99
|
+
--control-padding-y: var(--space-2);
|
|
100
|
+
--control-font-size: var(--text-base);
|
|
101
|
+
--control-icon-size: var(--size-5);
|
|
102
|
+
--control-gap: var(--space-2);
|
|
103
|
+
--control-radius: var(--radius-md);
|
|
104
|
+
}
|
|
88
105
|
}
|
|
@@ -1,64 +1,65 @@
|
|
|
1
|
-
.
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
.input {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
.label {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
1
|
+
@layer doom.components {
|
|
2
|
+
.switchContainer {
|
|
3
|
+
display: inline-flex;
|
|
4
|
+
align-items: center;
|
|
5
|
+
gap: var(--space-3);
|
|
6
|
+
cursor: pointer;
|
|
7
|
+
opacity: 1;
|
|
8
|
+
user-select: none;
|
|
9
|
+
}
|
|
10
|
+
.switchContainer.disabled {
|
|
11
|
+
cursor: not-allowed;
|
|
12
|
+
opacity: 0.6;
|
|
13
|
+
}
|
|
14
|
+
.input {
|
|
15
|
+
position: absolute;
|
|
16
|
+
width: 1px;
|
|
17
|
+
height: 1px;
|
|
18
|
+
padding: 0;
|
|
19
|
+
margin: calc(-1 * var(--space-px));
|
|
20
|
+
overflow: hidden;
|
|
21
|
+
clip: rect(0, 0, 0, 0);
|
|
22
|
+
white-space: nowrap;
|
|
23
|
+
border: 0;
|
|
24
|
+
}
|
|
25
|
+
.toggle {
|
|
26
|
+
--_switch-inset: var(--space-0\.5);
|
|
27
|
+
--_thumb-size: calc(var(--switch-height) - 2 * var(--_switch-inset) - 2 * var(--surface-border-width));
|
|
28
|
+
position: relative;
|
|
29
|
+
width: var(--switch-width);
|
|
30
|
+
height: var(--switch-height);
|
|
31
|
+
background-color: var(--card-bg);
|
|
32
|
+
border: var(--surface-border-width) solid var(--card-border);
|
|
33
|
+
border-radius: var(--radius-pill);
|
|
34
|
+
transition: background-color var(--duration-normal) var(--ease-in-out), transform var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out);
|
|
35
|
+
box-shadow: var(--shadow-sm);
|
|
36
|
+
box-sizing: border-box;
|
|
37
|
+
}
|
|
38
|
+
.toggle::after {
|
|
39
|
+
content: "";
|
|
40
|
+
display: block;
|
|
41
|
+
position: absolute;
|
|
42
|
+
top: 50%;
|
|
43
|
+
left: var(--_switch-inset);
|
|
44
|
+
width: var(--_thumb-size);
|
|
45
|
+
height: var(--_thumb-size);
|
|
46
|
+
background-color: var(--muted);
|
|
47
|
+
border: var(--surface-border-width) solid var(--card-border);
|
|
48
|
+
border-radius: 50%;
|
|
49
|
+
transform: translateY(-50%) translateX(0);
|
|
50
|
+
transition: transform var(--duration-normal) var(--ease-in-out), background-color var(--duration-normal) var(--ease-in-out);
|
|
51
|
+
box-sizing: border-box;
|
|
52
|
+
}
|
|
53
|
+
.toggle.checked {
|
|
54
|
+
background-color: var(--primary);
|
|
55
|
+
}
|
|
56
|
+
.toggle.checked::after {
|
|
57
|
+
background-color: var(--primary-foreground);
|
|
58
|
+
transform: translateY(-50%) translateX(calc(var(--switch-width) - var(--_thumb-size) - 2 * var(--_switch-inset) - 2 * var(--surface-border-width)));
|
|
59
|
+
}
|
|
60
|
+
.label {
|
|
61
|
+
font-family: var(--font-heading);
|
|
62
|
+
font-weight: var(--font-semibold);
|
|
63
|
+
color: var(--foreground);
|
|
64
|
+
}
|
|
64
65
|
}
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
.
|
|
2
|
-
display: flex;
|
|
3
|
-
flex-wrap: wrap;
|
|
4
|
-
align-items: center;
|
|
5
|
-
gap: var(--spacing-2);
|
|
6
|
-
padding: var(--spacing-2);
|
|
7
|
-
background: var(--surface-bg);
|
|
8
|
-
border-top: var(--border-width) solid var(--card-border);
|
|
9
|
-
}
|
|
10
|
-
@media (max-width: 768px) {
|
|
1
|
+
@layer doom.components {
|
|
11
2
|
.filterBar {
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-wrap: wrap;
|
|
5
|
+
align-items: center;
|
|
6
|
+
gap: var(--space-2);
|
|
7
|
+
padding: var(--space-2);
|
|
8
|
+
background: var(--surface-bg);
|
|
9
|
+
border-top: var(--surface-border-width) solid var(--card-border);
|
|
10
|
+
}
|
|
11
|
+
@media (max-width: 768px) {
|
|
12
|
+
.filterBar {
|
|
13
|
+
flex-direction: column;
|
|
14
|
+
align-items: stretch;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
.popoverContent {
|
|
18
|
+
display: flex;
|
|
12
19
|
flex-direction: column;
|
|
13
|
-
|
|
20
|
+
gap: var(--space-2);
|
|
21
|
+
padding: var(--space-2);
|
|
22
|
+
min-width: 20ch;
|
|
23
|
+
}
|
|
24
|
+
.textInput {
|
|
25
|
+
padding: var(--space-2);
|
|
26
|
+
font-family: var(--font-family);
|
|
27
|
+
font-size: var(--text-sm);
|
|
28
|
+
border: var(--surface-border-width) solid var(--card-border);
|
|
29
|
+
border-radius: var(--radius-md);
|
|
30
|
+
background: var(--surface-bg);
|
|
31
|
+
color: var(--foreground);
|
|
32
|
+
}
|
|
33
|
+
.textInput:focus {
|
|
34
|
+
outline: none;
|
|
35
|
+
border-color: var(--primary);
|
|
36
|
+
}
|
|
37
|
+
.textInput::placeholder {
|
|
38
|
+
color: var(--muted-foreground);
|
|
14
39
|
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.popoverContent {
|
|
18
|
-
display: flex;
|
|
19
|
-
flex-direction: column;
|
|
20
|
-
gap: var(--spacing-2);
|
|
21
|
-
padding: var(--spacing-2);
|
|
22
|
-
min-width: var(--spacing-56);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.textInput {
|
|
26
|
-
padding: var(--spacing-2);
|
|
27
|
-
font-family: var(--font-family);
|
|
28
|
-
font-size: var(--text-sm);
|
|
29
|
-
border: var(--border-width) solid var(--card-border);
|
|
30
|
-
border-radius: var(--radius);
|
|
31
|
-
background: var(--surface-bg);
|
|
32
|
-
color: var(--foreground);
|
|
33
|
-
}
|
|
34
|
-
.textInput:focus {
|
|
35
|
-
outline: none;
|
|
36
|
-
border-color: var(--primary);
|
|
37
|
-
}
|
|
38
|
-
.textInput::placeholder {
|
|
39
|
-
color: var(--muted-foreground);
|
|
40
40
|
}
|
|
@@ -26,5 +26,5 @@ export function FilterConditionRow({ condition, fields, onChange, onRemove, }) {
|
|
|
26
26
|
return (_jsxs("div", { className: styles.row, children: [_jsx(Select, { className: styles.fieldSelect, options: fields.map((f) => ({ value: f.key, label: f.label })), placeholder: "Field...", value: condition.field, onChange: (e) => handleFieldChange(e.target.value) }), _jsx(Select, { className: styles.operatorSelect, options: availableOperators.map((op) => ({
|
|
27
27
|
value: op,
|
|
28
28
|
label: OPERATORS[op].label,
|
|
29
|
-
})), value: condition.operator, onChange: (e) => handleOperatorChange(e.target.value) }), (selectedField === null || selectedField === void 0 ? void 0 : selectedField.type) === "select" && selectedField.options ? (_jsx(Select, { className: styles.valueSelect, options: selectedField.options, placeholder: "Value...", value: condition.value, onChange: (e) => handleValueChange(e.target.value) })) : (_jsx(Input, { className: styles.valueInput, placeholder: "Value...", value: condition.value, onChange: (e) => handleValueChange(e.target.value) })), _jsx(Button, { "aria-label": "Remove condition", size: "sm", variant: "ghost", onClick: onRemove, children: _jsx(Trash2, { size:
|
|
29
|
+
})), value: condition.operator, onChange: (e) => handleOperatorChange(e.target.value) }), (selectedField === null || selectedField === void 0 ? void 0 : selectedField.type) === "select" && selectedField.options ? (_jsx(Select, { className: styles.valueSelect, options: selectedField.options, placeholder: "Value...", value: condition.value, onChange: (e) => handleValueChange(e.target.value) })) : (_jsx(Input, { className: styles.valueInput, placeholder: "Value...", value: condition.value, onChange: (e) => handleValueChange(e.target.value) })), _jsx(Button, { "aria-label": "Remove condition", size: "sm", variant: "ghost", onClick: onRemove, children: _jsx(Trash2, { size: 20 }) })] }));
|
|
30
30
|
}
|
|
@@ -1,23 +1,22 @@
|
|
|
1
|
-
.
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
.fieldSelect {
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
width: 100%;
|
|
1
|
+
@layer doom.components {
|
|
2
|
+
.row {
|
|
3
|
+
display: grid;
|
|
4
|
+
grid-template-columns: minmax(var(--form-col-min), 1fr) var(--form-select-width) minmax(var(--form-col-min), 1fr) auto;
|
|
5
|
+
align-items: center;
|
|
6
|
+
gap: var(--space-2);
|
|
7
|
+
padding: var(--space-2);
|
|
8
|
+
background: var(--surface-bg);
|
|
9
|
+
border: var(--surface-border-width) solid var(--card-border);
|
|
10
|
+
border-radius: var(--radius-md);
|
|
11
|
+
}
|
|
12
|
+
.fieldSelect {
|
|
13
|
+
width: 100%;
|
|
14
|
+
}
|
|
15
|
+
.operatorSelect {
|
|
16
|
+
width: 100%;
|
|
17
|
+
}
|
|
18
|
+
.valueSelect,
|
|
19
|
+
.valueInput {
|
|
20
|
+
width: 100%;
|
|
21
|
+
}
|
|
23
22
|
}
|
|
@@ -47,10 +47,10 @@ export function ConditionRow({ item, fields, parentId: _parentId, logic, showLog
|
|
|
47
47
|
"neq",
|
|
48
48
|
"contains",
|
|
49
49
|
];
|
|
50
|
-
return (_jsxs(Card.Root, { ref: setNodeRef, className: clsx(styles.conditionRow, isDragging && styles.dragging, activeDrops > 0 && styles.zIndexHigh), children: [_jsx(DropZone, { className: clsx(styles.dropZoneInside, showZones && styles.zoneActive), position: "inside", targetId: item.id, onHoverChange: handleHoverChange }), _jsx(DropZone, { className: clsx(styles.dropZoneBefore, showZones && styles.zoneActive), position: "before", targetId: item.id, onHoverChange: handleHoverChange }), _jsx(DropZone, { className: clsx(styles.dropZoneAfter, showZones && styles.zoneActive), position: "after", targetId: item.id, onHoverChange: handleHoverChange }), _jsxs("div", { className: styles.conditionHeader, children: [_jsx("div", Object.assign({ className: styles.dragHandle, onContextMenu: (e) => e.preventDefault() }, listeners, attributes, { children: _jsx(GripVertical, { size:
|
|
50
|
+
return (_jsxs(Card.Root, { ref: setNodeRef, className: clsx(styles.conditionRow, isDragging && styles.dragging, activeDrops > 0 && styles.zIndexHigh), children: [_jsx(DropZone, { className: clsx(styles.dropZoneInside, showZones && styles.zoneActive), position: "inside", targetId: item.id, onHoverChange: handleHoverChange }), _jsx(DropZone, { className: clsx(styles.dropZoneBefore, showZones && styles.zoneActive), position: "before", targetId: item.id, onHoverChange: handleHoverChange }), _jsx(DropZone, { className: clsx(styles.dropZoneAfter, showZones && styles.zoneActive), position: "after", targetId: item.id, onHoverChange: handleHoverChange }), _jsxs("div", { className: styles.conditionHeader, children: [_jsx("div", Object.assign({ className: styles.dragHandle, onContextMenu: (e) => e.preventDefault() }, listeners, attributes, { children: _jsx(GripVertical, { size: 20 }) })), showLogic && logic && onLogicChange ? (_jsx("div", { className: styles.logicWrapper, children: _jsx(Select, { options: [
|
|
51
51
|
{ value: "and", label: "AND" },
|
|
52
52
|
{ value: "or", label: "OR" },
|
|
53
|
-
], size: "sm", value: logic, onChange: (e) => onLogicChange(e.target.value) }) })) : (_jsx("div", { className: styles.whereWrapper, children: _jsx(Badge, { className: styles.whereBadge, size: "lg", variant: "secondary", children: "WHERE" }) })), _jsx(Button, { "aria-label": isCollapsed ? "Expand" : "Collapse", className: styles.mobileCollapseToggle, size: "sm", variant: "ghost", onClick: () => setIsCollapsed(!isCollapsed), children: isCollapsed ? _jsx(ChevronRight, { size:
|
|
53
|
+
], size: "sm", value: logic, onChange: (e) => onLogicChange(e.target.value) }) })) : (_jsx("div", { className: styles.whereWrapper, children: _jsx(Badge, { className: styles.whereBadge, size: "lg", variant: "secondary", children: "WHERE" }) })), _jsx(Button, { "aria-label": isCollapsed ? "Expand" : "Collapse", className: styles.mobileCollapseToggle, size: "sm", variant: "ghost", onClick: () => setIsCollapsed(!isCollapsed), children: isCollapsed ? _jsx(ChevronRight, { size: 20 }) : _jsx(ChevronDown, { size: 20 }) }), _jsx(Button, { "aria-label": "Remove", className: styles.mobileRemoveButton, size: "sm", variant: "ghost", onClick: onRemove, children: _jsx(Trash2, { size: 14 }) })] }), isCollapsed && (_jsxs(Text, { className: styles.collapsedConditionSummary, color: "muted", variant: "body", onClick: () => setIsCollapsed(false), children: [(selectedField === null || selectedField === void 0 ? void 0 : selectedField.label) || item.field || "Field", " ", _jsx("strong", { children: ((_b = OPERATORS[item.operator]) === null || _b === void 0 ? void 0 : _b.label) || item.operator }), " ", item.value || "..."] })), _jsxs("div", { className: clsx(styles.conditionFields, isCollapsed && styles.conditionFieldsCollapsed), children: [_jsx(Select, { className: styles.fieldSelect, options: fields.map((f) => ({ value: f.key, label: f.label })), placeholder: "Field...", value: item.field, onChange: (e) => onUpdate(Object.assign(Object.assign({}, item), { field: e.target.value, value: "" })) }), _jsx(Select, { className: styles.operatorSelect, options: availableOperators.map((op) => ({
|
|
54
54
|
value: op,
|
|
55
55
|
label: OPERATORS[op].label,
|
|
56
56
|
})), value: item.operator, onChange: (e) => onUpdate(Object.assign(Object.assign({}, item), { operator: e.target.value })) }), (selectedField === null || selectedField === void 0 ? void 0 : selectedField.type) === "select" && selectedField.options ? (_jsx(Select, { className: styles.valueSelect, options: selectedField.options, placeholder: "Value...", value: item.value, onChange: (e) => onUpdate(Object.assign(Object.assign({}, item), { value: e.target.value })) })) : (_jsx(Input, { className: styles.valueInput, placeholder: "Value...", value: item.value, onChange: (e) => onUpdate(Object.assign(Object.assign({}, item), { value: e.target.value })) }))] }), _jsx(Button, { "aria-label": "Remove", className: styles.desktopRemoveButton, size: "sm", variant: "ghost", onClick: onRemove, children: _jsx(Trash2, { size: 14 }) })] }));
|
|
@@ -106,9 +106,9 @@ export function FilterGroup({ item, fields, parentId: _parentId, depth = 0, show
|
|
|
106
106
|
};
|
|
107
107
|
const conditionCount = countConditions(item);
|
|
108
108
|
const isEmpty = item.children.length === 0;
|
|
109
|
-
return (_jsxs(Card.Root, { ref: setNodeRef, className: clsx(styles.group, depth === 0 && styles.rootGroup, depth > 0 && styles.hasRail, isCollapsed && styles.collapsed, isDragging && styles.dragging, activeDrops > 0 && styles.zIndexHigh), children: [depth > 0 && (_jsxs(_Fragment, { children: [_jsx(DropZone, { className: clsx(styles.dropZoneInside, showZones && styles.zoneActive), position: "inside", targetId: item.id, onHoverChange: handleHoverChange }), _jsx(DropZone, { className: clsx(styles.groupDropZoneBefore, showZones && styles.zoneActive), position: "before", targetId: item.id, onHoverChange: handleHoverChange }), _jsx(DropZone, { className: clsx(styles.groupDropZoneAfter, showZones && styles.zoneActive), position: "after", targetId: item.id, onHoverChange: handleHoverChange })] })), _jsxs("div", { className: styles.groupHeader, children: [_jsx("div", Object.assign({ className: styles.dragHandle, onContextMenu: (e) => e.preventDefault() }, listeners, attributes, { children: _jsx(GripVertical, { size:
|
|
109
|
+
return (_jsxs(Card.Root, { ref: setNodeRef, className: clsx(styles.group, depth === 0 && styles.rootGroup, depth > 0 && styles.hasRail, isCollapsed && styles.collapsed, isDragging && styles.dragging, activeDrops > 0 && styles.zIndexHigh), children: [depth > 0 && (_jsxs(_Fragment, { children: [_jsx(DropZone, { className: clsx(styles.dropZoneInside, showZones && styles.zoneActive), position: "inside", targetId: item.id, onHoverChange: handleHoverChange }), _jsx(DropZone, { className: clsx(styles.groupDropZoneBefore, showZones && styles.zoneActive), position: "before", targetId: item.id, onHoverChange: handleHoverChange }), _jsx(DropZone, { className: clsx(styles.groupDropZoneAfter, showZones && styles.zoneActive), position: "after", targetId: item.id, onHoverChange: handleHoverChange })] })), _jsxs("div", { className: styles.groupHeader, children: [_jsx("div", Object.assign({ className: styles.dragHandle, onContextMenu: (e) => e.preventDefault() }, listeners, attributes, { children: _jsx(GripVertical, { size: 20 }) })), depth > 0 &&
|
|
110
110
|
(showLogic && item.logic && onLogicChange ? (_jsx("div", { className: styles.logicWrapper, children: _jsx(Select, { options: [
|
|
111
111
|
{ value: "and", label: "AND" },
|
|
112
112
|
{ value: "or", label: "OR" },
|
|
113
|
-
], size: "sm", value: item.logic, onChange: (e) => onLogicChange(e.target.value) }) })) : (_jsx("div", { className: styles.whereWrapper, children: _jsx(Badge, { className: styles.whereBadge, size: "lg", variant: "secondary", children: "WHERE" }) }))), _jsx(Button, { "aria-label": isCollapsed ? "Expand group" : "Collapse group", className: styles.collapseToggle, size: "sm", variant: "ghost", onClick: toggleCollapse, children: isCollapsed ? _jsx(ChevronRight, { size:
|
|
113
|
+
], size: "sm", value: item.logic, onChange: (e) => onLogicChange(e.target.value) }) })) : (_jsx("div", { className: styles.whereWrapper, children: _jsx(Badge, { className: styles.whereBadge, size: "lg", variant: "secondary", children: "WHERE" }) }))), _jsx(Button, { "aria-label": isCollapsed ? "Expand group" : "Collapse group", className: styles.collapseToggle, size: "sm", variant: "ghost", onClick: toggleCollapse, children: isCollapsed ? _jsx(ChevronRight, { size: 20 }) : _jsx(ChevronDown, { size: 20 }) }), isCollapsed && (_jsxs(Text, { className: styles.collapsedSummary, color: "muted", variant: "caption", children: ["(", conditionCount, " condition", conditionCount !== 1 ? "s" : "", ")"] })), _jsx("div", { className: styles.headerSpacer }), onRemove && (_jsx(Button, { "aria-label": "Remove group", size: "sm", variant: "ghost", onClick: onRemove, children: _jsx(Trash2, { size: 14 }) }))] }), _jsx("div", { ref: contentRef, className: clsx(styles.groupContentWrapper, isCollapsed && styles.collapsedWrapper), children: _jsxs("div", { className: styles.groupContent, children: [isEmpty ? (_jsxs("div", { className: styles.emptyState, children: [_jsxs(Text, { color: "muted", variant: "small", children: ["Start by adding a condition", depth < MAX_DEPTH ? " or a group" : "", "."] }), _jsxs("div", { className: styles.emptyActions, children: [_jsxs(Button, { size: "sm", variant: "ghost", onClick: addCondition, children: [_jsx(Plus, { size: 14 }), " Add Condition"] }), _jsxs(Button, { disabled: depth >= MAX_DEPTH, size: "sm", variant: "ghost", onClick: addNestedGroup, children: [_jsx(Plus, { size: 14 }), " Add Group"] })] })] })) : (item.children.map((child, index) => (_jsx(React.Fragment, { children: child.type === "condition" ? (_jsx(ConditionRow, { fields: fields, isGlobalDragging: isGlobalDragging, item: child, logic: child.logic, parentId: item.id, showLogic: index > 0, onLogicChange: (newLogic) => updateChild(index, Object.assign(Object.assign({}, child), { logic: newLogic })), onRemove: () => removeChild(index), onUpdate: (updated) => updateChild(index, updated) })) : (_jsx("div", { className: styles.nestedGroupWrapper, children: _jsx(FilterGroup, { depth: depth + 1, fields: fields, isGlobalDragging: isGlobalDragging, item: child, parentId: item.id, showLogic: index > 0, onLogicChange: (newLogic) => updateChild(index, Object.assign(Object.assign({}, child), { logic: newLogic })), onRemove: () => removeChild(index), onRemoveSourceById: removeChildById, onUpdate: (updated) => updateChild(index, updated) }) })) }, child.id)))), !isEmpty && (_jsxs("div", { className: styles.groupActions, children: [_jsxs(Button, { size: "sm", variant: "ghost", onClick: addCondition, children: [_jsx(Plus, { size: 14 }), " Condition"] }), _jsxs(Button, { disabled: depth >= MAX_DEPTH, size: "sm", variant: "ghost", onClick: addNestedGroup, children: [_jsx(Plus, { size: 14 }), " Add Group"] })] }))] }) })] }));
|
|
114
114
|
}
|