@decisiv/ui-components 2.0.1-alpha.217 → 2.0.1-alpha.219
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/lib/components/Modal/index.js +1 -1
- package/lib/components/Modal/index.test.js +10 -0
- package/lib/components/Tag/schema.d.ts.map +1 -1
- package/lib/components/Tag/schema.js +1 -1
- package/lib/components/Tag/types.d.ts +2 -2
- package/lib/components/Tag/types.d.ts.map +1 -1
- package/package.json +24 -13
|
@@ -123,7 +123,7 @@ function Modal(_ref) {
|
|
|
123
123
|
var modalFooterId = "modal-footer-".concat(uuid);
|
|
124
124
|
var hasFooter = !(0, _isEmpty.default)(actions);
|
|
125
125
|
return _react.default.createElement(_ResponsiveModalWrapper.default, {
|
|
126
|
-
id: id,
|
|
126
|
+
id: id || uuid,
|
|
127
127
|
size: size,
|
|
128
128
|
zIndex: zIndex,
|
|
129
129
|
onClose: onClose,
|
|
@@ -92,6 +92,16 @@ describe('Modal', function () {
|
|
|
92
92
|
});
|
|
93
93
|
});
|
|
94
94
|
});
|
|
95
|
+
it('renders aria labelledby and its target correctly', function () {
|
|
96
|
+
render(_react.default.createElement(_.default, _extends({}, defaultProps, {
|
|
97
|
+
id: undefined
|
|
98
|
+
})));
|
|
99
|
+
var ariaLabelledByElement = document.querySelector("[aria-labelledby^=\"modal-header-modal-\"]");
|
|
100
|
+
expect(ariaLabelledByElement).toBeTruthy();
|
|
101
|
+
var ariaLabelledByAttribute = ariaLabelledByElement.getAttribute('aria-labelledby');
|
|
102
|
+
var modalHeader = document.getElementById(ariaLabelledByAttribute);
|
|
103
|
+
expect(modalHeader).toBeTruthy();
|
|
104
|
+
});
|
|
95
105
|
it('renders the title in the header of the modal', function () {
|
|
96
106
|
render(_react.default.createElement(_.default, defaultProps));
|
|
97
107
|
var modalHeader = document.getElementById("modal-header-".concat(defaultProps.id));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/components/Tag/schema.ts"],"names":[],"mappings":"AAKA,QAAA,MAAM,MAAM,KAAmC,CAAC;
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/components/Tag/schema.ts"],"names":[],"mappings":"AAKA,QAAA,MAAM,MAAM,KAAmC,CAAC;AAoDhD,eAAe,MAAM,CAAC"}
|
|
@@ -14,7 +14,7 @@ var schema = (0, _reactDesc.describe)({
|
|
|
14
14
|
displayName: 'Tag'
|
|
15
15
|
});
|
|
16
16
|
schema.propTypes = {
|
|
17
|
-
text: _reactDesc.PropTypes.
|
|
17
|
+
text: _reactDesc.PropTypes.node.description('Content to render inside the tag (string or any React node)'),
|
|
18
18
|
icon: _reactDesc.PropTypes.element.description('Which `iconix` icon to render as the main icon'),
|
|
19
19
|
size: _reactDesc.PropTypes.oneOf(['small', 'medium']).description('The size to use for the Tag').defaultValue('small'),
|
|
20
20
|
color: _reactDesc.PropTypes.oneOf(_commonUIColors.commonUIColorKeys).description('The color to use as the tag background or SVG color when outlined').format('string (see notes below)').defaultValue('licoriceMousse'),
|
|
@@ -14,13 +14,13 @@ export declare type BaseProps = {
|
|
|
14
14
|
style?: CSSObject;
|
|
15
15
|
};
|
|
16
16
|
declare type ContentProps = {
|
|
17
|
-
text?:
|
|
17
|
+
text?: React.ReactNode;
|
|
18
18
|
icon?: IconComponent;
|
|
19
19
|
action?: ActionHandler;
|
|
20
20
|
actionIcon?: IconComponent;
|
|
21
21
|
};
|
|
22
22
|
declare type Text = {
|
|
23
|
-
text:
|
|
23
|
+
text: React.ReactNode;
|
|
24
24
|
};
|
|
25
25
|
declare type Icon = {
|
|
26
26
|
icon: IconComponent;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/Tag/types.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EACZ,GAAG,EACH,aAAa,EACb,cAAc,EACd,aAAa,EACd,MAAM,O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EAAE,QAAQ,GAAG,QAAQ,CAAC;IACnC,gBAAgB,CAAC,EAAE,cAAc,GAAG,aAAa,CAAC,cAAc,CAAC,CAAC;CACnE,CAAC;AAEF,oBAAY,QAAQ,GAAG,aAAa,CAAC,MAAM,CAAC,GAC1C,SAAS,GACT,YAAY,GACZ,gBAAgB,GAChB,gBAAgB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@decisiv/ui-components",
|
|
3
|
-
"version": "2.0.1-alpha.
|
|
3
|
+
"version": "2.0.1-alpha.219",
|
|
4
4
|
"description": "Decisiv's design system React components",
|
|
5
5
|
"author": "Decisiv UI Development Team",
|
|
6
6
|
"license": "MIT",
|
|
@@ -10,15 +10,26 @@
|
|
|
10
10
|
"lib"
|
|
11
11
|
],
|
|
12
12
|
"sideEffects": false,
|
|
13
|
+
"jest-junit": {
|
|
14
|
+
"outputDirectory": "./reports/tests/junit",
|
|
15
|
+
"outputName": "report.xml"
|
|
16
|
+
},
|
|
13
17
|
"scripts": {
|
|
14
|
-
"
|
|
15
|
-
"
|
|
18
|
+
"build": "yarn build:types && yarn build:js && rimraf lib/**/*.test.js lib/**/__snapshots__",
|
|
19
|
+
"build:types": "tsc --build --force",
|
|
20
|
+
"build:js": "babel --root-mode upward -d lib src --extensions \".js,.ts,.tsx\" --copy-files",
|
|
21
|
+
"dev": "chokidar \"src/**/*.(js|jsx|ts|tsx)\" -c \"yarn build\"",
|
|
22
|
+
"test": "jest",
|
|
23
|
+
"test:ci": "yarn test --reporters=jest-junit",
|
|
24
|
+
"lint": "eslint --ext .js,.jsx,.ts,.tsx --ignore-pattern \"__snapshots__\" --report-unused-disable-directives src/",
|
|
25
|
+
"lint:ci": "yarn lint --format junit -o reports/lint/junit/report.xml",
|
|
26
|
+
"clean": "rimraf lib tmp tsconfig.tsbuildinfo coverage"
|
|
16
27
|
},
|
|
17
28
|
"dependencies": {
|
|
18
|
-
"@decisiv/breakpoint-observer": "
|
|
19
|
-
"@decisiv/design-tokens": "
|
|
20
|
-
"@decisiv/iconix": "
|
|
21
|
-
"@decisiv/prop-types": "
|
|
29
|
+
"@decisiv/breakpoint-observer": "1.8.9-alpha.3",
|
|
30
|
+
"@decisiv/design-tokens": "1.8.9-alpha.294",
|
|
31
|
+
"@decisiv/iconix": "2.0.1-alpha.204",
|
|
32
|
+
"@decisiv/prop-types": "1.6.10-alpha.3",
|
|
22
33
|
"@seznam/compose-react-refs": "^1.0.2",
|
|
23
34
|
"csstype": "^2.6.5",
|
|
24
35
|
"element-closest": "^3.0.2",
|
|
@@ -40,8 +51,8 @@
|
|
|
40
51
|
},
|
|
41
52
|
"devDependencies": {
|
|
42
53
|
"@babel/plugin-transform-runtime": "^7.5.5",
|
|
43
|
-
"@decisiv/babel-plugin-styled-components-references": "
|
|
44
|
-
"@decisiv/styled-components-static-styles": "
|
|
54
|
+
"@decisiv/babel-plugin-styled-components-references": "1.3.8-alpha.3",
|
|
55
|
+
"@decisiv/styled-components-static-styles": "1.4.3-alpha.160",
|
|
45
56
|
"@testing-library/jest-dom": "^4.2.0",
|
|
46
57
|
"@testing-library/react": "^8.0.1",
|
|
47
58
|
"@testing-library/react-hooks": "^3.2.1",
|
|
@@ -57,19 +68,19 @@
|
|
|
57
68
|
"jest": "^25.5.4",
|
|
58
69
|
"jest-junit": "^10.0.0",
|
|
59
70
|
"jest-styled-components": "7.0.2",
|
|
60
|
-
"nps": "^5.9.5",
|
|
61
71
|
"prop-types": "^15.7.2",
|
|
62
72
|
"react": "^16.8.6",
|
|
63
73
|
"react-dom": "^16.8.6",
|
|
64
74
|
"react-is": "^16.8.6",
|
|
65
75
|
"react-test-renderer": "^16.8.6",
|
|
76
|
+
"rimraf": "^3.0.2",
|
|
66
77
|
"styled-components": "5.0.0-rc.2",
|
|
78
|
+
"turbo": "^2.5.2",
|
|
67
79
|
"typescript": "^3.5.2"
|
|
68
80
|
},
|
|
69
81
|
"publishConfig": {
|
|
70
82
|
"scope": "@decisiv",
|
|
71
83
|
"access": "public"
|
|
72
84
|
},
|
|
73
|
-
"private": false
|
|
74
|
-
|
|
75
|
-
}
|
|
85
|
+
"private": false
|
|
86
|
+
}
|