@redis-ui/components 42.8.0 → 43.2.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 (228) hide show
  1. package/dist/AutoCompleteSelect/AutoCompleteSelect.cjs +7 -1
  2. package/dist/AutoCompleteSelect/AutoCompleteSelect.js +7 -1
  3. package/dist/AutoCompleteSelect/hooks/useAutoCompleteSelect.cjs +7 -1
  4. package/dist/AutoCompleteSelect/hooks/useAutoCompleteSelect.d.ts +8 -1
  5. package/dist/AutoCompleteSelect/hooks/useAutoCompleteSelect.js +7 -1
  6. package/dist/BoxSelectionGroup/components/Item/components/BoxStateIndicator/BoxStateIndicator.cjs +8 -4
  7. package/dist/BoxSelectionGroup/components/Item/components/BoxStateIndicator/BoxStateIndicator.js +8 -4
  8. package/dist/BoxSelectionGroup/components/Item/components/Compose/Compose.style.cjs +18 -4
  9. package/dist/BoxSelectionGroup/components/Item/components/Compose/Compose.style.js +18 -4
  10. package/dist/BoxSelectionGroup/hooks/useBoxSelectionGroup.cjs +3 -1
  11. package/dist/BoxSelectionGroup/hooks/useBoxSelectionGroup.js +3 -1
  12. package/dist/Button/Button.style.cjs +4 -1
  13. package/dist/Button/Button.style.js +4 -1
  14. package/dist/Button/Button.style.utils.cjs +16 -1
  15. package/dist/Button/Button.style.utils.js +16 -1
  16. package/dist/Button/Button.types.cjs +1 -1
  17. package/dist/Button/Button.types.d.ts +1 -1
  18. package/dist/Button/Button.types.js +1 -1
  19. package/dist/Button/CopyToClipboardButton/CopyToClipboardButton.cjs +59 -0
  20. package/dist/Button/CopyToClipboardButton/CopyToClipboardButton.d.ts +4 -0
  21. package/dist/Button/CopyToClipboardButton/CopyToClipboardButton.js +57 -0
  22. package/dist/Button/CopyToClipboardButton/CopyToClipboardButton.style.cjs +40 -0
  23. package/dist/Button/CopyToClipboardButton/CopyToClipboardButton.style.d.ts +8 -0
  24. package/dist/Button/CopyToClipboardButton/CopyToClipboardButton.style.js +38 -0
  25. package/dist/Button/CopyToClipboardButton/CopyToClipboardButton.types.d.ts +5 -0
  26. package/dist/Button/TextButton/TextButton.style.cjs +4 -1
  27. package/dist/Button/TextButton/TextButton.style.js +4 -1
  28. package/dist/Button/TextButton/TextButton.types.cjs +1 -1
  29. package/dist/Button/TextButton/TextButton.types.d.ts +1 -1
  30. package/dist/Button/TextButton/TextButton.types.js +1 -1
  31. package/dist/Button/index.d.ts +2 -0
  32. package/dist/Checkbox/components/Label/Label.style.cjs +15 -3
  33. package/dist/Checkbox/components/Label/Label.style.js +15 -3
  34. package/dist/Chip/components/CloseButton/CloseButton.cjs +3 -1
  35. package/dist/Chip/components/CloseButton/CloseButton.js +3 -1
  36. package/dist/Chip/components/Compose/Compose.style.cjs +4 -1
  37. package/dist/Chip/components/Compose/Compose.style.js +4 -1
  38. package/dist/Drawer/components/Description/Description.cjs +3 -1
  39. package/dist/Drawer/components/Description/Description.js +3 -1
  40. package/dist/Helpers/contexts/Popper/PopperCollisionBoundaryManager.cjs +3 -1
  41. package/dist/Helpers/contexts/Popper/PopperCollisionBoundaryManager.js +3 -1
  42. package/dist/Helpers/contexts/PrimitiveContextState.cjs +28 -16
  43. package/dist/Helpers/contexts/PrimitiveContextState.js +28 -16
  44. package/dist/Helpers/contexts/SharedId.context.cjs +9 -5
  45. package/dist/Helpers/contexts/SharedId.context.js +9 -5
  46. package/dist/Helpers/css.utils.cjs +18 -4
  47. package/dist/Helpers/css.utils.d.ts +15 -3
  48. package/dist/Helpers/css.utils.js +18 -4
  49. package/dist/Helpers/hooks/useScrollable.cjs +3 -1
  50. package/dist/Helpers/hooks/useScrollable.js +3 -1
  51. package/dist/Helpers/react.utils.cjs +6 -2
  52. package/dist/Helpers/react.utils.js +6 -2
  53. package/dist/HighlightedIcon/HighlightedIcon.cjs +26 -0
  54. package/dist/HighlightedIcon/HighlightedIcon.d.ts +3 -0
  55. package/dist/HighlightedIcon/HighlightedIcon.js +26 -0
  56. package/dist/HighlightedIcon/HighlightedIcon.style.cjs +49 -0
  57. package/dist/HighlightedIcon/HighlightedIcon.style.d.ts +5 -0
  58. package/dist/HighlightedIcon/HighlightedIcon.style.js +47 -0
  59. package/dist/HighlightedIcon/HighlightedIcon.types.d.ts +8 -0
  60. package/dist/HighlightedIcon/index.d.ts +3 -0
  61. package/dist/Inputs/QuantityCounter/components/InputGroup/components/ValueLabel/ValueLabel.cjs +9 -5
  62. package/dist/Inputs/QuantityCounter/components/InputGroup/components/ValueLabel/ValueLabel.js +9 -5
  63. package/dist/Inputs/components/Compose/Compose.style.cjs +29 -6
  64. package/dist/Inputs/components/Compose/Compose.style.js +29 -6
  65. package/dist/Inputs/hooks/numericInput/numericInput.utils.cjs +12 -4
  66. package/dist/Inputs/hooks/numericInput/numericInput.utils.js +12 -4
  67. package/dist/Inputs/hooks/numericInput/useNumericInput.cjs +15 -3
  68. package/dist/Inputs/hooks/numericInput/useNumericInput.js +15 -3
  69. package/dist/Loader/Loader.cjs +1 -0
  70. package/dist/Loader/Loader.js +1 -0
  71. package/dist/Menu/components/Content/components/Item/Components/Compose/Compose.style.cjs +19 -4
  72. package/dist/Menu/components/Content/components/Item/Components/Compose/Compose.style.js +19 -4
  73. package/dist/Menu/components/Content/components/Label/components/Compose/Compose.style.cjs +4 -1
  74. package/dist/Menu/components/Content/components/Label/components/Compose/Compose.style.js +4 -1
  75. package/dist/Modal/components/Content/components/Compose/Compose.cjs +3 -1
  76. package/dist/Modal/components/Content/components/Compose/Compose.js +3 -1
  77. package/dist/Modal/components/Content/components/Description/Description.cjs +3 -1
  78. package/dist/Modal/components/Content/components/Description/Description.js +3 -1
  79. package/dist/MultiSelect/components/Compose/hooks/useMultiSelectContextApi.cjs +3 -1
  80. package/dist/MultiSelect/components/Compose/hooks/useMultiSelectContextApi.js +3 -1
  81. package/dist/MultiSelect/components/Trigger/components/MultiValue/MultiValue.cjs +3 -1
  82. package/dist/MultiSelect/components/Trigger/components/MultiValue/MultiValue.js +3 -1
  83. package/dist/Overflow/Overflow.cjs +3 -1
  84. package/dist/Overflow/Overflow.js +3 -1
  85. package/dist/Overflow/Overflow.utils.cjs +15 -6
  86. package/dist/Overflow/Overflow.utils.js +15 -6
  87. package/dist/Overflow/components/OverflowContainer/OverflowContainer.cjs +3 -1
  88. package/dist/Overflow/components/OverflowContainer/OverflowContainer.js +3 -1
  89. package/dist/Pagination/components/PageSizeSelect.cjs +3 -1
  90. package/dist/Pagination/components/PageSizeSelect.js +3 -1
  91. package/dist/Popover/components/Content/Content.cjs +3 -1
  92. package/dist/Popover/components/Content/Content.js +3 -1
  93. package/dist/Popover/components/Content/components/Footer/Footer.cjs +3 -1
  94. package/dist/Popover/components/Content/components/Footer/Footer.js +3 -1
  95. package/dist/RadioGroup/components/Item/components/Label/Label.style.cjs +15 -3
  96. package/dist/RadioGroup/components/Item/components/Label/Label.style.js +15 -3
  97. package/dist/ScreenReaderAnnounce/ScreenReaderAnnounce.cjs +3 -1
  98. package/dist/ScreenReaderAnnounce/ScreenReaderAnnounce.js +3 -1
  99. package/dist/Section/components/Header/components/CollapseButton/CollapseButton.cjs +3 -1
  100. package/dist/Section/components/Header/components/CollapseButton/CollapseButton.js +3 -1
  101. package/dist/Select/components/Content/components/Option/components/Compose/Compose.style.cjs +16 -4
  102. package/dist/Select/components/Content/components/Option/components/Compose/Compose.style.js +16 -4
  103. package/dist/Select/components/Content/components/OptionList/OptionList.cjs +6 -4
  104. package/dist/Select/components/Content/components/OptionList/OptionList.js +6 -4
  105. package/dist/Select/components/Content/components/OptionList/Virtual.cjs +9 -5
  106. package/dist/Select/components/Content/components/OptionList/Virtual.js +9 -5
  107. package/dist/Select/components/Context/hooks/useSearch.cjs +3 -1
  108. package/dist/Select/components/Context/hooks/useSearch.js +3 -1
  109. package/dist/Select/components/Trigger/components/Compose/Compose.style.cjs +33 -7
  110. package/dist/Select/components/Trigger/components/Compose/Compose.style.js +33 -7
  111. package/dist/SideBar/components/Item/Item.style.cjs +14 -3
  112. package/dist/SideBar/components/Item/Item.style.js +14 -3
  113. package/dist/Skeleton/components/Circle/Circle.cjs +1 -1
  114. package/dist/Skeleton/components/Circle/Circle.js +1 -1
  115. package/dist/Skeleton/components/Square/Square.cjs +1 -1
  116. package/dist/Skeleton/components/Square/Square.js +1 -1
  117. package/dist/Slider/components/Label/Compose/Compose.cjs +3 -1
  118. package/dist/Slider/components/Label/Compose/Compose.js +3 -1
  119. package/dist/Slider/components/Mark/Compose/Compose.cjs +3 -1
  120. package/dist/Slider/components/Mark/Compose/Compose.js +3 -1
  121. package/dist/Slider/hooks/useOffset.cjs +3 -1
  122. package/dist/Slider/hooks/useOffset.js +3 -1
  123. package/dist/Stepper/Stepper.cjs +14 -5
  124. package/dist/Stepper/Stepper.d.ts +2 -0
  125. package/dist/Stepper/Stepper.js +14 -5
  126. package/dist/Stepper/Stepper.utils.cjs +12 -0
  127. package/dist/Stepper/Stepper.utils.d.ts +2 -0
  128. package/dist/Stepper/Stepper.utils.js +12 -0
  129. package/dist/Stepper/components/Compose/Compose.d.ts +1 -0
  130. package/dist/Stepper/components/Step/Step.cjs +2 -0
  131. package/dist/Stepper/components/Step/Step.d.ts +1 -0
  132. package/dist/Stepper/components/Step/Step.js +2 -0
  133. package/dist/Stepper/components/Step/components/Compose/Compose.cjs +5 -10
  134. package/dist/Stepper/components/Step/components/Compose/Compose.js +5 -10
  135. package/dist/Stepper/components/Step/components/Separator/Separator.cjs +15 -0
  136. package/dist/Stepper/components/Step/components/Separator/Separator.d.ts +3 -0
  137. package/dist/Stepper/components/Step/components/Separator/Separator.js +15 -0
  138. package/dist/Stepper/components/Step/components/Separator/Separator.style.cjs +24 -0
  139. package/dist/Stepper/components/Step/components/Separator/Separator.style.d.ts +1 -0
  140. package/dist/Stepper/components/Step/components/Separator/Separator.style.js +22 -0
  141. package/dist/Stepper/components/Step/components/Separator/Separator.types.d.ts +5 -0
  142. package/dist/Stepper/hooks/useStepperInteractive.cjs +12 -4
  143. package/dist/Stepper/hooks/useStepperInteractive.js +12 -4
  144. package/dist/Switch/components/Switcher/Switcher.cjs +3 -1
  145. package/dist/Switch/components/Switcher/Switcher.js +3 -1
  146. package/dist/Switch/components/Switcher/Switcher.style.cjs +31 -8
  147. package/dist/Switch/components/Switcher/Switcher.style.js +31 -8
  148. package/dist/Tabs/components/TabBar/components/Trigger/components/Marker/Marker.style.cjs +24 -5
  149. package/dist/Tabs/components/TabBar/components/Trigger/components/Marker/Marker.style.js +24 -5
  150. package/dist/Tabs/components/TabBar/components/Trigger/components/Tab/Tab.style.cjs +24 -5
  151. package/dist/Tabs/components/TabBar/components/Trigger/components/Tab/Tab.style.js +24 -5
  152. package/dist/ThemeModeSwitch/useThemeModeSwitch.cjs +6 -2
  153. package/dist/ThemeModeSwitch/useThemeModeSwitch.js +6 -2
  154. package/dist/Toast/core/content.helper.cjs +8 -4
  155. package/dist/Toast/core/content.helper.js +8 -4
  156. package/dist/Tooltip/components/Content/Content.cjs +3 -1
  157. package/dist/Tooltip/components/Content/Content.js +3 -1
  158. package/dist/TreeView/TreeView.cjs +3 -1
  159. package/dist/TreeView/TreeView.js +3 -1
  160. package/dist/TreeView/components/TreeItem/components/Compose/Compose.cjs +6 -4
  161. package/dist/TreeView/components/TreeItem/components/Compose/Compose.js +6 -4
  162. package/dist/Typography/Typography.types.cjs +4 -0
  163. package/dist/Typography/Typography.types.d.ts +2 -1
  164. package/dist/Typography/Typography.types.js +4 -0
  165. package/dist/index.cjs +8 -0
  166. package/dist/index.d.ts +1 -0
  167. package/dist/index.js +98 -90
  168. package/package.json +10 -9
  169. package/skills/redis-ui-components/SKILL.md +126 -0
  170. package/skills/redis-ui-components/references/ActionIconButton.md +96 -0
  171. package/skills/redis-ui-components/references/AppBar.md +161 -0
  172. package/skills/redis-ui-components/references/AppSelectionMenu.md +184 -0
  173. package/skills/redis-ui-components/references/AutoCompleteSelect.md +193 -0
  174. package/skills/redis-ui-components/references/Badge.md +77 -0
  175. package/skills/redis-ui-components/references/Banner.md +563 -0
  176. package/skills/redis-ui-components/references/BoxSelectionGroup.md +487 -0
  177. package/skills/redis-ui-components/references/Breadcrumbs.md +214 -0
  178. package/skills/redis-ui-components/references/Button.md +169 -0
  179. package/skills/redis-ui-components/references/ButtonGroup.md +126 -0
  180. package/skills/redis-ui-components/references/Card.md +56 -0
  181. package/skills/redis-ui-components/references/Checkbox.md +171 -0
  182. package/skills/redis-ui-components/references/Chip.md +154 -0
  183. package/skills/redis-ui-components/references/ChipList.md +307 -0
  184. package/skills/redis-ui-components/references/CopyToClipboardButton.md +47 -0
  185. package/skills/redis-ui-components/references/CountryFlag.md +57 -0
  186. package/skills/redis-ui-components/references/Drawer.md +298 -0
  187. package/skills/redis-ui-components/references/Filters.md +162 -0
  188. package/skills/redis-ui-components/references/FlexDivider.md +152 -0
  189. package/skills/redis-ui-components/references/FlexGroup.md +149 -0
  190. package/skills/redis-ui-components/references/FlexItem.md +58 -0
  191. package/skills/redis-ui-components/references/FlexSplit.md +37 -0
  192. package/skills/redis-ui-components/references/FormField.md +678 -0
  193. package/skills/redis-ui-components/references/IconButton.md +63 -0
  194. package/skills/redis-ui-components/references/Input.md +295 -0
  195. package/skills/redis-ui-components/references/KeyValueList.md +501 -0
  196. package/skills/redis-ui-components/references/Label.md +238 -0
  197. package/skills/redis-ui-components/references/Link.md +402 -0
  198. package/skills/redis-ui-components/references/Loader.md +100 -0
  199. package/skills/redis-ui-components/references/Menu.md +988 -0
  200. package/skills/redis-ui-components/references/MidBar.md +358 -0
  201. package/skills/redis-ui-components/references/Modal.md +525 -0
  202. package/skills/redis-ui-components/references/MoreInfoIcon.md +119 -0
  203. package/skills/redis-ui-components/references/MultiSelect.md +558 -0
  204. package/skills/redis-ui-components/references/NumericInput.md +322 -0
  205. package/skills/redis-ui-components/references/Overflow.md +127 -0
  206. package/skills/redis-ui-components/references/Pagination.md +151 -0
  207. package/skills/redis-ui-components/references/PasswordInput.md +262 -0
  208. package/skills/redis-ui-components/references/Popover.md +868 -0
  209. package/skills/redis-ui-components/references/ProfileIcon.md +65 -0
  210. package/skills/redis-ui-components/references/ProgressBar.md +103 -0
  211. package/skills/redis-ui-components/references/QuantityCounter.md +555 -0
  212. package/skills/redis-ui-components/references/RadioGroup.md +265 -0
  213. package/skills/redis-ui-components/references/ScreenReaderAnnounce.md +147 -0
  214. package/skills/redis-ui-components/references/SearchBar.md +242 -0
  215. package/skills/redis-ui-components/references/SearchInput.md +213 -0
  216. package/skills/redis-ui-components/references/Section.md +349 -0
  217. package/skills/redis-ui-components/references/Select.md +517 -0
  218. package/skills/redis-ui-components/references/SideBar.md +468 -0
  219. package/skills/redis-ui-components/references/Slider.md +398 -0
  220. package/skills/redis-ui-components/references/Stepper.md +288 -0
  221. package/skills/redis-ui-components/references/Switch.md +193 -0
  222. package/skills/redis-ui-components/references/Tabs.md +383 -0
  223. package/skills/redis-ui-components/references/TextArea.md +139 -0
  224. package/skills/redis-ui-components/references/TextButton.md +217 -0
  225. package/skills/redis-ui-components/references/Toast.md +399 -0
  226. package/skills/redis-ui-components/references/ToggleButton.md +163 -0
  227. package/skills/redis-ui-components/references/Tooltip.md +636 -0
  228. package/skills/redis-ui-components/references/Typography.md +323 -0
