From 3ce5fde5ca3dc91f6e047fec3474758db42576ca Mon Sep 17 00:00:00 2001 From: Ionut-Cristian Florescu Date: Tue, 7 Nov 2023 19:35:18 +0200 Subject: [PATCH 1/3] Update dev deps --- package.json | 12 +++++------ yarn.lock | 58 ++++++++++++++++++++++++++-------------------------- 2 files changed, 35 insertions(+), 35 deletions(-) diff --git a/package.json b/package.json index ab3fad451..2272600fb 100644 --- a/package.json +++ b/package.json @@ -75,12 +75,12 @@ "@ducanh2912/next-pwa": "^9.7.2", "@faker-js/faker": "^8.2.0", "@formkit/auto-animate": "^0.8.1", - "@mantine/code-highlight": "^7.2.0", - "@mantine/core": "^7.2.0", - "@mantine/dates": "^7.2.0", - "@mantine/hooks": "^7.2.0", - "@mantine/modals": "^7.2.0", - "@mantine/notifications": "^7.2.0", + "@mantine/code-highlight": "^7.2.1", + "@mantine/core": "^7.2.1", + "@mantine/dates": "^7.2.1", + "@mantine/hooks": "^7.2.1", + "@mantine/modals": "^7.2.1", + "@mantine/notifications": "^7.2.1", "@tabler/icons-react": "^2.40.0", "@tanstack/react-query": "^5.7.2", "@types/lodash": "^4.14.200", diff --git a/yarn.lock b/yarn.lock index 3ea8c7db8..648e976ab 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1362,18 +1362,18 @@ "@jridgewell/resolve-uri" "^3.1.0" "@jridgewell/sourcemap-codec" "^1.4.14" -"@mantine/code-highlight@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@mantine/code-highlight/-/code-highlight-7.2.0.tgz#37f6e84db149331be1139011a89fc397adcb0b8a" - integrity sha512-CUSyDZsyfwvw2Q7VIECibH7tP2UmpJ1E4cS+OaWtDG7XytHSPQ87ekzQyfeOyXlOR9FurMK4UDfxb/gvYGHgNw== +"@mantine/code-highlight@^7.2.1": + version "7.2.1" + resolved "https://registry.yarnpkg.com/@mantine/code-highlight/-/code-highlight-7.2.1.tgz#2545ad40150f465e06c2c287e49e0a41ee3c9c84" + integrity sha512-CTBSpMSxbnjSLSjcV65pwwmx3Hbl2eLrRGaMzuvSQYwXw7LlZ9xYVMGzndAw3PQkBQPyr5AzuRjdWJrL0kJZAw== dependencies: clsx "2.0.0" highlight.js "^11.7.0" -"@mantine/core@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@mantine/core/-/core-7.2.0.tgz#b85b20a3376ff89c90a13ae396606cb139519c25" - integrity sha512-43vJc4yPV5/WczSer45xp8rIjtPQoygEpWRnAuym9YpG1cx9c4HMD6VhcJOFZSoPuGMWfXlb0fodVvSfN3L+xA== +"@mantine/core@^7.2.1": + version "7.2.1" + resolved "https://registry.yarnpkg.com/@mantine/core/-/core-7.2.1.tgz#1f927836b2ac2c78534cdf0d3528dc4d0fbfac8e" + integrity sha512-vB5nMip/8fm+/9V49C856AGWEGocNzks6+KO/ocz4EKgd665F663Bs8x6cvop2onbZyVxhX/5Zge93ndX4UNFA== dependencies: "@floating-ui/react" "^0.24.8" clsx "2.0.0" @@ -1382,35 +1382,35 @@ react-textarea-autosize "8.5.3" type-fest "^3.13.1" -"@mantine/dates@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@mantine/dates/-/dates-7.2.0.tgz#7e72c010af074d262ffe589fd773773c58b5da66" - integrity sha512-rW433jZZKxM9n6wy+F13rJKfREVKojiwxe7ESnuVYX4zxRAqpRsXNTNTUyyXzv+kDqU3EUfTqsb9Qww6oh7cfw== +"@mantine/dates@^7.2.1": + version "7.2.1" + resolved "https://registry.yarnpkg.com/@mantine/dates/-/dates-7.2.1.tgz#f77b9fbc80c5bd91c8b2401dc076d699bc1e86bc" + integrity sha512-wOLbWU0DJGG3kC7GdoIXdUSvCq9ggFjyDfOuHwRLa0rpWoytsgn9X59ab/4kO341tcqvkMa4F9Yq90Vhyj//rA== dependencies: clsx "2.0.0" -"@mantine/hooks@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@mantine/hooks/-/hooks-7.2.0.tgz#2c758d7fc4c4f9568d6b9df1ae0e47c74f7fb1a1" - integrity sha512-3dDjB+X7JvirIpW1uVFBiGuvG3Tg+cwBWnzbnCaIXYmBkQhvgI6wkCIvdPkLxpG9hmkzd0lgH5OphJt5i2ocHw== +"@mantine/hooks@^7.2.1": + version "7.2.1" + resolved "https://registry.yarnpkg.com/@mantine/hooks/-/hooks-7.2.1.tgz#00c4f53e4b9e5d0d6dadc62fe6ee90461d60192a" + integrity sha512-v7GKjVQ6SV6dQ+hrs6HDHB50UB+ZXS5hhGp1bo2k6QGF3wcndws+eghCFO5hjKIVSLYm2YoaZxwKiQmjsZBXfQ== -"@mantine/modals@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@mantine/modals/-/modals-7.2.0.tgz#a384f7dd14bbc00ae2294168c3e5fafd8c046a62" - integrity sha512-gHb/Dw6JSfy9EdZBtFqT8Ra4XeWZAyHeibu6SnS3/oyeuzfT/trjUz4WGWW4VFBvKlFWJYq0IVf6BMUxr0v4kw== +"@mantine/modals@^7.2.1": + version "7.2.1" + resolved "https://registry.yarnpkg.com/@mantine/modals/-/modals-7.2.1.tgz#781bbee4a8a71f48f868f9a409e4bcd56d80f3cf" + integrity sha512-zfBhgYi65NyO8KmgNOSOggBPa+7jOsKFxalIXfjiOELnDVKp4blOjdfX3dd+treyC+Sw3uvm5+jXYcvketdZrA== -"@mantine/notifications@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@mantine/notifications/-/notifications-7.2.0.tgz#70eb6f8c931975e971a2cb6beca3a0bab670cd4b" - integrity sha512-OKYy7JcaBS+N5pFiXGu6uMUTPqz3NkEz3inko9p9GTqRY1P/BA4yqLrFrjjUBljesz1np9FfK7CipnG2IMMq1A== +"@mantine/notifications@^7.2.1": + version "7.2.1" + resolved "https://registry.yarnpkg.com/@mantine/notifications/-/notifications-7.2.1.tgz#e510c1b2ac4e5577d834746e60a2bc6a03520f6b" + integrity sha512-h19WGE7utzqTrn9js/ZJSlnPpcIAZlt6W8SuG3AybXnFP591We9ZCEUUSdwpeJsZM/Put+fJO27j8rh2H9pN9A== dependencies: - "@mantine/store" "7.2.0" + "@mantine/store" "7.2.1" react-transition-group "4.4.5" -"@mantine/store@7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@mantine/store/-/store-7.2.0.tgz#c5be316c9beb10e67349112ee277009f149e9976" - integrity sha512-fnRTKJY0YtmCXliwaWoDMKr9QBI0tTPmqX69s3dLw7WSNonj6QfzxH9K6vYdFOGu0VxosBB+RrklGkEyQaTk4Q== +"@mantine/store@7.2.1": + version "7.2.1" + resolved "https://registry.yarnpkg.com/@mantine/store/-/store-7.2.1.tgz#9210b56e6186ed9115d62c8df77c9d05aa4b9bb2" + integrity sha512-BoWI+gmwZUEIdjXhpIfTNhKa+yiPGUbCubb5QbATQVWztLU/cyyv3HpGHKS8EUe0HS26MIAcTBK+5pHZduTOIA== "@next/env@14.0.1": version "14.0.1" From 75047d01f778dd949b00787dad42151b0c5b99c1 Mon Sep 17 00:00:00 2001 From: Ionut-Cristian Florescu Date: Tue, 7 Nov 2023 20:09:06 +0200 Subject: [PATCH 2/3] Improve shadows CSS --- package/DataTable.css | 3 ++- package/DataTableFooterSelectorPlaceholderCell.css | 4 ++-- package/DataTableRowSelectorCell.css | 11 ++++++++++- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/package/DataTable.css b/package/DataTable.css index 7f5a688e1..1e8bc4538 100644 --- a/package/DataTable.css +++ b/package/DataTable.css @@ -121,8 +121,9 @@ } th:not(.mantine-datatable-column-group-header-cell):last-of-type, - tr:not(:last-of-type) td:not(.mantine-datatable-row-expansion-cell):last-of-type { + tr[data-with-row-border]:not(:last-of-type) td:not(.mantine-datatable-row-expansion-cell):last-of-type { &::after { + top: rem(-1px); bottom: rem(-1px); } } diff --git a/package/DataTableFooterSelectorPlaceholderCell.css b/package/DataTableFooterSelectorPlaceholderCell.css index da3cff1c9..5a19b4dae 100644 --- a/package/DataTableFooterSelectorPlaceholderCell.css +++ b/package/DataTableFooterSelectorPlaceholderCell.css @@ -5,9 +5,9 @@ &::after { content: ''; position: absolute; - top: rem(-1px); + top: 0; right: calc(-1 * var(--mantine-spacing-xs)); - bottom: 0; + bottom: rem(-1px); border-left: 1px solid var(--mantine-datatable-row-border-color); width: var(--mantine-spacing-xs); background: var(--mantine-datatable-shadow-background-left); diff --git a/package/DataTableRowSelectorCell.css b/package/DataTableRowSelectorCell.css index 4adcfa675..de34d7e3a 100644 --- a/package/DataTableRowSelectorCell.css +++ b/package/DataTableRowSelectorCell.css @@ -10,7 +10,7 @@ &::after { content: ''; position: absolute; - top: rem(-1px); + top: 0; right: calc(-1 * var(--mantine-spacing-xs)); bottom: 0; border-left: 1px solid var(--mantine-datatable-row-border-color); @@ -21,6 +21,15 @@ transition: opacity 0.2s; } + tr[data-with-row-border] &::after { + top: rem(-1px); + bottom: rem(-1px); + } + + tr:last-of-type &::after { + bottom: 0; + } + &[data-shadow-visible]::after { opacity: 1; } From 1fcc36557d1f016102a38d15a8833d6b129a2eeb Mon Sep 17 00:00:00 2001 From: Ionut-Cristian Florescu Date: Tue, 7 Nov 2023 20:10:29 +0200 Subject: [PATCH 3/3] Update changelog & bump version --- CHANGELOG.md | 4 ++++ package.json | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e82c3dbba..b46d9ed97 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,10 @@ The following is a list of notable changes to the Mantine DataTable component. Minor versions that are not listed in the changelog are bug fixes and small improvements. +## 7.1.4 (2023-11-07) + +- Improve shadows positioning CSS + ## 7.1.3 (2023-11-07) - Implement `pinLastColumn` feature diff --git a/package.json b/package.json index 2272600fb..511a1ba70 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mantine-datatable", - "version": "7.1.3", + "version": "7.1.4", "description": "The lightweight, dependency-free, dark-theme aware table component for your Mantine UI data-rich applications, featuring asynchronous data loading support, pagination, intuitive Gmail-style additive batch rows selection, column sorting, custom cell data rendering, row expansion, nesting, context menus, and much more", "keywords": [ "mantine",