@mtes-mct/monitor-ui 24.9.0 → 24.10.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 CHANGED
@@ -1,3 +1,26 @@
1
+ ## [24.9.1](https://github.com/MTES-MCT/monitor-ui/compare/v24.9.0...v24.9.1) (2024-11-21)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **hooks:** add window definition guard to NewWindowContext ([d75f6d4](https://github.com/MTES-MCT/monitor-ui/commit/d75f6d4fc015d1aff437ce13058e53bee30796ab))
7
+
8
+
9
+ ### Buid System & Dependencies
10
+
11
+ * **deps:** bump cross-spawn ([47e1a27](https://github.com/MTES-MCT/monitor-ui/commit/47e1a27297da9127476e3deae40f0a7d3320f961))
12
+ * **dev-deps:** bump @typescript-eslint/parser from 7.15.0 to 8.14.0 ([8e1f993](https://github.com/MTES-MCT/monitor-ui/commit/8e1f9931598cdf5d592ec3f1e81d1f10fda08432))
13
+ * **dev-deps:** bump cross-spawn ([3b17e54](https://github.com/MTES-MCT/monitor-ui/commit/3b17e54bb8a651b6c6c86e4c2f68f4982c97fee2))
14
+ * **dev-deps:** bump the all-non-major-dependencies group ([a7d4708](https://github.com/MTES-MCT/monitor-ui/commit/a7d47086f27c183bac6ac755bce902959ff7596a))
15
+ * **dev-deps:** bump the non-major-dev-dependencies group with 11 updates ([24adf88](https://github.com/MTES-MCT/monitor-ui/commit/24adf888706511613c2546834a97a9ed9865e2f4))
16
+
17
+ ## [24.9.0](https://github.com/MTES-MCT/monitor-ui/compare/v24.8.0...v24.9.0) (2024-11-14)
18
+
19
+
20
+ ### Features
21
+
22
+ * **icons:** add icons for document ([0a3105b](https://github.com/MTES-MCT/monitor-ui/commit/0a3105bbddbcbdf53eae7e410d6f67723edefb3f))
23
+
1
24
  ## [24.8.0](https://github.com/MTES-MCT/monitor-ui/compare/v24.7.0...v24.8.0) (2024-11-13)
2
25
 
3
26
 
@@ -6,6 +6,7 @@ export type MessageProps = HTMLAttributes<HTMLDivElement> & {
6
6
  children: ReactNode | string;
7
7
  iconColor?: Level | undefined;
8
8
  level?: Level | undefined;
9
+ withoutIcon?: boolean;
9
10
  };
10
- export declare function Message({ children, className, Icon, iconColor, level, ...nativeProps }: MessageProps): import("react/jsx-runtime").JSX.Element;
11
+ export declare function Message({ children, className, Icon, iconColor, level, withoutIcon, ...nativeProps }: MessageProps): import("react/jsx-runtime").JSX.Element;
11
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Message/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAElC,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAMnF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAEpD,MAAM,MAAM,YAAY,GAAG,cAAc,CAAC,cAAc,CAAC,GAAG;IAC1D,IAAI,CAAC,EAAE,iBAAiB,CAAC,SAAS,CAAC,GAAG,SAAS,CAAA;IAC/C,QAAQ,EAAE,SAAS,GAAG,MAAM,CAAA;IAC5B,SAAS,CAAC,EAAE,KAAK,GAAG,SAAS,CAAA;IAC7B,KAAK,CAAC,EAAE,KAAK,GAAG,SAAS,CAAA;CAC1B,CAAA;AACD,wBAAgB,OAAO,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,KAAkB,EAAE,GAAG,WAAW,EAAE,EAAE,YAAY,2CAWjH"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Message/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAElC,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAMnF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAEpD,MAAM,MAAM,YAAY,GAAG,cAAc,CAAC,cAAc,CAAC,GAAG;IAC1D,IAAI,CAAC,EAAE,iBAAiB,CAAC,SAAS,CAAC,GAAG,SAAS,CAAA;IAC/C,QAAQ,EAAE,SAAS,GAAG,MAAM,CAAA;IAC5B,SAAS,CAAC,EAAE,KAAK,GAAG,SAAS,CAAA;IAC7B,KAAK,CAAC,EAAE,KAAK,GAAG,SAAS,CAAA;IACzB,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB,CAAA;AACD,wBAAgB,OAAO,CAAC,EACtB,QAAQ,EACR,SAAS,EACT,IAAI,EACJ,SAAS,EACT,KAAkB,EAClB,WAAW,EACX,GAAG,WAAW,EACf,EAAE,YAAY,2CAWd"}
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/Message/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAClC,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAA;AAG9B,wBAAgB,qBAAqB,YACpB;IAAE,MAAM,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,OAAO,KAAK,CAAA;CAAE,YAmBtD"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/Message/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAClC,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAA;AAG9B,wBAAgB,qBAAqB,YACpB;IAAE,MAAM,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,OAAO,KAAK,CAAA;CAAE,YAkBtD"}
@@ -1 +1 @@
1
- {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/hooks/useNewWindow/context.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAEpD,eAAO,MAAM,gBAAgB,gDAI3B,CAAA"}
1
+ {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/hooks/useNewWindow/context.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAEpD,eAAO,MAAM,gBAAgB,gDAO3B,CAAA"}
package/index.js CHANGED
@@ -53920,19 +53920,18 @@ const DEFAUT_ICON = {
53920
53920
  border: solid 1px ${props.theme.color.goldenPoppyBorder};
53921
53921
  color: ${props.theme.color.gunMetal};
53922
53922
  `;
53923
- // TODO Check `border-color` with Adeline.
53924
53923
  case props.$level === Level.INFO:
53925
53924
  default:
53926
53925
  return `
53927
53926
  background-color: ${props.theme.color.blueGray25};
53928
- border: solid 1px ${props.theme.color.blueGrayBorder};
53927
+ border: solid 1px #AECEEA;
53929
53928
  color: ${props.theme.color.gunMetal};
53930
53929
  `;
53931
53930
  }
53932
53931
  };
53933
53932
  }
53934
53933
 
53935
- function Message({ children, className, Icon, iconColor, level = Level.INFO, ...nativeProps }) {
53934
+ function Message({ children, className, Icon, iconColor, level = Level.INFO, withoutIcon, ...nativeProps }) {
53936
53935
  const controlledClassName = classnames('Component-Message', className);
53937
53936
  const ControlledIcon = Icon ?? DEFAUT_ICON[level];
53938
53937
  const controlledIconColor = iconColor ?? DEFAULT_ICON_COLOR[level];
@@ -53941,7 +53940,7 @@ function Message({ children, className, Icon, iconColor, level = Level.INFO, ...
53941
53940
  className: controlledClassName,
53942
53941
  ...nativeProps,
53943
53942
  children: [
53944
- /*#__PURE__*/ jsx(ControlledIcon, {
53943
+ !withoutIcon && /*#__PURE__*/ jsx(ControlledIcon, {
53945
53944
  color: controlledIconColor
53946
53945
  }),
53947
53946
  /*#__PURE__*/ jsx(ChildrenContainer, {
@@ -53959,7 +53958,6 @@ const ChildrenContainer = styled.div`
53959
53958
  const Box$c = styled.div`
53960
53959
  ${getStyledCssFromLevel()}
53961
53960
 
53962
- border-radius: 2px;
53963
53961
  display: flex;
53964
53962
  font-size: 13px;
53965
53963
  padding: 16px;
@@ -70299,7 +70297,10 @@ function useFieldControl(value, onChange, defaultValueWhenUndefined) {
70299
70297
 
70300
70298
  const NewWindowContext = createContext({
70301
70299
  newWindowContainerRef: {
70302
- current: window.document.createElement('div')
70300
+ // It seems monitor-ui bundle can eager-evaluate `NewWindowContext`
70301
+ // in contexts which don't have `window` global defined.
70302
+ // This any-forced `undefined` should never impact the real webapp initialization.
70303
+ current: typeof window !== 'undefined' ? window.document.createElement('div') : undefined
70303
70304
  }
70304
70305
  });
70305
70306
 
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": "24.9.0",
4
+ "version": "24.10.0",
5
5
  "license": "AGPL-3.0",
6
6
  "type": "module",
7
7
  "engines": {