@povio/ui 2.2.11 → 2.3.0-rc.1

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