@rovula/ui 0.1.42 → 0.1.43
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/cjs/bundle.js +1 -1
- package/dist/cjs/bundle.js.map +1 -1
- package/dist/cjs/types/components/AutoComplete/AutoComplete.d.ts +3 -1
- package/dist/cjs/types/components/AutoComplete/AutoComplete.stories.d.ts +2 -1
- package/dist/components/AutoComplete/AutoComplete.js +4 -4
- package/dist/esm/bundle.js +1 -1
- package/dist/esm/bundle.js.map +1 -1
- package/dist/esm/types/components/AutoComplete/AutoComplete.d.ts +3 -1
- package/dist/esm/types/components/AutoComplete/AutoComplete.stories.d.ts +2 -1
- package/dist/index.d.ts +3 -1
- package/package.json +1 -1
- package/src/components/AutoComplete/AutoComplete.tsx +7 -2
|
@@ -61,13 +61,15 @@ export type AutoCompleteProps<T extends AutoCompleteOption = AutoCompleteOption>
|
|
|
61
61
|
listboxClassName?: string;
|
|
62
62
|
/** Extra inline styles applied to the options list container */
|
|
63
63
|
listboxStyle?: React.CSSProperties;
|
|
64
|
+
/** Extra inline styles applied to the Popover content wrapper (portal mode only) */
|
|
65
|
+
popoverStyle?: React.CSSProperties;
|
|
64
66
|
/** Extra className applied to each option item */
|
|
65
67
|
optionClassName?: string;
|
|
66
68
|
/** Extra inline styles applied to each option item */
|
|
67
69
|
optionStyle?: React.CSSProperties;
|
|
68
70
|
"data-testid"?: string;
|
|
69
71
|
} & Omit<InputProps, OmittedInputProps>;
|
|
70
|
-
declare function AutoCompleteInner<T extends AutoCompleteOption = AutoCompleteOption>({ options, value, onChange, onSelect, onBlur, onSearch, loading, noOptionsText, showNoOptions, renderOption, filterOptions, portal, listboxClassName, listboxStyle, optionClassName, optionStyle, "data-testid": testId, id, label, fullwidth, size, rounded, variant, disabled, ...rest }: AutoCompleteProps<T>, ref: React.ForwardedRef<HTMLInputElement>): import("react/jsx-runtime").JSX.Element;
|
|
72
|
+
declare function AutoCompleteInner<T extends AutoCompleteOption = AutoCompleteOption>({ options, value, onChange, onSelect, onBlur, onSearch, loading, noOptionsText, showNoOptions, renderOption, filterOptions, portal, listboxClassName, listboxStyle, popoverStyle, optionClassName, optionStyle, "data-testid": testId, id, label, fullwidth, size, rounded, variant, disabled, ...rest }: AutoCompleteProps<T>, ref: React.ForwardedRef<HTMLInputElement>): import("react/jsx-runtime").JSX.Element;
|
|
71
73
|
declare const AutoComplete: <T extends AutoCompleteOption = AutoCompleteOption>(props: AutoCompleteProps<T> & {
|
|
72
74
|
ref?: React.ForwardedRef<HTMLInputElement>;
|
|
73
75
|
}) => ReturnType<typeof AutoCompleteInner>;
|
|
@@ -5,7 +5,7 @@ declare const meta: {
|
|
|
5
5
|
title: string;
|
|
6
6
|
component: <T extends AutoCompleteOption = AutoCompleteOption>(props: import("./AutoComplete").AutoCompleteProps<T> & {
|
|
7
7
|
ref?: React.ForwardedRef<HTMLInputElement>;
|
|
8
|
-
}) => ReturnType<(<T_1 extends AutoCompleteOption = AutoCompleteOption>({ options, value, onChange, onSelect, onBlur, onSearch, loading, noOptionsText, showNoOptions, renderOption, filterOptions, portal, listboxClassName, listboxStyle, optionClassName, optionStyle, "data-testid": testId, id, label, fullwidth, size, rounded, variant, disabled, ...rest }: import("./AutoComplete").AutoCompleteProps<T_1>, ref: React.ForwardedRef<HTMLInputElement>) => import("react/jsx-runtime").JSX.Element)>;
|
|
8
|
+
}) => ReturnType<(<T_1 extends AutoCompleteOption = AutoCompleteOption>({ options, value, onChange, onSelect, onBlur, onSearch, loading, noOptionsText, showNoOptions, renderOption, filterOptions, portal, listboxClassName, listboxStyle, popoverStyle, optionClassName, optionStyle, "data-testid": testId, id, label, fullwidth, size, rounded, variant, disabled, ...rest }: import("./AutoComplete").AutoCompleteProps<T_1>, ref: React.ForwardedRef<HTMLInputElement>) => import("react/jsx-runtime").JSX.Element)>;
|
|
9
9
|
tags: string[];
|
|
10
10
|
parameters: {
|
|
11
11
|
layout: string;
|
|
@@ -25,6 +25,7 @@ declare const meta: {
|
|
|
25
25
|
portal?: boolean | undefined;
|
|
26
26
|
listboxClassName?: string | undefined;
|
|
27
27
|
listboxStyle?: React.CSSProperties | undefined;
|
|
28
|
+
popoverStyle?: React.CSSProperties | undefined;
|
|
28
29
|
optionClassName?: string | undefined;
|
|
29
30
|
optionStyle?: React.CSSProperties | undefined;
|
|
30
31
|
"data-testid"?: string | undefined;
|
package/dist/index.d.ts
CHANGED
|
@@ -534,13 +534,15 @@ type AutoCompleteProps<T extends AutoCompleteOption = AutoCompleteOption> = {
|
|
|
534
534
|
listboxClassName?: string;
|
|
535
535
|
/** Extra inline styles applied to the options list container */
|
|
536
536
|
listboxStyle?: React__default.CSSProperties;
|
|
537
|
+
/** Extra inline styles applied to the Popover content wrapper (portal mode only) */
|
|
538
|
+
popoverStyle?: React__default.CSSProperties;
|
|
537
539
|
/** Extra className applied to each option item */
|
|
538
540
|
optionClassName?: string;
|
|
539
541
|
/** Extra inline styles applied to each option item */
|
|
540
542
|
optionStyle?: React__default.CSSProperties;
|
|
541
543
|
"data-testid"?: string;
|
|
542
544
|
} & Omit<InputProps, OmittedInputProps>;
|
|
543
|
-
declare function AutoCompleteInner<T extends AutoCompleteOption = AutoCompleteOption>({ options, value, onChange, onSelect, onBlur, onSearch, loading, noOptionsText, showNoOptions, renderOption, filterOptions, portal, listboxClassName, listboxStyle, optionClassName, optionStyle, "data-testid": testId, id, label, fullwidth, size, rounded, variant, disabled, ...rest }: AutoCompleteProps<T>, ref: React__default.ForwardedRef<HTMLInputElement>): react_jsx_runtime.JSX.Element;
|
|
545
|
+
declare function AutoCompleteInner<T extends AutoCompleteOption = AutoCompleteOption>({ options, value, onChange, onSelect, onBlur, onSearch, loading, noOptionsText, showNoOptions, renderOption, filterOptions, portal, listboxClassName, listboxStyle, popoverStyle, optionClassName, optionStyle, "data-testid": testId, id, label, fullwidth, size, rounded, variant, disabled, ...rest }: AutoCompleteProps<T>, ref: React__default.ForwardedRef<HTMLInputElement>): react_jsx_runtime.JSX.Element;
|
|
544
546
|
declare const AutoComplete: <T extends AutoCompleteOption = AutoCompleteOption>(props: AutoCompleteProps<T> & {
|
|
545
547
|
ref?: React__default.ForwardedRef<HTMLInputElement>;
|
|
546
548
|
}) => ReturnType<typeof AutoCompleteInner>;
|
package/package.json
CHANGED
|
@@ -115,6 +115,9 @@ export type AutoCompleteProps<
|
|
|
115
115
|
/** Extra inline styles applied to the options list container */
|
|
116
116
|
listboxStyle?: React.CSSProperties;
|
|
117
117
|
|
|
118
|
+
/** Extra inline styles applied to the Popover content wrapper (portal mode only) */
|
|
119
|
+
popoverStyle?: React.CSSProperties;
|
|
120
|
+
|
|
118
121
|
/** Extra className applied to each option item */
|
|
119
122
|
optionClassName?: string;
|
|
120
123
|
|
|
@@ -151,6 +154,7 @@ function AutoCompleteInner<T extends AutoCompleteOption = AutoCompleteOption>(
|
|
|
151
154
|
portal = true,
|
|
152
155
|
listboxClassName,
|
|
153
156
|
listboxStyle,
|
|
157
|
+
popoverStyle,
|
|
154
158
|
optionClassName,
|
|
155
159
|
optionStyle,
|
|
156
160
|
"data-testid": testId,
|
|
@@ -243,7 +247,8 @@ function AutoCompleteInner<T extends AutoCompleteOption = AutoCompleteOption>(
|
|
|
243
247
|
role="listbox"
|
|
244
248
|
style={{ boxShadow: "var(--dropdown-menu-shadow)", ...listboxStyle }}
|
|
245
249
|
className={cn(
|
|
246
|
-
"
|
|
250
|
+
"max-h-60 overflow-y-auto",
|
|
251
|
+
"rounded-md border border-bg-stroke3",
|
|
247
252
|
"bg-modal-dropdown-surface text-text-g-contrast-high",
|
|
248
253
|
!portal && "absolute top-full left-0 w-full -mt-3 z-[51]",
|
|
249
254
|
portal && "z-[51]",
|
|
@@ -352,7 +357,7 @@ function AutoCompleteInner<T extends AutoCompleteOption = AutoCompleteOption>(
|
|
|
352
357
|
side="bottom"
|
|
353
358
|
align="start"
|
|
354
359
|
sideOffset={-12}
|
|
355
|
-
style={{ width: "var(--radix-popover-trigger-width)" }}
|
|
360
|
+
style={{ width: "var(--radix-popover-trigger-width)", zIndex: 51, ...popoverStyle }}
|
|
356
361
|
>
|
|
357
362
|
{listContent}
|
|
358
363
|
</PopoverPrimitive.Content>
|