@backstage/ui 0.7.0-next.2 → 0.7.0-next.3

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.
Files changed (66) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/css/styles.css +187 -73
  3. package/dist/components/Checkbox/Checkbox.esm.js +10 -7
  4. package/dist/components/Checkbox/Checkbox.esm.js.map +1 -1
  5. package/dist/components/Header/Header.esm.js +0 -2
  6. package/dist/components/Header/Header.esm.js.map +1 -1
  7. package/dist/components/Header/HeaderToolbar.esm.js +4 -93
  8. package/dist/components/Header/HeaderToolbar.esm.js.map +1 -1
  9. package/dist/components/HeaderPage/HeaderPage.esm.js +95 -41
  10. package/dist/components/HeaderPage/HeaderPage.esm.js.map +1 -1
  11. package/dist/components/Link/Link.esm.js +1 -13
  12. package/dist/components/Link/Link.esm.js.map +1 -1
  13. package/dist/components/Menu/Combobox.esm.js +9 -6
  14. package/dist/components/Menu/Combobox.esm.js.map +1 -1
  15. package/dist/components/SearchField/SearchField.esm.js +27 -4
  16. package/dist/components/SearchField/SearchField.esm.js.map +1 -1
  17. package/dist/components/Select/Select.esm.js +0 -1
  18. package/dist/components/Select/Select.esm.js.map +1 -1
  19. package/dist/components/Table/components/Cell.esm.js +30 -0
  20. package/dist/components/Table/components/Cell.esm.js.map +1 -0
  21. package/dist/components/Table/components/CellProfile.esm.js +41 -0
  22. package/dist/components/Table/components/CellProfile.esm.js.map +1 -0
  23. package/dist/components/Table/components/Column.esm.js +17 -0
  24. package/dist/components/Table/components/Column.esm.js.map +1 -0
  25. package/dist/components/Table/components/Row.esm.js +38 -0
  26. package/dist/components/Table/components/Row.esm.js.map +1 -0
  27. package/dist/components/Table/components/Table.esm.js +18 -0
  28. package/dist/components/Table/components/Table.esm.js.map +1 -0
  29. package/dist/components/Table/components/TableBody.esm.js +11 -0
  30. package/dist/components/Table/components/TableBody.esm.js.map +1 -0
  31. package/dist/components/Table/components/TableHeader.esm.js +20 -0
  32. package/dist/components/Table/components/TableHeader.esm.js.map +1 -0
  33. package/dist/components/Table/hooks/useTable.esm.js +116 -0
  34. package/dist/components/Table/hooks/useTable.esm.js.map +1 -0
  35. package/dist/components/TablePagination/TablePagination.esm.js +130 -0
  36. package/dist/components/TablePagination/TablePagination.esm.js.map +1 -0
  37. package/dist/index.d.ts +161 -94
  38. package/dist/index.esm.js +9 -2
  39. package/dist/index.esm.js.map +1 -1
  40. package/dist/utils/componentDefinitions.esm.js +16 -5
  41. package/dist/utils/componentDefinitions.esm.js.map +1 -1
  42. package/dist/utils/isExternalLink.esm.js +16 -0
  43. package/dist/utils/isExternalLink.esm.js.map +1 -0
  44. package/package.json +2 -2
  45. package/dist/components/DataTable/DataTable.esm.js +0 -26
  46. package/dist/components/DataTable/DataTable.esm.js.map +0 -1
  47. package/dist/components/DataTable/Pagination/DataTablePagination.esm.js +0 -84
  48. package/dist/components/DataTable/Pagination/DataTablePagination.esm.js.map +0 -1
  49. package/dist/components/DataTable/Root/DataTableRoot.esm.js +0 -24
  50. package/dist/components/DataTable/Root/DataTableRoot.esm.js.map +0 -1
  51. package/dist/components/DataTable/Table/DataTableTable.esm.js +0 -64
  52. package/dist/components/DataTable/Table/DataTableTable.esm.js.map +0 -1
  53. package/dist/components/Select/Select.styles.css.esm.js +0 -7
  54. package/dist/components/Select/Select.styles.css.esm.js.map +0 -1
  55. package/dist/components/Table/Table.esm.js +0 -68
  56. package/dist/components/Table/Table.esm.js.map +0 -1
  57. package/dist/components/Table/TableCell/TableCell.esm.js +0 -13
  58. package/dist/components/Table/TableCell/TableCell.esm.js.map +0 -1
  59. package/dist/components/Table/TableCellLink/TableCellLink.esm.js +0 -28
  60. package/dist/components/Table/TableCellLink/TableCellLink.esm.js.map +0 -1
  61. package/dist/components/Table/TableCellProfile/TableCellProfile.esm.js +0 -40
  62. package/dist/components/Table/TableCellProfile/TableCellProfile.esm.js.map +0 -1
  63. package/dist/components/Table/TableCellText/TableCellText.esm.js +0 -27
  64. package/dist/components/Table/TableCellText/TableCellText.esm.js.map +0 -1
  65. package/dist/node_modules_dist/style-inject/dist/style-inject.es.esm.js +0 -29
  66. package/dist/node_modules_dist/style-inject/dist/style-inject.es.esm.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"DataTablePagination.esm.js","sources":["../../../../src/components/DataTable/Pagination/DataTablePagination.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 { Text } from '../../Text';\nimport { DataTablePaginationProps } from './types';\nimport { ButtonIcon } from '../../ButtonIcon';\nimport clsx from 'clsx';\nimport { Select } from '../../Select';\nimport { useDataTable } from '../Root/DataTableRoot';\nimport { Icon } from '../../Icon';\n\n/** @public */\nconst DataTablePagination = forwardRef(\n (\n props: DataTablePaginationProps,\n ref: React.ForwardedRef<HTMLDivElement>,\n ) => {\n const { className, ...rest } = props;\n const { table } = useDataTable();\n const pageIndex = table?.getState().pagination.pageIndex;\n const pageSize = table?.getState().pagination.pageSize;\n const rowCount = table?.getRowCount();\n const fromCount = (pageIndex ?? 0) * (pageSize ?? 10) + 1;\n const toCount = Math.min(\n ((pageIndex ?? 0) + 1) * (pageSize ?? 10),\n rowCount,\n );\n\n return (\n <div\n ref={ref}\n style={{ minWidth: table?.getTotalSize() }}\n className={clsx('bui-DataTablePagination', className)}\n {...rest}\n >\n <div className=\"bui-DataTablePagination--left\">\n {!table.options.manualPagination && (\n <Select\n name=\"pageSize\"\n size=\"small\"\n placeholder=\"Show 10 results\"\n options={[\n { label: 'Show 5 results', value: '5' },\n { label: 'Show 10 results', value: '10' },\n { label: 'Show 20 results', value: '20' },\n { label: 'Show 30 results', value: '30' },\n { label: 'Show 40 results', value: '40' },\n { label: 'Show 50 results', value: '50' },\n ]}\n selectedKey={pageSize?.toString()}\n onSelectionChange={value => {\n table?.setPageSize(Number(value));\n }}\n className=\"bui-DataTablePagination--select\"\n />\n )}\n </div>\n <div className=\"bui-DataTablePagination--right\">\n <Text variant=\"body-medium\">{`${fromCount} - ${toCount} of ${rowCount}`}</Text>\n <ButtonIcon\n variant=\"secondary\"\n size=\"small\"\n onClick={() => table?.previousPage()}\n isDisabled={!table?.getCanPreviousPage()}\n icon={<Icon name=\"chevron-left\" />}\n />\n <ButtonIcon\n variant=\"secondary\"\n size=\"small\"\n onClick={() => table?.nextPage()}\n isDisabled={!table?.getCanNextPage()}\n icon={<Icon name=\"chevron-right\" />}\n />\n </div>\n </div>\n );\n },\n);\n\nDataTablePagination.displayName = 'DataTablePagination';\n\nexport { DataTablePagination };\n"],"names":[],"mappings":";;;;;;;;;;;AA0BA,MAAM,mBAAsB,GAAA,UAAA;AAAA,EAC1B,CACE,OACA,GACG,KAAA;AACH,IAAA,MAAM,EAAE,SAAA,EAAW,GAAG,IAAA,EAAS,GAAA,KAAA;AAC/B,IAAM,MAAA,EAAE,KAAM,EAAA,GAAI,YAAa,EAAA;AAC/B,IAAA,MAAM,SAAY,GAAA,KAAA,EAAO,QAAS,EAAA,CAAE,UAAW,CAAA,SAAA;AAC/C,IAAA,MAAM,QAAW,GAAA,KAAA,EAAO,QAAS,EAAA,CAAE,UAAW,CAAA,QAAA;AAC9C,IAAM,MAAA,QAAA,GAAW,OAAO,WAAY,EAAA;AACpC,IAAA,MAAM,SAAa,GAAA,CAAA,SAAA,IAAa,CAAM,KAAA,QAAA,IAAY,EAAM,CAAA,GAAA,CAAA;AACxD,IAAA,MAAM,UAAU,IAAK,CAAA,GAAA;AAAA,MACjB,CAAA,CAAA,SAAA,IAAa,CAAK,IAAA,CAAA,KAAM,QAA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,EAAU,gCACb,EAAA,QAAA,EAAA;AAAA,4BAAC,GAAA,CAAA,IAAA,EAAA,EAAK,SAAQ,aAAe,EAAA,QAAA,EAAA,CAAA,EAAG,SAAS,CAAM,GAAA,EAAA,OAAO,CAAO,IAAA,EAAA,QAAQ,CAAG,CAAA,EAAA,CAAA;AAAA,4BACxE,GAAA;AAAA,cAAC,UAAA;AAAA,cAAA;AAAA,gBACC,OAAQ,EAAA,WAAA;AAAA,gBACR,IAAK,EAAA,OAAA;AAAA,gBACL,OAAA,EAAS,MAAM,KAAA,EAAO,YAAa,EAAA;AAAA,gBACnC,UAAA,EAAY,CAAC,KAAA,EAAO,kBAAmB,EAAA;AAAA,gBACvC,IAAM,kBAAA,GAAA,CAAC,IAAK,EAAA,EAAA,IAAA,EAAK,cAAe,EAAA;AAAA;AAAA,aAClC;AAAA,4BACA,GAAA;AAAA,cAAC,UAAA;AAAA,cAAA;AAAA,gBACC,OAAQ,EAAA,WAAA;AAAA,gBACR,IAAK,EAAA,OAAA;AAAA,gBACL,OAAA,EAAS,MAAM,KAAA,EAAO,QAAS,EAAA;AAAA,gBAC/B,UAAA,EAAY,CAAC,KAAA,EAAO,cAAe,EAAA;AAAA,gBACnC,IAAM,kBAAA,GAAA,CAAC,IAAK,EAAA,EAAA,IAAA,EAAK,eAAgB,EAAA;AAAA;AAAA;AACnC,WACF,EAAA;AAAA;AAAA;AAAA,KACF;AAAA;AAGN;AAEA,mBAAA,CAAoB,WAAc,GAAA,qBAAA;;;;"}
