@cfpb/cfpb-design-system 3.4.0 → 3.4.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.
package/CHANGELOG.md
CHANGED
|
@@ -2,7 +2,27 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
-
## [3.4.
|
|
5
|
+
## [3.4.2](https://github.com/cfpb/design-system/compare/v3.4.1..3.4.2) - 2024-11-07
|
|
6
|
+
|
|
7
|
+
### PRs in this release
|
|
8
|
+
|
|
9
|
+
- PR #[2102](https://github.com/cfpb/design-system/pull/2102): Remove extraneous button-with-icon.scss reference - Ans
|
|
10
|
+
|
|
11
|
+
### General
|
|
12
|
+
|
|
13
|
+
- Remove button-with-icon reference - ([ee36f36](https://github.com/cfpb/design-system/commit/ee36f3676c2160415c8e75cf0c8affffad9a7f22)) - Ans
|
|
14
|
+
|
|
15
|
+
## [3.4.1](https://github.com/cfpb/design-system/compare/v3.4.0..v3.4.1) - 2024-11-07
|
|
16
|
+
|
|
17
|
+
### PRs in this release
|
|
18
|
+
|
|
19
|
+
- PR #[2101](https://github.com/cfpb/design-system/pull/2101): Add behavior JS unit tests - Ans
|
|
20
|
+
|
|
21
|
+
### General
|
|
22
|
+
|
|
23
|
+
- Add behavior specs - ([dd956be](https://github.com/cfpb/design-system/commit/dd956be595a500b2fd654faa9c88700851057eb1)) - Ans
|
|
24
|
+
|
|
25
|
+
## [3.4.0](https://github.com/cfpb/design-system/compare/v3.3.1..v3.4.0) - 2024-11-07
|
|
6
26
|
|
|
7
27
|
### PRs in this release
|
|
8
28
|
|
|
@@ -349,7 +369,7 @@ All notable changes to this project will be documented in this file.
|
|
|
349
369
|
- Create root package index.scss - ([b4ae5d0](https://github.com/cfpb/design-system/commit/b4ae5d08c7bee7f09ef478743038b02e7bb4d55d)) - Ans
|
|
350
370
|
- V3.0.1 - ([dbcf5b3](https://github.com/cfpb/design-system/commit/dbcf5b3bcc5b64fa7760011f05c7d7fa8517406a)) - Ans
|
|
351
371
|
|
|
352
|
-
## [3.0.0] - 2024
|
|
372
|
+
## [3.0.0] - August 16, 2024
|
|
353
373
|
|
|
354
374
|
### PRs in this release
|
|
355
375
|
|
package/package.json
CHANGED
package/src/index.scss
CHANGED
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
@forward 'components/cfpb-buttons/button';
|
|
7
7
|
@forward 'components/cfpb-buttons/button-group';
|
|
8
8
|
@forward 'components/cfpb-buttons/button-link';
|
|
9
|
-
@forward 'components/cfpb-buttons/button-with-icon';
|
|
10
9
|
|
|
11
10
|
// Expandables.
|
|
12
11
|
@forward 'components/cfpb-expandables/vars';
|
|
@@ -57,7 +57,7 @@ describe('atomic-helpers', () => {
|
|
|
57
57
|
'Check that element is a DOM node with ' +
|
|
58
58
|
`class ".${testClass}"`;
|
|
59
59
|
/**
|
|
60
|
-
*
|
|
60
|
+
* Mock error function.
|
|
61
61
|
*/
|
|
62
62
|
function errFunc() {
|
|
63
63
|
checkDom(null, testClass);
|
|
@@ -68,7 +68,7 @@ describe('atomic-helpers', () => {
|
|
|
68
68
|
it('should throw an error if element class not found', () => {
|
|
69
69
|
const errMsg = 'mock-class not found on or in passed DOM node.';
|
|
70
70
|
/**
|
|
71
|
-
*
|
|
71
|
+
* Mock error function.
|
|
72
72
|
*/
|
|
73
73
|
function errFunc() {
|
|
74
74
|
checkDom(componentDom, 'mock-class');
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { checkBehaviorDom, behaviorFind } from './behavior.js';
|
|
2
|
+
|
|
3
|
+
let containerDom;
|
|
4
|
+
|
|
5
|
+
const HTML_SNIPPET = `
|
|
6
|
+
<div id="container" data-js-hook="behavior_flyout-menu">
|
|
7
|
+
<button data-js-hook="behavior_flyout-menu_trigger">
|
|
8
|
+
<div data-js-hook="behavior_flyout-menu_content">…</div>
|
|
9
|
+
</div>
|
|
10
|
+
`;
|
|
11
|
+
|
|
12
|
+
describe('behaviors', () => {
|
|
13
|
+
beforeEach(() => {
|
|
14
|
+
document.body.innerHTML = HTML_SNIPPET;
|
|
15
|
+
containerDom = document.querySelector('#container');
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
describe('.checkBehaviorDom()', () => {
|
|
19
|
+
it('should return an HTML element', () => {
|
|
20
|
+
expect(
|
|
21
|
+
checkBehaviorDom(
|
|
22
|
+
containerDom,
|
|
23
|
+
'behavior_flyout-menu_content',
|
|
24
|
+
).getAttribute('data-js-hook'),
|
|
25
|
+
).toBe('behavior_flyout-menu_content');
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
describe('.behaviorFind()', () => {
|
|
30
|
+
it('should return an array with two items when selectors are found', () => {
|
|
31
|
+
const result = behaviorFind('flyout-menu', containerDom);
|
|
32
|
+
expect(result).toBeInstanceOf(NodeList);
|
|
33
|
+
expect(result.length).toBe(2);
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
});
|