@backstage/ui 0.11.2 → 0.12.0-next.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 (70) hide show
  1. package/CHANGELOG.md +304 -108
  2. package/css/styles.css +25 -19
  3. package/dist/components/Alert/Alert.esm.js +81 -0
  4. package/dist/components/Alert/Alert.esm.js.map +1 -0
  5. package/dist/components/Alert/Alert.module.css.esm.js +8 -0
  6. package/dist/components/Alert/Alert.module.css.esm.js.map +1 -0
  7. package/dist/components/Alert/definition.esm.js +37 -0
  8. package/dist/components/Alert/definition.esm.js.map +1 -0
  9. package/dist/components/Box/Box.esm.js +10 -23
  10. package/dist/components/Box/Box.esm.js.map +1 -1
  11. package/dist/components/Box/definition.esm.js +20 -6
  12. package/dist/components/Box/definition.esm.js.map +1 -1
  13. package/dist/components/Button/Button.esm.js +12 -35
  14. package/dist/components/Button/Button.esm.js.map +1 -1
  15. package/dist/components/Button/Button.module.css.esm.js +3 -3
  16. package/dist/components/Button/definition.esm.js +23 -6
  17. package/dist/components/Button/definition.esm.js.map +1 -1
  18. package/dist/components/ButtonIcon/ButtonIcon.esm.js +9 -40
  19. package/dist/components/ButtonIcon/ButtonIcon.esm.js.map +1 -1
  20. package/dist/components/ButtonIcon/ButtonIcon.module.css.esm.js +3 -3
  21. package/dist/components/ButtonIcon/definition.esm.js +21 -2
  22. package/dist/components/ButtonIcon/definition.esm.js.map +1 -1
  23. package/dist/components/ButtonLink/ButtonLink.esm.js +16 -43
  24. package/dist/components/ButtonLink/ButtonLink.esm.js.map +1 -1
  25. package/dist/components/ButtonLink/ButtonLink.module.css.esm.js +8 -0
  26. package/dist/components/ButtonLink/ButtonLink.module.css.esm.js.map +1 -0
  27. package/dist/components/ButtonLink/definition.esm.js +24 -3
  28. package/dist/components/ButtonLink/definition.esm.js.map +1 -1
  29. package/dist/components/Dialog/Dialog.esm.js +3 -0
  30. package/dist/components/Dialog/Dialog.esm.js.map +1 -1
  31. package/dist/components/HeaderPage/HeaderPage.esm.js +1 -0
  32. package/dist/components/HeaderPage/HeaderPage.esm.js.map +1 -1
  33. package/dist/components/InternalLinkProvider/InternalLinkProvider.esm.js +55 -0
  34. package/dist/components/InternalLinkProvider/InternalLinkProvider.esm.js.map +1 -0
  35. package/dist/components/Link/Link.esm.js +3 -9
  36. package/dist/components/Link/Link.esm.js.map +1 -1
  37. package/dist/components/Link/Link.module.css.esm.js +2 -2
  38. package/dist/components/Link/definition.esm.js +10 -2
  39. package/dist/components/Link/definition.esm.js.map +1 -1
  40. package/dist/components/Menu/Menu.esm.js +13 -16
  41. package/dist/components/Menu/Menu.esm.js.map +1 -1
  42. package/dist/components/Popover/Popover.module.css.esm.js +2 -2
  43. package/dist/components/Switch/Switch.module.css.esm.js +2 -2
  44. package/dist/components/Table/components/Row.esm.js +5 -18
  45. package/dist/components/Table/components/Row.esm.js.map +1 -1
  46. package/dist/components/Table/components/Table.esm.js +4 -4
  47. package/dist/components/Table/components/Table.esm.js.map +1 -1
  48. package/dist/components/TablePagination/TablePagination.esm.js +4 -1
  49. package/dist/components/TablePagination/TablePagination.esm.js.map +1 -1
  50. package/dist/components/Tabs/Tabs.esm.js +120 -54
  51. package/dist/components/Tabs/Tabs.esm.js.map +1 -1
  52. package/dist/components/TagGroup/TagGroup.esm.js +7 -13
  53. package/dist/components/TagGroup/TagGroup.esm.js.map +1 -1
  54. package/dist/components/Text/Text.module.css.esm.js +2 -2
  55. package/dist/components/Text/definition.esm.js +8 -1
  56. package/dist/components/Text/definition.esm.js.map +1 -1
  57. package/dist/components/Tooltip/Tooltip.module.css.esm.js +2 -2
  58. package/dist/hooks/useDefinition/defineComponent.esm.js +6 -0
  59. package/dist/hooks/useDefinition/defineComponent.esm.js.map +1 -0
  60. package/dist/hooks/useDefinition/helpers.esm.js +69 -0
  61. package/dist/hooks/useDefinition/helpers.esm.js.map +1 -0
  62. package/dist/hooks/useDefinition/useDefinition.esm.js +76 -0
  63. package/dist/hooks/useDefinition/useDefinition.esm.js.map +1 -0
  64. package/dist/hooks/useStyles.esm.js +7 -54
  65. package/dist/hooks/useStyles.esm.js.map +1 -1
  66. package/dist/index.d.ts +322 -107
  67. package/dist/index.esm.js +4 -2
  68. package/dist/index.esm.js.map +1 -1
  69. package/dist/utils/utilityClassMap.esm.js.map +1 -1
  70. package/package.json +6 -6
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as react from 'react';
2
- import { ReactElement, ReactNode, ElementType, ComponentPropsWithRef, ComponentProps } from 'react';
3
- import { ButtonProps as ButtonProps$1, DisclosureProps, HeadingProps, DisclosurePanelProps, DisclosureGroupProps, DialogTriggerProps as DialogTriggerProps$1, ModalOverlayProps, TabsProps as TabsProps$1, TabListProps as TabListProps$1, TabProps as TabProps$1, TabPanelProps as TabPanelProps$1, LinkProps as LinkProps$1, CheckboxProps as CheckboxProps$1, RadioGroupProps as RadioGroupProps$1, RadioProps as RadioProps$1, TableProps as TableProps$1, ColumnProps as ColumnProps$1, CellProps as CellProps$1, TableHeaderProps, TableBodyProps, RowProps, TagGroupProps as TagGroupProps$1, TagListProps, TagProps as TagProps$1, TextFieldProps as TextFieldProps$1, TooltipProps as TooltipProps$1, TooltipTriggerComponentProps, MenuTriggerProps as MenuTriggerProps$1, SubmenuTriggerProps as SubmenuTriggerProps$1, MenuProps as MenuProps$1, PopoverProps as PopoverProps$1, ListBoxProps, MenuItemProps as MenuItemProps$1, ListBoxItemProps, MenuSectionProps as MenuSectionProps$1, SeparatorProps, SearchFieldProps as SearchFieldProps$1, SelectProps as SelectProps$1, SwitchProps as SwitchProps$1, ToggleButtonProps as ToggleButtonProps$1, ToggleButtonGroupProps as ToggleButtonGroupProps$1 } from 'react-aria-components';
2
+ import { ReactNode, CSSProperties, ReactElement, ElementType, ComponentPropsWithRef, ComponentProps } from 'react';
3
+ import { DisclosureProps, HeadingProps, DisclosurePanelProps, DisclosureGroupProps, ButtonProps as ButtonProps$1, DialogTriggerProps as DialogTriggerProps$1, ModalOverlayProps, TabsProps as TabsProps$1, TabListProps as TabListProps$1, TabProps as TabProps$1, TabPanelProps as TabPanelProps$1, LinkProps as LinkProps$1, CheckboxProps as CheckboxProps$1, RadioGroupProps as RadioGroupProps$1, RadioProps as RadioProps$1, TableProps as TableProps$1, ColumnProps as ColumnProps$1, CellProps as CellProps$1, TableHeaderProps, TableBodyProps, RowProps, TagGroupProps as TagGroupProps$1, TagListProps, TagProps as TagProps$1, TextFieldProps as TextFieldProps$1, TooltipProps as TooltipProps$1, TooltipTriggerComponentProps, MenuTriggerProps as MenuTriggerProps$1, SubmenuTriggerProps as SubmenuTriggerProps$1, MenuProps as MenuProps$1, PopoverProps as PopoverProps$1, ListBoxProps, MenuItemProps as MenuItemProps$1, ListBoxItemProps, MenuSectionProps as MenuSectionProps$1, SeparatorProps, SearchFieldProps as SearchFieldProps$1, SelectProps as SelectProps$1, SwitchProps as SwitchProps$1, ToggleButtonProps as ToggleButtonProps$1, ToggleButtonGroupProps as ToggleButtonGroupProps$1 } from 'react-aria-components';
4
4
  import * as react_jsx_runtime from 'react/jsx-runtime';
