@ostack.tech/ui-kform 1.2.0 → 1.3.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/ostack-ui-kform.css
CHANGED
|
@@ -245,51 +245,6 @@
|
|
|
245
245
|
--o-ui-spinner-track-color: var(--o-ui-accent-a5);
|
|
246
246
|
--o-ui-spinner-indicator-color: var(--o-ui-accent-a11);
|
|
247
247
|
}
|
|
248
|
-
.o-ui-spinner--3xs {
|
|
249
|
-
font-size: 0.5625rem;
|
|
250
|
-
}
|
|
251
|
-
.o-ui-spinner--2xs {
|
|
252
|
-
font-size: 0.625rem;
|
|
253
|
-
}
|
|
254
|
-
.o-ui-spinner--xs {
|
|
255
|
-
font-size: 0.75rem;
|
|
256
|
-
}
|
|
257
|
-
.o-ui-spinner--sm {
|
|
258
|
-
font-size: 0.875rem;
|
|
259
|
-
}
|
|
260
|
-
.o-ui-spinner--md {
|
|
261
|
-
font-size: 1rem;
|
|
262
|
-
}
|
|
263
|
-
.o-ui-spinner--lg {
|
|
264
|
-
font-size: 1.125rem;
|
|
265
|
-
}
|
|
266
|
-
.o-ui-spinner--xl {
|
|
267
|
-
font-size: 1.25rem;
|
|
268
|
-
}
|
|
269
|
-
.o-ui-spinner--2xl {
|
|
270
|
-
font-size: 1.5rem;
|
|
271
|
-
}
|
|
272
|
-
.o-ui-spinner--3xl {
|
|
273
|
-
font-size: 1.875rem;
|
|
274
|
-
}
|
|
275
|
-
.o-ui-spinner--4xl {
|
|
276
|
-
font-size: 2.25rem;
|
|
277
|
-
}
|
|
278
|
-
.o-ui-spinner--5xl {
|
|
279
|
-
font-size: 3rem;
|
|
280
|
-
}
|
|
281
|
-
.o-ui-spinner--6xl {
|
|
282
|
-
font-size: 3.75rem;
|
|
283
|
-
}
|
|
284
|
-
.o-ui-spinner--7xl {
|
|
285
|
-
font-size: 4.5rem;
|
|
286
|
-
}
|
|
287
|
-
.o-ui-spinner--8xl {
|
|
288
|
-
font-size: 6rem;
|
|
289
|
-
}
|
|
290
|
-
.o-ui-spinner--9xl {
|
|
291
|
-
font-size: 8rem;
|
|
292
|
-
}
|
|
293
248
|
|
|
294
249
|
.o-ui-kform-form-app {
|
|
295
250
|
position: relative;
|
|
@@ -301,6 +256,7 @@
|
|
|
301
256
|
.o-ui-kform-form-app[data-has-min-height-xs] {
|
|
302
257
|
--o-ui-kform-form-app-min-height: var(--o-ui-kform-form-app-min-height-xs);
|
|
303
258
|
}
|
|
259
|
+
|
|
304
260
|
@media (min-width: 576px) {
|
|
305
261
|
.o-ui-kform-form-app[data-has-min-height-sm] {
|
|
306
262
|
--o-ui-kform-form-app-min-height: var(--o-ui-kform-form-app-min-height-sm);
|
package/dist/ostack-ui-kform.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { c } from "react/compiler-runtime";
|
|
2
2
|
import { AtPathError, CurrentPath, FormContext, FormattedValue, InvalidPathError, equals, formatNumericAsString, formatTemporalAsString, toFileList, useController, useControllerState, useCurrentPath, useFileInput, useForm, useFormContext, useFormController, useFormManager, useFormattedValue, useFormatter, useInput, useIssuesTracker, useListableInput, useNumericInput, useResolvedPath, useSubmitting, useTemporalInput } from "@ostack.tech/kform-react";
|
|
3
|
-
import { Action, ActionSplit, Actions, ActionsSecondary, Alert, AlertDialog, AlertDialogAction, AlertDialogBody, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger, Button, Card, CardBody, CardHeader, CardTitle, Checkbox, CheckboxGroup, CloseButton, Code, Container, ControlAddon, DataTable, DataTableCell, DataTableContent, DataTablePagination, DataTableRow, DataTableRowsPerPage, DateInput, DateRangeInput, DescriptionList, DescriptionListItem, Dialog, DialogBody, DialogContent, DialogHeader, DialogTitle, DialogTrigger, DocumentTitle, DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, ErrorBoundary, Feedback, FeedbackList, FeedbackPopover, FeedbackProvider, Field, Icon, IconButton, Input, Layer, Link, LocalizationProvider as LocalizationProvider$1, MenuList, MenuListItem, NATIVE_CONTROLS, NumericInput, Option, OptionsGroup, Popover, PopoverContent, PopoverTrigger, PrefixProvider, PrinterTrigger, Radio, RadioGroup, Root, Select, Slot, Spinner, Stack, Step, StepContent, StepList, Stepper, StepperFinishTrigger, StepperNextTrigger, StepperPreviousTrigger, Tab, TabContent, TabList, Tabs, TextArea, Tooltip, VisuallyHidden, boolDataAttr, combineAriaIds, computed, controlStatusToAccent, cx, parseChildren, setBoolDataAttr, useActionsContext, useAlertDialog, useCombinedEventHandler, useCombinedRef, useConstant, useControllableState, useCssVars, useDataTableApiRef, useDataTableColumnLabel, useDateTransformer, useErrorReporter, useIntersectionObserver, useIsInFeedbackProvider, useIsInRoot, useIsInTableCell, useKeyboardShortcut, useLatestRef, useMeasure, useMediaBreakpointUp, useOnLabelChange, usePrefix as usePrefix$1, usePrevious, usePrint, usePrintClassNames, usePrintInProgress, usePrinterDocumentTitle, usePrinting,
|
|
3
|
+
import { Action, ActionSplit, Actions, ActionsSecondary, Alert, AlertDialog, AlertDialogAction, AlertDialogBody, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger, Button, Card, CardBody, CardHeader, CardTitle, Checkbox, CheckboxGroup, CloseButton, Code, Container, ControlAddon, DataTable, DataTableCell, DataTableContent, DataTablePagination, DataTableRow, DataTableRowsPerPage, DateInput, DateRangeInput, DescriptionList, DescriptionListItem, Dialog, DialogBody, DialogContent, DialogHeader, DialogTitle, DialogTrigger, DocumentTitle, DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, ErrorBoundary, Feedback, FeedbackList, FeedbackPopover, FeedbackProvider, Field, Icon, IconButton, Input, Layer, Link, LocalizationProvider as LocalizationProvider$1, MenuList, MenuListItem, NATIVE_CONTROLS, NumericInput, Option, OptionsGroup, Popover, PopoverContent, PopoverTrigger, PrefixProvider, PrinterTrigger, Radio, RadioGroup, Root, Select, Slot, Spinner, Stack, Step, StepContent, StepList, Stepper, StepperFinishTrigger, StepperNextTrigger, StepperPreviousTrigger, Tab, TabContent, TabList, Tabs, TextArea, Tooltip, VisuallyHidden, boolDataAttr, combineAriaIds, computed, controlStatusToAccent, cx, parseChildren, setBoolDataAttr, useActionsContext, useAlertDialog, useCombinedEventHandler, useCombinedRef, useConstant, useControllableState, useCssVars, useDataTableApiRef, useDataTableColumnLabel, useDateTransformer, useErrorReporter, useIntersectionObserver, useIsInFeedbackProvider, useIsInRoot, useIsInTableCell, useKeyboardShortcut, useLatestRef, useMeasure, useMediaBreakpointUp, useOnLabelChange, usePrefix as usePrefix$1, usePrevious, usePrint, usePrintClassNames, usePrintInProgress, usePrinterDocumentTitle, usePrinting, useResponsiveValue, useScrollPosition, useSpacing, useStartPrintingTask, useToastManager, warnOnce, withCleanup } from "@ostack.tech/ui";
|
|
4
4
|
import { Children, Fragment, Suspense, createContext, isValidElement, startTransition, useContext, useDeferredValue, useEffect, useEffectEvent, useId, useImperativeHandle, useRef, useState } from "react";
|
|
5
5
|
import { createStore, useStore } from "zustand";
|
|
6
6
|
import { useShallow } from "zustand/react/shallow";
|
|
@@ -1045,7 +1045,7 @@ function _temp$51(t0) {
|
|
|
1045
1045
|
//#region src/components/FormApp/FormAppElement.tsx
|
|
1046
1046
|
/** Form application element. */
|
|
1047
1047
|
function FormAppElement(t0) {
|
|
1048
|
-
const $ = c(
|
|
1048
|
+
const $ = c(54);
|
|
1049
1049
|
let children;
|
|
1050
1050
|
let className;
|
|
1051
1051
|
let formAppElement;
|
|
@@ -1083,132 +1083,125 @@ function FormAppElement(t0) {
|
|
|
1083
1083
|
$[10] = t1;
|
|
1084
1084
|
} else t1 = $[10];
|
|
1085
1085
|
const { cssVarName } = useCssVars(t1);
|
|
1086
|
-
let t2;
|
|
1087
|
-
if ($[11] !== prefix) {
|
|
1088
|
-
t2 = { prefix };
|
|
1089
|
-
$[11] = prefix;
|
|
1090
|
-
$[12] = t2;
|
|
1091
|
-
} else t2 = $[12];
|
|
1092
|
-
const { responsiveValueToCssVarsAndDataAttrs } = useResponsiveValues(t2);
|
|
1093
1086
|
const { store } = useFormAppContext();
|
|
1094
1087
|
const formTitle = useFormTitle();
|
|
1088
|
+
let t2;
|
|
1089
|
+
if ($[11] !== cssVarName || $[12] !== formAppElement?.style || $[13] !== store) {
|
|
1090
|
+
t2 = () => store.subscribe(_temp$50, (height) => formAppElement?.style.setProperty(cssVarName("top-bar-height"), `${height}px`), { fireImmediately: true });
|
|
1091
|
+
$[11] = cssVarName;
|
|
1092
|
+
$[12] = formAppElement?.style;
|
|
1093
|
+
$[13] = store;
|
|
1094
|
+
$[14] = t2;
|
|
1095
|
+
} else t2 = $[14];
|
|
1095
1096
|
let t3;
|
|
1096
|
-
if ($[
|
|
1097
|
-
t3 =
|
|
1098
|
-
$[13] = cssVarName;
|
|
1099
|
-
$[14] = formAppElement?.style;
|
|
1100
|
-
$[15] = store;
|
|
1101
|
-
$[16] = t3;
|
|
1102
|
-
} else t3 = $[16];
|
|
1103
|
-
let t4;
|
|
1104
|
-
if ($[17] !== cssVarName || $[18] !== formAppElement || $[19] !== store) {
|
|
1105
|
-
t4 = [
|
|
1097
|
+
if ($[15] !== cssVarName || $[16] !== formAppElement || $[17] !== store) {
|
|
1098
|
+
t3 = [
|
|
1106
1099
|
cssVarName,
|
|
1107
1100
|
formAppElement,
|
|
1108
1101
|
store
|
|
1109
1102
|
];
|
|
1110
|
-
$[
|
|
1111
|
-
$[
|
|
1112
|
-
$[
|
|
1113
|
-
$[
|
|
1114
|
-
} else
|
|
1115
|
-
useEffect(
|
|
1103
|
+
$[15] = cssVarName;
|
|
1104
|
+
$[16] = formAppElement;
|
|
1105
|
+
$[17] = store;
|
|
1106
|
+
$[18] = t3;
|
|
1107
|
+
} else t3 = $[18];
|
|
1108
|
+
useEffect(t2, t3);
|
|
1109
|
+
let t4;
|
|
1110
|
+
if ($[19] !== cssVarName || $[20] !== formAppElement?.style || $[21] !== store) {
|
|
1111
|
+
t4 = () => store.subscribe(_temp2$46, (width) => formAppElement?.style.setProperty(cssVarName("left-sidebar-width"), `${width}px`), { fireImmediately: true });
|
|
1112
|
+
$[19] = cssVarName;
|
|
1113
|
+
$[20] = formAppElement?.style;
|
|
1114
|
+
$[21] = store;
|
|
1115
|
+
$[22] = t4;
|
|
1116
|
+
} else t4 = $[22];
|
|
1116
1117
|
let t5;
|
|
1117
|
-
if ($[
|
|
1118
|
-
t5 =
|
|
1119
|
-
$[21] = cssVarName;
|
|
1120
|
-
$[22] = formAppElement?.style;
|
|
1121
|
-
$[23] = store;
|
|
1122
|
-
$[24] = t5;
|
|
1123
|
-
} else t5 = $[24];
|
|
1124
|
-
let t6;
|
|
1125
|
-
if ($[25] !== cssVarName || $[26] !== formAppElement || $[27] !== store) {
|
|
1126
|
-
t6 = [
|
|
1118
|
+
if ($[23] !== cssVarName || $[24] !== formAppElement || $[25] !== store) {
|
|
1119
|
+
t5 = [
|
|
1127
1120
|
cssVarName,
|
|
1128
1121
|
formAppElement,
|
|
1129
1122
|
store
|
|
1130
1123
|
];
|
|
1131
|
-
$[
|
|
1132
|
-
$[
|
|
1133
|
-
$[
|
|
1134
|
-
$[
|
|
1135
|
-
} else
|
|
1136
|
-
useEffect(
|
|
1124
|
+
$[23] = cssVarName;
|
|
1125
|
+
$[24] = formAppElement;
|
|
1126
|
+
$[25] = store;
|
|
1127
|
+
$[26] = t5;
|
|
1128
|
+
} else t5 = $[26];
|
|
1129
|
+
useEffect(t4, t5);
|
|
1130
|
+
let t6;
|
|
1131
|
+
if ($[27] !== cssVarName || $[28] !== formAppElement?.style || $[29] !== store) {
|
|
1132
|
+
t6 = () => store.subscribe(_temp3$27, (height_0) => formAppElement?.style.setProperty(cssVarName("bottom-panel-height"), `${height_0}px`), { fireImmediately: true });
|
|
1133
|
+
$[27] = cssVarName;
|
|
1134
|
+
$[28] = formAppElement?.style;
|
|
1135
|
+
$[29] = store;
|
|
1136
|
+
$[30] = t6;
|
|
1137
|
+
} else t6 = $[30];
|
|
1137
1138
|
let t7;
|
|
1138
|
-
if ($[
|
|
1139
|
-
t7 =
|
|
1140
|
-
$[29] = cssVarName;
|
|
1141
|
-
$[30] = formAppElement?.style;
|
|
1142
|
-
$[31] = store;
|
|
1143
|
-
$[32] = t7;
|
|
1144
|
-
} else t7 = $[32];
|
|
1145
|
-
let t8;
|
|
1146
|
-
if ($[33] !== cssVarName || $[34] !== formAppElement || $[35] !== store) {
|
|
1147
|
-
t8 = [
|
|
1139
|
+
if ($[31] !== cssVarName || $[32] !== formAppElement || $[33] !== store) {
|
|
1140
|
+
t7 = [
|
|
1148
1141
|
cssVarName,
|
|
1149
1142
|
formAppElement,
|
|
1150
1143
|
store
|
|
1151
1144
|
];
|
|
1152
|
-
$[
|
|
1153
|
-
$[
|
|
1154
|
-
$[
|
|
1145
|
+
$[31] = cssVarName;
|
|
1146
|
+
$[32] = formAppElement;
|
|
1147
|
+
$[33] = store;
|
|
1148
|
+
$[34] = t7;
|
|
1149
|
+
} else t7 = $[34];
|
|
1150
|
+
useEffect(t6, t7);
|
|
1151
|
+
let t8;
|
|
1152
|
+
if ($[35] !== prefix) {
|
|
1153
|
+
t8 = { prefix };
|
|
1154
|
+
$[35] = prefix;
|
|
1155
1155
|
$[36] = t8;
|
|
1156
1156
|
} else t8 = $[36];
|
|
1157
|
-
|
|
1157
|
+
const minHeightProps = useResponsiveValue("form-app-", "min-height", minHeight, _temp4$21, t8);
|
|
1158
1158
|
let t9;
|
|
1159
|
-
if ($[37] !==
|
|
1160
|
-
t9 =
|
|
1161
|
-
$[37] =
|
|
1162
|
-
$[38] =
|
|
1159
|
+
if ($[37] !== className || $[38] !== prefix) {
|
|
1160
|
+
t9 = cx(prefix("form-app"), className);
|
|
1161
|
+
$[37] = className;
|
|
1162
|
+
$[38] = prefix;
|
|
1163
1163
|
$[39] = t9;
|
|
1164
1164
|
} else t9 = $[39];
|
|
1165
|
-
const { cssVars, dataAttrs } = t9;
|
|
1166
1165
|
let t10;
|
|
1167
|
-
if ($[40] !==
|
|
1168
|
-
t10 =
|
|
1169
|
-
|
|
1170
|
-
$[41] = prefix;
|
|
1171
|
-
$[42] = t10;
|
|
1172
|
-
} else t10 = $[42];
|
|
1173
|
-
let t11;
|
|
1174
|
-
if ($[43] !== cssVars || $[44] !== style) {
|
|
1175
|
-
t11 = {
|
|
1176
|
-
...cssVars,
|
|
1166
|
+
if ($[40] !== minHeightProps.cssVars || $[41] !== style) {
|
|
1167
|
+
t10 = {
|
|
1168
|
+
...minHeightProps.cssVars,
|
|
1177
1169
|
...style
|
|
1178
1170
|
};
|
|
1179
|
-
$[
|
|
1180
|
-
$[
|
|
1181
|
-
$[
|
|
1182
|
-
} else
|
|
1171
|
+
$[40] = minHeightProps.cssVars;
|
|
1172
|
+
$[41] = style;
|
|
1173
|
+
$[42] = t10;
|
|
1174
|
+
} else t10 = $[42];
|
|
1175
|
+
const t11 = minHeightProps.dataAttrs;
|
|
1183
1176
|
let t12;
|
|
1184
|
-
if ($[
|
|
1177
|
+
if ($[43] !== ref || $[44] !== setFormAppElement) {
|
|
1185
1178
|
t12 = [setFormAppElement, ref];
|
|
1186
|
-
$[
|
|
1187
|
-
$[
|
|
1188
|
-
$[
|
|
1189
|
-
} else t12 = $[
|
|
1179
|
+
$[43] = ref;
|
|
1180
|
+
$[44] = setFormAppElement;
|
|
1181
|
+
$[45] = t12;
|
|
1182
|
+
} else t12 = $[45];
|
|
1190
1183
|
const t13 = useCombinedRef(t12);
|
|
1191
1184
|
let t14;
|
|
1192
|
-
if ($[
|
|
1185
|
+
if ($[46] !== children || $[47] !== formTitle || $[48] !== minHeightProps.dataAttrs || $[49] !== otherProps || $[50] !== t10 || $[51] !== t13 || $[52] !== t9) {
|
|
1193
1186
|
t14 = /* @__PURE__ */ jsx("form", {
|
|
1194
|
-
className:
|
|
1195
|
-
style:
|
|
1187
|
+
className: t9,
|
|
1188
|
+
style: t10,
|
|
1196
1189
|
"aria-label": formTitle,
|
|
1197
1190
|
tabIndex: -1,
|
|
1198
|
-
...
|
|
1191
|
+
...t11,
|
|
1199
1192
|
...otherProps,
|
|
1200
1193
|
ref: t13,
|
|
1201
1194
|
children
|
|
1202
1195
|
});
|
|
1203
|
-
$[
|
|
1204
|
-
$[
|
|
1205
|
-
$[
|
|
1206
|
-
$[
|
|
1207
|
-
$[
|
|
1208
|
-
$[
|
|
1209
|
-
$[
|
|
1210
|
-
$[
|
|
1211
|
-
} else t14 = $[
|
|
1196
|
+
$[46] = children;
|
|
1197
|
+
$[47] = formTitle;
|
|
1198
|
+
$[48] = minHeightProps.dataAttrs;
|
|
1199
|
+
$[49] = otherProps;
|
|
1200
|
+
$[50] = t10;
|
|
1201
|
+
$[51] = t13;
|
|
1202
|
+
$[52] = t9;
|
|
1203
|
+
$[53] = t14;
|
|
1204
|
+
} else t14 = $[53];
|
|
1212
1205
|
return t14;
|
|
1213
1206
|
}
|
|
1214
1207
|
function _temp4$21(v) {
|