Skip to content

Commit

Permalink
update design system imports for 3.6.x
Browse files Browse the repository at this point in the history
  • Loading branch information
wpears committed Dec 18, 2024
1 parent a77aea7 commit c1b55d8
Show file tree
Hide file tree
Showing 55 changed files with 72 additions and 63 deletions.
2 changes: 1 addition & 1 deletion cfgov/unprocessed/apps/ask-cfpb/js/Autocomplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
EventObserver,
checkDom,
setInitFlag,
} from '@cfpb/cfpb-design-system/src/index.js';
} from '@cfpb/cfpb-design-system';
import throttle from 'lodash.throttle';

// Class constants
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { EventObserver } from '@cfpb/cfpb-design-system/src/index.js';
import { EventObserver } from '@cfpb/cfpb-design-system';
import Highcharts from 'highcharts/highmaps';
import accessibility from 'highcharts/modules/accessibility';
import colorRange from '../utils/color-range';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Highcharts from 'highcharts/highstock';
import accessibility from 'highcharts/modules/accessibility';
import { processDelinquencies } from '../utils/process-json';
import { EventObserver } from '@cfpb/cfpb-design-system/src/index.js';
import { EventObserver } from '@cfpb/cfpb-design-system';

accessibility(Highcharts);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import { addEventListenerToSelector } from '../../../apps/analytics-gtm/js/util/analytics-util';
import { analyticsSendEvent } from '@cfpb/cfpb-analytics';
import search from 'ctrl-f';
import { varsBreakpoints } from '@cfpb/cfpb-design-system/src/index.js';
import { varsBreakpoints } from '@cfpb/cfpb-design-system';
import { scrollIntoViewWithOffset } from './fig-sidenav-utils.js';

let secondaryNav;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* istanbul ignore file */
/* Cypress tests cover all the UI interactions on this page. */

import { varsBreakpoints } from '@cfpb/cfpb-design-system/src/index.js';
import { varsBreakpoints } from '@cfpb/cfpb-design-system';

import { addEventListenerToSelector } from '../../../apps/analytics-gtm/js/util/analytics-util';
import { analyticsSendEvent } from '@cfpb/cfpb-analytics';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { analyticsSendEvent } from '@cfpb/cfpb-analytics';
import { Expandable } from '@cfpb/cfpb-design-system/src/index.js';
import { Expandable } from '@cfpb/cfpb-design-system';

let buttonsDom;

Expand Down
2 changes: 1 addition & 1 deletion cfgov/unprocessed/apps/form-explainer/js/FormExplainer.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { scrollIntoView } from '../../../js/modules/util/scroll.js';
import DT from './dom-tools.js';
import { ExpandableGroup } from '@cfpb/cfpb-design-system/src/index.js';
import { ExpandableGroup } from '@cfpb/cfpb-design-system';

const CSS = {
HAS_ATTENTION: 'has-attention',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Required modules.
import { checkDom, setInitFlag } from '@cfpb/cfpb-design-system/src/index.js';
import { checkDom, setInitFlag } from '@cfpb/cfpb-design-system';
import rangesliderJs from 'rangeslider-js';

const BASE_CLASS = 'a-range';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
FlyoutMenu,
MaxHeightTransition,
EventObserver,
} from '@cfpb/cfpb-design-system/src/index.js';
} from '@cfpb/cfpb-design-system';

const BASE_CLASS = 'o-costs-group';

Expand Down
2 changes: 1 addition & 1 deletion cfgov/unprocessed/apps/prepaid-agreements/js/common.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
import { ExpandableGroup } from '@cfpb/cfpb-design-system/src/index.js';
import { ExpandableGroup } from '@cfpb/cfpb-design-system';
ExpandableGroup.init();
2 changes: 1 addition & 1 deletion cfgov/unprocessed/apps/regulations3k/js/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { handleContentClick, handleNavClick } from './analytics.js';
import { Expandable } from '@cfpb/cfpb-design-system/src/index.js';
import { Expandable } from '@cfpb/cfpb-design-system';

