@povio/ui 2.2.12 → 2.3.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/buttons/InlineIconButton/InlineIconButton.d.ts +2 -1
- package/dist/components/buttons/InlineIconButton/InlineIconButton.js +2 -2
- package/dist/components/inputs/Checkbox/Checkbox.js +6 -1
- package/dist/components/inputs/Checkbox/checkbox.cva.d.ts +3 -0
- package/dist/components/inputs/Checkbox/checkbox.cva.js +2 -1
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.d.ts +10 -5
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +89 -9
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.d.ts +10 -5
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +95 -7
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.d.ts +11 -5
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +95 -9
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.d.ts +5 -3
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.js +77 -7
- package/dist/components/inputs/DateTime/shared/Calendar.d.ts +5 -2
- package/dist/components/inputs/DateTime/shared/Calendar.js +23 -6
- package/dist/components/inputs/DateTime/shared/CalendarCell.d.ts +1 -1
- package/dist/components/inputs/DateTime/shared/CalendarCell.js +3 -3
- package/dist/components/inputs/DateTime/shared/CalendarGrid.d.ts +1 -1
- package/dist/components/inputs/DateTime/shared/DatePickerInput.d.ts +6 -3
- package/dist/components/inputs/DateTime/shared/DatePickerInput.js +78 -61
- package/dist/components/inputs/DateTime/shared/DateSegmentItem.d.ts +14 -0
- package/dist/components/inputs/DateTime/shared/DateSegmentItem.js +19 -6
- package/dist/components/inputs/DateTime/shared/TimePickerInput.d.ts +2 -1
- package/dist/components/inputs/DateTime/shared/TimePickerInput.js +11 -4
- package/dist/components/inputs/DateTime/shared/datePicker.types.d.ts +4 -0
- package/dist/components/inputs/DateTime/shared/datePickerInput.cva.d.ts +7 -0
- package/dist/components/inputs/DateTime/shared/datePickerInput.cva.js +13 -0
- package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.d.ts +6 -0
- package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.js +21 -0
- package/dist/components/inputs/DateTime/shared/dateSegment.utils.d.ts +2 -0
- package/dist/components/inputs/DateTime/shared/dateSegment.utils.spec.d.ts +1 -0
- package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.d.ts +35 -0
- package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.js +80 -0
- package/dist/components/inputs/File/FileUpload.js +1 -0
- package/dist/components/inputs/File/shared/InputUploadContent.js +1 -0
- package/dist/components/inputs/FormField/FormField.d.ts +3 -3
- package/dist/components/inputs/FormField/FormFieldHeader.d.ts +2 -2
- package/dist/components/inputs/FormField/FormFieldHeader.js +3 -1
- package/dist/components/inputs/FormField/FormFieldLabel.d.ts +2 -2
- package/dist/components/inputs/FormField/formFieldHeader.cva.d.ts +6 -0
- package/dist/components/inputs/FormField/formFieldHeader.cva.js +11 -0
- package/dist/components/inputs/Input/NumberInput/NumberInput.d.ts +5 -2
- package/dist/components/inputs/Input/NumberInput/NumberInput.js +81 -7
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.d.ts +45 -0
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.js +146 -0
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.d.ts +35 -0
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.js +235 -0
- package/dist/components/inputs/Input/TextArea/TextArea.cva.d.ts +4 -0
- package/dist/components/inputs/Input/TextArea/TextArea.cva.js +5 -0
- package/dist/components/inputs/Input/TextArea/TextArea.js +3 -1
- package/dist/components/inputs/Input/TextInput/TextInput.d.ts +3 -1
- package/dist/components/inputs/Input/TextInput/TextInput.js +82 -7
- package/dist/components/inputs/Input/shared/InputContent.js +7 -6
- package/dist/components/inputs/Input/shared/numberStatic.utils.d.ts +1 -0
- package/dist/components/inputs/Input/shared/numberStatic.utils.js +7 -0
- package/dist/components/inputs/Inputs/InputItem.d.ts +16 -21
- package/dist/components/inputs/Inputs/InputItem.js +6 -0
- package/dist/components/inputs/RadioGroup/RadioGroup.d.ts +2 -1
- package/dist/components/inputs/RadioGroup/RadioGroup.js +106 -25
- package/dist/components/inputs/RadioGroup/radio.cva.d.ts +17 -0
- package/dist/components/inputs/RadioGroup/radio.cva.js +42 -1
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.d.ts +6 -2
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.js +102 -7
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.d.ts +3 -18
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +33 -8
- package/dist/components/inputs/Selection/Autocomplete/queryAutocomplete.types.d.ts +36 -0
- package/dist/components/inputs/Selection/Select/QuerySelect.d.ts +14 -0
- package/dist/components/inputs/Selection/Select/QuerySelect.js +42 -0
- package/dist/components/inputs/Selection/Select/Select.d.ts +7 -3
- package/dist/components/inputs/Selection/Select/Select.js +115 -5
- package/dist/components/inputs/Selection/shared/SelectBase.d.ts +8 -1
- package/dist/components/inputs/Selection/shared/SelectBase.js +4 -2
- package/dist/components/inputs/Selection/shared/SelectDesktop.d.ts +1 -1
- package/dist/components/inputs/Selection/shared/SelectDesktop.js +11 -3
- package/dist/components/inputs/Selection/shared/SelectInput.d.ts +2 -2
- package/dist/components/inputs/Selection/shared/SelectInput.js +27 -4
- package/dist/components/inputs/Selection/shared/SelectListBox.d.ts +2 -2
- package/dist/components/inputs/Selection/shared/SelectListBox.js +3 -3
- package/dist/components/inputs/Selection/shared/SelectMobile.d.ts +1 -1
- package/dist/components/inputs/Selection/shared/SelectMobile.js +9 -3
- package/dist/components/inputs/Selection/shared/querySelect.utils.d.ts +6 -0
- package/dist/components/inputs/Selection/shared/querySelect.utils.js +13 -0
- package/dist/components/inputs/Selection/shared/select.context.d.ts +3 -2
- package/dist/components/inputs/Selection/shared/select.context.js +27 -4
- package/dist/components/inputs/Selection/shared/select.types.d.ts +3 -2
- package/dist/components/inputs/Selection/shared/selectDesktop.cva.d.ts +3 -0
- package/dist/components/inputs/Selection/shared/selectDesktop.cva.js +5 -0
- package/dist/components/inputs/Selection/shared/staticSelect.utils.d.ts +23 -0
- package/dist/components/inputs/Selection/shared/staticSelect.utils.js +37 -0
- package/dist/components/inputs/Selection/shared/staticSelect.utils.spec.d.ts +1 -0
- package/dist/components/inputs/Skeleton/InputFrame.d.ts +77 -0
- package/dist/components/inputs/Skeleton/InputFrame.js +200 -0
- package/dist/components/inputs/TextEditor/TextEditor.d.ts +1 -0
- package/dist/components/inputs/TextEditor/TextEditor.js +8 -3
- package/dist/components/inputs/Toggle/Toggle.js +6 -1
- package/dist/components/inputs/Toggle/toggle.cva.d.ts +3 -0
- package/dist/components/inputs/Toggle/toggle.cva.js +2 -1
- package/dist/components/inputs/shared/CheckContent.d.ts +2 -1
- package/dist/components/inputs/shared/CheckContent.js +3 -4
- package/dist/components/inputs/shared/InputClear.d.ts +2 -1
- package/dist/components/inputs/shared/InputClear.js +13 -1
- package/dist/components/inputs/shared/StaticInput.d.ts +38 -0
- package/dist/components/inputs/shared/TooltipWrapper.js +5 -1
- package/dist/components/inputs/shared/input.cva.d.ts +10 -0
- package/dist/components/inputs/shared/input.cva.js +19 -1
- package/dist/components/inputs/shared/tooltipWrapper.cva.d.ts +4 -0
- package/dist/components/inputs/shared/tooltipWrapper.cva.js +5 -0
- package/dist/components/inputs/shared/useStaticInputHandoff.d.ts +13 -0
- package/dist/components/inputs/shared/useStaticInputHandoff.js +47 -0
- package/dist/config/router.context.d.ts +3 -4
- package/dist/config/router.context.js +1 -3
- package/dist/config/uiConfig.context.d.ts +15 -3
- package/dist/config/uiConfig.context.js +16 -3
- package/dist/config/uiStyle.context.d.ts +27 -4
- package/dist/helpers/dynamicInputs.d.ts +5 -5
- package/dist/helpers/dynamicInputs.js +3 -0
- package/dist/hooks/useFilters.js +27 -23
- package/dist/hooks/useIntersectionObserver.d.ts +1 -1
- package/dist/hooks/useIntersectionObserver.js +27 -14
- package/dist/hooks/usePagination.js +8 -4
- package/dist/hooks/useQueryAutocomplete.d.ts +14 -0
- package/dist/hooks/useQueryAutocomplete.js +56 -0
- package/dist/hooks/useSorting.js +7 -4
- package/dist/index.d.ts +7 -0
- package/dist/index.js +5 -3
- package/dist/tw-ui-plugin.js +2 -0
- package/dist/utils/date-time.utils.d.ts +31 -10
- package/dist/utils/date-time.utils.js +123 -22
- package/dist/utils/query.utils.d.ts +4 -0
- package/dist/utils/query.utils.js +8 -0
- package/dist/utils/routing.utils.d.ts +1 -0
- package/dist/utils/routing.utils.js +14 -0
- package/package.json +2 -2
|
@@ -15,6 +15,7 @@ export interface TextEditorBaseProps extends FormFieldProps {
|
|
|
15
15
|
onBlur?: () => void;
|
|
16
16
|
as?: "default" | "filter" | "floating" | "inline" | null;
|
|
17
17
|
editorClassName?: string;
|
|
18
|
+
isDirty?: boolean;
|
|
18
19
|
}
|
|
19
20
|
export type TextEditorProps = TextEditorBaseProps;
|
|
20
21
|
export type ControlledTextEditorProps<TFieldValues extends FieldValues> = ControlProps<TextEditorProps, TFieldValues>;
|
|
@@ -37,7 +37,7 @@ var extensions = [
|
|
|
37
37
|
defaultProtocol: "https"
|
|
38
38
|
})
|
|
39
39
|
];
|
|
40
|
-
var TextEditorBase = ({ ref, as = "default", placeholder, label, hideLabel, tooltipText, helperText, isRequired, rightContent, isDisabled, headerClassName, errorClassName, isHeaderHidden, error, value, className, editorClassName, onChange, onBlur }) => {
|
|
40
|
+
var TextEditorBase = ({ ref, as = "default", placeholder, label, hideLabel, tooltipText, helperText, isRequired, rightContent, isDisabled, headerClassName, errorClassName, isHeaderHidden, error, value, className, editorClassName, isDirty, onChange, onBlur }) => {
|
|
41
41
|
const contentRef = useRef(null);
|
|
42
42
|
const { hoverProps, isHovered } = useHover({ isDisabled });
|
|
43
43
|
const [isFocused, setIsFocused] = useState(false);
|
|
@@ -106,9 +106,12 @@ var TextEditorBase = ({ ref, as = "default", placeholder, label, hideLabel, tool
|
|
|
106
106
|
"data-rac": "",
|
|
107
107
|
"data-hovered": isHovered || void 0,
|
|
108
108
|
"data-disabled": isDisabled || void 0,
|
|
109
|
+
"data-is-disabled": isDisabled || void 0,
|
|
109
110
|
"data-focus-within": isFocused || void 0,
|
|
110
111
|
"data-focus-visible": isFocused && isFocusVisible || void 0,
|
|
111
112
|
"data-is-filled": !editor?.isEmpty,
|
|
113
|
+
"data-is-required": isRequired || void 0,
|
|
114
|
+
"data-is-dirty": isDirty || void 0,
|
|
112
115
|
...hoverProps,
|
|
113
116
|
...focusWithinProps,
|
|
114
117
|
...fieldProps,
|
|
@@ -136,13 +139,15 @@ var TextEditor = (props) => {
|
|
|
136
139
|
return /* @__PURE__ */ jsx(Controller, {
|
|
137
140
|
control: formControl.control,
|
|
138
141
|
name: formControl.name,
|
|
139
|
-
render: ({ field }) => /* @__PURE__ */ jsx(TextEditorBase, {
|
|
142
|
+
render: ({ field, fieldState: { error, isDirty } }) => /* @__PURE__ */ jsx(TextEditorBase, {
|
|
140
143
|
...innerProps,
|
|
141
144
|
ref: mergeRefs(ref, field.ref),
|
|
142
145
|
value: field.value,
|
|
143
146
|
onChange: field.onChange,
|
|
144
147
|
onBlur: field.onBlur,
|
|
145
|
-
|
|
148
|
+
isDirty,
|
|
149
|
+
isDisabled: field.disabled || props.isDisabled,
|
|
150
|
+
error: props.error ?? error?.message
|
|
146
151
|
})
|
|
147
152
|
});
|
|
148
153
|
}
|
|
@@ -2,7 +2,7 @@ import { UIStyle } from "../../../config/uiStyle.context.js";
|
|
|
2
2
|
import { UIConfig } from "../../../config/uiConfig.context.js";
|
|
3
3
|
import { FormFieldError } from "../FormField/FormFieldError.js";
|
|
4
4
|
import { CheckContent } from "../shared/CheckContent.js";
|
|
5
|
-
import { toggle, toggleTypography } from "./toggle.cva.js";
|
|
5
|
+
import { toggle, toggleContentClassName, toggleTypography } from "./toggle.cva.js";
|
|
6
6
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
import { clsx } from "clsx";
|
|
8
8
|
import { Switch } from "react-aria-components";
|
|
@@ -13,6 +13,7 @@ var ToggleBase = (props) => {
|
|
|
13
13
|
const ui = UIConfig.useConfig();
|
|
14
14
|
const toggleCva = UIStyle.useCva("toggle.cva", toggle);
|
|
15
15
|
const toggleTypographyMap = UIStyle.useMapper("toggle.typography", toggleTypography);
|
|
16
|
+
const toggleContentClassNameMap = UIStyle.useMapper("toggle.contentClassName", toggleContentClassName);
|
|
16
17
|
const { className, children, isDisabled, error, variant = ui.toggle.variant, ...rest } = props;
|
|
17
18
|
const formFieldErrorProps = {
|
|
18
19
|
error,
|
|
@@ -32,6 +33,10 @@ var ToggleBase = (props) => {
|
|
|
32
33
|
variant,
|
|
33
34
|
...rest
|
|
34
35
|
}),
|
|
36
|
+
contentClassName: toggleContentClassNameMap({
|
|
37
|
+
variant,
|
|
38
|
+
...rest
|
|
39
|
+
}),
|
|
35
40
|
children
|
|
36
41
|
})]
|
|
37
42
|
}), /* @__PURE__ */ jsx(FormFieldError, { ...formFieldErrorProps })] });
|
|
@@ -8,3 +8,6 @@ export interface ToggleVariantProps extends VariantProps<typeof toggle> {
|
|
|
8
8
|
export declare const toggleTypography: (props: {
|
|
9
9
|
variant?: "default" | null | undefined;
|
|
10
10
|
}) => TypographyVariantProps | undefined;
|
|
11
|
+
export declare const toggleContentClassName: (props: {
|
|
12
|
+
variant?: "default" | null | undefined;
|
|
13
|
+
}) => string | undefined;
|
|
@@ -26,5 +26,6 @@ var toggleTypography = compoundMapper({ default: {
|
|
|
26
26
|
sizeMobile: "label-1",
|
|
27
27
|
variant: "default"
|
|
28
28
|
} });
|
|
29
|
+
var toggleContentClassName = compoundMapper({ default: "text-text-default-2" });
|
|
29
30
|
//#endregion
|
|
30
|
-
export { toggle, toggleTypography };
|
|
31
|
+
export { toggle, toggleContentClassName, toggleTypography };
|
|
@@ -3,6 +3,7 @@ import { TypographyVariantProps } from '../../text/Typography/typography.cva';
|
|
|
3
3
|
interface CheckContentProps {
|
|
4
4
|
typography?: TypographyVariantProps;
|
|
5
5
|
className?: string;
|
|
6
|
+
contentClassName?: string;
|
|
6
7
|
}
|
|
7
|
-
export declare const CheckContent: ({ children, className, ...props }: PropsWithChildren<CheckContentProps>) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare const CheckContent: ({ children, className, contentClassName, ...props }: PropsWithChildren<CheckContentProps>) => import("react/jsx-runtime").JSX.Element;
|
|
8
9
|
export {};
|
|
@@ -3,15 +3,14 @@ import { typography } from "../../text/Typography/typography.cva.js";
|
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
import clsx$1 from "clsx";
|
|
5
5
|
//#region src/components/inputs/shared/CheckContent.tsx
|
|
6
|
-
var CheckContent = ({ children, className, ...props }) => {
|
|
6
|
+
var CheckContent = ({ children, className, contentClassName, ...props }) => {
|
|
7
7
|
return /* @__PURE__ */ jsx("div", {
|
|
8
8
|
className: clsx$1(UIStyle.useCva("typography.cva", typography)({
|
|
9
9
|
size: "label-1",
|
|
10
10
|
sizeMobile: "label-1",
|
|
11
11
|
variant: "default",
|
|
12
|
-
...props.typography
|
|
13
|
-
|
|
14
|
-
}), className),
|
|
12
|
+
...props.typography
|
|
13
|
+
}), contentClassName, className),
|
|
15
14
|
children
|
|
16
15
|
});
|
|
17
16
|
};
|
|
@@ -2,8 +2,9 @@ import { CSSProperties } from 'react';
|
|
|
2
2
|
interface InputClearProps {
|
|
3
3
|
onClear: () => void;
|
|
4
4
|
show?: boolean;
|
|
5
|
+
renderStatic?: boolean;
|
|
5
6
|
className?: string;
|
|
6
7
|
style?: CSSProperties;
|
|
7
8
|
}
|
|
8
|
-
export declare const InputClear: ({ onClear, className, style, show }: InputClearProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare const InputClear: ({ onClear, className, style, show, renderStatic }: InputClearProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
10
|
export {};
|
|
@@ -5,7 +5,19 @@ import { jsx } from "react/jsx-runtime";
|
|
|
5
5
|
import { clsx } from "clsx";
|
|
6
6
|
import { useTranslation } from "react-i18next";
|
|
7
7
|
//#region src/components/inputs/shared/InputClear.tsx
|
|
8
|
-
var InputClear = ({ onClear, className, style, show }) => {
|
|
8
|
+
var InputClear = ({ onClear, className, style, show, renderStatic }) => {
|
|
9
|
+
if (renderStatic) return /* @__PURE__ */ jsx("button", {
|
|
10
|
+
className: clsx("invisible relative z-1 flex items-center size-6 shrink-0", "group-focus-within:visible group-hover/date-picker-content:visible group-hover/select-content:visible group-hover/text-area:visible group-hover:visible", "border-0!", !show && "invisible!", className),
|
|
11
|
+
style
|
|
12
|
+
});
|
|
13
|
+
return /* @__PURE__ */ jsx(InputClearButton, {
|
|
14
|
+
onClear,
|
|
15
|
+
className,
|
|
16
|
+
style,
|
|
17
|
+
show
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
var InputClearButton = ({ onClear, className, style, show }) => {
|
|
9
21
|
const { t } = useTranslation("ui");
|
|
10
22
|
return /* @__PURE__ */ jsx(InlineIconButton, {
|
|
11
23
|
color: "secondary",
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { FormFieldProps } from '../FormField/FormField';
|
|
3
|
+
import { TextInputProps } from '../Input/TextInput/TextInput';
|
|
4
|
+
import { InputSizeProps, InputVariantProps } from './input.cva';
|
|
5
|
+
import { TypographyVariantProps } from '../../text/Typography/typography.cva';
|
|
6
|
+
type StaticInputDataAttributes = {
|
|
7
|
+
dataDisabled?: boolean;
|
|
8
|
+
dataHasSearch?: boolean;
|
|
9
|
+
dataHasSelection?: boolean;
|
|
10
|
+
dataInvalid?: boolean;
|
|
11
|
+
dataIsDirty?: boolean;
|
|
12
|
+
dataIsDisabled?: boolean;
|
|
13
|
+
dataIsEmpty?: boolean;
|
|
14
|
+
dataIsFilled?: boolean;
|
|
15
|
+
dataIsRequired?: boolean;
|
|
16
|
+
};
|
|
17
|
+
interface StaticInputProps extends FormFieldProps {
|
|
18
|
+
onInteract: (shouldFocus: boolean) => void;
|
|
19
|
+
as?: TextInputProps["as"];
|
|
20
|
+
typographySize?: TypographyVariantProps["size"];
|
|
21
|
+
size?: InputSizeProps["size"];
|
|
22
|
+
variant?: InputVariantProps["variant"];
|
|
23
|
+
applyMinInputWidth?: boolean;
|
|
24
|
+
placeholder?: ReactNode;
|
|
25
|
+
showPlacholderIfFilled?: boolean;
|
|
26
|
+
displayValue?: ReactNode;
|
|
27
|
+
isEmpty?: boolean;
|
|
28
|
+
leadingVisual?: ReactNode;
|
|
29
|
+
leadingContent?: ReactNode;
|
|
30
|
+
leadingContentClassName?: string;
|
|
31
|
+
hasClearIcon?: boolean;
|
|
32
|
+
trailingContent?: ReactNode;
|
|
33
|
+
contentRowClassName?: string;
|
|
34
|
+
inputClassName?: string;
|
|
35
|
+
dataAttributes?: StaticInputDataAttributes;
|
|
36
|
+
}
|
|
37
|
+
export declare const StaticInput: ({ onInteract, as, typographySize, size, variant, applyMinInputWidth, placeholder, showPlacholderIfFilled, displayValue, isEmpty, leadingVisual, leadingContent, leadingContentClassName, hasClearIcon, trailingContent, contentRowClassName, inputClassName, dataAttributes, className, ...formFieldProps }: StaticInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
38
|
+
export {};
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
import { UIStyle } from "../../../config/uiStyle.context.js";
|
|
1
2
|
import { Tooltip } from "../../overlays/Tooltip/Tooltip.js";
|
|
3
|
+
import { tooltipWrapperTrigger } from "./tooltipWrapper.cva.js";
|
|
2
4
|
import { jsx } from "react/jsx-runtime";
|
|
3
5
|
//#region src/components/inputs/shared/TooltipWrapper.tsx
|
|
4
6
|
var TooltipWrapper = (props) => {
|
|
7
|
+
const tooltipWrapperTriggerCva = UIStyle.useCva("tooltipWrapper.triggerCva", tooltipWrapperTrigger);
|
|
5
8
|
if (props.as !== "inline") return props.children;
|
|
6
9
|
return /* @__PURE__ */ jsx(Tooltip, {
|
|
7
10
|
text: props.error || void 0,
|
|
@@ -9,10 +12,11 @@ var TooltipWrapper = (props) => {
|
|
|
9
12
|
color: "error",
|
|
10
13
|
hidden: !props.error,
|
|
11
14
|
isNonInteractiveTrigger: true,
|
|
12
|
-
triggerClassName: props.triggerClassName,
|
|
15
|
+
triggerClassName: tooltipWrapperTriggerCva({ className: props.triggerClassName }),
|
|
13
16
|
triggerTabIndex: props.triggerTabIndex,
|
|
14
17
|
children: /* @__PURE__ */ jsx("div", {
|
|
15
18
|
tabIndex: -1,
|
|
19
|
+
className: tooltipWrapperTriggerCva({}),
|
|
16
20
|
children: props.children
|
|
17
21
|
})
|
|
18
22
|
});
|
|
@@ -12,6 +12,16 @@ export declare const inputSize: (props?: ({
|
|
|
12
12
|
} & ClassProp) | undefined) => string;
|
|
13
13
|
export interface InputSizeProps extends VariantProps<typeof inputSize> {
|
|
14
14
|
}
|
|
15
|
+
export declare const inputContentWrapper: (props?: ({
|
|
16
|
+
as?: "filter" | "default" | "floating" | "inline" | null | undefined;
|
|
17
|
+
} & ClassProp) | undefined) => string;
|
|
18
|
+
export interface InputContentWrapperProps extends VariantProps<typeof inputContentWrapper> {
|
|
19
|
+
}
|
|
20
|
+
export declare const inputClearClass: (props?: ({
|
|
21
|
+
as?: "filter" | "default" | "floating" | "inline" | null | undefined;
|
|
22
|
+
} & ClassProp) | undefined) => string;
|
|
23
|
+
export interface InputClearClassProps extends VariantProps<typeof inputClearClass> {
|
|
24
|
+
}
|
|
15
25
|
export declare const inputSide: (props?: ({
|
|
16
26
|
size?: "small" | "default" | "extra-small" | "large" | null | undefined;
|
|
17
27
|
type?: "left" | "right" | "var" | null | undefined;
|
|
@@ -191,6 +191,24 @@ var inputSize = cva("", {
|
|
|
191
191
|
as: "default"
|
|
192
192
|
}
|
|
193
193
|
});
|
|
194
|
+
var inputContentWrapper = cva("flex w-full", {
|
|
195
|
+
variants: { as: {
|
|
196
|
+
default: "",
|
|
197
|
+
floating: "flex-col",
|
|
198
|
+
filter: "gap-input-gap-input-text-to-elements",
|
|
199
|
+
inline: ""
|
|
200
|
+
} },
|
|
201
|
+
defaultVariants: { as: "default" }
|
|
202
|
+
});
|
|
203
|
+
var inputClearClass = cva("", {
|
|
204
|
+
variants: { as: {
|
|
205
|
+
default: "",
|
|
206
|
+
floating: "",
|
|
207
|
+
filter: "",
|
|
208
|
+
inline: ""
|
|
209
|
+
} },
|
|
210
|
+
defaultVariants: { as: "default" }
|
|
211
|
+
});
|
|
194
212
|
var inputSide = cva("", {
|
|
195
213
|
variants: {
|
|
196
214
|
size: {
|
|
@@ -277,4 +295,4 @@ var useInputCva = () => {
|
|
|
277
295
|
};
|
|
278
296
|
};
|
|
279
297
|
//#endregion
|
|
280
|
-
export { inputBase, inputSide, inputSize, useInputCva };
|
|
298
|
+
export { inputBase, inputClearClass, inputContentWrapper, inputSide, inputSize, useInputCva };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
export declare const tooltipWrapperTrigger: (props?: import('class-variance-authority/types').ClassProp | undefined) => string;
|
|
3
|
+
export interface TooltipWrapperTriggerVariantProps extends VariantProps<typeof tooltipWrapperTrigger> {
|
|
4
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Dispatch, RefObject, SetStateAction } from 'react';
|
|
2
|
+
interface StaticInputHandoffOptions<TElement extends HTMLElement> {
|
|
3
|
+
inputRef: RefObject<TElement | null>;
|
|
4
|
+
renderInput: boolean;
|
|
5
|
+
setRenderInput: Dispatch<SetStateAction<boolean>>;
|
|
6
|
+
getFocusTarget?: (element: TElement) => HTMLElement | null | undefined;
|
|
7
|
+
}
|
|
8
|
+
export declare const useStaticInputHandoff: <TElement extends HTMLElement = HTMLInputElement>({ inputRef, renderInput, setRenderInput, getFocusTarget, }: StaticInputHandoffOptions<TElement>) => {
|
|
9
|
+
shouldFocus: boolean;
|
|
10
|
+
renderRealInput: (focus: boolean) => void;
|
|
11
|
+
replayStaticInputChange: (value: string) => void;
|
|
12
|
+
};
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { useLayoutEffect, useRef, useState } from "react";
|
|
2
|
+
//#region src/components/inputs/shared/useStaticInputHandoff.ts
|
|
3
|
+
var useStaticInputHandoff = ({ inputRef, renderInput, setRenderInput, getFocusTarget }) => {
|
|
4
|
+
const [shouldFocus, setShouldFocus] = useState(false);
|
|
5
|
+
const pendingStaticChangeRef = useRef(null);
|
|
6
|
+
useLayoutEffect(() => {
|
|
7
|
+
if (!renderInput || !shouldFocus) return;
|
|
8
|
+
const focusRealInput = (replayPendingChange) => {
|
|
9
|
+
const input = inputRef.current;
|
|
10
|
+
const pendingValue = pendingStaticChangeRef.current;
|
|
11
|
+
const focusTarget = input ? getFocusTarget?.(input) ?? input : null;
|
|
12
|
+
if (replayPendingChange && focusTarget instanceof HTMLInputElement && pendingValue != null) {
|
|
13
|
+
(Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, "value")?.set)?.call(focusTarget, pendingValue);
|
|
14
|
+
focusTarget.dispatchEvent(new Event("input", { bubbles: true }));
|
|
15
|
+
pendingStaticChangeRef.current = null;
|
|
16
|
+
}
|
|
17
|
+
focusTarget?.focus();
|
|
18
|
+
};
|
|
19
|
+
focusRealInput(true);
|
|
20
|
+
const frame = requestAnimationFrame(() => {
|
|
21
|
+
focusRealInput(false);
|
|
22
|
+
setShouldFocus(false);
|
|
23
|
+
});
|
|
24
|
+
return () => {
|
|
25
|
+
cancelAnimationFrame(frame);
|
|
26
|
+
};
|
|
27
|
+
}, [
|
|
28
|
+
getFocusTarget,
|
|
29
|
+
inputRef,
|
|
30
|
+
renderInput,
|
|
31
|
+
shouldFocus
|
|
32
|
+
]);
|
|
33
|
+
return {
|
|
34
|
+
shouldFocus,
|
|
35
|
+
renderRealInput: (focus) => {
|
|
36
|
+
setShouldFocus(focus);
|
|
37
|
+
setRenderInput(true);
|
|
38
|
+
},
|
|
39
|
+
replayStaticInputChange: (value) => {
|
|
40
|
+
pendingStaticChangeRef.current = value;
|
|
41
|
+
setShouldFocus(true);
|
|
42
|
+
setRenderInput(true);
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
//#endregion
|
|
47
|
+
export { useStaticInputHandoff };
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
2
|
interface UIRouterProviderProps {
|
|
3
|
-
push: (
|
|
4
|
-
replace: (
|
|
5
|
-
pathname: string;
|
|
3
|
+
push: (path: string, params?: Record<string, unknown>) => Promise<boolean>;
|
|
4
|
+
replace: (path: string, params?: Record<string, unknown>) => Promise<boolean>;
|
|
6
5
|
searchString: string;
|
|
7
6
|
}
|
|
8
7
|
interface UIRouterContextValue extends UIRouterProviderProps {
|
|
9
8
|
searchParams: URLSearchParams;
|
|
10
9
|
}
|
|
11
10
|
export declare namespace UIRouter {
|
|
12
|
-
const UIRouterProvider: ({ children,
|
|
11
|
+
const UIRouterProvider: ({ children, push, replace, searchString, }: PropsWithChildren<UIRouterProviderProps>) => import("react/jsx-runtime").JSX.Element;
|
|
13
12
|
const useUIRouter: () => UIRouterContextValue;
|
|
14
13
|
}
|
|
15
14
|
export {};
|
|
@@ -5,20 +5,18 @@ import { RouterProvider } from "react-aria";
|
|
|
5
5
|
var UIRouter;
|
|
6
6
|
(function(_UIRouter) {
|
|
7
7
|
const UIRouterContext = createContext(null);
|
|
8
|
-
_UIRouter.UIRouterProvider = ({ children,
|
|
8
|
+
_UIRouter.UIRouterProvider = ({ children, push, replace, searchString }) => {
|
|
9
9
|
const searchParams = useMemo(() => {
|
|
10
10
|
return new URLSearchParams(searchString);
|
|
11
11
|
}, [searchString]);
|
|
12
12
|
return /* @__PURE__ */ jsx(UIRouterContext, {
|
|
13
13
|
value: useMemo(() => ({
|
|
14
14
|
searchParams,
|
|
15
|
-
pathname,
|
|
16
15
|
push,
|
|
17
16
|
searchString,
|
|
18
17
|
replace
|
|
19
18
|
}), [
|
|
20
19
|
searchParams,
|
|
21
|
-
pathname,
|
|
22
20
|
push,
|
|
23
21
|
searchString,
|
|
24
22
|
replace
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PropsWithChildren } from 'react';
|
|
1
|
+
import { PropsWithChildren, ReactElement } from 'react';
|
|
2
2
|
import { ButtonProps } from '../components/buttons/Button/Button';
|
|
3
3
|
import { CheckboxProps } from '../components/inputs/Checkbox/Checkbox';
|
|
4
4
|
import { DatePickerProps } from '../components/inputs/DateTime/DatePicker/DatePicker';
|
|
@@ -19,15 +19,27 @@ export declare namespace UIConfig {
|
|
|
19
19
|
[P in keyof T]-?: T[P] extends object ? DeepRequired<T[P]> : Exclude<T[P], null | undefined>;
|
|
20
20
|
};
|
|
21
21
|
export interface Options {
|
|
22
|
+
renderStaticInput: boolean;
|
|
22
23
|
input: Pick<TextInputProps, "variant" | "isClearable" | "hideLabel" | "as" | "size">;
|
|
23
24
|
button: Pick<ButtonProps, "variant" | "size">;
|
|
24
25
|
numberInput: Pick<NumberInputProps, "formatOptions">;
|
|
25
26
|
radioGroup: Pick<RadioGroupProps, "variant" | "hideLabel">;
|
|
26
27
|
checkbox: Pick<CheckboxProps, "variant">;
|
|
27
|
-
select: Pick<SelectBaseProps, "selectionMode" | "isSearchable" | "collapseAfter" | "selectedTagsType" | "hideSearchIcon">;
|
|
28
|
+
select: Pick<SelectBaseProps, "selectionMode" | "isSearchable" | "collapseAfter" | "selectedTagsType" | "hideSearchIcon" | "fireBlurOnChange">;
|
|
29
|
+
queryAutocomplete: {
|
|
30
|
+
isInitialQueryDisabled?: boolean;
|
|
31
|
+
};
|
|
32
|
+
querySelect: {
|
|
33
|
+
isInitialQueryDisabled?: boolean;
|
|
34
|
+
};
|
|
28
35
|
toggle: Pick<ToggleProps, "variant">;
|
|
29
36
|
slider: Pick<SliderProps, "minValue" | "maxValue">;
|
|
30
|
-
dateInput: Pick<DatePickerProps, "todayIcon" | "shouldForceLeadingZeros" | "disableManualEntry" | "shouldUpdateDateOnMonthYearChange" | "granularity" | "autoFixYear"
|
|
37
|
+
dateInput: Pick<DatePickerProps, "todayIcon" | "todayIconButtonSize" | "todayIconPlacement" | "shouldForceLeadingZeros" | "disableManualEntry" | "shouldUpdateDateOnMonthYearChange" | "granularity" | "autoFixYear"> & {
|
|
38
|
+
calendarIcon?: ReactElement;
|
|
39
|
+
dateTimeIcon?: ReactElement;
|
|
40
|
+
timeIcon?: ReactElement;
|
|
41
|
+
setDateValueOnDateSelection?: boolean;
|
|
42
|
+
};
|
|
31
43
|
actionModal: Pick<ActionModalProps, "titleTypography" | "descriptionTypography">;
|
|
32
44
|
bottomSheet: Pick<BottomSheetProps, "closeDragThreshold" | "closeVelocityThreshold" | "hideThumb" | "headerTypography">;
|
|
33
45
|
tableHeaderText: Pick<HeaderTextProps, "variant" | "size">;
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { CalendarIcon } from "../assets/icons/Calendar.js";
|
|
2
|
+
import { ClockIcon } from "../assets/icons/Clock.js";
|
|
3
|
+
import { DateTimeIcon } from "../assets/icons/DateTime.js";
|
|
1
4
|
import { ObjectUtils } from "../utils/object.utils.js";
|
|
2
5
|
import { useDeepCompareMemo } from "../hooks/useDeepCompare.js";
|
|
3
6
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -6,6 +9,7 @@ import { createContext, use } from "react";
|
|
|
6
9
|
var UIConfig;
|
|
7
10
|
(function(_UIConfig) {
|
|
8
11
|
const DEFAULT_CONFIG = {
|
|
12
|
+
renderStaticInput: true,
|
|
9
13
|
input: {
|
|
10
14
|
variant: "outlined",
|
|
11
15
|
as: "default",
|
|
@@ -31,8 +35,11 @@ var UIConfig;
|
|
|
31
35
|
isSearchable: false,
|
|
32
36
|
selectedTagsType: "list",
|
|
33
37
|
collapseAfter: 3,
|
|
34
|
-
hideSearchIcon: false
|
|
38
|
+
hideSearchIcon: false,
|
|
39
|
+
fireBlurOnChange: false
|
|
35
40
|
},
|
|
41
|
+
queryAutocomplete: { isInitialQueryDisabled: false },
|
|
42
|
+
querySelect: { isInitialQueryDisabled: false },
|
|
36
43
|
toggle: { variant: "default" },
|
|
37
44
|
slider: {
|
|
38
45
|
minValue: 0,
|
|
@@ -40,11 +47,17 @@ var UIConfig;
|
|
|
40
47
|
},
|
|
41
48
|
dateInput: {
|
|
42
49
|
todayIcon: false,
|
|
50
|
+
todayIconButtonSize: "none",
|
|
51
|
+
todayIconPlacement: "content",
|
|
43
52
|
shouldForceLeadingZeros: false,
|
|
44
53
|
disableManualEntry: false,
|
|
45
|
-
|
|
54
|
+
autoFixYear: false,
|
|
55
|
+
calendarIcon: /* @__PURE__ */ jsx(CalendarIcon, { className: "size-5" }),
|
|
56
|
+
dateTimeIcon: /* @__PURE__ */ jsx(DateTimeIcon, { className: "size-5" }),
|
|
57
|
+
timeIcon: /* @__PURE__ */ jsx(ClockIcon, { className: "size-6 text-interactive-text-secondary-idle" }),
|
|
58
|
+
setDateValueOnDateSelection: false,
|
|
46
59
|
granularity: "day",
|
|
47
|
-
|
|
60
|
+
shouldUpdateDateOnMonthYearChange: false
|
|
48
61
|
},
|
|
49
62
|
actionModal: {
|
|
50
63
|
titleTypography: {
|
|
@@ -4,11 +4,17 @@ import { BreadcrumbChevronVariantProps, BreadcrumbIconVariantProps, BreadcrumbIt
|
|
|
4
4
|
import { ButtonVariantProps } from '../components/buttons/Button/button.cva';
|
|
5
5
|
import { PillButtonVariants } from '../components/buttons/PillButton/pillButton.cva';
|
|
6
6
|
import { CheckboxIconVariantProps, CheckboxVariantProps } from '../components/inputs/Checkbox/checkbox.cva';
|
|
7
|
+
import { DatePickerInputContentRowProps } from '../components/inputs/DateTime/shared/datePickerInput.cva';
|
|
7
8
|
import { FormFieldErrorVariantProps } from '../components/inputs/FormField/formFieldError.cva';
|
|
9
|
+
import { FormFieldHeaderVariantProps } from '../components/inputs/FormField/formFieldHeader.cva';
|
|
8
10
|
import { FormFieldHelperVariantProps } from '../components/inputs/FormField/formFieldHelper.cva';
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
+
import { TextAreaWrapperVariantProps } from '../components/inputs/Input/TextArea/TextArea.cva';
|
|
12
|
+
import { RadioContentRowVariantProps, RadioContentWrapperVariantProps, RadioVariantProps } from '../components/inputs/RadioGroup/radio.cva';
|
|
13
|
+
import { SelectPopoverCva } from '../components/inputs/Selection/shared/selectDesktop.cva';
|
|
14
|
+
import { SelectListBoxItemCva } from '../components/inputs/Selection/shared/selectItem.cva';
|
|
15
|
+
import { InputBaseProps, InputClearClassProps, InputContentWrapperProps, InputSideProps, InputSizeProps } from '../components/inputs/shared/input.cva';
|
|
11
16
|
import { LabelBaseProps } from '../components/inputs/shared/label.cva';
|
|
17
|
+
import { TooltipWrapperTriggerVariantProps } from '../components/inputs/shared/tooltipWrapper.cva';
|
|
12
18
|
import { ToggleVariantProps } from '../components/inputs/Toggle/toggle.cva';
|
|
13
19
|
import { MenuCvaVariantProps, MenuItemVariantProps, MenuPopoverVariantProps, MenuPopoverWrapperVariantProps } from '../components/Menu/menu.cva';
|
|
14
20
|
import { AccordionChevronVariantProps, AccordionHeadingSubtitleVariantProps, AccordionHeadingTitleVariantProps, AccordionHeadingVariantProps, AccordionIconVariantProps, AccordionItemVariantProps, AccordionPanelContentVariantProps, AccordionPanelVariantProps, AccordionTriggerVariantProps, AccordionVariantProps } from '../components/navigation/Accordion/accordion.cva';
|
|
@@ -24,13 +30,12 @@ import { LinkVariantProps } from '../components/text/Link/link.cva';
|
|
|
24
30
|
import { TagVariantProps } from '../components/text/Tag/tag.cva';
|
|
25
31
|
import { TypographyVariantProps } from '../components/text/Typography/typography.cva';
|
|
26
32
|
import { CompoundMapper, ConfigSchema } from '../utils/compoundMapper';
|
|
27
|
-
import { SelectListBoxItemCva } from '../components/inputs/Selection/shared/selectItem.cva';
|
|
28
33
|
export declare namespace UIStyle {
|
|
29
34
|
export type Cva<T> = (props: (T & ClassProp) | ClassProp) => string;
|
|
30
35
|
type OptionKey = {
|
|
31
36
|
[K in keyof Options]: Options[K] extends object ? `${K & string}.${keyof Options[K] & string}` : never;
|
|
32
37
|
}[keyof Options];
|
|
33
|
-
interface Options {
|
|
38
|
+
export interface Options {
|
|
34
39
|
button: {
|
|
35
40
|
cva?: Cva<ButtonVariantProps>;
|
|
36
41
|
sizeCva?: Cva<ButtonVariantProps>;
|
|
@@ -46,10 +51,14 @@ export declare namespace UIStyle {
|
|
|
46
51
|
cva?: Cva<CheckboxVariantProps>;
|
|
47
52
|
iconCva?: Cva<CheckboxIconVariantProps>;
|
|
48
53
|
typography?: CompoundMapper<TypographyVariantProps, CheckboxVariantProps>;
|
|
54
|
+
contentClassName?: CompoundMapper<string, CheckboxVariantProps>;
|
|
49
55
|
};
|
|
50
56
|
radio: {
|
|
51
57
|
cva?: Cva<RadioVariantProps>;
|
|
58
|
+
contentWrapperCva?: Cva<RadioContentWrapperVariantProps>;
|
|
59
|
+
contentRowCva?: Cva<RadioContentRowVariantProps>;
|
|
52
60
|
typography?: CompoundMapper<TypographyVariantProps, RadioVariantProps>;
|
|
61
|
+
contentClassName?: CompoundMapper<string, RadioVariantProps>;
|
|
53
62
|
};
|
|
54
63
|
status: {
|
|
55
64
|
iconCva?: Cva<ToastVariantProps>;
|
|
@@ -64,9 +73,20 @@ export declare namespace UIStyle {
|
|
|
64
73
|
};
|
|
65
74
|
input: {
|
|
66
75
|
baseCva?: Cva<InputBaseProps>;
|
|
76
|
+
clearClassCva?: Cva<InputClearClassProps>;
|
|
77
|
+
contentWrapperCva?: Cva<InputContentWrapperProps>;
|
|
67
78
|
sizeCva?: Cva<InputSizeProps>;
|
|
68
79
|
sideCva?: Cva<InputSideProps>;
|
|
69
80
|
};
|
|
81
|
+
textArea: {
|
|
82
|
+
wrapperCva?: Cva<TextAreaWrapperVariantProps>;
|
|
83
|
+
};
|
|
84
|
+
tooltipWrapper: {
|
|
85
|
+
triggerCva?: Cva<TooltipWrapperTriggerVariantProps>;
|
|
86
|
+
};
|
|
87
|
+
datePickerInput: {
|
|
88
|
+
contentRowCva?: Cva<DatePickerInputContentRowProps>;
|
|
89
|
+
};
|
|
70
90
|
label: {
|
|
71
91
|
cva?: Cva<LabelBaseProps>;
|
|
72
92
|
typography?: CompoundMapper<TypographyVariantProps, LabelBaseProps>;
|
|
@@ -74,6 +94,7 @@ export declare namespace UIStyle {
|
|
|
74
94
|
toggle: {
|
|
75
95
|
cva?: Cva<ToggleVariantProps>;
|
|
76
96
|
typography?: CompoundMapper<TypographyVariantProps, ToggleVariantProps>;
|
|
97
|
+
contentClassName?: CompoundMapper<string, ToggleVariantProps>;
|
|
77
98
|
};
|
|
78
99
|
typography: {
|
|
79
100
|
cva?: Cva<TypographyVariantProps>;
|
|
@@ -145,11 +166,13 @@ export declare namespace UIStyle {
|
|
|
145
166
|
cva?: Cva<PopoverVariantProps>;
|
|
146
167
|
};
|
|
147
168
|
formField: {
|
|
169
|
+
headerCva?: Cva<FormFieldHeaderVariantProps>;
|
|
148
170
|
errorLabelCva?: Cva<FormFieldErrorVariantProps>;
|
|
149
171
|
helperLabelCva?: Cva<FormFieldHelperVariantProps>;
|
|
150
172
|
};
|
|
151
173
|
select: {
|
|
152
174
|
listBoxItemCva?: Cva<SelectListBoxItemCva>;
|
|
175
|
+
popoverCva?: Cva<SelectPopoverCva>;
|
|
153
176
|
};
|
|
154
177
|
}
|
|
155
178
|
interface ProviderProps {
|
|
@@ -21,14 +21,14 @@ export type AllowedComponentType<TZodType extends z.ZodType> = ZodUtils.ZodTypeS
|
|
|
21
21
|
datetime: "datePicker" | "dateTimePicker" | "timePicker";
|
|
22
22
|
dateRange: "dateRangePicker";
|
|
23
23
|
boolean: "toggle" | "checkbox";
|
|
24
|
-
number: "numberInput" | "slider" | "select" | "autocomplete" | "queryAutocomplete" | "segment";
|
|
25
|
-
enum: "select" | "autocomplete" | "segment";
|
|
26
|
-
string: "textInput" | "passwordInput" | "textArea" | "select" | "autocomplete" | "queryAutocomplete" | "segment";
|
|
24
|
+
number: "numberInput" | "slider" | "select" | "querySelect" | "autocomplete" | "queryAutocomplete" | "segment";
|
|
25
|
+
enum: "select" | "querySelect" | "autocomplete" | "segment";
|
|
26
|
+
string: "textInput" | "passwordInput" | "textArea" | "textEditor" | "select" | "querySelect" | "autocomplete" | "queryAutocomplete" | "segment";
|
|
27
27
|
email: "textInput";
|
|
28
|
-
array: "select" | "autocomplete" | "queryAutocomplete" | "segment";
|
|
28
|
+
array: "select" | "querySelect" | "autocomplete" | "queryAutocomplete" | "segment";
|
|
29
29
|
object: InputComponentType;
|
|
30
30
|
unknown: InputComponentType;
|
|
31
|
-
uuid: "select" | "autocomplete" | "queryAutocomplete" | "segment";
|
|
31
|
+
uuid: "select" | "querySelect" | "autocomplete" | "queryAutocomplete" | "segment";
|
|
32
32
|
}>;
|
|
33
33
|
interface DynamicInputDefBase<TProps> {
|
|
34
34
|
label?: string;
|
|
@@ -81,6 +81,7 @@ var getDefaultProps = (componentType, keyType) => {
|
|
|
81
81
|
].includes(componentType)) props.items = getDefaultSelectionItems(unwrappedType);
|
|
82
82
|
if ([
|
|
83
83
|
"select",
|
|
84
|
+
"querySelect",
|
|
84
85
|
"autocomplete",
|
|
85
86
|
"queryAutocomplete",
|
|
86
87
|
"segment"
|
|
@@ -146,6 +147,8 @@ var populateInputDef = (schema, schemaKey, value, options) => {
|
|
|
146
147
|
const inputWrapper = value.inputWrapper ?? options.globalInputWrapper;
|
|
147
148
|
if ("render" in value) return {
|
|
148
149
|
name,
|
|
150
|
+
label,
|
|
151
|
+
placeholder,
|
|
149
152
|
render: value.render
|
|
150
153
|
};
|
|
151
154
|
const schemaKeyType = schema.shape[schemaKey];
|