@backstage/ui 0.6.1 → 0.7.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.
- package/CHANGELOG.md +15 -2
- package/css/styles.css +99 -142
- package/dist/components/Checkbox/Checkbox.esm.js +5 -7
- package/dist/components/Checkbox/Checkbox.esm.js.map +1 -1
- package/dist/components/DataTable/Pagination/DataTablePagination.esm.js +1 -1
- package/dist/components/DataTable/Pagination/DataTablePagination.esm.js.map +1 -1
- package/dist/components/Header/Header.esm.js +21 -2
- package/dist/components/Header/Header.esm.js.map +1 -1
- package/dist/components/Header/HeaderToolbar.esm.js +40 -14
- package/dist/components/Header/HeaderToolbar.esm.js.map +1 -1
- package/dist/components/HeaderPage/HeaderPage.esm.js +12 -3
- package/dist/components/HeaderPage/HeaderPage.esm.js.map +1 -1
- package/dist/components/Link/Link.esm.js +9 -5
- package/dist/components/Link/Link.esm.js.map +1 -1
- package/dist/components/Menu/Combobox.esm.js +5 -7
- package/dist/components/Menu/Combobox.esm.js.map +1 -1
- package/dist/components/Select/Select.esm.js +1 -1
- package/dist/components/Select/Select.esm.js.map +1 -1
- package/dist/components/Select/Select.styles.css.esm.js +1 -1
- package/dist/components/Table/TableCellLink/TableCellLink.esm.js +1 -1
- package/dist/components/Table/TableCellLink/TableCellLink.esm.js.map +1 -1
- package/dist/components/Table/TableCellProfile/TableCellProfile.esm.js +1 -1
- package/dist/components/Table/TableCellProfile/TableCellProfile.esm.js.map +1 -1
- package/dist/components/Table/TableCellText/TableCellText.esm.js +2 -2
- package/dist/components/Table/TableCellText/TableCellText.esm.js.map +1 -1
- package/dist/components/Tabs/Tabs.esm.js +15 -3
- package/dist/components/Tabs/Tabs.esm.js.map +1 -1
- package/dist/components/Text/Text.esm.js +3 -2
- package/dist/components/Text/Text.esm.js.map +1 -1
- package/dist/components/Tooltip/Tooltip.esm.js +5 -2
- package/dist/components/Tooltip/Tooltip.esm.js.map +1 -1
- package/dist/index.d.ts +107 -95
- package/dist/index.esm.js +1 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/utils/componentDefinitions.esm.js +1 -1
- package/dist/utils/componentDefinitions.esm.js.map +1 -1
- package/package.json +5 -3
- package/dist/components/Heading/Heading.esm.js +0 -37
- package/dist/components/Heading/Heading.esm.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.esm.js","sources":["../../../src/components/Tooltip/Tooltip.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 {\n OverlayArrow,\n Tooltip as AriaTooltip,\n TooltipTrigger as AriaTooltipTrigger,\n TooltipTriggerComponentProps,\n} from 'react-aria-components';\nimport clsx from 'clsx';\nimport { TooltipProps } from './types';\nimport { useStyles } from '../../hooks/useStyles';\n\n/** @public */\nexport const TooltipTrigger = (props: TooltipTriggerComponentProps) => {\n const { delay = 600 } = props;\n\n return <AriaTooltipTrigger delay={delay} {...props} />;\n};\n\n/** @public */\nexport const Tooltip = forwardRef<HTMLDivElement, TooltipProps>(\n ({ className, children, ...rest }, ref) => {\n const { classNames } = useStyles('Tooltip');\n\n return (\n <AriaTooltip\n className={clsx(classNames.tooltip, className)}\n {...rest}\n ref={ref}\n >\n <OverlayArrow className={classNames.arrow}>\n <svg width
|
|
1
|
+
{"version":3,"file":"Tooltip.esm.js","sources":["../../../src/components/Tooltip/Tooltip.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 {\n OverlayArrow,\n Tooltip as AriaTooltip,\n TooltipTrigger as AriaTooltipTrigger,\n TooltipTriggerComponentProps,\n} from 'react-aria-components';\nimport clsx from 'clsx';\nimport { TooltipProps } from './types';\nimport { useStyles } from '../../hooks/useStyles';\n\n/** @public */\nexport const TooltipTrigger = (props: TooltipTriggerComponentProps) => {\n const { delay = 600 } = props;\n\n return <AriaTooltipTrigger delay={delay} {...props} />;\n};\n\n/** @public */\nexport const Tooltip = forwardRef<HTMLDivElement, TooltipProps>(\n ({ className, children, ...rest }, ref) => {\n const { classNames } = useStyles('Tooltip');\n\n return (\n <AriaTooltip\n className={clsx(classNames.tooltip, className)}\n {...rest}\n ref={ref}\n >\n <OverlayArrow className={classNames.arrow}>\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\n <path d=\"M10.3356 7.39793L15.1924 3.02682C15.9269 2.36577 16.8801 2 17.8683 2H20V7.94781e-07L1.74846e-07 -9.53674e-07L0 2L1.4651 2C2.4532 2 3.4064 2.36577 4.1409 3.02682L8.9977 7.39793C9.378 7.7402 9.9553 7.74021 10.3356 7.39793Z\" />\n <path d=\"M11.0046 8.14124C10.2439 8.82575 9.08939 8.82578 8.32869 8.14122L3.47189 3.77011C2.92109 3.27432 2.20619 2.99999 1.46509 2.99999L4.10999 3L8.99769 7.39793C9.37799 7.7402 9.95529 7.7402 10.3356 7.39793L15.2226 3L17.8683 2.99999C17.1271 2.99999 16.4122 3.27432 15.8614 3.77011L11.0046 8.14124Z\" />\n </svg>\n </OverlayArrow>\n {children}\n </AriaTooltip>\n );\n },\n);\n\nTooltip.displayName = 'Tooltip';\n"],"names":["AriaTooltipTrigger","AriaTooltip"],"mappings":";;;;;;AA4Ba,MAAA,cAAA,GAAiB,CAAC,KAAwC,KAAA;AACrE,EAAM,MAAA,EAAE,KAAQ,GAAA,GAAA,EAAQ,GAAA,KAAA;AAExB,EAAA,uBAAQ,GAAA,CAAAA,gBAAA,EAAA,EAAmB,KAAe,EAAA,GAAG,KAAO,EAAA,CAAA;AACtD;AAGO,MAAM,OAAU,GAAA,UAAA;AAAA,EACrB,CAAC,EAAE,SAAA,EAAW,UAAU,GAAG,IAAA,IAAQ,GAAQ,KAAA;AACzC,IAAA,MAAM,EAAE,UAAA,EAAe,GAAA,SAAA,CAAU,SAAS,CAAA;AAE1C,IACE,uBAAA,IAAA;AAAA,MAACC,SAAA;AAAA,MAAA;AAAA,QACC,SAAW,EAAA,IAAA,CAAK,UAAW,CAAA,OAAA,EAAS,SAAS,CAAA;AAAA,QAC5C,GAAG,IAAA;AAAA,QACJ,GAAA;AAAA,QAEA,QAAA,EAAA;AAAA,0BAAA,GAAA,CAAC,YAAa,EAAA,EAAA,SAAA,EAAW,UAAW,CAAA,KAAA,EAClC,QAAC,kBAAA,IAAA,CAAA,KAAA,EAAA,EAAI,KAAM,EAAA,IAAA,EAAK,MAAO,EAAA,IAAA,EAAK,OAAQ,EAAA,WAAA,EAAY,MAAK,MACnD,EAAA,QAAA,EAAA;AAAA,4BAAC,GAAA,CAAA,MAAA,EAAA,EAAK,GAAE,8NAA+N,EAAA,CAAA;AAAA,4BACvO,GAAA,CAAC,MAAK,EAAA,EAAA,CAAA,EAAE,qSAAsS,EAAA;AAAA,WAAA,EAChT,CACF,EAAA,CAAA;AAAA,UACC;AAAA;AAAA;AAAA,KACH;AAAA;AAGN;AAEA,OAAA,CAAQ,WAAc,GAAA,SAAA;;;;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { ReactNode, ElementType, ComponentPropsWithRef,
|
|
2
|
+
import { ReactNode, ReactElement, ElementType, ComponentPropsWithRef, ComponentProps, ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
3
3
|
import { RemixiconComponentType } from '@remixicon/react';
|
|
4
4
|
import { Avatar as Avatar$1 } from '@base-ui-components/react/avatar';
|
|
5
|
-
import { ButtonProps as ButtonProps$1,
|
|
5
|
+
import { ButtonProps as ButtonProps$1, TabsProps as TabsProps$1, TabListProps as TabListProps$1, TabProps as TabProps$1, TabPanelProps as TabPanelProps$1, LinkProps as LinkProps$1, RadioGroupProps as RadioGroupProps$1, RadioProps as RadioProps$1, TextFieldProps as TextFieldProps$1, TooltipProps as TooltipProps$1, TooltipTriggerComponentProps, SearchFieldProps as SearchFieldProps$1, SelectProps as SelectProps$1, SwitchProps as SwitchProps$1 } from 'react-aria-components';
|
|
6
6
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
7
7
|
import { NavigateOptions } from 'react-router-dom';
|
|
8
8
|
import { Collapsible as Collapsible$1 } from '@base-ui-components/react/collapsible';
|
|
@@ -63,7 +63,7 @@ declare const componentDefinitions: {
|
|
|
63
63
|
};
|
|
64
64
|
readonly dataAttributes: {
|
|
65
65
|
readonly size: readonly ["small", "medium", "large"];
|
|
66
|
-
readonly variant: readonly ["primary", "secondary", "
|
|
66
|
+
readonly variant: readonly ["primary", "secondary", "tertiary"];
|
|
67
67
|
};
|
|
68
68
|
};
|
|
69
69
|
readonly ButtonIcon: {
|
|
@@ -311,8 +311,6 @@ declare const componentDefinitions: {
|
|
|
311
311
|
};
|
|
312
312
|
};
|
|
313
313
|
|
|
314
|
-
/** @public */
|
|
315
|
-
type AsProps = 'div' | 'span' | 'p' | 'article' | 'section' | 'main' | 'nav' | 'aside' | 'ul' | 'ol' | 'li' | 'details' | 'summary' | 'dd' | 'dl' | 'dt';
|
|
316
314
|
/** @public */
|
|
317
315
|
type Breakpoint = 'initial' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
318
316
|
/** @public */
|
|
@@ -353,6 +351,14 @@ interface SpaceProps {
|
|
|
353
351
|
py?: Responsive<Space>;
|
|
354
352
|
}
|
|
355
353
|
/** @public */
|
|
354
|
+
type TextVariants = 'title-large' | 'title-medium' | 'title-small' | 'title-x-small' | 'body-large' | 'body-medium' | 'body-small' | 'body-x-small';
|
|
355
|
+
/** @public */
|
|
356
|
+
type TextColors = 'primary' | 'secondary';
|
|
357
|
+
/** @public */
|
|
358
|
+
type TextColorStatus = 'danger' | 'warning' | 'success';
|
|
359
|
+
/** @public */
|
|
360
|
+
type TextWeights = 'regular' | 'bold';
|
|
361
|
+
/** @public */
|
|
356
362
|
interface UtilityProps extends SpaceProps {
|
|
357
363
|
alignItems?: Responsive<AlignItems>;
|
|
358
364
|
border?: Responsive<Border>;
|
|
@@ -711,47 +717,6 @@ interface ContainerProps {
|
|
|
711
717
|
/** @public */
|
|
712
718
|
declare const Container: react.ForwardRefExoticComponent<ContainerProps & react.RefAttributes<HTMLDivElement>>;
|
|
713
719
|
|
|
714
|
-
/** @public */
|
|
715
|
-
type TextOwnProps = {
|
|
716
|
-
as?: 'p' | 'span' | 'label';
|
|
717
|
-
variant?: 'subtitle' | 'body' | 'caption' | 'label' | Partial<Record<Breakpoint, 'subtitle' | 'body' | 'caption' | 'label'>>;
|
|
718
|
-
weight?: 'regular' | 'bold' | Partial<Record<Breakpoint, 'regular' | 'bold'>>;
|
|
719
|
-
color?: 'primary' | 'secondary' | 'danger' | 'warning' | 'success' | Partial<Record<Breakpoint, 'primary' | 'secondary' | 'danger' | 'warning' | 'success'>>;
|
|
720
|
-
truncate?: boolean;
|
|
721
|
-
className?: string;
|
|
722
|
-
style?: React.CSSProperties;
|
|
723
|
-
};
|
|
724
|
-
/** @public */
|
|
725
|
-
type TextProps<T extends ElementType = 'p'> = TextOwnProps & Omit<ComponentPropsWithRef<T>, keyof TextOwnProps>;
|
|
726
|
-
|
|
727
|
-
/** @public */
|
|
728
|
-
declare const Text: {
|
|
729
|
-
<T extends ElementType = "p">(props: TextProps<T> & {
|
|
730
|
-
ref?: React.ComponentPropsWithRef<T>["ref"];
|
|
731
|
-
}): React.ReactElement<TextProps<T>, T>;
|
|
732
|
-
displayName: string;
|
|
733
|
-
};
|
|
734
|
-
|
|
735
|
-
/** @public */
|
|
736
|
-
type HeadingOwnProps = {
|
|
737
|
-
as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
738
|
-
variant?: 'display' | 'title1' | 'title2' | 'title3' | 'title4' | 'title5' | Partial<Record<Breakpoint, 'display' | 'title1' | 'title2' | 'title3' | 'title4' | 'title5'>>;
|
|
739
|
-
color?: 'primary' | 'secondary' | Partial<Record<Breakpoint, 'primary' | 'secondary'>>;
|
|
740
|
-
truncate?: boolean;
|
|
741
|
-
className?: string;
|
|
742
|
-
style?: React.CSSProperties;
|
|
743
|
-
};
|
|
744
|
-
/** @public */
|
|
745
|
-
type HeadingProps<T extends ElementType = 'h1'> = HeadingOwnProps & Omit<ComponentPropsWithRef<T>, keyof HeadingOwnProps>;
|
|
746
|
-
|
|
747
|
-
/** @public */
|
|
748
|
-
declare const Heading: {
|
|
749
|
-
<T extends ElementType = "h1">(props: HeadingProps<T> & {
|
|
750
|
-
ref?: React.ComponentPropsWithRef<T>["ref"];
|
|
751
|
-
}): React.ReactElement<HeadingProps<T>, T>;
|
|
752
|
-
displayName: string;
|
|
753
|
-
};
|
|
754
|
-
|
|
755
720
|
/** @public */
|
|
756
721
|
interface AvatarProps extends React.ComponentPropsWithoutRef<typeof Avatar$1.Root> {
|
|
757
722
|
src: string;
|
|
@@ -933,6 +898,72 @@ interface FieldLabelProps {
|
|
|
933
898
|
/** @public */
|
|
934
899
|
declare const FieldLabel: react.ForwardRefExoticComponent<FieldLabelProps & react.RefAttributes<HTMLDivElement>>;
|
|
935
900
|
|
|
901
|
+
/**
|
|
902
|
+
* Strategies for matching the current route to determine which tab should be active.
|
|
903
|
+
*
|
|
904
|
+
* @public
|
|
905
|
+
*/
|
|
906
|
+
type TabMatchStrategy = 'exact' | 'prefix';
|
|
907
|
+
/**
|
|
908
|
+
* Props for the Tabs component.
|
|
909
|
+
*
|
|
910
|
+
* @public
|
|
911
|
+
*/
|
|
912
|
+
interface TabsProps extends TabsProps$1 {
|
|
913
|
+
}
|
|
914
|
+
/**
|
|
915
|
+
* Props for the TabList component.
|
|
916
|
+
*
|
|
917
|
+
* @public
|
|
918
|
+
*/
|
|
919
|
+
interface TabListProps extends Omit<TabListProps$1<object>, 'items'> {
|
|
920
|
+
}
|
|
921
|
+
/**
|
|
922
|
+
* Props for the Tab component.
|
|
923
|
+
*
|
|
924
|
+
* @public
|
|
925
|
+
*/
|
|
926
|
+
interface TabProps extends TabProps$1 {
|
|
927
|
+
/**
|
|
928
|
+
* Strategy for matching the current route to determine if this tab should be active.
|
|
929
|
+
* - 'exact': Tab href must exactly match the current pathname (default)
|
|
930
|
+
* - 'prefix': Tab is active if current pathname starts with tab href
|
|
931
|
+
*/
|
|
932
|
+
matchStrategy?: 'exact' | 'prefix';
|
|
933
|
+
}
|
|
934
|
+
/**
|
|
935
|
+
* Props for the TabPanel component.
|
|
936
|
+
*
|
|
937
|
+
* @public
|
|
938
|
+
*/
|
|
939
|
+
interface TabPanelProps extends TabPanelProps$1 {
|
|
940
|
+
}
|
|
941
|
+
|
|
942
|
+
/**
|
|
943
|
+
* A component that renders a list of tabs.
|
|
944
|
+
*
|
|
945
|
+
* @public
|
|
946
|
+
*/
|
|
947
|
+
declare const Tabs: (props: TabsProps) => react_jsx_runtime.JSX.Element | null;
|
|
948
|
+
/**
|
|
949
|
+
* A component that renders a list of tabs.
|
|
950
|
+
*
|
|
951
|
+
* @public
|
|
952
|
+
*/
|
|
953
|
+
declare const TabList: (props: TabListProps) => react_jsx_runtime.JSX.Element;
|
|
954
|
+
/**
|
|
955
|
+
* A component that renders a tab.
|
|
956
|
+
*
|
|
957
|
+
* @public
|
|
958
|
+
*/
|
|
959
|
+
declare const Tab: (props: TabProps) => react_jsx_runtime.JSX.Element;
|
|
960
|
+
/**
|
|
961
|
+
* A component that renders the content of a tab.
|
|
962
|
+
*
|
|
963
|
+
* @public
|
|
964
|
+
*/
|
|
965
|
+
declare const TabPanel: (props: TabPanelProps) => react_jsx_runtime.JSX.Element;
|
|
966
|
+
|
|
936
967
|
/**
|
|
937
968
|
* Props for the main Header component.
|
|
938
969
|
*
|
|
@@ -941,10 +972,12 @@ declare const FieldLabel: react.ForwardRefExoticComponent<FieldLabelProps & reac
|
|
|
941
972
|
interface HeaderProps {
|
|
942
973
|
icon?: React.ReactNode;
|
|
943
974
|
title?: string;
|
|
975
|
+
titleLink?: string;
|
|
944
976
|
breadcrumbs?: HeaderBreadcrumb[];
|
|
945
977
|
customActions?: React.ReactNode;
|
|
946
978
|
menuItems?: HeaderMenuItem[];
|
|
947
979
|
tabs?: HeaderTab[];
|
|
980
|
+
onTabSelectionChange?: TabsProps$1['onSelectionChange'];
|
|
948
981
|
}
|
|
949
982
|
/**
|
|
950
983
|
* Represents a tab item in the header navigation.
|
|
@@ -955,6 +988,12 @@ interface HeaderTab {
|
|
|
955
988
|
id: string;
|
|
956
989
|
label: string;
|
|
957
990
|
href?: string;
|
|
991
|
+
/**
|
|
992
|
+
* Strategy for matching the current route to determine if this tab should be active.
|
|
993
|
+
* - 'exact': Tab href must exactly match the current pathname (default)
|
|
994
|
+
* - 'prefix': Tab is active if current pathname starts with tab href
|
|
995
|
+
*/
|
|
996
|
+
matchStrategy?: TabMatchStrategy;
|
|
958
997
|
}
|
|
959
998
|
/**
|
|
960
999
|
* Represents an option item in the header dropdown menu.
|
|
@@ -1076,52 +1115,24 @@ declare const RadioGroup: react.ForwardRefExoticComponent<RadioGroupProps & reac
|
|
|
1076
1115
|
/** @public */
|
|
1077
1116
|
declare const Radio: react.ForwardRefExoticComponent<RadioProps & react.RefAttributes<HTMLLabelElement>>;
|
|
1078
1117
|
|
|
1079
|
-
/**
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
* @public
|
|
1090
|
-
*/
|
|
1091
|
-
interface TabListProps extends Omit<TabListProps$1<object>, 'items'> {
|
|
1092
|
-
}
|
|
1093
|
-
/**
|
|
1094
|
-
* Props for the TabPanel component.
|
|
1095
|
-
*
|
|
1096
|
-
* @public
|
|
1097
|
-
*/
|
|
1098
|
-
interface TabPanelProps extends TabPanelProps$1 {
|
|
1099
|
-
}
|
|
1118
|
+
/** @public */
|
|
1119
|
+
type TextOwnProps = {
|
|
1120
|
+
as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'span' | 'label' | 'div' | 'strong' | 'em' | 'small' | 'legend';
|
|
1121
|
+
variant?: TextVariants | Partial<Record<Breakpoint, TextVariants>>;
|
|
1122
|
+
weight?: TextWeights | Partial<Record<Breakpoint, TextWeights>>;
|
|
1123
|
+
color?: TextColors | TextColorStatus | Partial<Record<Breakpoint, TextColors | TextColorStatus>>;
|
|
1124
|
+
truncate?: boolean;
|
|
1125
|
+
};
|
|
1126
|
+
/** @public */
|
|
1127
|
+
type TextProps<T extends ElementType = 'span'> = TextOwnProps & Omit<ComponentPropsWithRef<T>, keyof TextOwnProps>;
|
|
1100
1128
|
|
|
1101
|
-
/**
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
* A component that renders a list of tabs.
|
|
1109
|
-
*
|
|
1110
|
-
* @public
|
|
1111
|
-
*/
|
|
1112
|
-
declare const TabList: (props: TabListProps) => react_jsx_runtime.JSX.Element;
|
|
1113
|
-
/**
|
|
1114
|
-
* A component that renders a tab.
|
|
1115
|
-
*
|
|
1116
|
-
* @public
|
|
1117
|
-
*/
|
|
1118
|
-
declare const Tab: (props: TabProps) => react_jsx_runtime.JSX.Element;
|
|
1119
|
-
/**
|
|
1120
|
-
* A component that renders the content of a tab.
|
|
1121
|
-
*
|
|
1122
|
-
* @public
|
|
1123
|
-
*/
|
|
1124
|
-
declare const TabPanel: (props: TabPanelProps) => react_jsx_runtime.JSX.Element;
|
|
1129
|
+
/** @public */
|
|
1130
|
+
declare const Text: {
|
|
1131
|
+
<T extends ElementType = "p">(props: TextProps<T> & {
|
|
1132
|
+
ref?: React.ComponentPropsWithRef<T>["ref"];
|
|
1133
|
+
}): React.ReactElement<TextProps<T>, T>;
|
|
1134
|
+
displayName: string;
|
|
1135
|
+
};
|
|
1125
1136
|
|
|
1126
1137
|
/** @public */
|
|
1127
1138
|
interface TextFieldProps extends TextFieldProps$1, Omit<FieldLabelProps, 'htmlFor' | 'id'> {
|
|
@@ -1222,9 +1233,10 @@ declare const SearchField: react.ForwardRefExoticComponent<SearchFieldProps & re
|
|
|
1222
1233
|
|
|
1223
1234
|
/** @public */
|
|
1224
1235
|
interface LinkProps extends LinkProps$1 {
|
|
1225
|
-
variant?:
|
|
1226
|
-
weight?:
|
|
1227
|
-
color?:
|
|
1236
|
+
variant?: TextVariants | Partial<Record<Breakpoint, TextVariants>>;
|
|
1237
|
+
weight?: TextWeights | Partial<Record<Breakpoint, TextWeights>>;
|
|
1238
|
+
color?: TextColors | TextColorStatus | Partial<Record<Breakpoint, TextColors | TextColorStatus>>;
|
|
1239
|
+
truncate?: boolean;
|
|
1228
1240
|
}
|
|
1229
1241
|
|
|
1230
1242
|
/** @public */
|
|
@@ -1395,4 +1407,4 @@ declare const useBreakpoint: () => {
|
|
|
1395
1407
|
down: (key: Breakpoint) => boolean;
|
|
1396
1408
|
};
|
|
1397
1409
|
|
|
1398
|
-
export { type AlignItems, type ArbitraryStylingPropDef,
|
|
1410
|
+
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, Checkbox, type CheckboxProps, type ClassNamesMap, Collapsible, type Columns, type ComponentClassNames, type ComponentDefinition, type ComponentDefinitionName, Container, type ContainerProps, type DataAttributeValues, type DataAttributesMap, DataTable, type DataTablePaginationProps, type DataTableRootProps, type DataTableTableProps, 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 HeaderBreadcrumb, type HeaderMenuItem, HeaderPage, 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, 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, type TableCellLinkProps, type TableCellProfileProps, type TableCellTextProps, Tabs, type TabsProps, Text, type TextColorStatus, type TextColors, TextField, type TextFieldProps, type TextOwnProps, type TextProps, type TextVariants, type TextWeights, Tooltip, type TooltipProps, TooltipTrigger, type UtilityProps, type WidthProps, boxPropDefs, breakpoints, componentDefinitions, displayPropDefs, flexPropDefs, gapPropDefs, gridItemPropDefs, gridPropDefs, heightPropDefs, icons, marginPropDefs, paddingPropDefs, positionPropDefs, useBreakpoint, useIcons, widthPropDefs };
|
package/dist/index.esm.js
CHANGED
|
@@ -6,8 +6,6 @@ export { gridItemPropDefs, gridPropDefs } from './components/Grid/Grid.props.esm
|
|
|
6
6
|
export { Flex } from './components/Flex/Flex.esm.js';
|
|
7
7
|
export { flexPropDefs } from './components/Flex/Flex.props.esm.js';
|
|
8
8
|
export { Container } from './components/Container/Container.esm.js';
|
|
9
|
-
export { Text } from './components/Text/Text.esm.js';
|
|
10
|
-
export { Heading } from './components/Heading/Heading.esm.js';
|
|
11
9
|
export { Avatar } from './components/Avatar/Avatar.esm.js';
|
|
12
10
|
export { Button } from './components/Button/Button.esm.js';
|
|
13
11
|
export { Card } from './components/Card/Card.esm.js';
|
|
@@ -25,6 +23,7 @@ export { Checkbox } from './components/Checkbox/Checkbox.esm.js';
|
|
|
25
23
|
export { Radio, RadioGroup } from './components/RadioGroup/RadioGroup.esm.js';
|
|
26
24
|
export { Table } from './components/Table/Table.esm.js';
|
|
27
25
|
export { Tab, TabList, TabPanel, Tabs } from './components/Tabs/Tabs.esm.js';
|
|
26
|
+
export { Text } from './components/Text/Text.esm.js';
|
|
28
27
|
export { TextField } from './components/TextField/TextField.esm.js';
|
|
29
28
|
export { Tooltip, TooltipTrigger } from './components/Tooltip/Tooltip.esm.js';
|
|
30
29
|
export { Menu } from './components/Menu/Menu.esm.js';
|
package/dist/index.esm.js.map
CHANGED
|
@@ -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":"componentDefinitions.esm.js","sources":["../../src/utils/componentDefinitions.ts"],"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 type { ComponentDefinition } from '../types';\n\n/**\n * Component definitions for the Backstage UI library\n * @public\n */\nexport const componentDefinitions = {\n Avatar: {\n classNames: {\n root: 'bui-AvatarRoot',\n image: 'bui-AvatarImage',\n fallback: 'bui-AvatarFallback',\n },\n dataAttributes: {\n size: ['small', 'medium', 'large'] as const,\n },\n },\n Box: {\n classNames: {\n root: 'bui-Box',\n },\n },\n Button: {\n classNames: {\n root: 'bui-Button',\n },\n dataAttributes: {\n size: ['small', 'medium', 'large'] as const,\n variant: ['primary', 'secondary', 'ghost'] as const,\n },\n },\n ButtonIcon: {\n classNames: {\n root: 'bui-ButtonIcon',\n },\n },\n ButtonLink: {\n classNames: {\n root: 'bui-ButtonLink',\n },\n },\n Card: {\n classNames: {\n root: 'bui-Card',\n header: 'bui-CardHeader',\n body: 'bui-CardBody',\n footer: 'bui-CardFooter',\n },\n },\n Checkbox: {\n classNames: {\n root: 'bui-CheckboxRoot',\n label: 'bui-CheckboxLabel',\n indicator: 'bui-CheckboxIndicator',\n },\n dataAttributes: {\n checked: [true, false] as const,\n },\n },\n Collapsible: {\n classNames: {\n root: 'bui-CollapsibleRoot',\n trigger: 'bui-CollapsibleTrigger',\n panel: 'bui-CollapsiblePanel',\n },\n },\n Container: {\n classNames: {\n root: 'bui-Container',\n },\n },\n FieldLabel: {\n classNames: {\n root: 'bui-FieldLabelWrapper',\n label: 'bui-FieldLabel',\n secondaryLabel: 'bui-FieldSecondaryLabel',\n description: 'bui-FieldDescription',\n },\n },\n Flex: {\n classNames: {\n root: 'bui-Flex',\n },\n },\n Grid: {\n classNames: {\n root: 'bui-Grid',\n item: 'bui-GridItem',\n },\n },\n Header: {\n classNames: {\n toolbar: 'bui-HeaderToolbar',\n toolbarWrapper: 'bui-HeaderToolbarWrapper',\n toolbarContent: 'bui-HeaderToolbarContent',\n toolbarControls: 'bui-HeaderToolbarControls',\n toolbarIcon: 'bui-HeaderToolbarIcon',\n toolbarName: 'bui-HeaderToolbarName',\n breadcrumbs: 'bui-HeaderBreadcrumbs',\n breadcrumb: 'bui-HeaderBreadcrumb',\n breadcrumbLink: 'bui-HeaderBreadcrumbLink',\n breadcrumbSeparator: 'bui-HeaderBreadcrumbSeparator',\n tabsWrapper: 'bui-HeaderTabsWrapper',\n },\n },\n HeaderPage: {\n classNames: {\n root: 'bui-HeaderPage',\n content: 'bui-HeaderPageContent',\n tabsWrapper: 'bui-HeaderPageTabsWrapper',\n controls: 'bui-HeaderPageControls',\n },\n },\n Heading: {\n classNames: {\n root: 'bui-Heading',\n },\n dataAttributes: {\n variant: ['title1', 'title2', 'title3', 'subtitle'] as const,\n color: ['primary', 'secondary', 'muted'] as const,\n truncate: [true, false] as const,\n },\n },\n Icon: {\n classNames: {\n root: 'bui-Icon',\n },\n },\n Link: {\n classNames: {\n root: 'bui-Link',\n },\n dataAttributes: {\n variant: ['subtitle', 'body', 'caption', 'label'] as const,\n weight: ['regular', 'bold'] as const,\n },\n },\n List: {\n classNames: {\n root: 'bui-List',\n row: 'bui-ListRow',\n label: 'bui-ListLabel',\n },\n },\n Menu: {\n classNames: {\n trigger: 'bui-MenuTrigger',\n backdrop: 'bui-MenuBackdrop',\n positioner: 'bui-MenuPositioner',\n popup: 'bui-MenuPopup',\n arrow: 'bui-MenuArrow',\n item: 'bui-MenuItem',\n group: 'bui-MenuGroup',\n groupLabel: 'bui-MenuGroupLabel',\n radioGroup: 'bui-MenuRadioGroup',\n radioItem: 'bui-MenuRadioItem',\n radioItemIndicator: 'bui-MenuRadioItemIndicator',\n checkboxItem: 'bui-MenuCheckboxItem',\n checkboxItemIndicator: 'bui-MenuCheckboxItemIndicator',\n submenuTrigger: 'bui-MenuSubmenuTrigger',\n separator: 'bui-MenuSeparator',\n },\n },\n Popover: {\n classNames: {\n root: 'bui-Popover',\n },\n },\n RadioGroup: {\n classNames: {\n root: 'bui-RadioGroup',\n content: 'bui-RadioGroupContent',\n radio: 'bui-Radio',\n },\n },\n ScrollArea: {\n classNames: {\n root: 'bui-ScrollAreaRoot',\n viewport: 'bui-ScrollAreaViewport',\n scrollbar: 'bui-ScrollAreaScrollbar',\n thumb: 'bui-ScrollAreaThumb',\n },\n },\n SearchField: {\n classNames: {\n root: 'bui-SearchField',\n clear: 'bui-InputClear',\n },\n },\n Select: {\n classNames: {\n root: 'bui-Select',\n trigger: 'bui-SelectTrigger',\n value: 'bui-SelectValue',\n icon: 'bui-SelectIcon',\n list: 'bui-SelectList',\n item: 'bui-SelectItem',\n itemIndicator: 'bui-SelectItemIndicator',\n itemLabel: 'bui-SelectItemLabel',\n },\n dataAttributes: {\n size: ['small', 'medium'] as const,\n },\n },\n Skeleton: {\n classNames: {\n root: 'bui-Skeleton',\n },\n },\n Switch: {\n classNames: {\n root: 'bui-Switch',\n indicator: 'bui-SwitchIndicator',\n },\n },\n Table: {\n classNames: {\n root: 'bui-TableRoot',\n header: 'bui-TableHeader',\n body: 'bui-TableBody',\n row: 'bui-TableRow',\n head: 'bui-TableHead',\n caption: 'bui-TableCaption',\n cell: 'bui-TableCell',\n cellText: 'bui-TableCellText',\n cellLink: 'bui-TableCellLink',\n cellProfile: 'bui-TableCellProfile',\n cellProfileAvatar: 'bui-TableCellProfileAvatar',\n cellProfileAvatarImage: 'bui-TableCellProfileAvatarImage',\n cellProfileAvatarFallback: 'bui-TableCellProfileAvatarFallback',\n cellProfileName: 'bui-TableCellProfileName',\n cellProfileLink: 'bui-TableCellProfileLink',\n },\n },\n Tabs: {\n classNames: {\n tabs: 'bui-Tabs',\n tabList: 'bui-TabList',\n tabListWrapper: 'bui-TabListWrapper',\n tab: 'bui-Tab',\n tabActive: 'bui-TabActive',\n tabHovered: 'bui-TabHovered',\n panel: 'bui-TabPanel',\n },\n },\n Text: {\n classNames: {\n root: 'bui-Text',\n },\n dataAttributes: {\n variant: ['subtitle', 'body', 'caption', 'label'] as const,\n weight: ['regular', 'bold'] as const,\n color: ['primary', 'secondary', 'danger', 'warning', 'success'] as const,\n truncate: [true, false] as const,\n },\n },\n TextField: {\n classNames: {\n root: 'bui-TextField',\n inputWrapper: 'bui-InputWrapper',\n input: 'bui-Input',\n inputIcon: 'bui-InputIcon',\n },\n dataAttributes: {\n invalid: [true, false] as const,\n disabled: [true, false] as const,\n },\n },\n Tooltip: {\n classNames: {\n tooltip: 'bui-Tooltip',\n arrow: 'bui-TooltipArrow',\n },\n },\n} as const satisfies Record<string, ComponentDefinition>;\n"],"names":[],"mappings":"AAsBO,MAAM,oBAAuB,GAAA;AAAA,EAClC,MAAQ,EAAA;AAAA,IACN,UAAY,EAAA;AAAA,MACV,IAAM,EAAA,gBAAA;AAAA,MACN,KAAO,EAAA,iBAAA;AAAA,MACP,QAAU,EAAA;AAAA,KACZ;AAAA,IACA,cAAgB,EAAA;AAAA,MACd,IAAM,EAAA,CAAC,OAAS,EAAA,QAAA,EAAU,OAAO;AAAA;AACnC,GACF;AAAA,EACA,GAAK,EAAA;AAAA,IACH,UAAY,EAAA;AAAA,MACV,IAAM,EAAA;AAAA;AACR,GACF;AAAA,EACA,MAAQ,EAAA;AAAA,IACN,UAAY,EAAA;AAAA,MACV,IAAM,EAAA;AAAA,KACR;AAAA,IACA,cAAgB,EAAA;AAAA,MACd,IAAM,EAAA,CAAC,OAAS,EAAA,QAAA,EAAU,OAAO,CAAA;AAAA,MACjC,OAAS,EAAA,CAAC,SAAW,EAAA,WAAA,EAAa,OAAO;AAAA;AAC3C,GACF;AAAA,EACA,UAAY,EAAA;AAAA,IACV,UAAY,EAAA;AAAA,MACV,IAAM,EAAA;AAAA;AACR,GACF;AAAA,EACA,UAAY,EAAA;AAAA,IACV,UAAY,EAAA;AAAA,MACV,IAAM,EAAA;AAAA;AACR,GACF;AAAA,EACA,IAAM,EAAA;AAAA,IACJ,UAAY,EAAA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W,MAAM,CAAA;AAAA,MAC1B,OAAO,CAAC,SAAA,EAAW,WAAa,EAAA,QAAA,EAAU,WAAW,SAAS,CAAA;AAAA,MAC9D,QAAA,EAAU,CAAC,IAAA,EAAM,KAAK;AAAA;AACxB,GACF;AAAA,EACA,SAAW,EAAA;AAAA,IACT,UAAY,EAAA;AAAA,MACV,IAAM,EAAA,eAAA;AAAA,MACN,YAAc,EAAA,kBAAA;AAAA,MACd,KAAO,EAAA,WAAA;AAAA,MACP,SAAW,EAAA;AAAA,KACb;AAAA,IACA,cAAgB,EAAA;AAAA,MACd,OAAA,EAAS,CAAC,IAAA,EAAM,KAAK,CAAA;AAAA,MACrB,QAAA,EAAU,CAAC,IAAA,EAAM,KAAK;AAAA;AACxB,GACF;AAAA,EACA,OAAS,EAAA;AAAA,IACP,UAAY,EAAA;AAAA,MACV,OAAS,EAAA,aAAA;AAAA,MACT,KAAO,EAAA;AAAA;AACT;AAEJ;;;;"}
|
|
1
|
+
{"version":3,"file":"componentDefinitions.esm.js","sources":["../../src/utils/componentDefinitions.ts"],"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 type { ComponentDefinition } from '../types';\n\n/**\n * Component definitions for the Backstage UI library\n * @public\n */\nexport const componentDefinitions = {\n Avatar: {\n classNames: {\n root: 'bui-AvatarRoot',\n image: 'bui-AvatarImage',\n fallback: 'bui-AvatarFallback',\n },\n dataAttributes: {\n size: ['small', 'medium', 'large'] as const,\n },\n },\n Box: {\n classNames: {\n root: 'bui-Box',\n },\n },\n Button: {\n classNames: {\n root: 'bui-Button',\n },\n dataAttributes: {\n size: ['small', 'medium', 'large'] as const,\n variant: ['primary', 'secondary', 'tertiary'] as const,\n },\n },\n ButtonIcon: {\n classNames: {\n root: 'bui-ButtonIcon',\n },\n },\n ButtonLink: {\n classNames: {\n root: 'bui-ButtonLink',\n },\n },\n Card: {\n classNames: {\n root: 'bui-Card',\n header: 'bui-CardHeader',\n body: 'bui-CardBody',\n footer: 'bui-CardFooter',\n },\n },\n Checkbox: {\n classNames: {\n root: 'bui-CheckboxRoot',\n label: 'bui-CheckboxLabel',\n indicator: 'bui-CheckboxIndicator',\n },\n dataAttributes: {\n checked: [true, false] as const,\n },\n },\n Collapsible: {\n classNames: {\n root: 'bui-CollapsibleRoot',\n trigger: 'bui-CollapsibleTrigger',\n panel: 'bui-CollapsiblePanel',\n },\n },\n Container: {\n classNames: {\n root: 'bui-Container',\n },\n },\n FieldLabel: {\n classNames: {\n root: 'bui-FieldLabelWrapper',\n label: 'bui-FieldLabel',\n secondaryLabel: 'bui-FieldSecondaryLabel',\n description: 'bui-FieldDescription',\n },\n },\n Flex: {\n classNames: {\n root: 'bui-Flex',\n },\n },\n Grid: {\n classNames: {\n root: 'bui-Grid',\n item: 'bui-GridItem',\n },\n },\n Header: {\n classNames: {\n toolbar: 'bui-HeaderToolbar',\n toolbarWrapper: 'bui-HeaderToolbarWrapper',\n toolbarContent: 'bui-HeaderToolbarContent',\n toolbarControls: 'bui-HeaderToolbarControls',\n toolbarIcon: 'bui-HeaderToolbarIcon',\n toolbarName: 'bui-HeaderToolbarName',\n breadcrumbs: 'bui-HeaderBreadcrumbs',\n breadcrumb: 'bui-HeaderBreadcrumb',\n breadcrumbLink: 'bui-HeaderBreadcrumbLink',\n breadcrumbSeparator: 'bui-HeaderBreadcrumbSeparator',\n tabsWrapper: 'bui-HeaderTabsWrapper',\n },\n },\n HeaderPage: {\n classNames: {\n root: 'bui-HeaderPage',\n content: 'bui-HeaderPageContent',\n tabsWrapper: 'bui-HeaderPageTabsWrapper',\n controls: 'bui-HeaderPageControls',\n },\n },\n Heading: {\n classNames: {\n root: 'bui-Heading',\n },\n dataAttributes: {\n variant: ['title1', 'title2', 'title3', 'subtitle'] as const,\n color: ['primary', 'secondary', 'muted'] as const,\n truncate: [true, false] as const,\n },\n },\n Icon: {\n classNames: {\n root: 'bui-Icon',\n },\n },\n Link: {\n classNames: {\n root: 'bui-Link',\n },\n dataAttributes: {\n variant: ['subtitle', 'body', 'caption', 'label'] as const,\n weight: ['regular', 'bold'] as const,\n },\n },\n List: {\n classNames: {\n root: 'bui-List',\n row: 'bui-ListRow',\n label: 'bui-ListLabel',\n },\n },\n Menu: {\n classNames: {\n trigger: 'bui-MenuTrigger',\n backdrop: 'bui-MenuBackdrop',\n positioner: 'bui-MenuPositioner',\n popup: 'bui-MenuPopup',\n arrow: 'bui-MenuArrow',\n item: 'bui-MenuItem',\n group: 'bui-MenuGroup',\n groupLabel: 'bui-MenuGroupLabel',\n radioGroup: 'bui-MenuRadioGroup',\n radioItem: 'bui-MenuRadioItem',\n radioItemIndicator: 'bui-MenuRadioItemIndicator',\n checkboxItem: 'bui-MenuCheckboxItem',\n checkboxItemIndicator: 'bui-MenuCheckboxItemIndicator',\n submenuTrigger: 'bui-MenuSubmenuTrigger',\n separator: 'bui-MenuSeparator',\n },\n },\n Popover: {\n classNames: {\n root: 'bui-Popover',\n },\n },\n RadioGroup: {\n classNames: {\n root: 'bui-RadioGroup',\n content: 'bui-RadioGroupContent',\n radio: 'bui-Radio',\n },\n },\n ScrollArea: {\n classNames: {\n root: 'bui-ScrollAreaRoot',\n viewport: 'bui-ScrollAreaViewport',\n scrollbar: 'bui-ScrollAreaScrollbar',\n thumb: 'bui-ScrollAreaThumb',\n },\n },\n SearchField: {\n classNames: {\n root: 'bui-SearchField',\n clear: 'bui-InputClear',\n },\n },\n Select: {\n classNames: {\n root: 'bui-Select',\n trigger: 'bui-SelectTrigger',\n value: 'bui-SelectValue',\n icon: 'bui-SelectIcon',\n list: 'bui-SelectList',\n item: 'bui-SelectItem',\n itemIndicator: 'bui-SelectItemIndicator',\n itemLabel: 'bui-SelectItemLabel',\n },\n dataAttributes: {\n size: ['small', 'medium'] as const,\n },\n },\n Skeleton: {\n classNames: {\n root: 'bui-Skeleton',\n },\n },\n Switch: {\n classNames: {\n root: 'bui-Switch',\n indicator: 'bui-SwitchIndicator',\n },\n },\n Table: {\n classNames: {\n root: 'bui-TableRoot',\n header: 'bui-TableHeader',\n body: 'bui-TableBody',\n row: 'bui-TableRow',\n head: 'bui-TableHead',\n caption: 'bui-TableCaption',\n cell: 'bui-TableCell',\n cellText: 'bui-TableCellText',\n cellLink: 'bui-TableCellLink',\n cellProfile: 'bui-TableCellProfile',\n cellProfileAvatar: 'bui-TableCellProfileAvatar',\n cellProfileAvatarImage: 'bui-TableCellProfileAvatarImage',\n cellProfileAvatarFallback: 'bui-TableCellProfileAvatarFallback',\n cellProfileName: 'bui-TableCellProfileName',\n cellProfileLink: 'bui-TableCellProfileLink',\n },\n },\n Tabs: {\n classNames: {\n tabs: 'bui-Tabs',\n tabList: 'bui-TabList',\n tabListWrapper: 'bui-TabListWrapper',\n tab: 'bui-Tab',\n tabActive: 'bui-TabActive',\n tabHovered: 'bui-TabHovered',\n panel: 'bui-TabPanel',\n },\n },\n Text: {\n classNames: {\n root: 'bui-Text',\n },\n dataAttributes: {\n variant: ['subtitle', 'body', 'caption', 'label'] as const,\n weight: ['regular', 'bold'] as const,\n color: ['primary', 'secondary', 'danger', 'warning', 'success'] as const,\n truncate: [true, false] as const,\n },\n },\n TextField: {\n classNames: {\n root: 'bui-TextField',\n inputWrapper: 'bui-InputWrapper',\n input: 'bui-Input',\n inputIcon: 'bui-InputIcon',\n },\n dataAttributes: {\n invalid: [true, false] as const,\n disabled: [true, false] as const,\n },\n },\n Tooltip: {\n classNames: {\n tooltip: 'bui-Tooltip',\n arrow: 'bui-TooltipArrow',\n },\n },\n} as const satisfies Record<string, ComponentDefinition>;\n"],"names":[],"mappings":"AAsBO,MAAM,oBAA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,IAAA,EAAM,KAAK;AAAA;AACxB,GACF;AAAA,EACA,OAAS,EAAA;AAAA,IACP,UAAY,EAAA;AAAA,MACV,OAAS,EAAA,aAAA;AAAA,MACT,KAAO,EAAA;AAAA;AACT;AAEJ;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0-next.1",
|
|
4
4
|
"backstage": {
|
|
5
5
|
"role": "web-library"
|
|
6
6
|
},
|
|
@@ -42,14 +42,15 @@
|
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@base-ui-components/react": "1.0.0-alpha.7",
|
|
45
|
+
"@gsap/react": "^2.1.2",
|
|
45
46
|
"@remixicon/react": "^4.6.0",
|
|
46
47
|
"@tanstack/react-table": "^8.21.3",
|
|
47
48
|
"clsx": "^2.1.1",
|
|
48
|
-
"
|
|
49
|
+
"gsap": "^3.13.0",
|
|
49
50
|
"react-aria-components": "^1.10.1"
|
|
50
51
|
},
|
|
51
52
|
"devDependencies": {
|
|
52
|
-
"@backstage/cli": "
|
|
53
|
+
"@backstage/cli": "0.33.2-next.0",
|
|
53
54
|
"@storybook/addon-essentials": "^8.6.12",
|
|
54
55
|
"@storybook/addon-interactions": "^8.6.12",
|
|
55
56
|
"@storybook/addon-styling-webpack": "^1.0.1",
|
|
@@ -61,6 +62,7 @@
|
|
|
61
62
|
"@types/react": "^18.0.0",
|
|
62
63
|
"@types/react-dom": "^18.0.0",
|
|
63
64
|
"chalk": "^5.4.1",
|
|
65
|
+
"concurrently": "^9.2.0",
|
|
64
66
|
"eslint-plugin-storybook": "^0.12.0",
|
|
65
67
|
"glob": "^11.0.1",
|
|
66
68
|
"globals": "^15.11.0",
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { forwardRef } from 'react';
|
|
3
|
-
import clsx from 'clsx';
|
|
4
|
-
import { useStyles } from '../../hooks/useStyles.esm.js';
|
|
5
|
-
|
|
6
|
-
function HeadingComponent({
|
|
7
|
-
as,
|
|
8
|
-
variant = "title1",
|
|
9
|
-
color = "primary",
|
|
10
|
-
truncate,
|
|
11
|
-
className,
|
|
12
|
-
style,
|
|
13
|
-
...restProps
|
|
14
|
-
}, ref) {
|
|
15
|
-
const Component = as || "h1";
|
|
16
|
-
const { classNames, dataAttributes } = useStyles("Heading", {
|
|
17
|
-
variant,
|
|
18
|
-
color
|
|
19
|
-
});
|
|
20
|
-
return /* @__PURE__ */ jsx(
|
|
21
|
-
Component,
|
|
22
|
-
{
|
|
23
|
-
ref,
|
|
24
|
-
className: clsx(classNames.root, className),
|
|
25
|
-
"data-truncate": truncate,
|
|
26
|
-
...dataAttributes,
|
|
27
|
-
style,
|
|
28
|
-
...restProps
|
|
29
|
-
}
|
|
30
|
-
);
|
|
31
|
-
}
|
|
32
|
-
HeadingComponent.displayName = "Heading";
|
|
33
|
-
const Heading = forwardRef(HeadingComponent);
|
|
34
|
-
Heading.displayName = "Heading";
|
|
35
|
-
|
|
36
|
-
export { Heading };
|
|
37
|
-
//# sourceMappingURL=Heading.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Heading.esm.js","sources":["../../../src/components/Heading/Heading.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 clsx from 'clsx';\nimport type { ElementType } from 'react';\nimport type { HeadingProps } from './types';\nimport { useStyles } from '../../hooks/useStyles';\n\nfunction HeadingComponent<T extends ElementType = 'h1'>(\n {\n as,\n variant = 'title1',\n color = 'primary',\n truncate,\n className,\n style,\n ...restProps\n }: HeadingProps<T>,\n ref: React.Ref<any>,\n) {\n const Component = as || 'h1';\n\n const { classNames, dataAttributes } = useStyles('Heading', {\n variant,\n color,\n });\n\n return (\n <Component\n ref={ref}\n className={clsx(classNames.root, className)}\n data-truncate={truncate}\n {...dataAttributes}\n style={style}\n {...restProps}\n />\n );\n}\n\nHeadingComponent.displayName = 'Heading';\n\n/** @public */\nexport const Heading = forwardRef(HeadingComponent) as {\n <T extends ElementType = 'h1'>(\n props: HeadingProps<T> & { ref?: React.ComponentPropsWithRef<T>['ref'] },\n ): React.ReactElement<HeadingProps<T>, T>;\n displayName: string;\n};\n\nHeading.displayName = 'Heading';\n"],"names":[],"mappings":";;;;;AAsBA,SAAS,gBACP,CAAA;AAAA,EACE,EAAA;AAAA,EACA,OAAU,GAAA,QAAA;AAAA,EACV,KAAQ,GAAA,SAAA;AAAA,EACR,QAAA;AAAA,EACA,SAAA;AAAA,EACA,KAAA;AAAA,EACA,GAAG;AACL,CAAA,EACA,GACA,EAAA;AACA,EAAA,MAAM,YAAY,EAAM,IAAA,IAAA;AAExB,EAAA,MAAM,EAAE,UAAA,EAAY,cAAe,EAAA,GAAI,UAAU,SAAW,EAAA;AAAA,IAC1D,OAAA;AAAA,IACA;AAAA,GACD,CAAA;AAED,EACE,uBAAA,GAAA;AAAA,IAAC,SAAA;AAAA,IAAA;AAAA,MACC,GAAA;AAAA,MACA,SAAW,EAAA,IAAA,CAAK,UAAW,CAAA,IAAA,EAAM,SAAS,CAAA;AAAA,MAC1C,eAAe,EAAA,QAAA;AAAA,MACd,GAAG,cAAA;AAAA,MACJ,KAAA;AAAA,MACC,GAAG;AAAA;AAAA,GACN;AAEJ;AAEA,gBAAA,CAAiB,WAAc,GAAA,SAAA;AAGlB,MAAA,OAAA,GAAU,WAAW,gBAAgB;AAOlD,OAAA,CAAQ,WAAc,GAAA,SAAA;;;;"}
|