@mtes-mct/monitor-ui 18.5.0 → 18.5.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.
@@ -1,14 +1,14 @@
1
1
  import type { LabelHTMLAttributes } from 'react';
2
2
  export type LabelProps = LabelHTMLAttributes<HTMLLabelElement> & {
3
- $isHidden?: boolean | undefined;
4
3
  $isRequired?: boolean | undefined;
5
4
  disabled?: boolean | undefined;
6
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
- $isHidden?: boolean | undefined;
10
9
  $isRequired?: boolean | undefined;
11
10
  disabled?: boolean | undefined;
12
11
  hasError?: boolean | undefined;
13
- }, "disabled" | keyof LabelHTMLAttributes<HTMLLabelElement> | "$isHidden" | "$isRequired" | "hasError">;
12
+ isHidden?: boolean | undefined;
13
+ }, "disabled" | keyof LabelHTMLAttributes<HTMLLabelElement> | "isHidden" | "$isRequired" | "hasError">;
14
14
  //# sourceMappingURL=Label.d.ts.map
@@ -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,SAAS,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;IAC/B,WAAW,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;IACjC,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;IAC9B,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;CAC/B,CAAA;AACD,eAAO,MAAM,KAAK;gBALJ,OAAO,GAAG,SAAS;kBACjB,OAAO,GAAG,SAAS;eACtB,OAAO,GAAG,SAAS;eACnB,OAAO,GAAG,SAAS;uGA4B/B,CAAA"}
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,WAAW,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;IACjC,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;IAC9B,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;IAC9B,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;CAC/B,CAAA;AACD,eAAO,MAAM,KAAK;kBALF,OAAO,GAAG,SAAS;eACtB,OAAO,GAAG,SAAS;eACnB,OAAO,GAAG,SAAS;eACnB,OAAO,GAAG,SAAS;sGAmB/B,CAAA"}
package/index.js CHANGED
@@ -54234,6 +54234,7 @@ const Label = styled.label.attrs((props)=>({
54234
54234
  }))`
54235
54235
  color: ${(p)=>// eslint-disable-next-line no-nested-ternary
54236
54236
  p.disabled ? p.theme.color.lightGray : p.hasError ? p.theme.color.maximumRed : p.theme.color.slateGray};
54237
+ display: ${(p)=>p.isHidden ? 'none' : 'block'};
54237
54238
  font-size: 13px;
54238
54239
  line-height: 1.3846;
54239
54240
  margin-bottom: 4px;
@@ -54242,14 +54243,6 @@ const Label = styled.label.attrs((props)=>({
54242
54243
  content:" *";
54243
54244
  color: ${p.theme.color.maximumRed};
54244
54245
  }`}
54245
- ${(p)=>p.$isHidden && `
54246
- position:absolute;
54247
- left:-10000px;
54248
- top:auto;
54249
- width:1px;
54250
- height:1px;
54251
- overflow:hidden;
54252
- `}
54253
54246
  `;
54254
54247
 
54255
54248
  const Link$1 = styled.a`
