@backstage/ui 0.0.0-nightly-20250815024739 → 0.0.0-nightly-20250817025021

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # @backstage/ui
2
2
 
3
- ## 0.0.0-nightly-20250815024739
3
+ ## 0.0.0-nightly-20250817025021
4
4
 
5
5
  ### Minor Changes
6
6
 
@@ -11,6 +11,7 @@
11
11
  ### Patch Changes
12
12
 
13
13
  - de89a3d: Fixes some styles on the Select component in BUI.
14
+ - a251b3e: Export CardHeader, CardBody and CardFooter from Card component index
14
15
  - 75fead9: Fixes a couple of small bugs in BUI including setting H1 and H2 correctly on the Header and HeaderPage.
15
16
  - e7ff178: Update styling of Tooltip element
16
17
  - 230b410: **Breaking change** Move breadcrumb to fit in the `HeaderPage` instead of the `Header` in Backstage UI.
@@ -9,14 +9,14 @@ const Card = forwardRef((props, ref) => {
9
9
  const { classNames } = useStyles("Card");
10
10
  return /* @__PURE__ */ jsx("div", { ref, className: clsx(classNames.root, className), ...rest });
11
11
  });
12
- forwardRef(
12
+ const CardHeader = forwardRef(
13
13
  (props, ref) => {
14
14
  const { className, ...rest } = props;
15
15
  const { classNames } = useStyles("Card");
16
16
  return /* @__PURE__ */ jsx("div", { ref, className: clsx(classNames.header, className), ...rest });
17
17
  }
18
18
  );
19
- forwardRef(
19
+ const CardBody = forwardRef(
20
20
  (props, ref) => {
21
21
  const { children, className, ...rest } = props;
22
22
  const { classNames } = useStyles("Card");
@@ -41,7 +41,7 @@ forwardRef(
41
41
  );
42
42
  }
43
43
  );
44
- forwardRef(
44
+ const CardFooter = forwardRef(
45
45
  (props, ref) => {
46
46
  const { className, ...rest } = props;
47
47
  const { classNames } = useStyles("Card");
@@ -49,5 +49,5 @@ forwardRef(
49
49
  }
50
50
  );
51
51
 
52
- export { Card };
52
+ export { Card, CardBody, CardFooter, CardHeader };
53
53
  //# sourceMappingURL=Card.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Card.esm.js","sources":["../../../src/components/Card/Card.tsx"],"sourcesContent":["/*\n * Copyright 2024 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\nimport { forwardRef } from 'react';\nimport { ScrollArea } from '../ScrollArea';\nimport clsx from 'clsx';\nimport { useStyles } from '../../hooks/useStyles';\nimport type {\n CardProps,\n CardHeaderProps,\n CardBodyProps,\n CardFooterProps,\n} from './types';\n\n/**\n * Card component.\n *\n * @public\n */\nexport const Card = forwardRef<HTMLDivElement, CardProps>((props, ref) => {\n const { className, ...rest } = props;\n const { classNames } = useStyles('Card');\n\n return (\n <div ref={ref} className={clsx(classNames.root, className)} {...rest} />\n );\n});\n\n/**\n * CardHeader component.\n *\n * @public\n */\nexport const CardHeader = forwardRef<HTMLDivElement, CardHeaderProps>(\n (props, ref) => {\n const { className, ...rest } = props;\n const { classNames } = useStyles('Card');\n\n return (\n <div ref={ref} className={clsx(classNames.header, className)} {...rest} />\n );\n },\n);\n\n/**\n * CardBody component.\n *\n * @public\n */\nexport const CardBody = forwardRef<HTMLDivElement, CardBodyProps>(\n (props, ref) => {\n const { children, className, ...rest } = props;\n const { classNames } = useStyles('Card');\n\n return (\n <ScrollArea.Root\n ref={ref}\n className={clsx(classNames.body, className)}\n {...rest}\n >\n <ScrollArea.Viewport style={{ paddingInline: 'var(--bui-space-3)' }}>\n {children}\n </ScrollArea.Viewport>\n <ScrollArea.Scrollbar\n orientation=\"vertical\"\n style={{ margin: '0 0.25rem' }}\n >\n <ScrollArea.Thumb />\n </ScrollArea.Scrollbar>\n </ScrollArea.Root>\n );\n },\n);\n\n/**\n * CardFooter component.\n *\n * @public\n */\nexport const CardFooter = forwardRef<HTMLDivElement, CardFooterProps>(\n (props, ref) => {\n const { className, ...rest } = props;\n const { classNames } = useStyles('Card');\n\n return (\n <div ref={ref} className={clsx(classNames.footer, className)} {...rest} />\n );\n },\n);\n"],"names":[],"mappings":";;;;;;AAgCO,MAAM,IAAA,GAAO,UAAA,CAAsC,CAAC,KAAA,EAAO,GAAA,KAAQ;AACxE,EAAA,MAAM,EAAE,SAAA,EAAW,GAAG,IAAA,EAAK,GAAI,KAAA;AAC/B,EAAA,MAAM,EAAE,UAAA,EAAW,GAAI,SAAA,CAAU,MAAM,CAAA;AAEvC,EAAA,uBACE,GAAA,CAAC,KAAA,EAAA,EAAI,GAAA,EAAU,SAAA,EAAW,IAAA,CAAK,WAAW,IAAA,EAAM,SAAS,CAAA,EAAI,GAAG,IAAA,EAAM,CAAA;AAE1E,CAAC;AAOyB,UAAA;AAAA,EACxB,CAAC,OAAO,GAAA,KAAQ;AACd,IAAA,MAAM,EAAE,SAAA,EAAW,GAAG,IAAA,EAAK,GAAI,KAAA;AAC/B,IAAA,MAAM,EAAE,UAAA,EAAW,GAAI,SAAA,CAAU,MAAM,CAAA;AAEvC,IAAA,uBACE,GAAA,CAAC,KAAA,EAAA,EAAI,GAAA,EAAU,SAAA,EAAW,IAAA,CAAK,WAAW,MAAA,EAAQ,SAAS,CAAA,EAAI,GAAG,IAAA,EAAM,CAAA;AAAA,EAE5E;AACF;AAOwB,UAAA;AAAA,EACtB,CAAC,OAAO,GAAA,KAAQ;AACd,IAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAW,GAAG,MAAK,GAAI,KAAA;AACzC,IAAA,MAAM,EAAE,UAAA,EAAW,GAAI,SAAA,CAAU,MAAM,CAAA;AAEvC,IAAA,uBACE,IAAA;AAAA,MAAC,UAAA,CAAW,IAAA;AAAA,MAAX;AAAA,QACC,GAAA;AAAA,QACA,SAAA,EAAW,IAAA,CAAK,UAAA,CAAW,IAAA,EAAM,SAAS,CAAA;AAAA,QACzC,GAAG,IAAA;AAAA,QAEJ,QAAA,EAAA;AAAA,0BAAA,GAAA,CAAC,UAAA,CAAW,UAAX,EAAoB,KAAA,EAAO,EAAE,aAAA,EAAe,oBAAA,IAC1C,QAAA,EACH,CAAA;AAAA,0BACA,GAAA;AAAA,YAAC,UAAA,CAAW,SAAA;AAAA,YAAX;AAAA,cACC,WAAA,EAAY,UAAA;AAAA,cACZ,KAAA,EAAO,EAAE,MAAA,EAAQ,WAAA,EAAY;AAAA,cAE7B,QAAA,kBAAA,GAAA,CAAC,UAAA,CAAW,KAAA,EAAX,EAAiB;AAAA;AAAA;AACpB;AAAA;AAAA,KACF;AAAA,EAEJ;AACF;AAO0B,UAAA;AAAA,EACxB,CAAC,OAAO,GAAA,KAAQ;AACd,IAAA,MAAM,EAAE,SAAA,EAAW,GAAG,IAAA,EAAK,GAAI,KAAA;AAC/B,IAAA,MAAM,EAAE,UAAA,EAAW,GAAI,SAAA,CAAU,MAAM,CAAA;AAEvC,IAAA,uBACE,GAAA,CAAC,KAAA,EAAA,EAAI,GAAA,EAAU,SAAA,EAAW,IAAA,CAAK,WAAW,MAAA,EAAQ,SAAS,CAAA,EAAI,GAAG,IAAA,EAAM,CAAA;AAAA,EAE5E;AACF;;;;"}
1
+ {"version":3,"file":"Card.esm.js","sources":["../../../src/components/Card/Card.tsx"],"sourcesContent":["/*\n * Copyright 2024 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\nimport { forwardRef } from 'react';\nimport { ScrollArea } from '../ScrollArea';\nimport clsx from 'clsx';\nimport { useStyles } from '../../hooks/useStyles';\nimport type {\n CardProps,\n CardHeaderProps,\n CardBodyProps,\n CardFooterProps,\n} from './types';\n\n/**\n * Card component.\n *\n * @public\n */\nexport const Card = forwardRef<HTMLDivElement, CardProps>((props, ref) => {\n const { className, ...rest } = props;\n const { classNames } = useStyles('Card');\n\n return (\n <div ref={ref} className={clsx(classNames.root, className)} {...rest} />\n );\n});\n\n/**\n * CardHeader component.\n *\n * @public\n */\nexport const CardHeader = forwardRef<HTMLDivElement, CardHeaderProps>(\n (props, ref) => {\n const { className, ...rest } = props;\n const { classNames } = useStyles('Card');\n\n return (\n <div ref={ref} className={clsx(classNames.header, className)} {...rest} />\n );\n },\n);\n\n/**\n * CardBody component.\n *\n * @public\n */\nexport const CardBody = forwardRef<HTMLDivElement, CardBodyProps>(\n (props, ref) => {\n const { children, className, ...rest } = props;\n const { classNames } = useStyles('Card');\n\n return (\n <ScrollArea.Root\n ref={ref}\n className={clsx(classNames.body, className)}\n {...rest}\n >\n <ScrollArea.Viewport style={{ paddingInline: 'var(--bui-space-3)' }}>\n {children}\n </ScrollArea.Viewport>\n <ScrollArea.Scrollbar\n orientation=\"vertical\"\n style={{ margin: '0 0.25rem' }}\n >\n <ScrollArea.Thumb />\n </ScrollArea.Scrollbar>\n </ScrollArea.Root>\n );\n },\n);\n\n/**\n * CardFooter component.\n *\n * @public\n */\nexport const CardFooter = forwardRef<HTMLDivElement, CardFooterProps>(\n (props, ref) => {\n const { className, ...rest } = props;\n const { classNames } = useStyles('Card');\n\n return (\n <div ref={ref} className={clsx(classNames.footer, className)} {...rest} />\n );\n },\n);\n"],"names":[],"mappings":";;;;;;AAgCO,MAAM,IAAA,GAAO,UAAA,CAAsC,CAAC,KAAA,EAAO,GAAA,KAAQ;AACxE,EAAA,MAAM,EAAE,SAAA,EAAW,GAAG,IAAA,EAAK,GAAI,KAAA;AAC/B,EAAA,MAAM,EAAE,UAAA,EAAW,GAAI,SAAA,CAAU,MAAM,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,UAAA,CAAW,KAAA,EAAX,EAAiB;AAAA;AAAA;AACpB;AAAA;AAAA,KACF;AAAA,EAEJ;AACF;AAOO,MAAM,UAAA,GAAa,UAAA;AAAA,EACxB,CAAC,OAAO,GAAA,KAAQ;AACd,IAAA,MAAM,EAAE,SAAA,EAAW,GAAG,IAAA,EAAK,GAAI,KAAA;AAC/B,IAAA,MAAM,EAAE,UAAA,EAAW,GAAI,SAAA,CAAU,MAAM,CAAA;AAEvC,IAAA,uBACE,GAAA,CAAC,KAAA,EAAA,EAAI,GAAA,EAAU,SAAA,EAAW,IAAA,CAAK,WAAW,MAAA,EAAQ,SAAS,CAAA,EAAI,GAAG,IAAA,EAAM,CAAA;AAAA,EAE5E;AACF;;;;"}
package/dist/index.d.ts CHANGED
@@ -781,6 +781,24 @@ interface CardFooterProps extends React.HTMLAttributes<HTMLDivElement> {
781
781
  * @public
782
782
  */
783
783
  declare const Card: react.ForwardRefExoticComponent<CardProps & react.RefAttributes<HTMLDivElement>>;
784
+ /**
785
+ * CardHeader component.
786
+ *
787
+ * @public
788
+ */
789
+ declare const CardHeader: react.ForwardRefExoticComponent<CardHeaderProps & react.RefAttributes<HTMLDivElement>>;
790
+ /**
791
+ * CardBody component.
792
+ *
793
+ * @public
794
+ */
795
+ declare const CardBody: react.ForwardRefExoticComponent<CardBodyProps & react.RefAttributes<HTMLDivElement>>;
796
+ /**
797
+ * CardFooter component.
798
+ *
799
+ * @public
800
+ */
801
+ declare const CardFooter: react.ForwardRefExoticComponent<CardFooterProps & react.RefAttributes<HTMLDivElement>>;
784
802
 
785
803
  /**
786
804
  * Collapsible is a component that allows you to collapse and expand content.
@@ -1464,4 +1482,4 @@ declare const useBreakpoint: () => {
1464
1482
  down: (key: Breakpoint) => boolean;
1465
1483
  };
1466
1484
 
1467
- export { type AlignItems, type ArbitraryStylingPropDef, Avatar, type AvatarProps, type BooleanPropDef, type Border, type BorderRadius, Box, type BoxOwnProps, type BoxProps, type Breakpoint, Button, ButtonIcon, type ButtonIconProps, ButtonLink, type ButtonLinkProps, type ButtonProps, Card, type CardBodyProps, type CardFooterProps, type CardHeaderProps, type CardProps, Cell, CellProfile, type CellProfileProps, type CellProps, Checkbox, type CheckboxProps, type ClassNamesMap, Collapsible, Column, type Columns, type ComponentClassNames, type ComponentDefinition, type ComponentDefinitionName, Container, type ContainerProps, type DataAttributeValues, type DataAttributesMap, type Display, type DisplayProps, type EnumOrStringPropDef, type EnumPropDef, FieldLabel, type FieldLabelProps, Flex, type FlexDirection, type FlexOwnProps, type FlexProps, type FlexWrap, type GapProps, type GetPropDefType, type GetPropDefTypes, Grid, type GridItemOwnProps, type GridItemProps, type GridOwnProps, type GridProps, Header, type HeaderMenuItem, HeaderPage, type HeaderPageBreadcrumb, type HeaderPageProps, type HeaderProps, type HeaderTab, type HeightProps, Icon, IconContext, type IconContextProps, type IconMap, type IconNames, type IconProps, IconProvider, type IconProviderProps, type JustifyContent, Link, type LinkProps, type MarginProps, Menu, type MenuComboboxOption, type MenuComboboxProps, type MenuComponent, type NonStylingPropDef, type PaddingProps, type PositionProps, type PropDef, Radio, RadioGroup, type RadioGroupProps, type RadioProps, type ReactNodePropDef, type RegularPropDef, type Responsive, type ResponsivePropDef, Row, ScrollArea, SearchField, type SearchFieldProps, Select, type SelectProps, Skeleton, type SkeletonProps, type Space, type SpaceProps, type StringPropDef, type StylingPropDef, Switch, type SwitchProps, Tab, TabList, type TabListProps, type TabMatchStrategy, TabPanel, type TabPanelProps, type TabProps, Table, TableBody, TableHeader, TablePagination, type TablePaginationProps, Tabs, type TabsProps, Text, type TextColorStatus, type TextColors, TextField, type TextFieldProps, type TextOwnProps, type TextProps, type TextVariants, type TextWeights, Tooltip, type TooltipProps, TooltipTrigger, type UseTableConfig, type UseTablePagination, type UseTablePaginationConfig, type UseTableResult, type UtilityProps, type WidthProps, boxPropDefs, breakpoints, componentDefinitions, displayPropDefs, flexPropDefs, gapPropDefs, gridItemPropDefs, gridPropDefs, heightPropDefs, icons, marginPropDefs, paddingPropDefs, positionPropDefs, useBreakpoint, useIcons, useTable, widthPropDefs };
1485
+ export { type AlignItems, type ArbitraryStylingPropDef, Avatar, type AvatarProps, type BooleanPropDef, type Border, type BorderRadius, Box, type BoxOwnProps, type BoxProps, type Breakpoint, Button, ButtonIcon, type ButtonIconProps, ButtonLink, type ButtonLinkProps, type ButtonProps, Card, CardBody, type CardBodyProps, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, type CardProps, Cell, CellProfile, type CellProfileProps, type CellProps, Checkbox, type CheckboxProps, type ClassNamesMap, Collapsible, Column, type Columns, type ComponentClassNames, type ComponentDefinition, type ComponentDefinitionName, Container, type ContainerProps, type DataAttributeValues, type DataAttributesMap, type Display, type DisplayProps, type EnumOrStringPropDef, type EnumPropDef, FieldLabel, type FieldLabelProps, Flex, type FlexDirection, type FlexOwnProps, type FlexProps, type FlexWrap, type GapProps, type GetPropDefType, type GetPropDefTypes, Grid, type GridItemOwnProps, type GridItemProps, type GridOwnProps, type GridProps, Header, type HeaderMenuItem, HeaderPage, type HeaderPageBreadcrumb, type HeaderPageProps, type HeaderProps, type HeaderTab, type HeightProps, Icon, IconContext, type IconContextProps, type IconMap, type IconNames, type IconProps, IconProvider, type IconProviderProps, type JustifyContent, Link, type LinkProps, type MarginProps, Menu, type MenuComboboxOption, type MenuComboboxProps, type MenuComponent, type NonStylingPropDef, type PaddingProps, type PositionProps, type PropDef, Radio, RadioGroup, type RadioGroupProps, type RadioProps, type ReactNodePropDef, type RegularPropDef, type Responsive, type ResponsivePropDef, Row, ScrollArea, SearchField, type SearchFieldProps, Select, type SelectProps, Skeleton, type SkeletonProps, type Space, type SpaceProps, type StringPropDef, type StylingPropDef, Switch, type SwitchProps, Tab, TabList, type TabListProps, type TabMatchStrategy, TabPanel, type TabPanelProps, type TabProps, Table, TableBody, TableHeader, TablePagination, type TablePaginationProps, Tabs, type TabsProps, Text, type TextColorStatus, type TextColors, TextField, type TextFieldProps, type TextOwnProps, type TextProps, type TextVariants, type TextWeights, Tooltip, type TooltipProps, TooltipTrigger, type UseTableConfig, type UseTablePagination, type UseTablePaginationConfig, type UseTableResult, type UtilityProps, type WidthProps, boxPropDefs, breakpoints, componentDefinitions, displayPropDefs, flexPropDefs, gapPropDefs, gridItemPropDefs, gridPropDefs, heightPropDefs, icons, marginPropDefs, paddingPropDefs, positionPropDefs, useBreakpoint, useIcons, useTable, widthPropDefs };
package/dist/index.esm.js CHANGED
@@ -8,7 +8,7 @@ export { flexPropDefs } from './components/Flex/Flex.props.esm.js';
8
8
  export { Container } from './components/Container/Container.esm.js';
9
9
  export { Avatar } from './components/Avatar/Avatar.esm.js';
10
10
  export { Button } from './components/Button/Button.esm.js';
11
- export { Card } from './components/Card/Card.esm.js';
11
+ export { Card, CardBody, CardFooter, CardHeader } from './components/Card/Card.esm.js';
12
12
  export { Collapsible } from './components/Collapsible/Collapsible.esm.js';
13
13
  export { FieldLabel } from './components/FieldLabel/FieldLabel.esm.js';
14
14
  export { Header } from './components/Header/Header.esm.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/ui",
3
- "version": "0.0.0-nightly-20250815024739",
3
+ "version": "0.0.0-nightly-20250817025021",
4
4
  "backstage": {
5
5
  "role": "web-library"
6
6
  },
@@ -46,7 +46,7 @@
46
46
  "react-aria-components": "^1.10.1"
47
47
  },
48
48
  "devDependencies": {
49
- "@backstage/cli": "0.0.0-nightly-20250815024739",
49
+ "@backstage/cli": "0.0.0-nightly-20250817025021",
50
50
  "@storybook/react": "^8.6.12",
51
51
  "@types/react": "^18.0.0",
52
52
  "@types/react-dom": "^18.0.0",