@dhis2/ui-constants 8.15.0-alpha.3 → 8.15.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.
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.statusPropType = exports.statusArgType = exports.sizePropType = exports.sizeArgType = exports.popperReferencePropType = exports.popperReferenceArgType = exports.popperPlacementPropType = exports.popperPlacementArgType = exports.insideAlignmentPropType = exports.insideAlignmentArgType = exports.buttonVariantPropType = exports.buttonVariantArgType = void 0;
6
+ exports.statusPropType = exports.statusArgType = exports.sizePropType = exports.sizeArgType = exports.popperReferencePropType = exports.popperReferenceArgType = exports.popperPlacementPropType = exports.popperPlacementArgType = exports.insideAlignmentPropType = exports.insideAlignmentArgType = void 0;
7
7
 
8
8
  var _propTypes = require("@dhis2/prop-types");
9
9
 
@@ -29,34 +29,13 @@ const statusArgType = {
29
29
  type: 'boolean'
30
30
  }
31
31
  };
32
- /**
33
- * Button variant propType
34
- * @return {PropType} Mutually exclusive variants:
35
- * primary/secondary/destructive
36
- */
37
-
38
- exports.statusArgType = statusArgType;
39
- const buttonVariantPropType = (0, _propTypes.mutuallyExclusive)(['primary', 'secondary', 'destructive'], _propTypes2.default.bool);
40
- exports.buttonVariantPropType = buttonVariantPropType;
41
- const buttonVariantArgType = {
42
- // No description because it should be set for the component description
43
- table: {
44
- type: {
45
- summary: 'bool',
46
- detail: "'primary', 'secondary', and 'destructive' are mutually exclusive props"
47
- }
48
- },
49
- control: {
50
- type: 'boolean'
51
- }
52
- };
53
32
  /**
54
33
  * Size variant propType
55
34
  * @return {PropType} Mutually exclusive variants:
56
35
  * small/large
57
36
  */
58
37
 
59
- exports.buttonVariantArgType = buttonVariantArgType;
38
+ exports.statusArgType = statusArgType;
60
39
  const sizePropType = (0, _propTypes.mutuallyExclusive)(['small', 'large', 'extrasmall', 'fluid'], _propTypes2.default.bool);
61
40
  exports.sizePropType = sizePropType;
62
41
  const sizeArgType = {
@@ -18,25 +18,6 @@ export const statusArgType = {
18
18
  type: 'boolean'
19
19
  }
20
20
  };
21
- /**
22
- * Button variant propType
23
- * @return {PropType} Mutually exclusive variants:
24
- * primary/secondary/destructive
25
- */
26
-
27
- export const buttonVariantPropType = mutuallyExclusive(['primary', 'secondary', 'destructive'], PropTypes.bool);
28
- export const buttonVariantArgType = {
29
- // No description because it should be set for the component description
30
- table: {
31
- type: {
32
- summary: 'bool',
33
- detail: "'primary', 'secondary', and 'destructive' are mutually exclusive props"
34
- }
35
- },
36
- control: {
37
- type: 'boolean'
38
- }
39
- };
40
21
  /**
41
22
  * Size variant propType
42
23
  * @return {PropType} Mutually exclusive variants:
package/package.json CHANGED
@@ -1,11 +1,10 @@
1
1
  {
2
2
  "name": "@dhis2/ui-constants",
3
- "version": "8.15.0-alpha.3",
3
+ "version": "8.15.0",
4
4
  "description": "Constants used in the UI libs",
5
5
  "main": "./build/cjs/index.js",
6
6
  "module": "./build/es/index.js",
7
7
  "exports": {
8
- "types": "./types/index.d.ts",
9
8
  "import": "./build/es/index.js",
10
9
  "require": "./build/cjs/index.js"
11
10
  },
@@ -30,8 +29,6 @@
30
29
  "prop-types": "^15.7.2"
31
30
  },
32
31
  "files": [
33
- "build",
34
- "types"
35
- ],
36
- "types": "types"
32
+ "build"
33
+ ]
37
34
  }
package/types/index.d.ts DELETED
@@ -1,63 +0,0 @@
1
- export type ColorBase = 'blue' | 'teal' | 'red' | 'yellow' | 'green' | 'grey'
2
- export type ColorVariant =
3
- | '900'
4
- | '800'
5
- | '700'
6
- | '600'
7
- | '500'
8
- | '400'
9
- | '300'
10
- | '200'
11
- | '100'
12
- | '050'
13
- export type ColorProp = `${ColorBase}${ColorVariant}` | 'white'
14
-
15
- export const colors: Record<ColorProp, string>
16
-
17
- export type ElevantionVariant = 'e100' | 'e200' | 'e300' | 'e400'
18
- export const elevations: Record<ElevantionVariant, string>
19
-
20
- export type SpacerVariant =
21
- | 'dp4'
22
- | 'dp8'
23
- | 'dp12'
24
- | 'dp16'
25
- | 'dp24'
26
- | 'dp32'
27
- | 'dp48'
28
- | 'dp64'
29
- | 'dp96'
30
- | 'dp128'
31
- | 'dp192'
32
- | 'dp256'
33
- | 'dp384'
34
- | 'dp512'
35
- | 'dp640'
36
- export const spacersNum: Record<SpacerVariant, number>
37
- export const spacers: Record<SpacerVariant, string>
38
-
39
- export type LayerVariant = 'applicationTop' | 'blocking' | 'alert'
40
- export const layer: Record<LayerVariant, number>
41
-
42
- export type ThemeBase = 'primary' | 'secondary'
43
- export type ThemeVariant =
44
- | '900'
45
- | '800'
46
- | '700'
47
- | '600'
48
- | '500'
49
- | '400'
50
- | '300'
51
- | '200'
52
- | '100'
53
- | '050'
54
- export type ThemeProp =
55
- | `${ThemeBase}${ThemeVariant}`
56
- | 'default'
57
- | 'error'
58
- | 'valid'
59
- | 'warning'
60
- | 'disabled'
61
- | 'focus'
62
- | 'fonts'
63
- export const theme: Record<ThemeProp, string>