@bitrise/bitkit-v2 0.3.521 → 0.3.522-beta.3342
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/AGENTS.md +1 -0
- package/dist/components/BitkitTable/BitkitExpandableRow.d.ts +2 -0
- package/dist/components/BitkitTable/BitkitExpandableRow.js +4 -2
- package/dist/components/BitkitTable/BitkitExpandableRow.js.map +1 -1
- package/dist/components/BitkitTable/BitkitLinkedRow.d.ts +2 -1
- package/dist/components/BitkitTable/BitkitLinkedRow.js +2 -1
- package/dist/components/BitkitTable/BitkitLinkedRow.js.map +1 -1
- package/dist/components/BitkitTable/BitkitTable.d.ts +3 -1
- package/dist/components/BitkitTable/BitkitTable.js +2 -0
- package/dist/components/BitkitTable/BitkitTable.js.map +1 -1
- package/dist/components/BitkitTable/BitkitTableRow.d.ts +24 -0
- package/dist/components/BitkitTable/BitkitTableRow.js +30 -0
- package/dist/components/BitkitTable/BitkitTableRow.js.map +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/theme/slot-recipes/Table.recipe.d.ts +1 -1
- package/dist/theme/slot-recipes/Table.recipe.js +1 -2
- package/dist/theme/slot-recipes/Table.recipe.js.map +1 -1
- package/dist/theme/slot-recipes/index.d.ts +1 -1
- package/package.json +1 -1
package/AGENTS.md
CHANGED
|
@@ -156,6 +156,7 @@ Bitkit components use consistent prop names across the library:
|
|
|
156
156
|
</BitkitActionMenu>
|
|
157
157
|
```
|
|
158
158
|
`data-*` attributes on `BitkitActionMenu` reach the element carrying `role="menu"` (the portalled list), and nothing else passes through — the same contract the dialogs have.
|
|
159
|
+
- **A `BitkitTable` row is tinted as selected only when you pass `selected`** — on `BitkitTable.Row`, `BitkitTable.LinkedRow` and `BitkitTable.ExpandableRow`, from the selection state you already hold (`selected={selectedIds.includes(row.id)}`). A checkbox, radio or switch in the row never tints it on its own, so a checkbox that edits a value (an "Active" column) needs nothing. Don't override the row's background instead.
|
|
159
160
|
- **Form components are flat** — `BitkitTextInput`, `BitkitSelect`, `BitkitCombobox`, etc. expose `label`, `errorText`, `helperText`, etc. directly as props. No need to wrap in a separate field component.
|
|
160
161
|
- **`BitkitTextInput` slots** — `startElement` / `endElement` take a `ReactNode` and render inside the field (an icon, badge, text, or an interactive control like a reveal/clear button). `startAddon` / `endAddon` render outside the border, attached to the field, and switch on the content type: a **bare string** gets the standard bordered grey box (a unit label like `$` / `USD` — wrapped in a `<Text>` or a fragment it counts as a component and loses the box), while any **component** renders as itself, welded to the field — it keeps its own styling and the corners it touches are squared for you. A button addon needs its own `variant` and a `size` matching the field's (the field's `size` doesn't reach it, so an `md` field needs an `md` button), and nothing else: don't square its corners by hand, and don't look for a way to strip the grey box — the content type is the switch. These match the Figma slot names. The validation status icon (error/warning) is added automatically and sits left of `endElement`. The field's `state` doesn't reach a component addon, so disable it yourself when it should follow:
|
|
161
162
|
```tsx
|
|
@@ -4,6 +4,8 @@ export interface BitkitExpandableRowProps {
|
|
|
4
4
|
colSpan: number;
|
|
5
5
|
defaultOpen?: boolean;
|
|
6
6
|
expandedContent: ReactNode;
|
|
7
|
+
/** Tints the row as selected. See `BitkitTable.Row`. */
|
|
8
|
+
selected?: boolean;
|
|
7
9
|
}
|
|
8
10
|
declare const BitkitExpandableRow: import('react').ForwardRefExoticComponent<BitkitExpandableRowProps & import('react').RefAttributes<HTMLTableRowElement>>;
|
|
9
11
|
export default BitkitExpandableRow;
|
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
import AssetSelectChevron from "../../utilities/AssetSelectChevron.js";
|
|
2
|
+
import BitkitTableRow from "./BitkitTableRow.js";
|
|
2
3
|
import { forwardRef } from "react";
|
|
3
4
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
4
5
|
import { Box } from "@chakra-ui/react/box";
|
|
5
6
|
import { Collapsible } from "@chakra-ui/react/collapsible";
|
|
6
7
|
import { Table, useTableStyles } from "@chakra-ui/react/table";
|
|
7
8
|
//#region lib/components/BitkitTable/BitkitExpandableRow.tsx
|
|
8
|
-
var BitkitExpandableRow = forwardRef(({ children, colSpan, defaultOpen = false, expandedContent }, ref) => {
|
|
9
|
+
var BitkitExpandableRow = forwardRef(({ children, colSpan, defaultOpen = false, expandedContent, selected }, ref) => {
|
|
9
10
|
const styles = useTableStyles();
|
|
10
11
|
return /* @__PURE__ */ jsx(Collapsible.Root, {
|
|
11
12
|
asChild: true,
|
|
12
13
|
defaultOpen,
|
|
13
|
-
children: /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs(
|
|
14
|
+
children: /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs(BitkitTableRow, {
|
|
14
15
|
ref,
|
|
15
16
|
css: styles.expandableRow,
|
|
17
|
+
selected,
|
|
16
18
|
children: [/* @__PURE__ */ jsx(Table.Cell, {
|
|
17
19
|
css: styles.expandCell,
|
|
18
20
|
children: /* @__PURE__ */ jsx(Collapsible.Trigger, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BitkitExpandableRow.js","names":["_Fragment"],"sources":["../../../lib/components/BitkitTable/BitkitExpandableRow.tsx"],"sourcesContent":["import { Box } from '@chakra-ui/react/box';\nimport { Collapsible } from '@chakra-ui/react/collapsible';\nimport { Table, useTableStyles } from '@chakra-ui/react/table';\nimport { forwardRef, type ReactNode } from 'react';\n\nimport AssetSelectChevron from '../../utilities/AssetSelectChevron';\n\nexport interface BitkitExpandableRowProps {\n children: ReactNode;\n colSpan: number;\n defaultOpen?: boolean;\n expandedContent: ReactNode;\n}\n\nconst BitkitExpandableRow = forwardRef<HTMLTableRowElement, BitkitExpandableRowProps>(\n ({ children, colSpan, defaultOpen = false, expandedContent }, ref) => {\n const styles = useTableStyles();\n\n return (\n <Collapsible.Root asChild defaultOpen={defaultOpen}>\n <>\n <
|
|
1
|
+
{"version":3,"file":"BitkitExpandableRow.js","names":["_Fragment"],"sources":["../../../lib/components/BitkitTable/BitkitExpandableRow.tsx"],"sourcesContent":["import { Box } from '@chakra-ui/react/box';\nimport { Collapsible } from '@chakra-ui/react/collapsible';\nimport { Table, useTableStyles } from '@chakra-ui/react/table';\nimport { forwardRef, type ReactNode } from 'react';\n\nimport AssetSelectChevron from '../../utilities/AssetSelectChevron';\nimport BitkitTableRow from './BitkitTableRow';\n\nexport interface BitkitExpandableRowProps {\n children: ReactNode;\n colSpan: number;\n defaultOpen?: boolean;\n expandedContent: ReactNode;\n /** Tints the row as selected. See `BitkitTable.Row`. */\n selected?: boolean;\n}\n\nconst BitkitExpandableRow = forwardRef<HTMLTableRowElement, BitkitExpandableRowProps>(\n ({ children, colSpan, defaultOpen = false, expandedContent, selected }, ref) => {\n const styles = useTableStyles();\n\n return (\n <Collapsible.Root asChild defaultOpen={defaultOpen}>\n <>\n <BitkitTableRow ref={ref} css={styles.expandableRow} selected={selected}>\n <Table.Cell css={styles.expandCell}>\n <Collapsible.Trigger aria-label=\"Toggle row details\" css={styles.expandTrigger}>\n <Collapsible.Indicator asChild>\n <AssetSelectChevron color=\"button/secondary/text\" />\n </Collapsible.Indicator>\n </Collapsible.Trigger>\n </Table.Cell>\n {children}\n </BitkitTableRow>\n <Table.Row css={styles.expandedRow}>\n <Table.Cell colSpan={colSpan} css={styles.expandedCell}>\n <Collapsible.Content>\n <Box css={styles.expandedContent}>{expandedContent}</Box>\n </Collapsible.Content>\n </Table.Cell>\n </Table.Row>\n </>\n </Collapsible.Root>\n );\n },\n);\n\nBitkitExpandableRow.displayName = 'BitkitTable.ExpandableRow';\n\nexport default BitkitExpandableRow;\n"],"mappings":";;;;;;;;AAiBA,IAAM,sBAAsB,YACzB,EAAE,UAAU,SAAS,cAAc,OAAO,iBAAiB,YAAY,QAAQ;CAC9E,MAAM,SAAS,eAAe;CAE9B,OACE,oBAAC,YAAY,MAAb;EAAkB,SAAA;EAAqB;EACrC,UAAA,qBAAAA,YAAA,EAAA,UAAA,CACE,qBAAC,gBAAD;GAAqB;GAAK,KAAK,OAAO;GAAyB;GAA/D,UAAA,CACE,oBAAC,MAAM,MAAP;IAAY,KAAK,OAAO;IACtB,UAAA,oBAAC,YAAY,SAAb;KAAqB,cAAW;KAAqB,KAAK,OAAO;KAC/D,UAAA,oBAAC,YAAY,WAAb;MAAuB,SAAA;MACrB,UAAA,oBAAC,oBAAD,EAAoB,OAAM,wBAAyB,CAAA;KAC9B,CAAA;IACJ,CAAA;GACX,CAAA,GACX,QACa;EAChB,CAAA,GAAA,oBAAC,MAAM,KAAP;GAAW,KAAK,OAAO;GACrB,UAAA,oBAAC,MAAM,MAAP;IAAqB;IAAS,KAAK,OAAO;IACxC,UAAA,oBAAC,YAAY,SAAb,EAAA,UACE,oBAAC,KAAD;KAAK,KAAK,OAAO;KAAkB,UAAA;IAAqB,CAAA,EACrC,CAAA;GACX,CAAA;EACH,CAAA,CACX,EAAA,CAAA;CACc,CAAA;AAEtB,CACF;AAEA,oBAAoB,cAAc"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { Table } from '@chakra-ui/react/table';
|
|
2
2
|
import { ReactElement } from 'react';
|
|
3
3
|
import { BitkitLinkProps } from '../BitkitLink/BitkitLink';
|
|
4
|
-
|
|
4
|
+
import { BitkitTableRowProps } from './BitkitTableRow';
|
|
5
|
+
export type BitkitLinkedRowProps = Omit<BitkitTableRowProps, 'onClick'>;
|
|
5
6
|
export interface BitkitLinkedRowLinkCellProps extends Omit<Table.CellProps, 'children'> {
|
|
6
7
|
/**
|
|
7
8
|
* The row's link: a single `BitkitLink` with its own `href`, `isExternal`, `colorVariant` and any
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { withSubComponents } from "../../utilities/withSubComponents.js";
|
|
2
|
+
import BitkitTableRow from "./BitkitTableRow.js";
|
|
2
3
|
import { forwardRef } from "react";
|
|
3
4
|
import { jsx } from "react/jsx-runtime";
|
|
4
5
|
import { Table, useTableStyles } from "@chakra-ui/react/table";
|
|
@@ -30,7 +31,7 @@ import { Table, useTableStyles } from "@chakra-ui/react/table";
|
|
|
30
31
|
var BitkitLinkedRow = forwardRef((props, ref) => {
|
|
31
32
|
const { children, css, ...rest } = props;
|
|
32
33
|
const styles = useTableStyles();
|
|
33
|
-
return /* @__PURE__ */ jsx(
|
|
34
|
+
return /* @__PURE__ */ jsx(BitkitTableRow, {
|
|
34
35
|
ref,
|
|
35
36
|
css: [styles.linkedRow, css],
|
|
36
37
|
...rest,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BitkitLinkedRow.js","names":[],"sources":["../../../lib/components/BitkitTable/BitkitLinkedRow.tsx"],"sourcesContent":["import { Table, useTableStyles } from '@chakra-ui/react/table';\nimport { forwardRef, type ReactElement } from 'react';\n\nimport { withSubComponents } from '../../utilities/withSubComponents';\nimport { type BitkitLinkProps } from '../BitkitLink/BitkitLink';\n\nexport type BitkitLinkedRowProps = Omit<
|
|
1
|
+
{"version":3,"file":"BitkitLinkedRow.js","names":[],"sources":["../../../lib/components/BitkitTable/BitkitLinkedRow.tsx"],"sourcesContent":["import { Table, useTableStyles } from '@chakra-ui/react/table';\nimport { forwardRef, type ReactElement } from 'react';\n\nimport { withSubComponents } from '../../utilities/withSubComponents';\nimport { type BitkitLinkProps } from '../BitkitLink/BitkitLink';\nimport BitkitTableRow, { type BitkitTableRowProps } from './BitkitTableRow';\n\nexport type BitkitLinkedRowProps = Omit<BitkitTableRowProps, 'onClick'>;\n\n/**\n * A table row that navigates as a whole. Exactly one of its cells must be a\n * `BitkitTable.LinkedRow.LinkCell` holding the row's link — that link's text becomes the row's\n * accessible name, and its stretched pseudo-element makes the entire row the click and focus target.\n *\n * Interactive elements in the other cells (buttons, checkboxes, other links) stay clickable: they\n * are lifted above the stretched link, so a `BitkitTable.RowActionsCell` works inside a linked row.\n *\n * Neither requirement is enforced: a row without a `LinkCell`, or one whose link has no `href`,\n * still renders with the linked-row styling — hover affordance included — and navigates nowhere.\n *\n * @example\n * ```tsx\n * <BitkitTable.LinkedRow>\n * <BitkitTable.LinkedRow.LinkCell>\n * <BitkitLink colorVariant=\"purple\" href={`/workflows/${row.id}`}>\n * {row.name}\n * </BitkitLink>\n * </BitkitTable.LinkedRow.LinkCell>\n * <BitkitTable.Cell>{row.status}</BitkitTable.Cell>\n * <BitkitTable.RowActionsCell actions={actions} />\n * </BitkitTable.LinkedRow>\n * ```\n */\nconst BitkitLinkedRow = forwardRef<HTMLTableRowElement, BitkitLinkedRowProps>((props, ref) => {\n const { children, css, ...rest } = props;\n const styles = useTableStyles();\n\n return (\n <BitkitTableRow ref={ref} css={[styles.linkedRow, css]} {...rest}>\n {children}\n </BitkitTableRow>\n );\n});\n\nBitkitLinkedRow.displayName = 'BitkitTable.LinkedRow';\n\nexport interface BitkitLinkedRowLinkCellProps extends Omit<Table.CellProps, 'children'> {\n /**\n * The row's link: a single `BitkitLink` with its own `href`, `isExternal`, `colorVariant` and any\n * other link prop. The type only rules out bare text and multiple children — a non-link element,\n * or a `BitkitLink` without an `href`, type-checks as well and leaves the row looking linked\n * while navigating nowhere. Anything else the cell should show (an icon, a `VisuallyHidden` name)\n * goes inside the link.\n */\n children: ReactElement<BitkitLinkProps>;\n}\n\n/**\n * The cell that carries the row's link, so give it the cell that names the row. The cell only\n * stretches its link across the row, leaving the styling to the link itself.\n */\nconst LinkCell = forwardRef<HTMLTableCellElement, BitkitLinkedRowLinkCellProps>((props, ref) => {\n const { children, css, ...rest } = props;\n const styles = useTableStyles();\n\n return (\n <Table.Cell ref={ref} css={[styles.linkCell, css]} data-link-cell {...rest}>\n {children}\n </Table.Cell>\n );\n});\n\nLinkCell.displayName = 'BitkitTable.LinkedRow.LinkCell';\n\nexport default withSubComponents(BitkitLinkedRow, { LinkCell });\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCA,IAAM,kBAAkB,YAAuD,OAAO,QAAQ;CAC5F,MAAM,EAAE,UAAU,KAAK,GAAG,SAAS;CACnC,MAAM,SAAS,eAAe;CAE9B,OACE,oBAAC,gBAAD;EAAqB;EAAK,KAAK,CAAC,OAAO,WAAW,GAAG;EAAG,GAAI;EACzD;CACa,CAAA;AAEpB,CAAC;AAED,gBAAgB,cAAc;;;;;AAiB9B,IAAM,WAAW,YAAgE,OAAO,QAAQ;CAC9F,MAAM,EAAE,UAAU,KAAK,GAAG,SAAS;CACnC,MAAM,SAAS,eAAe;CAE9B,OACE,oBAAC,MAAM,MAAP;EAAiB;EAAK,KAAK,CAAC,OAAO,UAAU,GAAG;EAAG,kBAAA;EAAe,GAAI;EACnE;CACS,CAAA;AAEhB,CAAC;AAED,SAAS,cAAc;AAEvB,IAAA,0BAAe,kBAAkB,iBAAiB,EAAE,SAAS,CAAC"}
|
|
@@ -6,6 +6,7 @@ import { default as FilterRow } from './BitkitFilterRow';
|
|
|
6
6
|
import { default as LinkedRow } from './BitkitLinkedRow';
|
|
7
7
|
import { default as RowActionsCell } from './BitkitRowActionsCell';
|
|
8
8
|
import { default as SortableColumnHeader } from './BitkitSortableColumnHeader';
|
|
9
|
+
import { default as Row } from './BitkitTableRow';
|
|
9
10
|
/**
|
|
10
11
|
* Chakra's `Table` namespace with the Bitkit table parts attached, so a table needs a single
|
|
11
12
|
* import: `BitkitTable.Root`, `BitkitTable.Row`, `BitkitTable.Cell`, … alongside
|
|
@@ -30,12 +31,13 @@ import { default as SortableColumnHeader } from './BitkitSortableColumnHeader';
|
|
|
30
31
|
* </BitkitTable.Root>
|
|
31
32
|
* ```
|
|
32
33
|
*/
|
|
33
|
-
declare const BitkitTable: typeof Table & {
|
|
34
|
+
declare const BitkitTable: Omit<typeof Table, 'Row'> & {
|
|
34
35
|
BulkActionsRow: typeof BulkActionsRow;
|
|
35
36
|
DefinitionColumnHeader: typeof DefinitionColumnHeader;
|
|
36
37
|
ExpandableRow: typeof ExpandableRow;
|
|
37
38
|
FilterRow: typeof FilterRow;
|
|
38
39
|
LinkedRow: typeof LinkedRow;
|
|
40
|
+
Row: typeof Row;
|
|
39
41
|
RowActionsCell: typeof RowActionsCell;
|
|
40
42
|
SortableColumnHeader: typeof SortableColumnHeader;
|
|
41
43
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import BitkitBulkActionsRow from "./BitkitBulkActionsRow.js";
|
|
2
2
|
import BitkitDefinitionColumnHeader from "./BitkitDefinitionColumnHeader.js";
|
|
3
|
+
import BitkitTableRow from "./BitkitTableRow.js";
|
|
3
4
|
import BitkitExpandableRow from "./BitkitExpandableRow.js";
|
|
4
5
|
import BitkitFilterRow from "./BitkitFilterRow.js";
|
|
5
6
|
import BitkitLinkedRow_default from "./BitkitLinkedRow.js";
|
|
@@ -38,6 +39,7 @@ var BitkitTable = {
|
|
|
38
39
|
ExpandableRow: BitkitExpandableRow,
|
|
39
40
|
FilterRow: BitkitFilterRow,
|
|
40
41
|
LinkedRow: BitkitLinkedRow_default,
|
|
42
|
+
Row: BitkitTableRow,
|
|
41
43
|
RowActionsCell: BitkitRowActionsCell,
|
|
42
44
|
SortableColumnHeader: BitkitSortableColumnHeader
|
|
43
45
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BitkitTable.js","names":[],"sources":["../../../lib/components/BitkitTable/BitkitTable.tsx"],"sourcesContent":["import { Table } from '@chakra-ui/react/table';\n\nimport BulkActionsRow from './BitkitBulkActionsRow';\nimport DefinitionColumnHeader from './BitkitDefinitionColumnHeader';\nimport ExpandableRow from './BitkitExpandableRow';\nimport FilterRow from './BitkitFilterRow';\nimport LinkedRow from './BitkitLinkedRow';\nimport RowActionsCell from './BitkitRowActionsCell';\nimport SortableColumnHeader from './BitkitSortableColumnHeader';\n\n/**\n * Chakra's `Table` namespace with the Bitkit table parts attached, so a table needs a single\n * import: `BitkitTable.Root`, `BitkitTable.Row`, `BitkitTable.Cell`, … alongside\n * `BitkitTable.RowActionsCell`, `BitkitTable.SortableColumnHeader`, and the rest.\n *\n * @example\n * ```tsx\n * <BitkitTable.Root size=\"lg\">\n * <BitkitTable.Header>\n * <BitkitTable.Row>\n * <BitkitTable.SortableColumnHeader direction={direction} onSort={onSort}>Name</BitkitTable.SortableColumnHeader>\n * </BitkitTable.Row>\n * </BitkitTable.Header>\n * <BitkitTable.Body>\n * <BitkitTable.LinkedRow>\n * <BitkitTable.LinkedRow.LinkCell>\n * <BitkitLink colorVariant=\"purple\" href={`/projects/${row.id}`}>{row.name}</BitkitLink>\n * </BitkitTable.LinkedRow.LinkCell>\n * <BitkitTable.RowActionsCell actions={actions} />\n * </BitkitTable.LinkedRow>\n * </BitkitTable.Body>\n * </BitkitTable.Root>\n * ```\n */\nconst BitkitTable: typeof Table & {\n BulkActionsRow: typeof BulkActionsRow;\n DefinitionColumnHeader: typeof DefinitionColumnHeader;\n ExpandableRow: typeof ExpandableRow;\n FilterRow: typeof FilterRow;\n LinkedRow: typeof LinkedRow;\n RowActionsCell: typeof RowActionsCell;\n SortableColumnHeader: typeof SortableColumnHeader;\n} = {\n ...Table,\n BulkActionsRow,\n DefinitionColumnHeader,\n ExpandableRow,\n FilterRow,\n LinkedRow,\n RowActionsCell,\n SortableColumnHeader,\n};\n\nexport default BitkitTable;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"BitkitTable.js","names":[],"sources":["../../../lib/components/BitkitTable/BitkitTable.tsx"],"sourcesContent":["import { Table } from '@chakra-ui/react/table';\n\nimport BulkActionsRow from './BitkitBulkActionsRow';\nimport DefinitionColumnHeader from './BitkitDefinitionColumnHeader';\nimport ExpandableRow from './BitkitExpandableRow';\nimport FilterRow from './BitkitFilterRow';\nimport LinkedRow from './BitkitLinkedRow';\nimport RowActionsCell from './BitkitRowActionsCell';\nimport SortableColumnHeader from './BitkitSortableColumnHeader';\nimport Row from './BitkitTableRow';\n\n/**\n * Chakra's `Table` namespace with the Bitkit table parts attached, so a table needs a single\n * import: `BitkitTable.Root`, `BitkitTable.Row`, `BitkitTable.Cell`, … alongside\n * `BitkitTable.RowActionsCell`, `BitkitTable.SortableColumnHeader`, and the rest.\n *\n * @example\n * ```tsx\n * <BitkitTable.Root size=\"lg\">\n * <BitkitTable.Header>\n * <BitkitTable.Row>\n * <BitkitTable.SortableColumnHeader direction={direction} onSort={onSort}>Name</BitkitTable.SortableColumnHeader>\n * </BitkitTable.Row>\n * </BitkitTable.Header>\n * <BitkitTable.Body>\n * <BitkitTable.LinkedRow>\n * <BitkitTable.LinkedRow.LinkCell>\n * <BitkitLink colorVariant=\"purple\" href={`/projects/${row.id}`}>{row.name}</BitkitLink>\n * </BitkitTable.LinkedRow.LinkCell>\n * <BitkitTable.RowActionsCell actions={actions} />\n * </BitkitTable.LinkedRow>\n * </BitkitTable.Body>\n * </BitkitTable.Root>\n * ```\n */\nconst BitkitTable: Omit<typeof Table, 'Row'> & {\n BulkActionsRow: typeof BulkActionsRow;\n DefinitionColumnHeader: typeof DefinitionColumnHeader;\n ExpandableRow: typeof ExpandableRow;\n FilterRow: typeof FilterRow;\n LinkedRow: typeof LinkedRow;\n Row: typeof Row;\n RowActionsCell: typeof RowActionsCell;\n SortableColumnHeader: typeof SortableColumnHeader;\n} = {\n ...Table,\n BulkActionsRow,\n DefinitionColumnHeader,\n ExpandableRow,\n FilterRow,\n LinkedRow,\n Row,\n RowActionsCell,\n SortableColumnHeader,\n};\n\nexport default BitkitTable;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmCA,IAAM,cASF;CACF,GAAG;CACH,gBAAA;CACA,wBAAA;CACA,eAAA;CACA,WAAA;CACA,WAAA;CACA,KAAA;CACA,gBAAA;CACA,sBAAA;AACF"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Table } from '@chakra-ui/react/table';
|
|
2
|
+
export interface BitkitTableRowProps extends Table.RowProps {
|
|
3
|
+
/**
|
|
4
|
+
* Tints the row as selected. Pass it from the selection state you already hold
|
|
5
|
+
* (`selected={selectedIds.includes(row.id)}`): a checkbox, radio or switch in the row never
|
|
6
|
+
* tints it on its own.
|
|
7
|
+
*/
|
|
8
|
+
selected?: boolean;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* A table row. Chakra's `Table.Row` plus `selected`, which is the only thing that tints a row.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```tsx
|
|
15
|
+
* <BitkitTable.Row selected={selectedIds.includes(row.id)}>
|
|
16
|
+
* <BitkitTable.Cell>
|
|
17
|
+
* <BitkitCheckbox aria-label={`Select ${row.name}`} value={row.id} />
|
|
18
|
+
* </BitkitTable.Cell>
|
|
19
|
+
* <BitkitTable.Cell>{row.name}</BitkitTable.Cell>
|
|
20
|
+
* </BitkitTable.Row>
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
declare const BitkitTableRow: import('react').ForwardRefExoticComponent<BitkitTableRowProps & import('react').RefAttributes<HTMLTableRowElement>>;
|
|
24
|
+
export default BitkitTableRow;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { forwardRef } from "react";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Table } from "@chakra-ui/react/table";
|
|
4
|
+
//#region lib/components/BitkitTable/BitkitTableRow.tsx
|
|
5
|
+
/**
|
|
6
|
+
* A table row. Chakra's `Table.Row` plus `selected`, which is the only thing that tints a row.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```tsx
|
|
10
|
+
* <BitkitTable.Row selected={selectedIds.includes(row.id)}>
|
|
11
|
+
* <BitkitTable.Cell>
|
|
12
|
+
* <BitkitCheckbox aria-label={`Select ${row.name}`} value={row.id} />
|
|
13
|
+
* </BitkitTable.Cell>
|
|
14
|
+
* <BitkitTable.Cell>{row.name}</BitkitTable.Cell>
|
|
15
|
+
* </BitkitTable.Row>
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
var BitkitTableRow = forwardRef((props, ref) => {
|
|
19
|
+
const { selected, ...rest } = props;
|
|
20
|
+
return /* @__PURE__ */ jsx(Table.Row, {
|
|
21
|
+
ref,
|
|
22
|
+
"data-selected": selected ? "" : void 0,
|
|
23
|
+
...rest
|
|
24
|
+
});
|
|
25
|
+
});
|
|
26
|
+
BitkitTableRow.displayName = "BitkitTable.Row";
|
|
27
|
+
//#endregion
|
|
28
|
+
export { BitkitTableRow as default };
|
|
29
|
+
|
|
30
|
+
//# sourceMappingURL=BitkitTableRow.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BitkitTableRow.js","names":[],"sources":["../../../lib/components/BitkitTable/BitkitTableRow.tsx"],"sourcesContent":["import { Table } from '@chakra-ui/react/table';\nimport { forwardRef } from 'react';\n\nexport interface BitkitTableRowProps extends Table.RowProps {\n /**\n * Tints the row as selected. Pass it from the selection state you already hold\n * (`selected={selectedIds.includes(row.id)}`): a checkbox, radio or switch in the row never\n * tints it on its own.\n */\n selected?: boolean;\n}\n\n/**\n * A table row. Chakra's `Table.Row` plus `selected`, which is the only thing that tints a row.\n *\n * @example\n * ```tsx\n * <BitkitTable.Row selected={selectedIds.includes(row.id)}>\n * <BitkitTable.Cell>\n * <BitkitCheckbox aria-label={`Select ${row.name}`} value={row.id} />\n * </BitkitTable.Cell>\n * <BitkitTable.Cell>{row.name}</BitkitTable.Cell>\n * </BitkitTable.Row>\n * ```\n */\nconst BitkitTableRow = forwardRef<HTMLTableRowElement, BitkitTableRowProps>((props, ref) => {\n const { selected, ...rest } = props;\n\n return <Table.Row ref={ref} data-selected={selected ? '' : undefined} {...rest} />;\n});\n\nBitkitTableRow.displayName = 'BitkitTable.Row';\n\nexport default BitkitTableRow;\n"],"mappings":";;;;;;;;;;;;;;;;;AAyBA,IAAM,iBAAiB,YAAsD,OAAO,QAAQ;CAC1F,MAAM,EAAE,UAAU,GAAG,SAAS;CAE9B,OAAO,oBAAC,MAAM,KAAP;EAAgB;EAAK,iBAAe,WAAW,KAAK,KAAA;EAAW,GAAI;CAAO,CAAA;AACnF,CAAC;AAED,eAAe,cAAc"}
|
|
@@ -93,6 +93,7 @@ export { type BitkitLinkedRowLinkCellProps, type BitkitLinkedRowProps } from './
|
|
|
93
93
|
export { type BitkitRowAction, type BitkitRowActionsCellProps } from './BitkitTable/BitkitRowActionsCell';
|
|
94
94
|
export { type BitkitSortableColumnHeaderProps } from './BitkitTable/BitkitSortableColumnHeader';
|
|
95
95
|
export { default as BitkitTable } from './BitkitTable/BitkitTable';
|
|
96
|
+
export { type BitkitTableRowProps } from './BitkitTable/BitkitTableRow';
|
|
96
97
|
export { default as BitkitTableCard, type BitkitTableCardProps } from './BitkitTableCard/BitkitTableCard';
|
|
97
98
|
export { default as BitkitTabs, type BitkitTabsAddButtonProps, type BitkitTabsRootProps, type BitkitTabsStatusColor, type BitkitTabsTriggerProps, } from './BitkitTabs/BitkitTabs';
|
|
98
99
|
export { default as BitkitTag, type BitkitTagProps } from './BitkitTag/BitkitTag';
|
|
@@ -127,7 +127,7 @@ declare const tableSlotRecipe: import('@chakra-ui/react').SlotRecipeDefinition<"
|
|
|
127
127
|
};
|
|
128
128
|
body: {
|
|
129
129
|
'& :where(tr)': {
|
|
130
|
-
|
|
130
|
+
'&[data-selected]': {
|
|
131
131
|
backgroundColor: "background/selected";
|
|
132
132
|
_hover: {
|
|
133
133
|
backgroundColor: "background/selected";
|
|
@@ -3,7 +3,6 @@ import { defineSlotRecipe } from "@chakra-ui/react/styled-system";
|
|
|
3
3
|
import { tableAnatomy } from "@chakra-ui/react/anatomy";
|
|
4
4
|
//#region lib/theme/slot-recipes/Table.recipe.ts
|
|
5
5
|
var controlOnlyCell = { "& > :where(label):only-child": { display: "flex" } };
|
|
6
|
-
var selectedRow = "&:has([data-scope=\"checkbox\"] input:checked), &:has([data-scope=\"radio-group\"][data-part=\"item\"] input:checked), &[data-selected]";
|
|
7
6
|
var tableSlotRecipe = defineSlotRecipe({
|
|
8
7
|
className: "table",
|
|
9
8
|
slots: [
|
|
@@ -260,7 +259,7 @@ var tableSlotRecipe = defineSlotRecipe({
|
|
|
260
259
|
}
|
|
261
260
|
},
|
|
262
261
|
body: {
|
|
263
|
-
"& :where(tr)": { [
|
|
262
|
+
"& :where(tr)": { "&[data-selected]": {
|
|
264
263
|
backgroundColor: "background/selected",
|
|
265
264
|
_hover: { backgroundColor: "background/selected" }
|
|
266
265
|
} },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Table.recipe.js","names":[],"sources":["../../../lib/theme/slot-recipes/Table.recipe.ts"],"sourcesContent":["import { tableAnatomy } from '@chakra-ui/react/anatomy';\nimport { defineSlotRecipe } from '@chakra-ui/react/styled-system';\n\nimport { rem } from '../themeUtils';\n\n// A control like a checkbox renders as an inline-flex <label>, which sits on the line box's\n// baseline — so the text strut's descender space leaves it a pixel or two above the row's centre.\n// Making it block-level takes the line box out of the equation and lets vertical-align: middle\n// centre it exactly.\nconst controlOnlyCell = {\n '& > :where(label):only-child': {\n display: 'flex',\n },\n};\n\n// A tinted row means \"selected\", and only a Checkbox or a Radio marks it — plus `data-selected` on\n// the row itself, the explicit opt-in for a table that tints on its own terms (a switched-on row,\n// say). Everything else is left alone, which is the narrowing over a bare `input:checked`: a switch\n// renders a hidden input[type=\"checkbox\"] too, so a toggle in a data cell read as a selected row.\n//\n// `[data-part=\"item\"]` is the load-bearing half of the radio branch. Ark's SegmentGroup is Zag's\n// radio-group anatomy renamed, so a segment sits under its own scope — but scope alone would still\n// match `RadioGroup.Root`, which wraps the whole table in the `Selectable` pattern, and with it every\n// checked radio inside. Requiring `item` on the same element pins the match to a single radio.\n//\n// Known gap: BitkitSelectableTag is a `Checkbox.Root` underneath, so one in a data cell tints its\n// row. It has no consumers today; when it gets one, put `data-selectable-tag` on its `Checkbox.Root`\n// and `:not([data-selectable-tag])` on the checkbox branch here.\nconst selectedRow =\n '&:has([data-scope=\"checkbox\"] input:checked), &:has([data-scope=\"radio-group\"][data-part=\"item\"] input:checked), &[data-selected]';\n\nconst tableSlotRecipe = defineSlotRecipe({\n className: 'table',\n slots: [\n ...tableAnatomy.keys(),\n 'actionsCell',\n 'actionsGroup',\n 'bulkActionsGroup',\n 'bulkActionsButtons',\n 'definitionTrigger',\n 'expandCell',\n 'expandTrigger',\n 'expandableRow',\n 'expandedCell',\n 'expandedContent',\n 'expandedRow',\n 'filterControls',\n 'linkCell',\n 'linkedRow',\n 'sortColumnHeader',\n 'sortTrigger',\n 'utilityCell',\n ],\n base: {\n root: {\n fontVariantNumeric: 'lining-nums tabular-nums',\n textAlign: 'start',\n width: 'full',\n },\n caption: {\n captionSide: 'top !important',\n textAlign: 'start',\n '& > * + *': {\n marginBlockStart: '4',\n },\n },\n cell: {\n textStyle: 'body/md/regular',\n },\n actionsCell: {\n textAlign: 'end',\n whiteSpace: 'nowrap',\n // Shrink-to-fit: a table cell can't go below its content width, so any value under the\n // content's own width collapses the column around the buttons and leaves the rest to\n // the data columns.\n width: '1%',\n },\n actionsGroup: {\n alignItems: 'center',\n display: 'inline-flex',\n gap: '8',\n position: 'relative',\n },\n bulkActionsGroup: {\n alignItems: 'center',\n display: 'flex',\n gap: '12',\n },\n bulkActionsButtons: {\n alignItems: 'center',\n display: 'flex',\n gap: '12',\n marginInlineStart: 'auto',\n },\n // The column header's own `heading/h5` has to survive, so the trigger inherits its type and\n // colour rather than setting them — which is what rules out BitkitDefinitionTooltip in a header,\n // since its recipe always pins a textStyle. The offset is that recipe's own value for 14px type.\n definitionTrigger: {\n color: 'inherit',\n cursor: 'pointer',\n font: 'inherit',\n letterSpacing: 'inherit',\n maxWidth: 'full',\n textDecoration: 'underline dotted',\n textDecorationColor: 'color/neutral/bold',\n textUnderlineOffset: '0.25em',\n _hover: {\n textDecorationColor: 'color/purple/base',\n },\n },\n expandCell: {\n paddingBlock: 0,\n paddingInline: 0,\n verticalAlign: 'middle',\n width: '48',\n },\n // A fixed 32x32 box (per the design), centred in the cell by the cell's own vertical-align.\n // Deriving the size from padding instead leaves it at the mercy of the Collapsible recipe's\n // asymmetric paddingBlockStart, which is what pushed the chevron 2px above the row's centre.\n expandTrigger: {\n alignItems: 'center',\n background: 'none',\n border: 'none',\n cursor: 'pointer',\n display: 'flex',\n height: '32',\n justifyContent: 'center',\n marginInlineStart: '12',\n padding: 0,\n width: '32',\n },\n expandableRow: {\n '& > td': {\n borderBottomWidth: 0,\n },\n },\n expandedCell: {\n height: 0,\n paddingBlock: 0,\n paddingInline: 0,\n },\n expandedContent: {\n borderBlockStartColor: 'border/minimal',\n borderBlockStartStyle: 'solid',\n borderBlockStartWidth: '1',\n marginInlineEnd: '16',\n marginInlineStart: '48',\n paddingBlockEnd: '24',\n paddingBlockStart: '16',\n paddingInlineEnd: '16',\n paddingInlineStart: '12',\n },\n expandedRow: {\n _hover: {\n background: 'none',\n },\n },\n filterControls: {\n alignItems: 'center',\n display: 'flex',\n flexWrap: 'wrap',\n gap: '16',\n width: 'full',\n },\n linkCell: {\n // The link inside is the row's link: its stretched pseudo covers the whole row, so the row\n // becomes the click and focus target.\n '& a': {\n textDecoration: 'none',\n // The row's own background change is the hover affordance; the link recipe's hover\n // underline would fire on every row hover, since the stretched pseudo covers the row.\n _hover: {\n textDecoration: 'none',\n },\n _after: {\n content: '\"\"',\n inset: 0,\n position: 'absolute',\n },\n _focusVisible: {\n outline: 'none',\n _after: {\n outline: 'var(--focus-ring-width) var(--focus-ring-style) var(--focus-ring-color)',\n outlineOffset: 'calc(var(--focus-ring-width) * -1)',\n },\n },\n },\n },\n linkedRow: {\n position: 'relative',\n _hover: {\n backgroundColor: 'background/secondary',\n },\n '& :where(a:not([data-link-cell] a), button, input, label, select)': {\n position: 'relative',\n zIndex: '1',\n },\n },\n sortColumnHeader: {\n paddingBlock: 0,\n paddingInline: 0,\n },\n sortTrigger: {\n alignItems: 'center',\n appearance: 'none',\n background: 'none',\n border: 'none',\n color: 'inherit',\n cursor: 'pointer',\n display: 'flex',\n font: 'inherit',\n gap: '8',\n height: 'full',\n paddingBlock: '12',\n paddingInline: '16',\n userSelect: 'none',\n width: 'full',\n _focusVisible: {\n outlineOffset: '-3px',\n },\n _hover: {\n backgroundColor: 'background/active',\n },\n },\n utilityCell: {\n height: 'auto',\n paddingBlock: '12',\n paddingInline: '16',\n },\n },\n variants: {\n variant: {\n default: {\n root: {\n borderColor: 'border/regular',\n borderRadius: '4',\n borderStyle: 'solid',\n borderWidth: '1',\n overflow: 'hidden',\n },\n header: {\n '& :where(th)': {\n backgroundColor: 'background/tertiary',\n },\n },\n columnHeader: {\n borderBottomColor: 'border/minimal',\n paddingBlock: '12',\n paddingInline: '16',\n },\n cell: {\n borderBottomColor: 'border/minimal',\n borderTopColor: 'border/minimal',\n paddingInline: '16',\n },\n footer: {\n borderTopColor: 'border/minimal',\n },\n },\n borderless: {\n columnHeader: {\n borderBottomColor: 'border/regular',\n padding: '12',\n },\n cell: {\n borderBottomColor: 'border/regular',\n borderTopColor: 'border/regular',\n paddingInline: '12',\n },\n footer: {\n borderTopColor: 'border/regular',\n },\n },\n card: {\n columnHeader: {\n borderBottomColor: 'border/minimal',\n height: '48',\n padding: '12',\n },\n cell: {\n borderBottomColor: 'border/minimal',\n borderTopColor: 'border/minimal',\n paddingInline: '12',\n },\n row: {\n 'thead &, tbody &': {\n '& > :where(td, th):first-child': {\n paddingInlineStart: '24',\n },\n '& > :where(td, th):last-child': {\n paddingInlineEnd: '24',\n },\n },\n },\n footer: {\n borderTopColor: 'border/minimal',\n },\n },\n },\n size: {\n sm: {\n cell: {\n height: '48',\n },\n },\n md: {\n cell: {\n height: rem(56),\n },\n },\n lg: {\n cell: {\n height: '64',\n },\n },\n },\n // Hovering a row tints it. Usually a reading aid on a long or wide table rather than a hint\n // that the row is clickable, so it says nothing about the row being interactive — turn it off\n // for short, static tables where there is no place to lose.\n rowHover: {\n true: {},\n false: {},\n },\n layout: {\n table: {\n root: {\n borderCollapse: 'separate',\n borderSpacing: '0',\n },\n caption: {\n marginBlockEnd: '24',\n },\n columnHeader: {\n borderBottomStyle: 'solid',\n borderBottomWidth: '1',\n color: 'text/primary',\n fontWeight: 'bold',\n textAlign: 'start',\n textStyle: 'heading/h5',\n verticalAlign: 'middle',\n ...controlOnlyCell,\n },\n cell: {\n borderBottomStyle: 'solid',\n borderBottomWidth: '1',\n verticalAlign: 'middle',\n ...controlOnlyCell,\n // border-collapse: separate ignores borders on tfoot itself (CSS 2.1 §17.6.1),\n // so the body/footer divider has to live on the footer's cells.\n // A footer holds one full-width block (pagination, a \"new item\" action) that brings its\n // own padding and height, so the body cell's 16px inset and fixed row height would\n // double up on it.\n 'tfoot &': {\n borderBottomWidth: 0,\n borderTopStyle: 'solid',\n borderTopWidth: '1',\n height: 'auto',\n paddingBlock: 0,\n paddingInline: 0,\n },\n },\n body: {\n '& :where(tr)': {\n [selectedRow]: {\n backgroundColor: 'background/selected',\n _hover: {\n backgroundColor: 'background/selected',\n },\n },\n },\n '& :where(tr:last-child) td': {\n borderBottomWidth: 0,\n },\n },\n },\n stacked: {\n root: {\n display: 'block',\n },\n caption: {\n display: 'block',\n padding: '16',\n backgroundColor: 'background/secondary',\n borderBottomColor: 'border/minimal',\n borderBottomStyle: 'solid',\n borderBottomWidth: '1',\n },\n header: {\n borderWidth: 0,\n clip: 'rect(0, 0, 0, 0)',\n height: '1',\n margin: '-1px',\n overflow: 'hidden',\n padding: 0,\n position: 'absolute',\n whiteSpace: 'nowrap',\n width: '1',\n },\n body: {\n display: 'block',\n },\n row: {\n borderBottomColor: 'border/minimal',\n borderBottomStyle: 'solid',\n borderBottomWidth: '1',\n display: 'block',\n paddingBlock: '12',\n '&:last-child': {\n borderBottomWidth: 0,\n },\n },\n cell: {\n alignItems: 'center',\n display: 'flex',\n minHeight: '48',\n paddingInline: '16',\n _before: {\n alignSelf: 'center',\n color: 'text/primary',\n content: 'attr(data-label)',\n flexShrink: 0,\n fontWeight: 'semibold',\n marginInlineEnd: '16',\n width: '96',\n },\n 'tfoot &': {\n display: 'block',\n paddingInline: 0,\n _before: {\n content: 'none',\n },\n },\n },\n // display: block takes tfoot out of the table model, so a border on it does render here\n footer: {\n borderTopStyle: 'solid',\n borderTopWidth: '1',\n display: 'block',\n },\n },\n },\n },\n compoundVariants: [\n {\n css: {\n row: {\n borderBottomColor: 'border/regular',\n },\n },\n layout: 'stacked',\n variant: 'borderless',\n },\n // The card gutter and the 12px cell padding are for the wide layout. Stacked rows are blocks\n // whose cells run vertically, so an inline indent on only the first and last one reads as a\n // misalignment — everything goes back to the stacked layout's own 16px.\n {\n css: {\n cell: {\n paddingInline: '16',\n },\n row: {\n 'thead &, tbody &': {\n '& > :where(td, th):first-child': {\n paddingInlineStart: '16',\n },\n '& > :where(td, th):last-child': {\n paddingInlineEnd: '16',\n },\n },\n },\n },\n layout: 'stacked',\n variant: 'card',\n },\n // The `size` variant pins a fixed cell height (48/56/64px), and it is merged after `layout`\n // regardless of declaration order — so only a compound variant can release it. Stacked cells\n // are flex containers whose content (label gutter + a multi-line value) routinely needs more\n // room than the fixed height, and the stacked `cell` keeps `minHeight: 48` as the floor.\n {\n css: {\n cell: {\n height: 'auto',\n },\n },\n layout: 'stacked',\n },\n // Scoped to `layout: table` because that is where the hover lived before: the stacked layout\n // renders rows as blocks and never tinted them.\n {\n css: {\n body: {\n '& :where(tr)': {\n _hover: {\n backgroundColor: 'background/secondary',\n },\n },\n },\n },\n layout: 'table',\n rowHover: true,\n },\n ],\n defaultVariants: {\n layout: 'table',\n rowHover: true,\n size: 'lg',\n variant: 'default',\n },\n});\n\nexport default tableSlotRecipe;\n"],"mappings":";;;;AASA,IAAM,kBAAkB,EACtB,gCAAgC,EAC9B,SAAS,OACX,EACF;AAeA,IAAM,cACJ;AAEF,IAAM,kBAAkB,iBAAiB;CACvC,WAAW;CACX,OAAO;EACL,GAAG,aAAa,KAAK;EACrB;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,MAAM;EACJ,MAAM;GACJ,oBAAoB;GACpB,WAAW;GACX,OAAO;EACT;EACA,SAAS;GACP,aAAa;GACb,WAAW;GACX,aAAa,EACX,kBAAkB,IACpB;EACF;EACA,MAAM,EACJ,WAAW,kBACb;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EACF;CACF;CACA,kBAAkB;EAChB;GACE,KAAK,EACH,KAAK,EACH,mBAAmB,iBACrB,EACF;GACA,QAAQ;GACR,SAAS;EACX;EAIA;GACE,KAAK;IACH,MAAM,EACJ,eAAe,KACjB;IACA,KAAK,EACH,oBAAoB;KAClB,kCAAkC,EAChC,oBAAoB,KACtB;KACA,iCAAiC,EAC/B,kBAAkB,KACpB;IACF,EACF;GACF;GACA,QAAQ;GACR,SAAS;EACX;EAKA;GACE,KAAK,EACH,MAAM,EACJ,QAAQ,OACV,EACF;GACA,QAAQ;EACV;EAGA;GACE,KAAK,EACH,MAAM,EACJ,gBAAgB,EACd,QAAQ,EACN,iBAAiB,uBACnB,EACF,EACF,EACF;GACA,QAAQ;GACR,UAAU;EACZ;CACF;CACA,iBAAiB;EACf,QAAQ;EACR,UAAU;EACV,MAAM;EACN,SAAS;CACX;AACF,CAAC"}
|
|
1
|
+
{"version":3,"file":"Table.recipe.js","names":[],"sources":["../../../lib/theme/slot-recipes/Table.recipe.ts"],"sourcesContent":["import { tableAnatomy } from '@chakra-ui/react/anatomy';\nimport { defineSlotRecipe } from '@chakra-ui/react/styled-system';\n\nimport { rem } from '../themeUtils';\n\n// A control like a checkbox renders as an inline-flex <label>, which sits on the line box's\n// baseline — so the text strut's descender space leaves it a pixel or two above the row's centre.\n// Making it block-level takes the line box out of the equation and lets vertical-align: middle\n// centre it exactly.\nconst controlOnlyCell = {\n '& > :where(label):only-child': {\n display: 'flex',\n },\n};\n\nconst tableSlotRecipe = defineSlotRecipe({\n className: 'table',\n slots: [\n ...tableAnatomy.keys(),\n 'actionsCell',\n 'actionsGroup',\n 'bulkActionsGroup',\n 'bulkActionsButtons',\n 'definitionTrigger',\n 'expandCell',\n 'expandTrigger',\n 'expandableRow',\n 'expandedCell',\n 'expandedContent',\n 'expandedRow',\n 'filterControls',\n 'linkCell',\n 'linkedRow',\n 'sortColumnHeader',\n 'sortTrigger',\n 'utilityCell',\n ],\n base: {\n root: {\n fontVariantNumeric: 'lining-nums tabular-nums',\n textAlign: 'start',\n width: 'full',\n },\n caption: {\n captionSide: 'top !important',\n textAlign: 'start',\n '& > * + *': {\n marginBlockStart: '4',\n },\n },\n cell: {\n textStyle: 'body/md/regular',\n },\n actionsCell: {\n textAlign: 'end',\n whiteSpace: 'nowrap',\n // Shrink-to-fit: a table cell can't go below its content width, so any value under the\n // content's own width collapses the column around the buttons and leaves the rest to\n // the data columns.\n width: '1%',\n },\n actionsGroup: {\n alignItems: 'center',\n display: 'inline-flex',\n gap: '8',\n position: 'relative',\n },\n bulkActionsGroup: {\n alignItems: 'center',\n display: 'flex',\n gap: '12',\n },\n bulkActionsButtons: {\n alignItems: 'center',\n display: 'flex',\n gap: '12',\n marginInlineStart: 'auto',\n },\n // The column header's own `heading/h5` has to survive, so the trigger inherits its type and\n // colour rather than setting them — which is what rules out BitkitDefinitionTooltip in a header,\n // since its recipe always pins a textStyle. The offset is that recipe's own value for 14px type.\n definitionTrigger: {\n color: 'inherit',\n cursor: 'pointer',\n font: 'inherit',\n letterSpacing: 'inherit',\n maxWidth: 'full',\n textDecoration: 'underline dotted',\n textDecorationColor: 'color/neutral/bold',\n textUnderlineOffset: '0.25em',\n _hover: {\n textDecorationColor: 'color/purple/base',\n },\n },\n expandCell: {\n paddingBlock: 0,\n paddingInline: 0,\n verticalAlign: 'middle',\n width: '48',\n },\n // A fixed 32x32 box (per the design), centred in the cell by the cell's own vertical-align.\n // Deriving the size from padding instead leaves it at the mercy of the Collapsible recipe's\n // asymmetric paddingBlockStart, which is what pushed the chevron 2px above the row's centre.\n expandTrigger: {\n alignItems: 'center',\n background: 'none',\n border: 'none',\n cursor: 'pointer',\n display: 'flex',\n height: '32',\n justifyContent: 'center',\n marginInlineStart: '12',\n padding: 0,\n width: '32',\n },\n expandableRow: {\n '& > td': {\n borderBottomWidth: 0,\n },\n },\n expandedCell: {\n height: 0,\n paddingBlock: 0,\n paddingInline: 0,\n },\n expandedContent: {\n borderBlockStartColor: 'border/minimal',\n borderBlockStartStyle: 'solid',\n borderBlockStartWidth: '1',\n marginInlineEnd: '16',\n marginInlineStart: '48',\n paddingBlockEnd: '24',\n paddingBlockStart: '16',\n paddingInlineEnd: '16',\n paddingInlineStart: '12',\n },\n expandedRow: {\n _hover: {\n background: 'none',\n },\n },\n filterControls: {\n alignItems: 'center',\n display: 'flex',\n flexWrap: 'wrap',\n gap: '16',\n width: 'full',\n },\n linkCell: {\n // The link inside is the row's link: its stretched pseudo covers the whole row, so the row\n // becomes the click and focus target.\n '& a': {\n textDecoration: 'none',\n // The row's own background change is the hover affordance; the link recipe's hover\n // underline would fire on every row hover, since the stretched pseudo covers the row.\n _hover: {\n textDecoration: 'none',\n },\n _after: {\n content: '\"\"',\n inset: 0,\n position: 'absolute',\n },\n _focusVisible: {\n outline: 'none',\n _after: {\n outline: 'var(--focus-ring-width) var(--focus-ring-style) var(--focus-ring-color)',\n outlineOffset: 'calc(var(--focus-ring-width) * -1)',\n },\n },\n },\n },\n linkedRow: {\n position: 'relative',\n _hover: {\n backgroundColor: 'background/secondary',\n },\n '& :where(a:not([data-link-cell] a), button, input, label, select)': {\n position: 'relative',\n zIndex: '1',\n },\n },\n sortColumnHeader: {\n paddingBlock: 0,\n paddingInline: 0,\n },\n sortTrigger: {\n alignItems: 'center',\n appearance: 'none',\n background: 'none',\n border: 'none',\n color: 'inherit',\n cursor: 'pointer',\n display: 'flex',\n font: 'inherit',\n gap: '8',\n height: 'full',\n paddingBlock: '12',\n paddingInline: '16',\n userSelect: 'none',\n width: 'full',\n _focusVisible: {\n outlineOffset: '-3px',\n },\n _hover: {\n backgroundColor: 'background/active',\n },\n },\n utilityCell: {\n height: 'auto',\n paddingBlock: '12',\n paddingInline: '16',\n },\n },\n variants: {\n variant: {\n default: {\n root: {\n borderColor: 'border/regular',\n borderRadius: '4',\n borderStyle: 'solid',\n borderWidth: '1',\n overflow: 'hidden',\n },\n header: {\n '& :where(th)': {\n backgroundColor: 'background/tertiary',\n },\n },\n columnHeader: {\n borderBottomColor: 'border/minimal',\n paddingBlock: '12',\n paddingInline: '16',\n },\n cell: {\n borderBottomColor: 'border/minimal',\n borderTopColor: 'border/minimal',\n paddingInline: '16',\n },\n footer: {\n borderTopColor: 'border/minimal',\n },\n },\n borderless: {\n columnHeader: {\n borderBottomColor: 'border/regular',\n padding: '12',\n },\n cell: {\n borderBottomColor: 'border/regular',\n borderTopColor: 'border/regular',\n paddingInline: '12',\n },\n footer: {\n borderTopColor: 'border/regular',\n },\n },\n card: {\n columnHeader: {\n borderBottomColor: 'border/minimal',\n height: '48',\n padding: '12',\n },\n cell: {\n borderBottomColor: 'border/minimal',\n borderTopColor: 'border/minimal',\n paddingInline: '12',\n },\n row: {\n 'thead &, tbody &': {\n '& > :where(td, th):first-child': {\n paddingInlineStart: '24',\n },\n '& > :where(td, th):last-child': {\n paddingInlineEnd: '24',\n },\n },\n },\n footer: {\n borderTopColor: 'border/minimal',\n },\n },\n },\n size: {\n sm: {\n cell: {\n height: '48',\n },\n },\n md: {\n cell: {\n height: rem(56),\n },\n },\n lg: {\n cell: {\n height: '64',\n },\n },\n },\n // Hovering a row tints it. Usually a reading aid on a long or wide table rather than a hint\n // that the row is clickable, so it says nothing about the row being interactive — turn it off\n // for short, static tables where there is no place to lose.\n rowHover: {\n true: {},\n false: {},\n },\n layout: {\n table: {\n root: {\n borderCollapse: 'separate',\n borderSpacing: '0',\n },\n caption: {\n marginBlockEnd: '24',\n },\n columnHeader: {\n borderBottomStyle: 'solid',\n borderBottomWidth: '1',\n color: 'text/primary',\n fontWeight: 'bold',\n textAlign: 'start',\n textStyle: 'heading/h5',\n verticalAlign: 'middle',\n ...controlOnlyCell,\n },\n cell: {\n borderBottomStyle: 'solid',\n borderBottomWidth: '1',\n verticalAlign: 'middle',\n ...controlOnlyCell,\n // border-collapse: separate ignores borders on tfoot itself (CSS 2.1 §17.6.1),\n // so the body/footer divider has to live on the footer's cells.\n // A footer holds one full-width block (pagination, a \"new item\" action) that brings its\n // own padding and height, so the body cell's 16px inset and fixed row height would\n // double up on it.\n 'tfoot &': {\n borderBottomWidth: 0,\n borderTopStyle: 'solid',\n borderTopWidth: '1',\n height: 'auto',\n paddingBlock: 0,\n paddingInline: 0,\n },\n },\n body: {\n '& :where(tr)': {\n '&[data-selected]': {\n backgroundColor: 'background/selected',\n _hover: {\n backgroundColor: 'background/selected',\n },\n },\n },\n '& :where(tr:last-child) td': {\n borderBottomWidth: 0,\n },\n },\n },\n stacked: {\n root: {\n display: 'block',\n },\n caption: {\n display: 'block',\n padding: '16',\n backgroundColor: 'background/secondary',\n borderBottomColor: 'border/minimal',\n borderBottomStyle: 'solid',\n borderBottomWidth: '1',\n },\n header: {\n borderWidth: 0,\n clip: 'rect(0, 0, 0, 0)',\n height: '1',\n margin: '-1px',\n overflow: 'hidden',\n padding: 0,\n position: 'absolute',\n whiteSpace: 'nowrap',\n width: '1',\n },\n body: {\n display: 'block',\n },\n row: {\n borderBottomColor: 'border/minimal',\n borderBottomStyle: 'solid',\n borderBottomWidth: '1',\n display: 'block',\n paddingBlock: '12',\n '&:last-child': {\n borderBottomWidth: 0,\n },\n },\n cell: {\n alignItems: 'center',\n display: 'flex',\n minHeight: '48',\n paddingInline: '16',\n _before: {\n alignSelf: 'center',\n color: 'text/primary',\n content: 'attr(data-label)',\n flexShrink: 0,\n fontWeight: 'semibold',\n marginInlineEnd: '16',\n width: '96',\n },\n 'tfoot &': {\n display: 'block',\n paddingInline: 0,\n _before: {\n content: 'none',\n },\n },\n },\n // display: block takes tfoot out of the table model, so a border on it does render here\n footer: {\n borderTopStyle: 'solid',\n borderTopWidth: '1',\n display: 'block',\n },\n },\n },\n },\n compoundVariants: [\n {\n css: {\n row: {\n borderBottomColor: 'border/regular',\n },\n },\n layout: 'stacked',\n variant: 'borderless',\n },\n // The card gutter and the 12px cell padding are for the wide layout. Stacked rows are blocks\n // whose cells run vertically, so an inline indent on only the first and last one reads as a\n // misalignment — everything goes back to the stacked layout's own 16px.\n {\n css: {\n cell: {\n paddingInline: '16',\n },\n row: {\n 'thead &, tbody &': {\n '& > :where(td, th):first-child': {\n paddingInlineStart: '16',\n },\n '& > :where(td, th):last-child': {\n paddingInlineEnd: '16',\n },\n },\n },\n },\n layout: 'stacked',\n variant: 'card',\n },\n // The `size` variant pins a fixed cell height (48/56/64px), and it is merged after `layout`\n // regardless of declaration order — so only a compound variant can release it. Stacked cells\n // are flex containers whose content (label gutter + a multi-line value) routinely needs more\n // room than the fixed height, and the stacked `cell` keeps `minHeight: 48` as the floor.\n {\n css: {\n cell: {\n height: 'auto',\n },\n },\n layout: 'stacked',\n },\n // Scoped to `layout: table` because that is where the hover lived before: the stacked layout\n // renders rows as blocks and never tinted them.\n {\n css: {\n body: {\n '& :where(tr)': {\n _hover: {\n backgroundColor: 'background/secondary',\n },\n },\n },\n },\n layout: 'table',\n rowHover: true,\n },\n ],\n defaultVariants: {\n layout: 'table',\n rowHover: true,\n size: 'lg',\n variant: 'default',\n },\n});\n\nexport default tableSlotRecipe;\n"],"mappings":";;;;AASA,IAAM,kBAAkB,EACtB,gCAAgC,EAC9B,SAAS,OACX,EACF;AAEA,IAAM,kBAAkB,iBAAiB;CACvC,WAAW;CACX,OAAO;EACL,GAAG,aAAa,KAAK;EACrB;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,MAAM;EACJ,MAAM;GACJ,oBAAoB;GACpB,WAAW;GACX,OAAO;EACT;EACA,SAAS;GACP,aAAa;GACb,WAAW;GACX,aAAa,EACX,kBAAkB,IACpB;EACF;EACA,MAAM,EACJ,WAAW,kBACb;EACA,aAAa;GACX,WAAW;GACX,YAAY;GAIZ,OAAO;EACT;EACA,cAAc;GACZ,YAAY;GACZ,SAAS;GACT,KAAK;GACL,UAAU;EACZ;EACA,kBAAkB;GAChB,YAAY;GACZ,SAAS;GACT,KAAK;EACP;EACA,oBAAoB;GAClB,YAAY;GACZ,SAAS;GACT,KAAK;GACL,m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AiC,EAC/B,kBAAkB,KACpB;IACF,EACF;GACF;GACA,QAAQ;GACR,SAAS;EACX;EAKA;GACE,KAAK,EACH,MAAM,EACJ,QAAQ,OACV,EACF;GACA,QAAQ;EACV;EAGA;GACE,KAAK,EACH,MAAM,EACJ,gBAAgB,EACd,QAAQ,EACN,iBAAiB,uBACnB,EACF,EACF,EACF;GACA,QAAQ;GACR,UAAU;EACZ;CACF;CACA,iBAAiB;EACf,QAAQ;EACR,UAAU;EACV,MAAM;EACN,SAAS;CACX;AACF,CAAC"}
|
|
@@ -2982,7 +2982,7 @@ declare const slotRecipes: {
|
|
|
2982
2982
|
};
|
|
2983
2983
|
body: {
|
|
2984
2984
|
'& :where(tr)': {
|
|
2985
|
-
|
|
2985
|
+
'&[data-selected]': {
|
|
2986
2986
|
backgroundColor: "background/selected";
|
|
2987
2987
|
_hover: {
|
|
2988
2988
|
backgroundColor: "background/selected";
|