@redis-ui/components 49.0.2 → 49.1.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 (86) hide show
  1. package/README.md +5 -5
  2. package/dist/AppSelectionMenu/components/Item/Item.style.d.ts +2 -2
  3. package/dist/AutoCompleteSelect/AutoCompleteSelect.style.d.ts +2 -2
  4. package/dist/Banner/components/BannerSemanticComponents/SemanticButton/SemanticButton.style.d.ts +1 -1
  5. package/dist/Banner/components/BannerSemanticComponents/SemanticCloseButton/SemanticCloseButton.style.d.ts +1 -1
  6. package/dist/Banner/components/Message/Message.style.d.ts +1 -1
  7. package/dist/Button/CopyToClipboardButton/CopyToClipboardButton.style.d.ts +1 -1
  8. package/dist/Checkbox/components/Label/Label.style.d.ts +1 -1
  9. package/dist/ChipList/ChipList.style.d.ts +1 -1
  10. package/dist/ChipList/Components/ExtraItem.style.d.ts +1 -1
  11. package/dist/Drawer/components/Content/Content.cjs +1 -1
  12. package/dist/Drawer/components/Content/Content.js +1 -1
  13. package/dist/Drawer/components/Header/components/Compose/Compose.style.d.ts +1 -1
  14. package/dist/Filters/components/MultiSelectFilter/MultiSelectFilter.style.d.ts +5 -5
  15. package/dist/FormField/FormField.d.ts +1 -1
  16. package/dist/FormField/components/AdditionalText/AdditionalText.style.d.ts +1 -1
  17. package/dist/Inputs/Input/Input.d.ts +1 -1
  18. package/dist/Inputs/NumericInput/NumericInput.d.ts +1 -1
  19. package/dist/Inputs/PasswordInput/PasswordInput.d.ts +1 -1
  20. package/dist/Inputs/QuantityCounter/components/InputGroup/components/ValueLabel/ValueLabel.style.d.ts +1 -1
  21. package/dist/Inputs/SearchInput/SearchInput.d.ts +1 -1
  22. package/dist/Inputs/TextArea/TextArea.d.ts +1 -1
  23. package/dist/Inputs/TextArea/components/Compose/Compose.style.d.ts +1 -1
  24. package/dist/Inputs/TextArea/components/StatusIndicator/StatusIndicator.style.d.ts +1 -1
  25. package/dist/Inputs/components/Compose/Compose.style.d.ts +2 -2
  26. package/dist/Inputs/components/Context/InputValue.context.cjs +1 -1
  27. package/dist/Inputs/components/Context/InputValue.context.js +1 -1
  28. package/dist/Inputs/components/ResetButton/ResetButton.style.d.ts +1 -1
  29. package/dist/Label/components/InfoIcon/InfoIcon.style.d.ts +1 -1
  30. package/dist/Label/components/Optional/Optional.style.d.ts +1 -1
  31. package/dist/Label/components/Required/Required.style.d.ts +1 -1
  32. package/dist/Label/components/Text/Text.style.d.ts +1 -1
  33. package/dist/Layouts/FlexGroup/FlexGroup.style.d.ts +1 -1
  34. package/dist/Link/Link.style.d.ts +1 -1
  35. package/dist/Menu/components/Content/components/Item/Components/SubHead/SubHead.style.d.ts +1 -1
  36. package/dist/Menu/components/Content/components/Label/components/Text/Text.style.d.ts +1 -1
  37. package/dist/Modal/components/Content/components/Body/components/Text/Text.style.d.ts +1 -1
  38. package/dist/Modal/components/Content/components/Compose/Compose.cjs +1 -1
  39. package/dist/Modal/components/Content/components/Compose/Compose.js +1 -1
  40. package/dist/Modal/components/Content/components/Header/components/Title/Title.style.d.ts +1 -1
  41. package/dist/MultiSelect/MultiSelect.d.ts +3 -3
  42. package/dist/MultiSelect/components/Trigger/Trigger.d.ts +2 -2
  43. package/dist/Pagination/Pagination.d.ts +4 -4
  44. package/dist/Pagination/Pagination.style.d.ts +9 -9
  45. package/dist/Popover/components/Content/components/Body/components/BodyText/BodyText.style.d.ts +1 -1
  46. package/dist/Popover/components/Content/components/Header/components/HeaderTitle/HeaderTitle.style.d.ts +1 -1
  47. package/dist/Popover/components/Content/components/Text/Text.style.d.ts +1 -1
  48. package/dist/Popover/components/Content/components/WindowBar/WindowBar.style.d.ts +1 -1
  49. package/dist/ProgressBar/ProgressBar.style.d.ts +1 -1
  50. package/dist/Section/components/Header/Header.d.ts +1 -1
  51. package/dist/Section/components/Header/components/CategoryValueList/CategoryValueList.style.d.ts +2 -2
  52. package/dist/Section/components/Header/components/CategoryValueList/components/CategoryValueChip/CategoryValueChip.style.d.ts +2 -2
  53. package/dist/Section/components/Header/components/CollapseButton/CollapseButton.style.d.ts +1 -1
  54. package/dist/Section/components/Header/components/Label/Label.style.d.ts +1 -1
  55. package/dist/Select/Select.d.ts +2 -2
  56. package/dist/Select/components/Content/components/Compose/Compose.types.d.ts +1 -1
  57. package/dist/Select/components/Content/components/Search/SelectSearchInput.style.d.ts +2 -2
  58. package/dist/Select/components/Trigger/Trigger.d.ts +2 -2
  59. package/dist/Select/components/Trigger/components/Compose/Compose.types.d.ts +1 -1
  60. package/dist/SideBar/SideBar.d.ts +1 -1
  61. package/dist/SideBar/SideBar.style.d.ts +1 -1
  62. package/dist/SideBar/components/Footer/components/Text/Text.style.d.ts +1 -1
  63. package/dist/SideBar/components/Group/components/Title/Title.style.d.ts +1 -1
  64. package/dist/SideBar/components/Item/components/Text/Text.style.d.ts +1 -1
  65. package/dist/SideBar/components/ItemsContainer/ItemsContainer.style.d.ts +1 -1
  66. package/dist/SideBar/components/ScrollContainer/ScrollContainer.style.d.ts +1 -1
  67. package/dist/Stepper/components/Step/components/Label/Label.style.d.ts +1 -1
  68. package/dist/Switch/components/Title/Title.style.d.ts +1 -1
  69. package/dist/TableHeading/TableHeading.d.ts +1 -1
  70. package/dist/TableHeading/TableHeading.style.d.ts +2 -2
  71. package/dist/Toast/components/Content/components/Description/Description.style.d.ts +1 -1
  72. package/dist/Toast/components/Content/components/Message/Message.style.d.ts +1 -1
  73. package/dist/Tooltip/Tooltip.d.ts +1 -1
  74. package/dist/Tooltip/components/Content/components/Text/Text.style.d.ts +1 -1
  75. package/dist/TreeView/components/TreeItem/components/Checkbox/Checkbox.style.d.ts +1 -1
  76. package/dist/TreeView/components/TreeItem/components/ExpandButton/ExpandButton.style.d.ts +1 -1
  77. package/dist/Typography/hooks/useEllipsisTooltip.cjs +1 -1
  78. package/dist/Typography/hooks/useEllipsisTooltip.js +1 -1
  79. package/dist/packages/components/node_modules/@radix-ui/react-compose-refs/dist/index.cjs +30 -0
  80. package/dist/packages/components/node_modules/@radix-ui/react-compose-refs/dist/index.js +28 -0
  81. package/dist/packages/components/node_modules/@radix-ui/react-slot/dist/index.cjs +50 -51
  82. package/dist/packages/components/node_modules/@radix-ui/react-slot/dist/index.js +50 -51
  83. package/package.json +2 -2
  84. package/skills/redis-ui-components/SKILL.md +2 -0
  85. package/skills/redis-ui-components/references/TableHeading.md +79 -0
  86. package/skills/redis-ui-components/references/ThemeModeSwitch.md +72 -0