5
5
  import { NavigateOptions } from 'react-router-dom';
6
6
  import { SortDescriptor as SortDescriptor$1 } from 'react-stately';
@@ -29,7 +29,7 @@ type Border = 'none' | 'base' | 'error' | 'warning' | 'selected';
29
29
  /** @public */
30
30
  type Columns = '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10' | '11' | '12' | 'auto';
31
31
  /** @public */
32
- interface SpaceProps {
32
+ interface MarginProps {
33
33
  m?: Responsive<Space>;
34
34
  mb?: Responsive<Space>;
35
35
  ml?: Responsive<Space>;
@@ -37,6 +37,9 @@ interface SpaceProps {
37
37
  mt?: Responsive<Space>;
38
38
  mx?: Responsive<Space>;
39
39
  my?: Responsive<Space>;
40
+ }
41
+ /** @public */
42
+ interface PaddingProps {
40
43
  p?: Responsive<Space>;
41
44
  pb?: Responsive<Space>;
42
45
  pl?: Responsive<Space>;
@@ -46,11 +49,14 @@ interface SpaceProps {
46
49
  py?: Responsive<Space>;
47
50
  }
48
51
  /** @public */
52
+ interface SpaceProps extends MarginProps, PaddingProps {
53
+ }
54
+ /** @public */
49
55
  type TextVariants = 'title-large' | 'title-medium' | 'title-small' | 'title-x-small' | 'body-large' | 'body-medium' | 'body-small' | 'body-x-small';
50
56
  /** @public */
51
57
  type TextColors = 'primary' | 'secondary';
52
58
  /** @public */
53
- type TextColorStatus = 'danger' | 'warning' | 'success';
59
+ type TextColorStatus = 'danger' | 'warning' | 'success' | 'info';
54
60
  /** @public */
55
61
  type TextWeights = 'regular' | 'bold';
56
62
  /** @public */
@@ -102,22 +108,36 @@ interface ComponentDefinition {
102
108
  * @public
103
109
  */
104
110
  type Surface = '0' | '1' | '2' | '3' | 'danger' | 'warning' | 'success' | 'auto';
111
+ /** @public */
112
+ interface LeafSurfaceProps {
113
+ onSurface?: Responsive<Surface>;
114
+ }
115
+ /** @public */
116
+ interface ContainerSurfaceProps {
117
+ surface?: Responsive<Surface>;
118
+ }
105
119
 
106
120
  /** @public */
107
- interface BoxProps extends SpaceProps {
108
- display?: Responsive<'none' | 'flex' | 'block' | 'inline'>;
121
+ type BoxOwnProps = {
109
122
  as?: keyof JSX.IntrinsicElements;
123
+ surface?: Responsive<Surface>;
124
+ children?: ReactNode;
125
+ className?: string;
126
+ style?: CSSProperties;
127
+ };
128
+ /** @public */
129
+ type BoxUtilityProps = {
130
+ display?: Responsive<'none' | 'flex' | 'block' | 'inline'>;
131
+ position?: Responsive<'static' | 'relative' | 'absolute' | 'fixed' | 'sticky'>;
110
132
  width?: Responsive<string>;
111
133
  minWidth?: Responsive<string>;
112
134
  maxWidth?: Responsive<string>;
113
135
  height?: Responsive<string>;
114
136
  minHeight?: Responsive<string>;
115
137
  maxHeight?: Responsive<string>;
116
- position?: Responsive<'static' | 'relative' | 'absolute' | 'fixed' | 'sticky'>;
117
- children?: React.ReactNode;
118
- className?: string;
119
- style?: React.CSSProperties;
120
- surface?: Responsive<Surface>;
138
+ };
139
+ /** @public */
140
+ interface BoxProps extends SpaceProps, BoxOwnProps, BoxUtilityProps, React.HTMLAttributes<HTMLDivElement> {
121
141
  }
122
142
 
123
143
  /** @public */
@@ -128,13 +148,25 @@ declare const Box: react.ForwardRefExoticComponent<BoxProps & react.RefAttribute
128
148
  * @public
129
149
  */
130
150
  declare const BoxDefinition: {
151
+ readonly styles: {
152
+ readonly [key: string]: string;
153
+ };
131
154
  readonly classNames: {
132
155
  readonly root: "bui-Box";
133
156
  };
134
- readonly utilityProps: ["m", "mb", "ml", "mr", "mt", "mx", "my", "p", "pb", "pl", "pr", "pt", "px", "py", "position", "display", "width", "minWidth", "maxWidth", "height", "minHeight", "maxHeight"];
135
- readonly dataAttributes: {
136
- readonly surface: readonly ["0", "1", "2", "3", "danger", "warning", "success"];
157
+ readonly surface: "container";
158
+ readonly propDefs: {
159
+ readonly as: {
160
+ readonly default: "div";
161
+ };
162
+ readonly surface: {
163
+ readonly dataAttribute: true;
164
+ };
165
+ readonly children: {};
166
+ readonly className: {};
167
+ readonly style: {};
137
168
  };
169
+ readonly utilityProps: readonly ["m", "mb", "ml", "mr", "mt", "mx", "my", "p", "pb", "pl", "pr", "pt", "px", "py", "position", "display", "width", "minWidth", "maxWidth", "height", "minHeight", "maxHeight"];
138
170
  };
139
171
 
140
172
  /** @public */
@@ -247,6 +279,173 @@ declare const ContainerDefinition: {
247
279
  readonly utilityProps: ["my", "mt", "mb", "py", "pt", "pb", "display"];
248
280
  };
249
281
 
282
+ /**
283
+ * Props for the Accordion component.
284
+ * @public
285
+ */
286
+ interface AccordionProps extends DisclosureProps {
287
+ className?: string;
288
+ }
289
+ /**
290
+ * Props for the AccordionTrigger component.
291
+ * @public
292
+ */
293
+ interface AccordionTriggerProps extends HeadingProps {
294
+ className?: string;
295
+ title?: string;
296
+ subtitle?: string;
297
+ children?: React.ReactNode;
298
+ }
299
+ /**
300
+ * Props for the AccordionPanel component.
301
+ * @public
302
+ */
303
+ interface AccordionPanelProps extends DisclosurePanelProps {
304
+ className?: string;
305
+ }
306
+ /**
307
+ * Props for the AccordionGroup component.
308
+ * @public
309
+ */
310
+ interface AccordionGroupProps extends DisclosureGroupProps {
311
+ className?: string;
312
+ /**
313
+ * Whether multiple accordions can be expanded at the same time.
314
+ * @defaultValue false
315
+ */
316
+ allowsMultiple?: boolean;
317
+ }
318
+
319
+ /** @public */
320
+ declare const Accordion: react.ForwardRefExoticComponent<AccordionProps & react.RefAttributes<HTMLDivElement>>;
321
+ /** @public */
322
+ declare const AccordionTrigger: react.ForwardRefExoticComponent<AccordionTriggerProps & react.RefAttributes<HTMLHeadingElement>>;
323
+ /** @public */
324
+ declare const AccordionPanel: react.ForwardRefExoticComponent<AccordionPanelProps & react.RefAttributes<HTMLDivElement>>;
325
+ /** @public */
326
+ declare const AccordionGroup: react.ForwardRefExoticComponent<AccordionGroupProps & react.RefAttributes<HTMLDivElement>>;
327
+
328
+ /**
329
+ * Component definition for Accordion
330
+ * @public
331
+ */
332
+ declare const AccordionDefinition: {
333
+ readonly classNames: {
334
+ readonly root: "bui-Accordion";
335
+ readonly trigger: "bui-AccordionTrigger";
336
+ readonly triggerButton: "bui-AccordionTriggerButton";
337
+ readonly triggerTitle: "bui-AccordionTriggerTitle";
338
+ readonly triggerSubtitle: "bui-AccordionTriggerSubtitle";
339
+ readonly triggerIcon: "bui-AccordionTriggerIcon";
340
+ readonly panel: "bui-AccordionPanel";
341
+ readonly group: "bui-AccordionGroup";
342
+ };
343
+ };
344
+
345
+ /** @public */
346
+ type AlertOwnProps = ContainerSurfaceProps & {
347
+ status?: Responsive<'info' | 'success' | 'warning' | 'danger'>;
348
+ icon?: boolean | ReactElement;
349
+ loading?: boolean;
350
+ customActions?: ReactNode;
351
+ title?: ReactNode;
352
+ description?: ReactNode;
353
+ className?: string;
354
+ style?: CSSProperties;
355
+ };
356
+ /**
357
+ * Properties for {@link Alert}
358
+ *
359
+ * @public
360
+ */
361
+ interface AlertProps extends MarginProps, AlertOwnProps {
362
+ }
363
+
364
+ /**
365
+ * A component for displaying alert messages with different status levels.
366
+ *
367
+ * @remarks
368
+ * The Alert component supports multiple status variants (info, success, warning, danger)
369
+ * and can display icons, loading states, and custom actions. It automatically handles
370
+ * icon selection based on status when the icon prop is set to true.
371
+ *
372
+ * @example
373
+ * Basic usage with title only:
374
+ * ```tsx
375
+ * <Alert status="info" title="This is an informational message" />
376
+ * ```
377
+ *
378
+ * @example
379
+ * With title and description:
380
+ * ```tsx
381
+ * <Alert
382
+ * status="warning"
383
+ * icon={true}
384
+ * title="Pending Review"
385
+ * description="Please review the following items before proceeding."
386
+ * />
387
+ * ```
388
+ *
389
+ * @example
390
+ * With custom actions and loading state:
391
+ * ```tsx
392
+ * <Alert
393
+ * status="success"
394
+ * icon={true}
395
+ * title="Operation completed"
396
+ * description="Your changes have been saved successfully."
397
+ * loading={isProcessing}
398
+ * customActions={
399
+ * <>
400
+ * <Button size="small" variant="tertiary">Dismiss</Button>
401
+ * <Button size="small" variant="primary">View</Button>
402
+ * </>
403
+ * }
404
+ * />
405
+ * ```
406
+ *
407
+ * @public
408
+ */
409
+ declare const Alert: react.ForwardRefExoticComponent<AlertProps & react.RefAttributes<HTMLDivElement>>;
410
+
411
+ /**
412
+ * Component definition for Alert
413
+ * @public
414
+ */
415
+ declare const AlertDefinition: {
416
+ readonly styles: {
417
+ readonly [key: string]: string;
418
+ };
419
+ readonly classNames: {
420
+ readonly root: "bui-Alert";
421
+ readonly contentWrapper: "bui-AlertContentWrapper";
422
+ readonly content: "bui-AlertContent";
423
+ readonly title: "bui-AlertTitle";
424
+ readonly description: "bui-AlertDescription";
425
+ readonly icon: "bui-AlertIcon";
426
+ readonly spinner: "bui-AlertSpinner";
427
+ readonly actions: "bui-AlertActions";
428
+ };
429
+ readonly surface: "container";
430
+ readonly propDefs: {
431
+ readonly status: {
432
+ readonly dataAttribute: true;
433
+ readonly default: "info";
434
+ };
435
+ readonly loading: {
436
+ readonly dataAttribute: true;
437
+ };
438
+ readonly icon: {};
439
+ readonly customActions: {};
440
+ readonly title: {};
441
+ readonly description: {};
442
+ readonly surface: {};
443
+ readonly className: {};
444
+ readonly style: {};
445
+ };
446
+ readonly utilityProps: readonly ["m", "mb", "ml", "mr", "mt", "mx", "my"];
447
+ };
448
+
250
449
  /** @public */
251
450
  interface AvatarProps extends React.ComponentPropsWithoutRef<'div'> {
252
451
  /**
@@ -289,20 +488,24 @@ declare const AvatarDefinition: {
289
488
  };
290
489
  };
291
490
 
491
+ /** @public */
492
+ type ButtonOwnProps = LeafSurfaceProps & {
493
+ size?: Responsive<'small' | 'medium'>;
494
+ variant?: Responsive<'primary' | 'secondary' | 'tertiary'>;
495
+ destructive?: boolean;
496
+ iconStart?: ReactElement;
497
+ iconEnd?: ReactElement;
498
+ loading?: boolean;
499
+ children?: ReactNode;
500
+ className?: string;
501
+ style?: CSSProperties;
502
+ };
292
503
  /**
293
504
  * Properties for {@link Button}
294
505
  *
295
506
  * @public
296
507
  */
297
- interface ButtonProps extends ButtonProps$1 {
298
- size?: 'small' | 'medium' | Partial<Record<Breakpoint, 'small' | 'medium'>>;
299
- variant?: 'primary' | 'secondary' | 'tertiary' | Partial<Record<Breakpoint, 'primary' | 'secondary' | 'tertiary'>>;
300
- iconStart?: ReactElement;
301
- iconEnd?: ReactElement;
302
- children?: ReactNode;
303
- loading?: boolean;
304
- /** Surface the button is placed on. Defaults to context surface if available */
305
- onSurface?: Responsive<Surface>;
508
+ interface ButtonProps extends Omit<ButtonProps$1, 'children' | 'className' | 'style'>, ButtonOwnProps {
306
509
  }
307
510
 
308
511
  /**
@@ -342,15 +545,36 @@ declare const Button: react.ForwardRefExoticComponent<ButtonProps & react.RefAtt
342
545
  * @public
343
546
  */
344
547
  declare const ButtonDefinition: {
548
+ readonly styles: {
549
+ readonly [key: string]: string;
550
+ };
345
551
  readonly classNames: {
346
552
  readonly root: "bui-Button";
347
553
  readonly content: "bui-ButtonContent";
348
554
  readonly spinner: "bui-ButtonSpinner";
349
555
  };
350
- readonly dataAttributes: {
351
- readonly size: readonly ["small", "medium", "large"];
352
- readonly variant: readonly ["primary", "secondary", "tertiary"];
353
- readonly loading: readonly [true, false];
556
+ readonly surface: "leaf";
557
+ readonly propDefs: {
558
+ readonly size: {
559
+ readonly dataAttribute: true;
560
+ readonly default: "small";
561
+ };
562
+ readonly variant: {
563
+ readonly dataAttribute: true;
564
+ readonly default: "primary";
565
+ };
566
+ readonly destructive: {
567
+ readonly dataAttribute: true;
568
+ };
569
+ readonly loading: {
570
+ readonly dataAttribute: true;
571
+ };
572
+ readonly iconStart: {};
573
+ readonly iconEnd: {};
574
+ readonly onSurface: {};
575
+ readonly children: {};
576
+ readonly className: {};
577
+ readonly style: {};
354
578
  };
355
579
  };
356
580
 
@@ -425,69 +649,6 @@ declare const CardDefinition: {
425
649
  };
426
650
  };
427
651
 
428
- /**
429
- * Props for the Accordion component.
430
- * @public
431
- */
432
- interface AccordionProps extends DisclosureProps {
433
- className?: string;
434
- }
435
- /**
436
- * Props for the AccordionTrigger component.
437
- * @public
438
- */
439
- interface AccordionTriggerProps extends HeadingProps {
440
- className?: string;
441
- title?: string;
442
- subtitle?: string;
443
- children?: React.ReactNode;
444
- }
445
- /**
446
- * Props for the AccordionPanel component.
447
- * @public
448
- */
449
- interface AccordionPanelProps extends DisclosurePanelProps {
450
- className?: string;
451
- }
452
- /**
453
- * Props for the AccordionGroup component.
454
- * @public
455
- */
456
- interface AccordionGroupProps extends DisclosureGroupProps {
457
- className?: string;
458
- /**
459
- * Whether multiple accordions can be expanded at the same time.
460
- * @defaultValue false
461
- */
462
- allowsMultiple?: boolean;
463
- }
464
-
465
- /** @public */
466
- declare const Accordion: react.ForwardRefExoticComponent<AccordionProps & react.RefAttributes<HTMLDivElement>>;
467
- /** @public */
468
- declare const AccordionTrigger: react.ForwardRefExoticComponent<AccordionTriggerProps & react.RefAttributes<HTMLHeadingElement>>;
469
- /** @public */
470
- declare const AccordionPanel: react.ForwardRefExoticComponent<AccordionPanelProps & react.RefAttributes<HTMLDivElement>>;
471
- /** @public */
472
- declare const AccordionGroup: react.ForwardRefExoticComponent<AccordionGroupProps & react.RefAttributes<HTMLDivElement>>;
473
-
474
- /**
475
- * Component definition for Accordion
476
- * @public
477
- */
478
- declare const AccordionDefinition: {
479
- readonly classNames: {
480
- readonly root: "bui-Accordion";
481
- readonly trigger: "bui-AccordionTrigger";
482
- readonly triggerButton: "bui-AccordionTriggerButton";
483
- readonly triggerTitle: "bui-AccordionTriggerTitle";
484
- readonly triggerSubtitle: "bui-AccordionTriggerSubtitle";
485
- readonly triggerIcon: "bui-AccordionTriggerIcon";
486
- readonly panel: "bui-AccordionPanel";
487
- readonly group: "bui-AccordionGroup";
488
- };
489
- };
490
-
491
652
  /**
492
653
  * Props for the DialogTrigger component.
493
654
  * @public
@@ -771,16 +932,21 @@ declare const HeaderPageDefinition: {
771
932
  };
772
933
  };
773
934
 
935
+ /** @public */
936
+ type ButtonIconOwnProps = LeafSurfaceProps & {
937
+ size?: Responsive<'small' | 'medium'>;
938
+ variant?: Responsive<'primary' | 'secondary' | 'tertiary'>;
939
+ icon?: ReactElement;
940
+ loading?: boolean;
941
+ className?: string;
942
+ style?: CSSProperties;
943
+ };
774
944
  /**
775
945
  * Properties for {@link ButtonIcon}
776
946
  *
777
947
  * @public
778
948
  */
779
- interface ButtonIconProps extends ButtonProps$1 {
780
- size?: 'small' | 'medium' | Partial<Record<Breakpoint, 'small' | 'medium'>>;
781
- variant?: 'primary' | 'secondary' | 'tertiary' | Partial<Record<Breakpoint, 'primary' | 'secondary' | 'tertiary'>>;
782
- icon?: ReactElement;
783
- loading?: boolean;
949
+ interface ButtonIconProps extends Omit<ButtonProps$1, 'children' | 'className' | 'style'>, ButtonIconOwnProps {
784
950
  }
785
951
 
786
952
  /** @public */
@@ -791,24 +957,50 @@ declare const ButtonIcon: react.ForwardRefExoticComponent<ButtonIconProps & reac
791
957
  * @public
792
958
  */
793
959
  declare const ButtonIconDefinition: {
960
+ readonly styles: {
961
+ readonly [key: string]: string;
962
+ };
794
963
  readonly classNames: {
795
964
  readonly root: "bui-ButtonIcon";
796
965
  readonly content: "bui-ButtonIconContent";
797
966
  readonly spinner: "bui-ButtonIconSpinner";
798
967
  };
968
+ readonly surface: "leaf";
969
+ readonly propDefs: {
970
+ readonly size: {
971
+ readonly dataAttribute: true;
972
+ readonly default: "small";
973
+ };
974
+ readonly variant: {
975
+ readonly dataAttribute: true;
976
+ readonly default: "primary";
977
+ };
978
+ readonly loading: {
979
+ readonly dataAttribute: true;
980
+ };
981
+ readonly icon: {};
982
+ readonly onSurface: {};
983
+ readonly className: {};
984
+ readonly style: {};
985
+ };
799
986
  };
800
987
 
988
+ /** @public */
989
+ type ButtonLinkOwnProps = LeafSurfaceProps & {
990
+ size?: Responsive<'small' | 'medium'>;
991
+ variant?: Responsive<'primary' | 'secondary' | 'tertiary'>;
992
+ iconStart?: ReactElement;
993
+ iconEnd?: ReactElement;
994
+ children?: ReactNode;
995
+ className?: string;
996
+ style?: CSSProperties;
997
+ };
801
998
  /**
802
999
  * Properties for {@link ButtonLink}
803
1000
  *
804
1001
  * @public
805
1002
  */
806
- interface ButtonLinkProps extends LinkProps$1 {
807
- size?: 'small' | 'medium' | Partial<Record<Breakpoint, 'small' | 'medium'>>;
808
- variant?: 'primary' | 'secondary' | 'tertiary' | Partial<Record<Breakpoint, 'primary' | 'secondary' | 'tertiary'>>;
809
- iconStart?: ReactElement;
810
- iconEnd?: ReactElement;
811
- children?: ReactNode;
1003
+ interface ButtonLinkProps extends Omit<LinkProps$1, 'children' | 'className' | 'style'>, ButtonLinkOwnProps {
812
1004
  }
813
1005
 
814
1006
  /** @public */
@@ -819,8 +1011,29 @@ declare const ButtonLink: react.ForwardRefExoticComponent<ButtonLinkProps & reac
819
1011
  * @public
820
1012
  */
821
1013
  declare const ButtonLinkDefinition: {
1014
+ readonly styles: {
1015
+ readonly [key: string]: string;
1016
+ };
822
1017
  readonly classNames: {
823
1018
  readonly root: "bui-ButtonLink";
1019
+ readonly content: "bui-ButtonLinkContent";
1020
+ };
1021
+ readonly surface: "leaf";
1022
+ readonly propDefs: {
1023
+ readonly size: {
1024
+ readonly dataAttribute: true;
1025
+ readonly default: "small";
1026
+ };
1027
+ readonly variant: {
1028
+ readonly dataAttribute: true;
1029
+ readonly default: "primary";
1030
+ };
1031
+ readonly iconStart: {};
1032
+ readonly iconEnd: {};
1033
+ readonly onSurface: {};
1034
+ readonly children: {};
1035
+ readonly className: {};
1036
+ readonly style: {};
824
1037
  };
825
1038
  };
826
1039
 
@@ -970,8 +1183,8 @@ type TablePaginationType = NoPagination | PagePagination;
970
1183
  interface ColumnConfig<T extends TableItem> {
971
1184
  id: string;
972
1185
  label: string;
973
- cell: (item: T) => ReactNode;
974
- header?: () => ReactNode;
1186
+ cell: (item: T) => ReactElement;
1187
+ header?: () => ReactElement;
975
1188
  isSortable?: boolean;
976
1189
  isHidden?: boolean;
977
1190
  width?: ColumnSize | null;
@@ -1248,7 +1461,7 @@ declare const TextDefinition: {
1248
1461
  readonly dataAttributes: {
1249
1462
  readonly variant: readonly ["subtitle", "body", "caption", "label"];
1250
1463
  readonly weight: readonly ["regular", "bold"];
1251
- readonly color: readonly ["primary", "secondary", "danger", "warning", "success"];
1464
+ readonly color: readonly ["primary", "secondary", "danger", "warning", "success", "info"];
1252
1465
  readonly truncate: readonly [true, false];
1253
1466
  };
1254
1467
  };
@@ -1539,6 +1752,7 @@ interface LinkProps extends LinkProps$1 {
1539
1752
  weight?: TextWeights | Partial<Record<Breakpoint, TextWeights>>;
1540
1753
  color?: TextColors | TextColorStatus | Partial<Record<Breakpoint, TextColors | TextColorStatus>>;
1541
1754
  truncate?: boolean;
1755
+ standalone?: boolean;
1542
1756
  title?: string;
1543
1757
  children?: ReactNode;
1544
1758
  }
@@ -1557,8 +1771,9 @@ declare const LinkDefinition: {
1557
1771
  readonly dataAttributes: {
1558
1772
  readonly variant: readonly ["subtitle", "body", "caption", "label"];
1559
1773
  readonly weight: readonly ["regular", "bold"];
1560
- readonly color: readonly ["primary", "secondary", "danger", "warning", "success"];
1774
+ readonly color: readonly ["primary", "secondary", "danger", "warning", "success", "info"];
1561
1775
  readonly truncate: readonly [true, false];
1776
+ readonly standalone: readonly [true, false];
1562
1777
  };
1563
1778
  };
1564
1779
 
@@ -1759,5 +1974,5 @@ declare const useBreakpoint: () => {
1759
1974
  down: (key: Breakpoint) => boolean;
1760
1975
  };
1761
1976
 
1762
- export { Accordion, AccordionDefinition, AccordionGroup, AccordionPanel, AccordionTrigger, Avatar, AvatarDefinition, Box, BoxDefinition, Button, ButtonDefinition, ButtonIcon, ButtonIconDefinition, ButtonLink, ButtonLinkDefinition, Card, CardBody, CardDefinition, CardFooter, CardHeader, Cell, CellProfile, CellText, Checkbox, CheckboxDefinition, Column, Container, ContainerDefinition, Dialog, DialogBody, DialogDefinition, DialogFooter, DialogHeader, DialogTrigger, FieldLabel, FieldLabelDefinition, Flex, FlexDefinition, Grid, GridDefinition, GridItemDefinition, Header, HeaderDefinition, HeaderPage, HeaderPageDefinition, Link, LinkDefinition, Menu, MenuAutocomplete, MenuAutocompleteListbox, MenuDefinition, MenuItem, MenuListBox, MenuListBoxItem, MenuSection, MenuSeparator, MenuTrigger, 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, useBreakpoint, useTable };
1763
- export type { AccordionGroupProps, AccordionPanelProps, AccordionProps, AccordionTriggerProps, AlignItems, AvatarProps, Border, BorderRadius, BoxProps, Breakpoint, ButtonIconProps, ButtonLinkProps, ButtonProps, CardBodyProps, CardFooterProps, CardHeaderProps, CardProps, CellProfileProps, CellProps, CellTextProps, CheckboxProps, ClassNamesMap, ColumnConfig, ColumnProps, Columns, ComponentDefinition, ContainerProps, CursorParams, CursorResponse, DataAttributeValues, DataAttributesMap, DialogBodyProps, DialogHeaderProps, DialogProps, DialogTriggerProps, Display, FieldLabelProps, FilterState, FlexDirection, FlexProps, FlexWrap, GridItemProps, GridProps, HeaderPageBreadcrumb, HeaderPageProps, HeaderProps, HeaderTab, JustifyContent, LinkProps, MenuAutocompleteListBoxProps, MenuAutocompleteProps, MenuItemProps, MenuListBoxItemProps, MenuListBoxProps, MenuProps, MenuSectionProps, MenuSeparatorProps, MenuTriggerProps, NoPagination, OffsetParams, OffsetResponse, Option, PagePagination, PageSizeOption, PaginationOptions, PopoverProps, QueryOptions, RadioGroupProps, RadioProps, Responsive, RowConfig, RowRenderFn, SearchFieldProps, SearchState, SelectProps, SkeletonProps, SortDescriptor, SortState, Space, SpaceProps, SubmenuTriggerProps, Surface, 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 };
1977
+ export { Accordion, AccordionDefinition, AccordionGroup, AccordionPanel, AccordionTrigger, Alert, AlertDefinition, Avatar, AvatarDefinition, Box, BoxDefinition, Button, ButtonDefinition, ButtonIcon, ButtonIconDefinition, ButtonLink, ButtonLinkDefinition, Card, CardBody, CardDefinition, CardFooter, CardHeader, Cell, CellProfile, CellText, Checkbox, CheckboxDefinition, Column, Container, ContainerDefinition, Dialog, DialogBody, DialogDefinition, DialogFooter, DialogHeader, DialogTrigger, FieldLabel, FieldLabelDefinition, Flex, FlexDefinition, Grid, GridDefinition, GridItemDefinition, Header, HeaderDefinition, HeaderPage, HeaderPageDefinition, Link, LinkDefinition, Menu, MenuAutocomplete, MenuAutocompleteListbox, MenuDefinition, MenuItem, MenuListBox, MenuListBoxItem, MenuSection, MenuSeparator, MenuTrigger, 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, useBreakpoint, useTable };
1978
+ export type { AccordionGroupProps, AccordionPanelProps, AccordionProps, AccordionTriggerProps, AlertOwnProps, AlertProps, AlignItems, AvatarProps, Border, BorderRadius, BoxOwnProps, BoxProps, BoxUtilityProps, Breakpoint, ButtonIconOwnProps, ButtonIconProps, ButtonLinkOwnProps, ButtonLinkProps, ButtonOwnProps, ButtonProps, CardBodyProps, CardFooterProps, CardHeaderProps, CardProps, CellProfileProps, CellProps, CellTextProps, CheckboxProps, ClassNamesMap, ColumnConfig, ColumnProps, Columns, ComponentDefinition, ContainerProps, ContainerSurfaceProps, CursorParams, CursorResponse, DataAttributeValues, DataAttributesMap, DialogBodyProps, DialogHeaderProps, DialogProps, DialogTriggerProps, Display, FieldLabelProps, FilterState, FlexDirection, FlexProps, FlexWrap, GridItemProps, GridProps, HeaderPageBreadcrumb, HeaderPageProps, HeaderProps, HeaderTab, JustifyContent, LeafSurfaceProps, LinkProps, MarginProps, MenuAutocompleteListBoxProps, MenuAutocompleteProps, MenuItemProps, MenuListBoxItemProps, MenuListBoxProps, MenuProps, MenuSectionProps, MenuSeparatorProps, MenuTriggerProps, NoPagination, OffsetParams, OffsetResponse, Option, PaddingProps, PagePagination, PageSizeOption, PaginationOptions, PopoverProps, QueryOptions, RadioGroupProps, RadioProps, Responsive, RowConfig, RowRenderFn, SearchFieldProps, SearchState, SelectProps, SkeletonProps, SortDescriptor, SortState, Space, SpaceProps, SubmenuTriggerProps, Surface, 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,14 +6,16 @@ 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 { Accordion, AccordionGroup, AccordionPanel, AccordionTrigger } from './components/Accordion/Accordion.esm.js';
10
+ export { AccordionDefinition } from './components/Accordion/definition.esm.js';
11
+ export { Alert } from './components/Alert/Alert.esm.js';
12
+ export { AlertDefinition } from './components/Alert/definition.esm.js';
9
13
  export { Avatar } from './components/Avatar/Avatar.esm.js';
10
14
  export { AvatarDefinition } from './components/Avatar/definition.esm.js';
11
15
  export { Button } from './components/Button/Button.esm.js';
12
16
  export { ButtonDefinition } from './components/Button/definition.esm.js';
13
17
  export { Card, CardBody, CardFooter, CardHeader } from './components/Card/Card.esm.js';
14
18
  export { CardDefinition } from './components/Card/definition.esm.js';
15
- export { Accordion, AccordionGroup, AccordionPanel, AccordionTrigger } from './components/Accordion/Accordion.esm.js';
16
- export { AccordionDefinition } from './components/Accordion/definition.esm.js';
17
19
  export { Dialog, DialogBody, DialogFooter, DialogHeader, DialogTrigger } from './components/Dialog/Dialog.esm.js';
18
20
  export { DialogDefinition } from './components/Dialog/definition.esm.js';
19
21
  export { FieldLabel } from './components/FieldLabel/FieldLabel.esm.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"utilityClassMap.esm.js","sources":["../../src/utils/utilityClassMap.ts"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// Valid spacing values that have predefined utility classes\nconst validSpacingValues = [\n '0.5',\n '1',\n '1.5',\n '2',\n '3',\n '4',\n '5',\n '6',\n '7',\n '8',\n '9',\n '10',\n '11',\n '12',\n '13',\n '14',\n] as const;\n\nconst columnsValues = [\n '1',\n '2',\n '3',\n '4',\n '5',\n '6',\n '7',\n '8',\n '9',\n '10',\n '11',\n '12',\n 'auto',\n] as const;\n\nexport const utilityClassMap: Record<\n string,\n { class: string; cssVar?: string; values: readonly (string | number)[] }\n> = {\n m: {\n class: 'bui-m',\n cssVar: '--m',\n values: validSpacingValues,\n },\n mb: {\n class: 'bui-mb',\n cssVar: '--mb',\n values: validSpacingValues,\n },\n ml: {\n class: 'bui-ml',\n cssVar: '--ml',\n values: validSpacingValues,\n },\n mr: {\n class: 'bui-mr',\n cssVar: '--mr',\n values: validSpacingValues,\n },\n mt: {\n class: 'bui-mt',\n cssVar: '--mt',\n values: validSpacingValues,\n },\n mx: {\n class: 'bui-mx',\n cssVar: '--mx',\n values: validSpacingValues,\n },\n my: {\n class: 'bui-my',\n cssVar: '--my',\n values: validSpacingValues,\n },\n p: {\n class: 'bui-p',\n cssVar: '--p',\n values: validSpacingValues,\n },\n pb: {\n class: 'bui-pb',\n cssVar: '--pb',\n values: validSpacingValues,\n },\n pl: {\n class: 'bui-pl',\n cssVar: '--pl',\n values: validSpacingValues,\n },\n pr: {\n class: 'bui-pr',\n cssVar: '--pr',\n values: validSpacingValues,\n },\n pt: {\n class: 'bui-pt',\n cssVar: '--pt',\n values: validSpacingValues,\n },\n px: {\n class: 'bui-px',\n cssVar: '--px',\n values: validSpacingValues,\n },\n py: {\n class: 'bui-py',\n cssVar: '--py',\n values: validSpacingValues,\n },\n width: {\n class: 'bui-w',\n cssVar: '--width',\n values: [], // Always use custom value\n },\n minWidth: {\n class: 'bui-min-w',\n cssVar: '--min-width',\n values: [], // Always use custom value\n },\n maxWidth: {\n class: 'bui-max-w',\n cssVar: '--max-width',\n values: [], // Always use custom value\n },\n height: {\n class: 'bui-h',\n cssVar: '--height',\n values: [], // Always use custom value\n },\n minHeight: {\n class: 'bui-min-h',\n cssVar: '--min-height',\n values: [], // Always use custom value\n },\n maxHeight: {\n class: 'bui-max-h',\n cssVar: '--max-height',\n values: [], // Always use custom value\n },\n gap: {\n class: 'bui-gap',\n cssVar: '--gap',\n values: validSpacingValues,\n },\n position: {\n class: 'bui-position',\n values: ['static', 'relative', 'absolute', 'fixed', 'sticky'],\n },\n display: {\n class: 'bui-display',\n values: ['none', 'flex', 'block', 'inline'],\n },\n align: {\n class: 'bui-align',\n values: ['start', 'center', 'end', 'baseline', 'stretch'],\n },\n justify: {\n class: 'bui-jc',\n values: ['start', 'center', 'end', 'between'],\n },\n direction: {\n class: 'bui-fd',\n values: ['row', 'column', 'row-reverse', 'column-reverse'],\n },\n columns: {\n class: 'bui-columns',\n values: columnsValues,\n },\n colSpan: {\n class: 'bui-col-span',\n values: columnsValues,\n },\n colEnd: {\n class: 'bui-col-end',\n values: columnsValues,\n },\n colStart: {\n class: 'bui-col-start',\n values: columnsValues,\n },\n rowSpan: {\n class: 'bui-row-span',\n values: columnsValues,\n },\n};\n"],"names":[],"mappings":"AAiBA,MAAM,kBAAA,GAAqB;AAAA,EACzB,KAAA;AAAA,EACA,GAAA;AAAA,EACA,KAAA;AAAA,EACA,GAAA;AAAA,EACA,GAAA;AAAA,EACA,GAAA;AAAA,EACA,GAAA;AAAA,EACA,GAAA;AAAA,EACA,GAAA;AAAA,EACA,GAAA;AAAA,EACA,GAAA;AAAA,EACA,IAAA;AAAA,EACA,IAAA;AAAA,EACA,IAAA;AAAA,EACA,IAAA;AAAA,EACA;AACF,CAAA;AAEA,MAAM,aAAA,GAAgB;AAAA,EACpB,GAAA;AAAA,EACA,GAAA;AAAA,EACA,GAAA;AAAA,EACA,GAAA;AAAA,EACA,GAAA;AAAA,EACA,GAAA;AAAA,EACA,GAAA;AAAA,EACA,GAAA;AAAA,EACA,GAAA;AAAA,EACA,IAAA;AAAA,EACA,IAAA;AAAA,EACA,IAAA;AAAA,EACA;AACF,CAAA;AAEO,MAAM,eAAA,GAGT;AAAA,EACF,CAAA,EAAG;AAAA,IACD,KAAA,EAAO,OAAA;AAAA,IACP,MAAA,EAAQ,KAAA;AAAA,IACR,MAAA,EAAQ;AAAA,GACV;AAAA,EACA,EAAA,EAAI;AAAA,IACF,KAAA,EAAO,QAAA;AAAA,IACP,MAAA,EAAQ,MAAA;AAAA,IACR,MAAA,EAAQ;AAAA,GACV;AAAA,EACA,EAAA,EAAI;AAAA,IACF,KAAA,EAAO,QAAA;AA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A,IACL,KAAA,EAAO,WAAA;AAAA,IACP,QAAQ,CAAC,OAAA,EAAS,QAAA,EAAU,KAAA,EAAO,YAAY,SAAS;AAAA,GAC1D;AAAA,EACA,OAAA,EAAS;AAAA,IACP,KAAA,EAAO,QAAA;AAAA,IACP,MAAA,EAAQ,CAAC,OAAA,EAAS,QAAA,EAAU,OAAO,SAAS;AAAA,GAC9C;AAAA,EACA,SAAA,EAAW;AAAA,IACT,KAAA,EAAO,QAAA;AAAA,IACP,MAAA,EAAQ,CAAC,KAAA,EAAO,QAAA,EAAU,eAAe,gBAAgB;AAAA,GAC3D;AAAA,EACA,OAAA,EAAS;AAAA,IACP,KAAA,EAAO,aAAA;AAAA,IACP,MAAA,EAAQ;AAAA,GACV;AAAA,EACA,OAAA,EAAS;AAAA,IACP,KAAA,EAAO,cAAA;AAAA,IACP,MAAA,EAAQ;AAAA,GACV;AAAA,EACA,MAAA,EAAQ;AAAA,IACN,KAAA,EAAO,aAAA;AAAA,IACP,MAAA,EAAQ;AAAA,GACV;AAAA,EACA,QAAA,EAAU;AAAA,IACR,KAAA,EAAO,eAAA;AAAA,IACP,MAAA,EAAQ;AAAA,GACV;AAAA,EACA,OAAA,EAAS;AAAA,IACP,KAAA,EAAO,cAAA;AAAA,IACP,MAAA,EAAQ;AAAA;AAEZ;;;;"}
1
+ {"version":3,"file":"utilityClassMap.esm.js","sources":["../../src/utils/utilityClassMap.ts"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// Valid spacing values that have predefined utility classes\nconst validSpacingValues = [\n '0.5',\n '1',\n '1.5',\n '2',\n '3',\n '4',\n '5',\n '6',\n '7',\n '8',\n '9',\n '10',\n '11',\n '12',\n '13',\n '14',\n] as const;\n\nconst columnsValues = [\n '1',\n '2',\n '3',\n '4',\n '5',\n '6',\n '7',\n '8',\n '9',\n '10',\n '11',\n '12',\n 'auto',\n] as const;\n\nexport const utilityClassMap = {\n m: {\n class: 'bui-m',\n cssVar: '--m',\n values: validSpacingValues,\n },\n mb: {\n class: 'bui-mb',\n cssVar: '--mb',\n values: validSpacingValues,\n },\n ml: {\n class: 'bui-ml',\n cssVar: '--ml',\n values: validSpacingValues,\n },\n mr: {\n class: 'bui-mr',\n cssVar: '--mr',\n values: validSpacingValues,\n },\n mt: {\n class: 'bui-mt',\n cssVar: '--mt',\n values: validSpacingValues,\n },\n mx: {\n class: 'bui-mx',\n cssVar: '--mx',\n values: validSpacingValues,\n },\n my: {\n class: 'bui-my',\n cssVar: '--my',\n values: validSpacingValues,\n },\n p: {\n class: 'bui-p',\n cssVar: '--p',\n values: validSpacingValues,\n },\n pb: {\n class: 'bui-pb',\n cssVar: '--pb',\n values: validSpacingValues,\n },\n pl: {\n class: 'bui-pl',\n cssVar: '--pl',\n values: validSpacingValues,\n },\n pr: {\n class: 'bui-pr',\n cssVar: '--pr',\n values: validSpacingValues,\n },\n pt: {\n class: 'bui-pt',\n cssVar: '--pt',\n values: validSpacingValues,\n },\n px: {\n class: 'bui-px',\n cssVar: '--px',\n values: validSpacingValues,\n },\n py: {\n class: 'bui-py',\n cssVar: '--py',\n values: validSpacingValues,\n },\n width: {\n class: 'bui-w',\n cssVar: '--width',\n values: [], // Always use custom value\n },\n minWidth: {\n class: 'bui-min-w',\n cssVar: '--min-width',\n values: [], // Always use custom value\n },\n maxWidth: {\n class: 'bui-max-w',\n cssVar: '--max-width',\n values: [], // Always use custom value\n },\n height: {\n class: 'bui-h',\n cssVar: '--height',\n values: [], // Always use custom value\n },\n minHeight: {\n class: 'bui-min-h',\n cssVar: '--min-height',\n values: [], // Always use custom value\n },\n maxHeight: {\n class: 'bui-max-h',\n cssVar: '--max-height',\n values: [], // Always use custom value\n },\n gap: {\n class: 'bui-gap',\n cssVar: '--gap',\n values: validSpacingValues,\n },\n position: {\n class: 'bui-position',\n values: ['static', 'relative', 'absolute', 'fixed', 'sticky'],\n },\n display: {\n class: 'bui-display',\n values: ['none', 'flex', 'block', 'inline'],\n },\n align: {\n class: 'bui-align',\n values: ['start', 'center', 'end', 'baseline', 'stretch'],\n },\n justify: {\n class: 'bui-jc',\n values: ['start', 'center', 'end', 'between'],\n },\n direction: {\n class: 'bui-fd',\n values: ['row', 'column', 'row-reverse', 'column-reverse'],\n },\n columns: {\n class: 'bui-columns',\n values: columnsValues,\n },\n colSpan: {\n class: 'bui-col-span',\n values: columnsValues,\n },\n colEnd: {\n class: 'bui-col-end',\n values: columnsValues,\n },\n colStart: {\n class: 'bui-col-start',\n values: columnsValues,\n },\n rowSpan: {\n class: 'bui-row-span',\n values: columnsValues,\n },\n} as const satisfies Record<\n string,\n { class: string; cssVar?: string; values: readonly (string | number)[] }\n>;\n"],"names":[],"mappings":"AAiBA,MAAM,kBAAA,GAAqB;AAAA,EACzB,KAAA;AAAA,EACA,GAAA;AAAA,EACA,KAAA;AAAA,EACA,GAAA;AAAA,EACA,GAAA;AAAA,EACA,GAAA;AAAA,EACA,GAAA;AAAA,EACA,GAAA;AAAA,EACA,GAAA;AAAA,EACA,GAAA;AAAA,EACA,GAAA;AAAA,EACA,IAAA;AAAA,EACA,IAAA;AAAA,EACA,IAAA;AAAA,EACA,IAAA;AAAA,EACA;AACF,CAAA;AAEA,MAAM,aAAA,GAAgB;AAAA,EACpB,GAAA;AAAA,EACA,GAAA;AAAA,EACA,GAAA;AAAA,EACA,GAAA;AAAA,EACA,GAAA;AAAA,EACA,GAAA;AAAA,EACA,GAAA;AAAA,EACA,GAAA;AAAA,EACA,GAAA;AAAA,EACA,IAAA;AAAA,EACA,IAAA;AAAA,EACA,IAAA;AAAA,EACA;AACF,CAAA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