@dhis2-ui/selector-bar 8.16.0 → 9.0.0-alpha.2

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.
Files changed (2) hide show
  1. package/package.json +16 -13
  2. package/types/index.d.ts +27 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhis2-ui/selector-bar",
3
- "version": "8.16.0",
3
+ "version": "9.0.0-alpha.2",
4
4
  "description": "UI Select",
5
5
  "repository": {
6
6
  "type": "git",
@@ -13,6 +13,7 @@
13
13
  "main": "./build/cjs/index.js",
14
14
  "module": "./build/es/index.js",
15
15
  "exports": {
16
+ "types": "./types/index.d.ts",
16
17
  "import": "./build/es/index.js",
17
18
  "require": "./build/cjs/index.js"
18
19
  },
@@ -32,21 +33,21 @@
32
33
  "styled-jsx": "^4"
33
34
  },
34
35
  "dependencies": {
35
- "@dhis2-ui/button": "8.16.0",
36
- "@dhis2-ui/card": "8.16.0",
37
- "@dhis2-ui/popper": "8.16.0",
38
- "@dhis2-ui/layer": "8.16.0",
39
- "@dhis2/ui-constants": "8.16.0",
40
- "@dhis2/ui-icons": "8.16.0",
36
+ "@dhis2-ui/button": "9.0.0-alpha.2",
37
+ "@dhis2-ui/card": "9.0.0-alpha.2",
38
+ "@dhis2-ui/popper": "9.0.0-alpha.2",
39
+ "@dhis2-ui/layer": "9.0.0-alpha.2",
40
+ "@dhis2/ui-constants": "9.0.0-alpha.2",
41
+ "@dhis2/ui-icons": "9.0.0-alpha.2",
41
42
  "@testing-library/react": "^12.1.2",
42
43
  "classnames": "^2.3.1",
43
44
  "prop-types": "^15.7.2"
44
45
  },
45
46
  "devDependencies": {
46
- "@dhis2-ui/css": "8.16.0",
47
- "@dhis2-ui/menu": "8.16.0",
48
- "@dhis2-ui/organisation-unit-tree": "8.16.0",
49
- "@dhis2-ui/select": "8.16.0",
47
+ "@dhis2-ui/css": "9.0.0-alpha.2",
48
+ "@dhis2-ui/menu": "9.0.0-alpha.2",
49
+ "@dhis2-ui/organisation-unit-tree": "9.0.0-alpha.2",
50
+ "@dhis2-ui/select": "9.0.0-alpha.2",
50
51
  "@dhis2/d2-i18n": "^1.1.0",
51
52
  "@testing-library/jest-dom": "^5.16.1",
52
53
  "react": "16.13",
@@ -54,6 +55,8 @@
54
55
  "styled-jsx": "^4.0.1"
55
56
  },
56
57
  "files": [
57
- "build"
58
- ]
58
+ "build",
59
+ "types"
60
+ ],
61
+ "types": "types"
59
62
  }
@@ -0,0 +1,27 @@
1
+ import * as React from 'react'
2
+ import { ButtonProps } from '@dhis2-ui/button'
3
+
4
+ export interface SelectorBarProps {
5
+ children: React.ReactNode
6
+ additionalContent?: React.ReactNode
7
+ className?: string
8
+ dataTest?: string
9
+ disableClearSelections?: boolean
10
+ onClearSelectionClick?: ButtonProps['onClick']
11
+ }
12
+
13
+ export const SelectorBar: React.FC<SelectorBarProps>
14
+
15
+ export interface SelectorBarItemProps {
16
+ label: string
17
+ children: React.ReactNode
18
+ className?: string
19
+ dataTest?: string
20
+ disabled: boolean
21
+ displayOnly?: boolean
22
+ noValueMessage?: string
23
+ open?: boolean
24
+ setOpen?: (open: boolean) => void
25
+ value?: string
26
+ onClearSelectionClick: () => void
27
+ }