@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.
Files changed (85) hide show
  1. package/dist/HighlightedIcon/HighlightedIcon.cjs +26 -0
  2. package/dist/HighlightedIcon/HighlightedIcon.d.ts +3 -0
  3. package/dist/HighlightedIcon/HighlightedIcon.js +26 -0
  4. package/dist/HighlightedIcon/HighlightedIcon.style.cjs +49 -0
  5. package/dist/HighlightedIcon/HighlightedIcon.style.d.ts +5 -0
  6. package/dist/HighlightedIcon/HighlightedIcon.style.js +47 -0
  7. package/dist/HighlightedIcon/HighlightedIcon.types.d.ts +8 -0
  8. package/dist/HighlightedIcon/index.d.ts +3 -0
  9. package/dist/Stepper/Stepper.cjs +14 -5
  10. package/dist/Stepper/Stepper.d.ts +2 -0
  11. package/dist/Stepper/Stepper.js +14 -5
  12. package/dist/Stepper/Stepper.utils.cjs +12 -0
  13. package/dist/Stepper/Stepper.utils.d.ts +2 -0
  14. package/dist/Stepper/Stepper.utils.js +12 -0
  15. package/dist/Stepper/components/Compose/Compose.d.ts +1 -0
  16. package/dist/Stepper/components/Step/Step.cjs +2 -0
  17. package/dist/Stepper/components/Step/Step.d.ts +1 -0
  18. package/dist/Stepper/components/Step/Step.js +2 -0
  19. package/dist/Stepper/components/Step/components/Compose/Compose.cjs +2 -9
  20. package/dist/Stepper/components/Step/components/Compose/Compose.js +2 -9
  21. package/dist/Stepper/components/Step/components/Separator/Separator.cjs +15 -0
  22. package/dist/Stepper/components/Step/components/Separator/Separator.d.ts +3 -0
  23. package/dist/Stepper/components/Step/components/Separator/Separator.js +15 -0
  24. package/dist/Stepper/components/Step/components/Separator/Separator.style.cjs +24 -0
  25. package/dist/Stepper/components/Step/components/Separator/Separator.style.d.ts +1 -0
  26. package/dist/Stepper/components/Step/components/Separator/Separator.style.js +22 -0
  27. package/dist/Stepper/components/Step/components/Separator/Separator.types.d.ts +5 -0
  28. package/dist/index.cjs +4 -0
  29. package/dist/index.d.ts +1 -0
  30. package/dist/index.js +74 -70
  31. package/package.json +2 -2
  32. package/skills/redis-ui-components/SKILL.md +0 -2
  33. package/skills/redis-ui-components/references/ActionIconButton.md +96 -0
  34. package/skills/redis-ui-components/references/AppBar.md +161 -0
  35. package/skills/redis-ui-components/references/AppSelectionMenu.md +184 -0
  36. package/skills/redis-ui-components/references/AutoCompleteSelect.md +193 -0
  37. package/skills/redis-ui-components/references/Badge.md +77 -0
  38. package/skills/redis-ui-components/references/Banner.md +563 -0
  39. package/skills/redis-ui-components/references/BoxSelectionGroup.md +487 -0
  40. package/skills/redis-ui-components/references/Breadcrumbs.md +214 -0
  41. package/skills/redis-ui-components/references/ButtonGroup.md +126 -0
  42. package/skills/redis-ui-components/references/Card.md +56 -0
  43. package/skills/redis-ui-components/references/Checkbox.md +171 -0
  44. package/skills/redis-ui-components/references/Chip.md +154 -0
  45. package/skills/redis-ui-components/references/ChipList.md +307 -0
  46. package/skills/redis-ui-components/references/CopyToClipboardButton.md +47 -0
  47. package/skills/redis-ui-components/references/CountryFlag.md +57 -0
  48. package/skills/redis-ui-components/references/Drawer.md +298 -0
  49. package/skills/redis-ui-components/references/Filters.md +162 -0
  50. package/skills/redis-ui-components/references/FormField.md +678 -0
  51. package/skills/redis-ui-components/references/IconButton.md +63 -0
  52. package/skills/redis-ui-components/references/Input.md +295 -0
  53. package/skills/redis-ui-components/references/KeyValueList.md +501 -0
  54. package/skills/redis-ui-components/references/Label.md +238 -0
  55. package/skills/redis-ui-components/references/Link.md +402 -0
  56. package/skills/redis-ui-components/references/Loader.md +100 -0
  57. package/skills/redis-ui-components/references/Menu.md +988 -0
  58. package/skills/redis-ui-components/references/MidBar.md +358 -0
  59. package/skills/redis-ui-components/references/Modal.md +525 -0
  60. package/skills/redis-ui-components/references/MoreInfoIcon.md +119 -0
  61. package/skills/redis-ui-components/references/MultiSelect.md +558 -0
  62. package/skills/redis-ui-components/references/NumericInput.md +322 -0
  63. package/skills/redis-ui-components/references/Overflow.md +127 -0
  64. package/skills/redis-ui-components/references/Pagination.md +151 -0
  65. package/skills/redis-ui-components/references/PasswordInput.md +262 -0
  66. package/skills/redis-ui-components/references/Popover.md +868 -0
  67. package/skills/redis-ui-components/references/ProfileIcon.md +65 -0
  68. package/skills/redis-ui-components/references/ProgressBar.md +103 -0
  69. package/skills/redis-ui-components/references/QuantityCounter.md +555 -0
  70. package/skills/redis-ui-components/references/RadioGroup.md +265 -0
  71. package/skills/redis-ui-components/references/ScreenReaderAnnounce.md +147 -0
  72. package/skills/redis-ui-components/references/SearchBar.md +242 -0
  73. package/skills/redis-ui-components/references/SearchInput.md +213 -0
  74. package/skills/redis-ui-components/references/Section.md +349 -0
  75. package/skills/redis-ui-components/references/SideBar.md +468 -0
  76. package/skills/redis-ui-components/references/Slider.md +398 -0
  77. package/skills/redis-ui-components/references/Stepper.md +288 -0
  78. package/skills/redis-ui-components/references/Switch.md +193 -0
  79. package/skills/redis-ui-components/references/Tabs.md +383 -0
  80. package/skills/redis-ui-components/references/TextArea.md +139 -0
  81. package/skills/redis-ui-components/references/TextButton.md +217 -0
  82. package/skills/redis-ui-components/references/Toast.md +399 -0
  83. package/skills/redis-ui-components/references/ToggleButton.md +163 -0
  84. package/skills/redis-ui-components/references/Tooltip.md +636 -0
  85. package/skills/redis-ui-components/references/Typography.md +323 -0
