@mtes-mct/monitor-ui 23.1.2 → 23.1.3
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 +12 -0
- package/elements/Button/BaseButton.d.ts +8 -0
- package/elements/Button/BaseButton.d.ts.map +1 -0
- package/elements/Button/index.d.ts +2 -2
- package/elements/Button/index.d.ts.map +1 -1
- package/elements/IconButton/BaseIconButton.d.ts +8 -0
- package/elements/IconButton/BaseIconButton.d.ts.map +1 -0
- package/elements/{IconButton.d.ts → IconButton/index.d.ts} +3 -3
- package/elements/IconButton/index.d.ts.map +1 -0
- package/elements/SingleTag.d.ts.map +1 -1
- package/index.js +76 -57
- package/libs/CustomSearch/types.d.ts +2 -2
- package/libs/CustomSearch/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/elements/IconButton.d.ts.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
## [23.1.2](https://github.com/MTES-MCT/monitor-ui/compare/v23.1.1...v23.1.2) (2024-09-26)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **fields:** handle id with special chars in Select pointer-events hack ([271e475](https://github.com/MTES-MCT/monitor-ui/commit/271e475b33fa570269925b6127f6c035be86aa60))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Code Refactoring
|
|
10
|
+
|
|
11
|
+
* **components:** simplify stylesheets injection in NewWindow ([9ca5417](https://github.com/MTES-MCT/monitor-ui/commit/9ca54179c8a4bda6e3504cd87b9c923a5b154c99))
|
|
12
|
+
|
|
1
13
|
## [23.1.1](https://github.com/MTES-MCT/monitor-ui/compare/v23.1.0...v23.1.1) (2024-09-26)
|
|
2
14
|
|
|
3
15
|
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Size } from '@constants';
|
|
2
|
+
import { type ButtonHTMLAttributes } from 'react';
|
|
3
|
+
export type BaseButtonProps = ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
4
|
+
$isFullWidth: boolean;
|
|
5
|
+
$size: Size;
|
|
6
|
+
};
|
|
7
|
+
export declare const BaseButton: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, BaseButtonProps, never>;
|
|
8
|
+
//# sourceMappingURL=BaseButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BaseButton.d.ts","sourceRoot":"","sources":["../../../src/elements/Button/BaseButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AACjC,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,OAAO,CAAA;AAcjD,MAAM,MAAM,eAAe,GAAG,oBAAoB,CAAC,iBAAiB,CAAC,GAAG;IACtE,YAAY,EAAE,OAAO,CAAA;IACrB,KAAK,EAAE,IAAI,CAAA;CACZ,CAAA;AACD,eAAO,MAAM,UAAU,yHAYtB,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { Accent, Size } from '@constants';
|
|
2
|
+
import { type IconProps } from '@types_/definitions';
|
|
1
3
|
import { type ButtonHTMLAttributes, type FunctionComponent } from 'react';
|
|
2
|
-
import { Accent, Size } from '../../constants';
|
|
3
|
-
import { type IconProps } from '../../types/definitions';
|
|
4
4
|
export type ButtonProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'children'> & {
|
|
5
5
|
Icon?: FunctionComponent<IconProps> | undefined;
|
|
6
6
|
accent?: Accent | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/elements/Button/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/elements/Button/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AACzC,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAGpD,OAAO,EAAyC,KAAK,oBAAoB,EAAE,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAA;AAYhH,MAAM,MAAM,WAAW,GAAG,IAAI,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,UAAU,CAAC,GAAG;IACpF,IAAI,CAAC,EAAE,iBAAiB,CAAC,SAAS,CAAC,GAAG,SAAS,CAAA;IAC/C,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC7B,WAAW,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;IACjC,IAAI,CAAC,EAAE,IAAI,GAAG,SAAS,CAAA;IACvB,yCAAyC;IACzC,qBAAqB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;CAC5C,CAAA;AACD,wBAAgB,MAAM,CAAC,EACrB,MAAuB,EACvB,QAAQ,EACR,SAAS,EACT,IAAI,EACJ,WAAmB,EACnB,OAAO,EACP,IAAkB,EAClB,IAAe,EACf,qBAA6B,EAC7B,GAAG,WAAW,EACf,EAAE,WAAW,2CAmDb"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Size } from '@constants';
|
|
2
|
+
import { type ButtonHTMLAttributes } from 'react';
|
|
3
|
+
export type BaseIconButtonProps = ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
4
|
+
$isCompact: boolean | undefined;
|
|
5
|
+
$size: Size;
|
|
6
|
+
};
|
|
7
|
+
export declare const BaseIconButton: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, BaseIconButtonProps, never>;
|
|
8
|
+
//# sourceMappingURL=BaseIconButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BaseIconButton.d.ts","sourceRoot":"","sources":["../../../src/elements/IconButton/BaseIconButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AACjC,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,OAAO,CAAA;AASjD,MAAM,MAAM,mBAAmB,GAAG,oBAAoB,CAAC,iBAAiB,CAAC,GAAG;IAC1E,UAAU,EAAE,OAAO,GAAG,SAAS,CAAA;IAC/B,KAAK,EAAE,IAAI,CAAA;CACZ,CAAA;AACD,eAAO,MAAM,cAAc,6HAO1B,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { Accent, Size } from '@constants';
|
|
2
|
+
import { type IconProps } from '@types_/definitions';
|
|
1
3
|
import { type ButtonHTMLAttributes, type FunctionComponent } from 'react';
|
|
2
|
-
import { Accent, Size } from '../constants';
|
|
3
|
-
import { type IconProps } from '../types/definitions';
|
|
4
4
|
export type IconButtonProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'children'> & {
|
|
5
5
|
Icon: FunctionComponent<IconProps>;
|
|
6
6
|
accent?: Accent | undefined;
|
|
@@ -18,4 +18,4 @@ export type IconButtonProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'chi
|
|
|
18
18
|
withUnpropagatedClick?: boolean | undefined;
|
|
19
19
|
};
|
|
20
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;
|
|
21
|
-
//# sourceMappingURL=
|
|
21
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/elements/IconButton/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AACzC,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAGpD,OAAO,EAA4B,KAAK,oBAAoB,EAAE,KAAK,iBAAiB,EAAe,MAAM,OAAO,CAAA;AAYhH,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,UAAU,CAAC,GAAG;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,2CAmFjB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SingleTag.d.ts","sourceRoot":"","sources":["../../src/elements/SingleTag.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,cAAc,EAAe,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"SingleTag.d.ts","sourceRoot":"","sources":["../../src/elements/SingleTag.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,cAAc,EAAe,MAAM,OAAO,CAAA;AAGxD,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAGrC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAA;AAE3C,MAAM,MAAM,cAAc,GAAG,cAAc,CAAC,cAAc,CAAC,GAAG;IAC5D,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,MAAM,UAAU,CAAC,IAAI,CAAC,CAAA;CACjC,CAAA;AACD,wBAAgB,SAAS,CAAC,EAAE,MAAuB,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,WAAW,EAAE,EAAE,cAAc,2CAgCnH"}
|
package/index.js
CHANGED
|
@@ -53390,6 +53390,20 @@ function Notifier({ isSideWindow = false }) {
|
|
|
53390
53390
|
// We need to retype `ToastContainer` manually because `styled-components` mess up with the `children` prop
|
|
53391
53391
|
const StyledToastContainer = styled(k)``;
|
|
53392
53392
|
|
|
53393
|
+
const PADDING$2 = {
|
|
53394
|
+
[Size.LARGE]: '7px',
|
|
53395
|
+
[Size.NORMAL]: '5px',
|
|
53396
|
+
[Size.SMALL]: '3px'
|
|
53397
|
+
};
|
|
53398
|
+
const BaseIconButton$1 = styled.button`
|
|
53399
|
+
align-items: center;
|
|
53400
|
+
border-style: solid;
|
|
53401
|
+
border-width: ${(p)=>p.$isCompact ? 0 : 1}px;
|
|
53402
|
+
display: flex;
|
|
53403
|
+
justify-content: center;
|
|
53404
|
+
padding: ${(p)=>p.$isCompact ? 0 : PADDING$2[p.$size]};
|
|
53405
|
+
`;
|
|
53406
|
+
|
|
53393
53407
|
function getPrimaryButtonCss() {
|
|
53394
53408
|
return css`
|
|
53395
53409
|
background-color: ${(p)=>p.theme.color.charcoal};
|
|
@@ -53556,11 +53570,6 @@ function IconButton({ accent = Accent.PRIMARY, badgeBackgroundColor, badgeColor,
|
|
|
53556
53570
|
});
|
|
53557
53571
|
}
|
|
53558
53572
|
}
|
|
53559
|
-
const PADDING$2 = {
|
|
53560
|
-
[Size.LARGE]: '7px',
|
|
53561
|
-
[Size.NORMAL]: '5px',
|
|
53562
|
-
[Size.SMALL]: '3px'
|
|
53563
|
-
};
|
|
53564
53573
|
const Wrapper$2 = styled.div`
|
|
53565
53574
|
position: relative;
|
|
53566
53575
|
`;
|
|
@@ -53585,16 +53594,8 @@ const BadgeNumber = styled.div`
|
|
|
53585
53594
|
letter-spacing: 0px;
|
|
53586
53595
|
font-weight: 700;
|
|
53587
53596
|
`;
|
|
53588
|
-
const
|
|
53589
|
-
|
|
53590
|
-
border-style: solid;
|
|
53591
|
-
border-width: ${(p)=>p.$isCompact ? 0 : 1}px;
|
|
53592
|
-
display: flex;
|
|
53593
|
-
justify-content: center;
|
|
53594
|
-
padding: ${(p)=>p.$isCompact ? 0 : PADDING$2[p.$size]};
|
|
53595
|
-
`;
|
|
53596
|
-
const PrimaryButton$1 = styled(BaseButton$1)(getPrimaryButtonCss);
|
|
53597
|
-
const SecondaryButton$1 = styled(BaseButton$1)(getSecondaryButtonCss);
|
|
53597
|
+
const PrimaryButton$1 = styled(BaseIconButton$1)(getPrimaryButtonCss);
|
|
53598
|
+
const SecondaryButton$1 = styled(BaseIconButton$1)(getSecondaryButtonCss);
|
|
53598
53599
|
const TertiaryButton$1 = styled.button`
|
|
53599
53600
|
background-color: transparent;
|
|
53600
53601
|
border-color: transparent;
|
|
@@ -53683,7 +53684,8 @@ const SideMenu = Object.assign(Menu, {
|
|
|
53683
53684
|
});
|
|
53684
53685
|
|
|
53685
53686
|
function SingleTag({ accent = Accent.PRIMARY, children, className, onDelete, ...nativeProps }) {
|
|
53686
|
-
|
|
53687
|
+
// TODO Remove `Component-SingleTag` in a next major/breaking version.
|
|
53688
|
+
const controlledClassName = classnames('Component-SingleTag', 'Element-SingleTag', className);
|
|
53687
53689
|
const handleDelete = useCallback(()=>{
|
|
53688
53690
|
if (onDelete) {
|
|
53689
53691
|
onDelete();
|
|
@@ -53701,13 +53703,14 @@ function SingleTag({ accent = Accent.PRIMARY, children, className, onDelete, ...
|
|
|
53701
53703
|
children: children
|
|
53702
53704
|
}),
|
|
53703
53705
|
/*#__PURE__*/ jsx(SecondaryIconButton, {
|
|
53704
|
-
|
|
53705
|
-
|
|
53706
|
-
|
|
53707
|
-
|
|
53706
|
+
onClick: handleDelete,
|
|
53707
|
+
children: /*#__PURE__*/ jsx(Close, {
|
|
53708
|
+
size: 10
|
|
53709
|
+
})
|
|
53708
53710
|
})
|
|
53709
53711
|
]
|
|
53710
53712
|
});
|
|
53713
|
+
case Accent.PRIMARY:
|
|
53711
53714
|
default:
|
|
53712
53715
|
return /*#__PURE__*/ jsxs(Box$d, {
|
|
53713
53716
|
className: controlledClassName,
|
|
@@ -53717,10 +53720,10 @@ function SingleTag({ accent = Accent.PRIMARY, children, className, onDelete, ...
|
|
|
53717
53720
|
children: children
|
|
53718
53721
|
}),
|
|
53719
53722
|
/*#__PURE__*/ jsx(PrimaryIconButton, {
|
|
53720
|
-
|
|
53721
|
-
|
|
53722
|
-
|
|
53723
|
-
|
|
53723
|
+
onClick: handleDelete,
|
|
53724
|
+
children: /*#__PURE__*/ jsx(Close, {
|
|
53725
|
+
size: 10
|
|
53726
|
+
})
|
|
53724
53727
|
})
|
|
53725
53728
|
]
|
|
53726
53729
|
});
|
|
@@ -53731,6 +53734,14 @@ const Box$d = styled.div`
|
|
|
53731
53734
|
display: inline-flex;
|
|
53732
53735
|
max-width: 100%;
|
|
53733
53736
|
`;
|
|
53737
|
+
const BaseIconButton = styled.button`
|
|
53738
|
+
align-items: center;
|
|
53739
|
+
display: flex;
|
|
53740
|
+
justify-content: center;
|
|
53741
|
+
line-height: 18px;
|
|
53742
|
+
margin-left: 1px;
|
|
53743
|
+
padding: 8px;
|
|
53744
|
+
`;
|
|
53734
53745
|
const PrimaryText = styled.span`
|
|
53735
53746
|
background-color: ${(p)=>p.theme.color.lightGray};
|
|
53736
53747
|
color: ${(p)=>p.theme.color.gunMetal};
|
|
@@ -53741,50 +53752,59 @@ const PrimaryText = styled.span`
|
|
|
53741
53752
|
text-overflow: ellipsis;
|
|
53742
53753
|
white-space: nowrap;
|
|
53743
53754
|
`;
|
|
53744
|
-
const PrimaryIconButton = styled(
|
|
53755
|
+
const PrimaryIconButton = styled(BaseIconButton)`
|
|
53745
53756
|
background-color: ${(p)=>p.theme.color.lightGray};
|
|
53746
|
-
|
|
53747
|
-
|
|
53748
|
-
padding: 2px 8px 6px;
|
|
53757
|
+
border-color: ${(p)=>p.theme.color.lightGray};
|
|
53758
|
+
color: ${(p)=>p.theme.color.charcoal};
|
|
53749
53759
|
|
|
53750
53760
|
:hover,
|
|
53751
53761
|
&._hover {
|
|
53752
53762
|
background-color: ${(p)=>p.theme.color.lightGray};
|
|
53763
|
+
border-color: ${(p)=>p.theme.color.lightGray};
|
|
53764
|
+
color: ${(p)=>p.theme.color.blueYonder};
|
|
53753
53765
|
}
|
|
53754
53766
|
|
|
53755
53767
|
:active,
|
|
53756
53768
|
&._active {
|
|
53757
53769
|
background-color: ${(p)=>p.theme.color.lightGray};
|
|
53770
|
+
border-color: ${(p)=>p.theme.color.lightGray};
|
|
53771
|
+
color: ${(p)=>p.theme.color.blueGray};
|
|
53758
53772
|
}
|
|
53759
53773
|
|
|
53760
53774
|
:disabled,
|
|
53761
53775
|
&._disabled {
|
|
53762
53776
|
background-color: ${(p)=>p.theme.color.lightGray};
|
|
53777
|
+
border-color: ${(p)=>p.theme.color.lightGray};
|
|
53778
|
+
color: ${(p)=>p.theme.color.lightGray};
|
|
53763
53779
|
}
|
|
53764
53780
|
`;
|
|
53765
53781
|
const SecondaryText = styled(PrimaryText)`
|
|
53766
53782
|
background-color: ${(p)=>p.theme.color.blueYonder};
|
|
53767
53783
|
color: ${(p)=>p.theme.color.white};
|
|
53768
53784
|
`;
|
|
53769
|
-
const SecondaryIconButton = styled(
|
|
53785
|
+
const SecondaryIconButton = styled(BaseIconButton)`
|
|
53770
53786
|
background-color: ${(p)=>p.theme.color.blueYonder};
|
|
53787
|
+
border-color: ${(p)=>p.theme.color.blueYonder};
|
|
53771
53788
|
color: ${(p)=>p.theme.color.white};
|
|
53772
53789
|
|
|
53773
53790
|
:hover,
|
|
53774
53791
|
&._hover {
|
|
53775
53792
|
background-color: ${(p)=>p.theme.color.blueYonder};
|
|
53793
|
+
border-color: ${(p)=>p.theme.color.blueYonder};
|
|
53776
53794
|
color: ${(p)=>p.theme.color.blueYonder25};
|
|
53777
53795
|
}
|
|
53778
53796
|
|
|
53779
53797
|
:active,
|
|
53780
53798
|
&._active {
|
|
53781
53799
|
background-color: ${(p)=>p.theme.color.blueYonder};
|
|
53800
|
+
border-color: ${(p)=>p.theme.color.blueYonder};
|
|
53782
53801
|
color: ${(p)=>p.theme.color.blueYonder25};
|
|
53783
53802
|
}
|
|
53784
53803
|
|
|
53785
53804
|
:disabled,
|
|
53786
53805
|
&._disabled {
|
|
53787
53806
|
background-color: ${(p)=>p.theme.color.blueYonder};
|
|
53807
|
+
border-color: ${(p)=>p.theme.color.blueYonder};
|
|
53788
53808
|
color: ${(p)=>p.theme.color.blueYonder25};
|
|
53789
53809
|
}
|
|
53790
53810
|
`;
|
|
@@ -54160,6 +54180,30 @@ const HideText = styled.span`
|
|
|
54160
54180
|
`;
|
|
54161
54181
|
Banner.displayName = 'Banner';
|
|
54162
54182
|
|
|
54183
|
+
const FONT_SIZE = {
|
|
54184
|
+
[Size.LARGE]: '13px',
|
|
54185
|
+
[Size.NORMAL]: '13px',
|
|
54186
|
+
[Size.SMALL]: '11px'
|
|
54187
|
+
};
|
|
54188
|
+
const PADDING$1 = {
|
|
54189
|
+
[Size.LARGE]: '12px',
|
|
54190
|
+
[Size.NORMAL]: '6px 12px',
|
|
54191
|
+
[Size.SMALL]: '5px 8px 4px'
|
|
54192
|
+
};
|
|
54193
|
+
const BaseButton = styled.button`
|
|
54194
|
+
align-items: center;
|
|
54195
|
+
display: inline-flex;
|
|
54196
|
+
font-size: ${(p)=>FONT_SIZE[p.$size]};
|
|
54197
|
+
justify-content: center;
|
|
54198
|
+
max-width: 100%;
|
|
54199
|
+
padding: ${(p)=>PADDING$1[p.$size]};
|
|
54200
|
+
width: ${(p)=>p.$isFullWidth ? '100%' : 'auto'};
|
|
54201
|
+
|
|
54202
|
+
> .Element-IconBox {
|
|
54203
|
+
margin-right: 5px;
|
|
54204
|
+
}
|
|
54205
|
+
`;
|
|
54206
|
+
|
|
54163
54207
|
const ICON_SIZE = {
|
|
54164
54208
|
[Size.LARGE]: 20,
|
|
54165
54209
|
[Size.NORMAL]: 20,
|
|
@@ -54231,29 +54275,6 @@ function Button({ accent = Accent.PRIMARY, children, className, Icon, isFullWidt
|
|
|
54231
54275
|
});
|
|
54232
54276
|
}
|
|
54233
54277
|
}
|
|
54234
|
-
const FONT_SIZE = {
|
|
54235
|
-
[Size.LARGE]: '13px',
|
|
54236
|
-
[Size.NORMAL]: '13px',
|
|
54237
|
-
[Size.SMALL]: '11px'
|
|
54238
|
-
};
|
|
54239
|
-
const PADDING$1 = {
|
|
54240
|
-
[Size.LARGE]: '12px',
|
|
54241
|
-
[Size.NORMAL]: '6px 12px',
|
|
54242
|
-
[Size.SMALL]: '5px 8px 4px'
|
|
54243
|
-
};
|
|
54244
|
-
const BaseButton = styled.button`
|
|
54245
|
-
align-items: center;
|
|
54246
|
-
display: inline-flex;
|
|
54247
|
-
font-size: ${(p)=>FONT_SIZE[p.$size]};
|
|
54248
|
-
justify-content: center;
|
|
54249
|
-
max-width: 100%;
|
|
54250
|
-
padding: ${(p)=>PADDING$1[p.$size]};
|
|
54251
|
-
width: ${(p)=>p.$isFullWidth ? '100%' : 'auto'};
|
|
54252
|
-
|
|
54253
|
-
> .Element-IconBox {
|
|
54254
|
-
margin-right: 5px;
|
|
54255
|
-
}
|
|
54256
|
-
`;
|
|
54257
54278
|
const ButtonLabel = styled.span`
|
|
54258
54279
|
line-height: 1.3846;
|
|
54259
54280
|
margin-top: -3px;
|
|
@@ -70624,9 +70645,9 @@ diacritics.replacementList = replacementList;
|
|
|
70624
70645
|
diacritics.diacriticsMap = diacriticsMap;
|
|
70625
70646
|
|
|
70626
70647
|
/**
|
|
70627
|
-
* Fuse.js
|
|
70648
|
+
* Fuse.js v7.0.0 - Lightweight fuzzy-search (http://fusejs.io)
|
|
70628
70649
|
*
|
|
70629
|
-
* Copyright (c)
|
|
70650
|
+
* Copyright (c) 2023 Kiro Risk (http://kiro.me)
|
|
70630
70651
|
* All Rights Reserved. Apache Software License 2.0
|
|
70631
70652
|
*
|
|
70632
70653
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
@@ -70724,8 +70745,6 @@ class KeyStore {
|
|
|
70724
70745
|
keys.forEach((key) => {
|
|
70725
70746
|
let obj = createKey(key);
|
|
70726
70747
|
|
|
70727
|
-
totalWeight += obj.weight;
|
|
70728
|
-
|
|
70729
70748
|
this._keys.push(obj);
|
|
70730
70749
|
this._keyMap[obj.id] = obj;
|
|
70731
70750
|
|
|
@@ -72389,7 +72408,7 @@ class Fuse {
|
|
|
72389
72408
|
}
|
|
72390
72409
|
}
|
|
72391
72410
|
|
|
72392
|
-
Fuse.version = '
|
|
72411
|
+
Fuse.version = '7.0.0';
|
|
72393
72412
|
Fuse.createIndex = createIndex;
|
|
72394
72413
|
Fuse.parseIndex = parseIndex;
|
|
72395
72414
|
Fuse.config = Config;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AnyObject } from '../../types/definitions';
|
|
2
|
-
import type
|
|
2
|
+
import type { FuseOptionKeyObject } from 'fuse.js';
|
|
3
3
|
export type CustomSearchCache = Record<string, CustomSearchCacheRecord>;
|
|
4
4
|
export type CustomSearchCacheRecord = {
|
|
5
5
|
fuseSearchIndex: any;
|
|
@@ -7,7 +7,7 @@ export type CustomSearchCacheRecord = {
|
|
|
7
7
|
originalCollection: AnyObject[];
|
|
8
8
|
originalCollectionHash: string;
|
|
9
9
|
};
|
|
10
|
-
export type CustomSearchKey<T> = string |
|
|
10
|
+
export type CustomSearchKey<T> = string | FuseOptionKeyObject<T>;
|
|
11
11
|
export type CustomSearchOptions = Partial<{
|
|
12
12
|
/** Cache search index to avoid Must be unique in the entire application. */
|
|
13
13
|
cacheKey: string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/libs/CustomSearch/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AACxD,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/libs/CustomSearch/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AACxD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAElD,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC,MAAM,EAAE,uBAAuB,CAAC,CAAA;AACvE,MAAM,MAAM,uBAAuB,GAAG;IACpC,eAAe,EAAE,GAAG,CAAA;IACpB,oBAAoB,EAAE,SAAS,EAAE,CAAA;IACjC,kBAAkB,EAAE,SAAS,EAAE,CAAA;IAC/B,sBAAsB,EAAE,MAAM,CAAA;CAC/B,CAAA;AAED,MAAM,MAAM,eAAe,CAAC,CAAC,IAAI,MAAM,GAAG,mBAAmB,CAAC,CAAC,CAAC,CAAA;AAEhE,MAAM,MAAM,mBAAmB,GAAG,OAAO,CAAC;IACxC,4EAA4E;IAC5E,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAA;IAE5B;;;;;OAKG;IACH,eAAe,EAAE,OAAO,CAAA;IAExB,8EAA8E;IAC9E,oBAAoB,EAAE,OAAO,CAAA;IAE7B;;;;;;;OAOG;IACH,QAAQ,EAAE,OAAO,CAAA;IAEjB;;;;;;;;OAQG;IACH,oBAAoB,EAAE,OAAO,CAAA;IAE7B;;;;;;;;;OASG;IACH,SAAS,EAAE,MAAM,CAAA;IAEjB,2DAA2D;IAC3D,qBAAqB,EAAE,OAAO,CAAA;CAC/B,CAAC,CAAA"}
|
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": "23.1.
|
|
4
|
+
"version": "23.1.3",
|
|
5
5
|
"license": "AGPL-3.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"engines": {
|
|
@@ -1 +0,0 @@
|
|
|
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;AAGhH,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAE3C,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,sBAAsB,CAAA;AASrD,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,UAAU,CAAC,GAAG;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,2CAmFjB"}
|