Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions collections/forms/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
"build": "d2-app-scripts build"
},
"peerDependencies": {
"react": "^16.13 || ^18",
"react-dom": "^16.13 || ^18"
"react": "^16.13 || ^18 || ^19",
"react-dom": "^16.13 || ^18 || ^19"
},
"dependencies": {
"@dhis2/prop-types": "^3.1.2",
Expand Down
4 changes: 2 additions & 2 deletions collections/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@
"peerDependencies": {
"@dhis2/app-runtime": "^3",
"@dhis2/d2-i18n": "^1",
"react": "^16.13 || ^18",
"react-dom": "^16.13 || ^18",
"react": "^16.13 || ^18 || ^19",
"react-dom": "^16.13 || ^18 || ^19",
"styled-jsx": "^4"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions components/alert/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
"test": "d2-app-scripts test --jestConfig ../../jest.config.shared.js"
},
"peerDependencies": {
"react": "^16.13 || ^18",
"react-dom": "^16.13 || ^18",
"react": "^16.13 || ^18 || ^19",
"react-dom": "^16.13 || ^18 || ^19",
"styled-jsx": "^4"
},
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions components/box/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
"test": "d2-app-scripts test --jestConfig ../../jest.config.shared.js"
},
"peerDependencies": {
"react": "^16.13 || ^18",
"react-dom": "^16.13 || ^18",
"react": "^16.13 || ^18 || ^19",
"react-dom": "^16.13 || ^18 || ^19",
"styled-jsx": "^4"
},
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions components/button/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
"test": "d2-app-scripts test --jestConfig ../../jest.config.shared.js"
},
"peerDependencies": {
"react": "^16.13 || ^18",
"react-dom": "^16.13 || ^18",
"react": "^16.13 || ^18 || ^19",
"react-dom": "^16.13 || ^18 || ^19",
"styled-jsx": "^4"
},
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions components/calendar/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
},
"peerDependencies": {
"@dhis2/d2-i18n": "^1",
"react": "^16.13 || ^18",
"react-dom": "^16.13 || ^18",
"react": "^16.13 || ^18 || ^19",
"react-dom": "^16.13 || ^18 || ^19",
"styled-jsx": "^4"
},
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions components/card/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
"test": "d2-app-scripts test --jestConfig ../../jest.config.shared.js"
},
"peerDependencies": {
"react": "^16.13 || ^18",
"react-dom": "^16.13 || ^18",
"react": "^16.13 || ^18 || ^19",
"react-dom": "^16.13 || ^18 || ^19",
"styled-jsx": "^4"
},
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions components/center/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
"test": "d2-app-scripts test --jestConfig ../../jest.config.shared.js"
},
"peerDependencies": {
"react": "^16.13 || ^18",
"react-dom": "^16.13 || ^18",
"react": "^16.13 || ^18 || ^19",
"react-dom": "^16.13 || ^18 || ^19",
"styled-jsx": "^4"
},
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions components/checkbox/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
"test": "d2-app-scripts test --jestConfig ../../jest.config.shared.js"
},
"peerDependencies": {
"react": "^16.13 || ^18",
"react-dom": "^16.13 || ^18",
"react": "^16.13 || ^18 || ^19",
"react-dom": "^16.13 || ^18 || ^19",
"styled-jsx": "^4"
},
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions components/chip/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
"test": "d2-app-scripts test --jestConfig ../../jest.config.shared.js"
},
"peerDependencies": {
"react": "^16.13 || ^18",
"react-dom": "^16.13 || ^18",
"react": "^16.13 || ^18 || ^19",
"react-dom": "^16.13 || ^18 || ^19",
"styled-jsx": "^4"
},
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions components/cover/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
"test": "d2-app-scripts test --jestConfig ../../jest.config.shared.js"
},
"peerDependencies": {
"react": "^16.13 || ^18",
"react-dom": "^16.13 || ^18",
"react": "^16.13 || ^18 || ^19",
"react-dom": "^16.13 || ^18 || ^19",
"styled-jsx": "^4"
},
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions components/css/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
"test": "d2-app-scripts test --jestConfig ../../jest.config.shared.js"
},
"peerDependencies": {
"react": "^16.13 || ^18",
"react-dom": "^16.13 || ^18",
"react": "^16.13 || ^18 || ^19",
"react-dom": "^16.13 || ^18 || ^19",
"styled-jsx": "^4"
},
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions components/divider/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
"test": "d2-app-scripts test --jestConfig ../../jest.config.shared.js"
},
"peerDependencies": {
"react": "^16.13 || ^18",
"react-dom": "^16.13 || ^18",
"react": "^16.13 || ^18 || ^19",
"react-dom": "^16.13 || ^18 || ^19",
"styled-jsx": "^4"
},
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions components/field/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
"test": "d2-app-scripts test --jestConfig ../../jest.config.shared.js"
},
"peerDependencies": {
"react": "^16.13 || ^18",
"react-dom": "^16.13 || ^18",
"react": "^16.13 || ^18 || ^19",
"react-dom": "^16.13 || ^18 || ^19",
"styled-jsx": "^4"
},
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions components/file-input/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
},
"peerDependencies": {
"@dhis2/d2-i18n": "^1.1.0",
"react": "^16.13 || ^18",
"react-dom": "^16.13 || ^18",
"react": "^16.13 || ^18 || ^19",
"react-dom": "^16.13 || ^18 || ^19",
"styled-jsx": "^4"
},
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions components/header-bar/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
"peerDependencies": {
"@dhis2/app-runtime": "^3",
"@dhis2/d2-i18n": "^1",
"react": "^16.13 || ^18",
"react-dom": "^16.13 || ^18",
"react": "^16.13 || ^18 || ^19",
"react-dom": "^16.13 || ^18 || ^19",
"styled-jsx": "^4"
},
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions components/help/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
"test": "d2-app-scripts test --jestConfig ../../jest.config.shared.js"
},
"peerDependencies": {
"react": "^16.13 || ^18",
"react-dom": "^16.13 || ^18",
"react": "^16.13 || ^18 || ^19",
"react-dom": "^16.13 || ^18 || ^19",
"styled-jsx": "^4"
},
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions components/input/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
"test": "d2-app-scripts test --jestConfig ../../jest.config.shared.js"
},
"peerDependencies": {
"react": "^16.13 || ^18",
"react-dom": "^16.13 || ^18",
"react": "^16.13 || ^18 || ^19",
"react-dom": "^16.13 || ^18 || ^19",
"styled-jsx": "^4"
},
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions components/intersection-detector/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
"test": "d2-app-scripts test --jestConfig ../../jest.config.shared.js"
},
"peerDependencies": {
"react": "^16.13 || ^18",
"react-dom": "^16.13 || ^18",
"react": "^16.13 || ^18 || ^19",
"react-dom": "^16.13 || ^18 || ^19",
"styled-jsx": "^4"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion components/intersection-detector/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export interface IntersectionDetectorProps {
/**
* React ref on other component to detect intersections with
*/
rootRef: React.MutableRefObject<HTMLElement>
rootRef: React.RefObject<HTMLElement | null>
/**
* Called with signature `({ isIntersecting: bool })`
*/
Expand Down
4 changes: 2 additions & 2 deletions components/label/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
"test": "d2-app-scripts test --jestConfig ../../jest.config.shared.js"
},
"peerDependencies": {
"react": "^16.13 || ^18",
"react-dom": "^16.13 || ^18",
"react": "^16.13 || ^18 || ^19",
"react-dom": "^16.13 || ^18 || ^19",
"styled-jsx": "^4"
},
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions components/layer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
"test": "d2-app-scripts test --jestConfig ../../jest.config.shared.js"
},
"peerDependencies": {
"react": "^16.13 || ^18",
"react-dom": "^16.13 || ^18",
"react": "^16.13 || ^18 || ^19",
"react-dom": "^16.13 || ^18 || ^19",
"styled-jsx": "^4"
},
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions components/legend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
"test": "d2-app-scripts test --jestConfig ../../jest.config.shared.js"
},
"peerDependencies": {
"react": "^16.13 || ^18",
"react-dom": "^16.13 || ^18",
"react": "^16.13 || ^18 || ^19",
"react-dom": "^16.13 || ^18 || ^19",
"styled-jsx": "^4"
},
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions components/loader/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
"test": "d2-app-scripts test --jestConfig ../../jest.config.shared.js"
},
"peerDependencies": {
"react": "^16.13 || ^18",
"react-dom": "^16.13 || ^18",
"react": "^16.13 || ^18 || ^19",
"react-dom": "^16.13 || ^18 || ^19",
"styled-jsx": "^4"
},
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions components/logo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
"test": "d2-app-scripts test --jestConfig ../../jest.config.shared.js"
},
"peerDependencies": {
"react": "^16.13 || ^18",
"react-dom": "^16.13 || ^18",
"react": "^16.13 || ^18 || ^19",
"react-dom": "^16.13 || ^18 || ^19",
"styled-jsx": "^4"
},
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions components/menu/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
"test": "d2-app-scripts test --jestConfig ../../jest.config.shared.js"
},
"peerDependencies": {
"react": "^16.13 || ^18",
"react-dom": "^16.13 || ^18",
"react": "^16.13 || ^18 || ^19",
"react-dom": "^16.13 || ^18 || ^19",
"styled-jsx": "^4"
},
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions components/modal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
"test": "d2-app-scripts test --jestConfig ../../jest.config.shared.js"
},
"peerDependencies": {
"react": "^16.13 || ^18",
"react-dom": "^16.13 || ^18",
"react": "^16.13 || ^18 || ^19",
"react-dom": "^16.13 || ^18 || ^19",
"styled-jsx": "^4"
},
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions components/node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
"test": "d2-app-scripts test --jestConfig ../../jest.config.shared.js"
},
"peerDependencies": {
"react": "^16.13 || ^18",
"react-dom": "^16.13 || ^18",
"react": "^16.13 || ^18 || ^19",
"react-dom": "^16.13 || ^18 || ^19",
"styled-jsx": "^4"
},
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions components/notice-box/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
"test": "d2-app-scripts test --jestConfig ../../jest.config.shared.js"
},
"peerDependencies": {
"react": "^16.13 || ^18",
"react-dom": "^16.13 || ^18",
"react": "^16.13 || ^18 || ^19",
"react-dom": "^16.13 || ^18 || ^19",
"styled-jsx": "^4"
},
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions components/organisation-unit-tree/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
"peerDependencies": {
"@dhis2/app-runtime": "^3",
"@dhis2/d2-i18n": "^1",
"react": "^16.13 || ^18",
"react-dom": "^16.13 || ^18",
"react": "^16.13 || ^18 || ^19",
"react-dom": "^16.13 || ^18 || ^19",
"styled-jsx": "^4"
},
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions components/pagination/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
},
"peerDependencies": {
"@dhis2/d2-i18n": "^1",
"react": "^16.13 || ^18",
"react-dom": "^16.13 || ^18",
"react": "^16.13 || ^18 || ^19",
"react-dom": "^16.13 || ^18 || ^19",
"styled-jsx": "^4"
},
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions components/popover/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
"test": "d2-app-scripts test --jestConfig ../../jest.config.shared.js"
},
"peerDependencies": {
"react": "^16.13 || ^18",
"react-dom": "^16.13 || ^18",
"react": "^16.13 || ^18 || ^19",
"react-dom": "^16.13 || ^18 || ^19",
"styled-jsx": "^4"
},
"dependencies": {
Expand Down
4 changes: 3 additions & 1 deletion components/popover/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ import * as React from 'react'
import { VirtualElement, Options as PopperOptions } from '@popperjs/core'

type PopperReference = VirtualElement | Element
type ReferenceElement = PopperReference | React.RefObject<PopperReference>
type ReferenceElement =
| PopperReference
| React.RefObject<PopperReference | null>

export interface PopoverProps {
children: React.ReactNode
Expand Down
5 changes: 2 additions & 3 deletions components/popper/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
"test": "d2-app-scripts test --jestConfig ../../jest.config.shared.js"
},
"peerDependencies": {
"react": "^16.13 || ^18",
"react-dom": "^16.13 || ^18",
"react": "^16.13 || ^18 || ^19",
"react-dom": "^16.13 || ^18 || ^19",
"styled-jsx": "^4"
},
"dependencies": {
Expand All @@ -37,7 +37,6 @@
"@popperjs/core": "^2.11.8",
"classnames": "^2.3.1",
"prop-types": "^15.7.2",
"react-popper": "^2.3.0",
"resize-observer-polyfill": "^1.5.1"
},
"files": [
Expand Down
2 changes: 1 addition & 1 deletion components/popper/src/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export { Popper } from './popper.js'
export { getReferenceElement } from './get-reference-element.js'
export { getBaseModifiers } from './modifiers.js'
export { usePopper } from 'react-popper'
export { usePopper } from './use-popper.js'
2 changes: 1 addition & 1 deletion components/popper/src/popper.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { sharedPropTypes } from '@dhis2/ui-constants'
import PropTypes from 'prop-types'
import React, { useState, useMemo, useEffect } from 'react'
import { usePopper } from 'react-popper'
import { getReferenceElement } from './get-reference-element.js'
import { deduplicateModifiers } from './modifiers.js'
import { usePopper } from './use-popper.js'

const flipPlacement = (placement) => {
if (placement.startsWith('right')) {
Expand Down
Loading
Loading