@redis-ui/components 43.0.2 → 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.
- package/dist/HighlightedIcon/HighlightedIcon.cjs +26 -0
- package/dist/HighlightedIcon/HighlightedIcon.d.ts +3 -0
- package/dist/HighlightedIcon/HighlightedIcon.js +26 -0
- package/dist/HighlightedIcon/HighlightedIcon.style.cjs +49 -0
- package/dist/HighlightedIcon/HighlightedIcon.style.d.ts +5 -0
- package/dist/HighlightedIcon/HighlightedIcon.style.js +47 -0
- package/dist/HighlightedIcon/HighlightedIcon.types.d.ts +8 -0
- package/dist/HighlightedIcon/index.d.ts +3 -0
- package/dist/Stepper/Stepper.cjs +14 -5
- package/dist/Stepper/Stepper.d.ts +2 -0
- package/dist/Stepper/Stepper.js +14 -5
- package/dist/Stepper/Stepper.utils.cjs +12 -0
- package/dist/Stepper/Stepper.utils.d.ts +2 -0
- package/dist/Stepper/Stepper.utils.js +12 -0
- package/dist/Stepper/components/Compose/Compose.d.ts +1 -0
- package/dist/Stepper/components/Step/Step.cjs +2 -0
- package/dist/Stepper/components/Step/Step.d.ts +1 -0
- package/dist/Stepper/components/Step/Step.js +2 -0
- package/dist/Stepper/components/Step/components/Compose/Compose.cjs +2 -9
- package/dist/Stepper/components/Step/components/Compose/Compose.js +2 -9
- package/dist/Stepper/components/Step/components/Separator/Separator.cjs +15 -0
- package/dist/Stepper/components/Step/components/Separator/Separator.d.ts +3 -0
- package/dist/Stepper/components/Step/components/Separator/Separator.js +15 -0
- package/dist/Stepper/components/Step/components/Separator/Separator.style.cjs +24 -0
- package/dist/Stepper/components/Step/components/Separator/Separator.style.d.ts +1 -0
- package/dist/Stepper/components/Step/components/Separator/Separator.style.js +22 -0
- package/dist/Stepper/components/Step/components/Separator/Separator.types.d.ts +5 -0
- package/dist/index.cjs +4 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +74 -70
- package/package.json +2 -2
- package/skills/redis-ui-components/SKILL.md +0 -2
- package/skills/redis-ui-components/references/ActionIconButton.md +96 -0
- package/skills/redis-ui-components/references/AppBar.md +161 -0
- package/skills/redis-ui-components/references/AppSelectionMenu.md +184 -0
- package/skills/redis-ui-components/references/AutoCompleteSelect.md +193 -0
- package/skills/redis-ui-components/references/Badge.md +77 -0
- package/skills/redis-ui-components/references/Banner.md +563 -0
- package/skills/redis-ui-components/references/BoxSelectionGroup.md +487 -0
- package/skills/redis-ui-components/references/Breadcrumbs.md +214 -0
- package/skills/redis-ui-components/references/ButtonGroup.md +126 -0
- package/skills/redis-ui-components/references/Card.md +56 -0
- package/skills/redis-ui-components/references/Checkbox.md +171 -0
- package/skills/redis-ui-components/references/Chip.md +154 -0
- package/skills/redis-ui-components/references/ChipList.md +307 -0
- package/skills/redis-ui-components/references/CopyToClipboardButton.md +47 -0
- package/skills/redis-ui-components/references/CountryFlag.md +57 -0
- package/skills/redis-ui-components/references/Drawer.md +298 -0
- package/skills/redis-ui-components/references/Filters.md +162 -0
- package/skills/redis-ui-components/references/FormField.md +678 -0
- package/skills/redis-ui-components/references/IconButton.md +63 -0
- package/skills/redis-ui-components/references/Input.md +295 -0
- package/skills/redis-ui-components/references/KeyValueList.md +501 -0
- package/skills/redis-ui-components/references/Label.md +238 -0
- package/skills/redis-ui-components/references/Link.md +402 -0
- package/skills/redis-ui-components/references/Loader.md +100 -0
- package/skills/redis-ui-components/references/Menu.md +988 -0
- package/skills/redis-ui-components/references/MidBar.md +358 -0
- package/skills/redis-ui-components/references/Modal.md +525 -0
- package/skills/redis-ui-components/references/MoreInfoIcon.md +119 -0
- package/skills/redis-ui-components/references/MultiSelect.md +558 -0
- package/skills/redis-ui-components/references/NumericInput.md +322 -0
- package/skills/redis-ui-components/references/Overflow.md +127 -0
- package/skills/redis-ui-components/references/Pagination.md +151 -0
- package/skills/redis-ui-components/references/PasswordInput.md +262 -0
- package/skills/redis-ui-components/references/Popover.md +868 -0
- package/skills/redis-ui-components/references/ProfileIcon.md +65 -0
- package/skills/redis-ui-components/references/ProgressBar.md +103 -0
- package/skills/redis-ui-components/references/QuantityCounter.md +555 -0
- package/skills/redis-ui-components/references/RadioGroup.md +265 -0
- package/skills/redis-ui-components/references/ScreenReaderAnnounce.md +147 -0
- package/skills/redis-ui-components/references/SearchBar.md +242 -0
- package/skills/redis-ui-components/references/SearchInput.md +213 -0
- package/skills/redis-ui-components/references/Section.md +349 -0
- package/skills/redis-ui-components/references/SideBar.md +468 -0
- package/skills/redis-ui-components/references/Slider.md +398 -0
- package/skills/redis-ui-components/references/Stepper.md +288 -0
- package/skills/redis-ui-components/references/Switch.md +193 -0
- package/skills/redis-ui-components/references/Tabs.md +383 -0
- package/skills/redis-ui-components/references/TextArea.md +139 -0
- package/skills/redis-ui-components/references/TextButton.md +217 -0
- package/skills/redis-ui-components/references/Toast.md +399 -0
- package/skills/redis-ui-components/references/ToggleButton.md +163 -0
- package/skills/redis-ui-components/references/Tooltip.md +636 -0
- package/skills/redis-ui-components/references/Typography.md +323 -0
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# ProfileIcon
|
|
2
|
+
|
|
3
|
+
Avatar-style icon that renders initials from a full name and uses email to derive a stable color palette.
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import { ProfileIcon } from '@redislabsdev/redis-ui-components';
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Props
|
|
12
|
+
|
|
13
|
+
| Prop | Type | Default | Description |
|
|
14
|
+
|------|------|---------|-------------|
|
|
15
|
+
| fullName | `string` | - | Name used to derive the initials shown inside the icon. |
|
|
16
|
+
| size | `'S' \| 'M' \| 'L' \| AnyOtherString \| number` | required | Icon size. Supports Redis UI sizes or a custom rem value. |
|
|
17
|
+
| email | `string` | - | Email used to derive the icon colors. The same email resolves to the same color set. |
|
|
18
|
+
| other div props | `React.HTMLAttributes<HTMLDivElement>` | - | Standard `div` props forwarded to the rendered wrapper. |
|
|
19
|
+
|
|
20
|
+
## Examples
|
|
21
|
+
|
|
22
|
+
### Basic Usage
|
|
23
|
+
|
|
24
|
+
```tsx
|
|
25
|
+
import { ProfileIcon } from '@redislabsdev/redis-ui-components';
|
|
26
|
+
|
|
27
|
+
<ProfileIcon fullName="John Smith" email="john.smith@redis.com" size="L" />
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### OptionalProperties
|
|
31
|
+
|
|
32
|
+
> `ProfileIcon` can be rendered with only the `size` prop. `fullName` is used to generate the initials, and `email` is used to generate the colors. The same email always resolves to the same colors.
|
|
33
|
+
|
|
34
|
+
```tsx
|
|
35
|
+
import { ProfileIcon } from '@redislabsdev/redis-ui-components';
|
|
36
|
+
|
|
37
|
+
<>
|
|
38
|
+
<ProfileIcon size="M" />
|
|
39
|
+
<ProfileIcon size="M" email="john.smith@redis.com" />
|
|
40
|
+
<ProfileIcon size="M" fullName="John Smith" />
|
|
41
|
+
<ProfileIcon size="M" email="john.smith@redis.com" fullName="John Smith" />
|
|
42
|
+
<ProfileIcon size="M" email="Tianna.Carney@redis.org" fullName="Tianna Carney" />
|
|
43
|
+
</>
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Sizes
|
|
47
|
+
|
|
48
|
+
> `size` can be a t-shirt size or a custom rem value.
|
|
49
|
+
|
|
50
|
+
```tsx
|
|
51
|
+
import { ProfileIcon } from '@redislabsdev/redis-ui-components';
|
|
52
|
+
|
|
53
|
+
<>
|
|
54
|
+
<ProfileIcon size="S" email="john.smith@redis.io" fullName="John Smith" />
|
|
55
|
+
<ProfileIcon size="M" email="john.smith@redis.io" fullName="John Smith" />
|
|
56
|
+
<ProfileIcon size="L" email="john.smith@redis.io" fullName="John Smith" />
|
|
57
|
+
<ProfileIcon size="5rem" email="john.smith@redis.io" fullName="John Smith" />
|
|
58
|
+
</>
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Notes
|
|
62
|
+
|
|
63
|
+
- `fullName` controls the initials rendered inside the icon.
|
|
64
|
+
- `email` controls the color group selection and keeps the same palette for the same address.
|
|
65
|
+
- `size` accepts `S`, `M`, `L`, or a custom rem value.
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# ProgressBar
|
|
2
|
+
|
|
3
|
+
A percentage progress bar with color variants, optional text positioning, and animated value updates.
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import { ProgressBar } from '@redislabsdev/redis-ui-components';
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Props
|
|
12
|
+
|
|
13
|
+
| Prop | Type | Default | Description |
|
|
14
|
+
|------|------|---------|-------------|
|
|
15
|
+
| value | `number` | required | Current progress value; values are clamped to `0`-`100` |
|
|
16
|
+
| textPosition | `'top' \| 'left' \| 'bottom' \| 'right'` | - | Position of the percentage text |
|
|
17
|
+
| size | `'M'` | `'M'` | Progress bar size |
|
|
18
|
+
| variant | `'normal' \| 'danger' \| 'attention' \| 'success'` | `'normal'` | Visual color variant |
|
|
19
|
+
| textIndicationPosition | `'top' \| 'left' \| 'bottom' \| 'right'` | - | Deprecated alias for `textPosition` |
|
|
20
|
+
|
|
21
|
+
## Examples
|
|
22
|
+
|
|
23
|
+
### Playground
|
|
24
|
+
|
|
25
|
+
```tsx
|
|
26
|
+
import { ProgressBar } from '@redislabsdev/redis-ui-components';
|
|
27
|
+
|
|
28
|
+
<ProgressBar value={25} />
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
### Variants
|
|
32
|
+
|
|
33
|
+
> Use `variant` to apply a color scheme.
|
|
34
|
+
|
|
35
|
+
```tsx
|
|
36
|
+
import { ProgressBar } from '@redislabsdev/redis-ui-components';
|
|
37
|
+
|
|
38
|
+
<>
|
|
39
|
+
<ProgressBar value={30} />
|
|
40
|
+
<ProgressBar variant="attention" value={50} />
|
|
41
|
+
<ProgressBar variant="danger" value={70} />
|
|
42
|
+
<ProgressBar variant="success" value={90} />
|
|
43
|
+
</>
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### TextPositions
|
|
47
|
+
|
|
48
|
+
> Set `textPosition` to align the percentage text relative to the bar. If `textPosition` is not set, the text remains hidden.
|
|
49
|
+
|
|
50
|
+
```tsx
|
|
51
|
+
import { ProgressBar } from '@redislabsdev/redis-ui-components';
|
|
52
|
+
|
|
53
|
+
<>
|
|
54
|
+
<ProgressBar value={50} />
|
|
55
|
+
<ProgressBar textPosition="top" value={50} />
|
|
56
|
+
<ProgressBar textPosition="bottom" value={50} />
|
|
57
|
+
<ProgressBar textPosition="left" value={50} />
|
|
58
|
+
<ProgressBar textPosition="right" value={50} />
|
|
59
|
+
</>
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### TextFormatting
|
|
63
|
+
|
|
64
|
+
> Fractional values are rounded to one decimal place when displayed.
|
|
65
|
+
|
|
66
|
+
```tsx
|
|
67
|
+
import { ProgressBar } from '@redislabsdev/redis-ui-components';
|
|
68
|
+
|
|
69
|
+
<>
|
|
70
|
+
<ProgressBar textPosition="top" value={5.12345} />
|
|
71
|
+
<ProgressBar textPosition="top" value={30.0} />
|
|
72
|
+
</>
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### Animation
|
|
76
|
+
|
|
77
|
+
> Changing `value` animates the progress bar.
|
|
78
|
+
|
|
79
|
+
```tsx
|
|
80
|
+
import { useState } from 'react';
|
|
81
|
+
import { ProgressBar, RadioGroup } from '@redislabsdev/redis-ui-components';
|
|
82
|
+
|
|
83
|
+
function Example() {
|
|
84
|
+
const [value, setValue] = useState(0);
|
|
85
|
+
|
|
86
|
+
return (
|
|
87
|
+
<>
|
|
88
|
+
<ProgressBar value={value} textPosition="right" />
|
|
89
|
+
<RadioGroup.Compose onChange={(newValue) => setValue(parseInt(newValue, 10))} defaultValue="0%">
|
|
90
|
+
<RadioGroup.Item value="0%" defaultChecked />
|
|
91
|
+
<RadioGroup.Item value="50%" />
|
|
92
|
+
<RadioGroup.Item value="100%" />
|
|
93
|
+
</RadioGroup.Compose>
|
|
94
|
+
</>
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
## Notes
|
|
100
|
+
|
|
101
|
+
- `value` is clamped to the `0`-`100` range and displayed with one decimal when needed.
|
|
102
|
+
- `textIndicationPosition` is deprecated in favor of `textPosition`.
|
|
103
|
+
- The text is hidden entirely when no text position is provided.
|