@povio/ui 2.2.9-rc.2 → 2.2.9-rc.21
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 +1 -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 +9 -4
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +97 -9
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.d.ts +9 -4
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +116 -7
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.d.ts +10 -4
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +92 -7
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.d.ts +5 -3
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.js +80 -6
- 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 +5 -2
- package/dist/components/inputs/DateTime/shared/DatePickerInput.js +21 -12
- package/dist/components/inputs/DateTime/shared/TimePickerInput.js +7 -3
- package/dist/components/inputs/DateTime/shared/datePicker.types.d.ts +3 -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 +20 -0
- package/dist/components/inputs/FormField/FormField.d.ts +3 -3
- package/dist/components/inputs/FormField/FormFieldHeader.js +3 -1
- 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 +92 -8
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.d.ts +38 -0
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.js +318 -0
- package/dist/components/inputs/Input/TextInput/TextInput.d.ts +3 -1
- package/dist/components/inputs/Input/TextInput/TextInput.js +95 -8
- package/dist/components/inputs/Inputs/InputItem.d.ts +15 -18
- package/dist/components/inputs/Inputs/InputItem.js +2 -0
- package/dist/components/inputs/RadioGroup/RadioGroup.js +17 -9
- package/dist/components/inputs/RadioGroup/radio.cva.d.ts +3 -0
- package/dist/components/inputs/RadioGroup/radio.cva.js +2 -1
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.d.ts +6 -2
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.js +87 -6
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.d.ts +1 -1
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +15 -10
- package/dist/components/inputs/Selection/Autocomplete/queryAutocomplete.types.d.ts +25 -19
- package/dist/components/inputs/Selection/Select/QuerySelect.d.ts +1 -2
- package/dist/components/inputs/Selection/Select/QuerySelect.js +5 -3
- package/dist/components/inputs/Selection/Select/Select.d.ts +7 -3
- package/dist/components/inputs/Selection/Select/Select.js +86 -4
- package/dist/components/inputs/Selection/shared/SelectBase.d.ts +4 -1
- package/dist/components/inputs/Selection/shared/SelectBase.js +3 -2
- package/dist/components/inputs/Selection/shared/SelectDesktop.d.ts +1 -1
- package/dist/components/inputs/Selection/shared/SelectDesktop.js +8 -4
- package/dist/components/inputs/Selection/shared/SelectInput.d.ts +2 -2
- package/dist/components/inputs/Selection/shared/SelectInput.js +12 -2
- 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 +5 -3
- package/dist/components/inputs/Selection/shared/select.context.d.ts +3 -2
- package/dist/components/inputs/Selection/shared/select.context.js +22 -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 +35 -0
- 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/StaticInput.d.ts +37 -0
- package/dist/components/inputs/shared/StaticInput.js +91 -0
- package/dist/components/inputs/shared/TooltipWrapper.js +5 -1
- package/dist/components/inputs/shared/input.cva.d.ts +5 -0
- package/dist/components/inputs/shared/input.cva.js +10 -1
- package/dist/components/inputs/shared/tooltipWrapper.cva.d.ts +4 -0
- package/dist/components/inputs/shared/tooltipWrapper.cva.js +5 -0
- package/dist/config/uiConfig.context.d.ts +8 -2
- package/dist/config/uiConfig.context.js +11 -1
- package/dist/config/uiStyle.context.d.ts +19 -3
- package/dist/helpers/dynamicInputs.d.ts +5 -5
- package/dist/helpers/dynamicInputs.js +3 -0
- package/dist/hooks/useIntersectionObserver.d.ts +1 -1
- package/dist/hooks/useIntersectionObserver.js +29 -10
- package/dist/hooks/useQueryAutocomplete.d.ts +5 -16
- package/dist/hooks/useQueryAutocomplete.js +13 -3
- package/dist/index.d.ts +7 -0
- package/dist/index.js +4 -2
- package/dist/utils/date-time.utils.d.ts +23 -9
- package/dist/utils/date-time.utils.js +97 -1
- package/dist/utils/query.utils.d.ts +4 -0
- package/dist/utils/query.utils.js +8 -0
- package/package.json +1 -1
|
@@ -0,0 +1,37 @@
|
|
|
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
|
+
trailingContent?: ReactNode;
|
|
32
|
+
contentRowClassName?: string;
|
|
33
|
+
inputClassName?: string;
|
|
34
|
+
dataAttributes?: StaticInputDataAttributes;
|
|
35
|
+
}
|
|
36
|
+
export declare const StaticInput: ({ onInteract, as, typographySize, size, variant, applyMinInputWidth, placeholder, showPlacholderIfFilled, displayValue, isEmpty, leadingVisual, leadingContent, leadingContentClassName, trailingContent, contentRowClassName, inputClassName, dataAttributes, className, ...formFieldProps }: StaticInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
37
|
+
export {};
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { UIStyle } from "../../../config/uiStyle.context.js";
|
|
2
|
+
import { typography } from "../../text/Typography/typography.cva.js";
|
|
3
|
+
import { FormFieldLabel } from "../FormField/FormFieldLabel.js";
|
|
4
|
+
import { inputBase, inputSize } from "./input.cva.js";
|
|
5
|
+
import { FormField } from "../FormField/FormField.js";
|
|
6
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
import { clsx } from "clsx";
|
|
8
|
+
//#region src/components/inputs/shared/StaticInput.tsx
|
|
9
|
+
var StaticInput = ({ onInteract, as, typographySize, size, variant, applyMinInputWidth, placeholder, showPlacholderIfFilled = false, displayValue, isEmpty, leadingVisual, leadingContent, leadingContentClassName, trailingContent, contentRowClassName, inputClassName, dataAttributes, className, ...formFieldProps }) => {
|
|
10
|
+
const inputBaseCva = UIStyle.useCva("input.baseCva", inputBase);
|
|
11
|
+
const inputSizeCva = UIStyle.useCva("input.sizeCva", inputSize);
|
|
12
|
+
const typographyCva = UIStyle.useCva("typography.cva", typography);
|
|
13
|
+
let hasValue = !!displayValue;
|
|
14
|
+
if (isEmpty != null) hasValue = !isEmpty;
|
|
15
|
+
let staticDisplayContent = placeholder;
|
|
16
|
+
if (hasValue) staticDisplayContent = displayValue;
|
|
17
|
+
else if (as === "floating") staticDisplayContent = null;
|
|
18
|
+
const shouldRenderPlaceholderAfterValue = showPlacholderIfFilled && placeholder && hasValue;
|
|
19
|
+
const shouldRenderFloatingLineSpacer = as === "floating" && !hasValue;
|
|
20
|
+
const inputDataAttributes = {
|
|
21
|
+
dataIsEmpty: !hasValue,
|
|
22
|
+
dataDisabled: formFieldProps.isDisabled,
|
|
23
|
+
dataIsDisabled: formFieldProps.isDisabled,
|
|
24
|
+
dataHasSelection: hasValue,
|
|
25
|
+
...dataAttributes
|
|
26
|
+
};
|
|
27
|
+
return /* @__PURE__ */ jsx(FormField, {
|
|
28
|
+
...formFieldProps,
|
|
29
|
+
as,
|
|
30
|
+
className,
|
|
31
|
+
onMouseEnter: () => onInteract(false),
|
|
32
|
+
tabIndex: as === "inline" ? -1 : void 0,
|
|
33
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
34
|
+
tabIndex: formFieldProps.isDisabled ? -1 : 0,
|
|
35
|
+
onFocus: () => onInteract(true),
|
|
36
|
+
onClick: () => onInteract(true),
|
|
37
|
+
onPointerDown: () => onInteract(true),
|
|
38
|
+
"data-is-empty": inputDataAttributes.dataIsEmpty || void 0,
|
|
39
|
+
"data-disabled": inputDataAttributes.dataDisabled || void 0,
|
|
40
|
+
"data-is-disabled": inputDataAttributes.dataIsDisabled || void 0,
|
|
41
|
+
"data-has-selection": inputDataAttributes.dataHasSelection || void 0,
|
|
42
|
+
"data-has-search": inputDataAttributes.dataHasSearch || void 0,
|
|
43
|
+
"data-invalid": inputDataAttributes.dataInvalid || void 0,
|
|
44
|
+
"data-is-dirty": inputDataAttributes.dataIsDirty || void 0,
|
|
45
|
+
"data-is-filled": inputDataAttributes.dataIsFilled || void 0,
|
|
46
|
+
"data-is-required": inputDataAttributes.dataIsRequired || void 0,
|
|
47
|
+
"data-rac": "",
|
|
48
|
+
className: clsx("group/static-input group/input-content group/select-content relative flex items-center gap-input-gap-input-text-to-elements", applyMinInputWidth && "min-w-input-width-min-width", inputBaseCva({
|
|
49
|
+
as,
|
|
50
|
+
variant
|
|
51
|
+
}), !hasValue && "text-text-default-3", inputClassName),
|
|
52
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
53
|
+
className: clsx("group/input-content flex w-full items-center gap-input-gap-input-text-to-elements pr-0!", inputSizeCva({
|
|
54
|
+
size,
|
|
55
|
+
as
|
|
56
|
+
}), typographySize && typographyCva({ size: typographySize }), contentRowClassName),
|
|
57
|
+
children: [
|
|
58
|
+
leadingVisual && /* @__PURE__ */ jsx("div", {
|
|
59
|
+
className: "pointer-events-none shrink-0",
|
|
60
|
+
children: leadingVisual
|
|
61
|
+
}),
|
|
62
|
+
as && ["filter", "floating"].includes(as) && /* @__PURE__ */ jsx(FormFieldLabel, {
|
|
63
|
+
as,
|
|
64
|
+
size,
|
|
65
|
+
label: formFieldProps.label,
|
|
66
|
+
isRequired: formFieldProps.isRequired,
|
|
67
|
+
isDisabled: formFieldProps.isDisabled
|
|
68
|
+
}),
|
|
69
|
+
leadingContent && /* @__PURE__ */ jsx("div", {
|
|
70
|
+
className: clsx("ml-input-side-default flex shrink-0 items-center", leadingContentClassName),
|
|
71
|
+
children: leadingContent
|
|
72
|
+
}),
|
|
73
|
+
staticDisplayContent,
|
|
74
|
+
shouldRenderFloatingLineSpacer && /* @__PURE__ */ jsx(Fragment, { children: "\xA0" }),
|
|
75
|
+
shouldRenderPlaceholderAfterValue && /* @__PURE__ */ jsx("div", {
|
|
76
|
+
className: "text-text-default-3",
|
|
77
|
+
children: placeholder
|
|
78
|
+
})
|
|
79
|
+
]
|
|
80
|
+
}), trailingContent && /* @__PURE__ */ jsx("div", {
|
|
81
|
+
className: clsx(inputSizeCva({
|
|
82
|
+
size,
|
|
83
|
+
as
|
|
84
|
+
}), "pointer-events-none flex items-center gap-input-gap-trailing-elements py-0! pl-0!"),
|
|
85
|
+
children: trailingContent
|
|
86
|
+
})]
|
|
87
|
+
})
|
|
88
|
+
});
|
|
89
|
+
};
|
|
90
|
+
//#endregion
|
|
91
|
+
export { StaticInput };
|
|
@@ -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,11 @@ 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 inputClearClass: (props?: ({
|
|
16
|
+
as?: "filter" | "default" | "floating" | "inline" | null | undefined;
|
|
17
|
+
} & ClassProp) | undefined) => string;
|
|
18
|
+
export interface InputClearClassProps extends VariantProps<typeof inputClearClass> {
|
|
19
|
+
}
|
|
15
20
|
export declare const inputSide: (props?: ({
|
|
16
21
|
size?: "small" | "default" | "extra-small" | "large" | null | undefined;
|
|
17
22
|
type?: "left" | "right" | "var" | null | undefined;
|
|
@@ -191,6 +191,15 @@ var inputSize = cva("", {
|
|
|
191
191
|
as: "default"
|
|
192
192
|
}
|
|
193
193
|
});
|
|
194
|
+
var inputClearClass = cva("", {
|
|
195
|
+
variants: { as: {
|
|
196
|
+
default: "",
|
|
197
|
+
floating: "",
|
|
198
|
+
filter: "",
|
|
199
|
+
inline: ""
|
|
200
|
+
} },
|
|
201
|
+
defaultVariants: { as: "default" }
|
|
202
|
+
});
|
|
194
203
|
var inputSide = cva("", {
|
|
195
204
|
variants: {
|
|
196
205
|
size: {
|
|
@@ -277,4 +286,4 @@ var useInputCva = () => {
|
|
|
277
286
|
};
|
|
278
287
|
};
|
|
279
288
|
//#endregion
|
|
280
|
-
export { inputBase, inputSide, inputSize, useInputCva };
|
|
289
|
+
export { inputBase, inputClearClass, 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
|
+
}
|
|
@@ -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,6 +19,7 @@ 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">;
|
|
@@ -33,7 +34,12 @@ export declare namespace UIConfig {
|
|
|
33
34
|
};
|
|
34
35
|
toggle: Pick<ToggleProps, "variant">;
|
|
35
36
|
slider: Pick<SliderProps, "minValue" | "maxValue">;
|
|
36
|
-
dateInput: Pick<DatePickerProps, "todayIcon" | "shouldForceLeadingZeros" | "disableManualEntry"
|
|
37
|
+
dateInput: Pick<DatePickerProps, "todayIcon" | "todayIconButtonSize" | "shouldForceLeadingZeros" | "disableManualEntry" | "autoFixYear"> & {
|
|
38
|
+
calendarIcon?: ReactElement;
|
|
39
|
+
dateTimeIcon?: ReactElement;
|
|
40
|
+
timeIcon?: ReactElement;
|
|
41
|
+
setDateValueOnDateSelection?: boolean;
|
|
42
|
+
};
|
|
37
43
|
actionModal: Pick<ActionModalProps, "titleTypography" | "descriptionTypography">;
|
|
38
44
|
bottomSheet: Pick<BottomSheetProps, "closeDragThreshold" | "closeVelocityThreshold" | "hideThumb" | "headerTypography">;
|
|
39
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",
|
|
@@ -43,8 +47,14 @@ var UIConfig;
|
|
|
43
47
|
},
|
|
44
48
|
dateInput: {
|
|
45
49
|
todayIcon: false,
|
|
50
|
+
todayIconButtonSize: "none",
|
|
46
51
|
shouldForceLeadingZeros: false,
|
|
47
|
-
disableManualEntry: false
|
|
52
|
+
disableManualEntry: false,
|
|
53
|
+
autoFixYear: false,
|
|
54
|
+
calendarIcon: /* @__PURE__ */ jsx(CalendarIcon, { className: "size-5" }),
|
|
55
|
+
dateTimeIcon: /* @__PURE__ */ jsx(DateTimeIcon, { className: "size-5" }),
|
|
56
|
+
timeIcon: /* @__PURE__ */ jsx(ClockIcon, { className: "size-6 text-interactive-text-secondary-idle" }),
|
|
57
|
+
setDateValueOnDateSelection: false
|
|
48
58
|
},
|
|
49
59
|
actionModal: {
|
|
50
60
|
titleTypography: {
|
|
@@ -4,11 +4,16 @@ 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
11
|
import { RadioVariantProps } from '../components/inputs/RadioGroup/radio.cva';
|
|
10
|
-
import {
|
|
12
|
+
import { SelectPopoverCva } from '../components/inputs/Selection/shared/selectDesktop.cva';
|
|
13
|
+
import { SelectListBoxItemCva } from '../components/inputs/Selection/shared/selectItem.cva';
|
|
14
|
+
import { InputBaseProps, InputClearClassProps, InputSideProps, InputSizeProps } from '../components/inputs/shared/input.cva';
|
|
11
15
|
import { LabelBaseProps } from '../components/inputs/shared/label.cva';
|
|
16
|
+
import { TooltipWrapperTriggerVariantProps } from '../components/inputs/shared/tooltipWrapper.cva';
|
|
12
17
|
import { ToggleVariantProps } from '../components/inputs/Toggle/toggle.cva';
|
|
13
18
|
import { MenuCvaVariantProps, MenuItemVariantProps, MenuPopoverVariantProps, MenuPopoverWrapperVariantProps } from '../components/Menu/menu.cva';
|
|
14
19
|
import { AccordionChevronVariantProps, AccordionHeadingSubtitleVariantProps, AccordionHeadingTitleVariantProps, AccordionHeadingVariantProps, AccordionIconVariantProps, AccordionItemVariantProps, AccordionPanelContentVariantProps, AccordionPanelVariantProps, AccordionTriggerVariantProps, AccordionVariantProps } from '../components/navigation/Accordion/accordion.cva';
|
|
@@ -24,13 +29,12 @@ import { LinkVariantProps } from '../components/text/Link/link.cva';
|
|
|
24
29
|
import { TagVariantProps } from '../components/text/Tag/tag.cva';
|
|
25
30
|
import { TypographyVariantProps } from '../components/text/Typography/typography.cva';
|
|
26
31
|
import { CompoundMapper, ConfigSchema } from '../utils/compoundMapper';
|
|
27
|
-
import { SelectListBoxItemCva } from '../components/inputs/Selection/shared/selectItem.cva';
|
|
28
32
|
export declare namespace UIStyle {
|
|
29
33
|
export type Cva<T> = (props: (T & ClassProp) | ClassProp) => string;
|
|
30
34
|
type OptionKey = {
|
|
31
35
|
[K in keyof Options]: Options[K] extends object ? `${K & string}.${keyof Options[K] & string}` : never;
|
|
32
36
|
}[keyof Options];
|
|
33
|
-
interface Options {
|
|
37
|
+
export interface Options {
|
|
34
38
|
button: {
|
|
35
39
|
cva?: Cva<ButtonVariantProps>;
|
|
36
40
|
sizeCva?: Cva<ButtonVariantProps>;
|
|
@@ -46,10 +50,12 @@ export declare namespace UIStyle {
|
|
|
46
50
|
cva?: Cva<CheckboxVariantProps>;
|
|
47
51
|
iconCva?: Cva<CheckboxIconVariantProps>;
|
|
48
52
|
typography?: CompoundMapper<TypographyVariantProps, CheckboxVariantProps>;
|
|
53
|
+
contentClassName?: CompoundMapper<string, CheckboxVariantProps>;
|
|
49
54
|
};
|
|
50
55
|
radio: {
|
|
51
56
|
cva?: Cva<RadioVariantProps>;
|
|
52
57
|
typography?: CompoundMapper<TypographyVariantProps, RadioVariantProps>;
|
|
58
|
+
contentClassName?: CompoundMapper<string, RadioVariantProps>;
|
|
53
59
|
};
|
|
54
60
|
status: {
|
|
55
61
|
iconCva?: Cva<ToastVariantProps>;
|
|
@@ -64,9 +70,16 @@ export declare namespace UIStyle {
|
|
|
64
70
|
};
|
|
65
71
|
input: {
|
|
66
72
|
baseCva?: Cva<InputBaseProps>;
|
|
73
|
+
clearClassCva?: Cva<InputClearClassProps>;
|
|
67
74
|
sizeCva?: Cva<InputSizeProps>;
|
|
68
75
|
sideCva?: Cva<InputSideProps>;
|
|
69
76
|
};
|
|
77
|
+
tooltipWrapper: {
|
|
78
|
+
triggerCva?: Cva<TooltipWrapperTriggerVariantProps>;
|
|
79
|
+
};
|
|
80
|
+
datePickerInput: {
|
|
81
|
+
contentRowCva?: Cva<DatePickerInputContentRowProps>;
|
|
82
|
+
};
|
|
70
83
|
label: {
|
|
71
84
|
cva?: Cva<LabelBaseProps>;
|
|
72
85
|
typography?: CompoundMapper<TypographyVariantProps, LabelBaseProps>;
|
|
@@ -74,6 +87,7 @@ export declare namespace UIStyle {
|
|
|
74
87
|
toggle: {
|
|
75
88
|
cva?: Cva<ToggleVariantProps>;
|
|
76
89
|
typography?: CompoundMapper<TypographyVariantProps, ToggleVariantProps>;
|
|
90
|
+
contentClassName?: CompoundMapper<string, ToggleVariantProps>;
|
|
77
91
|
};
|
|
78
92
|
typography: {
|
|
79
93
|
cva?: Cva<TypographyVariantProps>;
|
|
@@ -145,11 +159,13 @@ export declare namespace UIStyle {
|
|
|
145
159
|
cva?: Cva<PopoverVariantProps>;
|
|
146
160
|
};
|
|
147
161
|
formField: {
|
|
162
|
+
headerCva?: Cva<FormFieldHeaderVariantProps>;
|
|
148
163
|
errorLabelCva?: Cva<FormFieldErrorVariantProps>;
|
|
149
164
|
helperLabelCva?: Cva<FormFieldHelperVariantProps>;
|
|
150
165
|
};
|
|
151
166
|
select: {
|
|
152
167
|
listBoxItemCva?: Cva<SelectListBoxItemCva>;
|
|
168
|
+
popoverCva?: Cva<SelectPopoverCva>;
|
|
153
169
|
};
|
|
154
170
|
}
|
|
155
171
|
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];
|
|
@@ -3,6 +3,6 @@ type UseIntersectionObserverProps = {
|
|
|
3
3
|
onIntersectionChange?: (entry: IntersectionObserverEntry) => void;
|
|
4
4
|
} & IntersectionObserverInit;
|
|
5
5
|
export declare const useIntersectionObserver: <T extends HTMLElement>({ onIntersection, onIntersectionChange, root, rootMargin, threshold, }: UseIntersectionObserverProps) => {
|
|
6
|
-
ref:
|
|
6
|
+
ref: (element: T | null) => void;
|
|
7
7
|
};
|
|
8
8
|
export {};
|
|
@@ -1,25 +1,44 @@
|
|
|
1
|
-
import { useEffect, useRef } from "react";
|
|
1
|
+
import { useCallback, useEffect, useMemo, useRef } from "react";
|
|
2
2
|
//#region src/hooks/useIntersectionObserver.ts
|
|
3
3
|
var useIntersectionObserver = ({ onIntersection, onIntersectionChange, root, rootMargin, threshold }) => {
|
|
4
|
-
const
|
|
4
|
+
const elementRef = useRef(null);
|
|
5
|
+
const observerRef = useRef(null);
|
|
6
|
+
const onIntersectionRef = useRef(onIntersection);
|
|
7
|
+
const onIntersectionChangeRef = useRef(onIntersectionChange);
|
|
8
|
+
useEffect(() => {
|
|
9
|
+
onIntersectionRef.current = onIntersection;
|
|
10
|
+
}, [onIntersection]);
|
|
11
|
+
useEffect(() => {
|
|
12
|
+
onIntersectionChangeRef.current = onIntersectionChange;
|
|
13
|
+
}, [onIntersectionChange]);
|
|
5
14
|
useEffect(() => {
|
|
6
15
|
const observer = new IntersectionObserver((entries) => {
|
|
7
|
-
if (entries.some((entry) => entry.isIntersecting))
|
|
8
|
-
|
|
16
|
+
if (entries.some((entry) => entry.isIntersecting)) onIntersectionRef.current?.();
|
|
17
|
+
onIntersectionChangeRef.current?.(entries[0]);
|
|
9
18
|
}, {
|
|
10
19
|
root,
|
|
11
20
|
rootMargin,
|
|
12
21
|
threshold
|
|
13
22
|
});
|
|
14
|
-
|
|
15
|
-
|
|
23
|
+
observerRef.current = observer;
|
|
24
|
+
if (elementRef.current) observer.observe(elementRef.current);
|
|
25
|
+
return () => {
|
|
26
|
+
if (elementRef.current) observer.unobserve(elementRef.current);
|
|
27
|
+
observer.disconnect();
|
|
28
|
+
observerRef.current = null;
|
|
29
|
+
};
|
|
16
30
|
}, [
|
|
17
|
-
ref,
|
|
18
31
|
root,
|
|
19
|
-
|
|
20
|
-
|
|
32
|
+
rootMargin,
|
|
33
|
+
threshold
|
|
21
34
|
]);
|
|
22
|
-
|
|
35
|
+
const ref = useCallback((element) => {
|
|
36
|
+
if (elementRef.current === element) return;
|
|
37
|
+
if (observerRef.current && elementRef.current) observerRef.current.unobserve(elementRef.current);
|
|
38
|
+
elementRef.current = element;
|
|
39
|
+
if (observerRef.current && elementRef.current) observerRef.current.observe(elementRef.current);
|
|
40
|
+
}, []);
|
|
41
|
+
return useMemo(() => ({ ref }), [ref]);
|
|
23
42
|
};
|
|
24
43
|
//#endregion
|
|
25
44
|
export { useIntersectionObserver };
|
|
@@ -1,25 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { InfiniteData } from '@tanstack/react-query';
|
|
2
2
|
import { Key } from 'react-aria-components';
|
|
3
|
-
import {
|
|
4
|
-
type QueryResult<TData = any> = UseQueryResult<TData> | UseInfiniteQueryResult<TData>;
|
|
5
|
-
type QueryFn<TData = any> = (...args: any[]) => QueryResult<TData>;
|
|
6
|
-
type QueryDataType<TQueryFn extends QueryFn> = Exclude<ReturnType<TQueryFn>["data"], undefined>;
|
|
7
|
-
interface UseQueryAutocompleteOptions<TQueryFn extends QueryFn, TKey extends Key = Key> {
|
|
8
|
-
query: TQueryFn;
|
|
9
|
-
queryParams?: Parameters<TQueryFn>[0];
|
|
10
|
-
queryOptions?: Parameters<TQueryFn>[1];
|
|
11
|
-
mapItems: (data: QueryDataType<TQueryFn>) => SelectItem<TKey>[];
|
|
12
|
-
initialQueryState?: boolean;
|
|
13
|
-
search?: string;
|
|
14
|
-
}
|
|
3
|
+
import { InfiniteQueryPage, QueryFn, UseQueryAutocompleteOptions } from '../components/inputs/Selection/Autocomplete/queryAutocomplete.types';
|
|
15
4
|
export declare const useQueryAutocomplete: <TQueryFn extends QueryFn, TKey extends Key = Key>({ query, queryParams, queryOptions, mapItems, initialQueryState, search, }: UseQueryAutocompleteOptions<TQueryFn, TKey>) => {
|
|
16
5
|
data: any;
|
|
17
6
|
isLoading: boolean;
|
|
18
7
|
isQueryEnabled: boolean;
|
|
19
8
|
handleEnableQuery: () => void;
|
|
20
|
-
items: SelectItem<TKey>[];
|
|
9
|
+
items: import('..').SelectItem<TKey>[];
|
|
10
|
+
totalItems: number | undefined;
|
|
21
11
|
hasNextPage: boolean;
|
|
22
|
-
fetchNextPage: ((
|
|
12
|
+
fetchNextPage: ((options?: import('@tanstack/react-query').FetchNextPageOptions) => Promise<import('@tanstack/react-query').InfiniteQueryObserverResult<InfiniteData<InfiniteQueryPage<TKey>, unknown>, Error>>) | undefined;
|
|
23
13
|
isFetchingNextPage: boolean;
|
|
24
14
|
};
|
|
25
|
-
export {};
|
|
@@ -1,10 +1,19 @@
|
|
|
1
|
+
import { ApiQueryUtils } from "../utils/query.utils.js";
|
|
1
2
|
import { useMemo, useState } from "react";
|
|
2
3
|
//#region src/hooks/useQueryAutocomplete.ts
|
|
4
|
+
var isFilterSearchParams = (params) => {
|
|
5
|
+
return typeof params === "object" && params !== null && "filter" in params;
|
|
6
|
+
};
|
|
3
7
|
var useQueryAutocomplete = ({ query, queryParams, queryOptions, mapItems, initialQueryState, search }) => {
|
|
4
8
|
const [isQueryEnabled, setIsQueryEnabled] = useState(!initialQueryState);
|
|
5
9
|
const queryResult = query(search === void 0 ? queryParams : {
|
|
10
|
+
...queryParams,
|
|
11
|
+
limit: queryParams?.limit ?? ApiQueryUtils.DEFAULT_LIMIT,
|
|
6
12
|
search,
|
|
7
|
-
...queryParams
|
|
13
|
+
...isFilterSearchParams(queryParams) ? { filter: {
|
|
14
|
+
...queryParams.filter,
|
|
15
|
+
search
|
|
16
|
+
} } : {}
|
|
8
17
|
}, {
|
|
9
18
|
...queryOptions,
|
|
10
19
|
enabled: isQueryEnabled && (queryOptions?.enabled ?? true)
|
|
@@ -14,14 +23,14 @@ var useQueryAutocomplete = ({ query, queryParams, queryOptions, mapItems, initia
|
|
|
14
23
|
const isInfiniteQueryResult = (result) => {
|
|
15
24
|
return "hasNextPage" in result && "fetchNextPage" in result;
|
|
16
25
|
};
|
|
17
|
-
const isInfiniteQuery = isInfiniteQueryResult(queryResult);
|
|
18
26
|
const handleEnableQuery = () => {
|
|
19
27
|
setIsQueryEnabled(true);
|
|
20
28
|
};
|
|
21
|
-
const infiniteQueryResult =
|
|
29
|
+
const infiniteQueryResult = isInfiniteQueryResult(queryResult) ? queryResult : void 0;
|
|
22
30
|
const hasNextPage = infiniteQueryResult?.hasNextPage ?? false;
|
|
23
31
|
const fetchNextPage = infiniteQueryResult?.fetchNextPage;
|
|
24
32
|
const isFetchingNextPage = infiniteQueryResult?.isFetchingNextPage ?? false;
|
|
33
|
+
const totalItems = infiniteQueryResult?.data?.pages?.[0]?.totalItems;
|
|
25
34
|
const items = useMemo(() => {
|
|
26
35
|
if (!data) return [];
|
|
27
36
|
return mapItems(data);
|
|
@@ -32,6 +41,7 @@ var useQueryAutocomplete = ({ query, queryParams, queryOptions, mapItems, initia
|
|
|
32
41
|
isQueryEnabled,
|
|
33
42
|
handleEnableQuery,
|
|
34
43
|
items,
|
|
44
|
+
totalItems,
|
|
35
45
|
hasNextPage,
|
|
36
46
|
fetchNextPage,
|
|
37
47
|
isFetchingNextPage
|
package/dist/index.d.ts
CHANGED
|
@@ -78,6 +78,8 @@ export type { FormFieldProps } from './components/inputs/FormField/FormField';
|
|
|
78
78
|
export { FormField } from './components/inputs/FormField/FormField';
|
|
79
79
|
export type { ControlledNumberInputProps, NumberInputProps } from './components/inputs/Input/NumberInput/NumberInput';
|
|
80
80
|
export { NumberInput } from './components/inputs/Input/NumberInput/NumberInput';
|
|
81
|
+
export type { ControlledNumberRangeInputProps, NumberRangeInputProps, NumberRangeValue, } from './components/inputs/Input/NumberRangeInput/NumberRangeInput';
|
|
82
|
+
export { NumberRangeInput } from './components/inputs/Input/NumberRangeInput/NumberRangeInput';
|
|
81
83
|
export type { ControlledPasswordInputProps, PasswordInputProps, } from './components/inputs/Input/PasswordInput/PasswordInput';
|
|
82
84
|
export { PasswordInput } from './components/inputs/Input/PasswordInput/PasswordInput';
|
|
83
85
|
export type { ControlledTextAreaProps, TextAreaProps } from './components/inputs/Input/TextArea/TextArea';
|
|
@@ -94,11 +96,16 @@ export type { RadioVariantProps } from './components/inputs/RadioGroup/radio.cva
|
|
|
94
96
|
export type { AutocompleteProps, ControlledAutocompleteProps, } from './components/inputs/Selection/Autocomplete/Autocomplete';
|
|
95
97
|
export { Autocomplete } from './components/inputs/Selection/Autocomplete/Autocomplete';
|
|
96
98
|
export { QueryAutocomplete } from './components/inputs/Selection/Autocomplete/QueryAutocomplete';
|
|
99
|
+
export type { SelectBaseProps } from './components/inputs/Selection/shared/SelectBase';
|
|
100
|
+
export type { DefaultInitialSelectItem, SelectAsyncProps, SelectItem, } from './components/inputs/Selection/shared/select.types';
|
|
101
|
+
export type { QuerySelectProps } from './components/inputs/Selection/Select/QuerySelect';
|
|
102
|
+
export { QuerySelect } from './components/inputs/Selection/Select/QuerySelect';
|
|
97
103
|
export type { ControlledSelectProps, SelectProps } from './components/inputs/Selection/Select/Select';
|
|
98
104
|
export { Select } from './components/inputs/Selection/Select/Select';
|
|
99
105
|
export type { ControlledSliderProps, SliderProps } from './components/inputs/Slider/Slider';
|
|
100
106
|
export { Slider } from './components/inputs/Slider/Slider';
|
|
101
107
|
export type { InputVariantProps } from './components/inputs/shared/input.cva';
|
|
108
|
+
export type { TooltipWrapperTriggerVariantProps } from './components/inputs/shared/tooltipWrapper.cva';
|
|
102
109
|
export type { ControlledToggleProps, ToggleProps } from './components/inputs/Toggle/Toggle';
|
|
103
110
|
export { Toggle } from './components/inputs/Toggle/Toggle';
|
|
104
111
|
export type { MenuProps } from './components/Menu/Menu';
|
package/dist/index.js
CHANGED
|
@@ -68,10 +68,10 @@ import { Checkbox } from "./components/inputs/Checkbox/Checkbox.js";
|
|
|
68
68
|
import { useLongPressRepeat } from "./hooks/useLongPressRepeat.js";
|
|
69
69
|
import { useScrollableListBox } from "./hooks/useScrollableListBox.js";
|
|
70
70
|
import { FormField } from "./components/inputs/FormField/FormField.js";
|
|
71
|
+
import { useDebounceCallback } from "./hooks/useDebounceCallback.js";
|
|
71
72
|
import { DateTimeUtils } from "./utils/date-time.utils.js";
|
|
72
73
|
import { DatePicker } from "./components/inputs/DateTime/DatePicker/DatePicker.js";
|
|
73
74
|
import { Tag } from "./components/text/Tag/Tag.js";
|
|
74
|
-
import { useDebounceCallback } from "./hooks/useDebounceCallback.js";
|
|
75
75
|
import { useIntersectionObserver } from "./hooks/useIntersectionObserver.js";
|
|
76
76
|
import { TextInput } from "./components/inputs/Input/TextInput/TextInput.js";
|
|
77
77
|
import { Select } from "./components/inputs/Selection/Select/Select.js";
|
|
@@ -85,6 +85,7 @@ import { FileUpload } from "./components/inputs/File/FileUpload.js";
|
|
|
85
85
|
import { FileUploadContainer } from "./components/inputs/File/FileUploadContainer.js";
|
|
86
86
|
import { InputUpload } from "./components/inputs/File/InputUpload.js";
|
|
87
87
|
import { NumberInput } from "./components/inputs/Input/NumberInput/NumberInput.js";
|
|
88
|
+
import { NumberRangeInput } from "./components/inputs/Input/NumberRangeInput/NumberRangeInput.js";
|
|
88
89
|
import { PasswordInput } from "./components/inputs/Input/PasswordInput/PasswordInput.js";
|
|
89
90
|
import { TextArea } from "./components/inputs/Input/TextArea/TextArea.js";
|
|
90
91
|
import { Autocomplete } from "./components/inputs/Selection/Autocomplete/Autocomplete.js";
|
|
@@ -92,6 +93,7 @@ import { QueryAutocomplete } from "./components/inputs/Selection/Autocomplete/Qu
|
|
|
92
93
|
import { Slider } from "./components/inputs/Slider/Slider.js";
|
|
93
94
|
import { Toggle } from "./components/inputs/Toggle/Toggle.js";
|
|
94
95
|
import { Segment } from "./components/segment/Segment.js";
|
|
96
|
+
import { QuerySelect } from "./components/inputs/Selection/Select/QuerySelect.js";
|
|
95
97
|
import { ResponsivePopover } from "./components/overlays/ResponsivePopover/ResponsivePopover.js";
|
|
96
98
|
import { StringUtils } from "./utils/string.utils.js";
|
|
97
99
|
import { dynamicInputs } from "./helpers/dynamicInputs.js";
|
|
@@ -135,4 +137,4 @@ import { useTableColumnConfig } from "./hooks/useTableColumnConfig.js";
|
|
|
135
137
|
import { ArrayUtils } from "./utils/array.utils.js";
|
|
136
138
|
import { QueriesUtils } from "./utils/queries.utils.js";
|
|
137
139
|
import { RoutingUtils } from "./utils/routing.utils.js";
|
|
138
|
-
export { Accordion, ActionModal, Alert, AlignCenterIcon, AlignLeftIcon, AlignLeftRightIcon, AlignRightIcon, ArrayUtils, ArrowDropDownIcon, ArrowDropUpIcon, ArrowLeftIcon, ArrowRightIcon, Autocomplete, BoldIcon, BottomSheet, Breadcrumbs, BulletedListIcon, Button, CalendarIcon, CellText, CheckIcon, Checkbox, CheckboxCheckmarkIcon, CheckboxIndeterminateIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, ChevronsLeftIcon, ChevronsRightIcon, ClockIcon, CloseIcon, ColumnConfigModal, Confirmation, DatePicker, DateRangePicker, DateTimeIcon, DateTimePicker, DateTimeUtils, DateUtils, DomUtils, Drawer, FileUpload, FileUploadContainer, FileUtils, Form, FormField, HeaderText, HighlightIcon, HighlightOnIcon, HomeIcon, IconButton, InfiniteTable, InfoIcon, InlineIconButton, InputUpload, Inputs, ItalicIcon, Link, LinkContext, LinkIcon, Loader, Menu, MenuIcon, MenuItem, MenuPopover, Modal, NumberInput, NumberedListIcon, ObjectUtils, PaginatedTable, Pagination, PaginationList, PasswordInput, PillButton, PointerHorizontalIcon, PointerVerticalIcon, ProgressBar, QueriesUtils, QueryAutocomplete, RadioGroup, ResponsivePopover, RestUtils, RoutingUtils, Segment, Select, SendIcon, Slider, SplitButton, Stepper, StrikethroughIcon, StringUtils, Table, Tag, TextArea, TextButton, TextColorIcon, TextInput, ThemeContext, TimePicker, Toast, ToastContainer, Toggle, ToggleButton, Tooltip, TooltipEllipsis, Typography, UIConfig, UIRouter, UIStyle, UnderlinedIcon, VisibilityIcon, VisibilityOffIcon, compoundMapper, dynamicColumns, dynamicInputs, isEqual, logger, ns, resources, uiOutlineClass, useAutosave, useBreakpoint, useDebounceCallback, useDeepCompareEffect, useDeepCompareLayoutEffect, useDeepCompareMemo, useFilters, useForm, useFormAutosave, useIntersectionObserver, useLocalStorage, useLongPressRepeat, usePagination, useScrollableListBox, useSorting, useStateAndRef, useTableColumnConfig, useTableNav, useToast, useTranslationMemo };
|
|
140
|
+
export { Accordion, ActionModal, Alert, AlignCenterIcon, AlignLeftIcon, AlignLeftRightIcon, AlignRightIcon, ArrayUtils, ArrowDropDownIcon, ArrowDropUpIcon, ArrowLeftIcon, ArrowRightIcon, Autocomplete, BoldIcon, BottomSheet, Breadcrumbs, BulletedListIcon, Button, CalendarIcon, CellText, CheckIcon, Checkbox, CheckboxCheckmarkIcon, CheckboxIndeterminateIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, ChevronsLeftIcon, ChevronsRightIcon, ClockIcon, CloseIcon, ColumnConfigModal, Confirmation, DatePicker, DateRangePicker, DateTimeIcon, DateTimePicker, DateTimeUtils, DateUtils, DomUtils, Drawer, FileUpload, FileUploadContainer, FileUtils, Form, FormField, HeaderText, HighlightIcon, HighlightOnIcon, HomeIcon, IconButton, InfiniteTable, InfoIcon, InlineIconButton, InputUpload, Inputs, ItalicIcon, Link, LinkContext, LinkIcon, Loader, Menu, MenuIcon, MenuItem, MenuPopover, Modal, NumberInput, NumberRangeInput, NumberedListIcon, ObjectUtils, PaginatedTable, Pagination, PaginationList, PasswordInput, PillButton, PointerHorizontalIcon, PointerVerticalIcon, ProgressBar, QueriesUtils, QueryAutocomplete, QuerySelect, RadioGroup, ResponsivePopover, RestUtils, RoutingUtils, Segment, Select, SendIcon, Slider, SplitButton, Stepper, StrikethroughIcon, StringUtils, Table, Tag, TextArea, TextButton, TextColorIcon, TextInput, ThemeContext, TimePicker, Toast, ToastContainer, Toggle, ToggleButton, Tooltip, TooltipEllipsis, Typography, UIConfig, UIRouter, UIStyle, UnderlinedIcon, VisibilityIcon, VisibilityOffIcon, compoundMapper, dynamicColumns, dynamicInputs, isEqual, logger, ns, resources, uiOutlineClass, useAutosave, useBreakpoint, useDebounceCallback, useDeepCompareEffect, useDeepCompareLayoutEffect, useDeepCompareMemo, useFilters, useForm, useFormAutosave, useIntersectionObserver, useLocalStorage, useLongPressRepeat, usePagination, useScrollableListBox, useSorting, useStateAndRef, useTableColumnConfig, useTableNav, useToast, useTranslationMemo };
|
|
@@ -1,14 +1,28 @@
|
|
|
1
1
|
import { CalendarDate, CalendarDateTime, DateValue, ZonedDateTime } from '@internationalized/date';
|
|
2
2
|
export declare namespace DateTimeUtils {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
function
|
|
7
|
-
function
|
|
3
|
+
interface LocalizedDateFormatOptions {
|
|
4
|
+
shouldForceLeadingZeros?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export function getDatePlaceholder(locale?: string, options?: LocalizedDateFormatOptions): string;
|
|
7
|
+
export function getTimePlaceholder(locale?: string): string;
|
|
8
|
+
export function getDateTimePlaceholder(locale?: string, options?: LocalizedDateFormatOptions): string;
|
|
9
|
+
export function getDateRangePlaceholder(locale?: string, options?: LocalizedDateFormatOptions): string;
|
|
10
|
+
export function formatCalendarDateLocalized(calendarDate: CalendarDate, locale?: string, options?: LocalizedDateFormatOptions): string;
|
|
11
|
+
export function formatTimeLocalized(timeValue: {
|
|
12
|
+
hour: number;
|
|
13
|
+
minute: number;
|
|
14
|
+
}, locale?: string): string;
|
|
15
|
+
export function formatCalendarDateTimeLocalized(calendarDateTime: Pick<CalendarDateTime, "day" | "month" | "year" | "hour" | "minute">, locale?: string, options?: LocalizedDateFormatOptions): string;
|
|
16
|
+
export function fromISOtoZonedDateTime(isoString: string): ZonedDateTime;
|
|
17
|
+
export function fromDateValueToISO(dateValue: DateValue): string;
|
|
18
|
+
export function fromLocalToZonedDateTime(date: Date): ZonedDateTime;
|
|
19
|
+
export function fromDateValueToLocal(dateValue: DateValue): Date;
|
|
20
|
+
export function fromCalendarDateToUTCISO(calendarDate: CalendarDate, options?: {
|
|
8
21
|
endOfDay?: boolean;
|
|
9
22
|
}): string;
|
|
10
|
-
function fromUTCISOToCalendarDate(isoString: string): CalendarDate;
|
|
11
|
-
function fromCalendarDateTimeToUTCISO(calendarDateTime: CalendarDateTime): string;
|
|
12
|
-
function fromUTCISOToCalendarDateTime(isoString: string): CalendarDateTime;
|
|
13
|
-
function formatTextDateToCalendarDateTime(textDate: string | null): CalendarDateTime | null;
|
|
23
|
+
export function fromUTCISOToCalendarDate(isoString: string): CalendarDate;
|
|
24
|
+
export function fromCalendarDateTimeToUTCISO(calendarDateTime: CalendarDateTime): string;
|
|
25
|
+
export function fromUTCISOToCalendarDateTime(isoString: string): CalendarDateTime;
|
|
26
|
+
export function formatTextDateToCalendarDateTime(textDate: string | null): CalendarDateTime | null;
|
|
27
|
+
export {};
|
|
14
28
|
}
|