/* * Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved. * This file is licensed to you under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. You may obtain a copy * of the License at https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS * OF ANY KIND, either express or implied. See the License for the specific language * governing permissions and limitations under the License. */ import { ButtonProps } from "../button/types.js"; import { ComponentPropsWithRef, RefAttributes } from "react"; import { TagGroupProps, TagListProps, TagProps } from "react-aria-components/TagGroup"; //#region src/components/chip/types.d.ts type BaseChipProps = { color?: 'info' | 'advisory' | 'normal' | 'serious' | 'critical'; size?: 'medium' | 'small'; }; /** * Props for the ChipList component. * * Extends React Aria TagGroup with chip styling and list rendering options. */ type ChipListProps = Omit & Pick, 'dependencies' | 'items' | 'children' | 'renderEmptyState'> & RefAttributes & BaseChipProps; /** * Props for the Chip component. * * Basic chip with color and size variants, can be used standalone or in a ChipList. */ type ChipProps = Omit, 'size' | 'onClick' | 'onFocus' | 'onBlur'> & BaseChipProps & { /** Additional CSS class name for styling. */ className?: string; }; /** * Props for the SelectableChip component. * * Extends Tag props for use in single or multiple selection chip lists. */ type SelectableChipProps = TagProps & RefAttributes & BaseChipProps; /** * Props for the DeletableChip component. * * Extends Tag props with remove button styling options. */ type DeletableChipProps = Omit & RefAttributes & BaseChipProps & { /** Custom class names for chip sub-elements. */ classNames?: { /** Class name for the chip wrapper. */ chip?: TagProps['className']; /** Class name for the remove button. */ remove?: ButtonProps['className']; }; }; /** * Combined context value type for all chip variants. */ type ChipContextValue = ChipProps & SelectableChipProps & DeletableChipProps; //#endregion export { ChipContextValue, ChipListProps, ChipProps, DeletableChipProps, SelectableChipProps }; //# sourceMappingURL=types.d.ts.map