const navHeader = document.querySelector('.o-regs3k-navigation__header');
const navItems = document.querySelector('.o-regs3k-sections');
Expand Down
2 changes: 1 addition & 1 deletion cfgov/unprocessed/apps/regulations3k/js/search.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { behaviorAttach } from '@cfpb/cfpb-design-system/src/index.js';
import { behaviorAttach } from '@cfpb/cfpb-design-system';
import {
getSearchValues,
serializeFormFields,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { addEl, getEl, getEls, removeClass } from './dom-tools.js';

import PLUS_ROUND_ICON from '@cfpb/cfpb-design-system/src/components/cfpb-icons/icons/plus-round.svg';
import PLUS_ROUND_ICON from '@cfpb/cfpb-design-system/icons/plus-round.svg';

/**
* Checks whether an address is a duplicate to that in an array of addresses.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Common application-wide scripts for rural-or-underserved-tool.
========================================================================== */

import { ExpandableGroup } from '@cfpb/cfpb-design-system/src/index.js';
import { ExpandableGroup } from '@cfpb/cfpb-design-system';
import * as addressUtils from './address-utils.js';
import callCensus from './call-census.js';
import contentControl from './content-control.js';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import {
getNextEls,
} from './dom-tools.js';

import PLUS_ROUND_ICON from '@cfpb/cfpb-design-system/src/components/cfpb-icons/icons/plus-round.svg';
import MINUS_ROUND_ICON from '@cfpb/cfpb-design-system/src/components/cfpb-icons/icons/minus-round.svg';
import PLUS_ROUND_ICON from '@cfpb/cfpb-design-system/icons/plus-round.svg';
import MINUS_ROUND_ICON from '@cfpb/cfpb-design-system/icons/minus-round.svg';

const MAPBOX_JS_URL = 'https://api.mapbox.com/mapbox.js/v3.3.1/mapbox.js';
const MAPBOX_CSS_URL = 'https://api.mapbox.com/mapbox.js/v3.3.1/mapbox.css';
Expand Down
2 changes: 1 addition & 1 deletion cfgov/unprocessed/apps/tccp/js/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import tippy from 'tippy.js';
import { analyticsSendEvent } from '@cfpb/cfpb-analytics';
import { behaviorAttach } from '@cfpb/cfpb-design-system/src/index.js';
import { behaviorAttach } from '@cfpb/cfpb-design-system';

import orderingDropdown from './ordering';
import webStorageProxy from '../../../js/modules/util/web-storage-proxy';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
EventObserver,
instantiateAll,
setInitFlag,
} from '@cfpb/cfpb-design-system/src/index.js';
} from '@cfpb/cfpb-design-system';
import Delegate from 'ftdomdelegate';

const TAG_NAME = 'div';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// design-system to isolate TDP expandable customizations.

// Required modules.
import { EventObserver } from '@cfpb/cfpb-design-system/src/index.js';
import { EventObserver } from '@cfpb/cfpb-design-system';

/**
* BaseTransition
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
========================================================================== */

import AtomicComponent from './AtomicComponent.js';
import { EventObserver } from '@cfpb/cfpb-design-system/src/index.js';
import { EventObserver } from '@cfpb/cfpb-design-system';
import ExpandableTransition from './ExpandableTransition.js';

const eventObserver = new EventObserver();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import BaseTransition from './BaseTransition.js';
import { EventObserver } from '@cfpb/cfpb-design-system/src/index.js';
import { EventObserver } from '@cfpb/cfpb-design-system';

// Exported constants.
const CLASSES = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Required modules.
import BaseTransition from './BaseTransition.js';
import { EventObserver } from '@cfpb/cfpb-design-system/src/index.js';
import { EventObserver } from '@cfpb/cfpb-design-system';

