diff --git a/.stylelintrc.js b/.stylelintrc.js
new file mode 100644
index 0000000000..913c9635ee
--- /dev/null
+++ b/.stylelintrc.js
@@ -0,0 +1,13 @@
+const { config } = require('@dhis2/cli-style')
+
+module.exports = {
+ extends: [config.stylelint],
+ rules: {
+ 'csstools/use-logical': [
+ true,
+ {
+ severity: 'error',
+ },
+ ],
+ },
+}
diff --git a/d2.config.js b/d2.config.js
index 1f003e36b3..f256c28edc 100644
--- a/d2.config.js
+++ b/d2.config.js
@@ -7,6 +7,8 @@ const config = {
minDHIS2Version: '2.40',
+ direction: 'auto',
+
pwa: {
enabled: true,
caching: {
diff --git a/package.json b/package.json
index fab13efb24..3e60552c44 100644
--- a/package.json
+++ b/package.json
@@ -19,8 +19,8 @@
"cy:run": "start-server-and-test 'yarn start:nobrowser' http://localhost:3000 'yarn cypress run --browser chrome headless --env networkMode=live'"
},
"devDependencies": {
- "@dhis2/cli-app-scripts": "^10.3.9",
- "@dhis2/cli-style": "^10.5.1",
+ "@dhis2/cli-app-scripts": "^11.3.0",
+ "@dhis2/cli-style": "^10.7.3",
"@dhis2/cypress-commands": "^10.0.3",
"@dhis2/cypress-plugins": "^10.0.2",
"@reportportal/agent-js-cypress": "git+https://github.com/dhis2/agent-js-cypress.git#develop",
@@ -44,7 +44,7 @@
},
"dependencies": {
"@dhis2/analytics": "^26.8.1",
- "@dhis2/app-runtime": "^3.7.0",
+ "@dhis2/app-runtime": "^3.10.4",
"@dhis2/app-runtime-adapter-d2": "^1.1.0",
"@dhis2/app-service-datastore": "^1.0.0-beta.3",
"@dhis2/d2-i18n": "^1.1.0",
diff --git a/src/components/App.css b/src/components/App.css
index 9508d24b08..fd418e559c 100644
--- a/src/components/App.css
+++ b/src/components/App.css
@@ -1,7 +1,7 @@
/* App */
.data-visualizer-app {
- height: 100%;
+ block-size: 100%;
background-color: var(--colors-grey300);
overflow: hidden;
}
@@ -34,7 +34,7 @@ body {
/* Headerbar */
.section-headerbar {
- height: 48px;
+ block-size: 48px;
}
/* Main */
@@ -43,14 +43,14 @@ body {
}
.main-left {
- min-width: 260px;
+ min-inline-size: 260px;
}
.main-right {
flex: 1 1 0%;
- max-width: 380px;
+ max-inline-size: 380px;
background-color: var(--colors-grey100);
- border-left: 1px solid var(--colors-grey400);
+ border-inline-start: 1px solid var(--colors-grey400);
box-shadow: 1px 0 -2px 0 rgba(0, 0, 0, 0.03);
overflow-y: auto;
overflow-x: hidden;
@@ -61,7 +61,7 @@ body {
.main-center-canvas {
display: flex;
justify-content: center;
- height: 100%;
+ block-size: 100%;
overflow: hidden;
position: relative;
}
diff --git a/src/components/AxesTabs/AxesTabs.js b/src/components/AxesTabs/AxesTabs.js
index 7bd1d21286..dfa622741a 100644
--- a/src/components/AxesTabs/AxesTabs.js
+++ b/src/components/AxesTabs/AxesTabs.js
@@ -2,7 +2,7 @@ import PropTypes from 'prop-types'
import React, { useState } from 'react'
import VerticalTab from '../VerticalTabBar/VerticalTab.js'
import VerticalTabBar from '../VerticalTabBar/VerticalTabBar.js'
-import { tabSectionTitle } from '../VisualizationOptions/styles/VisualizationOptions.style.js'
+import tabStyles from '../VisualizationOptions/styles/VisualizationOptions.module.css'
import styles from './styles/AxesTabs.module.css'
const AxesTabs = ({ items, dataTest }) => {
@@ -24,12 +24,11 @@ const AxesTabs = ({ items, dataTest }) => {
-
-
+
+
+
{text}
diff --git a/src/components/VisualizationOptions/NoticeBox.js b/src/components/VisualizationOptions/NoticeBox.js
index 3402afcb38..9bb9108e39 100644
--- a/src/components/VisualizationOptions/NoticeBox.js
+++ b/src/components/VisualizationOptions/NoticeBox.js
@@ -1,10 +1,10 @@
import { NoticeBox as UiNoticeBox } from '@dhis2/ui'
import PropTypes from 'prop-types'
import React from 'react'
-import { tabSectionOption } from './styles/VisualizationOptions.style.js'
+import styles from './styles/VisualizationOptions.module.css'
const NoticeBox = ({ title, text, warning = false, error = false }) => (
-
+
{text}
diff --git a/src/components/VisualizationOptions/Options/AxisLabels.js b/src/components/VisualizationOptions/Options/AxisLabels.js
index 0e1c0b4c27..ed75551fec 100644
--- a/src/components/VisualizationOptions/Options/AxisLabels.js
+++ b/src/components/VisualizationOptions/Options/AxisLabels.js
@@ -3,11 +3,11 @@ import i18n from '@dhis2/d2-i18n'
import { Label } from '@dhis2/ui'
import PropTypes from 'prop-types'
import React from 'react'
-import { tabSectionOption } from '../styles/VisualizationOptions.style.js'
+import styles from '../styles/VisualizationOptions.module.css'
import TextStyle from './TextStyle.js'
const AxisLabels = ({ disabled, axisId }) => (
-
+
(
-
+
-
+
{'\u00A0\u2013\u00A0'}
diff --git a/src/components/VisualizationOptions/Options/AxisTitle.js b/src/components/VisualizationOptions/Options/AxisTitle.js
index 4b93794c9f..5067e5a633 100644
--- a/src/components/VisualizationOptions/Options/AxisTitle.js
+++ b/src/components/VisualizationOptions/Options/AxisTitle.js
@@ -13,10 +13,7 @@ import {
OPTION_AXIS_TITLE_TEXT_MODE,
} from '../../../modules/options.js'
import { sGetUiOption } from '../../../reducers/ui.js'
-import {
- tabSectionOption,
- tabSectionOptionToggleable,
-} from '../styles/VisualizationOptions.style.js'
+import styles from '../styles/VisualizationOptions.module.css'
import TextStyle from './TextStyle.js'
export const TITLE_AUTO = 'AUTO'
@@ -70,7 +67,7 @@ const AxisTitle = ({
return (
@@ -100,7 +97,7 @@ const AxisTitle = ({
))}
{textMode === TITLE_CUSTOM ? (
-
+
onTextChange(value)}
@@ -113,7 +110,7 @@ const AxisTitle = ({
) : null}
{textMode === TITLE_AUTO || textMode === TITLE_CUSTOM ? (
-
+
(
-
+
{((!inverted && value) || (inverted && !value)) && fontStyleKey ? (
-
+
(
-
+
{[
[
@@ -90,7 +90,11 @@ ColorSet.propTypes = {
const ColorSetPreview = ({ colorSet, disabled }) => (
{colorSet?.patterns &&
colorSet.patterns.map((pattern, index) => (
diff --git a/src/components/VisualizationOptions/Options/CompletedOnly.js b/src/components/VisualizationOptions/Options/CompletedOnly.js
index 0b61c52cb2..f1835ed542 100644
--- a/src/components/VisualizationOptions/Options/CompletedOnly.js
+++ b/src/components/VisualizationOptions/Options/CompletedOnly.js
@@ -1,11 +1,11 @@
import i18n from '@dhis2/d2-i18n'
import { Label } from '@dhis2/ui'
import React from 'react'
-import { tabSectionOption } from '../styles/VisualizationOptions.style.js'
+import styles from '../styles/VisualizationOptions.module.css'
import { CheckboxBaseOption } from './CheckboxBaseOption.js'
const CompletedOnly = () => (
-
+
(
<>
-
-
+
+
{isEnabled && (
-
-
+
+
+