@raketa-builder/menu-builder 1.8.0 → 1.8.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.
|
@@ -86,98 +86,91 @@ const ColumnBuilder = ({ value, onChange }) => {
|
|
|
86
86
|
minWidth: `calc(${column.width / 5 * 100}% - 0.5em)`,
|
|
87
87
|
flex: `0 0 calc(${column.width / 5 * 100}% - 0.5em)`
|
|
88
88
|
} : {};
|
|
89
|
-
return /* @__PURE__ */ jsxs(
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
{
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
onChange: (column2) => updateColumn(state.columns, column2)
|
|
175
|
-
}
|
|
176
|
-
) })
|
|
177
|
-
]
|
|
178
|
-
},
|
|
179
|
-
column.id
|
|
180
|
-
);
|
|
89
|
+
return /* @__PURE__ */ jsxs(Panel, { style: widthStyle, children: [
|
|
90
|
+
/* @__PURE__ */ jsxs(
|
|
91
|
+
PanelTitle,
|
|
92
|
+
{
|
|
93
|
+
style: {
|
|
94
|
+
display: "flex",
|
|
95
|
+
flexWrap: "wrap",
|
|
96
|
+
gap: "0.5em",
|
|
97
|
+
alignItems: "center",
|
|
98
|
+
justifyContent: "space-between"
|
|
99
|
+
},
|
|
100
|
+
children: [
|
|
101
|
+
/* @__PURE__ */ jsxs(
|
|
102
|
+
Stack,
|
|
103
|
+
{
|
|
104
|
+
className: "r-stack-align-center",
|
|
105
|
+
style: { gap: "0.5em" },
|
|
106
|
+
children: [
|
|
107
|
+
/* @__PURE__ */ jsx(Handle, { className: "r-chandle" }),
|
|
108
|
+
/* @__PURE__ */ jsxs("span", { style: { whiteSpace: "nowrap" }, children: [
|
|
109
|
+
"Column #",
|
|
110
|
+
idx + 1
|
|
111
|
+
] }),
|
|
112
|
+
/* @__PURE__ */ jsxs(
|
|
113
|
+
"select",
|
|
114
|
+
{
|
|
115
|
+
value: selectValue,
|
|
116
|
+
onChange: (e) => updateColumnWidth(column, e.target.value),
|
|
117
|
+
style: {
|
|
118
|
+
padding: "0.25em 0.35em",
|
|
119
|
+
borderRadius: "4px",
|
|
120
|
+
border: "1px solid #ccc",
|
|
121
|
+
fontSize: "0.875rem",
|
|
122
|
+
minWidth: "60px"
|
|
123
|
+
},
|
|
124
|
+
title: selectValue === "" ? "Width: Auto" : `Width: ${selectValue}/5`,
|
|
125
|
+
children: [
|
|
126
|
+
/* @__PURE__ */ jsx("option", { value: "", children: "Auto" }),
|
|
127
|
+
/* @__PURE__ */ jsx("option", { value: "1", children: "Width 1" }),
|
|
128
|
+
/* @__PURE__ */ jsx("option", { value: "2", children: "Width 2" }),
|
|
129
|
+
/* @__PURE__ */ jsx("option", { value: "3", children: "Width 3" }),
|
|
130
|
+
/* @__PURE__ */ jsx("option", { value: "4", children: "Width 4" }),
|
|
131
|
+
/* @__PURE__ */ jsx("option", { value: "5", children: "Width 5" })
|
|
132
|
+
]
|
|
133
|
+
}
|
|
134
|
+
)
|
|
135
|
+
]
|
|
136
|
+
}
|
|
137
|
+
),
|
|
138
|
+
/* @__PURE__ */ jsxs(
|
|
139
|
+
Stack,
|
|
140
|
+
{
|
|
141
|
+
className: "r-stack-align-center",
|
|
142
|
+
style: { gap: "0.25em" },
|
|
143
|
+
children: [
|
|
144
|
+
/* @__PURE__ */ jsx(
|
|
145
|
+
Button,
|
|
146
|
+
{
|
|
147
|
+
variant: "secondary",
|
|
148
|
+
onClick: () => duplicateColumn(state.columns, column),
|
|
149
|
+
children: /* @__PURE__ */ jsx(Copy, {})
|
|
150
|
+
}
|
|
151
|
+
),
|
|
152
|
+
/* @__PURE__ */ jsx(
|
|
153
|
+
Button,
|
|
154
|
+
{
|
|
155
|
+
variant: "secondary",
|
|
156
|
+
onClick: () => removeColumn(state.columns, column),
|
|
157
|
+
children: /* @__PURE__ */ jsx(Delete, {})
|
|
158
|
+
}
|
|
159
|
+
)
|
|
160
|
+
]
|
|
161
|
+
}
|
|
162
|
+
)
|
|
163
|
+
]
|
|
164
|
+
}
|
|
165
|
+
),
|
|
166
|
+
/* @__PURE__ */ jsx(PanelContent, { children: /* @__PURE__ */ jsx(
|
|
167
|
+
ContentBuilder,
|
|
168
|
+
{
|
|
169
|
+
value: column,
|
|
170
|
+
onChange: (column2) => updateColumn(state.columns, column2)
|
|
171
|
+
}
|
|
172
|
+
) })
|
|
173
|
+
] }, column.id);
|
|
181
174
|
})
|
|
182
175
|
}
|
|
183
176
|
)
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { __spreadProps, __spreadValues } from '../chunk-ORMEWXMH.js';
|
|
2
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
-
import 'react';
|
|
4
3
|
import { Copy, Delete } from './icons';
|
|
5
4
|
import { Stack, FormGroup, Label, Input, Select, Toolbar, Button } from '@raketa-builder/ui';
|
|
6
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __objRest, __spreadProps, __spreadValues } from '../chunk-ORMEWXMH.js';
|
|
2
|
-
import {
|
|
2
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { cn } from '@raketa-builder/ui';
|
|
4
4
|
|
|
5
5
|
function filterStyle(props) {
|
|
@@ -8,7 +8,7 @@ function filterStyle(props) {
|
|
|
8
8
|
}
|
|
9
9
|
function Edit(_a) {
|
|
10
10
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
|
11
|
-
return /* @__PURE__ */
|
|
11
|
+
return /* @__PURE__ */ jsxs(
|
|
12
12
|
"svg",
|
|
13
13
|
__spreadProps(__spreadValues({
|
|
14
14
|
className: cn(
|
|
@@ -29,7 +29,10 @@ function Edit(_a) {
|
|
|
29
29
|
strokeLinecap: "round",
|
|
30
30
|
strokeLinejoin: "round"
|
|
31
31
|
}, rest), {
|
|
32
|
-
children:
|
|
32
|
+
children: [
|
|
33
|
+
/* @__PURE__ */ jsx("title", { children: "Edit" }),
|
|
34
|
+
/* @__PURE__ */ jsx("path", { d: "M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z" })
|
|
35
|
+
]
|
|
33
36
|
})
|
|
34
37
|
);
|
|
35
38
|
}
|
|
@@ -57,6 +60,7 @@ function Delete(_c) {
|
|
|
57
60
|
strokeLinejoin: "round"
|
|
58
61
|
}, rest), {
|
|
59
62
|
children: [
|
|
63
|
+
/* @__PURE__ */ jsx("title", { children: "Remove" }),
|
|
60
64
|
/* @__PURE__ */ jsx("polyline", { points: "3 6 5 6 21 6" }),
|
|
61
65
|
/* @__PURE__ */ jsx("path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" })
|
|
62
66
|
]
|
|
@@ -87,6 +91,7 @@ function Plus(_e) {
|
|
|
87
91
|
strokeLinejoin: "round"
|
|
88
92
|
}, rest), {
|
|
89
93
|
children: [
|
|
94
|
+
/* @__PURE__ */ jsx("title", { children: "Add" }),
|
|
90
95
|
/* @__PURE__ */ jsx("line", { x1: "12", y1: "5", x2: "12", y2: "19" }),
|
|
91
96
|
/* @__PURE__ */ jsx("line", { x1: "5", y1: "12", x2: "19", y2: "12" })
|
|
92
97
|
]
|
|
@@ -117,6 +122,7 @@ function Copy(_g) {
|
|
|
117
122
|
strokeLinejoin: "round"
|
|
118
123
|
}, rest), {
|
|
119
124
|
children: [
|
|
125
|
+
/* @__PURE__ */ jsx("title", { children: "Copy" }),
|
|
120
126
|
/* @__PURE__ */ jsx("rect", { x: "9", y: "9", width: "13", height: "13", rx: "2", ry: "2" }),
|
|
121
127
|
/* @__PURE__ */ jsx("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })
|
|
122
128
|
]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@raketa-builder/menu-builder",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -27,16 +27,18 @@
|
|
|
27
27
|
"scripts": {
|
|
28
28
|
"build": "tsup",
|
|
29
29
|
"dev": "tsup --watch",
|
|
30
|
-
"format": "prettier --write .",
|
|
31
|
-
"
|
|
30
|
+
"format": "prettier --ignore-path ../../.prettierignore --write .",
|
|
31
|
+
"format:check": "prettier --ignore-path ../../.prettierignore --check .",
|
|
32
|
+
"lint": "biome lint --write --max-diagnostics=5000 .",
|
|
33
|
+
"lint:check": "biome lint --max-diagnostics=5000 ."
|
|
32
34
|
},
|
|
33
35
|
"peerDependencies": {
|
|
34
36
|
"react": ">=19.1.0 && <=19.3.0",
|
|
35
37
|
"react-dom": ">=19.1.0 && <=19.3.0"
|
|
36
38
|
},
|
|
37
39
|
"dependencies": {
|
|
38
|
-
"@raketa-builder/builder": "1.8.
|
|
39
|
-
"@raketa-builder/ui": "1.8.
|
|
40
|
+
"@raketa-builder/builder": "1.8.1",
|
|
41
|
+
"@raketa-builder/ui": "1.8.1",
|
|
40
42
|
"react-sortablejs": "6.1.4"
|
|
41
43
|
},
|
|
42
44
|
"devDependencies": {
|