@@ -2,7 +2,7 @@ import { SectionHeaderProps } from './Header.types';
2
2
  export declare const Header: (({ label, actions }: SectionHeaderProps) => import("react/jsx-runtime").JSX.Element) & {
3
3
  Compose: (props: import("./components/Compose/Compose.types").SectionHeaderComposeProps) => import("react/jsx-runtime").JSX.Element;
4
4
  Label: ({ label, ...restProps }: import("./components/Label/Label.types").SectionHeaderLabelProps) => import("react/jsx-runtime").JSX.Element;
5
- ActionButton: import("react").ForwardRefExoticComponent<import("../../../Button").TextButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
5
+ ActionButton: import("react").ForwardRefExoticComponent<import("../../..").TextButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
6
6
  CollapseButton: ({ hidden, icon, ...props }: import("./components/CollapseButton/CollapseButton.types").SectionCollapseButtonProps) => import("react/jsx-runtime").JSX.Element | null;
7
7
  Group: (props: import("./components/Group/Group.types").SectionHeaderGroupProps) => import("react/jsx-runtime").JSX.Element;
8
8
  };
@@ -1,4 +1,4 @@
1
- export declare const Container: import("styled-components").StyledComponent<({ children, renderExtra, maxRows, minItems, expectedGap, estimatedItemsPerRow, ...restProps }: import("../../../../../Overflow").OverflowProps) => import("react/jsx-runtime").JSX.Element, any, {}, never>;
1
+ export declare const Container: import("styled-components").StyledComponent<({ children, renderExtra, maxRows, minItems, expectedGap, estimatedItemsPerRow, ...restProps }: import("../../../../..").OverflowProps) => import("react/jsx-runtime").JSX.Element, any, {}, never>;
2
2
  export declare const Separator: import("styled-components").StyledComponent<"div", any, {}, never>;
3
3
  export declare const CategoryValueItemContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
4
- export declare const TextWrapper: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../../../../../Typography").TypographyBodyProps & import("react").RefAttributes<HTMLElement>>, any, {}, never>;
4
+ export declare const TextWrapper: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../../../../..").TypographyBodyProps & import("react").RefAttributes<HTMLElement>>, any, {}, never>;
@@ -1,3 +1,3 @@
1
1
  export declare const Container: import("styled-components").StyledComponent<"span", any, {}, never>;
2
- export declare const Category: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../../../../../../../Typography").TypographyBodyProps & import("react").RefAttributes<HTMLElement>>, any, {}, never>;
3
- export declare const TypographyBody: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../../../../../../../Typography").TypographyBodyProps & import("react").RefAttributes<HTMLElement>>, any, {}, never>;
2
+ export declare const Category: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../../../../../../..").TypographyBodyProps & import("react").RefAttributes<HTMLElement>>, any, {}, never>;
3
+ export declare const TypographyBody: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../../../../../../..").TypographyBodyProps & import("react").RefAttributes<HTMLElement>>, any, {}, never>;
@@ -1,2 +1,2 @@
1
- export declare const SectionCollapseButton: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../../../../../Button").IconButtonProps & import("react").RefAttributes<HTMLButtonElement>>, any, {}, never>;
1
+ export declare const SectionCollapseButton: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../../../../..").IconButtonProps & import("react").RefAttributes<HTMLButtonElement>>, any, {}, never>;
2
2
  export declare const SectionCollapseIcon: import("styled-components").StyledComponent<({ size, customSize, variant, title: titleProp, ...rest }: import("@redis-ui/icons").MonochromeIconProps) => import("react/jsx-runtime").JSX.Element, any, {}, never>;
@@ -1,2 +1,2 @@
1
- export declare const SectionHeaderLabelText: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../../../../../Typography").TypographyHeadingProps & import("react").RefAttributes<HTMLElement>>, any, {}, never>;
1
+ export declare const SectionHeaderLabelText: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../../../../..").TypographyHeadingProps & import("react").RefAttributes<HTMLElement>>, any, {}, never>;
2
2
  export declare const SectionHeaderLabel: import("styled-components").StyledComponent<"label", any, {}, never>;
@@ -6,10 +6,10 @@ declare const Select: (<TValue extends string = string, TOption extends SelectOp
6
6
  Compose: ({ customContainer, id, "aria-describedby": ariaDescribedby, ...restProps }: import("./components/Trigger/components/Compose/Compose.types").SelectTriggerComposeProps & RestSelectTriggerComposeProps & import("..").ComposeChildrenProps) => import("react/jsx-runtime").JSX.Element;
7
7
  Value: <TOption extends SelectOption = SelectOption>({ placeholder, valueRender, ...restProps }: import("./components/Trigger/components/Value/Value.types").SelectTriggerValueProps<TOption> & import("./components/Trigger/components/Value/Value.types").RestSelectTriggerValueProps) => import("react/jsx-runtime").JSX.Element;
8
8
  ResetButton: ({ children, title, ...restProps }: import("react").HTMLAttributes<HTMLButtonElement>) => import("react/jsx-runtime").JSX.Element | null;
9
- StatusIndicator: ({ className, style, size, ...restProps }: import("@redis-ui/icons/monochrome").MonochromeIconProps & Pick<import("react").HTMLAttributes<unknown>, "className" | "style">) => import("react/jsx-runtime").JSX.Element | null;
9
+ StatusIndicator: ({ className, style, size, ...restProps }: import("@redis-ui/icons").MonochromeIconProps & Pick<import("react").HTMLAttributes<unknown>, "className" | "style">) => import("react/jsx-runtime").JSX.Element | null;
10
10
  LoadingIndicator: ({ loading, ...restProps }: import("../Inputs/components/LoadingIndicator/LoadingIndicator.types").LoadingIndicatorProps & import("../Inputs/components/LoadingIndicator/LoadingIndicator.types").RestLoadingIndicatorProps) => import("react/jsx-runtime").JSX.Element | null;
11
11
  Arrow: ({ icon, ...restProps }: import("./components/Trigger/components/Arrow/Arrow.types").TriggerArrowProps) => import("react/jsx-runtime").JSX.Element;
12
- ErrorIcon: ({ className, style, size, ...restProps }: import("@redis-ui/icons/monochrome").MonochromeIconProps & Pick<import("react").HTMLAttributes<unknown>, "className" | "style">) => import("react/jsx-runtime").JSX.Element | null;
12
+ ErrorIcon: ({ className, style, size, ...restProps }: import("@redis-ui/icons").MonochromeIconProps & Pick<import("react").HTMLAttributes<unknown>, "className" | "style">) => import("react/jsx-runtime").JSX.Element | null;
13
13
  };
