@process.co/ui 0.0.7 → 0.0.8
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/css/ui.css +302 -0
- package/dist/components/fields/index.cjs +14 -0
- package/dist/components/fields/index.cjs.map +1 -1
- package/dist/components/fields/index.d.cts +1 -1
- package/dist/components/fields/index.d.ts +1 -1
- package/dist/components/fields/index.js +13 -1
- package/dist/components/fields/index.js.map +1 -1
- package/dist/{index-_mVyhd0I.d.cts → index-yubVl0hX.d.cts} +21 -2
- package/dist/{index-_mVyhd0I.d.ts → index-yubVl0hX.d.ts} +21 -2
- package/dist/index.cjs +295 -37
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +31 -2
- package/dist/index.d.ts +31 -2
- package/dist/index.js +275 -35
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -57,6 +57,7 @@ interface InputProps {
|
|
|
57
57
|
declare function Input({ fieldName, label, value, onChange, disabled, placeholder, expectedType, required, hasRequiredError, className, editorClassName, }: InputProps): React$1.JSX.Element;
|
|
58
58
|
|
|
59
59
|
interface SelectOption {
|
|
60
|
+
node?: React$1.ReactNode;
|
|
60
61
|
value: string;
|
|
61
62
|
label: string;
|
|
62
63
|
}
|
|
@@ -301,6 +302,22 @@ declare const InferredTypesContext: React$1.Context<InferredTypesContextValue |
|
|
|
301
302
|
* ```
|
|
302
303
|
*/
|
|
303
304
|
declare function useInferredTypes(): InferredTypesContextValue | null;
|
|
305
|
+
/**
|
|
306
|
+
* Mock provider for inferred types context.
|
|
307
|
+
* In development mode, this is a no-op - just renders children.
|
|
308
|
+
* In production, the real implementation from @repo/ui provides actual type propagation.
|
|
309
|
+
*/
|
|
310
|
+
declare function InferredTypesProvider({ children }: {
|
|
311
|
+
children: React.ReactNode;
|
|
312
|
+
}): React$1.JSX.Element;
|
|
313
|
+
/**
|
|
314
|
+
* Compute the intersection of multiple types.
|
|
315
|
+
* Used when subscribing to multiple fields to narrow the expected type.
|
|
316
|
+
*
|
|
317
|
+
* @example
|
|
318
|
+
* intersectTypes(['string | number', 'number']) → 'number'
|
|
319
|
+
*/
|
|
320
|
+
declare function intersectTypes(types: (string | undefined)[]): string;
|
|
304
321
|
/**
|
|
305
322
|
* Configuration parsed from the $infer<...> syntax.
|
|
306
323
|
*/
|
|
@@ -356,6 +373,7 @@ declare function getOperatorsForType(type: string): Array<{
|
|
|
356
373
|
type index_InferConfig = InferConfig;
|
|
357
374
|
declare const index_InferredTypesContext: typeof InferredTypesContext;
|
|
358
375
|
type index_InferredTypesContextValue = InferredTypesContextValue;
|
|
376
|
+
declare const index_InferredTypesProvider: typeof InferredTypesProvider;
|
|
359
377
|
declare const index_Input: typeof Input;
|
|
360
378
|
type index_InputProps = InputProps;
|
|
361
379
|
declare const index_NestedFieldProvider: typeof NestedFieldProvider;
|
|
@@ -372,13 +390,14 @@ declare const index_TemplateFieldProvider: typeof TemplateFieldProvider;
|
|
|
372
390
|
type index_TemplateFieldProviderProps = TemplateFieldProviderProps;
|
|
373
391
|
type index_TemplateFieldValidationError = TemplateFieldValidationError;
|
|
374
392
|
declare const index_getOperatorsForType: typeof getOperatorsForType;
|
|
393
|
+
declare const index_intersectTypes: typeof intersectTypes;
|
|
375
394
|
declare const index_parseInferSyntax: typeof parseInferSyntax;
|
|
376
395
|
declare const index_useFieldPath: typeof useFieldPath;
|
|
377
396
|
declare const index_useInferredTypes: typeof useInferredTypes;
|
|
378
397
|
declare const index_useIsInTemplateFieldProvider: typeof useIsInTemplateFieldProvider;
|
|
379
398
|
declare const index_useTemplateFieldContext: typeof useTemplateFieldContext;
|
|
380
399
|
declare namespace index {
|
|
381
|
-
export { type index_InferConfig as InferConfig, index_InferredTypesContext as InferredTypesContext, type index_InferredTypesContextValue as InferredTypesContextValue, index_Input as Input, type index_InputProps as InputProps, index_NestedFieldProvider as NestedFieldProvider, type index_NestedFieldProviderProps as NestedFieldProviderProps, index_OPERATORS_BY_TYPE as OPERATORS_BY_TYPE, index_Select as Select, type index_SelectOption as SelectOption, type index_SelectProps as SelectProps, type index_SelectRenderProps as SelectRenderProps, type index_TemplateFieldChangeEvent as TemplateFieldChangeEvent, type index_TemplateFieldContextValue as TemplateFieldContextValue, type index_TemplateFieldFocusContext as TemplateFieldFocusContext, index_TemplateFieldProvider as TemplateFieldProvider, type index_TemplateFieldProviderProps as TemplateFieldProviderProps, type index_TemplateFieldValidationError as TemplateFieldValidationError, index_getOperatorsForType as getOperatorsForType, index_parseInferSyntax as parseInferSyntax, index_useFieldPath as useFieldPath, index_useInferredTypes as useInferredTypes, index_useIsInTemplateFieldProvider as useIsInTemplateFieldProvider, index_useTemplateFieldContext as useTemplateFieldContext };
|
|
400
|
+
export { type index_InferConfig as InferConfig, index_InferredTypesContext as InferredTypesContext, type index_InferredTypesContextValue as InferredTypesContextValue, index_InferredTypesProvider as InferredTypesProvider, index_Input as Input, type index_InputProps as InputProps, index_NestedFieldProvider as NestedFieldProvider, type index_NestedFieldProviderProps as NestedFieldProviderProps, index_OPERATORS_BY_TYPE as OPERATORS_BY_TYPE, index_Select as Select, type index_SelectOption as SelectOption, type index_SelectProps as SelectProps, type index_SelectRenderProps as SelectRenderProps, type index_TemplateFieldChangeEvent as TemplateFieldChangeEvent, type index_TemplateFieldContextValue as TemplateFieldContextValue, type index_TemplateFieldFocusContext as TemplateFieldFocusContext, index_TemplateFieldProvider as TemplateFieldProvider, type index_TemplateFieldProviderProps as TemplateFieldProviderProps, type index_TemplateFieldValidationError as TemplateFieldValidationError, index_getOperatorsForType as getOperatorsForType, index_intersectTypes as intersectTypes, index_parseInferSyntax as parseInferSyntax, index_useFieldPath as useFieldPath, index_useInferredTypes as useInferredTypes, index_useIsInTemplateFieldProvider as useIsInTemplateFieldProvider, index_useTemplateFieldContext as useTemplateFieldContext };
|
|
382
401
|
}
|
|
383
402
|
|
|
384
|
-
export { type InferredTypesContextValue as I, NestedFieldProvider as N, OPERATORS_BY_TYPE as O, Select as S, type TemplateFieldContextValue as T, useIsInTemplateFieldProvider as a, useFieldPath as b, TemplateFieldProvider as c, type TemplateFieldProviderProps as d, type NestedFieldProviderProps as e, type TemplateFieldValidationError as f, type TemplateFieldFocusContext as g, type TemplateFieldChangeEvent as h, index as i, InferredTypesContext as j, useInferredTypes as k,
|
|
403
|
+
export { type InferredTypesContextValue as I, NestedFieldProvider as N, OPERATORS_BY_TYPE as O, Select as S, type TemplateFieldContextValue as T, useIsInTemplateFieldProvider as a, useFieldPath as b, TemplateFieldProvider as c, type TemplateFieldProviderProps as d, type NestedFieldProviderProps as e, type TemplateFieldValidationError as f, type TemplateFieldFocusContext as g, type TemplateFieldChangeEvent as h, index as i, InferredTypesContext as j, useInferredTypes as k, InferredTypesProvider as l, intersectTypes as m, type InferConfig as n, getOperatorsForType as o, parseInferSyntax as p, Input as q, type InputProps as r, type SelectProps as s, type SelectOption as t, useTemplateFieldContext as u, type SelectRenderProps as v };
|
|
@@ -57,6 +57,7 @@ interface InputProps {
|
|
|
57
57
|
declare function Input({ fieldName, label, value, onChange, disabled, placeholder, expectedType, required, hasRequiredError, className, editorClassName, }: InputProps): React$1.JSX.Element;
|
|
58
58
|
|
|
59
59
|
interface SelectOption {
|
|
60
|
+
node?: React$1.ReactNode;
|
|
60
61
|
value: string;
|
|
61
62
|
label: string;
|
|
62
63
|
}
|
|
@@ -301,6 +302,22 @@ declare const InferredTypesContext: React$1.Context<InferredTypesContextValue |
|
|
|
301
302
|
* ```
|
|
302
303
|
*/
|
|
303
304
|
declare function useInferredTypes(): InferredTypesContextValue | null;
|
|
305
|
+
/**
|
|
306
|
+
* Mock provider for inferred types context.
|
|
307
|
+
* In development mode, this is a no-op - just renders children.
|
|
308
|
+
* In production, the real implementation from @repo/ui provides actual type propagation.
|
|
309
|
+
*/
|
|
310
|
+
declare function InferredTypesProvider({ children }: {
|
|
311
|
+
children: React.ReactNode;
|
|
312
|
+
}): React$1.JSX.Element;
|
|
313
|
+
/**
|
|
314
|
+
* Compute the intersection of multiple types.
|
|
315
|
+
* Used when subscribing to multiple fields to narrow the expected type.
|
|
316
|
+
*
|
|
317
|
+
* @example
|
|
318
|
+
* intersectTypes(['string | number', 'number']) → 'number'
|
|
319
|
+
*/
|
|
320
|
+
declare function intersectTypes(types: (string | undefined)[]): string;
|
|
304
321
|
/**
|
|
305
322
|
* Configuration parsed from the $infer<...> syntax.
|
|
306
323
|
*/
|
|
@@ -356,6 +373,7 @@ declare function getOperatorsForType(type: string): Array<{
|
|
|
356
373
|
type index_InferConfig = InferConfig;
|
|
357
374
|
declare const index_InferredTypesContext: typeof InferredTypesContext;
|
|
358
375
|
type index_InferredTypesContextValue = InferredTypesContextValue;
|
|
376
|
+
declare const index_InferredTypesProvider: typeof InferredTypesProvider;
|
|
359
377
|
declare const index_Input: typeof Input;
|
|
360
378
|
type index_InputProps = InputProps;
|
|
361
379
|
declare const index_NestedFieldProvider: typeof NestedFieldProvider;
|
|
@@ -372,13 +390,14 @@ declare const index_TemplateFieldProvider: typeof TemplateFieldProvider;
|
|
|
372
390
|
type index_TemplateFieldProviderProps = TemplateFieldProviderProps;
|
|
373
391
|
type index_TemplateFieldValidationError = TemplateFieldValidationError;
|
|
374
392
|
declare const index_getOperatorsForType: typeof getOperatorsForType;
|
|
393
|
+
declare const index_intersectTypes: typeof intersectTypes;
|
|
375
394
|
declare const index_parseInferSyntax: typeof parseInferSyntax;
|
|
376
395
|
declare const index_useFieldPath: typeof useFieldPath;
|
|
377
396
|
declare const index_useInferredTypes: typeof useInferredTypes;
|
|
378
397
|
declare const index_useIsInTemplateFieldProvider: typeof useIsInTemplateFieldProvider;
|
|
379
398
|
declare const index_useTemplateFieldContext: typeof useTemplateFieldContext;
|
|
380
399
|
declare namespace index {
|
|
381
|
-
export { type index_InferConfig as InferConfig, index_InferredTypesContext as InferredTypesContext, type index_InferredTypesContextValue as InferredTypesContextValue, index_Input as Input, type index_InputProps as InputProps, index_NestedFieldProvider as NestedFieldProvider, type index_NestedFieldProviderProps as NestedFieldProviderProps, index_OPERATORS_BY_TYPE as OPERATORS_BY_TYPE, index_Select as Select, type index_SelectOption as SelectOption, type index_SelectProps as SelectProps, type index_SelectRenderProps as SelectRenderProps, type index_TemplateFieldChangeEvent as TemplateFieldChangeEvent, type index_TemplateFieldContextValue as TemplateFieldContextValue, type index_TemplateFieldFocusContext as TemplateFieldFocusContext, index_TemplateFieldProvider as TemplateFieldProvider, type index_TemplateFieldProviderProps as TemplateFieldProviderProps, type index_TemplateFieldValidationError as TemplateFieldValidationError, index_getOperatorsForType as getOperatorsForType, index_parseInferSyntax as parseInferSyntax, index_useFieldPath as useFieldPath, index_useInferredTypes as useInferredTypes, index_useIsInTemplateFieldProvider as useIsInTemplateFieldProvider, index_useTemplateFieldContext as useTemplateFieldContext };
|
|
400
|
+
export { type index_InferConfig as InferConfig, index_InferredTypesContext as InferredTypesContext, type index_InferredTypesContextValue as InferredTypesContextValue, index_InferredTypesProvider as InferredTypesProvider, index_Input as Input, type index_InputProps as InputProps, index_NestedFieldProvider as NestedFieldProvider, type index_NestedFieldProviderProps as NestedFieldProviderProps, index_OPERATORS_BY_TYPE as OPERATORS_BY_TYPE, index_Select as Select, type index_SelectOption as SelectOption, type index_SelectProps as SelectProps, type index_SelectRenderProps as SelectRenderProps, type index_TemplateFieldChangeEvent as TemplateFieldChangeEvent, type index_TemplateFieldContextValue as TemplateFieldContextValue, type index_TemplateFieldFocusContext as TemplateFieldFocusContext, index_TemplateFieldProvider as TemplateFieldProvider, type index_TemplateFieldProviderProps as TemplateFieldProviderProps, type index_TemplateFieldValidationError as TemplateFieldValidationError, index_getOperatorsForType as getOperatorsForType, index_intersectTypes as intersectTypes, index_parseInferSyntax as parseInferSyntax, index_useFieldPath as useFieldPath, index_useInferredTypes as useInferredTypes, index_useIsInTemplateFieldProvider as useIsInTemplateFieldProvider, index_useTemplateFieldContext as useTemplateFieldContext };
|
|
382
401
|
}
|
|
383
402
|
|
|
384
|
-
export { type InferredTypesContextValue as I, NestedFieldProvider as N, OPERATORS_BY_TYPE as O, Select as S, type TemplateFieldContextValue as T, useIsInTemplateFieldProvider as a, useFieldPath as b, TemplateFieldProvider as c, type TemplateFieldProviderProps as d, type NestedFieldProviderProps as e, type TemplateFieldValidationError as f, type TemplateFieldFocusContext as g, type TemplateFieldChangeEvent as h, index as i, InferredTypesContext as j, useInferredTypes as k,
|
|
403
|
+
export { type InferredTypesContextValue as I, NestedFieldProvider as N, OPERATORS_BY_TYPE as O, Select as S, type TemplateFieldContextValue as T, useIsInTemplateFieldProvider as a, useFieldPath as b, TemplateFieldProvider as c, type TemplateFieldProviderProps as d, type NestedFieldProviderProps as e, type TemplateFieldValidationError as f, type TemplateFieldFocusContext as g, type TemplateFieldChangeEvent as h, index as i, InferredTypesContext as j, useInferredTypes as k, InferredTypesProvider as l, intersectTypes as m, type InferConfig as n, getOperatorsForType as o, parseInferSyntax as p, Input as q, type InputProps as r, type SelectProps as s, type SelectOption as t, useTemplateFieldContext as u, type SelectRenderProps as v };
|
package/dist/index.cjs
CHANGED
|
@@ -23,6 +23,20 @@ function _define_property(obj, key, value) {
|
|
|
23
23
|
}
|
|
24
24
|
return obj;
|
|
25
25
|
}
|
|
26
|
+
function _extends() {
|
|
27
|
+
_extends = Object.assign || function(target) {
|
|
28
|
+
for(var i = 1; i < arguments.length; i++){
|
|
29
|
+
var source = arguments[i];
|
|
30
|
+
for(var key in source){
|
|
31
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
32
|
+
target[key] = source[key];
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return target;
|
|
37
|
+
};
|
|
38
|
+
return _extends.apply(this, arguments);
|
|
39
|
+
}
|
|
26
40
|
function _iterable_to_array(iter) {
|
|
27
41
|
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
28
42
|
}
|
|
@@ -56,6 +70,10 @@ function _non_iterable_rest() {
|
|
|
56
70
|
function _non_iterable_spread() {
|
|
57
71
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
58
72
|
}
|
|
73
|
+
function _object_destructuring_empty(o) {
|
|
74
|
+
if (o === null || o === void 0) throw new TypeError("Cannot destructure " + o);
|
|
75
|
+
return o;
|
|
76
|
+
}
|
|
59
77
|
function _object_spread(target) {
|
|
60
78
|
for(var i = 1; i < arguments.length; i++){
|
|
61
79
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
@@ -71,6 +89,30 @@ function _object_spread(target) {
|
|
|
71
89
|
}
|
|
72
90
|
return target;
|
|
73
91
|
}
|
|
92
|
+
function ownKeys(object, enumerableOnly) {
|
|
93
|
+
var keys = Object.keys(object);
|
|
94
|
+
if (Object.getOwnPropertySymbols) {
|
|
95
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
96
|
+
if (enumerableOnly) {
|
|
97
|
+
symbols = symbols.filter(function(sym) {
|
|
98
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
keys.push.apply(keys, symbols);
|
|
102
|
+
}
|
|
103
|
+
return keys;
|
|
104
|
+
}
|
|
105
|
+
function _object_spread_props(target, source) {
|
|
106
|
+
source = source != null ? source : {};
|
|
107
|
+
if (Object.getOwnPropertyDescriptors) {
|
|
108
|
+
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
109
|
+
} else {
|
|
110
|
+
ownKeys(Object(source)).forEach(function(key) {
|
|
111
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
return target;
|
|
115
|
+
}
|
|
74
116
|
function _object_without_properties(source, excluded) {
|
|
75
117
|
if (source == null) return {};
|
|
76
118
|
var target = _object_without_properties_loose(source, excluded);
|
|
@@ -116,8 +158,10 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
116
158
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
117
159
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
118
160
|
}
|
|
119
|
-
var
|
|
161
|
+
var React3 = require('react');
|
|
120
162
|
var reactSlot = require('@radix-ui/react-slot');
|
|
163
|
+
var DropdownMenuPrimitive = require('@radix-ui/react-dropdown-menu');
|
|
164
|
+
var lucideReact = require('lucide-react');
|
|
121
165
|
function _interopNamespace(e) {
|
|
122
166
|
if (e && e.__esModule) return e;
|
|
123
167
|
var n = Object.create(null);
|
|
@@ -137,7 +181,8 @@ function _interopNamespace(e) {
|
|
|
137
181
|
n.default = e;
|
|
138
182
|
return Object.freeze(n);
|
|
139
183
|
}
|
|
140
|
-
var
|
|
184
|
+
var React3__namespace = /*#__PURE__*/ _interopNamespace(React3);
|
|
185
|
+
var DropdownMenuPrimitive__namespace = /*#__PURE__*/ _interopNamespace(DropdownMenuPrimitive);
|
|
141
186
|
var __defProp = Object.defineProperty;
|
|
142
187
|
var __export = function(target, all) {
|
|
143
188
|
for(var name in all)__defProp(target, name, {
|
|
@@ -4863,7 +4908,7 @@ function Button(_param) {
|
|
|
4863
4908
|
"asChild"
|
|
4864
4909
|
]);
|
|
4865
4910
|
var Comp = asChild ? reactSlot.Slot : "button";
|
|
4866
|
-
return /* @__PURE__ */
|
|
4911
|
+
return /* @__PURE__ */ React3__namespace.createElement(Comp, _object_spread({
|
|
4867
4912
|
"data-slot": "button",
|
|
4868
4913
|
className: cn(buttonVariants({
|
|
4869
4914
|
variant: variant,
|
|
@@ -4872,12 +4917,193 @@ function Button(_param) {
|
|
|
4872
4917
|
}))
|
|
4873
4918
|
}, props));
|
|
4874
4919
|
}
|
|
4920
|
+
function DropdownMenu(_param) {
|
|
4921
|
+
var props = _extends({}, _object_destructuring_empty(_param));
|
|
4922
|
+
return /* @__PURE__ */ React3__namespace.createElement(DropdownMenuPrimitive__namespace.Root, _object_spread({
|
|
4923
|
+
"data-slot": "dropdown-menu"
|
|
4924
|
+
}, props));
|
|
4925
|
+
}
|
|
4926
|
+
function DropdownMenuPortal(_param) {
|
|
4927
|
+
var props = _extends({}, _object_destructuring_empty(_param));
|
|
4928
|
+
return /* @__PURE__ */ React3__namespace.createElement(DropdownMenuPrimitive__namespace.Portal, _object_spread({
|
|
4929
|
+
"data-slot": "dropdown-menu-portal"
|
|
4930
|
+
}, props));
|
|
4931
|
+
}
|
|
4932
|
+
function DropdownMenuTrigger(_param) {
|
|
4933
|
+
var props = _extends({}, _object_destructuring_empty(_param));
|
|
4934
|
+
return /* @__PURE__ */ React3__namespace.createElement(DropdownMenuPrimitive__namespace.Trigger, _object_spread({
|
|
4935
|
+
"data-slot": "dropdown-menu-trigger"
|
|
4936
|
+
}, props));
|
|
4937
|
+
}
|
|
4938
|
+
function DropdownMenuContent(_param) {
|
|
4939
|
+
var className = _param.className, _param_sideOffset = _param.sideOffset, sideOffset = _param_sideOffset === void 0 ? 4 : _param_sideOffset, props = _object_without_properties(_param, [
|
|
4940
|
+
"className",
|
|
4941
|
+
"sideOffset"
|
|
4942
|
+
]);
|
|
4943
|
+
return /* @__PURE__ */ React3__namespace.createElement(DropdownMenuPrimitive__namespace.Portal, null, /* @__PURE__ */ React3__namespace.createElement(DropdownMenuPrimitive__namespace.Content, _object_spread({
|
|
4944
|
+
"data-slot": "dropdown-menu-content",
|
|
4945
|
+
sideOffset: sideOffset,
|
|
4946
|
+
className: cn("uii:bg-popover uii:text-popover-foreground uii:data-[state=open]:animate-in uii:data-[state=closed]:animate-out uii:data-[state=closed]:fade-out-0 uii:data-[state=open]:fade-in-0 uii:data-[state=closed]:zoom-out-95 uii:data-[state=open]:zoom-in-95 uii:data-[side=bottom]:slide-in-from-top-2 uii:data-[side=left]:slide-in-from-right-2 uii:data-[side=right]:slide-in-from-left-2 uii:data-[side=top]:slide-in-from-bottom-2 uii:z-50 uii:min-w-[8rem] uii:overflow-hidden uii:rounded-md uii:border uii:p-1 uii:shadow-md", className)
|
|
4947
|
+
}, props)));
|
|
4948
|
+
}
|
|
4949
|
+
function DropdownMenuClose(_param) {
|
|
4950
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
4951
|
+
"className"
|
|
4952
|
+
]);
|
|
4953
|
+
return /* @__PURE__ */ React3__namespace.createElement(DropdownMenuPrimitive__namespace.Item, _object_spread({
|
|
4954
|
+
"data-slot": "dropdown-menu-close",
|
|
4955
|
+
className: "hidden"
|
|
4956
|
+
}, props));
|
|
4957
|
+
}
|
|
4958
|
+
function DropdownMenuGroup(_param) {
|
|
4959
|
+
var props = _extends({}, _object_destructuring_empty(_param));
|
|
4960
|
+
return /* @__PURE__ */ React3__namespace.createElement(DropdownMenuPrimitive__namespace.Group, _object_spread({
|
|
4961
|
+
"data-slot": "dropdown-menu-group"
|
|
4962
|
+
}, props));
|
|
4963
|
+
}
|
|
4964
|
+
function ConfirmationDropdownMenuItem(_param) {
|
|
4965
|
+
var props = _extends({}, _object_destructuring_empty(_param));
|
|
4966
|
+
var originalOnClick = props.onClick, rest = _object_without_properties(props, [
|
|
4967
|
+
"onClick"
|
|
4968
|
+
]);
|
|
4969
|
+
var _React3__namespace_useState = _sliced_to_array(React3__namespace.useState(false), 2), isConfirming = _React3__namespace_useState[0], setIsConfirming = _React3__namespace_useState[1];
|
|
4970
|
+
return !isConfirming ? /* @__PURE__ */ React3__namespace.createElement(DropdownMenuItem, _object_spread_props(_object_spread({}, rest), {
|
|
4971
|
+
onClick: function(e) {
|
|
4972
|
+
setIsConfirming(true);
|
|
4973
|
+
e.preventDefault();
|
|
4974
|
+
e.stopPropagation();
|
|
4975
|
+
}
|
|
4976
|
+
})) : /* @__PURE__ */ React3__namespace.createElement(DropdownMenuItem, _object_spread_props(_object_spread({}, rest), {
|
|
4977
|
+
onClick: function(e) {
|
|
4978
|
+
if (originalOnClick) {
|
|
4979
|
+
setIsConfirming(false);
|
|
4980
|
+
originalOnClick(e);
|
|
4981
|
+
e.preventDefault();
|
|
4982
|
+
e.stopPropagation();
|
|
4983
|
+
}
|
|
4984
|
+
}
|
|
4985
|
+
}), /* @__PURE__ */ React3__namespace.createElement("div", {
|
|
4986
|
+
className: "flex flex-row gap-2 items-center"
|
|
4987
|
+
}, /* @__PURE__ */ React3__namespace.createElement("div", {
|
|
4988
|
+
className: "text-destructive"
|
|
4989
|
+
}, "Are you sure ?")));
|
|
4990
|
+
}
|
|
4991
|
+
function DropdownMenuItem(_param) {
|
|
4992
|
+
var className = _param.className, inset = _param.inset, _param_variant = _param.variant, variant = _param_variant === void 0 ? "default" : _param_variant, props = _object_without_properties(_param, [
|
|
4993
|
+
"className",
|
|
4994
|
+
"inset",
|
|
4995
|
+
"variant"
|
|
4996
|
+
]);
|
|
4997
|
+
return /* @__PURE__ */ React3__namespace.createElement(DropdownMenuPrimitive__namespace.Item, _object_spread({
|
|
4998
|
+
"data-slot": "dropdown-menu-item",
|
|
4999
|
+
"data-inset": inset,
|
|
5000
|
+
"data-variant": variant,
|
|
5001
|
+
className: cn("uii:cursor-pointer uii:focus:bg-accent uii:focus:text-accent-foreground uii:data-[variant=destructive]:text-destructive-foreground uii:data-[variant=destructive]:focus:bg-destructive/10 uii:dark:data-[variant=destructive]:focus:bg-destructive/40 uii:data-[variant=destructive]:focus:text-destructive-foreground uii:data-[variant=destructive]:*:[svg]:!text-destructive-foreground uii:[&_svg:not([class*=text-])]:text-muted-foreground uii:relative uii:flex uii:cursor-default uii:items-center uii:gap-2 uii:rounded-sm uii:px-2 uii:py-1.5 uii:text-sm uii:outline-hidden uii:select-none uii:data-[disabled]:pointer-events-none uii:data-[disabled]:opacity-50 uii:data-[inset]:pl-8 uii:[&_svg]:pointer-events-none uii:[&_svg]:shrink-0 uii:[&_svg:not([class*=size-])]:size-4", className)
|
|
5002
|
+
}, props));
|
|
5003
|
+
}
|
|
5004
|
+
function DropdownMenuCheckboxItem(_param) {
|
|
5005
|
+
var className = _param.className, children = _param.children, checked = _param.checked, props = _object_without_properties(_param, [
|
|
5006
|
+
"className",
|
|
5007
|
+
"children",
|
|
5008
|
+
"checked"
|
|
5009
|
+
]);
|
|
5010
|
+
return /* @__PURE__ */ React3__namespace.createElement(DropdownMenuPrimitive__namespace.CheckboxItem, _object_spread({
|
|
5011
|
+
"data-slot": "dropdown-menu-checkbox-item",
|
|
5012
|
+
className: cn("uii:focus:bg-accent uii:focus:text-accent-foreground uii:relative uii:flex uii:cursor-default uii:items-center uii:gap-2 uii:rounded-sm uii:py-1.5 uii:pr-2 uii:pl-8 uii:text-sm uii:outline-hidden uii:select-none uii:data-[disabled]:pointer-events-none uii:data-[disabled]:opacity-50 uii:[&_svg]:pointer-events-none uii:[&_svg]:shrink-0 uii:[&_svg:not([class*=size-])]:size-4", className),
|
|
5013
|
+
checked: checked
|
|
5014
|
+
}, props), /* @__PURE__ */ React3__namespace.createElement("span", {
|
|
5015
|
+
className: "uii:pointer-events-none uii:absolute uii:left-2 uii:flex uii:size-3.5 uii:items-center uii:justify-center"
|
|
5016
|
+
}, /* @__PURE__ */ React3__namespace.createElement(DropdownMenuPrimitive__namespace.ItemIndicator, null, /* @__PURE__ */ React3__namespace.createElement(lucideReact.CheckIcon, {
|
|
5017
|
+
className: "uii:size-4"
|
|
5018
|
+
}))), children);
|
|
5019
|
+
}
|
|
5020
|
+
function DropdownMenuRadioGroup(_param) {
|
|
5021
|
+
var props = _extends({}, _object_destructuring_empty(_param));
|
|
5022
|
+
return /* @__PURE__ */ React3__namespace.createElement(DropdownMenuPrimitive__namespace.RadioGroup, _object_spread({
|
|
5023
|
+
"data-slot": "dropdown-menu-radio-group"
|
|
5024
|
+
}, props));
|
|
5025
|
+
}
|
|
5026
|
+
function DropdownMenuRadioItem(_param) {
|
|
5027
|
+
var className = _param.className, children = _param.children, props = _object_without_properties(_param, [
|
|
5028
|
+
"className",
|
|
5029
|
+
"children"
|
|
5030
|
+
]);
|
|
5031
|
+
return /* @__PURE__ */ React3__namespace.createElement(DropdownMenuPrimitive__namespace.RadioItem, _object_spread({
|
|
5032
|
+
"data-slot": "dropdown-menu-radio-item",
|
|
5033
|
+
className: cn("uii:focus:bg-accent uii:focus:text-accent-foreground uii:relative uii:flex uii:cursor-default uii:items-center uii:gap-2 uii:rounded-sm uii:py-1.5 uii:pr-2 uii:pl-8 uii:text-sm uii:outline-hidden uii:select-none uii:data-[disabled]:pointer-events-none uii:data-[disabled]:opacity-50 uii:[&_svg]:pointer-events-none uii:[&_svg]:shrink-0 uii:[&_svg:not([class*=size-])]:size-4", className)
|
|
5034
|
+
}, props), /* @__PURE__ */ React3__namespace.createElement("span", {
|
|
5035
|
+
className: "uii:pointer-events-none uii:absolute uii:left-2 uii:flex uii:size-3.5 uii:items-center uii:justify-center"
|
|
5036
|
+
}, /* @__PURE__ */ React3__namespace.createElement(DropdownMenuPrimitive__namespace.ItemIndicator, null, /* @__PURE__ */ React3__namespace.createElement(lucideReact.CircleIcon, {
|
|
5037
|
+
className: "uii:size-2 uii:fill-current"
|
|
5038
|
+
}))), children);
|
|
5039
|
+
}
|
|
5040
|
+
function DropdownMenuLabel(_param) {
|
|
5041
|
+
var className = _param.className, inset = _param.inset, props = _object_without_properties(_param, [
|
|
5042
|
+
"className",
|
|
5043
|
+
"inset"
|
|
5044
|
+
]);
|
|
5045
|
+
return /* @__PURE__ */ React3__namespace.createElement(DropdownMenuPrimitive__namespace.Label, _object_spread({
|
|
5046
|
+
"data-slot": "dropdown-menu-label",
|
|
5047
|
+
"data-inset": inset,
|
|
5048
|
+
className: cn("uii:px-2 uii:py-1.5 uii:text-sm uii:font-medium uii:data-[inset]:pl-8", className)
|
|
5049
|
+
}, props));
|
|
5050
|
+
}
|
|
5051
|
+
function DropdownMenuSeparator(_param) {
|
|
5052
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
5053
|
+
"className"
|
|
5054
|
+
]);
|
|
5055
|
+
return /* @__PURE__ */ React3__namespace.createElement(DropdownMenuPrimitive__namespace.Separator, _object_spread({
|
|
5056
|
+
"data-slot": "dropdown-menu-separator",
|
|
5057
|
+
className: cn("uii:bg-border uii:-mx-1 uii:my-1 uii:h-px", className)
|
|
5058
|
+
}, props));
|
|
5059
|
+
}
|
|
5060
|
+
function DropdownMenuShortcut(_param) {
|
|
5061
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
5062
|
+
"className"
|
|
5063
|
+
]);
|
|
5064
|
+
return /* @__PURE__ */ React3__namespace.createElement("span", _object_spread({
|
|
5065
|
+
"data-slot": "dropdown-menu-shortcut",
|
|
5066
|
+
className: cn("uii:text-muted-foreground uii:ml-auto uii:text-xs uii:tracking-widest", className)
|
|
5067
|
+
}, props));
|
|
5068
|
+
}
|
|
5069
|
+
function DropdownMenuSub(_param) {
|
|
5070
|
+
var props = _extends({}, _object_destructuring_empty(_param));
|
|
5071
|
+
return /* @__PURE__ */ React3__namespace.createElement(DropdownMenuPrimitive__namespace.Sub, _object_spread({
|
|
5072
|
+
"data-slot": "dropdown-menu-sub"
|
|
5073
|
+
}, props));
|
|
5074
|
+
}
|
|
5075
|
+
function DropdownMenuSubTrigger(_param) {
|
|
5076
|
+
var className = _param.className, inset = _param.inset, children = _param.children, props = _object_without_properties(_param, [
|
|
5077
|
+
"className",
|
|
5078
|
+
"inset",
|
|
5079
|
+
"children"
|
|
5080
|
+
]);
|
|
5081
|
+
return /* @__PURE__ */ React3__namespace.createElement(DropdownMenuPrimitive__namespace.SubTrigger, _object_spread({
|
|
5082
|
+
"data-slot": "dropdown-menu-sub-trigger",
|
|
5083
|
+
"data-inset": inset,
|
|
5084
|
+
className: cn("uii:focus:bg-accent uii:focus:text-accent-foreground uii:data-[state=open]:bg-accent uii:data-[state=open]:text-accent-foreground uii:flex uii:cursor-default uii:items-center uii:rounded-sm uii:px-2 uii:py-1.5 uii:text-sm uii:outline-hidden uii:select-none uii:data-[inset]:pl-8", className)
|
|
5085
|
+
}, props), children, /* @__PURE__ */ React3__namespace.createElement(lucideReact.ChevronRightIcon, {
|
|
5086
|
+
className: "uii:ml-auto uii:size-4"
|
|
5087
|
+
}));
|
|
5088
|
+
}
|
|
5089
|
+
function DropdownMenuSubContent(_param) {
|
|
5090
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
5091
|
+
"className"
|
|
5092
|
+
]);
|
|
5093
|
+
return /* @__PURE__ */ React3__namespace.createElement(DropdownMenuPrimitive__namespace.SubContent, _object_spread({
|
|
5094
|
+
"data-slot": "dropdown-menu-sub-content",
|
|
5095
|
+
className: cn("uii:bg-popover uii:text-popover-foreground uii:data-[state=open]:animate-in uii:data-[state=closed]:animate-out uii:data-[state=closed]:fade-out-0 uii:data-[state=open]:fade-in-0 uii:data-[state=closed]:zoom-out-95 uii:data-[state=open]:zoom-in-95 uii:data-[side=bottom]:slide-in-from-top-2 uii:data-[side=left]:slide-in-from-right-2 uii:data-[side=right]:slide-in-from-left-2 uii:data-[side=top]:slide-in-from-bottom-2 uii:z-50 uii:min-w-[8rem] uii:overflow-hidden uii:rounded-md uii:border uii:p-1 uii:shadow-lg", className)
|
|
5096
|
+
}, props));
|
|
5097
|
+
}
|
|
4875
5098
|
// src/components/fields/index.tsx
|
|
4876
5099
|
var fields_exports = {};
|
|
4877
5100
|
__export(fields_exports, {
|
|
4878
5101
|
InferredTypesContext: function() {
|
|
4879
5102
|
return InferredTypesContext;
|
|
4880
5103
|
},
|
|
5104
|
+
InferredTypesProvider: function() {
|
|
5105
|
+
return InferredTypesProvider;
|
|
5106
|
+
},
|
|
4881
5107
|
Input: function() {
|
|
4882
5108
|
return Input;
|
|
4883
5109
|
},
|
|
@@ -4896,6 +5122,9 @@ __export(fields_exports, {
|
|
|
4896
5122
|
getOperatorsForType: function() {
|
|
4897
5123
|
return getOperatorsForType;
|
|
4898
5124
|
},
|
|
5125
|
+
intersectTypes: function() {
|
|
5126
|
+
return intersectTypes;
|
|
5127
|
+
},
|
|
4899
5128
|
parseInferSyntax: function() {
|
|
4900
5129
|
return parseInferSyntax;
|
|
4901
5130
|
},
|
|
@@ -4914,7 +5143,7 @@ __export(fields_exports, {
|
|
|
4914
5143
|
});
|
|
4915
5144
|
function Input(param) {
|
|
4916
5145
|
var fieldName = param.fieldName, label = param.label, value = param.value, onChange = param.onChange, _param_disabled = param.disabled, disabled = _param_disabled === void 0 ? false : _param_disabled, placeholder = param.placeholder, _param_expectedType = param.expectedType, expectedType = _param_expectedType === void 0 ? "string" : _param_expectedType, _param_required = param.required, required = _param_required === void 0 ? false : _param_required, _param_hasRequiredError = param.hasRequiredError, hasRequiredError = _param_hasRequiredError === void 0 ? false : _param_hasRequiredError, className = param.className, editorClassName = param.editorClassName;
|
|
4917
|
-
var displayValue =
|
|
5146
|
+
var displayValue = React3__namespace.useMemo(function() {
|
|
4918
5147
|
if (value && (typeof value === "undefined" ? "undefined" : _type_of(value)) === "object" && "expression" in value) {
|
|
4919
5148
|
return value.expression || "";
|
|
4920
5149
|
}
|
|
@@ -4922,12 +5151,12 @@ function Input(param) {
|
|
|
4922
5151
|
}, [
|
|
4923
5152
|
value
|
|
4924
5153
|
]);
|
|
4925
|
-
var isExpression =
|
|
5154
|
+
var isExpression = React3__namespace.useMemo(function() {
|
|
4926
5155
|
return value && (typeof value === "undefined" ? "undefined" : _type_of(value)) === "object" && "expression" in value;
|
|
4927
5156
|
}, [
|
|
4928
5157
|
value
|
|
4929
5158
|
]);
|
|
4930
|
-
var handleChange =
|
|
5159
|
+
var handleChange = React3__namespace.useCallback(function(e) {
|
|
4931
5160
|
var newValue = e.target.value;
|
|
4932
5161
|
if (newValue.includes("{{")) {
|
|
4933
5162
|
onChange({
|
|
@@ -4941,20 +5170,20 @@ function Input(param) {
|
|
|
4941
5170
|
onChange
|
|
4942
5171
|
]);
|
|
4943
5172
|
var showError = hasRequiredError || required && !displayValue;
|
|
4944
|
-
return /* @__PURE__ */
|
|
5173
|
+
return /* @__PURE__ */ React3__namespace.createElement("div", {
|
|
4945
5174
|
className: cn("uii:mb-2", className)
|
|
4946
|
-
}, /* @__PURE__ */
|
|
5175
|
+
}, /* @__PURE__ */ React3__namespace.createElement("div", {
|
|
4947
5176
|
className: "uii:flex uii:items-center uii:gap-2 uii:mt-2"
|
|
4948
|
-
}, /* @__PURE__ */
|
|
5177
|
+
}, /* @__PURE__ */ React3__namespace.createElement("label", {
|
|
4949
5178
|
htmlFor: fieldName,
|
|
4950
5179
|
className: "uii:text-xs uii:font-bold uii:text-muted-foreground"
|
|
4951
|
-
}, label, ":"), expectedType !== "$.interface.timer" && /* @__PURE__ */
|
|
5180
|
+
}, label, ":"), expectedType !== "$.interface.timer" && /* @__PURE__ */ React3__namespace.createElement("span", {
|
|
4952
5181
|
className: "uii:-mt-2 uii:inline-flex uii:px-1 uii:py-0.5 uii:bg-gray-200 uii:rounded-sm uii:text-[10px] uii:font-mono uii:text-muted-foreground uii:font-light"
|
|
4953
|
-
}, expectedType), showError && /* @__PURE__ */
|
|
5182
|
+
}, expectedType), showError && /* @__PURE__ */ React3__namespace.createElement("span", {
|
|
4954
5183
|
className: "uii:-mt-2 uii:inline-flex uii:px-1 uii:py-0.5 uii:bg-red-100 uii:text-red-600 uii:rounded-sm uii:text-[10px] uii:font-medium"
|
|
4955
|
-
}, "Required")), /* @__PURE__ */
|
|
5184
|
+
}, "Required")), /* @__PURE__ */ React3__namespace.createElement("div", {
|
|
4956
5185
|
className: "uii:mt-0.5"
|
|
4957
|
-
}, /* @__PURE__ */
|
|
5186
|
+
}, /* @__PURE__ */ React3__namespace.createElement("input", {
|
|
4958
5187
|
id: fieldName,
|
|
4959
5188
|
name: fieldName,
|
|
4960
5189
|
type: "text",
|
|
@@ -4967,9 +5196,9 @@ function Input(param) {
|
|
|
4967
5196
|
}
|
|
4968
5197
|
function Select(param) {
|
|
4969
5198
|
var fieldName = param.fieldName, label = param.label, value = param.value, onChange = param.onChange, rawOptions = param.options, _param_disabled = param.disabled, disabled = _param_disabled === void 0 ? false : _param_disabled, placeholder = param.placeholder, _param_expectedType = param.expectedType, expectedType = _param_expectedType === void 0 ? "string" : _param_expectedType, _param_required = param.required, required = _param_required === void 0 ? false : _param_required, _param_hasRequiredError = param.hasRequiredError, hasRequiredError = _param_hasRequiredError === void 0 ? false : _param_hasRequiredError, className = param.className, children = param.children;
|
|
4970
|
-
var
|
|
4971
|
-
var
|
|
4972
|
-
var options =
|
|
5199
|
+
var _React3__namespace_useState = _sliced_to_array(React3__namespace.useState(false), 2), isExpressionMode = _React3__namespace_useState[0], setIsExpressionMode = _React3__namespace_useState[1];
|
|
5200
|
+
var _React3__namespace_useState1 = _sliced_to_array(React3__namespace.useState(""), 2), expressionValue = _React3__namespace_useState1[0], setExpressionValue = _React3__namespace_useState1[1];
|
|
5201
|
+
var options = React3__namespace.useMemo(function() {
|
|
4973
5202
|
return rawOptions.map(function(opt) {
|
|
4974
5203
|
return typeof opt === "string" ? {
|
|
4975
5204
|
value: opt,
|
|
@@ -4979,7 +5208,7 @@ function Select(param) {
|
|
|
4979
5208
|
}, [
|
|
4980
5209
|
rawOptions
|
|
4981
5210
|
]);
|
|
4982
|
-
var displayValue =
|
|
5211
|
+
var displayValue = React3__namespace.useMemo(function() {
|
|
4983
5212
|
if (value && (typeof value === "undefined" ? "undefined" : _type_of(value)) === "object" && "expression" in value) {
|
|
4984
5213
|
return value.expression || "";
|
|
4985
5214
|
}
|
|
@@ -4987,12 +5216,12 @@ function Select(param) {
|
|
|
4987
5216
|
}, [
|
|
4988
5217
|
value
|
|
4989
5218
|
]);
|
|
4990
|
-
var isExpression =
|
|
5219
|
+
var isExpression = React3__namespace.useMemo(function() {
|
|
4991
5220
|
return value && (typeof value === "undefined" ? "undefined" : _type_of(value)) === "object" && "expression" in value;
|
|
4992
5221
|
}, [
|
|
4993
5222
|
value
|
|
4994
5223
|
]);
|
|
4995
|
-
|
|
5224
|
+
React3__namespace.useEffect(function() {
|
|
4996
5225
|
if (isExpression) {
|
|
4997
5226
|
setIsExpressionMode(true);
|
|
4998
5227
|
setExpressionValue(displayValue);
|
|
@@ -5001,7 +5230,7 @@ function Select(param) {
|
|
|
5001
5230
|
isExpression,
|
|
5002
5231
|
displayValue
|
|
5003
5232
|
]);
|
|
5004
|
-
var handleSelectChange =
|
|
5233
|
+
var handleSelectChange = React3__namespace.useCallback(function(newValue) {
|
|
5005
5234
|
if (newValue === "__expression__") {
|
|
5006
5235
|
setIsExpressionMode(true);
|
|
5007
5236
|
return;
|
|
@@ -5010,7 +5239,7 @@ function Select(param) {
|
|
|
5010
5239
|
}, [
|
|
5011
5240
|
onChange
|
|
5012
5241
|
]);
|
|
5013
|
-
var handleExpressionChange =
|
|
5242
|
+
var handleExpressionChange = React3__namespace.useCallback(function(e) {
|
|
5014
5243
|
var newValue = e.target.value;
|
|
5015
5244
|
setExpressionValue(newValue);
|
|
5016
5245
|
onChange({
|
|
@@ -5020,7 +5249,7 @@ function Select(param) {
|
|
|
5020
5249
|
}, [
|
|
5021
5250
|
onChange
|
|
5022
5251
|
]);
|
|
5023
|
-
var handleSwitchToValue =
|
|
5252
|
+
var handleSwitchToValue = React3__namespace.useCallback(function() {
|
|
5024
5253
|
setIsExpressionMode(false);
|
|
5025
5254
|
setExpressionValue("");
|
|
5026
5255
|
onChange("");
|
|
@@ -5055,24 +5284,24 @@ function Select(param) {
|
|
|
5055
5284
|
},
|
|
5056
5285
|
hasError: showError
|
|
5057
5286
|
};
|
|
5058
|
-
return /* @__PURE__ */
|
|
5287
|
+
return /* @__PURE__ */ React3__namespace.createElement("div", {
|
|
5059
5288
|
className: cn("uii:mb-2", className)
|
|
5060
|
-
}, /* @__PURE__ */
|
|
5289
|
+
}, /* @__PURE__ */ React3__namespace.createElement("div", {
|
|
5061
5290
|
className: "uii:flex uii:items-center uii:gap-2 uii:mt-2"
|
|
5062
|
-
}, /* @__PURE__ */
|
|
5291
|
+
}, /* @__PURE__ */ React3__namespace.createElement("label", {
|
|
5063
5292
|
htmlFor: fieldName,
|
|
5064
5293
|
className: "uii:text-xs uii:font-bold uii:text-muted-foreground"
|
|
5065
|
-
}, label, ":"), expectedType !== "$.interface.timer" && /* @__PURE__ */
|
|
5294
|
+
}, label, ":"), expectedType !== "$.interface.timer" && /* @__PURE__ */ React3__namespace.createElement("span", {
|
|
5066
5295
|
className: "uii:-mt-2 uii:inline-flex uii:px-1 uii:py-0.5 uii:bg-gray-200 uii:rounded-sm uii:text-[10px] uii:font-mono uii:text-muted-foreground uii:font-light"
|
|
5067
|
-
}, expectedType), showError && /* @__PURE__ */
|
|
5296
|
+
}, expectedType), showError && /* @__PURE__ */ React3__namespace.createElement("span", {
|
|
5068
5297
|
className: "uii:-mt-2 uii:inline-flex uii:px-1 uii:py-0.5 uii:bg-red-100 uii:text-red-600 uii:rounded-sm uii:text-[10px] uii:font-medium"
|
|
5069
|
-
}, "Required")), /* @__PURE__ */
|
|
5298
|
+
}, "Required")), /* @__PURE__ */ React3__namespace.createElement("div", {
|
|
5070
5299
|
className: "uii:mt-0.5"
|
|
5071
5300
|
}, children ? // Use custom render function
|
|
5072
5301
|
children(renderProps) : isExpressionMode ? // Expression mode - show input with clear button
|
|
5073
|
-
/* @__PURE__ */
|
|
5302
|
+
/* @__PURE__ */ React3__namespace.createElement("div", {
|
|
5074
5303
|
className: "uii:flex uii:items-center uii:h-9 uii:rounded-sm uii:border uii:border-amber-500/50 uii:bg-amber-500/5"
|
|
5075
|
-
}, /* @__PURE__ */
|
|
5304
|
+
}, /* @__PURE__ */ React3__namespace.createElement("input", {
|
|
5076
5305
|
id: fieldName,
|
|
5077
5306
|
name: fieldName,
|
|
5078
5307
|
type: "text",
|
|
@@ -5081,13 +5310,13 @@ function Select(param) {
|
|
|
5081
5310
|
disabled: disabled,
|
|
5082
5311
|
placeholder: "Enter expression...",
|
|
5083
5312
|
className: cn("uii:flex-1 uii:h-full uii:px-3 uii:bg-transparent uii:text-sm uii:font-mono uii:text-amber-600", "uii:outline-none uii:border-none", disabled && "uii:opacity-50 uii:cursor-not-allowed")
|
|
5084
|
-
}), /* @__PURE__ */
|
|
5313
|
+
}), /* @__PURE__ */ React3__namespace.createElement("button", {
|
|
5085
5314
|
type: "button",
|
|
5086
5315
|
onClick: handleSwitchToValue,
|
|
5087
5316
|
className: "uii:flex uii:items-center uii:justify-center uii:h-full uii:px-2 uii:text-amber-600 hover:uii:text-red-600 uii:border-l uii:border-amber-500/30",
|
|
5088
5317
|
title: "Clear and return to value mode"
|
|
5089
5318
|
}, "\xD7")) : // Value mode - show select
|
|
5090
|
-
/* @__PURE__ */
|
|
5319
|
+
/* @__PURE__ */ React3__namespace.createElement("select", {
|
|
5091
5320
|
id: fieldName,
|
|
5092
5321
|
name: fieldName,
|
|
5093
5322
|
value: displayValue,
|
|
@@ -5096,15 +5325,15 @@ function Select(param) {
|
|
|
5096
5325
|
},
|
|
5097
5326
|
disabled: disabled,
|
|
5098
5327
|
className: cn("uii:w-full uii:h-9 uii:px-3 uii:rounded-sm uii:border uii:bg-background uii:text-sm", "uii:outline-none uii:transition-all uii:cursor-pointer", "focus:uii:border-ring focus:uii:ring-ring/50 focus:uii:ring-[3px]", showError ? "uii:border-red-500 hover:uii:border-red-600" : "uii:border-input hover:uii:border-ring/50", disabled && "uii:opacity-50 uii:cursor-not-allowed")
|
|
5099
|
-
}, placeholder && /* @__PURE__ */
|
|
5328
|
+
}, placeholder && /* @__PURE__ */ React3__namespace.createElement("option", {
|
|
5100
5329
|
value: "",
|
|
5101
5330
|
disabled: true
|
|
5102
5331
|
}, placeholder), options.map(function(opt) {
|
|
5103
|
-
return /* @__PURE__ */
|
|
5332
|
+
return /* @__PURE__ */ React3__namespace.createElement("option", {
|
|
5104
5333
|
key: opt.value,
|
|
5105
5334
|
value: opt.value
|
|
5106
5335
|
}, opt.label);
|
|
5107
|
-
}), /* @__PURE__ */
|
|
5336
|
+
}), /* @__PURE__ */ React3__namespace.createElement("option", {
|
|
5108
5337
|
value: "__expression__"
|
|
5109
5338
|
}, "\uD83D\uDCDD Custom Expression"))));
|
|
5110
5339
|
}
|
|
@@ -5141,9 +5370,21 @@ function NestedFieldProvider(param) {
|
|
|
5141
5370
|
var children = param.children;
|
|
5142
5371
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, children);
|
|
5143
5372
|
}
|
|
5144
|
-
var InferredTypesContext =
|
|
5373
|
+
var InferredTypesContext = React3.createContext(null);
|
|
5145
5374
|
function useInferredTypes() {
|
|
5146
|
-
return
|
|
5375
|
+
return React3.useContext(InferredTypesContext);
|
|
5376
|
+
}
|
|
5377
|
+
function InferredTypesProvider(param) {
|
|
5378
|
+
var children = param.children;
|
|
5379
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, children);
|
|
5380
|
+
}
|
|
5381
|
+
function intersectTypes(types) {
|
|
5382
|
+
var validTypes = types.filter(function(t) {
|
|
5383
|
+
return !!t && t.length > 0;
|
|
5384
|
+
});
|
|
5385
|
+
if (validTypes.length === 0) return "any";
|
|
5386
|
+
if (validTypes.length === 1) return validTypes[0];
|
|
5387
|
+
return validTypes[0];
|
|
5147
5388
|
}
|
|
5148
5389
|
function parseInferSyntax(expectedType) {
|
|
5149
5390
|
var _match_;
|
|
@@ -5257,6 +5498,23 @@ function getOperatorsForType(type) {
|
|
|
5257
5498
|
];
|
|
5258
5499
|
}
|
|
5259
5500
|
exports.Button = Button;
|
|
5501
|
+
exports.ConfirmationDropdownMenuItem = ConfirmationDropdownMenuItem;
|
|
5502
|
+
exports.DropdownMenu = DropdownMenu;
|
|
5503
|
+
exports.DropdownMenuCheckboxItem = DropdownMenuCheckboxItem;
|
|
5504
|
+
exports.DropdownMenuClose = DropdownMenuClose;
|
|
5505
|
+
exports.DropdownMenuContent = DropdownMenuContent;
|
|
5506
|
+
exports.DropdownMenuGroup = DropdownMenuGroup;
|
|
5507
|
+
exports.DropdownMenuItem = DropdownMenuItem;
|
|
5508
|
+
exports.DropdownMenuLabel = DropdownMenuLabel;
|
|
5509
|
+
exports.DropdownMenuPortal = DropdownMenuPortal;
|
|
5510
|
+
exports.DropdownMenuRadioGroup = DropdownMenuRadioGroup;
|
|
5511
|
+
exports.DropdownMenuRadioItem = DropdownMenuRadioItem;
|
|
5512
|
+
exports.DropdownMenuSeparator = DropdownMenuSeparator;
|
|
5513
|
+
exports.DropdownMenuShortcut = DropdownMenuShortcut;
|
|
5514
|
+
exports.DropdownMenuSub = DropdownMenuSub;
|
|
5515
|
+
exports.DropdownMenuSubContent = DropdownMenuSubContent;
|
|
5516
|
+
exports.DropdownMenuSubTrigger = DropdownMenuSubTrigger;
|
|
5517
|
+
exports.DropdownMenuTrigger = DropdownMenuTrigger;
|
|
5260
5518
|
exports.buttonVariants = buttonVariants;
|
|
5261
5519
|
exports.fields = fields_exports; //# sourceMappingURL=index.cjs.map
|
|
5262
5520
|
//# sourceMappingURL=index.cjs.map
|