// Exported constants.
const CLASSES = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { behaviorAttach } from '@cfpb/cfpb-design-system/src/index.js';
import { behaviorAttach } from '@cfpb/cfpb-design-system';
import {
getSearchValues,
serializeFormFields,
Expand Down
2 changes: 1 addition & 1 deletion cfgov/unprocessed/js/modules/TabTrigger.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { EventObserver } from '@cfpb/cfpb-design-system/src/index.js';
import { EventObserver } from '@cfpb/cfpb-design-system';

/**
* TabTrigger
Expand Down
2 changes: 1 addition & 1 deletion cfgov/unprocessed/js/modules/footer-button.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
scrolltop-animation-without-jquery
========================================================================== */

import { behaviorAttach } from '@cfpb/cfpb-design-system/src/index.js';
import { behaviorAttach } from '@cfpb/cfpb-design-system';

/**
* Set up event handler for button to scroll to top of page.
Expand Down
2 changes: 1 addition & 1 deletion cfgov/unprocessed/js/modules/util/breakpoint-state.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Get Breakpoint State
========================================================================== */

import { varsBreakpoints } from '@cfpb/cfpb-design-system/src/index.js';
import { varsBreakpoints } from '@cfpb/cfpb-design-system';

/**
* @returns {number} The base font size set on the body element.
Expand Down
2 changes: 1 addition & 1 deletion cfgov/unprocessed/js/modules/util/validators.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
========================================================================== */

// Required Modules
import { isEmpty } from '@cfpb/cfpb-design-system/src/index.js';
import { isEmpty } from '@cfpb/cfpb-design-system';

const ERROR_MESSAGES = {
EMAIL: {
Expand Down
2 changes: 1 addition & 1 deletion cfgov/unprocessed/js/molecules/GlobalSearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
EventObserver,
FlyoutMenu,
MoveTransition,
} from '@cfpb/cfpb-design-system/src/index.js';
} from '@cfpb/cfpb-design-system';
import { TabTrigger } from '../modules/TabTrigger.js';

const BASE_CLASS = 'm-global-search';
Expand Down
8 changes: 4 additions & 4 deletions cfgov/unprocessed/js/molecules/Notification.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { checkDom, setInitFlag } from '@cfpb/cfpb-design-system/src/index.js';
import SUCCESS_ICON from '@cfpb/cfpb-design-system/src/components/cfpb-icons/icons/approved-round.svg';
import WARNING_ICON from '@cfpb/cfpb-design-system/src/components/cfpb-icons/icons/warning-round.svg';
import ERROR_ICON from '@cfpb/cfpb-design-system/src/components/cfpb-icons/icons/error-round.svg';
import { checkDom, setInitFlag } from '@cfpb/cfpb-design-system';
import SUCCESS_ICON from '@cfpb/cfpb-design-system/icons/approved-round.svg';
import WARNING_ICON from '@cfpb/cfpb-design-system/icons/warning-round.svg';
import ERROR_ICON from '@cfpb/cfpb-design-system/icons/error-round.svg';

/**
* Constants for the state of this Notification.
Expand Down
2 changes: 1 addition & 1 deletion cfgov/unprocessed/js/organisms/AudioPlayer.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { checkDom, setInitFlag } from '@cfpb/cfpb-design-system/src/index.js';
import { checkDom, setInitFlag } from '@cfpb/cfpb-design-system';
import { analyticsSendEvent } from '@cfpb/cfpb-analytics';

const BASE_CLASS = 'o-audio-player';
Expand Down
2 changes: 1 addition & 1 deletion cfgov/unprocessed/js/organisms/FeaturedContentModule.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Featured Content Module Class
========================================================================== */

import { checkDom, setInitFlag } from '@cfpb/cfpb-design-system/src/index.js';
import { checkDom, setInitFlag } from '@cfpb/cfpb-design-system';
import VideoPlayer from './VideoPlayer.js';

const BASE_CLASS = 'o-featured-content-module';
Expand Down
2 changes: 1 addition & 1 deletion cfgov/unprocessed/js/organisms/FilterableListControls.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
instantiateAll,
Expandable,
Multiselect,
} from '@cfpb/cfpb-design-system/src/index.js';
} from '@cfpb/cfpb-design-system';
import { analyticsSendEvent } from '@cfpb/cfpb-analytics';
import FormModel from '../modules/util/FormModel.js';

Expand Down
2 changes: 1 addition & 1 deletion cfgov/unprocessed/js/organisms/Footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
checkDom,
instantiateAll,
setInitFlag,
} from '@cfpb/cfpb-design-system/src/index.js';
} from '@cfpb/cfpb-design-system';
import { init as footerButtonInit } from '../modules/footer-button.js';

const BASE_CLASS = 'o-footer';
Expand Down
2 changes: 1 addition & 1 deletion cfgov/unprocessed/js/organisms/FormSubmit.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
AlphaTransition,
BaseTransition,
EventObserver,
} from '@cfpb/cfpb-design-system/src/index.js';
} from '@cfpb/cfpb-design-system';
import Notification from '../molecules/Notification.js';
import { scrollIntoView } from '../modules/util/scroll.js';

Expand Down
2 changes: 1 addition & 1 deletion cfgov/unprocessed/js/organisms/Header.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { checkDom, setInitFlag } from '@cfpb/cfpb-design-system/src/index.js';
import { checkDom, setInitFlag } from '@cfpb/cfpb-design-system';
import { GlobalSearch } from '../molecules/GlobalSearch.js';
import { MegaMenu } from '../organisms/MegaMenu.js';

Expand Down
2 changes: 1 addition & 1 deletion cfgov/unprocessed/js/organisms/MegaMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
EventObserver,
FlyoutMenu,
MoveTransition,
} from '@cfpb/cfpb-design-system/src/index.js';
} from '@cfpb/cfpb-design-system';
import { MegaMenuDesktop } from '../organisms/MegaMenuDesktop.js';
import { MegaMenuMobile } from '../organisms/MegaMenuMobile.js';
import { TabTrigger } from '../modules/TabTrigger.js';
Expand Down
5 changes: 1 addition & 4 deletions cfgov/unprocessed/js/organisms/MegaMenuDesktop.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import { bfs } from '../modules/util/tree-traversal.js';
import {
EventObserver,
MoveTransition,
} from '@cfpb/cfpb-design-system/src/index.js';
import { EventObserver, MoveTransition } from '@cfpb/cfpb-design-system';

