@povio/ui 3.0.0-rc.1 → 3.0.0-rc.3
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/inputs/DateTime/DatePicker/DatePicker.js +4 -2
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +12 -2
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.d.ts +1 -0
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +12 -5
- package/dist/components/inputs/DateTime/shared/DatePickerInput.d.ts +2 -1
- package/dist/components/inputs/DateTime/shared/DatePickerInput.js +188 -205
- package/dist/components/inputs/DateTime/shared/datePickerInput.cva.d.ts +0 -11
- package/dist/components/inputs/DateTime/shared/datePickerInput.cva.js +3 -2
- package/dist/components/inputs/FormField/FormFieldHeader.js +2 -2
- package/dist/components/inputs/FormField/formFieldHeader.cva.d.ts +0 -9
- package/dist/components/inputs/FormField/formFieldHeader.cva.js +3 -2
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.js +4 -4
- package/dist/components/inputs/Input/TextArea/TextArea.cva.d.ts +0 -4
- package/dist/components/inputs/Input/TextArea/TextArea.cva.js +3 -2
- package/dist/components/inputs/Input/TextArea/TextArea.js +2 -2
- package/dist/components/inputs/Input/shared/InputContent.js +2 -2
- package/dist/components/inputs/Inputs/InputItem.d.ts +1 -1
- package/dist/components/inputs/RadioGroup/RadioGroup.js +6 -6
- package/dist/components/inputs/RadioGroup/radio.cva.d.ts +0 -44
- package/dist/components/inputs/RadioGroup/radio.cva.js +3 -3
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.js +14 -11
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +13 -10
- package/dist/components/inputs/Selection/Autocomplete/queryAutocomplete.types.d.ts +1 -0
- package/dist/components/inputs/Selection/Select/QuerySelect.js +50 -45
- package/dist/components/inputs/Selection/Select/Select.js +3 -1
- package/dist/components/inputs/Selection/shared/SelectDesktop.js +5 -5
- package/dist/components/inputs/Selection/shared/SelectInput.js +89 -87
- package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.js +2 -2
- package/dist/components/inputs/Selection/shared/querySelect.utils.d.ts +5 -3
- package/dist/components/inputs/Selection/shared/querySelect.utils.js +18 -11
- package/dist/components/inputs/Selection/shared/selectDesktop.cva.d.ts +0 -4
- package/dist/components/inputs/Selection/shared/selectDesktop.cva.js +3 -2
- package/dist/components/inputs/Selection/shared/selectInput.cva.d.ts +12 -5
- package/dist/components/inputs/Selection/shared/selectInput.cva.js +6 -3
- package/dist/components/inputs/Selection/shared/staticSelect.utils.js +25 -8
- package/dist/components/inputs/Skeleton/InputFrame.js +6 -6
- package/dist/components/inputs/shared/TooltipWrapper.js +2 -2
- package/dist/components/inputs/shared/input.cva.d.ts +0 -54
- package/dist/components/inputs/shared/input.cva.js +3 -5
- package/dist/components/inputs/shared/tooltipWrapper.cva.d.ts +0 -4
- package/dist/components/inputs/shared/tooltipWrapper.cva.js +3 -2
- package/dist/components/text/Typography/typography.cva.d.ts +0 -45
- package/dist/components/text/Typography/typography.cva.js +1 -2
- package/dist/config/uiConfig.context.d.ts +1 -1
- package/dist/config/uiOverrides.context.d.ts +1 -0
- package/dist/hooks/useQueryAutocomplete.d.ts +1 -1
- package/dist/hooks/useQueryAutocomplete.js +17 -2
- package/dist/index.d.ts +8 -2
- package/dist/index.js +9 -3
- package/package.json +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { UIOverrides } from "../../../../config/uiOverrides.context.js";
|
|
2
|
-
|
|
2
|
+
//#region src/components/inputs/DateTime/shared/datePickerInput.cva.ts
|
|
3
|
+
var datePickerInputContentRowDefinition = UIOverrides.defineConfig({
|
|
3
4
|
base: ["flex items-center gap-input-gap-input-text-to-elements"],
|
|
4
5
|
config: {
|
|
5
6
|
variants: { size: {
|
|
@@ -12,4 +13,4 @@ var datePickerInputContentRow = UIOverrides.defineConfig({
|
|
|
12
13
|
}
|
|
13
14
|
});
|
|
14
15
|
//#endregion
|
|
15
|
-
export {
|
|
16
|
+
export { datePickerInputContentRowDefinition };
|
|
@@ -3,7 +3,7 @@ import { UIOverrides } from "../../../config/uiOverrides.context.js";
|
|
|
3
3
|
import { Typography } from "../../text/Typography/Typography.js";
|
|
4
4
|
import { Tooltip as Tooltip$1 } from "../../overlays/Tooltip/Tooltip.js";
|
|
5
5
|
import { FormFieldLabel } from "./FormFieldLabel.js";
|
|
6
|
-
import {
|
|
6
|
+
import { formFieldHeaderDefinition } from "./formFieldHeader.cva.js";
|
|
7
7
|
import { c } from "react/compiler-runtime";
|
|
8
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
9
|
import { clsx } from "clsx";
|
|
@@ -12,7 +12,7 @@ import { Focusable } from "react-aria-components";
|
|
|
12
12
|
var FormFieldHeader = (t0) => {
|
|
13
13
|
const $ = c(24);
|
|
14
14
|
const { label, tooltipText, helperText, isRequired, rightContent, isHeaderHidden, isDisabled, className, labelProps } = t0;
|
|
15
|
-
const formFieldHeaderCva = UIOverrides.useCva("formField.headerCva",
|
|
15
|
+
const formFieldHeaderCva = UIOverrides.useCva("formField.headerCva", formFieldHeaderDefinition);
|
|
16
16
|
const t1 = !isHeaderHidden;
|
|
17
17
|
let t2;
|
|
18
18
|
if ($[0] !== className || $[1] !== formFieldHeaderCva || $[2] !== t1) {
|
|
@@ -8,15 +8,6 @@ export declare const formFieldHeaderDefinition: {
|
|
|
8
8
|
};
|
|
9
9
|
}>;
|
|
10
10
|
};
|
|
11
|
-
export declare const formFieldHeader: {
|
|
12
|
-
base: string[];
|
|
13
|
-
config: import("../../../utils/style-merge.util").StyleMergeUtils.Config<{
|
|
14
|
-
readonly visible: {
|
|
15
|
-
readonly true: "mb-1";
|
|
16
|
-
readonly false: "sr-only";
|
|
17
|
-
};
|
|
18
|
-
}>;
|
|
19
|
-
};
|
|
20
11
|
export type FormFieldHeaderConfig = NonNullable<typeof formFieldHeaderDefinition.config>;
|
|
21
12
|
export interface FormFieldHeaderVariantProps extends UIOverrides.VariantProps<FormFieldHeaderConfig> {
|
|
22
13
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { UIOverrides } from "../../../config/uiOverrides.context.js";
|
|
2
|
-
|
|
2
|
+
//#region src/components/inputs/FormField/formFieldHeader.cva.ts
|
|
3
|
+
var formFieldHeaderDefinition = UIOverrides.defineConfig({
|
|
3
4
|
base: [""],
|
|
4
5
|
config: {
|
|
5
6
|
variants: { visible: {
|
|
@@ -10,4 +11,4 @@ var formFieldHeader = UIOverrides.defineConfig({
|
|
|
10
11
|
}
|
|
11
12
|
});
|
|
12
13
|
//#endregion
|
|
13
|
-
export {
|
|
14
|
+
export { formFieldHeaderDefinition };
|
|
@@ -2,7 +2,7 @@ import { UIOverrides } from "../../../../config/uiOverrides.context.js";
|
|
|
2
2
|
import { UIConfig } from "../../../../config/uiConfig.context.js";
|
|
3
3
|
import { FormFieldLabel } from "../../FormField/FormFieldLabel.js";
|
|
4
4
|
import { InputClear } from "../../shared/InputClear.js";
|
|
5
|
-
import {
|
|
5
|
+
import { inputBaseDefinition, inputSizeDefinition } from "../../shared/input.cva.js";
|
|
6
6
|
import { InputFrame } from "../../Skeleton/InputFrame.js";
|
|
7
7
|
import { useStaticInputHandoff } from "../../shared/useStaticInputHandoff.js";
|
|
8
8
|
import { getStaticNumberDisplayValue } from "../shared/numberStatic.utils.js";
|
|
@@ -29,8 +29,8 @@ var normalizeRangeValue = (value, minValue, maxValue) => {
|
|
|
29
29
|
var NumberRangeInputBase = (props) => {
|
|
30
30
|
const $ = c(114);
|
|
31
31
|
const ui = UIConfig.useConfig();
|
|
32
|
-
const inputBaseCva = UIOverrides.useCva("input.baseCva",
|
|
33
|
-
const inputSizeCva = UIOverrides.useCva("input.sizeCva",
|
|
32
|
+
const inputBaseCva = UIOverrides.useCva("input.baseCva", inputBaseDefinition);
|
|
33
|
+
const inputSizeCva = UIOverrides.useCva("input.sizeCva", inputSizeDefinition);
|
|
34
34
|
let asProp;
|
|
35
35
|
let autoFocusOnMount;
|
|
36
36
|
let className;
|
|
@@ -362,7 +362,7 @@ var NumberRangeInputBase = (props) => {
|
|
|
362
362
|
var NumberRangeInputInner = (t0) => {
|
|
363
363
|
const $ = c(5);
|
|
364
364
|
const { renderStaticInput, isFormControlDisabled, ...props } = t0;
|
|
365
|
-
const inputSizeCva = UIOverrides.useCva("input.sizeCva",
|
|
365
|
+
const inputSizeCva = UIOverrides.useCva("input.sizeCva", inputSizeDefinition);
|
|
366
366
|
const ui = UIConfig.useConfig();
|
|
367
367
|
const { locale } = useLocale();
|
|
368
368
|
const [renderInput, setRenderInput] = useState(!(renderStaticInput ?? ui.renderStaticInput));
|
|
@@ -3,10 +3,6 @@ export declare const textAreaWrapperDefinition: {
|
|
|
3
3
|
base: string[];
|
|
4
4
|
config?: import("../../../../utils/style-merge.util").StyleMergeUtils.Config<Record<never, never>>;
|
|
5
5
|
};
|
|
6
|
-
export declare const textAreaWrapper: {
|
|
7
|
-
base: string[];
|
|
8
|
-
config?: import("../../../../utils/style-merge.util").StyleMergeUtils.Config<Record<never, never>>;
|
|
9
|
-
};
|
|
10
6
|
export type TextAreaWrapperConfig = NonNullable<typeof textAreaWrapperDefinition.config>;
|
|
11
7
|
export interface TextAreaWrapperVariantProps extends UIOverrides.VariantProps<TextAreaWrapperConfig> {
|
|
12
8
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { UIOverrides } from "../../../../config/uiOverrides.context.js";
|
|
2
|
-
|
|
2
|
+
//#region src/components/inputs/Input/TextArea/TextArea.cva.ts
|
|
3
|
+
var textAreaWrapperDefinition = UIOverrides.defineConfig({ base: ["group/text-area relative h-full"] });
|
|
3
4
|
//#endregion
|
|
4
|
-
export {
|
|
5
|
+
export { textAreaWrapperDefinition };
|
|
@@ -5,7 +5,7 @@ import { InputClear } from "../../shared/InputClear.js";
|
|
|
5
5
|
import { inputSideDefinition, inputSizeDefinition, useInputCva } from "../../shared/input.cva.js";
|
|
6
6
|
import { FormField } from "../../FormField/FormField.js";
|
|
7
7
|
import { TooltipWrapper } from "../../shared/TooltipWrapper.js";
|
|
8
|
-
import {
|
|
8
|
+
import { textAreaWrapperDefinition } from "./TextArea.cva.js";
|
|
9
9
|
import { c } from "react/compiler-runtime";
|
|
10
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
11
|
import { clsx } from "clsx";
|
|
@@ -21,7 +21,7 @@ var TextAreaBase = (props) => {
|
|
|
21
21
|
const inputCva = useInputCva();
|
|
22
22
|
const inputSizeCva = UIOverrides.useCva("input.sizeCva", inputSizeDefinition);
|
|
23
23
|
const inputSideCva = UIOverrides.useCva("input.sideCva", inputSideDefinition);
|
|
24
|
-
const textAreaWrapperCva = UIOverrides.useCva("textArea.wrapperCva",
|
|
24
|
+
const textAreaWrapperCva = UIOverrides.useCva("textArea.wrapperCva", textAreaWrapperDefinition);
|
|
25
25
|
const { ref, className, inputClassName, error, label, tooltipText, helperText, isRequired, rightContent, isDisabled, isDirty, headerClassName, errorClassName, isHeaderHidden, value, onChange, onBlur, as: asProp, hideLabel: hideLabelProp, variant: variantProp, isClearable: isClearableProp, ...rest } = props;
|
|
26
26
|
const as = asProp ?? ui.input.as;
|
|
27
27
|
const hideLabel = hideLabelProp ?? ui.input.hideLabel;
|
|
@@ -4,7 +4,7 @@ import { Loader } from "../../../status/Loader/Loader.js";
|
|
|
4
4
|
import { InlineIconButton } from "../../../buttons/InlineIconButton/InlineIconButton.js";
|
|
5
5
|
import { FormFieldLabel } from "../../FormField/FormFieldLabel.js";
|
|
6
6
|
import { InputClear } from "../../shared/InputClear.js";
|
|
7
|
-
import {
|
|
7
|
+
import { inputContentWrapperDefinition, inputSizeDefinition } from "../../shared/input.cva.js";
|
|
8
8
|
import { c } from "react/compiler-runtime";
|
|
9
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
10
|
import { clsx } from "clsx";
|
|
@@ -15,7 +15,7 @@ var InputContent = (t0) => {
|
|
|
15
15
|
const { leadingIcon: LeadingIcon, trailingIcon: TrailingIcon, unit, isLoading, isDisabled, action, isClearable, value, onChange, onBlur, children, headerProps, as, size } = t0;
|
|
16
16
|
const typographyCva = UIOverrides.useCva("typography.cva", typographyDefinition);
|
|
17
17
|
const inputSizeCva = UIOverrides.useCva("input.sizeCva", inputSizeDefinition);
|
|
18
|
-
const inputContentWrapperCva = UIOverrides.useCva("input.contentWrapperCva",
|
|
18
|
+
const inputContentWrapperCva = UIOverrides.useCva("input.contentWrapperCva", inputContentWrapperDefinition);
|
|
19
19
|
let t1;
|
|
20
20
|
if ($[0] !== LeadingIcon) {
|
|
21
21
|
t1 = LeadingIcon && isValidElement(LeadingIcon);
|
|
@@ -14,7 +14,7 @@ declare const componentRegistry: {
|
|
|
14
14
|
readonly passwordInput: <TFieldValues extends import('react-hook-form').FieldValues>(props: import('../Input/PasswordInput/PasswordInput').ControlledPasswordInputProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
|
|
15
15
|
readonly textArea: <TFieldValues extends import('react-hook-form').FieldValues>(props: import('../Input/TextArea/TextArea').ControlledTextAreaProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
|
|
16
16
|
readonly select: typeof Select;
|
|
17
|
-
readonly querySelect: <TFieldValues extends import('react-hook-form').FieldValues, TQueryFn extends import('../Selection/shared/querySelect.utils').QueryFn, TKey extends import('react-aria').Key = import('react-aria').Key, TInitialSelectItem = import('../../..').DefaultInitialSelectItem<TKey>>(props: import('../Selection/Select/QuerySelect
|
|
17
|
+
readonly querySelect: <TFieldValues extends import('react-hook-form').FieldValues, TQueryFn extends import('../Selection/shared/querySelect.utils').QueryFn, TKey extends import('react-aria').Key = import('react-aria').Key, TInitialSelectItem = import('../../..').DefaultInitialSelectItem<TKey>>(props: import('../Selection/Select/QuerySelect').QuerySelectProps<TFieldValues, TQueryFn, TKey, TInitialSelectItem>) => import("react/jsx-runtime").JSX.Element;
|
|
18
18
|
readonly autocomplete: typeof Autocomplete;
|
|
19
19
|
readonly queryAutocomplete: <TFieldValues extends import('react-hook-form').FieldValues, TSelectItem extends import('../../..').SelectItem<any>, TQueryFn extends import('../Selection/Autocomplete/queryAutocomplete.types').QueryFn>(props: import('../Selection/Autocomplete/queryAutocomplete.types').QueryAutocompleteProps<TFieldValues, TSelectItem, TQueryFn>) => import("react/jsx-runtime").JSX.Element;
|
|
20
20
|
readonly segment: <TFieldValues extends import('react-hook-form').FieldValues, TKey extends import('react-aria').Key = import('react-aria').Key>(props: import('../../..').ControlledSegmentProps<TFieldValues, TKey>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,9 +2,9 @@ import { UIOverrides } from "../../../config/uiOverrides.context.js";
|
|
|
2
2
|
import { UIConfig } from "../../../config/uiConfig.context.js";
|
|
3
3
|
import { CheckContent } from "../shared/CheckContent.js";
|
|
4
4
|
import { FormFieldLabel } from "../FormField/FormFieldLabel.js";
|
|
5
|
-
import {
|
|
5
|
+
import { inputBaseDefinition, inputSizeDefinition } from "../shared/input.cva.js";
|
|
6
6
|
import { FormField } from "../FormField/FormField.js";
|
|
7
|
-
import { radioContentClassName,
|
|
7
|
+
import { radioContentClassName, radioContentRowDefinition, radioContentWrapperDefinition, radioDefinition, radioIndicatorClass, radioTypography } from "./radio.cva.js";
|
|
8
8
|
import { c } from "react/compiler-runtime";
|
|
9
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
10
|
import { clsx } from "clsx";
|
|
@@ -18,10 +18,10 @@ var RadioGroupBase = (props) => {
|
|
|
18
18
|
const ui = UIConfig.useConfig();
|
|
19
19
|
const radioCva = UIOverrides.useCva("radio.cva", radioDefinition);
|
|
20
20
|
const radioTypographyMap = UIOverrides.useMapper("radio.typography", radioTypography);
|
|
21
|
-
const radioContentWrapperCva = UIOverrides.useCva("radio.contentWrapperCva",
|
|
22
|
-
const radioContentRowCva = UIOverrides.useCva("radio.contentRowCva",
|
|
23
|
-
const inputBaseCva = UIOverrides.useCva("input.baseCva",
|
|
24
|
-
const inputSizeCva = UIOverrides.useCva("input.sizeCva",
|
|
21
|
+
const radioContentWrapperCva = UIOverrides.useCva("radio.contentWrapperCva", radioContentWrapperDefinition);
|
|
22
|
+
const radioContentRowCva = UIOverrides.useCva("radio.contentRowCva", radioContentRowDefinition);
|
|
23
|
+
const inputBaseCva = UIOverrides.useCva("input.baseCva", inputBaseDefinition);
|
|
24
|
+
const inputSizeCva = UIOverrides.useCva("input.sizeCva", inputSizeDefinition);
|
|
25
25
|
const radioContentClassNameMap = UIOverrides.useMapper("radio.contentClassName", radioContentClassName);
|
|
26
26
|
const { ref, label, tooltipText, helperText, isDirty, isRequired, rightContent, isDisabled, headerClassName, errorClassName, labelClassName, inputClassName, isHeaderHidden, error, className, options, value, defaultValue, onChange, onBlur, fireBlurOnChange: fireBlurOnChangeProp, as: asProp, size: sizeProp, variant: variantProp, hideLabel: hideLabelProp, ...rest } = props;
|
|
27
27
|
const as = asProp ?? ui.input.as;
|
|
@@ -11,14 +11,6 @@ export declare const radioDefinition: {
|
|
|
11
11
|
export type RadioConfig = NonNullable<typeof radioDefinition.config>;
|
|
12
12
|
export interface RadioVariantProps extends UIOverrides.VariantProps<RadioConfig> {
|
|
13
13
|
}
|
|
14
|
-
export declare const radio: {
|
|
15
|
-
base: string[];
|
|
16
|
-
config: import("../../../utils/style-merge.util").StyleMergeUtils.Config<{
|
|
17
|
-
readonly variant: {
|
|
18
|
-
readonly default: ["border-interactive-outlined-secondary-on-idle", "group-disabled:border-interactive-outlined-secondary-on-disabled", "group-hover:border-interactive-outlined-secondary-on-hover", "group-pressed:border-interactive-outlined-secondary-on-pressed", "group-selected:border-interactive-contained-primary-idle", "group-selected:bg-interactive-contained-primary-idle", "group-selected:group-disabled:bg-interactive-contained-primary-disabled", "group-selected:group-disabled:border-interactive-contained-primary-disabled", "group-invalid:border-interactive-outlined-error-on-idle", "group-focus-visible:outline-interactive-contained-primary-focus", "before:bg-interactive-contained-primary-on-idle", "group-hover:before:bg-interactive-contained-primary-on-hover", "group-selected:before:block"];
|
|
19
|
-
};
|
|
20
|
-
}>;
|
|
21
|
-
};
|
|
22
14
|
export declare const radioContentWrapperDefinition: {
|
|
23
15
|
base: string[];
|
|
24
16
|
config: import("../../../utils/style-merge.util").StyleMergeUtils.Config<{
|
|
@@ -37,24 +29,6 @@ export declare const radioContentWrapperDefinition: {
|
|
|
37
29
|
};
|
|
38
30
|
}>;
|
|
39
31
|
};
|
|
40
|
-
export declare const radioContentWrapper: {
|
|
41
|
-
base: string[];
|
|
42
|
-
config: import("../../../utils/style-merge.util").StyleMergeUtils.Config<{
|
|
43
|
-
readonly variant: {
|
|
44
|
-
readonly default: "";
|
|
45
|
-
};
|
|
46
|
-
readonly as: {
|
|
47
|
-
readonly default: "flex-col";
|
|
48
|
-
readonly floating: "flex-col";
|
|
49
|
-
readonly filter: "flex-row flex-wrap items-center gap-2";
|
|
50
|
-
readonly inline: "flex-row flex-wrap items-center gap-2";
|
|
51
|
-
};
|
|
52
|
-
readonly hasInputFrame: {
|
|
53
|
-
readonly true: "gap-2";
|
|
54
|
-
readonly false: "";
|
|
55
|
-
};
|
|
56
|
-
}>;
|
|
57
|
-
};
|
|
58
32
|
export type RadioContentWrapperConfig = NonNullable<typeof radioContentWrapperDefinition.config>;
|
|
59
33
|
export interface RadioContentWrapperVariantProps extends UIOverrides.VariantProps<RadioContentWrapperConfig> {
|
|
60
34
|
}
|
|
@@ -76,24 +50,6 @@ export declare const radioContentRowDefinition: {
|
|
|
76
50
|
};
|
|
77
51
|
}>;
|
|
78
52
|
};
|
|
79
|
-
export declare const radioContentRow: {
|
|
80
|
-
base: string[];
|
|
81
|
-
config: import("../../../utils/style-merge.util").StyleMergeUtils.Config<{
|
|
82
|
-
readonly variant: {
|
|
83
|
-
readonly default: "";
|
|
84
|
-
};
|
|
85
|
-
readonly as: {
|
|
86
|
-
readonly default: "flex-col";
|
|
87
|
-
readonly floating: "flex-col";
|
|
88
|
-
readonly filter: "flex-row flex-wrap items-center gap-2";
|
|
89
|
-
readonly inline: "flex-row flex-wrap items-center gap-2";
|
|
90
|
-
};
|
|
91
|
-
readonly hasInputFrame: {
|
|
92
|
-
readonly true: "gap-2";
|
|
93
|
-
readonly false: "";
|
|
94
|
-
};
|
|
95
|
-
}>;
|
|
96
|
-
};
|
|
97
53
|
export type RadioContentRowConfig = NonNullable<typeof radioContentRowDefinition.config>;
|
|
98
54
|
export interface RadioContentRowVariantProps extends UIOverrides.VariantProps<RadioContentRowConfig> {
|
|
99
55
|
}
|
|
@@ -28,7 +28,7 @@ var radioDefinition = UIOverrides.defineConfig({
|
|
|
28
28
|
defaultVariants: { variant: "default" }
|
|
29
29
|
}
|
|
30
30
|
});
|
|
31
|
-
var
|
|
31
|
+
var radioContentWrapperDefinition = UIOverrides.defineConfig({
|
|
32
32
|
base: ["relative flex"],
|
|
33
33
|
config: {
|
|
34
34
|
variants: {
|
|
@@ -51,7 +51,7 @@ var radioContentWrapper = UIOverrides.defineConfig({
|
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
});
|
|
54
|
-
var
|
|
54
|
+
var radioContentRowDefinition = UIOverrides.defineConfig({
|
|
55
55
|
base: ["flex"],
|
|
56
56
|
config: {
|
|
57
57
|
variants: {
|
|
@@ -82,4 +82,4 @@ var radioTypography = compoundMapper({ default: {
|
|
|
82
82
|
} });
|
|
83
83
|
var radioContentClassName = compoundMapper({ default: "text-text-default-2" });
|
|
84
84
|
//#endregion
|
|
85
|
-
export { radioContentClassName,
|
|
85
|
+
export { radioContentClassName, radioContentRowDefinition, radioContentWrapperDefinition, radioDefinition, radioIndicatorClass, radioTypography };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { UIOverrides } from "../../../../config/uiOverrides.context.js";
|
|
1
2
|
import { UIConfig } from "../../../../config/uiConfig.context.js";
|
|
2
3
|
import { InputFrame } from "../../Skeleton/InputFrame.js";
|
|
3
4
|
import { useStaticInputHandoff } from "../../shared/useStaticInputHandoff.js";
|
|
4
|
-
import {
|
|
5
|
+
import { selectInputTagsContentWrapperDefinition } from "../shared/selectInput.cva.js";
|
|
5
6
|
import { SelectBase } from "../shared/SelectBase.js";
|
|
6
7
|
import { StaticSelectTrailingContent } from "../shared/StaticSelectTrailingContent.js";
|
|
7
8
|
import { getStaticSelectValue } from "../shared/staticSelect.utils.js";
|
|
@@ -13,9 +14,10 @@ import { mergeRefs } from "@react-aria/utils";
|
|
|
13
14
|
import { Controller } from "react-hook-form";
|
|
14
15
|
//#region src/components/inputs/Selection/Autocomplete/Autocomplete.tsx
|
|
15
16
|
function AutocompleteInner(t0) {
|
|
16
|
-
const $ = c(
|
|
17
|
+
const $ = c(8);
|
|
17
18
|
const { renderStaticInput, isFormControlDisabled, ...props } = t0;
|
|
18
19
|
const ui = UIConfig.useConfig();
|
|
20
|
+
const selectInputTagsContentWrapperCva = UIOverrides.useCva("select.tagsContentWrapperCva", selectInputTagsContentWrapperDefinition);
|
|
19
21
|
const [renderInput, setRenderInput] = useState(!(renderStaticInput ?? ui.renderStaticInput));
|
|
20
22
|
const rootRef = useRef(null);
|
|
21
23
|
let t1;
|
|
@@ -74,10 +76,11 @@ function AutocompleteInner(t0) {
|
|
|
74
76
|
const t3 = clsx("w-full", props.containerClassName);
|
|
75
77
|
const t4 = clsx(props.className, props.inputClassName);
|
|
76
78
|
let t5;
|
|
77
|
-
if ($[2]
|
|
79
|
+
if ($[2] !== selectInputTagsContentWrapperCva) {
|
|
78
80
|
t5 = selectInputTagsContentWrapperCva({ isSearchable: true });
|
|
79
|
-
$[2] =
|
|
80
|
-
|
|
81
|
+
$[2] = selectInputTagsContentWrapperCva;
|
|
82
|
+
$[3] = t5;
|
|
83
|
+
} else t5 = $[3];
|
|
81
84
|
return /* @__PURE__ */ jsx(InputFrame, {
|
|
82
85
|
...props,
|
|
83
86
|
isDisabled: t2,
|
|
@@ -115,17 +118,17 @@ function AutocompleteInner(t0) {
|
|
|
115
118
|
const T0 = SelectBase;
|
|
116
119
|
const t2 = mergeRefs(props.ref, rootRef);
|
|
117
120
|
let t3;
|
|
118
|
-
if ($[
|
|
121
|
+
if ($[4] !== T0 || $[5] !== props || $[6] !== t2) {
|
|
119
122
|
t3 = /* @__PURE__ */ jsx(T0, {
|
|
120
123
|
...props,
|
|
121
124
|
ref: t2,
|
|
122
125
|
isSearchable: true
|
|
123
126
|
});
|
|
124
|
-
$[
|
|
125
|
-
$[
|
|
126
|
-
$[
|
|
127
|
-
$[
|
|
128
|
-
} else t3 = $[
|
|
127
|
+
$[4] = T0;
|
|
128
|
+
$[5] = props;
|
|
129
|
+
$[6] = t2;
|
|
130
|
+
$[7] = t3;
|
|
131
|
+
} else t3 = $[7];
|
|
129
132
|
return t3;
|
|
130
133
|
}
|
|
131
134
|
function _temp(root) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UIConfig } from "../../../../config/uiConfig.context.js";
|
|
2
2
|
import { Autocomplete } from "./Autocomplete.js";
|
|
3
|
-
import { getQueryItems,
|
|
3
|
+
import { getQueryItems, getSelectionIdsToResolve } from "../shared/querySelect.utils.js";
|
|
4
4
|
import { useQueryAutocomplete } from "../../../../hooks/useQueryAutocomplete.js";
|
|
5
5
|
import { c } from "react/compiler-runtime";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -13,25 +13,28 @@ var QueryAutocompleteContent = ({ query, queryParams, queryOptions, queryMap, le
|
|
|
13
13
|
const ui = UIConfig.useConfig();
|
|
14
14
|
const [search, setSearch] = useState("");
|
|
15
15
|
const { onChange, ...restProps } = props;
|
|
16
|
+
const value = "value" in props ? props.value : void 0;
|
|
17
|
+
const selectedIdsToResolve = getSelectionIdsToResolve({
|
|
18
|
+
initialSelection: props.initialSelection,
|
|
19
|
+
value,
|
|
20
|
+
mapInitialToSelectItem: props.mapInitialToSelectItem
|
|
21
|
+
});
|
|
16
22
|
const { items, totalItems, isLoading, handleEnableQuery, hasNextPage, fetchNextPage } = useQueryAutocomplete({
|
|
17
23
|
query,
|
|
18
24
|
queryParams,
|
|
19
25
|
queryOptions,
|
|
20
26
|
mapItems: (data) => getQueryItems(data, queryMap),
|
|
21
27
|
search,
|
|
22
|
-
initialQueryState:
|
|
23
|
-
|
|
24
|
-
value: "value" in props ? props.value : void 0,
|
|
25
|
-
mapInitialToSelectItem: props.mapInitialToSelectItem
|
|
26
|
-
}) ? false : props.isInitialQueryDisabled ?? ui.queryAutocomplete?.isInitialQueryDisabled
|
|
28
|
+
initialQueryState: selectedIdsToResolve.count > 0 ? false : props.isInitialQueryDisabled ?? ui.queryAutocomplete?.isInitialQueryDisabled,
|
|
29
|
+
selectedIdsToResolve: selectedIdsToResolve.items
|
|
27
30
|
});
|
|
28
|
-
const handleChange = (
|
|
29
|
-
onChange?.(
|
|
31
|
+
const handleChange = (value_0) => {
|
|
32
|
+
onChange?.(value_0);
|
|
30
33
|
props.onBlur?.({ target: { value: null } });
|
|
31
34
|
};
|
|
32
35
|
const { isInitialQueryDisabled: _, ...autocompleteProps } = restProps;
|
|
33
|
-
const onSearchChange = (
|
|
34
|
-
setSearch(
|
|
36
|
+
const onSearchChange = (value_1) => {
|
|
37
|
+
setSearch(value_1);
|
|
35
38
|
handleEnableQuery();
|
|
36
39
|
};
|
|
37
40
|
return /* @__PURE__ */ jsx(Autocomplete, {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UIConfig } from "../../../../config/uiConfig.context.js";
|
|
2
2
|
import { Select } from "./Select.js";
|
|
3
|
-
import { getQueryItems,
|
|
3
|
+
import { getQueryItems, getSelectionIdsToResolve } from "../shared/querySelect.utils.js";
|
|
4
4
|
import { useQueryAutocomplete } from "../../../../hooks/useQueryAutocomplete.js";
|
|
5
5
|
import { c } from "react/compiler-runtime";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -9,11 +9,18 @@ import { mergeRefs } from "@react-aria/utils";
|
|
|
9
9
|
import { Controller } from "react-hook-form";
|
|
10
10
|
//#region src/components/inputs/Selection/Select/QuerySelect.tsx
|
|
11
11
|
var QuerySelectContent = (t0) => {
|
|
12
|
-
const $ = c(
|
|
12
|
+
const $ = c(29);
|
|
13
13
|
const { query, queryParams, queryOptions, queryMap, ...props } = t0;
|
|
14
14
|
const ui = UIConfig.useConfig();
|
|
15
15
|
const [search, setSearch] = useState("");
|
|
16
16
|
const isSearchable = props.isSearchable ?? ui.select.isSearchable;
|
|
17
|
+
const value = "value" in props ? props.value : void 0;
|
|
18
|
+
const selectedIdsToResolve = getSelectionIdsToResolve({
|
|
19
|
+
initialSelection: props.initialSelection,
|
|
20
|
+
value,
|
|
21
|
+
mapInitialToSelectItem: props.mapInitialToSelectItem
|
|
22
|
+
});
|
|
23
|
+
const shouldEnableInitialQuery = selectedIdsToResolve.count > 0;
|
|
17
24
|
let t1;
|
|
18
25
|
if ($[0] !== queryMap) {
|
|
19
26
|
t1 = (data) => getQueryItems(data, queryMap);
|
|
@@ -21,68 +28,66 @@ var QuerySelectContent = (t0) => {
|
|
|
21
28
|
$[1] = t1;
|
|
22
29
|
} else t1 = $[1];
|
|
23
30
|
const t2 = isSearchable ? search : void 0;
|
|
24
|
-
const t3 =
|
|
25
|
-
initialSelection: props.initialSelection,
|
|
26
|
-
value: "value" in props ? props.value : void 0,
|
|
27
|
-
mapInitialToSelectItem: props.mapInitialToSelectItem
|
|
28
|
-
}) ? false : props.isInitialQueryDisabled ?? ui.querySelect?.isInitialQueryDisabled;
|
|
31
|
+
const t3 = shouldEnableInitialQuery ? false : props.isInitialQueryDisabled ?? ui.querySelect?.isInitialQueryDisabled;
|
|
29
32
|
let t4;
|
|
30
|
-
if ($[2] !== query || $[3] !== queryOptions || $[4] !== queryParams || $[5] !==
|
|
33
|
+
if ($[2] !== query || $[3] !== queryOptions || $[4] !== queryParams || $[5] !== selectedIdsToResolve.items || $[6] !== t1 || $[7] !== t2 || $[8] !== t3) {
|
|
31
34
|
t4 = {
|
|
32
35
|
query,
|
|
33
36
|
queryParams,
|
|
34
37
|
queryOptions,
|
|
35
38
|
mapItems: t1,
|
|
36
39
|
search: t2,
|
|
37
|
-
initialQueryState: t3
|
|
40
|
+
initialQueryState: t3,
|
|
41
|
+
selectedIdsToResolve: selectedIdsToResolve.items
|
|
38
42
|
};
|
|
39
43
|
$[2] = query;
|
|
40
44
|
$[3] = queryOptions;
|
|
41
45
|
$[4] = queryParams;
|
|
42
|
-
$[5] =
|
|
43
|
-
$[6] =
|
|
44
|
-
$[7] =
|
|
45
|
-
$[8] =
|
|
46
|
-
|
|
46
|
+
$[5] = selectedIdsToResolve.items;
|
|
47
|
+
$[6] = t1;
|
|
48
|
+
$[7] = t2;
|
|
49
|
+
$[8] = t3;
|
|
50
|
+
$[9] = t4;
|
|
51
|
+
} else t4 = $[9];
|
|
47
52
|
const { items, totalItems, isLoading, handleEnableQuery, hasNextPage, fetchNextPage } = useQueryAutocomplete(t4);
|
|
48
53
|
let onSearchChange;
|
|
49
54
|
let selectProps;
|
|
50
|
-
if ($[
|
|
55
|
+
if ($[10] !== props) {
|
|
51
56
|
const { isInitialQueryDisabled: _, onSearchChange: t5, ...t6 } = props;
|
|
52
57
|
onSearchChange = t5;
|
|
53
58
|
selectProps = t6;
|
|
54
|
-
$[
|
|
55
|
-
$[
|
|
56
|
-
$[
|
|
59
|
+
$[10] = props;
|
|
60
|
+
$[11] = onSearchChange;
|
|
61
|
+
$[12] = selectProps;
|
|
57
62
|
} else {
|
|
58
|
-
onSearchChange = $[
|
|
59
|
-
selectProps = $[
|
|
63
|
+
onSearchChange = $[11];
|
|
64
|
+
selectProps = $[12];
|
|
60
65
|
}
|
|
61
66
|
let t5;
|
|
62
|
-
if ($[
|
|
63
|
-
t5 = (
|
|
64
|
-
setSearch(
|
|
67
|
+
if ($[13] !== handleEnableQuery || $[14] !== onSearchChange || $[15] !== setSearch) {
|
|
68
|
+
t5 = (value_0) => {
|
|
69
|
+
setSearch(value_0);
|
|
65
70
|
handleEnableQuery();
|
|
66
|
-
onSearchChange?.(
|
|
71
|
+
onSearchChange?.(value_0);
|
|
67
72
|
};
|
|
68
|
-
$[
|
|
69
|
-
$[
|
|
70
|
-
$[
|
|
71
|
-
$[
|
|
72
|
-
} else t5 = $[
|
|
73
|
+
$[13] = handleEnableQuery;
|
|
74
|
+
$[14] = onSearchChange;
|
|
75
|
+
$[15] = setSearch;
|
|
76
|
+
$[16] = t5;
|
|
77
|
+
} else t5 = $[16];
|
|
73
78
|
const handleSearchChange = t5;
|
|
74
79
|
let t6;
|
|
75
|
-
if ($[
|
|
80
|
+
if ($[17] !== handleSearchChange || $[18] !== isSearchable) {
|
|
76
81
|
t6 = isSearchable && {
|
|
77
82
|
isClientSearchDisabled: true,
|
|
78
83
|
onSearchChange: handleSearchChange
|
|
79
84
|
};
|
|
80
|
-
$[
|
|
81
|
-
$[
|
|
82
|
-
$[
|
|
83
|
-
} else t6 = $[
|
|
85
|
+
$[17] = handleSearchChange;
|
|
86
|
+
$[18] = isSearchable;
|
|
87
|
+
$[19] = t6;
|
|
88
|
+
} else t6 = $[19];
|
|
84
89
|
let t7;
|
|
85
|
-
if ($[
|
|
90
|
+
if ($[20] !== fetchNextPage || $[21] !== handleEnableQuery || $[22] !== hasNextPage || $[23] !== isLoading || $[24] !== items || $[25] !== selectProps || $[26] !== t6 || $[27] !== totalItems) {
|
|
86
91
|
t7 = /* @__PURE__ */ jsx(Select, {
|
|
87
92
|
...selectProps,
|
|
88
93
|
items,
|
|
@@ -94,16 +99,16 @@ var QuerySelectContent = (t0) => {
|
|
|
94
99
|
onFocusCapture: handleEnableQuery,
|
|
95
100
|
...t6
|
|
96
101
|
});
|
|
97
|
-
$[
|
|
98
|
-
$[
|
|
99
|
-
$[
|
|
100
|
-
$[
|
|
101
|
-
$[
|
|
102
|
-
$[
|
|
103
|
-
$[
|
|
104
|
-
$[
|
|
105
|
-
$[
|
|
106
|
-
} else t7 = $[
|
|
102
|
+
$[20] = fetchNextPage;
|
|
103
|
+
$[21] = handleEnableQuery;
|
|
104
|
+
$[22] = hasNextPage;
|
|
105
|
+
$[23] = isLoading;
|
|
106
|
+
$[24] = items;
|
|
107
|
+
$[25] = selectProps;
|
|
108
|
+
$[26] = t6;
|
|
109
|
+
$[27] = totalItems;
|
|
110
|
+
$[28] = t7;
|
|
111
|
+
} else t7 = $[28];
|
|
107
112
|
return t7;
|
|
108
113
|
};
|
|
109
114
|
var QuerySelect = (props) => {
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { UIOverrides } from "../../../../config/uiOverrides.context.js";
|
|
1
2
|
import { Typography } from "../../../text/Typography/Typography.js";
|
|
2
3
|
import { UIConfig } from "../../../../config/uiConfig.context.js";
|
|
3
4
|
import { InputFrame } from "../../Skeleton/InputFrame.js";
|
|
4
5
|
import { useStaticInputHandoff } from "../../shared/useStaticInputHandoff.js";
|
|
5
|
-
import {
|
|
6
|
+
import { selectInputTagsContentWrapperDefinition } from "../shared/selectInput.cva.js";
|
|
6
7
|
import { SelectBase } from "../shared/SelectBase.js";
|
|
7
8
|
import { StaticSelectTrailingContent } from "../shared/StaticSelectTrailingContent.js";
|
|
8
9
|
import { getStaticSelectValue } from "../shared/staticSelect.utils.js";
|
|
@@ -17,6 +18,7 @@ function SelectInner(t0) {
|
|
|
17
18
|
const $ = c(6);
|
|
18
19
|
const { renderStaticInput, isFormControlDisabled, ...props } = t0;
|
|
19
20
|
const ui = UIConfig.useConfig();
|
|
21
|
+
const selectInputTagsContentWrapperCva = UIOverrides.useCva("select.tagsContentWrapperCva", selectInputTagsContentWrapperDefinition);
|
|
20
22
|
const [renderInput, setRenderInput] = useState(!(renderStaticInput ?? ui.renderStaticInput));
|
|
21
23
|
const rootRef = useRef(null);
|
|
22
24
|
let t1;
|
|
@@ -6,7 +6,7 @@ import "./useSelectItems.js";
|
|
|
6
6
|
import { SelectContext } from "./select.context.js";
|
|
7
7
|
import { SelectInput } from "./SelectInput.js";
|
|
8
8
|
import { SelectListBox } from "./SelectListBox.js";
|
|
9
|
-
import {
|
|
9
|
+
import { selectPopoverDefinition } from "./selectDesktop.cva.js";
|
|
10
10
|
import { c } from "react/compiler-runtime";
|
|
11
11
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
12
|
import { clsx } from "clsx";
|
|
@@ -63,7 +63,7 @@ var SelectDesktop = (t0) => {
|
|
|
63
63
|
}
|
|
64
64
|
const { label, tooltipText, helperText, isDirty, isRequired, rightContent, isHeaderHidden, headerClassName, errorClassName, placeholder, variant, isDisabled, className, hideLabel, hideDropdownIcon, isSearchable, isClearable, isLoading, as, size, collapseAfter, selectedTagsType } = props;
|
|
65
65
|
const popoverCva = UIOverrides.useCva("popover.cva", popoverDefinition);
|
|
66
|
-
const selectPopoverCva
|
|
66
|
+
const selectPopoverCva = UIOverrides.useCva("select.popoverCva", selectPopoverDefinition);
|
|
67
67
|
const t1 = isHeaderHidden || as === "inline" || as === "filter" || as === "floating";
|
|
68
68
|
let t2;
|
|
69
69
|
if ($[14] !== error || $[15] !== errorClassName || $[16] !== headerClassName || $[17] !== helperText || $[18] !== hideLabel || $[19] !== isDisabled || $[20] !== isRequired || $[21] !== label || $[22] !== rightContent || $[23] !== t1 || $[24] !== tooltipText) {
|
|
@@ -342,12 +342,12 @@ var SelectDesktop = (t0) => {
|
|
|
342
342
|
$[102] = t21;
|
|
343
343
|
} else t21 = $[102];
|
|
344
344
|
let t22;
|
|
345
|
-
if ($[103] !== ignoreTriggerWidth || $[104] !== isOpen || $[105] !== isSearchable || $[106] !== popoverCva || $[107] !== popoverWidth || $[108] !== props || $[109] !== selectPopoverCva
|
|
345
|
+
if ($[103] !== ignoreTriggerWidth || $[104] !== isOpen || $[105] !== isSearchable || $[106] !== popoverCva || $[107] !== popoverWidth || $[108] !== props || $[109] !== selectPopoverCva || $[110] !== setIsOpen || $[111] !== showPopover) {
|
|
346
346
|
t22 = (!isSearchable || showPopover) && /* @__PURE__ */ jsx(Popover, {
|
|
347
347
|
triggerRef,
|
|
348
348
|
isOpen,
|
|
349
349
|
onOpenChange: setIsOpen,
|
|
350
|
-
className: selectPopoverCva
|
|
350
|
+
className: selectPopoverCva({}),
|
|
351
351
|
style: { width: !ignoreTriggerWidth ? popoverWidth : void 0 },
|
|
352
352
|
offset: 0,
|
|
353
353
|
children: /* @__PURE__ */ jsx(SelectListBox, {
|
|
@@ -362,7 +362,7 @@ var SelectDesktop = (t0) => {
|
|
|
362
362
|
$[106] = popoverCva;
|
|
363
363
|
$[107] = popoverWidth;
|
|
364
364
|
$[108] = props;
|
|
365
|
-
$[109] = selectPopoverCva
|
|
365
|
+
$[109] = selectPopoverCva;
|
|
366
366
|
$[110] = setIsOpen;
|
|
367
367
|
$[111] = showPopover;
|
|
368
368
|
$[112] = t22;
|