@backstage/ui 0.12.0-next.2 → 0.12.0
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/CHANGELOG.md +362 -1
- package/dist/components/Accordion/Accordion.esm.js +82 -97
- package/dist/components/Accordion/Accordion.esm.js.map +1 -1
- package/dist/components/Accordion/Accordion.module.css.esm.js +2 -2
- package/dist/components/Accordion/definition.esm.js +54 -13
- package/dist/components/Accordion/definition.esm.js.map +1 -1
- package/dist/components/Alert/definition.esm.js +1 -3
- package/dist/components/Alert/definition.esm.js.map +1 -1
- package/dist/components/Avatar/Avatar.module.css.esm.js +2 -2
- package/dist/components/Box/Box.esm.js +2 -2
- package/dist/components/Box/Box.esm.js.map +1 -1
- package/dist/components/Box/Box.module.css.esm.js +2 -2
- package/dist/components/Box/definition.esm.js +3 -3
- package/dist/components/Box/definition.esm.js.map +1 -1
- package/dist/components/Button/Button.module.css.esm.js +2 -2
- package/dist/components/Button/definition.esm.js +2 -3
- package/dist/components/Button/definition.esm.js.map +1 -1
- package/dist/components/ButtonIcon/ButtonIcon.module.css.esm.js +2 -2
- package/dist/components/ButtonIcon/definition.esm.js +2 -3
- package/dist/components/ButtonIcon/definition.esm.js.map +1 -1
- package/dist/components/ButtonLink/ButtonLink.module.css.esm.js +2 -2
- package/dist/components/ButtonLink/definition.esm.js +2 -3
- package/dist/components/ButtonLink/definition.esm.js.map +1 -1
- package/dist/components/Card/Card.esm.js +27 -47
- package/dist/components/Card/Card.esm.js.map +1 -1
- package/dist/components/Card/Card.module.css.esm.js +2 -2
- package/dist/components/Card/definition.esm.js +47 -7
- package/dist/components/Card/definition.esm.js.map +1 -1
- package/dist/components/Checkbox/Checkbox.module.css.esm.js +2 -2
- package/dist/components/Dialog/Dialog.esm.js +1 -1
- package/dist/components/Dialog/Dialog.module.css.esm.js +2 -2
- package/dist/components/Flex/Flex.esm.js +6 -8
- package/dist/components/Flex/Flex.esm.js.map +1 -1
- package/dist/components/Flex/Flex.module.css.esm.js +2 -2
- package/dist/components/Flex/definition.esm.js +8 -1
- package/dist/components/Flex/definition.esm.js.map +1 -1
- package/dist/components/FullPage/FullPage.esm.js +22 -0
- package/dist/components/FullPage/FullPage.esm.js.map +1 -0
- package/dist/components/FullPage/FullPage.module.css.esm.js +8 -0
- package/dist/components/FullPage/FullPage.module.css.esm.js.map +1 -0
- package/dist/components/FullPage/definition.esm.js +8 -0
- package/dist/components/FullPage/definition.esm.js.map +1 -0
- package/dist/components/Grid/Grid.esm.js +11 -15
- package/dist/components/Grid/Grid.esm.js.map +1 -1
- package/dist/components/Grid/Grid.module.css.esm.js +2 -2
- package/dist/components/Grid/definition.esm.js +16 -2
- package/dist/components/Grid/definition.esm.js.map +1 -1
- package/dist/components/Menu/Menu.module.css.esm.js +2 -2
- package/dist/components/PasswordField/PasswordField.module.css.esm.js +2 -2
- package/dist/components/PluginHeader/PluginHeader.esm.js +88 -0
- package/dist/components/PluginHeader/PluginHeader.esm.js.map +1 -0
- package/dist/components/PluginHeader/PluginHeader.module.css.esm.js +8 -0
- package/dist/components/PluginHeader/PluginHeader.module.css.esm.js.map +1 -0
- package/dist/components/{Header/HeaderToolbar.esm.js → PluginHeader/PluginHeaderToolbar.esm.js} +6 -6
- package/dist/components/PluginHeader/PluginHeaderToolbar.esm.js.map +1 -0
- package/dist/components/PluginHeader/definition.esm.js +15 -0
- package/dist/components/PluginHeader/definition.esm.js.map +1 -0
- package/dist/components/Popover/Popover.module.css.esm.js +2 -2
- package/dist/components/RadioGroup/RadioGroup.module.css.esm.js +2 -2
- package/dist/components/SearchField/SearchField.module.css.esm.js +2 -2
- package/dist/components/Select/Select.module.css.esm.js +2 -2
- package/dist/components/Table/Table.module.css.esm.js +2 -2
- package/dist/components/TablePagination/TablePagination.esm.js +1 -1
- package/dist/components/TextField/TextField.module.css.esm.js +2 -2
- package/dist/components/ToggleButton/ToggleButton.esm.js +1 -4
- package/dist/components/ToggleButton/ToggleButton.esm.js.map +1 -1
- package/dist/components/ToggleButtonGroup/ToggleButtonGroup.module.css.esm.js +2 -2
- package/dist/components/Tooltip/Tooltip.module.css.esm.js +2 -2
- package/dist/css/styles.css +11 -13
- package/dist/hooks/useBg.esm.js +36 -0
- package/dist/hooks/useBg.esm.js.map +1 -0
- package/dist/hooks/useDefinition/defineComponent.esm.js.map +1 -1
- package/dist/hooks/useDefinition/useDefinition.esm.js +15 -12
- package/dist/hooks/useDefinition/useDefinition.esm.js.map +1 -1
- package/dist/index.d.ts +303 -77
- package/dist/index.esm.js +7 -4
- package/dist/index.esm.js.map +1 -1
- package/package.json +5 -5
- package/dist/components/Header/Header.esm.js +0 -56
- package/dist/components/Header/Header.esm.js.map +0 -1
- package/dist/components/Header/Header.module.css.esm.js +0 -8
- package/dist/components/Header/Header.module.css.esm.js.map +0 -1
- package/dist/components/Header/HeaderToolbar.esm.js.map +0 -1
- package/dist/components/Header/definition.esm.js +0 -14
- package/dist/components/Header/definition.esm.js.map +0 -1
- package/dist/hooks/useSurface.esm.js +0 -74
- package/dist/hooks/useSurface.esm.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -100,27 +100,31 @@ interface ComponentDefinition {
|
|
|
100
100
|
utilityProps?: string[];
|
|
101
101
|
}
|
|
102
102
|
/**
|
|
103
|
-
*
|
|
103
|
+
* Background type for the neutral bg system.
|
|
104
104
|
*
|
|
105
|
-
* Supports
|
|
106
|
-
*
|
|
105
|
+
* Supports neutral levels ('neutral-1' through 'neutral-3') and
|
|
106
|
+
* intent backgrounds ('danger', 'warning', 'success').
|
|
107
|
+
*
|
|
108
|
+
* The 'neutral-4' level is not exposed as a prop value -- it is reserved
|
|
109
|
+
* for leaf component CSS (e.g. Button on a 'neutral-3' surface).
|
|
107
110
|
*
|
|
108
111
|
* @public
|
|
109
112
|
*/
|
|
110
|
-
type
|
|
111
|
-
/**
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
113
|
+
type ContainerBg = 'neutral-1' | 'neutral-2' | 'neutral-3' | 'danger' | 'warning' | 'success';
|
|
114
|
+
/**
|
|
115
|
+
* Background values accepted by provider components.
|
|
116
|
+
*
|
|
117
|
+
* Includes all `ContainerBg` values plus `'neutral-auto'` which
|
|
118
|
+
* automatically increments the neutral level from the parent context.
|
|
119
|
+
*
|
|
120
|
+
* @public
|
|
121
|
+
*/
|
|
122
|
+
type ProviderBg = ContainerBg | 'neutral-auto';
|
|
119
123
|
|
|
120
124
|
/** @public */
|
|
121
125
|
type BoxOwnProps = {
|
|
122
126
|
as?: keyof JSX.IntrinsicElements;
|
|
123
|
-
|
|
127
|
+
bg?: Responsive<ProviderBg>;
|
|
124
128
|
children?: ReactNode;
|
|
125
129
|
className?: string;
|
|
126
130
|
style?: CSSProperties;
|
|
@@ -154,12 +158,12 @@ declare const BoxDefinition: {
|
|
|
154
158
|
readonly classNames: {
|
|
155
159
|
readonly root: "bui-Box";
|
|
156
160
|
};
|
|
157
|
-
readonly
|
|
161
|
+
readonly bg: "provider";
|
|
158
162
|
readonly propDefs: {
|
|
159
163
|
readonly as: {
|
|
160
164
|
readonly default: "div";
|
|
161
165
|
};
|
|
162
|
-
readonly
|
|
166
|
+
readonly bg: {
|
|
163
167
|
readonly dataAttribute: true;
|
|
164
168
|
};
|
|
165
169
|
readonly children: {};
|
|
@@ -176,7 +180,7 @@ interface GridProps extends SpaceProps {
|
|
|
176
180
|
columns?: Responsive<Columns>;
|
|
177
181
|
gap?: Responsive<Space>;
|
|
178
182
|
style?: React.CSSProperties;
|
|
179
|
-
|
|
183
|
+
bg?: Responsive<ProviderBg>;
|
|
180
184
|
}
|
|
181
185
|
/** @public */
|
|
182
186
|
interface GridItemProps {
|
|
@@ -187,7 +191,7 @@ interface GridItemProps {
|
|
|
187
191
|
colStart?: Responsive<Columns>;
|
|
188
192
|
rowSpan?: Responsive<Columns>;
|
|
189
193
|
style?: React.CSSProperties;
|
|
190
|
-
|
|
194
|
+
bg?: Responsive<ProviderBg>;
|
|
191
195
|
}
|
|
192
196
|
|
|
193
197
|
/** @public */
|
|
@@ -206,7 +210,7 @@ declare const GridDefinition: {
|
|
|
206
210
|
};
|
|
207
211
|
readonly utilityProps: ["columns", "gap", "m", "mb", "ml", "mr", "mt", "mx", "my", "p", "pb", "pl", "pr", "pt", "px", "py"];
|
|
208
212
|
readonly dataAttributes: {
|
|
209
|
-
readonly
|
|
213
|
+
readonly bg: readonly ["neutral-1", "neutral-2", "neutral-3", "danger", "warning", "success"];
|
|
210
214
|
};
|
|
211
215
|
};
|
|
212
216
|
/**
|
|
@@ -219,7 +223,7 @@ declare const GridItemDefinition: {
|
|
|
219
223
|
};
|
|
220
224
|
readonly utilityProps: ["colSpan", "colEnd", "colStart", "rowSpan"];
|
|
221
225
|
readonly dataAttributes: {
|
|
222
|
-
readonly
|
|
226
|
+
readonly bg: readonly ["neutral-1", "neutral-2", "neutral-3", "danger", "warning", "success"];
|
|
223
227
|
};
|
|
224
228
|
};
|
|
225
229
|
|
|
@@ -232,7 +236,7 @@ interface FlexProps extends SpaceProps {
|
|
|
232
236
|
direction?: Responsive<'row' | 'column' | 'row-reverse' | 'column-reverse'>;
|
|
233
237
|
className?: string;
|
|
234
238
|
style?: React.CSSProperties;
|
|
235
|
-
|
|
239
|
+
bg?: Responsive<ProviderBg>;
|
|
236
240
|
}
|
|
237
241
|
|
|
238
242
|
/** @public */
|
|
@@ -248,7 +252,7 @@ declare const FlexDefinition: {
|
|
|
248
252
|
};
|
|
249
253
|
readonly utilityProps: ["m", "mb", "ml", "mr", "mt", "mx", "my", "p", "pb", "pl", "pr", "pt", "px", "py", "gap", "align", "justify", "direction"];
|
|
250
254
|
readonly dataAttributes: {
|
|
251
|
-
readonly
|
|
255
|
+
readonly bg: readonly ["neutral-1", "neutral-2", "neutral-3", "danger", "warning", "success"];
|
|
252
256
|
};
|
|
253
257
|
};
|
|
254
258
|
|
|
@@ -280,40 +284,94 @@ declare const ContainerDefinition: {
|
|
|
280
284
|
};
|
|
281
285
|
|
|
282
286
|
/**
|
|
283
|
-
* Props for the
|
|
287
|
+
* Props for the FullPage component.
|
|
288
|
+
*
|
|
289
|
+
* @public
|
|
290
|
+
*/
|
|
291
|
+
interface FullPageProps extends React.ComponentPropsWithoutRef<'main'> {
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
/**
|
|
295
|
+
* A component that fills the remaining viewport height below the Header.
|
|
296
|
+
*
|
|
297
|
+
* The FullPage component consumes the `--bui-header-height` CSS custom property
|
|
298
|
+
* set by the Header component to calculate its height as
|
|
299
|
+
* `calc(100dvh - var(--bui-header-height, 0px))`. Content inside the FullPage
|
|
300
|
+
* scrolls independently while the Header stays visible.
|
|
301
|
+
*
|
|
302
|
+
* @public
|
|
303
|
+
*/
|
|
304
|
+
declare const FullPage: react.ForwardRefExoticComponent<FullPageProps & react.RefAttributes<HTMLElement>>;
|
|
305
|
+
|
|
306
|
+
/**
|
|
307
|
+
* Component definition for FullPage
|
|
308
|
+
* @public
|
|
309
|
+
*/
|
|
310
|
+
declare const FullPageDefinition: {
|
|
311
|
+
readonly classNames: {
|
|
312
|
+
readonly root: "bui-FullPage";
|
|
313
|
+
};
|
|
314
|
+
};
|
|
315
|
+
|
|
316
|
+
/**
|
|
317
|
+
* Own props for the Accordion component.
|
|
284
318
|
* @public
|
|
285
319
|
*/
|
|
286
|
-
|
|
320
|
+
type AccordionOwnProps = {
|
|
287
321
|
className?: string;
|
|
322
|
+
};
|
|
323
|
+
/**
|
|
324
|
+
* Props for the Accordion component.
|
|
325
|
+
* @public
|
|
326
|
+
*/
|
|
327
|
+
interface AccordionProps extends Omit<DisclosureProps, 'className'>, AccordionOwnProps {
|
|
288
328
|
}
|
|
289
329
|
/**
|
|
290
|
-
*
|
|
330
|
+
* Own props for the AccordionTrigger component.
|
|
291
331
|
* @public
|
|
292
332
|
*/
|
|
293
|
-
|
|
333
|
+
type AccordionTriggerOwnProps = {
|
|
294
334
|
className?: string;
|
|
295
335
|
title?: string;
|
|
296
336
|
subtitle?: string;
|
|
297
|
-
children?:
|
|
337
|
+
children?: ReactNode;
|
|
338
|
+
};
|
|
339
|
+
/**
|
|
340
|
+
* Props for the AccordionTrigger component.
|
|
341
|
+
* @public
|
|
342
|
+
*/
|
|
343
|
+
interface AccordionTriggerProps extends Omit<HeadingProps, 'children' | 'className'>, AccordionTriggerOwnProps {
|
|
298
344
|
}
|
|
299
345
|
/**
|
|
300
|
-
*
|
|
346
|
+
* Own props for the AccordionPanel component.
|
|
301
347
|
* @public
|
|
302
348
|
*/
|
|
303
|
-
|
|
349
|
+
type AccordionPanelOwnProps = {
|
|
304
350
|
className?: string;
|
|
351
|
+
};
|
|
352
|
+
/**
|
|
353
|
+
* Props for the AccordionPanel component.
|
|
354
|
+
* @public
|
|
355
|
+
*/
|
|
356
|
+
interface AccordionPanelProps extends Omit<DisclosurePanelProps, 'className'>, AccordionPanelOwnProps {
|
|
305
357
|
}
|
|
306
358
|
/**
|
|
307
|
-
*
|
|
359
|
+
* Own props for the AccordionGroup component.
|
|
308
360
|
* @public
|
|
309
361
|
*/
|
|
310
|
-
|
|
362
|
+
type AccordionGroupOwnProps = {
|
|
311
363
|
className?: string;
|
|
312
364
|
/**
|
|
313
365
|
* Whether multiple accordions can be expanded at the same time.
|
|
314
366
|
* @defaultValue false
|
|
315
367
|
*/
|
|
316
368
|
allowsMultiple?: boolean;
|
|
369
|
+
};
|
|
370
|
+
/**
|
|
371
|
+
* Props for the AccordionGroup component.
|
|
372
|
+
* @public
|
|
373
|
+
*/
|
|
374
|
+
interface AccordionGroupProps extends Omit<DisclosureGroupProps, 'className'>, AccordionGroupOwnProps {
|
|
317
375
|
}
|
|
318
376
|
|
|
319
377
|
/** @public */
|
|
@@ -330,20 +388,75 @@ declare const AccordionGroup: react.ForwardRefExoticComponent<AccordionGroupProp
|
|
|
330
388
|
* @public
|
|
331
389
|
*/
|
|
332
390
|
declare const AccordionDefinition: {
|
|
391
|
+
readonly styles: {
|
|
392
|
+
readonly [key: string]: string;
|
|
393
|
+
};
|
|
333
394
|
readonly classNames: {
|
|
334
395
|
readonly root: "bui-Accordion";
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
readonly
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
396
|
+
};
|
|
397
|
+
readonly bg: "consumer";
|
|
398
|
+
readonly propDefs: {
|
|
399
|
+
readonly className: {};
|
|
400
|
+
};
|
|
401
|
+
};
|
|
402
|
+
/**
|
|
403
|
+
* Component definition for AccordionTrigger
|
|
404
|
+
* @public
|
|
405
|
+
*/
|
|
406
|
+
declare const AccordionTriggerDefinition: {
|
|
407
|
+
readonly styles: {
|
|
408
|
+
readonly [key: string]: string;
|
|
409
|
+
};
|
|
410
|
+
readonly classNames: {
|
|
411
|
+
readonly root: "bui-AccordionTrigger";
|
|
412
|
+
readonly button: "bui-AccordionTriggerButton";
|
|
413
|
+
readonly title: "bui-AccordionTriggerTitle";
|
|
414
|
+
readonly subtitle: "bui-AccordionTriggerSubtitle";
|
|
415
|
+
readonly icon: "bui-AccordionTriggerIcon";
|
|
416
|
+
};
|
|
417
|
+
readonly propDefs: {
|
|
418
|
+
readonly className: {};
|
|
419
|
+
readonly title: {};
|
|
420
|
+
readonly subtitle: {};
|
|
421
|
+
readonly children: {};
|
|
422
|
+
};
|
|
423
|
+
};
|
|
424
|
+
/**
|
|
425
|
+
* Component definition for AccordionPanel
|
|
426
|
+
* @public
|
|
427
|
+
*/
|
|
428
|
+
declare const AccordionPanelDefinition: {
|
|
429
|
+
readonly styles: {
|
|
430
|
+
readonly [key: string]: string;
|
|
431
|
+
};
|
|
432
|
+
readonly classNames: {
|
|
433
|
+
readonly root: "bui-AccordionPanel";
|
|
434
|
+
};
|
|
435
|
+
readonly propDefs: {
|
|
436
|
+
readonly className: {};
|
|
437
|
+
};
|
|
438
|
+
};
|
|
439
|
+
/**
|
|
440
|
+
* Component definition for AccordionGroup
|
|
441
|
+
* @public
|
|
442
|
+
*/
|
|
443
|
+
declare const AccordionGroupDefinition: {
|
|
444
|
+
readonly styles: {
|
|
445
|
+
readonly [key: string]: string;
|
|
446
|
+
};
|
|
447
|
+
readonly classNames: {
|
|
448
|
+
readonly root: "bui-AccordionGroup";
|
|
449
|
+
};
|
|
450
|
+
readonly propDefs: {
|
|
451
|
+
readonly className: {};
|
|
452
|
+
readonly allowsMultiple: {
|
|
453
|
+
readonly default: false;
|
|
454
|
+
};
|
|
342
455
|
};
|
|
343
456
|
};
|
|
344
457
|
|
|
345
458
|
/** @public */
|
|
346
|
-
type AlertOwnProps =
|
|
459
|
+
type AlertOwnProps = {
|
|
347
460
|
status?: Responsive<'info' | 'success' | 'warning' | 'danger'>;
|
|
348
461
|
icon?: boolean | ReactElement;
|
|
349
462
|
loading?: boolean;
|
|
@@ -426,7 +539,6 @@ declare const AlertDefinition: {
|
|
|
426
539
|
readonly spinner: "bui-AlertSpinner";
|
|
427
540
|
readonly actions: "bui-AlertActions";
|
|
428
541
|
};
|
|
429
|
-
readonly surface: "container";
|
|
430
542
|
readonly propDefs: {
|
|
431
543
|
readonly status: {
|
|
432
544
|
readonly dataAttribute: true;
|
|
@@ -439,7 +551,6 @@ declare const AlertDefinition: {
|
|
|
439
551
|
readonly customActions: {};
|
|
440
552
|
readonly title: {};
|
|
441
553
|
readonly description: {};
|
|
442
|
-
readonly surface: {};
|
|
443
554
|
readonly className: {};
|
|
444
555
|
readonly style: {};
|
|
445
556
|
};
|
|
@@ -489,7 +600,7 @@ declare const AvatarDefinition: {
|
|
|
489
600
|
};
|
|
490
601
|
|
|
491
602
|
/** @public */
|
|
492
|
-
type ButtonOwnProps =
|
|
603
|
+
type ButtonOwnProps = {
|
|
493
604
|
size?: Responsive<'small' | 'medium'>;
|
|
494
605
|
variant?: Responsive<'primary' | 'secondary' | 'tertiary'>;
|
|
495
606
|
destructive?: boolean;
|
|
@@ -553,7 +664,7 @@ declare const ButtonDefinition: {
|
|
|
553
664
|
readonly content: "bui-ButtonContent";
|
|
554
665
|
readonly spinner: "bui-ButtonSpinner";
|
|
555
666
|
};
|
|
556
|
-
readonly
|
|
667
|
+
readonly bg: "consumer";
|
|
557
668
|
readonly propDefs: {
|
|
558
669
|
readonly size: {
|
|
559
670
|
readonly dataAttribute: true;
|
|
@@ -571,44 +682,59 @@ declare const ButtonDefinition: {
|
|
|
571
682
|
};
|
|
572
683
|
readonly iconStart: {};
|
|
573
684
|
readonly iconEnd: {};
|
|
574
|
-
readonly onSurface: {};
|
|
575
685
|
readonly children: {};
|
|
576
686
|
readonly className: {};
|
|
577
687
|
readonly style: {};
|
|
578
688
|
};
|
|
579
689
|
};
|
|
580
690
|
|
|
691
|
+
/** @public */
|
|
692
|
+
type CardOwnProps = {
|
|
693
|
+
children?: ReactNode;
|
|
694
|
+
className?: string;
|
|
695
|
+
};
|
|
581
696
|
/**
|
|
582
697
|
* Props for the Card component.
|
|
583
698
|
*
|
|
584
699
|
* @public
|
|
585
700
|
*/
|
|
586
|
-
interface CardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
587
|
-
children?: React.ReactNode;
|
|
701
|
+
interface CardProps extends CardOwnProps, React.HTMLAttributes<HTMLDivElement> {
|
|
588
702
|
}
|
|
703
|
+
/** @public */
|
|
704
|
+
type CardHeaderOwnProps = {
|
|
705
|
+
children?: ReactNode;
|
|
706
|
+
className?: string;
|
|
707
|
+
};
|
|
589
708
|
/**
|
|
590
709
|
* Props for the CardHeader component.
|
|
591
710
|
*
|
|
592
711
|
* @public
|
|
593
712
|
*/
|
|
594
|
-
interface CardHeaderProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
595
|
-
children?: React.ReactNode;
|
|
713
|
+
interface CardHeaderProps extends CardHeaderOwnProps, React.HTMLAttributes<HTMLDivElement> {
|
|
596
714
|
}
|
|
715
|
+
/** @public */
|
|
716
|
+
type CardBodyOwnProps = {
|
|
717
|
+
children?: ReactNode;
|
|
718
|
+
className?: string;
|
|
719
|
+
};
|
|
597
720
|
/**
|
|
598
721
|
* Props for the CardBody component.
|
|
599
722
|
*
|
|
600
723
|
* @public
|
|
601
724
|
*/
|
|
602
|
-
interface CardBodyProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
603
|
-
children?: React.ReactNode;
|
|
725
|
+
interface CardBodyProps extends CardBodyOwnProps, React.HTMLAttributes<HTMLDivElement> {
|
|
604
726
|
}
|
|
727
|
+
/** @public */
|
|
728
|
+
type CardFooterOwnProps = {
|
|
729
|
+
children?: ReactNode;
|
|
730
|
+
className?: string;
|
|
731
|
+
};
|
|
605
732
|
/**
|
|
606
733
|
* Props for the CardFooter component.
|
|
607
734
|
*
|
|
608
735
|
* @public
|
|
609
736
|
*/
|
|
610
|
-
interface CardFooterProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
611
|
-
children?: React.ReactNode;
|
|
737
|
+
interface CardFooterProps extends CardFooterOwnProps, React.HTMLAttributes<HTMLDivElement> {
|
|
612
738
|
}
|
|
613
739
|
|
|
614
740
|
/**
|
|
@@ -641,11 +767,63 @@ declare const CardFooter: react.ForwardRefExoticComponent<CardFooterProps & reac
|
|
|
641
767
|
* @public
|
|
642
768
|
*/
|
|
643
769
|
declare const CardDefinition: {
|
|
770
|
+
readonly styles: {
|
|
771
|
+
readonly [key: string]: string;
|
|
772
|
+
};
|
|
644
773
|
readonly classNames: {
|
|
645
774
|
readonly root: "bui-Card";
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
readonly
|
|
775
|
+
};
|
|
776
|
+
readonly propDefs: {
|
|
777
|
+
readonly children: {};
|
|
778
|
+
readonly className: {};
|
|
779
|
+
};
|
|
780
|
+
};
|
|
781
|
+
/**
|
|
782
|
+
* Component definition for CardHeader
|
|
783
|
+
* @public
|
|
784
|
+
*/
|
|
785
|
+
declare const CardHeaderDefinition: {
|
|
786
|
+
readonly styles: {
|
|
787
|
+
readonly [key: string]: string;
|
|
788
|
+
};
|
|
789
|
+
readonly classNames: {
|
|
790
|
+
readonly root: "bui-CardHeader";
|
|
791
|
+
};
|
|
792
|
+
readonly propDefs: {
|
|
793
|
+
readonly children: {};
|
|
794
|
+
readonly className: {};
|
|
795
|
+
};
|
|
796
|
+
};
|
|
797
|
+
/**
|
|
798
|
+
* Component definition for CardBody
|
|
799
|
+
* @public
|
|
800
|
+
*/
|
|
801
|
+
declare const CardBodyDefinition: {
|
|
802
|
+
readonly styles: {
|
|
803
|
+
readonly [key: string]: string;
|
|
804
|
+
};
|
|
805
|
+
readonly classNames: {
|
|
806
|
+
readonly root: "bui-CardBody";
|
|
807
|
+
};
|
|
808
|
+
readonly propDefs: {
|
|
809
|
+
readonly children: {};
|
|
810
|
+
readonly className: {};
|
|
811
|
+
};
|
|
812
|
+
};
|
|
813
|
+
/**
|
|
814
|
+
* Component definition for CardFooter
|
|
815
|
+
* @public
|
|
816
|
+
*/
|
|
817
|
+
declare const CardFooterDefinition: {
|
|
818
|
+
readonly styles: {
|
|
819
|
+
readonly [key: string]: string;
|
|
820
|
+
};
|
|
821
|
+
readonly classNames: {
|
|
822
|
+
readonly root: "bui-CardFooter";
|
|
823
|
+
};
|
|
824
|
+
readonly propDefs: {
|
|
825
|
+
readonly children: {};
|
|
826
|
+
readonly className: {};
|
|
649
827
|
};
|
|
650
828
|
};
|
|
651
829
|
|
|
@@ -831,11 +1009,11 @@ declare const TabsDefinition: {
|
|
|
831
1009
|
};
|
|
832
1010
|
|
|
833
1011
|
/**
|
|
834
|
-
* Props for the
|
|
1012
|
+
* Props for the {@link PluginHeader} component.
|
|
835
1013
|
*
|
|
836
1014
|
* @public
|
|
837
1015
|
*/
|
|
838
|
-
interface
|
|
1016
|
+
interface PluginHeaderProps {
|
|
839
1017
|
icon?: React.ReactNode;
|
|
840
1018
|
title?: string;
|
|
841
1019
|
titleLink?: string;
|
|
@@ -867,25 +1045,27 @@ declare module 'react-aria-components' {
|
|
|
867
1045
|
}
|
|
868
1046
|
}
|
|
869
1047
|
/**
|
|
870
|
-
* A component that renders a
|
|
1048
|
+
* A component that renders a plugin header with icon, title, custom actions,
|
|
1049
|
+
* and navigation tabs.
|
|
871
1050
|
*
|
|
872
1051
|
* @public
|
|
873
1052
|
*/
|
|
874
|
-
declare const
|
|
1053
|
+
declare const PluginHeader: (props: PluginHeaderProps) => react_jsx_runtime.JSX.Element;
|
|
875
1054
|
|
|
876
1055
|
/**
|
|
877
|
-
* Component definition for
|
|
1056
|
+
* Component definition for PluginHeader
|
|
878
1057
|
* @public
|
|
879
1058
|
*/
|
|
880
|
-
declare const
|
|
1059
|
+
declare const PluginHeaderDefinition: {
|
|
881
1060
|
readonly classNames: {
|
|
882
|
-
readonly
|
|
883
|
-
readonly
|
|
884
|
-
readonly
|
|
885
|
-
readonly
|
|
886
|
-
readonly
|
|
887
|
-
readonly
|
|
888
|
-
readonly
|
|
1061
|
+
readonly root: "bui-PluginHeader";
|
|
1062
|
+
readonly toolbar: "bui-PluginHeaderToolbar";
|
|
1063
|
+
readonly toolbarWrapper: "bui-PluginHeaderToolbarWrapper";
|
|
1064
|
+
readonly toolbarContent: "bui-PluginHeaderToolbarContent";
|
|
1065
|
+
readonly toolbarControls: "bui-PluginHeaderToolbarControls";
|
|
1066
|
+
readonly toolbarIcon: "bui-PluginHeaderToolbarIcon";
|
|
1067
|
+
readonly toolbarName: "bui-PluginHeaderToolbarName";
|
|
1068
|
+
readonly tabsWrapper: "bui-PluginHeaderTabsWrapper";
|
|
889
1069
|
};
|
|
890
1070
|
};
|
|
891
1071
|
|
|
@@ -933,7 +1113,7 @@ declare const HeaderPageDefinition: {
|
|
|
933
1113
|
};
|
|
934
1114
|
|
|
935
1115
|
/** @public */
|
|
936
|
-
type ButtonIconOwnProps =
|
|
1116
|
+
type ButtonIconOwnProps = {
|
|
937
1117
|
size?: Responsive<'small' | 'medium'>;
|
|
938
1118
|
variant?: Responsive<'primary' | 'secondary' | 'tertiary'>;
|
|
939
1119
|
icon?: ReactElement;
|
|
@@ -965,7 +1145,7 @@ declare const ButtonIconDefinition: {
|
|
|
965
1145
|
readonly content: "bui-ButtonIconContent";
|
|
966
1146
|
readonly spinner: "bui-ButtonIconSpinner";
|
|
967
1147
|
};
|
|
968
|
-
readonly
|
|
1148
|
+
readonly bg: "consumer";
|
|
969
1149
|
readonly propDefs: {
|
|
970
1150
|
readonly size: {
|
|
971
1151
|
readonly dataAttribute: true;
|
|
@@ -979,14 +1159,13 @@ declare const ButtonIconDefinition: {
|
|
|
979
1159
|
readonly dataAttribute: true;
|
|
980
1160
|
};
|
|
981
1161
|
readonly icon: {};
|
|
982
|
-
readonly onSurface: {};
|
|
983
1162
|
readonly className: {};
|
|
984
1163
|
readonly style: {};
|
|
985
1164
|
};
|
|
986
1165
|
};
|
|
987
1166
|
|
|
988
1167
|
/** @public */
|
|
989
|
-
type ButtonLinkOwnProps =
|
|
1168
|
+
type ButtonLinkOwnProps = {
|
|
990
1169
|
size?: Responsive<'small' | 'medium'>;
|
|
991
1170
|
variant?: Responsive<'primary' | 'secondary' | 'tertiary'>;
|
|
992
1171
|
iconStart?: ReactElement;
|
|
@@ -1018,7 +1197,7 @@ declare const ButtonLinkDefinition: {
|
|
|
1018
1197
|
readonly root: "bui-ButtonLink";
|
|
1019
1198
|
readonly content: "bui-ButtonLinkContent";
|
|
1020
1199
|
};
|
|
1021
|
-
readonly
|
|
1200
|
+
readonly bg: "consumer";
|
|
1022
1201
|
readonly propDefs: {
|
|
1023
1202
|
readonly size: {
|
|
1024
1203
|
readonly dataAttribute: true;
|
|
@@ -1030,7 +1209,6 @@ declare const ButtonLinkDefinition: {
|
|
|
1030
1209
|
};
|
|
1031
1210
|
readonly iconStart: {};
|
|
1032
1211
|
readonly iconEnd: {};
|
|
1033
|
-
readonly onSurface: {};
|
|
1034
1212
|
readonly children: {};
|
|
1035
1213
|
readonly className: {};
|
|
1036
1214
|
readonly style: {};
|
|
@@ -1937,8 +2115,6 @@ interface ToggleButtonProps extends ToggleButtonProps$1 {
|
|
|
1937
2115
|
size?: 'small' | 'medium' | Partial<Record<Breakpoint, 'small' | 'medium'>>;
|
|
1938
2116
|
iconStart?: ReactElement;
|
|
1939
2117
|
iconEnd?: ReactElement;
|
|
1940
|
-
/** Surface the toggle button is placed on. Defaults to context surface if available */
|
|
1941
|
-
onSurface?: Responsive<Surface>;
|
|
1942
2118
|
}
|
|
1943
2119
|
|
|
1944
2120
|
/** @public */
|
|
@@ -2016,5 +2192,55 @@ declare const useBreakpoint: () => {
|
|
|
2016
2192
|
down: (key: Breakpoint) => boolean;
|
|
2017
2193
|
};
|
|
2018
2194
|
|
|
2019
|
-
|
|
2020
|
-
|
|
2195
|
+
/** @public */
|
|
2196
|
+
interface BgContextValue {
|
|
2197
|
+
bg: ContainerBg | undefined;
|
|
2198
|
+
}
|
|
2199
|
+
/** @public */
|
|
2200
|
+
interface BgProviderProps {
|
|
2201
|
+
bg: ContainerBg;
|
|
2202
|
+
children: ReactNode;
|
|
2203
|
+
}
|
|
2204
|
+
/**
|
|
2205
|
+
* Provider component that establishes the bg context for child components.
|
|
2206
|
+
*
|
|
2207
|
+
* @public
|
|
2208
|
+
*/
|
|
2209
|
+
declare const BgProvider: ({ bg, children }: BgProviderProps) => react_jsx_runtime.JSX.Element;
|
|
2210
|
+
/**
|
|
2211
|
+
* Hook for consumer components (e.g. Button) to read the parent bg context.
|
|
2212
|
+
*
|
|
2213
|
+
* Returns the parent container's bg unchanged. The consumer component's CSS
|
|
2214
|
+
* handles the visual step-up (e.g. on a neutral-1 surface, the consumer
|
|
2215
|
+
* uses neutral-2 tokens via `data-on-bg`).
|
|
2216
|
+
*
|
|
2217
|
+
* @public
|
|
2218
|
+
*/
|
|
2219
|
+
declare function useBgConsumer(): BgContextValue;
|
|
2220
|
+
/**
|
|
2221
|
+
* Hook for provider components (e.g. Box, Card) to resolve and provide bg context.
|
|
2222
|
+
*
|
|
2223
|
+
* **Resolution rules:**
|
|
2224
|
+
*
|
|
2225
|
+
* - `bg` is `undefined` -- transparent, no context change, returns `{ bg: undefined }`.
|
|
2226
|
+
* This is the default for Box, Flex, and Grid (they do **not** auto-increment).
|
|
2227
|
+
* - `bg` is a `ContainerBg` value -- uses that value directly (e.g. `'neutral-1'`).
|
|
2228
|
+
* - `bg` is `'neutral-auto'` -- increments the neutral level from the parent context,
|
|
2229
|
+
* capping at `neutral-3`. Only components that explicitly pass `'neutral-auto'`
|
|
2230
|
+
* (e.g. Card) will auto-increment; it is never implicit.
|
|
2231
|
+
*
|
|
2232
|
+
* **Capping:**
|
|
2233
|
+
*
|
|
2234
|
+
* Provider components cap at `neutral-3`. The `neutral-4` level is **not** a valid
|
|
2235
|
+
* prop value -- it exists only in consumer component CSS (e.g. a Button on a
|
|
2236
|
+
* `neutral-3` surface renders with `neutral-4` tokens via `data-on-bg`).
|
|
2237
|
+
*
|
|
2238
|
+
* The caller is responsible for wrapping children with `BgProvider` when the
|
|
2239
|
+
* resolved bg is defined.
|
|
2240
|
+
*
|
|
2241
|
+
* @public
|
|
2242
|
+
*/
|
|
2243
|
+
declare function useBgProvider(bg?: Responsive<ProviderBg>): BgContextValue;
|
|
2244
|
+
|
|
2245
|
+
export { Accordion, AccordionDefinition, AccordionGroup, AccordionGroupDefinition, AccordionPanel, AccordionPanelDefinition, AccordionTrigger, AccordionTriggerDefinition, Alert, AlertDefinition, Avatar, AvatarDefinition, BgProvider, Box, BoxDefinition, Button, ButtonDefinition, ButtonIcon, ButtonIconDefinition, ButtonLink, ButtonLinkDefinition, Card, CardBody, CardBodyDefinition, CardDefinition, CardFooter, CardFooterDefinition, CardHeader, CardHeaderDefinition, Cell, CellProfile, CellText, Checkbox, CheckboxDefinition, Column, Container, ContainerDefinition, Dialog, DialogBody, DialogDefinition, DialogFooter, DialogHeader, DialogTrigger, FieldLabel, FieldLabelDefinition, Flex, FlexDefinition, FullPage, FullPageDefinition, Grid, GridDefinition, GridItemDefinition, HeaderPage, HeaderPageDefinition, Link, LinkDefinition, Menu, MenuAutocomplete, MenuAutocompleteListbox, MenuDefinition, MenuItem, MenuListBox, MenuListBoxItem, MenuSection, MenuSeparator, MenuTrigger, PasswordField, PasswordFieldDefinition, PluginHeader, PluginHeaderDefinition, Popover, PopoverDefinition, Radio, RadioGroup, RadioGroupDefinition, Row, SearchField, SearchFieldDefinition, Select, SelectDefinition, Skeleton, SkeletonDefinition, SubmenuTrigger, Switch, SwitchDefinition, Tab, TabList, TabPanel, Table, TableBody, TableDefinition, TableHeader, TablePagination, TablePaginationDefinition, TableRoot, Tabs, TabsDefinition, Tag, TagGroup, TagGroupDefinition, Text, TextDefinition, TextField, TextFieldDefinition, ToggleButton, ToggleButtonDefinition, ToggleButtonGroup, ToggleButtonGroupDefinition, Tooltip, TooltipDefinition, TooltipTrigger, VisuallyHidden, VisuallyHiddenDefinition, useBgConsumer, useBgProvider, useBreakpoint, useTable };
|
|
2246
|
+
export type { AccordionGroupOwnProps, AccordionGroupProps, AccordionOwnProps, AccordionPanelOwnProps, AccordionPanelProps, AccordionProps, AccordionTriggerOwnProps, AccordionTriggerProps, AlertOwnProps, AlertProps, AlignItems, AvatarProps, BgContextValue, BgProviderProps, Border, BorderRadius, BoxOwnProps, BoxProps, BoxUtilityProps, Breakpoint, ButtonIconOwnProps, ButtonIconProps, ButtonLinkOwnProps, ButtonLinkProps, ButtonOwnProps, ButtonProps, CardBodyOwnProps, CardBodyProps, CardFooterOwnProps, CardFooterProps, CardHeaderOwnProps, CardHeaderProps, CardOwnProps, CardProps, CellProfileProps, CellProps, CellTextProps, CheckboxProps, ClassNamesMap, ColumnConfig, ColumnProps, Columns, ComponentDefinition, ContainerBg, ContainerProps, CursorParams, CursorResponse, DataAttributeValues, DataAttributesMap, DialogBodyProps, DialogHeaderProps, DialogProps, DialogTriggerProps, Display, FieldLabelProps, FilterState, FlexDirection, FlexProps, FlexWrap, FullPageProps, GridItemProps, GridProps, HeaderPageBreadcrumb, HeaderPageProps, HeaderTab, JustifyContent, LinkProps, MarginProps, MenuAutocompleteListBoxProps, MenuAutocompleteProps, MenuItemProps, MenuListBoxItemProps, MenuListBoxProps, MenuProps, MenuSectionProps, MenuSeparatorProps, MenuTriggerProps, NoPagination, OffsetParams, OffsetResponse, Option, PaddingProps, PagePagination, PageSizeOption, PaginationOptions, PasswordFieldProps, PluginHeaderProps, PopoverProps, ProviderBg, QueryOptions, RadioGroupProps, RadioProps, Responsive, RowConfig, RowRenderFn, SearchFieldProps, SearchState, SelectProps, SkeletonProps, SortDescriptor, SortState, Space, SpaceProps, SubmenuTriggerProps, SwitchProps, TabListProps, TabMatchStrategy, TabPanelProps, TabProps, TableItem, TablePaginationProps, TablePaginationType, TableProps, TableRootProps, TableSelection, TabsProps, TagGroupProps, TagProps, TextColorStatus, TextColors, TextFieldProps, TextOwnProps, TextProps, TextVariants, TextWeights, ToggleButtonGroupProps, ToggleButtonProps, TooltipProps, UseTableCompleteOptions, UseTableCursorOptions, UseTableOffsetOptions, UseTableOptions, UseTableResult, UtilityProps, VisuallyHiddenProps };
|
package/dist/index.esm.js
CHANGED
|
@@ -6,8 +6,10 @@ export { Flex } from './components/Flex/Flex.esm.js';
|
|
|
6
6
|
export { FlexDefinition } from './components/Flex/definition.esm.js';
|
|
7
7
|
export { Container } from './components/Container/Container.esm.js';
|
|
8
8
|
export { ContainerDefinition } from './components/Container/definition.esm.js';
|
|
9
|
+
export { FullPage } from './components/FullPage/FullPage.esm.js';
|
|
10
|
+
export { FullPageDefinition } from './components/FullPage/definition.esm.js';
|
|
9
11
|
export { Accordion, AccordionGroup, AccordionPanel, AccordionTrigger } from './components/Accordion/Accordion.esm.js';
|
|
10
|
-
export { AccordionDefinition } from './components/Accordion/definition.esm.js';
|
|
12
|
+
export { AccordionDefinition, AccordionGroupDefinition, AccordionPanelDefinition, AccordionTriggerDefinition } from './components/Accordion/definition.esm.js';
|
|
11
13
|
export { Alert } from './components/Alert/Alert.esm.js';
|
|
12
14
|
export { AlertDefinition } from './components/Alert/definition.esm.js';
|
|
13
15
|
export { Avatar } from './components/Avatar/Avatar.esm.js';
|
|
@@ -15,13 +17,13 @@ export { AvatarDefinition } from './components/Avatar/definition.esm.js';
|
|
|
15
17
|
export { Button } from './components/Button/Button.esm.js';
|
|
16
18
|
export { ButtonDefinition } from './components/Button/definition.esm.js';
|
|
17
19
|
export { Card, CardBody, CardFooter, CardHeader } from './components/Card/Card.esm.js';
|
|
18
|
-
export { CardDefinition } from './components/Card/definition.esm.js';
|
|
20
|
+
export { CardBodyDefinition, CardDefinition, CardFooterDefinition, CardHeaderDefinition } from './components/Card/definition.esm.js';
|
|
19
21
|
export { Dialog, DialogBody, DialogFooter, DialogHeader, DialogTrigger } from './components/Dialog/Dialog.esm.js';
|
|
20
22
|
export { DialogDefinition } from './components/Dialog/definition.esm.js';
|
|
21
23
|
export { FieldLabel } from './components/FieldLabel/FieldLabel.esm.js';
|
|
22
24
|
export { FieldLabelDefinition } from './components/FieldLabel/definition.esm.js';
|
|
23
|
-
export {
|
|
24
|
-
export {
|
|
25
|
+
export { PluginHeader } from './components/PluginHeader/PluginHeader.esm.js';
|
|
26
|
+
export { PluginHeaderDefinition } from './components/PluginHeader/definition.esm.js';
|
|
25
27
|
export { HeaderPage } from './components/HeaderPage/HeaderPage.esm.js';
|
|
26
28
|
export { HeaderPageDefinition } from './components/HeaderPage/definition.esm.js';
|
|
27
29
|
export { ButtonIcon } from './components/ButtonIcon/ButtonIcon.esm.js';
|
|
@@ -78,4 +80,5 @@ export { ToggleButtonGroupDefinition } from './components/ToggleButtonGroup/defi
|
|
|
78
80
|
export { VisuallyHidden } from './components/VisuallyHidden/VisuallyHidden.esm.js';
|
|
79
81
|
export { VisuallyHiddenDefinition } from './components/VisuallyHidden/definition.esm.js';
|
|
80
82
|
export { useBreakpoint } from './hooks/useBreakpoint.esm.js';
|
|
83
|
+
export { BgProvider, useBgConsumer, useBgProvider } from './hooks/useBg.esm.js';
|
|
81
84
|
//# sourceMappingURL=index.esm.js.map
|