@@ -0,0 +1,214 @@
1
+ # Breadcrumbs
2
+
3
+ A breadcrumb navigation component that renders a trail of items with a default separator, controlled navigation callbacks, and a compound composition API for custom layouts.
4
+
5
+ ## Import
6
+
7
+ ```tsx
8
+ import { Breadcrumbs } from '@redislabsdev/redis-ui-components';
9
+ ```
10
+
11
+ > The composition example also uses icons from `@redislabsdev/redis-ui-icons`:
12
+ > ```tsx
13
+ > import { ChevronRightIcon } from '@redislabsdev/redis-ui-icons';
14
+ > ```
15
+
16
+ ## Props
17
+
18
+ | Prop | Type | Default | Description |
19
+ |------|------|---------|-------------|
20
+ | items | `BreadcrumbItem[]` | - | Breadcrumb entries rendered from left to right. Each item can provide `label`, optional `href`, and optional `onClick`; the last item is rendered as the current page. |
21
+ | separator | `ReactNode` | `'/'` | Separator rendered between breadcrumb items. |
22
+ | aria-label | `string` | `'Breadcrumb'` | Accessible label for the breadcrumb navigation landmark. |
23
+ | compose wrapper props | `ComposeElementProps<HTMLElement>` | - | Additional props passed to the underlying `<nav>` element, excluding `children`. |
24
+
25
+ ## Sub-components
26
+
27
+ - `Breadcrumbs.Compose` - Navigation wrapper that renders the semantic breadcrumb `<nav>`.
28
+ - `Breadcrumbs.List` - Ordered list container for breadcrumb items.
29
+ - `Breadcrumbs.Item` - List item wrapper used to structure breadcrumb entries and separators.
30
+ - `Breadcrumbs.Link` - Interactive breadcrumb link that supports `href`, `onClick`, and `disabled`.
31
+ - `Breadcrumbs.Separator` - Separator element rendered between items, hidden from screen readers by default.
32
+ - `Breadcrumbs.Current` - Current page marker rendered with `aria-current="page"`.
33
+
34
+ ### Breadcrumbs.Compose Props
35
+
36
+ | Prop | Type | Default | Description |
37
+ |------|------|---------|-------------|
38
+ | aria-label | `string` | `'Breadcrumb'` | Accessible label for the breadcrumb navigation landmark. |
39
+ | compose wrapper props | `ComposeElementProps<HTMLElement>` | - | Additional props passed to the underlying `<nav>` element. |
40
+
41
+ ### Breadcrumbs.List Props
42
+
43
+ | Prop | Type | Default | Description |
44
+ |------|------|---------|-------------|
45
+ | list props | `ComposeElementProps<HTMLOListElement>` | - | Additional props passed to the underlying ordered list. |
46
+
47
+ ### Breadcrumbs.Item Props
48
+
49
+ | Prop | Type | Default | Description |
50
+ |------|------|---------|-------------|
51
+ | item props | `ComposeElementProps<HTMLLIElement>` | - | Additional props passed to the underlying list item. |
52
+
53
+ ### Breadcrumbs.Link Props
54
+
55
+ | Prop | Type | Default | Description |
56
+ |------|------|---------|-------------|
57
+ | children | `ReactNode` | - | Link label or custom content. |
58
+ | disabled | `boolean` | `false` | Disables the link and removes it from the tab order. |
59
+ | link props | `Omit<AnchorHTMLAttributes<HTMLAnchorElement>, 'onKeyDown'>` | - | Additional anchor props passed to the breadcrumb link. |
60
+
61
+ ### Breadcrumbs.Separator Props
62
+
63
+ | Prop | Type | Default | Description |
64
+ |------|------|---------|-------------|
65
+ | children | `ReactNode` | `'/'` | Custom separator content. |
66
+ | separator props | `HTMLAttributes<HTMLSpanElement>` | - | Additional props passed to the separator span. |
67
+
68
+ ### Breadcrumbs.Current Props
69
+
70
+ | Prop | Type | Default | Description |
71
+ |------|------|---------|-------------|
72
+ | children | `ReactNode` | - | Label or content for the current page. |
73
+ | current props | `HTMLAttributes<HTMLSpanElement>` | - | Additional props passed to the current page span. |
74
+
75
+ ## Examples
76
+
77
+ ### Playground
78
+
79
+ ```tsx
80
+ import { Breadcrumbs } from '@redislabsdev/redis-ui-components';
81
+
82
+ <Breadcrumbs
83
+ items={[
84
+ { label: 'Home', onClick: () => {} },
85
+ { label: 'Products', onClick: () => {} },
86
+ { label: 'Category', onClick: () => {} },
87
+ { label: 'Current Page' }
88
+ ]}
89
+ separator="/"
90
+ />
91
+ ```
92
+
93
+ ### Basic
94
+
95
+ > Basic breadcrumbs with default separator. Click on breadcrumb items to navigate.
96
+
97
+ ```tsx
98
+ import { useState } from 'react';
99
+ import { Breadcrumbs } from '@redislabsdev/redis-ui-components';
100
+
101
+ function ControlledBreadcrumbExample() {
102
+ const [currentPath, setCurrentPath] = useState<string[]>(['Home', 'Products', 'Current Page']);
103
+
104
+ const handleClick = (index: number) => {
105
+ setCurrentPath(currentPath.slice(0, index + 1));
106
+ };
107
+
108
+ return (
109
+ <Breadcrumbs
110
+ items={currentPath.map((label, index) => ({
111
+ label,
112
+ onClick: index < currentPath.length - 1 ? () => handleClick(index) : undefined
113
+ }))}
114
+ />
115
+ );
116
+ }
117
+ ```
118
+
119
+ ### Composition
120
+
121
+ > Use composition pattern for full control over rendering, including Select components.
122
+
123
+ ```tsx
124
+ import { useState } from 'react';
125
+ import { Breadcrumbs, Select, SelectOption, TextButton } from '@redislabsdev/redis-ui-components';
126
+ import { ChevronRightIcon } from '@redislabsdev/redis-ui-icons';
127
+ import styled from 'styled-components';
128
+ import { useTheme } from '@redislabsdev/redis-ui-styles';
129
+
130
+ const categoryOptions: SelectOption[] = [
131
+ { value: 'electronics', label: 'Electronics' },
132
+ { value: 'clothing', label: 'Clothing' },
133
+ { value: 'books', label: 'Books' },
134
+ { value: 'home', label: 'Home & Garden' }
135
+ ];
136
+
137
+ const BreadcrumbTextButton = styled(TextButton)`
138
+ color: ${() => useTheme().components.breadcrumbs.current.textColor};
139
+ font-weight: ${() => useTheme().components.breadcrumbs.current.fontWeight};
140
+
141
+ &:hover {
142
+ color: ${() => useTheme().components.breadcrumbs.link.states.hover?.textColor};
143
+ }
144
+
145
+ &:active {
146
+ color: ${() => useTheme().components.breadcrumbs.link.states.active?.textColor};
147
+ }
148
+ `;
149
+
150
+ function CompositionWithSelectExample() {
151
+ const [selectedCategory, setSelectedCategory] = useState('electronics');
152
+
153
+ return (
154
+ <Breadcrumbs.Compose aria-label="Breadcrumb">
155
+ <Breadcrumbs.List>
156
+ <Breadcrumbs.Item>
157
+ <Breadcrumbs.Link
158
+ onClick={() => {
159
+ // eslint-disable-next-line no-alert
160
+ alert('Navigate to Home');
161
+ }}
162
+ >
163
+ Home
164
+ </Breadcrumbs.Link>
165
+ </Breadcrumbs.Item>
166
+ <Breadcrumbs.Item>
167
+ <Breadcrumbs.Separator>
168
+ <ChevronRightIcon size="S" />
169
+ </Breadcrumbs.Separator>
170
+ </Breadcrumbs.Item>
171
+ <Breadcrumbs.Item>
172
+ <Breadcrumbs.Link
173
+ onClick={() => {
174
+ // eslint-disable-next-line no-alert
175
+ alert('Navigate to Products');
176
+ }}
177
+ >
178
+ Products
179
+ </Breadcrumbs.Link>
180
+ </Breadcrumbs.Item>
181
+ <Breadcrumbs.Item>
182
+ <Breadcrumbs.Separator>
183
+ <ChevronRightIcon size="S" />
184
+ </Breadcrumbs.Separator>
185
+ </Breadcrumbs.Item>
186
+ <Breadcrumbs.Item>
187
+ <Select.Compose
188
+ options={categoryOptions}
189
+ value={selectedCategory}
190
+ onChange={(value) => setSelectedCategory(value as string)}
191
+ >
192
+ <Select.Trigger.Compose customContainer>
193
+ <span>
194
+ <BreadcrumbTextButton variant="primary-inline">
195
+ <Select.Trigger.Value />
196
+ <Select.Trigger.Arrow />
197
+ </BreadcrumbTextButton>
198
+ </span>
199
+ </Select.Trigger.Compose>
200
+ <Select.Content searchable />
201
+ </Select.Compose>
202
+ </Breadcrumbs.Item>
203
+ </Breadcrumbs.List>
204
+ </Breadcrumbs.Compose>
205
+ );
206
+ }
207
+ ```
208
+
209
+ ## Notes
210
+
211
+ - Breadcrumbs render a semantic navigation trail and the last item is treated as the current page.
212
+ - Basic breadcrumbs use a default `/` separator, but the separator can be customized with any React node.
213
+ - The composition pattern is the right choice when you need full control over rendering, including nested components such as `Select`.
214
+ - `BreadcrumbItem` entries are `{ label, href?, onClick? }` objects; the root component renders the last entry as `Breadcrumbs.Current`.
@@ -0,0 +1,169 @@
1
+ # Button
2
+
3
+ A standard button component supporting multiple variants, sizes, and optional icons. It forwards refs and provides a `Button.Icon` sub-component for embedding icons that automatically match the button's size and color.
4
+
5
+ ## Import
6
+ ```tsx
7
+ import { Button } from '@redislabsdev/redis-ui-components';
8
+ ```
9
+
10
+ ## Props
11
+ | Prop | Type | Default | Description |
12
+ |------|------|---------|-------------|
13
+ | size | `'large' \| 'medium' \| 'small'` | `'medium'` | The size of the button |
14
+ | variant | `'primary' \| 'destructive' \| 'secondary-fill' \| 'secondary-invert' \| 'secondary-ghost' \| 'upsell' \| 'upsell-invert' \| 'upsell-ghost'` | `'primary'` | The visual style variant of the button |
15
+ | disabled | `boolean` | `false` | Whether the button is disabled |
16
+ | onClick | `(e: React.MouseEvent<HTMLButtonElement>) => void` | - | Click event handler |
17
+ | theme | `Theme` | - | Theme override from `@redislabsdev/redis-ui-styles` |
18
+ | children | `React.ReactNode` | - | Button content (inherited from `ButtonHTMLAttributes`) |
19
+
20
+ The component also extends all native `ButtonHTMLAttributes<HTMLButtonElement>` props.
21
+
22
+ ## Sub-components
23
+
24
+ - **`Button.Icon`** - Renders an icon inside the button, automatically sized and colored to match the parent button.
25
+
26
+ ### Button.Icon Props
27
+ | Prop | Type | Default | Description |
28
+ |------|------|---------|-------------|
29
+ | icon | `IconType` | *required* | The icon component from `@redislabsdev/redis-ui-icons` |
30
+ | customSize | `string` | - | Override the automatic icon size (e.g. `'2.8rem'`) |
31
+ | title | `string` | - | Title attribute for the icon container |
32
+
33
+ ## Examples
34
+
35
+ ### Playground
36
+ ```tsx
37
+ import { Button } from '@redislabsdev/redis-ui-components';
38
+
39
+ <Button variant="primary" size="medium" disabled={false}>
40
+ Button
41
+ </Button>
42
+ ```
43
+
44
+ ### Sizes
45
+ > 3 sizes are supported with `medium` being the default.
46
+ ```tsx
47
+ import { Button } from '@redislabsdev/redis-ui-components';
48
+ import { EditIcon } from '@redislabsdev/redis-ui-icons';
49
+
50
+ <>
51
+ <Button size="small">
52
+ <Button.Icon icon={EditIcon} />
53
+ Small
54
+ </Button>
55
+ <Button size="medium">
56
+ <Button.Icon icon={EditIcon} />
57
+ Medium
58
+ </Button>
59
+ <Button size="large">
60
+ <Button.Icon icon={EditIcon} />
61
+ Large
62
+ </Button>
63
+ </>
64
+ ```
65
+
66
+ ### Variants
67
+ > 8 total variants are supported, 1 primary, 3 secondary, a destructive variant, and 3 upsell variants. The default is `primary`.
68
+ ```tsx
69
+ import { Button } from '@redislabsdev/redis-ui-components';
70
+ import { CancelIcon } from '@redislabsdev/redis-ui-icons';
71
+
72
+ <>
73
+ <Button variant="primary">
74
+ Primary
75
+ <Button.Icon icon={CancelIcon} />
76
+ </Button>
77
+ <Button variant="secondary-fill">
78
+ Secondary Fill
79
+ <Button.Icon icon={CancelIcon} />
80
+ </Button>
81
+ <Button variant="secondary-invert">
82
+ Secondary Invert
83
+ <Button.Icon icon={CancelIcon} />
84
+ </Button>
85
+ <Button variant="secondary-ghost">
86
+ Secondary Ghost
87
+ <Button.Icon icon={CancelIcon} />
88
+ </Button>
89
+ <Button variant="destructive">
90
+ Destructive
91
+ <Button.Icon icon={CancelIcon} />
92
+ </Button>
93
+ <Button variant="upsell">
94
+ Upsell
95
+ <Button.Icon icon={CancelIcon} />
96
+ </Button>
97
+ <Button variant="upsell-invert">
98
+ Upsell Invert
99
+ <Button.Icon icon={CancelIcon} />
100
+ </Button>
101
+ <Button variant="upsell-ghost">
102
+ Upsell Ghost
103
+ <Button.Icon icon={CancelIcon} />
104
+ </Button>
105
+ </>
106
+ ```
107
+
108
+ ### Disabled
109
+ > Buttons can be disabled by setting the `disabled` prop to `true`. This will disable any hover styles and prevent click events from firing.
110
+ ```tsx
111
+ import { Button } from '@redislabsdev/redis-ui-components';
112
+ import { CancelIcon } from '@redislabsdev/redis-ui-icons';
113
+
114
+ <>
115
+ <Button disabled>
116
+ Primary
117
+ <Button.Icon icon={CancelIcon} />
118
+ </Button>
119
+ <Button disabled variant="secondary-fill">
120
+ Secondary Fill
121
+ <Button.Icon icon={CancelIcon} />
122
+ </Button>
123
+ <Button disabled variant="secondary-invert">
124
+ Secondary Invert
125
+ <Button.Icon icon={CancelIcon} />
126
+ </Button>
127
+ <Button disabled variant="secondary-ghost">
128
+ Secondary Ghost
129
+ </Button>
130
+ <Button disabled variant="destructive">
131
+ Destructive
132
+ <Button.Icon icon={CancelIcon} />
133
+ </Button>
134
+ </>
135
+ ```
136
+
137
+ ### WithIcon
138
+ > To add an icon to a button, use the `Button.Icon` component. This component can be placed anywhere inside the `Button` component. It will automatically be sized and colored to match its parent button.
139
+ >
140
+ > Do not use this component if you need a round icon-only button. Instead, use the IconButton or ActionIconButton components.
141
+ ```tsx
142
+ import { Button } from '@redislabsdev/redis-ui-components';
143
+ import { ContractIcon, MarketplaceIcon, ShardIcon } from '@redislabsdev/redis-ui-icons';
144
+
145
+ <>
146
+ <Button>
147
+ <Button.Icon icon={ContractIcon} />
148
+ Left Icon
149
+ </Button>
150
+ <Button>
151
+ Right Icon
152
+ <Button.Icon icon={MarketplaceIcon} />
153
+ </Button>
154
+ <Button>
155
+ <Button.Icon icon={ShardIcon} />
156
+ </Button>
157
+ <Button>
158
+ <Button.Icon icon={ShardIcon} customSize="2.8rem" />
159
+ Custom icon size
160
+ </Button>
161
+ </>
162
+ ```
163
+
164
+ ## Notes
165
+ - The button renders with `type="button"` by default.
166
+ - `Button.Icon` automatically sizes the icon based on the parent button's size (`S` for small, `M` for medium, `L` for large).
167
+ - If you need to pass props to the icon element, declare it as a separate component outside the parent or wrap it in `useMemo`. Do not pass it as an inline arrow function, as it will cause re-renders on every render of the parent component.
168
+ - For icon-only round buttons, use the `IconButton` or `ActionIconButton` components instead.
169
+ - The component forwards refs to the underlying `<button>` element.
@@ -0,0 +1,126 @@
1
+ # ButtonGroup
2
+
3
+ A grouped button container for building segmented button sets with optional icons and explicit selected states. `ButtonGroup` does not manage selection on its own, so single- and multi-select behavior is handled by the consumer.
4
+
5
+ ## Import
6
+
7
+ ```tsx
8
+ import { ButtonGroup } from '@redislabsdev/redis-ui-components';
9
+ ```
10
+
11
+ > If the examples use icons, import them from `@redislabsdev/redis-ui-icons`:
12
+ >
13
+ > ```tsx
14
+ > import { InfoIcon, ShardIcon, StarsIcon } from '@redislabsdev/redis-ui-icons';
15
+ > ```
16
+
17
+ ## Props
18
+
19
+ | Prop | Type | Default | Description |
20
+ |------|------|---------|-------------|
21
+ | `...div props` | `React.HTMLAttributes<HTMLDivElement>` | - | Standard `div` attributes forwarded to the wrapper. |
22
+
23
+ ## Sub-components
24
+
25
+ - `ButtonGroup.Button` - Individual button inside the group. Supports selected and disabled states.
26
+ - `ButtonGroup.Icon` - Icon wrapper that renders a medium-sized icon in the group color.
27
+
28
+ ### `ButtonGroup.Button` Props
29
+
30
+ | Prop | Type | Default | Description |
31
+ |------|------|---------|-------------|
32
+ | `isSelected` | `boolean` | - | Marks the button as selected for styling purposes. |
33
+ | `onClick` | `(e: React.MouseEvent<HTMLButtonElement>) => void` | - | Click handler used to toggle selection. |
34
+ | `children` | `React.ReactNode` | - | Button content. |
35
+
36
+ `ButtonGroup.Button` also accepts all native `button` attributes.
37
+
38
+ ### `ButtonGroup.Icon` Props
39
+
40
+ | Prop | Type | Default | Description |
41
+ |------|------|---------|-------------|
42
+ | `icon` | `IconType` | required | Icon component rendered inside the button group item. |
43
+
44
+ ## Examples
45
+
46
+ ### SingleSelectionSimulation
47
+
48
+ ```tsx
49
+ import { useState } from 'react';
50
+ import { ButtonGroup } from '@redislabsdev/redis-ui-components';
51
+ import { InfoIcon, ShardIcon, StarsIcon } from '@redislabsdev/redis-ui-icons';
52
+
53
+ const items = [
54
+ { value: 'item1', label: 'Button 1', icon: ShardIcon, disabled: true },
55
+ { value: 'item2', label: 'Button 2', icon: StarsIcon },
56
+ { value: 'item3', label: 'Button 3' }
57
+ ];
58
+
59
+ const [selected, setSelected] = useState<string>(items[0].value);
60
+
61
+ const selectSingle = (value: string) => {
62
+ if (selected !== value) {
63
+ setSelected(value);
64
+ }
65
+ };
66
+
67
+ const isSelected = (value: string) => selected === value;
68
+
69
+ <ButtonGroup>
70
+ {items.map((item) => (
71
+ <ButtonGroup.Button
72
+ key={item.value}
73
+ disabled={item.disabled}
74
+ isSelected={isSelected(item.value)}
75
+ onClick={() => selectSingle(item.value)}
76
+ >
77
+ {item.icon && <ButtonGroup.Icon icon={item.icon} />}
78
+ {item.label || item.value}
79
+ <ButtonGroup.Icon icon={InfoIcon} />
80
+ </ButtonGroup.Button>
81
+ ))}
82
+ </ButtonGroup>;
83
+ ```
84
+
85
+ ### MultiSelectionSimulation
86
+
87
+ ```tsx
88
+ import { useState } from 'react';
89
+ import { ButtonGroup } from '@redislabsdev/redis-ui-components';
90
+ import { InfoIcon, ShardIcon, StarsIcon } from '@redislabsdev/redis-ui-icons';
91
+
92
+ const items = [
93
+ { value: 'item1', label: 'Initially selected', icon: ShardIcon },
94
+ { value: 'item2', label: 'Selected-Disabled', icon: StarsIcon, disabled: true },
95
+ { value: 'item3', label: 'Initially unselected' },
96
+ { value: 'item4', label: 'Disabled', disabled: true }
97
+ ];
98
+
99
+ const [selected, setSelected] = useState<string[]>([items[0].value, items[1].value]);
100
+
101
+ const toggleMultiSelection = (value: string) =>
102
+ selected.includes(value) ? selected.filter((sel) => sel !== value) : [...selected, value];
103
+ const isSelected = (value: string) => selected.includes(value);
104
+
105
+ <ButtonGroup>
106
+ {items.map((item) => (
107
+ <ButtonGroup.Button
108
+ key={item.value}
109
+ disabled={item.disabled}
110
+ isSelected={isSelected(item.value)}
111
+ onClick={() => setSelected(toggleMultiSelection(item.value))}
112
+ >
113
+ {item.icon && <ButtonGroup.Icon icon={item.icon} />}
114
+ {item.label || item.value}
115
+ <ButtonGroup.Icon icon={InfoIcon} />
116
+ </ButtonGroup.Button>
117
+ ))}
118
+ </ButtonGroup>;
119
+ ```
120
+
121
+ ## Notes
122
+
123
+ - `ButtonGroup` has no internal selection logic; manage selected state in the parent component.
124
+ - `ButtonGroup.Button` is styled as a native `button` and can be disabled through the standard `disabled` attribute.
125
+ - `ButtonGroup.Icon` always renders the icon at `size="M"` with `customColor="currentColor"`.
126
+ - If you need to pass props to an icon component, declare it outside the render path or wrap it in `useMemo`; avoid inline arrow functions because they re-create the icon on every parent render.
@@ -0,0 +1,56 @@
1
+ # Card
2
+
3
+ A simple container card with configurable width and height. It renders as a flex column and uses the theme card surface styling.
4
+
5
+ ## Import
6
+
7
+ ```tsx
8
+ import { Card } from '@redislabsdev/redis-ui-components';
9
+ ```
10
+
11
+ ## Props
12
+
13
+ | Prop | Type | Default | Description |
14
+ |------|------|---------|-------------|
15
+ | width | `number \| string` | `100%` | Overrides the card width |
16
+ | height | `number \| string` | `fit-content` | Overrides the card height |
17
+
18
+ The component also extends all native `React.HTMLAttributes<HTMLDivElement>` props.
19
+
20
+ ## Examples
21
+
22
+ ### Playground
23
+
24
+ ```tsx
25
+ import { Card } from '@redislabsdev/redis-ui-components';
26
+
27
+ <Card>Content</Card>
28
+ ```
29
+
30
+ ### Sizing
31
+
32
+ > If `width` is not defined, `Card` takes 100%. If `height` is not defined, `Card` fits content
33
+
34
+ ```tsx
35
+ import { Card } from '@redislabsdev/redis-ui-components';
36
+
37
+ <>
38
+ <Card>
39
+ <span>No width and height defined</span>
40
+ </Card>
41
+ <Card width={150} height={100}>
42
+ <span>width=150px;</span>
43
+ <span>height=100px;</span>
44
+ </Card>
45
+ <Card width="fit-content" height="fit-content">
46
+ <span>width=fit-content;</span>
47
+ <span>height=fit-content;</span>
48
+ </Card>
49
+ </>
50
+ ```
51
+
52
+ ## Notes
53
+
54
+ - If `width` is not provided, the card defaults to `100%`.
55
+ - If `height` is not provided, the card defaults to `fit-content`.
56
+ - The component forwards standard `div` attributes through `React.HTMLAttributes<HTMLDivElement>`.