@@ -0,0 +1,139 @@
1
+ # TextArea
2
+
3
+ A multiline text input with validation states, read-only mode, and `FormField` integration for external labels and helper text.
4
+
5
+ ## Import
6
+
7
+ ```tsx
8
+ import { TextArea } from '@redislabsdev/redis-ui-components';
9
+ ```
10
+
11
+ ## Props
12
+
13
+ | Prop | Type | Default | Description |
14
+ |------|------|---------|-------------|
15
+ | id | `string` | - | Custom id for the composed field and `FormField` association |
16
+ | className | `string` | - | Class name applied to the composed wrapper |
17
+ | style | `React.CSSProperties` | - | Inline style applied to the composed wrapper |
18
+ | height | `string` | - | Explicit height for the composed textarea; falls back to theme-based sizing when omitted |
19
+ | readOnly | `boolean` | `false` | Switches the field into read-only mode |
20
+ | variant | `'outline' \| 'underline'` | `'outline'` | Visual variant of the composed field |
21
+ | error | `React.ReactElement \| string` | - | Error content; enables error status and tooltip text |
22
+ | valid | `boolean` | - | Enables valid/success status |
23
+ | value | `string` | - | Controlled value |
24
+ | defaultValue | `string` | - | Uncontrolled initial value |
25
+ | onChange | `(value: string) => void` | - | Called when the text value changes |
26
+
27
+ The component also accepts native `TextareaHTMLAttributes<HTMLTextAreaElement>` props, excluding `children`, `defaultValue`, `value`, and `onChange`.
28
+
29
+ ## Sub-components
30
+
31
+ - `TextArea.Compose` - Composable wrapper that wires value, status, read-only rendering, and layout state.
32
+ - `TextArea.Tag` - The underlying textarea element used by the composed field.
33
+ - `TextArea.StatusIndicator` - Status icon shown for valid and error states.
34
+ - `TextArea.ReadonlyValue` - Read-only renderer used by the compose API.
35
+
36
+ ## Examples
37
+
38
+ ### Playground
39
+
40
+ ```tsx
41
+ import { TextArea } from '@redislabsdev/redis-ui-components';
42
+
43
+ const value = `A grasshopper spent the summer hopping about in the sun and singing to his heart's content. One day, an ant went hurrying by, looking very hot and weary. "Why are you working on such a lovely day?" said the grasshopper. "I'm collecting food for the winter," said the ant, "and I suggest you do the same."`;
44
+
45
+ <TextArea
46
+ placeholder="TextArea"
47
+ id="custom-id"
48
+ disabled={false}
49
+ defaultValue={value}
50
+ style={{ maxWidth: '44rem' }}
51
+ />
52
+ ```
53
+
54
+ ### Status
55
+
56
+ > Use `valid` to show the success state. Set `error` to show the error state and tooltip text. Error takes priority over valid.
57
+
58
+ ```tsx
59
+ import { TextArea } from '@redislabsdev/redis-ui-components';
60
+
61
+ <>
62
+ Valid status
63
+ <TextArea placeholder="Text Area" valid />
64
+ Error status
65
+ <TextArea placeholder="Text Area" error="Error message" />
66
+ </>
67
+ ```
68
+
69
+ ### DisabledAndReadonly
70
+
71
+ > `disabled` and `readOnly` switch the component into those modes. Read-only mode shows only the value and ignores the other indicators. Read-only takes priority over disabled.
72
+
73
+ ```tsx
74
+ import { TextArea } from '@redislabsdev/redis-ui-components';
75
+
76
+ const value = `A grasshopper spent the summer hopping about in the sun and singing to his heart's content. One day, an ant went hurrying by, looking very hot and weary. "Why are you working on such a lovely day?" said the grasshopper. "I'm collecting food for the winter," said the ant, "and I suggest you do the same."`;
77
+
78
+ <>
79
+ Disabled
80
+ <TextArea disabled />
81
+ Disabled with value
82
+ <TextArea disabled defaultValue={value} />
83
+ Disabled with indicators
84
+ <TextArea disabled defaultValue={value} error="Error message" />
85
+ Read only
86
+ <TextArea value={value} readOnly />
87
+ </>
88
+ ```
89
+
90
+ ### WithLabel
91
+
92
+ > TextArea does not include an internal label or other external decoration. Wrap it with `FormField` for those cases. If you pass a custom `id`, `FormField` uses it; otherwise it generates and connects one automatically. The custom `id` must start with a letter. `FormField` also passes status and some state down to the TextArea.
93
+
94
+ ```tsx
95
+ import { FormField, TextArea } from '@redislabsdev/redis-ui-components';
96
+
97
+ const value = `A grasshopper spent the summer hopping about in the sun and singing to his heart's content. One day, an ant went hurrying by, looking very hot and weary. "Why are you working on such a lovely day?" said the grasshopper. "I'm collecting food for the winter," said the ant, "and I suggest you do the same."`;
98
+
99
+ <>
100
+ <FormField label="FormField Label with custom id">
101
+ <TextArea placeholder="Text Area" id="custom-id" />
102
+ </FormField>
103
+ <FormField
104
+ label="FormField Label with auto-generated id"
105
+ additionalText="FormField additional text"
106
+ >
107
+ <TextArea placeholder="Text Area" />
108
+ </FormField>
109
+ <FormField
110
+ label="FormField Label with read-only mode"
111
+ additionalText="FormField additional text"
112
+ >
113
+ <TextArea value={value} readOnly />
114
+ </FormField>
115
+ </>
116
+ ```
117
+
118
+ ### Variants
119
+
120
+ ```tsx
121
+ import { FormField, TextArea } from '@redislabsdev/redis-ui-components';
122
+
123
+ <>
124
+ <FormField label="Outline (default)" additionalText="outline">
125
+ <TextArea placeholder="Text Area" />
126
+ </FormField>
127
+ <FormField label="Underline" additionalText="underline">
128
+ <TextArea placeholder="Text Area" variant="underline" />
129
+ </FormField>
130
+ </>
131
+ ```
132
+
133
+ ## Notes
134
+
135
+ - `error` overrides `valid` when both are present.
136
+ - `readOnly` overrides `disabled` when both are present.
137
+ - Use `FormField` when you need a label, helper text, or automatic id wiring.
138
+ - A custom `id` used with `FormField` must start with a letter.
139
+ - The component forwards refs to the underlying `<textarea>` element.
@@ -0,0 +1,217 @@
1
+ # TextButton
2
+
3
+ A text-styled button component with small and medium sizes, multiple visual variants, and inline variants for use inside body copy. It forwards refs and supports icon composition through `Button.Icon`.
4
+
5
+ ## Import
6
+ ```tsx
7
+ import { TextButton } from '@redislabsdev/redis-ui-components';
8
+ ```
9
+
10
+ > Icons used in examples are imported separately from `@redislabsdev/redis-ui-icons`.
11
+
12
+ ## Props
13
+ | Prop | Type | Default | Description |
14
+ |------|------|---------|-------------|
15
+ | size | `'medium' \| 'small'` | `'medium'` | Button size |
16
+ | variant | `'primary' \| 'destructive' \| 'secondary' \| 'upsell' \| 'primary-inline' \| 'destructive-inline' \| 'secondary-inline' \| 'upsell-inline'` | `'primary'` | Visual style variant |
17
+ | children | `React.ReactNode` | - | Button content |
18
+ | disabled | `boolean` | `false` | Disables the button and prevents interaction |
19
+ | onClick | `(e: React.MouseEvent<HTMLButtonElement>) => void` | - | Click handler |
20
+
21
+ The component also extends all native `ButtonHTMLAttributes<HTMLButtonElement>` props.
22
+
23
+ ## Examples
24
+
25
+ ### Playground
26
+ ```tsx
27
+ import { TextButton } from '@redislabsdev/redis-ui-components';
28
+
29
+ <TextButton size="medium" variant="primary" disabled={false}>
30
+ Text Button
31
+ </TextButton>
32
+ ```
33
+
34
+ ### Sizes
35
+ ```tsx
36
+ import { TextButton, Button } from '@redislabsdev/redis-ui-components';
37
+ import { ContractIcon } from '@redislabsdev/redis-ui-icons';
38
+
39
+ <>
40
+ <TextButton size="small">
41
+ <Button.Icon icon={ContractIcon} />
42
+ Primary small
43
+ </TextButton>
44
+ <TextButton size="small" variant="destructive">
45
+ <Button.Icon icon={ContractIcon} />
46
+ Destructive small
47
+ </TextButton>
48
+ <TextButton size="small" variant="secondary">
49
+ <Button.Icon icon={ContractIcon} />
50
+ Secondary small
51
+ </TextButton>
52
+ <TextButton size="small" variant="upsell">
53
+ <Button.Icon icon={ContractIcon} />
54
+ Upsell small
55
+ </TextButton>
56
+ <TextButton size="small" variant="primary-inline">
57
+ <Button.Icon icon={ContractIcon} />
58
+ Primary Inline small
59
+ </TextButton>
60
+ <TextButton size="small" variant="destructive-inline">
61
+ <Button.Icon icon={ContractIcon} />
62
+ Destructive Inline small
63
+ </TextButton>
64
+ <TextButton size="small" variant="secondary-inline">
65
+ <Button.Icon icon={ContractIcon} />
66
+ Secondary Inline small
67
+ </TextButton>
68
+ <TextButton size="small" variant="upsell-inline">
69
+ <Button.Icon icon={ContractIcon} />
70
+ Upsell Inline small
71
+ </TextButton>
72
+ <TextButton size="medium">
73
+ <Button.Icon icon={ContractIcon} />
74
+ Primary medium
75
+ </TextButton>
76
+ <TextButton size="medium" variant="destructive">
77
+ <Button.Icon icon={ContractIcon} />
78
+ Destructive medium
79
+ </TextButton>
80
+ <TextButton size="medium" variant="secondary">
81
+ <Button.Icon icon={ContractIcon} />
82
+ Secondary medium
83
+ </TextButton>
84
+ <TextButton size="medium" variant="upsell">
85
+ <Button.Icon icon={ContractIcon} />
86
+ Upsell medium
87
+ </TextButton>
88
+ <TextButton size="medium" variant="primary-inline">
89
+ <Button.Icon icon={ContractIcon} />
90
+ Primary Inline medium
91
+ </TextButton>
92
+ <TextButton size="medium" variant="destructive-inline">
93
+ <Button.Icon icon={ContractIcon} />
94
+ Destructive Inline medium
95
+ </TextButton>
96
+ <TextButton size="medium" variant="secondary-inline">
97
+ <Button.Icon icon={ContractIcon} />
98
+ Secondary Inline medium
99
+ </TextButton>
100
+ <TextButton size="medium" variant="upsell-inline">
101
+ <Button.Icon icon={ContractIcon} />
102
+ Upsell Inline medium
103
+ </TextButton>
104
+ </>
105
+ ```
106
+
107
+ ### Variants
108
+ > 8 total variants are supported: primary, destructive, secondary, upsell, and their inline counterparts. The default is `primary`.
109
+ ```tsx
110
+ import { TextButton } from '@redislabsdev/redis-ui-components';
111
+
112
+ <>
113
+ <TextButton>Primary</TextButton>
114
+ <TextButton variant="destructive">Destructive</TextButton>
115
+ <TextButton variant="secondary">Secondary</TextButton>
116
+ <TextButton variant="upsell">Upsell</TextButton>
117
+ <TextButton variant="primary-inline">Primary Inline</TextButton>
118
+ <TextButton variant="destructive-inline">Destructive Inline</TextButton>
119
+ <TextButton variant="secondary-inline">Secondary Inline</TextButton>
120
+ <TextButton variant="upsell-inline">Upsell Inline</TextButton>
121
+ </>
122
+ ```
123
+
124
+ ### Disabled
125
+ > Buttons can be disabled by setting the `disabled` prop to `true`. This will disable any hover styles and prevent click events from firing.
126
+ ```tsx
127
+ import { TextButton } from '@redislabsdev/redis-ui-components';
128
+
129
+ <>
130
+ <TextButton disabled>Primary</TextButton>
131
+ <TextButton disabled variant="destructive">
132
+ Destructive
133
+ </TextButton>
134
+ <TextButton disabled variant="secondary">
135
+ Secondary
136
+ </TextButton>
137
+ <TextButton disabled variant="upsell">
138
+ Upsell
139
+ </TextButton>
140
+ <TextButton disabled variant="primary-inline">
141
+ Primary Inline
142
+ </TextButton>
143
+ <TextButton disabled variant="destructive-inline">
144
+ Destructive Inline
145
+ </TextButton>
146
+ <TextButton disabled variant="secondary-inline">
147
+ Secondary Inline
148
+ </TextButton>
149
+ <TextButton disabled variant="upsell-inline">
150
+ Upsell Inline
151
+ </TextButton>
152
+ </>
153
+ ```
154
+
155
+ ### WithIcon
156
+ > To add an icon to a TextButton, use the `Button.Icon` component. This component can be placed anywhere inside the `TextButton` component. It will automatically be sized and colored to match its parent TextButton.
157
+ >
158
+ > Do not use this component if you need a round icon-only Button. Instead, use the IconButton or ActionIconButton components.
159
+ >
160
+ > If you need to pass props to the icon element you should declare it as a separate component.
161
+ >
162
+ > Do not declare components inside other components (like an inline arrow function or any other way), or at least wrap them in `useMemo`, otherwise it will cause re-render of the element on every render of the parent component.
163
+ ```tsx
164
+ import { TextButton, Button } from '@redislabsdev/redis-ui-components';
165
+ import { ContractIcon, MarketplaceIcon, ShardIcon } from '@redislabsdev/redis-ui-icons';
166
+
167
+ <>
168
+ <TextButton>
169
+ <Button.Icon icon={ContractIcon} />
170
+ Left Icon
171
+ </TextButton>
172
+ <TextButton variant="primary-inline">
173
+ Right Icon
174
+ <Button.Icon icon={MarketplaceIcon} />
175
+ </TextButton>
176
+ <TextButton>
177
+ <Button.Icon icon={ShardIcon} />
178
+ </TextButton>
179
+ <TextButton>
180
+ <Button.Icon icon={ShardIcon} customSize="2.8rem" />
181
+ Custom icon size
182
+ </TextButton>
183
+ <TextButton variant="destructive">
184
+ <Button.Icon icon={ContractIcon} />
185
+ Destructive
186
+ </TextButton>
187
+ <TextButton variant="upsell">
188
+ <Button.Icon icon={ContractIcon} />
189
+ Upsell
190
+ </TextButton>
191
+ <TextButton variant="destructive-inline">
192
+ <Button.Icon icon={ContractIcon} />
193
+ Destructive Inline
194
+ </TextButton>
195
+ <TextButton variant="upsell-inline">
196
+ <Button.Icon icon={ContractIcon} />
197
+ Upsell Inline
198
+ </TextButton>
199
+ </>
200
+ ```
201
+
202
+ ### Inline
203
+ > Inline text buttons are designed to be used within text content. They have no padding or background and inherit the line height from their parent. Primary, destructive, and upsell variants are available.
204
+ ```tsx
205
+ import { TextButton } from '@redislabsdev/redis-ui-components';
206
+
207
+ <div style={{ fontSize: '1.4rem', lineHeight: '2rem' }}>
208
+ This is a paragraph with an{' '}
209
+ <TextButton variant="primary-inline">inline primary button</TextButton>, an{' '}
210
+ <TextButton variant="destructive-inline">inline destructive button</TextButton>, and an{' '}
211
+ <TextButton variant="upsell-inline">inline upsell button</TextButton> embedded within the text.
212
+ </div>
213
+ ```
214
+
215
+ ## Notes
216
+ - The button renders with `type="button"` by default.
217
+ - `TextButton` forwards refs to the underlying `<button>` element.