@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,22 +1,16 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { Button, SelectValue } from 'react-aria-components';
|
|
3
3
|
import { RiArrowDownSLine } from '@remixicon/react';
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import { SelectDefinition } from './definition.esm.js';
|
|
7
|
-
import styles from './Select.module.css.esm.js';
|
|
4
|
+
import { useDefinition } from '../../hooks/useDefinition/useDefinition.esm.js';
|
|
5
|
+
import { SelectTriggerDefinition } from './definition.esm.js';
|
|
8
6
|
|
|
9
|
-
function SelectTrigger(
|
|
10
|
-
const {
|
|
11
|
-
|
|
7
|
+
function SelectTrigger(props) {
|
|
8
|
+
const { ownProps } = useDefinition(SelectTriggerDefinition, props);
|
|
9
|
+
const { classes, icon } = ownProps;
|
|
10
|
+
return /* @__PURE__ */ jsxs(Button, { className: classes.root, children: [
|
|
12
11
|
icon,
|
|
13
|
-
/* @__PURE__ */ jsx(
|
|
14
|
-
|
|
15
|
-
{
|
|
16
|
-
className: clsx(classNames.value, styles[classNames.value])
|
|
17
|
-
}
|
|
18
|
-
),
|
|
19
|
-
/* @__PURE__ */ jsx("div", { className: clsx(classNames.chevron, styles[classNames.chevron]), children: /* @__PURE__ */ jsx(RiArrowDownSLine, { "aria-hidden": "true" }) })
|
|
12
|
+
/* @__PURE__ */ jsx(SelectValue, { className: classes.value }),
|
|
13
|
+
/* @__PURE__ */ jsx("div", { className: classes.chevron, children: /* @__PURE__ */ jsx(RiArrowDownSLine, { "aria-hidden": "true" }) })
|
|
20
14
|
] });
|
|
21
15
|
}
|
|
22
16
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectTrigger.esm.js","sources":["../../../src/components/Select/SelectTrigger.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 { ReactNode } from 'react';\nimport { Button, SelectValue } from 'react-aria-components';\nimport { RiArrowDownSLine } from '@remixicon/react';\nimport
|
|
1
|
+
{"version":3,"file":"SelectTrigger.esm.js","sources":["../../../src/components/Select/SelectTrigger.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 { ReactNode } from 'react';\nimport { Button, SelectValue } from 'react-aria-components';\nimport { RiArrowDownSLine } from '@remixicon/react';\nimport { useDefinition } from '../../hooks/useDefinition';\nimport { SelectTriggerDefinition } from './definition';\n\ninterface SelectTriggerProps {\n icon?: ReactNode;\n}\n\nexport function SelectTrigger(props: SelectTriggerProps) {\n const { ownProps } = useDefinition(SelectTriggerDefinition, props);\n const { classes, icon } = ownProps;\n\n return (\n <Button className={classes.root}>\n {icon}\n <SelectValue className={classes.value} />\n <div className={classes.chevron}>\n <RiArrowDownSLine aria-hidden=\"true\" />\n </div>\n </Button>\n );\n}\n"],"names":[],"mappings":";;;;;;AA0BO,SAAS,cAAc,KAAA,EAA2B;AACvD,EAAA,MAAM,EAAE,QAAA,EAAS,GAAI,aAAA,CAAc,yBAAyB,KAAK,CAAA;AACjE,EAAA,MAAM,EAAE,OAAA,EAAS,IAAA,EAAK,GAAI,QAAA;AAE1B,EAAA,uBACE,IAAA,CAAC,MAAA,EAAA,EAAO,SAAA,EAAW,OAAA,CAAQ,IAAA,EACxB,QAAA,EAAA;AAAA,IAAA,IAAA;AAAA,oBACD,GAAA,CAAC,WAAA,EAAA,EAAY,SAAA,EAAW,OAAA,CAAQ,KAAA,EAAO,CAAA;AAAA,oBACvC,GAAA,CAAC,SAAI,SAAA,EAAW,OAAA,CAAQ,SACtB,QAAA,kBAAA,GAAA,CAAC,gBAAA,EAAA,EAAiB,aAAA,EAAY,MAAA,EAAO,CAAA,EACvC;AAAA,GAAA,EACF,CAAA;AAEJ;;;;"}
|
|
@@ -1,23 +1,73 @@
|
|
|
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 './Select.module.css.esm.js';
|
|
8
|
+
|
|
9
|
+
const SelectDefinition = defineComponent()({
|
|
10
|
+
styles,
|
|
2
11
|
classNames: {
|
|
3
12
|
root: "bui-Select",
|
|
4
|
-
popover: "bui-SelectPopover"
|
|
5
|
-
trigger: "bui-SelectTrigger",
|
|
6
|
-
chevron: "bui-SelectTriggerChevron",
|
|
7
|
-
value: "bui-SelectValue",
|
|
8
|
-
list: "bui-SelectList",
|
|
9
|
-
item: "bui-SelectItem",
|
|
10
|
-
itemIndicator: "bui-SelectItemIndicator",
|
|
11
|
-
itemLabel: "bui-SelectItemLabel",
|
|
12
|
-
searchWrapper: "bui-SelectSearchWrapper",
|
|
13
|
-
search: "bui-SelectSearch",
|
|
14
|
-
searchClear: "bui-SelectSearchClear",
|
|
15
|
-
noResults: "bui-SelectNoResults"
|
|
13
|
+
popover: "bui-SelectPopover"
|
|
16
14
|
},
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
propDefs: {
|
|
16
|
+
icon: {},
|
|
17
|
+
size: { dataAttribute: true, default: "small" },
|
|
18
|
+
options: {},
|
|
19
|
+
searchable: {},
|
|
20
|
+
searchPlaceholder: {},
|
|
21
|
+
label: {},
|
|
22
|
+
secondaryLabel: {},
|
|
23
|
+
description: {},
|
|
24
|
+
isRequired: {},
|
|
25
|
+
className: {}
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
const SelectTriggerDefinition = defineComponent()(
|
|
29
|
+
{
|
|
30
|
+
styles,
|
|
31
|
+
classNames: {
|
|
32
|
+
root: "bui-SelectTrigger",
|
|
33
|
+
chevron: "bui-SelectTriggerChevron",
|
|
34
|
+
value: "bui-SelectValue"
|
|
35
|
+
},
|
|
36
|
+
propDefs: {
|
|
37
|
+
icon: {}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
);
|
|
41
|
+
const SelectContentDefinition = defineComponent()(
|
|
42
|
+
{
|
|
43
|
+
styles,
|
|
44
|
+
classNames: {
|
|
45
|
+
root: "bui-SelectSearchWrapper",
|
|
46
|
+
search: "bui-SelectSearch",
|
|
47
|
+
searchClear: "bui-SelectSearchClear"
|
|
48
|
+
},
|
|
49
|
+
propDefs: {
|
|
50
|
+
searchable: {},
|
|
51
|
+
searchPlaceholder: { default: "Search..." },
|
|
52
|
+
options: {}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
);
|
|
56
|
+
const SelectListBoxDefinition = defineComponent()(
|
|
57
|
+
{
|
|
58
|
+
styles,
|
|
59
|
+
classNames: {
|
|
60
|
+
root: "bui-SelectList",
|
|
61
|
+
item: "bui-SelectItem",
|
|
62
|
+
itemIndicator: "bui-SelectItemIndicator",
|
|
63
|
+
itemLabel: "bui-SelectItemLabel",
|
|
64
|
+
noResults: "bui-SelectNoResults"
|
|
65
|
+
},
|
|
66
|
+
propDefs: {
|
|
67
|
+
options: {}
|
|
68
|
+
}
|
|
19
69
|
}
|
|
20
|
-
|
|
70
|
+
);
|
|
21
71
|
|
|
22
|
-
export { SelectDefinition };
|
|
72
|
+
export { SelectContentDefinition, SelectDefinition, SelectListBoxDefinition, SelectTriggerDefinition };
|
|
23
73
|
//# sourceMappingURL=definition.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definition.esm.js","sources":["../../../src/components/Select/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
|
|
1
|
+
{"version":3,"file":"definition.esm.js","sources":["../../../src/components/Select/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 {\n SelectOwnProps,\n SelectTriggerOwnProps,\n SelectContentOwnProps,\n SelectListBoxOwnProps,\n} from './types';\nimport styles from './Select.module.css';\n\n/**\n * Component definition for Select\n * @public\n */\nexport const SelectDefinition = defineComponent<SelectOwnProps>()({\n styles,\n classNames: {\n root: 'bui-Select',\n popover: 'bui-SelectPopover',\n },\n propDefs: {\n icon: {},\n size: { dataAttribute: true, default: 'small' },\n options: {},\n searchable: {},\n searchPlaceholder: {},\n label: {},\n secondaryLabel: {},\n description: {},\n isRequired: {},\n className: {},\n },\n});\n\n/**\n * Component definition for SelectTrigger\n * @internal\n */\nexport const SelectTriggerDefinition = defineComponent<SelectTriggerOwnProps>()(\n {\n styles,\n classNames: {\n root: 'bui-SelectTrigger',\n chevron: 'bui-SelectTriggerChevron',\n value: 'bui-SelectValue',\n },\n propDefs: {\n icon: {},\n },\n },\n);\n\n/**\n * Component definition for SelectContent\n * @internal\n */\nexport const SelectContentDefinition = defineComponent<SelectContentOwnProps>()(\n {\n styles,\n classNames: {\n root: 'bui-SelectSearchWrapper',\n search: 'bui-SelectSearch',\n searchClear: 'bui-SelectSearchClear',\n },\n propDefs: {\n searchable: {},\n searchPlaceholder: { default: 'Search...' },\n options: {},\n },\n },\n);\n\n/**\n * Component definition for SelectListBox\n * @internal\n */\nexport const SelectListBoxDefinition = defineComponent<SelectListBoxOwnProps>()(\n {\n styles,\n classNames: {\n root: 'bui-SelectList',\n item: 'bui-SelectItem',\n itemIndicator: 'bui-SelectItemIndicator',\n itemLabel: 'bui-SelectItemLabel',\n noResults: 'bui-SelectNoResults',\n },\n propDefs: {\n options: {},\n },\n },\n);\n"],"names":[],"mappings":";;;;;;;;AA6BO,MAAM,gBAAA,GAAmB,iBAAgC,CAAE;AAAA,EAChE,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM,YAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACX;AAAA,EACA,QAAA,EAAU;AAAA,IACR,MAAM,EAAC;AAAA,IACP,IAAA,EAAM,EAAE,aAAA,EAAe,IAAA,EAAM,SAAS,OAAA,EAAQ;AAAA,IAC9C,SAAS,EAAC;AAAA,IACV,YAAY,EAAC;AAAA,IACb,mBAAmB,EAAC;AAAA,IACpB,OAAO,EAAC;AAAA,IACR,gBAAgB,EAAC;AAAA,IACjB,aAAa,EAAC;AAAA,IACd,YAAY,EAAC;AAAA,IACb,WAAW;AAAC;AAEhB,CAAC;AAMM,MAAM,0BAA0B,eAAA,EAAuC;AAAA,EAC5E;AAAA,IACE,MAAA;AAAA,IACA,UAAA,EAAY;AAAA,MACV,IAAA,EAAM,mBAAA;AAAA,MACN,OAAA,EAAS,0BAAA;AAAA,MACT,KAAA,EAAO;AAAA,KACT;AAAA,IACA,QAAA,EAAU;AAAA,MACR,MAAM;AAAC;AACT;AAEJ;AAMO,MAAM,0BAA0B,eAAA,EAAuC;AAAA,EAC5E;AAAA,IACE,MAAA;AAAA,IACA,UAAA,EAAY;AAAA,MACV,IAAA,EAAM,yBAAA;AAAA,MACN,MAAA,EAAQ,kBAAA;AAAA,MACR,WAAA,EAAa;AAAA,KACf;AAAA,IACA,QAAA,EAAU;AAAA,MACR,YAAY,EAAC;AAAA,MACb,iBAAA,EAAmB,EAAE,OAAA,EAAS,WAAA,EAAY;AAAA,MAC1C,SAAS;AAAC;AACZ;AAEJ;AAMO,MAAM,0BAA0B,eAAA,EAAuC;AAAA,EAC5E;AAAA,IACE,MAAA;AAAA,IACA,UAAA,EAAY;AAAA,MACV,IAAA,EAAM,gBAAA;AAAA,MACN,IAAA,EAAM,gBAAA;AAAA,MACN,aAAA,EAAe,yBAAA;AAAA,MACf,SAAA,EAAW,qBAAA;AAAA,MACX,SAAA,EAAW;AAAA,KACb;AAAA,IACA,QAAA,EAAU;AAAA,MACR,SAAS;AAAC;AACZ;AAEJ;;;;"}
|
|
@@ -1,28 +1,24 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import {
|
|
2
|
+
import { useDefinition } from '../../hooks/useDefinition/useDefinition.esm.js';
|
|
3
3
|
import { SkeletonDefinition } from './definition.esm.js';
|
|
4
|
-
import styles from './Skeleton.module.css.esm.js';
|
|
5
|
-
import clsx from 'clsx';
|
|
6
4
|
|
|
7
5
|
const Skeleton = (props) => {
|
|
8
|
-
const {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
});
|
|
14
|
-
const { className, width, height, rounded, style, ...rest } = cleanedProps;
|
|
6
|
+
const { ownProps, restProps, dataAttributes } = useDefinition(
|
|
7
|
+
SkeletonDefinition,
|
|
8
|
+
props
|
|
9
|
+
);
|
|
10
|
+
const { classes, width, height, style } = ownProps;
|
|
15
11
|
return /* @__PURE__ */ jsx(
|
|
16
12
|
"div",
|
|
17
13
|
{
|
|
18
|
-
className:
|
|
19
|
-
|
|
14
|
+
className: classes.root,
|
|
15
|
+
...dataAttributes,
|
|
20
16
|
style: {
|
|
21
17
|
width,
|
|
22
18
|
height,
|
|
23
19
|
...style
|
|
24
20
|
},
|
|
25
|
-
...
|
|
21
|
+
...restProps
|
|
26
22
|
}
|
|
27
23
|
);
|
|
28
24
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Skeleton.esm.js","sources":["../../../src/components/Skeleton/Skeleton.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":"Skeleton.esm.js","sources":["../../../src/components/Skeleton/Skeleton.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 type { SkeletonProps } from './types';\nimport { useDefinition } from '../../hooks/useDefinition';\nimport { SkeletonDefinition } from './definition';\n\n/** @public */\nexport const Skeleton = (props: SkeletonProps) => {\n const { ownProps, restProps, dataAttributes } = useDefinition(\n SkeletonDefinition,\n props,\n );\n const { classes, width, height, style } = ownProps;\n\n return (\n <div\n className={classes.root}\n {...dataAttributes}\n style={{\n width,\n height,\n ...style,\n }}\n {...restProps}\n />\n );\n};\n"],"names":[],"mappings":";;;;AAqBO,MAAM,QAAA,GAAW,CAAC,KAAA,KAAyB;AAChD,EAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAW,cAAA,EAAe,GAAI,aAAA;AAAA,IAC9C,kBAAA;AAAA,IACA;AAAA,GACF;AACA,EAAA,MAAM,EAAE,OAAA,EAAS,KAAA,EAAO,MAAA,EAAQ,OAAM,GAAI,QAAA;AAE1C,EAAA,uBACE,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,WAAW,OAAA,CAAQ,IAAA;AAAA,MAClB,GAAG,cAAA;AAAA,MACJ,KAAA,EAAO;AAAA,QACL,KAAA;AAAA,QACA,MAAA;AAAA,QACA,GAAG;AAAA,OACL;AAAA,MACC,GAAG;AAAA;AAAA,GACN;AAEJ;;;;"}
|
|
@@ -1,8 +1,24 @@
|
|
|
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 './Skeleton.module.css.esm.js';
|
|
8
|
+
|
|
9
|
+
const SkeletonDefinition = defineComponent()({
|
|
10
|
+
styles,
|
|
2
11
|
classNames: {
|
|
3
12
|
root: "bui-Skeleton"
|
|
13
|
+
},
|
|
14
|
+
propDefs: {
|
|
15
|
+
width: { default: 80 },
|
|
16
|
+
height: { default: 24 },
|
|
17
|
+
rounded: { dataAttribute: true, default: false },
|
|
18
|
+
className: {},
|
|
19
|
+
style: {}
|
|
4
20
|
}
|
|
5
|
-
};
|
|
21
|
+
});
|
|
6
22
|
|
|
7
23
|
export { SkeletonDefinition };
|
|
8
24
|
//# sourceMappingURL=definition.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definition.esm.js","sources":["../../../src/components/Skeleton/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/Skeleton/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 { SkeletonOwnProps } from './types';\nimport styles from './Skeleton.module.css';\n\n/**\n * Component definition for Skeleton\n * @public\n */\nexport const SkeletonDefinition = defineComponent<SkeletonOwnProps>()({\n styles,\n classNames: {\n root: 'bui-Skeleton',\n },\n propDefs: {\n width: { default: 80 },\n height: { default: 24 },\n rounded: { dataAttribute: true, default: false },\n className: {},\n style: {},\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,KAAA,EAAO,EAAE,OAAA,EAAS,EAAA,EAAG;AAAA,IACrB,MAAA,EAAQ,EAAE,OAAA,EAAS,EAAA,EAAG;AAAA,IACtB,OAAA,EAAS,EAAE,aAAA,EAAe,IAAA,EAAM,SAAS,KAAA,EAAM;AAAA,IAC/C,WAAW,EAAC;AAAA,IACZ,OAAO;AAAC;AAEZ,CAAC;;;;"}
|
|
@@ -1,32 +1,17 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { forwardRef } from 'react';
|
|
3
3
|
import { Switch as Switch$1 } from 'react-aria-components';
|
|
4
|
-
import {
|
|
4
|
+
import { useDefinition } from '../../hooks/useDefinition/useDefinition.esm.js';
|
|
5
5
|
import { SwitchDefinition } from './definition.esm.js';
|
|
6
|
-
import styles from './Switch.module.css.esm.js';
|
|
7
|
-
import clsx from 'clsx';
|
|
8
6
|
|
|
9
7
|
const Switch = forwardRef(
|
|
10
8
|
(props, ref) => {
|
|
11
|
-
const {
|
|
12
|
-
const {
|
|
13
|
-
return /* @__PURE__ */ jsxs(
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
ref,
|
|
18
|
-
...rest,
|
|
19
|
-
children: [
|
|
20
|
-
/* @__PURE__ */ jsx(
|
|
21
|
-
"div",
|
|
22
|
-
{
|
|
23
|
-
className: clsx(classNames.indicator, styles[classNames.indicator])
|
|
24
|
-
}
|
|
25
|
-
),
|
|
26
|
-
label
|
|
27
|
-
]
|
|
28
|
-
}
|
|
29
|
-
);
|
|
9
|
+
const { ownProps, restProps } = useDefinition(SwitchDefinition, props);
|
|
10
|
+
const { classes, label } = ownProps;
|
|
11
|
+
return /* @__PURE__ */ jsxs(Switch$1, { className: classes.root, ref, ...restProps, children: [
|
|
12
|
+
/* @__PURE__ */ jsx("div", { className: classes.indicator }),
|
|
13
|
+
label
|
|
14
|
+
] });
|
|
30
15
|
}
|
|
31
16
|
);
|
|
32
17
|
Switch.displayName = "Switch";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Switch.esm.js","sources":["../../../src/components/Switch/Switch.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 { Switch as AriaSwitch } from 'react-aria-components';\nimport type { SwitchProps } from './types';\nimport {
|
|
1
|
+
{"version":3,"file":"Switch.esm.js","sources":["../../../src/components/Switch/Switch.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 { Switch as AriaSwitch } from 'react-aria-components';\nimport type { SwitchProps } from './types';\nimport { useDefinition } from '../../hooks/useDefinition';\nimport { SwitchDefinition } from './definition';\n\n/** @public */\nexport const Switch = forwardRef<HTMLLabelElement, SwitchProps>(\n (props, ref) => {\n const { ownProps, restProps } = useDefinition(SwitchDefinition, props);\n const { classes, label } = ownProps;\n\n return (\n <AriaSwitch className={classes.root} ref={ref} {...restProps}>\n <div className={classes.indicator} />\n {label}\n </AriaSwitch>\n );\n },\n);\n\nSwitch.displayName = 'Switch';\n"],"names":["AriaSwitch"],"mappings":";;;;;;AAuBO,MAAM,MAAA,GAAS,UAAA;AAAA,EACpB,CAAC,OAAO,GAAA,KAAQ;AACd,IAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAU,GAAI,aAAA,CAAc,kBAAkB,KAAK,CAAA;AACrE,IAAA,MAAM,EAAE,OAAA,EAAS,KAAA,EAAM,GAAI,QAAA;AAE3B,IAAA,4BACGA,QAAA,EAAA,EAAW,SAAA,EAAW,QAAQ,IAAA,EAAM,GAAA,EAAW,GAAG,SAAA,EACjD,QAAA,EAAA;AAAA,sBAAA,GAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,OAAA,CAAQ,SAAA,EAAW,CAAA;AAAA,MAClC;AAAA,KAAA,EACH,CAAA;AAAA,EAEJ;AACF;AAEA,MAAA,CAAO,WAAA,GAAc,QAAA;;;;"}
|
|
@@ -1,9 +1,22 @@
|
|
|
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 './Switch.module.css.esm.js';
|
|
8
|
+
|
|
9
|
+
const SwitchDefinition = defineComponent()({
|
|
10
|
+
styles,
|
|
2
11
|
classNames: {
|
|
3
12
|
root: "bui-Switch",
|
|
4
13
|
indicator: "bui-SwitchIndicator"
|
|
14
|
+
},
|
|
15
|
+
propDefs: {
|
|
16
|
+
label: {},
|
|
17
|
+
className: {}
|
|
5
18
|
}
|
|
6
|
-
};
|
|
19
|
+
});
|
|
7
20
|
|
|
8
21
|
export { SwitchDefinition };
|
|
9
22
|
//# sourceMappingURL=definition.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definition.esm.js","sources":["../../../src/components/Switch/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/Switch/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 { SwitchOwnProps } from './types';\nimport styles from './Switch.module.css';\n\n/**\n * Component definition for Switch\n * @public\n */\nexport const SwitchDefinition = defineComponent<SwitchOwnProps>()({\n styles,\n classNames: {\n root: 'bui-Switch',\n indicator: 'bui-SwitchIndicator',\n },\n propDefs: {\n label: {},\n className: {},\n },\n});\n"],"names":[],"mappings":";;;;;;;;AAwBO,MAAM,gBAAA,GAAmB,iBAAgC,CAAE;AAAA,EAChE,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM,YAAA;AAAA,IACN,SAAA,EAAW;AAAA,GACb;AAAA,EACA,QAAA,EAAU;AAAA,IACR,OAAO,EAAC;AAAA,IACR,WAAW;AAAC;AAEhB,CAAC;;;;"}
|
|
@@ -1,24 +1,11 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import clsx from 'clsx';
|
|
3
2
|
import { Cell as Cell$1 } from 'react-aria-components';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import styles from '../Table.module.css.esm.js';
|
|
3
|
+
import { useDefinition } from '../../../hooks/useDefinition/useDefinition.esm.js';
|
|
4
|
+
import { CellDefinition } from '../definition.esm.js';
|
|
7
5
|
|
|
8
6
|
const Cell = (props) => {
|
|
9
|
-
const {
|
|
10
|
-
|
|
11
|
-
...props
|
|
12
|
-
});
|
|
13
|
-
const { className, children, ...rest } = cleanedProps;
|
|
14
|
-
return /* @__PURE__ */ jsx(
|
|
15
|
-
Cell$1,
|
|
16
|
-
{
|
|
17
|
-
className: clsx(classNames.cell, styles[classNames.cell], className),
|
|
18
|
-
...rest,
|
|
19
|
-
children
|
|
20
|
-
}
|
|
21
|
-
);
|
|
7
|
+
const { ownProps, restProps } = useDefinition(CellDefinition, props);
|
|
8
|
+
return /* @__PURE__ */ jsx(Cell$1, { className: ownProps.classes.root, ...restProps });
|
|
22
9
|
};
|
|
23
10
|
Cell.displayName = "Cell";
|
|
24
11
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Cell.esm.js","sources":["../../../../src/components/Table/components/Cell.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":"Cell.esm.js","sources":["../../../../src/components/Table/components/Cell.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 { Cell as ReactAriaCell } from 'react-aria-components';\nimport type { CellProps } from '../types';\nimport { useDefinition } from '../../../hooks/useDefinition';\nimport { CellDefinition } from '../definition';\n\n/** @public */\nconst Cell = (props: CellProps) => {\n const { ownProps, restProps } = useDefinition(CellDefinition, props);\n\n return <ReactAriaCell className={ownProps.classes.root} {...restProps} />;\n};\n\nCell.displayName = 'Cell';\n\nexport { Cell };\n"],"names":["ReactAriaCell"],"mappings":";;;;;AAsBA,MAAM,IAAA,GAAO,CAAC,KAAA,KAAqB;AACjC,EAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAU,GAAI,aAAA,CAAc,gBAAgB,KAAK,CAAA;AAEnE,EAAA,2BAAQA,MAAA,EAAA,EAAc,SAAA,EAAW,SAAS,OAAA,CAAQ,IAAA,EAAO,GAAG,SAAA,EAAW,CAAA;AACzE;AAEA,IAAA,CAAK,WAAA,GAAc,MAAA;;;;"}
|
|
@@ -1,51 +1,22 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
-
import clsx from 'clsx';
|
|
3
2
|
import { Text } from '../../Text/Text.esm.js';
|
|
4
3
|
import { Link } from '../../Link/Link.esm.js';
|
|
5
4
|
import { Avatar } from '../../Avatar/Avatar.esm.js';
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
5
|
+
import { useDefinition } from '../../../hooks/useDefinition/useDefinition.esm.js';
|
|
6
|
+
import '../../Avatar/Avatar.module.css.esm.js';
|
|
7
|
+
import { CellProfileDefinition } from '../definition.esm.js';
|
|
8
8
|
import { Cell } from 'react-aria-components';
|
|
9
|
-
import styles from '../Table.module.css.esm.js';
|
|
10
9
|
|
|
11
10
|
const CellProfile = (props) => {
|
|
12
|
-
const {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
...rest,
|
|
22
|
-
children: /* @__PURE__ */ jsxs(
|
|
23
|
-
"div",
|
|
24
|
-
{
|
|
25
|
-
className: clsx(
|
|
26
|
-
classNames.cellContentWrapper,
|
|
27
|
-
styles[classNames.cellContentWrapper]
|
|
28
|
-
),
|
|
29
|
-
children: [
|
|
30
|
-
src && name && /* @__PURE__ */ jsx(Avatar, { src, name, size: "x-small", purpose: "decoration" }),
|
|
31
|
-
/* @__PURE__ */ jsxs(
|
|
32
|
-
"div",
|
|
33
|
-
{
|
|
34
|
-
className: clsx(
|
|
35
|
-
classNames.cellContent,
|
|
36
|
-
styles[classNames.cellContent]
|
|
37
|
-
),
|
|
38
|
-
children: [
|
|
39
|
-
name && href ? /* @__PURE__ */ jsx(Link, { href, children: name }) : /* @__PURE__ */ jsx(Text, { as: "p", variant: "body-medium", color, children: name }),
|
|
40
|
-
description && /* @__PURE__ */ jsx(Text, { variant: "body-medium", color: "secondary", children: description })
|
|
41
|
-
]
|
|
42
|
-
}
|
|
43
|
-
)
|
|
44
|
-
]
|
|
45
|
-
}
|
|
46
|
-
)
|
|
47
|
-
}
|
|
48
|
-
);
|
|
11
|
+
const { ownProps, restProps } = useDefinition(CellProfileDefinition, props);
|
|
12
|
+
const { classes, src, name, href, description, color } = ownProps;
|
|
13
|
+
return /* @__PURE__ */ jsx(Cell, { className: classes.root, ...restProps, children: /* @__PURE__ */ jsxs("div", { className: classes.cellContentWrapper, children: [
|
|
14
|
+
src && name && /* @__PURE__ */ jsx(Avatar, { src, name, size: "x-small", purpose: "decoration" }),
|
|
15
|
+
/* @__PURE__ */ jsxs("div", { className: classes.cellContent, children: [
|
|
16
|
+
name && href ? /* @__PURE__ */ jsx(Link, { href, children: name }) : /* @__PURE__ */ jsx(Text, { as: "p", variant: "body-medium", color, children: name }),
|
|
17
|
+
description && /* @__PURE__ */ jsx(Text, { variant: "body-medium", color: "secondary", children: description })
|
|
18
|
+
] })
|
|
19
|
+
] }) });
|
|
49
20
|
};
|
|
50
21
|
|
|
51
22
|
export { CellProfile };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CellProfile.esm.js","sources":["../../../../src/components/Table/components/CellProfile.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":"CellProfile.esm.js","sources":["../../../../src/components/Table/components/CellProfile.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 { CellProfileProps } from '../types';\nimport { Text } from '../../Text/Text';\nimport { Link } from '../../Link/Link';\nimport { Avatar } from '../../Avatar';\nimport { useDefinition } from '../../../hooks/useDefinition';\nimport { CellProfileDefinition } from '../definition';\nimport { Cell as ReactAriaCell } from 'react-aria-components';\n\n/** @public */\nexport const CellProfile = (props: CellProfileProps) => {\n const { ownProps, restProps } = useDefinition(CellProfileDefinition, props);\n const { classes, src, name, href, description, color } = ownProps;\n\n return (\n <ReactAriaCell className={classes.root} {...restProps}>\n <div className={classes.cellContentWrapper}>\n {src && name && (\n <Avatar src={src} name={name} size=\"x-small\" purpose=\"decoration\" />\n )}\n <div className={classes.cellContent}>\n {name && href ? (\n <Link href={href}>{name}</Link>\n ) : (\n <Text as=\"p\" variant=\"body-medium\" color={color}>\n {name}\n </Text>\n )}\n {description && (\n <Text variant=\"body-medium\" color=\"secondary\">\n {description}\n </Text>\n )}\n </div>\n </div>\n </ReactAriaCell>\n );\n};\n"],"names":["ReactAriaCell"],"mappings":";;;;;;;;;AAyBO,MAAM,WAAA,GAAc,CAAC,KAAA,KAA4B;AACtD,EAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAU,GAAI,aAAA,CAAc,uBAAuB,KAAK,CAAA;AAC1E,EAAA,MAAM,EAAE,OAAA,EAAS,GAAA,EAAK,MAAM,IAAA,EAAM,WAAA,EAAa,OAAM,GAAI,QAAA;AAEzD,EAAA,uBACE,GAAA,CAACA,IAAA,EAAA,EAAc,SAAA,EAAW,OAAA,CAAQ,IAAA,EAAO,GAAG,SAAA,EAC1C,QAAA,kBAAA,IAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,OAAA,CAAQ,kBAAA,EACrB,QAAA,EAAA;AAAA,IAAA,GAAA,IAAO,IAAA,wBACL,MAAA,EAAA,EAAO,GAAA,EAAU,MAAY,IAAA,EAAK,SAAA,EAAU,SAAQ,YAAA,EAAa,CAAA;AAAA,oBAEpE,IAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,OAAA,CAAQ,WAAA,EACrB,QAAA,EAAA;AAAA,MAAA,IAAA,IAAQ,IAAA,mBACP,GAAA,CAAC,IAAA,EAAA,EAAK,IAAA,EAAa,QAAA,EAAA,IAAA,EAAK,CAAA,mBAExB,GAAA,CAAC,IAAA,EAAA,EAAK,EAAA,EAAG,GAAA,EAAI,OAAA,EAAQ,aAAA,EAAc,OAChC,QAAA,EAAA,IAAA,EACH,CAAA;AAAA,MAED,+BACC,GAAA,CAAC,IAAA,EAAA,EAAK,SAAQ,aAAA,EAAc,KAAA,EAAM,aAC/B,QAAA,EAAA,WAAA,EACH;AAAA,KAAA,EAEJ;AAAA,GAAA,EACF,CAAA,EACF,CAAA;AAEJ;;;;"}
|
|
@@ -1,85 +1,51 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
-
import clsx from 'clsx';
|
|
3
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';
|
|
4
5
|
import { Link } from '../../Link/Link.esm.js';
|
|
6
|
+
import '../../Link/Link.module.css.esm.js';
|
|
5
7
|
import { Cell } from 'react-aria-components';
|
|
6
|
-
import {
|
|
7
|
-
import { TableDefinition } from '../definition.esm.js';
|
|
8
|
-
import styles from '../Table.module.css.esm.js';
|
|
8
|
+
import { CellTextDefinition } from '../definition.esm.js';
|
|
9
9
|
|
|
10
10
|
const CellText = (props) => {
|
|
11
|
-
const {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
{
|
|
19
|
-
className: clsx(classNames.cell, styles[classNames.cell], className),
|
|
20
|
-
...rest,
|
|
21
|
-
children: /* @__PURE__ */ jsxs(
|
|
22
|
-
"div",
|
|
11
|
+
const { ownProps, restProps } = useDefinition(CellTextDefinition, props);
|
|
12
|
+
const { classes, title, description, color, leadingIcon, href } = ownProps;
|
|
13
|
+
return /* @__PURE__ */ jsx(Cell, { className: classes.root, ...restProps, children: /* @__PURE__ */ jsxs("div", { className: classes.cellContentWrapper, children: [
|
|
14
|
+
leadingIcon && /* @__PURE__ */ jsx("div", { className: classes.cellIcon, children: leadingIcon }),
|
|
15
|
+
/* @__PURE__ */ jsxs("div", { className: classes.cellContent, children: [
|
|
16
|
+
href ? /* @__PURE__ */ jsx(
|
|
17
|
+
Link,
|
|
23
18
|
{
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
truncate: true,
|
|
51
|
-
title,
|
|
52
|
-
children: title
|
|
53
|
-
}
|
|
54
|
-
) : /* @__PURE__ */ jsx(
|
|
55
|
-
Text,
|
|
56
|
-
{
|
|
57
|
-
as: "p",
|
|
58
|
-
variant: "body-medium",
|
|
59
|
-
color,
|
|
60
|
-
truncate: true,
|
|
61
|
-
title,
|
|
62
|
-
children: title
|
|
63
|
-
}
|
|
64
|
-
),
|
|
65
|
-
description && /* @__PURE__ */ jsx(
|
|
66
|
-
Text,
|
|
67
|
-
{
|
|
68
|
-
variant: "body-medium",
|
|
69
|
-
color: "secondary",
|
|
70
|
-
truncate: true,
|
|
71
|
-
title: description,
|
|
72
|
-
children: description
|
|
73
|
-
}
|
|
74
|
-
)
|
|
75
|
-
]
|
|
76
|
-
}
|
|
77
|
-
)
|
|
78
|
-
]
|
|
19
|
+
href,
|
|
20
|
+
variant: "body-medium",
|
|
21
|
+
color,
|
|
22
|
+
truncate: true,
|
|
23
|
+
title,
|
|
24
|
+
children: title
|
|
25
|
+
}
|
|
26
|
+
) : /* @__PURE__ */ jsx(
|
|
27
|
+
Text,
|
|
28
|
+
{
|
|
29
|
+
as: "p",
|
|
30
|
+
variant: "body-medium",
|
|
31
|
+
color,
|
|
32
|
+
truncate: true,
|
|
33
|
+
title,
|
|
34
|
+
children: title
|
|
35
|
+
}
|
|
36
|
+
),
|
|
37
|
+
description && /* @__PURE__ */ jsx(
|
|
38
|
+
Text,
|
|
39
|
+
{
|
|
40
|
+
variant: "body-medium",
|
|
41
|
+
color: "secondary",
|
|
42
|
+
truncate: true,
|
|
43
|
+
title: description,
|
|
44
|
+
children: description
|
|
79
45
|
}
|
|
80
46
|
)
|
|
81
|
-
}
|
|
82
|
-
);
|
|
47
|
+
] })
|
|
48
|
+
] }) });
|
|
83
49
|
};
|
|
84
50
|
CellText.displayName = "CellText";
|
|
85
51
|
|