@redis-ui/components 42.8.0 → 43.0.2
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/AutoCompleteSelect/AutoCompleteSelect.cjs +7 -1
- package/dist/AutoCompleteSelect/AutoCompleteSelect.js +7 -1
- package/dist/AutoCompleteSelect/hooks/useAutoCompleteSelect.cjs +7 -1
- package/dist/AutoCompleteSelect/hooks/useAutoCompleteSelect.d.ts +8 -1
- package/dist/AutoCompleteSelect/hooks/useAutoCompleteSelect.js +7 -1
- package/dist/BoxSelectionGroup/components/Item/components/BoxStateIndicator/BoxStateIndicator.cjs +8 -4
- package/dist/BoxSelectionGroup/components/Item/components/BoxStateIndicator/BoxStateIndicator.js +8 -4
- package/dist/BoxSelectionGroup/components/Item/components/Compose/Compose.style.cjs +18 -4
- package/dist/BoxSelectionGroup/components/Item/components/Compose/Compose.style.js +18 -4
- package/dist/BoxSelectionGroup/hooks/useBoxSelectionGroup.cjs +3 -1
- package/dist/BoxSelectionGroup/hooks/useBoxSelectionGroup.js +3 -1
- package/dist/Button/Button.style.cjs +4 -1
- package/dist/Button/Button.style.js +4 -1
- package/dist/Button/Button.style.utils.cjs +16 -1
- package/dist/Button/Button.style.utils.js +16 -1
- package/dist/Button/Button.types.cjs +1 -1
- package/dist/Button/Button.types.d.ts +1 -1
- package/dist/Button/Button.types.js +1 -1
- package/dist/Button/CopyToClipboardButton/CopyToClipboardButton.cjs +59 -0
- package/dist/Button/CopyToClipboardButton/CopyToClipboardButton.d.ts +4 -0
- package/dist/Button/CopyToClipboardButton/CopyToClipboardButton.js +57 -0
- package/dist/Button/CopyToClipboardButton/CopyToClipboardButton.style.cjs +40 -0
- package/dist/Button/CopyToClipboardButton/CopyToClipboardButton.style.d.ts +8 -0
- package/dist/Button/CopyToClipboardButton/CopyToClipboardButton.style.js +38 -0
- package/dist/Button/CopyToClipboardButton/CopyToClipboardButton.types.d.ts +5 -0
- package/dist/Button/TextButton/TextButton.style.cjs +4 -1
- package/dist/Button/TextButton/TextButton.style.js +4 -1
- package/dist/Button/TextButton/TextButton.types.cjs +1 -1
- package/dist/Button/TextButton/TextButton.types.d.ts +1 -1
- package/dist/Button/TextButton/TextButton.types.js +1 -1
- package/dist/Button/index.d.ts +2 -0
- package/dist/Checkbox/components/Label/Label.style.cjs +15 -3
- package/dist/Checkbox/components/Label/Label.style.js +15 -3
- package/dist/Chip/components/CloseButton/CloseButton.cjs +3 -1
- package/dist/Chip/components/CloseButton/CloseButton.js +3 -1
- package/dist/Chip/components/Compose/Compose.style.cjs +4 -1
- package/dist/Chip/components/Compose/Compose.style.js +4 -1
- package/dist/Drawer/components/Description/Description.cjs +3 -1
- package/dist/Drawer/components/Description/Description.js +3 -1
- package/dist/Helpers/contexts/Popper/PopperCollisionBoundaryManager.cjs +3 -1
- package/dist/Helpers/contexts/Popper/PopperCollisionBoundaryManager.js +3 -1
- package/dist/Helpers/contexts/PrimitiveContextState.cjs +28 -16
- package/dist/Helpers/contexts/PrimitiveContextState.js +28 -16
- package/dist/Helpers/contexts/SharedId.context.cjs +9 -5
- package/dist/Helpers/contexts/SharedId.context.js +9 -5
- package/dist/Helpers/css.utils.cjs +18 -4
- package/dist/Helpers/css.utils.d.ts +15 -3
- package/dist/Helpers/css.utils.js +18 -4
- package/dist/Helpers/hooks/useScrollable.cjs +3 -1
- package/dist/Helpers/hooks/useScrollable.js +3 -1
- package/dist/Helpers/react.utils.cjs +6 -2
- package/dist/Helpers/react.utils.js +6 -2
- package/dist/Inputs/QuantityCounter/components/InputGroup/components/ValueLabel/ValueLabel.cjs +9 -5
- package/dist/Inputs/QuantityCounter/components/InputGroup/components/ValueLabel/ValueLabel.js +9 -5
- package/dist/Inputs/components/Compose/Compose.style.cjs +29 -6
- package/dist/Inputs/components/Compose/Compose.style.js +29 -6
- package/dist/Inputs/hooks/numericInput/numericInput.utils.cjs +12 -4
- package/dist/Inputs/hooks/numericInput/numericInput.utils.js +12 -4
- package/dist/Inputs/hooks/numericInput/useNumericInput.cjs +15 -3
- package/dist/Inputs/hooks/numericInput/useNumericInput.js +15 -3
- package/dist/Loader/Loader.cjs +1 -0
- package/dist/Loader/Loader.js +1 -0
- package/dist/Menu/components/Content/components/Item/Components/Compose/Compose.style.cjs +19 -4
- package/dist/Menu/components/Content/components/Item/Components/Compose/Compose.style.js +19 -4
- package/dist/Menu/components/Content/components/Label/components/Compose/Compose.style.cjs +4 -1
- package/dist/Menu/components/Content/components/Label/components/Compose/Compose.style.js +4 -1
- package/dist/Modal/components/Content/components/Compose/Compose.cjs +3 -1
- package/dist/Modal/components/Content/components/Compose/Compose.js +3 -1
- package/dist/Modal/components/Content/components/Description/Description.cjs +3 -1
- package/dist/Modal/components/Content/components/Description/Description.js +3 -1
- package/dist/MultiSelect/components/Compose/hooks/useMultiSelectContextApi.cjs +3 -1
- package/dist/MultiSelect/components/Compose/hooks/useMultiSelectContextApi.js +3 -1
- package/dist/MultiSelect/components/Trigger/components/MultiValue/MultiValue.cjs +3 -1
- package/dist/MultiSelect/components/Trigger/components/MultiValue/MultiValue.js +3 -1
- package/dist/Overflow/Overflow.cjs +3 -1
- package/dist/Overflow/Overflow.js +3 -1
- package/dist/Overflow/Overflow.utils.cjs +15 -6
- package/dist/Overflow/Overflow.utils.js +15 -6
- package/dist/Overflow/components/OverflowContainer/OverflowContainer.cjs +3 -1
- package/dist/Overflow/components/OverflowContainer/OverflowContainer.js +3 -1
- package/dist/Pagination/components/PageSizeSelect.cjs +3 -1
- package/dist/Pagination/components/PageSizeSelect.js +3 -1
- package/dist/Popover/components/Content/Content.cjs +3 -1
- package/dist/Popover/components/Content/Content.js +3 -1
- package/dist/Popover/components/Content/components/Footer/Footer.cjs +3 -1
- package/dist/Popover/components/Content/components/Footer/Footer.js +3 -1
- package/dist/RadioGroup/components/Item/components/Label/Label.style.cjs +15 -3
- package/dist/RadioGroup/components/Item/components/Label/Label.style.js +15 -3
- package/dist/ScreenReaderAnnounce/ScreenReaderAnnounce.cjs +3 -1
- package/dist/ScreenReaderAnnounce/ScreenReaderAnnounce.js +3 -1
- package/dist/Section/components/Header/components/CollapseButton/CollapseButton.cjs +3 -1
- package/dist/Section/components/Header/components/CollapseButton/CollapseButton.js +3 -1
- package/dist/Select/components/Content/components/Option/components/Compose/Compose.style.cjs +16 -4
- package/dist/Select/components/Content/components/Option/components/Compose/Compose.style.js +16 -4
- package/dist/Select/components/Content/components/OptionList/OptionList.cjs +6 -4
- package/dist/Select/components/Content/components/OptionList/OptionList.js +6 -4
- package/dist/Select/components/Content/components/OptionList/Virtual.cjs +9 -5
- package/dist/Select/components/Content/components/OptionList/Virtual.js +9 -5
- package/dist/Select/components/Context/hooks/useSearch.cjs +3 -1
- package/dist/Select/components/Context/hooks/useSearch.js +3 -1
- package/dist/Select/components/Trigger/components/Compose/Compose.style.cjs +33 -7
- package/dist/Select/components/Trigger/components/Compose/Compose.style.js +33 -7
- package/dist/SideBar/components/Item/Item.style.cjs +14 -3
- package/dist/SideBar/components/Item/Item.style.js +14 -3
- package/dist/Skeleton/components/Circle/Circle.cjs +1 -1
- package/dist/Skeleton/components/Circle/Circle.js +1 -1
- package/dist/Skeleton/components/Square/Square.cjs +1 -1
- package/dist/Skeleton/components/Square/Square.js +1 -1
- package/dist/Slider/components/Label/Compose/Compose.cjs +3 -1
- package/dist/Slider/components/Label/Compose/Compose.js +3 -1
- package/dist/Slider/components/Mark/Compose/Compose.cjs +3 -1
- package/dist/Slider/components/Mark/Compose/Compose.js +3 -1
- package/dist/Slider/hooks/useOffset.cjs +3 -1
- package/dist/Slider/hooks/useOffset.js +3 -1
- package/dist/Stepper/components/Step/components/Compose/Compose.cjs +3 -1
- package/dist/Stepper/components/Step/components/Compose/Compose.js +3 -1
- package/dist/Stepper/hooks/useStepperInteractive.cjs +12 -4
- package/dist/Stepper/hooks/useStepperInteractive.js +12 -4
- package/dist/Switch/components/Switcher/Switcher.cjs +3 -1
- package/dist/Switch/components/Switcher/Switcher.js +3 -1
- package/dist/Switch/components/Switcher/Switcher.style.cjs +31 -8
- package/dist/Switch/components/Switcher/Switcher.style.js +31 -8
- package/dist/Tabs/components/TabBar/components/Trigger/components/Marker/Marker.style.cjs +24 -5
- package/dist/Tabs/components/TabBar/components/Trigger/components/Marker/Marker.style.js +24 -5
- package/dist/Tabs/components/TabBar/components/Trigger/components/Tab/Tab.style.cjs +24 -5
- package/dist/Tabs/components/TabBar/components/Trigger/components/Tab/Tab.style.js +24 -5
- package/dist/ThemeModeSwitch/useThemeModeSwitch.cjs +6 -2
- package/dist/ThemeModeSwitch/useThemeModeSwitch.js +6 -2
- package/dist/Toast/core/content.helper.cjs +8 -4
- package/dist/Toast/core/content.helper.js +8 -4
- package/dist/Tooltip/components/Content/Content.cjs +3 -1
- package/dist/Tooltip/components/Content/Content.js +3 -1
- package/dist/TreeView/TreeView.cjs +3 -1
- package/dist/TreeView/TreeView.js +3 -1
- package/dist/TreeView/components/TreeItem/components/Compose/Compose.cjs +6 -4
- package/dist/TreeView/components/TreeItem/components/Compose/Compose.js +6 -4
- package/dist/Typography/Typography.types.cjs +4 -0
- package/dist/Typography/Typography.types.d.ts +2 -1
- package/dist/Typography/Typography.types.js +4 -0
- package/dist/index.cjs +4 -0
- package/dist/index.js +94 -90
- package/package.json +10 -9
- package/skills/redis-ui-components/SKILL.md +128 -0
- package/skills/redis-ui-components/references/Button.md +169 -0
- package/skills/redis-ui-components/references/FlexDivider.md +152 -0
- package/skills/redis-ui-components/references/FlexGroup.md +149 -0
- package/skills/redis-ui-components/references/FlexItem.md +58 -0
- package/skills/redis-ui-components/references/FlexSplit.md +37 -0
- package/skills/redis-ui-components/references/Select.md +517 -0
package/dist/index.js
CHANGED
|
@@ -1106,21 +1106,22 @@ import { default as default13 } from "./Button/ActionIconButton/ActionIconButton
|
|
|
1106
1106
|
import * as ActionIconButton_style from "./Button/ActionIconButton/ActionIconButton.style.js";
|
|
1107
1107
|
import { default as default14 } from "./Button/ToggleButton/ToggleButton.js";
|
|
1108
1108
|
import * as ToggleButton_style from "./Button/ToggleButton/ToggleButton.style.js";
|
|
1109
|
+
import { default as default15 } from "./Button/CopyToClipboardButton/CopyToClipboardButton.js";
|
|
1109
1110
|
import { buttonSizes, buttonVariants } from "./Button/Button.types.js";
|
|
1110
1111
|
import { textButtonVariants } from "./Button/TextButton/TextButton.types.js";
|
|
1111
1112
|
import { iconButtonSizes } from "./Button/IconButton/IconButton.types.js";
|
|
1112
1113
|
import { actionIconButtonSizes, buttonWithIconVariants } from "./Button/ActionIconButton/ActionIconButton.types.js";
|
|
1113
|
-
import { default as
|
|
1114
|
-
import { default as
|
|
1115
|
-
import { default as
|
|
1116
|
-
import { default as
|
|
1114
|
+
import { default as default16 } from "./ButtonGroup/ButtonGroup.js";
|
|
1115
|
+
import { default as default17 } from "./Card/Card.js";
|
|
1116
|
+
import { default as default18 } from "./Checkbox/Checkbox.js";
|
|
1117
|
+
import { default as default19 } from "./Chip/Chip.js";
|
|
1117
1118
|
import { ChipContainer } from "./Chip/components/Compose/Compose.style.js";
|
|
1118
|
-
import { default as
|
|
1119
|
-
import { default as
|
|
1120
|
-
import { default as
|
|
1121
|
-
import { default as
|
|
1122
|
-
import { default as
|
|
1123
|
-
import { default as
|
|
1119
|
+
import { default as default20 } from "./ChipList/ChipList.js";
|
|
1120
|
+
import { default as default21 } from "./CountryFlag/CountryFlag.js";
|
|
1121
|
+
import { default as default22 } from "./DatePicker/DatePicker.js";
|
|
1122
|
+
import { default as default23 } from "./DatePicker/RangeDatePicker.js";
|
|
1123
|
+
import { default as default24 } from "./Drawer/Drawer.js";
|
|
1124
|
+
import { default as default25 } from "./Filters/Filters.js";
|
|
1124
1125
|
import { childrenToString, combineHandlers, forwardRefWithGenerics, handlePreventDefault, handleStopPropagation, isFragmentElement, isTextualNode, memoWithGenerics } from "./Helpers/react.utils.js";
|
|
1125
1126
|
import { generateId, useGeneratedId } from "./Helpers/generateId.js";
|
|
1126
1127
|
import { debounce } from "./Helpers/debounce.js";
|
|
@@ -1131,65 +1132,66 @@ import { SelfContained } from "./Helpers/SelfContained.js";
|
|
|
1131
1132
|
import { RestylableElement } from "./Helpers/RestylableElement.js";
|
|
1132
1133
|
import { PopperProvider, usePopperContext } from "./Helpers/contexts/Popper/Popper.context.js";
|
|
1133
1134
|
import { useScrollable } from "./Helpers/hooks/useScrollable.js";
|
|
1134
|
-
import { default as
|
|
1135
|
-
import { default as
|
|
1136
|
-
import { default as
|
|
1137
|
-
import { default as
|
|
1138
|
-
import { default as
|
|
1139
|
-
import { default as
|
|
1135
|
+
import { default as default26 } from "./Inputs/Input/Input.js";
|
|
1136
|
+
import { default as default27 } from "./Inputs/NumericInput/NumericInput.js";
|
|
1137
|
+
import { default as default28 } from "./Inputs/PasswordInput/PasswordInput.js";
|
|
1138
|
+
import { default as default29 } from "./Inputs/SearchInput/SearchInput.js";
|
|
1139
|
+
import { default as default30 } from "./Inputs/TextArea/TextArea.js";
|
|
1140
|
+
import { default as default31 } from "./Inputs/QuantityCounter/QuantityCounter.js";
|
|
1140
1141
|
import { getClosestDivisibleNumber } from "./Inputs/hooks/numericInput/numericInput.utils.js";
|
|
1141
1142
|
import { ContextProvider, useInputValueApi, useInputValueProps } from "./Inputs/components/Context/InputValue.context.js";
|
|
1142
1143
|
import { ErrorContentProvider, FieldDisabledProvider, FieldDisabledTransProvider, useErrorContent, useFieldDisabled } from "./Inputs/components/Context/Field.context.js";
|
|
1143
|
-
import { default as
|
|
1144
|
+
import { default as default32 } from "./FormField/FormField.js";
|
|
1144
1145
|
import { FieldAdditionTextIdProvider, FieldAdditionTextIdTransProvider, FieldReadonlyProvider, FieldReadonlyTransProvider, FieldRequiredProvider, FieldRequiredTransProvider, FieldStatusProvider, FieldStatusTransProvider, useFieldAdditionTextId, useFieldReadonly, useFieldRequired, useFieldStatus } from "./FormField/FormField.context.js";
|
|
1145
1146
|
import { KeyValueList } from "./KeyValueList/KeyValueList.js";
|
|
1146
1147
|
import { useKeyValueList } from "./KeyValueList/hooks/useKeyValueList.js";
|
|
1147
|
-
import { default as
|
|
1148
|
+
import { default as default33 } from "./Label/Label.js";
|
|
1148
1149
|
import { FlexItem } from "./Layouts/FlexItem/FlexItem.js";
|
|
1149
1150
|
import { FlexGroup } from "./Layouts/FlexGroup/FlexGroup.js";
|
|
1150
1151
|
import { FlexSplit } from "./Layouts/FlexSplit/FlexSplit.js";
|
|
1151
1152
|
import { FlexDivider } from "./Layouts/FlexDivider/FlexDivider.js";
|
|
1152
|
-
import { default as
|
|
1153
|
+
import { default as default34 } from "./Link/Link.js";
|
|
1153
1154
|
import { LinkStyler } from "./Link/LinkStyler/LinkStyler.js";
|
|
1154
|
-
import { default as
|
|
1155
|
-
import { default as
|
|
1156
|
-
import { default as
|
|
1157
|
-
import { default as
|
|
1158
|
-
import { default as
|
|
1159
|
-
import { default as
|
|
1155
|
+
import { default as default35 } from "./Loader/Loader.js";
|
|
1156
|
+
import { default as default36 } from "./Menu/Menu.js";
|
|
1157
|
+
import { default as default37 } from "./MidBar/MidBar.js";
|
|
1158
|
+
import { default as default38 } from "./Modal/Modal.js";
|
|
1159
|
+
import { default as default39 } from "./MoreInfoIcon/MoreInfoIcon.js";
|
|
1160
|
+
import { default as default40 } from "./MultiSelect/MultiSelect.js";
|
|
1160
1161
|
import { useMultiSelectContext } from "./MultiSelect/components/Context/Context.js";
|
|
1161
1162
|
import { Overflow } from "./Overflow/Overflow.js";
|
|
1162
1163
|
import { usePaginationContext } from "./Pagination/Pagination.context.js";
|
|
1163
1164
|
import { Pagination } from "./Pagination/Pagination.js";
|
|
1164
|
-
import { default as
|
|
1165
|
-
import { default as
|
|
1165
|
+
import { default as default41 } from "./Popover/Popover.js";
|
|
1166
|
+
import { default as default42 } from "./RadioGroup/RadioGroup.js";
|
|
1166
1167
|
import { ScreenReaderAnnounce } from "./ScreenReaderAnnounce/ScreenReaderAnnounce.js";
|
|
1167
|
-
import { default as
|
|
1168
|
-
import { default as
|
|
1169
|
-
import { default as
|
|
1170
|
-
import { default as
|
|
1168
|
+
import { default as default43 } from "./SearchBar/SearchBar.js";
|
|
1169
|
+
import { default as default44 } from "./Section/Section.js";
|
|
1170
|
+
import { default as default45 } from "./Section/components/Header/components/CategoryValueList/CategoryValueList.js";
|
|
1171
|
+
import { default as default46 } from "./Select/Select.js";
|
|
1171
1172
|
import { useSelectContext } from "./Select/components/Context/Context.js";
|
|
1172
|
-
import { default as
|
|
1173
|
-
import { default as
|
|
1174
|
-
import { default as
|
|
1173
|
+
import { default as default47 } from "./SideBar/SideBar.js";
|
|
1174
|
+
import { default as default48 } from "./Skeleton/Skeleton.js";
|
|
1175
|
+
import { default as default49 } from "./Stepper/Stepper.js";
|
|
1175
1176
|
import { StepperStepState } from "./Stepper/components/Step/Step.types.js";
|
|
1176
|
-
import { default as
|
|
1177
|
-
import { default as
|
|
1178
|
-
import { default as
|
|
1177
|
+
import { default as default50 } from "./Switch/Switch.js";
|
|
1178
|
+
import { default as default51 } from "./TableHeading/TableHeading.js";
|
|
1179
|
+
import { default as default52 } from "./Tabs/Tabs.js";
|
|
1179
1180
|
import { ThemeModeSwitch } from "./ThemeModeSwitch/ThemeModeSwitch.js";
|
|
1180
1181
|
import { useThemeModeSwitch } from "./ThemeModeSwitch/useThemeModeSwitch.js";
|
|
1181
1182
|
import { useToastParams } from "./Toast/core/context.js";
|
|
1182
|
-
import { default as
|
|
1183
|
-
import { default as
|
|
1183
|
+
import { default as default53 } from "./Toast/Toast.js";
|
|
1184
|
+
import { default as default54 } from "./Toast/Toaster.js";
|
|
1184
1185
|
import { toast } from "./Toast/core/core.js";
|
|
1185
|
-
import { default as
|
|
1186
|
-
import { default as
|
|
1187
|
-
import { default as
|
|
1188
|
-
import { default as
|
|
1189
|
-
import { default as
|
|
1186
|
+
import { default as default55 } from "./Tooltip/Tooltip.js";
|
|
1187
|
+
import { default as default56 } from "./Tooltip/Provider/Provider.js";
|
|
1188
|
+
import { default as default57 } from "./Tooltip/components/TooltipCard/TooltipCard.js";
|
|
1189
|
+
import { default as default58 } from "./TreeView/TreeView.js";
|
|
1190
|
+
import { default as default59 } from "./Typography/Typography.js";
|
|
1190
1191
|
import { useEllipsisTooltip } from "./Typography/hooks/useEllipsisTooltip.js";
|
|
1192
|
+
import { typographyColors } from "./Typography/Typography.types.js";
|
|
1191
1193
|
import { ProgressBar } from "./ProgressBar/ProgressBar.js";
|
|
1192
|
-
import { default as
|
|
1194
|
+
import { default as default60 } from "./ProfileIcon/ProfileIcon.js";
|
|
1193
1195
|
import * as ProfileIcon_style from "./ProfileIcon/ProfileIcon.style.js";
|
|
1194
1196
|
import { Slider } from "./Slider/Slider.js";
|
|
1195
1197
|
export {
|
|
@@ -1205,19 +1207,20 @@ export {
|
|
|
1205
1207
|
default8 as BoxSelectionGroup,
|
|
1206
1208
|
default7 as Breadcrumbs,
|
|
1207
1209
|
default10 as Button,
|
|
1208
|
-
|
|
1210
|
+
default16 as ButtonGroup,
|
|
1209
1211
|
Button_style as ButtonStyles,
|
|
1210
1212
|
IconButton_style as ButtonWithIconStyles,
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1213
|
+
default17 as Card,
|
|
1214
|
+
default45 as CategoryValueList,
|
|
1215
|
+
default18 as Checkbox,
|
|
1216
|
+
default19 as Chip,
|
|
1215
1217
|
ChipContainer,
|
|
1216
|
-
|
|
1218
|
+
default20 as ChipList,
|
|
1217
1219
|
ContextProvider,
|
|
1218
|
-
|
|
1219
|
-
default21 as
|
|
1220
|
-
|
|
1220
|
+
default15 as CopyToClipboardButton,
|
|
1221
|
+
default21 as CountryFlag,
|
|
1222
|
+
default22 as DatePicker,
|
|
1223
|
+
default24 as Drawer,
|
|
1221
1224
|
ErrorContentProvider,
|
|
1222
1225
|
FieldAdditionTextIdProvider,
|
|
1223
1226
|
FieldAdditionTextIdTransProvider,
|
|
@@ -1229,67 +1232,67 @@ export {
|
|
|
1229
1232
|
FieldRequiredTransProvider,
|
|
1230
1233
|
FieldStatusProvider,
|
|
1231
1234
|
FieldStatusTransProvider,
|
|
1232
|
-
|
|
1235
|
+
default25 as Filters,
|
|
1233
1236
|
FlexDivider,
|
|
1234
1237
|
FlexGroup,
|
|
1235
1238
|
FlexItem,
|
|
1236
1239
|
FlexSplit,
|
|
1237
|
-
|
|
1240
|
+
default32 as FormField,
|
|
1238
1241
|
default12 as IconButton,
|
|
1239
|
-
|
|
1242
|
+
default26 as Input,
|
|
1240
1243
|
KeyValueList,
|
|
1241
|
-
|
|
1242
|
-
|
|
1244
|
+
default33 as Label,
|
|
1245
|
+
default34 as Link,
|
|
1243
1246
|
LinkStyler,
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1247
|
+
default35 as Loader,
|
|
1248
|
+
default36 as Menu,
|
|
1249
|
+
default37 as MidBar,
|
|
1250
|
+
default38 as Modal,
|
|
1251
|
+
default39 as MoreInfoIcon,
|
|
1249
1252
|
default9 as MultiBoxSelectionGroup,
|
|
1250
|
-
|
|
1251
|
-
|
|
1253
|
+
default40 as MultiSelect,
|
|
1254
|
+
default27 as NumericInput,
|
|
1252
1255
|
Overflow,
|
|
1253
1256
|
Pagination,
|
|
1254
|
-
|
|
1255
|
-
|
|
1257
|
+
default28 as PasswordInput,
|
|
1258
|
+
default41 as Popover,
|
|
1256
1259
|
PopperProvider,
|
|
1257
|
-
|
|
1260
|
+
default60 as ProfileIcon,
|
|
1258
1261
|
ProfileIcon_style as ProfileIconStyles,
|
|
1259
1262
|
ProgressBar,
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
+
default31 as QuantityCounter,
|
|
1264
|
+
default42 as RadioGroup,
|
|
1265
|
+
default23 as RangeDatePicker,
|
|
1263
1266
|
RestylableElement,
|
|
1264
1267
|
ScreenReaderAnnounce,
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1268
|
+
default43 as SearchBar,
|
|
1269
|
+
default29 as SearchInput,
|
|
1270
|
+
default44 as Section,
|
|
1271
|
+
default46 as Select,
|
|
1269
1272
|
SelfContained,
|
|
1270
1273
|
SharedIdProvider,
|
|
1271
1274
|
SharedIdTransProvider,
|
|
1272
|
-
|
|
1273
|
-
|
|
1275
|
+
default47 as SideBar,
|
|
1276
|
+
default48 as Skeleton,
|
|
1274
1277
|
Slider,
|
|
1275
|
-
|
|
1278
|
+
default49 as Stepper,
|
|
1276
1279
|
StepperStepState,
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1280
|
+
default50 as Switch,
|
|
1281
|
+
default51 as TableHeading,
|
|
1282
|
+
default52 as Tabs,
|
|
1283
|
+
default30 as TextArea,
|
|
1281
1284
|
default11 as TextButton,
|
|
1282
1285
|
TextButton_style as TextButtonStyles,
|
|
1283
1286
|
ThemeModeSwitch,
|
|
1284
|
-
|
|
1285
|
-
|
|
1287
|
+
default53 as Toast,
|
|
1288
|
+
default54 as Toaster,
|
|
1286
1289
|
default14 as ToggleButton,
|
|
1287
1290
|
ToggleButton_style as ToggleButtonStyles,
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1291
|
+
default55 as Tooltip,
|
|
1292
|
+
default57 as TooltipCard,
|
|
1293
|
+
default56 as TooltipProvider,
|
|
1294
|
+
default58 as TreeView,
|
|
1295
|
+
default59 as Typography,
|
|
1293
1296
|
actionIconButtonSizes,
|
|
1294
1297
|
badgeVariants,
|
|
1295
1298
|
bannerVariants,
|
|
@@ -1312,6 +1315,7 @@ export {
|
|
|
1312
1315
|
memoWithGenerics,
|
|
1313
1316
|
textButtonVariants,
|
|
1314
1317
|
toast,
|
|
1318
|
+
typographyColors,
|
|
1315
1319
|
useEllipsisTooltip,
|
|
1316
1320
|
useErrorContent,
|
|
1317
1321
|
useFieldAdditionTextId,
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redis-ui/components",
|
|
3
3
|
"license": "UNLICENSED",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "43.0.2",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"repository": "git@github.com:redislabsdev/redis-ui.git",
|
|
8
8
|
"files": [
|
|
9
|
-
"dist"
|
|
9
|
+
"dist",
|
|
10
|
+
"skills"
|
|
10
11
|
],
|
|
11
12
|
"module": "./dist/index.js",
|
|
12
13
|
"main": "./dist/index.cjs",
|
|
@@ -20,12 +21,15 @@
|
|
|
20
21
|
"scripts": {
|
|
21
22
|
"build": "tsc && vite build",
|
|
22
23
|
"deploy": "node ../../scripts/deploy.js",
|
|
23
|
-
"lint": "
|
|
24
|
+
"lint": "oxlint --deny-warnings",
|
|
25
|
+
"lint:fix": "oxlint --fix --deny-warnings",
|
|
26
|
+
"format": "oxfmt --check",
|
|
27
|
+
"format:fix": "oxfmt --write",
|
|
24
28
|
"test": "vitest"
|
|
25
29
|
},
|
|
26
30
|
"peerDependencies": {
|
|
27
|
-
"@redis-ui/icons": "^6.
|
|
28
|
-
"@redis-ui/styles": "^14.
|
|
31
|
+
"@redis-ui/icons": "^6.8.5",
|
|
32
|
+
"@redis-ui/styles": "^14.13.0",
|
|
29
33
|
"react": "^17.0.0 || ^18.0.0",
|
|
30
34
|
"react-dom": "^17.0.0 || ^18.0.0",
|
|
31
35
|
"styled-components": "^5.0.0"
|
|
@@ -51,16 +55,13 @@
|
|
|
51
55
|
"react-hotkeys-hook": "^4.6.1",
|
|
52
56
|
"react-loading-skeleton": "^3.3.1",
|
|
53
57
|
"react-toastify": "10.0.4",
|
|
54
|
-
"type-fest": "^
|
|
58
|
+
"type-fest": "^5.4.4",
|
|
55
59
|
"virtua": "^0.36.3"
|
|
56
60
|
},
|
|
57
61
|
"devDependencies": {
|
|
58
|
-
"@redislabsdev/eslint-config-redis-ui": "^2.0.0",
|
|
59
62
|
"@types/date-fns": "^2.6.3",
|
|
60
63
|
"@types/lodash": "^4.17.15",
|
|
61
64
|
"@types/styled-components": "^5.1.26",
|
|
62
|
-
"eslint-plugin-jest": "27.2.1",
|
|
63
|
-
"eslint-plugin-jest-dom": "^4.0.3",
|
|
64
65
|
"vi-canvas-mock": "^1.0.0",
|
|
65
66
|
"vite-plugin-babel-macros": "^1.0.6",
|
|
66
67
|
"vite-plugin-css-injected-by-js": "^3.1.1"
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: redis-ui-components
|
|
3
|
+
description: Use Redis UI components from @redislabsdev/redis-ui-components. Provides usage references, props, and examples for each component. Use any time you need to write frontend code.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Redis UI Components
|
|
7
|
+
|
|
8
|
+
Package: `@redislabsdev/redis-ui-components`
|
|
9
|
+
|
|
10
|
+
## How to Use
|
|
11
|
+
|
|
12
|
+
Import components as named exports:
|
|
13
|
+
|
|
14
|
+
```tsx
|
|
15
|
+
import { Button, Modal, Select } from '@redislabsdev/redis-ui-components';
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Icons are imported separately:
|
|
19
|
+
|
|
20
|
+
```tsx
|
|
21
|
+
import { EditIcon, DeleteIcon } from '@redislabsdev/redis-ui-icons';
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Key Patterns
|
|
25
|
+
|
|
26
|
+
- **Composition**: Many components support a `Compose` pattern for advanced customization (e.g., `Select.Compose`, `Section.Compose`). Check the component reference for compose examples.
|
|
27
|
+
- **Compound Components**: Some components use `Object.assign` to attach sub-components (e.g., `Button.Icon`, `Modal.Content`, `Tabs.TabBar`). These sub-components share internal React context with their parent, so they must be rendered inside it.
|
|
28
|
+
- **Layouts**: Use `FlexGroup` and `FlexItem` for flex layouts instead of raw `div` with inline styles. `FlexGroup` supports `gap`, `direction`, `align`, `justify`, and `wrap` props. See the Layout references.
|
|
29
|
+
- **Typography**: Use `Typography.Heading`, `Typography.Body`, and `Typography.Code` for all text rendering instead of raw `<span>`, `<p>`, or `<h1>`–`<h6>` elements. See the [Typography](./references/Typography.md) reference.
|
|
30
|
+
- **Theming**: Components use `styled-components` and access theme via `useTheme()` from `@redislabsdev/redis-ui-styles`.
|
|
31
|
+
- **ForwardRef**: Most components support `ref` forwarding.
|
|
32
|
+
|
|
33
|
+
## Important
|
|
34
|
+
|
|
35
|
+
Always check the relevant component reference before using a component. The reference contains the correct props, variants, sizes, and usage examples.
|
|
36
|
+
|
|
37
|
+
## Component Reference
|
|
38
|
+
|
|
39
|
+
### Buttons
|
|
40
|
+
|
|
41
|
+
- [Button](./references/Button.md)
|
|
42
|
+
- [TextButton](./references/TextButton.md)
|
|
43
|
+
- [IconButton](./references/IconButton.md)
|
|
44
|
+
- [ActionIconButton](./references/ActionIconButton.md)
|
|
45
|
+
- [ToggleButton](./references/ToggleButton.md)
|
|
46
|
+
- [CopyToClipboardButton](./references/CopyToClipboardButton.md)
|
|
47
|
+
|
|
48
|
+
### Inputs
|
|
49
|
+
|
|
50
|
+
- [Input](./references/Input.md)
|
|
51
|
+
- [NumericInput](./references/NumericInput.md)
|
|
52
|
+
- [PasswordInput](./references/PasswordInput.md)
|
|
53
|
+
- [SearchInput](./references/SearchInput.md)
|
|
54
|
+
- [TextArea](./references/TextArea.md)
|
|
55
|
+
- [QuantityCounter](./references/QuantityCounter.md)
|
|
56
|
+
|
|
57
|
+
### Selects
|
|
58
|
+
|
|
59
|
+
- [Select](./references/Select.md)
|
|
60
|
+
- [AutoCompleteSelect](./references/AutoCompleteSelect.md)
|
|
61
|
+
- [MultiSelect](./references/MultiSelect.md)
|
|
62
|
+
|
|
63
|
+
### Form
|
|
64
|
+
|
|
65
|
+
- [Checkbox](./references/Checkbox.md)
|
|
66
|
+
- [RadioGroup](./references/RadioGroup.md)
|
|
67
|
+
- [Switch](./references/Switch.md)
|
|
68
|
+
- [FormField](./references/FormField.md)
|
|
69
|
+
- [DatePicker](./references/DatePicker.md)
|
|
70
|
+
|
|
71
|
+
### Layout
|
|
72
|
+
|
|
73
|
+
- [FlexGroup](./references/FlexGroup.md)
|
|
74
|
+
- [FlexItem](./references/FlexItem.md)
|
|
75
|
+
- [FlexDivider](./references/FlexDivider.md)
|
|
76
|
+
- [FlexSplit](./references/FlexSplit.md)
|
|
77
|
+
- [Card](./references/Card.md)
|
|
78
|
+
- [Section](./references/Section.md)
|
|
79
|
+
- [Breadcrumbs](./references/Breadcrumbs.md)
|
|
80
|
+
|
|
81
|
+
### Navigation
|
|
82
|
+
|
|
83
|
+
- [Tabs](./references/Tabs.md)
|
|
84
|
+
- [Stepper](./references/Stepper.md)
|
|
85
|
+
- [Pagination](./references/Pagination.md)
|
|
86
|
+
- [SideBar](./references/SideBar.md)
|
|
87
|
+
- [AppBar](./references/AppBar.md)
|
|
88
|
+
- [MidBar](./references/MidBar.md)
|
|
89
|
+
|
|
90
|
+
### Overlays
|
|
91
|
+
|
|
92
|
+
- [Modal](./references/Modal.md)
|
|
93
|
+
- [Drawer](./references/Drawer.md)
|
|
94
|
+
- [Tooltip](./references/Tooltip.md)
|
|
95
|
+
- [Popover](./references/Popover.md)
|
|
96
|
+
- [Menu](./references/Menu.md)
|
|
97
|
+
- [Toast](./references/Toast.md)
|
|
98
|
+
|
|
99
|
+
### Display
|
|
100
|
+
|
|
101
|
+
- [Badge](./references/Badge.md)
|
|
102
|
+
- [Chip](./references/Chip.md)
|
|
103
|
+
- [ChipList](./references/ChipList.md)
|
|
104
|
+
- [Label](./references/Label.md)
|
|
105
|
+
- [Link](./references/Link.md)
|
|
106
|
+
- [Loader](./references/Loader.md)
|
|
107
|
+
- [ProgressBar](./references/ProgressBar.md)
|
|
108
|
+
- [Skeleton](./references/Skeleton.md)
|
|
109
|
+
- [Typography](./references/Typography.md)
|
|
110
|
+
- [MoreInfoIcon](./references/MoreInfoIcon.md)
|
|
111
|
+
|
|
112
|
+
### Data
|
|
113
|
+
|
|
114
|
+
- [KeyValueList](./references/KeyValueList.md)
|
|
115
|
+
- [Filters](./references/Filters.md)
|
|
116
|
+
- [SearchBar](./references/SearchBar.md)
|
|
117
|
+
|
|
118
|
+
### Misc
|
|
119
|
+
|
|
120
|
+
- [BoxSelectionGroup](./references/BoxSelectionGroup.md)
|
|
121
|
+
- [CountryFlag](./references/CountryFlag.md)
|
|
122
|
+
- [ProfileIcon](./references/ProfileIcon.md)
|
|
123
|
+
- [Overflow](./references/Overflow.md)
|
|
124
|
+
- [AppSelectionMenu](./references/AppSelectionMenu.md)
|
|
125
|
+
- [ScreenReaderAnnounce](./references/ScreenReaderAnnounce.md)
|
|
126
|
+
- [ButtonGroup](./references/ButtonGroup.md)
|
|
127
|
+
- [Banner](./references/Banner.md)
|
|
128
|
+
- [Slider](./references/Slider.md)
|
|
@@ -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.
|