@delightui/components 0.1.104 → 0.1.105
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/components/molecules/Popover/Popover.presenter.d.ts +26 -0
- package/dist/cjs/components/molecules/Select/Option/Option.types.d.ts +6 -0
- package/dist/cjs/components/molecules/Select/Select.Context.d.ts +1 -1
- package/dist/cjs/components/molecules/Select/Select.d.ts +5 -5
- package/dist/cjs/components/molecules/Select/Select.presenter.d.ts +1 -0
- package/dist/cjs/components/molecules/Select/Select.types.d.ts +5 -0
- package/dist/cjs/components/molecules/Select/index.d.ts +2 -9
- package/dist/cjs/components/utils/accessibilityUtils.d.ts +41 -0
- package/dist/cjs/components/utils/index.d.ts +2 -0
- package/dist/cjs/library.js +3 -3
- package/dist/cjs/library.js.map +1 -1
- package/dist/esm/components/molecules/Popover/Popover.presenter.d.ts +26 -0
- package/dist/esm/components/molecules/Select/Option/Option.types.d.ts +6 -0
- package/dist/esm/components/molecules/Select/Select.Context.d.ts +1 -1
- package/dist/esm/components/molecules/Select/Select.d.ts +5 -5
- package/dist/esm/components/molecules/Select/Select.presenter.d.ts +1 -0
- package/dist/esm/components/molecules/Select/Select.types.d.ts +5 -0
- package/dist/esm/components/molecules/Select/index.d.ts +2 -9
- package/dist/esm/components/utils/accessibilityUtils.d.ts +41 -0
- package/dist/esm/components/utils/index.d.ts +2 -0
- package/dist/esm/library.js +3 -3
- package/dist/esm/library.js.map +1 -1
- package/dist/index.d.ts +50 -12
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as React$1 from 'react';
|
|
3
|
-
import React__default, { ImgHTMLAttributes, SyntheticEvent, HTMLAttributes, ReactNode, MouseEvent, FormHTMLAttributes, Ref, InputHTMLAttributes, TextareaHTMLAttributes, LiHTMLAttributes, CSSProperties, RefObject, TableHTMLAttributes, TdHTMLAttributes } from 'react';
|
|
3
|
+
import React__default, { ImgHTMLAttributes, SyntheticEvent, HTMLAttributes, ReactNode, MouseEvent, FormHTMLAttributes, Ref, InputHTMLAttributes, TextareaHTMLAttributes, LiHTMLAttributes, CSSProperties, RefObject, TableHTMLAttributes, TdHTMLAttributes, AriaRole, KeyboardEventHandler } from 'react';
|
|
4
4
|
import { LinkProps } from 'react-router-dom';
|
|
5
5
|
import { Plugin } from 'flatpickr/dist/types/options';
|
|
6
6
|
import FlatPickr from 'react-flatpickr';
|
|
@@ -1741,6 +1741,12 @@ type OptionProps = LiHTMLAttributes<HTMLLIElement> & {
|
|
|
1741
1741
|
* Children elements or text content of the option.
|
|
1742
1742
|
*/
|
|
1743
1743
|
children?: ReactNode;
|
|
1744
|
+
/**
|
|
1745
|
+
* Indicates if the option is selected.
|
|
1746
|
+
* For internal use, not to be set by the user.
|
|
1747
|
+
* @default false
|
|
1748
|
+
*/
|
|
1749
|
+
closeSelectOptions?: () => void;
|
|
1744
1750
|
};
|
|
1745
1751
|
|
|
1746
1752
|
/**
|
|
@@ -1795,6 +1801,11 @@ type SelectProviderProps = ControlledFormComponentProps<FieldValue> & {
|
|
|
1795
1801
|
* @default false
|
|
1796
1802
|
*/
|
|
1797
1803
|
hasDefaultOption?: boolean;
|
|
1804
|
+
/**
|
|
1805
|
+
* Function to close the select options menu.
|
|
1806
|
+
* @param value - The new selected value.
|
|
1807
|
+
*/
|
|
1808
|
+
closeSelectOptions?: () => void;
|
|
1798
1809
|
};
|
|
1799
1810
|
/**
|
|
1800
1811
|
* Enum representing different states of the Select component.
|
|
@@ -1867,6 +1878,15 @@ type SelectViewProps = Omit<HTMLAttributes<HTMLElement>, 'style' | 'children' |
|
|
|
1867
1878
|
*/
|
|
1868
1879
|
type SelectProps = Omit<SelectProviderProps, 'children'> & SelectViewProps;
|
|
1869
1880
|
|
|
1881
|
+
/**
|
|
1882
|
+
* Select component that wraps SelectComponent with SelectProvider.
|
|
1883
|
+
* Provides state management and context to SelectComponent.
|
|
1884
|
+
*
|
|
1885
|
+
* @param props - Props for configuring the Select component.
|
|
1886
|
+
* @returns JSX element that renders the SelectComponent wrapped with SelectProvider.
|
|
1887
|
+
*/
|
|
1888
|
+
declare const Select: (props: SelectProps) => JSX.Element;
|
|
1889
|
+
|
|
1870
1890
|
/**
|
|
1871
1891
|
* Custom hook to use the SelectContext values.
|
|
1872
1892
|
* Throws an error if used outside of a SelectProvider.
|
|
@@ -1882,16 +1902,7 @@ declare const useSelectContext: () => SelectContextType;
|
|
|
1882
1902
|
* @param props - Props for configuring the SelectProvider.
|
|
1883
1903
|
* @returns JSX element that provides context to its children.
|
|
1884
1904
|
*/
|
|
1885
|
-
declare const SelectProvider: ({ children, value, multiple, disabled, invalid, onValueChange, }: SelectProviderProps) => react_jsx_runtime.JSX.Element;
|
|
1886
|
-
|
|
1887
|
-
/**
|
|
1888
|
-
* Select component that wraps SelectComponent with SelectProvider.
|
|
1889
|
-
* Provides state management and context to SelectComponent.
|
|
1890
|
-
*
|
|
1891
|
-
* @param props - Props for configuring the Select component.
|
|
1892
|
-
* @returns JSX element that renders the SelectComponent wrapped with SelectProvider.
|
|
1893
|
-
*/
|
|
1894
|
-
declare const Select: (props: SelectProps) => JSX.Element;
|
|
1905
|
+
declare const SelectProvider: ({ children, value, multiple, disabled, invalid, onValueChange, closeSelectOptions, }: SelectProviderProps) => react_jsx_runtime.JSX.Element;
|
|
1895
1906
|
|
|
1896
1907
|
type ChipListItemTypeEnum = 'chip' | 'input';
|
|
1897
1908
|
type ChipListItemProps = {
|
|
@@ -2211,6 +2222,33 @@ type RenderStateViewProps<T = unknown, P = any> = {
|
|
|
2211
2222
|
|
|
2212
2223
|
declare const RenderStateView: <T = unknown, P = any>(props: RenderStateViewProps<T, P>) => react_jsx_runtime.JSX.Element;
|
|
2213
2224
|
|
|
2225
|
+
type ArrowDirectionEnum = 'ArrowUp' | 'ArrowDown' | 'ArrowLeft' | 'ArrowRight';
|
|
2226
|
+
type AccessibilityActions = {
|
|
2227
|
+
onClick?: (event?: SyntheticEvent) => void;
|
|
2228
|
+
onTab?: (forward: boolean) => void;
|
|
2229
|
+
onEsc?: () => void;
|
|
2230
|
+
onArrowNavigation?: (direction: ArrowDirectionEnum) => void;
|
|
2231
|
+
};
|
|
2232
|
+
type AccessibilityProps = {
|
|
2233
|
+
tabIndex?: number;
|
|
2234
|
+
role?: AriaRole;
|
|
2235
|
+
onKeyDown?: KeyboardEventHandler<unknown>;
|
|
2236
|
+
};
|
|
2237
|
+
/**
|
|
2238
|
+
* Generates accessibility properties for clickable elements.
|
|
2239
|
+
* @param {boolean} [addIndex] -
|
|
2240
|
+
* @param {AriaRole} [role='button'] - ARIA role attribute to be assigned to the element.
|
|
2241
|
+
* @returns {AccessibilityProps}
|
|
2242
|
+
*/
|
|
2243
|
+
declare const getClickAccessibilityProps: (params: {
|
|
2244
|
+
/** Object containing action handlers for various key events. */
|
|
2245
|
+
actions: AccessibilityActions;
|
|
2246
|
+
/** If true, sets the tabIndex to 0 to make the element focusable. */
|
|
2247
|
+
addIndex?: boolean;
|
|
2248
|
+
/** Accessibility properties including ARIA role and key event handlers. */
|
|
2249
|
+
role?: AriaRole;
|
|
2250
|
+
}) => AccessibilityProps;
|
|
2251
|
+
|
|
2214
2252
|
/**
|
|
2215
2253
|
* Clones valid React elements and applies additional props to them.
|
|
2216
2254
|
*
|
|
@@ -2281,4 +2319,4 @@ declare const NotificationContext: React__default.Context<NotificationContextVal
|
|
|
2281
2319
|
declare const NotificationProvider: React__default.FC<NotificationProviderProps>;
|
|
2282
2320
|
declare const useNotification: () => NotificationContextValue;
|
|
2283
2321
|
|
|
2284
|
-
export { Accordion, AccordionDetails, AccordionGroup, AccordionSummary, ActionCard, type ActionCardProps, ActionImage, type ActionImageProps, Breadcrumb, type BreadcrumbProps, Breadcrumbs, type BreadcrumbsProps, Breakpoint, type BreakpointProps, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, Card, type CardProps, Checkbox, CheckboxItem, type CheckboxItemProps, type CheckboxLabelAlignmentEnum, type CheckboxProps, type CheckboxSizeEnum, type CheckboxTypeEnum, Chip, _default as ChipInput, type ChipInputProps, type ChipListItemProps, type ChipListItemTypeEnum, type ChipProps, ConditionalView, type ConditionalViewProps, ContextMenu, type ContextMenuProps, type CustomTimePickerConfig, CustomToggle, type CustomToggleProps, DatePicker, type DatePickerProps, SortableItem as DraggableItem, SortableTrigger as DraggableItemTrigger, Dropzone, DropzoneClear, DropzoneContent, type DropzoneContentProps, type DropzoneContentTypeEnum, DropzoneFilename, DropzoneFilename as DropzonePreview, type DropzoneProps, DropzoneSupportedFormats as DropzoneReject, DropzoneTrigger as DropzoneRoot, DropzoneSupportedFormats, DropzoneTrigger, type FieldValidationFunction, type FieldValidators, type FieldValue, Form, type FormContextValues, type FormErrors, FormField, type FormFieldProps, type FormProps, type FormProviderProps, type FormState, type FormStateChangeHandler, type FormSubmitHandler, type FormValidator, Grid, GridItem, type GridItemProps, GridList, type GridListProps, type GridProps, Icon, IconButton, type IconButtonProps, type IconButtonStyleEnum, type IconProps, type IconSizeEnum, type IconStyleEnum, Image, type ImageFitEnum, type ImageProps, Input, type InputProps, type InputTypeEnum, List, ListItem, type ListItemProps$1 as ListItemProps, type ListProps, Modal, ModalFooter, type ModalFooterProps, ModalHeader, type ModalHeaderProps, type ModalProps, Nav, NavItem, type NavItemProps, NavLink, type NavLinkProps, type NavProps, type NotificationContainerProps, NotificationContext, NotificationProvider, Option, type OptionProps, type OverlayDirectionEnum, Pagination, PaginationNumberField, type PaginationNumberFieldProps, type PaginationProps, Password, Popover, type PopoverHandle, type PopoverProps, ProgressBar, type ProgressBarProps, RadioButton, RadioButtonItem, type RadioButtonItemProps, type RadioButtonLabelAlignmentEnum, type RadioButtonProps, type RadioButtonSizeEnum, RenderStateView, type RenderStateViewProps, RepeaterList, type RepeaterListProps, type RequiredFields, ResponsiveComponent, type ResponsiveComponentProps, Select, SelectListItem, type SelectListItemProps, type SelectProps, SelectProvider, SlideOutPanel, type SlideOutPanelDirectionEnum, type SlideOutPanelProps, type SlideOutPanelSizeEnum, Slider, type SliderProps, Spinner, type SpinnerProps, TabContent, type TabContentProps, TabItem, type TabItemProps, Table, TableBody, type TableBodyProps, TableCell, type TableCellProps, TableHeader, TableHeaderCell, type TableHeaderCellProps, type TableHeaderProps, type TableProps, TableRow, type TableRowProps, Tabs, type TabsProps, Text, TextArea, type TextAreaProps, type TextDecorationEnum, type TextProps, type TextTypeEnum, type TextWeightEnum, ThemeContext, type ThemeContextType, ThemeProvider, type ThemeProviderProps, Toggle, ToggleButton, type ToggleButtonProps, type ToggleLabelAlignmentEnum, type ToggleProps, Tooltip, type TooltipProps, WrapTextNodes, type WrapTextNodesProps, applyPropsToChildren, mergeRefs, useDropzoneContext, useNotification, useSelectContext, useTab };
|
|
2322
|
+
export { type AccessibilityActions, type AccessibilityProps, Accordion, AccordionDetails, AccordionGroup, AccordionSummary, ActionCard, type ActionCardProps, ActionImage, type ActionImageProps, Breadcrumb, type BreadcrumbProps, Breadcrumbs, type BreadcrumbsProps, Breakpoint, type BreakpointProps, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, Card, type CardProps, Checkbox, CheckboxItem, type CheckboxItemProps, type CheckboxLabelAlignmentEnum, type CheckboxProps, type CheckboxSizeEnum, type CheckboxTypeEnum, Chip, _default as ChipInput, type ChipInputProps, type ChipListItemProps, type ChipListItemTypeEnum, type ChipProps, ConditionalView, type ConditionalViewProps, ContextMenu, type ContextMenuProps, type CustomTimePickerConfig, CustomToggle, type CustomToggleProps, DatePicker, type DatePickerProps, SortableItem as DraggableItem, SortableTrigger as DraggableItemTrigger, Dropzone, DropzoneClear, DropzoneContent, type DropzoneContentProps, type DropzoneContentTypeEnum, DropzoneFilename, DropzoneFilename as DropzonePreview, type DropzoneProps, DropzoneSupportedFormats as DropzoneReject, DropzoneTrigger as DropzoneRoot, DropzoneSupportedFormats, DropzoneTrigger, type FieldValidationFunction, type FieldValidators, type FieldValue, Form, type FormContextValues, type FormErrors, FormField, type FormFieldProps, type FormProps, type FormProviderProps, type FormState, type FormStateChangeHandler, type FormSubmitHandler, type FormValidator, Grid, GridItem, type GridItemProps, GridList, type GridListProps, type GridProps, Icon, IconButton, type IconButtonProps, type IconButtonStyleEnum, type IconProps, type IconSizeEnum, type IconStyleEnum, Image, type ImageFitEnum, type ImageProps, Input, type InputProps, type InputTypeEnum, List, ListItem, type ListItemProps$1 as ListItemProps, type ListProps, Modal, ModalFooter, type ModalFooterProps, ModalHeader, type ModalHeaderProps, type ModalProps, Nav, NavItem, type NavItemProps, NavLink, type NavLinkProps, type NavProps, type NotificationContainerProps, NotificationContext, NotificationProvider, Option, type OptionProps, type OverlayDirectionEnum, Pagination, PaginationNumberField, type PaginationNumberFieldProps, type PaginationProps, Password, Popover, type PopoverHandle, type PopoverProps, ProgressBar, type ProgressBarProps, RadioButton, RadioButtonItem, type RadioButtonItemProps, type RadioButtonLabelAlignmentEnum, type RadioButtonProps, type RadioButtonSizeEnum, RenderStateView, type RenderStateViewProps, RepeaterList, type RepeaterListProps, type RequiredFields, ResponsiveComponent, type ResponsiveComponentProps, Select, SelectListItem, type SelectListItemProps, type SelectProps, SelectProvider, SlideOutPanel, type SlideOutPanelDirectionEnum, type SlideOutPanelProps, type SlideOutPanelSizeEnum, Slider, type SliderProps, Spinner, type SpinnerProps, TabContent, type TabContentProps, TabItem, type TabItemProps, Table, TableBody, type TableBodyProps, TableCell, type TableCellProps, TableHeader, TableHeaderCell, type TableHeaderCellProps, type TableHeaderProps, type TableProps, TableRow, type TableRowProps, Tabs, type TabsProps, Text, TextArea, type TextAreaProps, type TextDecorationEnum, type TextProps, type TextTypeEnum, type TextWeightEnum, ThemeContext, type ThemeContextType, ThemeProvider, type ThemeProviderProps, Toggle, ToggleButton, type ToggleButtonProps, type ToggleLabelAlignmentEnum, type ToggleProps, Tooltip, type TooltipProps, WrapTextNodes, type WrapTextNodesProps, applyPropsToChildren, getClickAccessibilityProps, mergeRefs, useDropzoneContext, useNotification, useSelectContext, useTab };
|