@@ -1,24 +0,0 @@
1
- import { jsx } from 'react/jsx-runtime';
2
- import { createContext, forwardRef, useContext } from 'react';
3
- import clsx from 'clsx';
4
-
5
- const DataTableContext = createContext(
6
- null
7
- );
8
- const DataTableRoot = forwardRef(
9
- (props, ref) => {
10
- const { className, table, ...rest } = props;
11
- return /* @__PURE__ */ jsx(DataTableContext.Provider, { value: { table }, children: /* @__PURE__ */ jsx("div", { ref, className: clsx("bui-DataTable", className), ...rest }) });
12
- }
13
- );
14
- DataTableRoot.displayName = "DataTableRoot";
15
- function useDataTable() {
16
- const context = useContext(DataTableContext);
17
- if (!context) {
18
- throw new Error("useDataTable must be used within a DataTableRoot");
19
- }
20
- return context;
21
- }
22
-
23
- export { DataTableContext, DataTableRoot, useDataTable };
24
- //# sourceMappingURL=DataTableRoot.esm.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DataTableRoot.esm.js","sources":["../../../../src/components/DataTable/Root/DataTableRoot.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, createContext, useContext } from 'react';\nimport clsx from 'clsx';\nimport { DataTableRootProps } from './types';\nimport { Table } from '@tanstack/react-table';\n\ntype DataTableContextType<TData> = {\n table: Table<TData>;\n};\n\n/** @public */\nexport const DataTableContext = createContext<DataTableContextType<any> | null>(\n null,\n);\n\n/** @public */\nconst DataTableRoot = forwardRef(\n <TData,>(\n props: DataTableRootProps<TData>,\n ref: React.ForwardedRef<HTMLDivElement>,\n ) => {\n const { className, table, ...rest } = props;\n\n return (\n <DataTableContext.Provider value={{ table }}>\n <div ref={ref} className={clsx('bui-DataTable', className)} {...rest} />\n </DataTableContext.Provider>\n );\n },\n);\n\nDataTableRoot.displayName = 'DataTableRoot';\n\nexport { DataTableRoot };\n\n/** @public */\nexport function useDataTable<TData>() {\n const context = useContext(DataTableContext);\n if (!context) {\n throw new Error('useDataTable must be used within a DataTableRoot');\n }\n return context as DataTableContextType<TData>;\n}\n"],"names":[],"mappings":";;;;AA0BO,MAAM,gBAAmB,GAAA,aAAA;AAAA,EAC9B;AACF;AAGA,MAAM,aAAgB,GAAA,UAAA;AAAA,EACpB,CACE,OACA,GACG,KAAA;AACH,IAAA,MAAM,EAAE,SAAA,EAAW,KAAO,EAAA,GAAG,MAAS,GAAA,KAAA;AAEtC,IAAA,2BACG,gBAAiB,CAAA,QAAA,EAAjB,EAA0B,KAAO,EAAA,EAAE,OAClC,EAAA,QAAA,kBAAA,GAAA,CAAC,KAAI,EAAA,EAAA,GAAA,EAAU,WAAW,IAAK,CAAA,eAAA,EAAiB,SAAS,CAAI,EAAA,GAAG,MAAM,CACxE,EAAA,CAAA;AAAA;AAGN;AAEA,aAAA,CAAc,WAAc,GAAA,eAAA;AAKrB,SAAS,YAAsB,GAAA;AACpC,EAAM,MAAA,OAAA,GAAU,WAAW,gBAAgB,CAAA;AAC3C,EAAA,IAAI,CAAC,OAAS,EAAA;AACZ,IAAM,MAAA,IAAI,MAAM,kDAAkD,CAAA;AAAA;AAEpE,EAAO,OAAA,OAAA;AACT;;;;"}
@@ -1,64 +0,0 @@
1
- import { jsxs, jsx } from 'react/jsx-runtime';
2
- import { forwardRef } from 'react';
3
- import clsx from 'clsx';
4
- import { Table } from '../../Table/Table.esm.js';
5
- import { useDataTable } from '../Root/DataTableRoot.esm.js';
6
- import { flexRender } from '@tanstack/react-table';
7
-
8
- const DataTableTable = forwardRef(
9
- (props, ref) => {
10
- const { className, ...rest } = props;
11
- const { table } = useDataTable();
12
- return /* @__PURE__ */ jsxs(
13
- Table.Root,
14
- {
15
- ref,
16
- style: { minWidth: table.getTotalSize() },
17
- className: clsx(className),
18
- ...rest,
19
- children: [
20
- /* @__PURE__ */ jsx(Table.Header, { children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx(Table.Row, { children: headerGroup.headers.map((header) => {
21
- return /* @__PURE__ */ jsx(
22
- Table.Head,
23
- {
24
- style: { width: header.getSize() },
25
- children: header.isPlaceholder ? null : flexRender(
26
- header.column.columnDef.header,
27
- header.getContext()
28
- )
29
- },
30
- header.id
31
- );
32
- }) }, headerGroup.id)) }),
33
- /* @__PURE__ */ jsx(Table.Body, { children: table.getRowModel().rows?.length ? table.getRowModel().rows.map((row) => /* @__PURE__ */ jsx(
34
- Table.Row,
35
- {
36
- "data-state": row.getIsSelected() && "selected",
37
- children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsx(
38
- Table.Cell,
39
- {
40
- style: { width: cell.column.getSize() },
41
- children: flexRender(cell.column.columnDef.cell, cell.getContext())
42
- },
43
- cell.id
44
- ))
45
- },
46
- row.id
47
- )) : /* @__PURE__ */ jsx(Table.Row, { children: /* @__PURE__ */ jsx(
48
- Table.Cell,
49
- {
50
- colSpan: table.getAllColumns().length,
51
- className: "h-24 text-center",
52
- style: { width: table.getTotalSize() },
53
- children: "No results."
54
- }
55
- ) }) })
56
- ]
57
- }
58
- );
59
- }
60
- );
61
- DataTableTable.displayName = "DataTableRoot";
62
-
63
- export { DataTableTable };
64
- //# sourceMappingURL=DataTableTable.esm.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DataTableTable.esm.js","sources":["../../../../src/components/DataTable/Table/DataTableTable.tsx"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { forwardRef } from 'react';\nimport clsx from 'clsx';\nimport { DataTableTableProps } from './types';\nimport { Table } from '../../Table';\nimport { useDataTable } from '../Root/DataTableRoot';\nimport { flexRender } from '@tanstack/react-table';\n\n/** @public */\nconst DataTableTable = forwardRef(\n (props: DataTableTableProps, ref: React.ForwardedRef<HTMLTableElement>) => {\n const { className, ...rest } = props;\n const { table } = useDataTable();\n\n return (\n <Table.Root\n ref={ref}\n style={{ minWidth: table.getTotalSize() }}\n className={clsx(className)}\n {...rest}\n >\n <Table.Header>\n {table.getHeaderGroups().map(headerGroup => (\n <Table.Row key={headerGroup.id}>\n {headerGroup.headers.map(header => {\n return (\n <Table.Head\n key={header.id}\n style={{ width: header.getSize() }}\n >\n {header.isPlaceholder\n ? null\n : flexRender(\n header.column.columnDef.header,\n header.getContext(),\n )}\n </Table.Head>\n );\n })}\n </Table.Row>\n ))}\n </Table.Header>\n <Table.Body>\n {table.getRowModel().rows?.length ? (\n table.getRowModel().rows.map(row => (\n <Table.Row\n key={row.id}\n data-state={row.getIsSelected() && 'selected'}\n >\n {row.getVisibleCells().map(cell => (\n <Table.Cell\n key={cell.id}\n style={{ width: cell.column.getSize() }}\n >\n {flexRender(cell.column.columnDef.cell, cell.getContext())}\n </Table.Cell>\n ))}\n </Table.Row>\n ))\n ) : (\n <Table.Row>\n <Table.Cell\n colSpan={table.getAllColumns().length}\n className=\"h-24 text-center\"\n style={{ width: table.getTotalSize() }}\n >\n No results.\n </Table.Cell>\n </Table.Row>\n )}\n </Table.Body>\n </Table.Root>\n );\n },\n);\n\nDataTableTable.displayName = 'DataTableRoot';\n\nexport { DataTableTable };\n"],"names":[],"mappings":";;;;;;;AAwBA,MAAM,cAAiB,GAAA,UAAA;AAAA,EACrB,CAAC,OAA4B,GAA8C,KAAA;AACzE,IAAA,MAAM,EAAE,SAAA,EAAW,GAAG,IAAA,EAAS,GAAA,KAAA;AAC/B,IAAM,MAAA,EAAE,KAAM,EAAA,GAAI,YAAa,EAAA;AAE/B,IACE,uBAAA,IAAA;AAAA,MAAC,KAAM,CAAA,IAAA;AAAA,MAAN;AAAA,QACC,GAAA;AAAA,QACA,KAAO,EAAA,EAAE,QAAU,EAAA,KAAA,CAAM,cAAe,EAAA;AAAA,QACxC,SAAA,EAAW,KAAK,SAAS,CAAA;AAAA,QACxB,GAAG,IAAA;AAAA,QAEJ,QAAA,EAAA;AAAA,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AAAA,aAAA;AAAA,YAVI,GAAI,CAAA;AAAA,WAYZ,CAAA,mBAEA,GAAA,CAAA,KAAA,CAAM,KAAN,EACC,QAAA,kBAAA,GAAA;AAAA,YAAC,KAAM,CAAA,IAAA;AAAA,YAAN;AAAA,cACC,OAAA,EAAS,KAAM,CAAA,aAAA,EAAgB,CAAA,MAAA;AAAA,cAC/B,SAAU,EAAA,kBAAA;AAAA,cACV,KAAO,EAAA,EAAE,KAAO,EAAA,KAAA,CAAM,cAAe,EAAA;AAAA,cACtC,QAAA,EAAA;AAAA;AAAA,aAGH,CAEJ,EAAA;AAAA;AAAA;AAAA,KACF;AAAA;AAGN;AAEA,cAAA,CAAe,WAAc,GAAA,eAAA;;;;"}
@@ -1,7 +0,0 @@
1
- import styleInject from '../../node_modules_dist/style-inject/dist/style-inject.es.esm.js';
2
-
3
- var css_248z = "/*\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\n.bui-Select[data-invalid] {\n & .bui-SelectTrigger {\n border-color: var(--bui-fg-danger);\n }\n}\n\n.bui-SelectTrigger {\n box-sizing: border-box;\n border-radius: var(--bui-radius-3);\n border: 1px solid var(--bui-border);\n background-color: var(--bui-bg-surface-1);\n display: flex;\n justify-content: space-between;\n align-items: center;\n cursor: pointer;\n gap: var(--bui-space-2);\n width: 100%;\n\n & svg {\n flex-shrink: 0;\n color: var(--bui-fg-secondary);\n }\n\n &[data-size='small'] {\n height: 2rem;\n padding-inline: var(--bui-space-3);\n }\n\n &[data-size='medium'] {\n height: 3rem;\n padding-inline: var(--bui-space-4);\n }\n\n &[data-size='small'] svg {\n width: 1rem;\n height: 1rem;\n }\n\n &[data-size='medium'] svg {\n width: 1.25rem;\n height: 1.25rem;\n }\n\n &::placeholder {\n color: var(--bui-fg-secondary);\n }\n\n &:hover {\n transition: border-color 0.2s ease-in-out, outline-color 0.2s ease-in-out;\n border-color: var(--bui-border-hover);\n }\n\n &:focus-visible {\n border-color: var(--bui-border-pressed);\n outline: 0;\n }\n\n &[data-invalid] {\n border-color: var(--bui-fg-danger);\n }\n &[data-invalid]:hover {\n border-width: 2px;\n }\n\n &[data-invalid]:focus-visible {\n border-width: 2px;\n }\n\n &[disabled] {\n cursor: not-allowed;\n border-color: var(--bui-border-disabled);\n color: var(--bui-fg-disabled);\n }\n\n &[disabled] .bui-SelectValue {\n color: var(--bui-fg-disabled);\n }\n\n &[data-popup-open] .bui-SelectIcon {\n transform: rotate(180deg);\n }\n}\n\n.bui-SelectValue {\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n width: 100%;\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 text-align: left;\n\n & .bui-SelectItemIndicator {\n display: none;\n }\n\n &[disabled] {\n color: var(--bui-fg-disabled);\n }\n}\n\n.bui-SelectItem {\n position: relative;\n width: var(--anchor-width);\n display: grid;\n grid-template-areas: 'icon text';\n grid-template-columns: 1rem 1fr;\n align-items: center;\n padding-block: var(--bui-space-2);\n padding-left: var(--bui-space-3);\n padding-right: var(--bui-space-4);\n color: var(--bui-fg-primary);\n border-radius: var(--bui-radius-3);\n cursor: pointer;\n user-select: none;\n font-size: var(--bui-font-size-3);\n gap: var(--bui-space-1);\n outline: none;\n\n &[data-focused] {\n z-index: 0;\n position: relative;\n color: var(--bui-fg-primary);\n }\n\n &[data-focused]::before {\n content: '';\n z-index: -1;\n position: absolute;\n inset-block: 0;\n inset-inline: 0.25rem;\n border-radius: 0.25rem;\n background-color: var(--bui-bg-tint-hover);\n }\n\n &[data-disabled] {\n cursor: not-allowed;\n color: var(--bui-fg-disabled);\n }\n\n &[data-selected] .bui-SelectItemIndicator {\n opacity: 1;\n }\n}\n\n.bui-SelectItemIndicator {\n grid-area: icon;\n display: flex;\n align-items: center;\n justify-content: center;\n opacity: 0;\n transition: opacity 0.2s ease-in-out;\n}\n\n.bui-SelectItemLabel {\n flex: 1;\n grid-area: text;\n}\n";
4
- styleInject(css_248z);
5
-
6
- export { css_248z as default };
7
- //# sourceMappingURL=Select.styles.css.esm.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Select.styles.css.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -1,68 +0,0 @@
1
- import { jsx } from 'react/jsx-runtime';
2
- import { forwardRef } from 'react';
3
- import clsx from 'clsx';
4
- import { TableCell } from './TableCell/TableCell.esm.js';
5
- import { TableCellText } from './TableCellText/TableCellText.esm.js';
6
- import { TableCellLink } from './TableCellLink/TableCellLink.esm.js';
7
- import { TableCellProfile } from './TableCellProfile/TableCellProfile.esm.js';
8
- import { useStyles } from '../../hooks/useStyles.esm.js';
9
-
10
- const TableRoot = forwardRef(({ className, ...props }, ref) => {
11
- const { classNames } = useStyles("Table");
12
- return /* @__PURE__ */ jsx("table", { ref, className: clsx(classNames.root, className), ...props });
13
- });
14
- TableRoot.displayName = "TableRoot";
15
- const TableHeader = forwardRef(({ className, ...props }, ref) => {
16
- const { classNames } = useStyles("Table");
17
- return /* @__PURE__ */ jsx(
18
- "thead",
19
- {
20
- ref,
21
- className: clsx(classNames.header, className),
22
- ...props
23
- }
24
- );
25
- });
26
- TableHeader.displayName = "TableHeader";
27
- const TableBody = forwardRef(({ className, ...props }, ref) => {
28
- const { classNames } = useStyles("Table");
29
- return /* @__PURE__ */ jsx("tbody", { ref, className: clsx(classNames.body, className), ...props });
30
- });
31
- TableBody.displayName = "TableBody";
32
- const TableRow = forwardRef(({ className, ...props }, ref) => {
33
- const { classNames } = useStyles("Table");
34
- return /* @__PURE__ */ jsx("tr", { ref, className: clsx(classNames.row, className), ...props, children: props.children });
35
- });
36
- TableRow.displayName = "TableRow";
37
- const TableHead = forwardRef(({ className, ...props }, ref) => {
38
- const { classNames } = useStyles("Table");
39
- return /* @__PURE__ */ jsx("th", { ref, className: clsx(classNames.head, className), ...props });
40
- });
41
- TableHead.displayName = "TableHead";
42
- const TableCaption = forwardRef(({ className, ...props }, ref) => {
43
- const { classNames } = useStyles("Table");
44
- return /* @__PURE__ */ jsx(
45
- "caption",
46
- {
47
- ref,
48
- className: clsx(classNames.caption, className),
49
- ...props
50
- }
51
- );
52
- });
53
- TableCaption.displayName = "TableCaption";
54
- const Table = {
55
- Root: TableRoot,
56
- Header: TableHeader,
57
- Body: TableBody,
58
- Head: TableHead,
59
- Row: TableRow,
60
- Cell: TableCell,
61
- CellText: TableCellText,
62
- CellLink: TableCellLink,
63
- CellProfile: TableCellProfile,
64
- Caption: TableCaption
65
- };
66
-
67
- export { Table };
68
- //# sourceMappingURL=Table.esm.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Table.esm.js","sources":["../../../src/components/Table/Table.tsx"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { forwardRef } from 'react';\nimport clsx from 'clsx';\nimport { TableCell } from './TableCell/TableCell';\nimport { TableCellText } from './TableCellText/TableCellText';\nimport { TableCellLink } from './TableCellLink/TableCellLink';\nimport { TableCellProfile } from './TableCellProfile/TableCellProfile';\nimport { useStyles } from '../../hooks/useStyles';\n\nconst TableRoot = forwardRef<\n HTMLTableElement,\n React.HTMLAttributes<HTMLTableElement>\n>(({ className, ...props }, ref) => {\n const { classNames } = useStyles('Table');\n\n return (\n <table ref={ref} className={clsx(classNames.root, className)} {...props} />\n );\n});\nTableRoot.displayName = 'TableRoot';\n\nconst TableHeader = forwardRef<\n HTMLTableSectionElement,\n React.HTMLAttributes<HTMLTableSectionElement>\n>(({ className, ...props }, ref) => {\n const { classNames } = useStyles('Table');\n\n return (\n <thead\n ref={ref}\n className={clsx(classNames.header, className)}\n {...props}\n />\n );\n});\nTableHeader.displayName = 'TableHeader';\n\nconst TableBody = forwardRef<\n HTMLTableSectionElement,\n React.HTMLAttributes<HTMLTableSectionElement>\n>(({ className, ...props }, ref) => {\n const { classNames } = useStyles('Table');\n\n return (\n <tbody ref={ref} className={clsx(classNames.body, className)} {...props} />\n );\n});\nTableBody.displayName = 'TableBody';\n\nconst TableRow = forwardRef<\n HTMLTableRowElement,\n React.HTMLAttributes<HTMLTableRowElement>\n>(({ className, ...props }, ref) => {\n const { classNames } = useStyles('Table');\n\n return (\n <tr ref={ref} className={clsx(classNames.row, className)} {...props}>\n {props.children}\n </tr>\n );\n});\nTableRow.displayName = 'TableRow';\n\nconst TableHead = forwardRef<\n HTMLTableCellElement,\n React.ThHTMLAttributes<HTMLTableCellElement>\n>(({ className, ...props }, ref) => {\n const { classNames } = useStyles('Table');\n\n return (\n <th ref={ref} className={clsx(classNames.head, className)} {...props} />\n );\n});\nTableHead.displayName = 'TableHead';\n\nconst TableCaption = forwardRef<\n HTMLTableCaptionElement,\n React.HTMLAttributes<HTMLTableCaptionElement>\n>(({ className, ...props }, ref) => {\n const { classNames } = useStyles('Table');\n\n return (\n <caption\n ref={ref}\n className={clsx(classNames.caption, className)}\n {...props}\n />\n );\n});\nTableCaption.displayName = 'TableCaption';\n\n/**\n * Table component for displaying tabular data\n * @public\n */\nexport const Table = {\n Root: TableRoot,\n Header: TableHeader,\n Body: TableBody,\n Head: TableHead,\n Row: TableRow,\n Cell: TableCell,\n CellText: TableCellText,\n CellLink: TableCellLink,\n C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,EAAA,aAAA;AAAA,EACV,QAAU,EAAA,aAAA;AAAA,EACV,WAAa,EAAA,gBAAA;AAAA,EACb,OAAS,EAAA;AACX;;;;"}
@@ -1,13 +0,0 @@
1
- import { jsx } from 'react/jsx-runtime';
2
- import { forwardRef } from 'react';
3
- import clsx from 'clsx';
4
- import { useStyles } from '../../../hooks/useStyles.esm.js';
5
-
6
- const TableCell = forwardRef(({ className, ...props }, ref) => {
7
- const { classNames } = useStyles("Table");
8
- return /* @__PURE__ */ jsx("td", { ref, className: clsx(classNames.cell, className), ...props });
9
- });
10
- TableCell.displayName = "TableCell";
11
-
12
- export { TableCell };
13
- //# sourceMappingURL=TableCell.esm.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TableCell.esm.js","sources":["../../../../src/components/Table/TableCell/TableCell.tsx"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { forwardRef } from 'react';\nimport clsx from 'clsx';\nimport { useStyles } from '../../../hooks/useStyles';\n\n/** @public */\nconst TableCell = forwardRef<\n HTMLTableCellElement,\n React.TdHTMLAttributes<HTMLTableCellElement>\n>(({ className, ...props }, ref) => {\n const { classNames } = useStyles('Table');\n\n return (\n <td ref={ref} className={clsx(classNames.cell, className)} {...props} />\n );\n});\nTableCell.displayName = 'TableCell';\n\nexport { TableCell };\n"],"names":[],"mappings":";;;;;AAqBM,MAAA,SAAA,GAAY,WAGhB,CAAC,EAAE,WAAW,GAAG,KAAA,IAAS,GAAQ,KAAA;AAClC,EAAA,MAAM,EAAE,UAAA,EAAe,GAAA,SAAA,CAAU,OAAO,CAAA;AAExC,EACE,uBAAA,GAAA,CAAC,IAAG,EAAA,EAAA,GAAA,EAAU,SAAW,EAAA,IAAA,CAAK,WAAW,IAAM,EAAA,SAAS,CAAI,EAAA,GAAG,KAAO,EAAA,CAAA;AAE1E,CAAC;AACD,SAAA,CAAU,WAAc,GAAA,WAAA;;;;"}
@@ -1,28 +0,0 @@
1
- import { jsxs, jsx } from 'react/jsx-runtime';
2
- import { forwardRef } from 'react';
3
- import clsx from 'clsx';
4
- import { Text } from '../../Text/Text.esm.js';
5
- import { Link } from '../../Link/Link.esm.js';
6
- import { useStyles } from '../../../hooks/useStyles.esm.js';
7
-
8
- const TableCellLink = forwardRef(
9
- ({ className, title, description, href, render, ...props }, ref) => {
10
- const { classNames } = useStyles("Table");
11
- return /* @__PURE__ */ jsxs(
12
- "div",
13
- {
14
- ref,
15
- className: clsx(classNames.cellLink, className),
16
- ...props,
17
- children: [
18
- title && /* @__PURE__ */ jsx(Link, { href, children: title }),
19
- description && /* @__PURE__ */ jsx(Text, { variant: "body-medium", color: "secondary", children: description })
20
- ]
21
- }
22
- );
23
- }
24
- );
25
- TableCellLink.displayName = "TableCellLink";
26
-
27
- export { TableCellLink };
28
- //# sourceMappingURL=TableCellLink.esm.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TableCellLink.esm.js","sources":["../../../../src/components/Table/TableCellLink/TableCellLink.tsx"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { forwardRef } from 'react';\nimport clsx from 'clsx';\nimport { TableCellLinkProps } from './types';\nimport { Text } from '../../Text/Text';\nimport { Link } from '../../Link/Link';\nimport { useStyles } from '../../../hooks/useStyles';\n\n/** @public */\nconst TableCellLink = forwardRef<HTMLDivElement, TableCellLinkProps>(\n ({ className, title, description, href, render, ...props }, ref) => {\n const { classNames } = useStyles('Table');\n\n return (\n <div\n ref={ref}\n className={clsx(classNames.cellLink, className)}\n {...props}\n >\n {title && <Link href={href}>{title}</Link>}\n {description && (\n <Text variant=\"body-medium\" color=\"secondary\">\n {description}\n </Text>\n )}\n </div>\n );\n },\n);\nTableCellLink.displayName = 'TableCellLink';\n\nexport { TableCellLink };\n"],"names":[],"mappings":";;;;;;;AAwBA,MAAM,aAAgB,GAAA,UAAA;AAAA,EACpB,CAAC,EAAE,SAAA,EAAW,KAAO,EAAA,WAAA,EAAa,MAAM,MAAQ,EAAA,GAAG,KAAM,EAAA,EAAG,GAAQ,KAAA;AAClE,IAAA,MAAM,EAAE,UAAA,EAAe,GAAA,SAAA,CAAU,OAAO,CAAA;AAExC,IACE,uBAAA,IAAA;AAAA,MAAC,KAAA;AAAA,MAAA;AAAA,QACC,GAAA;AAAA,QACA,SAAW,EAAA,IAAA,CAAK,UAAW,CAAA,QAAA,EAAU,SAAS,CAAA;AAAA,QAC7C,GAAG,KAAA;AAAA,QAEH,QAAA,EAAA;AAAA,UAAS,KAAA,oBAAA,GAAA,CAAC,IAAK,EAAA,EAAA,IAAA,EAAa,QAAM,EAAA,KAAA,EAAA,CAAA;AAAA,UAClC,+BACE,GAAA,CAAA,IAAA,EAAA,EAAK,SAAQ,aAAc,EAAA,KAAA,EAAM,aAC/B,QACH,EAAA,WAAA,EAAA;AAAA;AAAA;AAAA,KAEJ;AAAA;AAGN;AACA,aAAA,CAAc,WAAc,GAAA,eAAA;;;;"}
@@ -1,40 +0,0 @@
1
- import { jsxs, jsx } from 'react/jsx-runtime';
2
- import { forwardRef } from 'react';
3
- import clsx from 'clsx';
4
- import { Text } from '../../Text/Text.esm.js';
5
- import { Link } from '../../Link/Link.esm.js';
6
- import { Avatar } from '@base-ui-components/react/avatar';
7
- import { useStyles } from '../../../hooks/useStyles.esm.js';
8
-
9
- const TableCellProfile = forwardRef(
10
- ({ className, src, name, to, withImage = true, ...rest }, ref) => {
11
- const { classNames } = useStyles("Table");
12
- return /* @__PURE__ */ jsxs(
13
- "div",
14
- {
15
- ref,
16
- className: clsx(classNames.cellProfile, className),
17
- ...rest,
18
- children: [
19
- withImage && /* @__PURE__ */ jsxs(Avatar.Root, { className: classNames.cellProfileAvatar, children: [
20
- /* @__PURE__ */ jsx(
21
- Avatar.Image,
22
- {
23
- src,
24
- width: "20",
25
- height: "20",
26
- className: classNames.cellProfileAvatarImage
27
- }
28
- ),
29
- /* @__PURE__ */ jsx(Avatar.Fallback, { className: classNames.cellProfileAvatarFallback, children: (name || "").split(" ").map((word) => word[0]).join("").toLocaleUpperCase("en-US").slice(0, 1) })
30
- ] }),
31
- name && to ? /* @__PURE__ */ jsx(Link, { href: to, children: name }) : /* @__PURE__ */ jsx(Text, { variant: "body-medium", children: name })
32
- ]
33
- }
34
- );
35
- }
36
- );
37
- TableCellProfile.displayName = "TableCellProfile";
38
-
39
- export { TableCellProfile };
40
- //# sourceMappingURL=TableCellProfile.esm.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TableCellProfile.esm.js","sources":["../../../../src/components/Table/TableCellProfile/TableCellProfile.tsx"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { forwardRef } from 'react';\nimport clsx from 'clsx';\nimport { TableCellProfileProps } from './types';\nimport { Text } from '../../Text/Text';\nimport { Link } from '../../Link/Link';\nimport { Avatar } from '@base-ui-components/react/avatar';\nimport { useStyles } from '../../../hooks/useStyles';\n\n/** @public */\nconst TableCellProfile = forwardRef<HTMLDivElement, TableCellProfileProps>(\n ({ className, src, name, to, withImage = true, ...rest }, ref) => {\n const { classNames } = useStyles('Table');\n\n return (\n <div\n ref={ref}\n className={clsx(classNames.cellProfile, className)}\n {...rest}\n >\n {withImage && (\n <Avatar.Root className={classNames.cellProfileAvatar}>\n <Avatar.Image\n src={src}\n width=\"20\"\n height=\"20\"\n className={classNames.cellProfileAvatarImage}\n />\n <Avatar.Fallback className={classNames.cellProfileAvatarFallback}>\n {(name || '')\n .split(' ')\n .map(word => word[0])\n .join('')\n .toLocaleUpperCase('en-US')\n .slice(0, 1)}\n </Avatar.Fallback>\n </Avatar.Root>\n )}\n {name && to ? (\n <Link href={to}>{name}</Link>\n ) : (\n <Text variant=\"body-medium\">{name}</Text>\n )}\n </div>\n );\n },\n);\nTableCellProfile.displayName = 'TableCellProfile';\n\nexport { TableCellProfile };\n"],"names":[],"mappings":";;;;;;;;AAyBA,MAAM,gBAAmB,GAAA,UAAA;AAAA,EACvB,CAAC,EAAE,SAAA,EAAW,GAAK,EAAA,IAAA,EAAM,EAAI,EAAA,SAAA,GAAY,IAAM,EAAA,GAAG,IAAK,EAAA,EAAG,GAAQ,KAAA;AAChE,IAAA,MAAM,EAAE,UAAA,EAAe,GAAA,SAAA,CAAU,OAAO,CAAA;AAExC,IACE,uBAAA,IAAA;AAAA,MAAC,KAAA;AAAA,MAAA;AAAA,QACC,GAAA;AAAA,QACA,SAAW,EAAA,IAAA,CAAK,UAAW,CAAA,WAAA,EAAa,SAAS,CAAA;AAAA,QAChD,GAAG,IAAA;AAAA,QAEH,QAAA,EAAA;AAAA,UAAA,SAAA,yBACE,MAAO,CAAA,IAAA,EAAP,EAAY,SAAA,EAAW,WAAW,iBACjC,EAAA,QAAA,EAAA;AAAA,4BAAA,GAAA;AAAA,cAAC,MAAO,CAAA,KAAA;AAAA,cAAP;AAAA,gBACC,GAAA;AAAA,gBACA,KAAM,EAAA,IAAA;AAAA,gBACN,MAAO,EAAA,IAAA;AAAA,gBACP,WAAW,UAAW,CAAA;AAAA;AAAA,aACxB;AAAA,4BACA,GAAA,CAAC,MAAO,CAAA,QAAA,EAAP,EAAgB,SAAA,EAAW,UAAW,CAAA,yBAAA,EACnC,QAAQ,EAAA,CAAA,IAAA,IAAA,EAAA,EACP,KAAM,CAAA,GAAG,CACT,CAAA,GAAA,CAAI,CAAQ,IAAA,KAAA,IAAA,CAAK,CAAC,CAAC,CACnB,CAAA,IAAA,CAAK,EAAE,CAAA,CACP,iBAAkB,CAAA,OAAO,CACzB,CAAA,KAAA,CAAM,CAAG,EAAA,CAAC,CACf,EAAA;AAAA,WACF,EAAA,CAAA;AAAA,UAED,IAAQ,IAAA,EAAA,mBACN,GAAA,CAAA,IAAA,EAAA,EAAK,IAAM,EAAA,EAAA,EAAK,QAAK,EAAA,IAAA,EAAA,CAAA,mBAErB,GAAA,CAAA,IAAA,EAAA,EAAK,OAAQ,EAAA,aAAA,EAAe,QAAK,EAAA,IAAA,EAAA;AAAA;AAAA;AAAA,KAEtC;AAAA;AAGN;AACA,gBAAA,CAAiB,WAAc,GAAA,kBAAA;;;;"}
@@ -1,27 +0,0 @@
1
- import { jsxs, jsx } from 'react/jsx-runtime';
2
- import { forwardRef } from 'react';
3
- import clsx from 'clsx';
4
- import { Text } from '../../Text/Text.esm.js';
5
- import { useStyles } from '../../../hooks/useStyles.esm.js';
6
-
7
- const TableCellText = forwardRef(
8
- ({ className, title, description, ...props }, ref) => {
9
- const { classNames } = useStyles("Table");
10
- return /* @__PURE__ */ jsxs(
11
- "div",
12
- {
13
- ref,
14
- className: clsx(classNames.cellText, className),
15
- ...props,
16
- children: [
17
- title && /* @__PURE__ */ jsx(Text, { variant: "body-medium", children: title }),
18
- description && /* @__PURE__ */ jsx(Text, { variant: "body-medium", color: "secondary", children: description })
19
- ]
20
- }
21
- );
22
- }
23
- );
24
- TableCellText.displayName = "TableCellText";
25
-
26
- export { TableCellText };
27
- //# sourceMappingURL=TableCellText.esm.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TableCellText.esm.js","sources":["../../../../src/components/Table/TableCellText/TableCellText.tsx"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { forwardRef } from 'react';\nimport clsx from 'clsx';\nimport { TableCellTextProps } from './types';\nimport { Text } from '../../Text/Text';\nimport { useStyles } from '../../../hooks/useStyles';\n\n/** @public */\nconst TableCellText = forwardRef<HTMLDivElement, TableCellTextProps>(\n ({ className, title, description, ...props }, ref) => {\n const { classNames } = useStyles('Table');\n\n return (\n <div\n ref={ref}\n className={clsx(classNames.cellText, className)}\n {...props}\n >\n {title && <Text variant=\"body-medium\">{title}</Text>}\n {description && (\n <Text variant=\"body-medium\" color=\"secondary\">\n {description}\n </Text>\n )}\n </div>\n );\n },\n);\nTableCellText.displayName = 'TableCellText';\n\nexport { TableCellText };\n"],"names":[],"mappings":";;;;;;AAuBA,MAAM,aAAgB,GAAA,UAAA;AAAA,EACpB,CAAC,EAAE,SAAW,EAAA,KAAA,EAAO,aAAa,GAAG,KAAA,IAAS,GAAQ,KAAA;AACpD,IAAA,MAAM,EAAE,UAAA,EAAe,GAAA,SAAA,CAAU,OAAO,CAAA;AAExC,IACE,uBAAA,IAAA;AAAA,MAAC,KAAA;AAAA,MAAA;AAAA,QACC,GAAA;AAAA,QACA,SAAW,EAAA,IAAA,CAAK,UAAW,CAAA,QAAA,EAAU,SAAS,CAAA;AAAA,QAC7C,GAAG,KAAA;AAAA,QAEH,QAAA,EAAA;AAAA,UAAA,KAAA,oBAAU,GAAA,CAAA,IAAA,EAAA,EAAK,OAAQ,EAAA,aAAA,EAAe,QAAM,EAAA,KAAA,EAAA,CAAA;AAAA,UAC5C,+BACE,GAAA,CAAA,IAAA,EAAA,EAAK,SAAQ,aAAc,EAAA,KAAA,EAAM,aAC/B,QACH,EAAA,WAAA,EAAA;AAAA;AAAA;AAAA,KAEJ;AAAA;AAGN;AACA,aAAA,CAAc,WAAc,GAAA,eAAA;;;;"}
@@ -1,29 +0,0 @@
1
- function styleInject(css, ref) {
2
- if ( ref === void 0 ) ref = {};
3
- var insertAt = ref.insertAt;
4
-
5
- if (typeof document === 'undefined') { return; }
6
-
7
- var head = document.head || document.getElementsByTagName('head')[0];
8
- var style = document.createElement('style');
9
- style.type = 'text/css';
10
-
11
- if (insertAt === 'top') {
12
- if (head.firstChild) {
13
- head.insertBefore(style, head.firstChild);
14
- } else {
15
- head.appendChild(style);
16
- }
17
- } else {
18
- head.appendChild(style);
19
- }
20
-
21
- if (style.styleSheet) {
22
- style.styleSheet.cssText = css;
23
- } else {
24
- style.appendChild(document.createTextNode(css));
25
- }
26
- }
27
-
28
- export { styleInject as default };
29
- //# sourceMappingURL=style-inject.es.esm.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"style-inject.es.esm.js","sources":["../../../../../../node_modules/style-inject/dist/style-inject.es.js"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n"],"names":[],"mappings":"AAAA,SAAS,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE;AAC/B,EAAE,KAAK,GAAG,KAAK,KAAK,CAAC,GAAG,GAAG,GAAG,EAAE;AAChC,EAAE,IAAI,QAAQ,GAAG,GAAG,CAAC,QAAQ;;AAE7B,EAAE,IAAY,OAAO,QAAQ,KAAK,WAAW,EAAE,EAAE,OAAO;;AAExD,EAAE,IAAI,IAAI,GAAG,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AACtE,EAAE,IAAI,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC;AAC7C,EAAE,KAAK,CAAC,IAAI,GAAG,UAAU;;AAEzB,EAAE,IAAI,QAAQ,KAAK,KAAK,EAAE;AAC1B,IAAI,IAAI,IAAI,CAAC,UAAU,EAAE;AACzB,MAAM,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC;AAC/C,KAAK,MAAM;AACX,MAAM,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC;AAC7B;AACA,GAAG,MAAM;AACT,IAAI,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC;AAC3B;;AAEA,EAAE,IAAI,KAAK,CAAC,UAAU,EAAE;AACxB,IAAI,KAAK,CAAC,UAAU,CAAC,OAAO,GAAG,GAAG;AAClC,GAAG,MAAM;AACT,IAAI,KAAK,CAAC,WAAW,CAAC,QAAQ,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC;AACnD;AACA;;;;","x_google_ignoreList":[0]}