@golemui/gui-shared 1.6.0 → 2.0.0-rc.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/CHANGELOG.md +80 -0
- package/forms.css +106 -0
- package/index.js +1 -1
- package/index.umd.cjs +1 -1
- package/internals.d.ts +2 -1
- package/internals.js +215 -182
- package/internals.umd.cjs +1 -1
- package/lib/dx/gui.d.ts +6 -0
- package/lib/dx/shortcuts/layouts/guiFlex.impl.d.ts +6 -0
- package/lib/dx/shortcuts/layouts/layouts.domain.d.ts +8 -3
- package/lib/golem-form.d.ts +1 -1
- package/lib/shared.d.ts +3 -56
- package/lib/utils/grid.d.ts +29 -0
- package/lib/widget.factory.d.ts +1 -0
- package/lib/widget.props.d.ts +34 -39
- package/lib/widgets.d.ts +1 -1
- package/package.json +9 -6
- package/{resolveFormInput-Bi4buDf0.cjs → resolveFormInput-B7fb-g3v.cjs} +1 -1
- package/{resolveFormInput-DM2I_8nF.js → resolveFormInput-Bs-iyptu.js} +44 -46
package/internals.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { _ as
|
|
2
|
-
import { createGslSelector as
|
|
1
|
+
import { _ as j, a as A, b as L, c as $, d as S, e as v, f as G, h as O, i as W, j as N, k as H, l as V, m as z, n as K, o as X, p as q, q as E, r as J, s as Q, t as Y, u as Z, v as aa, w as sa, x as ea, y as ta, z as ia, A as na, B as ra, C as ua, D as la, E as oa, F as ga, G as da, H as _a, I as ca, J as ma, K as pa, L as ya, M as fa, N as Ta, O as ba, P as Ua, Q as Da, R as Ba, S as Ia, T as ka, U as Ca, V as wa, W as Pa, X as Ra, Y as xa, Z as ha, $ as Ma, a0 as Fa, a1 as ja, a2 as Aa, a3 as La, a4 as $a, a5 as Sa, a6 as va, a7 as Ga, a8 as Oa, a9 as Wa, aa as Na, ab as Ha, ac as Va, ad as za, ae as Ka, af as Xa, ag as qa, ah as Ea, ai as Ja, aj as Qa, ak as Ya, al as Za, am as as, an as ss, ao as es, ap as ts, aq as is, ar as ns, as as rs, at as us, au as ls, av as os, aw as gs, ax as ds, ay as _s, az as cs, aA as ms, aB as ps, aC as ys, aD as fs, aE as Ts, aF as bs, aG as Us, aH as Ds, aI as Bs, aJ as Is, aK as ks, aL as Cs, aM as ws, aN as Ps, aO as Rs, aP as xs, aQ as hs, aR as Ms, aS as Fs, aT as js, aU as As, aV as Ls, aW as $s, aX as Ss, aY as vs, aZ as Gs, a_ as Os, a$ as Ws, b0 as Ns, b1 as Hs, b2 as Vs, b3 as zs, b4 as Ks, b5 as Xs, b6 as qs, b7 as Es, b8 as Js, b9 as Qs, ba as Ys, bb as Zs, bc as ae, bd as se, be as ee, bf as te, bg as ie, bh as ne, bi as re, bj as ue, bk as le, bl as oe, bm as ge, bn as de, bo as _e } from "./resolveFormInput-Bs-iyptu.js";
|
|
2
|
+
import { createGslSelector as me, extractWidgetProps as pe, isDxDefinitions as ye, processAutoLabel as fe, processAutoPlaceholder as Te } from "@golemui/dx";
|
|
3
3
|
import "@golemui/gui-validators";
|
|
4
4
|
import "@golemui/core";
|
|
5
|
-
function
|
|
5
|
+
function T(a, ...s) {
|
|
6
6
|
return s.map((e) => ({
|
|
7
7
|
...e,
|
|
8
8
|
targetState: a
|
|
9
9
|
}));
|
|
10
10
|
}
|
|
11
|
-
function
|
|
11
|
+
function b(a, ...s) {
|
|
12
12
|
return {
|
|
13
13
|
kind: "aggregated",
|
|
14
14
|
matcher: (e) => e.tags?.includes(a) ?? !1,
|
|
15
15
|
children: s
|
|
16
16
|
};
|
|
17
17
|
}
|
|
18
|
-
const
|
|
18
|
+
const d = [
|
|
19
19
|
"calendar",
|
|
20
20
|
"dateTimeCalendar",
|
|
21
21
|
"checkbox",
|
|
@@ -50,43 +50,43 @@ const i = [
|
|
|
50
50
|
"timeInput",
|
|
51
51
|
"timePicker",
|
|
52
52
|
"toggle"
|
|
53
|
-
],
|
|
53
|
+
], _ = ["accordion", "flex", "grid", "tabs"], c = ["alert", "markdownText", "renderer"], m = ["button"];
|
|
54
54
|
[
|
|
55
|
-
...
|
|
56
|
-
...
|
|
57
|
-
...
|
|
58
|
-
...
|
|
55
|
+
...d,
|
|
56
|
+
..._,
|
|
57
|
+
...c,
|
|
58
|
+
...m
|
|
59
59
|
];
|
|
60
|
-
class
|
|
60
|
+
class p {
|
|
61
61
|
create(s) {
|
|
62
62
|
return {
|
|
63
63
|
states: s.states,
|
|
64
64
|
form: {
|
|
65
65
|
uid: "gui-root-uid",
|
|
66
|
-
type: "
|
|
66
|
+
type: "grid",
|
|
67
67
|
kind: "layout",
|
|
68
68
|
children: s.form
|
|
69
69
|
}
|
|
70
70
|
};
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
|
-
function
|
|
74
|
-
return new
|
|
73
|
+
function U() {
|
|
74
|
+
return new p();
|
|
75
75
|
}
|
|
76
|
-
const
|
|
77
|
-
function
|
|
76
|
+
const D = (a) => a !== null && typeof a == "object" && Object.prototype.hasOwnProperty.call(a, "label") && Object.prototype.hasOwnProperty.call(a, "value");
|
|
77
|
+
function B(a, s) {
|
|
78
78
|
return `tab_${a}_${s}`;
|
|
79
79
|
}
|
|
80
|
-
function
|
|
80
|
+
function I(a, s) {
|
|
81
81
|
return `tabpanel_${a}_${s}`;
|
|
82
82
|
}
|
|
83
|
-
function
|
|
83
|
+
function k(a, s) {
|
|
84
84
|
return `accordion_button_${a}_${s}`;
|
|
85
85
|
}
|
|
86
|
-
function
|
|
86
|
+
function C(a, s) {
|
|
87
87
|
return `accordion_section_${a}_${s}`;
|
|
88
88
|
}
|
|
89
|
-
function
|
|
89
|
+
function w(a, s) {
|
|
90
90
|
if (a != null && typeof a == "object" && "__rid" in a)
|
|
91
91
|
return a.__rid;
|
|
92
92
|
const e = s();
|
|
@@ -96,169 +96,202 @@ function b(a, s) {
|
|
|
96
96
|
configurable: !1
|
|
97
97
|
}), e;
|
|
98
98
|
}
|
|
99
|
-
function
|
|
99
|
+
function P(a) {
|
|
100
100
|
return a.match(/(\[\d+\])+$/)?.[0] ?? "";
|
|
101
101
|
}
|
|
102
|
+
const u = 12;
|
|
103
|
+
function l(a) {
|
|
104
|
+
return a <= 2 ? "none" : a <= 6 ? "xs" : a <= 12 ? "sm" : a <= 20 ? "md" : a <= 28 ? "lg" : "xl";
|
|
105
|
+
}
|
|
106
|
+
function o(a) {
|
|
107
|
+
return a === "space-around" || a === "space-evenly" ? "space-between" : a;
|
|
108
|
+
}
|
|
109
|
+
const g = (a, s) => Math.min(Math.max(Math.round(a), 1), s);
|
|
110
|
+
function R(a, s = {}) {
|
|
111
|
+
if (a === "flex") {
|
|
112
|
+
const r = s;
|
|
113
|
+
return {
|
|
114
|
+
mode: r.direction?.startsWith("row") ? "row" : "stack",
|
|
115
|
+
gap: r.gap === void 0 ? "md" : l(r.gap),
|
|
116
|
+
// Flex's `justify` placed the children across the direction: the field anatomy does that now.
|
|
117
|
+
justify: o(r.align) ?? "stretch"
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
const e = s, i = e.columnGap ?? e.rowGap, t = e.gap ?? (i === void 0 ? "md" : l(i)), n = e.justify ?? o(e.align) ?? "stretch";
|
|
121
|
+
return e.columns === "auto" ? { mode: "auto", gap: t, justify: n } : typeof e.columns == "number" ? { mode: "columns", columns: g(e.columns, u), gap: t, justify: n } : e.direction !== "row" ? { mode: "stack", gap: t, justify: n } : e.autoFit === !1 ? { mode: "columns", columns: u, gap: t, justify: n } : { mode: "row", gap: t, justify: n };
|
|
122
|
+
}
|
|
123
|
+
function x(a) {
|
|
124
|
+
const s = ["gui-grid"];
|
|
125
|
+
return a.mode === "row" && s.push("gui-grid--row"), a.mode === "columns" && s.push(`gui-grid--columns-${a.columns}`), a.mode === "auto" && s.push("gui-grid--auto"), a.gap !== "md" && s.push(`gui-grid--gap-${a.gap}`), a.mode === "row" && a.justify !== "stretch" && s.push(`gui-grid--justify-${a.justify}`), s.join(" ");
|
|
126
|
+
}
|
|
127
|
+
function h(a, s) {
|
|
128
|
+
const i = a.mode === "row" && a.justify === "stretch" ? u : a.mode === "columns" ? a.columns : 1, t = s === void 0 || i === void 0 ? 1 : g(s, i);
|
|
129
|
+
return t > 1 ? `gui-grid__cell gui-grid__cell--span-${t}` : "gui-grid__cell";
|
|
130
|
+
}
|
|
102
131
|
export {
|
|
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
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
132
|
+
j as _gslAccordionByUid,
|
|
133
|
+
A as _gslAccordions,
|
|
134
|
+
L as _gslActionByUid,
|
|
135
|
+
$ as _gslActions,
|
|
136
|
+
S as _gslAlertByUid,
|
|
137
|
+
v as _gslAlerts,
|
|
138
|
+
G as _gslBooleanInputs,
|
|
139
|
+
O as _gslCalendarByUid,
|
|
140
|
+
W as _gslCalendars,
|
|
141
|
+
N as _gslCheckboxByUid,
|
|
142
|
+
H as _gslCheckboxes,
|
|
143
|
+
V as _gslCurrencies,
|
|
144
|
+
z as _gslCurrencyByUid,
|
|
145
|
+
K as _gslCustomActionByUid,
|
|
146
|
+
X as _gslCustomActions,
|
|
147
|
+
q as _gslCustomDisplayByUid,
|
|
148
|
+
E as _gslCustomDisplays,
|
|
149
|
+
J as _gslCustomInputByUid,
|
|
150
|
+
Q as _gslCustomInputs,
|
|
151
|
+
Y as _gslCustomLayoutByUid,
|
|
152
|
+
Z as _gslCustomLayouts,
|
|
153
|
+
aa as _gslDateInputByUid,
|
|
154
|
+
sa as _gslDateInputs,
|
|
155
|
+
ea as _gslDatePickerByUid,
|
|
156
|
+
ta as _gslDatePickers,
|
|
157
|
+
ia as _gslDateTimeCalendarByUid,
|
|
158
|
+
na as _gslDateTimeCalendars,
|
|
159
|
+
ra as _gslDateTimeInputByUid,
|
|
160
|
+
ua as _gslDateTimeInputs,
|
|
161
|
+
la as _gslDateTimePickerByUid,
|
|
162
|
+
oa as _gslDateTimePickers,
|
|
163
|
+
ga as _gslDisplayByUid,
|
|
164
|
+
da as _gslDisplays,
|
|
165
|
+
_a as _gslDropdownByUid,
|
|
166
|
+
ca as _gslDropdowns,
|
|
167
|
+
ma as _gslFileUploadByUid,
|
|
168
|
+
pa as _gslFileUploads,
|
|
169
|
+
ya as _gslInputByUid,
|
|
170
|
+
fa as _gslInputs,
|
|
171
|
+
Ta as _gslLayoutByUid,
|
|
172
|
+
ba as _gslLayouts,
|
|
173
|
+
Ua as _gslListByUid,
|
|
174
|
+
Da as _gslLists,
|
|
175
|
+
Ba as _gslMarkdownByUid,
|
|
176
|
+
Ia as _gslMarkdownTextByUid,
|
|
177
|
+
ka as _gslMarkdownTexts,
|
|
178
|
+
Ca as _gslMarkdowns,
|
|
179
|
+
wa as _gslMultiDropdownByUid,
|
|
180
|
+
Pa as _gslMultiDropdowns,
|
|
181
|
+
Ra as _gslMultiFileUploadByUid,
|
|
182
|
+
xa as _gslMultiFileUploads,
|
|
183
|
+
ha as _gslMultiListByUid,
|
|
184
|
+
Ma as _gslMultiLists,
|
|
185
|
+
Fa as _gslNumberInputs,
|
|
186
|
+
ja as _gslPasswordByUid,
|
|
187
|
+
Aa as _gslPasswords,
|
|
188
|
+
La as _gslRadiogroupByUid,
|
|
189
|
+
$a as _gslRadiogroups,
|
|
190
|
+
Sa as _gslRangeCalendarByUid,
|
|
191
|
+
va as _gslRangeCalendars,
|
|
192
|
+
Ga as _gslRangeDateInputByUid,
|
|
193
|
+
Oa as _gslRangeDateInputs,
|
|
194
|
+
Wa as _gslRangeDatePickerByUid,
|
|
195
|
+
Na as _gslRangeDatePickers,
|
|
196
|
+
Ha as _gslRangeDateTimeCalendarByUid,
|
|
197
|
+
Va as _gslRangeDateTimeCalendars,
|
|
198
|
+
za as _gslRangeDateTimeInputByUid,
|
|
199
|
+
Ka as _gslRangeDateTimeInputs,
|
|
200
|
+
Xa as _gslRangeDateTimePickerByUid,
|
|
201
|
+
qa as _gslRangeDateTimePickers,
|
|
202
|
+
Ea as _gslRangeTimeInputByUid,
|
|
203
|
+
Ja as _gslRangeTimeInputs,
|
|
204
|
+
Qa as _gslRangeTimePickerByUid,
|
|
205
|
+
Ya as _gslRangeTimePickers,
|
|
206
|
+
Za as _gslRepeaterByUid,
|
|
207
|
+
as as _gslRepeaters,
|
|
208
|
+
ss as _gslSelectByUid,
|
|
209
|
+
es as _gslSelects,
|
|
210
|
+
T as _gslStates,
|
|
211
|
+
ts as _gslTabs,
|
|
212
|
+
is as _gslTabsByUid,
|
|
213
|
+
b as _gslTag,
|
|
214
|
+
ns as _gslTags,
|
|
215
|
+
rs as _gslTagsByUid,
|
|
216
|
+
us as _gslTextInputs,
|
|
217
|
+
ls as _gslTextareaByUid,
|
|
218
|
+
os as _gslTextareas,
|
|
219
|
+
gs as _gslTimeInputByUid,
|
|
220
|
+
ds as _gslTimeInputs,
|
|
221
|
+
_s as _gslTimePickerByUid,
|
|
222
|
+
cs as _gslTimePickers,
|
|
223
|
+
ms as _guiAccordion,
|
|
224
|
+
ps as _guiAlert,
|
|
225
|
+
ys as _guiBooleanInput,
|
|
226
|
+
fs as _guiButton,
|
|
227
|
+
Ts as _guiCalendar,
|
|
228
|
+
bs as _guiCheckbox,
|
|
229
|
+
Us as _guiCurrency,
|
|
230
|
+
Ds as _guiCustomAction,
|
|
231
|
+
Bs as _guiCustomDisplay,
|
|
232
|
+
Is as _guiCustomInput,
|
|
233
|
+
ks as _guiCustomLayout,
|
|
234
|
+
Cs as _guiDateInput,
|
|
235
|
+
ws as _guiDatePicker,
|
|
236
|
+
Ps as _guiDateTimeCalendar,
|
|
237
|
+
Rs as _guiDateTimeInput,
|
|
238
|
+
xs as _guiDateTimePicker,
|
|
239
|
+
hs as _guiDisplay,
|
|
240
|
+
Ms as _guiDropdown,
|
|
241
|
+
Fs as _guiFileUpload,
|
|
242
|
+
js as _guiFlex,
|
|
243
|
+
As as _guiGrid,
|
|
244
|
+
Ls as _guiHorizontalFlex,
|
|
245
|
+
$s as _guiHorizontalGrid,
|
|
246
|
+
Ss as _guiList,
|
|
247
|
+
vs as _guiMarkdown,
|
|
248
|
+
Gs as _guiMarkdownText,
|
|
249
|
+
Os as _guiMultiDropdown,
|
|
250
|
+
Ws as _guiMultiFileUpload,
|
|
251
|
+
Ns as _guiMultiList,
|
|
252
|
+
Hs as _guiNumberInput,
|
|
253
|
+
Vs as _guiPassword,
|
|
254
|
+
zs as _guiRadiogroup,
|
|
255
|
+
Ks as _guiRangeCalendar,
|
|
256
|
+
Xs as _guiRangeDateInput,
|
|
257
|
+
qs as _guiRangeDatePicker,
|
|
258
|
+
Es as _guiRangeDateTimeCalendar,
|
|
259
|
+
Js as _guiRangeDateTimeInput,
|
|
260
|
+
Qs as _guiRangeDateTimePicker,
|
|
261
|
+
Ys as _guiRangeTimeInput,
|
|
262
|
+
Zs as _guiRangeTimePicker,
|
|
263
|
+
ae as _guiRepeater,
|
|
264
|
+
se as _guiSelect,
|
|
265
|
+
ee as _guiTabs,
|
|
266
|
+
te as _guiTags,
|
|
267
|
+
ie as _guiTextInput,
|
|
268
|
+
ne as _guiTextarea,
|
|
269
|
+
re as _guiTimeInput,
|
|
270
|
+
ue as _guiTimePicker,
|
|
271
|
+
le as _guiVerticalFlex,
|
|
272
|
+
oe as _guiVerticalGrid,
|
|
273
|
+
k as accordionButtonId,
|
|
274
|
+
C as accordionSectionId,
|
|
275
|
+
m as actionWidgets,
|
|
276
|
+
me as createGslSelector,
|
|
277
|
+
ge as defineShortcutType,
|
|
278
|
+
c as displayWidgets,
|
|
279
|
+
pe as extractWidgetProps,
|
|
280
|
+
de as formDefs,
|
|
281
|
+
l as gapFromPixels,
|
|
282
|
+
w as getItemKey,
|
|
283
|
+
U as golemForm,
|
|
284
|
+
h as gridCellClasses,
|
|
285
|
+
x as gridClasses,
|
|
286
|
+
d as inputWidgets,
|
|
287
|
+
ye as isDxDefinitions,
|
|
288
|
+
D as isOption,
|
|
289
|
+
_ as layoutWidgets,
|
|
290
|
+
fe as processAutoLabel,
|
|
291
|
+
Te as processAutoPlaceholder,
|
|
292
|
+
P as repeaterIndexSuffix,
|
|
293
|
+
_e as resolveFormInput,
|
|
294
|
+
R as resolveGrid,
|
|
295
|
+
B as tabButtonId,
|
|
296
|
+
I as tabPanelId
|
|
264
297
|
};
|
package/internals.umd.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./resolveFormInput-Bi4buDf0.cjs"),g=require("@golemui/dx");require("@golemui/gui-validators");require("@golemui/core");function r(i,...t){return t.map(s=>({...s,targetState:i}))}function _(i,...t){return{kind:"aggregated",matcher:s=>s.tags?.includes(i)??!1,children:t}}const a=["calendar","dateTimeCalendar","checkbox","currency","dateInput","datePicker","dateTimeInput","dateTimePicker","dropdown","fileUpload","list","markdown","multiDropdown","multiFileUpload","multiList","number","password","radiogroup","rangeCalendar","rangeDateInput","rangeDatePicker","rangeDateTimeInput","rangeDateTimeCalendar","rangeDateTimePicker","rangeTimeInput","rangeTimePicker","repeater","select","tags","textarea","textinput","timeInput","timePicker","toggle"],l=["accordion","flex","grid","tabs"],u=["alert","markdownText","renderer"],n=["button"];[...a,...l,...u,...n];class o{create(t){return{states:t.states,form:{uid:"gui-root-uid",type:"flex",kind:"layout",children:t.form}}}}function d(){return new o}const c=i=>i!==null&&typeof i=="object"&&Object.prototype.hasOwnProperty.call(i,"label")&&Object.prototype.hasOwnProperty.call(i,"value");function p(i,t){return`tab_${i}_${t}`}function y(i,t){return`tabpanel_${i}_${t}`}function m(i,t){return`accordion_button_${i}_${t}`}function T(i,t){return`accordion_section_${i}_${t}`}function U(i,t){if(i!=null&&typeof i=="object"&&"__rid"in i)return i.__rid;const s=t();return Object.defineProperty(i,"__rid",{value:s,enumerable:!1,configurable:!1}),s}function B(i){return i.match(/(\[\d+\])+$/)?.[0]??""}exports._gslAccordionByUid=e._gslAccordionByUid;exports._gslAccordions=e._gslAccordions;exports._gslActionByUid=e._gslActionByUid;exports._gslActions=e._gslActions;exports._gslAlertByUid=e._gslAlertByUid;exports._gslAlerts=e._gslAlerts;exports._gslBooleanInputs=e._gslBooleanInputs;exports._gslCalendarByUid=e._gslCalendarByUid;exports._gslCalendars=e._gslCalendars;exports._gslCheckboxByUid=e._gslCheckboxByUid;exports._gslCheckboxes=e._gslCheckboxes;exports._gslCurrencies=e._gslCurrencies;exports._gslCurrencyByUid=e._gslCurrencyByUid;exports._gslCustomActionByUid=e._gslCustomActionByUid;exports._gslCustomActions=e._gslCustomActions;exports._gslCustomDisplayByUid=e._gslCustomDisplayByUid;exports._gslCustomDisplays=e._gslCustomDisplays;exports._gslCustomInputByUid=e._gslCustomInputByUid;exports._gslCustomInputs=e._gslCustomInputs;exports._gslCustomLayoutByUid=e._gslCustomLayoutByUid;exports._gslCustomLayouts=e._gslCustomLayouts;exports._gslDateInputByUid=e._gslDateInputByUid;exports._gslDateInputs=e._gslDateInputs;exports._gslDatePickerByUid=e._gslDatePickerByUid;exports._gslDatePickers=e._gslDatePickers;exports._gslDateTimeCalendarByUid=e._gslDateTimeCalendarByUid;exports._gslDateTimeCalendars=e._gslDateTimeCalendars;exports._gslDateTimeInputByUid=e._gslDateTimeInputByUid;exports._gslDateTimeInputs=e._gslDateTimeInputs;exports._gslDateTimePickerByUid=e._gslDateTimePickerByUid;exports._gslDateTimePickers=e._gslDateTimePickers;exports._gslDisplayByUid=e._gslDisplayByUid;exports._gslDisplays=e._gslDisplays;exports._gslDropdownByUid=e._gslDropdownByUid;exports._gslDropdowns=e._gslDropdowns;exports._gslFileUploadByUid=e._gslFileUploadByUid;exports._gslFileUploads=e._gslFileUploads;exports._gslInputByUid=e._gslInputByUid;exports._gslInputs=e._gslInputs;exports._gslLayoutByUid=e._gslLayoutByUid;exports._gslLayouts=e._gslLayouts;exports._gslListByUid=e._gslListByUid;exports._gslLists=e._gslLists;exports._gslMarkdownByUid=e._gslMarkdownByUid;exports._gslMarkdownTextByUid=e._gslMarkdownTextByUid;exports._gslMarkdownTexts=e._gslMarkdownTexts;exports._gslMarkdowns=e._gslMarkdowns;exports._gslMultiDropdownByUid=e._gslMultiDropdownByUid;exports._gslMultiDropdowns=e._gslMultiDropdowns;exports._gslMultiFileUploadByUid=e._gslMultiFileUploadByUid;exports._gslMultiFileUploads=e._gslMultiFileUploads;exports._gslMultiListByUid=e._gslMultiListByUid;exports._gslMultiLists=e._gslMultiLists;exports._gslNumberInputs=e._gslNumberInputs;exports._gslPasswordByUid=e._gslPasswordByUid;exports._gslPasswords=e._gslPasswords;exports._gslRadiogroupByUid=e._gslRadiogroupByUid;exports._gslRadiogroups=e._gslRadiogroups;exports._gslRangeCalendarByUid=e._gslRangeCalendarByUid;exports._gslRangeCalendars=e._gslRangeCalendars;exports._gslRangeDateInputByUid=e._gslRangeDateInputByUid;exports._gslRangeDateInputs=e._gslRangeDateInputs;exports._gslRangeDatePickerByUid=e._gslRangeDatePickerByUid;exports._gslRangeDatePickers=e._gslRangeDatePickers;exports._gslRangeDateTimeCalendarByUid=e._gslRangeDateTimeCalendarByUid;exports._gslRangeDateTimeCalendars=e._gslRangeDateTimeCalendars;exports._gslRangeDateTimeInputByUid=e._gslRangeDateTimeInputByUid;exports._gslRangeDateTimeInputs=e._gslRangeDateTimeInputs;exports._gslRangeDateTimePickerByUid=e._gslRangeDateTimePickerByUid;exports._gslRangeDateTimePickers=e._gslRangeDateTimePickers;exports._gslRangeTimeInputByUid=e._gslRangeTimeInputByUid;exports._gslRangeTimeInputs=e._gslRangeTimeInputs;exports._gslRangeTimePickerByUid=e._gslRangeTimePickerByUid;exports._gslRangeTimePickers=e._gslRangeTimePickers;exports._gslRepeaterByUid=e._gslRepeaterByUid;exports._gslRepeaters=e._gslRepeaters;exports._gslSelectByUid=e._gslSelectByUid;exports._gslSelects=e._gslSelects;exports._gslTabs=e._gslTabs;exports._gslTabsByUid=e._gslTabsByUid;exports._gslTags=e._gslTags;exports._gslTagsByUid=e._gslTagsByUid;exports._gslTextInputs=e._gslTextInputs;exports._gslTextareaByUid=e._gslTextareaByUid;exports._gslTextareas=e._gslTextareas;exports._gslTimeInputByUid=e._gslTimeInputByUid;exports._gslTimeInputs=e._gslTimeInputs;exports._gslTimePickerByUid=e._gslTimePickerByUid;exports._gslTimePickers=e._gslTimePickers;exports._guiAccordion=e._guiAccordion;exports._guiAlert=e._guiAlert;exports._guiBooleanInput=e._guiBooleanInput;exports._guiButton=e._guiButton;exports._guiCalendar=e._guiCalendar;exports._guiCheckbox=e._guiCheckbox;exports._guiCurrency=e._guiCurrency;exports._guiCustomAction=e._guiCustomAction;exports._guiCustomDisplay=e._guiCustomDisplay;exports._guiCustomInput=e._guiCustomInput;exports._guiCustomLayout=e._guiCustomLayout;exports._guiDateInput=e._guiDateInput;exports._guiDatePicker=e._guiDatePicker;exports._guiDateTimeCalendar=e._guiDateTimeCalendar;exports._guiDateTimeInput=e._guiDateTimeInput;exports._guiDateTimePicker=e._guiDateTimePicker;exports._guiDisplay=e._guiDisplay;exports._guiDropdown=e._guiDropdown;exports._guiFileUpload=e._guiFileUpload;exports._guiFlex=e._guiFlex;exports._guiGrid=e._guiGrid;exports._guiHorizontalFlex=e._guiHorizontalFlex;exports._guiHorizontalGrid=e._guiHorizontalGrid;exports._guiList=e._guiList;exports._guiMarkdown=e._guiMarkdown;exports._guiMarkdownText=e._guiMarkdownText;exports._guiMultiDropdown=e._guiMultiDropdown;exports._guiMultiFileUpload=e._guiMultiFileUpload;exports._guiMultiList=e._guiMultiList;exports._guiNumberInput=e._guiNumberInput;exports._guiPassword=e._guiPassword;exports._guiRadiogroup=e._guiRadiogroup;exports._guiRangeCalendar=e._guiRangeCalendar;exports._guiRangeDateInput=e._guiRangeDateInput;exports._guiRangeDatePicker=e._guiRangeDatePicker;exports._guiRangeDateTimeCalendar=e._guiRangeDateTimeCalendar;exports._guiRangeDateTimeInput=e._guiRangeDateTimeInput;exports._guiRangeDateTimePicker=e._guiRangeDateTimePicker;exports._guiRangeTimeInput=e._guiRangeTimeInput;exports._guiRangeTimePicker=e._guiRangeTimePicker;exports._guiRepeater=e._guiRepeater;exports._guiSelect=e._guiSelect;exports._guiTabs=e._guiTabs;exports._guiTags=e._guiTags;exports._guiTextInput=e._guiTextInput;exports._guiTextarea=e._guiTextarea;exports._guiTimeInput=e._guiTimeInput;exports._guiTimePicker=e._guiTimePicker;exports._guiVerticalFlex=e._guiVerticalFlex;exports._guiVerticalGrid=e._guiVerticalGrid;exports.defineShortcutType=e.defineShortcutType;exports.formDefs=e.formDefs;exports.resolveFormInput=e.resolveFormInput;Object.defineProperty(exports,"createGslSelector",{enumerable:!0,get:()=>g.createGslSelector});Object.defineProperty(exports,"extractWidgetProps",{enumerable:!0,get:()=>g.extractWidgetProps});Object.defineProperty(exports,"isDxDefinitions",{enumerable:!0,get:()=>g.isDxDefinitions});Object.defineProperty(exports,"processAutoLabel",{enumerable:!0,get:()=>g.processAutoLabel});Object.defineProperty(exports,"processAutoPlaceholder",{enumerable:!0,get:()=>g.processAutoPlaceholder});exports._gslStates=r;exports._gslTag=_;exports.accordionButtonId=m;exports.accordionSectionId=T;exports.actionWidgets=n;exports.displayWidgets=u;exports.getItemKey=U;exports.golemForm=d;exports.inputWidgets=a;exports.isOption=c;exports.layoutWidgets=l;exports.repeaterIndexSuffix=B;exports.tabButtonId=p;exports.tabPanelId=y;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./resolveFormInput-B7fb-g3v.cjs"),u=require("@golemui/dx");require("@golemui/gui-validators");require("@golemui/core");function T(i,...t){return t.map(s=>({...s,targetState:i}))}function U(i,...t){return{kind:"aggregated",matcher:s=>s.tags?.includes(i)??!1,children:t}}const d=["calendar","dateTimeCalendar","checkbox","currency","dateInput","datePicker","dateTimeInput","dateTimePicker","dropdown","fileUpload","list","markdown","multiDropdown","multiFileUpload","multiList","number","password","radiogroup","rangeCalendar","rangeDateInput","rangeDatePicker","rangeDateTimeInput","rangeDateTimeCalendar","rangeDateTimePicker","rangeTimeInput","rangeTimePicker","repeater","select","tags","textarea","textinput","timeInput","timePicker","toggle"],c=["accordion","flex","grid","tabs"],p=["alert","markdownText","renderer"],m=["button"];[...d,...c,...p,...m];class B{create(t){return{states:t.states,form:{uid:"gui-root-uid",type:"grid",kind:"layout",children:t.form}}}}function D(){return new B}const I=i=>i!==null&&typeof i=="object"&&Object.prototype.hasOwnProperty.call(i,"label")&&Object.prototype.hasOwnProperty.call(i,"value");function f(i,t){return`tab_${i}_${t}`}function C(i,t){return`tabpanel_${i}_${t}`}function k(i,t){return`accordion_button_${i}_${t}`}function P(i,t){return`accordion_section_${i}_${t}`}function R(i,t){if(i!=null&&typeof i=="object"&&"__rid"in i)return i.__rid;const s=t();return Object.defineProperty(i,"__rid",{value:s,enumerable:!1,configurable:!1}),s}function b(i){return i.match(/(\[\d+\])+$/)?.[0]??""}const r=12;function o(i){return i<=2?"none":i<=6?"xs":i<=12?"sm":i<=20?"md":i<=28?"lg":"xl"}function _(i){return i==="space-around"||i==="space-evenly"?"space-between":i}const y=(i,t)=>Math.min(Math.max(Math.round(i),1),t);function w(i,t={}){if(i==="flex"){const n=t;return{mode:n.direction?.startsWith("row")?"row":"stack",gap:n.gap===void 0?"md":o(n.gap),justify:_(n.align)??"stretch"}}const s=t,a=s.columnGap??s.rowGap,g=s.gap??(a===void 0?"md":o(a)),l=s.justify??_(s.align)??"stretch";return s.columns==="auto"?{mode:"auto",gap:g,justify:l}:typeof s.columns=="number"?{mode:"columns",columns:y(s.columns,r),gap:g,justify:l}:s.direction!=="row"?{mode:"stack",gap:g,justify:l}:s.autoFit===!1?{mode:"columns",columns:r,gap:g,justify:l}:{mode:"row",gap:g,justify:l}}function x(i){const t=["gui-grid"];return i.mode==="row"&&t.push("gui-grid--row"),i.mode==="columns"&&t.push(`gui-grid--columns-${i.columns}`),i.mode==="auto"&&t.push("gui-grid--auto"),i.gap!=="md"&&t.push(`gui-grid--gap-${i.gap}`),i.mode==="row"&&i.justify!=="stretch"&&t.push(`gui-grid--justify-${i.justify}`),t.join(" ")}function M(i,t){const a=i.mode==="row"&&i.justify==="stretch"?r:i.mode==="columns"?i.columns:1,g=t===void 0||a===void 0?1:y(t,a);return g>1?`gui-grid__cell gui-grid__cell--span-${g}`:"gui-grid__cell"}exports._gslAccordionByUid=e._gslAccordionByUid;exports._gslAccordions=e._gslAccordions;exports._gslActionByUid=e._gslActionByUid;exports._gslActions=e._gslActions;exports._gslAlertByUid=e._gslAlertByUid;exports._gslAlerts=e._gslAlerts;exports._gslBooleanInputs=e._gslBooleanInputs;exports._gslCalendarByUid=e._gslCalendarByUid;exports._gslCalendars=e._gslCalendars;exports._gslCheckboxByUid=e._gslCheckboxByUid;exports._gslCheckboxes=e._gslCheckboxes;exports._gslCurrencies=e._gslCurrencies;exports._gslCurrencyByUid=e._gslCurrencyByUid;exports._gslCustomActionByUid=e._gslCustomActionByUid;exports._gslCustomActions=e._gslCustomActions;exports._gslCustomDisplayByUid=e._gslCustomDisplayByUid;exports._gslCustomDisplays=e._gslCustomDisplays;exports._gslCustomInputByUid=e._gslCustomInputByUid;exports._gslCustomInputs=e._gslCustomInputs;exports._gslCustomLayoutByUid=e._gslCustomLayoutByUid;exports._gslCustomLayouts=e._gslCustomLayouts;exports._gslDateInputByUid=e._gslDateInputByUid;exports._gslDateInputs=e._gslDateInputs;exports._gslDatePickerByUid=e._gslDatePickerByUid;exports._gslDatePickers=e._gslDatePickers;exports._gslDateTimeCalendarByUid=e._gslDateTimeCalendarByUid;exports._gslDateTimeCalendars=e._gslDateTimeCalendars;exports._gslDateTimeInputByUid=e._gslDateTimeInputByUid;exports._gslDateTimeInputs=e._gslDateTimeInputs;exports._gslDateTimePickerByUid=e._gslDateTimePickerByUid;exports._gslDateTimePickers=e._gslDateTimePickers;exports._gslDisplayByUid=e._gslDisplayByUid;exports._gslDisplays=e._gslDisplays;exports._gslDropdownByUid=e._gslDropdownByUid;exports._gslDropdowns=e._gslDropdowns;exports._gslFileUploadByUid=e._gslFileUploadByUid;exports._gslFileUploads=e._gslFileUploads;exports._gslInputByUid=e._gslInputByUid;exports._gslInputs=e._gslInputs;exports._gslLayoutByUid=e._gslLayoutByUid;exports._gslLayouts=e._gslLayouts;exports._gslListByUid=e._gslListByUid;exports._gslLists=e._gslLists;exports._gslMarkdownByUid=e._gslMarkdownByUid;exports._gslMarkdownTextByUid=e._gslMarkdownTextByUid;exports._gslMarkdownTexts=e._gslMarkdownTexts;exports._gslMarkdowns=e._gslMarkdowns;exports._gslMultiDropdownByUid=e._gslMultiDropdownByUid;exports._gslMultiDropdowns=e._gslMultiDropdowns;exports._gslMultiFileUploadByUid=e._gslMultiFileUploadByUid;exports._gslMultiFileUploads=e._gslMultiFileUploads;exports._gslMultiListByUid=e._gslMultiListByUid;exports._gslMultiLists=e._gslMultiLists;exports._gslNumberInputs=e._gslNumberInputs;exports._gslPasswordByUid=e._gslPasswordByUid;exports._gslPasswords=e._gslPasswords;exports._gslRadiogroupByUid=e._gslRadiogroupByUid;exports._gslRadiogroups=e._gslRadiogroups;exports._gslRangeCalendarByUid=e._gslRangeCalendarByUid;exports._gslRangeCalendars=e._gslRangeCalendars;exports._gslRangeDateInputByUid=e._gslRangeDateInputByUid;exports._gslRangeDateInputs=e._gslRangeDateInputs;exports._gslRangeDatePickerByUid=e._gslRangeDatePickerByUid;exports._gslRangeDatePickers=e._gslRangeDatePickers;exports._gslRangeDateTimeCalendarByUid=e._gslRangeDateTimeCalendarByUid;exports._gslRangeDateTimeCalendars=e._gslRangeDateTimeCalendars;exports._gslRangeDateTimeInputByUid=e._gslRangeDateTimeInputByUid;exports._gslRangeDateTimeInputs=e._gslRangeDateTimeInputs;exports._gslRangeDateTimePickerByUid=e._gslRangeDateTimePickerByUid;exports._gslRangeDateTimePickers=e._gslRangeDateTimePickers;exports._gslRangeTimeInputByUid=e._gslRangeTimeInputByUid;exports._gslRangeTimeInputs=e._gslRangeTimeInputs;exports._gslRangeTimePickerByUid=e._gslRangeTimePickerByUid;exports._gslRangeTimePickers=e._gslRangeTimePickers;exports._gslRepeaterByUid=e._gslRepeaterByUid;exports._gslRepeaters=e._gslRepeaters;exports._gslSelectByUid=e._gslSelectByUid;exports._gslSelects=e._gslSelects;exports._gslTabs=e._gslTabs;exports._gslTabsByUid=e._gslTabsByUid;exports._gslTags=e._gslTags;exports._gslTagsByUid=e._gslTagsByUid;exports._gslTextInputs=e._gslTextInputs;exports._gslTextareaByUid=e._gslTextareaByUid;exports._gslTextareas=e._gslTextareas;exports._gslTimeInputByUid=e._gslTimeInputByUid;exports._gslTimeInputs=e._gslTimeInputs;exports._gslTimePickerByUid=e._gslTimePickerByUid;exports._gslTimePickers=e._gslTimePickers;exports._guiAccordion=e._guiAccordion;exports._guiAlert=e._guiAlert;exports._guiBooleanInput=e._guiBooleanInput;exports._guiButton=e._guiButton;exports._guiCalendar=e._guiCalendar;exports._guiCheckbox=e._guiCheckbox;exports._guiCurrency=e._guiCurrency;exports._guiCustomAction=e._guiCustomAction;exports._guiCustomDisplay=e._guiCustomDisplay;exports._guiCustomInput=e._guiCustomInput;exports._guiCustomLayout=e._guiCustomLayout;exports._guiDateInput=e._guiDateInput;exports._guiDatePicker=e._guiDatePicker;exports._guiDateTimeCalendar=e._guiDateTimeCalendar;exports._guiDateTimeInput=e._guiDateTimeInput;exports._guiDateTimePicker=e._guiDateTimePicker;exports._guiDisplay=e._guiDisplay;exports._guiDropdown=e._guiDropdown;exports._guiFileUpload=e._guiFileUpload;exports._guiFlex=e._guiFlex;exports._guiGrid=e._guiGrid;exports._guiHorizontalFlex=e._guiHorizontalFlex;exports._guiHorizontalGrid=e._guiHorizontalGrid;exports._guiList=e._guiList;exports._guiMarkdown=e._guiMarkdown;exports._guiMarkdownText=e._guiMarkdownText;exports._guiMultiDropdown=e._guiMultiDropdown;exports._guiMultiFileUpload=e._guiMultiFileUpload;exports._guiMultiList=e._guiMultiList;exports._guiNumberInput=e._guiNumberInput;exports._guiPassword=e._guiPassword;exports._guiRadiogroup=e._guiRadiogroup;exports._guiRangeCalendar=e._guiRangeCalendar;exports._guiRangeDateInput=e._guiRangeDateInput;exports._guiRangeDatePicker=e._guiRangeDatePicker;exports._guiRangeDateTimeCalendar=e._guiRangeDateTimeCalendar;exports._guiRangeDateTimeInput=e._guiRangeDateTimeInput;exports._guiRangeDateTimePicker=e._guiRangeDateTimePicker;exports._guiRangeTimeInput=e._guiRangeTimeInput;exports._guiRangeTimePicker=e._guiRangeTimePicker;exports._guiRepeater=e._guiRepeater;exports._guiSelect=e._guiSelect;exports._guiTabs=e._guiTabs;exports._guiTags=e._guiTags;exports._guiTextInput=e._guiTextInput;exports._guiTextarea=e._guiTextarea;exports._guiTimeInput=e._guiTimeInput;exports._guiTimePicker=e._guiTimePicker;exports._guiVerticalFlex=e._guiVerticalFlex;exports._guiVerticalGrid=e._guiVerticalGrid;exports.defineShortcutType=e.defineShortcutType;exports.formDefs=e.formDefs;exports.resolveFormInput=e.resolveFormInput;Object.defineProperty(exports,"createGslSelector",{enumerable:!0,get:()=>u.createGslSelector});Object.defineProperty(exports,"extractWidgetProps",{enumerable:!0,get:()=>u.extractWidgetProps});Object.defineProperty(exports,"isDxDefinitions",{enumerable:!0,get:()=>u.isDxDefinitions});Object.defineProperty(exports,"processAutoLabel",{enumerable:!0,get:()=>u.processAutoLabel});Object.defineProperty(exports,"processAutoPlaceholder",{enumerable:!0,get:()=>u.processAutoPlaceholder});exports._gslStates=T;exports._gslTag=U;exports.accordionButtonId=k;exports.accordionSectionId=P;exports.actionWidgets=m;exports.displayWidgets=p;exports.gapFromPixels=o;exports.getItemKey=R;exports.golemForm=D;exports.gridCellClasses=M;exports.gridClasses=x;exports.inputWidgets=d;exports.isOption=I;exports.layoutWidgets=c;exports.repeaterIndexSuffix=b;exports.resolveGrid=w;exports.tabButtonId=f;exports.tabPanelId=C;
|
package/lib/dx/gui.d.ts
CHANGED
|
@@ -98,8 +98,11 @@ export declare const guiImplementation: import('@golemui/dx').WidgetSetImplement
|
|
|
98
98
|
custom: typeof _guiCustomDisplay;
|
|
99
99
|
};
|
|
100
100
|
layouts: {
|
|
101
|
+
/** @deprecated Use `grid`, which stacks its children; a flex layout renders as one. */
|
|
101
102
|
flex: (children: import('@golemui/dx').ValidGuiShortcut[], props?: import('./shortcuts/layouts/layouts.domain').FlexFamilyProps, tags?: string[]) => import('./shortcuts/layouts/layouts.domain').GuiLayoutItemsShortcut;
|
|
103
|
+
/** @deprecated Use `horizontalGrid`; a flex layout renders as a grid. */
|
|
102
104
|
horizontalFlex: (children: import('@golemui/dx').ValidGuiShortcut[], props?: Omit<import('./shortcuts/layouts/layouts.domain').FlexFamilyProps, "direction">, tags?: string[]) => import('./shortcuts/layouts/layouts.domain').GuiLayoutItemsShortcut;
|
|
105
|
+
/** @deprecated Use `grid` or `verticalGrid`; a flex layout renders as a grid. */
|
|
103
106
|
verticalFlex: (children: import('@golemui/dx').ValidGuiShortcut[], props?: Omit<import('./shortcuts/layouts/layouts.domain').FlexFamilyProps, "direction">, tags?: string[]) => import('./shortcuts/layouts/layouts.domain').GuiLayoutItemsShortcut;
|
|
104
107
|
grid: (children: import('@golemui/dx').ValidGuiShortcut[], props?: import('./shortcuts/layouts/layouts.domain').GridFamilyProps, tags?: string[]) => import('./shortcuts/layouts/layouts.domain').GuiLayoutItemsShortcut;
|
|
105
108
|
horizontalGrid: (children: import('@golemui/dx').ValidGuiShortcut[], props?: Omit<import('./shortcuts/layouts/layouts.domain').GridFamilyProps, "direction">, tags?: string[]) => import('./shortcuts/layouts/layouts.domain').GuiLayoutItemsShortcut;
|
|
@@ -251,8 +254,11 @@ export declare const gui: {
|
|
|
251
254
|
custom: typeof _guiCustomDisplay;
|
|
252
255
|
};
|
|
253
256
|
layouts: {
|
|
257
|
+
/** @deprecated Use `grid`, which stacks its children; a flex layout renders as one. */
|
|
254
258
|
flex: (children: import('@golemui/dx').ValidGuiShortcut[], props?: import('./shortcuts/layouts/layouts.domain').FlexFamilyProps, tags?: string[]) => import('./shortcuts/layouts/layouts.domain').GuiLayoutItemsShortcut;
|
|
259
|
+
/** @deprecated Use `horizontalGrid`; a flex layout renders as a grid. */
|
|
255
260
|
horizontalFlex: (children: import('@golemui/dx').ValidGuiShortcut[], props?: Omit<import('./shortcuts/layouts/layouts.domain').FlexFamilyProps, "direction">, tags?: string[]) => import('./shortcuts/layouts/layouts.domain').GuiLayoutItemsShortcut;
|
|
261
|
+
/** @deprecated Use `grid` or `verticalGrid`; a flex layout renders as a grid. */
|
|
256
262
|
verticalFlex: (children: import('@golemui/dx').ValidGuiShortcut[], props?: Omit<import('./shortcuts/layouts/layouts.domain').FlexFamilyProps, "direction">, tags?: string[]) => import('./shortcuts/layouts/layouts.domain').GuiLayoutItemsShortcut;
|
|
257
263
|
grid: (children: import('@golemui/dx').ValidGuiShortcut[], props?: import('./shortcuts/layouts/layouts.domain').GridFamilyProps, tags?: string[]) => import('./shortcuts/layouts/layouts.domain').GuiLayoutItemsShortcut;
|
|
258
264
|
horizontalGrid: (children: import('@golemui/dx').ValidGuiShortcut[], props?: Omit<import('./shortcuts/layouts/layouts.domain').GridFamilyProps, "direction">, tags?: string[]) => import('./shortcuts/layouts/layouts.domain').GuiLayoutItemsShortcut;
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
import { ValidGuiShortcut } from '@golemui/dx';
|
|
2
2
|
import { FlexFamilyProps, GridFamilyProps, GuiLayoutItemsShortcut } from './layouts.domain';
|
|
3
|
+
/** @deprecated Use `gui.layouts.grid`, which stacks its children; a flex layout renders as one. */
|
|
3
4
|
export declare const _guiFlex: (children: ValidGuiShortcut[], props?: FlexFamilyProps, tags?: string[]) => GuiLayoutItemsShortcut;
|
|
5
|
+
/** @deprecated Use `gui.layouts.horizontalGrid`; a flex layout renders as a grid. */
|
|
4
6
|
export declare const _guiHorizontalFlex: (children: ValidGuiShortcut[], props?: Omit<FlexFamilyProps, "direction">, tags?: string[]) => GuiLayoutItemsShortcut;
|
|
7
|
+
/** @deprecated Use `gui.layouts.grid` or `gui.layouts.verticalGrid`; a flex layout renders as a grid. */
|
|
5
8
|
export declare const _guiVerticalFlex: (children: ValidGuiShortcut[], props?: Omit<FlexFamilyProps, "direction">, tags?: string[]) => GuiLayoutItemsShortcut;
|
|
9
|
+
/** A grid: a stack by default, a row with `direction: 'row'`, or columns with `columns`. */
|
|
6
10
|
export declare const _guiGrid: (children: ValidGuiShortcut[], props?: GridFamilyProps, tags?: string[]) => GuiLayoutItemsShortcut;
|
|
11
|
+
/** A grid row: the children share its width by `size`. */
|
|
7
12
|
export declare const _guiHorizontalGrid: (children: ValidGuiShortcut[], props?: Omit<GridFamilyProps, "direction">, tags?: string[]) => GuiLayoutItemsShortcut;
|
|
13
|
+
/** A grid stack, as `gui.layouts.grid` with no direction. */
|
|
8
14
|
export declare const _guiVerticalGrid: (children: ValidGuiShortcut[], props?: Omit<GridFamilyProps, "direction">, tags?: string[]) => GuiLayoutItemsShortcut;
|
|
@@ -3,14 +3,19 @@ import { DxRuntimeParams, ValidGuiShortcut, DxCommonFields, DxInternalFields, Dx
|
|
|
3
3
|
export interface LayoutDecorator extends DxLayoutBase, DxCommonFields {
|
|
4
4
|
widgetName?: string;
|
|
5
5
|
direction?: FlexProps['direction'] | GridProps['direction'];
|
|
6
|
-
|
|
6
|
+
columns?: GridProps['columns'];
|
|
7
|
+
justify?: FlexProps['justify'] | GridProps['justify'];
|
|
7
8
|
align?: FlexProps['align'] | GridProps['align'];
|
|
8
|
-
gap?: FlexProps['gap'];
|
|
9
|
+
gap?: FlexProps['gap'] | GridProps['gap'];
|
|
9
10
|
columnGap?: GridProps['columnGap'];
|
|
10
11
|
rowGap?: GridProps['rowGap'];
|
|
11
12
|
autoFit?: GridProps['autoFit'];
|
|
12
13
|
}
|
|
13
|
-
/**
|
|
14
|
+
/**
|
|
15
|
+
* User-facing prop slot for the flex family (`gui.layouts.flex` and variants).
|
|
16
|
+
*
|
|
17
|
+
* @deprecated Use the grid family (`GridFamilyProps`).
|
|
18
|
+
*/
|
|
14
19
|
export type FlexFamilyProps = FlexProps & DxLayoutBase & DxCommonFields;
|
|
15
20
|
/** User-facing prop slot for the grid family (`gui.layouts.grid` and variants). */
|
|
16
21
|
export type GridFamilyProps = GridProps & DxLayoutBase & DxCommonFields;
|