@backstage/ui 0.12.0 → 0.13.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 +120 -0
- package/dist/components/Accordion/Accordion.esm.js +4 -2
- package/dist/components/Accordion/Accordion.esm.js.map +1 -1
- package/dist/components/Accordion/Accordion.module.css.esm.js +2 -2
- package/dist/components/Accordion/definition.esm.js +4 -2
- package/dist/components/Accordion/definition.esm.js.map +1 -1
- package/dist/components/Alert/definition.esm.js +1 -1
- package/dist/components/Avatar/Avatar.esm.js +8 -28
- package/dist/components/Avatar/Avatar.esm.js.map +1 -1
- package/dist/components/Avatar/definition.esm.js +17 -4
- package/dist/components/Avatar/definition.esm.js.map +1 -1
- package/dist/components/Box/definition.esm.js +1 -1
- package/dist/components/Button/definition.esm.js +2 -3
- package/dist/components/Button/definition.esm.js.map +1 -1
- package/dist/components/ButtonIcon/definition.esm.js +2 -3
- package/dist/components/ButtonIcon/definition.esm.js.map +1 -1
- package/dist/components/ButtonLink/definition.esm.js +2 -3
- package/dist/components/ButtonLink/definition.esm.js.map +1 -1
- package/dist/components/Card/Card.esm.js +1 -1
- package/dist/components/Card/Card.esm.js.map +1 -1
- package/dist/components/Card/definition.esm.js +1 -1
- package/dist/components/Checkbox/Checkbox.esm.js +10 -17
- package/dist/components/Checkbox/Checkbox.esm.js.map +1 -1
- package/dist/components/Checkbox/definition.esm.js +16 -5
- package/dist/components/Checkbox/definition.esm.js.map +1 -1
- package/dist/components/Container/Container.esm.js +8 -13
- package/dist/components/Container/Container.esm.js.map +1 -1
- package/dist/components/Container/Container.module.css.esm.js +2 -2
- package/dist/components/Container/definition.esm.js +16 -2
- package/dist/components/Container/definition.esm.js.map +1 -1
- package/dist/components/Dialog/Dialog.esm.js +26 -59
- package/dist/components/Dialog/Dialog.esm.js.map +1 -1
- package/dist/components/Dialog/Dialog.module.css.esm.js +2 -2
- package/dist/components/Dialog/definition.esm.js +52 -8
- package/dist/components/Dialog/definition.esm.js.map +1 -1
- package/dist/components/FieldError/FieldError.esm.js +4 -13
- package/dist/components/FieldError/FieldError.esm.js.map +1 -1
- package/dist/components/FieldError/definition.esm.js +14 -2
- package/dist/components/FieldError/definition.esm.js.map +1 -1
- package/dist/components/FieldLabel/FieldLabel.esm.js +14 -59
- package/dist/components/FieldLabel/FieldLabel.esm.js.map +1 -1
- package/dist/components/FieldLabel/definition.esm.js +19 -2
- package/dist/components/FieldLabel/definition.esm.js.map +1 -1
- package/dist/components/Flex/Flex.esm.js +11 -22
- package/dist/components/Flex/Flex.esm.js.map +1 -1
- package/dist/components/Flex/definition.esm.js +19 -13
- package/dist/components/Flex/definition.esm.js.map +1 -1
- package/dist/components/FullPage/FullPage.esm.js +4 -13
- package/dist/components/FullPage/FullPage.esm.js.map +1 -1
- package/dist/components/FullPage/definition.esm.js +14 -2
- package/dist/components/FullPage/definition.esm.js.map +1 -1
- package/dist/components/Grid/Grid.esm.js +19 -40
- package/dist/components/Grid/Grid.esm.js.map +1 -1
- package/dist/components/Grid/definition.esm.js +30 -26
- package/dist/components/Grid/definition.esm.js.map +1 -1
- package/dist/components/HeaderPage/HeaderPage.esm.js +38 -60
- package/dist/components/HeaderPage/HeaderPage.esm.js.map +1 -1
- package/dist/components/HeaderPage/definition.esm.js +18 -2
- package/dist/components/HeaderPage/definition.esm.js.map +1 -1
- package/dist/components/Link/Link.esm.js +6 -34
- package/dist/components/Link/Link.esm.js.map +1 -1
- package/dist/components/Link/definition.esm.js +20 -15
- package/dist/components/Link/definition.esm.js.map +1 -1
- package/dist/components/Menu/Menu.esm.js +162 -343
- package/dist/components/Menu/Menu.esm.js.map +1 -1
- package/dist/components/Menu/Menu.module.css.esm.js +2 -2
- package/dist/components/Menu/definition.esm.js +113 -17
- package/dist/components/Menu/definition.esm.js.map +1 -1
- package/dist/components/PasswordField/PasswordField.esm.js +17 -52
- package/dist/components/PasswordField/PasswordField.esm.js.map +1 -1
- package/dist/components/PasswordField/PasswordField.module.css.esm.js +2 -2
- package/dist/components/PasswordField/definition.esm.js +28 -11
- package/dist/components/PasswordField/definition.esm.js.map +1 -1
- package/dist/components/PluginHeader/PluginHeader.esm.js +33 -46
- package/dist/components/PluginHeader/PluginHeader.esm.js.map +1 -1
- package/dist/components/PluginHeader/PluginHeader.module.css.esm.js +2 -2
- package/dist/components/PluginHeader/definition.esm.js +21 -3
- package/dist/components/PluginHeader/definition.esm.js.map +1 -1
- package/dist/components/Popover/Popover.esm.js +24 -32
- package/dist/components/Popover/Popover.esm.js.map +1 -1
- package/dist/components/Popover/Popover.module.css.esm.js +2 -2
- package/dist/components/Popover/definition.esm.js +16 -2
- package/dist/components/Popover/definition.esm.js.map +1 -1
- package/dist/components/RadioGroup/RadioGroup.esm.js +25 -44
- package/dist/components/RadioGroup/RadioGroup.esm.js.map +1 -1
- package/dist/components/RadioGroup/RadioGroup.module.css.esm.js +2 -2
- package/dist/components/RadioGroup/definition.esm.js +30 -5
- package/dist/components/RadioGroup/definition.esm.js.map +1 -1
- package/dist/components/SearchField/SearchField.esm.js +25 -45
- package/dist/components/SearchField/SearchField.esm.js.map +1 -1
- package/dist/components/SearchField/SearchField.module.css.esm.js +2 -2
- package/dist/components/SearchField/definition.esm.js +20 -5
- package/dist/components/SearchField/definition.esm.js.map +1 -1
- package/dist/components/Select/Select.esm.js +14 -23
- package/dist/components/Select/Select.esm.js.map +1 -1
- package/dist/components/Select/Select.module.css.esm.js +2 -2
- package/dist/components/Select/SelectContent.esm.js +8 -31
- package/dist/components/Select/SelectContent.esm.js.map +1 -1
- package/dist/components/Select/SelectListBox.esm.js +21 -44
- package/dist/components/Select/SelectListBox.esm.js.map +1 -1
- package/dist/components/Select/SelectTrigger.esm.js +8 -14
- package/dist/components/Select/SelectTrigger.esm.js.map +1 -1
- package/dist/components/Select/definition.esm.js +67 -17
- package/dist/components/Select/definition.esm.js.map +1 -1
- package/dist/components/Skeleton/Skeleton.esm.js +9 -13
- package/dist/components/Skeleton/Skeleton.esm.js.map +1 -1
- package/dist/components/Skeleton/definition.esm.js +18 -2
- package/dist/components/Skeleton/definition.esm.js.map +1 -1
- package/dist/components/Switch/Switch.esm.js +7 -22
- package/dist/components/Switch/Switch.esm.js.map +1 -1
- package/dist/components/Switch/definition.esm.js +15 -2
- package/dist/components/Switch/definition.esm.js.map +1 -1
- package/dist/components/Table/components/Cell.esm.js +4 -17
- package/dist/components/Table/components/Cell.esm.js.map +1 -1
- package/dist/components/Table/components/CellProfile.esm.js +12 -41
- package/dist/components/Table/components/CellProfile.esm.js.map +1 -1
- package/dist/components/Table/components/CellText.esm.js +39 -73
- package/dist/components/Table/components/CellText.esm.js.map +1 -1
- package/dist/components/Table/components/Column.esm.js +8 -36
- package/dist/components/Table/components/Column.esm.js.map +1 -1
- package/dist/components/Table/components/Row.esm.js +9 -19
- package/dist/components/Table/components/Row.esm.js.map +1 -1
- package/dist/components/Table/components/Table.esm.js +7 -0
- package/dist/components/Table/components/Table.esm.js.map +1 -1
- package/dist/components/Table/components/TableBody.esm.js +4 -12
- package/dist/components/Table/components/TableBody.esm.js.map +1 -1
- package/dist/components/Table/components/TableHeader.esm.js +19 -29
- package/dist/components/Table/components/TableHeader.esm.js.map +1 -1
- package/dist/components/Table/components/TableRoot.esm.js +5 -7
- package/dist/components/Table/components/TableRoot.esm.js.map +1 -1
- package/dist/components/Table/definition.esm.js +97 -21
- package/dist/components/Table/definition.esm.js.map +1 -1
- package/dist/components/TablePagination/TablePagination.esm.js +24 -32
- package/dist/components/TablePagination/TablePagination.esm.js.map +1 -1
- package/dist/components/TablePagination/definition.esm.js +32 -2
- package/dist/components/TablePagination/definition.esm.js.map +1 -1
- package/dist/components/Tabs/Tabs.esm.js +40 -63
- package/dist/components/Tabs/Tabs.esm.js.map +1 -1
- package/dist/components/Tabs/TabsIndicators.esm.js +6 -18
- package/dist/components/Tabs/TabsIndicators.esm.js.map +1 -1
- package/dist/components/Tabs/definition.esm.js +62 -10
- package/dist/components/Tabs/definition.esm.js.map +1 -1
- package/dist/components/TagGroup/TagGroup.esm.js +36 -63
- package/dist/components/TagGroup/TagGroup.esm.js.map +1 -1
- package/dist/components/TagGroup/definition.esm.js +35 -8
- package/dist/components/TagGroup/definition.esm.js.map +1 -1
- package/dist/components/Text/Text.esm.js +6 -13
- package/dist/components/Text/Text.esm.js.map +1 -1
- package/dist/components/Text/definition.esm.js +18 -14
- package/dist/components/Text/definition.esm.js.map +1 -1
- package/dist/components/TextField/TextField.esm.js +16 -41
- package/dist/components/TextField/TextField.esm.js.map +1 -1
- package/dist/components/TextField/definition.esm.js +19 -6
- package/dist/components/TextField/definition.esm.js.map +1 -1
- package/dist/components/ToggleButton/ToggleButton.esm.js +11 -23
- package/dist/components/ToggleButton/ToggleButton.esm.js.map +1 -1
- package/dist/components/ToggleButton/definition.esm.js +17 -4
- package/dist/components/ToggleButton/definition.esm.js.map +1 -1
- package/dist/components/ToggleButtonGroup/ToggleButtonGroup.esm.js +5 -18
- package/dist/components/ToggleButtonGroup/ToggleButtonGroup.esm.js.map +1 -1
- package/dist/components/ToggleButtonGroup/definition.esm.js +14 -4
- package/dist/components/ToggleButtonGroup/definition.esm.js.map +1 -1
- package/dist/components/Tooltip/Tooltip.esm.js +24 -30
- package/dist/components/Tooltip/Tooltip.esm.js.map +1 -1
- package/dist/components/Tooltip/Tooltip.module.css.esm.js +2 -2
- package/dist/components/Tooltip/definition.esm.js +16 -2
- package/dist/components/Tooltip/definition.esm.js.map +1 -1
- package/dist/components/VisuallyHidden/VisuallyHidden.esm.js +4 -12
- package/dist/components/VisuallyHidden/VisuallyHidden.esm.js.map +1 -1
- package/dist/components/VisuallyHidden/definition.esm.js +14 -2
- package/dist/components/VisuallyHidden/definition.esm.js.map +1 -1
- package/dist/css/styles.css +2 -4
- package/dist/hooks/useBg.esm.js +11 -2
- package/dist/hooks/useBg.esm.js.map +1 -1
- package/dist/hooks/useBreakpoint.esm.js +67 -27
- package/dist/hooks/useBreakpoint.esm.js.map +1 -1
- package/dist/hooks/useDefinition/helpers.esm.js +24 -1
- package/dist/hooks/useDefinition/helpers.esm.js.map +1 -1
- package/dist/hooks/useDefinition/useDefinition.esm.js +12 -22
- package/dist/hooks/useDefinition/useDefinition.esm.js.map +1 -1
- package/dist/index.d.ts +860 -273
- package/dist/index.esm.js +2 -2
- package/package.json +6 -4
- package/dist/components/PluginHeader/PluginHeaderToolbar.esm.js +0 -94
- package/dist/components/PluginHeader/PluginHeaderToolbar.esm.js.map +0 -1
- package/dist/hooks/useMediaQuery.esm.js +0 -47
- package/dist/hooks/useMediaQuery.esm.js.map +0 -1
- package/dist/hooks/useStyles.esm.js +0 -53
- package/dist/hooks/useStyles.esm.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldLabel.esm.js","sources":["../../../src/components/FieldLabel/FieldLabel.tsx"],"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 */\nimport { Label } from 'react-aria-components';\nimport { forwardRef } from 'react';\nimport type { FieldLabelProps } from './types';\nimport {
|
|
1
|
+
{"version":3,"file":"FieldLabel.esm.js","sources":["../../../src/components/FieldLabel/FieldLabel.tsx"],"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 */\nimport { Label } from 'react-aria-components';\nimport { forwardRef } from 'react';\nimport type { FieldLabelProps } from './types';\nimport { useDefinition } from '../../hooks/useDefinition';\nimport { FieldLabelDefinition } from './definition';\n\n/** @public */\nexport const FieldLabel = forwardRef<HTMLDivElement, FieldLabelProps>(\n (props: FieldLabelProps, ref) => {\n const { ownProps, restProps } = useDefinition(FieldLabelDefinition, props);\n const { classes, label, secondaryLabel, description, htmlFor, id } =\n ownProps;\n\n if (!label) return null;\n\n return (\n <div className={classes.root} {...restProps} ref={ref}>\n {label && (\n <Label className={classes.label} htmlFor={htmlFor} id={id}>\n {label}\n {secondaryLabel && (\n <span aria-hidden=\"true\" className={classes.secondaryLabel}>\n ({secondaryLabel})\n </span>\n )}\n </Label>\n )}\n {description && (\n <div className={classes.description}>{description}</div>\n )}\n </div>\n );\n },\n);\n\nFieldLabel.displayName = 'FieldLabel';\n"],"names":[],"mappings":";;;;;;AAsBO,MAAM,UAAA,GAAa,UAAA;AAAA,EACxB,CAAC,OAAwB,GAAA,KAAQ;AAC/B,IAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAU,GAAI,aAAA,CAAc,sBAAsB,KAAK,CAAA;AACzE,IAAA,MAAM,EAAE,OAAA,EAAS,KAAA,EAAO,gBAAgB,WAAA,EAAa,OAAA,EAAS,IAAG,GAC/D,QAAA;AAEF,IAAA,IAAI,CAAC,OAAO,OAAO,IAAA;AAEnB,IAAA,4BACG,KAAA,EAAA,EAAI,SAAA,EAAW,QAAQ,IAAA,EAAO,GAAG,WAAW,GAAA,EAC1C,QAAA,EAAA;AAAA,MAAA,KAAA,yBACE,KAAA,EAAA,EAAM,SAAA,EAAW,OAAA,CAAQ,KAAA,EAAO,SAAkB,EAAA,EAChD,QAAA,EAAA;AAAA,QAAA,KAAA;AAAA,QACA,kCACC,IAAA,CAAC,MAAA,EAAA,EAAK,eAAY,MAAA,EAAO,SAAA,EAAW,QAAQ,cAAA,EAAgB,QAAA,EAAA;AAAA,UAAA,GAAA;AAAA,UACxD,cAAA;AAAA,UAAe;AAAA,SAAA,EACnB;AAAA,OAAA,EAEJ,CAAA;AAAA,MAED,+BACC,GAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,OAAA,CAAQ,aAAc,QAAA,EAAA,WAAA,EAAY;AAAA,KAAA,EAEtD,CAAA;AAAA,EAEJ;AACF;AAEA,UAAA,CAAW,WAAA,GAAc,YAAA;;;;"}
|
|
@@ -1,11 +1,28 @@
|
|
|
1
|
-
|
|
1
|
+
import 'react/jsx-runtime';
|
|
2
|
+
import 'clsx';
|
|
3
|
+
import '../../hooks/useBreakpoint.esm.js';
|
|
4
|
+
import '../../hooks/useBg.esm.js';
|
|
5
|
+
import '../../hooks/useDefinition/helpers.esm.js';
|
|
6
|
+
import { defineComponent } from '../../hooks/useDefinition/defineComponent.esm.js';
|
|
7
|
+
import styles from './FieldLabel.module.css.esm.js';
|
|
8
|
+
|
|
9
|
+
const FieldLabelDefinition = defineComponent()({
|
|
10
|
+
styles,
|
|
2
11
|
classNames: {
|
|
3
12
|
root: "bui-FieldLabelWrapper",
|
|
4
13
|
label: "bui-FieldLabel",
|
|
5
14
|
secondaryLabel: "bui-FieldSecondaryLabel",
|
|
6
15
|
description: "bui-FieldDescription"
|
|
16
|
+
},
|
|
17
|
+
propDefs: {
|
|
18
|
+
label: {},
|
|
19
|
+
secondaryLabel: {},
|
|
20
|
+
description: {},
|
|
21
|
+
htmlFor: {},
|
|
22
|
+
id: {},
|
|
23
|
+
className: {}
|
|
7
24
|
}
|
|
8
|
-
};
|
|
25
|
+
});
|
|
9
26
|
|
|
10
27
|
export { FieldLabelDefinition };
|
|
11
28
|
//# sourceMappingURL=definition.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definition.esm.js","sources":["../../../src/components/FieldLabel/definition.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 {
|
|
1
|
+
{"version":3,"file":"definition.esm.js","sources":["../../../src/components/FieldLabel/definition.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 { defineComponent } from '../../hooks/useDefinition';\nimport type { FieldLabelOwnProps } from './types';\nimport styles from './FieldLabel.module.css';\n\n/**\n * Component definition for FieldLabel\n * @public\n */\nexport const FieldLabelDefinition = defineComponent<FieldLabelOwnProps>()({\n styles,\n classNames: {\n root: 'bui-FieldLabelWrapper',\n label: 'bui-FieldLabel',\n secondaryLabel: 'bui-FieldSecondaryLabel',\n description: 'bui-FieldDescription',\n },\n propDefs: {\n label: {},\n secondaryLabel: {},\n description: {},\n htmlFor: {},\n id: {},\n className: {},\n },\n});\n"],"names":[],"mappings":";;;;;;;;AAwBO,MAAM,oBAAA,GAAuB,iBAAoC,CAAE;AAAA,EACxE,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM,uBAAA;AAAA,IACN,KAAA,EAAO,gBAAA;AAAA,IACP,cAAA,EAAgB,yBAAA;AAAA,IAChB,WAAA,EAAa;AAAA,GACf;AAAA,EACA,QAAA,EAAU;AAAA,IACR,OAAO,EAAC;AAAA,IACR,gBAAgB,EAAC;AAAA,IACjB,aAAa,EAAC;AAAA,IACd,SAAS,EAAC;AAAA,IACV,IAAI,EAAC;AAAA,IACL,WAAW;AAAC;AAEhB,CAAC;;;;"}
|
|
@@ -1,37 +1,26 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { forwardRef } from 'react';
|
|
3
|
-
import
|
|
4
|
-
import { useStyles } from '../../hooks/useStyles.esm.js';
|
|
3
|
+
import { useDefinition } from '../../hooks/useDefinition/useDefinition.esm.js';
|
|
5
4
|
import { FlexDefinition } from './definition.esm.js';
|
|
6
|
-
import styles from './Flex.module.css.esm.js';
|
|
7
|
-
import { useBgProvider, BgProvider } from '../../hooks/useBg.esm.js';
|
|
8
5
|
|
|
9
6
|
const Flex = forwardRef((props, ref) => {
|
|
10
|
-
const {
|
|
11
|
-
|
|
12
|
-
gap: "4",
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
});
|
|
17
|
-
const { className, bg, ...rest } = cleanedProps;
|
|
18
|
-
const content = /* @__PURE__ */ jsx(
|
|
7
|
+
const { ownProps, dataAttributes, utilityStyle } = useDefinition(
|
|
8
|
+
FlexDefinition,
|
|
9
|
+
{ gap: "4", ...props }
|
|
10
|
+
);
|
|
11
|
+
const { classes, childrenWithBgProvider } = ownProps;
|
|
12
|
+
return /* @__PURE__ */ jsx(
|
|
19
13
|
"div",
|
|
20
14
|
{
|
|
21
15
|
ref,
|
|
22
|
-
className:
|
|
23
|
-
|
|
24
|
-
utilityClasses,
|
|
25
|
-
styles[classNames.root],
|
|
26
|
-
className
|
|
27
|
-
),
|
|
28
|
-
style,
|
|
16
|
+
className: classes.root,
|
|
17
|
+
style: { ...utilityStyle, ...ownProps.style },
|
|
29
18
|
...dataAttributes,
|
|
30
|
-
|
|
19
|
+
children: childrenWithBgProvider
|
|
31
20
|
}
|
|
32
21
|
);
|
|
33
|
-
return resolvedBg ? /* @__PURE__ */ jsx(BgProvider, { bg: resolvedBg, children: content }) : content;
|
|
34
22
|
});
|
|
23
|
+
Flex.displayName = "Flex";
|
|
35
24
|
|
|
36
25
|
export { Flex };
|
|
37
26
|
//# sourceMappingURL=Flex.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Flex.esm.js","sources":["../../../src/components/Flex/Flex.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 { FlexProps } from './types';\nimport
|
|
1
|
+
{"version":3,"file":"Flex.esm.js","sources":["../../../src/components/Flex/Flex.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 type { FlexProps } from './types';\nimport { useDefinition } from '../../hooks/useDefinition';\nimport { FlexDefinition } from './definition';\n\n/** @public */\nexport const Flex = forwardRef<HTMLDivElement, FlexProps>((props, ref) => {\n const { ownProps, dataAttributes, utilityStyle } = useDefinition(\n FlexDefinition,\n { gap: '4', ...props },\n );\n const { classes, childrenWithBgProvider } = ownProps;\n\n return (\n <div\n ref={ref}\n className={classes.root}\n style={{ ...utilityStyle, ...ownProps.style }}\n {...dataAttributes}\n >\n {childrenWithBgProvider}\n </div>\n );\n});\n\nFlex.displayName = 'Flex';\n"],"names":[],"mappings":";;;;;AAsBO,MAAM,IAAA,GAAO,UAAA,CAAsC,CAAC,KAAA,EAAO,GAAA,KAAQ;AACxE,EAAA,MAAM,EAAE,QAAA,EAAU,cAAA,EAAgB,YAAA,EAAa,GAAI,aAAA;AAAA,IACjD,cAAA;AAAA,IACA,EAAE,GAAA,EAAK,GAAA,EAAK,GAAG,KAAA;AAAM,GACvB;AACA,EAAA,MAAM,EAAE,OAAA,EAAS,sBAAA,EAAuB,GAAI,QAAA;AAE5C,EAAA,uBACE,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,GAAA;AAAA,MACA,WAAW,OAAA,CAAQ,IAAA;AAAA,MACnB,OAAO,EAAE,GAAG,YAAA,EAAc,GAAG,SAAS,KAAA,EAAM;AAAA,MAC3C,GAAG,cAAA;AAAA,MAEH,QAAA,EAAA;AAAA;AAAA,GACH;AAEJ,CAAC;AAED,IAAA,CAAK,WAAA,GAAc,MAAA;;;;"}
|
|
@@ -1,7 +1,23 @@
|
|
|
1
|
-
|
|
1
|
+
import 'react/jsx-runtime';
|
|
2
|
+
import 'clsx';
|
|
3
|
+
import '../../hooks/useBreakpoint.esm.js';
|
|
4
|
+
import '../../hooks/useBg.esm.js';
|
|
5
|
+
import '../../hooks/useDefinition/helpers.esm.js';
|
|
6
|
+
import { defineComponent } from '../../hooks/useDefinition/defineComponent.esm.js';
|
|
7
|
+
import styles from './Flex.module.css.esm.js';
|
|
8
|
+
|
|
9
|
+
const FlexDefinition = defineComponent()({
|
|
10
|
+
styles,
|
|
2
11
|
classNames: {
|
|
3
12
|
root: "bui-Flex"
|
|
4
13
|
},
|
|
14
|
+
bg: "provider",
|
|
15
|
+
propDefs: {
|
|
16
|
+
bg: { dataAttribute: true },
|
|
17
|
+
children: {},
|
|
18
|
+
className: {},
|
|
19
|
+
style: {}
|
|
20
|
+
},
|
|
5
21
|
utilityProps: [
|
|
6
22
|
"m",
|
|
7
23
|
"mb",
|
|
@@ -21,18 +37,8 @@ const FlexDefinition = {
|
|
|
21
37
|
"align",
|
|
22
38
|
"justify",
|
|
23
39
|
"direction"
|
|
24
|
-
]
|
|
25
|
-
|
|
26
|
-
bg: [
|
|
27
|
-
"neutral-1",
|
|
28
|
-
"neutral-2",
|
|
29
|
-
"neutral-3",
|
|
30
|
-
"danger",
|
|
31
|
-
"warning",
|
|
32
|
-
"success"
|
|
33
|
-
]
|
|
34
|
-
}
|
|
35
|
-
};
|
|
40
|
+
]
|
|
41
|
+
});
|
|
36
42
|
|
|
37
43
|
export { FlexDefinition };
|
|
38
44
|
//# sourceMappingURL=definition.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definition.esm.js","sources":["../../../src/components/Flex/definition.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 {
|
|
1
|
+
{"version":3,"file":"definition.esm.js","sources":["../../../src/components/Flex/definition.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 { defineComponent } from '../../hooks/useDefinition';\nimport type { FlexOwnProps } from './types';\nimport styles from './Flex.module.css';\n\n/**\n * Component definition for Flex\n * @public\n */\nexport const FlexDefinition = defineComponent<FlexOwnProps>()({\n styles,\n classNames: {\n root: 'bui-Flex',\n },\n bg: 'provider',\n propDefs: {\n bg: { dataAttribute: true },\n children: {},\n className: {},\n style: {},\n },\n utilityProps: [\n 'm',\n 'mb',\n 'ml',\n 'mr',\n 'mt',\n 'mx',\n 'my',\n 'p',\n 'pb',\n 'pl',\n 'pr',\n 'pt',\n 'px',\n 'py',\n 'gap',\n 'align',\n 'justify',\n 'direction',\n ],\n});\n"],"names":[],"mappings":";;;;;;;;AAwBO,MAAM,cAAA,GAAiB,iBAA8B,CAAE;AAAA,EAC5D,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM;AAAA,GACR;AAAA,EACA,EAAA,EAAI,UAAA;AAAA,EACJ,QAAA,EAAU;AAAA,IACR,EAAA,EAAI,EAAE,aAAA,EAAe,IAAA,EAAK;AAAA,IAC1B,UAAU,EAAC;AAAA,IACX,WAAW,EAAC;AAAA,IACZ,OAAO;AAAC,GACV;AAAA,EACA,YAAA,EAAc;AAAA,IACZ,GAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,GAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,KAAA;AAAA,IACA,OAAA;AAAA,IACA,SAAA;AAAA,IACA;AAAA;AAEJ,CAAC;;;;"}
|
|
@@ -1,21 +1,12 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { forwardRef } from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { useDefinition } from '../../hooks/useDefinition/useDefinition.esm.js';
|
|
4
4
|
import { FullPageDefinition } from './definition.esm.js';
|
|
5
|
-
import styles from './FullPage.module.css.esm.js';
|
|
6
|
-
import clsx from 'clsx';
|
|
7
5
|
|
|
8
6
|
const FullPage = forwardRef((props, ref) => {
|
|
9
|
-
const {
|
|
10
|
-
const {
|
|
11
|
-
return /* @__PURE__ */ jsx(
|
|
12
|
-
"main",
|
|
13
|
-
{
|
|
14
|
-
ref,
|
|
15
|
-
className: clsx(classNames.root, styles[classNames.root], className),
|
|
16
|
-
...rest
|
|
17
|
-
}
|
|
18
|
-
);
|
|
7
|
+
const { ownProps, restProps } = useDefinition(FullPageDefinition, props);
|
|
8
|
+
const { classes } = ownProps;
|
|
9
|
+
return /* @__PURE__ */ jsx("main", { ref, className: classes.root, ...restProps });
|
|
19
10
|
});
|
|
20
11
|
|
|
21
12
|
export { FullPage };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FullPage.esm.js","sources":["../../../src/components/FullPage/FullPage.tsx"],"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\nimport { forwardRef } from 'react';\nimport type { FullPageProps } from './types';\nimport {
|
|
1
|
+
{"version":3,"file":"FullPage.esm.js","sources":["../../../src/components/FullPage/FullPage.tsx"],"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\nimport { forwardRef } from 'react';\nimport type { FullPageProps } from './types';\nimport { useDefinition } from '../../hooks/useDefinition';\nimport { FullPageDefinition } from './definition';\n\n/**\n * A component that fills the remaining viewport height below the Header.\n *\n * The FullPage component consumes the `--bui-header-height` CSS custom property\n * set by the Header component to calculate its height as\n * `calc(100dvh - var(--bui-header-height, 0px))`. Content inside the FullPage\n * scrolls independently while the Header stays visible.\n *\n * @public\n */\nexport const FullPage = forwardRef<HTMLElement, FullPageProps>((props, ref) => {\n const { ownProps, restProps } = useDefinition(FullPageDefinition, props);\n const { classes } = ownProps;\n\n return <main ref={ref} className={classes.root} {...restProps} />;\n});\n"],"names":[],"mappings":";;;;;AA+BO,MAAM,QAAA,GAAW,UAAA,CAAuC,CAAC,KAAA,EAAO,GAAA,KAAQ;AAC7E,EAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAU,GAAI,aAAA,CAAc,oBAAoB,KAAK,CAAA;AACvE,EAAA,MAAM,EAAE,SAAQ,GAAI,QAAA;AAEpB,EAAA,2BAAQ,MAAA,EAAA,EAAK,GAAA,EAAU,WAAW,OAAA,CAAQ,IAAA,EAAO,GAAG,SAAA,EAAW,CAAA;AACjE,CAAC;;;;"}
|
|
@@ -1,8 +1,20 @@
|
|
|
1
|
-
|
|
1
|
+
import 'react/jsx-runtime';
|
|
2
|
+
import 'clsx';
|
|
3
|
+
import '../../hooks/useBreakpoint.esm.js';
|
|
4
|
+
import '../../hooks/useBg.esm.js';
|
|
5
|
+
import '../../hooks/useDefinition/helpers.esm.js';
|
|
6
|
+
import { defineComponent } from '../../hooks/useDefinition/defineComponent.esm.js';
|
|
7
|
+
import styles from './FullPage.module.css.esm.js';
|
|
8
|
+
|
|
9
|
+
const FullPageDefinition = defineComponent()({
|
|
10
|
+
styles,
|
|
2
11
|
classNames: {
|
|
3
12
|
root: "bui-FullPage"
|
|
13
|
+
},
|
|
14
|
+
propDefs: {
|
|
15
|
+
className: {}
|
|
4
16
|
}
|
|
5
|
-
};
|
|
17
|
+
});
|
|
6
18
|
|
|
7
19
|
export { FullPageDefinition };
|
|
8
20
|
//# sourceMappingURL=definition.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definition.esm.js","sources":["../../../src/components/FullPage/definition.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\nimport type {
|
|
1
|
+
{"version":3,"file":"definition.esm.js","sources":["../../../src/components/FullPage/definition.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\nimport { defineComponent } from '../../hooks/useDefinition';\nimport type { FullPageOwnProps } from './types';\nimport styles from './FullPage.module.css';\n\n/**\n * Component definition for FullPage\n * @public\n */\nexport const FullPageDefinition = defineComponent<FullPageOwnProps>()({\n styles,\n classNames: {\n root: 'bui-FullPage',\n },\n propDefs: {\n className: {},\n },\n});\n"],"names":[],"mappings":";;;;;;;;AAwBO,MAAM,kBAAA,GAAqB,iBAAkC,CAAE;AAAA,EACpE,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM;AAAA,GACR;AAAA,EACA,QAAA,EAAU;AAAA,IACR,WAAW;AAAC;AAEhB,CAAC;;;;"}
|
|
@@ -1,62 +1,41 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { forwardRef } from 'react';
|
|
3
|
-
import
|
|
4
|
-
import { useStyles } from '../../hooks/useStyles.esm.js';
|
|
3
|
+
import { useDefinition } from '../../hooks/useDefinition/useDefinition.esm.js';
|
|
5
4
|
import { GridDefinition, GridItemDefinition } from './definition.esm.js';
|
|
6
|
-
import styles from './Grid.module.css.esm.js';
|
|
7
|
-
import { useBgProvider, BgProvider } from '../../hooks/useBg.esm.js';
|
|
8
5
|
|
|
9
6
|
const GridRoot = forwardRef((props, ref) => {
|
|
10
|
-
const {
|
|
11
|
-
|
|
12
|
-
columns: "auto",
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
// Use resolved bg for data attribute
|
|
17
|
-
});
|
|
18
|
-
const { className, bg, ...rest } = cleanedProps;
|
|
19
|
-
const content = /* @__PURE__ */ jsx(
|
|
7
|
+
const { ownProps, dataAttributes, utilityStyle } = useDefinition(
|
|
8
|
+
GridDefinition,
|
|
9
|
+
{ columns: "auto", gap: "4", ...props }
|
|
10
|
+
);
|
|
11
|
+
const { classes, childrenWithBgProvider } = ownProps;
|
|
12
|
+
return /* @__PURE__ */ jsx(
|
|
20
13
|
"div",
|
|
21
14
|
{
|
|
22
15
|
ref,
|
|
23
|
-
className:
|
|
24
|
-
|
|
25
|
-
utilityClasses,
|
|
26
|
-
styles[classNames.root],
|
|
27
|
-
className
|
|
28
|
-
),
|
|
29
|
-
style,
|
|
16
|
+
className: classes.root,
|
|
17
|
+
style: { ...utilityStyle, ...ownProps.style },
|
|
30
18
|
...dataAttributes,
|
|
31
|
-
|
|
19
|
+
children: childrenWithBgProvider
|
|
32
20
|
}
|
|
33
21
|
);
|
|
34
|
-
return resolvedBg ? /* @__PURE__ */ jsx(BgProvider, { bg: resolvedBg, children: content }) : content;
|
|
35
22
|
});
|
|
36
23
|
const GridItem = forwardRef((props, ref) => {
|
|
37
|
-
const {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
const { className, bg, ...rest } = cleanedProps;
|
|
44
|
-
const content = /* @__PURE__ */ jsx(
|
|
24
|
+
const { ownProps, dataAttributes, utilityStyle } = useDefinition(
|
|
25
|
+
GridItemDefinition,
|
|
26
|
+
props
|
|
27
|
+
);
|
|
28
|
+
const { classes, childrenWithBgProvider } = ownProps;
|
|
29
|
+
return /* @__PURE__ */ jsx(
|
|
45
30
|
"div",
|
|
46
31
|
{
|
|
47
32
|
ref,
|
|
48
|
-
className:
|
|
49
|
-
|
|
50
|
-
utilityClasses,
|
|
51
|
-
styles[classNames.root],
|
|
52
|
-
className
|
|
53
|
-
),
|
|
54
|
-
style,
|
|
33
|
+
className: classes.root,
|
|
34
|
+
style: { ...utilityStyle, ...ownProps.style },
|
|
55
35
|
...dataAttributes,
|
|
56
|
-
|
|
36
|
+
children: childrenWithBgProvider
|
|
57
37
|
}
|
|
58
38
|
);
|
|
59
|
-
return resolvedBg ? /* @__PURE__ */ jsx(BgProvider, { bg: resolvedBg, children: content }) : content;
|
|
60
39
|
});
|
|
61
40
|
const Grid = {
|
|
62
41
|
Root: GridRoot,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Grid.esm.js","sources":["../../../src/components/Grid/Grid.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
|
|
1
|
+
{"version":3,"file":"Grid.esm.js","sources":["../../../src/components/Grid/Grid.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 type { GridItemProps, GridProps } from './types';\nimport { useDefinition } from '../../hooks/useDefinition';\nimport { GridDefinition, GridItemDefinition } from './definition';\n\nconst GridRoot = forwardRef<HTMLDivElement, GridProps>((props, ref) => {\n const { ownProps, dataAttributes, utilityStyle } = useDefinition(\n GridDefinition,\n { columns: 'auto', gap: '4', ...props },\n );\n const { classes, childrenWithBgProvider } = ownProps;\n\n return (\n <div\n ref={ref}\n className={classes.root}\n style={{ ...utilityStyle, ...ownProps.style }}\n {...dataAttributes}\n >\n {childrenWithBgProvider}\n </div>\n );\n});\n\nconst GridItem = forwardRef<HTMLDivElement, GridItemProps>((props, ref) => {\n const { ownProps, dataAttributes, utilityStyle } = useDefinition(\n GridItemDefinition,\n props,\n );\n const { classes, childrenWithBgProvider } = ownProps;\n\n return (\n <div\n ref={ref}\n className={classes.root}\n style={{ ...utilityStyle, ...ownProps.style }}\n {...dataAttributes}\n >\n {childrenWithBgProvider}\n </div>\n );\n});\n\n/** @public */\nexport const Grid = {\n Root: GridRoot,\n Item: GridItem,\n};\n"],"names":[],"mappings":";;;;;AAqBA,MAAM,QAAA,GAAW,UAAA,CAAsC,CAAC,KAAA,EAAO,GAAA,KAAQ;AACrE,EAAA,MAAM,EAAE,QAAA,EAAU,cAAA,EAAgB,YAAA,EAAa,GAAI,aAAA;AAAA,IACjD,cAAA;AAAA,IACA,EAAE,OAAA,EAAS,MAAA,EAAQ,GAAA,EAAK,GAAA,EAAK,GAAG,KAAA;AAAM,GACxC;AACA,EAAA,MAAM,EAAE,OAAA,EAAS,sBAAA,EAAuB,GAAI,QAAA;AAE5C,EAAA,uBACE,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,GAAA;AAAA,MACA,WAAW,OAAA,CAAQ,IAAA;AAAA,MACnB,OAAO,EAAE,GAAG,YAAA,EAAc,GAAG,SAAS,KAAA,EAAM;AAAA,MAC3C,GAAG,cAAA;AAAA,MAEH,QAAA,EAAA;AAAA;AAAA,GACH;AAEJ,CAAC,CAAA;AAED,MAAM,QAAA,GAAW,UAAA,CAA0C,CAAC,KAAA,EAAO,GAAA,KAAQ;AACzE,EAAA,MAAM,EAAE,QAAA,EAAU,cAAA,EAAgB,YAAA,EAAa,GAAI,aAAA;AAAA,IACjD,kBAAA;AAAA,IACA;AAAA,GACF;AACA,EAAA,MAAM,EAAE,OAAA,EAAS,sBAAA,EAAuB,GAAI,QAAA;AAE5C,EAAA,uBACE,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,GAAA;AAAA,MACA,WAAW,OAAA,CAAQ,IAAA;AAAA,MACnB,OAAO,EAAE,GAAG,YAAA,EAAc,GAAG,SAAS,KAAA,EAAM;AAAA,MAC3C,GAAG,cAAA;AAAA,MAEH,QAAA,EAAA;AAAA;AAAA,GACH;AAEJ,CAAC,CAAA;AAGM,MAAM,IAAA,GAAO;AAAA,EAClB,IAAA,EAAM,QAAA;AAAA,EACN,IAAA,EAAM;AACR;;;;"}
|
|
@@ -1,7 +1,23 @@
|
|
|
1
|
-
|
|
1
|
+
import 'react/jsx-runtime';
|
|
2
|
+
import 'clsx';
|
|
3
|
+
import '../../hooks/useBreakpoint.esm.js';
|
|
4
|
+
import '../../hooks/useBg.esm.js';
|
|
5
|
+
import '../../hooks/useDefinition/helpers.esm.js';
|
|
6
|
+
import { defineComponent } from '../../hooks/useDefinition/defineComponent.esm.js';
|
|
7
|
+
import styles from './Grid.module.css.esm.js';
|
|
8
|
+
|
|
9
|
+
const GridDefinition = defineComponent()({
|
|
10
|
+
styles,
|
|
2
11
|
classNames: {
|
|
3
12
|
root: "bui-Grid"
|
|
4
13
|
},
|
|
14
|
+
bg: "provider",
|
|
15
|
+
propDefs: {
|
|
16
|
+
bg: { dataAttribute: true },
|
|
17
|
+
children: {},
|
|
18
|
+
className: {},
|
|
19
|
+
style: {}
|
|
20
|
+
},
|
|
5
21
|
utilityProps: [
|
|
6
22
|
"columns",
|
|
7
23
|
"gap",
|
|
@@ -19,34 +35,22 @@ const GridDefinition = {
|
|
|
19
35
|
"pt",
|
|
20
36
|
"px",
|
|
21
37
|
"py"
|
|
22
|
-
]
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
"neutral-2",
|
|
27
|
-
"neutral-3",
|
|
28
|
-
"danger",
|
|
29
|
-
"warning",
|
|
30
|
-
"success"
|
|
31
|
-
]
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
const GridItemDefinition = {
|
|
38
|
+
]
|
|
39
|
+
});
|
|
40
|
+
const GridItemDefinition = defineComponent()({
|
|
41
|
+
styles,
|
|
35
42
|
classNames: {
|
|
36
43
|
root: "bui-GridItem"
|
|
37
44
|
},
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
bg:
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
]
|
|
48
|
-
}
|
|
49
|
-
};
|
|
45
|
+
bg: "provider",
|
|
46
|
+
propDefs: {
|
|
47
|
+
bg: { dataAttribute: true },
|
|
48
|
+
children: {},
|
|
49
|
+
className: {},
|
|
50
|
+
style: {}
|
|
51
|
+
},
|
|
52
|
+
utilityProps: ["colSpan", "colEnd", "colStart", "rowSpan"]
|
|
53
|
+
});
|
|
50
54
|
|
|
51
55
|
export { GridDefinition, GridItemDefinition };
|
|
52
56
|
//# sourceMappingURL=definition.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definition.esm.js","sources":["../../../src/components/Grid/definition.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 {
|
|
1
|
+
{"version":3,"file":"definition.esm.js","sources":["../../../src/components/Grid/definition.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 { defineComponent } from '../../hooks/useDefinition';\nimport type { GridOwnProps, GridItemOwnProps } from './types';\nimport styles from './Grid.module.css';\n\n/**\n * Component definition for Grid\n * @public\n */\nexport const GridDefinition = defineComponent<GridOwnProps>()({\n styles,\n classNames: {\n root: 'bui-Grid',\n },\n bg: 'provider',\n propDefs: {\n bg: { dataAttribute: true },\n children: {},\n className: {},\n style: {},\n },\n utilityProps: [\n 'columns',\n 'gap',\n 'm',\n 'mb',\n 'ml',\n 'mr',\n 'mt',\n 'mx',\n 'my',\n 'p',\n 'pb',\n 'pl',\n 'pr',\n 'pt',\n 'px',\n 'py',\n ],\n});\n\n/**\n * Component definition for GridItem\n * @public\n */\nexport const GridItemDefinition = defineComponent<GridItemOwnProps>()({\n styles,\n classNames: {\n root: 'bui-GridItem',\n },\n bg: 'provider',\n propDefs: {\n bg: { dataAttribute: true },\n children: {},\n className: {},\n style: {},\n },\n utilityProps: ['colSpan', 'colEnd', 'colStart', 'rowSpan'],\n});\n"],"names":[],"mappings":";;;;;;;;AAwBO,MAAM,cAAA,GAAiB,iBAA8B,CAAE;AAAA,EAC5D,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM;AAAA,GACR;AAAA,EACA,EAAA,EAAI,UAAA;AAAA,EACJ,QAAA,EAAU;AAAA,IACR,EAAA,EAAI,EAAE,aAAA,EAAe,IAAA,EAAK;AAAA,IAC1B,UAAU,EAAC;AAAA,IACX,WAAW,EAAC;AAAA,IACZ,OAAO;AAAC,GACV;AAAA,EACA,YAAA,EAAc;AAAA,IACZ,SAAA;AAAA,IACA,KAAA;AAAA,IACA,GAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,GAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA;AAAA;AAEJ,CAAC;AAMM,MAAM,kBAAA,GAAqB,iBAAkC,CAAE;AAAA,EACpE,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM;AAAA,GACR;AAAA,EACA,EAAA,EAAI,UAAA;AAAA,EACJ,QAAA,EAAU;AAAA,IACR,EAAA,EAAI,EAAE,aAAA,EAAe,IAAA,EAAK;AAAA,IAC1B,UAAU,EAAC;AAAA,IACX,WAAW,EAAC;AAAA,IACZ,OAAO;AAAC,GACV;AAAA,EACA,YAAA,EAAc,CAAC,SAAA,EAAW,QAAA,EAAU,YAAY,SAAS;AAC3D,CAAC;;;;"}
|
|
@@ -1,75 +1,53 @@
|
|
|
1
1
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
2
2
|
import { Text } from '../Text/Text.esm.js';
|
|
3
|
+
import { useDefinition } from '../../hooks/useDefinition/useDefinition.esm.js';
|
|
4
|
+
import '../Text/Text.module.css.esm.js';
|
|
3
5
|
import { RiArrowRightSLine } from '@remixicon/react';
|
|
4
6
|
import { Tabs, TabList, Tab } from '../Tabs/Tabs.esm.js';
|
|
5
|
-
import
|
|
7
|
+
import '../Tabs/Tabs.module.css.esm.js';
|
|
6
8
|
import { HeaderPageDefinition } from './definition.esm.js';
|
|
7
9
|
import { Container } from '../Container/Container.esm.js';
|
|
10
|
+
import '../Container/Container.module.css.esm.js';
|
|
8
11
|
import { Link } from '../Link/Link.esm.js';
|
|
9
|
-
import
|
|
10
|
-
import clsx from 'clsx';
|
|
12
|
+
import '../Link/Link.module.css.esm.js';
|
|
11
13
|
|
|
12
14
|
const HeaderPage = (props) => {
|
|
13
|
-
const {
|
|
14
|
-
const {
|
|
15
|
-
return /* @__PURE__ */ jsxs(
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
/* @__PURE__ */ jsxs(
|
|
22
|
-
"div",
|
|
15
|
+
const { ownProps } = useDefinition(HeaderPageDefinition, props);
|
|
16
|
+
const { classes, title, tabs, customActions, breadcrumbs } = ownProps;
|
|
17
|
+
return /* @__PURE__ */ jsxs(Container, { className: classes.root, children: [
|
|
18
|
+
/* @__PURE__ */ jsxs("div", { className: classes.content, children: [
|
|
19
|
+
/* @__PURE__ */ jsxs("div", { className: classes.breadcrumbs, children: [
|
|
20
|
+
breadcrumbs && breadcrumbs.map((breadcrumb) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
21
|
+
/* @__PURE__ */ jsx(
|
|
22
|
+
Link,
|
|
23
23
|
{
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
{
|
|
33
|
-
href: breadcrumb.href,
|
|
34
|
-
variant: "title-small",
|
|
35
|
-
weight: "bold",
|
|
36
|
-
color: "secondary",
|
|
37
|
-
truncate: true,
|
|
38
|
-
style: { maxWidth: "240px" },
|
|
39
|
-
standalone: true,
|
|
40
|
-
children: breadcrumb.label
|
|
41
|
-
}
|
|
42
|
-
),
|
|
43
|
-
/* @__PURE__ */ jsx(RiArrowRightSLine, { size: 16, color: "var(--bui-fg-secondary)" })
|
|
44
|
-
] }, breadcrumb.label)),
|
|
45
|
-
/* @__PURE__ */ jsx(Text, { variant: "title-small", weight: "bold", as: "h2", children: title })
|
|
46
|
-
]
|
|
24
|
+
href: breadcrumb.href,
|
|
25
|
+
variant: "title-small",
|
|
26
|
+
weight: "bold",
|
|
27
|
+
color: "secondary",
|
|
28
|
+
truncate: true,
|
|
29
|
+
style: { maxWidth: "240px" },
|
|
30
|
+
standalone: true,
|
|
31
|
+
children: breadcrumb.label
|
|
47
32
|
}
|
|
48
33
|
),
|
|
49
|
-
/* @__PURE__ */ jsx(
|
|
50
|
-
] }),
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
tab.id
|
|
67
|
-
)) }) })
|
|
68
|
-
}
|
|
69
|
-
)
|
|
70
|
-
]
|
|
71
|
-
}
|
|
72
|
-
);
|
|
34
|
+
/* @__PURE__ */ jsx(RiArrowRightSLine, { size: 16, color: "var(--bui-fg-secondary)" })
|
|
35
|
+
] }, breadcrumb.label)),
|
|
36
|
+
/* @__PURE__ */ jsx(Text, { variant: "title-small", weight: "bold", as: "h2", children: title })
|
|
37
|
+
] }),
|
|
38
|
+
/* @__PURE__ */ jsx("div", { className: classes.controls, children: customActions })
|
|
39
|
+
] }),
|
|
40
|
+
tabs && /* @__PURE__ */ jsx("div", { className: classes.tabsWrapper, children: /* @__PURE__ */ jsx(Tabs, { children: /* @__PURE__ */ jsx(TabList, { children: tabs.map((tab) => /* @__PURE__ */ jsx(
|
|
41
|
+
Tab,
|
|
42
|
+
{
|
|
43
|
+
id: tab.id,
|
|
44
|
+
href: tab.href,
|
|
45
|
+
matchStrategy: tab.matchStrategy,
|
|
46
|
+
children: tab.label
|
|
47
|
+
},
|
|
48
|
+
tab.id
|
|
49
|
+
)) }) }) })
|
|
50
|
+
] });
|
|
73
51
|
};
|
|
74
52
|
|
|
75
53
|
export { HeaderPage };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HeaderPage.esm.js","sources":["../../../src/components/HeaderPage/HeaderPage.tsx"],"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\nimport type { HeaderPageProps } from './types';\nimport { Text } from '../Text';\nimport { RiArrowRightSLine } from '@remixicon/react';\nimport { Tabs, TabList, Tab } from '../Tabs';\nimport {
|
|
1
|
+
{"version":3,"file":"HeaderPage.esm.js","sources":["../../../src/components/HeaderPage/HeaderPage.tsx"],"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\nimport type { HeaderPageProps } from './types';\nimport { Text } from '../Text';\nimport { RiArrowRightSLine } from '@remixicon/react';\nimport { Tabs, TabList, Tab } from '../Tabs';\nimport { useDefinition } from '../../hooks/useDefinition';\nimport { HeaderPageDefinition } from './definition';\nimport { Container } from '../Container';\nimport { Link } from '../Link';\nimport { Fragment } from 'react/jsx-runtime';\n\n/**\n * A component that renders a header page.\n *\n * @public\n */\nexport const HeaderPage = (props: HeaderPageProps) => {\n const { ownProps } = useDefinition(HeaderPageDefinition, props);\n const { classes, title, tabs, customActions, breadcrumbs } = ownProps;\n\n return (\n <Container className={classes.root}>\n <div className={classes.content}>\n <div className={classes.breadcrumbs}>\n {breadcrumbs &&\n breadcrumbs.map(breadcrumb => (\n <Fragment key={breadcrumb.label}>\n <Link\n href={breadcrumb.href}\n variant=\"title-small\"\n weight=\"bold\"\n color=\"secondary\"\n truncate\n style={{ maxWidth: '240px' }}\n standalone\n >\n {breadcrumb.label}\n </Link>\n <RiArrowRightSLine size={16} color=\"var(--bui-fg-secondary)\" />\n </Fragment>\n ))}\n <Text variant=\"title-small\" weight=\"bold\" as=\"h2\">\n {title}\n </Text>\n </div>\n <div className={classes.controls}>{customActions}</div>\n </div>\n {tabs && (\n <div className={classes.tabsWrapper}>\n <Tabs>\n <TabList>\n {tabs.map(tab => (\n <Tab\n key={tab.id}\n id={tab.id}\n href={tab.href}\n matchStrategy={tab.matchStrategy}\n >\n {tab.label}\n </Tab>\n ))}\n </TabList>\n </Tabs>\n </div>\n )}\n </Container>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;AA+BO,MAAM,UAAA,GAAa,CAAC,KAAA,KAA2B;AACpD,EAAA,MAAM,EAAE,QAAA,EAAS,GAAI,aAAA,CAAc,sBAAsB,KAAK,CAAA;AAC9D,EAAA,MAAM,EAAE,OAAA,EAAS,KAAA,EAAO,IAAA,EAAM,aAAA,EAAe,aAAY,GAAI,QAAA;AAE7D,EAAA,uBACE,IAAA,CAAC,SAAA,EAAA,EAAU,SAAA,EAAW,OAAA,CAAQ,IAAA,EAC5B,QAAA,EAAA;AAAA,oBAAA,IAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,OAAA,CAAQ,OAAA,EACtB,QAAA,EAAA;AAAA,sBAAA,IAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,OAAA,CAAQ,WAAA,EACrB,QAAA,EAAA;AAAA,QAAA,WAAA,IACC,WAAA,CAAY,GAAA,CAAI,CAAA,UAAA,qBACd,IAAA,CAAC,QAAA,EAAA,EACC,QAAA,EAAA;AAAA,0BAAA,GAAA;AAAA,YAAC,IAAA;AAAA,YAAA;AAAA,cACC,MAAM,UAAA,CAAW,IAAA;AAAA,cACjB,OAAA,EAAQ,aAAA;AAAA,cACR,MAAA,EAAO,MAAA;AAAA,cACP,KAAA,EAAM,WAAA;AAAA,cACN,QAAA,EAAQ,IAAA;AAAA,cACR,KAAA,EAAO,EAAE,QAAA,EAAU,OAAA,EAAQ;AAAA,cAC3B,UAAA,EAAU,IAAA;AAAA,cAET,QAAA,EAAA,UAAA,CAAW;AAAA;AAAA,WACd;AAAA,0BACA,GAAA,CAAC,iBAAA,EAAA,EAAkB,IAAA,EAAM,EAAA,EAAI,OAAM,yBAAA,EAA0B;AAAA,SAAA,EAAA,EAZhD,UAAA,CAAW,KAa1B,CACD,CAAA;AAAA,wBACH,GAAA,CAAC,QAAK,OAAA,EAAQ,aAAA,EAAc,QAAO,MAAA,EAAO,EAAA,EAAG,MAC1C,QAAA,EAAA,KAAA,EACH;AAAA,OAAA,EACF,CAAA;AAAA,sBACA,GAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,OAAA,CAAQ,UAAW,QAAA,EAAA,aAAA,EAAc;AAAA,KAAA,EACnD,CAAA;AAAA,IACC,IAAA,oBACC,GAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,OAAA,CAAQ,WAAA,EACtB,QAAA,kBAAA,GAAA,CAAC,IAAA,EAAA,EACC,QAAA,kBAAA,GAAA,CAAC,OAAA,EAAA,EACE,QAAA,EAAA,IAAA,CAAK,GAAA,CAAI,CAAA,GAAA,qBACR,GAAA;AAAA,MAAC,GAAA;AAAA,MAAA;AAAA,QAEC,IAAI,GAAA,CAAI,EAAA;AAAA,QACR,MAAM,GAAA,CAAI,IAAA;AAAA,QACV,eAAe,GAAA,CAAI,aAAA;AAAA,QAElB,QAAA,EAAA,GAAA,CAAI;AAAA,OAAA;AAAA,MALA,GAAA,CAAI;AAAA,KAOZ,CAAA,EACH,CAAA,EACF,CAAA,EACF;AAAA,GAAA,EAEJ,CAAA;AAEJ;;;;"}
|