@mtes-mct/monitor-ui 21.0.0 → 21.1.0
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 +20 -0
- package/cypress/global.d.ts +1 -1
- package/elements/IconButton.d.ts +2 -1
- package/elements/IconButton.d.ts.map +1 -1
- package/index.js +8 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,23 @@
|
|
|
1
|
+
## [21.0.1](https://github.com/MTES-MCT/monitor-ui/compare/v21.0.0...v21.0.1) (2024-08-14)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **cypress:** allow string id in cy.getTableRowById() command ([b97fa08](https://github.com/MTES-MCT/monitor-ui/commit/b97fa086760c912466e73e226170f4d0809a8367))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Buid System & Dependencies
|
|
10
|
+
|
|
11
|
+
* bump yarn from v4.0.2 to v4.4.0 ([be8e50d](https://github.com/MTES-MCT/monitor-ui/commit/be8e50da1787e8329a4013b304169b2751620fb6))
|
|
12
|
+
|
|
13
|
+
## [21.0.0](https://github.com/MTES-MCT/monitor-ui/compare/v20.0.0...v21.0.0) (2024-08-12)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Buid System & Dependencies
|
|
17
|
+
|
|
18
|
+
* **dev-deps:** bump the all-non-major-dependencies group ([32cf7e9](https://github.com/MTES-MCT/monitor-ui/commit/32cf7e9cbb06b8204c27cae6ea88ef8a7e16f933))
|
|
19
|
+
* **peer-deps:** allow @sentry/react v7 ([b87acc2](https://github.com/MTES-MCT/monitor-ui/commit/b87acc2f27740d955b737a77e933f10a91a55dbd))
|
|
20
|
+
|
|
1
21
|
## [20.0.0](https://github.com/MTES-MCT/monitor-ui/compare/v19.0.0...v20.0.0) (2024-08-08)
|
|
2
22
|
|
|
3
23
|
|
package/cypress/global.d.ts
CHANGED
|
@@ -73,7 +73,7 @@ declare namespace Cypress {
|
|
|
73
73
|
* cy.getDataCy('my-list').getTableRowByText(42).clickButton('Edit')
|
|
74
74
|
* ```
|
|
75
75
|
*/
|
|
76
|
-
getTableRowById(id: number): Chainable<JQuery<HTMLElement>>
|
|
76
|
+
getTableRowById(id: number | string): Chainable<JQuery<HTMLElement>>
|
|
77
77
|
|
|
78
78
|
/**
|
|
79
79
|
* @description Only works with `<SimpleTable />` tables.
|
package/elements/IconButton.d.ts
CHANGED
|
@@ -13,8 +13,9 @@ export type IconButtonProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'chi
|
|
|
13
13
|
/** Remove button border and padding. */
|
|
14
14
|
isCompact?: boolean | undefined;
|
|
15
15
|
size?: Size | undefined;
|
|
16
|
+
style?: React.CSSProperties | undefined;
|
|
16
17
|
/** Prevent onClick event propagation. */
|
|
17
18
|
withUnpropagatedClick?: boolean | undefined;
|
|
18
19
|
};
|
|
19
|
-
export declare function IconButton({ accent, badgeBackgroundColor, badgeColor, badgeNumber, className, color, Icon, iconSize, isCompact, onClick, size, type, withUnpropagatedClick, ...nativeProps }: IconButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export declare function IconButton({ accent, badgeBackgroundColor, badgeColor, badgeNumber, className, color, Icon, iconSize, isCompact, onClick, size, style, type, withUnpropagatedClick, ...nativeProps }: IconButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
20
21
|
//# sourceMappingURL=IconButton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../src/elements/IconButton.tsx"],"names":[],"mappings":"AACA,OAAO,EAA4B,KAAK,oBAAoB,EAAE,KAAK,iBAAiB,EAAe,MAAM,OAAO,CAAA;AAIhH,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAC3C,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,sBAAsB,CAAA;AASrD,MAAM,MAAM,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G;IACxF,IAAI,EAAE,iBAAiB,CAAC,SAAS,CAAC,CAAA;IAClC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,oBAAoB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACzC,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC/B,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAChC,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,sDAAsD;IACtD,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC7B,wCAAwC;IACxC,SAAS,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;IAC/B,IAAI,CAAC,EAAE,IAAI,GAAG,SAAS,CAAA;IACvB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,GAAG,SAAS,CAAA;IACvC,yCAAyC;IACzC,qBAAqB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;CAC5C,CAAA;AACD,wBAAgB,UAAU,CAAC,EACzB,MAAuB,EACvB,oBAAoB,EACpB,UAAU,EACV,WAAW,EACX,SAAS,EACT,KAAK,EACL,IAAI,EACJ,QAAQ,EACR,SAAS,EACT,OAAO,EACP,IAAkB,EAClB,KAAK,EACL,IAAe,EACf,qBAA6B,EAC7B,GAAG,WAAW,EACf,EAAE,eAAe,2CAqEjB"}
|
package/index.js
CHANGED
|
@@ -53566,7 +53566,7 @@ const ICON_SIZE_IN_PX = {
|
|
|
53566
53566
|
[Size.NORMAL]: 20,
|
|
53567
53567
|
[Size.SMALL]: 14
|
|
53568
53568
|
};
|
|
53569
|
-
function IconButton({ accent = Accent.PRIMARY, badgeBackgroundColor, badgeColor, badgeNumber, className, color, Icon, iconSize, isCompact, onClick, size = Size.NORMAL, type = 'button', withUnpropagatedClick = false, ...nativeProps }) {
|
|
53569
|
+
function IconButton({ accent = Accent.PRIMARY, badgeBackgroundColor, badgeColor, badgeNumber, className, color, Icon, iconSize, isCompact, onClick, size = Size.NORMAL, style, type = 'button', withUnpropagatedClick = false, ...nativeProps }) {
|
|
53570
53570
|
const handleClick = useCallback((event)=>{
|
|
53571
53571
|
if (withUnpropagatedClick) {
|
|
53572
53572
|
stopMouseEventPropagation(event);
|
|
@@ -53589,14 +53589,13 @@ function IconButton({ accent = Accent.PRIMARY, badgeBackgroundColor, badgeColor,
|
|
|
53589
53589
|
]);
|
|
53590
53590
|
const commonProps = useMemo(()=>({
|
|
53591
53591
|
children: commonChildren,
|
|
53592
|
-
className: classnames('Element-IconButton'
|
|
53592
|
+
className: classnames('Element-IconButton'),
|
|
53593
53593
|
isCompact,
|
|
53594
53594
|
onClick: handleClick,
|
|
53595
53595
|
size,
|
|
53596
53596
|
type,
|
|
53597
53597
|
...nativeProps
|
|
53598
53598
|
}), [
|
|
53599
|
-
className,
|
|
53600
53599
|
commonChildren,
|
|
53601
53600
|
handleClick,
|
|
53602
53601
|
isCompact,
|
|
@@ -53607,6 +53606,8 @@ function IconButton({ accent = Accent.PRIMARY, badgeBackgroundColor, badgeColor,
|
|
|
53607
53606
|
switch(accent){
|
|
53608
53607
|
case Accent.SECONDARY:
|
|
53609
53608
|
return /*#__PURE__*/ jsxs(Wrapper$2, {
|
|
53609
|
+
className: className,
|
|
53610
|
+
style: style,
|
|
53610
53611
|
children: [
|
|
53611
53612
|
!!badgeNumber && /*#__PURE__*/ jsx(BadgeNumber, {
|
|
53612
53613
|
backgroundColor: badgeBackgroundColor,
|
|
@@ -53622,6 +53623,8 @@ function IconButton({ accent = Accent.PRIMARY, badgeBackgroundColor, badgeColor,
|
|
|
53622
53623
|
});
|
|
53623
53624
|
case Accent.TERTIARY:
|
|
53624
53625
|
return /*#__PURE__*/ jsxs(Wrapper$2, {
|
|
53626
|
+
className: className,
|
|
53627
|
+
style: style,
|
|
53625
53628
|
children: [
|
|
53626
53629
|
!!badgeNumber && /*#__PURE__*/ jsx(BadgeNumber, {
|
|
53627
53630
|
backgroundColor: badgeBackgroundColor,
|
|
@@ -53637,6 +53640,8 @@ function IconButton({ accent = Accent.PRIMARY, badgeBackgroundColor, badgeColor,
|
|
|
53637
53640
|
});
|
|
53638
53641
|
default:
|
|
53639
53642
|
return /*#__PURE__*/ jsxs(Wrapper$2, {
|
|
53643
|
+
className: className,
|
|
53644
|
+
style: style,
|
|
53640
53645
|
children: [
|
|
53641
53646
|
!!badgeNumber && /*#__PURE__*/ jsx(BadgeNumber, {
|
|
53642
53647
|
backgroundColor: badgeBackgroundColor,
|
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": "21.
|
|
4
|
+
"version": "21.1.0",
|
|
5
5
|
"license": "AGPL-3.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"engines": {
|