@povio/ui 2.2.9-rc.9 → 2.2.11
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/Button/Button.d.ts +2 -2
- package/dist/components/buttons/Button/Button.js +1 -1
- package/dist/components/buttons/PillButton/PillButton.d.ts +2 -2
- package/dist/components/buttons/PillButton/PillButton.js +1 -1
- package/dist/components/buttons/TextButton/TextButton.d.ts +2 -1
- package/dist/components/buttons/ToggleButton/ToggleButton.d.ts +2 -1
- package/dist/components/buttons/shared/ButtonContent.d.ts +3 -3
- package/dist/components/buttons/shared/ButtonContent.js +2 -2
- package/dist/components/inputs/Checkbox/Checkbox.js +1 -6
- package/dist/components/inputs/Checkbox/checkbox.cva.d.ts +0 -3
- package/dist/components/inputs/Checkbox/checkbox.cva.js +1 -2
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.d.ts +9 -8
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +82 -35
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.d.ts +4 -7
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +5 -15
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.d.ts +8 -7
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +42 -23
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.d.ts +3 -3
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.js +14 -21
- package/dist/components/inputs/DateTime/shared/Calendar.d.ts +6 -1
- package/dist/components/inputs/DateTime/shared/Calendar.js +85 -12
- package/dist/components/inputs/DateTime/shared/CalendarHeader.d.ts +2 -1
- package/dist/components/inputs/DateTime/shared/CalendarHeader.js +28 -4
- package/dist/components/inputs/DateTime/shared/DateField.d.ts +5 -1
- package/dist/components/inputs/DateTime/shared/DateField.js +54 -14
- package/dist/components/inputs/DateTime/shared/DatePickerInput.d.ts +7 -5
- package/dist/components/inputs/DateTime/shared/DatePickerInput.js +20 -18
- package/dist/components/inputs/DateTime/shared/MonthPicker.d.ts +5 -1
- package/dist/components/inputs/DateTime/shared/MonthPicker.js +40 -8
- package/dist/components/inputs/DateTime/shared/TimePickerInput.d.ts +1 -2
- package/dist/components/inputs/DateTime/shared/TimePickerInput.js +2 -7
- package/dist/components/inputs/DateTime/shared/YearPicker.d.ts +5 -1
- package/dist/components/inputs/DateTime/shared/YearPicker.js +42 -8
- package/dist/components/inputs/FormField/FormFieldHeader.js +1 -3
- package/dist/components/inputs/Input/NumberInput/NumberInput.js +0 -1
- package/dist/components/inputs/Input/TextInput/TextInput.js +0 -3
- package/dist/components/inputs/Inputs/InputItem.d.ts +16 -10
- package/dist/components/inputs/Inputs/InputItem.js +0 -4
- package/dist/components/inputs/RadioGroup/RadioGroup.js +1 -6
- package/dist/components/inputs/RadioGroup/radio.cva.d.ts +0 -3
- package/dist/components/inputs/RadioGroup/radio.cva.js +1 -2
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.d.ts +1 -3
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.js +3 -4
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.d.ts +18 -3
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +7 -23
- package/dist/components/inputs/Selection/Select/Select.d.ts +2 -4
- package/dist/components/inputs/Selection/Select/Select.js +3 -4
- package/dist/components/inputs/Selection/shared/SelectBase.d.ts +1 -8
- package/dist/components/inputs/Selection/shared/SelectBase.js +1 -3
- package/dist/components/inputs/Selection/shared/SelectDesktop.d.ts +1 -1
- package/dist/components/inputs/Selection/shared/SelectDesktop.js +2 -8
- package/dist/components/inputs/Selection/shared/SelectInput.d.ts +2 -2
- package/dist/components/inputs/Selection/shared/SelectInput.js +3 -23
- package/dist/components/inputs/Selection/shared/SelectMobile.d.ts +1 -1
- package/dist/components/inputs/Selection/shared/SelectMobile.js +5 -10
- package/dist/components/inputs/Selection/shared/select.context.d.ts +2 -3
- package/dist/components/inputs/Selection/shared/select.context.js +4 -22
- package/dist/components/inputs/Selection/shared/select.types.d.ts +2 -2
- package/dist/components/inputs/TextEditor/TextEditor.d.ts +0 -1
- package/dist/components/inputs/TextEditor/TextEditor.js +3 -7
- package/dist/components/inputs/Toggle/Toggle.js +1 -6
- package/dist/components/inputs/Toggle/toggle.cva.d.ts +0 -3
- package/dist/components/inputs/Toggle/toggle.cva.js +1 -2
- package/dist/components/inputs/shared/CheckContent.d.ts +1 -2
- package/dist/components/inputs/shared/CheckContent.js +4 -3
- package/dist/components/overlays/BottomSheet/BottomSheet.js +1 -2
- package/dist/components/overlays/Tooltip/TooltipEllipsis.d.ts +2 -2
- package/dist/config/link.context.js +4 -2
- package/dist/config/uiConfig.context.d.ts +2 -8
- package/dist/config/uiConfig.context.js +3 -5
- package/dist/config/uiStyle.context.d.ts +1 -6
- package/dist/helpers/dynamicInputs.d.ts +5 -5
- package/dist/helpers/dynamicInputs.js +0 -3
- package/dist/index.d.ts +0 -4
- package/dist/index.js +4 -5
- package/dist/utils/date-time.utils.d.ts +7 -6
- package/dist/utils/date-time.utils.js +66 -16
- package/package.json +1 -1
- package/dist/components/inputs/DateTime/shared/datePicker.types.d.ts +0 -3
- package/dist/components/inputs/FormField/formFieldHeader.cva.d.ts +0 -6
- package/dist/components/inputs/FormField/formFieldHeader.cva.js +0 -11
- package/dist/components/inputs/Selection/Autocomplete/queryAutocomplete.types.d.ts +0 -30
- package/dist/components/inputs/Selection/Select/QuerySelect.d.ts +0 -14
- package/dist/components/inputs/Selection/Select/QuerySelect.js +0 -56
- package/dist/components/inputs/Selection/shared/querySelect.utils.d.ts +0 -6
- package/dist/components/inputs/Selection/shared/querySelect.utils.js +0 -13
- package/dist/hooks/useQueryAutocomplete.d.ts +0 -25
- package/dist/hooks/useQueryAutocomplete.js +0 -41
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import { ReactElement } from 'react';
|
|
2
1
|
import { Key } from 'react-aria-components';
|
|
3
2
|
import { FieldValues } from 'react-hook-form';
|
|
4
3
|
import { SelectBaseProps } from '../shared/SelectBase';
|
|
5
4
|
import { DefaultInitialSelectItem, GroupedSelectControlProps, GroupedSelectProps, SelectAsyncProps } from '../shared/select.types';
|
|
6
5
|
import { OmitDiscriminatedUnion } from '../../../../types/common';
|
|
7
6
|
export type SelectProps<TKey extends Key = Key, TInitialSelectItem = DefaultInitialSelectItem<TKey>> = OmitDiscriminatedUnion<SelectBaseProps<TKey, TInitialSelectItem>, "initialSelection" | "mapInitialToSelectItem" | keyof SelectAsyncProps>;
|
|
8
|
-
export type ControlledSelectProps<TFieldValues extends FieldValues, TKey extends Key = Key, TInitialSelectItem = DefaultInitialSelectItem<TKey>> = Omit<SelectProps<TKey, TInitialSelectItem>, keyof GroupedSelectProps> & GroupedSelectControlProps<TFieldValues, TKey
|
|
9
|
-
export declare
|
|
10
|
-
export declare function Select<TFieldValues extends FieldValues, TKey extends Key = Key, TInitialSelectItem = DefaultInitialSelectItem<TKey>>(props: ControlledSelectProps<TFieldValues, TKey, TInitialSelectItem>): ReactElement;
|
|
7
|
+
export type ControlledSelectProps<TFieldValues extends FieldValues, TKey extends Key = Key, TInitialSelectItem = DefaultInitialSelectItem<TKey>> = Omit<SelectProps<TKey, TInitialSelectItem>, keyof GroupedSelectProps> & GroupedSelectControlProps<TFieldValues, TKey>;
|
|
8
|
+
export declare const Select: <TFieldValues extends FieldValues, TKey extends Key = Key, TInitialSelectItem = DefaultInitialSelectItem<TKey>>(props: ControlledSelectProps<TFieldValues, TKey, TInitialSelectItem>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,25 +3,24 @@ import { jsx } from "react/jsx-runtime";
|
|
|
3
3
|
import { mergeRefs } from "@react-aria/utils";
|
|
4
4
|
import { Controller } from "react-hook-form";
|
|
5
5
|
//#region src/components/inputs/Selection/Select/Select.tsx
|
|
6
|
-
|
|
6
|
+
var Select = (props) => {
|
|
7
7
|
if ("formControl" in props && props.formControl) {
|
|
8
8
|
const { formControl, ref, ...innerProps } = props;
|
|
9
9
|
return /* @__PURE__ */ jsx(Controller, {
|
|
10
10
|
control: formControl.control,
|
|
11
11
|
name: formControl.name,
|
|
12
|
-
render: ({ field, fieldState: { error
|
|
12
|
+
render: ({ field, fieldState: { error } }) => /* @__PURE__ */ jsx(SelectBase, {
|
|
13
13
|
...innerProps,
|
|
14
14
|
ref: mergeRefs(ref, field.ref),
|
|
15
15
|
value: field.value,
|
|
16
16
|
onChange: field.onChange,
|
|
17
17
|
onBlur: field.onBlur,
|
|
18
|
-
isDirty,
|
|
19
18
|
isDisabled: field.disabled || props.isDisabled,
|
|
20
19
|
error: props.error ?? error?.message
|
|
21
20
|
})
|
|
22
21
|
});
|
|
23
22
|
}
|
|
24
23
|
return /* @__PURE__ */ jsx(SelectBase, { ...props });
|
|
25
|
-
}
|
|
24
|
+
};
|
|
26
25
|
//#endregion
|
|
27
26
|
export { Select };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ReactElement, Ref } from 'react';
|
|
2
2
|
import { AriaButtonProps } from 'react-aria';
|
|
3
3
|
import { Key } from 'react-aria-components';
|
|
4
4
|
import { FormFieldProps } from '../../FormField/FormField';
|
|
@@ -7,28 +7,21 @@ import { InputVariantProps } from '../../shared/input.cva';
|
|
|
7
7
|
export type SelectBaseProps<TKey extends Key = Key, TInitialSelectItem = DefaultInitialSelectItem<TKey>> = FormFieldProps & GroupedSelectProps<TKey, TInitialSelectItem> & SelectNewItemProps & SelectAsyncProps & SelectVirtualizationProps & InputVariantProps & Pick<AriaButtonProps, "onBlur"> & {
|
|
8
8
|
ref?: Ref<HTMLDivElement>;
|
|
9
9
|
className?: string;
|
|
10
|
-
isDirty?: boolean;
|
|
11
10
|
placeholder?: string;
|
|
12
11
|
hideDropdownIcon?: boolean;
|
|
13
12
|
hideSearchIcon?: boolean;
|
|
14
13
|
isSearchable?: boolean;
|
|
15
14
|
isClearable?: boolean;
|
|
16
15
|
isClientSearchDisabled?: boolean;
|
|
17
|
-
ignoreInputValueFiltering?: boolean;
|
|
18
16
|
ignoreTriggerWidth?: boolean;
|
|
19
17
|
items: SelectItem<TKey>[];
|
|
20
18
|
inputClassName?: string;
|
|
21
19
|
containerClassName?: string;
|
|
22
|
-
leadingContent?: ReactNode;
|
|
23
|
-
trailingContent?: ReactNode;
|
|
24
20
|
customTrigger?: ReactElement;
|
|
25
21
|
selectedTagsType?: "tags" | "list";
|
|
26
22
|
collapseAfter?: number;
|
|
27
|
-
fireBlurOnChange?: boolean;
|
|
28
23
|
onInputChange?: (value: string) => void;
|
|
29
24
|
onSearchChange?: (value: string) => void;
|
|
30
25
|
mapInitialToSelectItem?: (item: TInitialSelectItem) => SelectItem<TKey>;
|
|
31
|
-
onMouseEnter?: MouseEventHandler<HTMLDivElement>;
|
|
32
|
-
onFocusCapture?: FocusEventHandler<HTMLDivElement>;
|
|
33
26
|
};
|
|
34
27
|
export declare const SelectBase: <TKey extends Key = Key, TInitialSelectItem = DefaultInitialSelectItem<TKey>>(dProps: SelectBaseProps<TKey, TInitialSelectItem>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -19,9 +19,7 @@ var SelectBase = (dProps) => {
|
|
|
19
19
|
selectedTagsType: dProps.selectedTagsType ?? ui.select.selectedTagsType,
|
|
20
20
|
ignoreTriggerWidth: dProps.virtualizerOptions || dProps.items.length > 100 ? false : dProps.ignoreTriggerWidth ?? false,
|
|
21
21
|
collapseAfter: dProps.collapseAfter ?? ui.select.collapseAfter,
|
|
22
|
-
hideSearchIcon: dProps.hideSearchIcon ?? ui.select.hideSearchIcon
|
|
23
|
-
fireBlurOnChange: dProps.fireBlurOnChange ?? ui.select.fireBlurOnChange,
|
|
24
|
-
isClientSearchDisabled: dProps.ignoreInputValueFiltering ?? dProps.isClientSearchDisabled
|
|
22
|
+
hideSearchIcon: dProps.hideSearchIcon ?? ui.select.hideSearchIcon
|
|
25
23
|
};
|
|
26
24
|
const isDesktop = useBreakpoint("md");
|
|
27
25
|
return /* @__PURE__ */ jsx(SelectContext.Provider, {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Key } from 'react-aria-components';
|
|
2
2
|
import { SelectBaseProps } from './SelectBase';
|
|
3
3
|
type SelectDesktopProps<TKey extends Key = Key> = SelectBaseProps<TKey>;
|
|
4
|
-
export declare const SelectDesktop: <TKey extends Key = Key>({ ref, error, ignoreTriggerWidth, showSelectionContent, inputClassName, containerClassName,
|
|
4
|
+
export declare const SelectDesktop: <TKey extends Key = Key>({ ref, error, ignoreTriggerWidth, showSelectionContent, inputClassName, containerClassName, customTrigger, onBlur, ...props }: SelectDesktopProps<TKey>) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
export {};
|
|
@@ -13,8 +13,8 @@ import { ComboBox, DialogTrigger, Popover } from "react-aria-components";
|
|
|
13
13
|
import { useLabel, usePreventScroll } from "react-aria";
|
|
14
14
|
import { mergeRefs } from "@react-aria/utils";
|
|
15
15
|
//#region src/components/inputs/Selection/shared/SelectDesktop.tsx
|
|
16
|
-
var SelectDesktop = ({ ref, error, ignoreTriggerWidth, showSelectionContent, inputClassName, containerClassName,
|
|
17
|
-
const { label, tooltipText, helperText,
|
|
16
|
+
var SelectDesktop = ({ ref, error, ignoreTriggerWidth, showSelectionContent, inputClassName, containerClassName, customTrigger, onBlur, ...props }) => {
|
|
17
|
+
const { label, tooltipText, helperText, isRequired, rightContent, isHeaderHidden, headerClassName, errorClassName, placeholder, variant, isDisabled, className, hideLabel, hideDropdownIcon, isSearchable, isClearable, isLoading, as, size, collapseAfter, selectedTagsType } = props;
|
|
18
18
|
const popoverCva = UIStyle.useCva("popover.cva", popover);
|
|
19
19
|
const formFieldProps = {
|
|
20
20
|
error,
|
|
@@ -119,8 +119,6 @@ var SelectDesktop = ({ ref, error, ignoreTriggerWidth, showSelectionContent, inp
|
|
|
119
119
|
children: /* @__PURE__ */ jsx("div", {
|
|
120
120
|
...fieldProps,
|
|
121
121
|
ref: mergeRefs(ref, triggerRef),
|
|
122
|
-
onMouseEnter,
|
|
123
|
-
onFocusCapture,
|
|
124
122
|
children: customTrigger
|
|
125
123
|
})
|
|
126
124
|
}) : /* @__PURE__ */ jsx(SelectInput, {
|
|
@@ -137,12 +135,8 @@ var SelectDesktop = ({ ref, error, ignoreTriggerWidth, showSelectionContent, inp
|
|
|
137
135
|
isClearable,
|
|
138
136
|
showSelectionContent,
|
|
139
137
|
inputClassName,
|
|
140
|
-
leadingContent,
|
|
141
|
-
trailingContent,
|
|
142
138
|
collapseAfter,
|
|
143
139
|
selectedTagsType,
|
|
144
|
-
isRequired,
|
|
145
|
-
isDirty,
|
|
146
140
|
onBlur,
|
|
147
141
|
onCloseComboBox: (state) => {
|
|
148
142
|
if (isSearchable) closeComboBoxRef.current = state;
|
|
@@ -4,12 +4,12 @@ import { FormFieldHeaderProps } from '../../FormField/FormFieldHeader';
|
|
|
4
4
|
import { SelectBaseProps } from './SelectBase';
|
|
5
5
|
import { SelectItem } from './select.types';
|
|
6
6
|
import { InputVariantProps } from '../../shared/input.cva';
|
|
7
|
-
interface SelectInputProps extends InputVariantProps, Pick<SelectBaseProps, "ref" | "placeholder" | "isDisabled" | "hideDropdownIcon" | "isSearchable" | "isClearable" | "onBlur" | "showSelectionContent" | "inputClassName" | "selectedTagsType" | "collapseAfter"
|
|
7
|
+
interface SelectInputProps extends InputVariantProps, Pick<SelectBaseProps, "ref" | "placeholder" | "isDisabled" | "hideDropdownIcon" | "isSearchable" | "isClearable" | "onBlur" | "showSelectionContent" | "inputClassName" | "selectedTagsType" | "collapseAfter"> {
|
|
8
8
|
isInvalid?: boolean;
|
|
9
9
|
className?: string;
|
|
10
10
|
fieldProps?: AriaFieldProps;
|
|
11
11
|
headerProps?: FormFieldHeaderProps;
|
|
12
12
|
onCloseComboBox?: (state: ComboBoxState<SelectItem> | null) => void;
|
|
13
13
|
}
|
|
14
|
-
export declare const SelectInput: ({ ref, placeholder, variant, as, size, isDisabled, isInvalid, className, hideDropdownIcon, isSearchable, isClearable, showSelectionContent, inputClassName, fieldProps, headerProps, selectedTagsType, collapseAfter,
|
|
14
|
+
export declare const SelectInput: ({ ref, placeholder, variant, as, size, isDisabled, isInvalid, className, hideDropdownIcon, isSearchable, isClearable, showSelectionContent, inputClassName, fieldProps, headerProps, selectedTagsType, collapseAfter, onCloseComboBox, onBlur, ...props }: SelectInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
15
|
export {};
|
|
@@ -14,7 +14,7 @@ import { Button, ComboBoxStateContext, Input } from "react-aria-components";
|
|
|
14
14
|
import { useFocusVisible, useFocusWithin, useHover } from "react-aria";
|
|
15
15
|
import { useTranslation } from "react-i18next";
|
|
16
16
|
//#region src/components/inputs/Selection/shared/SelectInput.tsx
|
|
17
|
-
var SelectInput = ({ ref, placeholder, variant, as, size, isDisabled, isInvalid, className, hideDropdownIcon, isSearchable, isClearable, showSelectionContent, inputClassName, fieldProps, headerProps, selectedTagsType, collapseAfter,
|
|
17
|
+
var SelectInput = ({ ref, placeholder, variant, as, size, isDisabled, isInvalid, className, hideDropdownIcon, isSearchable, isClearable, showSelectionContent, inputClassName, fieldProps, headerProps, selectedTagsType, collapseAfter, onCloseComboBox, onBlur, ...props }) => {
|
|
18
18
|
const inputSizeCva = UIStyle.useCva("input.sizeCva", inputSize);
|
|
19
19
|
const inputBaseCva = UIStyle.useCva("input.baseCva", inputBase);
|
|
20
20
|
const { t } = useTranslation("ui");
|
|
@@ -44,13 +44,9 @@ var SelectInput = ({ ref, placeholder, variant, as, size, isDisabled, isInvalid,
|
|
|
44
44
|
if (e.key === "Enter" && !isMultiple && !isLoading && listItems.length === 1 && !listItems[0].isDisabled) {
|
|
45
45
|
e.preventDefault();
|
|
46
46
|
onChange(listItems[0].id);
|
|
47
|
-
if (fireBlurOnChange) onBlur?.({});
|
|
48
47
|
onCloseComboBox?.(state);
|
|
49
48
|
}
|
|
50
|
-
if (e.key === "Backspace" && isMultiple && fieldState.inputValue === "" && Array.isArray(fieldState.value) && fieldState.value.length > 0)
|
|
51
|
-
onChange(fieldState.value.slice(0, -1));
|
|
52
|
-
if (fireBlurOnChange) onBlur?.({});
|
|
53
|
-
}
|
|
49
|
+
if (e.key === "Backspace" && isMultiple && fieldState.inputValue === "" && Array.isArray(fieldState.value) && fieldState.value.length > 0) onChange(fieldState.value.slice(0, -1));
|
|
54
50
|
};
|
|
55
51
|
const onClick = () => {
|
|
56
52
|
if (isDisabled) return;
|
|
@@ -79,12 +75,7 @@ var SelectInput = ({ ref, placeholder, variant, as, size, isDisabled, isInvalid,
|
|
|
79
75
|
"data-has-search": fieldState.searchValue !== "" || void 0,
|
|
80
76
|
"data-invalid": isInvalid || void 0,
|
|
81
77
|
"data-is-empty": isEmpty || void 0,
|
|
82
|
-
"data-is-filled": !isEmpty || void 0,
|
|
83
|
-
"data-is-required": isRequired || void 0,
|
|
84
|
-
"data-is-dirty": isDirty || void 0,
|
|
85
78
|
"data-select-input": "",
|
|
86
|
-
onMouseEnter,
|
|
87
|
-
onFocusCapture,
|
|
88
79
|
...hoverProps,
|
|
89
80
|
...focusWithinProps,
|
|
90
81
|
children: [
|
|
@@ -101,10 +92,6 @@ var SelectInput = ({ ref, placeholder, variant, as, size, isDisabled, isInvalid,
|
|
|
101
92
|
...headerProps,
|
|
102
93
|
labelProps
|
|
103
94
|
}),
|
|
104
|
-
leadingContent && /* @__PURE__ */ jsx("div", {
|
|
105
|
-
className: "ml-input-side-default flex shrink-0 items-center",
|
|
106
|
-
children: leadingContent
|
|
107
|
-
}),
|
|
108
95
|
(showTags || isSearchable) && /* @__PURE__ */ jsxs("div", {
|
|
109
96
|
className: clsx("flex flex-1 flex-wrap gap-input-gap-input-text-to-elements truncate", !isSearchable && "pointer-events-none z-1"),
|
|
110
97
|
children: [showTags && /* @__PURE__ */ jsx(SelectInputTags, {
|
|
@@ -137,15 +124,8 @@ var SelectInput = ({ ref, placeholder, variant, as, size, isDisabled, isInvalid,
|
|
|
137
124
|
})
|
|
138
125
|
]
|
|
139
126
|
}),
|
|
140
|
-
trailingContent && /* @__PURE__ */ jsx("div", {
|
|
141
|
-
className: "flex shrink-0 items-center",
|
|
142
|
-
children: trailingContent
|
|
143
|
-
}),
|
|
144
127
|
isClearable && /* @__PURE__ */ jsx(InputClear, {
|
|
145
|
-
onClear
|
|
146
|
-
onClear();
|
|
147
|
-
if (fireBlurOnChange) onBlur?.({});
|
|
148
|
-
},
|
|
128
|
+
onClear,
|
|
149
129
|
show: showClearButton
|
|
150
130
|
}),
|
|
151
131
|
!hideDropdownIcon && /* @__PURE__ */ jsx(Button, {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Key } from 'react-aria-components';
|
|
2
2
|
import { SelectBaseProps } from './SelectBase';
|
|
3
3
|
type SelectMobileProps<TKey extends Key = Key> = SelectBaseProps<TKey>;
|
|
4
|
-
export declare const SelectMobile: <TKey extends Key = Key>({ ref, error, showSelectionContent, inputClassName, containerClassName,
|
|
4
|
+
export declare const SelectMobile: <TKey extends Key = Key>({ ref, error, showSelectionContent, inputClassName, containerClassName, customTrigger, onBlur, ...props }: SelectMobileProps<TKey>) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
export {};
|
|
@@ -13,8 +13,8 @@ import { useRef } from "react";
|
|
|
13
13
|
import { DialogTrigger } from "react-aria-components";
|
|
14
14
|
import { useLabel } from "react-aria";
|
|
15
15
|
//#region src/components/inputs/Selection/shared/SelectMobile.tsx
|
|
16
|
-
var SelectMobile = ({ ref, error, showSelectionContent, inputClassName, containerClassName,
|
|
17
|
-
const { label, tooltipText, helperText,
|
|
16
|
+
var SelectMobile = ({ ref, error, showSelectionContent, inputClassName, containerClassName, customTrigger, onBlur, ...props }) => {
|
|
17
|
+
const { label, tooltipText, helperText, isRequired, rightContent, isHeaderHidden, headerClassName, errorClassName, placeholder, variant, isDisabled, className, hideLabel, hideDropdownIcon, hideSearchIcon, isSearchable, isClearable, as, size, collapseAfter, selectedTagsType } = props;
|
|
18
18
|
const formFieldProps = {
|
|
19
19
|
error,
|
|
20
20
|
label,
|
|
@@ -62,8 +62,6 @@ var SelectMobile = ({ ref, error, showSelectionContent, inputClassName, containe
|
|
|
62
62
|
children: [customTrigger ? /* @__PURE__ */ jsx("div", {
|
|
63
63
|
...fieldProps,
|
|
64
64
|
ref,
|
|
65
|
-
onMouseEnter,
|
|
66
|
-
onFocusCapture,
|
|
67
65
|
children: customTrigger
|
|
68
66
|
}) : /* @__PURE__ */ jsx(SelectInput, {
|
|
69
67
|
ref,
|
|
@@ -81,12 +79,8 @@ var SelectMobile = ({ ref, error, showSelectionContent, inputClassName, containe
|
|
|
81
79
|
onBlur: void 0,
|
|
82
80
|
fieldProps,
|
|
83
81
|
headerProps,
|
|
84
|
-
leadingContent,
|
|
85
|
-
trailingContent,
|
|
86
82
|
collapseAfter,
|
|
87
|
-
selectedTagsType
|
|
88
|
-
isRequired,
|
|
89
|
-
isDirty
|
|
83
|
+
selectedTagsType
|
|
90
84
|
}), /* @__PURE__ */ jsx(BottomSheet, {
|
|
91
85
|
isOpen,
|
|
92
86
|
onOpenChange: handleOpenChange,
|
|
@@ -108,7 +102,8 @@ var SelectMobile = ({ ref, error, showSelectionContent, inputClassName, containe
|
|
|
108
102
|
rightContent: /* @__PURE__ */ jsx(FormFieldHeaderClose, { onClose: close }),
|
|
109
103
|
inputClassName,
|
|
110
104
|
className: "mb-list-height-title-bottom px-list-side-title",
|
|
111
|
-
leadingIcon: !hideSearchIcon ? /* @__PURE__ */ jsx(SearchIcon, { className: "size-6" }) : void 0
|
|
105
|
+
leadingIcon: !hideSearchIcon ? /* @__PURE__ */ jsx(SearchIcon, { className: "size-6" }) : void 0,
|
|
106
|
+
size: "default"
|
|
112
107
|
}), /* @__PURE__ */ jsx(SelectListBox, {
|
|
113
108
|
...props,
|
|
114
109
|
autoFocus: !isSearchable,
|
|
@@ -17,15 +17,14 @@ export declare namespace SelectContext {
|
|
|
17
17
|
onClear: () => void;
|
|
18
18
|
onSelectAll: () => void;
|
|
19
19
|
onRemove: (val: Key) => void;
|
|
20
|
-
onBlur: () => void;
|
|
21
20
|
listItems: ExtendedSelectItem[];
|
|
22
21
|
selectableListItems: SelectItem[];
|
|
23
22
|
selectedItems: SelectItem[];
|
|
24
23
|
selectedIds: Key[];
|
|
25
24
|
isMultiple: boolean;
|
|
26
25
|
} & Pick<SelectBaseProps, "onInputChange" | "isLoading" | "hasLoadMore">;
|
|
27
|
-
export type ProviderProps = GroupedSelectProps & Pick<SelectBaseProps, "items" | "onInputChange" | "onSearchChange" | "showSelectAllOption" | "showNewItemOption" | "newItemMinLength" | "onNewItemOption" | "isLoading" | "hasLoadMore" | "mapInitialToSelectItem" | "isSearchable" | "isClientSearchDisabled"
|
|
28
|
-
export const Provider: ({ items, onInputChange, onSearchChange, showSelectAllOption, showNewItemOption, newItemMinLength, onNewItemOption, isLoading, hasLoadMore, isClientSearchDisabled,
|
|
26
|
+
export type ProviderProps = GroupedSelectProps & Pick<SelectBaseProps, "items" | "onInputChange" | "onSearchChange" | "showSelectAllOption" | "showNewItemOption" | "newItemMinLength" | "onNewItemOption" | "isLoading" | "hasLoadMore" | "mapInitialToSelectItem" | "isSearchable" | "isClientSearchDisabled">;
|
|
27
|
+
export const Provider: ({ items, onInputChange, onSearchChange, showSelectAllOption, showNewItemOption, newItemMinLength, onNewItemOption, isLoading, hasLoadMore, isClientSearchDisabled, children, mapInitialToSelectItem, ...props }: PropsWithChildren<ProviderProps>) => import("react/jsx-runtime").JSX.Element;
|
|
29
28
|
export const useSelect: () => Type;
|
|
30
29
|
export {};
|
|
31
30
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { useDebounceCallback } from "../../../../hooks/useDebounceCallback.js";
|
|
2
1
|
import { useSelectItems } from "./useSelectItems.js";
|
|
2
|
+
import { useDebounceCallback } from "../../../../hooks/useDebounceCallback.js";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
import { createContext, use, useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
5
5
|
//#region src/components/inputs/Selection/shared/select.context.tsx
|
|
@@ -10,7 +10,7 @@ var SelectContext;
|
|
|
10
10
|
id: item.id,
|
|
11
11
|
label: item.label ?? item.name ?? ""
|
|
12
12
|
});
|
|
13
|
-
_SelectContext.Provider = ({ items, onInputChange, onSearchChange, showSelectAllOption, showNewItemOption, newItemMinLength, onNewItemOption, isLoading, hasLoadMore, isClientSearchDisabled,
|
|
13
|
+
_SelectContext.Provider = ({ items, onInputChange, onSearchChange, showSelectAllOption, showNewItemOption, newItemMinLength, onNewItemOption, isLoading, hasLoadMore, isClientSearchDisabled, children, mapInitialToSelectItem = defaultMapInitialToSelectItem, ...props }) => {
|
|
14
14
|
const isMultiple = props.selectionMode === "multiple";
|
|
15
15
|
const initialSelectedItems = useMemo(() => {
|
|
16
16
|
if (!props.initialSelection) return null;
|
|
@@ -42,7 +42,7 @@ var SelectContext;
|
|
|
42
42
|
newItemMinLength,
|
|
43
43
|
isLoading,
|
|
44
44
|
hasLoadMore,
|
|
45
|
-
isClientSearchDisabled
|
|
45
|
+
isClientSearchDisabled
|
|
46
46
|
});
|
|
47
47
|
const selectedItems = useMemo(() => allItems.filter(({ id }) => Array.isArray(fieldState.value) ? fieldState.value.includes(id) : id === fieldState.value), [allItems, fieldState.value]);
|
|
48
48
|
const selectedIds = useMemo(() => selectedItems.map(({ id }) => id), [selectedItems]);
|
|
@@ -84,7 +84,7 @@ var SelectContext;
|
|
|
84
84
|
else updateValue(value);
|
|
85
85
|
}, [props.value]);
|
|
86
86
|
useEffect(() => {
|
|
87
|
-
if (!isMultiple &&
|
|
87
|
+
if (!isMultiple && fieldState.value && fieldState.inputValue === "" && getItem(fieldState.value)?.label) syncFieldState(fieldState.value);
|
|
88
88
|
}, [allListItems]);
|
|
89
89
|
const handleInputChange = useCallback((inputValue) => {
|
|
90
90
|
const newFieldState = {
|
|
@@ -144,22 +144,6 @@ var SelectContext;
|
|
|
144
144
|
fieldState.value,
|
|
145
145
|
onChange
|
|
146
146
|
]);
|
|
147
|
-
const onBlur = useCallback(() => {
|
|
148
|
-
if (props.isSearchable && isMultiple && fieldState.searchValue !== "") {
|
|
149
|
-
const newFieldState = {
|
|
150
|
-
...fieldState,
|
|
151
|
-
inputValue: "",
|
|
152
|
-
searchValue: ""
|
|
153
|
-
};
|
|
154
|
-
setFieldState(newFieldState);
|
|
155
|
-
emitStateChanges(newFieldState);
|
|
156
|
-
setShowAll(true);
|
|
157
|
-
}
|
|
158
|
-
}, [
|
|
159
|
-
props.isSearchable,
|
|
160
|
-
isMultiple,
|
|
161
|
-
fieldState
|
|
162
|
-
]);
|
|
163
147
|
const value = useMemo(() => ({
|
|
164
148
|
fieldState,
|
|
165
149
|
isOpen,
|
|
@@ -170,7 +154,6 @@ var SelectContext;
|
|
|
170
154
|
onClear,
|
|
171
155
|
onSelectAll,
|
|
172
156
|
onRemove,
|
|
173
|
-
onBlur,
|
|
174
157
|
listItems,
|
|
175
158
|
selectableListItems,
|
|
176
159
|
selectedItems,
|
|
@@ -188,7 +171,6 @@ var SelectContext;
|
|
|
188
171
|
onClear,
|
|
189
172
|
onSelectAll,
|
|
190
173
|
onRemove,
|
|
191
|
-
onBlur,
|
|
192
174
|
listItems,
|
|
193
175
|
selectableListItems,
|
|
194
176
|
selectedIds,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { ReactElement
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
2
|
import { Key } from 'react-aria-components';
|
|
3
3
|
import { FieldValues } from 'react-hook-form';
|
|
4
4
|
import { ControlProps } from '../../shared/form.types';
|
|
5
5
|
export interface SelectItem<TKey extends Key = Key> {
|
|
6
6
|
id: TKey;
|
|
7
7
|
label: string;
|
|
8
|
-
content?: string |
|
|
8
|
+
content?: string | ReactElement;
|
|
9
9
|
isDisabled?: boolean;
|
|
10
10
|
}
|
|
11
11
|
export interface ExtendedSelectItem<TKey extends Key = Key> extends SelectItem<TKey> {
|
|
@@ -15,7 +15,6 @@ export interface TextEditorBaseProps extends FormFieldProps {
|
|
|
15
15
|
onBlur?: () => void;
|
|
16
16
|
as?: "default" | "filter" | "floating" | "inline" | null;
|
|
17
17
|
editorClassName?: string;
|
|
18
|
-
isDirty?: boolean;
|
|
19
18
|
}
|
|
20
19
|
export type TextEditorProps = TextEditorBaseProps;
|
|
21
20
|
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,
|
|
40
|
+
var TextEditorBase = ({ ref, as = "default", placeholder, label, hideLabel, tooltipText, helperText, isRequired, rightContent, isDisabled, headerClassName, errorClassName, isHeaderHidden, error, value, className, editorClassName, onChange, onBlur }) => {
|
|
41
41
|
const contentRef = useRef(null);
|
|
42
42
|
const { hoverProps, isHovered } = useHover({ isDisabled });
|
|
43
43
|
const [isFocused, setIsFocused] = useState(false);
|
|
@@ -109,8 +109,6 @@ var TextEditorBase = ({ ref, as = "default", placeholder, label, hideLabel, tool
|
|
|
109
109
|
"data-focus-within": isFocused || void 0,
|
|
110
110
|
"data-focus-visible": isFocused && isFocusVisible || void 0,
|
|
111
111
|
"data-is-filled": !editor?.isEmpty,
|
|
112
|
-
"data-is-required": isRequired || void 0,
|
|
113
|
-
"data-is-dirty": isDirty || void 0,
|
|
114
112
|
...hoverProps,
|
|
115
113
|
...focusWithinProps,
|
|
116
114
|
...fieldProps,
|
|
@@ -138,15 +136,13 @@ var TextEditor = (props) => {
|
|
|
138
136
|
return /* @__PURE__ */ jsx(Controller, {
|
|
139
137
|
control: formControl.control,
|
|
140
138
|
name: formControl.name,
|
|
141
|
-
render: ({ field
|
|
139
|
+
render: ({ field }) => /* @__PURE__ */ jsx(TextEditorBase, {
|
|
142
140
|
...innerProps,
|
|
143
141
|
ref: mergeRefs(ref, field.ref),
|
|
144
142
|
value: field.value,
|
|
145
143
|
onChange: field.onChange,
|
|
146
144
|
onBlur: field.onBlur,
|
|
147
|
-
|
|
148
|
-
isDisabled: field.disabled || props.isDisabled,
|
|
149
|
-
error: props.error ?? error?.message
|
|
145
|
+
isDisabled: field.disabled || props.isDisabled
|
|
150
146
|
})
|
|
151
147
|
});
|
|
152
148
|
}
|
|
@@ -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,
|
|
5
|
+
import { toggle, 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,7 +13,6 @@ 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);
|
|
17
16
|
const { className, children, isDisabled, error, variant = ui.toggle.variant, ...rest } = props;
|
|
18
17
|
const formFieldErrorProps = {
|
|
19
18
|
error,
|
|
@@ -33,10 +32,6 @@ var ToggleBase = (props) => {
|
|
|
33
32
|
variant,
|
|
34
33
|
...rest
|
|
35
34
|
}),
|
|
36
|
-
contentClassName: toggleContentClassNameMap({
|
|
37
|
-
variant,
|
|
38
|
-
...rest
|
|
39
|
-
}),
|
|
40
35
|
children
|
|
41
36
|
})]
|
|
42
37
|
}), /* @__PURE__ */ jsx(FormFieldError, { ...formFieldErrorProps })] });
|
|
@@ -8,6 +8,3 @@ 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,6 +26,5 @@ var toggleTypography = compoundMapper({ default: {
|
|
|
26
26
|
sizeMobile: "label-1",
|
|
27
27
|
variant: "default"
|
|
28
28
|
} });
|
|
29
|
-
var toggleContentClassName = compoundMapper({ default: "text-text-default-2" });
|
|
30
29
|
//#endregion
|
|
31
|
-
export { toggle,
|
|
30
|
+
export { toggle, toggleTypography };
|
|
@@ -3,7 +3,6 @@ import { TypographyVariantProps } from '../../text/Typography/typography.cva';
|
|
|
3
3
|
interface CheckContentProps {
|
|
4
4
|
typography?: TypographyVariantProps;
|
|
5
5
|
className?: string;
|
|
6
|
-
contentClassName?: string;
|
|
7
6
|
}
|
|
8
|
-
export declare const CheckContent: ({ children, className,
|
|
7
|
+
export declare const CheckContent: ({ children, className, ...props }: PropsWithChildren<CheckContentProps>) => import("react/jsx-runtime").JSX.Element;
|
|
9
8
|
export {};
|
|
@@ -3,14 +3,15 @@ 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,
|
|
6
|
+
var CheckContent = ({ children, className, ...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
|
-
|
|
12
|
+
...props.typography,
|
|
13
|
+
className: "text-text-default-2"
|
|
14
|
+
}), className),
|
|
14
15
|
children
|
|
15
16
|
});
|
|
16
17
|
};
|
|
@@ -76,10 +76,9 @@ var BottomSheetBase = ({ isOpen, onOpenChange, onStateChange, isDismissable = tr
|
|
|
76
76
|
return /* @__PURE__ */ jsx(AnimatePresence, { children: isOpen && /* @__PURE__ */ jsxs(MotionModalOverlay, {
|
|
77
77
|
isOpen: true,
|
|
78
78
|
UNSTABLE_portalContainer: portalContainerRef?.current,
|
|
79
|
-
className: clsx("fixed top-0 left-0 z-10 w-screen", containerClassName),
|
|
79
|
+
className: clsx("fixed top-0 left-0 z-10 w-screen h-dvh", containerClassName),
|
|
80
80
|
onOpenChange,
|
|
81
81
|
isDismissable,
|
|
82
|
-
style: { height: viewport.height },
|
|
83
82
|
ref: overlayRef,
|
|
84
83
|
shouldCloseOnInteractOutside,
|
|
85
84
|
children: [/* @__PURE__ */ jsx(motion.div, {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { JSX, Ref } from 'react';
|
|
1
|
+
import { JSX, ReactNode, Ref } from 'react';
|
|
2
2
|
export interface TooltipEllipsisProps {
|
|
3
|
-
text:
|
|
3
|
+
text: ReactNode;
|
|
4
4
|
children: (ref: Ref<HTMLElement> | undefined) => JSX.Element;
|
|
5
5
|
isDisabled?: boolean;
|
|
6
6
|
isNonInteractiveTrigger?: boolean;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { createContext, use } from "react";
|
|
2
|
+
import { createContext, use, useMemo } from "react";
|
|
3
3
|
//#region src/config/link.context.tsx
|
|
4
4
|
var LinkContext;
|
|
5
5
|
(function(_LinkContext) {
|
|
6
6
|
const LinkContextInternal = createContext(null);
|
|
7
7
|
_LinkContext.LinkContextProvider = ({ children, LinkComponent }) => {
|
|
8
|
-
const value =
|
|
8
|
+
const value = useMemo(() => {
|
|
9
|
+
return { LinkComponent };
|
|
10
|
+
}, [LinkComponent]);
|
|
9
11
|
return /* @__PURE__ */ jsx(LinkContextInternal.Provider, {
|
|
10
12
|
value,
|
|
11
13
|
children
|
|
@@ -24,16 +24,10 @@ export declare namespace UIConfig {
|
|
|
24
24
|
numberInput: Pick<NumberInputProps, "formatOptions">;
|
|
25
25
|
radioGroup: Pick<RadioGroupProps, "variant" | "hideLabel">;
|
|
26
26
|
checkbox: Pick<CheckboxProps, "variant">;
|
|
27
|
-
select: Pick<SelectBaseProps, "selectionMode" | "isSearchable" | "collapseAfter" | "selectedTagsType" | "hideSearchIcon"
|
|
28
|
-
queryAutocomplete: {
|
|
29
|
-
isInitialQueryDisabled?: boolean;
|
|
30
|
-
};
|
|
31
|
-
querySelect: {
|
|
32
|
-
isInitialQueryDisabled?: boolean;
|
|
33
|
-
};
|
|
27
|
+
select: Pick<SelectBaseProps, "selectionMode" | "isSearchable" | "collapseAfter" | "selectedTagsType" | "hideSearchIcon">;
|
|
34
28
|
toggle: Pick<ToggleProps, "variant">;
|
|
35
29
|
slider: Pick<SliderProps, "minValue" | "maxValue">;
|
|
36
|
-
dateInput: Pick<DatePickerProps, "todayIcon" | "
|
|
30
|
+
dateInput: Pick<DatePickerProps, "todayIcon" | "shouldForceLeadingZeros" | "disableManualEntry" | "shouldUpdateDateOnMonthYearChange" | "granularity" | "autoFixYear">;
|
|
37
31
|
actionModal: Pick<ActionModalProps, "titleTypography" | "descriptionTypography">;
|
|
38
32
|
bottomSheet: Pick<BottomSheetProps, "closeDragThreshold" | "closeVelocityThreshold" | "hideThumb" | "headerTypography">;
|
|
39
33
|
tableHeaderText: Pick<HeaderTextProps, "variant" | "size">;
|
|
@@ -31,11 +31,8 @@ var UIConfig;
|
|
|
31
31
|
isSearchable: false,
|
|
32
32
|
selectedTagsType: "list",
|
|
33
33
|
collapseAfter: 3,
|
|
34
|
-
hideSearchIcon: false
|
|
35
|
-
fireBlurOnChange: false
|
|
34
|
+
hideSearchIcon: false
|
|
36
35
|
},
|
|
37
|
-
queryAutocomplete: { isInitialQueryDisabled: false },
|
|
38
|
-
querySelect: { isInitialQueryDisabled: false },
|
|
39
36
|
toggle: { variant: "default" },
|
|
40
37
|
slider: {
|
|
41
38
|
minValue: 0,
|
|
@@ -43,9 +40,10 @@ var UIConfig;
|
|
|
43
40
|
},
|
|
44
41
|
dateInput: {
|
|
45
42
|
todayIcon: false,
|
|
46
|
-
todayIconButtonSize: "none",
|
|
47
43
|
shouldForceLeadingZeros: false,
|
|
48
44
|
disableManualEntry: false,
|
|
45
|
+
shouldUpdateDateOnMonthYearChange: false,
|
|
46
|
+
granularity: "day",
|
|
49
47
|
autoFixYear: false
|
|
50
48
|
},
|
|
51
49
|
actionModal: {
|
|
@@ -5,7 +5,6 @@ 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
7
|
import { FormFieldErrorVariantProps } from '../components/inputs/FormField/formFieldError.cva';
|
|
8
|
-
import { FormFieldHeaderVariantProps } from '../components/inputs/FormField/formFieldHeader.cva';
|
|
9
8
|
import { FormFieldHelperVariantProps } from '../components/inputs/FormField/formFieldHelper.cva';
|
|
10
9
|
import { RadioVariantProps } from '../components/inputs/RadioGroup/radio.cva';
|
|
11
10
|
import { InputBaseProps, InputSideProps, InputSizeProps } from '../components/inputs/shared/input.cva';
|
|
@@ -31,7 +30,7 @@ export declare namespace UIStyle {
|
|
|
31
30
|
type OptionKey = {
|
|
32
31
|
[K in keyof Options]: Options[K] extends object ? `${K & string}.${keyof Options[K] & string}` : never;
|
|
33
32
|
}[keyof Options];
|
|
34
|
-
|
|
33
|
+
interface Options {
|
|
35
34
|
button: {
|
|
36
35
|
cva?: Cva<ButtonVariantProps>;
|
|
37
36
|
sizeCva?: Cva<ButtonVariantProps>;
|
|
@@ -47,12 +46,10 @@ export declare namespace UIStyle {
|
|
|
47
46
|
cva?: Cva<CheckboxVariantProps>;
|
|
48
47
|
iconCva?: Cva<CheckboxIconVariantProps>;
|
|
49
48
|
typography?: CompoundMapper<TypographyVariantProps, CheckboxVariantProps>;
|
|
50
|
-
contentClassName?: CompoundMapper<string, CheckboxVariantProps>;
|
|
51
49
|
};
|
|
52
50
|
radio: {
|
|
53
51
|
cva?: Cva<RadioVariantProps>;
|
|
54
52
|
typography?: CompoundMapper<TypographyVariantProps, RadioVariantProps>;
|
|
55
|
-
contentClassName?: CompoundMapper<string, RadioVariantProps>;
|
|
56
53
|
};
|
|
57
54
|
status: {
|
|
58
55
|
iconCva?: Cva<ToastVariantProps>;
|
|
@@ -77,7 +74,6 @@ export declare namespace UIStyle {
|
|
|
77
74
|
toggle: {
|
|
78
75
|
cva?: Cva<ToggleVariantProps>;
|
|
79
76
|
typography?: CompoundMapper<TypographyVariantProps, ToggleVariantProps>;
|
|
80
|
-
contentClassName?: CompoundMapper<string, ToggleVariantProps>;
|
|
81
77
|
};
|
|
82
78
|
typography: {
|
|
83
79
|
cva?: Cva<TypographyVariantProps>;
|
|
@@ -149,7 +145,6 @@ export declare namespace UIStyle {
|
|
|
149
145
|
cva?: Cva<PopoverVariantProps>;
|
|
150
146
|
};
|
|
151
147
|
formField: {
|
|
152
|
-
headerCva?: Cva<FormFieldHeaderVariantProps>;
|
|
153
148
|
errorLabelCva?: Cva<FormFieldErrorVariantProps>;
|
|
154
149
|
helperLabelCva?: Cva<FormFieldHelperVariantProps>;
|
|
155
150
|
};
|