@cfpb/cfpb-design-system 4.2.4 → 4.3.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.
- package/CHANGELOG.md +166 -1
- package/dist/components/cfpb-expandables/index.js +1 -1
- package/dist/components/cfpb-expandables/index.js.map +3 -3
- package/dist/components/cfpb-forms/index.js +1 -1
- package/dist/components/cfpb-forms/index.js.map +2 -2
- package/dist/elements/cfpb-button/index.js +4 -4
- package/dist/elements/cfpb-button/index.js.map +3 -3
- package/dist/elements/cfpb-checkbox-icon/index.js +29 -0
- package/dist/elements/{cfpb-checkbox → cfpb-checkbox-icon}/index.js.map +4 -4
- package/dist/elements/cfpb-expandable/index.css +2 -0
- package/dist/elements/cfpb-expandable/index.css.map +7 -0
- package/dist/elements/cfpb-expandable/index.js +33 -0
- package/dist/elements/cfpb-expandable/index.js.map +7 -0
- package/dist/elements/cfpb-file-upload/index.js +4 -4
- package/dist/elements/cfpb-file-upload/index.js.map +3 -3
- package/dist/elements/cfpb-form-alert/index.js +32 -0
- package/dist/elements/cfpb-form-alert/index.js.map +7 -0
- package/dist/elements/cfpb-form-choice/index.js +12 -3
- package/dist/elements/cfpb-form-choice/index.js.map +4 -4
- package/dist/elements/cfpb-form-search/index.js +41 -0
- package/dist/elements/cfpb-form-search/index.js.map +7 -0
- package/dist/elements/cfpb-form-search-input/index.js +41 -0
- package/dist/elements/cfpb-form-search-input/index.js.map +7 -0
- package/dist/elements/cfpb-icon-text/index.js +3 -3
- package/dist/elements/cfpb-icon-text/index.js.map +3 -3
- package/dist/elements/cfpb-label/index.js +3 -3
- package/dist/elements/cfpb-label/index.js.map +2 -2
- package/dist/elements/cfpb-list/index.js +39 -0
- package/dist/elements/cfpb-list/index.js.map +7 -0
- package/dist/elements/cfpb-list-item/index.js +39 -0
- package/dist/elements/cfpb-list-item/index.js.map +7 -0
- package/dist/elements/cfpb-multiselect/index.js +13 -4
- package/dist/elements/cfpb-multiselect/index.js.map +4 -4
- package/dist/elements/cfpb-pagination/index.js +3 -3
- package/dist/elements/cfpb-pagination/index.js.map +2 -2
- package/dist/elements/cfpb-select/index.css +2 -0
- package/dist/elements/cfpb-select/index.css.map +7 -0
- package/dist/elements/cfpb-select/index.js +42 -0
- package/dist/elements/cfpb-select/index.js.map +7 -0
- package/dist/elements/cfpb-select-list/index.js +39 -0
- package/dist/elements/cfpb-select-list/index.js.map +7 -0
- package/dist/elements/cfpb-tag-filter/index.js +3 -3
- package/dist/elements/cfpb-tag-filter/index.js.map +3 -3
- package/dist/elements/cfpb-tag-group/index.js +3 -3
- package/dist/elements/cfpb-tag-group/index.js.map +4 -4
- package/dist/elements/cfpb-tag-topic/index.js +4 -4
- package/dist/elements/cfpb-tag-topic/index.js.map +1 -1
- package/dist/elements/index.css +2 -0
- package/dist/elements/index.css.map +7 -0
- package/dist/elements/index.js +7 -6
- package/dist/elements/index.js.map +4 -4
- package/dist/index.js +7 -6
- package/dist/index.js.map +4 -4
- package/dist/utilities/index.js +1 -1
- package/dist/utilities/index.js.map +3 -3
- package/package.json +1 -1
- package/src/components/cfpb-expandables/expandable.js +3 -0
- package/src/components/cfpb-forms/multiselect.js +1 -1
- package/src/elements/abstracts/custom-props.css +123 -0
- package/src/elements/abstracts/grid-mixins.scss +83 -0
- package/src/elements/abstracts/heading-mixins.scss +346 -0
- package/src/elements/abstracts/index.scss +7 -0
- package/src/elements/abstracts/media-queries.scss +35 -0
- package/src/elements/abstracts/sizing-vars.scss +65 -0
- package/src/elements/abstracts/vars-breakpoints.scss +16 -0
- package/src/elements/abstracts/vars.css +79 -0
- package/src/elements/base/base.scss +375 -0
- package/src/elements/base/font.scss +27 -0
- package/src/elements/base/index.scss +3 -0
- package/src/elements/base/normalize.scss +290 -0
- package/src/elements/cfpb-button/cfpb-button-group.scss +10 -0
- package/src/elements/cfpb-button/cfpb-button-link.scss +96 -0
- package/src/elements/cfpb-button/cfpb-button.component.scss +11 -4
- package/src/elements/cfpb-button/cfpb-button.scss +222 -0
- package/src/elements/cfpb-button/index.js +28 -29
- package/src/elements/cfpb-button/vars.css +30 -0
- package/src/elements/cfpb-checkbox-icon/cfpb-checkbox-icon.component.scss +88 -0
- package/src/elements/cfpb-checkbox-icon/index.js +104 -0
- package/src/elements/cfpb-expandable/cfpb-expandable.component.scss +218 -0
- package/src/elements/cfpb-expandable/index.js +127 -0
- package/src/elements/cfpb-file-upload/cfpb-file-upload.component.scss +2 -2
- package/src/elements/cfpb-file-upload/index.js +16 -18
- package/src/elements/cfpb-form-alert/cfpb-form-alert.component.scss +36 -0
- package/src/elements/cfpb-form-alert/index.js +55 -0
- package/src/elements/cfpb-form-choice/cfpb-form-choice.component.scss +42 -81
- package/src/elements/cfpb-form-choice/index.js +58 -18
- package/src/elements/cfpb-form-search/cfpb-form-search.component.scss +54 -0
- package/src/elements/cfpb-form-search/index.js +194 -0
- package/src/elements/cfpb-form-search-input/cfpb-form-search-input.component.scss +217 -0
- package/src/elements/cfpb-form-search-input/index.js +136 -0
- package/src/elements/cfpb-icon-text/cfpb-icon-text.component.scss +32 -39
- package/src/elements/cfpb-icon-text/index.js +32 -104
- package/src/elements/cfpb-label/cfpb-label.component.scss +2 -2
- package/src/elements/cfpb-label/index.js +6 -9
- package/src/elements/cfpb-list/cfpb-list.component.scss +23 -0
- package/src/elements/cfpb-list/index.js +357 -0
- package/src/elements/cfpb-list/index.spec.js +169 -0
- package/src/elements/cfpb-list-item/cfpb-list-item.component.scss +69 -0
- package/src/elements/cfpb-list-item/index.js +215 -0
- package/src/elements/cfpb-pagination/cfpb-pagination.component.scss +2 -7
- package/src/elements/cfpb-pagination/index.js +6 -8
- package/src/elements/cfpb-select/cfpb-select.component.scss +241 -0
- package/src/elements/cfpb-select/index.js +381 -0
- package/src/elements/cfpb-tag-filter/cfpb-tag-filter.component.scss +6 -3
- package/src/elements/cfpb-tag-filter/index.js +15 -7
- package/src/elements/cfpb-tag-group/cfpb-tag-group.component.scss +2 -2
- package/src/elements/cfpb-tag-group/index.js +53 -6
- package/src/elements/cfpb-tag-topic/index.js +5 -7
- package/src/elements/cfpb-utilities/parse-child-data.js +50 -0
- package/src/elements/cfpb-utilities/parse-child-data.spec.js +56 -0
- package/src/elements/cfpb-utilities/search-service.js +46 -0
- package/src/elements/cfpb-utilities/search-service.spec.js +138 -0
- package/src/elements/cfpb-utilities/transition/transition.scss +98 -0
- package/src/elements/index.js +7 -1
- package/src/index.scss +11 -0
- package/src/tokens/abstracts/custom-props.json +1642 -0
- package/src/tokens/abstracts/vars.json +1319 -0
- package/src/tokens/cfpb-button/vars.json +436 -0
- package/src/utilities/transition/max-height-transition.js +74 -0
- package/dist/elements/cfpb-checkbox/index.js +0 -29
- package/src/elements/cfpb-multiselect/cfpb-multiselect.component.scss +0 -225
- package/src/elements/cfpb-multiselect/index.js +0 -444
- package/src/elements/cfpb-multiselect/multiselect-model.js +0 -288
- package/src/elements/cfpb-multiselect/multiselect-model.spec.js +0 -236
package/CHANGELOG.md
CHANGED
|
@@ -2,7 +2,172 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
-
## [4.
|
|
5
|
+
## [4.3.0](https://github.com/cfpb/design-system/compare/v4.2.4..v4.3.0) - December 16, 2025
|
|
6
|
+
|
|
7
|
+
### PRs in this release
|
|
8
|
+
|
|
9
|
+
- PR #[2410](https://github.com/cfpb/design-system/pull/2410): Add search input component - Ans
|
|
10
|
+
- PR #[2409](https://github.com/cfpb/design-system/pull/2409): Update decap-cms-app, liquidjs, react, cssnano, cypress, esbuild, eslint, eslint-plugin-jsdoc, globals, sass - Ans
|
|
11
|
+
- PR #[2412](https://github.com/cfpb/design-system/pull/2412): Add cfpb-form-alert component - Ans
|
|
12
|
+
- PR #[2413](https://github.com/cfpb/design-system/pull/2413): Add checkbox-icon component - Ans
|
|
13
|
+
- PR #[2414](https://github.com/cfpb/design-system/pull/2414): Move checkbox-icon to cfpb-checkbox-icon - Ans
|
|
14
|
+
- PR #[2415](https://github.com/cfpb/design-system/pull/2415): Fix focus/blur/hover states of checkboxes - Ans
|
|
15
|
+
- PR #[2418](https://github.com/cfpb/design-system/pull/2418): Fix linter issues - Ans
|
|
16
|
+
- PR #[2420](https://github.com/cfpb/design-system/pull/2420): Fix a11y issues - Ans
|
|
17
|
+
- PR #[2427](https://github.com/cfpb/design-system/pull/2427): Fix icon and text show/hide icon api - Ans
|
|
18
|
+
- PR #[2428](https://github.com/cfpb/design-system/pull/2428): Update marked, cypress, eslint-plugin-jsdoc, glob, sass - Ans
|
|
19
|
+
- PR #[2430](https://github.com/cfpb/design-system/pull/2430): Refactor cfpb-icon-text - Ans
|
|
20
|
+
- PR #[2432](https://github.com/cfpb/design-system/pull/2432): Add API examples - Ans
|
|
21
|
+
- PR #[2434](https://github.com/cfpb/design-system/pull/2434): Update @types/react, eslint-plugin-jsdoc, prettier, stylelint - Ans
|
|
22
|
+
- PR #[2435](https://github.com/cfpb/design-system/pull/2435): Add cfpb-list-item - Ans
|
|
23
|
+
- PR #[2436](https://github.com/cfpb/design-system/pull/2436): Add `<cfpb-form-search-input>` component - Ans
|
|
24
|
+
- PR #[2438](https://github.com/cfpb/design-system/pull/2438): Upgrade cypress, prettier | update cfpb-form-search with search-service - Ans
|
|
25
|
+
- PR #[2440](https://github.com/cfpb/design-system/pull/2440): Add cfpb-list interactive example - Ans
|
|
26
|
+
- PR #[2457](https://github.com/cfpb/design-system/pull/2457): Enhancements to `cfpb-list` and `cfpb-form-search-input` - Ans
|
|
27
|
+
- PR #[2458](https://github.com/cfpb/design-system/pull/2458): Lists - Add visibleCheckedItems property and add a filtered event - Ans
|
|
28
|
+
- PR #[2459](https://github.com/cfpb/design-system/pull/2459): Add parse-child-data utility - Ans
|
|
29
|
+
- PR #[2460](https://github.com/cfpb/design-system/pull/2460): Update react, react-dom, esbuild, eslint-plugin-jsdoc, prettier, sass - Ans
|
|
30
|
+
- PR #[2461](https://github.com/cfpb/design-system/pull/2461): Add cfpb-select - Ans
|
|
31
|
+
- PR #[2462](https://github.com/cfpb/design-system/pull/2462): Add cfpb-expandable - Ans
|
|
32
|
+
- PR #[2463](https://github.com/cfpb/design-system/pull/2463): Remove cfpb-multiselect - Ans
|
|
33
|
+
- PR #[2464](https://github.com/cfpb/design-system/pull/2464): CSS and accessibility fixes - Ans
|
|
34
|
+
- PR #[2465](https://github.com/cfpb/design-system/pull/2465): Update react, react-dom, eslint, release-it, sass - Ans
|
|
35
|
+
- PR #[2355](https://github.com/cfpb/design-system/pull/2355): Multiselect: Fix erroneous placeholder reference - Ans
|
|
36
|
+
|
|
37
|
+
### General
|
|
38
|
+
|
|
39
|
+
- Add search input component - ([6adf6b5](https://github.com/cfpb/design-system/commit/6adf6b5513c1abf7ff477f654d95f01dbfe15771)) - Ans
|
|
40
|
+
- Refactor search input CSS - ([024e75e](https://github.com/cfpb/design-system/commit/024e75ed17b2ced0f8d326579f4f2f57462e4057)) - Ans
|
|
41
|
+
- Up min-width to 300px to satisfy Firefox - ([d07b103](https://github.com/cfpb/design-system/commit/d07b1031b4655d021e1d59b04f999be360f758bc)) - Ans
|
|
42
|
+
- Lint files - ([db5fc8c](https://github.com/cfpb/design-system/commit/db5fc8c7bddf910087528f37b84193fe0eb50b1b)) - Ans
|
|
43
|
+
- Add cfpb-form-alert component - ([9273bf8](https://github.com/cfpb/design-system/commit/9273bf8d2cd836d4b1ace42caf0aaa5fdd8d654c)) - Ans
|
|
44
|
+
- Merge branch 'main' into ans_update_deps - Ans
|
|
45
|
+
- Add checkbox-icon component - ([41f2fcf](https://github.com/cfpb/design-system/commit/41f2fcf31c67099db9965b716e7992668a2c9cab)) - Ans
|
|
46
|
+
- Move checkbox-icon to cfpb-checkbox-icon - ([61380a3](https://github.com/cfpb/design-system/commit/61380a33b6348c9827ce38fa7156908d2e0596d3)) - Ans
|
|
47
|
+
- Fix focus/blur/hover states of checkboxes - ([1971c0c](https://github.com/cfpb/design-system/commit/1971c0c4e4f960bc2f8b58786c4f35dba9e1e2a6)) - Ans
|
|
48
|
+
- Fix linter issues - ([6ae04ee](https://github.com/cfpb/design-system/commit/6ae04ee3d83a196cdfb456bd83d19c752335726d)) - Ans
|
|
49
|
+
- Fix a11y issues - ([928626e](https://github.com/cfpb/design-system/commit/928626e8b2117c6001e46683d513c3f9b2b39720)) - Ans
|
|
50
|
+
- Fix icon and text show/hide icon api - ([3bb9401](https://github.com/cfpb/design-system/commit/3bb94011e9a7ef8a67bca69133076610647d2f96)) - Ans
|
|
51
|
+
- Lint files - ([3dd91b1](https://github.com/cfpb/design-system/commit/3dd91b108601c6ed69ea6aff98b039fdb58b8265)) - Ans
|
|
52
|
+
- Refactor cfpb-icon-text - ([70f10be](https://github.com/cfpb/design-system/commit/70f10be9b5aa4d43e68db0618ae4245a535b89b4)) - Ans
|
|
53
|
+
- Adding styledict config (#2421)
|
|
54
|
+
|
|
55
|
+
* Adding styledict config
|
|
56
|
+
|
|
57
|
+
Adds:
|
|
58
|
+
|
|
59
|
+
style-dictionary.config.js <- transforms from JSON tokens to .css
|
|
60
|
+
build-tokens.yml <- does what the above does on every commit or PR to the repo to ensure edits commited directly to JSON token files produces the .css files we need
|
|
61
|
+
package.json <- adds a yarn tokens to commands and invokes it as first step in yarn start process
|
|
62
|
+
|
|
63
|
+
* Adding style-dictionary to package.json and test files
|
|
64
|
+
|
|
65
|
+
* Remove GH action and add in details on how to contribute tokens
|
|
66
|
+
|
|
67
|
+
removing based on review with ans. Will be added back as a cron job that runs at night later. Updated contributors.md to include information about token usage.
|
|
68
|
+
|
|
69
|
+
Also small linting fixes.
|
|
70
|
+
|
|
71
|
+
* Fix formatting and wording in CONTRIBUTING.md
|
|
72
|
+
|
|
73
|
+
* addressing PR review feedback.
|
|
74
|
+
|
|
75
|
+
1) Removed building tokens from the yarn start command. `yarn tokens` will still kick off translation of the tokens.
|
|
76
|
+
2) Removed any variable descriptions from Figma variables. (that removed the comment from the generated .css)
|
|
77
|
+
3) Added empty last line
|
|
78
|
+
4) Renamed single letter var from p to fsPath.
|
|
79
|
+
5) Fixed contributing.md to use code blocks for paths - ([7e10857](https://github.com/cfpb/design-system/commit/7e108577294fae15c2bea85b988f147226a76b6b)) - itsmedavep
|
|
80
|
+
- Add API examples - ([d45c474](https://github.com/cfpb/design-system/commit/d45c4740ca3504c2f66687da3803adee59ebbcd1)) - Ans
|
|
81
|
+
- Restructuring to have web components use JSON (#2431)
|
|
82
|
+
|
|
83
|
+
* restructuring to have web components use JSON
|
|
84
|
+
|
|
85
|
+
duplicated contents of abstracts and base into elements/abstracts and elements/base
|
|
86
|
+
updated to using css custom props in base.scss instead of scss vars
|
|
87
|
+
added elements/abstracts and elements/base to index.scss
|
|
88
|
+
added vars.css to abstracts
|
|
89
|
+
|
|
90
|
+
this should establish a base to hook up the JSON tokens as the next step
|
|
91
|
+
|
|
92
|
+
* renaming sizing-vars to not be an scss partial file
|
|
93
|
+
|
|
94
|
+
As @anselmbradford pointed out we do not do that for any other files in the codebase, so the usage here was inconsistent.
|
|
95
|
+
|
|
96
|
+
Renamed to remove the underscore.
|
|
97
|
+
|
|
98
|
+
* removing unused js files and one grid-gutter-size var
|
|
99
|
+
|
|
100
|
+
* getting rid of the leftover js files in dist - ([b7e4922](https://github.com/cfpb/design-system/commit/b7e49228169d30d0593f63c791f7320b252f0077)) - itsmedavep
|
|
101
|
+
- Lint files - ([e04fb1a](https://github.com/cfpb/design-system/commit/e04fb1a6d05ea87ea1e804758714f7c7410ccefc)) - Ans
|
|
102
|
+
- Add cfpb-list-item - ([24292f2](https://github.com/cfpb/design-system/commit/24292f2bba1b64e2e9ee0d6180aa3570dd13bb2b)) - Ans
|
|
103
|
+
- Add `<cfpb-form-search-input>` - ([71b1303](https://github.com/cfpb/design-system/commit/71b1303f542810c624bd8fa5121e6c302ea883c3)) - Ans
|
|
104
|
+
- Upgrade cypress, prettier | update cfpb-form-search with search-service - ([28e2395](https://github.com/cfpb/design-system/commit/28e23956d01aac0fd0f27c4a99681f2ab9f13d71)) - Ans
|
|
105
|
+
- Update elements example - ([4da9e69](https://github.com/cfpb/design-system/commit/4da9e69763c3505f674c408743f5b9c33d0cea75)) - Ans
|
|
106
|
+
- Transitioning buttons over to using JSON and css custom props (#2433)
|
|
107
|
+
|
|
108
|
+
Co-authored-by: Ans <git@anselmbradford.com> - ([8bc75bf](https://github.com/cfpb/design-system/commit/8bc75bfe9b4613f1b37ad521d50c0bff8089c7e0)) - itsmedavep
|
|
109
|
+
- Add cfpb-list interactive example - ([4e960c4](https://github.com/cfpb/design-system/commit/4e960c472f134517bacb01879f28ab73791050c9)) - Ans
|
|
110
|
+
- Add correct ARIA attributes - ([8f9600f](https://github.com/cfpb/design-system/commit/8f9600f6f75e068f2f979ea74813c47000cd4efd)) - Ans
|
|
111
|
+
- Fixed issue with checked items - ([b28ac05](https://github.com/cfpb/design-system/commit/b28ac057283a441d47d6e5cdbb1a71d890b677ba)) - Ans
|
|
112
|
+
- Rewire import to use tokens from elements - ([06e7a5e](https://github.com/cfpb/design-system/commit/06e7a5e48ae3aaffe1a6e7d87ccf5043cd97fcfd)) - itsmedavep
|
|
113
|
+
- Revert "rewire import to use tokens from elements"
|
|
114
|
+
|
|
115
|
+
This reverts commit 06e7a5e48ae3aaffe1a6e7d87ccf5043cd97fcfd. - ([6ac5c22](https://github.com/cfpb/design-system/commit/6ac5c226b6da878f9055d921085bd6f59d9bdee9)) - itsmedavep
|
|
116
|
+
- Enhancements to lists - ([46619cd](https://github.com/cfpb/design-system/commit/46619cd4c7b01ff62273d6e34e35fe0b6e60a46d)) - Ans
|
|
117
|
+
- Lists-Add visibleCheckedItems property and add a filtered event - ([929c30e](https://github.com/cfpb/design-system/commit/929c30e2d02751676792b5cfb1bbbe9225741956)) - Ans
|
|
118
|
+
- Add parse-child-data utility - ([527570f](https://github.com/cfpb/design-system/commit/527570faf97367bb9f0353130c3dd3751969ecf8)) - Ans
|
|
119
|
+
- Lint files - ([9e53195](https://github.com/cfpb/design-system/commit/9e53195e797da125797b957fd0ef7fc4ae5e9378)) - Ans
|
|
120
|
+
- Add cfpb-select - ([c25851d](https://github.com/cfpb/design-system/commit/c25851dc8b29f404fe60301e3e4a173912efe261)) - Ans
|
|
121
|
+
- Fix search - ([53fbe96](https://github.com/cfpb/design-system/commit/53fbe96534c2e53eb92c17361bd6d8b66c1dd816)) - Ans
|
|
122
|
+
- Add cfpb-expandable - ([f3231c5](https://github.com/cfpb/design-system/commit/f3231c5b766f0c5ec4a8985b570b14a48340a086)) - Ans
|
|
123
|
+
- Remove cfpb-multiselect - ([8a93942](https://github.com/cfpb/design-system/commit/8a9394202918a2988c9c2e2378b0fe6f44c48898)) - Ans
|
|
124
|
+
- Importing abstracts from elements (#2441)
|
|
125
|
+
|
|
126
|
+
Updating import to use src/elements/abstracts - ([05bb28a](https://github.com/cfpb/design-system/commit/05bb28a749540bfee2363224167ed51b5e5870d5)) - itsmedavep
|
|
127
|
+
- Rewire imports to use new location and css output from JSON (#2442) - ([dcea912](https://github.com/cfpb/design-system/commit/dcea912494d9282b69c71cfb2231105546c6872b)) - itsmedavep
|
|
128
|
+
- Change to import so that things now point at the JSON versions of tokens (#2443) - ([e58f88b](https://github.com/cfpb/design-system/commit/e58f88be2f766dcaf82da6610baae66954766d36)) - itsmedavep
|
|
129
|
+
- Cfpb-from-choice rewired to import the css transformed from JSON tokens (#2444)
|
|
130
|
+
|
|
131
|
+
Also updated:
|
|
132
|
+
|
|
133
|
+
form-field-input-lg-target-bg
|
|
134
|
+
form-field-input-lg-target-bg-selected
|
|
135
|
+
form-field-input-lg-target-border
|
|
136
|
+
form-field-input-lg-target-bg-disabled
|
|
137
|
+
|
|
138
|
+
To use css custom props instead of SCSS variables - ([d6acf40](https://github.com/cfpb/design-system/commit/d6acf40f7866bce841f03a5729cee1e2c1e5bfbb)) - itsmedavep
|
|
139
|
+
- Rewired cfpb-form-search to import css translated from JSON tokens (#2445) - ([ed4ada5](https://github.com/cfpb/design-system/commit/ed4ada55be7d6acea8fa5f5aae985678b8d360f8)) - itsmedavep
|
|
140
|
+
- Cfpb-form-search-input rewired to import from css translated from JSON tokens (#2446) - ([7e4c6e3](https://github.com/cfpb/design-system/commit/7e4c6e35df6d03b6a7d81adf447c614614427e0a)) - itsmedavep
|
|
141
|
+
- Cfpb-icon-text import update (#2447)
|
|
142
|
+
|
|
143
|
+
updated @use to point at src/elements/abstracts in order to use our JSON translated css - ([53b9e9a](https://github.com/cfpb/design-system/commit/53b9e9a3aa1ce4ec604c5526eecfc40edc834fed)) - itsmedavep
|
|
144
|
+
- Updated import to use translated JSON (#2449)
|
|
145
|
+
|
|
146
|
+
Also updated
|
|
147
|
+
|
|
148
|
+
label-helper to use CSS custom properties - ([a995053](https://github.com/cfpb/design-system/commit/a9950532aeacf40ad37d6b69d0307a20e395ce37)) - itsmedavep
|
|
149
|
+
- Rewired cfpb-list to import JSON translated tokens (#2450)
|
|
150
|
+
|
|
151
|
+
Updated @use to point oat elements/abstracts - ([1f6e10d](https://github.com/cfpb/design-system/commit/1f6e10d6aa28196343da4d478fc0c9eec315bc02)) - itsmedavep
|
|
152
|
+
- Rewired import to use elements/abstracts (#2451) - ([b6919c5](https://github.com/cfpb/design-system/commit/b6919c571bfdb0a1f48c6a0ea41e2d23e95c0f8d)) - itsmedavep
|
|
153
|
+
- Rewired the import to use JSON translated tokens (#2453)
|
|
154
|
+
|
|
155
|
+
Updated @use to point at src/elements/abstracts
|
|
156
|
+
|
|
157
|
+
I did NOT change the utilities import because we are not duplicating that into the web components currently
|
|
158
|
+
Same thing goes for the icons. We currently are not duplicating them into elements so I did not update that import - ([f0f7e53](https://github.com/cfpb/design-system/commit/f0f7e538f662901aed6b25e05ce1ffcd1a054042)) - itsmedavep
|
|
159
|
+
- Rewired import to piont at elements (#2454)
|
|
160
|
+
|
|
161
|
+
Updated @use imports to point at our JSON translated css files - ([9862c9c](https://github.com/cfpb/design-system/commit/9862c9c8c5bad80ec404c365fd55625da946ef24)) - itsmedavep
|
|
162
|
+
- Rewired cfpb-tag-group to use JSON translated css (#2455)
|
|
163
|
+
|
|
164
|
+
Updated @use to point at src/elements/abstracts & src/elements/cfpb-button/vars - ([ca4b57a](https://github.com/cfpb/design-system/commit/ca4b57abd716085b7469e8032a9f6649073e80fd)) - itsmedavep
|
|
165
|
+
- CSS and accessibility fixes - ([85c59d8](https://github.com/cfpb/design-system/commit/85c59d805f37523183886be9a070d017bd12ab04)) - Ans
|
|
166
|
+
- Linter fixes - ([e3d73a5](https://github.com/cfpb/design-system/commit/e3d73a5572e52e57fa4e8c4d868e367f103720bb)) - Ans
|
|
167
|
+
- Fix erroneous placeholder reference - ([80fe377](https://github.com/cfpb/design-system/commit/80fe377c4c62d35d04b1307d3c046f3282c80865)) - Ans
|
|
168
|
+
- Re-build assets - ([133fe55](https://github.com/cfpb/design-system/commit/133fe55e86ca592ae0c8df470adedef500939ed6)) - Ans
|
|
169
|
+
|
|
170
|
+
## [4.2.4](https://github.com/cfpb/design-system/compare/v4.2.3..vv4.2.4) - October 16, 2025
|
|
6
171
|
|
|
7
172
|
### PRs in this release
|
|
8
173
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(()=>{var ye=Object.defineProperty;var U=(e,t)=>{for(var r in t)ye(e,r,{get:t[r],enumerable:!0})};var oe={};U(oe,{default:()=>we});var we={};var se={bpXS:{min:0,max:600},bpSM:{min:601,max:900},bpMED:{min:901,max:1020},bpLG:{min:1021,max:1200},bpXL:{min:1201}};function Y(){let e=getComputedStyle(document.body).fontSize;return e=e===""?-1:e,parseFloat(e)}function Le(e,t){let r=e.min,n=e.max;Y()>0&&Y()!==16&&(r=r/16*Y(),n=n/16*Y());let i=r||0,o=n||Number.POSITIVE_INFINITY;return i<=t&&t<=o}function Ae(e){let t={};e=e||window.innerWidth;let r;for(r in se)t[r]=Le(se[r],e);return t}var K="mobile",je="tablet",Te="desktop";function de(e){let t=!1,r=Ae();return(e===K&&r.bpXS||e===je&&r.bpSM||e===Te&&(r.bpMED||r.bpLG||r.bpXL))&&(t=!0),t}var E="data-js-hook",le="behavior_",be="state_";function y(){let e={};function t(a,i){return{}.hasOwnProperty.call(e,a)?e[a].push(i):e[a]=[i],this}function r(a,i){if(!{}.hasOwnProperty.call(e,a))return this;let o=e[a].indexOf(i);return o!==-1&&e[a].splice(o,1),this}function n(a,i){if(!{}.hasOwnProperty.call(e,a))return this;i=i||{};let o=e[a];for(let d=0,c=o.length;d<c;d++)o[d].call(this,i);return this}return this.addEventListener=t,this.removeEventListener=r,this.dispatchEvent=n,this.getRegisteredEvents=()=>e,this}function M(e,t){if(!e)return!1;let r=e.getAttribute(E);return r?(r=r.split(" "),r.indexOf(t)>-1):!1}function v(e,t){if(M(e,t))return t;if(t.indexOf(" ")!==-1){let n=E+" values cannot contain spaces!";throw new Error(n)}let r=e.getAttribute(E);return r!==null&&(t=r+" "+t),e.setAttribute(E,t),t}var ce=be+"atomic_init";function Oe(e,t){if(!e||!e.classList){let r=e+' is not valid. Check that element is a DOM node with class "'+t+'"';throw new Error(r)}return e}function ke(e,t){let r=e.classList.contains(t)?e:e.querySelector("."+t);if(!r){let n=t+" not found on or in passed DOM node.";throw new Error(n)}return r}function A(e,t){return Oe(e,t),ke(e,t)}function j(e){return M(e,ce)?!1:(v(e,ce),!0)}function T(e,t,r,n={}){let i=(r||document).querySelectorAll(e),o=[],d,c;for(let u=0,s=i.length;u<s;u++)c=i[u],M(c,ce)===!1&&(d=new t(c),d.init(n),o.push(d));return o}function ue(e,t){let r;if(M(e,t))return r=e,r;if(e){let n="["+E+"="+t+"]";r=e.querySelector(n)}if(!r){let n=t+" behavior not found on passed DOM node!";throw new Error(n)}return r}function f(e,t,r){let n=t,a=e;if(!r)throw new Error("Child transition argument must be defined!");let i=r,o,d,c,u=!1,s=!1,h=!1;if(typeof n.CSS_PROPERTY=="undefined"||typeof n.BASE_CLASS=="undefined")throw new Error("Transitions require CSS_PROPERTY and BASE_CLASS to be passed into BaseTransition.");function b(){d&&u?(a.addEventListener(d,c),i.dispatchEvent(f.BEGIN_EVENT,{target:i,type:f.BEGIN_EVENT}),a.classList.add(f.ANIMATING_CLASS),s=!0):(i.dispatchEvent(f.BEGIN_EVENT,{target:i,type:f.BEGIN_EVENT}),c())}function S(){a.removeEventListener(d,c)}function O(p){return p&&p.propertyName!==n.CSS_PROPERTY?!1:(S(),a.classList.remove(f.ANIMATING_CLASS),i.dispatchEvent(f.END_EVENT,{target:i,type:f.END_EVENT}),s=!1,!0)}function k(){let p;for(p in n)({}).hasOwnProperty.call(n,p)&&n[p]!==n.BASE_CLASS&&a.classList.contains(n[p])&&a.classList.remove(n[p])}function g(){s&&(a.style.webkitTransitionDuration="0",a.style.mozTransitionDuration="0",a.style.oTransitionDuration="0",a.style.transitionDuration="0",a.removeEventListener(d,c),c(),a.style.webkitTransitionDuration="",a.style.mozTransitionDuration="",a.style.oTransitionDuration="",a.style.transitionDuration="")}function w(){g(),k(),a.classList.remove(n.BASE_CLASS)}function C(){a.classList.remove(f.NO_ANIMATION_CLASS),u=!0}function R(){a.classList.add(f.NO_ANIMATION_CLASS),u=!1}function L(p){if(!p){let ae="Element does not have TransitionEnd event. It may be null!";throw new Error(ae)}let X,P={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},B;for(B in P)if({}.hasOwnProperty.call(P,B)&&typeof p.style[B]!="undefined"){X=P[B];break}return X}function D(p){w(),C(),a=p,a.classList.add(n.BASE_CLASS),d=L(a)}function ee(p){if(u=!a.classList.contains(f.NO_ANIMATION_CLASS),c=O.bind(this),D(a),!p)throw new Error("Transition needs to be passed an initial CSS class on initialization!");return a.classList.add(p),this}function te(p){return h||(k(),h=!0),a.classList.contains(p)?!1:(S(),a.classList.remove(o),o=p,b(),a.classList.add(o),!0)}return this.animateOff=R,this.animateOn=C,this.applyClass=te,this.halt=g,this.init=ee,this.isAnimated=()=>u,this.remove=w,this.setElement=D,this}f.BEGIN_EVENT="transitionbegin";f.END_EVENT="transitionend";f.NO_ANIMATION_CLASS="u-no-animation";f.ANIMATING_CLASS="u-is-animating";var V=le+"flyout-menu",Ie="["+E+"="+V;function I(e,t=!0){let r=ue(e,V),n=C(e),a=ue(e,V+"_content"),i=0,o=0,d=1,c=2,u=3,s,h,b,S=ae.bind(this),O=B.bind(this),k,g=!0,w=!1;function C(l){let m=[],x=l.querySelectorAll(`${Ie}_trigger]`),G,N,ne;for(let ie=x.length>>>0;ie--;){for(ne=!1,G=x[ie],N=G.parentElement;N!==l;)N.getAttribute(E)&&N.getAttribute(E).split(" ").indexOf(V)!==-1?(ne=!0,N=l):N=N.parentElement;ne||m.unshift(x[ie])}return m}function R(l=!1){return i=l?u:o,n.forEach(m=>{L("expanded",m,l),m.addEventListener("click",p.bind(this)),m.addEventListener("touchstart",D,{passive:!0}),m.addEventListener("mouseover",ee.bind(this)),m.addEventListener("mouseout",te.bind(this))}),a.setAttribute("data-open",l?"true":"false"),t&&!l&&a.setAttribute("hidden",""),me(),this}function L(l,m,x){let G=String(x);return m.setAttribute("aria-"+l,G),G}function D(){w=!0}function ee(l){g||(w||this.dispatchEvent("triggerover",{target:this,trigger:l.target,type:"triggerover"}),w=!1)}function te(l){g||this.dispatchEvent("triggerout",{target:this,trigger:l.target,type:"triggerout"})}function p(l){if(!g)switch(this.dispatchEvent("triggerclick",{target:this,trigger:l.target,type:"triggerclick"}),l.preventDefault(),i){case o:case d:this.expand();break;case c:case u:this.collapse();break}}function X(){if(s==null||s.halt(),i===c||i===u)return this;if(i=c,t&&a.removeAttribute("hidden"),this.dispatchEvent("expandbegin",{target:this,type:"expandbegin"}),!h||!b)return O(),this;let l=s==null?void 0:s.isAnimated();return l&&s.addEventListener(f.END_EVENT,O),h(),l||O(),this}function P(){if(s==null||s.halt(),i===d||i===o)return this;for(let m=0,x=n.length;m<x;m++)L("expanded",n[m],!1);if(a.setAttribute("data-open","false"),i=d,this.dispatchEvent("collapsebegin",{target:this,type:"collapsebegin"}),!b||!h)return S(),this;let l=s==null?void 0:s.isAnimated();return l&&s.addEventListener(f.END_EVENT,S),b(),l||S(),this}function B(){i=u,a.setAttribute("data-open","true"),s&&s.removeEventListener(f.END_EVENT,O),this.dispatchEvent("expandend",{target:this,type:"expandend"});for(let l=0,m=n.length;l<m;l++)L("expanded",n[l],!0)}function ae(){i=o,t&&a.setAttribute("hidden",""),s&&s.removeEventListener(f.END_EVENT,S),this.dispatchEvent("collapseend",{target:this,type:"collapseend"})}function ve(l,m,x){s=l,m&&m!==b&&(b=m),x&&x!==h&&(h=x)}function ge(){s&&s.remove();let l;s=l,h=l,b=l}function _e(){return{container:r,content:a,trigger:n}}function me(){return g&&(g=!1),!g}function xe(){return g||(g=!0),g}function Ee(l){return k=l,this}let re=new y;return this.addEventListener=re.addEventListener,this.removeEventListener=re.removeEventListener,this.dispatchEvent=re.dispatchEvent,this.init=R,this.expand=X,this.collapse=P,this.setTransition=ve,this.clearTransition=ge,this.getData=()=>k,this.getTransition=()=>s,this.getDom=_e,this.isAnimating=()=>i===c||i===d,this.isExpanded=()=>i===u,this.resume=me,this.setData=Ee,this.suspend=xe,I.BASE_CLASS=V,this}var $={CSS_PROPERTY:"max-height",BASE_CLASS:"u-max-height-transition",MH_DEFAULT:"u-max-height-default",MH_SUMMARY:"u-max-height-summary",MH_ZERO:"u-max-height-zero"};function _(e){let t=new y,r=new f(e,$,this),n=0;function a(){let b=e.scrollHeight+"px";e.style.maxHeight=b}function i(){window.removeEventListener("load",i),a()}function o(h){return r.init(h),window.addEventListener("load",i),window.addEventListener("resize",()=>{a()}),this}function d(){return a(),r.applyClass($.MH_DEFAULT),(!n||e.scrollHeight>n)&&(n=e.scrollHeight),this}function c(){return r.applyClass($.MH_SUMMARY),n=e.scrollHeight,this}function u(){return r.applyClass($.MH_ZERO),n=e.scrollHeight,this}function s(){return e.style.maxHeight="",r.remove()}return this.addEventListener=t.addEventListener,this.dispatchEvent=t.dispatchEvent,this.removeEventListener=t.removeEventListener,this.animateOff=r.animateOff,this.animateOn=r.animateOn,this.halt=r.halt,this.isAnimated=r.isAnimated,this.setElement=r.setElement,this.refresh=a,this.remove=s,this.init=o,this.maxHeightDefault=d,this.maxHeightSummary=c,this.maxHeightZero=u,this}_.CLASSES=$;var fe={};U(fe,{default:()=>Ne});var Ne={};var z="o-expandable";function H(e){let t=A(e,z),r,n,a,i,o;function d(){if(!j(t))return this;r=t.querySelector(`.${z}__header`),n=t.querySelector(`.${z}__content`),a=t.querySelector(`.${z}__label`);let s=t.classList.contains(`${z}--onload-open`);v(t,"behavior_flyout-menu"),v(r,"behavior_flyout-menu_trigger"),v(n,"behavior_flyout-menu_content");let h=s?_.CLASSES.MH_DEFAULT:_.CLASSES.MH_ZERO;return i=new _(n).init(h),o=new I(t),o.setTransition(i,i.maxHeightZero,i.maxHeightDefault),o.init(s),o.addEventListener("expandbegin",()=>{n.classList.remove("u-hidden"),this.dispatchEvent("expandbegin",{target:this})}),o.addEventListener("collapseend",()=>{n.classList.add("u-hidden")}),this}function c(){return a.textContent.trim()}this.init=d,this.expand=()=>o.expand(),this.collapse=()=>o.collapse(),this.isExpanded=()=>o.isExpanded(),this.refresh=()=>o.getTransition().refresh(),this.getLabelText=c;let u=new y;return this.addEventListener=u.addEventListener,this.removeEventListener=u.removeEventListener,this.dispatchEvent=u.dispatchEvent,this}H.BASE_CLASS=z;H.init=e=>T(`.${H.BASE_CLASS}`,H,e);var pe={};U(pe,{default:()=>Ce});var Ce={};var Z="o-expandable-group";function J(e){let t=A(e,Z),r=t.classList.contains(`${Z}--accordion`),n,a;function i(d){let c=d.target;a&&a!==c&&a.collapse(),a=c}function o(d){return j(t)?(r&&(n=d,n.forEach(c=>{c.addEventListener("expandbegin",i)})),this):this}return this.init=o,this}J.BASE_CLASS=Z;J.init=e=>{(e||document).querySelectorAll(`.${Z}`).forEach(n=>{let a=T(`.${H.BASE_CLASS}`,H,n);new J(n).init(a)})};var he={};U(he,{default:()=>ze});var ze={};var F="o-summary";function W(e){let t=A(e,F),r=t.classList.contains(`${F}--mobile`),n=t.querySelector(`.${F}__content`),a=t.querySelector(`.${F}__btn`),i,o,d;function c(){return j(t)?(window.addEventListener("load",u),this):this}function u(){window.removeEventListener("load",u),d=!S(),v(t,"behavior_flyout-menu"),v(n,"behavior_flyout-menu_content"),v(a,"behavior_flyout-menu_trigger"),o=new I(t,!1),i=new _(n),i.init(d?_.CLASSES.MH_SUMMARY:_.CLASSES.MH_DEFAULT),o.setTransition(i,i.maxHeightSummary,i.maxHeightDefault),o.addEventListener("triggerclick",O),o.init(),b(),window.addEventListener("resize",b),"onorientationchange"in window&&window.addEventListener("orientationchange",b),t.addEventListener("focusin",s),n.addEventListener("click",h)}function s(D){!d&&D.target!==a&&(a.click(),t.removeEventListener("focusin",s))}function h(D){D.target.tagName!=="A"&&o.isExpanded()&&i.refresh()}function b(){S()?R():C()}function S(){return r&&!de(K)||n.scrollHeight<=88}function O(){o.addEventListener("expandend",k)}function k(){w(),window.removeEventListener("resize",b),window.removeEventListener("orientationchange",b),o.removeEventListener("expandend",k),o.suspend(),i.remove()}function g(){a.classList.remove("u-hidden")}function w(){a.classList.add("u-hidden")}function C(){return d&&(o.collapse(),i.animateOn(),g(),d=!1),!d}function R(){return d||(i.animateOff(),o.expand(),w(),d=!0),d}let L=new y;return this.addEventListener=L.addEventListener,this.removeEventListener=L.removeEventListener,this.dispatchEvent=L.dispatchEvent,this.init=c,this}W.BASE_CLASS=F;W.init=e=>T(`.${F}`,W,e);var q="o-summary-minimal";function Q(e){let t=A(e,q),r=t.querySelector(`.${q}__content`),n=t.querySelector(`.${q}__btn`),a,i;function o(){return j(t)?(v(t,"behavior_flyout-menu"),v(r,"behavior_flyout-menu_content"),v(n,"behavior_flyout-menu_trigger"),window.addEventListener("load",d),this):this}function d(){window.removeEventListener("load",d),i=new I(t,!1),a=new _(r),a.init(_.CLASSES.MH_SUMMARY),i.setTransition(a,a.maxHeightSummary,a.maxHeightDefault),i.init(),t.addEventListener("focusin",c),r.addEventListener("click",u),i.collapse(),a.animateOn()}function c(h){h.target!==n&&(n.click(),t.removeEventListener("focusin",c))}function u(h){h.target.tagName!=="A"&&i.isExpanded()&&a.refresh()}let s=new y;return this.addEventListener=s.addEventListener,this.removeEventListener=s.removeEventListener,this.dispatchEvent=s.dispatchEvent,this.init=o,this}Q.BASE_CLASS=q;Q.init=e=>T(`.${q}`,Q,e);})();
|
|
1
|
+
(()=>{var we=Object.defineProperty;var U=(e,a)=>{for(var i in a)we(e,i,{get:a[i],enumerable:!0})};var oe={};U(oe,{default:()=>Le});var Le={};var se={bpXS:{min:0,max:600},bpSM:{min:601,max:900},bpMED:{min:901,max:1020},bpLG:{min:1021,max:1200},bpXL:{min:1201}};function Y(){let e=getComputedStyle(document.body).fontSize;return e=e===""?-1:e,parseFloat(e)}function Ae(e,a){let i=e.min,r=e.max;Y()>0&&Y()!==16&&(i=i/16*Y(),r=r/16*Y());let n=i||0,o=r||Number.POSITIVE_INFINITY;return n<=a&&a<=o}function Te(e){let a={};e=e||window.innerWidth;let i;for(i in se)a[i]=Ae(se[i],e);return a}var K="mobile",je="tablet",Oe="desktop";function de(e){let a=!1,i=Te();return(e===K&&i.bpXS||e===je&&i.bpSM||e===Oe&&(i.bpMED||i.bpLG||i.bpXL))&&(a=!0),a}var L="data-js-hook",ce="behavior_",be="state_";function A(){let e={};function a(t,n){return{}.hasOwnProperty.call(e,t)?e[t].push(n):e[t]=[n],this}function i(t,n){if(!{}.hasOwnProperty.call(e,t))return this;let o=e[t].indexOf(n);return o!==-1&&e[t].splice(o,1),this}function r(t,n){if(!{}.hasOwnProperty.call(e,t))return this;n=n||{};let o=e[t];for(let d=0,l=o.length;d<l;d++)o[d].call(this,n);return this}return this.addEventListener=a,this.removeEventListener=i,this.dispatchEvent=r,this.getRegisteredEvents=()=>e,this}function C(e,a){if(!e)return!1;let i=e.getAttribute(L);return i?(i=i.split(" "),i.indexOf(a)>-1):!1}function x(e,a){if(C(e,a))return a;if(a.indexOf(" ")!==-1){let r=L+" values cannot contain spaces!";throw new Error(r)}let i=e.getAttribute(L);return i!==null&&(a=i+" "+a),e.setAttribute(L,a),a}var le=be+"atomic_init";function ke(e,a){if(!e||!e.classList){let i=e+' is not valid. Check that element is a DOM node with class "'+a+'"';throw new Error(i)}return e}function He(e,a){let i=e.classList.contains(a)?e:e.querySelector("."+a);if(!i){let r=a+" not found on or in passed DOM node.";throw new Error(r)}return i}function O(e,a){return ke(e,a),He(e,a)}function k(e){return C(e,le)?!1:(x(e,le),!0)}function H(e,a,i,r={}){let n=(i||document).querySelectorAll(e),o=[],d,l;for(let u=0,s=n.length;u<s;u++)l=n[u],C(l,le)===!1&&(d=new a(l),d.init(r),o.push(d));return o}function ue(e,a){let i;if(C(e,a))return i=e,i;if(e){let r="["+L+"="+a+"]";i=e.querySelector(r)}if(!i){let r=a+" behavior not found on passed DOM node!";throw new Error(r)}return i}function p(e,a,i){let r=a,t=e;if(!i)throw new Error("Child transition argument must be defined!");let n=i,o,d,l,u=!1,s=!1,v=!1;if(typeof r.CSS_PROPERTY=="undefined"||typeof r.BASE_CLASS=="undefined")throw new Error("Transitions require CSS_PROPERTY and BASE_CLASS to be passed into BaseTransition.");function _(){d&&u?(t.addEventListener(d,l),n.dispatchEvent(p.BEGIN_EVENT,{target:n,type:p.BEGIN_EVENT}),t.classList.add(p.ANIMATING_CLASS),s=!0):(n.dispatchEvent(p.BEGIN_EVENT,{target:n,type:p.BEGIN_EVENT}),l())}function w(){t.removeEventListener(d,l)}function f(h){return h&&h.propertyName!==r.CSS_PROPERTY?!1:(w(),t.classList.remove(p.ANIMATING_CLASS),n.dispatchEvent(p.END_EVENT,{target:n,type:p.END_EVENT}),s=!1,!0)}function g(){let h;for(h in r)({}).hasOwnProperty.call(r,h)&&r[h]!==r.BASE_CLASS&&t.classList.contains(r[h])&&t.classList.remove(r[h])}function m(){s&&(t.style.webkitTransitionDuration="0",t.style.mozTransitionDuration="0",t.style.oTransitionDuration="0",t.style.transitionDuration="0",t.removeEventListener(d,l),l(),t.style.webkitTransitionDuration="",t.style.mozTransitionDuration="",t.style.oTransitionDuration="",t.style.transitionDuration="")}function y(){m(),g(),t.classList.remove(r.BASE_CLASS)}function T(){t.classList.remove(p.NO_ANIMATION_CLASS),u=!0}function P(){t.classList.add(p.NO_ANIMATION_CLASS),u=!1}function j(h){if(!h){let ae="Element does not have TransitionEnd event. It may be null!";throw new Error(ae)}let X,$={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},B;for(B in $)if({}.hasOwnProperty.call($,B)&&typeof h.style[B]!="undefined"){X=$[B];break}return X}function D(h){y(),T(),t=h,t.classList.add(r.BASE_CLASS),d=j(t)}function ee(h){if(u=!t.classList.contains(p.NO_ANIMATION_CLASS),l=f.bind(this),D(t),!h)throw new Error("Transition needs to be passed an initial CSS class on initialization!");return t.classList.add(h),this}function te(h){return v||(g(),v=!0),t.classList.contains(h)?!1:(w(),t.classList.remove(o),o=h,_(),t.classList.add(o),!0)}return this.animateOff=P,this.animateOn=T,this.applyClass=te,this.halt=m,this.init=ee,this.isAnimated=()=>u,this.remove=y,this.setElement=D,this}p.BEGIN_EVENT="transitionbegin";p.END_EVENT="transitionend";p.NO_ANIMATION_CLASS="u-no-animation";p.ANIMATING_CLASS="u-is-animating";var G=ce+"flyout-menu",Ie="["+L+"="+G;function I(e,a=!0){let i=ue(e,G),r=T(e),t=ue(e,G+"_content"),n=0,o=0,d=1,l=2,u=3,s,v,_,w=ae.bind(this),f=B.bind(this),g,m=!0,y=!1;function T(c){let b=[],S=c.querySelectorAll(`${Ie}_trigger]`),V,M,ne;for(let ie=S.length>>>0;ie--;){for(ne=!1,V=S[ie],M=V.parentElement;M!==c;)M.getAttribute(L)&&M.getAttribute(L).split(" ").indexOf(G)!==-1?(ne=!0,M=c):M=M.parentElement;ne||b.unshift(S[ie])}return b}function P(c=!1){return n=c?u:o,r.forEach(b=>{j("expanded",b,c),b.addEventListener("click",h.bind(this)),b.addEventListener("touchstart",D,{passive:!0}),b.addEventListener("mouseover",ee.bind(this)),b.addEventListener("mouseout",te.bind(this))}),t.setAttribute("data-open",c?"true":"false"),a&&!c&&t.setAttribute("hidden",""),me(),this}function j(c,b,S){let V=String(S);return b.setAttribute("aria-"+c,V),V}function D(){y=!0}function ee(c){m||(y||this.dispatchEvent("triggerover",{target:this,trigger:c.target,type:"triggerover"}),y=!1)}function te(c){m||this.dispatchEvent("triggerout",{target:this,trigger:c.target,type:"triggerout"})}function h(c){if(!m)switch(this.dispatchEvent("triggerclick",{target:this,trigger:c.target,type:"triggerclick"}),c.preventDefault(),n){case o:case d:this.expand();break;case l:case u:this.collapse();break}}function X(){if(s==null||s.halt(),n===l||n===u)return this;if(n=l,a&&t.removeAttribute("hidden"),this.dispatchEvent("expandbegin",{target:this,type:"expandbegin"}),!v||!_)return f(),this;let c=s==null?void 0:s.isAnimated();return c&&s.addEventListener(p.END_EVENT,f),v(),c||f(),this}function $(){if(s==null||s.halt(),n===d||n===o)return this;for(let b=0,S=r.length;b<S;b++)j("expanded",r[b],!1);if(t.setAttribute("data-open","false"),n=d,this.dispatchEvent("collapsebegin",{target:this,type:"collapsebegin"}),!_||!v)return w(),this;let c=s==null?void 0:s.isAnimated();return c&&s.addEventListener(p.END_EVENT,w),_(),c||w(),this}function B(){n=u,t.setAttribute("data-open","true"),s&&s.removeEventListener(p.END_EVENT,f),this.dispatchEvent("expandend",{target:this,type:"expandend"});for(let c=0,b=r.length;c<b;c++)j("expanded",r[c],!0)}function ae(){n=o,a&&t.setAttribute("hidden",""),s&&s.removeEventListener(p.END_EVENT,w),this.dispatchEvent("collapseend",{target:this,type:"collapseend"})}function ge(c,b,S){s=c,b&&b!==_&&(_=b),S&&S!==v&&(v=S)}function _e(){s&&s.remove();let c;s=c,v=c,_=c}function xe(){return{container:i,content:t,trigger:r}}function me(){return m&&(m=!1),!m}function ye(){return m||(m=!0),m}function Ee(c){return g=c,this}let re=new A;return this.addEventListener=re.addEventListener,this.removeEventListener=re.removeEventListener,this.dispatchEvent=re.dispatchEvent,this.init=P,this.expand=X,this.collapse=$,this.setTransition=ge,this.clearTransition=_e,this.getData=()=>g,this.getTransition=()=>s,this.getDom=xe,this.isAnimating=()=>n===l||n===d,this.isExpanded=()=>n===u,this.resume=me,this.setData=Ee,this.suspend=ye,I.BASE_CLASS=G,this}var ve="transitiondir",z={CSS_PROPERTY:"max-height",BASE_CLASS:"u-max-height-transition",MH_DEFAULT:"u-max-height-default",MH_SUMMARY:"u-max-height-summary",MH_DYNAMIC:"u-max-height-dynamic",MH_ZERO:"u-max-height-zero"};function E(e){let a=this,i=new A,r=new p(e,z,this),t=0;function n(){let g=e.scrollHeight+"px";e.style.maxHeight=g,e.style.bottom="auto",e.style.top="auto"}function o(){let f=e.getBoundingClientRect(),g=window.innerHeight-f.bottom,m=f.top,y=g<=140?"up":"down";return{rect:f,distanceToBottom:g,distanceToTop:m,dir:y}}function d(){window.removeEventListener("load",d),n()}function l(f){return r.init(f),window.addEventListener("load",d),window.addEventListener("resize",()=>{n()}),this}function u(){return n(),r.applyClass(z.MH_DEFAULT),(!t||e.scrollHeight>t)&&(t=e.scrollHeight),this}function s(){return n(),r.applyClass(z.MH_SUMMARY),t=e.scrollHeight,this}function v(){n(),e.style.top="100%";let f=o(),g=30,m=2,y=e.scrollHeight+g<f.distanceToBottom?`${e.scrollHeight+m}px`:`${f.distanceToBottom-g}px`;if(f.dir==="up"){let T=e.parentElement.offsetHeight;g+=T,e.style.bottom=`${T-m}px`,y=e.scrollHeight+g<f.distanceToTop?`${e.scrollHeight+m}px`:`${f.distanceToTop-g}px`,e.style.top="unset"}return e.style.maxHeight=y,r.applyClass(z.MH_DYNAMIC),a.dispatchEvent(ve,{target:a,type:ve,dir:f.dir}),t=e.scrollHeight,this}function _(){return r.applyClass(z.MH_ZERO),t=e.scrollHeight,this}function w(){return e.style.maxHeight="",r.remove()}return this.addEventListener=i.addEventListener,this.dispatchEvent=i.dispatchEvent,this.removeEventListener=i.removeEventListener,this.animateOff=r.animateOff,this.animateOn=r.animateOn,this.halt=r.halt,this.isAnimated=r.isAnimated,this.setElement=r.setElement,this.refresh=n,this.remove=w,this.init=l,this.maxHeightDefault=u,this.maxHeightSummary=s,this.maxHeightZero=_,this.maxHeightDynamic=v,this}E.CLASSES=z;var fe={};U(fe,{default:()=>Me});var Me={};var F="o-expandable";function N(e){let a=O(e,F),i,r,t,n,o;function d(){if(!k(a))return this;i=a.querySelector(`.${F}__header`),r=a.querySelector(`.${F}__content`),t=a.querySelector(`.${F}__label`);let s=a.classList.contains(`${F}--onload-open`);x(a,"behavior_flyout-menu"),x(i,"behavior_flyout-menu_trigger"),x(r,"behavior_flyout-menu_content");let v=s?E.CLASSES.MH_DEFAULT:E.CLASSES.MH_ZERO;return n=new E(r).init(v),s||r.classList.add("u-hidden"),o=new I(a),o.setTransition(n,n.maxHeightZero,n.maxHeightDefault),o.init(s),o.addEventListener("expandbegin",()=>{r.classList.remove("u-hidden"),this.dispatchEvent("expandbegin",{target:this})}),o.addEventListener("collapseend",()=>{r.classList.add("u-hidden")}),this}function l(){return t.textContent.trim()}this.init=d,this.expand=()=>o.expand(),this.collapse=()=>o.collapse(),this.isExpanded=()=>o.isExpanded(),this.refresh=()=>o.getTransition().refresh(),this.getLabelText=l;let u=new A;return this.addEventListener=u.addEventListener,this.removeEventListener=u.removeEventListener,this.dispatchEvent=u.dispatchEvent,this}N.BASE_CLASS=F;N.init=e=>H(`.${N.BASE_CLASS}`,N,e);var pe={};U(pe,{default:()=>Be});var Be={};var Z="o-expandable-group";function J(e){let a=O(e,Z),i=a.classList.contains(`${Z}--accordion`),r,t;function n(d){let l=d.target;t&&t!==l&&t.collapse(),t=l}function o(d){return k(a)?(i&&(r=d,r.forEach(l=>{l.addEventListener("expandbegin",n)})),this):this}return this.init=o,this}J.BASE_CLASS=Z;J.init=e=>{(e||document).querySelectorAll(`.${Z}`).forEach(r=>{let t=H(`.${N.BASE_CLASS}`,N,r);new J(r).init(t)})};var he={};U(he,{default:()=>Fe});var Fe={};var R="o-summary";function W(e){let a=O(e,R),i=a.classList.contains(`${R}--mobile`),r=a.querySelector(`.${R}__content`),t=a.querySelector(`.${R}__btn`),n,o,d;function l(){return k(a)?(window.addEventListener("load",u),this):this}function u(){window.removeEventListener("load",u),d=!w(),x(a,"behavior_flyout-menu"),x(r,"behavior_flyout-menu_content"),x(t,"behavior_flyout-menu_trigger"),o=new I(a,!1),n=new E(r),n.init(d?E.CLASSES.MH_SUMMARY:E.CLASSES.MH_DEFAULT),o.setTransition(n,n.maxHeightSummary,n.maxHeightDefault),o.addEventListener("triggerclick",f),o.init(),_(),window.addEventListener("resize",_),"onorientationchange"in window&&window.addEventListener("orientationchange",_),a.addEventListener("focusin",s),r.addEventListener("click",v)}function s(D){!d&&D.target!==t&&(t.click(),a.removeEventListener("focusin",s))}function v(D){D.target.tagName!=="A"&&o.isExpanded()&&n.refresh()}function _(){w()?P():T()}function w(){return i&&!de(K)||r.scrollHeight<=88}function f(){o.addEventListener("expandend",g)}function g(){y(),window.removeEventListener("resize",_),window.removeEventListener("orientationchange",_),o.removeEventListener("expandend",g),o.suspend(),n.remove()}function m(){t.classList.remove("u-hidden")}function y(){t.classList.add("u-hidden")}function T(){return d&&(o.collapse(),n.animateOn(),m(),d=!1),!d}function P(){return d||(n.animateOff(),o.expand(),y(),d=!0),d}let j=new A;return this.addEventListener=j.addEventListener,this.removeEventListener=j.removeEventListener,this.dispatchEvent=j.dispatchEvent,this.init=l,this}W.BASE_CLASS=R;W.init=e=>H(`.${R}`,W,e);var q="o-summary-minimal";function Q(e){let a=O(e,q),i=a.querySelector(`.${q}__content`),r=a.querySelector(`.${q}__btn`),t,n;function o(){return k(a)?(x(a,"behavior_flyout-menu"),x(i,"behavior_flyout-menu_content"),x(r,"behavior_flyout-menu_trigger"),window.addEventListener("load",d),this):this}function d(){window.removeEventListener("load",d),n=new I(a,!1),t=new E(i),t.init(E.CLASSES.MH_SUMMARY),n.setTransition(t,t.maxHeightSummary,t.maxHeightDefault),n.init(),a.addEventListener("focusin",l),i.addEventListener("click",u),n.collapse(),t.animateOn()}function l(v){v.target!==r&&(r.click(),a.removeEventListener("focusin",l))}function u(v){v.target.tagName!=="A"&&n.isExpanded()&&t.refresh()}let s=new A;return this.addEventListener=s.addEventListener,this.removeEventListener=s.removeEventListener,this.dispatchEvent=s.dispatchEvent,this.init=o,this}Q.BASE_CLASS=q;Q.init=e=>H(`.${q}`,Q,e);})();
|
|
2
2
|
//# sourceMappingURL=index.js.map
|