untitledui 0.1.2 → 0.1.4
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/index.mjs +19 -0
- package/package.json +10 -8
- package/templates/default/package.json +20 -21
- package/templates/default/src/app/home-screen.tsx +3 -4
- package/templates/default/src/app/layout.tsx +6 -14
- package/templates/default/src/components/foundations/featured-icon/featured-icons.tsx +1 -1
- package/templates/default/src/components/marketing/header-navigation/base-components/nav-menu-item.tsx +1 -1
- package/templates/default/src/components/marketing/header-navigation/components/header.tsx +1 -1
- package/templates/default/src/components/marketing/header-navigation/dropdown-header-navigation.tsx +1 -1
- package/templates/default/src/components/shared/avatar/avatar-label-group.tsx +1 -1
- package/templates/default/src/components/shared/avatar/avatar-profile-photo.tsx +1 -1
- package/templates/default/src/components/shared/avatar/avatar.tsx +1 -1
- package/templates/default/src/components/shared/avatar/base-components/avatar-add-button.tsx +1 -1
- package/templates/default/src/components/shared/avatar/base-components/avatar-company-icon.tsx +1 -1
- package/templates/default/src/components/shared/avatar/base-components/avatar-online-indicator.tsx +1 -1
- package/templates/default/src/components/shared/avatar/base-components/verified-tick.tsx +1 -1
- package/templates/default/src/components/shared/badges/badge-groups.tsx +1 -1
- package/templates/default/src/components/shared/badges/badges.tsx +1 -1
- package/templates/default/src/components/shared/button-group/button-group.tsx +1 -1
- package/templates/default/src/components/shared/buttons/app-store-buttons-outline.tsx +1 -1
- package/templates/default/src/components/shared/buttons/app-store-buttons.tsx +1 -1
- package/templates/default/src/components/shared/buttons/button-utility.tsx +1 -1
- package/templates/default/src/components/shared/buttons/button.tsx +3 -2
- package/templates/default/src/components/shared/buttons/close-button.tsx +1 -1
- package/templates/default/src/components/shared/buttons/social-button.tsx +1 -1
- package/templates/default/src/components/shared/checkbox/checkbox.tsx +1 -1
- package/templates/default/src/components/shared/dropdown/dropdown.tsx +28 -19
- package/templates/default/src/components/shared/form/hook-form.tsx +75 -0
- package/templates/default/src/components/shared/{inputs → input}/hint-text.tsx +1 -1
- package/templates/default/src/components/shared/{inputs/input → input}/index.tsx +4 -4
- package/templates/default/src/components/shared/{inputs/input → input}/input-payment.tsx +5 -5
- package/templates/default/src/components/shared/{inputs/input → input}/input-with-button.tsx +5 -5
- package/templates/default/src/components/shared/{inputs/input → input}/input-with-dropdown.tsx +5 -5
- package/templates/default/src/components/shared/{inputs/input → input}/input-with-prefix.tsx +5 -5
- package/templates/default/src/components/shared/{inputs → input}/label.tsx +1 -1
- package/templates/default/src/components/shared/progress-indicators/progress-circles.tsx +1 -1
- package/templates/default/src/components/shared/progress-indicators/progress-indicators.tsx +1 -1
- package/templates/default/src/components/shared/radio-buttons/radio-buttons.tsx +1 -1
- package/templates/default/src/components/shared/radio-groups/radio-group-avatar.tsx +1 -1
- package/templates/default/src/components/shared/radio-groups/radio-group-checkbox.tsx +1 -1
- package/templates/default/src/components/shared/radio-groups/radio-group-icon-card.tsx +1 -1
- package/templates/default/src/components/shared/radio-groups/radio-group-icon-simple.tsx +1 -1
- package/templates/default/src/components/shared/radio-groups/radio-group-payment-icon.tsx +1 -1
- package/templates/default/src/components/shared/radio-groups/radio-group-radio-button.tsx +1 -1
- package/templates/default/src/components/shared/{input-dropdown → select}/combobox.tsx +10 -10
- package/templates/default/src/components/shared/{input-dropdown → select}/multi-select.tsx +167 -167
- package/templates/default/src/components/shared/{input-dropdown → select}/popover.tsx +3 -3
- package/templates/default/src/components/shared/select/select-item.tsx +70 -0
- package/templates/default/src/components/shared/{input-dropdown/select.tsx → select/select-native.tsx} +2 -2
- package/templates/default/src/components/shared/select/select.tsx +143 -0
- package/templates/default/src/components/shared/slider/slider.tsx +1 -1
- package/templates/default/src/components/shared/tags/base-components/tag-checkbox.tsx +1 -1
- package/templates/default/src/components/shared/tags/base-components/tag-close-x.tsx +1 -1
- package/templates/default/src/components/shared/tags/tags.tsx +1 -1
- package/templates/default/src/components/shared/{inputs/textarea → textarea}/textarea.tsx +3 -3
- package/templates/default/src/components/shared/toggle/toggle.tsx +1 -1
- package/templates/default/src/components/shared/tooltips/tooltips.tsx +1 -1
- package/templates/default/src/providers/theme.tsx +1 -1
- package/templates/default/src/styles/globals.css +3 -1
- package/templates/default/src/styles/theme.css +392 -380
- package/templates/default/src/styles/typography.css +20 -20
- package/dist/commands/add.js +0 -339
- package/dist/commands/init.js +0 -436
- package/dist/helper/download-tar-api.js +0 -129
- package/dist/helper/download-tar.js +0 -81
- package/dist/helper/find-css-file.js +0 -19
- package/dist/helper/formatText.js +0 -37
- package/dist/helper/get-components-api.js +0 -47
- package/dist/helper/get-components-list.js +0 -62
- package/dist/helper/get-components.js +0 -19
- package/dist/helper/get-config.js +0 -163
- package/dist/helper/get-package-info.js +0 -99
- package/dist/helper/get-pkg-manager.js +0 -16
- package/dist/helper/get-project.js +0 -176
- package/dist/helper/install-template.js +0 -29
- package/dist/helper/match-color-css.js +0 -82
- package/dist/helper/update-color-css.js +0 -134
- package/dist/index.js +0 -25
- package/dist/package.json +0 -50
- package/dist/res/components.json +0 -520
- package/dist/res/config.json +0 -3
- package/templates/default/src/components/shared/input-dropdown/dropdown-item.tsx +0 -98
- package/templates/default/src/components/shared/input-dropdown/input-dropdown.tsx +0 -172
- package/templates/default/src/fonts/GeistMonoVF.woff +0 -0
- package/templates/default/src/fonts/GeistVF.woff +0 -0
- package/templates/default/src/styles/colors.css +0 -805
- /package/templates/default/src/components/shared/{inputs → file-upload-trigger}/file-upload-trigger.tsx +0 -0
- /package/templates/default/src/components/shared/{inputs/form → form}/form.tsx +0 -0
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import type { ComponentPropsWithoutRef, ReactNode } from "react";
|
|
2
|
+
import { createContext, useContext, useId } from "react";
|
|
3
|
+
import { Form as AriaForm } from "react-aria-components";
|
|
4
|
+
import type { Control, FieldPath, FieldValues, UseControllerReturn, UseFormReturn } from "react-hook-form";
|
|
5
|
+
import { FormProvider, useController, useFormContext } from "react-hook-form";
|
|
6
|
+
|
|
7
|
+
interface FormProps<TFieldValues extends FieldValues = FieldValues> extends ComponentPropsWithoutRef<typeof AriaForm> {
|
|
8
|
+
form: UseFormReturn<TFieldValues>;
|
|
9
|
+
children: ReactNode;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
interface FormFieldProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> {
|
|
13
|
+
name: TName;
|
|
14
|
+
control: Control<TFieldValues>;
|
|
15
|
+
children: ReactNode | ((control: UseControllerReturn<TFieldValues, TName>) => ReactNode);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
interface FormFieldContextValues<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> {
|
|
19
|
+
id: string;
|
|
20
|
+
name: TName;
|
|
21
|
+
control?: UseControllerReturn<TFieldValues, TName>;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const FormFieldContext = createContext<FormFieldContextValues>({} as FormFieldContextValues);
|
|
25
|
+
|
|
26
|
+
export const useFormFieldContext = () => {
|
|
27
|
+
const context = useContext(FormFieldContext);
|
|
28
|
+
const { getFieldState, formState } = useFormContext();
|
|
29
|
+
const fieldState = getFieldState(context.name, formState);
|
|
30
|
+
|
|
31
|
+
if (!context) {
|
|
32
|
+
throw new Error("The 'useFormContext' hook must be used within a '<FormField />'");
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
return { ...context, ...fieldState };
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export const HookForm = <TFieldValues extends FieldValues = FieldValues>({ form, ...props }: FormProps<TFieldValues>) => {
|
|
39
|
+
return (
|
|
40
|
+
<FormProvider {...form}>
|
|
41
|
+
<AriaForm {...props} />
|
|
42
|
+
</FormProvider>
|
|
43
|
+
);
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
HookForm.displayName = "HookForm";
|
|
47
|
+
|
|
48
|
+
export const FormField = <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({
|
|
49
|
+
children,
|
|
50
|
+
...props
|
|
51
|
+
}: FormFieldProps<TFieldValues, TName>) => {
|
|
52
|
+
const id = "form-item-" + useId();
|
|
53
|
+
const control = useController(props);
|
|
54
|
+
const withValidationBehavior = {
|
|
55
|
+
...control,
|
|
56
|
+
field: {
|
|
57
|
+
...control.field,
|
|
58
|
+
validationBehavior: "aria",
|
|
59
|
+
},
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
return (
|
|
63
|
+
<FormFieldContext.Provider
|
|
64
|
+
value={{
|
|
65
|
+
id,
|
|
66
|
+
name: props.name,
|
|
67
|
+
control: control as UseControllerReturn<FieldValues, TName>,
|
|
68
|
+
}}
|
|
69
|
+
>
|
|
70
|
+
{children && (typeof children === "function" ? children(withValidationBehavior) : children)}
|
|
71
|
+
</FormFieldContext.Provider>
|
|
72
|
+
);
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
FormField.displayName = "FormField";
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import type { ReactNode, Ref } from "react";
|
|
4
4
|
import type { TextProps as AriaTextProps } from "react-aria-components";
|
|
5
5
|
import { Text as AriaText } from "react-aria-components";
|
|
6
|
-
import { cx } from "@/components/utils";
|
|
6
|
+
import { cx } from "@/components/utils/cx";
|
|
7
7
|
|
|
8
8
|
interface HintTextProps extends AriaTextProps {
|
|
9
9
|
children: ReactNode;
|
|
@@ -4,10 +4,10 @@ import type { ComponentType, HTMLAttributes, ReactNode, Ref } from "react";
|
|
|
4
4
|
import { HelpCircle, InfoCircle } from "@untitledui/icons";
|
|
5
5
|
import type { TextFieldProps as AriaTextFieldProps } from "react-aria-components";
|
|
6
6
|
import { Input as AriaInput, TextField as AriaTextField, Group } from "react-aria-components";
|
|
7
|
-
import HintText from "@/components/shared/
|
|
8
|
-
import Label from "@/components/shared/
|
|
7
|
+
import HintText from "@/components/shared/input/hint-text";
|
|
8
|
+
import Label from "@/components/shared/input/label";
|
|
9
9
|
import { Tooltip, TooltipTrigger } from "@/components/shared/tooltips/tooltips";
|
|
10
|
-
import { cx, sortCx } from "@/components/utils";
|
|
10
|
+
import { cx, sortCx } from "@/components/utils/cx";
|
|
11
11
|
|
|
12
12
|
export interface InputBaseProps extends TextFieldProps {
|
|
13
13
|
label?: string;
|
|
@@ -130,7 +130,7 @@ export const InputBase = ({ size = "sm", placeholder, icon: Icon, isDisabled, is
|
|
|
130
130
|
)}
|
|
131
131
|
aria-hidden="true"
|
|
132
132
|
>
|
|
133
|
-
{shortcut
|
|
133
|
+
{typeof shortcut === "string" ? shortcut : "⌘K"}
|
|
134
134
|
</span>
|
|
135
135
|
</div>
|
|
136
136
|
)}
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
import React, { useState } from "react";
|
|
4
4
|
import { TextField } from "react-aria-components";
|
|
5
5
|
import { AmexIcon, DiscoverIcon, MastercardIcon, UnionPayIcon, VisaIcon } from "@/components/foundations/payment-icons";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import Label from "@/components/shared/
|
|
10
|
-
import { cx } from "@/components/utils";
|
|
6
|
+
import type { InputBaseProps } from "@/components/shared/input";
|
|
7
|
+
import { InputBase } from "@/components/shared/input";
|
|
8
|
+
import HintText from "@/components/shared/input/hint-text";
|
|
9
|
+
import Label from "@/components/shared/input/label";
|
|
10
|
+
import { cx } from "@/components/utils/cx";
|
|
11
11
|
|
|
12
12
|
const cardTypes = [
|
|
13
13
|
{
|
package/templates/default/src/components/shared/{inputs/input → input}/input-with-button.tsx
RENAMED
|
@@ -6,11 +6,11 @@ import { Copy01 } from "@untitledui/icons";
|
|
|
6
6
|
import { TextField } from "react-aria-components";
|
|
7
7
|
import type { CommonProps } from "@/components/shared/buttons/button";
|
|
8
8
|
import Button from "@/components/shared/buttons/button";
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import Label from "@/components/shared/
|
|
13
|
-
import { cx } from "@/components/utils";
|
|
9
|
+
import type { InputBaseProps } from "@/components/shared/input";
|
|
10
|
+
import { InputBase } from "@/components/shared/input";
|
|
11
|
+
import HintText from "@/components/shared/input/hint-text";
|
|
12
|
+
import Label from "@/components/shared/input/label";
|
|
13
|
+
import { cx } from "@/components/utils/cx";
|
|
14
14
|
|
|
15
15
|
interface InputWithButtonProps extends Omit<InputBaseProps, "icon"> {
|
|
16
16
|
buttonText: string;
|
package/templates/default/src/components/shared/{inputs/input → input}/input-with-dropdown.tsx
RENAMED
|
@@ -4,11 +4,11 @@ import React from "react";
|
|
|
4
4
|
import { ChevronDown } from "@untitledui/icons";
|
|
5
5
|
import type { Key } from "react-aria-components";
|
|
6
6
|
import { TextField } from "react-aria-components";
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import Label from "@/components/shared/
|
|
11
|
-
import { cx, sortCx } from "@/components/utils";
|
|
7
|
+
import type { InputBaseProps } from "@/components/shared/input";
|
|
8
|
+
import { InputBase } from "@/components/shared/input";
|
|
9
|
+
import HintText from "@/components/shared/input/hint-text";
|
|
10
|
+
import Label from "@/components/shared/input/label";
|
|
11
|
+
import { cx, sortCx } from "@/components/utils/cx";
|
|
12
12
|
|
|
13
13
|
interface SelectorComponentProps {
|
|
14
14
|
size: "sm" | "md";
|
package/templates/default/src/components/shared/{inputs/input → input}/input-with-prefix.tsx
RENAMED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import type { HTMLAttributes } from "react";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import Label from "@/components/shared/
|
|
8
|
-
import { cx } from "@/components/utils";
|
|
4
|
+
import type { InputBaseProps } from "@/components/shared/input";
|
|
5
|
+
import { InputBase, TextField } from "@/components/shared/input";
|
|
6
|
+
import HintText from "@/components/shared/input/hint-text";
|
|
7
|
+
import Label from "@/components/shared/input/label";
|
|
8
|
+
import { cx } from "@/components/utils/cx";
|
|
9
9
|
|
|
10
10
|
interface InputPrefixProps extends HTMLAttributes<HTMLDivElement> {
|
|
11
11
|
position?: "leading" | "trailing";
|
|
@@ -5,7 +5,7 @@ import { HelpCircle } from "@untitledui/icons";
|
|
|
5
5
|
import type { LabelProps as AriaLabelProps } from "react-aria-components";
|
|
6
6
|
import { Label as AriaLabel } from "react-aria-components";
|
|
7
7
|
import { Tooltip, TooltipTrigger } from "@/components/shared/tooltips/tooltips";
|
|
8
|
-
import { cx } from "@/components/utils";
|
|
8
|
+
import { cx } from "@/components/utils/cx";
|
|
9
9
|
|
|
10
10
|
interface LabelProps extends AriaLabelProps {
|
|
11
11
|
children: ReactNode;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { type ReactNode, type Ref, createContext, useContext } from "react";
|
|
4
4
|
import type { RadioGroupProps as AriaRadioGroupProps } from "react-aria-components";
|
|
5
5
|
import { type RadioProps as AriaRadioProps, Radio, RadioGroup } from "react-aria-components";
|
|
6
|
-
import { cx } from "@/components/utils";
|
|
6
|
+
import { cx } from "@/components/utils/cx";
|
|
7
7
|
|
|
8
8
|
export interface RadioButtonGroupContextType {
|
|
9
9
|
size?: "sm" | "md";
|
|
@@ -4,7 +4,7 @@ import type { RadioGroupProps } from "react-aria-components";
|
|
|
4
4
|
import { Label, Radio, RadioGroup, Text } from "react-aria-components";
|
|
5
5
|
import AvatarComponent from "@/components/shared/avatar/avatar";
|
|
6
6
|
import { CheckboxBase } from "@/components/shared/checkbox/checkbox";
|
|
7
|
-
import { cx } from "@/components/utils";
|
|
7
|
+
import { cx } from "@/components/utils/cx";
|
|
8
8
|
|
|
9
9
|
interface AvatarItemType {
|
|
10
10
|
id: string;
|
|
@@ -4,7 +4,7 @@ import type { FC } from "react";
|
|
|
4
4
|
import type { RadioGroupProps } from "react-aria-components";
|
|
5
5
|
import { Label, Radio, RadioGroup, Text } from "react-aria-components";
|
|
6
6
|
import { CheckboxBase } from "@/components/shared/checkbox/checkbox";
|
|
7
|
-
import { cx } from "@/components/utils";
|
|
7
|
+
import { cx } from "@/components/utils/cx";
|
|
8
8
|
|
|
9
9
|
type RadioGroupItemType = {
|
|
10
10
|
value: string;
|
|
@@ -6,7 +6,7 @@ import { Radio, RadioGroup } from "react-aria-components";
|
|
|
6
6
|
import { FeaturedIcon } from "@/components/foundations/featured-icon/featured-icons";
|
|
7
7
|
import { BadgeWithDot } from "@/components/shared/badges/badges";
|
|
8
8
|
import { CheckboxBase } from "@/components/shared/checkbox/checkbox";
|
|
9
|
-
import { cx } from "@/components/utils";
|
|
9
|
+
import { cx } from "@/components/utils/cx";
|
|
10
10
|
|
|
11
11
|
type IconCardItemType = {
|
|
12
12
|
value: string;
|
|
@@ -5,7 +5,7 @@ import type { RadioGroupProps } from "react-aria-components";
|
|
|
5
5
|
import { Label, Radio, RadioGroup, Text } from "react-aria-components";
|
|
6
6
|
import { FeaturedIcon } from "@/components/foundations/featured-icon/featured-icons";
|
|
7
7
|
import { CheckboxBase } from "@/components/shared/checkbox/checkbox";
|
|
8
|
-
import { cx } from "@/components/utils";
|
|
8
|
+
import { cx } from "@/components/utils/cx";
|
|
9
9
|
|
|
10
10
|
type RadioGroupItemType = {
|
|
11
11
|
value: string;
|
|
@@ -5,7 +5,7 @@ import type { RadioGroupProps } from "react-aria-components";
|
|
|
5
5
|
import { Label, Radio, RadioGroup, Text } from "react-aria-components";
|
|
6
6
|
import Button from "@/components/shared/buttons/button";
|
|
7
7
|
import { CheckboxBase } from "@/components/shared/checkbox/checkbox";
|
|
8
|
-
import { cx } from "@/components/utils";
|
|
8
|
+
import { cx } from "@/components/utils/cx";
|
|
9
9
|
|
|
10
10
|
interface PaymentCardItemType {
|
|
11
11
|
value: string;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import type { FC } from "react";
|
|
4
4
|
import type { RadioGroupProps } from "react-aria-components";
|
|
5
5
|
import { Label, Radio, RadioGroup, Text } from "react-aria-components";
|
|
6
|
-
import { cx } from "@/components/utils";
|
|
6
|
+
import { cx } from "@/components/utils/cx";
|
|
7
7
|
|
|
8
8
|
type RadioGroupItemType = {
|
|
9
9
|
value: string;
|
|
@@ -13,23 +13,23 @@ import {
|
|
|
13
13
|
ComboBoxStateContext,
|
|
14
14
|
} from "react-aria-components";
|
|
15
15
|
import { useHotkeys } from "react-hotkeys-hook";
|
|
16
|
-
import { cx } from "@/components/utils";
|
|
16
|
+
import { cx } from "@/components/utils/cx";
|
|
17
17
|
import { useResizeObserver } from "@/hooks/use-resize-observer";
|
|
18
|
-
import HintText from "../
|
|
19
|
-
import Label from "../
|
|
20
|
-
import { type CommonProps, SelectContext, type SelectValueType, sizes } from "./input-dropdown";
|
|
18
|
+
import HintText from "../input/hint-text";
|
|
19
|
+
import Label from "../input/label";
|
|
21
20
|
import { ComboBoxTagsValue } from "./multi-select";
|
|
22
21
|
import { Popover } from "./popover";
|
|
22
|
+
import { type CommonProps, SelectContext, type SelectItemType, sizes } from "./select";
|
|
23
23
|
|
|
24
24
|
type ComboBoxTypes = "search" | "tags";
|
|
25
25
|
|
|
26
|
-
interface ComboBoxProps extends Omit<AriaComboBoxProps<
|
|
26
|
+
interface ComboBoxProps extends Omit<AriaComboBoxProps<SelectItemType>, "children" | "items">, RefAttributes<HTMLDivElement>, CommonProps {
|
|
27
27
|
shortcut?: boolean;
|
|
28
28
|
type?: ComboBoxTypes;
|
|
29
|
-
items?:
|
|
29
|
+
items?: SelectItemType[];
|
|
30
30
|
popoverClassName?: string;
|
|
31
31
|
shortcutClassName?: string;
|
|
32
|
-
children: AriaListBoxProps<
|
|
32
|
+
children: AriaListBoxProps<SelectItemType>["children"];
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
interface ComboBoxValueProps extends RefAttributes<HTMLDivElement> {
|
|
@@ -109,8 +109,6 @@ export const ComboBox = ({ type = "search", placeholder = "Select", shortcut = t
|
|
|
109
109
|
const placeholderRef = useRef<HTMLDivElement>(null);
|
|
110
110
|
const [popoverWidth, setPopoverWidth] = useState("");
|
|
111
111
|
|
|
112
|
-
const itemsWithId = items?.map((item) => ({ ...item, id: item.value }));
|
|
113
|
-
|
|
114
112
|
// Resize observer for popover width
|
|
115
113
|
const onResize = useCallback(() => {
|
|
116
114
|
if (!placeholderRef.current) return;
|
|
@@ -149,7 +147,9 @@ export const ComboBox = ({ type = "search", placeholder = "Select", shortcut = t
|
|
|
149
147
|
/>
|
|
150
148
|
|
|
151
149
|
<Popover size={size} triggerRef={placeholderRef} style={{ width: popoverWidth }} className={rest.popoverClassName}>
|
|
152
|
-
<AriaListBox {
|
|
150
|
+
<AriaListBox items={items} className="size-full outline-hidden">
|
|
151
|
+
{children}
|
|
152
|
+
</AriaListBox>
|
|
153
153
|
</Popover>
|
|
154
154
|
|
|
155
155
|
{rest.hint && <HintText isInvalid={state.isInvalid}>{rest.hint}</HintText>}
|