@bitrise/bitkit-v2 0.3.372 → 0.3.374
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/dist/components/BitkitPagination/BitkitPagination.js +1 -1
- package/dist/components/BitkitPagination/BitkitPagination.js.map +1 -1
- package/dist/components/BitkitTable/BitkitBulkActionsRow.d.ts +80 -0
- package/dist/components/BitkitTable/BitkitBulkActionsRow.js +124 -0
- package/dist/components/BitkitTable/BitkitBulkActionsRow.js.map +1 -0
- package/dist/components/BitkitTable/BitkitExpandableRow.js +30 -54
- package/dist/components/BitkitTable/BitkitExpandableRow.js.map +1 -1
- package/dist/components/BitkitTable/BitkitFilterRow.d.ts +25 -0
- package/dist/components/BitkitTable/BitkitFilterRow.js +41 -0
- package/dist/components/BitkitTable/BitkitFilterRow.js.map +1 -0
- package/dist/components/BitkitTable/BitkitLinkedRow.d.ts +12 -0
- package/dist/components/BitkitTable/BitkitLinkedRow.js +72 -0
- package/dist/components/BitkitTable/BitkitLinkedRow.js.map +1 -0
- package/dist/components/BitkitTable/BitkitRowActionsCell.d.ts +43 -0
- package/dist/components/BitkitTable/BitkitRowActionsCell.js +90 -0
- package/dist/components/BitkitTable/BitkitRowActionsCell.js.map +1 -0
- package/dist/components/BitkitTable/BitkitSortableColumnHeader.js +28 -41
- package/dist/components/BitkitTable/BitkitSortableColumnHeader.js.map +1 -1
- package/dist/components/index.d.ts +4 -0
- package/dist/main.js +5 -1
- package/dist/theme/slot-recipes/Table.recipe.d.ts +20 -7
- package/dist/theme/slot-recipes/Table.recipe.js +163 -14
- package/dist/theme/slot-recipes/Table.recipe.js.map +1 -1
- package/dist/theme/slot-recipes/index.d.ts +20 -7
- package/dist/utilities/formatLabel.d.ts +7 -0
- package/dist/utilities/formatLabel.js +11 -0
- package/dist/utilities/formatLabel.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import IconMoreVertical from "../../icons/IconMoreVertical.js";
|
|
2
|
+
import BitkitActionMenu_default from "../BitkitActionMenu/BitkitActionMenu.js";
|
|
3
|
+
import BitkitControlButton from "../BitkitControlButton/BitkitControlButton.js";
|
|
4
|
+
import { Box } from "@chakra-ui/react/box";
|
|
5
|
+
import { forwardRef } from "react";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
import { Table, useTableStyles } from "@chakra-ui/react/table";
|
|
8
|
+
//#region lib/components/BitkitTable/BitkitRowActionsCell.tsx
|
|
9
|
+
var MAX_INLINE_ACTIONS = 2;
|
|
10
|
+
var InlineAction = ({ action }) => {
|
|
11
|
+
if (action.href !== void 0) return /* @__PURE__ */ jsx(BitkitControlButton, {
|
|
12
|
+
href: action.href,
|
|
13
|
+
icon: action.icon,
|
|
14
|
+
isDanger: action.danger,
|
|
15
|
+
isExternal: action.isExternal,
|
|
16
|
+
label: action.label,
|
|
17
|
+
onClick: action.onClick,
|
|
18
|
+
state: action.state
|
|
19
|
+
});
|
|
20
|
+
return /* @__PURE__ */ jsx(BitkitControlButton, {
|
|
21
|
+
icon: action.icon,
|
|
22
|
+
isDanger: action.danger,
|
|
23
|
+
label: action.label,
|
|
24
|
+
onClick: action.onClick,
|
|
25
|
+
state: action.state
|
|
26
|
+
});
|
|
27
|
+
};
|
|
28
|
+
var MenuAction = ({ action }) => {
|
|
29
|
+
if (action.href !== void 0) return /* @__PURE__ */ jsx(BitkitActionMenu_default.Item, {
|
|
30
|
+
disabled: action.state === "disabled",
|
|
31
|
+
href: action.href,
|
|
32
|
+
icon: action.icon,
|
|
33
|
+
isDanger: action.danger,
|
|
34
|
+
isExternal: action.isExternal,
|
|
35
|
+
onClick: action.onClick,
|
|
36
|
+
value: action.label,
|
|
37
|
+
children: action.label
|
|
38
|
+
});
|
|
39
|
+
return /* @__PURE__ */ jsx(BitkitActionMenu_default.Item, {
|
|
40
|
+
disabled: action.state === "disabled",
|
|
41
|
+
icon: action.icon,
|
|
42
|
+
isDanger: action.danger,
|
|
43
|
+
onClick: action.onClick,
|
|
44
|
+
value: action.label,
|
|
45
|
+
children: action.label
|
|
46
|
+
});
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* The trailing cell of a table row, holding its actions. The column shrinks to fit the buttons.
|
|
50
|
+
*
|
|
51
|
+
* Up to two actions render as inline icon buttons; from the third on they collapse into a single
|
|
52
|
+
* action menu, so the column width stays predictable. Clicks are kept inside the cell, so the
|
|
53
|
+
* actions work in a `BitkitLinkedRow` without triggering the row link.
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* ```tsx
|
|
57
|
+
* <BitkitRowActionsCell
|
|
58
|
+
* actions={[
|
|
59
|
+
* { icon: IconPencil, label: 'Edit', onClick: onEdit },
|
|
60
|
+
* { danger: true, icon: IconMinusCircle, label: 'Remove', onClick: onRemove },
|
|
61
|
+
* ]}
|
|
62
|
+
* />
|
|
63
|
+
* ```
|
|
64
|
+
*/
|
|
65
|
+
var BitkitRowActionsCell = forwardRef((props, ref) => {
|
|
66
|
+
const { actions, menuLabel = "More actions", ...rest } = props;
|
|
67
|
+
const styles = useTableStyles();
|
|
68
|
+
return /* @__PURE__ */ jsx(Table.Cell, {
|
|
69
|
+
ref,
|
|
70
|
+
css: styles.actionsCell,
|
|
71
|
+
...rest,
|
|
72
|
+
children: /* @__PURE__ */ jsx(Box, {
|
|
73
|
+
css: styles.actionsGroup,
|
|
74
|
+
onClick: (event) => event.stopPropagation(),
|
|
75
|
+
children: actions.length <= MAX_INLINE_ACTIONS ? actions.map((action) => /* @__PURE__ */ jsx(InlineAction, { action }, action.label)) : /* @__PURE__ */ jsx(BitkitActionMenu_default, {
|
|
76
|
+
size: "md",
|
|
77
|
+
trigger: /* @__PURE__ */ jsx(BitkitControlButton, {
|
|
78
|
+
icon: IconMoreVertical,
|
|
79
|
+
label: menuLabel
|
|
80
|
+
}),
|
|
81
|
+
children: actions.map((action) => /* @__PURE__ */ jsx(MenuAction, { action }, action.label))
|
|
82
|
+
})
|
|
83
|
+
})
|
|
84
|
+
});
|
|
85
|
+
});
|
|
86
|
+
BitkitRowActionsCell.displayName = "BitkitRowActionsCell";
|
|
87
|
+
//#endregion
|
|
88
|
+
export { BitkitRowActionsCell as default };
|
|
89
|
+
|
|
90
|
+
//# sourceMappingURL=BitkitRowActionsCell.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BitkitRowActionsCell.js","names":[],"sources":["../../../lib/components/BitkitTable/BitkitRowActionsCell.tsx"],"sourcesContent":["import { Box } from '@chakra-ui/react/box';\nimport { Table, useTableStyles } from '@chakra-ui/react/table';\nimport { forwardRef, type MouseEvent } from 'react';\n\nimport { type BitkitIconComponent } from '../../icons';\nimport IconMoreVertical from '../../icons/IconMoreVertical';\nimport BitkitActionMenu from '../BitkitActionMenu/BitkitActionMenu';\nimport BitkitControlButton from '../BitkitControlButton/BitkitControlButton';\n\n/** One row action, rendered either as an inline control button or as an action menu item. */\nexport interface BitkitRowAction {\n /** Renders the action in the danger color set. */\n danger?: boolean;\n /** Makes the action a link instead of a button. */\n href?: string;\n icon: BitkitIconComponent;\n /** Only with `href`: opens the link in a new tab and adds the external-link affordance. */\n isExternal?: boolean;\n /** Accessible name of the inline button, and the visible text of the menu item. Must be unique\n * within `actions`, since it keys the list. */\n label: string;\n onClick?: (event: MouseEvent<HTMLElement>) => void;\n state?: 'disabled';\n}\n\nexport interface BitkitRowActionsCellProps extends Omit<Table.CellProps, 'children' | 'onClick'> {\n /** Up to two actions render as inline icon buttons; three or more collapse into an action menu. */\n actions: BitkitRowAction[];\n /** Accessible name of the action menu trigger, used from the third action on. Default: `More actions` */\n menuLabel?: string;\n}\n\nconst MAX_INLINE_ACTIONS = 2;\n\nconst InlineAction = ({ action }: { action: BitkitRowAction }) => {\n if (action.href !== undefined) {\n return (\n <BitkitControlButton\n href={action.href}\n icon={action.icon}\n isDanger={action.danger}\n isExternal={action.isExternal}\n label={action.label}\n onClick={action.onClick}\n state={action.state}\n />\n );\n }\n\n return (\n <BitkitControlButton\n icon={action.icon}\n isDanger={action.danger}\n label={action.label}\n onClick={action.onClick}\n state={action.state}\n />\n );\n};\n\nconst MenuAction = ({ action }: { action: BitkitRowAction }) => {\n if (action.href !== undefined) {\n return (\n <BitkitActionMenu.Item\n disabled={action.state === 'disabled'}\n href={action.href}\n icon={action.icon}\n isDanger={action.danger}\n isExternal={action.isExternal}\n onClick={action.onClick}\n value={action.label}\n >\n {action.label}\n </BitkitActionMenu.Item>\n );\n }\n\n return (\n <BitkitActionMenu.Item\n disabled={action.state === 'disabled'}\n icon={action.icon}\n isDanger={action.danger}\n onClick={action.onClick}\n value={action.label}\n >\n {action.label}\n </BitkitActionMenu.Item>\n );\n};\n\n/**\n * The trailing cell of a table row, holding its actions. The column shrinks to fit the buttons.\n *\n * Up to two actions render as inline icon buttons; from the third on they collapse into a single\n * action menu, so the column width stays predictable. Clicks are kept inside the cell, so the\n * actions work in a `BitkitLinkedRow` without triggering the row link.\n *\n * @example\n * ```tsx\n * <BitkitRowActionsCell\n * actions={[\n * { icon: IconPencil, label: 'Edit', onClick: onEdit },\n * { danger: true, icon: IconMinusCircle, label: 'Remove', onClick: onRemove },\n * ]}\n * />\n * ```\n */\nconst BitkitRowActionsCell = forwardRef<HTMLTableCellElement, BitkitRowActionsCellProps>((props, ref) => {\n const { actions, menuLabel = 'More actions', ...rest } = props;\n const styles = useTableStyles();\n\n return (\n <Table.Cell ref={ref} css={styles.actionsCell} {...rest}>\n <Box css={styles.actionsGroup} onClick={(event) => event.stopPropagation()}>\n {actions.length <= MAX_INLINE_ACTIONS ? (\n actions.map((action) => <InlineAction key={action.label} action={action} />)\n ) : (\n <BitkitActionMenu size=\"md\" trigger={<BitkitControlButton icon={IconMoreVertical} label={menuLabel} />}>\n {actions.map((action) => (\n <MenuAction key={action.label} action={action} />\n ))}\n </BitkitActionMenu>\n )}\n </Box>\n </Table.Cell>\n );\n});\n\nBitkitRowActionsCell.displayName = 'BitkitRowActionsCell';\n\nexport default BitkitRowActionsCell;\n"],"mappings":";;;;;;;;AAgCA,IAAM,qBAAqB;AAE3B,IAAM,gBAAgB,EAAE,aAA0C;CAChE,IAAI,OAAO,SAAS,KAAA,GAClB,OACE,oBAAC,qBAAD;EACE,MAAM,OAAO;EACb,MAAM,OAAO;EACb,UAAU,OAAO;EACjB,YAAY,OAAO;EACnB,OAAO,OAAO;EACd,SAAS,OAAO;EAChB,OAAO,OAAO;CACf,CAAA;CAIL,OACE,oBAAC,qBAAD;EACE,MAAM,OAAO;EACb,UAAU,OAAO;EACjB,OAAO,OAAO;EACd,SAAS,OAAO;EAChB,OAAO,OAAO;CACf,CAAA;AAEL;AAEA,IAAM,cAAc,EAAE,aAA0C;CAC9D,IAAI,OAAO,SAAS,KAAA,GAClB,OACE,oBAAC,yBAAiB,MAAlB;EACE,UAAU,OAAO,UAAU;EAC3B,MAAM,OAAO;EACb,MAAM,OAAO;EACb,UAAU,OAAO;EACjB,YAAY,OAAO;EACnB,SAAS,OAAO;EAChB,OAAO,OAAO;EAEb,UAAA,OAAO;CACa,CAAA;CAI3B,OACE,oBAAC,yBAAiB,MAAlB;EACE,UAAU,OAAO,UAAU;EAC3B,MAAM,OAAO;EACb,UAAU,OAAO;EACjB,SAAS,OAAO;EAChB,OAAO,OAAO;EAEb,UAAA,OAAO;CACa,CAAA;AAE3B;;;;;;;;;;;;;;;;;;AAmBA,IAAM,uBAAuB,YAA6D,OAAO,QAAQ;CACvG,MAAM,EAAE,SAAS,YAAY,gBAAgB,GAAG,SAAS;CACzD,MAAM,SAAS,eAAe;CAE9B,OACE,oBAAC,MAAM,MAAP;EAAiB;EAAK,KAAK,OAAO;EAAa,GAAI;EACjD,UAAA,oBAAC,KAAD;GAAK,KAAK,OAAO;GAAc,UAAU,UAAU,MAAM,gBAAgB;GACtE,UAAA,QAAQ,UAAU,qBACjB,QAAQ,KAAK,WAAW,oBAAC,cAAD,EAAyC,OAAS,GAA/B,OAAO,KAAwB,CAAC,IAE3E,oBAAC,0BAAD;IAAkB,MAAK;IAAK,SAAS,oBAAC,qBAAD;KAAqB,MAAM;KAAkB,OAAO;IAAY,CAAA;IAClG,UAAA,QAAQ,KAAK,WACZ,oBAAC,YAAD,EAAuC,OAAS,GAA/B,OAAO,KAAwB,CACjD;GACe,CAAA;EAEjB,CAAA;CACK,CAAA;AAEhB,CAAC;AAED,qBAAqB,cAAc"}
|
|
@@ -1,31 +1,9 @@
|
|
|
1
1
|
import { chakra } from "@chakra-ui/react/styled-system";
|
|
2
2
|
import { forwardRef } from "react";
|
|
3
3
|
import { Icon } from "@chakra-ui/react/icon";
|
|
4
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
-
import { Table } from "@chakra-ui/react/table";
|
|
4
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { Table, useTableStyles } from "@chakra-ui/react/table";
|
|
6
6
|
//#region lib/components/BitkitTable/BitkitSortableColumnHeader.tsx
|
|
7
|
-
var sortHeaderCss = {
|
|
8
|
-
paddingBlock: 0,
|
|
9
|
-
paddingInline: 0
|
|
10
|
-
};
|
|
11
|
-
var sortButtonCss = {
|
|
12
|
-
alignItems: "center",
|
|
13
|
-
appearance: "none",
|
|
14
|
-
background: "none",
|
|
15
|
-
border: "none",
|
|
16
|
-
color: "inherit",
|
|
17
|
-
cursor: "pointer",
|
|
18
|
-
display: "flex",
|
|
19
|
-
font: "inherit",
|
|
20
|
-
gap: "4",
|
|
21
|
-
height: "100%",
|
|
22
|
-
paddingBlock: "12",
|
|
23
|
-
paddingInline: "16",
|
|
24
|
-
userSelect: "none",
|
|
25
|
-
_focusVisible: { outlineOffset: "-3px" },
|
|
26
|
-
width: "100%",
|
|
27
|
-
_hover: { backgroundColor: "background/active" }
|
|
28
|
-
};
|
|
29
7
|
var SortIcon = forwardRef((props, ref) => {
|
|
30
8
|
const { direction, ...rest } = props;
|
|
31
9
|
const upFill = direction === "ascending" ? "currentColor" : "var(--sort-icon-inactive)";
|
|
@@ -57,23 +35,32 @@ var SortIcon = forwardRef((props, ref) => {
|
|
|
57
35
|
});
|
|
58
36
|
});
|
|
59
37
|
SortIcon.displayName = "SortIcon";
|
|
60
|
-
var BitkitSortableColumnHeader = forwardRef(({ children, direction, onSort, textAlign, ...rest }, ref) =>
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
38
|
+
var BitkitSortableColumnHeader = forwardRef(({ children, direction, onSort, textAlign, ...rest }, ref) => {
|
|
39
|
+
const styles = useTableStyles();
|
|
40
|
+
const isEndAligned = textAlign === "end";
|
|
41
|
+
const sortIcon = /* @__PURE__ */ jsx(SortIcon, { direction });
|
|
42
|
+
return /* @__PURE__ */ jsx(Table.ColumnHeader, {
|
|
43
|
+
ref,
|
|
44
|
+
"aria-sort": direction === "none" ? void 0 : direction,
|
|
45
|
+
css: styles.sortColumnHeader,
|
|
46
|
+
...rest,
|
|
47
|
+
children: /* @__PURE__ */ jsx(chakra.button, {
|
|
48
|
+
css: styles.sortTrigger,
|
|
49
|
+
justifyContent: isEndAligned ? "flex-end" : void 0,
|
|
50
|
+
onClick: onSort,
|
|
51
|
+
type: "button",
|
|
52
|
+
children: isEndAligned ? /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
53
|
+
sortIcon,
|
|
54
|
+
" ",
|
|
55
|
+
children
|
|
56
|
+
] }) : /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
57
|
+
children,
|
|
58
|
+
" ",
|
|
59
|
+
sortIcon
|
|
60
|
+
] })
|
|
61
|
+
})
|
|
62
|
+
});
|
|
63
|
+
});
|
|
77
64
|
BitkitSortableColumnHeader.displayName = "BitkitSortableColumnHeader";
|
|
78
65
|
//#endregion
|
|
79
66
|
export { BitkitSortableColumnHeader as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BitkitSortableColumnHeader.js","names":[],"sources":["../../../lib/components/BitkitTable/BitkitSortableColumnHeader.tsx"],"sourcesContent":["import { Icon, type IconProps } from '@chakra-ui/react/icon';\nimport { chakra } from '@chakra-ui/react/styled-system';\nimport { Table } from '@chakra-ui/react/table';\nimport { forwardRef, type Ref } from 'react';\n\ntype SortDirection = 'ascending' | 'descending' | 'none';\n\nexport interface BitkitSortableColumnHeaderProps extends Omit<Table.ColumnHeaderProps, 'aria-sort' | 'onClick'> {\n direction: SortDirection;\n onSort: () => void;\n}\n\nconst
|
|
1
|
+
{"version":3,"file":"BitkitSortableColumnHeader.js","names":[],"sources":["../../../lib/components/BitkitTable/BitkitSortableColumnHeader.tsx"],"sourcesContent":["import { Icon, type IconProps } from '@chakra-ui/react/icon';\nimport { chakra } from '@chakra-ui/react/styled-system';\nimport { Table, useTableStyles } from '@chakra-ui/react/table';\nimport { forwardRef, type Ref } from 'react';\n\ntype SortDirection = 'ascending' | 'descending' | 'none';\n\nexport interface BitkitSortableColumnHeaderProps extends Omit<Table.ColumnHeaderProps, 'aria-sort' | 'onClick'> {\n direction: SortDirection;\n onSort: () => void;\n}\n\nconst SortIcon = forwardRef((props: IconProps & { direction: SortDirection }, ref: Ref<SVGSVGElement>) => {\n const { direction, ...rest } = props;\n const upFill = direction === 'ascending' ? 'currentColor' : 'var(--sort-icon-inactive)';\n const downFill = direction === 'descending' ? 'currentColor' : 'var(--sort-icon-inactive)';\n\n return (\n <Icon\n ref={ref}\n asChild\n css={{\n '--sort-icon-inactive': 'colors.icon/disabled',\n color: 'icon/primary',\n display: 'inline-block',\n verticalAlign: 'middle',\n }}\n {...rest}\n >\n <svg fill=\"none\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M11.617 4.461 7.684 9.18c-.271.326-.04.82.384.82h7.865c.424 0 .655-.494.384-.82l-3.933-4.719a.5.5 0 0 0-.767 0Z\"\n fill={upFill}\n />\n <path\n d=\"M12.384 19.539l3.933-4.719c.27-.326.04-.82-.384-.82H8.068c-.424 0-.655.494-.384.82l3.933 4.719a.5.5 0 0 0 .767 0Z\"\n fill={downFill}\n />\n </svg>\n </Icon>\n );\n});\n\nSortIcon.displayName = 'SortIcon';\n\nconst BitkitSortableColumnHeader = forwardRef<HTMLTableCellElement, BitkitSortableColumnHeaderProps>(\n ({ children, direction, onSort, textAlign, ...rest }, ref) => {\n const styles = useTableStyles();\n const isEndAligned = textAlign === 'end';\n const sortIcon = <SortIcon direction={direction} />;\n\n return (\n <Table.ColumnHeader\n ref={ref}\n aria-sort={direction === 'none' ? undefined : direction}\n css={styles.sortColumnHeader}\n {...rest}\n >\n {/* chakra.button: no named primitive attaches a recipe slot to a bare trigger button */}\n <chakra.button\n css={styles.sortTrigger}\n justifyContent={isEndAligned ? 'flex-end' : undefined}\n onClick={onSort}\n type=\"button\"\n >\n {isEndAligned ? (\n <>\n {sortIcon} {children}\n </>\n ) : (\n <>\n {children} {sortIcon}\n </>\n )}\n </chakra.button>\n </Table.ColumnHeader>\n );\n },\n);\n\nBitkitSortableColumnHeader.displayName = 'BitkitSortableColumnHeader';\n\nexport default BitkitSortableColumnHeader;\n"],"mappings":";;;;;;AAYA,IAAM,WAAW,YAAY,OAAiD,QAA4B;CACxG,MAAM,EAAE,WAAW,GAAG,SAAS;CAC/B,MAAM,SAAS,cAAc,cAAc,iBAAiB;CAC5D,MAAM,WAAW,cAAc,eAAe,iBAAiB;CAE/D,OACE,oBAAC,MAAD;EACO;EACL,SAAA;EACA,KAAK;GACH,wBAAwB;GACxB,OAAO;GACP,SAAS;GACT,eAAe;EACjB;EACA,GAAI;EAEJ,UAAA,qBAAC,OAAD;GAAK,MAAK;GAAO,QAAO;GAAK,SAAQ;GAAY,OAAM;GAAK,OAAM;GAAlE,UAAA,CACE,oBAAC,QAAD;IACE,GAAE;IACF,MAAM;GACP,CAAA,GACD,oBAAC,QAAD;IACE,GAAE;IACF,MAAM;GACP,CAAA,CACE;;CACD,CAAA;AAEV,CAAC;AAED,SAAS,cAAc;AAEvB,IAAM,6BAA6B,YAChC,EAAE,UAAU,WAAW,QAAQ,WAAW,GAAG,QAAQ,QAAQ;CAC5D,MAAM,SAAS,eAAe;CAC9B,MAAM,eAAe,cAAc;CACnC,MAAM,WAAW,oBAAC,UAAD,EAAqB,UAAY,CAAA;CAElD,OACE,oBAAC,MAAM,cAAP;EACO;EACL,aAAW,cAAc,SAAS,KAAA,IAAY;EAC9C,KAAK,OAAO;EACZ,GAAI;EAGJ,UAAA,oBAAC,OAAO,QAAR;GACE,KAAK,OAAO;GACZ,gBAAgB,eAAe,aAAa,KAAA;GAC5C,SAAS;GACT,MAAK;GAEJ,UAAA,eACC,qBAAA,YAAA,EAAA,UAAA;IACG;IAAS;IAAE;GACZ,EAAA,CAAA,IAEF,qBAAA,YAAA,EAAA,UAAA;IACG;IAAS;IAAE;GACZ,EAAA,CAAA;EAES,CAAA;CACG,CAAA;AAExB,CACF;AAEA,2BAA2B,cAAc"}
|
|
@@ -73,7 +73,11 @@ export { default as BitkitStat, type BitkitStatProps, type TrendColor, type Tren
|
|
|
73
73
|
export { default as BitkitSteps, type BitkitStepsItemProps, type BitkitStepsItemState, type BitkitStepsProps, } from './BitkitSteps/BitkitSteps';
|
|
74
74
|
export { default as BitkitStepsCard, type BitkitStepsCardBodyProps, type BitkitStepsCardFooterProps, type BitkitStepsCardHeaderProps, type BitkitStepsCardProps, type BitkitStepsCardStepProps, } from './BitkitStepsCard/BitkitStepsCard';
|
|
75
75
|
export { default as BitkitSwitch, type BitkitSwitchProps } from './BitkitSwitch';
|
|
76
|
+
export { type BitkitBulkActionsItems, type BitkitBulkActionsLabels, default as BitkitBulkActionsRow, type BitkitBulkActionsRowProps, } from './BitkitTable/BitkitBulkActionsRow';
|
|
76
77
|
export { default as BitkitExpandableRow, type BitkitExpandableRowProps } from './BitkitTable/BitkitExpandableRow';
|
|
78
|
+
export { default as BitkitFilterRow, type BitkitFilterRowProps } from './BitkitTable/BitkitFilterRow';
|
|
79
|
+
export { default as BitkitLinkedRow, type BitkitLinkedRowLinkCellProps, type BitkitLinkedRowProps, } from './BitkitTable/BitkitLinkedRow';
|
|
80
|
+
export { type BitkitRowAction, default as BitkitRowActionsCell, type BitkitRowActionsCellProps, } from './BitkitTable/BitkitRowActionsCell';
|
|
77
81
|
export { default as BitkitSortableColumnHeader, type BitkitSortableColumnHeaderProps, } from './BitkitTable/BitkitSortableColumnHeader';
|
|
78
82
|
export { default as BitkitTabs } from './BitkitTabs/BitkitTabs';
|
|
79
83
|
export { default as BitkitTag, type BitkitTagProps } from './BitkitTag/BitkitTag';
|
package/dist/main.js
CHANGED
|
@@ -361,7 +361,11 @@ import BitkitSplitButton_default from "./components/BitkitSplitButton/BitkitSpli
|
|
|
361
361
|
import BitkitStat from "./components/BitkitStat/BitkitStat.js";
|
|
362
362
|
import BitkitStepsCard_default from "./components/BitkitStepsCard/BitkitStepsCard.js";
|
|
363
363
|
import BitkitSwitch from "./components/BitkitSwitch/BitkitSwitch.js";
|
|
364
|
+
import BitkitBulkActionsRow from "./components/BitkitTable/BitkitBulkActionsRow.js";
|
|
364
365
|
import BitkitExpandableRow from "./components/BitkitTable/BitkitExpandableRow.js";
|
|
366
|
+
import BitkitFilterRow from "./components/BitkitTable/BitkitFilterRow.js";
|
|
367
|
+
import BitkitLinkedRow_default from "./components/BitkitTable/BitkitLinkedRow.js";
|
|
368
|
+
import BitkitRowActionsCell from "./components/BitkitTable/BitkitRowActionsCell.js";
|
|
365
369
|
import BitkitSortableColumnHeader from "./components/BitkitTable/BitkitSortableColumnHeader.js";
|
|
366
370
|
import BitkitTabs from "./components/BitkitTabs/BitkitTabs.js";
|
|
367
371
|
import BitkitTagsInput from "./components/BitkitTagsInput/BitkitTagsInput.js";
|
|
@@ -373,4 +377,4 @@ import BitkitTreeView, { createTreeCollection } from "./components/BitkitTreeVie
|
|
|
373
377
|
import useResponsive, { ResponsiveProvider } from "./hooks/useResponsive.js";
|
|
374
378
|
import bitkitTheme from "./theme/index.js";
|
|
375
379
|
import Provider from "./providers/BitkitProvider.js";
|
|
376
|
-
export { BitkitAccordion_default as BitkitAccordion, BitkitActionBar, BitkitActionMenu_default as BitkitActionMenu, BitkitAlert, BitkitAvatar, BitkitBadge, BitkitBreadcrumb, BitkitButton, BitkitCalendar, BitkitCheckbox, BitkitCheckboxGroup, BitkitCloseButton, BitkitCodeSnippet, BitkitCollapsible, BitkitColorButton, BitkitCombobox_default as BitkitCombobox, BitkitControlButton, BitkitDataWidget, BitkitDatePicker, BitkitDefinitionTooltip, BitkitDialog_default as BitkitDialog, BitkitDraggableCard, BitkitDrawer, BitkitEmptyState, BitkitExpandableCard, BitkitExpandableRow, BitkitField, BitkitFileInput, BitkitFormDialog_default as BitkitFormDialog, BitkitGroupHeading, BitkitHeading, BitkitIconButton, BitkitInlineLoading, BitkitLabel, BitkitLabelTooltip, BitkitLabeledData, BitkitLightbox, BitkitLink, BitkitLinkButton, BitkitList_default as BitkitList, BitkitMarkdown, BitkitMarkdownCard, BitkitMultiselect_default as BitkitMultiselect, BitkitMultiselectMenu, BitkitNativeSelect, BitkitNoteCard, BitkitNumberInput, BitkitOverflowContent, BitkitOverflowTooltip, BitkitPageFooter_default as BitkitPageFooter, BitkitPagination, BitkitPaginationLoadMore, BitkitPopover, BitkitProgressBar, BitkitPromoBanner, Provider as BitkitProvider, BitkitRadio, BitkitRadioGroup, BitkitRibbon, BitkitSearchInput, BitkitSectionHeading, BitkitSegmentedControl_default as BitkitSegmentedControl, BitkitSelect_default as BitkitSelect, BitkitSelectMenu, BitkitSelectMenuAction, BitkitSelectableTag_default as BitkitSelectableTag, BitkitSettingsCard_default as BitkitSettingsCard, BitkitSidebar_default as BitkitSidebar, BitkitSkeletonGroup, BitkitSortableColumnHeader, BitkitSpinner, BitkitSplitButton_default as BitkitSplitButton, BitkitStat, BitkitStepperDialog_default as BitkitStepperDialog, BitkitSteps_default as BitkitSteps, BitkitStepsCard_default as BitkitStepsCard, BitkitSwitch, BitkitTabs, BitkitTag, BitkitTagsInput, BitkitTextArea, BitkitTextInput, BitkitToggleButton, BitkitTooltip, BitkitTour, BitkitTreeView, IconAbortCircle, IconAbortCircleFilled, IconAddons, IconAgent, IconAnchor, IconAndroid, IconApp, IconAppSettings, IconAppStore, IconAppStoreColor, IconApple, IconArchive, IconArchiveDelete, IconArchiveRestore, IconArrowBackAndDown, IconArrowBackAndUp, IconArrowDown, IconArrowForwardAndDown, IconArrowForwardAndUp, IconArrowLeft, IconArrowNortheast, IconArrowNorthwest, IconArrowRight, IconArrowUp, IconArrowsHorizontal, IconArrowsVertical, IconAutomation, IconAws, IconAwsColor, IconBadge3RdParty, IconBadgeBitrise, IconBadgeUpgrade, IconBadgeVersionOk, IconBazel, IconBell, IconBitbot, IconBitbotError, IconBitbucket, IconBitbucketColor, IconBitbucketNeutral, IconBitbucketWhite, IconBlockCircle, IconBook, IconBoxArrowDown, IconBoxDot, IconBoxLinesOverflow, IconBoxLinesWrap, IconBranch, IconBrowserstackColor, IconBug, IconBuild, IconBuildCache, IconBuildCacheFilled, IconBuildEnvSetup, IconBuildHub, IconBuildHubFilled, IconCalendar, IconChangePlan, IconChat, IconCheck, IconCheckCircle, IconCheckCircleFilled, IconChevronDown, IconChevronLeft, IconChevronRight, IconChevronUp, IconCi, IconCiFilled, IconCircle, IconCircleDashed, IconCircleHalfFilled, IconClaude, IconClaudeColor, IconClock, IconCode, IconCodePush, IconCodeSigning, IconCoffee, IconCommit, IconConfigure, IconConnectedAccounts, IconContainer, IconCopy, IconCordova, IconCpu, IconCreditcard, IconCredits, IconCross, IconCrossCircle, IconCrossCircleFilled, IconCrown, IconCycle, IconDashboard, IconDashboardFilled, IconDeployment, IconDetails, IconDoc, IconDollar, IconDot, IconDotnet, IconDotnetColor, IconDotnetText, IconDotnetTextColor, IconDoubleCircle, IconDownload, IconDragHandle, IconEc2Ami, IconEnterprise, IconErrorCircle, IconErrorCircleFilled, IconExpand, IconExtraBuildCapacity, IconEye, IconEyeSlash, IconFastlane, IconFileDoc, IconFilePdf, IconFilePlist, IconFileYml, IconFileZip, IconFilter, IconFlag, IconFlutter, IconFolder, IconFullscreen, IconFullscreenExit, IconGauge, IconGit, IconGithub, IconGitlab, IconGitlabColor, IconGitlabWhite, IconGlobe, IconGo, IconGoogleColor, IconGooglePlay, IconGooglePlayColor, IconGradle, IconGroup, IconHashtag, IconHeadset, IconHeart, IconHistory, IconHourglass, IconImage, IconInfoCircle, IconInfoCircleFilled, IconInsights, IconInsightsFilled, IconInstall, IconInteraction, IconInvoice, IconIonic, IconJapanese, IconJava, IconJavaColor, IconJavaDuke, IconJavaDukeColor, IconKey, IconKotlin, IconKotlinColor, IconKotlinWhite, IconLaptop, IconLaunchdarkly, IconLegacyApp, IconLightbulb, IconLink, IconLinux, IconLock, IconLockOpen, IconLogin, IconLogout, IconMacos, IconMagicWand, IconMagnifier, IconMail, IconMedal, IconMemory, IconMenuGrid, IconMenuHamburger, IconMessage, IconMessageAlert, IconMessageQuestion, IconMicrophone, IconMinus, IconMinusCircle, IconMinusCircleFilled, IconMobile, IconMobileLandscape, IconMonitorChart, IconMoreHorizontal, IconMoreVertical, IconNews, IconNextjs, IconNodejs, IconOpenInNew, IconOther, IconOutsideContributor, IconOverview, IconPause, IconPencil, IconPeople, IconPercent, IconPerson, IconPersonWithDesk, IconPlay, IconPlus, IconPlusCircle, IconPlusCircleFilled, IconPower, IconProject, IconProjectSettings, IconPull, IconPush, IconPuzzle, IconPython, IconPythonColor, IconQuestionCircle, IconQuestionCircleFilled, IconReact, IconRefresh, IconRegex, IconRelease, IconReleaseFilled, IconRemoteAccess, IconReplace, IconResponsiveness, IconReviewerApproved, IconReviewerAssigned, IconReviewerRejected, IconRuby, IconRubyColor, IconSave, IconSecurityShield, IconSettings, IconSettingsFilled, IconShuffle, IconSiren, IconSkip, IconSkipCircle, IconSkipCircleFilled, IconSlack, IconSlackColor, IconSparkle, IconSparkleFilled, IconSpinnerOnDisabled, IconSpinnerPurple, IconSpinnerPurpleDouble, IconSpinnerWhite, IconStability, IconStack, IconStar, IconStep, IconStop, IconStopwatch, IconTag, IconTasks, IconTeams, IconTeamsColor, IconTemplateCode, IconTerminal, IconTestQuarantine, IconThemeDarkToggle, IconThumbDown, IconThumbUp, IconTools, IconTrash, IconTrigger, IconUbuntu, IconUbuntuColor, IconUnity3D, IconUpload, IconValidateShield, IconVideo, IconWarning, IconWarningYellow, IconWebUi, IconWebhooks, IconWorkflow, IconWorkflowFlow, IconXTwitter, IconXamarin, IconXcode, ResponsiveProvider, bitkitIcon, bitkitTheme as bitriseTheme, createBitkitToast, createTreeCollection, dismissBitkitToast, rem, useBitkitTour, useResponsive, useStepperDialog };
|
|
380
|
+
export { BitkitAccordion_default as BitkitAccordion, BitkitActionBar, BitkitActionMenu_default as BitkitActionMenu, BitkitAlert, BitkitAvatar, BitkitBadge, BitkitBreadcrumb, BitkitBulkActionsRow, BitkitButton, BitkitCalendar, BitkitCheckbox, BitkitCheckboxGroup, BitkitCloseButton, BitkitCodeSnippet, BitkitCollapsible, BitkitColorButton, BitkitCombobox_default as BitkitCombobox, BitkitControlButton, BitkitDataWidget, BitkitDatePicker, BitkitDefinitionTooltip, BitkitDialog_default as BitkitDialog, BitkitDraggableCard, BitkitDrawer, BitkitEmptyState, BitkitExpandableCard, BitkitExpandableRow, BitkitField, BitkitFileInput, BitkitFilterRow, BitkitFormDialog_default as BitkitFormDialog, BitkitGroupHeading, BitkitHeading, BitkitIconButton, BitkitInlineLoading, BitkitLabel, BitkitLabelTooltip, BitkitLabeledData, BitkitLightbox, BitkitLink, BitkitLinkButton, BitkitLinkedRow_default as BitkitLinkedRow, BitkitList_default as BitkitList, BitkitMarkdown, BitkitMarkdownCard, BitkitMultiselect_default as BitkitMultiselect, BitkitMultiselectMenu, BitkitNativeSelect, BitkitNoteCard, BitkitNumberInput, BitkitOverflowContent, BitkitOverflowTooltip, BitkitPageFooter_default as BitkitPageFooter, BitkitPagination, BitkitPaginationLoadMore, BitkitPopover, BitkitProgressBar, BitkitPromoBanner, Provider as BitkitProvider, BitkitRadio, BitkitRadioGroup, BitkitRibbon, BitkitRowActionsCell, BitkitSearchInput, BitkitSectionHeading, BitkitSegmentedControl_default as BitkitSegmentedControl, BitkitSelect_default as BitkitSelect, BitkitSelectMenu, BitkitSelectMenuAction, BitkitSelectableTag_default as BitkitSelectableTag, BitkitSettingsCard_default as BitkitSettingsCard, BitkitSidebar_default as BitkitSidebar, BitkitSkeletonGroup, BitkitSortableColumnHeader, BitkitSpinner, BitkitSplitButton_default as BitkitSplitButton, BitkitStat, BitkitStepperDialog_default as BitkitStepperDialog, BitkitSteps_default as BitkitSteps, BitkitStepsCard_default as BitkitStepsCard, BitkitSwitch, BitkitTabs, BitkitTag, BitkitTagsInput, BitkitTextArea, BitkitTextInput, BitkitToggleButton, BitkitTooltip, BitkitTour, BitkitTreeView, IconAbortCircle, IconAbortCircleFilled, IconAddons, IconAgent, IconAnchor, IconAndroid, IconApp, IconAppSettings, IconAppStore, IconAppStoreColor, IconApple, IconArchive, IconArchiveDelete, IconArchiveRestore, IconArrowBackAndDown, IconArrowBackAndUp, IconArrowDown, IconArrowForwardAndDown, IconArrowForwardAndUp, IconArrowLeft, IconArrowNortheast, IconArrowNorthwest, IconArrowRight, IconArrowUp, IconArrowsHorizontal, IconArrowsVertical, IconAutomation, IconAws, IconAwsColor, IconBadge3RdParty, IconBadgeBitrise, IconBadgeUpgrade, IconBadgeVersionOk, IconBazel, IconBell, IconBitbot, IconBitbotError, IconBitbucket, IconBitbucketColor, IconBitbucketNeutral, IconBitbucketWhite, IconBlockCircle, IconBook, IconBoxArrowDown, IconBoxDot, IconBoxLinesOverflow, IconBoxLinesWrap, IconBranch, IconBrowserstackColor, IconBug, IconBuild, IconBuildCache, IconBuildCacheFilled, IconBuildEnvSetup, IconBuildHub, IconBuildHubFilled, IconCalendar, IconChangePlan, IconChat, IconCheck, IconCheckCircle, IconCheckCircleFilled, IconChevronDown, IconChevronLeft, IconChevronRight, IconChevronUp, IconCi, IconCiFilled, IconCircle, IconCircleDashed, IconCircleHalfFilled, IconClaude, IconClaudeColor, IconClock, IconCode, IconCodePush, IconCodeSigning, IconCoffee, IconCommit, IconConfigure, IconConnectedAccounts, IconContainer, IconCopy, IconCordova, IconCpu, IconCreditcard, IconCredits, IconCross, IconCrossCircle, IconCrossCircleFilled, IconCrown, IconCycle, IconDashboard, IconDashboardFilled, IconDeployment, IconDetails, IconDoc, IconDollar, IconDot, IconDotnet, IconDotnetColor, IconDotnetText, IconDotnetTextColor, IconDoubleCircle, IconDownload, IconDragHandle, IconEc2Ami, IconEnterprise, IconErrorCircle, IconErrorCircleFilled, IconExpand, IconExtraBuildCapacity, IconEye, IconEyeSlash, IconFastlane, IconFileDoc, IconFilePdf, IconFilePlist, IconFileYml, IconFileZip, IconFilter, IconFlag, IconFlutter, IconFolder, IconFullscreen, IconFullscreenExit, IconGauge, IconGit, IconGithub, IconGitlab, IconGitlabColor, IconGitlabWhite, IconGlobe, IconGo, IconGoogleColor, IconGooglePlay, IconGooglePlayColor, IconGradle, IconGroup, IconHashtag, IconHeadset, IconHeart, IconHistory, IconHourglass, IconImage, IconInfoCircle, IconInfoCircleFilled, IconInsights, IconInsightsFilled, IconInstall, IconInteraction, IconInvoice, IconIonic, IconJapanese, IconJava, IconJavaColor, IconJavaDuke, IconJavaDukeColor, IconKey, IconKotlin, IconKotlinColor, IconKotlinWhite, IconLaptop, IconLaunchdarkly, IconLegacyApp, IconLightbulb, IconLink, IconLinux, IconLock, IconLockOpen, IconLogin, IconLogout, IconMacos, IconMagicWand, IconMagnifier, IconMail, IconMedal, IconMemory, IconMenuGrid, IconMenuHamburger, IconMessage, IconMessageAlert, IconMessageQuestion, IconMicrophone, IconMinus, IconMinusCircle, IconMinusCircleFilled, IconMobile, IconMobileLandscape, IconMonitorChart, IconMoreHorizontal, IconMoreVertical, IconNews, IconNextjs, IconNodejs, IconOpenInNew, IconOther, IconOutsideContributor, IconOverview, IconPause, IconPencil, IconPeople, IconPercent, IconPerson, IconPersonWithDesk, IconPlay, IconPlus, IconPlusCircle, IconPlusCircleFilled, IconPower, IconProject, IconProjectSettings, IconPull, IconPush, IconPuzzle, IconPython, IconPythonColor, IconQuestionCircle, IconQuestionCircleFilled, IconReact, IconRefresh, IconRegex, IconRelease, IconReleaseFilled, IconRemoteAccess, IconReplace, IconResponsiveness, IconReviewerApproved, IconReviewerAssigned, IconReviewerRejected, IconRuby, IconRubyColor, IconSave, IconSecurityShield, IconSettings, IconSettingsFilled, IconShuffle, IconSiren, IconSkip, IconSkipCircle, IconSkipCircleFilled, IconSlack, IconSlackColor, IconSparkle, IconSparkleFilled, IconSpinnerOnDisabled, IconSpinnerPurple, IconSpinnerPurpleDouble, IconSpinnerWhite, IconStability, IconStack, IconStar, IconStep, IconStop, IconStopwatch, IconTag, IconTasks, IconTeams, IconTeamsColor, IconTemplateCode, IconTerminal, IconTestQuarantine, IconThemeDarkToggle, IconThumbDown, IconThumbUp, IconTools, IconTrash, IconTrigger, IconUbuntu, IconUbuntuColor, IconUnity3D, IconUpload, IconValidateShield, IconVideo, IconWarning, IconWarningYellow, IconWebUi, IconWebhooks, IconWorkflow, IconWorkflowFlow, IconXTwitter, IconXamarin, IconXcode, ResponsiveProvider, bitkitIcon, bitkitTheme as bitriseTheme, createBitkitToast, createTreeCollection, dismissBitkitToast, rem, useBitkitTour, useResponsive, useStepperDialog };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
declare const tableSlotRecipe: import('@chakra-ui/react').SlotRecipeDefinition<"body" | "caption" | "footer" | "header" | "cell" | "row" | "root" | "columnHeader", {
|
|
1
|
+
declare const tableSlotRecipe: import('@chakra-ui/react').SlotRecipeDefinition<"body" | "caption" | "footer" | "header" | "cell" | "row" | "root" | "utilityCell" | "bulkActionsGroup" | "bulkActionsButtons" | "expandedContent" | "expandableRow" | "expandedRow" | "expandCell" | "expandedCell" | "expandTrigger" | "filterControls" | "linkedRow" | "rowLink" | "actionsCell" | "actionsGroup" | "sortColumnHeader" | "sortTrigger" | "columnHeader", {
|
|
2
2
|
variant: {
|
|
3
3
|
default: {
|
|
4
4
|
root: {
|
|
5
|
-
borderColor: "border/
|
|
5
|
+
borderColor: "border/regular";
|
|
6
6
|
borderRadius: "4";
|
|
7
7
|
borderStyle: "solid";
|
|
8
8
|
borderWidth: "1";
|
|
@@ -73,6 +73,9 @@ declare const tableSlotRecipe: import('@chakra-ui/react').SlotRecipeDefinition<"
|
|
|
73
73
|
marginBlockEnd: "24";
|
|
74
74
|
};
|
|
75
75
|
columnHeader: {
|
|
76
|
+
'& > :where(label):only-child': {
|
|
77
|
+
display: string;
|
|
78
|
+
};
|
|
76
79
|
borderBottomStyle: "solid";
|
|
77
80
|
borderBottomWidth: "1";
|
|
78
81
|
color: "text/primary";
|
|
@@ -82,14 +85,17 @@ declare const tableSlotRecipe: import('@chakra-ui/react').SlotRecipeDefinition<"
|
|
|
82
85
|
verticalAlign: "middle";
|
|
83
86
|
};
|
|
84
87
|
cell: {
|
|
85
|
-
borderBottomStyle: "solid";
|
|
86
|
-
borderBottomWidth: "1";
|
|
87
|
-
verticalAlign: "middle";
|
|
88
88
|
'tfoot &': {
|
|
89
89
|
borderBottomWidth: number;
|
|
90
90
|
borderTopStyle: "solid";
|
|
91
91
|
borderTopWidth: "1";
|
|
92
92
|
};
|
|
93
|
+
'& > :where(label):only-child': {
|
|
94
|
+
display: string;
|
|
95
|
+
};
|
|
96
|
+
borderBottomStyle: "solid";
|
|
97
|
+
borderBottomWidth: "1";
|
|
98
|
+
verticalAlign: "middle";
|
|
93
99
|
};
|
|
94
100
|
body: {
|
|
95
101
|
'& :where(tr)': {
|
|
@@ -112,7 +118,7 @@ declare const tableSlotRecipe: import('@chakra-ui/react').SlotRecipeDefinition<"
|
|
|
112
118
|
caption: {
|
|
113
119
|
display: "block";
|
|
114
120
|
padding: "16";
|
|
115
|
-
backgroundColor: "background/
|
|
121
|
+
backgroundColor: "background/secondary";
|
|
116
122
|
borderBottomColor: "border/minimal";
|
|
117
123
|
borderBottomStyle: "solid";
|
|
118
124
|
borderBottomWidth: "1";
|
|
@@ -152,9 +158,16 @@ declare const tableSlotRecipe: import('@chakra-ui/react').SlotRecipeDefinition<"
|
|
|
152
158
|
content: "attr(data-label)";
|
|
153
159
|
flexShrink: number;
|
|
154
160
|
fontWeight: "semibold";
|
|
155
|
-
|
|
161
|
+
marginInlineEnd: "16";
|
|
156
162
|
width: "96";
|
|
157
163
|
};
|
|
164
|
+
'tfoot &': {
|
|
165
|
+
display: "block";
|
|
166
|
+
paddingInline: number;
|
|
167
|
+
_before: {
|
|
168
|
+
content: "none";
|
|
169
|
+
};
|
|
170
|
+
};
|
|
158
171
|
};
|
|
159
172
|
footer: {
|
|
160
173
|
borderTopStyle: "solid";
|
|
@@ -2,9 +2,28 @@ import { rem } from "../themeUtils.js";
|
|
|
2
2
|
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
|
+
var controlOnlyCell = { "& > :where(label):only-child": { display: "flex" } };
|
|
5
6
|
var tableSlotRecipe = defineSlotRecipe({
|
|
6
7
|
className: "table",
|
|
7
|
-
slots:
|
|
8
|
+
slots: [
|
|
9
|
+
...tableAnatomy.keys(),
|
|
10
|
+
"actionsCell",
|
|
11
|
+
"actionsGroup",
|
|
12
|
+
"bulkActionsGroup",
|
|
13
|
+
"bulkActionsButtons",
|
|
14
|
+
"expandCell",
|
|
15
|
+
"expandTrigger",
|
|
16
|
+
"expandableRow",
|
|
17
|
+
"expandedCell",
|
|
18
|
+
"expandedContent",
|
|
19
|
+
"expandedRow",
|
|
20
|
+
"filterControls",
|
|
21
|
+
"linkedRow",
|
|
22
|
+
"rowLink",
|
|
23
|
+
"sortColumnHeader",
|
|
24
|
+
"sortTrigger",
|
|
25
|
+
"utilityCell"
|
|
26
|
+
],
|
|
8
27
|
base: {
|
|
9
28
|
root: {
|
|
10
29
|
fontVariantNumeric: "lining-nums tabular-nums",
|
|
@@ -19,13 +38,129 @@ var tableSlotRecipe = defineSlotRecipe({
|
|
|
19
38
|
cell: {
|
|
20
39
|
color: "text/body",
|
|
21
40
|
textStyle: "body/md/regular"
|
|
41
|
+
},
|
|
42
|
+
actionsCell: {
|
|
43
|
+
textAlign: "end",
|
|
44
|
+
whiteSpace: "nowrap",
|
|
45
|
+
width: "1%"
|
|
46
|
+
},
|
|
47
|
+
actionsGroup: {
|
|
48
|
+
alignItems: "center",
|
|
49
|
+
display: "inline-flex",
|
|
50
|
+
gap: "8",
|
|
51
|
+
position: "relative"
|
|
52
|
+
},
|
|
53
|
+
bulkActionsGroup: {
|
|
54
|
+
alignItems: "center",
|
|
55
|
+
display: "flex",
|
|
56
|
+
gap: "12"
|
|
57
|
+
},
|
|
58
|
+
bulkActionsButtons: {
|
|
59
|
+
alignItems: "center",
|
|
60
|
+
display: "flex",
|
|
61
|
+
gap: "12",
|
|
62
|
+
marginInlineStart: "auto"
|
|
63
|
+
},
|
|
64
|
+
expandCell: {
|
|
65
|
+
paddingBlock: 0,
|
|
66
|
+
paddingInline: 0,
|
|
67
|
+
verticalAlign: "middle",
|
|
68
|
+
width: "48"
|
|
69
|
+
},
|
|
70
|
+
expandTrigger: {
|
|
71
|
+
alignItems: "center",
|
|
72
|
+
background: "none",
|
|
73
|
+
border: "none",
|
|
74
|
+
cursor: "pointer",
|
|
75
|
+
display: "flex",
|
|
76
|
+
height: "32",
|
|
77
|
+
justifyContent: "center",
|
|
78
|
+
marginInlineStart: "12",
|
|
79
|
+
padding: 0,
|
|
80
|
+
width: "32"
|
|
81
|
+
},
|
|
82
|
+
expandableRow: { "& > td": { borderBottomWidth: 0 } },
|
|
83
|
+
expandedCell: {
|
|
84
|
+
height: 0,
|
|
85
|
+
paddingBlock: 0,
|
|
86
|
+
paddingInline: 0
|
|
87
|
+
},
|
|
88
|
+
expandedContent: {
|
|
89
|
+
borderBlockStartColor: "border/minimal",
|
|
90
|
+
borderBlockStartStyle: "solid",
|
|
91
|
+
borderBlockStartWidth: "1",
|
|
92
|
+
marginInlineEnd: "16",
|
|
93
|
+
marginInlineStart: "48",
|
|
94
|
+
paddingBlockEnd: "24",
|
|
95
|
+
paddingBlockStart: "16",
|
|
96
|
+
paddingInlineEnd: "16",
|
|
97
|
+
paddingInlineStart: "12"
|
|
98
|
+
},
|
|
99
|
+
expandedRow: { _hover: { background: "none" } },
|
|
100
|
+
filterControls: {
|
|
101
|
+
alignItems: "center",
|
|
102
|
+
display: "flex",
|
|
103
|
+
flexWrap: "wrap",
|
|
104
|
+
gap: "16",
|
|
105
|
+
width: "full"
|
|
106
|
+
},
|
|
107
|
+
linkedRow: {
|
|
108
|
+
position: "relative",
|
|
109
|
+
_hover: { backgroundColor: "background/secondary" },
|
|
110
|
+
"& :where(a:not([data-row-link]), button, input, label, select)": {
|
|
111
|
+
position: "relative",
|
|
112
|
+
zIndex: "1"
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
rowLink: {
|
|
116
|
+
textDecoration: "none",
|
|
117
|
+
_hover: { textDecoration: "none" },
|
|
118
|
+
_after: {
|
|
119
|
+
content: "\"\"",
|
|
120
|
+
inset: 0,
|
|
121
|
+
position: "absolute"
|
|
122
|
+
},
|
|
123
|
+
_focusVisible: {
|
|
124
|
+
outline: "none",
|
|
125
|
+
_after: {
|
|
126
|
+
outline: "var(--focus-ring-width) var(--focus-ring-style) var(--focus-ring-color)",
|
|
127
|
+
outlineOffset: "calc(var(--focus-ring-width) * -1)"
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
sortColumnHeader: {
|
|
132
|
+
paddingBlock: 0,
|
|
133
|
+
paddingInline: 0
|
|
134
|
+
},
|
|
135
|
+
sortTrigger: {
|
|
136
|
+
alignItems: "center",
|
|
137
|
+
appearance: "none",
|
|
138
|
+
background: "none",
|
|
139
|
+
border: "none",
|
|
140
|
+
color: "inherit",
|
|
141
|
+
cursor: "pointer",
|
|
142
|
+
display: "flex",
|
|
143
|
+
font: "inherit",
|
|
144
|
+
gap: "8",
|
|
145
|
+
height: "full",
|
|
146
|
+
paddingBlock: "12",
|
|
147
|
+
paddingInline: "16",
|
|
148
|
+
userSelect: "none",
|
|
149
|
+
width: "full",
|
|
150
|
+
_focusVisible: { outlineOffset: "-3px" },
|
|
151
|
+
_hover: { backgroundColor: "background/active" }
|
|
152
|
+
},
|
|
153
|
+
utilityCell: {
|
|
154
|
+
height: "auto",
|
|
155
|
+
paddingBlock: "12",
|
|
156
|
+
paddingInline: "16"
|
|
22
157
|
}
|
|
23
158
|
},
|
|
24
159
|
variants: {
|
|
25
160
|
variant: {
|
|
26
161
|
default: {
|
|
27
162
|
root: {
|
|
28
|
-
borderColor: "border/
|
|
163
|
+
borderColor: "border/regular",
|
|
29
164
|
borderRadius: "4",
|
|
30
165
|
borderStyle: "solid",
|
|
31
166
|
borderWidth: "1",
|
|
@@ -80,12 +215,14 @@ var tableSlotRecipe = defineSlotRecipe({
|
|
|
80
215
|
fontWeight: "bold",
|
|
81
216
|
textAlign: "start",
|
|
82
217
|
textStyle: "heading/h5",
|
|
83
|
-
verticalAlign: "middle"
|
|
218
|
+
verticalAlign: "middle",
|
|
219
|
+
...controlOnlyCell
|
|
84
220
|
},
|
|
85
221
|
cell: {
|
|
86
222
|
borderBottomStyle: "solid",
|
|
87
223
|
borderBottomWidth: "1",
|
|
88
224
|
verticalAlign: "middle",
|
|
225
|
+
...controlOnlyCell,
|
|
89
226
|
"tfoot &": {
|
|
90
227
|
borderBottomWidth: 0,
|
|
91
228
|
borderTopStyle: "solid",
|
|
@@ -105,7 +242,7 @@ var tableSlotRecipe = defineSlotRecipe({
|
|
|
105
242
|
caption: {
|
|
106
243
|
display: "block",
|
|
107
244
|
padding: "16",
|
|
108
|
-
backgroundColor: "background/
|
|
245
|
+
backgroundColor: "background/secondary",
|
|
109
246
|
borderBottomColor: "border/minimal",
|
|
110
247
|
borderBottomStyle: "solid",
|
|
111
248
|
borderBottomWidth: "1"
|
|
@@ -141,8 +278,13 @@ var tableSlotRecipe = defineSlotRecipe({
|
|
|
141
278
|
content: "attr(data-label)",
|
|
142
279
|
flexShrink: 0,
|
|
143
280
|
fontWeight: "semibold",
|
|
144
|
-
|
|
281
|
+
marginInlineEnd: "16",
|
|
145
282
|
width: "96"
|
|
283
|
+
},
|
|
284
|
+
"tfoot &": {
|
|
285
|
+
display: "block",
|
|
286
|
+
paddingInline: 0,
|
|
287
|
+
_before: { content: "none" }
|
|
146
288
|
}
|
|
147
289
|
},
|
|
148
290
|
footer: {
|
|
@@ -153,15 +295,22 @@ var tableSlotRecipe = defineSlotRecipe({
|
|
|
153
295
|
}
|
|
154
296
|
}
|
|
155
297
|
},
|
|
156
|
-
compoundVariants: [
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
298
|
+
compoundVariants: [
|
|
299
|
+
{
|
|
300
|
+
css: { row: { borderBottomColor: "border/regular" } },
|
|
301
|
+
layout: "stacked",
|
|
302
|
+
variant: "borderless"
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
css: { cell: { height: "auto" } },
|
|
306
|
+
layout: "stacked"
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
css: { body: { "& :where(tr)": { _hover: { backgroundColor: "background/secondary" } } } },
|
|
310
|
+
layout: "table",
|
|
311
|
+
rowHover: true
|
|
312
|
+
}
|
|
313
|
+
],
|
|
165
314
|
defaultVariants: {
|
|
166
315
|
layout: "table",
|
|
167
316
|
rowHover: true,
|
|
@@ -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\nconst tableSlotRecipe = defineSlotRecipe({\n className: 'table',\n slots: tableAnatomy.keys(),\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 color: 'text/body',\n textStyle: 'body/md/regular',\n },\n },\n variants: {\n variant: {\n default: {\n root: {\n borderColor: 'border/minimal',\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 },\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 },\n cell: {\n borderBottomStyle: 'solid',\n borderBottomWidth: '1',\n verticalAlign: 'middle',\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 'tfoot &': {\n borderBottomWidth: 0,\n borderTopStyle: 'solid',\n borderTopWidth: '1',\n },\n },\n body: {\n '& :where(tr)': {\n '&:has(input:checked), &[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/tertiary',\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 paddingInlineEnd: '16',\n width: '96',\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 // 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":"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"}
|
|
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 'expandCell',\n 'expandTrigger',\n 'expandableRow',\n 'expandedCell',\n 'expandedContent',\n 'expandedRow',\n 'filterControls',\n 'linkedRow',\n 'rowLink',\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 color: 'text/body',\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 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 linkedRow: {\n position: 'relative',\n _hover: {\n backgroundColor: 'background/secondary',\n },\n '& :where(a:not([data-row-link]), button, input, label, select)': {\n position: 'relative',\n zIndex: '1',\n },\n },\n rowLink: {\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 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 },\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 'tfoot &': {\n borderBottomWidth: 0,\n borderTopStyle: 'solid',\n borderTopWidth: '1',\n },\n },\n body: {\n '& :where(tr)': {\n '&:has(input:checked), &[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 `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;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;GACJ,OAAO;GACP,WAAW;EACb;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,mBAAmB;EACrB;EACA,YAAY;GACV,cAAc;GACd,eAAe;GACf,eAAe;GACf,OAAO;EACT;EAIA,eAAe;GACb,YAAY;GACZ,YAAY;GACZ,QAAQ;GACR,QAAQ;GACR,SAAS;GACT,QAAQ;GACR,gBAAgB;GAChB,mBAAmB;GACnB,SAAS;GACT,OAAO;EACT;EACA,eAAe,EACb,UAAU,EACR,mBAAmB,EACrB,EACF;EACA,cAAc;GACZ,QAAQ;GACR,cAAc;GACd,eAAe;EACjB;EACA,iBAAiB;GACf,uBAAuB;GACvB,uBAAuB;GACvB,uBAAuB;GACvB,iBAAiB;GACjB,mBAAmB;GACnB,iBAAiB;GACjB,mBAAmB;GACnB,kBAAkB;GAClB,oBAAoB;EACtB;EACA,aAAa,EACX,QAAQ,EACN,YAAY,OACd,EACF;EACA,gBAAgB;GACd,YAAY;GACZ,SAAS;GACT,UAAU;GACV,KAAK;GACL,OAAO;EACT;EACA,WAAW;GACT,UAAU;GACV,QAAQ,EACN,iBAAiB,uBACnB;GACA,kEAAkE;IAChE,UAAU;IACV,QAAQ;GACV;EACF;EACA,SAAS;GACP,gBAAgB;GAGhB,QAAQ,EACN,gBAAgB,OAClB;GACA,QAAQ;IACN,SAAS;IACT,OAAO;IACP,UAAU;GACZ;GACA,eAAe;IACb,SAAS;IACT,QAAQ;KACN,SAAS;KACT,eAAe;IACjB;GACF;EACF;EACA,kBAAkB;GAChB,cAAc;GACd,eAAe;EACjB;EACA,aAAa;GACX,YAAY;GACZ,YAAY;GACZ,YAAY;GACZ,QAAQ;GACR,OAAO;GACP,QAAQ;GACR,SAAS;GACT,MAAM;GACN,KAAK;GACL,QAAQ;GACR,cAAc;GACd,eAAe;GACf,YAAY;GACZ,OAAO;GACP,eAAe,EACb,eAAe,OACjB;GACA,QAAQ,EACN,iBAAiB,oBACnB;EACF;EACA,aAAa;GACX,QAAQ;GACR,cAAc;GACd,eAAe;EACjB;CACF;CACA,UAAU;EACR,SAAS;GACP,SAAS;IACP,MAAM;KACJ,aAAa;KACb,cAAc;KACd,aAAa;KACb,aAAa;KACb,UAAU;IACZ;IACA,QAAQ,EACN,gBAAgB,EACd,iBAAiB,sBACnB,EACF;IACA,cAAc;KACZ,mBAAmB;KACnB,cAAc;KACd,eAAe;IACjB;IACA,MAAM;KACJ,mBAAmB;KACnB,gBAAgB;KAChB,eAAe;IACjB;IACA,QAAQ,EACN,gBAAgB,iBAClB;GACF;GACA,YAAY;IACV,cAAc;KACZ,mBAAmB;KACnB,SAAS;IACX;IACA,MAAM;KACJ,mBAAmB;KACnB,gBAAgB;KAChB,eAAe;IACjB;IACA,QAAQ,EACN,gBAAgB,iBAClB;GACF;EACF;EACA,MAAM;GACJ,IAAI,EACF,MAAM,EACJ,QAAQ,KACV,EACF;GACA,IAAI,EACF,MAAM,EACJ,QAAQ,IAAI,EAAE,EAChB,EACF;GACA,IAAI,EACF,MAAM,EACJ,QAAQ,KACV,EACF;EACF;EAIA,UAAU;GACR,MAAM,CAAC;GACP,OAAO,CAAC;EACV;EACA,QAAQ;GACN,OAAO;IACL,MAAM;KACJ,gBAAgB;KAChB,eAAe;IACjB;IACA,SAAS,EACP,gBAAgB,KAClB;IACA,cAAc;KACZ,mBAAmB;KACnB,mBAAmB;KACnB,OAAO;KACP,YAAY;KACZ,WAAW;KACX,WAAW;KACX,eAAe;KACf,GAAG;IACL;IACA,MAAM;KACJ,mBAAmB;KACnB,mBAAmB;KACnB,eAAe;KACf,GAAG;KAGH,WAAW;MACT,mBAAmB;MACnB,gBAAgB;MAChB,gBAAgB;KAClB;IACF;IACA,MAAM;KACJ,gBAAgB,EACd,0CAA0C;MACxC,iBAAiB;MACjB,QAAQ,EACN,iBAAiB,sBACnB;KACF,EACF;KACA,8BAA8B,EAC5B,mBAAmB,EACrB;IACF;GACF;GACA,SAAS;IACP,MAAM,EACJ,SAAS,QACX;IACA,SAAS;KACP,SAAS;KACT,SAAS;KACT,iBAAiB;KACjB,mBAAmB;KACnB,mBAAmB;KACnB,mBAAmB;IACrB;IACA,QAAQ;KACN,aAAa;KACb,MAAM;KACN,QAAQ;KACR,QAAQ;KACR,UAAU;KACV,SAAS;KACT,UAAU;KACV,YAAY;KACZ,OAAO;IACT;IACA,MAAM,EACJ,SAAS,QACX;IACA,KAAK;KACH,mBAAmB;KACnB,mBAAmB;KACnB,mBAAmB;KACnB,SAAS;KACT,cAAc;KACd,gBAAgB,EACd,mBAAmB,EACrB;IACF;IACA,MAAM;KACJ,YAAY;KACZ,SAAS;KACT,WAAW;KACX,eAAe;KACf,SAAS;MACP,WAAW;MACX,OAAO;MACP,SAAS;MACT,YAAY;MACZ,YAAY;MACZ,iBAAiB;MACjB,OAAO;KACT;KACA,WAAW;MACT,SAAS;MACT,eAAe;MACf,SAAS,EACP,SAAS,OACX;KACF;IACF;IAEA,QAAQ;KACN,gBAAgB;KAChB,gBAAgB;KAChB,SAAS;IACX;GACF;EACF;CACF;CACA,kBAAkB;EAChB;GACE,KAAK,EACH,KAAK,EACH,mBAAmB,iBACrB,EACF;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"}
|