Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
bdfba3b
feat(precomposedtable): pre Composed Table using SDS and Tanstack tab…
masoudmanson Jul 21, 2025
dab3c7d
chore(merge): merge conflicts
masoudmanson Jul 21, 2025
21684d0
refactor(precomposedtable): better hover and selection handling
masoudmanson Jul 28, 2025
3fe9bbb
Merge branch 'main' of https://github.com/chanzuckerberg/sci-componen…
masoudmanson Jul 28, 2025
f600d93
feat(precomposedtable): added fluid table column width + new table co…
masoudmanson Jul 29, 2025
75f31ff
Merge branch 'main' of https://github.com/chanzuckerberg/sci-componen…
masoudmanson Jul 31, 2025
1ec7a15
refactor(configs): refactor project configs
masoudmanson Jul 31, 2025
6f5303d
test(test): add tests
masoudmanson Jul 31, 2025
9e28f12
refactor(tests and config): fixed eslint config and added namespace c…
masoudmanson Jul 31, 2025
c88100c
Merge branch 'main' into precomposed-table
masoudmanson Jul 31, 2025
e1376cb
Merge branch 'main' of https://github.com/chanzuckerberg/sci-componen…
masoudmanson Aug 7, 2025
e2e9887
fix(yarn.lock): update yarn lock
masoudmanson Aug 7, 2025
4d76939
chore(merge): fix merge conflicts
masoudmanson Oct 9, 2025
0055744
fix(tablecells): fix margins
masoudmanson Oct 9, 2025
c6695eb
Merge branch 'main' of https://github.com/chanzuckerberg/sci-componen…
masoudmanson Oct 10, 2025
caf17ca
refactor(table): new table design
masoudmanson Oct 14, 2025
092e06b
Merge branch 'main' of https://github.com/chanzuckerberg/sci-componen…
masoudmanson Oct 15, 2025
fef0001
chore(precomposedtable): fix bugs
masoudmanson Oct 15, 2025
8b98bbd
fix(cellcomponent): fix a11y errors
masoudmanson Oct 15, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// https://robertcooper.me/post/using-eslint-and-prettier-in-a-typescript-project
const path = require("path");

