@nordicsemiconductor/pc-nrfconnect-shared 238.0.0 → 240.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/.eslintrc.js ADDED
@@ -0,0 +1,7 @@
1
+ /*
2
+ * Copyright (c) 2023 Nordic Semiconductor ASA
3
+ *
4
+ * SPDX-License-Identifier: LicenseRef-Nordic-4-Clause
5
+ */
6
+
7
+ module.exports = require('./config/eslintrc');
package/Changelog.md CHANGED
@@ -7,6 +7,28 @@ This project does _not_ adhere to
7
7
  [Semantic Versioning](https://semver.org/spec/v2.0.0.html) but contrary to it
8
8
  every new version is a new major version.
9
9
 
10
+ ## 240.0.0 - 2025-12-02
11
+
12
+ ### Changed
13
+
14
+ - Duplicate Tailwind classes and surrounding whitespaces are now removed.
15
+
16
+ ### Fixed
17
+
18
+ - Checking the order of Tailwind classes was not done anymore.
19
+
20
+ ## 239.0.0 - 2025-11-12
21
+
22
+ ### Added
23
+
24
+ - Link to the nRF54LM20 DK product page.
25
+
26
+ ### Changed
27
+
28
+ - The width of buttons with the variants `primary`, `success`, `info`,
29
+ `warning`, and `danger` is slightly increased to match the width of the
30
+ variant `secondary`.
31
+
10
32
  ## 238.0.0 - 2025-11-12
11
33
 
12
34
  ### Fixed
@@ -5,6 +5,7 @@
5
5
  */
6
6
 
7
7
  module.exports = {
8
+ plugins: ['prettier-plugin-tailwindcss'],
8
9
  singleQuote: true,
9
10
  tabWidth: 4,
10
11
  arrowParens: 'avoid',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nordicsemiconductor/pc-nrfconnect-shared",
3
- "version": "238.0.0",
3
+ "version": "240.0.0",
4
4
  "description": "Shared commodities for developing pc-nrfconnect-* packages",
5
5
  "repository": {
6
6
  "type": "git",
@@ -94,7 +94,7 @@
94
94
  "postcss": "8.4.24",
95
95
  "postcss-modules": "^6.0.0",
96
96
  "prettier": "^3.6.2",
97
- "prettier-plugin-tailwindcss": "^0.3.0",
97
+ "prettier-plugin-tailwindcss": "^0.7.2",
98
98
  "prettysize": "2.0.0",
99
99
  "protobufjs": "^7.0.0",
100
100
  "react": "18.2.0",
@@ -129,8 +129,5 @@
129
129
  "@commander-js/extra-typings": "^10.0.3"
130
130
  },
131
131
  "typings": "./typings/generated/src/index.d.ts",
132
- "eslintConfig": {
133
- "extends": "./config/eslintrc"
134
- },
135
132
  "prettier": "./config/prettier.config.js"
136
133
  }
package/release_notes.md CHANGED
@@ -1,9 +1,7 @@
1
- ### Fixed
1
+ ### Changed
2
2
 
3
- - A typo in `Group` props.
3
+ - Duplicate Tailwind classes and surrounding whitespaces are now removed.
4
4
 
5
- ### Steps to upgrade when using this package
5
+ ### Fixed
6
6
 
7
- - Rename prop `collapseStatePersistanceId` to `collapseStatePersistenceId`
8
- everywhere it is used. Running the type check will highlight remaining
9
- occurrences. No data migration is needed; only the prop name changed.
7
+ - Checking the order of Tailwind classes was not done anymore.
@@ -48,17 +48,17 @@ const Button: React.FC<ButtonProps> = ({
48
48
  size === 'lg' && 'tw-h-8 tw-px-4 tw-text-sm',
49
49
  size === 'xl' && 'tw-h-8 tw-px-4 tw-text-base',
50
50
  variant === 'primary' &&
51
- 'tw-bg-nordicBlue tw-text-white active:enabled:tw-bg-nordicBlue-700',
51
+ 'tw-border tw-border-transparent tw-bg-nordicBlue tw-text-white active:enabled:tw-bg-nordicBlue-700',
52
52
  variant === 'secondary' &&
53
- 'tw-border tw-border-gray-700 tw-bg-white tw-text-gray-700 active:enabled:tw-bg-gray-50',
53
+ 'tw-border tw-border-gray-700 tw-bg-white tw-text-gray-700 active:enabled:tw-bg-gray-50',
54
54
  variant === 'success' &&
55
- 'tw-bg-green tw-text-white active:enabled:tw-bg-green-700',
55
+ 'tw-border tw-border-transparent tw-bg-green tw-text-white active:enabled:tw-bg-green-700',
56
56
  variant === 'info' &&
57
- 'tw-bg-nordicBlue tw-text-white active:enabled:tw-bg-nordicBlue-700',
57
+ 'tw-border tw-border-transparent tw-bg-nordicBlue tw-text-white active:enabled:tw-bg-nordicBlue-700',
58
58
  variant === 'warning' &&
59
- 'tw-bg-orange tw-text-white active:enabled:tw-bg-orange-700',
59
+ 'tw-border tw-border-transparent tw-bg-orange tw-text-white active:enabled:tw-bg-orange-700',
60
60
  variant === 'danger' &&
61
- 'tw-bg-red tw-text-white active:enabled:tw-bg-red-700',
61
+ 'tw-border tw-border-transparent tw-bg-red tw-text-white active:enabled:tw-bg-red-700',
62
62
  variant === 'link-button' &&
63
63
  'tw-border tw-border-nordicBlue tw-bg-white tw-text-nordicBlue active:enabled:tw-bg-gray-50',
64
64
  className,
@@ -23,7 +23,7 @@ const ShowMoreInfo = ({
23
23
  }) => (
24
24
  <PseudoButton
25
25
  className={classNames(
26
- isVisible ? 'tw-visible' : 'tw-invisible group-hover:tw-visible',
26
+ isVisible ? 'tw-visible' : 'tw-invisible group-hover:tw-visible',
27
27
  `mdi mdi-chevron-${isVisible ? 'up' : 'down'}`,
28
28
  )}
29
29
  testId="show-more-device-info"
@@ -11,8 +11,8 @@ import { displayedDeviceName } from '../../deviceInfo/deviceInfo';
11
11
  import { Device } from '../../deviceSlice';
12
12
 
13
13
  const Row = ({ children }: { children: ReactNode }) => (
14
- <div className=" tw-flex tw-flex-row tw-pr-5">
15
- <div className=" tw-w-[68px]" />
14
+ <div className="tw-flex tw-flex-row tw-pr-5">
15
+ <div className="tw-w-[68px]" />
16
16
  {children}
17
17
  </div>
18
18
  );
@@ -276,8 +276,10 @@ const devicesByPca: { [P in KnownDevicePCA]: DeviceInfo } = {
276
276
  cores: 1,
277
277
  icon: nrf54logo,
278
278
  website: {
279
- productPage: '',
280
- buyOnline: '',
279
+ productPage:
280
+ 'https://www.nordicsemi.com/Products/Development-hardware/nRF54LM20-DK',
281
+ buyOnline:
282
+ 'https://www.nordicsemi.com/About-us/BuyOnline?search_token=nRF54LM20%20DK',
281
283
  },
282
284
  },
283
285
  PCA10188: {
@@ -125,7 +125,7 @@ export default <T,>({
125
125
  <button
126
126
  type="button"
127
127
  className={classNames(
128
- 'tw-bg-transparent tw-clear-both tw-block tw-h-6 tw-w-full tw-whitespace-nowrap tw-border-0 tw-px-2 tw-py-1 tw-text-left tw-font-normal tw-text-white hover:tw-bg-gray-600 focus:tw-bg-gray-600',
128
+ 'tw-clear-both tw-block tw-h-6 tw-w-full tw-whitespace-nowrap tw-border-0 tw-bg-transparent tw-px-2 tw-py-1 tw-text-left tw-font-normal tw-text-white hover:tw-bg-gray-600 focus:tw-bg-gray-600',
129
129
  size === 'sm' && 'tw-text-2xs',
130
130
  )}
131
131
  key={JSON.stringify(item.value)}
@@ -75,7 +75,7 @@ const SingleFlashMessage = ({
75
75
  return (
76
76
  <div
77
77
  ref={divRef}
78
- className={`tw-flex tw-w-full tw-flex-col tw-justify-between tw-p-4 tw-text-white ${classNames(
78
+ className={`tw-flex tw-w-full tw-flex-col tw-justify-between tw-p-4 tw-text-white ${classNames(
79
79
  variant === 'error' && 'tw-bg-red',
80
80
  variant === 'success' && 'tw-bg-green',
81
81
  variant === 'info' && 'tw-bg-nordicBlue',
@@ -119,9 +119,9 @@ export const Group = ({
119
119
  <div className={className}>
120
120
  <button
121
121
  className={classNames(
122
- 'tw-row tw-preflight tw- tw-flex tw-items-center tw-justify-between tw-text-left',
122
+ 'tw-preflight tw-flex tw-flex-row tw-items-center tw-justify-between tw-text-left',
123
123
  headingFullWidth && 'tw-w-full',
124
- !collapsible && ' tw-cursor-default',
124
+ !collapsible && 'tw-cursor-default',
125
125
  )}
126
126
  type="button"
127
127
  onClick={() => {
@@ -122,7 +122,7 @@ export default ({
122
122
  {items.map(item => (
123
123
  <button
124
124
  type="button"
125
- className="tw-bg-transparent tw-clear-both tw-block tw-h-6 tw-w-full tw-whitespace-nowrap tw-border-0 tw-px-2 tw-py-1 tw-text-left tw-font-normal tw-text-white hover:tw-bg-gray-600 focus:tw-bg-gray-600"
125
+ className="tw-clear-both tw-block tw-h-6 tw-w-full tw-whitespace-nowrap tw-border-0 tw-bg-transparent tw-px-2 tw-py-1 tw-text-left tw-font-normal tw-text-white hover:tw-bg-gray-600 focus:tw-bg-gray-600"
126
126
  key={item.value}
127
127
  onClick={() => onClickItem(item)}
128
128
  >
@@ -15,6 +15,7 @@
15
15
 
16
16
  white: $white;
17
17
  black: $black;
18
+ transparent: $transparent;
18
19
 
19
20
  primary: $primary;
20
21
  primaryDarkened: $primary-darkened;
@@ -8,8 +8,11 @@
8
8
  export const colors = {
9
9
  blueSlate: '#0033a0',
10
10
  blueSlateLighter: '#7c98d3',
11
+
11
12
  white: 'white',
12
13
  black: 'black',
14
+ transparent: 'transparent',
15
+
13
16
  primary: '#00a9ce',
14
17
  primaryDarkened: '#0098b9',
15
18
  secondary: 'white',
package/styles.scss CHANGED
@@ -11,6 +11,7 @@ $blue-slate: #0033a0;
11
11
 
12
12
  $white: white;
13
13
  $black: black;
14
+ $transparent: transparent;
14
15
 
15
16
  $primary: $nordic-blue;
16
17
  $primary-darkened: color.scale($nordic-blue, $lightness: -10%);
@@ -1 +1 @@
1
- {"version":3,"file":"deviceInfo.d.ts","sourceRoot":"","sources":["../../../../../src/Device/deviceInfo/deviceInfo.ts"],"names":[],"mappings":"AA+BA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,KAAK,EAAE,MAAM,IAAI,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAa9D,KAAK,MAAM,GAAG,aAAa,GAAG,aAAa,CAAC;AAE5C,UAAU,UAAU;IAChB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,KAAK,CAAC,WAAW,CAAC;IACxB,OAAO,EAAE;QACL,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,SAAS,CAAC,EAAE,MAAM,CAAC;KACtB,CAAC;CACL;AAqSD,eAAO,MAAM,UAAU,GAAI,QAAQ,MAAM,KAAG,UAC2B,CAAC;AASxE,eAAO,MAAM,mBAAmB,GAC5B,QAAQ,MAAM,EACd;;CAA+B,WAOlC,CAAC"}
1
+ {"version":3,"file":"deviceInfo.d.ts","sourceRoot":"","sources":["../../../../../src/Device/deviceInfo/deviceInfo.ts"],"names":[],"mappings":"AA+BA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,KAAK,EAAE,MAAM,IAAI,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAa9D,KAAK,MAAM,GAAG,aAAa,GAAG,aAAa,CAAC;AAE5C,UAAU,UAAU;IAChB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,KAAK,CAAC,WAAW,CAAC;IACxB,OAAO,EAAE;QACL,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,SAAS,CAAC,EAAE,MAAM,CAAC;KACtB,CAAC;CACL;AAuSD,eAAO,MAAM,UAAU,GAAI,QAAQ,MAAM,KAAG,UAC2B,CAAC;AASxE,eAAO,MAAM,mBAAmB,GAC5B,QAAQ,MAAM,EACd;;CAA+B,WAOlC,CAAC"}
@@ -3,6 +3,7 @@ export declare const colors: {
3
3
  blueSlateLighter: string;
4
4
  white: string;
5
5
  black: string;
6
+ transparent: string;
6
7
  primary: string;
7
8
  primaryDarkened: string;
8
9
  secondary: string;
@@ -1 +1 @@
1
- {"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../../../src/utils/colors.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqKlB,CAAC"}
1
+ {"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../../../src/utils/colors.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwKlB,CAAC"}