@backstage/ui 0.7.2-next.2 → 0.8.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 +37 -0
- package/css/styles.css +6398 -8163
- package/dist/components/Avatar/Avatar.esm.js +21 -7
- package/dist/components/Avatar/Avatar.esm.js.map +1 -1
- package/dist/components/Avatar/Avatar.module.css.esm.js +8 -0
- package/dist/components/Avatar/Avatar.module.css.esm.js.map +1 -0
- package/dist/components/Box/Box.esm.js +20 -23
- package/dist/components/Box/Box.esm.js.map +1 -1
- package/dist/components/Box/Box.module.css.esm.js +8 -0
- package/dist/components/Box/Box.module.css.esm.js.map +1 -0
- package/dist/components/Button/Button.esm.js +10 -19
- package/dist/components/Button/Button.esm.js.map +1 -1
- package/dist/components/Button/Button.module.css.esm.js +8 -0
- package/dist/components/Button/Button.module.css.esm.js.map +1 -0
- package/dist/components/ButtonIcon/ButtonIcon.esm.js +14 -12
- package/dist/components/ButtonIcon/ButtonIcon.esm.js.map +1 -1
- package/dist/components/ButtonIcon/ButtonIcon.module.css.esm.js +8 -0
- package/dist/components/ButtonIcon/ButtonIcon.module.css.esm.js.map +1 -0
- package/dist/components/ButtonLink/ButtonLink.esm.js +8 -13
- package/dist/components/ButtonLink/ButtonLink.esm.js.map +1 -1
- package/dist/components/Card/Card.esm.js +46 -28
- package/dist/components/Card/Card.esm.js.map +1 -1
- package/dist/components/Card/Card.module.css.esm.js +8 -0
- package/dist/components/Card/Card.module.css.esm.js.map +1 -0
- package/dist/components/Checkbox/Checkbox.esm.js +14 -49
- package/dist/components/Checkbox/Checkbox.esm.js.map +1 -1
- package/dist/components/Checkbox/Checkbox.module.css.esm.js +8 -0
- package/dist/components/Checkbox/Checkbox.module.css.esm.js.map +1 -0
- package/dist/components/Collapsible/Collapsible.esm.js +14 -9
- package/dist/components/Collapsible/Collapsible.esm.js.map +1 -1
- package/dist/components/Collapsible/Collapsible.module.css.esm.js +8 -0
- package/dist/components/Collapsible/Collapsible.module.css.esm.js.map +1 -0
- package/dist/components/Container/Container.esm.js +22 -25
- package/dist/components/Container/Container.esm.js.map +1 -1
- package/dist/components/Container/Container.module.css.esm.js +8 -0
- package/dist/components/Container/Container.module.css.esm.js.map +1 -0
- package/dist/components/Dialog/Dialog.esm.js +103 -0
- package/dist/components/Dialog/Dialog.esm.js.map +1 -0
- package/dist/components/Dialog/Dialog.module.css.esm.js +8 -0
- package/dist/components/Dialog/Dialog.module.css.esm.js.map +1 -0
- package/dist/components/FieldError/FieldError.esm.js +5 -2
- package/dist/components/FieldError/FieldError.esm.js.map +1 -1
- package/dist/components/FieldError/FieldError.module.css.esm.js +8 -0
- package/dist/components/FieldError/FieldError.module.css.esm.js.map +1 -0
- package/dist/components/FieldLabel/FieldLabel.esm.js +50 -13
- package/dist/components/FieldLabel/FieldLabel.esm.js.map +1 -1
- package/dist/components/FieldLabel/FieldLabel.module.css.esm.js +8 -0
- package/dist/components/FieldLabel/FieldLabel.module.css.esm.js.map +1 -0
- package/dist/components/Flex/Flex.esm.js +22 -18
- package/dist/components/Flex/Flex.esm.js.map +1 -1
- package/dist/components/Flex/Flex.module.css.esm.js +8 -0
- package/dist/components/Flex/Flex.module.css.esm.js.map +1 -0
- package/dist/components/Grid/Grid.esm.js +41 -29
- package/dist/components/Grid/Grid.esm.js.map +1 -1
- package/dist/components/Grid/Grid.module.css.esm.js +8 -0
- package/dist/components/Grid/Grid.module.css.esm.js.map +1 -0
- package/dist/components/Header/Header.esm.js +22 -11
- package/dist/components/Header/Header.esm.js.map +1 -1
- package/dist/components/Header/Header.module.css.esm.js +8 -0
- package/dist/components/Header/Header.module.css.esm.js.map +1 -0
- package/dist/components/Header/HeaderToolbar.esm.js +71 -7
- package/dist/components/Header/HeaderToolbar.esm.js.map +1 -1
- package/dist/components/HeaderPage/HeaderPage.esm.js +51 -31
- package/dist/components/HeaderPage/HeaderPage.esm.js.map +1 -1
- package/dist/components/HeaderPage/HeaderPage.module.css.esm.js +8 -0
- package/dist/components/HeaderPage/HeaderPage.module.css.esm.js.map +1 -0
- package/dist/components/Link/Link.esm.js +26 -15
- package/dist/components/Link/Link.esm.js.map +1 -1
- package/dist/components/Link/Link.module.css.esm.js +8 -0
- package/dist/components/Link/Link.module.css.esm.js.map +1 -0
- package/dist/components/Menu/Menu.esm.js +376 -118
- package/dist/components/Menu/Menu.esm.js.map +1 -1
- package/dist/components/Menu/Menu.module.css.esm.js +8 -0
- package/dist/components/Menu/Menu.module.css.esm.js.map +1 -0
- package/dist/components/Popover/Popover.module.css.esm.js +8 -0
- package/dist/components/Popover/Popover.module.css.esm.js.map +1 -0
- package/dist/components/RadioGroup/RadioGroup.esm.js +6 -5
- package/dist/components/RadioGroup/RadioGroup.esm.js.map +1 -1
- package/dist/components/RadioGroup/RadioGroup.module.css.esm.js +8 -0
- package/dist/components/RadioGroup/RadioGroup.module.css.esm.js.map +1 -0
- package/dist/components/SearchField/SearchField.esm.js +44 -23
- package/dist/components/SearchField/SearchField.esm.js.map +1 -1
- package/dist/components/SearchField/SearchField.module.css.esm.js +8 -0
- package/dist/components/SearchField/SearchField.module.css.esm.js.map +1 -0
- package/dist/components/Select/Select.esm.js +60 -25
- package/dist/components/Select/Select.esm.js.map +1 -1
- package/dist/components/Select/Select.module.css.esm.js +8 -0
- package/dist/components/Select/Select.module.css.esm.js.map +1 -0
- package/dist/components/Skeleton/Skeleton.esm.js +12 -4
- package/dist/components/Skeleton/Skeleton.esm.js.map +1 -1
- package/dist/components/Skeleton/Skeleton.module.css.esm.js +8 -0
- package/dist/components/Skeleton/Skeleton.module.css.esm.js.map +1 -0
- package/dist/components/Switch/Switch.esm.js +22 -6
- package/dist/components/Switch/Switch.esm.js.map +1 -1
- package/dist/components/Switch/Switch.module.css.esm.js +8 -0
- package/dist/components/Switch/Switch.module.css.esm.js.map +1 -0
- package/dist/components/Table/Table.module.css.esm.js +8 -0
- package/dist/components/Table/Table.module.css.esm.js.map +1 -0
- package/dist/components/Table/components/Cell.esm.js +44 -17
- package/dist/components/Table/components/Cell.esm.js.map +1 -1
- package/dist/components/Table/components/CellProfile.esm.js +71 -26
- package/dist/components/Table/components/CellProfile.esm.js.map +1 -1
- package/dist/components/Table/components/Column.esm.js +39 -9
- package/dist/components/Table/components/Column.esm.js.map +1 -1
- package/dist/components/Table/components/Row.esm.js +19 -11
- package/dist/components/Table/components/Row.esm.js.map +1 -1
- package/dist/components/Table/components/Table.esm.js +8 -3
- package/dist/components/Table/components/Table.esm.js.map +1 -1
- package/dist/components/Table/components/TableBody.esm.js +13 -2
- package/dist/components/Table/components/TableBody.esm.js.map +1 -1
- package/dist/components/Table/components/TableHeader.esm.js +20 -10
- package/dist/components/Table/components/TableHeader.esm.js.map +1 -1
- package/dist/components/TablePagination/TablePagination.esm.js +80 -63
- package/dist/components/TablePagination/TablePagination.esm.js.map +1 -1
- package/dist/components/TablePagination/TablePagination.module.css.esm.js +8 -0
- package/dist/components/TablePagination/TablePagination.module.css.esm.js.map +1 -0
- package/dist/components/Tabs/Tabs.esm.js +55 -31
- package/dist/components/Tabs/Tabs.esm.js.map +1 -1
- package/dist/components/Tabs/Tabs.module.css.esm.js +8 -0
- package/dist/components/Tabs/Tabs.module.css.esm.js.map +1 -0
- package/dist/components/Tabs/TabsIndicators.esm.js +14 -2
- package/dist/components/Tabs/TabsIndicators.esm.js.map +1 -1
- package/dist/components/TagGroup/TagGroup.esm.js +35 -19
- package/dist/components/TagGroup/TagGroup.esm.js.map +1 -1
- package/dist/components/TagGroup/TagGroup.module.css.esm.js +8 -0
- package/dist/components/TagGroup/TagGroup.module.css.esm.js.map +1 -0
- package/dist/components/Text/Text.esm.js +10 -19
- package/dist/components/Text/Text.esm.js.map +1 -1
- package/dist/components/Text/Text.module.css.esm.js +8 -0
- package/dist/components/Text/Text.module.css.esm.js.map +1 -0
- package/dist/components/TextField/TextField.esm.js +29 -16
- package/dist/components/TextField/TextField.esm.js.map +1 -1
- package/dist/components/TextField/TextField.module.css.esm.js +8 -0
- package/dist/components/TextField/TextField.module.css.esm.js.map +1 -0
- package/dist/components/Tooltip/Tooltip.esm.js +19 -7
- package/dist/components/Tooltip/Tooltip.esm.js.map +1 -1
- package/dist/components/Tooltip/Tooltip.module.css.esm.js +8 -0
- package/dist/components/Tooltip/Tooltip.module.css.esm.js.map +1 -0
- package/dist/hooks/useStyles.esm.js +65 -9
- package/dist/hooks/useStyles.esm.js.map +1 -1
- package/dist/index.d.ts +148 -433
- package/dist/index.esm.js +1 -9
- package/dist/index.esm.js.map +1 -1
- package/dist/node_modules_dist/style-inject/dist/style-inject.es.esm.js +29 -0
- package/dist/node_modules_dist/style-inject/dist/style-inject.es.esm.js.map +1 -0
- package/dist/utils/componentDefinitions.esm.js +113 -16
- package/dist/utils/componentDefinitions.esm.js.map +1 -1
- package/dist/utils/utilityClassMap.esm.js +189 -0
- package/dist/utils/utilityClassMap.esm.js.map +1 -0
- package/package.json +3 -3
- package/dist/components/Box/Box.props.esm.js +0 -7
- package/dist/components/Box/Box.props.esm.js.map +0 -1
- package/dist/components/Flex/Flex.props.esm.js +0 -31
- package/dist/components/Flex/Flex.props.esm.js.map +0 -1
- package/dist/components/Grid/Grid.props.esm.js +0 -58
- package/dist/components/Grid/Grid.props.esm.js.map +0 -1
- package/dist/components/Icon/Icon.esm.js +0 -29
- package/dist/components/Icon/Icon.esm.js.map +0 -1
- package/dist/components/Icon/context.esm.js +0 -10
- package/dist/components/Icon/context.esm.js.map +0 -1
- package/dist/components/Icon/icons.esm.js +0 -63
- package/dist/components/Icon/icons.esm.js.map +0 -1
- package/dist/components/Icon/provider.esm.js +0 -12
- package/dist/components/Icon/provider.esm.js.map +0 -1
- package/dist/components/ScrollArea/ScrollArea.esm.js +0 -63
- package/dist/components/ScrollArea/ScrollArea.esm.js.map +0 -1
- package/dist/props/display.props.esm.js +0 -12
- package/dist/props/display.props.esm.js.map +0 -1
- package/dist/props/gap-props.esm.js +0 -15
- package/dist/props/gap-props.esm.js.map +0 -1
- package/dist/props/height.props.esm.js +0 -23
- package/dist/props/height.props.esm.js.map +0 -1
- package/dist/props/margin.props.esm.js +0 -54
- package/dist/props/margin.props.esm.js.map +0 -1
- package/dist/props/padding.props.esm.js +0 -54
- package/dist/props/padding.props.esm.js.map +0 -1
- package/dist/props/position.props.esm.js +0 -18
- package/dist/props/position.props.esm.js.map +0 -1
- package/dist/props/prop-def.esm.js +0 -4
- package/dist/props/prop-def.esm.js.map +0 -1
- package/dist/props/spacing.props.esm.js +0 -28
- package/dist/props/spacing.props.esm.js.map +0 -1
- package/dist/props/width.props.esm.js +0 -23
- package/dist/props/width.props.esm.js.map +0 -1
- package/dist/utils/extractProps.esm.js +0 -49
- package/dist/utils/extractProps.esm.js.map +0 -1
|
@@ -1,67 +1,32 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
2
|
import { forwardRef } from 'react';
|
|
3
3
|
import { Checkbox as Checkbox$1 } from '@base-ui-components/react/checkbox';
|
|
4
|
-
import '../Icon/context.esm.js';
|
|
5
|
-
import '../Box/Box.esm.js';
|
|
6
|
-
import '../Grid/Grid.esm.js';
|
|
7
|
-
import '../Flex/Flex.esm.js';
|
|
8
|
-
import '../Container/Container.esm.js';
|
|
9
|
-
import '../Avatar/Avatar.esm.js';
|
|
10
|
-
import '../Button/Button.esm.js';
|
|
11
|
-
import '../Card/Card.esm.js';
|
|
12
|
-
import '../Collapsible/Collapsible.esm.js';
|
|
13
|
-
import '../FieldLabel/FieldLabel.esm.js';
|
|
14
|
-
import 'react-aria-components';
|
|
15
4
|
import { useStyles } from '../../hooks/useStyles.esm.js';
|
|
16
|
-
import '@remixicon/react';
|
|
17
|
-
import '../Text/Text.esm.js';
|
|
18
|
-
import 'react-router-dom';
|
|
19
|
-
import '../Tabs/Tabs.esm.js';
|
|
20
|
-
import '../Link/Link.esm.js';
|
|
21
|
-
import { Icon } from '../Icon/Icon.esm.js';
|
|
22
|
-
import '../ButtonIcon/ButtonIcon.esm.js';
|
|
23
|
-
import '../ButtonLink/ButtonLink.esm.js';
|
|
24
|
-
import '../RadioGroup/RadioGroup.esm.js';
|
|
25
|
-
import '../Table/components/Cell.esm.js';
|
|
26
5
|
import clsx from 'clsx';
|
|
27
|
-
import '
|
|
28
|
-
import '
|
|
29
|
-
import '../Tooltip/Tooltip.esm.js';
|
|
30
|
-
import '../ScrollArea/ScrollArea.esm.js';
|
|
31
|
-
import '../SearchField/SearchField.esm.js';
|
|
32
|
-
import '../Select/Select.esm.js';
|
|
33
|
-
import '../Switch/Switch.esm.js';
|
|
6
|
+
import styles from './Checkbox.module.css.esm.js';
|
|
7
|
+
import { RiCheckLine } from '@remixicon/react';
|
|
34
8
|
|
|
35
9
|
const Checkbox = forwardRef(
|
|
36
10
|
(props, ref) => {
|
|
37
|
-
const {
|
|
38
|
-
|
|
39
|
-
checked,
|
|
40
|
-
onChange,
|
|
41
|
-
disabled,
|
|
42
|
-
required,
|
|
43
|
-
className,
|
|
44
|
-
name,
|
|
45
|
-
value,
|
|
46
|
-
style
|
|
47
|
-
} = props;
|
|
48
|
-
const { classNames } = useStyles("Checkbox");
|
|
11
|
+
const { classNames, cleanedProps } = useStyles("Checkbox", props);
|
|
12
|
+
const { label, onChange, className, ...rest } = cleanedProps;
|
|
49
13
|
const checkboxElement = /* @__PURE__ */ jsx(
|
|
50
14
|
Checkbox$1.Root,
|
|
51
15
|
{
|
|
52
16
|
ref,
|
|
53
|
-
className: clsx(classNames.root, className),
|
|
54
|
-
checked,
|
|
17
|
+
className: clsx(classNames.root, styles[classNames.root], className),
|
|
55
18
|
onCheckedChange: onChange,
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
19
|
+
...rest,
|
|
20
|
+
children: /* @__PURE__ */ jsx(
|
|
21
|
+
Checkbox$1.Indicator,
|
|
22
|
+
{
|
|
23
|
+
className: clsx(classNames.indicator, styles[classNames.indicator]),
|
|
24
|
+
children: /* @__PURE__ */ jsx(RiCheckLine, { size: 12 })
|
|
25
|
+
}
|
|
26
|
+
)
|
|
62
27
|
}
|
|
63
28
|
);
|
|
64
|
-
return label ? /* @__PURE__ */ jsxs("label", { className: classNames.label, children: [
|
|
29
|
+
return label ? /* @__PURE__ */ jsxs("label", { className: clsx(classNames.label, styles[classNames.label]), children: [
|
|
65
30
|
checkboxElement,
|
|
66
31
|
label
|
|
67
32
|
] }) : checkboxElement;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.esm.js","sources":["../../../src/components/Checkbox/Checkbox.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 { Checkbox as CheckboxPrimitive } from '@base-ui-components/react/checkbox';\nimport
|
|
1
|
+
{"version":3,"file":"Checkbox.esm.js","sources":["../../../src/components/Checkbox/Checkbox.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 { Checkbox as CheckboxPrimitive } from '@base-ui-components/react/checkbox';\nimport type { CheckboxProps } from './types';\nimport { useStyles } from '../../hooks/useStyles';\nimport clsx from 'clsx';\nimport styles from './Checkbox.module.css';\nimport { RiCheckLine } from '@remixicon/react';\n\n/** @public */\nexport const Checkbox = forwardRef<HTMLButtonElement, CheckboxProps>(\n (props, ref) => {\n const { classNames, cleanedProps } = useStyles('Checkbox', props);\n const { label, onChange, className, ...rest } = cleanedProps;\n\n const checkboxElement = (\n <CheckboxPrimitive.Root\n ref={ref}\n className={clsx(classNames.root, styles[classNames.root], className)}\n onCheckedChange={onChange}\n {...rest}\n >\n <CheckboxPrimitive.Indicator\n className={clsx(classNames.indicator, styles[classNames.indicator])}\n >\n <RiCheckLine size={12} />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n );\n\n return label ? (\n <label className={clsx(classNames.label, styles[classNames.label])}>\n {checkboxElement}\n {label}\n </label>\n ) : (\n checkboxElement\n );\n },\n);\n"],"names":["CheckboxPrimitive"],"mappings":";;;;;;;;AAyBO,MAAM,QAAA,GAAW,UAAA;AAAA,EACtB,CAAC,OAAO,GAAA,KAAQ;AACd,IAAA,MAAM,EAAE,UAAA,EAAY,YAAA,EAAa,GAAI,SAAA,CAAU,YAAY,KAAK,CAAA;AAChE,IAAA,MAAM,EAAE,KAAA,EAAO,QAAA,EAAU,SAAA,EAAW,GAAG,MAAK,GAAI,YAAA;AAEhD,IAAA,MAAM,eAAA,mBACJ,GAAA;AAAA,MAACA,UAAA,CAAkB,IAAA;AAAA,MAAlB;AAAA,QACC,GAAA;AAAA,QACA,SAAA,EAAW,KAAK,UAAA,CAAW,IAAA,EAAM,OAAO,UAAA,CAAW,IAAI,GAAG,SAAS,CAAA;AAAA,QACnE,eAAA,EAAiB,QAAA;AAAA,QAChB,GAAG,IAAA;AAAA,QAEJ,QAAA,kBAAA,GAAA;AAAA,UAACA,UAAA,CAAkB,SAAA;AAAA,UAAlB;AAAA,YACC,WAAW,IAAA,CAAK,UAAA,CAAW,WAAW,MAAA,CAAO,UAAA,CAAW,SAAS,CAAC,CAAA;AAAA,YAElE,QAAA,kBAAA,GAAA,CAAC,WAAA,EAAA,EAAY,IAAA,EAAM,EAAA,EAAI;AAAA;AAAA;AACzB;AAAA,KACF;AAGF,IAAA,OAAO,KAAA,mBACL,IAAA,CAAC,OAAA,EAAA,EAAM,SAAA,EAAW,IAAA,CAAK,UAAA,CAAW,KAAA,EAAO,MAAA,CAAO,UAAA,CAAW,KAAK,CAAC,CAAA,EAC9D,QAAA,EAAA;AAAA,MAAA,eAAA;AAAA,MACA;AAAA,KAAA,EACH,CAAA,GAEA,eAAA;AAAA,EAEJ;AACF;;;;"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import styleInject from '../../node_modules_dist/style-inject/dist/style-inject.es.esm.js';
|
|
2
|
+
|
|
3
|
+
var css_248z = "/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n@layer components {\n .Checkbox-module_bui-CheckboxRoot__3-TFM {\n border: none;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 1rem;\n height: 1rem;\n box-shadow: inset 0 0 0 1px var(--bui-border);\n cursor: pointer;\n border-radius: 2px;\n transition: background-color 0.2s ease-in-out;\n background-color: var(--bui-bg-surface-1);\n padding: 0;\n flex-shrink: 0;\n }\n\n .Checkbox-module_bui-CheckboxRoot__3-TFM:focus-visible {\n transition: none;\n outline: 2px solid var(--bui-ring);\n outline-offset: 2px;\n }\n\n .Checkbox-module_bui-CheckboxRoot__3-TFM[data-checked] {\n background-color: var(--bui-bg-solid);\n box-shadow: none;\n color: var(--bui-fg-solid);\n }\n\n .Checkbox-module_bui-CheckboxLabel__2sjLA {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: var(--bui-space-2);\n font-size: var(--bui-font-size-3);\n font-family: var(--bui-font-regular);\n font-weight: var(--bui-font-weight-regular);\n color: var(--bui-fg-primary);\n user-select: none;\n\n &:hover {\n & .Checkbox-module_bui-CheckboxRoot__3-TFM:not([data-checked]) {\n box-shadow: inset 0 0 0 1px var(--bui-border-hover);\n }\n }\n }\n\n .Checkbox-module_bui-CheckboxIndicator__2ZJtl {\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--bui-fg-solid);\n }\n}\n";
|
|
4
|
+
var styles = {"bui-CheckboxRoot":"Checkbox-module_bui-CheckboxRoot__3-TFM","bui-CheckboxLabel":"Checkbox-module_bui-CheckboxLabel__2sjLA","bui-CheckboxIndicator":"Checkbox-module_bui-CheckboxIndicator__2ZJtl"};
|
|
5
|
+
styleInject(css_248z);
|
|
6
|
+
|
|
7
|
+
export { styles as default };
|
|
8
|
+
//# sourceMappingURL=Checkbox.module.css.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Checkbox.module.css.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
|
@@ -3,39 +3,44 @@ import { forwardRef } from 'react';
|
|
|
3
3
|
import { Collapsible as Collapsible$1 } from '@base-ui-components/react/collapsible';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
import { useStyles } from '../../hooks/useStyles.esm.js';
|
|
6
|
+
import styles from './Collapsible.module.css.esm.js';
|
|
6
7
|
|
|
7
8
|
const CollapsibleRoot = forwardRef(({ className, ...props }, ref) => {
|
|
8
|
-
const { classNames } = useStyles("Collapsible");
|
|
9
|
+
const { classNames, cleanedProps } = useStyles("Collapsible", props);
|
|
9
10
|
return /* @__PURE__ */ jsx(
|
|
10
11
|
Collapsible$1.Root,
|
|
11
12
|
{
|
|
12
13
|
ref,
|
|
13
|
-
className: clsx(classNames.root, className),
|
|
14
|
-
...
|
|
14
|
+
className: clsx(classNames.root, styles[classNames.root], className),
|
|
15
|
+
...cleanedProps
|
|
15
16
|
}
|
|
16
17
|
);
|
|
17
18
|
});
|
|
18
19
|
CollapsibleRoot.displayName = Collapsible$1.Root.displayName;
|
|
19
20
|
const CollapsibleTrigger = forwardRef(({ className, ...props }, ref) => {
|
|
20
|
-
const { classNames } = useStyles("Collapsible");
|
|
21
|
+
const { classNames, cleanedProps } = useStyles("Collapsible", props);
|
|
21
22
|
return /* @__PURE__ */ jsx(
|
|
22
23
|
Collapsible$1.Trigger,
|
|
23
24
|
{
|
|
24
25
|
ref,
|
|
25
|
-
className: clsx(
|
|
26
|
-
|
|
26
|
+
className: clsx(
|
|
27
|
+
classNames.trigger,
|
|
28
|
+
styles[classNames.trigger],
|
|
29
|
+
className
|
|
30
|
+
),
|
|
31
|
+
...cleanedProps
|
|
27
32
|
}
|
|
28
33
|
);
|
|
29
34
|
});
|
|
30
35
|
CollapsibleTrigger.displayName = Collapsible$1.Trigger.displayName;
|
|
31
36
|
const CollapsiblePanel = forwardRef(({ className, ...props }, ref) => {
|
|
32
|
-
const { classNames } = useStyles("Collapsible");
|
|
37
|
+
const { classNames, cleanedProps } = useStyles("Collapsible", props);
|
|
33
38
|
return /* @__PURE__ */ jsx(
|
|
34
39
|
Collapsible$1.Panel,
|
|
35
40
|
{
|
|
36
41
|
ref,
|
|
37
|
-
className: clsx(classNames.panel, className),
|
|
38
|
-
...
|
|
42
|
+
className: clsx(classNames.panel, styles[classNames.panel], className),
|
|
43
|
+
...cleanedProps
|
|
39
44
|
}
|
|
40
45
|
);
|
|
41
46
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Collapsible.esm.js","sources":["../../../src/components/Collapsible/Collapsible.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 { Collapsible as CollapsiblePrimitive } from '@base-ui-components/react/collapsible';\nimport clsx from 'clsx';\nimport { useStyles } from '../../hooks/useStyles';\n\nconst CollapsibleRoot = forwardRef<\n React.ElementRef<typeof CollapsiblePrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof CollapsiblePrimitive.Root>\n>(({ className, ...props }, ref) => {\n const { classNames } = useStyles('Collapsible');\n\n return (\n <CollapsiblePrimitive.Root\n ref={ref}\n className={clsx(classNames.root, className)}\n {...
|
|
1
|
+
{"version":3,"file":"Collapsible.esm.js","sources":["../../../src/components/Collapsible/Collapsible.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 { Collapsible as CollapsiblePrimitive } from '@base-ui-components/react/collapsible';\nimport clsx from 'clsx';\nimport { useStyles } from '../../hooks/useStyles';\nimport styles from './Collapsible.module.css';\n\nconst CollapsibleRoot = forwardRef<\n React.ElementRef<typeof CollapsiblePrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof CollapsiblePrimitive.Root>\n>(({ className, ...props }, ref) => {\n const { classNames, cleanedProps } = useStyles('Collapsible', props);\n\n return (\n <CollapsiblePrimitive.Root\n ref={ref}\n className={clsx(classNames.root, styles[classNames.root], className)}\n {...cleanedProps}\n />\n );\n});\nCollapsibleRoot.displayName = CollapsiblePrimitive.Root.displayName;\n\nconst CollapsibleTrigger = forwardRef<\n React.ElementRef<typeof CollapsiblePrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof CollapsiblePrimitive.Trigger>\n>(({ className, ...props }, ref) => {\n const { classNames, cleanedProps } = useStyles('Collapsible', props);\n\n return (\n <CollapsiblePrimitive.Trigger\n ref={ref}\n className={clsx(\n classNames.trigger,\n styles[classNames.trigger],\n className,\n )}\n {...cleanedProps}\n />\n );\n});\nCollapsibleTrigger.displayName = CollapsiblePrimitive.Trigger.displayName;\n\nconst CollapsiblePanel = forwardRef<\n React.ElementRef<typeof CollapsiblePrimitive.Panel>,\n React.ComponentPropsWithoutRef<typeof CollapsiblePrimitive.Panel>\n>(({ className, ...props }, ref) => {\n const { classNames, cleanedProps } = useStyles('Collapsible', props);\n\n return (\n <CollapsiblePrimitive.Panel\n ref={ref}\n className={clsx(classNames.panel, styles[classNames.panel], className)}\n {...cleanedProps}\n />\n );\n});\nCollapsiblePanel.displayName = CollapsiblePrimitive.Panel.displayName;\n\n/**\n * Collapsible is a component that allows you to collapse and expand content.\n * It is a wrapper around the CollapsiblePrimitive component from base-ui-components.\n *\n * @public\n */\nexport const Collapsible = {\n Root: CollapsibleRoot,\n Trigger: CollapsibleTrigger,\n Panel: CollapsiblePanel,\n};\n"],"names":["CollapsiblePrimitive"],"mappings":";;;;;;;AAsBA,MAAM,eAAA,GAAkB,WAGtB,CAAC,EAAE,WAAW,GAAG,KAAA,IAAS,GAAA,KAAQ;AAClC,EAAA,MAAM,EAAE,UAAA,EAAY,YAAA,EAAa,GAAI,SAAA,CAAU,eAAe,KAAK,CAAA;AAEnE,EAAA,uBACE,GAAA;AAAA,IAACA,aAAA,CAAqB,IAAA;AAAA,IAArB;AAAA,MACC,GAAA;AAAA,MACA,SAAA,EAAW,KAAK,UAAA,CAAW,IAAA,EAAM,OAAO,UAAA,CAAW,IAAI,GAAG,SAAS,CAAA;AAAA,MAClE,GAAG;AAAA;AAAA,GACN;AAEJ,CAAC,CAAA;AACD,eAAA,CAAgB,WAAA,GAAcA,cAAqB,IAAA,CAAK,WAAA;AAExD,MAAM,kBAAA,GAAqB,WAGzB,CAAC,EAAE,WAAW,GAAG,KAAA,IAAS,GAAA,KAAQ;AAClC,EAAA,MAAM,EAAE,UAAA,EAAY,YAAA,EAAa,GAAI,SAAA,CAAU,eAAe,KAAK,CAAA;AAEnE,EAAA,uBACE,GAAA;AAAA,IAACA,aAAA,CAAqB,OAAA;AAAA,IAArB;AAAA,MACC,GAAA;AAAA,MACA,SAAA,EAAW,IAAA;AAAA,QACT,UAAA,CAAW,OAAA;AAAA,QACX,MAAA,CAAO,WAAW,OAAO,CAAA;AAAA,QACzB;AAAA,OACF;AAAA,MACC,GAAG;AAAA;AAAA,GACN;AAEJ,CAAC,CAAA;AACD,kBAAA,CAAmB,WAAA,GAAcA,cAAqB,OAAA,CAAQ,WAAA;AAE9D,MAAM,gBAAA,GAAmB,WAGvB,CAAC,EAAE,WAAW,GAAG,KAAA,IAAS,GAAA,KAAQ;AAClC,EAAA,MAAM,EAAE,UAAA,EAAY,YAAA,EAAa,GAAI,SAAA,CAAU,eAAe,KAAK,CAAA;AAEnE,EAAA,uBACE,GAAA;AAAA,IAACA,aAAA,CAAqB,KAAA;AAAA,IAArB;AAAA,MACC,GAAA;AAAA,MACA,SAAA,EAAW,KAAK,UAAA,CAAW,KAAA,EAAO,OAAO,UAAA,CAAW,KAAK,GAAG,SAAS,CAAA;AAAA,MACpE,GAAG;AAAA;AAAA,GACN;AAEJ,CAAC,CAAA;AACD,gBAAA,CAAiB,WAAA,GAAcA,cAAqB,KAAA,CAAM,WAAA;AAQnD,MAAM,WAAA,GAAc;AAAA,EACzB,IAAA,EAAM,eAAA;AAAA,EACN,OAAA,EAAS,kBAAA;AAAA,EACT,KAAA,EAAO;AACT;;;;"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import styleInject from '../../node_modules_dist/style-inject/dist/style-inject.es.esm.js';
|
|
2
|
+
|
|
3
|
+
var css_248z = "/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n@layer components {\n .Collapsible-module_bui-CollapsiblePanel__2C0cr {\n display: flex;\n height: var(--collapsible-panel-height);\n overflow: hidden;\n transition: all 150ms ease-out;\n\n &[data-starting-style],\n &[data-ending-style] {\n height: 0;\n }\n }\n}\n";
|
|
4
|
+
var styles = {"bui-CollapsiblePanel":"Collapsible-module_bui-CollapsiblePanel__2C0cr"};
|
|
5
|
+
styleInject(css_248z);
|
|
6
|
+
|
|
7
|
+
export { styles as default };
|
|
8
|
+
//# sourceMappingURL=Collapsible.module.css.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Collapsible.module.css.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
|
@@ -1,33 +1,30 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { forwardRef } from 'react';
|
|
2
3
|
import clsx from 'clsx';
|
|
3
|
-
import { displayPropDefs } from '../../props/display.props.esm.js';
|
|
4
|
-
import { extractProps } from '../../utils/extractProps.esm.js';
|
|
5
|
-
import { spacingPropDefs } from '../../props/spacing.props.esm.js';
|
|
6
4
|
import { useStyles } from '../../hooks/useStyles.esm.js';
|
|
5
|
+
import styles from './Container.module.css.esm.js';
|
|
7
6
|
|
|
8
7
|
const Container = forwardRef(
|
|
9
8
|
(props, ref) => {
|
|
10
|
-
const {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
children
|
|
30
|
-
});
|
|
9
|
+
const { classNames, utilityClasses, style, cleanedProps } = useStyles(
|
|
10
|
+
"Container",
|
|
11
|
+
props
|
|
12
|
+
);
|
|
13
|
+
const { className, ...rest } = cleanedProps;
|
|
14
|
+
return /* @__PURE__ */ jsx(
|
|
15
|
+
"div",
|
|
16
|
+
{
|
|
17
|
+
ref,
|
|
18
|
+
className: clsx(
|
|
19
|
+
classNames.root,
|
|
20
|
+
utilityClasses,
|
|
21
|
+
styles[classNames.root],
|
|
22
|
+
className
|
|
23
|
+
),
|
|
24
|
+
style,
|
|
25
|
+
...rest
|
|
26
|
+
}
|
|
27
|
+
);
|
|
31
28
|
}
|
|
32
29
|
);
|
|
33
30
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Container.esm.js","sources":["../../../src/components/Container/Container.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 {
|
|
1
|
+
{"version":3,"file":"Container.esm.js","sources":["../../../src/components/Container/Container.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 { ContainerProps } from './types';\nimport clsx from 'clsx';\nimport { useStyles } from '../../hooks/useStyles';\nimport styles from './Container.module.css';\n\n/** @public */\nexport const Container = forwardRef<HTMLDivElement, ContainerProps>(\n (props, ref) => {\n const { classNames, utilityClasses, style, cleanedProps } = useStyles(\n 'Container',\n props,\n );\n\n const { className, ...rest } = cleanedProps;\n\n return (\n <div\n ref={ref}\n className={clsx(\n classNames.root,\n utilityClasses,\n styles[classNames.root],\n className,\n )}\n style={style}\n {...rest}\n />\n );\n },\n);\n"],"names":[],"mappings":";;;;;;AAuBO,MAAM,SAAA,GAAY,UAAA;AAAA,EACvB,CAAC,OAAO,GAAA,KAAQ;AACd,IAAA,MAAM,EAAE,UAAA,EAAY,cAAA,EAAgB,KAAA,EAAO,cAAa,GAAI,SAAA;AAAA,MAC1D,WAAA;AAAA,MACA;AAAA,KACF;AAEA,IAAA,MAAM,EAAE,SAAA,EAAW,GAAG,IAAA,EAAK,GAAI,YAAA;AAE/B,IAAA,uBACE,GAAA;AAAA,MAAC,KAAA;AAAA,MAAA;AAAA,QACC,GAAA;AAAA,QACA,SAAA,EAAW,IAAA;AAAA,UACT,UAAA,CAAW,IAAA;AAAA,UACX,cAAA;AAAA,UACA,MAAA,CAAO,WAAW,IAAI,CAAA;AAAA,UACtB;AAAA,SACF;AAAA,QACA,KAAA;AAAA,QACC,GAAG;AAAA;AAAA,KACN;AAAA,EAEJ;AACF;;;;"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import styleInject from '../../node_modules_dist/style-inject/dist/style-inject.es.esm.js';
|
|
2
|
+
|
|
3
|
+
var css_248z = "/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n@layer components {\n .Container-module_bui-Container__1ROo0 {\n max-width: 120rem;\n padding-inline: var(--bui-space-4);\n margin-inline: auto;\n transition: padding 0.2s ease-in-out;\n }\n\n @media (min-width: 640px) {\n .Container-module_bui-Container__1ROo0 {\n padding-inline: var(--bui-space-5);\n }\n }\n}\n";
|
|
4
|
+
var styles = {"bui-Container":"Container-module_bui-Container__1ROo0"};
|
|
5
|
+
styleInject(css_248z);
|
|
6
|
+
|
|
7
|
+
export { styles as default };
|
|
8
|
+
//# sourceMappingURL=Container.module.css.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Container.module.css.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import { Modal, Dialog as Dialog$1, Heading, DialogTrigger as DialogTrigger$1 } from 'react-aria-components';
|
|
4
|
+
import clsx from 'clsx';
|
|
5
|
+
import { RiCloseLine } from '@remixicon/react';
|
|
6
|
+
import { Button } from '../Button/Button.esm.js';
|
|
7
|
+
import { useStyles } from '../../hooks/useStyles.esm.js';
|
|
8
|
+
import { Flex } from '../Flex/Flex.esm.js';
|
|
9
|
+
import styles from './Dialog.module.css.esm.js';
|
|
10
|
+
|
|
11
|
+
const DialogTrigger = (props) => {
|
|
12
|
+
return /* @__PURE__ */ jsx(DialogTrigger$1, { ...props });
|
|
13
|
+
};
|
|
14
|
+
const Dialog = forwardRef(
|
|
15
|
+
(props, ref) => {
|
|
16
|
+
const { classNames, cleanedProps } = useStyles("Dialog", props);
|
|
17
|
+
const { className, children, width, height, style, ...rest } = cleanedProps;
|
|
18
|
+
return /* @__PURE__ */ jsx(
|
|
19
|
+
Modal,
|
|
20
|
+
{
|
|
21
|
+
ref,
|
|
22
|
+
className: clsx(classNames.overlay, styles[classNames.overlay]),
|
|
23
|
+
isDismissable: true,
|
|
24
|
+
isKeyboardDismissDisabled: false,
|
|
25
|
+
...rest,
|
|
26
|
+
children: /* @__PURE__ */ jsx(
|
|
27
|
+
Dialog$1,
|
|
28
|
+
{
|
|
29
|
+
className: clsx(
|
|
30
|
+
classNames.dialog,
|
|
31
|
+
styles[classNames.dialog],
|
|
32
|
+
className
|
|
33
|
+
),
|
|
34
|
+
style: {
|
|
35
|
+
["--bui-dialog-min-width"]: typeof width === "number" ? `${width}px` : width || "400px",
|
|
36
|
+
["--bui-dialog-min-height"]: height ? typeof height === "number" ? `${height}px` : height : "auto",
|
|
37
|
+
...style
|
|
38
|
+
},
|
|
39
|
+
children
|
|
40
|
+
}
|
|
41
|
+
)
|
|
42
|
+
}
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
);
|
|
46
|
+
Dialog.displayName = "Dialog";
|
|
47
|
+
const DialogHeader = forwardRef((props, ref) => {
|
|
48
|
+
const { classNames, cleanedProps } = useStyles("Dialog", props);
|
|
49
|
+
const { className, children, ...rest } = cleanedProps;
|
|
50
|
+
return /* @__PURE__ */ jsxs(
|
|
51
|
+
Flex,
|
|
52
|
+
{
|
|
53
|
+
ref,
|
|
54
|
+
className: clsx(classNames.header, styles[classNames.header], className),
|
|
55
|
+
...rest,
|
|
56
|
+
children: [
|
|
57
|
+
/* @__PURE__ */ jsx(
|
|
58
|
+
Heading,
|
|
59
|
+
{
|
|
60
|
+
slot: "title",
|
|
61
|
+
className: clsx(classNames.headerTitle, styles[classNames.headerTitle]),
|
|
62
|
+
children
|
|
63
|
+
}
|
|
64
|
+
),
|
|
65
|
+
/* @__PURE__ */ jsx(Button, { name: "close", "aria-label": "Close", variant: "tertiary", slot: "close", children: /* @__PURE__ */ jsx(RiCloseLine, {}) })
|
|
66
|
+
]
|
|
67
|
+
}
|
|
68
|
+
);
|
|
69
|
+
});
|
|
70
|
+
DialogHeader.displayName = "DialogHeader";
|
|
71
|
+
const DialogBody = forwardRef(
|
|
72
|
+
(props, ref) => {
|
|
73
|
+
const { classNames, cleanedProps } = useStyles("Dialog", props);
|
|
74
|
+
const { className, children, ...rest } = cleanedProps;
|
|
75
|
+
return /* @__PURE__ */ jsx(
|
|
76
|
+
"div",
|
|
77
|
+
{
|
|
78
|
+
className: clsx(classNames.body, styles[classNames.body], className),
|
|
79
|
+
ref,
|
|
80
|
+
...rest,
|
|
81
|
+
children
|
|
82
|
+
}
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
);
|
|
86
|
+
DialogBody.displayName = "DialogBody";
|
|
87
|
+
const DialogFooter = forwardRef((props, ref) => {
|
|
88
|
+
const { classNames, cleanedProps } = useStyles("Dialog", props);
|
|
89
|
+
const { className, children, ...rest } = cleanedProps;
|
|
90
|
+
return /* @__PURE__ */ jsx(
|
|
91
|
+
"div",
|
|
92
|
+
{
|
|
93
|
+
ref,
|
|
94
|
+
className: clsx(classNames.footer, styles[classNames.footer], className),
|
|
95
|
+
...rest,
|
|
96
|
+
children
|
|
97
|
+
}
|
|
98
|
+
);
|
|
99
|
+
});
|
|
100
|
+
DialogFooter.displayName = "DialogFooter";
|
|
101
|
+
|
|
102
|
+
export { Dialog, DialogBody, DialogFooter, DialogHeader, DialogTrigger };
|
|
103
|
+
//# sourceMappingURL=Dialog.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Dialog.esm.js","sources":["../../../src/components/Dialog/Dialog.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 {\n Dialog as RADialog,\n DialogTrigger as RADialogTrigger,\n Modal,\n Heading,\n} from 'react-aria-components';\nimport clsx from 'clsx';\nimport type {\n DialogTriggerProps,\n DialogHeaderProps,\n DialogProps,\n DialogBodyProps,\n} from './types';\nimport { RiCloseLine } from '@remixicon/react';\nimport { Button } from '../Button';\nimport { useStyles } from '../../hooks/useStyles';\nimport { Flex } from '../Flex';\nimport styles from './Dialog.module.css';\n\n/** @public */\nexport const DialogTrigger = (props: DialogTriggerProps) => {\n return <RADialogTrigger {...props} />;\n};\n\n/** @public */\nexport const Dialog = forwardRef<React.ElementRef<typeof Modal>, DialogProps>(\n (props, ref) => {\n const { classNames, cleanedProps } = useStyles('Dialog', props);\n const { className, children, width, height, style, ...rest } = cleanedProps;\n\n return (\n <Modal\n ref={ref}\n className={clsx(classNames.overlay, styles[classNames.overlay])}\n isDismissable\n isKeyboardDismissDisabled={false}\n {...rest}\n >\n <RADialog\n className={clsx(\n classNames.dialog,\n styles[classNames.dialog],\n className,\n )}\n style={{\n ['--bui-dialog-min-width' as keyof React.CSSProperties]:\n typeof width === 'number' ? `${width}px` : width || '400px',\n ['--bui-dialog-min-height' as keyof React.CSSProperties]: height\n ? typeof height === 'number'\n ? `${height}px`\n : height\n : 'auto',\n ...style,\n }}\n >\n {children}\n </RADialog>\n </Modal>\n );\n },\n);\n\nDialog.displayName = 'Dialog';\n\n/** @public */\nexport const DialogHeader = forwardRef<\n React.ElementRef<'div'>,\n DialogHeaderProps\n>((props, ref) => {\n const { classNames, cleanedProps } = useStyles('Dialog', props);\n const { className, children, ...rest } = cleanedProps;\n\n return (\n <Flex\n ref={ref}\n className={clsx(classNames.header, styles[classNames.header], className)}\n {...rest}\n >\n <Heading\n slot=\"title\"\n className={clsx(classNames.headerTitle, styles[classNames.headerTitle])}\n >\n {children}\n </Heading>\n <Button name=\"close\" aria-label=\"Close\" variant=\"tertiary\" slot=\"close\">\n <RiCloseLine />\n </Button>\n </Flex>\n );\n});\nDialogHeader.displayName = 'DialogHeader';\n\n/** @public */\nexport const DialogBody = forwardRef<React.ElementRef<'div'>, DialogBodyProps>(\n (props, ref) => {\n const { classNames, cleanedProps } = useStyles('Dialog', props);\n const { className, children, ...rest } = cleanedProps;\n\n return (\n <div\n className={clsx(classNames.body, styles[classNames.body], className)}\n ref={ref}\n {...rest}\n >\n {children}\n </div>\n );\n },\n);\n\nDialogBody.displayName = 'DialogBody';\n\n/** @public */\nexport const DialogFooter = forwardRef<\n React.ElementRef<'div'>,\n React.ComponentPropsWithoutRef<'div'>\n>((props, ref) => {\n const { classNames, cleanedProps } = useStyles('Dialog', props);\n const { className, children, ...rest } = cleanedProps;\n\n return (\n <div\n ref={ref}\n className={clsx(classNames.footer, styles[classNames.footer], className)}\n {...rest}\n >\n {children}\n </div>\n );\n});\nDialogFooter.displayName = 'DialogFooter';\n"],"names":["RADialogTrigger","RADialog"],"mappings":"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"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import styleInject from '../../node_modules_dist/style-inject/dist/style-inject.es.esm.js';
|
|
2
|
+
|
|
3
|
+
var css_248z = "/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n@layer components {\n .Dialog-module_bui-DialogOverlay__5nqD5 {\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background: rgba(232, 232, 232, 0.8);\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 1000;\n }\n\n [data-theme='dark'] .Dialog-module_bui-Dialog__Cnu24 {\n background: rgba(0, 0, 0, 0.5);\n }\n\n .Dialog-module_bui-DialogOverlay__5nqD5[data-entering] {\n animation: Dialog-module_fade-in__17nJR 200ms ease-out forwards;\n }\n\n .Dialog-module_bui-DialogOverlay__5nqD5[data-exiting] {\n animation: Dialog-module_fade-out__jMAaZ 150ms ease-out forwards;\n }\n\n .Dialog-module_bui-Dialog__Cnu24 {\n background: var(--bui-bg-surface-1);\n border-radius: 0.5rem;\n border: 1px solid var(--bui-border);\n color: var(--bui-fg-primary);\n position: relative;\n width: min(var(--bui-dialog-min-width, 400px), calc(100vw - 3rem));\n max-width: calc(100vw - 3rem);\n height: min(var(--bui-dialog-min-height, auto), calc(100vh - 3rem));\n max-height: calc(100vh - 3rem);\n display: flex;\n flex-direction: column;\n outline: none;\n }\n\n /* Dialog entering animation */\n .Dialog-module_bui-DialogOverlay__5nqD5[data-entering] .Dialog-module_bui-Dialog__Cnu24 {\n animation: Dialog-module_dialog-enter__3NC2w 150ms ease-out forwards;\n }\n\n /* Dialog exiting animation */\n .Dialog-module_bui-DialogOverlay__5nqD5[data-exiting] .Dialog-module_bui-Dialog__Cnu24 {\n animation: Dialog-module_dialog-exit__21RUM 150ms ease-out forwards;\n }\n\n .Dialog-module_bui-DialogHeader__D340y {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding-inline: var(--bui-space-3);\n padding-block: var(--bui-space-2);\n border-bottom: 1px solid var(--bui-border);\n }\n\n .Dialog-module_bui-DialogHeaderTitle__1UEkF {\n font-size: var(--bui-font-size-3);\n font-weight: var(--bui-font-weight-bold);\n margin: 0;\n }\n\n .Dialog-module_bui-DialogFooter__k2SK8 {\n display: flex;\n align-items: center;\n justify-content: end;\n gap: var(--bui-space-2);\n padding-inline: var(--bui-space-3);\n padding-block: var(--bui-space-3);\n border-top: 1px solid var(--bui-border);\n }\n\n .Dialog-module_bui-DialogBody__2olLx {\n padding: var(--bui-space-3);\n flex: 1;\n overflow-y: auto;\n }\n\n /* Keyframe animations */\n @keyframes Dialog-module_fade-in__17nJR {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n\n @keyframes Dialog-module_fade-out__jMAaZ {\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n }\n\n @keyframes Dialog-module_dialog-enter__3NC2w {\n from {\n opacity: 0.5;\n transform: scale(0.8);\n }\n to {\n opacity: 1;\n transform: scale(1);\n }\n }\n\n @keyframes Dialog-module_dialog-exit__21RUM {\n from {\n opacity: 1;\n transform: scale(1);\n }\n to {\n opacity: 0;\n transform: scale(0.95);\n }\n }\n}\n";
|
|
4
|
+
var styles = {"bui-DialogOverlay":"Dialog-module_bui-DialogOverlay__5nqD5","bui-Dialog":"Dialog-module_bui-Dialog__Cnu24","fade-in":"Dialog-module_fade-in__17nJR","fade-out":"Dialog-module_fade-out__jMAaZ","dialog-enter":"Dialog-module_dialog-enter__3NC2w","dialog-exit":"Dialog-module_dialog-exit__21RUM","bui-DialogHeader":"Dialog-module_bui-DialogHeader__D340y","bui-DialogHeaderTitle":"Dialog-module_bui-DialogHeaderTitle__1UEkF","bui-DialogFooter":"Dialog-module_bui-DialogFooter__k2SK8","bui-DialogBody":"Dialog-module_bui-DialogBody__2olLx"};
|
|
5
|
+
styleInject(css_248z);
|
|
6
|
+
|
|
7
|
+
export { styles as default };
|
|
8
|
+
//# sourceMappingURL=Dialog.module.css.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Dialog.module.css.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
|
@@ -2,14 +2,17 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
2
2
|
import { forwardRef } from 'react';
|
|
3
3
|
import { FieldError as FieldError$1 } from 'react-aria-components';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
|
+
import styles from './FieldError.module.css.esm.js';
|
|
6
|
+
import { useStyles } from '../../hooks/useStyles.esm.js';
|
|
5
7
|
|
|
6
8
|
const FieldError = forwardRef(
|
|
7
9
|
(props, ref) => {
|
|
8
|
-
const {
|
|
10
|
+
const { classNames, cleanedProps } = useStyles("FieldError", props);
|
|
11
|
+
const { className, ...rest } = cleanedProps;
|
|
9
12
|
return /* @__PURE__ */ jsx(
|
|
10
13
|
FieldError$1,
|
|
11
14
|
{
|
|
12
|
-
className: clsx(
|
|
15
|
+
className: clsx(classNames.root, styles[classNames.root], className),
|
|
13
16
|
ref,
|
|
14
17
|
...rest
|
|
15
18
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldError.esm.js","sources":["../../../src/components/FieldError/FieldError.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 {\n FieldError as AriaFieldError,\n type FieldErrorProps,\n} from 'react-aria-components';\nimport clsx from 'clsx';\n\n/** @public */\nexport const FieldError = forwardRef<HTMLDivElement, FieldErrorProps>(\n (props: FieldErrorProps, ref) => {\n const { className, ...rest } =
|
|
1
|
+
{"version":3,"file":"FieldError.esm.js","sources":["../../../src/components/FieldError/FieldError.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 {\n FieldError as AriaFieldError,\n type FieldErrorProps,\n} from 'react-aria-components';\nimport clsx from 'clsx';\nimport styles from './FieldError.module.css';\nimport { useStyles } from '../../hooks/useStyles';\n\n/** @public */\nexport const FieldError = forwardRef<HTMLDivElement, FieldErrorProps>(\n (props: FieldErrorProps, ref) => {\n const { classNames, cleanedProps } = useStyles('FieldError', props);\n const { className, ...rest } = cleanedProps;\n\n return (\n <AriaFieldError\n className={clsx(classNames.root, styles[classNames.root], className)}\n ref={ref}\n {...rest}\n />\n );\n },\n);\n\nFieldError.displayName = 'FieldError';\n"],"names":["AriaFieldError"],"mappings":";;;;;;;AA0BO,MAAM,UAAA,GAAa,UAAA;AAAA,EACxB,CAAC,OAAwB,GAAA,KAAQ;AAC/B,IAAA,MAAM,EAAE,UAAA,EAAY,YAAA,EAAa,GAAI,SAAA,CAAU,cAAc,KAAK,CAAA;AAClE,IAAA,MAAM,EAAE,SAAA,EAAW,GAAG,IAAA,EAAK,GAAI,YAAA;AAE/B,IAAA,uBACE,GAAA;AAAA,MAACA,YAAA;AAAA,MAAA;AAAA,QACC,SAAA,EAAW,KAAK,UAAA,CAAW,IAAA,EAAM,OAAO,UAAA,CAAW,IAAI,GAAG,SAAS,CAAA;AAAA,QACnE,GAAA;AAAA,QACC,GAAG;AAAA;AAAA,KACN;AAAA,EAEJ;AACF;AAEA,UAAA,CAAW,WAAA,GAAc,YAAA;;;;"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import styleInject from '../../node_modules_dist/style-inject/dist/style-inject.es.esm.js';
|
|
2
|
+
|
|
3
|
+
var css_248z = "/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n@layer components {\n .FieldError-module_bui-FieldError__15x0m {\n display: inline-block;\n color: var(--bui-fg-danger);\n font-size: var(--bui-font-size-2);\n font-weight: var(--bui-font-weight-regular);\n margin-top: var(--bui-space-2);\n }\n}\n";
|
|
4
|
+
var styles = {"bui-FieldError":"FieldError-module_bui-FieldError__15x0m"};
|
|
5
|
+
styleInject(css_248z);
|
|
6
|
+
|
|
7
|
+
export { styles as default };
|
|
8
|
+
//# sourceMappingURL=FieldError.module.css.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FieldError.module.css.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
|
@@ -2,23 +2,60 @@ import { jsxs, jsx } from 'react/jsx-runtime';
|
|
|
2
2
|
import { Label } from 'react-aria-components';
|
|
3
3
|
import { forwardRef } from 'react';
|
|
4
4
|
import { useStyles } from '../../hooks/useStyles.esm.js';
|
|
5
|
+
import styles from './FieldLabel.module.css.esm.js';
|
|
6
|
+
import clsx from 'clsx';
|
|
5
7
|
|
|
6
8
|
const FieldLabel = forwardRef(
|
|
7
9
|
(props, ref) => {
|
|
8
|
-
const {
|
|
9
|
-
const {
|
|
10
|
+
const { classNames, cleanedProps } = useStyles("FieldLabel", props);
|
|
11
|
+
const { label, secondaryLabel, description, htmlFor, id, ...rest } = cleanedProps;
|
|
10
12
|
if (!label) return null;
|
|
11
|
-
return /* @__PURE__ */ jsxs(
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
13
|
+
return /* @__PURE__ */ jsxs(
|
|
14
|
+
"div",
|
|
15
|
+
{
|
|
16
|
+
className: clsx(classNames.root, styles[classNames.root]),
|
|
17
|
+
...rest,
|
|
18
|
+
ref,
|
|
19
|
+
children: [
|
|
20
|
+
label && /* @__PURE__ */ jsxs(
|
|
21
|
+
Label,
|
|
22
|
+
{
|
|
23
|
+
className: clsx(classNames.label, styles[classNames.label]),
|
|
24
|
+
htmlFor,
|
|
25
|
+
id,
|
|
26
|
+
children: [
|
|
27
|
+
label,
|
|
28
|
+
secondaryLabel && /* @__PURE__ */ jsxs(
|
|
29
|
+
"span",
|
|
30
|
+
{
|
|
31
|
+
"aria-hidden": "true",
|
|
32
|
+
className: clsx(
|
|
33
|
+
classNames.secondaryLabel,
|
|
34
|
+
styles[classNames.secondaryLabel]
|
|
35
|
+
),
|
|
36
|
+
children: [
|
|
37
|
+
"(",
|
|
38
|
+
secondaryLabel,
|
|
39
|
+
")"
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
)
|
|
43
|
+
]
|
|
44
|
+
}
|
|
45
|
+
),
|
|
46
|
+
description && /* @__PURE__ */ jsx(
|
|
47
|
+
"div",
|
|
48
|
+
{
|
|
49
|
+
className: clsx(
|
|
50
|
+
classNames.description,
|
|
51
|
+
styles[classNames.description]
|
|
52
|
+
),
|
|
53
|
+
children: description
|
|
54
|
+
}
|
|
55
|
+
)
|
|
56
|
+
]
|
|
57
|
+
}
|
|
58
|
+
);
|
|
22
59
|
}
|
|
23
60
|
);
|
|
24
61
|
FieldLabel.displayName = "FieldLabel";
|
|
@@ -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 { useStyles } from '../../hooks/useStyles';\n\n/** @public */\nexport const FieldLabel = forwardRef<HTMLDivElement, FieldLabelProps>(\n (props: FieldLabelProps, ref) => {\n const { label, secondaryLabel, description, htmlFor, id, ...rest }
|
|
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 { useStyles } from '../../hooks/useStyles';\nimport styles from './FieldLabel.module.css';\nimport clsx from 'clsx';\n\n/** @public */\nexport const FieldLabel = forwardRef<HTMLDivElement, FieldLabelProps>(\n (props: FieldLabelProps, ref) => {\n const { classNames, cleanedProps } = useStyles('FieldLabel', props);\n const { label, secondaryLabel, description, htmlFor, id, ...rest } =\n cleanedProps;\n\n if (!label) return null;\n\n return (\n <div\n className={clsx(classNames.root, styles[classNames.root])}\n {...rest}\n ref={ref}\n >\n {label && (\n <Label\n className={clsx(classNames.label, styles[classNames.label])}\n htmlFor={htmlFor}\n id={id}\n >\n {label}\n {secondaryLabel && (\n <span\n aria-hidden=\"true\"\n className={clsx(\n classNames.secondaryLabel,\n styles[classNames.secondaryLabel],\n )}\n >\n ({secondaryLabel})\n </span>\n )}\n </Label>\n )}\n {description && (\n <div\n className={clsx(\n classNames.description,\n styles[classNames.description],\n )}\n >\n {description}\n </div>\n )}\n </div>\n );\n },\n);\n\nFieldLabel.displayName = 'FieldLabel';\n"],"names":[],"mappings":";;;;;;;AAuBO,MAAM,UAAA,GAAa,UAAA;AAAA,EACxB,CAAC,OAAwB,GAAA,KAAQ;AAC/B,IAAA,MAAM,EAAE,UAAA,EAAY,YAAA,EAAa,GAAI,SAAA,CAAU,cAAc,KAAK,CAAA;AAClE,IAAA,MAAM,EAAE,OAAO,cAAA,EAAgB,WAAA,EAAa,SAAS,EAAA,EAAI,GAAG,MAAK,GAC/D,YAAA;AAEF,IAAA,IAAI,CAAC,OAAO,OAAO,IAAA;AAEnB,IAAA,uBACE,IAAA;AAAA,MAAC,KAAA;AAAA,MAAA;AAAA,QACC,WAAW,IAAA,CAAK,UAAA,CAAW,MAAM,MAAA,CAAO,UAAA,CAAW,IAAI,CAAC,CAAA;AAAA,QACvD,GAAG,IAAA;AAAA,QACJ,GAAA;AAAA,QAEC,QAAA,EAAA;AAAA,UAAA,KAAA,oBACC,IAAA;AAAA,YAAC,KAAA;AAAA,YAAA;AAAA,cACC,WAAW,IAAA,CAAK,UAAA,CAAW,OAAO,MAAA,CAAO,UAAA,CAAW,KAAK,CAAC,CAAA;AAAA,cAC1D,OAAA;AAAA,cACA,EAAA;AAAA,cAEC,QAAA,EAAA;AAAA,gBAAA,KAAA;AAAA,gBACA,cAAA,oBACC,IAAA;AAAA,kBAAC,MAAA;AAAA,kBAAA;AAAA,oBACC,aAAA,EAAY,MAAA;AAAA,oBACZ,SAAA,EAAW,IAAA;AAAA,sBACT,UAAA,CAAW,cAAA;AAAA,sBACX,MAAA,CAAO,WAAW,cAAc;AAAA,qBAClC;AAAA,oBACD,QAAA,EAAA;AAAA,sBAAA,GAAA;AAAA,sBACG,cAAA;AAAA,sBAAe;AAAA;AAAA;AAAA;AACnB;AAAA;AAAA,WAEJ;AAAA,UAED,WAAA,oBACC,GAAA;AAAA,YAAC,KAAA;AAAA,YAAA;AAAA,cACC,SAAA,EAAW,IAAA;AAAA,gBACT,UAAA,CAAW,WAAA;AAAA,gBACX,MAAA,CAAO,WAAW,WAAW;AAAA,eAC/B;AAAA,cAEC,QAAA,EAAA;AAAA;AAAA;AACH;AAAA;AAAA,KAEJ;AAAA,EAEJ;AACF;AAEA,UAAA,CAAW,WAAA,GAAc,YAAA;;;;"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import styleInject from '../../node_modules_dist/style-inject/dist/style-inject.es.esm.js';
|
|
2
|
+
|
|
3
|
+
var css_248z = "/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n@layer components {\n .FieldLabel-module_bui-FieldLabelWrapper__2jPGW {\n display: flex;\n flex-direction: column;\n margin-bottom: var(--bui-space-3);\n gap: var(--bui-space-1);\n }\n\n .FieldLabel-module_bui-FieldLabel__2w4yy {\n color: var(--bui-fg-primary);\n margin-right: auto;\n cursor: pointer;\n font-weight: var(--bui-font-weight-regular);\n font-size: var(--bui-font-size-2);\n }\n\n .FieldLabel-module_bui-FieldSecondaryLabel__nH5gD {\n color: var(--bui-fg-secondary);\n font-weight: var(--bui-font-weight-regular);\n margin-left: var(--bui-space-1);\n }\n\n .FieldLabel-module_bui-FieldDescription__2BAqV {\n font-weight: var(--bui-font-weight-regular);\n font-size: var(--bui-font-size-2);\n color: var(--bui-fg-secondary);\n margin: 0;\n }\n}\n";
|
|
4
|
+
var styles = {"bui-FieldLabelWrapper":"FieldLabel-module_bui-FieldLabelWrapper__2jPGW","bui-FieldLabel":"FieldLabel-module_bui-FieldLabel__2w4yy","bui-FieldSecondaryLabel":"FieldLabel-module_bui-FieldSecondaryLabel__nH5gD","bui-FieldDescription":"FieldLabel-module_bui-FieldDescription__2BAqV"};
|
|
5
|
+
styleInject(css_248z);
|
|
6
|
+
|
|
7
|
+
export { styles as default };
|
|
8
|
+
//# sourceMappingURL=FieldLabel.module.css.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FieldLabel.module.css.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|