@mtes-mct/monitor-ui 21.3.0 → 22.0.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 +12 -0
- package/elements/Label.d.ts +7 -7
- package/elements/Label.d.ts.map +1 -1
- package/index.js +25 -25
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
## [21.3.0](https://github.com/MTES-MCT/monitor-ui/compare/v21.2.1...v21.3.0) (2024-09-06)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **fields:** add areArrowsHidden prop to NumberInput ([6dad78e](https://github.com/MTES-MCT/monitor-ui/commit/6dad78ea5406295ee0cf97cc2dc7355c3d655761))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Buid System & Dependencies
|
|
10
|
+
|
|
11
|
+
* **deps:** bump @babel/runtime in the non-major-dependencies group ([ad6262c](https://github.com/MTES-MCT/monitor-ui/commit/ad6262c22e5cdfa701e9f72a2519b65bd5e2be3e))
|
|
12
|
+
|
|
1
13
|
## [21.2.1](https://github.com/MTES-MCT/monitor-ui/compare/v21.2.0...v21.2.1) (2024-09-06)
|
|
2
14
|
|
|
3
15
|
|
package/elements/Label.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import type { LabelHTMLAttributes } from 'react';
|
|
2
2
|
export type LabelProps = LabelHTMLAttributes<HTMLLabelElement> & {
|
|
3
|
+
$hasError?: boolean | undefined;
|
|
4
|
+
$idDisabled?: boolean | undefined;
|
|
5
|
+
$isHidden?: boolean | undefined;
|
|
3
6
|
$isRequired?: boolean | undefined;
|
|
4
|
-
disabled?: boolean | undefined;
|
|
5
|
-
hasError?: boolean | undefined;
|
|
6
|
-
isHidden?: boolean | undefined;
|
|
7
7
|
};
|
|
8
8
|
export declare const Label: import("styled-components").StyledComponent<"label", import("styled-components").DefaultTheme, LabelHTMLAttributes<HTMLLabelElement> & {
|
|
9
|
+
$hasError?: boolean | undefined;
|
|
10
|
+
$idDisabled?: boolean | undefined;
|
|
11
|
+
$isHidden?: boolean | undefined;
|
|
9
12
|
$isRequired?: boolean | undefined;
|
|
10
|
-
|
|
11
|
-
hasError?: boolean | undefined;
|
|
12
|
-
isHidden?: boolean | undefined;
|
|
13
|
-
}, "disabled" | keyof LabelHTMLAttributes<HTMLLabelElement> | "isHidden" | "$isRequired" | "hasError">;
|
|
13
|
+
}, keyof LabelHTMLAttributes<HTMLLabelElement> | "$isHidden" | "$isRequired" | "$hasError" | "$idDisabled">;
|
|
14
14
|
//# sourceMappingURL=Label.d.ts.map
|
package/elements/Label.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Label.d.ts","sourceRoot":"","sources":["../../src/elements/Label.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,OAAO,CAAA;AAEhD,MAAM,MAAM,UAAU,GAAG,mBAAmB,CAAC,gBAAgB,CAAC,GAAG;IAC/D,
|
|
1
|
+
{"version":3,"file":"Label.d.ts","sourceRoot":"","sources":["../../src/elements/Label.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,OAAO,CAAA;AAEhD,MAAM,MAAM,UAAU,GAAG,mBAAmB,CAAC,gBAAgB,CAAC,GAAG;IAC/D,SAAS,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;IAC/B,WAAW,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;IACjC,SAAS,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;IAC/B,WAAW,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;CAClC,CAAA;AACD,eAAO,MAAM,KAAK;gBALJ,OAAO,GAAG,SAAS;kBACjB,OAAO,GAAG,SAAS;gBACrB,OAAO,GAAG,SAAS;kBACjB,OAAO,GAAG,SAAS;2GAmBlC,CAAA"}
|
package/index.js
CHANGED
|
@@ -53465,11 +53465,11 @@ const PADDING$2 = {
|
|
|
53465
53465
|
const StyledButton$1 = styled.button`
|
|
53466
53466
|
align-items: center;
|
|
53467
53467
|
display: inline-flex;
|
|
53468
|
-
font-size: ${(p)=>FONT_SIZE$1[p
|
|
53468
|
+
font-size: ${(p)=>FONT_SIZE$1[p.$size]};
|
|
53469
53469
|
justify-content: center;
|
|
53470
53470
|
max-width: 100%;
|
|
53471
|
-
padding: ${(p)=>PADDING$2[p
|
|
53472
|
-
width: ${(p)=>p
|
|
53471
|
+
padding: ${(p)=>PADDING$2[p.$size]};
|
|
53472
|
+
width: ${(p)=>p.$isFullWidth ? '100%' : 'auto'};
|
|
53473
53473
|
|
|
53474
53474
|
> .Element-IconBox {
|
|
53475
53475
|
margin-right: 5px;
|
|
@@ -54433,8 +54433,8 @@ const Label = styled.label.attrs((props)=>({
|
|
|
54433
54433
|
className: classnames('Element-Label', props.className)
|
|
54434
54434
|
}))`
|
|
54435
54435
|
color: ${(p)=>// eslint-disable-next-line no-nested-ternary
|
|
54436
|
-
p
|
|
54437
|
-
display: ${(p)=>p
|
|
54436
|
+
p.$idDisabled ? p.theme.color.lightGray : p.$hasError ? p.theme.color.maximumRed : p.theme.color.slateGray};
|
|
54437
|
+
display: ${(p)=>p.$isHidden ? 'none' : 'block'};
|
|
54438
54438
|
font-size: 13px;
|
|
54439
54439
|
line-height: 1.3846;
|
|
54440
54440
|
margin-bottom: 4px;
|
|
@@ -55377,10 +55377,10 @@ function CheckPicker({ className, customSearch, customSearchMinQueryLength = 1,
|
|
|
55377
55377
|
style: style,
|
|
55378
55378
|
children: [
|
|
55379
55379
|
/*#__PURE__*/ jsx(Label, {
|
|
55380
|
+
$idDisabled: disabled,
|
|
55381
|
+
$isHidden: isLabelHidden,
|
|
55380
55382
|
$isRequired: isRequired,
|
|
55381
|
-
disabled: disabled,
|
|
55382
55383
|
htmlFor: originalProps.name,
|
|
55383
|
-
isHidden: isLabelHidden,
|
|
55384
55384
|
children: label
|
|
55385
55385
|
}),
|
|
55386
55386
|
/*#__PURE__*/ jsx(StyledRsuitePickerBox, {
|
|
@@ -67941,10 +67941,10 @@ function MultiCascader({ className, disabled = false, error, isErrorMessageHidde
|
|
|
67941
67941
|
style: style,
|
|
67942
67942
|
children: [
|
|
67943
67943
|
/*#__PURE__*/ jsx(Label, {
|
|
67944
|
+
$idDisabled: disabled,
|
|
67945
|
+
$isHidden: isLabelHidden,
|
|
67944
67946
|
$isRequired: isRequired,
|
|
67945
|
-
disabled: disabled,
|
|
67946
67947
|
htmlFor: originalProps.name,
|
|
67947
|
-
isHidden: isLabelHidden,
|
|
67948
67948
|
children: label
|
|
67949
67949
|
}),
|
|
67950
67950
|
/*#__PURE__*/ jsx(Box$1, {
|
|
@@ -68074,10 +68074,10 @@ function MultiSelect({ className, customSearch, customSearchMinQueryLength = 1,
|
|
|
68074
68074
|
style: style,
|
|
68075
68075
|
children: [
|
|
68076
68076
|
/*#__PURE__*/ jsx(Label, {
|
|
68077
|
+
$idDisabled: disabled,
|
|
68078
|
+
$isHidden: isLabelHidden,
|
|
68077
68079
|
$isRequired: isRequired,
|
|
68078
|
-
disabled: disabled,
|
|
68079
68080
|
htmlFor: originalProps.name,
|
|
68080
|
-
isHidden: isLabelHidden,
|
|
68081
68081
|
children: label
|
|
68082
68082
|
}),
|
|
68083
68083
|
/*#__PURE__*/ jsx(Box, {
|
|
@@ -68612,10 +68612,10 @@ function NumberInput({ areArrowsHidden = false, className, disabled = false, err
|
|
|
68612
68612
|
style: style,
|
|
68613
68613
|
children: [
|
|
68614
68614
|
/*#__PURE__*/ jsx(Label, {
|
|
68615
|
+
$idDisabled: disabled,
|
|
68616
|
+
$isHidden: isLabelHidden,
|
|
68615
68617
|
$isRequired: isRequired,
|
|
68616
|
-
disabled: disabled,
|
|
68617
68618
|
htmlFor: name,
|
|
68618
|
-
isHidden: isLabelHidden,
|
|
68619
68619
|
children: label
|
|
68620
68620
|
}),
|
|
68621
68621
|
/*#__PURE__*/ jsx(StyledInput, {
|
|
@@ -68796,10 +68796,10 @@ const defaultFormat = {
|
|
|
68796
68796
|
className: "Field-PhoneInput",
|
|
68797
68797
|
children: [
|
|
68798
68798
|
/*#__PURE__*/ jsx(Label, {
|
|
68799
|
+
$idDisabled: disabled,
|
|
68800
|
+
$isHidden: isLabelHidden,
|
|
68799
68801
|
$isRequired: isRequired,
|
|
68800
|
-
disabled: disabled,
|
|
68801
68802
|
htmlFor: name,
|
|
68802
|
-
isHidden: isLabelHidden,
|
|
68803
68803
|
children: label
|
|
68804
68804
|
}),
|
|
68805
68805
|
/*#__PURE__*/ jsx(StyledIMaskInput, {
|
|
@@ -69064,10 +69064,10 @@ function Search({ className, customSearch = undefined, customSearchMinQueryLengt
|
|
|
69064
69064
|
style: style,
|
|
69065
69065
|
children: [
|
|
69066
69066
|
/*#__PURE__*/ jsx(Label, {
|
|
69067
|
+
$idDisabled: disabled,
|
|
69068
|
+
$isHidden: isLabelHidden,
|
|
69067
69069
|
$isRequired: isRequired,
|
|
69068
|
-
disabled: disabled,
|
|
69069
69070
|
htmlFor: originalProps.name,
|
|
69070
|
-
isHidden: isLabelHidden,
|
|
69071
69071
|
children: label
|
|
69072
69072
|
}),
|
|
69073
69073
|
/*#__PURE__*/ jsxs(StyledInputBox, {
|
|
@@ -69228,10 +69228,10 @@ function Select({ className, customSearch, customSearchMinQueryLength = 1, disab
|
|
|
69228
69228
|
style: style,
|
|
69229
69229
|
children: [
|
|
69230
69230
|
/*#__PURE__*/ jsx(Label, {
|
|
69231
|
+
$idDisabled: disabled,
|
|
69232
|
+
$isHidden: isLabelHidden,
|
|
69231
69233
|
$isRequired: isRequired,
|
|
69232
|
-
disabled: disabled,
|
|
69233
69234
|
htmlFor: originalProps.name,
|
|
69234
|
-
isHidden: isLabelHidden,
|
|
69235
69235
|
children: label
|
|
69236
69236
|
}),
|
|
69237
69237
|
/*#__PURE__*/ jsx(StyledRsuitePickerBox, {
|
|
@@ -69303,10 +69303,10 @@ function Textarea({ className, disabled = false, error, isErrorMessageHidden = f
|
|
|
69303
69303
|
style: style,
|
|
69304
69304
|
children: [
|
|
69305
69305
|
/*#__PURE__*/ jsx(Label, {
|
|
69306
|
+
$idDisabled: disabled,
|
|
69307
|
+
$isHidden: isLabelHidden,
|
|
69306
69308
|
$isRequired: isRequired,
|
|
69307
|
-
disabled: disabled,
|
|
69308
69309
|
htmlFor: originalProps.name,
|
|
69309
|
-
isHidden: isLabelHidden,
|
|
69310
69310
|
children: label
|
|
69311
69311
|
}),
|
|
69312
69312
|
/*#__PURE__*/ jsx(StyledRsuiteInput, {
|
|
@@ -69406,10 +69406,10 @@ function TextInput({ className, disabled = false, error, Icon, isErrorMessageHid
|
|
|
69406
69406
|
style: style,
|
|
69407
69407
|
children: [
|
|
69408
69408
|
/*#__PURE__*/ jsx(Label, {
|
|
69409
|
+
$idDisabled: disabled,
|
|
69410
|
+
$isHidden: isLabelHidden,
|
|
69409
69411
|
$isRequired: isRequired,
|
|
69410
|
-
disabled: disabled,
|
|
69411
69412
|
htmlFor: name,
|
|
69412
|
-
isHidden: isLabelHidden,
|
|
69413
69413
|
children: label
|
|
69414
69414
|
}),
|
|
69415
69415
|
/*#__PURE__*/ jsxs(RestyledStyledInputBox, {
|
|
@@ -69569,10 +69569,10 @@ function Toggle({ checked = false, className, dataCy, disabled = false, error, i
|
|
|
69569
69569
|
style: style,
|
|
69570
69570
|
children: [
|
|
69571
69571
|
/*#__PURE__*/ jsx(Label, {
|
|
69572
|
+
$idDisabled: disabled,
|
|
69573
|
+
$isHidden: isLabelHidden,
|
|
69572
69574
|
$isRequired: isRequired,
|
|
69573
|
-
disabled: disabled,
|
|
69574
69575
|
htmlFor: originalProps.name,
|
|
69575
|
-
isHidden: isLabelHidden,
|
|
69576
69576
|
children: label
|
|
69577
69577
|
}),
|
|
69578
69578
|
/*#__PURE__*/ jsx(StyledToggle, {
|
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": "
|
|
4
|
+
"version": "22.0.0",
|
|
5
5
|
"license": "AGPL-3.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"engines": {
|