14
14
  Content: (<TOption extends SelectOption = SelectOption>({ searchable, optionValueRender, optionComponent, maxVisibleItems, virtualized, ...restProps }: import("./components/Content/Content.types").SelectContentProps<TOption> & import("./components/Content/components/Compose/Compose.types").RestSelectContentComposeProps) => import("react/jsx-runtime").JSX.Element) & {
15
15
  Compose: ({ children, placement, contentWidth, ...restProps }: import("./components/Content/components/Compose/Compose.types").SelectContentComposeProps & import("./components/Content/components/Compose/Compose.types").RestSelectContentComposeProps & import("..").ComposeChildrenProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,4 @@
1
- import * as RadixSelect from '@radix-ui/react-select/dist';
1
+ import * as RadixSelect from '@radix-ui/react-select';
2
2
  type SelectContentPlacement = 'top' | 'bottom' | 'left' | 'right';
3
3
  export type SelectContentComposeProps = {
4
4
  placement?: SelectContentPlacement;
@@ -1,8 +1,8 @@
1
- export declare const SelectSearchInput: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<Omit<import("../../../../../Inputs/components/Compose/TextCompose.types").TextInputComposeProps, "readOnly" | "parser" | "formatter"> & import("../../../../../Inputs/components/InputTag/InputTag.types").InputTagProps & import("../../../../../Inputs/components/LoadingIndicator/LoadingIndicator.types").LoadingIndicatorProps & import("../../../../../Inputs/components/ResetButton/ResetButton.types").ResetButtonProps & import("../../../../../Inputs").RestInputProps & import("react").RefAttributes<HTMLInputElement>> & {
1
+ export declare const SelectSearchInput: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<Omit<import("../../../../../Inputs/components/Compose/TextCompose.types").TextInputComposeProps, "readOnly" | "parser" | "formatter"> & import("../../../../../Inputs/components/InputTag/InputTag.types").InputTagProps & import("../../../../../Inputs/components/LoadingIndicator/LoadingIndicator.types").LoadingIndicatorProps & import("../../../../../Inputs/components/ResetButton/ResetButton.types").ResetButtonProps & import("../../../../..").RestInputProps & import("react").RefAttributes<HTMLInputElement>> & {
2
2
  Compose: ({ value, defaultValue, onChange, parser, formatter, ...restProps }: import("../../../../../Inputs/components/Compose/TextCompose.types").TextInputComposeProps & import("../../../../../Inputs/components/Compose/TextCompose.types").RestTextInputComposeProps) => import("react/jsx-runtime").JSX.Element;
3
3
  ResetButton: ({ size, icon, allowReset, onClick, onMouseDown, ...restProps }: import("../../../../../Inputs/components/ResetButton/ResetButton.types").RestResetButtonProps & import("../../../../../Inputs/components/ResetButton/ResetButton.types").ResetButtonProps) => import("react/jsx-runtime").JSX.Element | null;
4
4
  Tag: import("react").ForwardRefExoticComponent<import("../../../../../Inputs/components/InputTag/InputTag.types").InputTagProps & import("../../../../../Inputs/components/InputTag/InputTag.types").RestInputTagProps & import("react").RefAttributes<HTMLInputElement>>;
5
- StatusIndicator: ({ className, style, size, ...restProps }: import("@redis-ui/icons/monochrome").MonochromeIconProps & Pick<import("react").HTMLAttributes<unknown>, "className" | "style">) => import("react/jsx-runtime").JSX.Element | null;
5
+ StatusIndicator: ({ className, style, size, ...restProps }: import("@redis-ui/icons").MonochromeIconProps & Pick<import("react").HTMLAttributes<unknown>, "className" | "style">) => import("react/jsx-runtime").JSX.Element | null;
6
6
  LoadingIndicator: ({ loading, ...restProps }: import("../../../../../Inputs/components/LoadingIndicator/LoadingIndicator.types").LoadingIndicatorProps & import("../../../../../Inputs/components/LoadingIndicator/LoadingIndicator.types").RestLoadingIndicatorProps) => import("react/jsx-runtime").JSX.Element | null;
7
7
  SearchIcon: () => import("react/jsx-runtime").JSX.Element;
8
8
  }, any, {}, never>;
@@ -5,12 +5,12 @@ declare const Trigger: (<TOption extends SelectOption = SelectOption>({ placehol
5
5
  Compose: ({ customContainer, id, "aria-describedby": ariaDescribedby, ...restProps }: import("./components/Compose/Compose.types").SelectTriggerComposeProps & RestSelectTriggerComposeProps & import("../../..").ComposeChildrenProps) => import("react/jsx-runtime").JSX.Element;
6
6
  Value: <TOption extends SelectOption = SelectOption>({ placeholder, valueRender, ...restProps }: import("./components/Value/Value.types").SelectTriggerValueProps<TOption> & import("./components/Value/Value.types").RestSelectTriggerValueProps) => import("react/jsx-runtime").JSX.Element;
7
7
  ResetButton: ({ children, title, ...restProps }: import("react").HTMLAttributes<HTMLButtonElement>) => import("react/jsx-runtime").JSX.Element | null;
8
- StatusIndicator: ({ className, style, size, ...restProps }: import("@redis-ui/icons/monochrome").MonochromeIconProps & Pick<import("react").HTMLAttributes<unknown>, "className" | "style">) => import("react/jsx-runtime").JSX.Element | null;
8
+ StatusIndicator: ({ className, style, size, ...restProps }: import("@redis-ui/icons").MonochromeIconProps & Pick<import("react").HTMLAttributes<unknown>, "className" | "style">) => import("react/jsx-runtime").JSX.Element | null;
9
9
  LoadingIndicator: ({ loading, ...restProps }: import("../../../Inputs/components/LoadingIndicator/LoadingIndicator.types").LoadingIndicatorProps & import("../../../Inputs/components/LoadingIndicator/LoadingIndicator.types").RestLoadingIndicatorProps) => import("react/jsx-runtime").JSX.Element | null;
10
10
  Arrow: ({ icon, ...restProps }: import("./components/Arrow/Arrow.types").TriggerArrowProps) => import("react/jsx-runtime").JSX.Element;
11
11
  /**
12
12
  * @deprecated use StatusIndicator instead
13
13
  */
14
- ErrorIcon: ({ className, style, size, ...restProps }: import("@redis-ui/icons/monochrome").MonochromeIconProps & Pick<import("react").HTMLAttributes<unknown>, "className" | "style">) => import("react/jsx-runtime").JSX.Element | null;
14
+ ErrorIcon: ({ className, style, size, ...restProps }: import("@redis-ui/icons").MonochromeIconProps & Pick<import("react").HTMLAttributes<unknown>, "className" | "style">) => import("react/jsx-runtime").JSX.Element | null;
15
15
  };
16
16
  export default Trigger;
@@ -1,4 +1,4 @@
1
- import { SelectTriggerProps } from '@radix-ui/react-select/dist';
1
+ import { SelectTriggerProps } from '@radix-ui/react-select';
2
2
  export type SelectTriggerComposeProps = {
3
3
  id?: string;
4
4
  customContainer?: boolean;
@@ -3,7 +3,7 @@ declare const SideBar: (({ isExpanded, expandedWidth, ...rest }: SideBarProps) =
3
3
  SideBarLogo: ({ logoIcon: LogoIcon, ...restProps }: import("./components/SideBarLogo/SideBarLogo.types").SideBarLogoProps) => import("react/jsx-runtime").JSX.Element;
4
4
  ItemsContainer: (props: import("./components/ItemsContainer/ItemsContainer.types").SideBarItemsContainerProps) => import("react/jsx-runtime").JSX.Element;
5
5
  ScrollContainer: (props: import("./components/ScrollContainer/ScrollContainer.types").SideBarScrollContainerProps) => import("react/jsx-runtime").JSX.Element;
6
- Split: ({ extraMinSpace }: import("../Layouts").FlexSplitProps) => import("react/jsx-runtime").JSX.Element;
6
+ Split: ({ extraMinSpace }: import("..").FlexSplitProps) => import("react/jsx-runtime").JSX.Element;
7
7
  Divider: (props: import("./components/Divider/Divider.types").DividerProps) => import("react/jsx-runtime").JSX.Element;
8
8
  Item: (({ tooltipProps, isActive, onKeyDown, ...restProps }: import("./components/Item/Item.types").SideBarItemProps) => import("react/jsx-runtime").JSX.Element) & {
9
9
  Icon: ({ icon: ItemIcon, ...restProps }: import("./components/Item/components/Icon/Icon.types").SideBarItemIconProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,3 +1,3 @@
1
- export declare const SideBarContainer: import("styled-components").StyledComponent<({ gap, direction, align, justify, wrap, ...restProps }: import("../Layouts").FlexGroupProps) => import("react/jsx-runtime").JSX.Element, any, {
1
+ export declare const SideBarContainer: import("styled-components").StyledComponent<({ gap, direction, align, justify, wrap, ...restProps }: import("..").FlexGroupProps) => import("react/jsx-runtime").JSX.Element, any, {
2
2
  $expandedWidth?: string;
3
3
  }, never>;
@@ -1 +1 @@
1
- export declare const SmallFooterText: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../../../../../Typography").TypographyBodyProps & import("react").RefAttributes<HTMLElement>>, any, {}, never>;
1
+ export declare const SmallFooterText: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../../../../..").TypographyBodyProps & import("react").RefAttributes<HTMLElement>>, any, {}, never>;
@@ -1,5 +1,5 @@
1
1
  export declare const Container: import("styled-components").StyledComponent<"div", any, {}, never>;
2
- export declare const Label: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../../../../../Typography").TypographyBodyProps & import("react").RefAttributes<HTMLElement>>, any, {
2
+ export declare const Label: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../../../../..").TypographyBodyProps & import("react").RefAttributes<HTMLElement>>, any, {
3
3
  $isExpanded: boolean;
4
4
  $transitionEnd: boolean;
5
5
  }, never>;
@@ -1,4 +1,4 @@
1
- export declare const SideBarItemText: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../../../../../Typography").TypographyBodyProps & import("react").RefAttributes<HTMLElement>>, any, {
1
+ export declare const SideBarItemText: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../../../../..").TypographyBodyProps & import("react").RefAttributes<HTMLElement>>, any, {
2
2
  $isExpanded: boolean;
3
3
  $transitionEnd: boolean;
4
4
  }, never>;
@@ -1 +1 @@
1
- export declare const SideBarItemsContainer: import("styled-components").StyledComponent<({ gap, direction, align, justify, wrap, ...restProps }: import("../../../Layouts").FlexGroupProps) => import("react/jsx-runtime").JSX.Element, any, {}, never>;
1
+ export declare const SideBarItemsContainer: import("styled-components").StyledComponent<({ gap, direction, align, justify, wrap, ...restProps }: import("../../..").FlexGroupProps) => import("react/jsx-runtime").JSX.Element, any, {}, never>;
@@ -1 +1 @@
1
- export declare const ScrollContainer: import("styled-components").StyledComponent<({ gap, direction, align, justify, wrap, ...restProps }: import("../../../Layouts").FlexGroupProps) => import("react/jsx-runtime").JSX.Element, any, {}, never>;
1
+ export declare const ScrollContainer: import("styled-components").StyledComponent<({ gap, direction, align, justify, wrap, ...restProps }: import("../../..").FlexGroupProps) => import("react/jsx-runtime").JSX.Element, any, {}, never>;
@@ -1 +1 @@
1
- export declare const StepLabel: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../../../../../Typography").TypographyBodyProps & import("react").RefAttributes<HTMLElement>>, any, {}, never>;
1
+ export declare const StepLabel: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../../../../..").TypographyBodyProps & import("react").RefAttributes<HTMLElement>>, any, {}, never>;
@@ -1 +1 @@
1
- export declare const Title: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../../../Typography").TypographyBodyProps & import("react").RefAttributes<HTMLElement>>, any, import("styled-components").ThemeProps<import("@redis-ui/styles").Theme>, never>;
1
+ export declare const Title: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../../..").TypographyBodyProps & import("react").RefAttributes<HTMLElement>>, any, import("styled-components").ThemeProps<import("@redis-ui/styles").Theme>, never>;
@@ -5,7 +5,7 @@ declare const TableHeading: ((props: TableHeadingProps) => import("react/jsx-run
5
5
  Compose: ({ value, defaultValue, onChange, parser, formatter, ...restProps }: import("../Inputs/components/Compose/TextCompose.types").TextInputComposeProps & import("../Inputs/components/Compose/TextCompose.types").RestTextInputComposeProps) => import("react/jsx-runtime").JSX.Element;
6
6
  ResetButton: ({ size, icon, allowReset, onClick, onMouseDown, ...restProps }: import("../Inputs/components/ResetButton/ResetButton.types").RestResetButtonProps & import("../Inputs/components/ResetButton/ResetButton.types").ResetButtonProps) => import("react/jsx-runtime").JSX.Element | null;
7
7
  Tag: import("react").ForwardRefExoticComponent<import("../Inputs/components/InputTag/InputTag.types").InputTagProps & import("../Inputs/components/InputTag/InputTag.types").RestInputTagProps & import("react").RefAttributes<HTMLInputElement>>;
8
- StatusIndicator: ({ className, style, size, ...restProps }: import("@redis-ui/icons/monochrome").MonochromeIconProps & Pick<import("react").HTMLAttributes<unknown>, "className" | "style">) => import("react/jsx-runtime").JSX.Element | null;
8
+ StatusIndicator: ({ className, style, size, ...restProps }: import("@redis-ui/icons").MonochromeIconProps & Pick<import("react").HTMLAttributes<unknown>, "className" | "style">) => import("react/jsx-runtime").JSX.Element | null;
9
9
  LoadingIndicator: ({ loading, ...restProps }: import("../Inputs/components/LoadingIndicator/LoadingIndicator.types").LoadingIndicatorProps & import("../Inputs/components/LoadingIndicator/LoadingIndicator.types").RestLoadingIndicatorProps) => import("react/jsx-runtime").JSX.Element | null;
10
10
  SearchIcon: () => import("react/jsx-runtime").JSX.Element;
11
11
  }, any, {}, never>;
@@ -1,11 +1,11 @@
1
1
  export declare const separator: import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<any>>;
2
2
  export declare const TableHeadingContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
3
3
  export declare const EndContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
4
- export declare const TableSearchInput: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<Omit<import("../Inputs/components/Compose/TextCompose.types").TextInputComposeProps, "readOnly" | "parser" | "formatter"> & import("../Inputs/components/InputTag/InputTag.types").InputTagProps & import("../Inputs/components/LoadingIndicator/LoadingIndicator.types").LoadingIndicatorProps & import("../Inputs/components/ResetButton/ResetButton.types").ResetButtonProps & import("../Inputs").RestInputProps & import("react").RefAttributes<HTMLInputElement>> & {
4
+ export declare const TableSearchInput: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<Omit<import("../Inputs/components/Compose/TextCompose.types").TextInputComposeProps, "readOnly" | "parser" | "formatter"> & import("../Inputs/components/InputTag/InputTag.types").InputTagProps & import("../Inputs/components/LoadingIndicator/LoadingIndicator.types").LoadingIndicatorProps & import("../Inputs/components/ResetButton/ResetButton.types").ResetButtonProps & import("..").RestInputProps & import("react").RefAttributes<HTMLInputElement>> & {
5
5
  Compose: ({ value, defaultValue, onChange, parser, formatter, ...restProps }: import("../Inputs/components/Compose/TextCompose.types").TextInputComposeProps & import("../Inputs/components/Compose/TextCompose.types").RestTextInputComposeProps) => import("react/jsx-runtime").JSX.Element;
6
6
  ResetButton: ({ size, icon, allowReset, onClick, onMouseDown, ...restProps }: import("../Inputs/components/ResetButton/ResetButton.types").RestResetButtonProps & import("../Inputs/components/ResetButton/ResetButton.types").ResetButtonProps) => import("react/jsx-runtime").JSX.Element | null;
7
7
  Tag: import("react").ForwardRefExoticComponent<import("../Inputs/components/InputTag/InputTag.types").InputTagProps & import("../Inputs/components/InputTag/InputTag.types").RestInputTagProps & import("react").RefAttributes<HTMLInputElement>>;
8
- StatusIndicator: ({ className, style, size, ...restProps }: import("@redis-ui/icons/monochrome").MonochromeIconProps & Pick<import("react").HTMLAttributes<unknown>, "className" | "style">) => import("react/jsx-runtime").JSX.Element | null;
8
+ StatusIndicator: ({ className, style, size, ...restProps }: import("@redis-ui/icons").MonochromeIconProps & Pick<import("react").HTMLAttributes<unknown>, "className" | "style">) => import("react/jsx-runtime").JSX.Element | null;
9
9
  LoadingIndicator: ({ loading, ...restProps }: import("../Inputs/components/LoadingIndicator/LoadingIndicator.types").LoadingIndicatorProps & import("../Inputs/components/LoadingIndicator/LoadingIndicator.types").RestLoadingIndicatorProps) => import("react/jsx-runtime").JSX.Element | null;
10
10
  SearchIcon: () => import("react/jsx-runtime").JSX.Element;
11
11
  }, any, {}, never>;
@@ -1 +1 @@
1
- export declare const ToastDescription: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../../../../../Typography").TypographyBodyProps & import("react").RefAttributes<HTMLElement>>, any, {}, never>;
1
+ export declare const ToastDescription: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../../../../..").TypographyBodyProps & import("react").RefAttributes<HTMLElement>>, any, {}, never>;
@@ -1 +1 @@
1
- export declare const ToastMessage: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../../../../../Typography").TypographyBodyProps & import("react").RefAttributes<HTMLElement>>, any, {}, never>;
1
+ export declare const ToastMessage: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../../../../..").TypographyBodyProps & import("react").RefAttributes<HTMLElement>>, any, {}, never>;
@@ -6,7 +6,7 @@ declare const Tooltip: (({ children, openDelayDuration, open, onOpenChange, defa
6
6
  Text: (props: import("..").TypographyBodyProps) => import("react/jsx-runtime").JSX.Element;
7
7
  };
8
8
  Trigger: ({ withButton, ...restProps }: import("./components/Trigger/Trigger.types").TooltipTriggerProps) => import("react/jsx-runtime").JSX.Element;
9
- Card: (({ text, title, actionButtonText, actionButtonHandler, link, linkText, ...composeProps }: import("./components/TooltipCard").TooltipCardProps) => import("react/jsx-runtime").JSX.Element) & {
9
+ Card: (({ text, title, actionButtonText, actionButtonHandler, link, linkText, ...composeProps }: import(".").TooltipCardProps) => import("react/jsx-runtime").JSX.Element) & {
10
10
  Compose: ({ children, ...restProps }: import("./components/TooltipCard/components/Compose/Compose.types").ComposeProps) => import("react/jsx-runtime").JSX.Element;
11
11
  Header: ((props: import("../Popover/components/Content/components/Header/Header.types").ContentHeaderProps) => import("react/jsx-runtime").JSX.Element) & {
12
12
  Compose: (props: import("../Popover/components/Content/components/Header/components/Compose/Compose.types").ContentHeaderComposeProps) => import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- export declare const Text: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../../../../../Typography").TypographyBodyProps & import("react").RefAttributes<HTMLElement>>, any, {}, never>;
1
+ export declare const Text: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../../../../..").TypographyBodyProps & import("react").RefAttributes<HTMLElement>>, any, {}, never>;
@@ -1,3 +1,3 @@
1
1
  export declare const FullWidthCheckbox: import("styled-components").StyledComponent<({ defaultChecked, checked, onCheckedChange, required, disabled, id, variant, ...restProps }: import("../../../../../Checkbox/components/Compose/Compose.types").CheckboxComposeProps & import("../../../../../Checkbox/components/Compose/Compose.types").RestCheckboxComposeProps) => import("react/jsx-runtime").JSX.Element, any, {}, never>;
2
2
  export declare const FullWidthCheckboxLabel: import("styled-components").StyledComponent<({ children, ...restProps }: import("../../../../../Checkbox/components/Label/Label.types").CheckboxLabelProps) => import("react/jsx-runtime").JSX.Element | null, any, {}, never>;
3
- export declare const TextEllipsis: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../../../../../Typography").TypographyBodyProps & import("react").RefAttributes<HTMLElement>>, any, {}, never>;
3
+ export declare const TextEllipsis: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../../../../..").TypographyBodyProps & import("react").RefAttributes<HTMLElement>>, any, {}, never>;
@@ -1,5 +1,5 @@
1
1
  import { IconButtonSizes } from '../../../../../Button';
2
- export declare const CustomIconButton: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../../../../../Button").IconButtonProps & import("react").RefAttributes<HTMLButtonElement>>, any, {}, never>;
2
+ export declare const CustomIconButton: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../../../../..").IconButtonProps & import("react").RefAttributes<HTMLButtonElement>>, any, {}, never>;
3
3
  export declare const SpaceFiller: import("styled-components").StyledComponent<"div", any, {
4
4
  $size: IconButtonSizes;
5
5
  }, never>;
@@ -1,4 +1,4 @@
1
- const require_index = require("../../node_modules/@radix-ui/react-compose-refs/dist/index.cjs");
1
+ const require_index = require("../../packages/components/node_modules/@radix-ui/react-compose-refs/dist/index.cjs");
2
2
  let react = require("react");
3
3
  //#region src/Typography/hooks/useEllipsisTooltip.tsx
4
4
  var useEllipsisTooltip = ({ tooltipOnEllipsis, onMouseEnter, onMouseLeave, title }, ref) => {
@@ -1,4 +1,4 @@
1
- import { useComposedRefs } from "../../node_modules/@radix-ui/react-compose-refs/dist/index.js";
1
+ import { useComposedRefs } from "../../packages/components/node_modules/@radix-ui/react-compose-refs/dist/index.js";
2
2
  import { useCallback, useRef, useState } from "react";
3
3
  //#region src/Typography/hooks/useEllipsisTooltip.tsx
4
4
  var useEllipsisTooltip = ({ tooltipOnEllipsis, onMouseEnter, onMouseLeave, title }, ref) => {
@@ -0,0 +1,30 @@
1
+ const require_runtime = require("../../../../../../_virtual/_rolldown/runtime.cjs");
2
+ let react = require("react");
3
+ react = require_runtime.__toESM(react, 1);
4
+ //#region node_modules/@radix-ui/react-compose-refs/dist/index.mjs
5
+ function setRef(ref, value) {
6
+ if (typeof ref === "function") return ref(value);
7
+ else if (ref !== null && ref !== void 0) ref.current = value;
8
+ }
9
+ function composeRefs(...refs) {
10
+ return (node) => {
11
+ let hasCleanup = false;
12
+ const cleanups = refs.map((ref) => {
13
+ const cleanup = setRef(ref, node);
14
+ if (!hasCleanup && typeof cleanup == "function") hasCleanup = true;
15
+ return cleanup;
16
+ });
17
+ if (hasCleanup) return () => {
18
+ for (let i = 0; i < cleanups.length; i++) {
19
+ const cleanup = cleanups[i];
20
+ if (typeof cleanup == "function") cleanup();
21
+ else setRef(refs[i], null);
22
+ }
23
+ };
24
+ };
25
+ }
26
+ function useComposedRefs(...refs) {
27
+ return react.useCallback(composeRefs(...refs), refs);
28
+ }
29
+ //#endregion
30
+ exports.useComposedRefs = useComposedRefs;
@@ -0,0 +1,28 @@
1
+ import * as React$1 from "react";
2
+ //#region node_modules/@radix-ui/react-compose-refs/dist/index.mjs
3
+ function setRef(ref, value) {
4
+ if (typeof ref === "function") return ref(value);
5
+ else if (ref !== null && ref !== void 0) ref.current = value;
6
+ }
7
+ function composeRefs(...refs) {
8
+ return (node) => {
9
+ let hasCleanup = false;
10
+ const cleanups = refs.map((ref) => {
11
+ const cleanup = setRef(ref, node);
12
+ if (!hasCleanup && typeof cleanup == "function") hasCleanup = true;
13
+ return cleanup;
14
+ });
15
+ if (hasCleanup) return () => {
16
+ for (let i = 0; i < cleanups.length; i++) {
17
+ const cleanup = cleanups[i];
18
+ if (typeof cleanup == "function") cleanup();
19
+ else setRef(refs[i], null);
20
+ }
21
+ };
22
+ };
23
+ }
24
+ function useComposedRefs(...refs) {
25
+ return React$1.useCallback(composeRefs(...refs), refs);
26
+ }
27
+ //#endregion
28
+ export { useComposedRefs };
@@ -1,68 +1,50 @@
1
1
  const require_runtime = require("../../../../../../_virtual/_rolldown/runtime.cjs");
2
- const require_index = require("../../../../../../node_modules/@radix-ui/react-compose-refs/dist/index.cjs");
3
- let react_jsx_runtime = require("react/jsx-runtime");
2
+ const require_index = require("../../react-compose-refs/dist/index.cjs");
4
3
  let react = require("react");
5
4
  react = require_runtime.__toESM(react, 1);
6
5
  //#region node_modules/@radix-ui/react-slot/dist/index.mjs
7
- var REACT_LAZY_TYPE = Symbol.for("react.lazy");
8
- var use = react[" use ".trim().toString()];
9
- function isPromiseLike(value) {
10
- return typeof value === "object" && value !== null && "then" in value;
11
- }
12
- function isLazyComponent(element) {
13
- return element != null && typeof element === "object" && "$$typeof" in element && element.$$typeof === REACT_LAZY_TYPE && "_payload" in element && isPromiseLike(element._payload);
14
- }
15
6
  // @__NO_SIDE_EFFECTS__
16
7
  function createSlot(ownerName) {
17
- const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
18
8
  const Slot2 = react.forwardRef((props, forwardedRef) => {
19
9
  let { children, ...slotProps } = props;
10
+ let slottableElement = null;
11
+ let hasSlottable = false;
12
+ const newChildren = [];
20
13
  if (isLazyComponent(children) && typeof use === "function") children = use(children._payload);
21
- const childrenArray = react.Children.toArray(children);
22
- const slottable = childrenArray.find(isSlottable);
23
- if (slottable) {
24
- const newElement = slottable.props.children;
25
- const newChildren = childrenArray.map((child) => {
26
- if (child === slottable) {
27
- if (react.Children.count(newElement) > 1) return react.Children.only(null);
28
- return react.isValidElement(newElement) ? newElement.props.children : null;
29
- } else return child;
30
- });
31
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SlotClone, {
32
- ...slotProps,
33
- ref: forwardedRef,
34
- children: react.isValidElement(newElement) ? react.cloneElement(newElement, void 0, newChildren) : null
35
- });
36
- }
37
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SlotClone, {
38
- ...slotProps,
39
- ref: forwardedRef,
40
- children
14
+ react.Children.forEach(children, (maybeSlottable) => {
15
+ if (isSlottable(maybeSlottable)) {
16
+ hasSlottable = true;
17
+ const slottable = maybeSlottable;
18
+ let child = "child" in slottable.props ? slottable.props.child : slottable.props.children;
19
+ if (isLazyComponent(child) && typeof use === "function") child = use(child._payload);
20
+ slottableElement = getSlottableElementFromSlottable(slottable, child);
21
+ newChildren.push(slottableElement?.props?.children);
22
+ } else newChildren.push(maybeSlottable);
41
23
  });
24
+ if (slottableElement) slottableElement = react.cloneElement(slottableElement, void 0, newChildren);
25
+ else if (!hasSlottable && react.Children.count(children) === 1 && react.isValidElement(children)) slottableElement = children;
26
+ const slottableElementRef = slottableElement ? getElementRef(slottableElement) : void 0;
27
+ const composedRef = require_index.useComposedRefs(forwardedRef, slottableElementRef);
28
+ if (!slottableElement) {
29
+ if (children || children === 0) throw new Error(hasSlottable ? createSlottableError(ownerName) : createSlotError(ownerName));
30
+ return children;
31
+ }
32
+ const mergedProps = mergeProps(slotProps, slottableElement.props ?? {});
33
+ if (slottableElement.type !== react.Fragment) mergedProps.ref = forwardedRef ? composedRef : slottableElementRef;
34
+ return react.cloneElement(slottableElement, mergedProps);
42
35
  });
43
36
  Slot2.displayName = `${ownerName}.Slot`;
44
37
  return Slot2;
45
38
  }
46
- // @__NO_SIDE_EFFECTS__
47
- function createSlotClone(ownerName) {
48
- const SlotClone = react.forwardRef((props, forwardedRef) => {
49
- let { children, ...slotProps } = props;
50
- if (isLazyComponent(children) && typeof use === "function") children = use(children._payload);
51
- if (react.isValidElement(children)) {
52
- const childrenRef = getElementRef(children);
53
- const props2 = mergeProps(slotProps, children.props);
54
- if (children.type !== react.Fragment) props2.ref = forwardedRef ? require_index.composeRefs(forwardedRef, childrenRef) : childrenRef;
55
- return react.cloneElement(children, props2);
56
- }
57
- return react.Children.count(children) > 1 ? react.Children.only(null) : null;
58
- });
59
- SlotClone.displayName = `${ownerName}.SlotClone`;
60
- return SlotClone;
61
- }
62
- var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
63
- function isSlottable(child) {
64
- return react.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
65
- }
39
+ var SLOTTABLE_IDENTIFIER = Symbol.for("radix.slottable");
40
+ var getSlottableElementFromSlottable = (slottable, child) => {
41
+ if ("child" in slottable.props) {
42
+ const child2 = slottable.props.child;
43
+ if (!react.isValidElement(child2)) return null;
44
+ return react.cloneElement(child2, void 0, slottable.props.children(child2.props.children));
45
+ }
46
+ return react.isValidElement(child) ? child : null;
47
+ };
66
48
  function mergeProps(slotProps, childProps) {
67
49
  const overrideProps = { ...childProps };
68
50
  for (const propName in childProps) {
@@ -95,5 +77,22 @@ function getElementRef(element) {
95
77
  if (mayWarn) return element.props.ref;
96
78
  return element.props.ref || element.ref;
97
79
  }
80
+ function isSlottable(child) {
81
+ return react.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
82
+ }
83
+ var REACT_LAZY_TYPE = Symbol.for("react.lazy");
84
+ function isLazyComponent(element) {
85
+ return element != null && typeof element === "object" && "$$typeof" in element && element.$$typeof === REACT_LAZY_TYPE && "_payload" in element && isPromiseLike(element._payload);
86
+ }
87
+ function isPromiseLike(value) {
88
+ return typeof value === "object" && value !== null && "then" in value;
89
+ }
90
+ var createSlotError = (ownerName) => {
91
+ return `${ownerName} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`;
92
+ };
93
+ var createSlottableError = (ownerName) => {
94
+ return `${ownerName} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`;
95
+ };
96
+ var use = react[" use ".trim().toString()];
98
97
  //#endregion
99
98
  exports.createSlot = createSlot;
@@ -1,66 +1,48 @@
1
- import { composeRefs } from "../../../../../../node_modules/@radix-ui/react-compose-refs/dist/index.js";
2
- import { jsx } from "react/jsx-runtime";
1
+ import { useComposedRefs } from "../../react-compose-refs/dist/index.js";
3
2
  import * as React$1 from "react";
4
3
  //#region node_modules/@radix-ui/react-slot/dist/index.mjs
5
- var REACT_LAZY_TYPE = Symbol.for("react.lazy");
6
- var use = React$1[" use ".trim().toString()];
7
- function isPromiseLike(value) {
8
- return typeof value === "object" && value !== null && "then" in value;
9
- }
10
- function isLazyComponent(element) {
11
- return element != null && typeof element === "object" && "$$typeof" in element && element.$$typeof === REACT_LAZY_TYPE && "_payload" in element && isPromiseLike(element._payload);
12
- }
13
4
  // @__NO_SIDE_EFFECTS__
14
5
  function createSlot(ownerName) {
15
- const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
16
6
  const Slot2 = React$1.forwardRef((props, forwardedRef) => {
17
7
  let { children, ...slotProps } = props;
8
+ let slottableElement = null;
9
+ let hasSlottable = false;
10
+ const newChildren = [];
18
11
  if (isLazyComponent(children) && typeof use === "function") children = use(children._payload);
19
- const childrenArray = React$1.Children.toArray(children);
20
- const slottable = childrenArray.find(isSlottable);
21
- if (slottable) {
22
- const newElement = slottable.props.children;
23
- const newChildren = childrenArray.map((child) => {
24
- if (child === slottable) {
25
- if (React$1.Children.count(newElement) > 1) return React$1.Children.only(null);
26
- return React$1.isValidElement(newElement) ? newElement.props.children : null;
27
- } else return child;
28
- });
29
- return /* @__PURE__ */ jsx(SlotClone, {
30
- ...slotProps,
31
- ref: forwardedRef,
32
- children: React$1.isValidElement(newElement) ? React$1.cloneElement(newElement, void 0, newChildren) : null
33
- });
34
- }
35
- return /* @__PURE__ */ jsx(SlotClone, {
36
- ...slotProps,
37
- ref: forwardedRef,
38
- children
12
+ React$1.Children.forEach(children, (maybeSlottable) => {
13
+ if (isSlottable(maybeSlottable)) {
14
+ hasSlottable = true;
15
+ const slottable = maybeSlottable;
16
+ let child = "child" in slottable.props ? slottable.props.child : slottable.props.children;
17
+ if (isLazyComponent(child) && typeof use === "function") child = use(child._payload);
18
+ slottableElement = getSlottableElementFromSlottable(slottable, child);
19
+ newChildren.push(slottableElement?.props?.children);
20
+ } else newChildren.push(maybeSlottable);
39
21
  });
22
+ if (slottableElement) slottableElement = React$1.cloneElement(slottableElement, void 0, newChildren);
23
+ else if (!hasSlottable && React$1.Children.count(children) === 1 && React$1.isValidElement(children)) slottableElement = children;
24
+ const slottableElementRef = slottableElement ? getElementRef(slottableElement) : void 0;
25
+ const composedRef = useComposedRefs(forwardedRef, slottableElementRef);
26
+ if (!slottableElement) {
27
+ if (children || children === 0) throw new Error(hasSlottable ? createSlottableError(ownerName) : createSlotError(ownerName));
28
+ return children;
29
+ }
30
+ const mergedProps = mergeProps(slotProps, slottableElement.props ?? {});
31
+ if (slottableElement.type !== React$1.Fragment) mergedProps.ref = forwardedRef ? composedRef : slottableElementRef;
32
+ return React$1.cloneElement(slottableElement, mergedProps);
40
33
  });
41
34
  Slot2.displayName = `${ownerName}.Slot`;
42
35
  return Slot2;
43
36
  }
44
- // @__NO_SIDE_EFFECTS__
45
- function createSlotClone(ownerName) {
46
- const SlotClone = React$1.forwardRef((props, forwardedRef) => {
47
- let { children, ...slotProps } = props;
48
- if (isLazyComponent(children) && typeof use === "function") children = use(children._payload);
49
- if (React$1.isValidElement(children)) {
50
- const childrenRef = getElementRef(children);
51
- const props2 = mergeProps(slotProps, children.props);
52
- if (children.type !== React$1.Fragment) props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
53
- return React$1.cloneElement(children, props2);
54
- }
55
- return React$1.Children.count(children) > 1 ? React$1.Children.only(null) : null;
56
- });
57
- SlotClone.displayName = `${ownerName}.SlotClone`;
58
- return SlotClone;
59
- }
60
- var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
61
- function isSlottable(child) {
62
- return React$1.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
63
- }
37
+ var SLOTTABLE_IDENTIFIER = Symbol.for("radix.slottable");
38
+ var getSlottableElementFromSlottable = (slottable, child) => {
39
+ if ("child" in slottable.props) {
40
+ const child2 = slottable.props.child;
41
+ if (!React$1.isValidElement(child2)) return null;
42
+ return React$1.cloneElement(child2, void 0, slottable.props.children(child2.props.children));
43
+ }
44
+ return React$1.isValidElement(child) ? child : null;
45
+ };
64
46
  function mergeProps(slotProps, childProps) {
65
47
  const overrideProps = { ...childProps };
66
48
  for (const propName in childProps) {
@@ -93,5 +75,22 @@ function getElementRef(element) {
93
75
  if (mayWarn) return element.props.ref;
94
76
  return element.props.ref || element.ref;
95
77
  }
78
+ function isSlottable(child) {
79
+ return React$1.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
80
+ }
81
+ var REACT_LAZY_TYPE = Symbol.for("react.lazy");
82
+ function isLazyComponent(element) {
83
+ return element != null && typeof element === "object" && "$$typeof" in element && element.$$typeof === REACT_LAZY_TYPE && "_payload" in element && isPromiseLike(element._payload);
84
+ }
85
+ function isPromiseLike(value) {
86
+ return typeof value === "object" && value !== null && "then" in value;
87
+ }
88
+ var createSlotError = (ownerName) => {
89
+ return `${ownerName} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`;
90
+ };
91
+ var createSlottableError = (ownerName) => {
92
+ return `${ownerName} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`;
93
+ };
94
+ var use = React$1[" use ".trim().toString()];
96
95
  //#endregion
97
96
  export { createSlot };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@redis-ui/components",
3
3
  "license": "UNLICENSED",
4
- "version": "49.0.2",
4
+ "version": "49.1.1",
5
5
  "type": "module",
6
6
  "sideEffects": false,
7
7
  "repository": "git@github.com:redislabsdev/redis-ui.git",
@@ -30,7 +30,7 @@
30
30
  },
31
31
  "peerDependencies": {
32
32
  "@redis-ui/icons": "^8.0.0 || ^9.0.0 || ^10.0.0",
33
- "@redis-ui/styles": "^17.0.0 || ^18.0.0",
33
+ "@redis-ui/styles": "^17.0.0 || ^18.0.0 || ^19.0.0",
34
34
  "react": "^18.0.0 || ^19.0.0",
35
35
  "react-dom": "^18.0.0 || ^19.0.0",
36
36
  "styled-components": "^5.0.0"