@@ -55184,10 +55177,10 @@ function CheckPicker({ className, customSearch, customSearchMinQueryLength = 1,
55184
55177
  style: style,
55185
55178
  children: [
55186
55179
  /*#__PURE__*/ jsx(Label, {
55187
- $isHidden: isLabelHidden,
55188
55180
  $isRequired: isRequired,
55189
55181
  disabled: disabled,
55190
55182
  htmlFor: originalProps.name,
55183
+ isHidden: isLabelHidden,
55191
55184
  children: label
55192
55185
  }),
55193
55186
  /*#__PURE__*/ jsx(StyledRsuitePickerBox, {
@@ -67747,10 +67740,10 @@ function MultiCascader({ className, disabled = false, error, isErrorMessageHidde
67747
67740
  style: style,
67748
67741
  children: [
67749
67742
  /*#__PURE__*/ jsx(Label, {
67750
- $isHidden: isLabelHidden,
67751
67743
  $isRequired: isRequired,
67752
67744
  disabled: disabled,
67753
67745
  htmlFor: originalProps.name,
67746
+ isHidden: isLabelHidden,
67754
67747
  children: label
67755
67748
  }),
67756
67749
  /*#__PURE__*/ jsx(Box$1, {
@@ -67880,10 +67873,10 @@ function MultiSelect({ className, customSearch, customSearchMinQueryLength = 1,
67880
67873
  style: style,
67881
67874
  children: [
67882
67875
  /*#__PURE__*/ jsx(Label, {
67883
- $isHidden: isLabelHidden,
67884
67876
  $isRequired: isRequired,
67885
67877
  disabled: disabled,
67886
67878
  htmlFor: originalProps.name,
67879
+ isHidden: isLabelHidden,
67887
67880
  children: label
67888
67881
  }),
67889
67882
  /*#__PURE__*/ jsx(Box, {
@@ -68418,10 +68411,10 @@ function NumberInput({ className, disabled = false, error, isErrorMessageHidden
68418
68411
  style: style,
68419
68412
  children: [
68420
68413
  /*#__PURE__*/ jsx(Label, {
68421
- $isHidden: isLabelHidden,
68422
68414
  $isRequired: isRequired,
68423
68415
  disabled: disabled,
68424
68416
  htmlFor: name,
68417
+ isHidden: isLabelHidden,
68425
68418
  children: label
68426
68419
  }),
68427
68420
  /*#__PURE__*/ jsx(StyledInput, {
@@ -68592,10 +68585,10 @@ const defaultFormat = {
68592
68585
  className: "Field-PhoneInput",
68593
68586
  children: [
68594
68587
  /*#__PURE__*/ jsx(Label, {
68595
- $isHidden: isLabelHidden,
68596
68588
  $isRequired: isRequired,
68597
68589
  disabled: disabled,
68598
68590
  htmlFor: name,
68591
+ isHidden: isLabelHidden,
68599
68592
  children: label
68600
68593
  }),
68601
68594
  /*#__PURE__*/ jsx(StyledIMaskInput, {
@@ -68860,10 +68853,10 @@ function Search({ className, customSearch = undefined, customSearchMinQueryLengt
68860
68853
  style: style,
68861
68854
  children: [
68862
68855
  /*#__PURE__*/ jsx(Label, {
68863
- $isHidden: isLabelHidden,
68864
68856
  $isRequired: isRequired,
68865
68857
  disabled: disabled,
68866
68858
  htmlFor: originalProps.name,
68859
+ isHidden: isLabelHidden,
68867
68860
  children: label
68868
68861
  }),
68869
68862
  /*#__PURE__*/ jsxs(StyledInputBox, {
@@ -69024,10 +69017,10 @@ function Select({ className, customSearch, customSearchMinQueryLength = 1, disab
69024
69017
  style: style,
69025
69018
  children: [
69026
69019
  /*#__PURE__*/ jsx(Label, {
69027
- $isHidden: isLabelHidden,
69028
69020
  $isRequired: isRequired,
69029
69021
  disabled: disabled,
69030
69022
  htmlFor: originalProps.name,
69023
+ isHidden: isLabelHidden,
69031
69024
  children: label
69032
69025
  }),
69033
69026
  /*#__PURE__*/ jsx(StyledRsuitePickerBox, {
@@ -69099,10 +69092,10 @@ function Textarea({ className, disabled = false, error, isErrorMessageHidden = f
69099
69092
  style: style,
69100
69093
  children: [
69101
69094
  /*#__PURE__*/ jsx(Label, {
69102
- $isHidden: isLabelHidden,
69103
69095
  $isRequired: isRequired,
69104
69096
  disabled: disabled,
69105
69097
  htmlFor: originalProps.name,
69098
+ isHidden: isLabelHidden,
69106
69099
  children: label
69107
69100
  }),
69108
69101
  /*#__PURE__*/ jsx(StyledRsuiteInput, {
@@ -69202,10 +69195,10 @@ function TextInput({ className, disabled = false, error, Icon, isErrorMessageHid
69202
69195
  style: style,
69203
69196
  children: [
69204
69197
  /*#__PURE__*/ jsx(Label, {
69205
- $isHidden: isLabelHidden,
69206
69198
  $isRequired: isRequired,
69207
69199
  disabled: disabled,
69208
69200
  htmlFor: name,
69201
+ isHidden: isLabelHidden,
69209
69202
  children: label
69210
69203
  }),
69211
69204
  /*#__PURE__*/ jsxs(StyledInputBox, {
@@ -69358,10 +69351,10 @@ function Toggle({ checked = false, className, dataCy, disabled = false, error, i
69358
69351
  style: style,
69359
69352
  children: [
69360
69353
  /*#__PURE__*/ jsx(Label, {
69361
- $isHidden: isLabelHidden,
69362
69354
  $isRequired: isRequired,
69363
69355
  disabled: disabled,
69364
69356
  htmlFor: originalProps.name,
69357
+ isHidden: isLabelHidden,
69365
69358
  children: label
69366
69359
  }),
69367
69360
  /*#__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": "18.5.0",
4
+ "version": "18.5.1",
5
5
  "license": "AGPL-3.0",
6
6
  "type": "module",
7
7
  "engines": {