@uipath/apollo-wind 2.30.0 → 2.31.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/dist/components/forms/form-schema.d.ts +8 -0
- package/dist/components/forms/metadata-form.cjs +104 -39
- package/dist/components/forms/metadata-form.d.ts +25 -1
- package/dist/components/forms/metadata-form.js +106 -41
- package/dist/components/ui/index.cjs +34 -34
- package/dist/components/ui/search.cjs +1 -1
- package/dist/components/ui/search.js +1 -1
- package/dist/styles.css +38 -0
- package/package.json +1 -1
|
@@ -255,6 +255,14 @@ export interface FormStep {
|
|
|
255
255
|
validation?: 'onChange' | 'onBlur' | 'onSubmit';
|
|
256
256
|
canSkip?: boolean;
|
|
257
257
|
conditions?: FieldCondition[];
|
|
258
|
+
/**
|
|
259
|
+
* Message shown (in the `tabs` step variant) when this step has no visible
|
|
260
|
+
* sections. A step that sets this stays in the tab bar even while empty and
|
|
261
|
+
* renders the message in place of its content — e.g. a "Parameters" tab that
|
|
262
|
+
* always shows, reading "No available parameters" for a node with no inputs.
|
|
263
|
+
* Steps without both sections and `emptyState` are hidden from the tab bar.
|
|
264
|
+
*/
|
|
265
|
+
emptyState?: string;
|
|
258
266
|
}
|
|
259
267
|
export interface FormAction {
|
|
260
268
|
id: string;
|
|
@@ -39,7 +39,7 @@ const external_field_renderer_cjs_namespaceObject = require("./field-renderer.cj
|
|
|
39
39
|
const external_rules_engine_cjs_namespaceObject = require("./rules-engine.cjs");
|
|
40
40
|
const external_validation_converter_cjs_namespaceObject = require("./validation-converter.cjs");
|
|
41
41
|
const DEFAULT_PLUGINS = [];
|
|
42
|
-
function MetadataForm({ schema, plugins = DEFAULT_PLUGINS, onSubmit, className, disabled = false, autoComplete, stepVariant = 'wizard' }) {
|
|
42
|
+
function MetadataForm({ schema, plugins = DEFAULT_PLUGINS, onSubmit, className, disabled = false, autoComplete, stepVariant = 'wizard', sectionVariant = 'card', activeStepId, onActiveStepChange }) {
|
|
43
43
|
const [currentStep, setCurrentStep] = (0, external_react_namespaceObject.useState)(0);
|
|
44
44
|
const [customComponents, setCustomComponents] = (0, external_react_namespaceObject.useState)({});
|
|
45
45
|
const [isInitialized, setIsInitialized] = (0, external_react_namespaceObject.useState)(false);
|
|
@@ -131,6 +131,9 @@ function MetadataForm({ schema, plugins = DEFAULT_PLUGINS, onSubmit, className,
|
|
|
131
131
|
context: context,
|
|
132
132
|
customComponents: customComponents,
|
|
133
133
|
disabled: disabled,
|
|
134
|
+
sectionVariant: sectionVariant,
|
|
135
|
+
activeStepId: activeStepId,
|
|
136
|
+
onActiveStepChange: onActiveStepChange,
|
|
134
137
|
onReset: ()=>reset()
|
|
135
138
|
});
|
|
136
139
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(MultiStepForm, {
|
|
@@ -139,14 +142,16 @@ function MetadataForm({ schema, plugins = DEFAULT_PLUGINS, onSubmit, className,
|
|
|
139
142
|
currentStep: currentStep,
|
|
140
143
|
setCurrentStep: setCurrentStep,
|
|
141
144
|
customComponents: customComponents,
|
|
142
|
-
disabled: disabled
|
|
145
|
+
disabled: disabled,
|
|
146
|
+
sectionVariant: sectionVariant
|
|
143
147
|
});
|
|
144
148
|
}
|
|
145
149
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(SinglePageForm, {
|
|
146
150
|
schema: schema,
|
|
147
151
|
context: context,
|
|
148
152
|
customComponents: customComponents,
|
|
149
|
-
disabled: disabled
|
|
153
|
+
disabled: disabled,
|
|
154
|
+
sectionVariant: sectionVariant
|
|
150
155
|
});
|
|
151
156
|
};
|
|
152
157
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_react_hook_form_namespaceObject.FormProvider, {
|
|
@@ -166,20 +171,21 @@ function MetadataForm({ schema, plugins = DEFAULT_PLUGINS, onSubmit, className,
|
|
|
166
171
|
})
|
|
167
172
|
});
|
|
168
173
|
}
|
|
169
|
-
function SinglePageForm({ schema, context, customComponents, disabled }) {
|
|
174
|
+
function SinglePageForm({ schema, context, customComponents, disabled, sectionVariant }) {
|
|
170
175
|
const sections = schema.sections || [];
|
|
171
176
|
const visibleSections = sections.filter((section)=>!section.conditions || context.evaluateConditions(section.conditions));
|
|
172
177
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
173
|
-
className:
|
|
178
|
+
className: 'plain' === sectionVariant ? void 0 : 'space-y-2',
|
|
174
179
|
children: visibleSections.map((section)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(FormSection, {
|
|
175
180
|
section: section,
|
|
176
181
|
context: context,
|
|
177
182
|
customComponents: customComponents,
|
|
178
|
-
disabled: disabled
|
|
183
|
+
disabled: disabled,
|
|
184
|
+
sectionVariant: sectionVariant
|
|
179
185
|
}, section.id))
|
|
180
186
|
});
|
|
181
187
|
}
|
|
182
|
-
function MultiStepForm({ schema, context, currentStep, setCurrentStep, customComponents, disabled }) {
|
|
188
|
+
function MultiStepForm({ schema, context, currentStep, setCurrentStep, customComponents, disabled, sectionVariant }) {
|
|
183
189
|
const steps = schema.steps || [];
|
|
184
190
|
const step = steps[currentStep];
|
|
185
191
|
if (!step) return null;
|
|
@@ -217,12 +223,13 @@ function MultiStepForm({ schema, context, currentStep, setCurrentStep, customCom
|
|
|
217
223
|
]
|
|
218
224
|
}),
|
|
219
225
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
220
|
-
className:
|
|
226
|
+
className: 'plain' === sectionVariant ? void 0 : 'space-y-2',
|
|
221
227
|
children: step.sections.map((section)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(FormSection, {
|
|
222
228
|
section: section,
|
|
223
229
|
context: context,
|
|
224
230
|
customComponents: customComponents,
|
|
225
|
-
disabled: disabled
|
|
231
|
+
disabled: disabled,
|
|
232
|
+
sectionVariant: sectionVariant
|
|
226
233
|
}, section.id))
|
|
227
234
|
}),
|
|
228
235
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
@@ -250,15 +257,39 @@ function MultiStepForm({ schema, context, currentStep, setCurrentStep, customCom
|
|
|
250
257
|
]
|
|
251
258
|
});
|
|
252
259
|
}
|
|
253
|
-
function TabbedStepForm({ schema, context, customComponents, disabled, onReset }) {
|
|
260
|
+
function TabbedStepForm({ schema, context, customComponents, disabled, sectionVariant, onReset, activeStepId, onActiveStepChange }) {
|
|
254
261
|
const steps = schema.steps || [];
|
|
255
|
-
const visibleSteps = steps.filter((step)=>
|
|
256
|
-
|
|
257
|
-
|
|
262
|
+
const visibleSteps = steps.filter((step)=>{
|
|
263
|
+
if (step.conditions && !context.evaluateConditions(step.conditions)) return false;
|
|
264
|
+
const hasVisibleSection = step.sections.some((section)=>!section.conditions || context.evaluateConditions(section.conditions));
|
|
265
|
+
return hasVisibleSection || void 0 !== step.emptyState;
|
|
266
|
+
});
|
|
267
|
+
const formState = (0, external_react_hook_form_namespaceObject.useFormState)({
|
|
268
|
+
control: context.form.control
|
|
269
|
+
});
|
|
270
|
+
const errorCountByStepId = {};
|
|
271
|
+
for (const step of visibleSteps){
|
|
272
|
+
let count = 0;
|
|
273
|
+
for (const section of step.sections)if (!section.conditions || context.evaluateConditions(section.conditions)) for (const field of section.fields){
|
|
274
|
+
if (field.rules && !external_rules_engine_cjs_namespaceObject.RulesEngine.isFieldVisible(field.rules, context.values)) continue;
|
|
275
|
+
const fieldError = context.form.getFieldState(field.name, formState).error;
|
|
276
|
+
if (fieldError) count += Array.isArray(fieldError) ? fieldError.filter(Boolean).length : 1;
|
|
277
|
+
}
|
|
278
|
+
errorCountByStepId[step.id] = count;
|
|
279
|
+
}
|
|
280
|
+
const [internalTab, setInternalTab] = (0, external_react_namespaceObject.useState)('');
|
|
281
|
+
const controlled = void 0 !== activeStepId;
|
|
282
|
+
const requestedTab = controlled ? activeStepId : internalTab;
|
|
283
|
+
const currentTab = visibleSteps.some((step)=>step.id === requestedTab) ? requestedTab : visibleSteps[0]?.id ?? '';
|
|
284
|
+
const selectTab = (stepId)=>{
|
|
285
|
+
if (!controlled) setInternalTab(stepId);
|
|
286
|
+
onActiveStepChange?.(stepId);
|
|
287
|
+
};
|
|
258
288
|
(0, external_react_namespaceObject.useEffect)(()=>{
|
|
259
|
-
if (
|
|
289
|
+
if (!controlled && internalTab !== currentTab) setInternalTab(currentTab);
|
|
260
290
|
}, [
|
|
261
|
-
|
|
291
|
+
controlled,
|
|
292
|
+
internalTab,
|
|
262
293
|
currentTab
|
|
263
294
|
]);
|
|
264
295
|
if (0 === visibleSteps.length) return null;
|
|
@@ -266,27 +297,53 @@ function TabbedStepForm({ schema, context, customComponents, disabled, onReset }
|
|
|
266
297
|
children: [
|
|
267
298
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(tabs_cjs_namespaceObject.Tabs, {
|
|
268
299
|
value: currentTab,
|
|
269
|
-
onValueChange:
|
|
270
|
-
className: "flex flex-col gap-
|
|
300
|
+
onValueChange: selectTab,
|
|
301
|
+
className: "flex min-h-0 flex-1 flex-col gap-1",
|
|
271
302
|
children: [
|
|
272
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
273
|
-
className: "
|
|
274
|
-
children:
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
303
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
304
|
+
className: "shrink-0 pt-3 [padding-inline:var(--mf-content-inset,0px)]",
|
|
305
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(tabs_cjs_namespaceObject.ScrollableTabsList, {
|
|
306
|
+
className: "h-auto justify-start gap-0.5 rounded-lg bg-transparent px-0 py-0.5 text-muted-foreground",
|
|
307
|
+
scrollButtonClassName: "size-6 hover:bg-surface-overlay",
|
|
308
|
+
children: visibleSteps.map((step)=>{
|
|
309
|
+
const errorCount = errorCountByStepId[step.id] ?? 0;
|
|
310
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(tabs_cjs_namespaceObject.TabsTrigger, {
|
|
311
|
+
value: step.id,
|
|
312
|
+
className: "inline-flex h-6 shrink-0 items-center gap-1.5 whitespace-nowrap rounded-md px-2.5 text-xs font-medium text-muted-foreground shadow-none transition-colors hover:text-foreground data-[state=active]:bg-surface-overlay data-[state=active]:text-foreground data-[state=active]:shadow-sm",
|
|
313
|
+
children: [
|
|
314
|
+
step.title,
|
|
315
|
+
errorCount > 0 && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
316
|
+
role: "img",
|
|
317
|
+
"aria-label": `${errorCount} ${1 === errorCount ? 'issue' : 'issues'}`,
|
|
318
|
+
title: `${errorCount} ${1 === errorCount ? 'issue' : 'issues'}`,
|
|
319
|
+
className: "grid h-4 min-w-4 place-items-center rounded-full bg-error px-1 text-[10px] font-semibold leading-none text-foreground-on-accent",
|
|
320
|
+
children: errorCount
|
|
321
|
+
})
|
|
322
|
+
]
|
|
323
|
+
}, step.id);
|
|
324
|
+
})
|
|
325
|
+
})
|
|
279
326
|
}),
|
|
280
|
-
visibleSteps.map((step)
|
|
327
|
+
visibleSteps.map((step)=>{
|
|
328
|
+
const stepSections = step.sections.filter((section)=>!section.conditions || context.evaluateConditions(section.conditions));
|
|
329
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(tabs_cjs_namespaceObject.TabsContent, {
|
|
281
330
|
value: step.id,
|
|
282
|
-
className: "
|
|
283
|
-
children: step.
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
331
|
+
className: "mt-0 min-h-0 flex-1 overflow-auto",
|
|
332
|
+
children: 0 === stepSections.length && void 0 !== step.emptyState ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
333
|
+
className: "pt-4 text-sm text-muted-foreground [padding-inline:var(--mf-content-inset,0px)]",
|
|
334
|
+
children: step.emptyState
|
|
335
|
+
}) : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
336
|
+
className: 'plain' === sectionVariant ? 'pb-6 [padding-inline:var(--mf-content-inset,0px)]' : 'space-y-2 pb-6 pt-4 [padding-inline:var(--mf-content-inset,0px)]',
|
|
337
|
+
children: stepSections.map((section)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(FormSection, {
|
|
338
|
+
section: section,
|
|
339
|
+
context: context,
|
|
340
|
+
customComponents: customComponents,
|
|
341
|
+
disabled: disabled,
|
|
342
|
+
sectionVariant: sectionVariant
|
|
343
|
+
}, section.id))
|
|
344
|
+
})
|
|
345
|
+
}, step.id);
|
|
346
|
+
})
|
|
290
347
|
]
|
|
291
348
|
}),
|
|
292
349
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(FormActions, {
|
|
@@ -297,9 +354,13 @@ function TabbedStepForm({ schema, context, customComponents, disabled, onReset }
|
|
|
297
354
|
]
|
|
298
355
|
});
|
|
299
356
|
}
|
|
300
|
-
function FormSection({ section, context, customComponents, disabled }) {
|
|
357
|
+
function FormSection({ section, context, customComponents, disabled, sectionVariant = 'card' }) {
|
|
301
358
|
const gridColumns = context.schema.layout?.columns || 1;
|
|
302
359
|
const gap = context.schema.layout?.gap || 4;
|
|
360
|
+
const isPlain = 'plain' === sectionVariant;
|
|
361
|
+
const dividerClassName = 'border-t first:border-t-0';
|
|
362
|
+
const wrapperClassName = isPlain ? 'border-b-0' : 'border rounded-lg px-3';
|
|
363
|
+
const triggerClassName = isPlain ? 'justify-start gap-2 py-4 text-sm font-semibold hover:no-underline' : 'text-sm font-medium';
|
|
303
364
|
const fieldsGrid = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
304
365
|
className: "grid",
|
|
305
366
|
style: {
|
|
@@ -313,7 +374,10 @@ function FormSection({ section, context, customComponents, disabled }) {
|
|
|
313
374
|
disabled: disabled
|
|
314
375
|
}, field.name))
|
|
315
376
|
});
|
|
316
|
-
if (!section.title) return
|
|
377
|
+
if (!section.title) return isPlain ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
378
|
+
className: `${dividerClassName} pb-4 pt-4`,
|
|
379
|
+
children: fieldsGrid
|
|
380
|
+
}) : fieldsGrid;
|
|
317
381
|
const innerContent = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
318
382
|
className: "flex flex-col gap-4",
|
|
319
383
|
children: [
|
|
@@ -331,12 +395,13 @@ function FormSection({ section, context, customComponents, disabled }) {
|
|
|
331
395
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(accordion_cjs_namespaceObject.Accordion, {
|
|
332
396
|
type: "multiple",
|
|
333
397
|
defaultValue: defaultValue,
|
|
398
|
+
className: isPlain ? dividerClassName : void 0,
|
|
334
399
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(accordion_cjs_namespaceObject.AccordionItem, {
|
|
335
400
|
value: section.id,
|
|
336
|
-
className:
|
|
401
|
+
className: wrapperClassName,
|
|
337
402
|
children: [
|
|
338
403
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(accordion_cjs_namespaceObject.AccordionTrigger, {
|
|
339
|
-
className:
|
|
404
|
+
className: triggerClassName,
|
|
340
405
|
children: section.title
|
|
341
406
|
}),
|
|
342
407
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(accordion_cjs_namespaceObject.AccordionContent, {
|
|
@@ -347,12 +412,12 @@ function FormSection({ section, context, customComponents, disabled }) {
|
|
|
347
412
|
});
|
|
348
413
|
}
|
|
349
414
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
350
|
-
className:
|
|
415
|
+
className: isPlain ? dividerClassName : wrapperClassName,
|
|
351
416
|
children: [
|
|
352
417
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
353
418
|
className: "flex",
|
|
354
419
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
355
|
-
className:
|
|
420
|
+
className: isPlain ? 'flex flex-1 items-center justify-start gap-2 py-4 text-sm font-semibold' : 'flex flex-1 items-center justify-between py-4 text-sm font-medium',
|
|
356
421
|
children: section.title
|
|
357
422
|
})
|
|
358
423
|
}),
|
|
@@ -18,6 +18,30 @@ interface MetadataFormProps {
|
|
|
18
18
|
* across every step. Ignored for single-page (`sections`) schemas.
|
|
19
19
|
*/
|
|
20
20
|
stepVariant?: 'wizard' | 'tabs';
|
|
21
|
+
/**
|
|
22
|
+
* Visual treatment for each titled section. `'card'` (default) wraps every
|
|
23
|
+
* section in a bordered, rounded, horizontally-padded box. `'plain'` drops the
|
|
24
|
+
* border, rounding, and horizontal padding so sections read as flush headers
|
|
25
|
+
* over their content, separated by a full-width hairline divider between
|
|
26
|
+
* consecutive sections — used by hosts (e.g. the canvas properties panel) that
|
|
27
|
+
* already frame the form and want a borderless list. Applies to both
|
|
28
|
+
* collapsible (accordion) and non-collapsible sections across every layout
|
|
29
|
+
* (single-page, wizard, tabs).
|
|
30
|
+
*/
|
|
31
|
+
sectionVariant?: 'card' | 'plain';
|
|
32
|
+
/**
|
|
33
|
+
* Controlled active step id for the `tabs` step variant. When provided the
|
|
34
|
+
* caller owns which tab is selected — persist it across remounts to keep the
|
|
35
|
+
* user on the same tab when switching between nodes. If the id isn't one of
|
|
36
|
+
* the currently visible steps, the form shows the first tab without mutating
|
|
37
|
+
* the caller's value. Omit for uncontrolled (internal) tab state.
|
|
38
|
+
*/
|
|
39
|
+
activeStepId?: string;
|
|
40
|
+
/**
|
|
41
|
+
* Fires with the step id whenever the user selects a tab, in both controlled
|
|
42
|
+
* and uncontrolled mode. Pair it with `activeStepId` to persist the selection.
|
|
43
|
+
*/
|
|
44
|
+
onActiveStepChange?: (stepId: string) => void;
|
|
21
45
|
}
|
|
22
|
-
export declare function MetadataForm({ schema, plugins, onSubmit, className, disabled, autoComplete, stepVariant, }: MetadataFormProps): import("react/jsx-runtime").JSX.Element;
|
|
46
|
+
export declare function MetadataForm({ schema, plugins, onSubmit, className, disabled, autoComplete, stepVariant, sectionVariant, activeStepId, onActiveStepChange, }: MetadataFormProps): import("react/jsx-runtime").JSX.Element;
|
|
23
47
|
export {};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { standardSchemaResolver } from "@hookform/resolvers/standard-schema";
|
|
3
3
|
import { useEffect, useMemo, useRef, useState } from "react";
|
|
4
|
-
import { FormProvider, useForm } from "react-hook-form";
|
|
4
|
+
import { FormProvider, useForm, useFormState } from "react-hook-form";
|
|
5
5
|
import { z } from "zod/v4";
|
|
6
6
|
import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from "../ui/accordion.js";
|
|
7
7
|
import { Button } from "../ui/button.js";
|
|
8
|
-
import { Tabs, TabsContent,
|
|
8
|
+
import { ScrollableTabsList, Tabs, TabsContent, TabsTrigger } from "../ui/tabs.js";
|
|
9
9
|
import { DataFetcher } from "./data-fetcher.js";
|
|
10
10
|
import { FormFieldRenderer } from "./field-renderer.js";
|
|
11
11
|
import { RulesEngine } from "./rules-engine.js";
|
|
12
12
|
import { validationConfigToZod } from "./validation-converter.js";
|
|
13
13
|
const DEFAULT_PLUGINS = [];
|
|
14
|
-
function MetadataForm({ schema, plugins = DEFAULT_PLUGINS, onSubmit, className, disabled = false, autoComplete, stepVariant = 'wizard' }) {
|
|
14
|
+
function MetadataForm({ schema, plugins = DEFAULT_PLUGINS, onSubmit, className, disabled = false, autoComplete, stepVariant = 'wizard', sectionVariant = 'card', activeStepId, onActiveStepChange }) {
|
|
15
15
|
const [currentStep, setCurrentStep] = useState(0);
|
|
16
16
|
const [customComponents, setCustomComponents] = useState({});
|
|
17
17
|
const [isInitialized, setIsInitialized] = useState(false);
|
|
@@ -103,6 +103,9 @@ function MetadataForm({ schema, plugins = DEFAULT_PLUGINS, onSubmit, className,
|
|
|
103
103
|
context: context,
|
|
104
104
|
customComponents: customComponents,
|
|
105
105
|
disabled: disabled,
|
|
106
|
+
sectionVariant: sectionVariant,
|
|
107
|
+
activeStepId: activeStepId,
|
|
108
|
+
onActiveStepChange: onActiveStepChange,
|
|
106
109
|
onReset: ()=>reset()
|
|
107
110
|
});
|
|
108
111
|
return /*#__PURE__*/ jsx(MultiStepForm, {
|
|
@@ -111,14 +114,16 @@ function MetadataForm({ schema, plugins = DEFAULT_PLUGINS, onSubmit, className,
|
|
|
111
114
|
currentStep: currentStep,
|
|
112
115
|
setCurrentStep: setCurrentStep,
|
|
113
116
|
customComponents: customComponents,
|
|
114
|
-
disabled: disabled
|
|
117
|
+
disabled: disabled,
|
|
118
|
+
sectionVariant: sectionVariant
|
|
115
119
|
});
|
|
116
120
|
}
|
|
117
121
|
return /*#__PURE__*/ jsx(SinglePageForm, {
|
|
118
122
|
schema: schema,
|
|
119
123
|
context: context,
|
|
120
124
|
customComponents: customComponents,
|
|
121
|
-
disabled: disabled
|
|
125
|
+
disabled: disabled,
|
|
126
|
+
sectionVariant: sectionVariant
|
|
122
127
|
});
|
|
123
128
|
};
|
|
124
129
|
return /*#__PURE__*/ jsx(FormProvider, {
|
|
@@ -138,20 +143,21 @@ function MetadataForm({ schema, plugins = DEFAULT_PLUGINS, onSubmit, className,
|
|
|
138
143
|
})
|
|
139
144
|
});
|
|
140
145
|
}
|
|
141
|
-
function SinglePageForm({ schema, context, customComponents, disabled }) {
|
|
146
|
+
function SinglePageForm({ schema, context, customComponents, disabled, sectionVariant }) {
|
|
142
147
|
const sections = schema.sections || [];
|
|
143
148
|
const visibleSections = sections.filter((section)=>!section.conditions || context.evaluateConditions(section.conditions));
|
|
144
149
|
return /*#__PURE__*/ jsx("div", {
|
|
145
|
-
className:
|
|
150
|
+
className: 'plain' === sectionVariant ? void 0 : 'space-y-2',
|
|
146
151
|
children: visibleSections.map((section)=>/*#__PURE__*/ jsx(FormSection, {
|
|
147
152
|
section: section,
|
|
148
153
|
context: context,
|
|
149
154
|
customComponents: customComponents,
|
|
150
|
-
disabled: disabled
|
|
155
|
+
disabled: disabled,
|
|
156
|
+
sectionVariant: sectionVariant
|
|
151
157
|
}, section.id))
|
|
152
158
|
});
|
|
153
159
|
}
|
|
154
|
-
function MultiStepForm({ schema, context, currentStep, setCurrentStep, customComponents, disabled }) {
|
|
160
|
+
function MultiStepForm({ schema, context, currentStep, setCurrentStep, customComponents, disabled, sectionVariant }) {
|
|
155
161
|
const steps = schema.steps || [];
|
|
156
162
|
const step = steps[currentStep];
|
|
157
163
|
if (!step) return null;
|
|
@@ -189,12 +195,13 @@ function MultiStepForm({ schema, context, currentStep, setCurrentStep, customCom
|
|
|
189
195
|
]
|
|
190
196
|
}),
|
|
191
197
|
/*#__PURE__*/ jsx("div", {
|
|
192
|
-
className:
|
|
198
|
+
className: 'plain' === sectionVariant ? void 0 : 'space-y-2',
|
|
193
199
|
children: step.sections.map((section)=>/*#__PURE__*/ jsx(FormSection, {
|
|
194
200
|
section: section,
|
|
195
201
|
context: context,
|
|
196
202
|
customComponents: customComponents,
|
|
197
|
-
disabled: disabled
|
|
203
|
+
disabled: disabled,
|
|
204
|
+
sectionVariant: sectionVariant
|
|
198
205
|
}, section.id))
|
|
199
206
|
}),
|
|
200
207
|
/*#__PURE__*/ jsxs("div", {
|
|
@@ -222,15 +229,39 @@ function MultiStepForm({ schema, context, currentStep, setCurrentStep, customCom
|
|
|
222
229
|
]
|
|
223
230
|
});
|
|
224
231
|
}
|
|
225
|
-
function TabbedStepForm({ schema, context, customComponents, disabled, onReset }) {
|
|
232
|
+
function TabbedStepForm({ schema, context, customComponents, disabled, sectionVariant, onReset, activeStepId, onActiveStepChange }) {
|
|
226
233
|
const steps = schema.steps || [];
|
|
227
|
-
const visibleSteps = steps.filter((step)=>
|
|
228
|
-
|
|
229
|
-
|
|
234
|
+
const visibleSteps = steps.filter((step)=>{
|
|
235
|
+
if (step.conditions && !context.evaluateConditions(step.conditions)) return false;
|
|
236
|
+
const hasVisibleSection = step.sections.some((section)=>!section.conditions || context.evaluateConditions(section.conditions));
|
|
237
|
+
return hasVisibleSection || void 0 !== step.emptyState;
|
|
238
|
+
});
|
|
239
|
+
const formState = useFormState({
|
|
240
|
+
control: context.form.control
|
|
241
|
+
});
|
|
242
|
+
const errorCountByStepId = {};
|
|
243
|
+
for (const step of visibleSteps){
|
|
244
|
+
let count = 0;
|
|
245
|
+
for (const section of step.sections)if (!section.conditions || context.evaluateConditions(section.conditions)) for (const field of section.fields){
|
|
246
|
+
if (field.rules && !RulesEngine.isFieldVisible(field.rules, context.values)) continue;
|
|
247
|
+
const fieldError = context.form.getFieldState(field.name, formState).error;
|
|
248
|
+
if (fieldError) count += Array.isArray(fieldError) ? fieldError.filter(Boolean).length : 1;
|
|
249
|
+
}
|
|
250
|
+
errorCountByStepId[step.id] = count;
|
|
251
|
+
}
|
|
252
|
+
const [internalTab, setInternalTab] = useState('');
|
|
253
|
+
const controlled = void 0 !== activeStepId;
|
|
254
|
+
const requestedTab = controlled ? activeStepId : internalTab;
|
|
255
|
+
const currentTab = visibleSteps.some((step)=>step.id === requestedTab) ? requestedTab : visibleSteps[0]?.id ?? '';
|
|
256
|
+
const selectTab = (stepId)=>{
|
|
257
|
+
if (!controlled) setInternalTab(stepId);
|
|
258
|
+
onActiveStepChange?.(stepId);
|
|
259
|
+
};
|
|
230
260
|
useEffect(()=>{
|
|
231
|
-
if (
|
|
261
|
+
if (!controlled && internalTab !== currentTab) setInternalTab(currentTab);
|
|
232
262
|
}, [
|
|
233
|
-
|
|
263
|
+
controlled,
|
|
264
|
+
internalTab,
|
|
234
265
|
currentTab
|
|
235
266
|
]);
|
|
236
267
|
if (0 === visibleSteps.length) return null;
|
|
@@ -238,27 +269,53 @@ function TabbedStepForm({ schema, context, customComponents, disabled, onReset }
|
|
|
238
269
|
children: [
|
|
239
270
|
/*#__PURE__*/ jsxs(Tabs, {
|
|
240
271
|
value: currentTab,
|
|
241
|
-
onValueChange:
|
|
242
|
-
className: "flex flex-col gap-
|
|
272
|
+
onValueChange: selectTab,
|
|
273
|
+
className: "flex min-h-0 flex-1 flex-col gap-1",
|
|
243
274
|
children: [
|
|
244
|
-
/*#__PURE__*/ jsx(
|
|
245
|
-
className: "
|
|
246
|
-
children:
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
275
|
+
/*#__PURE__*/ jsx("div", {
|
|
276
|
+
className: "shrink-0 pt-3 [padding-inline:var(--mf-content-inset,0px)]",
|
|
277
|
+
children: /*#__PURE__*/ jsx(ScrollableTabsList, {
|
|
278
|
+
className: "h-auto justify-start gap-0.5 rounded-lg bg-transparent px-0 py-0.5 text-muted-foreground",
|
|
279
|
+
scrollButtonClassName: "size-6 hover:bg-surface-overlay",
|
|
280
|
+
children: visibleSteps.map((step)=>{
|
|
281
|
+
const errorCount = errorCountByStepId[step.id] ?? 0;
|
|
282
|
+
return /*#__PURE__*/ jsxs(TabsTrigger, {
|
|
283
|
+
value: step.id,
|
|
284
|
+
className: "inline-flex h-6 shrink-0 items-center gap-1.5 whitespace-nowrap rounded-md px-2.5 text-xs font-medium text-muted-foreground shadow-none transition-colors hover:text-foreground data-[state=active]:bg-surface-overlay data-[state=active]:text-foreground data-[state=active]:shadow-sm",
|
|
285
|
+
children: [
|
|
286
|
+
step.title,
|
|
287
|
+
errorCount > 0 && /*#__PURE__*/ jsx("span", {
|
|
288
|
+
role: "img",
|
|
289
|
+
"aria-label": `${errorCount} ${1 === errorCount ? 'issue' : 'issues'}`,
|
|
290
|
+
title: `${errorCount} ${1 === errorCount ? 'issue' : 'issues'}`,
|
|
291
|
+
className: "grid h-4 min-w-4 place-items-center rounded-full bg-error px-1 text-[10px] font-semibold leading-none text-foreground-on-accent",
|
|
292
|
+
children: errorCount
|
|
293
|
+
})
|
|
294
|
+
]
|
|
295
|
+
}, step.id);
|
|
296
|
+
})
|
|
297
|
+
})
|
|
251
298
|
}),
|
|
252
|
-
visibleSteps.map((step)
|
|
299
|
+
visibleSteps.map((step)=>{
|
|
300
|
+
const stepSections = step.sections.filter((section)=>!section.conditions || context.evaluateConditions(section.conditions));
|
|
301
|
+
return /*#__PURE__*/ jsx(TabsContent, {
|
|
253
302
|
value: step.id,
|
|
254
|
-
className: "
|
|
255
|
-
children: step.
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
303
|
+
className: "mt-0 min-h-0 flex-1 overflow-auto",
|
|
304
|
+
children: 0 === stepSections.length && void 0 !== step.emptyState ? /*#__PURE__*/ jsx("div", {
|
|
305
|
+
className: "pt-4 text-sm text-muted-foreground [padding-inline:var(--mf-content-inset,0px)]",
|
|
306
|
+
children: step.emptyState
|
|
307
|
+
}) : /*#__PURE__*/ jsx("div", {
|
|
308
|
+
className: 'plain' === sectionVariant ? 'pb-6 [padding-inline:var(--mf-content-inset,0px)]' : 'space-y-2 pb-6 pt-4 [padding-inline:var(--mf-content-inset,0px)]',
|
|
309
|
+
children: stepSections.map((section)=>/*#__PURE__*/ jsx(FormSection, {
|
|
310
|
+
section: section,
|
|
311
|
+
context: context,
|
|
312
|
+
customComponents: customComponents,
|
|
313
|
+
disabled: disabled,
|
|
314
|
+
sectionVariant: sectionVariant
|
|
315
|
+
}, section.id))
|
|
316
|
+
})
|
|
317
|
+
}, step.id);
|
|
318
|
+
})
|
|
262
319
|
]
|
|
263
320
|
}),
|
|
264
321
|
/*#__PURE__*/ jsx(FormActions, {
|
|
@@ -269,9 +326,13 @@ function TabbedStepForm({ schema, context, customComponents, disabled, onReset }
|
|
|
269
326
|
]
|
|
270
327
|
});
|
|
271
328
|
}
|
|
272
|
-
function FormSection({ section, context, customComponents, disabled }) {
|
|
329
|
+
function FormSection({ section, context, customComponents, disabled, sectionVariant = 'card' }) {
|
|
273
330
|
const gridColumns = context.schema.layout?.columns || 1;
|
|
274
331
|
const gap = context.schema.layout?.gap || 4;
|
|
332
|
+
const isPlain = 'plain' === sectionVariant;
|
|
333
|
+
const dividerClassName = 'border-t first:border-t-0';
|
|
334
|
+
const wrapperClassName = isPlain ? 'border-b-0' : 'border rounded-lg px-3';
|
|
335
|
+
const triggerClassName = isPlain ? 'justify-start gap-2 py-4 text-sm font-semibold hover:no-underline' : 'text-sm font-medium';
|
|
275
336
|
const fieldsGrid = /*#__PURE__*/ jsx("div", {
|
|
276
337
|
className: "grid",
|
|
277
338
|
style: {
|
|
@@ -285,7 +346,10 @@ function FormSection({ section, context, customComponents, disabled }) {
|
|
|
285
346
|
disabled: disabled
|
|
286
347
|
}, field.name))
|
|
287
348
|
});
|
|
288
|
-
if (!section.title) return
|
|
349
|
+
if (!section.title) return isPlain ? /*#__PURE__*/ jsx("div", {
|
|
350
|
+
className: `${dividerClassName} pb-4 pt-4`,
|
|
351
|
+
children: fieldsGrid
|
|
352
|
+
}) : fieldsGrid;
|
|
289
353
|
const innerContent = /*#__PURE__*/ jsxs("div", {
|
|
290
354
|
className: "flex flex-col gap-4",
|
|
291
355
|
children: [
|
|
@@ -303,12 +367,13 @@ function FormSection({ section, context, customComponents, disabled }) {
|
|
|
303
367
|
return /*#__PURE__*/ jsx(Accordion, {
|
|
304
368
|
type: "multiple",
|
|
305
369
|
defaultValue: defaultValue,
|
|
370
|
+
className: isPlain ? dividerClassName : void 0,
|
|
306
371
|
children: /*#__PURE__*/ jsxs(AccordionItem, {
|
|
307
372
|
value: section.id,
|
|
308
|
-
className:
|
|
373
|
+
className: wrapperClassName,
|
|
309
374
|
children: [
|
|
310
375
|
/*#__PURE__*/ jsx(AccordionTrigger, {
|
|
311
|
-
className:
|
|
376
|
+
className: triggerClassName,
|
|
312
377
|
children: section.title
|
|
313
378
|
}),
|
|
314
379
|
/*#__PURE__*/ jsx(AccordionContent, {
|
|
@@ -319,12 +384,12 @@ function FormSection({ section, context, customComponents, disabled }) {
|
|
|
319
384
|
});
|
|
320
385
|
}
|
|
321
386
|
return /*#__PURE__*/ jsxs("div", {
|
|
322
|
-
className:
|
|
387
|
+
className: isPlain ? dividerClassName : wrapperClassName,
|
|
323
388
|
children: [
|
|
324
389
|
/*#__PURE__*/ jsx("div", {
|
|
325
390
|
className: "flex",
|
|
326
391
|
children: /*#__PURE__*/ jsx("div", {
|
|
327
|
-
className:
|
|
392
|
+
className: isPlain ? 'flex flex-1 items-center justify-start gap-2 py-4 text-sm font-semibold' : 'flex flex-1 items-center justify-between py-4 text-sm font-medium',
|
|
328
393
|
children: section.title
|
|
329
394
|
})
|
|
330
395
|
}),
|
|
@@ -15,7 +15,7 @@ var __webpack_modules__ = {
|
|
|
15
15
|
"./avatar" (module) {
|
|
16
16
|
module.exports = require("./avatar.cjs");
|
|
17
17
|
},
|
|
18
|
-
"
|
|
18
|
+
"./badge" (module) {
|
|
19
19
|
module.exports = require("./badge.cjs");
|
|
20
20
|
},
|
|
21
21
|
"./breadcrumb" (module) {
|
|
@@ -24,28 +24,28 @@ var __webpack_modules__ = {
|
|
|
24
24
|
"./button-group" (module) {
|
|
25
25
|
module.exports = require("./button-group.cjs");
|
|
26
26
|
},
|
|
27
|
-
"
|
|
27
|
+
"./button" (module) {
|
|
28
28
|
module.exports = require("./button.cjs");
|
|
29
29
|
},
|
|
30
|
-
"
|
|
30
|
+
"./calendar" (module) {
|
|
31
31
|
module.exports = require("./calendar.cjs");
|
|
32
32
|
},
|
|
33
|
-
"
|
|
33
|
+
"./card" (module) {
|
|
34
34
|
module.exports = require("./card.cjs");
|
|
35
35
|
},
|
|
36
|
-
"
|
|
36
|
+
"./checkbox" (module) {
|
|
37
37
|
module.exports = require("./checkbox.cjs");
|
|
38
38
|
},
|
|
39
|
-
"
|
|
39
|
+
"./collapsible" (module) {
|
|
40
40
|
module.exports = require("./collapsible.cjs");
|
|
41
41
|
},
|
|
42
42
|
"./combobox" (module) {
|
|
43
43
|
module.exports = require("./combobox.cjs");
|
|
44
44
|
},
|
|
45
|
-
"
|
|
45
|
+
"./command" (module) {
|
|
46
46
|
module.exports = require("./command.cjs");
|
|
47
47
|
},
|
|
48
|
-
"
|
|
48
|
+
"./context-menu" (module) {
|
|
49
49
|
module.exports = require("./context-menu.cjs");
|
|
50
50
|
},
|
|
51
51
|
"./data-table" (module) {
|
|
@@ -57,13 +57,13 @@ var __webpack_modules__ = {
|
|
|
57
57
|
"./datetime-picker" (module) {
|
|
58
58
|
module.exports = require("./datetime-picker.cjs");
|
|
59
59
|
},
|
|
60
|
-
"
|
|
60
|
+
"@/components/ui/dialog" (module) {
|
|
61
61
|
module.exports = require("./dialog.cjs");
|
|
62
62
|
},
|
|
63
|
-
"
|
|
63
|
+
"./dropdown-menu" (module) {
|
|
64
64
|
module.exports = require("./dropdown-menu.cjs");
|
|
65
65
|
},
|
|
66
|
-
"
|
|
66
|
+
"./editable-cell" (module) {
|
|
67
67
|
module.exports = require("./editable-cell.cjs");
|
|
68
68
|
},
|
|
69
69
|
"./empty-state" (module) {
|
|
@@ -72,16 +72,16 @@ var __webpack_modules__ = {
|
|
|
72
72
|
"./file-upload" (module) {
|
|
73
73
|
module.exports = require("./file-upload.cjs");
|
|
74
74
|
},
|
|
75
|
-
"
|
|
75
|
+
"./hover-card" (module) {
|
|
76
76
|
module.exports = require("./hover-card.cjs");
|
|
77
77
|
},
|
|
78
78
|
"./input-group" (module) {
|
|
79
79
|
module.exports = require("./input-group.cjs");
|
|
80
80
|
},
|
|
81
|
-
"
|
|
81
|
+
"./input" (module) {
|
|
82
82
|
module.exports = require("./input.cjs");
|
|
83
83
|
},
|
|
84
|
-
"
|
|
84
|
+
"./label" (module) {
|
|
85
85
|
module.exports = require("./label.cjs");
|
|
86
86
|
},
|
|
87
87
|
"./layout" (module) {
|
|
@@ -93,7 +93,7 @@ var __webpack_modules__ = {
|
|
|
93
93
|
"./pagination" (module) {
|
|
94
94
|
module.exports = require("./pagination.cjs");
|
|
95
95
|
},
|
|
96
|
-
"
|
|
96
|
+
"./popover" (module) {
|
|
97
97
|
module.exports = require("./popover.cjs");
|
|
98
98
|
},
|
|
99
99
|
"./progress" (module) {
|
|
@@ -144,13 +144,13 @@ var __webpack_modules__ = {
|
|
|
144
144
|
"./switch" (module) {
|
|
145
145
|
module.exports = require("./switch.cjs");
|
|
146
146
|
},
|
|
147
|
-
"
|
|
147
|
+
"./table" (module) {
|
|
148
148
|
module.exports = require("./table.cjs");
|
|
149
149
|
},
|
|
150
150
|
"./tabs" (module) {
|
|
151
151
|
module.exports = require("./tabs.cjs");
|
|
152
152
|
},
|
|
153
|
-
"
|
|
153
|
+
"./textarea" (module) {
|
|
154
154
|
module.exports = require("./textarea.cjs");
|
|
155
155
|
},
|
|
156
156
|
"./toggle-group" (module) {
|
|
@@ -247,7 +247,7 @@ var __webpack_exports__ = {};
|
|
|
247
247
|
"default"
|
|
248
248
|
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_avatar__rspack_import_4[__rspack_import_key];
|
|
249
249
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
250
|
-
var _badge__rspack_import_5 = __webpack_require__("
|
|
250
|
+
var _badge__rspack_import_5 = __webpack_require__("./badge");
|
|
251
251
|
var __rspack_reexport = {};
|
|
252
252
|
for(const __rspack_import_key in _badge__rspack_import_5)if ([
|
|
253
253
|
"TreeView",
|
|
@@ -261,7 +261,7 @@ var __webpack_exports__ = {};
|
|
|
261
261
|
"default"
|
|
262
262
|
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_breadcrumb__rspack_import_6[__rspack_import_key];
|
|
263
263
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
264
|
-
var _button__rspack_import_7 = __webpack_require__("
|
|
264
|
+
var _button__rspack_import_7 = __webpack_require__("./button");
|
|
265
265
|
var __rspack_reexport = {};
|
|
266
266
|
for(const __rspack_import_key in _button__rspack_import_7)if ([
|
|
267
267
|
"TreeView",
|
|
@@ -275,28 +275,28 @@ var __webpack_exports__ = {};
|
|
|
275
275
|
"default"
|
|
276
276
|
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_button_group__rspack_import_8[__rspack_import_key];
|
|
277
277
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
278
|
-
var _calendar__rspack_import_9 = __webpack_require__("
|
|
278
|
+
var _calendar__rspack_import_9 = __webpack_require__("./calendar");
|
|
279
279
|
var __rspack_reexport = {};
|
|
280
280
|
for(const __rspack_import_key in _calendar__rspack_import_9)if ([
|
|
281
281
|
"TreeView",
|
|
282
282
|
"default"
|
|
283
283
|
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_calendar__rspack_import_9[__rspack_import_key];
|
|
284
284
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
285
|
-
var _card__rspack_import_10 = __webpack_require__("
|
|
285
|
+
var _card__rspack_import_10 = __webpack_require__("./card");
|
|
286
286
|
var __rspack_reexport = {};
|
|
287
287
|
for(const __rspack_import_key in _card__rspack_import_10)if ([
|
|
288
288
|
"TreeView",
|
|
289
289
|
"default"
|
|
290
290
|
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_card__rspack_import_10[__rspack_import_key];
|
|
291
291
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
292
|
-
var _checkbox__rspack_import_11 = __webpack_require__("
|
|
292
|
+
var _checkbox__rspack_import_11 = __webpack_require__("./checkbox");
|
|
293
293
|
var __rspack_reexport = {};
|
|
294
294
|
for(const __rspack_import_key in _checkbox__rspack_import_11)if ([
|
|
295
295
|
"TreeView",
|
|
296
296
|
"default"
|
|
297
297
|
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_checkbox__rspack_import_11[__rspack_import_key];
|
|
298
298
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
299
|
-
var _collapsible__rspack_import_12 = __webpack_require__("
|
|
299
|
+
var _collapsible__rspack_import_12 = __webpack_require__("./collapsible");
|
|
300
300
|
var __rspack_reexport = {};
|
|
301
301
|
for(const __rspack_import_key in _collapsible__rspack_import_12)if ([
|
|
302
302
|
"TreeView",
|
|
@@ -310,14 +310,14 @@ var __webpack_exports__ = {};
|
|
|
310
310
|
"default"
|
|
311
311
|
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_combobox__rspack_import_13[__rspack_import_key];
|
|
312
312
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
313
|
-
var _command__rspack_import_14 = __webpack_require__("
|
|
313
|
+
var _command__rspack_import_14 = __webpack_require__("./command");
|
|
314
314
|
var __rspack_reexport = {};
|
|
315
315
|
for(const __rspack_import_key in _command__rspack_import_14)if ([
|
|
316
316
|
"TreeView",
|
|
317
317
|
"default"
|
|
318
318
|
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_command__rspack_import_14[__rspack_import_key];
|
|
319
319
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
320
|
-
var _context_menu__rspack_import_15 = __webpack_require__("
|
|
320
|
+
var _context_menu__rspack_import_15 = __webpack_require__("./context-menu");
|
|
321
321
|
var __rspack_reexport = {};
|
|
322
322
|
for(const __rspack_import_key in _context_menu__rspack_import_15)if ([
|
|
323
323
|
"TreeView",
|
|
@@ -345,21 +345,21 @@ var __webpack_exports__ = {};
|
|
|
345
345
|
"default"
|
|
346
346
|
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_datetime_picker__rspack_import_18[__rspack_import_key];
|
|
347
347
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
348
|
-
var _dialog__rspack_import_19 = __webpack_require__("
|
|
348
|
+
var _dialog__rspack_import_19 = __webpack_require__("@/components/ui/dialog");
|
|
349
349
|
var __rspack_reexport = {};
|
|
350
350
|
for(const __rspack_import_key in _dialog__rspack_import_19)if ([
|
|
351
351
|
"TreeView",
|
|
352
352
|
"default"
|
|
353
353
|
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_dialog__rspack_import_19[__rspack_import_key];
|
|
354
354
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
355
|
-
var _dropdown_menu__rspack_import_20 = __webpack_require__("
|
|
355
|
+
var _dropdown_menu__rspack_import_20 = __webpack_require__("./dropdown-menu");
|
|
356
356
|
var __rspack_reexport = {};
|
|
357
357
|
for(const __rspack_import_key in _dropdown_menu__rspack_import_20)if ([
|
|
358
358
|
"TreeView",
|
|
359
359
|
"default"
|
|
360
360
|
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_dropdown_menu__rspack_import_20[__rspack_import_key];
|
|
361
361
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
362
|
-
var _editable_cell__rspack_import_21 = __webpack_require__("
|
|
362
|
+
var _editable_cell__rspack_import_21 = __webpack_require__("./editable-cell");
|
|
363
363
|
var __rspack_reexport = {};
|
|
364
364
|
for(const __rspack_import_key in _editable_cell__rspack_import_21)if ([
|
|
365
365
|
"TreeView",
|
|
@@ -380,14 +380,14 @@ var __webpack_exports__ = {};
|
|
|
380
380
|
"default"
|
|
381
381
|
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_file_upload__rspack_import_23[__rspack_import_key];
|
|
382
382
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
383
|
-
var _hover_card__rspack_import_24 = __webpack_require__("
|
|
383
|
+
var _hover_card__rspack_import_24 = __webpack_require__("./hover-card");
|
|
384
384
|
var __rspack_reexport = {};
|
|
385
385
|
for(const __rspack_import_key in _hover_card__rspack_import_24)if ([
|
|
386
386
|
"TreeView",
|
|
387
387
|
"default"
|
|
388
388
|
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_hover_card__rspack_import_24[__rspack_import_key];
|
|
389
389
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
390
|
-
var _input__rspack_import_25 = __webpack_require__("
|
|
390
|
+
var _input__rspack_import_25 = __webpack_require__("./input");
|
|
391
391
|
var __rspack_reexport = {};
|
|
392
392
|
for(const __rspack_import_key in _input__rspack_import_25)if ([
|
|
393
393
|
"TreeView",
|
|
@@ -401,7 +401,7 @@ var __webpack_exports__ = {};
|
|
|
401
401
|
"default"
|
|
402
402
|
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_input_group__rspack_import_26[__rspack_import_key];
|
|
403
403
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
404
|
-
var _label__rspack_import_27 = __webpack_require__("
|
|
404
|
+
var _label__rspack_import_27 = __webpack_require__("./label");
|
|
405
405
|
var __rspack_reexport = {};
|
|
406
406
|
for(const __rspack_import_key in _label__rspack_import_27)if ([
|
|
407
407
|
"TreeView",
|
|
@@ -429,7 +429,7 @@ var __webpack_exports__ = {};
|
|
|
429
429
|
"default"
|
|
430
430
|
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_pagination__rspack_import_30[__rspack_import_key];
|
|
431
431
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
432
|
-
var _popover__rspack_import_31 = __webpack_require__("
|
|
432
|
+
var _popover__rspack_import_31 = __webpack_require__("./popover");
|
|
433
433
|
var __rspack_reexport = {};
|
|
434
434
|
for(const __rspack_import_key in _popover__rspack_import_31)if ([
|
|
435
435
|
"TreeView",
|
|
@@ -548,7 +548,7 @@ var __webpack_exports__ = {};
|
|
|
548
548
|
"default"
|
|
549
549
|
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_switch__rspack_import_47[__rspack_import_key];
|
|
550
550
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
551
|
-
var _table__rspack_import_48 = __webpack_require__("
|
|
551
|
+
var _table__rspack_import_48 = __webpack_require__("./table");
|
|
552
552
|
var __rspack_reexport = {};
|
|
553
553
|
for(const __rspack_import_key in _table__rspack_import_48)if ([
|
|
554
554
|
"TreeView",
|
|
@@ -562,7 +562,7 @@ var __webpack_exports__ = {};
|
|
|
562
562
|
"default"
|
|
563
563
|
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_tabs__rspack_import_49[__rspack_import_key];
|
|
564
564
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
565
|
-
var _textarea__rspack_import_50 = __webpack_require__("
|
|
565
|
+
var _textarea__rspack_import_50 = __webpack_require__("./textarea");
|
|
566
566
|
var __rspack_reexport = {};
|
|
567
567
|
for(const __rspack_import_key in _textarea__rspack_import_50)if ([
|
|
568
568
|
"TreeView",
|
|
@@ -52,7 +52,7 @@ const Search = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ classN
|
|
|
52
52
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_input_group_cjs_namespaceObject.InputGroupInput, {
|
|
53
53
|
ref: ref,
|
|
54
54
|
type: "search",
|
|
55
|
-
className: className,
|
|
55
|
+
className: (0, index_cjs_namespaceObject.cn)('[&::-webkit-search-cancel-button]:appearance-none [&::-webkit-search-decoration]:appearance-none', className),
|
|
56
56
|
value: value,
|
|
57
57
|
onChange: (e)=>onChange?.(e.target.value),
|
|
58
58
|
...props
|
|
@@ -23,7 +23,7 @@ const search_Search = /*#__PURE__*/ forwardRef(({ className, value, onChange, on
|
|
|
23
23
|
/*#__PURE__*/ jsx(InputGroupInput, {
|
|
24
24
|
ref: ref,
|
|
25
25
|
type: "search",
|
|
26
|
-
className: className,
|
|
26
|
+
className: cn('[&::-webkit-search-cancel-button]:appearance-none [&::-webkit-search-decoration]:appearance-none', className),
|
|
27
27
|
value: value,
|
|
28
28
|
onChange: (e)=>onChange?.(e.target.value),
|
|
29
29
|
...props
|
package/dist/styles.css
CHANGED
|
@@ -793,6 +793,9 @@
|
|
|
793
793
|
.ms-1 {
|
|
794
794
|
margin-inline-start: calc(var(--spacing) * 1);
|
|
795
795
|
}
|
|
796
|
+
.mt-0 {
|
|
797
|
+
margin-top: calc(var(--spacing) * 0);
|
|
798
|
+
}
|
|
796
799
|
.mt-0\.5 {
|
|
797
800
|
margin-top: calc(var(--spacing) * 0.5);
|
|
798
801
|
}
|
|
@@ -948,6 +951,10 @@
|
|
|
948
951
|
width: calc(var(--spacing) * 4);
|
|
949
952
|
height: calc(var(--spacing) * 4);
|
|
950
953
|
}
|
|
954
|
+
.size-6 {
|
|
955
|
+
width: calc(var(--spacing) * 6);
|
|
956
|
+
height: calc(var(--spacing) * 6);
|
|
957
|
+
}
|
|
951
958
|
.size-8 {
|
|
952
959
|
width: calc(var(--spacing) * 8);
|
|
953
960
|
height: calc(var(--spacing) * 8);
|
|
@@ -1390,6 +1397,9 @@
|
|
|
1390
1397
|
.w-\[360px\] {
|
|
1391
1398
|
width: 360px;
|
|
1392
1399
|
}
|
|
1400
|
+
.w-\[380px\] {
|
|
1401
|
+
width: 380px;
|
|
1402
|
+
}
|
|
1393
1403
|
.w-\[400px\] {
|
|
1394
1404
|
width: 400px;
|
|
1395
1405
|
}
|
|
@@ -1525,6 +1535,9 @@
|
|
|
1525
1535
|
.min-w-0 {
|
|
1526
1536
|
min-width: calc(var(--spacing) * 0);
|
|
1527
1537
|
}
|
|
1538
|
+
.min-w-4 {
|
|
1539
|
+
min-width: calc(var(--spacing) * 4);
|
|
1540
|
+
}
|
|
1528
1541
|
.min-w-5 {
|
|
1529
1542
|
min-width: calc(var(--spacing) * 5);
|
|
1530
1543
|
}
|
|
@@ -2595,6 +2608,9 @@
|
|
|
2595
2608
|
.bg-emerald-950 {
|
|
2596
2609
|
background-color: var(--color-emerald-950);
|
|
2597
2610
|
}
|
|
2611
|
+
.bg-error {
|
|
2612
|
+
background-color: var(--error);
|
|
2613
|
+
}
|
|
2598
2614
|
.bg-error-background {
|
|
2599
2615
|
background-color: var(--error-background);
|
|
2600
2616
|
}
|
|
@@ -3428,9 +3444,15 @@
|
|
|
3428
3444
|
.p-8 {
|
|
3429
3445
|
padding: calc(var(--spacing) * 8);
|
|
3430
3446
|
}
|
|
3447
|
+
.p-10 {
|
|
3448
|
+
padding: calc(var(--spacing) * 10);
|
|
3449
|
+
}
|
|
3431
3450
|
.p-px {
|
|
3432
3451
|
padding: 1px;
|
|
3433
3452
|
}
|
|
3453
|
+
.\[padding-inline\:var\(--mf-content-inset\,0px\)\] {
|
|
3454
|
+
padding-inline: var(--mf-content-inset,0px);
|
|
3455
|
+
}
|
|
3434
3456
|
.px-0 {
|
|
3435
3457
|
padding-inline: calc(var(--spacing) * 0);
|
|
3436
3458
|
}
|
|
@@ -4593,6 +4615,12 @@
|
|
|
4593
4615
|
translate: var(--tw-translate-x) var(--tw-translate-y);
|
|
4594
4616
|
}
|
|
4595
4617
|
}
|
|
4618
|
+
.first\:border-t-0 {
|
|
4619
|
+
&:first-child {
|
|
4620
|
+
border-top-style: var(--tw-border-style);
|
|
4621
|
+
border-top-width: 0px;
|
|
4622
|
+
}
|
|
4623
|
+
}
|
|
4596
4624
|
.first\:bg-surface-hover {
|
|
4597
4625
|
&:first-child {
|
|
4598
4626
|
background-color: var(--surface-hover);
|
|
@@ -6547,6 +6575,16 @@
|
|
|
6547
6575
|
display: none;
|
|
6548
6576
|
}
|
|
6549
6577
|
}
|
|
6578
|
+
.\[\&\:\:-webkit-search-cancel-button\]\:appearance-none {
|
|
6579
|
+
&::-webkit-search-cancel-button {
|
|
6580
|
+
appearance: none;
|
|
6581
|
+
}
|
|
6582
|
+
}
|
|
6583
|
+
.\[\&\:\:-webkit-search-decoration\]\:appearance-none {
|
|
6584
|
+
&::-webkit-search-decoration {
|
|
6585
|
+
appearance: none;
|
|
6586
|
+
}
|
|
6587
|
+
}
|
|
6550
6588
|
.\[\&\:has\(\[role\=checkbox\]\)\]\:pr-0 {
|
|
6551
6589
|
&:has([role=checkbox]) {
|
|
6552
6590
|
padding-right: calc(var(--spacing) * 0);
|