@mezzanine-ui/react 1.0.0-beta.6 → 1.0.0-beta.7
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/Accordion/Accordion.d.ts +23 -1
- package/Accordion/Accordion.js +59 -11
- package/Accordion/AccordionActions.d.ts +13 -0
- package/Accordion/AccordionActions.js +24 -0
- package/Accordion/AccordionContent.d.ts +9 -0
- package/Accordion/{AccordionDetails.js → AccordionContent.js} +4 -6
- package/Accordion/AccordionControlContext.d.ts +2 -2
- package/Accordion/AccordionGroup.d.ts +10 -0
- package/Accordion/AccordionGroup.js +26 -0
- package/Accordion/AccordionTitle.d.ts +14 -0
- package/Accordion/AccordionTitle.js +56 -0
- package/Accordion/index.d.ts +8 -4
- package/Accordion/index.js +4 -2
- package/AutoComplete/AutoComplete.d.ts +20 -6
- package/AutoComplete/AutoComplete.js +118 -30
- package/Backdrop/Backdrop.js +15 -19
- package/Calendar/CalendarDays.js +1 -1
- package/Card/BaseCard.d.ts +11 -0
- package/Card/BaseCard.js +48 -0
- package/Card/BaseCardSkeleton.d.ts +14 -0
- package/Card/BaseCardSkeleton.js +18 -0
- package/Card/CardGroup.d.ts +47 -0
- package/Card/CardGroup.js +147 -0
- package/Card/FourThumbnailCard.d.ts +14 -0
- package/Card/FourThumbnailCard.js +73 -0
- package/Card/FourThumbnailCardSkeleton.d.ts +14 -0
- package/Card/FourThumbnailCardSkeleton.js +20 -0
- package/Card/QuickActionCard.d.ts +12 -0
- package/Card/QuickActionCard.js +23 -0
- package/Card/QuickActionCardSkeleton.d.ts +14 -0
- package/Card/QuickActionCardSkeleton.js +18 -0
- package/Card/SingleThumbnailCard.d.ts +13 -0
- package/Card/SingleThumbnailCard.js +44 -0
- package/Card/SingleThumbnailCardSkeleton.d.ts +19 -0
- package/Card/SingleThumbnailCardSkeleton.js +18 -0
- package/Card/Thumbnail.d.ts +12 -0
- package/Card/Thumbnail.js +18 -0
- package/Card/ThumbnailCardInfo.d.ts +34 -0
- package/Card/ThumbnailCardInfo.js +43 -0
- package/Card/index.d.ts +43 -4
- package/Card/index.js +19 -2
- package/Card/typings.d.ts +442 -0
- package/Checkbox/Checkbox.d.ts +8 -0
- package/Checkbox/Checkbox.js +3 -2
- package/Checkbox/CheckboxGroup.js +1 -1
- package/ContentHeader/ContentHeader.d.ts +22 -70
- package/ContentHeader/ContentHeader.js +1 -1
- package/ContentHeader/ContentHeaderResponsive.d.ts +9 -0
- package/ContentHeader/ContentHeaderResponsive.js +7 -0
- package/ContentHeader/utils.d.ts +3 -3
- package/ContentHeader/utils.js +66 -20
- package/Cropper/Cropper.d.ts +66 -0
- package/Cropper/Cropper.js +115 -0
- package/Cropper/CropperElement.d.ts +10 -0
- package/Cropper/CropperElement.js +892 -0
- package/Cropper/index.d.ts +18 -0
- package/Cropper/index.js +8 -0
- package/Cropper/tools.d.ts +90 -0
- package/Cropper/tools.js +143 -0
- package/Cropper/typings.d.ts +69 -0
- package/Cropper/utils/cropper-calculations.d.ts +39 -0
- package/Cropper/utils/cropper-calculations.js +95 -0
- package/DateTimePicker/DateTimePicker.d.ts +1 -1
- package/DateTimePicker/DateTimePicker.js +14 -1
- package/Dropdown/Dropdown.d.ts +7 -1
- package/Dropdown/Dropdown.js +31 -14
- package/Dropdown/DropdownItem.d.ts +7 -1
- package/Dropdown/DropdownItem.js +36 -6
- package/Dropdown/DropdownItemCard.js +2 -1
- package/FloatingButton/FloatingButton.d.ts +21 -0
- package/FloatingButton/FloatingButton.js +18 -0
- package/FloatingButton/index.d.ts +2 -0
- package/FloatingButton/index.js +1 -0
- package/Form/FormField.d.ts +21 -10
- package/Form/FormField.js +12 -4
- package/Input/Input.js +9 -2
- package/Message/Message.js +1 -1
- package/MultipleDatePicker/MultipleDatePicker.js +2 -2
- package/Navigation/NavigationHeader.js +1 -1
- package/Picker/FormattedInput.d.ts +1 -1
- package/Picker/FormattedInput.js +2 -1
- package/Picker/PickerTriggerWithSeparator.d.ts +10 -0
- package/Picker/PickerTriggerWithSeparator.js +2 -2
- package/Picker/useDateInputFormatter.d.ts +6 -0
- package/Picker/useDateInputFormatter.js +4 -1
- package/Select/Select.d.ts +2 -8
- package/Select/Select.js +12 -33
- package/Select/SelectTrigger.js +21 -7
- package/Select/index.d.ts +0 -4
- package/Select/index.js +0 -2
- package/Select/typings.d.ts +0 -4
- package/Select/useSelectTriggerTags.d.ts +1 -1
- package/Select/useSelectTriggerTags.js +9 -6
- package/Separator/Separator.d.ts +14 -0
- package/Separator/Separator.js +17 -0
- package/Separator/index.d.ts +2 -0
- package/Separator/index.js +1 -0
- package/Table/utils/useTableRowSelection.js +6 -0
- package/Tag/TagGroup.d.ts +4 -2
- package/Tag/TagGroup.js +7 -4
- package/TextField/TextField.d.ts +1 -1
- package/TextField/TextField.js +63 -9
- package/TimePanel/TimePanelColumn.js +19 -12
- package/index.d.ts +27 -28
- package/index.js +23 -25
- package/package.json +4 -4
- package/Accordion/AccordionDetails.d.ts +0 -9
- package/Accordion/AccordionSummary.d.ts +0 -18
- package/Accordion/AccordionSummary.js +0 -51
- package/Alert/Alert.d.ts +0 -20
- package/Alert/Alert.js +0 -18
- package/Alert/index.d.ts +0 -3
- package/Alert/index.js +0 -1
- package/Card/Card.d.ts +0 -51
- package/Card/Card.js +0 -20
- package/Card/CardActions.d.ts +0 -34
- package/Card/CardActions.js +0 -15
- package/ConfirmActions/ConfirmActions.d.ts +0 -46
- package/ConfirmActions/ConfirmActions.js +0 -15
- package/ConfirmActions/index.d.ts +0 -2
- package/ConfirmActions/index.js +0 -1
- package/Select/Option.d.ts +0 -18
- package/Select/Option.js +0 -45
- package/Select/TreeSelect.d.ts +0 -72
- package/Select/TreeSelect.js +0 -205
- package/Tree/Tree.d.ts +0 -70
- package/Tree/Tree.js +0 -139
- package/Tree/TreeNode.d.ts +0 -40
- package/Tree/TreeNode.js +0 -50
- package/Tree/TreeNodeList.d.ts +0 -24
- package/Tree/TreeNodeList.js +0 -28
- package/Tree/getTreeNodeEntities.d.ts +0 -11
- package/Tree/getTreeNodeEntities.js +0 -92
- package/Tree/index.d.ts +0 -13
- package/Tree/index.js +0 -7
- package/Tree/toggleValue.d.ts +0 -4
- package/Tree/toggleValue.js +0 -19
- package/Tree/traverseTree.d.ts +0 -2
- package/Tree/traverseTree.js +0 -11
- package/Tree/typings.d.ts +0 -16
- package/Tree/useTreeExpandedValue.d.ts +0 -14
- package/Tree/useTreeExpandedValue.js +0 -33
|
@@ -0,0 +1,442 @@
|
|
|
1
|
+
import { ChangeEventHandler, JSXElementConstructor, MouseEvent, ReactNode } from 'react';
|
|
2
|
+
import { IconDefinition } from '@mezzanine-ui/icons';
|
|
3
|
+
import { DropdownOption } from '@mezzanine-ui/core/dropdown/dropdown';
|
|
4
|
+
import { ToggleSize } from '@mezzanine-ui/core/toggle';
|
|
5
|
+
/**
|
|
6
|
+
* Allowed component types for BaseCard
|
|
7
|
+
*/
|
|
8
|
+
export type BaseCardComponent = 'div' | 'a' | JSXElementConstructor<any>;
|
|
9
|
+
/**
|
|
10
|
+
* Action button variant options (limited to text-link variants)
|
|
11
|
+
*/
|
|
12
|
+
export type BaseCardActionVariant = 'base-text-link' | 'destructive-text-link';
|
|
13
|
+
/**
|
|
14
|
+
* BaseCard type discriminator
|
|
15
|
+
*/
|
|
16
|
+
export type BaseCardType = 'default' | 'action' | 'overflow' | 'toggle';
|
|
17
|
+
/**
|
|
18
|
+
* Common props shared across all BaseCard types
|
|
19
|
+
*/
|
|
20
|
+
export interface BaseCardPropsCommon {
|
|
21
|
+
/**
|
|
22
|
+
* Custom class name for the card
|
|
23
|
+
*/
|
|
24
|
+
className?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Content to render in the card content area
|
|
27
|
+
*/
|
|
28
|
+
children?: ReactNode;
|
|
29
|
+
/**
|
|
30
|
+
* Whether the card is disabled
|
|
31
|
+
* @default false
|
|
32
|
+
*/
|
|
33
|
+
disabled?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Whether the card is read-only (non-interactive)
|
|
36
|
+
* @default false
|
|
37
|
+
*/
|
|
38
|
+
readOnly?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Card header title
|
|
41
|
+
*/
|
|
42
|
+
title?: string;
|
|
43
|
+
/**
|
|
44
|
+
* Card header description
|
|
45
|
+
*/
|
|
46
|
+
description?: string;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Props for BaseCard with type="default" (no action in header)
|
|
50
|
+
*/
|
|
51
|
+
export interface BaseCardDefaultProps extends BaseCardPropsCommon {
|
|
52
|
+
type?: 'default';
|
|
53
|
+
actionName?: never;
|
|
54
|
+
actionVariant?: never;
|
|
55
|
+
onActionClick?: never;
|
|
56
|
+
options?: never;
|
|
57
|
+
onOptionSelect?: never;
|
|
58
|
+
checked?: never;
|
|
59
|
+
defaultChecked?: never;
|
|
60
|
+
onToggleChange?: never;
|
|
61
|
+
toggleSize?: never;
|
|
62
|
+
toggleLabel?: never;
|
|
63
|
+
toggleSupportingText?: never;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Props for BaseCard with type="action" (Button in header action area)
|
|
67
|
+
*/
|
|
68
|
+
export interface BaseCardActionProps extends BaseCardPropsCommon {
|
|
69
|
+
type: 'action';
|
|
70
|
+
/**
|
|
71
|
+
* Label text for the action button
|
|
72
|
+
*/
|
|
73
|
+
actionName: string;
|
|
74
|
+
/**
|
|
75
|
+
* Variant for the action button (limited to text-link variants)
|
|
76
|
+
* @default 'base-text-link'
|
|
77
|
+
*/
|
|
78
|
+
actionVariant?: BaseCardActionVariant;
|
|
79
|
+
/**
|
|
80
|
+
* Click handler for the action button
|
|
81
|
+
*/
|
|
82
|
+
onActionClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
83
|
+
options?: never;
|
|
84
|
+
onOptionSelect?: never;
|
|
85
|
+
checked?: never;
|
|
86
|
+
defaultChecked?: never;
|
|
87
|
+
onToggleChange?: never;
|
|
88
|
+
toggleSize?: never;
|
|
89
|
+
toggleLabel?: never;
|
|
90
|
+
toggleSupportingText?: never;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Props for BaseCard with type="overflow" (Dropdown in header action area)
|
|
94
|
+
*/
|
|
95
|
+
export interface BaseCardOverflowProps extends BaseCardPropsCommon {
|
|
96
|
+
type: 'overflow';
|
|
97
|
+
/**
|
|
98
|
+
* Dropdown options
|
|
99
|
+
*/
|
|
100
|
+
options: DropdownOption[];
|
|
101
|
+
/**
|
|
102
|
+
* Callback when an option is selected
|
|
103
|
+
*/
|
|
104
|
+
onOptionSelect?: (option: DropdownOption) => void;
|
|
105
|
+
actionName?: never;
|
|
106
|
+
actionVariant?: never;
|
|
107
|
+
onActionClick?: never;
|
|
108
|
+
checked?: never;
|
|
109
|
+
defaultChecked?: never;
|
|
110
|
+
onToggleChange?: never;
|
|
111
|
+
toggleSize?: never;
|
|
112
|
+
toggleLabel?: never;
|
|
113
|
+
toggleSupportingText?: never;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Props for BaseCard with type="toggle" (Toggle in header action area)
|
|
117
|
+
*/
|
|
118
|
+
export interface BaseCardToggleProps extends BaseCardPropsCommon {
|
|
119
|
+
type: 'toggle';
|
|
120
|
+
/**
|
|
121
|
+
* Whether the toggle is checked (controlled)
|
|
122
|
+
*/
|
|
123
|
+
checked?: boolean;
|
|
124
|
+
/**
|
|
125
|
+
* Default checked state (uncontrolled)
|
|
126
|
+
*/
|
|
127
|
+
defaultChecked?: boolean;
|
|
128
|
+
/**
|
|
129
|
+
* Callback when toggle state changes
|
|
130
|
+
*/
|
|
131
|
+
onToggleChange?: ChangeEventHandler<HTMLInputElement>;
|
|
132
|
+
/**
|
|
133
|
+
* Size of the toggle
|
|
134
|
+
*/
|
|
135
|
+
toggleSize?: ToggleSize;
|
|
136
|
+
/**
|
|
137
|
+
* Label for the toggle
|
|
138
|
+
*/
|
|
139
|
+
toggleLabel?: string;
|
|
140
|
+
/**
|
|
141
|
+
* Supporting text for the toggle
|
|
142
|
+
*/
|
|
143
|
+
toggleSupportingText?: string;
|
|
144
|
+
actionName?: never;
|
|
145
|
+
actionVariant?: never;
|
|
146
|
+
onActionClick?: never;
|
|
147
|
+
options?: never;
|
|
148
|
+
onOptionSelect?: never;
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Union type for all BaseCard props variants
|
|
152
|
+
*/
|
|
153
|
+
export type BaseCardProps = BaseCardDefaultProps | BaseCardActionProps | BaseCardOverflowProps | BaseCardToggleProps;
|
|
154
|
+
/**
|
|
155
|
+
* Allowed component types for QuickActionCard
|
|
156
|
+
*/
|
|
157
|
+
export type QuickActionCardComponent = 'button' | 'a' | JSXElementConstructor<any>;
|
|
158
|
+
/**
|
|
159
|
+
* QuickActionCard layout mode
|
|
160
|
+
*/
|
|
161
|
+
export type QuickActionCardMode = 'horizontal' | 'vertical';
|
|
162
|
+
/**
|
|
163
|
+
* Common props shared across all QuickActionCard variants
|
|
164
|
+
*/
|
|
165
|
+
export interface QuickActionCardPropsCommon {
|
|
166
|
+
/**
|
|
167
|
+
* Custom class name for the card
|
|
168
|
+
*/
|
|
169
|
+
className?: string;
|
|
170
|
+
/**
|
|
171
|
+
* Whether the card is disabled
|
|
172
|
+
* @default false
|
|
173
|
+
*/
|
|
174
|
+
disabled?: boolean;
|
|
175
|
+
/**
|
|
176
|
+
* Whether the card is read-only (non-interactive)
|
|
177
|
+
* @default false
|
|
178
|
+
*/
|
|
179
|
+
readOnly?: boolean;
|
|
180
|
+
/**
|
|
181
|
+
* Card subtitle (optional)
|
|
182
|
+
*/
|
|
183
|
+
subtitle?: string;
|
|
184
|
+
/**
|
|
185
|
+
* Layout mode
|
|
186
|
+
* @default 'horizontal'
|
|
187
|
+
*/
|
|
188
|
+
mode?: QuickActionCardMode;
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* Props for QuickActionCard with icon only (no title)
|
|
192
|
+
*/
|
|
193
|
+
export interface QuickActionCardWithIconProps extends QuickActionCardPropsCommon {
|
|
194
|
+
/**
|
|
195
|
+
* Icon to display (required when no title)
|
|
196
|
+
*/
|
|
197
|
+
icon: IconDefinition;
|
|
198
|
+
/**
|
|
199
|
+
* Card title (optional when icon is provided)
|
|
200
|
+
*/
|
|
201
|
+
title?: string;
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* Props for QuickActionCard with title only (no icon)
|
|
205
|
+
*/
|
|
206
|
+
export interface QuickActionCardWithTitleProps extends QuickActionCardPropsCommon {
|
|
207
|
+
/**
|
|
208
|
+
* Icon to display (optional when title is provided)
|
|
209
|
+
*/
|
|
210
|
+
icon?: IconDefinition;
|
|
211
|
+
/**
|
|
212
|
+
* Card title (required when no icon)
|
|
213
|
+
*/
|
|
214
|
+
title: string;
|
|
215
|
+
}
|
|
216
|
+
/**
|
|
217
|
+
* Union type for QuickActionCard props - requires either icon or title (or both)
|
|
218
|
+
*/
|
|
219
|
+
export type QuickActionCardProps = QuickActionCardWithIconProps | QuickActionCardWithTitleProps;
|
|
220
|
+
/**
|
|
221
|
+
* SingleThumbnailCard type discriminator
|
|
222
|
+
*/
|
|
223
|
+
export type SingleThumbnailCardType = 'default' | 'action' | 'overflow';
|
|
224
|
+
/**
|
|
225
|
+
* Allowed component types for SingleThumbnailCard
|
|
226
|
+
*/
|
|
227
|
+
export type SingleThumbnailCardComponent = 'div' | 'a' | JSXElementConstructor<any>;
|
|
228
|
+
/**
|
|
229
|
+
* Common props shared across all SingleThumbnailCard types
|
|
230
|
+
*/
|
|
231
|
+
export interface SingleThumbnailCardPropsCommon {
|
|
232
|
+
/**
|
|
233
|
+
* Custom class name for the card
|
|
234
|
+
*/
|
|
235
|
+
className?: string;
|
|
236
|
+
/**
|
|
237
|
+
* Single image element (img, Next.js Image, etc.)
|
|
238
|
+
* Must be exactly one child element
|
|
239
|
+
*/
|
|
240
|
+
children: ReactNode;
|
|
241
|
+
/**
|
|
242
|
+
* File extension string for the filetype icon (e.g., 'pdf', 'jpg', 'zip')
|
|
243
|
+
* Used to determine the filetype badge color
|
|
244
|
+
*/
|
|
245
|
+
filetype?: string;
|
|
246
|
+
/**
|
|
247
|
+
* Icon for the personal action button (e.g., favorite, bookmark)
|
|
248
|
+
*/
|
|
249
|
+
personalActionIcon?: IconDefinition;
|
|
250
|
+
/**
|
|
251
|
+
* Icon shown when personal action is active
|
|
252
|
+
*/
|
|
253
|
+
personalActionActiveIcon?: IconDefinition;
|
|
254
|
+
/**
|
|
255
|
+
* Whether the personal action is in active state
|
|
256
|
+
*/
|
|
257
|
+
personalActionActive?: boolean;
|
|
258
|
+
/**
|
|
259
|
+
* Click handler for the personal action button
|
|
260
|
+
*/
|
|
261
|
+
personalActionOnClick?: (event: MouseEvent<HTMLButtonElement>, active: boolean) => void;
|
|
262
|
+
/**
|
|
263
|
+
* Subtitle text shown in the info section
|
|
264
|
+
*/
|
|
265
|
+
subtitle?: string;
|
|
266
|
+
/**
|
|
267
|
+
* Optional tag label shown on top of the thumbnail
|
|
268
|
+
*/
|
|
269
|
+
tag?: string;
|
|
270
|
+
/**
|
|
271
|
+
* Title text shown in the info section
|
|
272
|
+
*/
|
|
273
|
+
title: string;
|
|
274
|
+
}
|
|
275
|
+
/**
|
|
276
|
+
* Props for SingleThumbnailCard with type="default" (no action in info)
|
|
277
|
+
*/
|
|
278
|
+
export interface SingleThumbnailCardDefaultProps extends SingleThumbnailCardPropsCommon {
|
|
279
|
+
type?: 'default';
|
|
280
|
+
actionName?: never;
|
|
281
|
+
onActionClick?: never;
|
|
282
|
+
onOptionSelect?: never;
|
|
283
|
+
options?: never;
|
|
284
|
+
}
|
|
285
|
+
/**
|
|
286
|
+
* Props for SingleThumbnailCard with type="action" (Button in info action area)
|
|
287
|
+
*/
|
|
288
|
+
export interface SingleThumbnailCardActionProps extends SingleThumbnailCardPropsCommon {
|
|
289
|
+
type: 'action';
|
|
290
|
+
/**
|
|
291
|
+
* Label text for the action button
|
|
292
|
+
*/
|
|
293
|
+
actionName: string;
|
|
294
|
+
/**
|
|
295
|
+
* Click handler for the action button
|
|
296
|
+
*/
|
|
297
|
+
onActionClick?: (event: MouseEvent<HTMLButtonElement>) => void;
|
|
298
|
+
onOptionSelect?: never;
|
|
299
|
+
options?: never;
|
|
300
|
+
}
|
|
301
|
+
/**
|
|
302
|
+
* Props for SingleThumbnailCard with type="overflow" (Dropdown in info action area)
|
|
303
|
+
*/
|
|
304
|
+
export interface SingleThumbnailCardOverflowProps extends SingleThumbnailCardPropsCommon {
|
|
305
|
+
type: 'overflow';
|
|
306
|
+
/**
|
|
307
|
+
* Callback when an option is selected
|
|
308
|
+
*/
|
|
309
|
+
onOptionSelect?: (option: DropdownOption) => void;
|
|
310
|
+
/**
|
|
311
|
+
* Dropdown options
|
|
312
|
+
*/
|
|
313
|
+
options: DropdownOption[];
|
|
314
|
+
actionName?: never;
|
|
315
|
+
onActionClick?: never;
|
|
316
|
+
}
|
|
317
|
+
/**
|
|
318
|
+
* Union type for all SingleThumbnailCard props variants
|
|
319
|
+
*/
|
|
320
|
+
export type SingleThumbnailCardProps = SingleThumbnailCardActionProps | SingleThumbnailCardDefaultProps | SingleThumbnailCardOverflowProps;
|
|
321
|
+
/**
|
|
322
|
+
* Allowed component types for Thumbnail (child of FourThumbnailCard)
|
|
323
|
+
*/
|
|
324
|
+
export type ThumbnailComponent = 'a' | 'button' | 'div' | JSXElementConstructor<any>;
|
|
325
|
+
/**
|
|
326
|
+
* Base props for Thumbnail component
|
|
327
|
+
*/
|
|
328
|
+
export interface ThumbnailPropsBase {
|
|
329
|
+
/**
|
|
330
|
+
* Custom class name for the thumbnail
|
|
331
|
+
*/
|
|
332
|
+
className?: string;
|
|
333
|
+
/**
|
|
334
|
+
* Image element (img, Next.js Image, etc.)
|
|
335
|
+
*/
|
|
336
|
+
children: ReactNode;
|
|
337
|
+
/**
|
|
338
|
+
* Title text shown on hover overlay
|
|
339
|
+
*/
|
|
340
|
+
title?: string;
|
|
341
|
+
}
|
|
342
|
+
/**
|
|
343
|
+
* FourThumbnailCard type discriminator
|
|
344
|
+
*/
|
|
345
|
+
export type FourThumbnailCardType = 'default' | 'action' | 'overflow';
|
|
346
|
+
/**
|
|
347
|
+
* Allowed component types for FourThumbnailCard
|
|
348
|
+
*/
|
|
349
|
+
export type FourThumbnailCardComponent = 'div' | 'a' | JSXElementConstructor<any>;
|
|
350
|
+
/**
|
|
351
|
+
* Common props shared across all FourThumbnailCard types
|
|
352
|
+
*/
|
|
353
|
+
export interface FourThumbnailCardPropsCommon {
|
|
354
|
+
/**
|
|
355
|
+
* Custom class name for the card
|
|
356
|
+
*/
|
|
357
|
+
className?: string;
|
|
358
|
+
/**
|
|
359
|
+
* Thumbnail elements (1-4 Thumbnail components)
|
|
360
|
+
* If less than 4, empty slots will be rendered
|
|
361
|
+
*/
|
|
362
|
+
children: ReactNode;
|
|
363
|
+
/**
|
|
364
|
+
* File extension string for the filetype icon (e.g., 'pdf', 'jpg', 'zip')
|
|
365
|
+
* Used to determine the filetype badge color
|
|
366
|
+
*/
|
|
367
|
+
filetype?: string;
|
|
368
|
+
/**
|
|
369
|
+
* Icon for the personal action button (e.g., favorite, bookmark)
|
|
370
|
+
*/
|
|
371
|
+
personalActionIcon?: IconDefinition;
|
|
372
|
+
/**
|
|
373
|
+
* Icon shown when personal action is active
|
|
374
|
+
*/
|
|
375
|
+
personalActionActiveIcon?: IconDefinition;
|
|
376
|
+
/**
|
|
377
|
+
* Whether the personal action is in active state
|
|
378
|
+
*/
|
|
379
|
+
personalActionActive?: boolean;
|
|
380
|
+
/**
|
|
381
|
+
* Click handler for the personal action button
|
|
382
|
+
*/
|
|
383
|
+
personalActionOnClick?: (event: MouseEvent<HTMLButtonElement>, active: boolean) => void;
|
|
384
|
+
/**
|
|
385
|
+
* Subtitle text shown in the info section
|
|
386
|
+
*/
|
|
387
|
+
subtitle?: string;
|
|
388
|
+
/**
|
|
389
|
+
* Optional tag label shown on top of the thumbnail grid
|
|
390
|
+
*/
|
|
391
|
+
tag?: string;
|
|
392
|
+
/**
|
|
393
|
+
* Title text shown in the info section
|
|
394
|
+
*/
|
|
395
|
+
title: string;
|
|
396
|
+
}
|
|
397
|
+
/**
|
|
398
|
+
* Props for FourThumbnailCard with type="default" (no action in info)
|
|
399
|
+
*/
|
|
400
|
+
export interface FourThumbnailCardDefaultProps extends FourThumbnailCardPropsCommon {
|
|
401
|
+
type?: 'default';
|
|
402
|
+
actionName?: never;
|
|
403
|
+
onActionClick?: never;
|
|
404
|
+
onOptionSelect?: never;
|
|
405
|
+
options?: never;
|
|
406
|
+
}
|
|
407
|
+
/**
|
|
408
|
+
* Props for FourThumbnailCard with type="action" (Button in info action area)
|
|
409
|
+
*/
|
|
410
|
+
export interface FourThumbnailCardActionProps extends FourThumbnailCardPropsCommon {
|
|
411
|
+
type: 'action';
|
|
412
|
+
/**
|
|
413
|
+
* Label text for the action button
|
|
414
|
+
*/
|
|
415
|
+
actionName: string;
|
|
416
|
+
/**
|
|
417
|
+
* Click handler for the action button
|
|
418
|
+
*/
|
|
419
|
+
onActionClick?: (event: MouseEvent<HTMLButtonElement>) => void;
|
|
420
|
+
onOptionSelect?: never;
|
|
421
|
+
options?: never;
|
|
422
|
+
}
|
|
423
|
+
/**
|
|
424
|
+
* Props for FourThumbnailCard with type="overflow" (Dropdown in info action area)
|
|
425
|
+
*/
|
|
426
|
+
export interface FourThumbnailCardOverflowProps extends FourThumbnailCardPropsCommon {
|
|
427
|
+
type: 'overflow';
|
|
428
|
+
/**
|
|
429
|
+
* Callback when an option is selected
|
|
430
|
+
*/
|
|
431
|
+
onOptionSelect?: (option: DropdownOption) => void;
|
|
432
|
+
/**
|
|
433
|
+
* Dropdown options
|
|
434
|
+
*/
|
|
435
|
+
options: DropdownOption[];
|
|
436
|
+
actionName?: never;
|
|
437
|
+
onActionClick?: never;
|
|
438
|
+
}
|
|
439
|
+
/**
|
|
440
|
+
* Union type for all FourThumbnailCard props variants
|
|
441
|
+
*/
|
|
442
|
+
export type FourThumbnailCardProps = FourThumbnailCardActionProps | FourThumbnailCardDefaultProps | FourThumbnailCardOverflowProps;
|
package/Checkbox/Checkbox.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ChangeEventHandler, Ref } from 'react';
|
|
2
|
+
import { CheckboxSize } from '@mezzanine-ui/core/checkbox';
|
|
2
3
|
import { BaseInputProps } from '../Input';
|
|
3
4
|
import { NativeElementPropsWithoutKeyAndRef } from '../utils/jsx-types';
|
|
4
5
|
import { CheckboxPropsBase } from './typings';
|
|
@@ -116,6 +117,13 @@ export interface CheckboxProps extends Omit<NativeElementPropsWithoutKeyAndRef<'
|
|
|
116
117
|
* It is also recommended when integrating with react-hook-form.
|
|
117
118
|
*/
|
|
118
119
|
value?: string;
|
|
120
|
+
/**
|
|
121
|
+
* The size of checkbox.
|
|
122
|
+
* When mode is 'chip', size can be 'main' | 'sub' | 'minor'.
|
|
123
|
+
* When mode is 'default', size can be 'main' | 'sub'.
|
|
124
|
+
* @default 'main'
|
|
125
|
+
*/
|
|
126
|
+
size?: CheckboxSize<NonNullable<CheckboxPropsBase['mode']>>;
|
|
119
127
|
}
|
|
120
128
|
/**
|
|
121
129
|
* The react component for `mezzanine` checkbox.
|
package/Checkbox/Checkbox.js
CHANGED
|
@@ -17,7 +17,7 @@ import cx from 'clsx';
|
|
|
17
17
|
const Checkbox = forwardRef(function Checkbox(props, ref) {
|
|
18
18
|
const checkboxGroup = useContext(CheckboxGroupContext);
|
|
19
19
|
const { disabled: disabledFromGroup, name: nameFromGroup, } = checkboxGroup || {};
|
|
20
|
-
const { checked: checkedProp, className, defaultChecked, description, disabled = disabledFromGroup, editableInput, id, indeterminate = false, inputProps, inputRef: inputRefProp, label, mode = 'main', name = nameFromGroup, onChange: onChangeProp, value, withEditInput = false, ...rest } = props;
|
|
20
|
+
const { checked: checkedProp, className, defaultChecked, description, disabled = disabledFromGroup, editableInput, id, indeterminate = false, inputProps, inputRef: inputRefProp, label, mode = 'default', size = 'main', name = nameFromGroup, onChange: onChangeProp, value, withEditInput = false, ...rest } = props;
|
|
21
21
|
const { name: nameFromInputProps, ...restInputProps } = inputProps || {};
|
|
22
22
|
// Generate unique id if not provided
|
|
23
23
|
const generatedId = useId();
|
|
@@ -83,7 +83,8 @@ const Checkbox = forwardRef(function Checkbox(props, ref) {
|
|
|
83
83
|
[checkboxClasses.checked]: isChecked,
|
|
84
84
|
[checkboxClasses.indeterminate]: isIndeterminate,
|
|
85
85
|
[checkboxClasses.disabled]: disabled,
|
|
86
|
-
|
|
86
|
+
[checkboxClasses.mode(mode)]: mode !== 'default',
|
|
87
|
+
}, checkboxClasses.size(size)), children: [jsxs("label", { ref: ref, ...rest, className: checkboxClasses.labelContainer, children: [jsx("div", { className: checkboxClasses.inputContainer, children: jsxs("div", { className: checkboxClasses.inputContent, children: [jsx("input", { ...restInputProps, "aria-checked": isIndeterminate ? 'mixed' : checked, "aria-disabled": disabled, checked: isChecked, className: checkboxClasses.input, disabled: disabled, id: finalInputId, name: resolvedName, onChange: onChange, ref: composedInputRef, type: "checkbox", value: value }), mode === 'chip' && isChecked && (jsx(Icon, { "aria-hidden": "true", className: checkboxClasses.icon, color: "brand", icon: CheckedIcon, size: 16 })), mode !== 'chip' && isChecked && (jsx(Icon, { "aria-hidden": "true", className: checkboxClasses.icon, color: "fixed-light", icon: CheckedIcon, size: 7 })), mode !== 'chip' && isIndeterminate && (jsx("span", { "aria-hidden": "true", className: checkboxClasses.indeterminateLine }))] }) }), (label || description) && (jsxs("span", { className: checkboxClasses.textContainer, children: [label && (jsx(Typography, { className: checkboxClasses.label, color: labelColor, variant: "label-primary", children: label })), description && mode !== 'chip' && !shouldShowEditableInput && (jsx(Typography, { className: checkboxClasses.description, color: "text-neutral", variant: "caption", children: description }))] }))] }), shouldShowEditableInput && defaultEditableInput && mode !== 'chip' && !indeterminate && (jsx("div", { className: checkboxClasses.editableInputContainer, children: jsx(Input, { ...defaultEditableInput, ...((!isChecked || disabled) && defaultEditableInput.disabled !== true ? { disabled: true } : {}), inputRef: composeRefs([
|
|
87
88
|
defaultEditableInput.inputRef,
|
|
88
89
|
editableInputRef,
|
|
89
90
|
]), variant: "base" }) }))] }));
|
|
@@ -177,7 +177,7 @@ const CheckboxGroup = forwardRef(function CheckboxGroup(props, ref) {
|
|
|
177
177
|
}, [canRenderLevelControl, level, onChangeProp, normalizedOptions, resolvedName, setValue, value]);
|
|
178
178
|
return (jsxs("div", { ...rest, ref: ref, "aria-orientation": ariaOrientation, className: cx(checkboxGroupClasses.host, {
|
|
179
179
|
[checkboxGroupClasses.nested]: isLevelActive,
|
|
180
|
-
}, className), role: role, children: [canRenderLevelControl && !shouldRenderLevelInsideContent && (jsx(Checkbox, { checked: levelChecked, disabled: disabled || (level === null || level === void 0 ? void 0 : level.disabled), id: `${resolvedName}-level-control`, indeterminate: levelIndeterminate, label: (_b = level === null || level === void 0 ? void 0 : level.label) !== null && _b !== void 0 ? _b : '', mode: (_c = level === null || level === void 0 ? void 0 : level.mode) !== null && _c !== void 0 ? _c : '
|
|
180
|
+
}, className), role: role, children: [canRenderLevelControl && !shouldRenderLevelInsideContent && (jsx(Checkbox, { checked: levelChecked, disabled: disabled || (level === null || level === void 0 ? void 0 : level.disabled), id: `${resolvedName}-level-control`, indeterminate: levelIndeterminate, label: (_b = level === null || level === void 0 ? void 0 : level.label) !== null && _b !== void 0 ? _b : '', mode: (_c = level === null || level === void 0 ? void 0 : level.mode) !== null && _c !== void 0 ? _c : 'default', name: `${resolvedName}-level-control`, onChange: handleLevelControlChange })), jsxs("div", { className: cx(checkboxGroupClasses.contentWrapper, checkboxGroupClasses.layout(layout), mode && checkboxGroupClasses.mode(mode)), children: [canRenderLevelControl && shouldRenderLevelInsideContent && (jsxs(Fragment, { children: [jsx(Checkbox, { checked: levelChecked, disabled: disabled || (level === null || level === void 0 ? void 0 : level.disabled), id: `${resolvedName}-level-control`, indeterminate: levelIndeterminate, label: (_d = level === null || level === void 0 ? void 0 : level.label) !== null && _d !== void 0 ? _d : '', mode: (_e = level === null || level === void 0 ? void 0 : level.mode) !== null && _e !== void 0 ? _e : 'default', name: `${resolvedName}-level-control`, onChange: handleLevelControlChange }), isHorizontalLayout && jsx("i", { className: checkboxGroupClasses.levelControlSeparator })] })), jsx(CheckboxGroupContext.Provider, { value: context, children: children })] })] }));
|
|
181
181
|
});
|
|
182
182
|
|
|
183
183
|
export { assignCheckboxGroupValuesToEvent, CheckboxGroup as default };
|
|
@@ -5,10 +5,12 @@ import { SelectProps } from '../Select';
|
|
|
5
5
|
import { NativeElementPropsWithoutKeyAndRef } from '../utils/jsx-types';
|
|
6
6
|
import { IconDefinition } from '@mezzanine-ui/icons';
|
|
7
7
|
import { DropdownProps } from '../Dropdown';
|
|
8
|
+
import { ToggleProps } from '../Toggle';
|
|
9
|
+
import { CheckboxProps } from '../Checkbox';
|
|
8
10
|
type SegmentedControlProps = {
|
|
9
11
|
mock: 'SegmentedControlProps';
|
|
10
12
|
};
|
|
11
|
-
type ContentHeaderChild = ReactElement<SearchInputProps> | ReactElement<SelectProps> | ReactElement<SegmentedControlProps> | ReactElement<ButtonProps> | ReactElement<DropdownProps> | ReactElement<{
|
|
13
|
+
type ContentHeaderChild = ReactElement<SearchInputProps> | ReactElement<SelectProps> | ReactElement<SegmentedControlProps> | ReactElement<ToggleProps> | ReactElement<CheckboxProps> | ReactElement<ButtonProps> | ReactElement<DropdownProps> | ReactElement<{
|
|
12
14
|
href: string;
|
|
13
15
|
}> | null | false | undefined;
|
|
14
16
|
/**
|
|
@@ -45,19 +47,8 @@ export type ContentHeaderProps = Omit<NativeElementPropsWithoutKeyAndRef<'header
|
|
|
45
47
|
description?: string;
|
|
46
48
|
/** Filter component (SearchInput, Select, or SegmentedControl) */
|
|
47
49
|
filter?: {
|
|
48
|
-
variant: 'search' | 'select' | 'segmentedControl';
|
|
49
|
-
} & (SearchInputProps | SelectProps | SegmentedControlProps);
|
|
50
|
-
/**
|
|
51
|
-
* Optional back button properties. <br />
|
|
52
|
-
* When provided, a back button will be rendered on the left side of the title. <br />
|
|
53
|
-
* href prop from children will be ignored if onBackClick is provided. <br />
|
|
54
|
-
* */
|
|
55
|
-
onBackClick?: () => void;
|
|
56
|
-
/**
|
|
57
|
-
* Size variant of the toolbar. <br />
|
|
58
|
-
* Affects the size of buttons and filter component. <br />
|
|
59
|
-
*/
|
|
60
|
-
size?: 'main' | 'sub';
|
|
50
|
+
variant: 'search' | 'select' | 'segmentedControl' | 'toggle' | 'checkbox';
|
|
51
|
+
} & (SearchInputProps | SelectProps | SegmentedControlProps | ToggleProps | CheckboxProps);
|
|
61
52
|
/** Main title text for the content header */
|
|
62
53
|
title: string;
|
|
63
54
|
/**
|
|
@@ -71,7 +62,22 @@ export type ContentHeaderProps = Omit<NativeElementPropsWithoutKeyAndRef<'header
|
|
|
71
62
|
utilities?: ((ButtonProps & {
|
|
72
63
|
icon: IconDefinition;
|
|
73
64
|
}) | DropdownProps)[];
|
|
74
|
-
}
|
|
65
|
+
} & ({
|
|
66
|
+
/**
|
|
67
|
+
* Optional back button properties. <br />
|
|
68
|
+
* When provided, a back button will be rendered on the left side of the title. <br />
|
|
69
|
+
* href prop from children will be ignored if onBackClick is provided. <br />
|
|
70
|
+
* */
|
|
71
|
+
onBackClick?: () => void;
|
|
72
|
+
/**
|
|
73
|
+
* Size variant of the toolbar. <br />
|
|
74
|
+
* Affects the size of buttons and filter component. <br />
|
|
75
|
+
*/
|
|
76
|
+
size?: 'main';
|
|
77
|
+
} | {
|
|
78
|
+
onBackClick?: never;
|
|
79
|
+
size?: 'sub';
|
|
80
|
+
});
|
|
75
81
|
/**
|
|
76
82
|
* ContentHeader component. <br />
|
|
77
83
|
* A flexible header with title, description, filter, action buttons, and utility icons. <br />
|
|
@@ -102,59 +108,5 @@ export type ContentHeaderProps = Omit<NativeElementPropsWithoutKeyAndRef<'header
|
|
|
102
108
|
* </ContentHeader>
|
|
103
109
|
* ```
|
|
104
110
|
*/
|
|
105
|
-
declare const ContentHeader: import("react").ForwardRefExoticComponent<
|
|
106
|
-
/**
|
|
107
|
-
* Button configuration for actions. <br />
|
|
108
|
-
* Automatically applies proper styling and order. <br />
|
|
109
|
-
* When conflicting with other props, props take priority over children. <br />
|
|
110
|
-
* Buttons with variants other than primary, secondary, and destructive will not be rendered. <br />
|
|
111
|
-
*/
|
|
112
|
-
actions?: ButtonProps[];
|
|
113
|
-
/**
|
|
114
|
-
* Children elements: <br />
|
|
115
|
-
* - Back button which Component with href prop.
|
|
116
|
-
* - example 1: `<a href="..." />` <br />
|
|
117
|
-
* - example 2: `<Link href="..." />` <br />
|
|
118
|
-
* - conflicting prop: `onBackClick` <br />
|
|
119
|
-
* - Filter component (SearchInput, Select, or SegmentedControl) <br />
|
|
120
|
-
* - Action buttons `<Button />` <br />
|
|
121
|
-
* - Icon-only utility buttons `<Button icon="..." />` <br />
|
|
122
|
-
* - Overflow icon utility dropdown `<Dropdown> <Button icon="..." /> </Dropdown>` <br />
|
|
123
|
-
* <br />
|
|
124
|
-
* Can mix and match the above children. <br />
|
|
125
|
-
* The order of children does not matter as they will be arranged properly. <br />
|
|
126
|
-
* When conflicting with other props, props take priority over children. <br />
|
|
127
|
-
*/
|
|
128
|
-
children?: ContentHeaderChild[] | ContentHeaderChild;
|
|
129
|
-
/** Optional description text displayed below the title */
|
|
130
|
-
description?: string;
|
|
131
|
-
/** Filter component (SearchInput, Select, or SegmentedControl) */
|
|
132
|
-
filter?: {
|
|
133
|
-
variant: "search" | "select" | "segmentedControl";
|
|
134
|
-
} & (SearchInputProps | SelectProps | SegmentedControlProps);
|
|
135
|
-
/**
|
|
136
|
-
* Optional back button properties. <br />
|
|
137
|
-
* When provided, a back button will be rendered on the left side of the title. <br />
|
|
138
|
-
* href prop from children will be ignored if onBackClick is provided. <br />
|
|
139
|
-
* */
|
|
140
|
-
onBackClick?: () => void;
|
|
141
|
-
/**
|
|
142
|
-
* Size variant of the toolbar. <br />
|
|
143
|
-
* Affects the size of buttons and filter component. <br />
|
|
144
|
-
*/
|
|
145
|
-
size?: "main" | "sub";
|
|
146
|
-
/** Main title text for the content header */
|
|
147
|
-
title: string;
|
|
148
|
-
/**
|
|
149
|
-
* HTML element type for the title (defaults to 'h1' for main size and 'h2' for sub size)
|
|
150
|
-
*/
|
|
151
|
-
titleComponent?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "p";
|
|
152
|
-
/**
|
|
153
|
-
* Icon-only utility buttons `<Button icon="..." />`. <br />
|
|
154
|
-
* They usually appear as smaller buttons with only an icon and no text.
|
|
155
|
-
*/
|
|
156
|
-
utilities?: ((ButtonProps & {
|
|
157
|
-
icon: IconDefinition;
|
|
158
|
-
}) | DropdownProps)[];
|
|
159
|
-
} & import("react").RefAttributes<HTMLElement>>;
|
|
111
|
+
declare const ContentHeader: import("react").ForwardRefExoticComponent<ContentHeaderProps & import("react").RefAttributes<HTMLElement>>;
|
|
160
112
|
export default ContentHeader;
|
|
@@ -48,7 +48,7 @@ const ContentHeader = forwardRef(function ContentHeader(props, ref) {
|
|
|
48
48
|
const { backButton, filter: filterFromChildren, actions: actionsFromChildren, utilities: utilitiesFromChildren, } = resolveContentHeaderChild(children, size);
|
|
49
49
|
// prop onBack takes precedence over backButtonOrLink
|
|
50
50
|
const renderBackButton = onBackClick ? (jsx(Button, { iconType: "icon-only", icon: ChevronLeftIcon, onClick: onBackClick, "aria-label": "Back", type: "button", size: "sub", variant: "base-tertiary" })) : (backButton);
|
|
51
|
-
return (jsxs("header", { ...rest, className: cx(contentHeaderClasses.host, contentHeaderClasses.size(size), className), ref: ref, children: [jsxs("span", { className: contentHeaderClasses.titleArea, children: [renderBackButton && (jsx("span", { className: contentHeaderClasses.backButton, children: renderBackButton })), jsxs("span", { className: contentHeaderClasses.textGroup, children: [jsx(Typography, { component: titleComponent, align: "left", color: "text-neutral-solid", variant: size === 'main' ? 'h2' : 'h3', children: title }), description && (jsx(Typography, { align: "left", color: "text-neutral", variant: "caption", children: description }))] })] }), jsxs("span", { className: contentHeaderClasses.actionArea, children: [renderFilter || filterFromChildren, (renderActions || actionsFromChildren.length > 0) && (jsx(ButtonGroup, { children: renderActions || actionsFromChildren })), (renderUtilities || utilitiesFromChildren.length > 0) && (jsx("span", { className: contentHeaderClasses.utilities, children: renderUtilities || utilitiesFromChildren }))] })] }));
|
|
51
|
+
return (jsxs("header", { ...rest, className: cx(contentHeaderClasses.host, contentHeaderClasses.size(size), className), ref: ref, children: [jsxs("span", { className: contentHeaderClasses.titleArea, children: [renderBackButton && size !== 'sub' && (jsx("span", { className: contentHeaderClasses.backButton, children: renderBackButton })), jsxs("span", { className: contentHeaderClasses.textGroup, children: [jsx(Typography, { component: titleComponent, align: "left", color: "text-neutral-solid", variant: size === 'main' ? 'h2' : 'h3', children: title }), description && (jsx(Typography, { align: "left", color: "text-neutral", variant: "caption", children: description }))] })] }), jsxs("span", { className: contentHeaderClasses.actionArea, children: [renderFilter || filterFromChildren, (renderActions || actionsFromChildren.length > 0) && (jsx(ButtonGroup, { children: renderActions || actionsFromChildren })), (renderUtilities || utilitiesFromChildren.length > 0) && (jsx("span", { className: contentHeaderClasses.utilities, children: renderUtilities || utilitiesFromChildren }))] })] }));
|
|
52
52
|
});
|
|
53
53
|
|
|
54
54
|
export { ContentHeader as default };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ResponsiveBreakpoint } from '@mezzanine-ui/core/content-header';
|
|
2
|
+
import { FC, ReactNode } from 'react';
|
|
3
|
+
export interface ContentHeaderResponsiveProps {
|
|
4
|
+
breakpoint: ResponsiveBreakpoint;
|
|
5
|
+
children?: ReactNode;
|
|
6
|
+
}
|
|
7
|
+
/** @experimental This component is still in testing and the API may change frequently */
|
|
8
|
+
declare const ContentHeaderResponsive: FC<ContentHeaderResponsiveProps>;
|
|
9
|
+
export default ContentHeaderResponsive;
|
package/ContentHeader/utils.d.ts
CHANGED
|
@@ -6,9 +6,9 @@ import { DropdownProps } from '../Dropdown';
|
|
|
6
6
|
* Renders a button from either ButtonProps or a React element.
|
|
7
7
|
* Applies the specified size and variant to the button.
|
|
8
8
|
*/
|
|
9
|
-
export declare const renderButton: (button: ButtonProps | ButtonGroupChild | undefined, size: ButtonProps["size"]) => ReactElement<ButtonProps> | null;
|
|
10
|
-
export declare const renderFilterProp: (
|
|
11
|
-
export declare const renderIconButtonWithProps: (child: ReactElement<ButtonProps>, size: ButtonProps["size"]) => ReactElement<ButtonProps>;
|
|
9
|
+
export declare const renderButton: (button: ButtonProps | ButtonGroupChild | undefined, size: ButtonProps["size"], key?: string) => ReactElement<ButtonProps> | null;
|
|
10
|
+
export declare const renderFilterProp: (props: ContentHeaderProps["filter"], size: "main" | "sub") => import("react/jsx-runtime").JSX.Element | null;
|
|
11
|
+
export declare const renderIconButtonWithProps: (child: ReactElement<ButtonProps>, size: ButtonProps["size"], key?: string) => ReactElement<ButtonProps>;
|
|
12
12
|
export declare const renderIconButtonsProp: (utilities: ContentHeaderProps["utilities"], size: ButtonProps["size"]) => ButtonGroupChild | ButtonGroupChild[];
|
|
13
13
|
/**
|
|
14
14
|
* Renders action buttons based on the actions configuration.
|