@launchpad-ui/table
Advanced tools
Comparing version 0.6.5 to 0.6.6
@@ -44,9 +44,10 @@ import './style.css'; | ||
}) => { | ||
const classes = cx(styles.Table, auto && styles["Table--auto"], compact && styles["Table--compact"], isResourceTable && styles["Table--resourceTable"], className); | ||
return /* @__PURE__ */ jsx("table", { | ||
...rest, | ||
"data-test-id": testId, | ||
className: classes, | ||
children | ||
}); | ||
const classes = cx( | ||
styles.Table, | ||
auto && styles["Table--auto"], | ||
compact && styles["Table--compact"], | ||
isResourceTable && styles["Table--resourceTable"], | ||
className | ||
); | ||
return /* @__PURE__ */ jsx("table", { ...rest, "data-test-id": testId, className: classes, children }); | ||
}; | ||
@@ -60,15 +61,5 @@ const TableBody = ({ | ||
const classes = cx(styles["Table-body"], className); | ||
return /* @__PURE__ */ jsx("tbody", { | ||
...rest, | ||
"data-test-id": testId, | ||
className: classes, | ||
children | ||
}); | ||
return /* @__PURE__ */ jsx("tbody", { ...rest, "data-test-id": testId, className: classes, children }); | ||
}; | ||
const TableCell = ({ | ||
align = "left", | ||
className, | ||
children, | ||
...rest | ||
}) => { | ||
const TableCell = ({ align = "left", className, children, ...rest }) => { | ||
const classes = cx(styles["Table-cell"], styles[`Table-cell--${align}`], className); | ||
@@ -79,7 +70,3 @@ const restProps = rest; | ||
} | ||
return /* @__PURE__ */ jsx("td", { | ||
...restProps, | ||
className: classes, | ||
children | ||
}); | ||
return /* @__PURE__ */ jsx("td", { ...restProps, className: classes, children }); | ||
}; | ||
@@ -93,8 +80,3 @@ const TableHead = ({ | ||
const classes = cx(styles["Table-header"], className); | ||
return /* @__PURE__ */ jsx("thead", { | ||
...rest, | ||
"data-test-id": testId, | ||
className: classes, | ||
children | ||
}); | ||
return /* @__PURE__ */ jsx("thead", { ...rest, "data-test-id": testId, className: classes, children }); | ||
}; | ||
@@ -110,9 +92,10 @@ const TableHeadCell = ({ | ||
const widthClass = defaultColWidth ? styles[`Table-cell--width-${defaultColWidth}`] : ""; | ||
const classes = cx(styles["Table-cell"], styles["Table-cell--head"], styles[`Table-cell--${align}`], widthClass, className); | ||
return /* @__PURE__ */ jsx("th", { | ||
...rest, | ||
className: classes, | ||
scope, | ||
children | ||
}); | ||
const classes = cx( | ||
styles["Table-cell"], | ||
styles["Table-cell--head"], | ||
styles[`Table-cell--${align}`], | ||
widthClass, | ||
className | ||
); | ||
return /* @__PURE__ */ jsx("th", { ...rest, className: classes, scope, children }); | ||
}; | ||
@@ -128,8 +111,3 @@ const TableRow = ({ | ||
const classes = cx(styles["Table-row"], verticalAlignClass, className); | ||
return /* @__PURE__ */ jsx("tr", { | ||
...rest, | ||
className: classes, | ||
"data-test-id": testId, | ||
children | ||
}); | ||
return /* @__PURE__ */ jsx("tr", { ...rest, className: classes, "data-test-id": testId, children }); | ||
}; | ||
@@ -136,0 +114,0 @@ export { |
@@ -46,9 +46,10 @@ require('./style.css'); | ||
}) => { | ||
const classes = classix.cx(styles.Table, auto && styles["Table--auto"], compact && styles["Table--compact"], isResourceTable && styles["Table--resourceTable"], className); | ||
return /* @__PURE__ */ jsxRuntime.jsx("table", { | ||
...rest, | ||
"data-test-id": testId, | ||
className: classes, | ||
children | ||
}); | ||
const classes = classix.cx( | ||
styles.Table, | ||
auto && styles["Table--auto"], | ||
compact && styles["Table--compact"], | ||
isResourceTable && styles["Table--resourceTable"], | ||
className | ||
); | ||
return /* @__PURE__ */ jsxRuntime.jsx("table", { ...rest, "data-test-id": testId, className: classes, children }); | ||
}; | ||
@@ -62,15 +63,5 @@ const TableBody = ({ | ||
const classes = classix.cx(styles["Table-body"], className); | ||
return /* @__PURE__ */ jsxRuntime.jsx("tbody", { | ||
...rest, | ||
"data-test-id": testId, | ||
className: classes, | ||
children | ||
}); | ||
return /* @__PURE__ */ jsxRuntime.jsx("tbody", { ...rest, "data-test-id": testId, className: classes, children }); | ||
}; | ||
const TableCell = ({ | ||
align = "left", | ||
className, | ||
children, | ||
...rest | ||
}) => { | ||
const TableCell = ({ align = "left", className, children, ...rest }) => { | ||
const classes = classix.cx(styles["Table-cell"], styles[`Table-cell--${align}`], className); | ||
@@ -81,7 +72,3 @@ const restProps = rest; | ||
} | ||
return /* @__PURE__ */ jsxRuntime.jsx("td", { | ||
...restProps, | ||
className: classes, | ||
children | ||
}); | ||
return /* @__PURE__ */ jsxRuntime.jsx("td", { ...restProps, className: classes, children }); | ||
}; | ||
@@ -95,8 +82,3 @@ const TableHead = ({ | ||
const classes = classix.cx(styles["Table-header"], className); | ||
return /* @__PURE__ */ jsxRuntime.jsx("thead", { | ||
...rest, | ||
"data-test-id": testId, | ||
className: classes, | ||
children | ||
}); | ||
return /* @__PURE__ */ jsxRuntime.jsx("thead", { ...rest, "data-test-id": testId, className: classes, children }); | ||
}; | ||
@@ -112,9 +94,10 @@ const TableHeadCell = ({ | ||
const widthClass = defaultColWidth ? styles[`Table-cell--width-${defaultColWidth}`] : ""; | ||
const classes = classix.cx(styles["Table-cell"], styles["Table-cell--head"], styles[`Table-cell--${align}`], widthClass, className); | ||
return /* @__PURE__ */ jsxRuntime.jsx("th", { | ||
...rest, | ||
className: classes, | ||
scope, | ||
children | ||
}); | ||
const classes = classix.cx( | ||
styles["Table-cell"], | ||
styles["Table-cell--head"], | ||
styles[`Table-cell--${align}`], | ||
widthClass, | ||
className | ||
); | ||
return /* @__PURE__ */ jsxRuntime.jsx("th", { ...rest, className: classes, scope, children }); | ||
}; | ||
@@ -130,8 +113,3 @@ const TableRow = ({ | ||
const classes = classix.cx(styles["Table-row"], verticalAlignClass, className); | ||
return /* @__PURE__ */ jsxRuntime.jsx("tr", { | ||
...rest, | ||
className: classes, | ||
"data-test-id": testId, | ||
children | ||
}); | ||
return /* @__PURE__ */ jsxRuntime.jsx("tr", { ...rest, className: classes, "data-test-id": testId, children }); | ||
}; | ||
@@ -138,0 +116,0 @@ exports.Table = Table; |
{ | ||
"name": "@launchpad-ui/table", | ||
"version": "0.6.5", | ||
"version": "0.6.6", | ||
"status": "beta", | ||
@@ -30,3 +30,3 @@ "publishConfig": { | ||
"classix": "2.1.17", | ||
"@launchpad-ui/tokens": "~0.9.2" | ||
"@launchpad-ui/tokens": "~0.9.3" | ||
}, | ||
@@ -42,3 +42,3 @@ "peerDependencies": { | ||
"scripts": { | ||
"build": "vite build -c ../../vite.config.ts && tsc --project tsconfig.build.json", | ||
"build": "vite build -c ../../vite.config.mts && tsc --project tsconfig.build.json", | ||
"clean": "rm -rf dist", | ||
@@ -45,0 +45,0 @@ "lint": "eslint '**/*.{ts,tsx,js}' && stylelint '**/*.css' --ignore-path ../../.stylelintignore", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
34650
413
Updated@launchpad-ui/tokens@~0.9.3