@mtes-mct/monitor-ui 18.0.0 → 18.0.1

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/CHANGELOG.md CHANGED
@@ -1,3 +1,28 @@
1
+ ## [18.0.0](https://github.com/MTES-MCT/monitor-ui/compare/v17.2.2...v18.0.0) (2024-05-27)
2
+
3
+
4
+ ### ⚠ BREAKING CHANGES
5
+
6
+ * **tables:** - Remove `isChecked` prop in `TableWithSelectableRows.RowCheckbox`, replaced by native `checked` prop.
7
+ - Remove `isIndeterminate` prop in `TableWithSelectableRows.RowCheckbox`, replaced by original Rsuite `indeterminate` prop.
8
+ - Remove `$isHighlighted` prop in `TableWithSelectableRows.Td`, replaced by the same prop on `TableWithSelectableRows.BodyTr`.
9
+ - In order to work properly with `RowCheckbox`, `TableWithSelectableRows` now requires `<Table $withRowCheckbox />`.
10
+ - Following the `SimpleTable` & `TableWithSelectableRows` margins/heights normalization, including a few hacks,
11
+ it may break some UI widths & heights.
12
+ - Please check `TableWithSelectableRows.stories.tsx` to see a full example on how to use/update it.
13
+ - As shown in the story, be careful **NOT** to wrap the checkbox table header cell
14
+ within `<TableWithSelectableRows.SortContainer />` since the flex display breaks its internal positioning.
15
+
16
+ ### Features
17
+
18
+ * **tables:** add $isLoading prop to SimpleTable.Td ([6cc137e](https://github.com/MTES-MCT/monitor-ui/commit/6cc137e187bd0314756bfc973f65bcde19f063ea))
19
+
20
+
21
+ ### Bug Fixes
22
+
23
+ * **tables:** normalize tables checkbox, margins & height ([23afb70](https://github.com/MTES-MCT/monitor-ui/commit/23afb702e79e44788d82b6abeb0e2e6ba4deb4d3))
24
+ * **tables:** set SimpleTable.Td line-height & .CellLoader height to 22px ([176b161](https://github.com/MTES-MCT/monitor-ui/commit/176b161ac85c48913f25e5a483ce8ac30698e65c))
25
+
1
26
  ## [17.2.2](https://github.com/MTES-MCT/monitor-ui/compare/v17.2.1...v17.2.2) (2024-05-21)
2
27
 
3
28
 
package/index.js CHANGED
@@ -76346,8 +76346,14 @@ const Th$2 = styled.th`
76346
76346
  padding: 9px 10px;
76347
76347
  overflow: hidden;
76348
76348
  text-overflow: ellipsis;
76349
- ${(p)=>!!p.$width && `width: ${p.$width}px;`}
76349
+ user-select: none;
76350
76350
  white-space: nowrap;
76351
+
76352
+ ${(p)=>!!p.$width && css`
76353
+ max-width: ${p.$width}px;
76354
+ min-width: ${p.$width}px;
76355
+ width: ${p.$width}px;
76356
+ `}
76351
76357
  `;
76352
76358
  const SortContainer$1 = styled.div`
76353
76359
  align-items: center;
@@ -76534,7 +76540,7 @@ const Table = styled(SimpleTable.Table)`
76534
76540
  border-spacing: 0 5px;
76535
76541
  table-layout: fixed;
76536
76542
 
76537
- ${(p)=>!!p.$withRowCheckbox && `
76543
+ ${(p)=>!!p.$withRowCheckbox && css`
76538
76544
  > thead > tr > th:first-child {
76539
76545
  padding: 0 0 0 8px;
76540
76546
 
@@ -76552,7 +76558,7 @@ const Table = styled(SimpleTable.Table)`
76552
76558
  > tbody > tr > td:first-child {
76553
76559
  padding: 0 0 0 8px;
76554
76560
  }
76555
- `}
76561
+ `}
76556
76562
  `;
76557
76563
  const Head = styled(SimpleTable.Head)`
76558
76564
  > tr {
@@ -76601,7 +76607,7 @@ const BodyTr = styled(SimpleTable.BodyTr)`
76601
76607
  `;
76602
76608
  const Td = styled(SimpleTable.Td)`
76603
76609
  background-color: ${(p)=>p.theme.color.cultured};
76604
- ${(p)=>!!p.$hasRightBorder && `border-right: 1px solid ${p.theme.color.lightGray};`}
76610
+ ${(p)=>!!p.$hasRightBorder && `border-right: 1px solid ${p.theme.color.lightGray} !important;`}
76605
76611
  padding: 9px 16px;
76606
76612
  `;
76607
76613
  const TableWithSelectableRows = {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mtes-mct/monitor-ui",
3
3
  "description": "Common React components, hooks, utilities and CSS stylesheets for MonitorFish, MonitorEnv and RapportNav.",
4
- "version": "18.0.0",
4
+ "version": "18.0.1",
5
5
  "license": "AGPL-3.0",
6
6
  "type": "module",
7
7
  "engines": {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tables/SimpleTable/index.tsx"],"names":[],"mappings":";AAkEA,eAAO,MAAM,WAAW;;;;;;;;;;;iBAvCb,MAAM,GAAG,SAAS;;CA+C5B,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tables/SimpleTable/index.tsx"],"names":[],"mappings":";AA0EA,eAAO,MAAM,WAAW;;;;;;;;;;;iBA/Cb,MAAM,GAAG,SAAS;;CAuD5B,CAAA"}