module.exports = {
env: {
browser: true,
Expand Down Expand Up @@ -93,9 +95,15 @@ module.exports = {
"import/no-extraneous-dependencies": [
"error",
{
// Dependencies must be specified in `devDependencies` in the monorepo root
// Dependencies must be specified in `devDependencies` or `peerDependencies` in the monorepo root or individual packages
devDependencies: true,
packageDir: __dirname,
includeInternal: true,
packageDir: [
__dirname,
path.resolve(__dirname, "./packages/components"),
path.resolve(__dirname, "./packages/data-viz"),
],
peerDependencies: true,
},
],
"import/prefer-default-export": "off",
Expand Down
3 changes: 2 additions & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
## Reporting Security Issues
If you believe you have found a security issue, please responsibly disclose by contacting us at [[email protected]](mailto:[email protected]).

If you believe you have found a security issue, please responsibly disclose by contacting us at [[email protected]](mailto:[email protected]).
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
"useNx": true,
"version": "independent",
"npmClient": "npm",
"npmClient": "yarn",
"stream": true,
"packages": ["packages/*"],
"command": {
Expand Down
11 changes: 11 additions & 0 deletions packages/components/jest.setup.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,13 @@
import "@testing-library/jest-dom";
import "../../intersectionObserverMock";

// Mock ResizeObserver
global.ResizeObserver = class ResizeObserver {
constructor(private callback: ResizeObserverCallback) {}

observe() {}

unobserve() {}

disconnect() {}
};
2 changes: 2 additions & 0 deletions packages/components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,13 @@
"@mui/icons-material": "^5.15.3",
"@mui/lab": "^5.0.0-alpha.159",
"@mui/material": "^5.15.3",
"@tanstack/react-table": "^8.21.3",
"react": ">=17.0.1",
"react-dom": ">=17.0.1"
},
"devDependencies": {
"@figma/code-connect": "^1.3.4",
"@tanstack/react-table": "^8.21.3",
"@types/node": "^24.3.0",
"@types/react": "^18.2.46",
"@types/react-dom": "^18.2.18",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ exports[`<Autocomplete /> Default story renders snapshot 1`] = `
<button
aria-hidden="false"
aria-label="Search Button"
class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeMedium css-3px3eh-MuiButtonBase-root-MuiIconButton-root"
class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeMedium css-1b01nn3-MuiButtonBase-root-MuiIconButton-root"
icon="Search"
tabindex="0"
type="button"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ exports[`<Banner /> Default story renders snapshot 1`] = `
</div>
<button
aria-label="Close"
class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeMedium css-f0g2hw-MuiButtonBase-root-MuiIconButton-root"
class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeMedium css-8w7yl1-MuiButtonBase-root-MuiIconButton-root"
icon="XMark"
tabindex="0"
type="button"
Expand Down
4 changes: 0 additions & 4 deletions packages/components/src/core/ButtonIcon/style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,6 @@ const small = (props: ButtonIconExtraProps): SerializedStyles => {
const spaces = getSpaces(props);

return css`
${sdsType !== "tertiary"
? `margin: 0 ${spaces?.xxs}px ${spaces?.xxs}px 0;`
: ""}

.MuiSvgIcon-root {
height: ${iconSizes?.s.height}px;
width: ${iconSizes?.s.width}px;
Expand Down
21 changes: 11 additions & 10 deletions packages/components/src/core/CellBasic/__storybook__/constants.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import {
ButtonIconsGroupRight,
EmptySlotBottom,
EmptySlotRight,
StyledButton,
} from "./style";
import Button from "src/core/Button";

export const CELL_BASIC_EXCLUDED_CONTROLS = [
"icon",
Expand All @@ -18,6 +18,7 @@ export const CELL_BASIC_EXCLUDED_CONTROLS = [
"tertiaryText",
"tertiaryTextWrapLineCount",
"shouldShowTooltipOnHover",
"shouldShowUndelineOnHover",
"shouldTextWrap",
"tooltipProps",
"horizontalAlign",
Expand Down Expand Up @@ -55,28 +56,28 @@ export const CELL_BASIC_PRIMARY_TEXT_COMPONENT_SLOT_RIGHT_OPTIONS = [
key="componentSlotRight-1"
/>,
<ButtonIconsGroupRight key="componentSlotRight-2">
<StyledButton
<Button
aria-label="Bar Chart Vertical 4"
icon="BarChartVertical4"
sdsSize="small"
sdsType="primary"
sdsStyle="icon"
/>
<StyledButton
<Button
aria-label="Copy"
icon="Copy"
sdsSize="small"
sdsType="primary"
sdsStyle="icon"
/>
<StyledButton
<Button
aria-label="Search Lines Horizontal 3"
icon="SearchLinesHorizontal3"
sdsSize="small"
sdsType="primary"
sdsStyle="icon"
/>
<StyledButton
<Button
aria-label="Download"
icon="Download"
sdsSize="small"
Expand Down Expand Up @@ -112,35 +113,35 @@ export const CELL_BASIC_PRIMARY_TEXT_COMPONENT_SLOT_BOTTOM_OPTIONS = [
/>
</div>,
<ButtonIconsGroupBottom key="componentSlotBottom-2">
<StyledButton
<Button
aria-label="Bar Chart Vertical 4"
icon="BarChartVertical4"
sdsSize="small"
sdsType="tertiary"
sdsStyle="icon"
/>
<StyledButton
<Button
aria-label="Copy"
icon="Copy"
sdsSize="small"
sdsType="tertiary"
sdsStyle="icon"
/>
<StyledButton
<Button
aria-label="Search Lines Horizontal 3"
icon="SearchLinesHorizontal3"
sdsSize="small"
sdsType="tertiary"
sdsStyle="icon"
/>
<StyledButton
<Button
aria-label="Tree Horizontal"
icon="TreeHorizontal"
sdsSize="small"
sdsType="tertiary"
sdsStyle="icon"
/>
<StyledButton
<Button
aria-label="Download"
icon="Download"
sdsSize="small"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ import { TestDemo } from "./stories/test";

export default {
argTypes: {
component: {
control: { type: "select" },
defaultValue: { summary: "td" },
description: "The HTML element to render as (defaults to 'td')",
options: ["td", "div", "th", "span"],
},
horizontalAlign: {
control: { type: "select" },
defaultValue: { summary: "left" },
Expand Down Expand Up @@ -85,6 +91,11 @@ export default {
defaultValue: { summary: "true" },
description: "Show tooltip on hover",
},
shouldShowUndelineOnHover: {
control: { type: "boolean" },
defaultValue: { summary: "false" },
description: "Show underline for the primary text on hover",
},
shouldTextWrap: {
control: { type: "boolean" },
defaultValue: { summary: "true" },
Expand Down Expand Up @@ -124,6 +135,17 @@ export default {
},
component: CellBasic,
parameters: {
axe: {
disabledRules: [
"aria-input-field-name",
"aria-required-children",
"aria-required-parent",
"button-name",
"color-contrast",
"list",
"listitem",
],
},
controls: {
expanded: true,
},
Expand All @@ -140,6 +162,7 @@ export const Default = {
secondaryText: "Secondary Text",
secondaryTextWrapLineCount: 1,
shouldShowTooltipOnHover: true,
shouldShowUndelineOnHover: false,
shouldTextWrap: true,
tabularNums: false,
tertiaryText: "Tertiary Text",
Expand Down
19 changes: 11 additions & 8 deletions packages/components/src/core/CellBasic/__storybook__/style.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import styled from "@emotion/styled";
import Button from "src/core/Button";
import {
CommonThemeProps,
fontBodyXxxs,
Expand All @@ -19,19 +18,23 @@ export const ButtonIconsGroupRight = styled("div")`
height: 100%;
border-left: solid 1px ${semanticColors?.base?.divider};
padding-left: ${spaces?.xs}px;

button {
margin: 0;
}
`;
}}
`;

export const ButtonIconsGroupBottom = styled("div")`
display: inline-flex;
`;
${(props: CommonThemeProps) => {
const spaces = getSpaces(props);

export const StyledButton = styled(Button)`
svg {
width: 12px;
height: 12px;
}
return `
display: inline-flex;
gap: ${spaces?.xs}px;
`;
}}
`;

export const EmptySlotRight = styled("div")`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ exports[`<CellBasic /> Default story renders snapshot 1`] = `
<tbody>
<tr>
<td
class="css-11b4fo2"
class="css-1n3e3zg"
data-mui-internal-clone-element="true"
data-testid="CellBasic"
tabindex="0"
Expand All @@ -27,7 +27,7 @@ exports[`<CellBasic /> Default story renders snapshot 1`] = `
</div>
</div>
<span
class="css-7ykbdx"
class="css-96arrn"
>
Secondary Text
</span>
Expand Down
Loading
Loading