@selectwin/kit 0.1.211 → 0.1.213
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/SelectFlowCanvas.d.ts +9 -1
- package/dist/SelectFlowCanvas.js +138 -95
- package/dist/SelectSection.d.ts +5 -0
- package/dist/SelectSection.js +24 -18
- package/dist/SelectTable.d.ts +39 -2
- package/dist/SelectTable.js +145 -103
- package/dist/internal/frame.d.ts +11 -2
- package/dist/internal/frame.js +6 -3
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -74,8 +74,16 @@ export interface SelectFlowNodeProps {
|
|
|
74
74
|
invalid?: boolean;
|
|
75
75
|
onClick?: () => void;
|
|
76
76
|
ariaLabel?: string;
|
|
77
|
+
/**
|
|
78
|
+
* Remover o bloco: com ele, o nó ganha uma lixeira no canto de cima, à direita. Ela aparece com o mouse em cima, com
|
|
79
|
+
* o foco dentro (Tab do nó para ela) ou com o nó selecionado; no toque, só com o nó selecionado. Escondida, não
|
|
80
|
+
* recebe clique nem foco: um toque no canto do nó não apaga o que não se via. Confirmar ou desfazer é de quem chama.
|
|
81
|
+
*/
|
|
82
|
+
onRemove?: () => void;
|
|
83
|
+
/** Nome acessível e dica da lixeira, com o que sai (ex.: "Remover o envio por SMS"). Padrão: "Remover". */
|
|
84
|
+
removeLabel?: string;
|
|
77
85
|
}
|
|
78
|
-
export declare function SelectFlowNode({ x, y, width, height, shape, tone, icon, order, eyebrow, title, subtitle, tags, titleTone, selected, active, muted, invalid, onClick, ariaLabel, }: SelectFlowNodeProps): import("react").JSX.Element;
|
|
86
|
+
export declare function SelectFlowNode({ x, y, width, height, shape, tone, icon, order, eyebrow, title, subtitle, tags, titleTone, selected, active, muted, invalid, onClick, ariaLabel, onRemove, removeLabel, }: SelectFlowNodeProps): import("react").JSX.Element;
|
|
79
87
|
export interface SelectFlowLayoutProps {
|
|
80
88
|
title: ReactNode;
|
|
81
89
|
subtitle?: ReactNode;
|
package/dist/SelectFlowCanvas.js
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
/* empty css */
|
|
2
|
-
import { ArrowLeftIcon as e, CloseIcon as t, MinusCircleIcon as n, PlusIcon as r } from "./icons.js";
|
|
3
|
-
import { SelectAlert as
|
|
4
|
-
import { SelectIconButton as
|
|
5
|
-
import { useId as
|
|
6
|
-
import { jsx as
|
|
2
|
+
import { ArrowLeftIcon as e, CloseIcon as t, MinusCircleIcon as n, PlusIcon as r, TrashIcon as i } from "./icons.js";
|
|
3
|
+
import { SelectAlert as a } from "./SelectAlert.js";
|
|
4
|
+
import { SelectIconButton as o } from "./SelectIconButton.js";
|
|
5
|
+
import { useId as s, useState as c } from "react";
|
|
6
|
+
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
7
7
|
//#region src/SelectFlowCanvas.tsx
|
|
8
|
-
var
|
|
9
|
-
function
|
|
10
|
-
let x =
|
|
11
|
-
let t =
|
|
8
|
+
var d = (e) => Math.round(e * 100) / 100;
|
|
9
|
+
function f({ width: e, height: t, edges: i, labels: a = [], pluses: f = [], children: p, zoom: m, defaultZoom: h = 1, onZoomChange: g, minZoom: _ = .5, maxZoom: v = 1.3, onBackgroundClick: y, ariaLabel: b }) {
|
|
10
|
+
let x = s().replace(/:/g, ""), [S, C] = c(h), w = m ?? S, T = (e) => {
|
|
11
|
+
let t = d(Math.min(v, Math.max(_, e)));
|
|
12
12
|
m === void 0 && C(t), g == null || g(t);
|
|
13
13
|
}, E = `select-flow-arrow-${x}`, D = `select-flow-arrow-on-${x}`;
|
|
14
|
-
return /* @__PURE__ */
|
|
14
|
+
return /* @__PURE__ */ u("div", {
|
|
15
15
|
className: "select-flow",
|
|
16
16
|
role: "region",
|
|
17
17
|
"aria-label": b,
|
|
18
|
-
children: [/* @__PURE__ */
|
|
18
|
+
children: [/* @__PURE__ */ l("div", {
|
|
19
19
|
className: "select-flow__scroll",
|
|
20
20
|
onClick: (e) => {
|
|
21
21
|
e.target.dataset.flowBackground === "true" && (y == null || y());
|
|
22
22
|
},
|
|
23
23
|
"data-flow-background": "true",
|
|
24
|
-
children: /* @__PURE__ */
|
|
24
|
+
children: /* @__PURE__ */ l("div", {
|
|
25
25
|
className: "select-flow__sizer",
|
|
26
26
|
style: {
|
|
27
27
|
width: e * w,
|
|
28
28
|
height: t * w
|
|
29
29
|
},
|
|
30
30
|
"data-flow-background": "true",
|
|
31
|
-
children: /* @__PURE__ */
|
|
31
|
+
children: /* @__PURE__ */ u("div", {
|
|
32
32
|
className: "select-flow__stage",
|
|
33
33
|
style: {
|
|
34
34
|
width: e,
|
|
@@ -37,12 +37,12 @@ function d({ width: e, height: t, edges: i, labels: d = [], pluses: f = [], chil
|
|
|
37
37
|
},
|
|
38
38
|
"data-flow-background": "true",
|
|
39
39
|
children: [
|
|
40
|
-
/* @__PURE__ */
|
|
40
|
+
/* @__PURE__ */ u("svg", {
|
|
41
41
|
className: "select-flow__edges",
|
|
42
42
|
width: e,
|
|
43
43
|
height: t,
|
|
44
44
|
"aria-hidden": "true",
|
|
45
|
-
children: [/* @__PURE__ */
|
|
45
|
+
children: [/* @__PURE__ */ u("defs", { children: [/* @__PURE__ */ l("marker", {
|
|
46
46
|
id: E,
|
|
47
47
|
viewBox: "0 0 10 10",
|
|
48
48
|
refX: "8",
|
|
@@ -50,11 +50,11 @@ function d({ width: e, height: t, edges: i, labels: d = [], pluses: f = [], chil
|
|
|
50
50
|
markerWidth: "7",
|
|
51
51
|
markerHeight: "7",
|
|
52
52
|
orient: "auto-start-reverse",
|
|
53
|
-
children: /* @__PURE__ */
|
|
53
|
+
children: /* @__PURE__ */ l("path", {
|
|
54
54
|
className: "select-flow__arrow",
|
|
55
55
|
d: "M 0 0 L 10 5 L 0 10 z"
|
|
56
56
|
})
|
|
57
|
-
}), /* @__PURE__ */
|
|
57
|
+
}), /* @__PURE__ */ l("marker", {
|
|
58
58
|
id: D,
|
|
59
59
|
viewBox: "0 0 10 10",
|
|
60
60
|
refX: "8",
|
|
@@ -62,17 +62,17 @@ function d({ width: e, height: t, edges: i, labels: d = [], pluses: f = [], chil
|
|
|
62
62
|
markerWidth: "7",
|
|
63
63
|
markerHeight: "7",
|
|
64
64
|
orient: "auto-start-reverse",
|
|
65
|
-
children: /* @__PURE__ */
|
|
65
|
+
children: /* @__PURE__ */ l("path", {
|
|
66
66
|
className: "select-flow__arrow select-flow__arrow--on",
|
|
67
67
|
d: "M 0 0 L 10 5 L 0 10 z"
|
|
68
68
|
})
|
|
69
|
-
})] }), i.map((e) => /* @__PURE__ */
|
|
69
|
+
})] }), i.map((e) => /* @__PURE__ */ l("path", {
|
|
70
70
|
d: e.d,
|
|
71
71
|
className: `select-flow__edge${e.state === "on" ? " select-flow__edge--on" : e.state === "muted" ? " select-flow__edge--muted" : ""}`,
|
|
72
72
|
markerEnd: `url(#${e.state === "on" ? D : E})`
|
|
73
73
|
}, e.id))]
|
|
74
74
|
}),
|
|
75
|
-
|
|
75
|
+
a.map((e) => /* @__PURE__ */ l("span", {
|
|
76
76
|
className: `select-flow__label${e.tone === "yes" ? " select-flow__label--yes" : ""}${e.active ? " select-flow__label--on" : ""}`,
|
|
77
77
|
style: {
|
|
78
78
|
left: e.x,
|
|
@@ -81,7 +81,7 @@ function d({ width: e, height: t, edges: i, labels: d = [], pluses: f = [], chil
|
|
|
81
81
|
children: e.text
|
|
82
82
|
}, e.id)),
|
|
83
83
|
p,
|
|
84
|
-
f.map((e) => /* @__PURE__ */
|
|
84
|
+
f.map((e) => /* @__PURE__ */ l("button", {
|
|
85
85
|
type: "button",
|
|
86
86
|
className: "select-flow__plus",
|
|
87
87
|
style: {
|
|
@@ -91,30 +91,30 @@ function d({ width: e, height: t, edges: i, labels: d = [], pluses: f = [], chil
|
|
|
91
91
|
title: e.label,
|
|
92
92
|
"aria-label": e.label,
|
|
93
93
|
onClick: e.onClick,
|
|
94
|
-
children: /* @__PURE__ */
|
|
94
|
+
children: /* @__PURE__ */ l(r, {})
|
|
95
95
|
}, e.id))
|
|
96
96
|
]
|
|
97
97
|
})
|
|
98
98
|
})
|
|
99
|
-
}), /* @__PURE__ */
|
|
99
|
+
}), /* @__PURE__ */ u("div", {
|
|
100
100
|
className: "select-flow__zoom",
|
|
101
101
|
children: [
|
|
102
|
-
/* @__PURE__ */
|
|
103
|
-
icon: /* @__PURE__ */
|
|
102
|
+
/* @__PURE__ */ l(o, {
|
|
103
|
+
icon: /* @__PURE__ */ l(n, {}),
|
|
104
104
|
label: "Diminuir o zoom",
|
|
105
105
|
size: "sm",
|
|
106
106
|
disabled: w <= _,
|
|
107
107
|
onClick: () => T(w - .1)
|
|
108
108
|
}),
|
|
109
|
-
/* @__PURE__ */
|
|
109
|
+
/* @__PURE__ */ u("button", {
|
|
110
110
|
type: "button",
|
|
111
111
|
className: "select-flow__zoomvalue",
|
|
112
112
|
onClick: () => T(1),
|
|
113
113
|
title: "Voltar a 100%",
|
|
114
114
|
children: [Math.round(w * 100), "%"]
|
|
115
115
|
}),
|
|
116
|
-
/* @__PURE__ */
|
|
117
|
-
icon: /* @__PURE__ */
|
|
116
|
+
/* @__PURE__ */ l(o, {
|
|
117
|
+
icon: /* @__PURE__ */ l(r, {}),
|
|
118
118
|
label: "Aumentar o zoom",
|
|
119
119
|
size: "sm",
|
|
120
120
|
disabled: w >= v,
|
|
@@ -124,149 +124,192 @@ function d({ width: e, height: t, edges: i, labels: d = [], pluses: f = [], chil
|
|
|
124
124
|
})]
|
|
125
125
|
});
|
|
126
126
|
}
|
|
127
|
-
function
|
|
128
|
-
let
|
|
127
|
+
function p({ x: e, y: t, width: n, height: r, shape: a = "card", tone: o = "neutral", icon: s, order: c, eyebrow: d, title: f, subtitle: p, tags: h, titleTone: g = "default", selected: _ = !1, active: v = !1, muted: y = !1, invalid: b = !1, onClick: x, ariaLabel: S, onRemove: C, removeLabel: w = "Remover" }) {
|
|
128
|
+
let T = m({
|
|
129
|
+
shape: a,
|
|
130
|
+
tone: o,
|
|
131
|
+
icon: s,
|
|
132
|
+
order: c,
|
|
133
|
+
eyebrow: d,
|
|
134
|
+
title: f,
|
|
135
|
+
subtitle: p,
|
|
136
|
+
tags: h,
|
|
137
|
+
titleTone: g,
|
|
138
|
+
selected: _,
|
|
139
|
+
active: v,
|
|
140
|
+
muted: y,
|
|
141
|
+
invalid: b,
|
|
142
|
+
onClick: x,
|
|
143
|
+
ariaLabel: S
|
|
144
|
+
}, C ? {
|
|
145
|
+
left: 0,
|
|
146
|
+
top: 0,
|
|
147
|
+
width: n,
|
|
148
|
+
height: r
|
|
149
|
+
} : {
|
|
129
150
|
left: e,
|
|
130
151
|
top: t,
|
|
131
152
|
width: n,
|
|
132
153
|
height: r
|
|
133
|
-
}, C = d != null && /* @__PURE__ */ c("span", {
|
|
134
|
-
className: `select-flownode__title${m === "warning" ? " select-flownode__title--warning" : ""}`,
|
|
135
|
-
children: d
|
|
136
154
|
});
|
|
137
|
-
return
|
|
155
|
+
return C ? /* @__PURE__ */ u("div", {
|
|
156
|
+
className: `select-flownode-slot select-flownode-slot--${a}${_ ? " is-selected" : ""}`,
|
|
157
|
+
style: {
|
|
158
|
+
left: e,
|
|
159
|
+
top: t,
|
|
160
|
+
width: n,
|
|
161
|
+
height: r
|
|
162
|
+
},
|
|
163
|
+
children: [T, /* @__PURE__ */ l("button", {
|
|
164
|
+
type: "button",
|
|
165
|
+
className: "select-flownode__remove",
|
|
166
|
+
"aria-label": w,
|
|
167
|
+
title: w,
|
|
168
|
+
onClick: (e) => {
|
|
169
|
+
e.stopPropagation(), C();
|
|
170
|
+
},
|
|
171
|
+
children: /* @__PURE__ */ l(i, {})
|
|
172
|
+
})]
|
|
173
|
+
}) : T;
|
|
174
|
+
}
|
|
175
|
+
function m({ shape: e = "card", tone: t = "neutral", icon: n, order: r, eyebrow: i, title: a, subtitle: o, tags: s, titleTone: c = "default", selected: d = !1, active: f = !1, muted: p = !1, invalid: m = !1, onClick: h, ariaLabel: g }, _) {
|
|
176
|
+
let v = `${d ? " is-selected" : m ? " is-invalid" : f ? " is-on" : ""}${p ? " is-muted" : ""}`, y = a != null && /* @__PURE__ */ l("span", {
|
|
177
|
+
className: `select-flownode__title${c === "warning" ? " select-flownode__title--warning" : ""}`,
|
|
178
|
+
children: a
|
|
179
|
+
});
|
|
180
|
+
return e === "decision" ? /* @__PURE__ */ l("button", {
|
|
138
181
|
type: "button",
|
|
139
|
-
className: `select-flownode select-flownode--decision${
|
|
140
|
-
style:
|
|
141
|
-
onClick:
|
|
142
|
-
"aria-label":
|
|
143
|
-
children: /* @__PURE__ */
|
|
182
|
+
className: `select-flownode select-flownode--decision${v}`,
|
|
183
|
+
style: _,
|
|
184
|
+
onClick: h,
|
|
185
|
+
"aria-label": g,
|
|
186
|
+
children: /* @__PURE__ */ u("span", {
|
|
144
187
|
className: "select-flownode__inner",
|
|
145
|
-
children: [
|
|
188
|
+
children: [r != null && /* @__PURE__ */ l("span", {
|
|
146
189
|
className: "select-flownode__order",
|
|
147
|
-
children:
|
|
148
|
-
}), /* @__PURE__ */
|
|
190
|
+
children: r
|
|
191
|
+
}), /* @__PURE__ */ u("span", {
|
|
149
192
|
className: "select-flownode__text",
|
|
150
193
|
children: [
|
|
151
|
-
|
|
194
|
+
i != null && /* @__PURE__ */ l("span", {
|
|
152
195
|
className: "select-flownode__eyebrow",
|
|
153
|
-
children:
|
|
196
|
+
children: i
|
|
154
197
|
}),
|
|
155
|
-
|
|
156
|
-
|
|
198
|
+
y,
|
|
199
|
+
o != null && /* @__PURE__ */ l("span", {
|
|
157
200
|
className: "select-flownode__sub",
|
|
158
|
-
children:
|
|
201
|
+
children: o
|
|
159
202
|
}),
|
|
160
|
-
|
|
203
|
+
s != null && /* @__PURE__ */ l("span", {
|
|
161
204
|
className: "select-flownode__tags",
|
|
162
|
-
children:
|
|
205
|
+
children: s
|
|
163
206
|
})
|
|
164
207
|
]
|
|
165
208
|
})]
|
|
166
209
|
})
|
|
167
|
-
}) :
|
|
210
|
+
}) : e === "pill" ? /* @__PURE__ */ u("button", {
|
|
168
211
|
type: "button",
|
|
169
|
-
className: `select-flownode select-flownode--pill${
|
|
170
|
-
style:
|
|
171
|
-
onClick:
|
|
172
|
-
"aria-label":
|
|
173
|
-
children: [
|
|
174
|
-
}) : /* @__PURE__ */
|
|
212
|
+
className: `select-flownode select-flownode--pill${v}`,
|
|
213
|
+
style: _,
|
|
214
|
+
onClick: h,
|
|
215
|
+
"aria-label": g,
|
|
216
|
+
children: [n, a]
|
|
217
|
+
}) : /* @__PURE__ */ u("button", {
|
|
175
218
|
type: "button",
|
|
176
|
-
className: `select-flownode select-flownode--${
|
|
177
|
-
style:
|
|
178
|
-
onClick:
|
|
179
|
-
"aria-label":
|
|
180
|
-
children: [
|
|
181
|
-
className: `select-flownode__chip select-flownode__chip--${
|
|
182
|
-
children:
|
|
183
|
-
}), /* @__PURE__ */
|
|
219
|
+
className: `select-flownode select-flownode--${e === "terminal" ? "terminal" : "card"}${v}`,
|
|
220
|
+
style: _,
|
|
221
|
+
onClick: h,
|
|
222
|
+
"aria-label": g,
|
|
223
|
+
children: [e === "card" && n != null && /* @__PURE__ */ l("span", {
|
|
224
|
+
className: `select-flownode__chip select-flownode__chip--${t}`,
|
|
225
|
+
children: n
|
|
226
|
+
}), /* @__PURE__ */ u("span", {
|
|
184
227
|
className: "select-flownode__text",
|
|
185
228
|
children: [
|
|
186
|
-
|
|
229
|
+
i != null && /* @__PURE__ */ l("span", {
|
|
187
230
|
className: "select-flownode__eyebrow",
|
|
188
|
-
children:
|
|
231
|
+
children: i
|
|
189
232
|
}),
|
|
190
|
-
|
|
191
|
-
|
|
233
|
+
y,
|
|
234
|
+
o != null && /* @__PURE__ */ l("span", {
|
|
192
235
|
className: "select-flownode__sub",
|
|
193
|
-
children:
|
|
236
|
+
children: o
|
|
194
237
|
}),
|
|
195
|
-
|
|
238
|
+
s != null && /* @__PURE__ */ l("span", {
|
|
196
239
|
className: "select-flownode__tags",
|
|
197
|
-
children:
|
|
240
|
+
children: s
|
|
198
241
|
})
|
|
199
242
|
]
|
|
200
243
|
})]
|
|
201
244
|
});
|
|
202
245
|
}
|
|
203
|
-
function
|
|
246
|
+
function h({ title: n, subtitle: r, onBack: i, backLabel: s = "Voltar", toolbar: c, actions: d, error: f, canvas: p, inspectorHead: m, inspector: h, inspectorLabel: g = "Painel", inspectorOpen: _, onInspectorClose: v }) {
|
|
204
247
|
let y = _ !== void 0;
|
|
205
|
-
return /* @__PURE__ */
|
|
248
|
+
return /* @__PURE__ */ u("div", {
|
|
206
249
|
className: `select-flowpage${y ? " select-flowpage--sheet" : ""}${y && _ ? " is-inspecting" : ""}`,
|
|
207
250
|
children: [
|
|
208
|
-
/* @__PURE__ */
|
|
251
|
+
/* @__PURE__ */ u("header", {
|
|
209
252
|
className: "select-flowpage__bar",
|
|
210
253
|
children: [
|
|
211
|
-
|
|
212
|
-
icon: /* @__PURE__ */
|
|
254
|
+
i && /* @__PURE__ */ l(o, {
|
|
255
|
+
icon: /* @__PURE__ */ l(e, {}),
|
|
213
256
|
label: s,
|
|
214
257
|
variant: "outline",
|
|
215
|
-
onClick:
|
|
258
|
+
onClick: i
|
|
216
259
|
}),
|
|
217
|
-
/* @__PURE__ */
|
|
260
|
+
/* @__PURE__ */ u("div", {
|
|
218
261
|
className: "select-flowpage__ident",
|
|
219
|
-
children: [/* @__PURE__ */
|
|
262
|
+
children: [/* @__PURE__ */ l("span", {
|
|
220
263
|
className: "select-flowpage__title",
|
|
221
264
|
children: n
|
|
222
|
-
}), r != null && /* @__PURE__ */
|
|
265
|
+
}), r != null && /* @__PURE__ */ l("span", {
|
|
223
266
|
className: "select-flowpage__sub",
|
|
224
267
|
children: r
|
|
225
268
|
})]
|
|
226
269
|
}),
|
|
227
|
-
|
|
270
|
+
c != null && /* @__PURE__ */ l("div", {
|
|
228
271
|
className: "select-flowpage__tools",
|
|
229
|
-
children:
|
|
272
|
+
children: c
|
|
230
273
|
}),
|
|
231
|
-
d != null && /* @__PURE__ */
|
|
274
|
+
d != null && /* @__PURE__ */ l("div", {
|
|
232
275
|
className: "select-flowpage__actions",
|
|
233
276
|
children: d
|
|
234
277
|
})
|
|
235
278
|
]
|
|
236
279
|
}),
|
|
237
|
-
f != null && f !== "" && /* @__PURE__ */
|
|
280
|
+
f != null && f !== "" && /* @__PURE__ */ l("div", {
|
|
238
281
|
className: "select-flowpage__error",
|
|
239
|
-
children: /* @__PURE__ */
|
|
282
|
+
children: /* @__PURE__ */ l(a, {
|
|
240
283
|
tone: "critical",
|
|
241
284
|
children: f
|
|
242
285
|
})
|
|
243
286
|
}),
|
|
244
|
-
/* @__PURE__ */
|
|
287
|
+
/* @__PURE__ */ u("div", {
|
|
245
288
|
className: "select-flowpage__body",
|
|
246
|
-
children: [/* @__PURE__ */
|
|
289
|
+
children: [/* @__PURE__ */ l("div", {
|
|
247
290
|
className: "select-flowpage__canvas",
|
|
248
291
|
children: p
|
|
249
|
-
}), /* @__PURE__ */
|
|
292
|
+
}), /* @__PURE__ */ u("aside", {
|
|
250
293
|
className: "select-flowpage__inspector",
|
|
251
294
|
"aria-label": g,
|
|
252
295
|
children: [
|
|
253
|
-
y && v && /* @__PURE__ */
|
|
296
|
+
y && v && /* @__PURE__ */ u("button", {
|
|
254
297
|
type: "button",
|
|
255
298
|
className: "select-flowpage__sheetclose",
|
|
256
299
|
onClick: v,
|
|
257
|
-
children: [/* @__PURE__ */
|
|
300
|
+
children: [/* @__PURE__ */ l("span", {
|
|
258
301
|
className: "select-flowpage__sheetgrip",
|
|
259
302
|
"aria-hidden": "true"
|
|
260
|
-
}), /* @__PURE__ */
|
|
303
|
+
}), /* @__PURE__ */ u("span", {
|
|
261
304
|
className: "select-flowpage__sheetlabel",
|
|
262
|
-
children: [/* @__PURE__ */
|
|
305
|
+
children: [/* @__PURE__ */ l(t, {}), "Fechar"]
|
|
263
306
|
})]
|
|
264
307
|
}),
|
|
265
|
-
m != null && /* @__PURE__ */
|
|
308
|
+
m != null && /* @__PURE__ */ l("div", {
|
|
266
309
|
className: "select-flowpage__inspectorhead",
|
|
267
310
|
children: m
|
|
268
311
|
}),
|
|
269
|
-
/* @__PURE__ */
|
|
312
|
+
/* @__PURE__ */ l("div", {
|
|
270
313
|
className: "select-flowpage__inspectorbody",
|
|
271
314
|
children: h
|
|
272
315
|
})
|
|
@@ -277,6 +320,6 @@ function p({ title: n, subtitle: r, onBack: o, backLabel: s = "Voltar", toolbar:
|
|
|
277
320
|
});
|
|
278
321
|
}
|
|
279
322
|
//#endregion
|
|
280
|
-
export {
|
|
323
|
+
export { f as SelectFlowCanvas, h as SelectFlowLayout, p as SelectFlowNode };
|
|
281
324
|
|
|
282
325
|
//# sourceMappingURL=SelectFlowCanvas.js.map
|
package/dist/SelectSection.d.ts
CHANGED
|
@@ -31,6 +31,11 @@ type SelectSectionOwnProps = {
|
|
|
31
31
|
* dentro de uma superfície sólida (`SelectRegions`, o drawer do Workbench); numa página, a seção segue two-tone.
|
|
32
32
|
*/
|
|
33
33
|
flush?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* 0.1.213: a seção é a moldura de uma lista (a `SelectTable` de dentro): o corpo sem a caixa branca nem o respiro, e
|
|
36
|
+
* a tabela com o cabeçalho na moldura e as linhas na caixa branca dela. Sem tabela no corpo, a caixa branca volta.
|
|
37
|
+
*/
|
|
38
|
+
list?: boolean;
|
|
34
39
|
children: ReactNode;
|
|
35
40
|
};
|
|
36
41
|
export type SelectSectionProps = SelectSectionOwnProps & Omit<ComponentPropsWithoutRef<'div'>, keyof SelectSectionOwnProps>;
|
package/dist/SelectSection.js
CHANGED
|
@@ -6,20 +6,20 @@ import { inertProps as i } from "./internal/inert.js";
|
|
|
6
6
|
import { forwardRef as a, useId as o, useState as s } from "react";
|
|
7
7
|
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
8
8
|
//#region src/SelectSection.tsx
|
|
9
|
-
var u = a(function({ title: a, help: u, description: d, action: f, collapsible: p = !1, defaultOpen: m = !0, open: h, onOpenChange: g, footer: _, flush: v = !1,
|
|
10
|
-
let [
|
|
11
|
-
h === void 0 &&
|
|
12
|
-
},
|
|
9
|
+
var u = a(function({ title: a, help: u, description: d, action: f, collapsible: p = !1, defaultOpen: m = !0, open: h, onOpenChange: g, footer: _, flush: v = !1, list: y = !1, children: b, className: x, ...S }, C) {
|
|
10
|
+
let [w, T] = s(m), E = h ?? w, D = o(), O = () => {
|
|
11
|
+
h === void 0 && T(!E), g == null || g(!E);
|
|
12
|
+
}, k = (r() ? " select-section--nested" : "") + (v ? " select-section--flush" : "") + (y ? " select-section--list" : ""), A = y ? "list" : "body";
|
|
13
13
|
return p ? /* @__PURE__ */ l("div", {
|
|
14
|
-
ref:
|
|
15
|
-
...
|
|
16
|
-
className: `select-section select-section--collapsible${
|
|
14
|
+
ref: C,
|
|
15
|
+
...S,
|
|
16
|
+
className: `select-section select-section--collapsible${k}${E ? " is-open" : ""}${x ? " " + x : ""}`,
|
|
17
17
|
children: [/* @__PURE__ */ l("button", {
|
|
18
18
|
type: "button",
|
|
19
19
|
className: "select-section__head select-section__head--toggle",
|
|
20
|
-
"aria-expanded":
|
|
21
|
-
"aria-controls":
|
|
22
|
-
onClick:
|
|
20
|
+
"aria-expanded": E,
|
|
21
|
+
"aria-controls": D,
|
|
22
|
+
onClick: O,
|
|
23
23
|
children: [/* @__PURE__ */ l("span", {
|
|
24
24
|
className: "select-section__heading",
|
|
25
25
|
children: [a && /* @__PURE__ */ c("span", {
|
|
@@ -35,15 +35,18 @@ var u = a(function({ title: a, help: u, description: d, action: f, collapsible:
|
|
|
35
35
|
children: /* @__PURE__ */ c(e, {})
|
|
36
36
|
})]
|
|
37
37
|
}), /* @__PURE__ */ c("div", {
|
|
38
|
-
id:
|
|
38
|
+
id: D,
|
|
39
39
|
className: "select-section__collapse",
|
|
40
|
-
"data-open":
|
|
41
|
-
...i(!
|
|
40
|
+
"data-open": E,
|
|
41
|
+
...i(!E),
|
|
42
42
|
children: /* @__PURE__ */ l("div", {
|
|
43
43
|
className: "select-section__collapsewrap",
|
|
44
44
|
children: [/* @__PURE__ */ c("div", {
|
|
45
45
|
className: "select-section__body",
|
|
46
|
-
children: /* @__PURE__ */ c(n, {
|
|
46
|
+
children: /* @__PURE__ */ c(n, {
|
|
47
|
+
kind: A,
|
|
48
|
+
children: b
|
|
49
|
+
})
|
|
47
50
|
}), _ != null && _ !== "" && /* @__PURE__ */ c("div", {
|
|
48
51
|
className: "select-section__foot",
|
|
49
52
|
children: _
|
|
@@ -51,9 +54,9 @@ var u = a(function({ title: a, help: u, description: d, action: f, collapsible:
|
|
|
51
54
|
})
|
|
52
55
|
})]
|
|
53
56
|
}) : /* @__PURE__ */ l("div", {
|
|
54
|
-
ref:
|
|
55
|
-
...
|
|
56
|
-
className: `select-section${
|
|
57
|
+
ref: C,
|
|
58
|
+
...S,
|
|
59
|
+
className: `select-section${k}${x ? " " + x : ""}`,
|
|
57
60
|
children: [
|
|
58
61
|
(a || d || f) && /* @__PURE__ */ l("div", {
|
|
59
62
|
className: "select-section__head",
|
|
@@ -73,7 +76,10 @@ var u = a(function({ title: a, help: u, description: d, action: f, collapsible:
|
|
|
73
76
|
}),
|
|
74
77
|
/* @__PURE__ */ c("div", {
|
|
75
78
|
className: "select-section__body",
|
|
76
|
-
children: /* @__PURE__ */ c(n, {
|
|
79
|
+
children: /* @__PURE__ */ c(n, {
|
|
80
|
+
kind: A,
|
|
81
|
+
children: b
|
|
82
|
+
})
|
|
77
83
|
}),
|
|
78
84
|
_ != null && _ !== "" && /* @__PURE__ */ c("div", {
|
|
79
85
|
className: "select-section__foot",
|
package/dist/SelectTable.d.ts
CHANGED
|
@@ -73,6 +73,25 @@ type SelectTableOwnProps = {
|
|
|
73
73
|
* separados por linhas de 1px.
|
|
74
74
|
*/
|
|
75
75
|
flush?: boolean;
|
|
76
|
+
/**
|
|
77
|
+
* 0.1.213: o nome da tabela para o leitor de tela (a grade é `role="table"`). Sem ele, o nome é o `title` quando o
|
|
78
|
+
* `title` é texto.
|
|
79
|
+
*/
|
|
80
|
+
label?: string;
|
|
81
|
+
/**
|
|
82
|
+
* 0.1.213: a largura mínima das colunas juntas (um comprimento CSS, `'48rem'`): abaixo dela a tabela rola de lado em
|
|
83
|
+
* vez de apertar as colunas. Sem ela, o mínimo é a soma dos pisos das colunas.
|
|
84
|
+
*/
|
|
85
|
+
minWidth?: string;
|
|
86
|
+
/**
|
|
87
|
+
* 0.1.213: como as colunas flexíveis (as sem `width`) dividem a largura.
|
|
88
|
+
* · `even` (o padrão): cada uma leva a mesma fatia (vezes o `grow`);
|
|
89
|
+
* · `content`: cada uma leva a fatia do que ela tem — a tabela mede a largura natural de cada coluna (o cabeçalho e
|
|
90
|
+
* as células) e divide a largura na mesma proporção, como a tabela do HTML. O nome longo ganha espaço e o "OK" não
|
|
91
|
+
* o desperdiça. Nenhuma coluna fica mais estreita que o que ela tem (até 20rem, `--select-table-col-cap`): sem
|
|
92
|
+
* espaço, a tabela rola de lado. O cabeçalho continua alinhado com as linhas (a mesma grade).
|
|
93
|
+
*/
|
|
94
|
+
sizing?: 'even' | 'content';
|
|
76
95
|
};
|
|
77
96
|
export type SelectTableProps = SelectTableOwnProps & Omit<ComponentPropsWithoutRef<'div'>, keyof SelectTableOwnProps>;
|
|
78
97
|
export declare const SelectTable: import('react').ForwardRefExoticComponent<SelectTableOwnProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, keyof SelectTableOwnProps> & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -93,14 +112,26 @@ export declare const SelectUserCell: import('react').ForwardRefExoticComponent<S
|
|
|
93
112
|
* vêm logo abaixo com `nested` — recuadas e num fundo afundado, na MESMA grade de colunas.
|
|
94
113
|
* Continua uma tabela só: nada de tabela dentro de linha (card dentro de card).
|
|
95
114
|
*/
|
|
96
|
-
|
|
115
|
+
type SelectTableRowOwnProps = {
|
|
97
116
|
children: ReactNode;
|
|
98
117
|
onClick?: () => void;
|
|
99
118
|
/** Linha-mãe de um grupo: aberta/fechada (vira `aria-expanded`). */
|
|
100
119
|
expanded?: boolean;
|
|
101
120
|
/** Linha-filha de um grupo aberto. */
|
|
102
121
|
nested?: boolean;
|
|
103
|
-
|
|
122
|
+
/**
|
|
123
|
+
* 0.1.213: a linha do que está aberto agora (o plano que a página mostra ao lado, a mensagem da gaveta): o fundo
|
|
124
|
+
* afundado e `aria-current`.
|
|
125
|
+
*/
|
|
126
|
+
current?: boolean;
|
|
127
|
+
/**
|
|
128
|
+
* 0.1.213: a linha que abre um grupo de linhas ("Do workspace · as regras dele"): o título numa célula que ocupa a
|
|
129
|
+
* linha toda (`<SelectTableCell span="all">`), no fundo afundado.
|
|
130
|
+
*/
|
|
131
|
+
section?: boolean;
|
|
132
|
+
};
|
|
133
|
+
export type SelectTableRowProps = SelectTableRowOwnProps & Omit<ComponentPropsWithoutRef<'div'>, keyof SelectTableRowOwnProps | 'role'>;
|
|
134
|
+
export declare function SelectTableRow({ children, onClick, expanded, nested, current, section, className, ...rest }: SelectTableRowProps): import("react").JSX.Element;
|
|
104
135
|
type SelectTableCellOwnProps = {
|
|
105
136
|
children: ReactNode;
|
|
106
137
|
align?: 'start' | 'end' | 'center';
|
|
@@ -110,6 +141,12 @@ type SelectTableCellOwnProps = {
|
|
|
110
141
|
/** Chevron de grupo antes do conteúdo (primeira célula da linha-mãe). `'none'` reserva o
|
|
111
142
|
* espaço sem desenhar, para alinhar uma linha sem filhas com as vizinhas que têm. */
|
|
112
143
|
disclosure?: 'open' | 'closed' | 'none';
|
|
144
|
+
/** 0.1.213: o cabeçalho da linha (`role="rowheader"`): o leitor de tela diz o nome da linha em cada célula dela. */
|
|
145
|
+
header?: boolean;
|
|
146
|
+
/** 0.1.213: quantas colunas a célula ocupa (`'all'`: a linha toda — o título do grupo, o detalhe aberto). */
|
|
147
|
+
span?: number | 'all';
|
|
148
|
+
/** 0.1.213: o texto quebra linha em vez de cortar (a descrição, o valor longo que não pode sumir). */
|
|
149
|
+
wrap?: boolean;
|
|
113
150
|
};
|
|
114
151
|
export type SelectTableCellProps = SelectTableCellOwnProps & Omit<ComponentPropsWithoutRef<'div'>, keyof SelectTableCellOwnProps>;
|
|
115
152
|
export declare const SelectTableCell: import('react').ForwardRefExoticComponent<SelectTableCellOwnProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, keyof SelectTableCellOwnProps> & import('react').RefAttributes<HTMLDivElement>>;
|