/**
* MegaMenuDesktop
Expand Down
5 changes: 1 addition & 4 deletions cfgov/unprocessed/js/organisms/MegaMenuMobile.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import { bfs } from '../modules/util/tree-traversal.js';
import {
EventObserver,
MoveTransition,
} from '@cfpb/cfpb-design-system/src/index.js';
import { EventObserver, MoveTransition } from '@cfpb/cfpb-design-system';

/**
* MegaMenuMobile
Expand Down
2 changes: 1 addition & 1 deletion cfgov/unprocessed/js/organisms/SecondaryNav.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
MaxHeightTransition,
EventObserver,
FlyoutMenu,
} from '@cfpb/cfpb-design-system/src/index.js';
} from '@cfpb/cfpb-design-system';

const BASE_CLASS = 'o-secondary-nav';

Expand Down
2 changes: 1 addition & 1 deletion cfgov/unprocessed/js/organisms/VideoPlayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
checkDom,
setInitFlag,
EventObserver,
} from '@cfpb/cfpb-design-system/src/index.js';
} from '@cfpb/cfpb-design-system';
import { formatTimestamp } from '../modules/util/strings.js';
import youTubeAPI from '../modules/youtube-api.js';

Expand Down
2 changes: 1 addition & 1 deletion cfgov/unprocessed/js/routes/credit-cards/single.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import { Expandable } from '@cfpb/cfpb-design-system/src/index.js';
import { Expandable } from '@cfpb/cfpb-design-system';

Expandable.init(document.querySelector('#ccagrsearch_helper-container'));
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {
Multiselect,
SummaryMinimal,
} from '@cfpb/cfpb-design-system/src/index.js';
} from '@cfpb/cfpb-design-system';

Multiselect.init();
SummaryMinimal.init();
2 changes: 1 addition & 1 deletion cfgov/unprocessed/js/routes/on-demand/audio-player.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
========================================================================== */

import AudioPlayer from '../../organisms/AudioPlayer';
import { instantiateAll } from '@cfpb/cfpb-design-system/src/index.js';
import { instantiateAll } from '@cfpb/cfpb-design-system';

instantiateAll('audio', AudioPlayer);
2 changes: 1 addition & 1 deletion cfgov/unprocessed/js/routes/on-demand/expandable-group.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
Scripts for Expandable Group organism.
========================================================================== */

import { ExpandableGroup } from '@cfpb/cfpb-design-system/src/index.js';
import { ExpandableGroup } from '@cfpb/cfpb-design-system';
ExpandableGroup.init();
2 changes: 1 addition & 1 deletion cfgov/unprocessed/js/routes/on-demand/expandable.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
Scripts for Expandable Molecule.
========================================================================== */

import { Expandable } from '@cfpb/cfpb-design-system/src/index.js';
import { Expandable } from '@cfpb/cfpb-design-system';
Expandable.init();
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
========================================================================== */

import FeaturedContentModule from '../../organisms/FeaturedContentModule';
import { instantiateAll } from '@cfpb/cfpb-design-system/src/index.js';
import { instantiateAll } from '@cfpb/cfpb-design-system';

instantiateAll(`.${FeaturedContentModule.BASE_CLASS}`, FeaturedContentModule);
2 changes: 1 addition & 1 deletion cfgov/unprocessed/js/routes/on-demand/summary.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
import { Summary } from '@cfpb/cfpb-design-system/src/index.js';
import { Summary } from '@cfpb/cfpb-design-system';
Summary.init();
2 changes: 1 addition & 1 deletion cfgov/unprocessed/js/routes/on-demand/video-player.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
========================================================================== */

import VideoPlayer from '../../organisms/VideoPlayer';
import { instantiateAll } from '@cfpb/cfpb-design-system/src/index.js';
import { instantiateAll } from '@cfpb/cfpb-design-system';

instantiateAll(`.${VideoPlayer.BASE_CLASS}`, VideoPlayer);
1 change: 1 addition & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ export default [
// Some plugins are automatically included.
// plugins: {},
rules: {
'import/no-unresolved': 0,
'jsdoc/require-hyphen-before-param-description': ['warn', 'always'],
'no-console': ['warn'],
'no-use-before-define': ['error', 'nofunc'],
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added npm-packages-offline-cache/tippy.js-6.3.7.tgz
Binary file not shown.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"dependencies": {
"@cfpb/browserslist-config": "0.0.3",
"@cfpb/cfpb-analytics": "0.3.2",
"@cfpb/cfpb-design-system": "3.5.0",
"@cfpb/cfpb-design-system": "3.6.1",
"@csstools/postcss-sass": "5.1.1",
"@csstools/sass-import-resolve": "1.0.0",
"autoprefixer": "10.4.20",
Expand Down
Loading

0 comments on commit c1b55d8

Please sign in to comment.