@jsswift/ui 1.0.45 → 1.0.46
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/min-ui.js +4 -4
- package/dist/ui.js +10561 -14120
- package/dist/ui.min.js +4 -4
- package/package.json +2 -2
- package/src/01-foundation-helpers.js +0 -402
- package/src/10-primitives-layout.js +14 -1013
- package/src/20-display-content.js +484 -718
- package/src/21-list-content.js +246 -341
- package/src/22-banner-content.js +3 -116
- package/src/23-tooltip.js +276 -326
- package/src/31-form-advanced.js +2638 -3003
- package/src/40-navigation.js +1262 -1454
- package/src/41-tab-panel.js +896 -1090
- package/src/50-feedback.js +999 -1209
- package/src/60-shell-app.js +5 -265
- package/src/61-form-service.js +304 -386
- package/src/70-dialog.js +209 -277
- package/src/71-menu-overlays.js +1175 -1400
- package/src/80-data.js +433 -503
- package/src/modules.json +59 -23
|
@@ -224,54 +224,7 @@
|
|
|
224
224
|
setPropertyProps(el, props);
|
|
225
225
|
return el;
|
|
226
226
|
};
|
|
227
|
-
|
|
228
|
-
UI.meta = UI.meta || {};
|
|
229
|
-
UI.meta.Row = {
|
|
230
|
-
signature: "UI.Row(...children) | UI.Row(props, ...children)",
|
|
231
|
-
props: {
|
|
232
|
-
start: "Node|Function|Array",
|
|
233
|
-
left: "Alias of start",
|
|
234
|
-
body: "Node|Function|Array",
|
|
235
|
-
center: "Alias of body",
|
|
236
|
-
end: "Node|Function|Array",
|
|
237
|
-
right: "Alias of end",
|
|
238
|
-
align: `stretch|flex-start|center|flex-end|baseline`,
|
|
239
|
-
justify: `flex-start|center|flex-end|space-between|space-around|space-evenly`,
|
|
240
|
-
wrap: "boolean|string",
|
|
241
|
-
direction: `row|row-reverse|column|column-reverse`,
|
|
242
|
-
reverse: "boolean",
|
|
243
|
-
gap: "string|number",
|
|
244
|
-
rowGap: "string|number",
|
|
245
|
-
columnGap: "string|number",
|
|
246
|
-
inline: "boolean",
|
|
247
|
-
full: "boolean",
|
|
248
|
-
width: "string|number",
|
|
249
|
-
minWidth: "string|number",
|
|
250
|
-
maxWidth: "string|number",
|
|
251
|
-
mobile: "{ gap?, direction?, wrap?, align?, justify?, width?, minWidth?, maxWidth? }",
|
|
252
|
-
tablet: "{ gap?, direction?, wrap?, align?, justify?, width?, minWidth?, maxWidth? }",
|
|
253
|
-
pc: "{ gap?, direction?, wrap?, align?, justify?, width?, minWidth?, maxWidth? }",
|
|
254
|
-
startClass: "string",
|
|
255
|
-
bodyClass: "string",
|
|
256
|
-
centerClass: "Alias of bodyClass",
|
|
257
|
-
endClass: "string",
|
|
258
|
-
slots: "{ start?, left?, body?, center?, end?, right?, default? }",
|
|
259
|
-
class: "string",
|
|
260
|
-
style: "object"
|
|
261
|
-
},
|
|
262
|
-
slots: {
|
|
263
|
-
start: "Leading content area",
|
|
264
|
-
left: "Alias of start",
|
|
265
|
-
body: "Main content area",
|
|
266
|
-
center: "Alias of body",
|
|
267
|
-
end: "Trailing content area",
|
|
268
|
-
right: "Alias of end",
|
|
269
|
-
default: "Fallback content / children"
|
|
270
|
-
},
|
|
271
|
-
returns: "HTMLDivElement",
|
|
272
|
-
description: "Wrapper flex in riga con children, slot strutturati e props di layout per gap, allineamento, wrap e direction."
|
|
273
|
-
};
|
|
274
|
-
}
|
|
227
|
+
|
|
275
228
|
function uiIsSignal(v) {
|
|
276
229
|
return Array.isArray(v) && v.length === 2 && typeof v[0] === "function" && typeof v[1] === "function";
|
|
277
230
|
}
|
|
@@ -602,73 +555,7 @@
|
|
|
602
555
|
setPropertyProps(el, rawProps);
|
|
603
556
|
return el;
|
|
604
557
|
};
|
|
605
|
-
|
|
606
|
-
UI.meta = UI.meta || {};
|
|
607
|
-
UI.meta.Col = {
|
|
608
|
-
signature: "UI.Col(...children) | UI.Col(props, ...children)",
|
|
609
|
-
props: {
|
|
610
|
-
col: "number|string",
|
|
611
|
-
span: "Alias of col",
|
|
612
|
-
sm: "number|string",
|
|
613
|
-
md: "number|string",
|
|
614
|
-
lg: "number|string",
|
|
615
|
-
auto: "boolean",
|
|
616
|
-
gap: "number|string",
|
|
617
|
-
rowGap: "number|string",
|
|
618
|
-
columnGap: "number|string",
|
|
619
|
-
align: "string",
|
|
620
|
-
justify: "string",
|
|
621
|
-
inline: "boolean",
|
|
622
|
-
stack: "boolean",
|
|
623
|
-
center: "boolean",
|
|
624
|
-
width: "number|string",
|
|
625
|
-
size: "Alias of width",
|
|
626
|
-
minWidth: "number|string",
|
|
627
|
-
maxWidth: "number|string",
|
|
628
|
-
height: "number|string",
|
|
629
|
-
minHeight: "number|string",
|
|
630
|
-
maxHeight: "number|string",
|
|
631
|
-
flex: "string",
|
|
632
|
-
fill: "boolean",
|
|
633
|
-
grow: "number",
|
|
634
|
-
shrink: "number",
|
|
635
|
-
basis: "number|string",
|
|
636
|
-
self: "string",
|
|
637
|
-
order: "number|string",
|
|
638
|
-
scroll: "boolean",
|
|
639
|
-
mobile: "{ col?, span?, gap?, direction?, align?, justify?, width?, height? }",
|
|
640
|
-
tablet: "{ col?, span?, gap?, direction?, align?, justify?, width?, height? }",
|
|
641
|
-
pc: "{ col?, span?, gap?, direction?, align?, justify?, width?, height? }",
|
|
642
|
-
start: "Node|Function|Array",
|
|
643
|
-
top: "Alias of start",
|
|
644
|
-
header: "Alias of start",
|
|
645
|
-
body: "Node|Function|Array",
|
|
646
|
-
content: "Alias of body",
|
|
647
|
-
end: "Node|Function|Array",
|
|
648
|
-
bottom: "Alias of end",
|
|
649
|
-
footer: "Alias of end",
|
|
650
|
-
startClass: "string",
|
|
651
|
-
bodyClass: "string",
|
|
652
|
-
endClass: "string",
|
|
653
|
-
slots: "{ start?, top?, header?, body?, content?, end?, bottom?, footer?, default? }",
|
|
654
|
-
class: "string",
|
|
655
|
-
style: "object"
|
|
656
|
-
},
|
|
657
|
-
slots: {
|
|
658
|
-
start: "Column leading area",
|
|
659
|
-
top: "Alias of start",
|
|
660
|
-
header: "Alias of start",
|
|
661
|
-
body: "Column main area",
|
|
662
|
-
content: "Alias of body",
|
|
663
|
-
end: "Column trailing area",
|
|
664
|
-
bottom: "Alias of end",
|
|
665
|
-
footer: "Alias of end",
|
|
666
|
-
default: "Column fallback content"
|
|
667
|
-
},
|
|
668
|
-
returns: "HTMLDivElement",
|
|
669
|
-
description: "Responsive 24-column wrapper. By default it behaves like a regular container and enables vertical flex layout when using gap/alignment, structured regions, or `stack`."
|
|
670
|
-
};
|
|
671
|
-
}
|
|
558
|
+
|
|
672
559
|
|
|
673
560
|
UI.Spacer = (...args) => {
|
|
674
561
|
const { props, children } = JSswift.uiNormalizeArgs(args);
|
|
@@ -678,22 +565,7 @@
|
|
|
678
565
|
const content = renderSlotToArray(slots, "default", {}, children);
|
|
679
566
|
return _.div(p, ...content);
|
|
680
567
|
};
|
|
681
|
-
|
|
682
|
-
UI.meta = UI.meta || {};
|
|
683
|
-
UI.meta.Spacer = {
|
|
684
|
-
signature: "UI.Spacer() | UI.Spacer(props)",
|
|
685
|
-
props: {
|
|
686
|
-
slots: "{ default?: Slot }",
|
|
687
|
-
class: "string",
|
|
688
|
-
style: "object"
|
|
689
|
-
},
|
|
690
|
-
slots: {
|
|
691
|
-
default: "Optional spacer content"
|
|
692
|
-
},
|
|
693
|
-
returns: "HTMLDivElement",
|
|
694
|
-
description: "Flex spacer."
|
|
695
|
-
};
|
|
696
|
-
}
|
|
568
|
+
|
|
697
569
|
|
|
698
570
|
UI.Container = (...args) => {
|
|
699
571
|
const { props: rawProps, children } = JSswift.uiNormalizeArgs(args);
|
|
@@ -892,56 +764,7 @@
|
|
|
892
764
|
setPropertyProps(el, rawProps);
|
|
893
765
|
return el;
|
|
894
766
|
};
|
|
895
|
-
|
|
896
|
-
UI.meta = UI.meta || {};
|
|
897
|
-
UI.meta.Container = {
|
|
898
|
-
signature: "UI.Container(...children) | UI.Container(props, ...children)",
|
|
899
|
-
props: {
|
|
900
|
-
tag: "string",
|
|
901
|
-
fluid: "boolean",
|
|
902
|
-
maxWidth: "number|string",
|
|
903
|
-
minWidth: "number|string",
|
|
904
|
-
width: "number|string",
|
|
905
|
-
padding: "number|string",
|
|
906
|
-
paddingX: "number|string",
|
|
907
|
-
paddingY: "number|string",
|
|
908
|
-
gap: "number|string",
|
|
909
|
-
sectionGap: "number|string",
|
|
910
|
-
layout: '"block|flex|grid|stack|inline"',
|
|
911
|
-
direction: '"row|column"',
|
|
912
|
-
wrap: "boolean|string",
|
|
913
|
-
align: "string",
|
|
914
|
-
justify: "string",
|
|
915
|
-
cols: "number|string",
|
|
916
|
-
before: "String|Node|Function|Array",
|
|
917
|
-
header: "String|Node|Function|Array",
|
|
918
|
-
start: "String|Node|Function|Array",
|
|
919
|
-
body: "String|Node|Function|Array",
|
|
920
|
-
content: "String|Node|Function|Array",
|
|
921
|
-
end: "String|Node|Function|Array",
|
|
922
|
-
footer: "String|Node|Function|Array",
|
|
923
|
-
after: "String|Node|Function|Array",
|
|
924
|
-
slots: "{ before?, header?, left?, start?, body?, content?, default?, right?, end?, footer?, after? }",
|
|
925
|
-
class: "string",
|
|
926
|
-
style: "object"
|
|
927
|
-
},
|
|
928
|
-
slots: {
|
|
929
|
-
before: "Top content before the main container body",
|
|
930
|
-
header: "Structured header area",
|
|
931
|
-
left: "Alias for start",
|
|
932
|
-
start: "Leading area inside the main body",
|
|
933
|
-
body: "Custom body renderer overriding start/content/end wrappers",
|
|
934
|
-
content: "Explicit main content",
|
|
935
|
-
default: "Fallback content from children",
|
|
936
|
-
right: "Alias for end",
|
|
937
|
-
end: "Trailing area inside the main body",
|
|
938
|
-
footer: "Structured footer area",
|
|
939
|
-
after: "Bottom content after the main container body"
|
|
940
|
-
},
|
|
941
|
-
returns: "HTMLDivElement",
|
|
942
|
-
description: "Composable container with max-width, spacing, layout props, and optional sections."
|
|
943
|
-
};
|
|
944
|
-
}
|
|
767
|
+
|
|
945
768
|
|
|
946
769
|
UI.Card = (...args) => {
|
|
947
770
|
const { props: rawProps, children } = JSswift.uiNormalizeArgs(args);
|
|
@@ -1131,63 +954,7 @@
|
|
|
1131
954
|
setPropertyProps(el, rawProps);
|
|
1132
955
|
return el;
|
|
1133
956
|
}
|
|
1134
|
-
|
|
1135
|
-
UI.meta = UI.meta || {};
|
|
1136
|
-
UI.meta.Card = {
|
|
1137
|
-
signature: "UI.Card(...children) | UI.Card(props, ...children)",
|
|
1138
|
-
description: "Sectioned card with structured header, cover/media, body, and footer/actions.",
|
|
1139
|
-
props: {
|
|
1140
|
-
title: "String|Node|Function|Array",
|
|
1141
|
-
subtitle: "String|Node|Function|Array",
|
|
1142
|
-
eyebrow: "String|Node|Function|Array",
|
|
1143
|
-
header: "String|Node|Function|Array",
|
|
1144
|
-
body: "String|Node|Function|Array",
|
|
1145
|
-
footer: "String|Node|Function|Array",
|
|
1146
|
-
actions: "Node|Function|Array",
|
|
1147
|
-
icon: "String|Node|Function|Array",
|
|
1148
|
-
aside: "Node|Function|Array",
|
|
1149
|
-
identifier: "String|Node|Function|Array",
|
|
1150
|
-
media: "Node|Function|Array",
|
|
1151
|
-
cover: "Node|Function|Array",
|
|
1152
|
-
image: "string",
|
|
1153
|
-
imageAlt: "string",
|
|
1154
|
-
coverHeight: "string|number",
|
|
1155
|
-
clickable: "boolean",
|
|
1156
|
-
to: "string",
|
|
1157
|
-
dense: "boolean",
|
|
1158
|
-
flat: "boolean",
|
|
1159
|
-
display: "string",
|
|
1160
|
-
direction: "row|column|string",
|
|
1161
|
-
gap: "string|number",
|
|
1162
|
-
cols: "number|string",
|
|
1163
|
-
mobile: "{ display?, direction?, gap?, cols? }",
|
|
1164
|
-
tablet: "{ display?, direction?, gap?, cols? }",
|
|
1165
|
-
pc: "{ display?, direction?, gap?, cols? }",
|
|
1166
|
-
headerClass: "string",
|
|
1167
|
-
bodyClass: "string",
|
|
1168
|
-
footerClass: "string",
|
|
1169
|
-
slots: "{ identifier?, cover?, media?, icon?, eyebrow?, title?, subtitle?, header?, aside?, body?, footer?, actions?, default? }",
|
|
1170
|
-
class: "string",
|
|
1171
|
-
style: "object"
|
|
1172
|
-
},
|
|
1173
|
-
slots: {
|
|
1174
|
-
identifier: "Badge/top identifier content",
|
|
1175
|
-
cover: "Top visual/cover content",
|
|
1176
|
-
media: "Media section above header/body",
|
|
1177
|
-
icon: "Header icon content",
|
|
1178
|
-
eyebrow: "Eyebrow/kicker content",
|
|
1179
|
-
title: "Card title content",
|
|
1180
|
-
subtitle: "Card subtitle content",
|
|
1181
|
-
header: "Header support content",
|
|
1182
|
-
aside: "Right side header content",
|
|
1183
|
-
body: "Body content",
|
|
1184
|
-
footer: "Footer content",
|
|
1185
|
-
actions: "Footer actions slot",
|
|
1186
|
-
default: "Fallback body content or raw card sections"
|
|
1187
|
-
},
|
|
1188
|
-
returns: "HTMLDivElement"
|
|
1189
|
-
};
|
|
1190
|
-
}
|
|
957
|
+
|
|
1191
958
|
UI.Btn = (...args) => {
|
|
1192
959
|
const { props, children } = JSswift.uiNormalizeArgs(args);
|
|
1193
960
|
const slots = props.slots || {};
|
|
@@ -1318,39 +1085,7 @@
|
|
|
1318
1085
|
UI.Button = UI.Btn;
|
|
1319
1086
|
JSswift.ui.Btn = UI.Btn;
|
|
1320
1087
|
JSswift.ui.Button = UI.Button;
|
|
1321
|
-
|
|
1322
|
-
UI.meta.Btn = {
|
|
1323
|
-
signature: "UI.Btn(...children) | UI.Btn(props, ...children)",
|
|
1324
|
-
props: {
|
|
1325
|
-
label: "String|Node|Function|Array",
|
|
1326
|
-
icon: "String|Node|Function|Array",
|
|
1327
|
-
iconRight: "String|Node|Function|Array",
|
|
1328
|
-
iconAlign: `before|after|left|right`,
|
|
1329
|
-
color: `primary|secondary|warning|danger|success|info|light|dark`,
|
|
1330
|
-
outline: "boolean",
|
|
1331
|
-
loading: "boolean",
|
|
1332
|
-
loadingText: "string|Node|Function|Array",
|
|
1333
|
-
loadingSize: "number|string",
|
|
1334
|
-
loadingColor: "string",
|
|
1335
|
-
loadingThickness: "number|string",
|
|
1336
|
-
disabled: "boolean",
|
|
1337
|
-
shortcode: "string|Array<string>|object",
|
|
1338
|
-
showShortcode: "boolean",
|
|
1339
|
-
slots: "{ icon?, iconRight?, label?, loading?, default? }",
|
|
1340
|
-
class: "string",
|
|
1341
|
-
style: "object"
|
|
1342
|
-
},
|
|
1343
|
-
slots: {
|
|
1344
|
-
icon: "Icon slot",
|
|
1345
|
-
iconRight: "Right icon slot",
|
|
1346
|
-
label: "Label slot",
|
|
1347
|
-
default: "Button content"
|
|
1348
|
-
},
|
|
1349
|
-
events: ["click", "pointerdown", "focus", "blur"],
|
|
1350
|
-
returns: "HTMLButtonElement"
|
|
1351
|
-
};
|
|
1352
|
-
UI.meta.Button = UI.meta.Btn;
|
|
1353
|
-
}
|
|
1088
|
+
|
|
1354
1089
|
// Esempio: JSswift.ui.QBtn({ color: "primary", icon: "save", label: "Salva" })
|
|
1355
1090
|
|
|
1356
1091
|
// Input: supporta value come rod (two-way) oppure rod via props.model
|
|
@@ -1577,54 +1312,7 @@
|
|
|
1577
1312
|
|
|
1578
1313
|
return wrap;
|
|
1579
1314
|
};
|
|
1580
|
-
|
|
1581
|
-
UI.meta = UI.meta || {};
|
|
1582
|
-
UI.meta.FormField = {
|
|
1583
|
-
signature: "UI.FormField(props)",
|
|
1584
|
-
description: "Wrapper field con label floating, hint/error/success/warning/note, clear e addons slot-based.",
|
|
1585
|
-
props: {
|
|
1586
|
-
label: "String|Node|Function",
|
|
1587
|
-
topLabel: "String|Node|Function",
|
|
1588
|
-
hint: "String|Node|Function",
|
|
1589
|
-
error: "String|Node|Function",
|
|
1590
|
-
success: "String|Node|Function",
|
|
1591
|
-
warning: "String|Node|Function",
|
|
1592
|
-
note: "String|Node|Function",
|
|
1593
|
-
icon: "String|Node|Function",
|
|
1594
|
-
iconRight: "String|Node|Function",
|
|
1595
|
-
prefix: "String|Node|Function",
|
|
1596
|
-
suffix: "String|Node|Function",
|
|
1597
|
-
clearable: "boolean",
|
|
1598
|
-
shortcode: "string|Array<string>|object",
|
|
1599
|
-
showShortcode: "boolean",
|
|
1600
|
-
disabled: "boolean",
|
|
1601
|
-
readonly: "boolean",
|
|
1602
|
-
control: "Node|Function",
|
|
1603
|
-
getValue: "() => any",
|
|
1604
|
-
onClear: "() => void",
|
|
1605
|
-
onFocus: "() => void",
|
|
1606
|
-
wrapClass: "string",
|
|
1607
|
-
slots: "{ label?, topLabel?, prefix?, suffix?, shortcode?, icon?, iconRight?, clear?, hint?, error?, control? }"
|
|
1608
|
-
},
|
|
1609
|
-
slots: {
|
|
1610
|
-
label: "Floating label content",
|
|
1611
|
-
topLabel: "Top label content",
|
|
1612
|
-
prefix: "Left addon content",
|
|
1613
|
-
suffix: "Right addon content",
|
|
1614
|
-
icon: "Left icon content",
|
|
1615
|
-
iconRight: "Right icon content",
|
|
1616
|
-
shortcode: "Shortcut badge content",
|
|
1617
|
-
clear: "Clear button slot (ctx: { clear, disabled, readonly, hasValue })",
|
|
1618
|
-
hint: "Hint content",
|
|
1619
|
-
errorMessage: "Error content",
|
|
1620
|
-
success: "Success content",
|
|
1621
|
-
warning: "Warning content",
|
|
1622
|
-
note: "Note content",
|
|
1623
|
-
control: "Override control wrapper (ctx: { control, clear, disabled, readonly, hasValue })"
|
|
1624
|
-
},
|
|
1625
|
-
returns: "HTMLDivElement (wrapper) con ._refresh()"
|
|
1626
|
-
};
|
|
1627
|
-
}
|
|
1315
|
+
|
|
1628
1316
|
UI.InputRaw = (props = {}) => {
|
|
1629
1317
|
const el = _.input({
|
|
1630
1318
|
class: uiClass(["cms-input-raw", props.class]),
|
|
@@ -1885,76 +1573,7 @@
|
|
|
1885
1573
|
|
|
1886
1574
|
return field;
|
|
1887
1575
|
}
|
|
1888
|
-
if (JSswift.isDev?.()) {
|
|
1889
|
-
UI.meta = UI.meta || {};
|
|
1890
|
-
|
|
1891
|
-
UI.meta.Input = {
|
|
1892
|
-
signature: "UI.Input(props)",
|
|
1893
|
-
description: "Input field with floating label, hint/error/success/warning/note, clearable control, icon, prefix/suffix, and reactive support (rod/signal).",
|
|
1894
|
-
props: {
|
|
1895
|
-
// value & model
|
|
1896
|
-
model: "rod | [get,set] signal",
|
|
1897
|
-
value: "string",
|
|
1898
|
-
|
|
1899
|
-
// input native
|
|
1900
|
-
type: "string (default: 'text')",
|
|
1901
|
-
name: "string",
|
|
1902
|
-
autocomplete: "string",
|
|
1903
|
-
inputmode: "string",
|
|
1904
|
-
disabled: "boolean",
|
|
1905
|
-
readonly: "boolean",
|
|
1906
|
-
shortcode: "string|Array<string>|object",
|
|
1907
|
-
showShortcode: "boolean",
|
|
1908
|
-
|
|
1909
|
-
// UI / UX
|
|
1910
|
-
label: "String|Node|Function (floating label)",
|
|
1911
|
-
topLabel: "String|Node|Function (label above, not floating)",
|
|
1912
|
-
placeholder: "String|Node|Function (alias of label when label is not set)",
|
|
1913
|
-
hint: "String|Node|Function",
|
|
1914
|
-
error: "String|Node|Function",
|
|
1915
|
-
success: "String|Node|Function",
|
|
1916
|
-
warning: "String|Node|Function",
|
|
1917
|
-
note: "String|Node|Function",
|
|
1918
|
-
clearable: "boolean",
|
|
1919
|
-
|
|
1920
|
-
// addons
|
|
1921
|
-
icon: "String|Node|Function",
|
|
1922
|
-
iconRight: "String|Node|Function",
|
|
1923
|
-
prefix: "String|Node|Function",
|
|
1924
|
-
suffix: "String|Node|Function",
|
|
1925
|
-
|
|
1926
|
-
// style
|
|
1927
|
-
class: "string (applicata all'input)",
|
|
1928
|
-
wrapClass: "string (applicata al field wrapper)",
|
|
1929
|
-
style: "object",
|
|
1930
|
-
|
|
1931
|
-
// events
|
|
1932
|
-
onInput: "(value:string) => void",
|
|
1933
|
-
onChange: "(value:string) => void",
|
|
1934
|
-
onFocus: "(event) => void",
|
|
1935
|
-
onBlur: "(event) => void"
|
|
1936
|
-
},
|
|
1937
|
-
|
|
1938
|
-
slots: {
|
|
1939
|
-
label: "Floating label (via FormField slots.label)",
|
|
1940
|
-
topLabel: "Top label (via FormField slots.topLabel)",
|
|
1941
|
-
prefix: "Left addon (via FormField slots.prefix)",
|
|
1942
|
-
suffix: "Right addon (via FormField slots.suffix)",
|
|
1943
|
-
shortcode: "Shortcut badge (via FormField slots.shortcode)",
|
|
1944
|
-
icon: "Left icon (via FormField slots.icon)",
|
|
1945
|
-
iconRight: "Right icon (via FormField slots.iconRight)",
|
|
1946
|
-
clear: "Clear button (via FormField slots.clear)",
|
|
1947
|
-
hint: "Hint content (via FormField slots.hint)",
|
|
1948
|
-
errorMessage: "Error content (via FormField slots.errorMessage)",
|
|
1949
|
-
success: "Success content (via FormField slots.success)",
|
|
1950
|
-
warning: "Warning content (via FormField slots.warning)",
|
|
1951
|
-
note: "Note content (via FormField slots.note)",
|
|
1952
|
-
input: "Custom input node (ctx: { input, props })"
|
|
1953
|
-
},
|
|
1954
1576
|
|
|
1955
|
-
returns: "HTMLDivElement (field wrapper) con ._input = HTMLInputElement"
|
|
1956
|
-
};
|
|
1957
|
-
}
|
|
1958
1577
|
|
|
1959
1578
|
UI.Textarea = (props = {}) => {
|
|
1960
1579
|
const slots = props.slots || {};
|
|
@@ -2066,75 +1685,7 @@
|
|
|
2066
1685
|
|
|
2067
1686
|
return field;
|
|
2068
1687
|
};
|
|
2069
|
-
if (JSswift.isDev?.()) {
|
|
2070
|
-
UI.meta = UI.meta || {};
|
|
2071
|
-
|
|
2072
|
-
UI.meta.Textarea = {
|
|
2073
|
-
signature: "UI.Textarea(props)",
|
|
2074
|
-
description: "Textarea field with floating label, hint/error/success/warning/note, clearable control, icon, prefix/suffix, and reactive support (rod/signal).",
|
|
2075
|
-
props: {
|
|
2076
|
-
model: "rod | [get,set] signal",
|
|
2077
|
-
value: "string",
|
|
2078
|
-
|
|
2079
|
-
name: "string",
|
|
2080
|
-
autocomplete: "string",
|
|
2081
|
-
inputmode: "string",
|
|
2082
|
-
rows: "number|string",
|
|
2083
|
-
cols: "number|string",
|
|
2084
|
-
maxLength: "number|string",
|
|
2085
|
-
minLength: "number|string",
|
|
2086
|
-
wrap: "string",
|
|
2087
|
-
disabled: "boolean",
|
|
2088
|
-
readonly: "boolean",
|
|
2089
|
-
shortcode: "string|Array<string>|object",
|
|
2090
|
-
showShortcode: "boolean",
|
|
2091
|
-
|
|
2092
|
-
label: "String|Node|Function (floating label)",
|
|
2093
|
-
topLabel: "String|Node|Function (label above, not floating)",
|
|
2094
|
-
placeholder: "String|Node|Function (alias of label when label is not set)",
|
|
2095
|
-
hint: "String|Node|Function",
|
|
2096
|
-
error: "String|Node|Function",
|
|
2097
|
-
success: "String|Node|Function",
|
|
2098
|
-
warning: "String|Node|Function",
|
|
2099
|
-
note: "String|Node|Function",
|
|
2100
|
-
clearable: "boolean",
|
|
2101
|
-
|
|
2102
|
-
icon: "String|Node|Function",
|
|
2103
|
-
iconRight: "String|Node|Function",
|
|
2104
|
-
prefix: "String|Node|Function",
|
|
2105
|
-
suffix: "String|Node|Function",
|
|
2106
|
-
|
|
2107
|
-
class: "string (applicata alla textarea)",
|
|
2108
|
-
wrapClass: "string (applicata al field wrapper)",
|
|
2109
|
-
style: "object",
|
|
2110
|
-
|
|
2111
|
-
onInput: "(value:string) => void",
|
|
2112
|
-
onChange: "(value:string) => void",
|
|
2113
|
-
onFocus: "(event) => void",
|
|
2114
|
-
onBlur: "(event) => void"
|
|
2115
|
-
},
|
|
2116
|
-
|
|
2117
|
-
slots: {
|
|
2118
|
-
label: "Floating label (via FormField slots.label)",
|
|
2119
|
-
topLabel: "Top label (via FormField slots.topLabel)",
|
|
2120
|
-
prefix: "Left addon (via FormField slots.prefix)",
|
|
2121
|
-
suffix: "Right addon (via FormField slots.suffix)",
|
|
2122
|
-
shortcode: "Shortcut badge (via FormField slots.shortcode)",
|
|
2123
|
-
icon: "Left icon (via FormField slots.icon)",
|
|
2124
|
-
iconRight: "Right icon (via FormField slots.iconRight)",
|
|
2125
|
-
clear: "Clear button (via FormField slots.clear)",
|
|
2126
|
-
hint: "Hint content (via FormField slots.hint)",
|
|
2127
|
-
errorMessage: "Error content (via FormField slots.errorMessage)",
|
|
2128
|
-
success: "Success content (via FormField slots.success)",
|
|
2129
|
-
warning: "Warning content (via FormField slots.warning)",
|
|
2130
|
-
note: "Note content (via FormField slots.note)",
|
|
2131
|
-
textarea: "Custom textarea node (ctx: { textarea, input, props })",
|
|
2132
|
-
input: "Alias slot for custom textarea node (ctx: { textarea, input, props })"
|
|
2133
|
-
},
|
|
2134
1688
|
|
|
2135
|
-
returns: "HTMLDivElement (field wrapper) con ._textarea = HTMLTextAreaElement"
|
|
2136
|
-
};
|
|
2137
|
-
}
|
|
2138
1689
|
|
|
2139
1690
|
UI.Search = (props = {}) => {
|
|
2140
1691
|
const slots = props.slots || {};
|
|
@@ -2706,97 +2257,7 @@
|
|
|
2706
2257
|
|
|
2707
2258
|
return field;
|
|
2708
2259
|
};
|
|
2709
|
-
|
|
2710
|
-
UI.meta = UI.meta || {};
|
|
2711
|
-
UI.meta.Search = {
|
|
2712
|
-
signature: "UI.Search(props)",
|
|
2713
|
-
description: "Professional search with FormField, GET fetch, debounce, AbortController, overlay results, optional cache, reactive binding, and keyboard navigation.",
|
|
2714
|
-
props: {
|
|
2715
|
-
model: "rod | [get,set] signal",
|
|
2716
|
-
value: "string | rod | [get,set] signal",
|
|
2717
|
-
endpoint: "string | (query, ctx) => string",
|
|
2718
|
-
url: "Alias of endpoint",
|
|
2719
|
-
method: "'GET' (internal)",
|
|
2720
|
-
queryParam: "string (default: 'q')",
|
|
2721
|
-
params: "object | (query, ctx) => object",
|
|
2722
|
-
headers: "object",
|
|
2723
|
-
credentials: "RequestCredentials",
|
|
2724
|
-
parseResponse: "(Response) => Promise<any>",
|
|
2725
|
-
mapResponse: "(payload, query) => Array",
|
|
2726
|
-
items: "Array | (query, ctx) => Array|Promise<Array>",
|
|
2727
|
-
options: "Local alias of items",
|
|
2728
|
-
suggestions: "Local alias of items",
|
|
2729
|
-
filter: "(item, query) => boolean",
|
|
2730
|
-
getLabel: "(item) => string",
|
|
2731
|
-
getValue: "(item) => any",
|
|
2732
|
-
minLength: "number (default: endpoint ? 1 : 0)",
|
|
2733
|
-
debounce: "number ms (default: 250)",
|
|
2734
|
-
cache: "boolean (default: true)",
|
|
2735
|
-
highlight: "boolean (default: true)",
|
|
2736
|
-
clearable: "boolean",
|
|
2737
|
-
label: "String|Node|Function",
|
|
2738
|
-
topLabel: "String|Node|Function",
|
|
2739
|
-
placeholder: "string",
|
|
2740
|
-
icon: "String|Node|Function (default: 'search')",
|
|
2741
|
-
iconRight: "String|Node|Function",
|
|
2742
|
-
shortcode: "string|Array<string>|object",
|
|
2743
|
-
showShortcode: "boolean",
|
|
2744
|
-
openOnFocus: "boolean",
|
|
2745
|
-
searchOnFocus: "boolean",
|
|
2746
|
-
searchOnInput: "boolean",
|
|
2747
|
-
searchOnMount: "boolean",
|
|
2748
|
-
autoSearch: "Alias of searchOnMount",
|
|
2749
|
-
closeOnSelect: "boolean",
|
|
2750
|
-
commitValue: "'label'|'value'|false",
|
|
2751
|
-
disabled: "boolean|Function|rod",
|
|
2752
|
-
readonly: "boolean|Function|rod",
|
|
2753
|
-
loadingText: "string",
|
|
2754
|
-
emptyText: "string",
|
|
2755
|
-
errorText: "string",
|
|
2756
|
-
startText: "string",
|
|
2757
|
-
class: "string",
|
|
2758
|
-
inputClass: "string",
|
|
2759
|
-
menuClass: "string",
|
|
2760
|
-
wrapClass: "string",
|
|
2761
|
-
style: "object"
|
|
2762
|
-
},
|
|
2763
|
-
slots: {
|
|
2764
|
-
result: "Result renderer ({ item, index, active, label, value, query, select })",
|
|
2765
|
-
empty: "Empty state ({ query })",
|
|
2766
|
-
loading: "Loading state ({ query })",
|
|
2767
|
-
error: "Error state ({ error, query })",
|
|
2768
|
-
label: "Floating label",
|
|
2769
|
-
topLabel: "Top label",
|
|
2770
|
-
prefix: "Left addon",
|
|
2771
|
-
suffix: "Right addon",
|
|
2772
|
-
icon: "Left icon",
|
|
2773
|
-
iconRight: "Right icon",
|
|
2774
|
-
shortcode: "Shortcut badge",
|
|
2775
|
-
clear: "Clear button"
|
|
2776
|
-
},
|
|
2777
|
-
events: {
|
|
2778
|
-
onInput: "(query, event)",
|
|
2779
|
-
onChange: "(query, event)",
|
|
2780
|
-
onSearch: "(query)",
|
|
2781
|
-
onResults: "(results, query)",
|
|
2782
|
-
onSelect: "(item, { value, label, query, event })",
|
|
2783
|
-
onSubmit: "(query, event)",
|
|
2784
|
-
onClear: "()",
|
|
2785
|
-
onError: "(error, query)",
|
|
2786
|
-
onFocus: "(event)",
|
|
2787
|
-
onBlur: "(event)"
|
|
2788
|
-
},
|
|
2789
|
-
keyboard: {
|
|
2790
|
-
ArrowDown: "Opens/moves to the next result",
|
|
2791
|
-
ArrowUp: "Moves to the previous result",
|
|
2792
|
-
Enter: "Selects the active result or submits the query",
|
|
2793
|
-
Escape: "Closes the overlay",
|
|
2794
|
-
"Cmd/Ctrl+Home": "First result",
|
|
2795
|
-
"Cmd/Ctrl+End": "Last result"
|
|
2796
|
-
},
|
|
2797
|
-
returns: "HTMLDivElement (field wrapper) with ._input, ._open(), ._close(), ._searchNow(), ._getResults(), ._setValue(value), ._dispose()"
|
|
2798
|
-
};
|
|
2799
|
-
}
|
|
2260
|
+
|
|
2800
2261
|
|
|
2801
2262
|
UI.Select = (props = {}) => {
|
|
2802
2263
|
const fieldProps = {
|
|
@@ -3518,78 +2979,7 @@
|
|
|
3518
2979
|
|
|
3519
2980
|
return field;
|
|
3520
2981
|
}
|
|
3521
|
-
if (JSswift.isDev?.()) {
|
|
3522
|
-
UI.meta = UI.meta || {};
|
|
3523
|
-
UI.meta.Select = {
|
|
3524
|
-
signature: "UI.Select(props)",
|
|
3525
|
-
description: "Select premium: keyboard nav, option groups, async options, filter, clearable, multi select, valori custom da filtro. Wrappato in UI.FormField.",
|
|
3526
|
-
|
|
3527
|
-
props: {
|
|
3528
|
-
options: "Array<option|group> | () => Array<option|group> | async () => Promise<Array<option|group>>",
|
|
3529
|
-
value: "any",
|
|
3530
|
-
model: "rod | [get,set] signal",
|
|
3531
|
-
|
|
3532
|
-
label: "String|Node|Function (floating)",
|
|
3533
|
-
placeholder: "String|Node|Function (alias of label when label is not set)",
|
|
3534
|
-
topLabel: "String|Node|Function",
|
|
3535
|
-
hint: "String|Node|Function",
|
|
3536
|
-
error: "String|Node|Function",
|
|
3537
|
-
success: "String|Node|Function",
|
|
3538
|
-
warning: "String|Node|Function",
|
|
3539
|
-
note: "String|Node|Function",
|
|
3540
|
-
|
|
3541
|
-
clearable: "boolean",
|
|
3542
|
-
filterable: "boolean",
|
|
3543
|
-
multiple: "boolean",
|
|
3544
|
-
multi: "boolean (alias multiple)",
|
|
3545
|
-
allowCustom: "boolean (consenti valori custom dal filtro)",
|
|
3546
|
-
allowCustomValue: "boolean (alias allowCustom)",
|
|
3547
|
-
filterPlaceholder: "string",
|
|
3548
|
-
emptyText: "string",
|
|
3549
|
-
shortcode: "string|Array<string>|object",
|
|
3550
|
-
showShortcode: "boolean",
|
|
3551
|
-
|
|
3552
|
-
icon: "String|Node|Function",
|
|
3553
|
-
iconRight: "String|Node|Function",
|
|
3554
|
-
prefix: "String|Node|Function",
|
|
3555
|
-
suffix: "String|Node|Function",
|
|
3556
|
-
|
|
3557
|
-
disabled: "boolean | () => boolean",
|
|
3558
|
-
dense: "boolean",
|
|
3559
|
-
class: "string",
|
|
3560
|
-
wrapClass: "string",
|
|
3561
|
-
slots: "{ clear?, arrow?, filter?, option?, group?, empty?, loading? }",
|
|
3562
|
-
|
|
3563
|
-
onChange: "(value:any) => void"
|
|
3564
|
-
},
|
|
3565
|
-
|
|
3566
|
-
slots: {
|
|
3567
|
-
clear: "Clear button (via FormField slots.clear)",
|
|
3568
|
-
arrow: "Arrow slot (ctx: { open })",
|
|
3569
|
-
filter: "Filter input slot (ctx: { value, setValue, close })",
|
|
3570
|
-
option: "Option renderer (ctx: { opt, selected, active, disabled, select })",
|
|
3571
|
-
group: "Group header (ctx: { label })",
|
|
3572
|
-
empty: "Empty state (ctx: { filter })",
|
|
3573
|
-
loading: "Loading state (ctx: {})",
|
|
3574
|
-
label: "Floating label (via FormField slots.label)",
|
|
3575
|
-
topLabel: "Top label (via FormField slots.topLabel)",
|
|
3576
|
-
prefix: "Left addon (via FormField slots.prefix)",
|
|
3577
|
-
suffix: "Right addon (via FormField slots.suffix)",
|
|
3578
|
-
shortcode: "Shortcut badge (via FormField slots.shortcode)",
|
|
3579
|
-
icon: "Left icon (via FormField slots.icon)",
|
|
3580
|
-
iconRight: "Right icon (via FormField slots.iconRight)",
|
|
3581
|
-
hint: "Hint content (via FormField slots.hint)",
|
|
3582
|
-
errorMessage: "Error content (via FormField slots.errorMessage)",
|
|
3583
|
-
success: "Success content (via FormField slots.success)",
|
|
3584
|
-
warning: "Warning content (via FormField slots.warning)",
|
|
3585
|
-
note: "Note content (via FormField slots.note)"
|
|
3586
|
-
},
|
|
3587
2982
|
|
|
3588
|
-
keyboard: ["Enter/Space", "ArrowUp", "ArrowDown", "Home", "End", "Escape"],
|
|
3589
|
-
|
|
3590
|
-
returns: "HTMLDivElement (wrapper field) con ._select, ._dispose()"
|
|
3591
|
-
};
|
|
3592
|
-
}
|
|
3593
2983
|
|
|
3594
2984
|
UI.Upload = (props = {}) => {
|
|
3595
2985
|
applyCommonProps(props);
|
|
@@ -4145,74 +3535,7 @@
|
|
|
4145
3535
|
JSswift.ui.Upload = UI.Upload;
|
|
4146
3536
|
JSswift.ui.BoxUpload = UI.BoxUpload;
|
|
4147
3537
|
JSswift.ui.boxUpload = UI.boxUpload;
|
|
4148
|
-
|
|
4149
|
-
UI.meta = UI.meta || {};
|
|
4150
|
-
UI.meta.Upload = {
|
|
4151
|
-
signature: "UI.Upload(props)",
|
|
4152
|
-
description: "Professional uploader with drag/drop, validation, queue, retry, factory options, XHR progress, custom upload and slot-based rendering.",
|
|
4153
|
-
props: {
|
|
4154
|
-
url: "string",
|
|
4155
|
-
method: "POST|PUT|PATCH|string",
|
|
4156
|
-
fieldName: "string",
|
|
4157
|
-
paramName: "Alias of fieldName",
|
|
4158
|
-
headers: "object|Array|Headers|(file, ctx)=>headers",
|
|
4159
|
-
formFields: "object|Array|(file, ctx)=>fields",
|
|
4160
|
-
factory: "(file, ctx)=>object|Promise<object>",
|
|
4161
|
-
upload: "(file, ctx)=>Promise<any> custom uploader",
|
|
4162
|
-
multiple: "boolean",
|
|
4163
|
-
accept: "string",
|
|
4164
|
-
acceptedFiles: "Alias of accept",
|
|
4165
|
-
maxFiles: "number",
|
|
4166
|
-
maxFileSize: "number bytes",
|
|
4167
|
-
maxTotalSize: "number bytes",
|
|
4168
|
-
autoUpload: "boolean",
|
|
4169
|
-
parallelUploads: "number",
|
|
4170
|
-
retry: "boolean|{ attempts, delay, factor }",
|
|
4171
|
-
withCredentials: "boolean",
|
|
4172
|
-
sendRaw: "boolean",
|
|
4173
|
-
submitMode: "\"upload\"|\"form\"",
|
|
4174
|
-
uploadMode: "Alias of submitMode",
|
|
4175
|
-
showBrowse: "boolean",
|
|
4176
|
-
showUpload: "boolean",
|
|
4177
|
-
showClear: "boolean",
|
|
4178
|
-
showFiles: "boolean",
|
|
4179
|
-
browseButton: "Alias of showBrowse",
|
|
4180
|
-
uploadButton: "Alias of showUpload",
|
|
4181
|
-
clearButton: "Alias of showClear",
|
|
4182
|
-
drag: "boolean",
|
|
4183
|
-
clickable: "boolean",
|
|
4184
|
-
box: "boolean",
|
|
4185
|
-
compact: "boolean",
|
|
4186
|
-
color: "semantic state or CSS color",
|
|
4187
|
-
status: "semantic state alias",
|
|
4188
|
-
state: "semantic state alias",
|
|
4189
|
-
title: "String|Node|Function",
|
|
4190
|
-
subtitle: "String|Node|Function",
|
|
4191
|
-
emptyText: "string",
|
|
4192
|
-
slots: "{ header?, default?, icon?, title?, subtitle?, actions?, browse?, upload?, clear?, file?, fileName?, fileMeta?, fileActions?, empty? }"
|
|
4193
|
-
},
|
|
4194
|
-
slots: {
|
|
4195
|
-
header: "Content before the uploader",
|
|
4196
|
-
default: "Dropzone override (ctx: { api, dropzone })",
|
|
4197
|
-
icon: "Main icon",
|
|
4198
|
-
title: "Title content",
|
|
4199
|
-
subtitle: "Subtitle content",
|
|
4200
|
-
actions: "Actions area",
|
|
4201
|
-
browse: "Browse button",
|
|
4202
|
-
upload: "Upload button",
|
|
4203
|
-
clear: "Clear button",
|
|
4204
|
-
file: "Full file row renderer",
|
|
4205
|
-
fileName: "File name slot",
|
|
4206
|
-
fileMeta: "Status/error slot",
|
|
4207
|
-
fileActions: "Per-file actions",
|
|
4208
|
-
empty: "Empty list state"
|
|
4209
|
-
},
|
|
4210
|
-
events: ["change", "added", "rejected", "remove", "start", "progress", "success", "error", "complete", "finish", "cancel", "drop", "factoryFailed"],
|
|
4211
|
-
returns: "HTMLDivElement with ._upload API, ._addFiles(files), ._uploadFiles(), ._browse(), ._dispose()"
|
|
4212
|
-
};
|
|
4213
|
-
UI.meta.BoxUpload = { ...UI.meta.Upload, signature: "UI.BoxUpload(props)", description: "Box-styled variant of UI.Upload." };
|
|
4214
|
-
UI.meta.boxUpload = UI.meta.BoxUpload;
|
|
4215
|
-
}
|
|
3538
|
+
|
|
4216
3539
|
|
|
4217
3540
|
function resolveModel(model, name) {
|
|
4218
3541
|
if (!model) return null;
|
|
@@ -4864,99 +4187,7 @@
|
|
|
4864
4187
|
syncLayoutState();
|
|
4865
4188
|
return root;
|
|
4866
4189
|
};
|
|
4867
|
-
|
|
4868
|
-
UI.meta = UI.meta || {};
|
|
4869
|
-
UI.meta.Layout = {
|
|
4870
|
-
signature: "UI.Layout(...children) | UI.Layout(props, ...children)",
|
|
4871
|
-
props: {
|
|
4872
|
-
header: "Node|Function|Array",
|
|
4873
|
-
headerContent: "Node|Function|Array",
|
|
4874
|
-
aside: "Node|Function|Array|false",
|
|
4875
|
-
drawer: "Node|Function|Array|false",
|
|
4876
|
-
nav: "Node|Function|Array|false",
|
|
4877
|
-
asideRight: "Node|Function|Array|false",
|
|
4878
|
-
drawerRight: "Node|Function|Array|false",
|
|
4879
|
-
page: "Node|Function|Array",
|
|
4880
|
-
main: "Node|Function|Array",
|
|
4881
|
-
content: "Node|Function|Array",
|
|
4882
|
-
body: "Node|Function|Array",
|
|
4883
|
-
footer: "Node|Function|Array",
|
|
4884
|
-
footerContent: "Node|Function|Array",
|
|
4885
|
-
noDrawer: "boolean",
|
|
4886
|
-
drawerEnabled: "boolean",
|
|
4887
|
-
asideEnabled: "boolean",
|
|
4888
|
-
noNav: "boolean",
|
|
4889
|
-
navEnabled: "boolean",
|
|
4890
|
-
asideRightEnabled: "boolean",
|
|
4891
|
-
drawerOpen: "rod | [get,set] signal | boolean",
|
|
4892
|
-
navOpen: "rod | [get,set] signal | boolean",
|
|
4893
|
-
layoutBreakpoint: "number(px)",
|
|
4894
|
-
drawerBreakpoint: "number(px)",
|
|
4895
|
-
navBreakpoint: "number(px)",
|
|
4896
|
-
drawerWidth: "number|string",
|
|
4897
|
-
drawerResizable: "boolean",
|
|
4898
|
-
drawerMinWidth: "number|string",
|
|
4899
|
-
drawerMaxWidth: "number|string",
|
|
4900
|
-
navWidth: "number|string",
|
|
4901
|
-
navResizable: "boolean",
|
|
4902
|
-
navMinWidth: "number|string",
|
|
4903
|
-
navMaxWidth: "number|string",
|
|
4904
|
-
asideRightWidth: "number|string",
|
|
4905
|
-
drawerPeek: "number|string",
|
|
4906
|
-
navPeek: "number|string",
|
|
4907
|
-
asideRightPeek: "number|string",
|
|
4908
|
-
drawerFloating: "boolean",
|
|
4909
|
-
navFloating: "boolean",
|
|
4910
|
-
overlayClose: "boolean",
|
|
4911
|
-
escClose: "boolean",
|
|
4912
|
-
stickyHeader: "boolean",
|
|
4913
|
-
stickyFooter: "boolean",
|
|
4914
|
-
stickyAside: "boolean",
|
|
4915
|
-
stickyNav: "boolean",
|
|
4916
|
-
tagPage: "boolean",
|
|
4917
|
-
mode: "local|global",
|
|
4918
|
-
layoutMode: "alias di mode",
|
|
4919
|
-
disposition: "classic|classicRight|sidebarFullLeft|sidebarFullRight|appShell|dashboard|website|documentation|landing",
|
|
4920
|
-
layoutDisposition: "alias di disposition",
|
|
4921
|
-
layout: "alias di disposition",
|
|
4922
|
-
gap: "number|string",
|
|
4923
|
-
headerOffset: "number|string",
|
|
4924
|
-
minHeight: "number|string",
|
|
4925
|
-
areas: "string|array",
|
|
4926
|
-
gridTemplateAreas: "string|array",
|
|
4927
|
-
templateAreas: "string|array",
|
|
4928
|
-
mobile: "{ disposition?, mode?, gap?, minHeight?, areas?, gridTemplateAreas?, drawerWidth?, navWidth?, drawerFloating?, navFloating?, noDrawer?, noNav? }",
|
|
4929
|
-
tablet: "{ disposition?, mode?, gap?, minHeight?, areas?, gridTemplateAreas?, drawerWidth?, navWidth?, drawerFloating?, navFloating?, noDrawer?, noNav? }",
|
|
4930
|
-
pc: "{ disposition?, mode?, gap?, minHeight?, areas?, gridTemplateAreas?, drawerWidth?, navWidth?, drawerFloating?, navFloating?, noDrawer?, noNav? }",
|
|
4931
|
-
shellClass: "string",
|
|
4932
|
-
headerClass: "string",
|
|
4933
|
-
asideClass: "string",
|
|
4934
|
-
navClass: "string",
|
|
4935
|
-
pageClass: "string",
|
|
4936
|
-
footerClass: "string",
|
|
4937
|
-
overlayClass: "string",
|
|
4938
|
-
slots: "{ header?, aside?, drawer?, nav?, asideRight?, drawerRight?, page?, main?, footer?, default? }",
|
|
4939
|
-
class: "string",
|
|
4940
|
-
style: "object"
|
|
4941
|
-
},
|
|
4942
|
-
slots: {
|
|
4943
|
-
header: "Header content",
|
|
4944
|
-
aside: "Aside / drawer content",
|
|
4945
|
-
drawer: "Alias of aside",
|
|
4946
|
-
nav: "Right-side panel content",
|
|
4947
|
-
asideRight: "Alias of nav",
|
|
4948
|
-
drawerRight: "Alias of nav",
|
|
4949
|
-
page: "Page content",
|
|
4950
|
-
main: "Alias of page",
|
|
4951
|
-
footer: "Footer content",
|
|
4952
|
-
default: "Fallback page content"
|
|
4953
|
-
},
|
|
4954
|
-
returns: "HTMLDivElement with openAside/closeAside/toggleAside/openNav/closeNav/toggleNav methods, " +
|
|
4955
|
-
"isDrawerOpen/isNavOpen/isMobile/reflow, header()/aside()/nav()/page()/footer(), " +
|
|
4956
|
-
"headerUpdate/asideUpdate/navUpdate/pageUpdate/mainUpdate/footerUpdate and _dispose()",
|
|
4957
|
-
description: "Composable shell layout with independent left drawer and right nav, configurable widths, optional resize with min/max, optional floating mode, and runtime section updates."
|
|
4958
|
-
};
|
|
4959
|
-
}
|
|
4190
|
+
|
|
4960
4191
|
// Esempio: JSswift.ui.Layout({ header, aside, page, footer })
|
|
4961
4192
|
|
|
4962
4193
|
UI.Footer = (...args) => {
|
|
@@ -5102,57 +4333,7 @@
|
|
|
5102
4333
|
setPropertyProps(el, rawProps);
|
|
5103
4334
|
return el;
|
|
5104
4335
|
};
|
|
5105
|
-
|
|
5106
|
-
UI.meta = UI.meta || {};
|
|
5107
|
-
UI.meta.Footer = {
|
|
5108
|
-
signature: "UI.Footer(...children) | UI.Footer(props, ...children)",
|
|
5109
|
-
props: {
|
|
5110
|
-
title: "String|Node|Function|Array",
|
|
5111
|
-
subtitle: "String|Node|Function|Array",
|
|
5112
|
-
eyebrow: "String|Node|Function|Array",
|
|
5113
|
-
content: "Node|Function|Array",
|
|
5114
|
-
meta: "Node|Function|Array",
|
|
5115
|
-
icon: "String|Node|Function|Array",
|
|
5116
|
-
left: "Node|Function|Array",
|
|
5117
|
-
start: "Alias of left",
|
|
5118
|
-
right: "Node|Function|Array",
|
|
5119
|
-
end: "Alias of right",
|
|
5120
|
-
body: "Alias of content",
|
|
5121
|
-
actions: "Node|Function|Array",
|
|
5122
|
-
sticky: "boolean",
|
|
5123
|
-
dense: "boolean",
|
|
5124
|
-
elevated: "boolean",
|
|
5125
|
-
divider: "boolean",
|
|
5126
|
-
align: `left|center|right`,
|
|
5127
|
-
justify: `flex-start|center|flex-end|space-between|space-around|space-evenly`,
|
|
5128
|
-
wrap: "boolean",
|
|
5129
|
-
stack: "boolean",
|
|
5130
|
-
gap: "string|number",
|
|
5131
|
-
minHeight: "string|number",
|
|
5132
|
-
slots: "{ left?, start?, right?, end?, center?, body?, icon?, eyebrow?, title?, subtitle?, meta?, content?, actions?, default? }",
|
|
5133
|
-
class: "string",
|
|
5134
|
-
style: "object"
|
|
5135
|
-
},
|
|
5136
|
-
slots: {
|
|
5137
|
-
left: "Footer leading area",
|
|
5138
|
-
start: "Alias/addon for the leading area",
|
|
5139
|
-
right: "Footer trailing area",
|
|
5140
|
-
end: "Alias/addon for the trailing area",
|
|
5141
|
-
center: "Full override for the central body",
|
|
5142
|
-
body: "Alias of center",
|
|
5143
|
-
icon: "Leading icon",
|
|
5144
|
-
eyebrow: "Eyebrow / kicker",
|
|
5145
|
-
title: "Main title",
|
|
5146
|
-
subtitle: "Subtitle or note",
|
|
5147
|
-
meta: "Meta info next to the central content",
|
|
5148
|
-
content: "Extra content or children fallback",
|
|
5149
|
-
actions: "Actions grouped in the trailing area",
|
|
5150
|
-
default: "Fallback content for the body area"
|
|
5151
|
-
},
|
|
5152
|
-
returns: "HTMLElement <footer>",
|
|
5153
|
-
description: "Structured footer with start/body/end regions, optional copy, actions, and composable slots."
|
|
5154
|
-
};
|
|
5155
|
-
}
|
|
4336
|
+
|
|
5156
4337
|
// Esempio: JSswift.ui.Footer({}, "Footer")
|
|
5157
4338
|
|
|
5158
4339
|
const normalizeChildren = (children) => {
|
|
@@ -5331,71 +4512,7 @@
|
|
|
5331
4512
|
setPropertyProps(el, props);
|
|
5332
4513
|
return el;
|
|
5333
4514
|
};
|
|
5334
|
-
|
|
5335
|
-
UI.meta = UI.meta || {};
|
|
5336
|
-
UI.meta.Toolbar = {
|
|
5337
|
-
signature: "UI.Toolbar(...children) | UI.Toolbar(props, ...children)",
|
|
5338
|
-
props: {
|
|
5339
|
-
before: "Node|Function|Array",
|
|
5340
|
-
start: "Node|Function|Array",
|
|
5341
|
-
left: "Alias of start",
|
|
5342
|
-
center: "Node|Function|Array",
|
|
5343
|
-
body: "Alias of center",
|
|
5344
|
-
content: "Alias of center",
|
|
5345
|
-
title: "String|Node|Function|Array",
|
|
5346
|
-
subtitle: "String|Node|Function|Array",
|
|
5347
|
-
meta: "String|Node|Function|Array",
|
|
5348
|
-
end: "Node|Function|Array",
|
|
5349
|
-
right: "Alias of end",
|
|
5350
|
-
actions: "Alias of end",
|
|
5351
|
-
after: "Node|Function|Array",
|
|
5352
|
-
dense: "boolean",
|
|
5353
|
-
divider: "boolean",
|
|
5354
|
-
elevated: "boolean",
|
|
5355
|
-
sticky: "boolean",
|
|
5356
|
-
wrap: "boolean|string",
|
|
5357
|
-
align: `stretch|flex-start|center|flex-end|baseline`,
|
|
5358
|
-
justify: `flex-start|center|flex-end|space-between|space-around|space-evenly`,
|
|
5359
|
-
gap: "string|number (e.g. '8px' or 'var(--cms-s-md)')",
|
|
5360
|
-
size: "xxs|xs|sm|md|lg|xl|xxl",
|
|
5361
|
-
beforeClass: "string",
|
|
5362
|
-
startClass: "string",
|
|
5363
|
-
bodyClass: "string",
|
|
5364
|
-
centerClass: "Alias of bodyClass",
|
|
5365
|
-
contentClass: "Alias of bodyClass",
|
|
5366
|
-
copyClass: "string",
|
|
5367
|
-
titleClass: "string",
|
|
5368
|
-
subtitleClass: "string",
|
|
5369
|
-
metaClass: "string",
|
|
5370
|
-
endClass: "string",
|
|
5371
|
-
afterClass: "string",
|
|
5372
|
-
slots: "{ before?, start?, left?, center?, body?, content?, title?, subtitle?, meta?, end?, right?, actions?, after?, default? }",
|
|
5373
|
-
class: "string",
|
|
5374
|
-
style: "object"
|
|
5375
|
-
},
|
|
5376
|
-
slots: {
|
|
5377
|
-
before: "Optional top row",
|
|
5378
|
-
start: "Leading content area",
|
|
5379
|
-
left: "Alias of start",
|
|
5380
|
-
center: "Main content area",
|
|
5381
|
-
body: "Alias of center",
|
|
5382
|
-
content: "Alias of center",
|
|
5383
|
-
title: "Toolbar main title",
|
|
5384
|
-
subtitle: "Subtitle or operational note",
|
|
5385
|
-
meta: "Meta info/chips above or next to the title",
|
|
5386
|
-
end: "Trailing actions area",
|
|
5387
|
-
right: "Alias of end",
|
|
5388
|
-
actions: "Alias of end",
|
|
5389
|
-
after: "Optional bottom row",
|
|
5390
|
-
default: "Fallback content / children"
|
|
5391
|
-
},
|
|
5392
|
-
events: {
|
|
5393
|
-
onClick: "MouseEvent"
|
|
5394
|
-
},
|
|
5395
|
-
description: "Composable toolbar with before/start/center/end/after regions, optional copy, and fallback compatible with simple flex usage.",
|
|
5396
|
-
returns: "HTMLDivElement"
|
|
5397
|
-
};
|
|
5398
|
-
}
|
|
4515
|
+
|
|
5399
4516
|
// Esempio: JSswift.ui.Toolbar({}, JSswift.ui.Btn({}, "Azione"))
|
|
5400
4517
|
|
|
5401
4518
|
const isGridColNode = (value) => value && value.nodeType === 1 && value.classList?.contains("cms-grid-col");
|
|
@@ -5576,60 +4693,7 @@
|
|
|
5576
4693
|
setPropertyProps(el, rawProps);
|
|
5577
4694
|
return el;
|
|
5578
4695
|
};
|
|
5579
|
-
|
|
5580
|
-
UI.meta = UI.meta || {};
|
|
5581
|
-
UI.meta.Grid = {
|
|
5582
|
-
signature: "UI.Grid(...children) | UI.Grid(props, ...children)",
|
|
5583
|
-
props: {
|
|
5584
|
-
cols: "number|string",
|
|
5585
|
-
columns: "alias di cols",
|
|
5586
|
-
min: "string|number (auto-fit/auto-fill min width)",
|
|
5587
|
-
max: "string|number (max track size, default 1fr)",
|
|
5588
|
-
gap: "string|number",
|
|
5589
|
-
rowGap: "string|number",
|
|
5590
|
-
columnGap: "string|number",
|
|
5591
|
-
colGap: "alias di columnGap",
|
|
5592
|
-
rows: "number|string",
|
|
5593
|
-
autoRows: "string|number",
|
|
5594
|
-
areas: "string|array",
|
|
5595
|
-
flow: "row|column|dense|row dense|column dense",
|
|
5596
|
-
align: `stretch|start|center|end`,
|
|
5597
|
-
alignItems: "alias di align",
|
|
5598
|
-
justify: `start|center|end|space-between|space-around|space-evenly`,
|
|
5599
|
-
justifyItems: `stretch|start|center|end`,
|
|
5600
|
-
placeItems: "string",
|
|
5601
|
-
placeContent: "string",
|
|
5602
|
-
dense: "boolean",
|
|
5603
|
-
inline: "boolean",
|
|
5604
|
-
debug: "boolean",
|
|
5605
|
-
autoFit: "boolean",
|
|
5606
|
-
autoFill: "boolean",
|
|
5607
|
-
full: "boolean",
|
|
5608
|
-
width: "string|number",
|
|
5609
|
-
minWidth: "string|number",
|
|
5610
|
-
maxWidth: "string|number",
|
|
5611
|
-
padding: "string|number",
|
|
5612
|
-
mobile: "{ cols?, gap?, flow?, width?, padding? }",
|
|
5613
|
-
tablet: "{ cols?, gap?, flow?, width?, padding? }",
|
|
5614
|
-
pc: "{ cols?, gap?, flow?, width?, padding? }",
|
|
5615
|
-
items: "Array<Node|Object|string>",
|
|
5616
|
-
itemClass: "string",
|
|
5617
|
-
itemStyle: "object",
|
|
5618
|
-
itemProps: "object",
|
|
5619
|
-
empty: "String|Node|Function|Array",
|
|
5620
|
-
slots: "{ default?, item?, empty? }",
|
|
5621
|
-
class: "string",
|
|
5622
|
-
style: "object"
|
|
5623
|
-
},
|
|
5624
|
-
slots: {
|
|
5625
|
-
default: "Grid content fallback",
|
|
5626
|
-
item: "Render custom di ogni item ({ item, index, count, first, last })",
|
|
5627
|
-
empty: "Empty state della griglia"
|
|
5628
|
-
},
|
|
5629
|
-
returns: "HTMLDivElement",
|
|
5630
|
-
description: "Griglia dichiarativa per layout responsive: supporta children, items/slot item, auto-fit, template custom e empty state."
|
|
5631
|
-
};
|
|
5632
|
-
}
|
|
4696
|
+
|
|
5633
4697
|
// Esempio: JSswift.ui.Grid({}, JSswift.ui.GridCol({ span: 12 }, "Col"))
|
|
5634
4698
|
|
|
5635
4699
|
UI.GridCol = (...args) => {
|
|
@@ -5905,68 +4969,5 @@
|
|
|
5905
4969
|
setPropertyProps(el, props);
|
|
5906
4970
|
return el;
|
|
5907
4971
|
};
|
|
5908
|
-
|
|
5909
|
-
UI.meta = UI.meta || {};
|
|
5910
|
-
UI.meta.GridCol = {
|
|
5911
|
-
signature: "UI.GridCol(...children) | UI.GridCol(props, ...children)",
|
|
5912
|
-
props: {
|
|
5913
|
-
span: "number|string",
|
|
5914
|
-
col: "alias di span",
|
|
5915
|
-
sm: "number|string",
|
|
5916
|
-
md: "number|string",
|
|
5917
|
-
lg: "number|string",
|
|
5918
|
-
auto: "boolean",
|
|
5919
|
-
row: "number|string",
|
|
5920
|
-
rowSpan: "number|string",
|
|
5921
|
-
area: "string",
|
|
5922
|
-
align: "string (align-self)",
|
|
5923
|
-
justify: "string (justify-self)",
|
|
5924
|
-
place: "string (place-self)",
|
|
5925
|
-
gap: "string|number",
|
|
5926
|
-
rowGap: "string|number",
|
|
5927
|
-
columnGap: "string|number",
|
|
5928
|
-
padding: "string|number",
|
|
5929
|
-
width: "string|number",
|
|
5930
|
-
height: "string|number",
|
|
5931
|
-
minHeight: "string|number",
|
|
5932
|
-
maxHeight: "string|number",
|
|
5933
|
-
fullHeight: "boolean",
|
|
5934
|
-
stack: "boolean",
|
|
5935
|
-
inline: "boolean",
|
|
5936
|
-
direction: "column|row|string",
|
|
5937
|
-
contentAlign: "string",
|
|
5938
|
-
contentJustify: "string",
|
|
5939
|
-
center: "boolean",
|
|
5940
|
-
scroll: "boolean|string",
|
|
5941
|
-
panel: "boolean",
|
|
5942
|
-
clickable: "boolean",
|
|
5943
|
-
to: "string",
|
|
5944
|
-
mobile: "{ span?, col?, gap?, direction?, contentAlign?, contentJustify? }",
|
|
5945
|
-
tablet: "{ span?, col?, gap?, direction?, contentAlign?, contentJustify? }",
|
|
5946
|
-
pc: "{ span?, col?, gap?, direction?, contentAlign?, contentJustify? }",
|
|
5947
|
-
start: "Node|Function|Array",
|
|
5948
|
-
body: "Node|Function|Array",
|
|
5949
|
-
end: "Node|Function|Array",
|
|
5950
|
-
color: "string",
|
|
5951
|
-
outline: "boolean",
|
|
5952
|
-
shadow: "boolean|string",
|
|
5953
|
-
radius: "number|string",
|
|
5954
|
-
slots: "{ start?, body?, end?, default? }",
|
|
5955
|
-
class: "string",
|
|
5956
|
-
style: "object"
|
|
5957
|
-
},
|
|
5958
|
-
slots: {
|
|
5959
|
-
start: "Top/header region",
|
|
5960
|
-
body: "Main body region",
|
|
5961
|
-
end: "Bottom/footer region",
|
|
5962
|
-
default: "Fallback content"
|
|
5963
|
-
},
|
|
5964
|
-
events: {
|
|
5965
|
-
onClick: "MouseEvent",
|
|
5966
|
-
onKeydown: "KeyboardEvent"
|
|
5967
|
-
},
|
|
5968
|
-
returns: "HTMLDivElement",
|
|
5969
|
-
description: "CSS Grid item with responsive spans, optional internal stack layout, start/body/end regions, and lightweight visual variants."
|
|
5970
|
-
};
|
|
5971
|
-
}
|
|
4972
|
+
|
|
5972
4973
|
// Esempio: JSswift.ui.GridCol({ span: 6, sm: 12 }, "Colonna")
|